Skip to content

Latest commit

 

History

History
4008 lines (2254 loc) · 133 KB

File metadata and controls

4008 lines (2254 loc) · 133 KB

andculturecode-javascript-core

andculturecode-javascript-core

Index

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Array Functions

Other Functions

Object literals

Namespaces

__global

__global:

Defined in src/utilities/browser-utils.ts:4

Allows us to use the documentMode for feature detection on globalThis.Document

Document

Document:

Defined in src/utilities/browser-utils.ts:5

Optional documentMode

documentMode? : any

Defined in src/utilities/browser-utils.ts:6

Type aliases

AsyncWorkload

Ƭ AsyncWorkload: function

Defined in src/types/async-workload.ts:4

Represents an asynchronous method reference.

Type declaration:

▸ (): Promise‹T›


CancellablePromise

Ƭ CancellablePromise: object

Defined in src/types/cancellable-promise.ts:1

Type declaration:

  • cancel(): function

    • (): void
  • promise: Promise‹T›


CatchResultHandler

Ƭ CatchResultHandler: function

Defined in src/types/catch-result-handler.ts:6

Handler for a typed error ResultRecord, or any type if a Javascript error occurred.

Type declaration:

▸ (result?: ResultRecord‹T›, error?: any): void

Parameters:

Name Type
result? ResultRecord‹T›
error? any

Constructor

Ƭ Constructor: object

Defined in src/types/constructor.ts:4

Represents the constructor of a typed object which can be used for instantiation.

Type declaration:


FinallyHandler

Ƭ FinallyHandler: function

Defined in src/types/finally-handler.ts:4

Handler for Do.try().finally(); Runs whether an error occurred or not.

Type declaration:

▸ (): void


OmitKeys

Ƭ OmitKeys: Omit‹TSource, keyof TExclusion›

Defined in src/types/omit-keys.ts:8

Omit all keys from TSource that intersect with TExclusion


RequiredOr

Ƭ RequiredOr: object

Defined in src/types/required-or.ts:8

Mark all properties of T as required from the original type or another type

Type declaration:


RequiredOrUndefined

Ƭ RequiredOrUndefined: RequiredOr‹T, undefined›

Defined in src/types/required-or-undefined.ts:10

Mark all properties of T as required or explicitly set as undefined


SyncWorkload

Ƭ SyncWorkload: function

Defined in src/types/sync-workload.ts:4

Represents a synchronous method reference.

Type declaration:

▸ (): T


TimerFunctionReturn

Ƭ TimerFunctionReturn: object

Defined in src/types/timer-function-return.ts:1

Type declaration:

  • stop(log?: undefined | false | true): number

Variables

Const NetworkInformationUtils

NetworkInformationUtils: object = buildNetworkInformationUtils( typeof window !== "undefined" ? window : undefined )

Defined in src/utilities/network-information-utils.ts:50

Type declaration:


Const REGEX_VALID_CULTURE_CODE

REGEX_VALID_CULTURE_CODE: RegExp‹› = /^([a-zA-Z]{2}((-|_)[a-zA-Z]{2})?)$/

Defined in src/utilities/string-utils.ts:21

Validates a culture code format. Based off of https://regexr.com/3faf5, but looser to allow dashes or underscores as separators.

example en en-US en_US en_us EN_US


Const REGEX_VALID_EMAIL

REGEX_VALID_EMAIL: RegExp‹› = /^(([^<>()[]\.,;:\s@"]+(.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/

Defined in src/utilities/string-utils.ts:22


Const ResultErrorRecordFactory

ResultErrorRecordFactory: IFactory‹ResultErrorRecord‹›› = Factory.define( FactoryType.ResultErrorRecord, ResultErrorRecord ) .sequence("key", (i: number) => TEST_ERROR_KEY_${i}) .sequence("message", (i: number) => Test error message ${i})

Defined in src/tests/factories/result-error-record-factory.ts:9


Const ResultRecordFactory

ResultRecordFactory: IFactory‹ResultRecord‹any›› = Factory.define<ResultRecord>( FactoryType.ResultRecord, ResultRecord )

Defined in src/tests/factories/result-record-factory.ts:9


Const VideoResolutions

VideoResolutions: object[] = [ { height: 1080, label: "1080p(FHD)", ratio: "16:9", width: 1920, }, { height: 1200, label: "UXGA", ratio: "4:3", width: 1600, }, { height: 720, label: "720p(HD)", ratio: "16:9", width: 1280, }, { height: 600, label: "SVGA", ratio: "4:3", width: 800, }, { height: 480, label: "VGA", ratio: "4:3", width: 640, }, { height: 360, label: "360p(nHD)", ratio: "16:9", width: 640, }, { height: 288, label: "CIF", ratio: "4:3", width: 352, }, { height: 240, label: "QVGA", ratio: "4:3", width: 320, }, { height: 144, label: "QCIF", ratio: "4:3", width: 176, }, { height: 120, label: "QQVGA", ratio: "4:3", width: 160, }, ]

Defined in src/constants/video-resolutions.ts:1


Let _currentCultureCode

_currentCultureCode: string

Defined in src/utilities/service-utils.ts:16


Const _defaultApiUrl

_defaultApiUrl: "/api/v1" = "/api/v1"

Defined in src/utilities/service-utils.ts:17


Const _routeParamRegEx

_routeParamRegEx: RegExp‹› = /(:[a-z_-]*)/gi

Defined in src/utilities/route-utils.ts:8


Const errorCultureIsRequired

errorCultureIsRequired: "Culture is required" = "Culture is required"

Defined in src/utilities/localization-utils.ts:18


Const routeParam

routeParam: "culture" = "culture"

Defined in src/utilities/localization-utils.ts:23

Key name for handling language selection in routing (ie. queryString, path, etc...)


Const t

t: translate = translate

Defined in src/utilities/localization-utils.ts:163

Retrieve translation for given key in the currently configured language

param culture resource key

param object key/values for interpolation of dynamic values

Array Functions

Const intersectionWith

intersectionWith<T1, T2>(array: List‹T1›, values: List‹T2›, comparator: Comparator2‹T1, T2›): T1[]

Defined in src/utilities/collection-utils.ts:187

Creates an array of unique array values not included in the other provided arrays using SameValueZero for equality comparisons.

example

var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];

_.intersectionWith(objects, others, _.isEqual); => [{ 'x': 1, 'y': 2 }]

Type parameters:

T1

T2

Parameters:

Name Type
array List‹T1›
values List‹T2›
comparator Comparator2‹T1, T2›

Returns: T1[]

Returns the new array of filtered values.


Other Functions

Const _configure

_configure(cultureCode?: undefined | string, onApiResponseError?: undefined | function, onApiResponseSuccess?: undefined | function): void

Defined in src/utilities/service-utils.ts:31

Configures global service properties for your application

Parameters:

Name Type Description
cultureCode? undefined | string Current culture code of the application
onApiResponseError? undefined | function Global handler called whenever there is an erroneous API response
onApiResponseSuccess? undefined | function Global handler called whenever there is a successful API response

Returns: void


Const _configureCultureCode

_configureCultureCode(cultureCode?: undefined | string, apiUrl: string): void

Defined in src/utilities/service-utils.ts:46

Configure application's services for the provided culture

Parameters:

Name Type Default Description
cultureCode? undefined | string - Requested RFC-4646 language code
apiUrl string _defaultApiUrl Application's base api url (hopefully versioned)

Returns: void


Const _configureHeaders

_configureHeaders(): void

Defined in src/utilities/service-utils.ts:66

Configure axios HTTP headers

Returns: void


Const _configureInterceptors

_configureInterceptors(onApiResponseError?: undefined | function, onApiResponseSuccess?: undefined | function): void

Defined in src/utilities/service-utils.ts:78

Configures axios global API interceptors

Parameters:

Name Type Description
onApiResponseError? undefined | function -
onApiResponseSuccess? undefined | function

Returns: void


Const _isIE

_isIE(): boolean

Defined in src/utilities/browser-utils.ts:14

Returns true if the detected browser is Internet Explorer.

Returns: boolean

boolean


Const _isNotIE

_isNotIE(): boolean

Defined in src/utilities/browser-utils.ts:22

Returns true if the brower is NOT Internet Explorer.

Returns: boolean

boolean


Const _mapAxiosResponse

_mapAxiosResponse<TRecord>(recordType: object, axiosResponse: AxiosResponse‹Result‹TRecord››): ServiceResponse‹TRecord›

Defined in src/utilities/service-utils.ts:93

Translates axios specific data response to a more generic ServiceResponse type for consumption throughout the system

Type parameters:

TRecord

Parameters:

recordType: object

Name Type
constructor

axiosResponse: AxiosResponse‹Result‹TRecord››

Returns: ServiceResponse‹TRecord›


Const _mapPagedAxiosResponse

_mapPagedAxiosResponse<TRecord>(recordType: object, axiosResponse: AxiosResponse‹PagedResult‹TRecord››): ServiceResponse‹TRecord›

Defined in src/utilities/service-utils.ts:121

Translates axios specific data responses to a more generic ServiceResponse type for consumption throughout the system

Type parameters:

TRecord

Parameters:

recordType: object

Name Type
constructor

axiosResponse: AxiosResponse‹PagedResult‹TRecord››

Returns: ServiceResponse‹TRecord›


Const _scrollToElementById

_scrollToElementById(id: string, options: ScrollOptions): void

Defined in src/utilities/scroll-utils.ts:27

Attempts to scroll to the element specified by the given ID. In the event of a slow page render, the element may not be immediately available. This method will retry up to 50 times every 100ms to find the element before giving up.

Parameters:

Name Type Default
id string -
options ScrollOptions DefaultScrollOptions

Returns: void


Const _scrollToHash

_scrollToHash(location: any, options: ScrollOptions): void

Defined in src/utilities/scroll-utils.ts:73

Attempts to scroll to the element specified in the hash of the current path. In the event of a slow page render, the element may not be immediately available. This method will retry up to 50 times every 100ms to find the element before giving up.

Reference: https://stackoverflow.com/a/54042987 https://stackoverflow.com/a/48195222

Parameters:

Name Type Default
location any -
options ScrollOptions DefaultScrollOptions

Returns: void


Const appendQueryParams

appendQueryParams(path: string, queryParams: any, arrayFormat: QueryStringArrayFormat, arrayFormatSeparator: string | undefined): string

Defined in src/utilities/route-utils.ts:23

Appends the supplied query params object as a query string to path. Even if path is null.

Parameters:

Name Type Default Description
path string - Existing path (can be null)
queryParams any - Object to transform into query string
arrayFormat QueryStringArrayFormat QueryStringArrayFormat.Index Format to serialize arrays to a query string with. Defaults to "index".
arrayFormatSeparator string | undefined undefined Seaparator character to use if using arrayFormat="separator"

Returns: string


buildNetworkInformationUtils

buildNetworkInformationUtils(window?: Window): object

Defined in src/utilities/network-information-utils.ts:9

Parameters:

Name Type
window? Window

Returns: object


Const camelCase

camelCase(string?: undefined | string): string

Defined in src/utilities/string-utils.ts:36

Converts string to camel case.

Parameters:

Name Type Description
string? undefined | string The string to convert.

Returns: string

Returns the camel cased string.


Const capitalize

capitalize(string?: undefined | string): string

Defined in src/utilities/string-utils.ts:44

Converts the first character of string to upper case and the remaining to lower case.

Parameters:

Name Type Description
string? undefined | string The string to capitalize.

Returns: string

Returns the capitalized string.


Const changeCultureCode

changeCultureCode(cultureCode: string): Promise‹TFunction›

Defined in src/utilities/localization-utils.ts:50

Updates application's configured language used for translations

Parameters:

Name Type Description
cultureCode string RFC-4646 culture code

Returns: Promise‹TFunction›


Const cultureCodeFromQueryString

cultureCodeFromQueryString(): string

Defined in src/utilities/localization-utils.ts:56

Returns the culture code from the querystring, ie /login?culture=en-us

Returns: string


Const cultureCodeFromRoute

cultureCodeFromRoute(): string

Defined in src/utilities/localization-utils.ts:64

Returns the culture code from the first position in the route, ie /en-us/xyz

Returns: string


Const cultureFactory

cultureFactory<TResources>(base: Culture‹any›, culture: Partial‹Culture‹TResources››): Culture‹TResources›

Defined in src/utilities/localization-utils.ts:71

Factory to build an inheritance chain for base to child Culture types

Type parameters:

TResources

Parameters:

Name Type Description
base Culture‹any› Base culture from core package
culture Partial‹Culture‹TResources›› subclass culture's partial properties to override 'base'. Typically where providing culture resources

Returns: Culture‹TResources›


Const culturesToResources

culturesToResources<TResources>(cultures: Culture‹TResources›[]): any

Defined in src/utilities/localization-utils.ts:76

Type parameters:

TResources

Parameters:

Name Type
cultures Culture‹TResources›[]

Returns: any


Const currentCultureCode

currentCultureCode(): string

Defined in src/utilities/localization-utils.ts:89

Returns currently configured RFC-4646 culture code

Returns: string


Const defaultCultureCode

defaultCultureCode(): string

Defined in src/utilities/localization-utils.ts:91

Returns: string


Const detectCultureCode

detectCultureCode(): string

Defined in src/utilities/localization-utils.ts:98

Detect and set current language for which to provide translations

Returns: string

string current RFC-4646 culture code


Const difference

difference<T>(array: List‹T› | null | undefined, ...values: Array‹List‹T››): T[]

Defined in src/utilities/collection-utils.ts:62

Creates an array of unique array values not included in the other provided arrays using SameValueZero for equality comparisons.

Type parameters:

T

Parameters:

Name Type Description
array List‹T› | null | undefined The array to inspect.
...values Array‹List‹T›› The arrays of values to exclude.

Returns: T[]

Returns the new array of filtered values.


Const equalsBy

equalsBy<T, V>(selector: function, array1: Array‹T› | List‹any› | undefined, array2: Array‹T› | List‹any› | undefined): boolean

Defined in src/utilities/collection-utils.ts:26

Compare two collections by a property of each value, specified by selector, not considering the order of elements, as long as all elements of one exist in the other.

Type parameters:

T

V

Parameters:

selector: function

a function taking the item of the array and returning a property.

▸ (element: T): V

Parameters:

Name Type
element T

array1: Array‹T› | List‹any› | undefined

first array to compare.

array2: Array‹T› | List‹any› | undefined

second array to compare.

Returns: boolean

true if both arrays contain all the same elements of the other, not considering order, false otherwise.


Const filename

filename(value?: undefined | string): string | undefined

Defined in src/utilities/string-utils.ts:50

Returns the filename from the supplied string, including extension

Parameters:

Name Type Description
value? undefined | string

Returns: string | undefined


Const first

first<T>(array: List‹T› | null | undefined): T | undefined

Defined in src/utilities/collection-utils.ts:156

Gets the first element of array.

alias _.first

Type parameters:

T

Parameters:

Name Type Description
array List‹T› | null | undefined The array to query.

Returns: T | undefined

Returns the first element of array.


Const flattenDeep

flattenDeep<T>(array: ListOfRecursiveArraysOrValues‹T› | null | undefined): T[]

Defined in src/utilities/collection-utils.ts:73

Recursively flattens a nested array.

Type parameters:

T

Parameters:

Name Type Description
array ListOfRecursiveArraysOrValues‹T› | null | undefined The array to recursively flatten.

Returns: T[]

Returns the new flattened array.


Const getUrl

getUrl(path: string, pathParams?: any): string

Defined in src/utilities/route-utils.ts:61

Convenience method to get a Url from a RouteDefinition

Parameters:

Name Type Description
path string Route path template. Parameters in the path are denoted withed a colon :id
pathParams? any Object with keys matching supplied path template components

Returns: string


Const getUrlFromPath

getUrlFromPath(path: string, pathParams?: any, queryParams?: any): string

Defined in src/utilities/route-utils.ts:71

Constructs a url from a formatted route path.

Parameters:

Name Type Description
path string Route path template. Parameters in the path are denoted withed a colon :id
pathParams? any Object with keys matching supplied path template components
queryParams? any Object to get translated to the query string of the url

Returns: string


Const hasValue

hasValue(value?: undefined | string): value is string

Defined in src/utilities/string-utils.ts:60

Determines whether or not the provided value is NOT undefined, null, or an empty string (after trimming both ends of the string)

Parameters:

Name Type
value? undefined | string

Returns: value is string


Const hasValues

hasValues(collection: any[] | List‹any› | null | undefined): collection is any[] | List

Defined in src/utilities/collection-utils.ts:87

Checks for values in a collection. Returns false if the collection is undefined, null, or the respective object type's "empty" state, ie length or size 0.

Note: only takes a single collection as parameter to make use of Typescript Type guard ability

Parameters:

Name Type
collection any[] | List‹any› | null | undefined

Returns: collection is any[] | List

False if collection is undefined, null, or has 0 elements. True if collection contains any elements.


Const initialize

initialize<TResources>(module: any, cultures: Culture‹TResources›[], options: LocalizationInitOptions): i18n

Defined in src/utilities/localization-utils.ts:125

Initialize frontend i18n module - typically in root/startup of application

Type parameters:

TResources

Parameters:

Name Type Default Description
module any - Third party module for use with i18next (ie. initReactI18next)
cultures Culture‹TResources›[] - List of supported language cultures
options LocalizationInitOptions defaultInitOptions Additional options for configuring i18n detection

Returns: i18n


Const intersection

intersection<T>(...arrays: Array‹List‹T››): T[]

Defined in src/utilities/collection-utils.ts:166

Creates an array of unique values that are included in all of the provided arrays using SameValueZero for equality comparisons.

Type parameters:

T

Parameters:

Name Type Description
...arrays Array‹List‹T›› The arrays to inspect.

Returns: T[]

Returns the new array of shared values.


Const isAbsoluteUrl

isAbsoluteUrl(url: string): boolean

Defined in src/utilities/route-utils.ts:91

Determines if supplied url is an absolute url

Parameters:

Name Type Description
url string

Returns: boolean


Const isDevelopment

isDevelopment(): boolean

Defined in src/utilities/environment-utils.ts:10

Function to return whether or not the current environment is development.

Returns: boolean


Const isEmpty

isEmpty(collection: any[] | List‹any› | null | undefined): collection is undefined

Defined in src/utilities/collection-utils.ts:102

Checks if there aren't any values in a collection. Returns true if the collection is undefined, null, or the respective object type's "empty" state, ie length or size 0. Determines whether or not the provided value is undefined, null, or an empty string (after trimming both ends of the string)

Note: only takes a single collection as parameter to make use of Typescript Type guard ability

Parameters:

Name Type Description
collection any[] | List‹any› | null | undefined

Returns: collection is undefined

True if collection is undefined, null, or has 0 elements. False if collection contains any elements.

isEmpty(value?: undefined | string): value is undefined

Defined in src/utilities/string-utils.ts:71

Checks if there aren't any values in a collection. Returns true if the collection is undefined, null, or the respective object type's "empty" state, ie length or size 0. Determines whether or not the provided value is undefined, null, or an empty string (after trimming both ends of the string)

Note: only takes a single collection as parameter to make use of Typescript Type guard ability

Parameters:

Name Type
value? undefined | string

Returns: value is undefined

True if collection is undefined, null, or has 0 elements. False if collection contains any elements.


Const isNotEmpty

isNotEmpty(collection: any[] | List‹any› | null | undefined): collection is any[] | List

Defined in src/utilities/collection-utils.ts:126

Checks for values in a collection. Returns false if the collection is undefined, null, or the respective object type's "empty" state, ie length or size 0. Alias for CollectionUtils.hasValues

Note: only takes a single collection as parameter to make use of Typescript Type guard ability

Parameters:

Name Type
collection any[] | List‹any› | null | undefined

Returns: collection is any[] | List

False if collection is undefined, null, or has 0 elements. True if collection contains any elements.


Const isValidCultureCode

isValidCultureCode(cultureCode?: undefined | string): cultureCode is string

Defined in src/utilities/string-utils.ts:80

Validates the given string as RFC-4646 culture code format

Parameters:

Name Type Description
cultureCode? undefined | string

Returns: cultureCode is string


Const isValidEmail

isValidEmail(value?: undefined | string): value is string

Defined in src/utilities/string-utils.ts:88

Validates a given string matches a valid email format

Parameters:

Name Type Description
value? undefined | string

Returns: value is string


Const join

join(values: string[], separator: string): string

Defined in src/utilities/string-utils.ts:99

Joins an array of strings into one string with a separator. If the array is empty, it will return an empty string.

default ""

Parameters:

Name Type Default Description
values string[] - Values to join into one string.
separator string "," -

Returns: string


Const length

length(arr: Array‹any› | List‹any›): number

Defined in src/utilities/collection-utils.ts:136

Utility function to get the length of a collection when the collection might be either a Immutable.List or an Array

Parameters:

Name Type Description
arr Array‹any› | List‹any› the collection

Returns: number

number the length of the collection


Const lowerFirst

lowerFirst(string?: undefined | string): string

Defined in src/utilities/string-utils.ts:113

Converts the first character of string to lower case.

Parameters:

Name Type Description
string? undefined | string The string to convert.

Returns: string

Returns the converted string.


Const pad

pad(string?: undefined | string, length?: undefined | number, chars?: undefined | string): string

Defined in src/utilities/string-utils.ts:124

Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if they can’t be evenly divided by length.

Parameters:

Name Type Description
string? undefined | string The string to pad.
length? undefined | number The padding length.
chars? undefined | string The string used as padding.

Returns: string

Returns the padded string.


Const padEnd

padEnd(string?: undefined | string, length?: undefined | number, chars?: undefined | string): string

Defined in src/utilities/string-utils.ts:136

Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed length.

Parameters:

Name Type Description
string? undefined | string The string to pad.
length? undefined | number The padding length.
chars? undefined | string The string used as padding.

Returns: string

Returns the padded string.


Const padStart

padStart(string?: undefined | string, length?: undefined | number, chars?: undefined | string): string

Defined in src/utilities/string-utils.ts:148

Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed length.

Parameters:

Name Type Description
string? undefined | string The string to pad.
length? undefined | number The padding length.
chars? undefined | string The string used as padding.

Returns: string

Returns the padded string.


Const pluralize

pluralize(number: number, singular?: undefined | string, plural?: undefined | string): string

Defined in src/utilities/string-utils.ts:166

Returns the plural version of a given word if the value is not 1. The default suffix is 's'.

example Humanize.pluralize(1, "duck") => "duck"

Humanize.pluralize(3, "duck") => "ducks"

Humanize.pluralize(3, "duck", "duckies") => "duckies"

Parameters:

Name Type
number number
singular? undefined | string
plural? undefined | string

Returns: string


Const queryStringToObject

queryStringToObject<T>(queryString: string, arrayFormat: QueryStringArrayFormat, parseNumbers: boolean, parseBooleans: boolean): T

Defined in src/utilities/route-utils.ts:101

Parse a query string and return an object of type T

Type parameters:

T

Parameters:

Name Type Default Description
queryString string - current query string
arrayFormat QueryStringArrayFormat QueryStringArrayFormat.Index format to parse arrays from
parseNumbers boolean true convert numbers to number type from string
parseBooleans boolean true convert booleans to boolean type from string

Returns: T


Const registerPromiseFinallyPolyfill

registerPromiseFinallyPolyfill(): void

Defined in src/utilities/polyfill-utils.ts:9

Promise.finally is not natively supported in Internet Explorer.

Returns: void


Const removeElementAt

removeElementAt<T>(source: Array‹T›, index: number): Array‹T›

Defined in src/utilities/collection-utils.ts:198

Removes a supplied element by index

Type parameters:

T

Parameters:

Name Type Description
source Array‹T› original array
index number array index to remove

Returns: Array‹T›


Const repeat

repeat(string?: undefined | string, n?: undefined | number): string

Defined in src/utilities/string-utils.ts:179

Repeats the given string n times.

Parameters:

Name Type Description
string? undefined | string The string to repeat.
n? undefined | number The number of times to repeat the string.

Returns: string

Returns the repeated string.


Const replaceElementAt

replaceElementAt<T>(source: Array‹T›, index: number, value: T): Array‹T›

Defined in src/utilities/collection-utils.ts:218

Returns a NEW array with the element at the specified index replaced with the specified value if the index provided is greater than zero, else it returns the source array. Since it returns a new array, this can be safely used as the value for a React.SetStateAction i.e. setMyArray(CollectionUtils.replaceElementAt(myArray, index, newValue));

Type parameters:

T

Parameters:

Name Type Description
source Array‹T› -
index number -
value T

Returns: Array‹T›


Const replacePathParams

replacePathParams(path: string, pathParams: any): string

Defined in src/utilities/route-utils.ts:120

Replace routing components in supplied path with keys and values of supplied pathParams.

Parameters:

Name Type Description
path string Path containing routing components (format: ':key'). Throws an error if any components aren't found in the pathParams object.
pathParams any Object to transform into the supplied path.

Returns: string


Const runIfDevelopment

runIfDevelopment(fn: function): void

Defined in src/utilities/environment-utils.ts:19

Conditionally runs the given function, depending on whether the current environment is development or not.

Parameters:

fn: function

Function to be run in a development environment only.

▸ (): any

Returns: void


Const sample

sample<T>(collection: List‹T› | Dictionary‹T› | NumericDictionary‹T› | null | undefined): T | undefined

Defined in src/utilities/collection-utils.ts:243

Gets a random element from collection.

Type parameters:

T

Parameters:

Name Type Description
collection List‹T› | Dictionary‹T› | NumericDictionary‹T› | null | undefined The collection to sample.

Returns: T | undefined

Returns the random element.


Const sampleSize

sampleSize<T>(collection: List‹T› | Dictionary‹T› | NumericDictionary‹T› | null | undefined, n?: undefined | number): T[]

Defined in src/utilities/collection-utils.ts:259

Gets n random elements at unique keys from collection up to the size of collection.

Type parameters:

T

Parameters:

Name Type Description
collection List‹T› | Dictionary‹T› | NumericDictionary‹T› | null | undefined The collection to sample.
n? undefined | number The number of elements to sample.

Returns: T[]

Returns the random elements.


Const snakeCase

snakeCase(string?: undefined | string): string

Defined in src/utilities/string-utils.ts:187

Converts string to snake case.

Parameters:

Name Type Description
string? undefined | string The string to convert.

Returns: string

Returns the snake cased string.


Const sortByString

sortByString<T>(array: Array‹T›, selector: function, caseSensitive: boolean): T[]

Defined in src/utilities/collection-utils.ts:275

Sort an array of items alphabetically by one property of the item.

Type parameters:

T: any

Parameters:

array: Array‹T›

the source array of items

selector: function

function returning property to sort by from item

▸ (element: T): string

Parameters:

Name Type
element T

Default value caseSensitive: boolean= false

whether to consider letter case when sorting

Returns: T[]


Const startCase

startCase(string?: undefined | string): string

Defined in src/utilities/string-utils.ts:195

Converts string to start case.

Parameters:

Name Type Description
string? undefined | string The string to convert.

Returns: string

Returns the start cased string.


Const take

take<T>(array: List‹T› | null | undefined, n?: undefined | number): T[]

Defined in src/utilities/collection-utils.ts:315

Creates a slice of array with n elements taken from the beginning.

Type parameters:

T

Parameters:

Name Type Description
array List‹T› | null | undefined The array to query.
n? undefined | number The number of elements to take.

Returns: T[]

Returns the slice of array.


Const template

template(string?: undefined | string, options?: TemplateOptions): TemplateExecutor

Defined in src/utilities/string-utils.ts:223

Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data properties may be accessed as free variables in the template. If a setting object is provided it takes precedence over _.templateSettings values.

Note: In the development build _.template utilizes sourceURLs for easier debugging.

For more information on precompiling templates see lodash's custom builds documentation.

For more information on Chrome extension sandboxes see Chrome's extensions documentation.

Parameters:

Name Type Description
string? undefined | string The template string.
options? TemplateOptions The options object.

Returns: TemplateExecutor

Returns the compiled template function.


Const translate

translate(key: string, options?: any): string

Defined in src/utilities/localization-utils.ts:156

Retrieve translation for given key in the currently configured language

Parameters:

Name Type Description
key string culture resource key
options? any object key/values for interpolation of dynamic values

Returns: string


Const truncateRight

truncateRight(value: string, truncateAtPos: number): string

Defined in src/utilities/string-utils.ts:228

Parameters:

Name Type
value string
truncateAtPos number

Returns: string


Const upperFirst

upperFirst(string?: undefined | string): string

Defined in src/utilities/string-utils.ts:246

Converts the first character of string to upper case.

Parameters:

Name Type Description
string? undefined | string The string to convert.

Returns: string

Returns the converted string.


Const words

words(string?: undefined | string, pattern?: string | RegExp): string[]

Defined in src/utilities/string-utils.ts:255

Splits string into an array of its words.

Parameters:

Name Type Description
string? undefined | string The string to inspect.
pattern? string | RegExp The pattern to match words.

Returns: string[]

Returns the words of string.

Object literals

Const AuditableDefaultValues

AuditableDefaultValues: object

Defined in src/constants/auditable-default-values.ts:7

createdById

createdById: undefined = undefined

Defined in src/constants/auditable-default-values.ts:8

createdOn

createdOn: undefined = undefined

Defined in src/constants/auditable-default-values.ts:9

deletedById

deletedById: undefined = undefined

Defined in src/constants/auditable-default-values.ts:10

deletedOn

deletedOn: undefined = undefined

Defined in src/constants/auditable-default-values.ts:11

id

id: undefined = undefined

Defined in src/constants/auditable-default-values.ts:12

updatedById

updatedById: undefined = undefined

Defined in src/constants/auditable-default-values.ts:13

updatedOn

updatedOn: undefined = undefined

Defined in src/constants/auditable-default-values.ts:14


Const BaseEnglishUnitedStates

BaseEnglishUnitedStates: object

Defined in src/cultures/base-english-united-states.ts:4

code

code: string = Rfc4646LanguageCodes.EN_US

Defined in src/cultures/base-english-united-states.ts:5

resources

resources: null = null

Defined in src/cultures/base-english-united-states.ts:6


Const BaseSpanishSpain

BaseSpanishSpain: object

Defined in src/cultures/base-spanish-spain.ts:4

code

code: string = Rfc4646LanguageCodes.ES_ES

Defined in src/cultures/base-spanish-spain.ts:5

resources

resources: null = null

Defined in src/cultures/base-spanish-spain.ts:6


Const BrowserUtils

BrowserUtils: object

Defined in src/utilities/browser-utils.ts:24

isIE

isIE: _isIE = _isIE

Defined in src/utilities/browser-utils.ts:25

isNotIE

isNotIE: _isNotIE = _isNotIE

Defined in src/utilities/browser-utils.ts:26


Const CollectionUtils

CollectionUtils: object

Defined in src/utilities/collection-utils.ts:324

difference

difference: difference

Defined in src/utilities/collection-utils.ts:325

equalsBy

equalsBy: equalsBy

Defined in src/utilities/collection-utils.ts:326

first

first: first

Defined in src/utilities/collection-utils.ts:327

flattenDeep

flattenDeep: flattenDeep

Defined in src/utilities/collection-utils.ts:328

hasValues

hasValues: hasValues

Defined in src/utilities/collection-utils.ts:329

intersection

intersection: intersection

Defined in src/utilities/collection-utils.ts:332

intersectionWith

intersectionWith: intersectionWith

Defined in src/utilities/collection-utils.ts:333

isEmpty

isEmpty: isEmpty

Defined in src/utilities/collection-utils.ts:330

isNotEmpty

isNotEmpty: isNotEmpty

Defined in src/utilities/collection-utils.ts:331

length

length: length

Defined in src/utilities/collection-utils.ts:334

removeElementAt

removeElementAt: removeElementAt

Defined in src/utilities/collection-utils.ts:335

replaceElementAt

replaceElementAt: replaceElementAt

Defined in src/utilities/collection-utils.ts:336

sample

sample: sample

Defined in src/utilities/collection-utils.ts:337

sampleSize

sampleSize: sampleSize

Defined in src/utilities/collection-utils.ts:338

sortByString

sortByString: sortByString

Defined in src/utilities/collection-utils.ts:339

take

take: take

Defined in src/utilities/collection-utils.ts:340


Const CoreUtils

CoreUtils: object

Defined in src/utilities/core-utils.ts:15

bindAll

bindAll<T>(object: T, ...methodNames: Array‹string | string[]›): T

Defined in src/utilities/core-utils.ts:28

Binds methods of an object to the object itself, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided all enumerable function properties, own and inherited, of object are bound.

Note: This method does not set the "length" property of bound functions.

Type parameters:

T

Parameters:

Name Type Description
object T The object to bind and assign the bound methods to.
...methodNames Array‹string | string[]› The object method names to bind, specified as individual method names or arrays of method names.

Returns: T

Returns object.

curry

curry<T1, R>(func: function, arity?: undefined | number): CurriedFunction1‹T1, R›

Defined in src/utilities/core-utils.ts:40

Creates a function that accepts one or more arguments of func that when called either invokes func returning its result, if all func arguments have been provided, or returns a function that accepts one or more of the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.

Type parameters:

T1

R

Parameters:

func: function

The function to curry.

▸ (t1: T1): R

Parameters:

Name Type
t1 T1

Optional arity: undefined | number

The arity of func.

Returns: CurriedFunction1‹T1, R›

Returns the new curried function.

enumToArray

enumToArray<TEnum>(enumObject: any): TEnum[]

Defined in src/utilities/core-utils.ts:55

Transforms an enum into an array of its values

example const roleTypes = TestUtils.enumToArray(RoleType); // Returns [0, 1, 2, 3, 4, 5]

Type parameters:

TEnum

The enum to be transformed

Parameters:

Name Type Description
enumObject any The enum to be transformed (cannot be typed to TEnum, or TS will return 'typeof TEnum' instead of a value of TEnum)

Returns: TEnum[]

getRandomEnum

getRandomEnum<TEnum>(enumObject: any, excludeElement?: TEnum): TEnum

Defined in src/utilities/core-utils.ts:73

Returns a random enum value from its type

example const randomRoleType = TestUtils.getRandomEnum(RoleType); // Might return the value '1', which is the value of RoleType.Team

Type parameters:

TEnum

The enum to be transformed

Parameters:

Name Type Description
enumObject any The enum to be transformed (cannot be typed to TEnum, or TS will return 'typeof TEnum' instead of a value of TEnum)
excludeElement? TEnum -

Returns: TEnum

memoize

memoize<T>(func: T, resolver?: undefined | function): T & MemoizedFunction

Defined in src/utilities/core-utils.ts:93

Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with the this binding of the memoized function.

Type parameters:

T: function

Parameters:

Name Type Description
func T The function to have its output memoized.
resolver? undefined | function The function to resolve the cache key.

Returns: T & MemoizedFunction

Returns the new memoizing function.

merge

merge<TObject, TSource>(object: TObject, source: TSource): TObject & TSource

Defined in src/utilities/core-utils.ts:108

Recursively merges own and inherited enumerable properties of source objects into the destination object, skipping source properties that resolve to undefined. Array and plain object properties are merged recursively. Other objects and value types are overridden by assignment. Source objects are applied from left to right. Subsequent sources overwrite property assignments of previous sources.

Type parameters:

TObject

TSource

Parameters:

Name Type
object TObject
source TSource

Returns: TObject & TSource

numericEnumToPojo

numericEnumToPojo(enumObject: any): any

Defined in src/utilities/core-utils.ts:121

Returns a plain javascript object based on the given enum

Parameters:

Name Type
enumObject any

Returns: any

objectToArray

objectToArray(object: any): any[]

Defined in src/utilities/core-utils.ts:139

Returns an array of an object's values

Parameters:

Name Type
object any

Returns: any[]

range

range(start: number, end?: undefined | number, step?: undefined | number): number[]

Defined in src/utilities/core-utils.ts:165

Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length range is created unless a negative step is specified.

Parameters:

Name Type Description
start number The start of the range.
end? undefined | number The end of the range.
step? undefined | number The value to increment or decrement by.

Returns: number[]

Returns a new range array.

sleep

sleep(milliseconds: number, debug: boolean): Promise‹void›

Defined in src/utilities/core-utils.ts:174

Wrap timeout in a promise so tests can easily block execution for testing time

Parameters:

Name Type Default Description
milliseconds number - -
debug boolean false

Returns: Promise‹void›

sleepSync

sleepSync(milliseconds: number): void

Defined in src/utilities/core-utils.ts:194

Block execution for specified number of milliseconds, synchronously.

Parameters:

Name Type Description
milliseconds number the delay

Returns: void

throttle

throttle<T>(func: T, wait?: undefined | number, options?: ThrottleSettings): T & Cancelable

Defined in src/utilities/core-utils.ts:218

Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled function comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke them. Provide an options object to indicate that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled function return the result of the last func call.

Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if the the throttled function is invoked more than once during the wait timeout.

Type parameters:

T: function

Parameters:

Name Type Description
func T The function to throttle.
wait? undefined | number The number of milliseconds to throttle invocations to.
options? ThrottleSettings The options object.

Returns: T & Cancelable

Returns the new throttled function.

timer

timer(name: string): TimerFunctionReturn

Defined in src/utilities/core-utils.ts:231

Creates a timer instance that when stopped will supply elapsed time in milliseconds. Useful for benchmarking or providing counters

Parameters:

Name Type Description
name string Useful name to identify the timer

Returns: TimerFunctionReturn

times

times<TResult>(n: number, iteratee: function): TResult[]

Defined in src/utilities/core-utils.ts:259

Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee is invoked with one argument; (index).

Type parameters:

TResult

Parameters:

n: number

The number of times to invoke iteratee.

iteratee: function

The function invoked per iteration.

▸ (num: number): TResult

Parameters:

Name Type
num number

Returns: TResult[]

Returns the array of results.


Const DefaultScrollOptions

DefaultScrollOptions: object

Defined in src/utilities/scroll-utils.ts:9

behavior

behavior: "auto" = "auto"

Defined in src/utilities/scroll-utils.ts:10

block

block: "start" = "start"

Defined in src/utilities/scroll-utils.ts:11

inline

inline: "nearest" = "nearest"

Defined in src/utilities/scroll-utils.ts:12


Const EmailConstants

EmailConstants: object

Defined in src/constants/email-constants.ts:4

These values are from the RFC-5231 Email specification

addressMaxLength

addressMaxLength: number = 250

Defined in src/constants/email-constants.ts:5

subjectMaxLength

subjectMaxLength: number = 78

Defined in src/constants/email-constants.ts:6


Const EnvironmentUtils

EnvironmentUtils: object

Defined in src/utilities/environment-utils.ts:33

isDevelopment

isDevelopment: isDevelopment

Defined in src/utilities/environment-utils.ts:34

runIfDevelopment

runIfDevelopment: runIfDevelopment

Defined in src/utilities/environment-utils.ts:35


Const FactoryType

FactoryType: object

Defined in src/tests/factories/factory-type.ts:1

ResultErrorRecord

ResultErrorRecord: string = "ResultErrorRecord"

Defined in src/tests/factories/factory-type.ts:2

ResultRecord

ResultRecord: string = "ResultRecord"

Defined in src/tests/factories/factory-type.ts:3

StubResourceRecord

StubResourceRecord: string = "StubResourceRecord"

Defined in src/tests/factories/factory-type.ts:4


Const LocalizationUtils

LocalizationUtils: object

Defined in src/utilities/localization-utils.ts:171

changeCultureCode

changeCultureCode: changeCultureCode

Defined in src/utilities/localization-utils.ts:172

cultureCodeFromQueryString

cultureCodeFromQueryString: cultureCodeFromQueryString

Defined in src/utilities/localization-utils.ts:173

cultureCodeFromRoute

cultureCodeFromRoute: cultureCodeFromRoute

Defined in src/utilities/localization-utils.ts:174

cultureFactory

cultureFactory: cultureFactory

Defined in src/utilities/localization-utils.ts:175

currentCultureCode

currentCultureCode: currentCultureCode

Defined in src/utilities/localization-utils.ts:176

defaultCultureCode

defaultCultureCode: defaultCultureCode

Defined in src/utilities/localization-utils.ts:177

defaultInitOptions

defaultInitOptions: LocalizationInitOptions‹›

Defined in src/utilities/localization-utils.ts:178

detectCultureCode

detectCultureCode: detectCultureCode

Defined in src/utilities/localization-utils.ts:179

errorCultureIsRequired

errorCultureIsRequired: string

Defined in src/utilities/localization-utils.ts:180

initialize

initialize: initialize

Defined in src/utilities/localization-utils.ts:181

routeParam

routeParam: string

Defined in src/utilities/localization-utils.ts:182

t

t: translate

Defined in src/utilities/localization-utils.ts:183

translate

translate: translate

Defined in src/utilities/localization-utils.ts:184


Const PolyfillUtils

PolyfillUtils: object

Defined in src/utilities/polyfill-utils.ts:31

registerPromiseFinallyPolyfill

registerPromiseFinallyPolyfill: registerPromiseFinallyPolyfill

Defined in src/utilities/polyfill-utils.ts:32


Const PromiseFactory

PromiseFactory: object

Defined in src/utilities/promise-factory.ts:7

cancellable

cancellable<T>(promise: Promise‹T›): CancellablePromise‹T›

Defined in src/utilities/promise-factory.ts:8

Type parameters:

T

Parameters:

Name Type
promise Promise‹T›

Returns: CancellablePromise‹T›

pending

pending(): Promise‹unknown›

Defined in src/utilities/promise-factory.ts:32

Creates a new and empty/unfullfilled promise to cancel further chained promise operations

Returns: Promise‹unknown›


Const RecordUtils

RecordUtils: object

Defined in src/utilities/record-utils.ts:12

auditableDefaultValuesFactory

auditableDefaultValuesFactory<T>(defaultValues: RequiredOrUndefinedOmitKeys‹T, Auditable››): T

Defined in src/utilities/record-utils.ts:18

Returns object of type T with Auditable values (createdById, createdOn, etc.) set to undefined

Type parameters:

T: Auditable

Parameters:

Name Type Description
defaultValues RequiredOrUndefinedOmitKeys‹T, Auditable›› Object with all non-Auditable properties set to a default value (or undefined)

Returns: T

defaultValuesFactory

defaultValuesFactory<T>(defaultValues: RequiredOrUndefined‹T›): T

Defined in src/utilities/record-utils.ts:30

Returns object cast back as type T to ensure all properties are set for use with a Record class definition

Type parameters:

T

Parameters:

Name Type Description
defaultValues RequiredOrUndefined‹T› Object with all properties set to a default value (or undefined)

Returns: T

ensureRecord

ensureRecord<TValue, TRecord>(maybeRecord: TValue, record: Constructor‹TRecord›): TRecord

Defined in src/utilities/record-utils.ts:43

Function to ensure a given object is an instance of a specific Record T. If it is not, one will be instantiated with the given constructor.

If maybeRecord is already an instance of T, it returns that value.

Type parameters:

TValue

TRecord: TValue

Parameters:

Name Type Description
maybeRecord TValue Object or Record to be coalesced into a Record.
record Constructor‹TRecord› Type of the Record to be instantiated

Returns: TRecord

ensureRecords

ensureRecords<TValue, TRecord>(maybeRecords: TValue[], record: Constructor‹TRecord›): TRecord[]

Defined in src/utilities/record-utils.ts:61

Function to ensure a given array of objects are instances of a specific Record T. If they are not, one will be instantiated with the given constructor.

If maybeRecord is already an instance of T, it returns that value.

Type parameters:

TValue

TRecord: TValue

Parameters:

Name Type Description
maybeRecords TValue[] Array of objects or Records to be coalesced into Records.
record Constructor‹TRecord› Type of the Record to be instantiated

Returns: TRecord[]

isRecord

isRecord<TValue, TRecord>(maybeRecord: TValue, record: Constructor‹TRecord›): maybeRecord is TRecord

Defined in src/utilities/record-utils.ts:76

Function to verify a given object is an instance of a specific Record T.

Type parameters:

TValue

TRecord: TValue

Parameters:

Name Type Description
maybeRecord TValue Object or Record to be checked as an instance of T
record Constructor‹TRecord› Type of the Record to be checked

Returns: maybeRecord is TRecord


Const Rfc4646LanguageCodes

Rfc4646LanguageCodes: object

Defined in src/constants/rfc4646-language-codes.ts:1

AF_ZA

AF_ZA: string = "af-ZA"

Defined in src/constants/rfc4646-language-codes.ts:2

AR_AE

AR_AE: string = "ar-AE"

Defined in src/constants/rfc4646-language-codes.ts:18

AR_BH

AR_BH: string = "ar-BH"

Defined in src/constants/rfc4646-language-codes.ts:5

AR_DZ

AR_DZ: string = "ar-DZ"

Defined in src/constants/rfc4646-language-codes.ts:4

AR_EG

AR_EG: string = "ar-EG"

Defined in src/constants/rfc4646-language-codes.ts:6

AR_IQ

AR_IQ: string = "ar-IQ"

Defined in src/constants/rfc4646-language-codes.ts:7

AR_JO

AR_JO: string = "ar-JO"

Defined in src/constants/rfc4646-language-codes.ts:8

AR_KW

AR_KW: string = "ar-KW"

Defined in src/constants/rfc4646-language-codes.ts:9

AR_LB

AR_LB: string = "ar-LB"

Defined in src/constants/rfc4646-language-codes.ts:10

AR_LY

AR_LY: string = "ar-LY"

Defined in src/constants/rfc4646-language-codes.ts:11

AR_MA

AR_MA: string = "ar-MA"

Defined in src/constants/rfc4646-language-codes.ts:12

AR_OM

AR_OM: string = "ar-OM"

Defined in src/constants/rfc4646-language-codes.ts:13

AR_QA

AR_QA: string = "ar-QA"

Defined in src/constants/rfc4646-language-codes.ts:14

AR_SA

AR_SA: string = "ar-SA"

Defined in src/constants/rfc4646-language-codes.ts:15

AR_SY

AR_SY: string = "ar-SY"

Defined in src/constants/rfc4646-language-codes.ts:16

AR_TN

AR_TN: string = "ar-TN"

Defined in src/constants/rfc4646-language-codes.ts:17

AR_YE

AR_YE: string = "ar-YE"

Defined in src/constants/rfc4646-language-codes.ts:19

BE_BY

BE_BY: string = "be-BY"

Defined in src/constants/rfc4646-language-codes.ts:24

BG_BG

BG_BG: string = "bg-BG"

Defined in src/constants/rfc4646-language-codes.ts:25

CA_ES

CA_ES: string = "ca-ES"

Defined in src/constants/rfc4646-language-codes.ts:26

CS_CZ

CS_CZ: string = "cs-CZ"

Defined in src/constants/rfc4646-language-codes.ts:35

CY_AZ_AZ

CY_AZ_AZ: string = "Cy-az-AZ"

Defined in src/constants/rfc4646-language-codes.ts:21

CY_SR_SP

CY_SR_SP: string = "Cy-sr-SP"

Defined in src/constants/rfc4646-language-codes.ts:101

CY_UZ_UZ

CY_UZ_UZ: string = "Cy-uz-UZ"

Defined in src/constants/rfc4646-language-codes.ts:135

DA_DK

DA_DK: string = "da-DK"

Defined in src/constants/rfc4646-language-codes.ts:36

DE_AT

DE_AT: string = "de-AT"

Defined in src/constants/rfc4646-language-codes.ts:65

DE_CH

DE_CH: string = "de-CH"

Defined in src/constants/rfc4646-language-codes.ts:69

DE_DE

DE_DE: string = "de-DE"

Defined in src/constants/rfc4646-language-codes.ts:66

DE_LI

DE_LI: string = "de-LI"

Defined in src/constants/rfc4646-language-codes.ts:67

DE_LU

DE_LU: string = "de-LU"

Defined in src/constants/rfc4646-language-codes.ts:68

DIV_MV

DIV_MV: string = "div-MV"

Defined in src/constants/rfc4646-language-codes.ts:37

EL_GR

EL_GR: string = "el-GR"

Defined in src/constants/rfc4646-language-codes.ts:70

EN_AU

EN_AU: string = "en-AU"

Defined in src/constants/rfc4646-language-codes.ts:40

EN_BZ

EN_BZ: string = "en-BZ"

Defined in src/constants/rfc4646-language-codes.ts:41

EN_CA

EN_CA: string = "en-CA"

Defined in src/constants/rfc4646-language-codes.ts:42

EN_CB

EN_CB: string = "en-CB"

Defined in src/constants/rfc4646-language-codes.ts:43

EN_GB

EN_GB: string = "en-GB"

Defined in src/constants/rfc4646-language-codes.ts:50

EN_IE

EN_IE: string = "en-IE"

Defined in src/constants/rfc4646-language-codes.ts:44

EN_JM

EN_JM: string = "en-JM"

Defined in src/constants/rfc4646-language-codes.ts:45

EN_NZ

EN_NZ: string = "en-NZ"

Defined in src/constants/rfc4646-language-codes.ts:46

EN_PH

EN_PH: string = "en-PH"

Defined in src/constants/rfc4646-language-codes.ts:47

EN_TT

EN_TT: string = "en-TT"

Defined in src/constants/rfc4646-language-codes.ts:49

EN_US

EN_US: string = "en-US"

Defined in src/constants/rfc4646-language-codes.ts:51

EN_ZA

EN_ZA: string = "en-ZA"

Defined in src/constants/rfc4646-language-codes.ts:48

EN_ZW

EN_ZW: string = "en-ZW"

Defined in src/constants/rfc4646-language-codes.ts:52

ES_AR

ES_AR: string = "es-AR"

Defined in src/constants/rfc4646-language-codes.ts:105

ES_BO

ES_BO: string = "es-BO"

Defined in src/constants/rfc4646-language-codes.ts:106

ES_CL

ES_CL: string = "es-CL"

Defined in src/constants/rfc4646-language-codes.ts:107

ES_CO

ES_CO: string = "es-CO"

Defined in src/constants/rfc4646-language-codes.ts:108

ES_CR

ES_CR: string = "es-CR"

Defined in src/constants/rfc4646-language-codes.ts:109

ES_DO

ES_DO: string = "es-DO"

Defined in src/constants/rfc4646-language-codes.ts:110

ES_EC

ES_EC: string = "es-EC"

Defined in src/constants/rfc4646-language-codes.ts:111

ES_ES

ES_ES: string = "es-ES"

Defined in src/constants/rfc4646-language-codes.ts:121

ES_GT

ES_GT: string = "es-GT"

Defined in src/constants/rfc4646-language-codes.ts:113

ES_HN

ES_HN: string = "es-HN"

Defined in src/constants/rfc4646-language-codes.ts:114

ES_MX

ES_MX: string = "es-MX"

Defined in src/constants/rfc4646-language-codes.ts:115

ES_NI

ES_NI: string = "es-NI"

Defined in src/constants/rfc4646-language-codes.ts:116

ES_PA

ES_PA: string = "es-PA"

Defined in src/constants/rfc4646-language-codes.ts:117

ES_PE

ES_PE: string = "es-PE"

Defined in src/constants/rfc4646-language-codes.ts:119

ES_PR

ES_PR: string = "es-PR"

Defined in src/constants/rfc4646-language-codes.ts:120

ES_PY

ES_PY: string = "es-PY"

Defined in src/constants/rfc4646-language-codes.ts:118

ES_SV

ES_SV: string = "es-SV"

Defined in src/constants/rfc4646-language-codes.ts:112

ES_UY

ES_UY: string = "es-UY"

Defined in src/constants/rfc4646-language-codes.ts:122

ES_VE

ES_VE: string = "es-VE"

Defined in src/constants/rfc4646-language-codes.ts:123

ET_EE

ET_EE: string = "et-EE"

Defined in src/constants/rfc4646-language-codes.ts:53

EU_ES

EU_ES: string = "eu-ES"

Defined in src/constants/rfc4646-language-codes.ts:23

FA_IR

FA_IR: string = "fa-IR"

Defined in src/constants/rfc4646-language-codes.ts:55

FI_FI

FI_FI: string = "fi-FI"

Defined in src/constants/rfc4646-language-codes.ts:56

FO_FO

FO_FO: string = "fo-FO"

Defined in src/constants/rfc4646-language-codes.ts:54

FR_BE

FR_BE: string = "fr-BE"

Defined in src/constants/rfc4646-language-codes.ts:57

FR_CA

FR_CA: string = "fr-CA"

Defined in src/constants/rfc4646-language-codes.ts:58

FR_CH

FR_CH: string = "fr-CH"

Defined in src/constants/rfc4646-language-codes.ts:62

FR_FR

FR_FR: string = "fr-FR"

Defined in src/constants/rfc4646-language-codes.ts:59

FR_LU

FR_LU: string = "fr-LU"

Defined in src/constants/rfc4646-language-codes.ts:60

FR_MC

FR_MC: string = "fr-MC"

Defined in src/constants/rfc4646-language-codes.ts:61

GL_ES

GL_ES: string = "gl-ES"

Defined in src/constants/rfc4646-language-codes.ts:63

GU_IN

GU_IN: string = "gu-IN"

Defined in src/constants/rfc4646-language-codes.ts:71

HE_IL

HE_IL: string = "he-IL"

Defined in src/constants/rfc4646-language-codes.ts:72

HI_IN

HI_IN: string = "hi-IN"

Defined in src/constants/rfc4646-language-codes.ts:73

HR_HR

HR_HR: string = "hr-HR"

Defined in src/constants/rfc4646-language-codes.ts:34

HU_HU

HU_HU: string = "hu-HU"

Defined in src/constants/rfc4646-language-codes.ts:74

HY_AM

HY_AM: string = "hy-AM"

Defined in src/constants/rfc4646-language-codes.ts:20

ID_ID

ID_ID: string = "id-ID"

Defined in src/constants/rfc4646-language-codes.ts:76

IS_IS

IS_IS: string = "is-IS"

Defined in src/constants/rfc4646-language-codes.ts:75

IT_CH

IT_CH: string = "it-CH"

Defined in src/constants/rfc4646-language-codes.ts:78

IT_IT

IT_IT: string = "it-IT"

Defined in src/constants/rfc4646-language-codes.ts:77

JA_JP

JA_JP: string = "ja-JP"

Defined in src/constants/rfc4646-language-codes.ts:79

KA_GE

KA_GE: string = "ka-GE"

Defined in src/constants/rfc4646-language-codes.ts:64

KK_KZ

KK_KZ: string = "kk-KZ"

Defined in src/constants/rfc4646-language-codes.ts:81

KN_IN

KN_IN: string = "kn-IN"

Defined in src/constants/rfc4646-language-codes.ts:80

KOK_IN

KOK_IN: string = "kok-IN"

Defined in src/constants/rfc4646-language-codes.ts:82

KO_KR

KO_KR: string = "ko-KR"

Defined in src/constants/rfc4646-language-codes.ts:83

KY_KZ

KY_KZ: string = "ky-KZ"

Defined in src/constants/rfc4646-language-codes.ts:84

LT_AZ_AZ

LT_AZ_AZ: string = "Lt-az-AZ"

Defined in src/constants/rfc4646-language-codes.ts:22

LT_LT

LT_LT: string = "lt-LT"

Defined in src/constants/rfc4646-language-codes.ts:86

LT_SR_SP

LT_SR_SP: string = "Lt-sr-SP"

Defined in src/constants/rfc4646-language-codes.ts:102

LT_UZ_UZ

LT_UZ_UZ: string = "Lt-uz-UZ"

Defined in src/constants/rfc4646-language-codes.ts:136

LV_LV

LV_LV: string = "lv-LV"

Defined in src/constants/rfc4646-language-codes.ts:85

MK_MK

MK_MK: string = "mk-MK"

Defined in src/constants/rfc4646-language-codes.ts:87

MN_MN

MN_MN: string = "mn-MN"

Defined in src/constants/rfc4646-language-codes.ts:91

MR_IN

MR_IN: string = "mr-IN"

Defined in src/constants/rfc4646-language-codes.ts:90

MS_BN

MS_BN: string = "ms-BN"

Defined in src/constants/rfc4646-language-codes.ts:88

MS_MY

MS_MY: string = "ms-MY"

Defined in src/constants/rfc4646-language-codes.ts:89

NB_NO

NB_NO: string = "nb-NO"

Defined in src/constants/rfc4646-language-codes.ts:92

NL_BE

NL_BE: string = "nl-BE"

Defined in src/constants/rfc4646-language-codes.ts:38

NL_NL

NL_NL: string = "nl-NL"

Defined in src/constants/rfc4646-language-codes.ts:39

NN_NO

NN_NO: string = "nn-NO"

Defined in src/constants/rfc4646-language-codes.ts:93

PA_IN

PA_IN: string = "pa-IN"

Defined in src/constants/rfc4646-language-codes.ts:97

PL_PL

PL_PL: string = "pl-PL"

Defined in src/constants/rfc4646-language-codes.ts:94

PT_BR

PT_BR: string = "pt-BR"

Defined in src/constants/rfc4646-language-codes.ts:95

PT_PT

PT_PT: string = "pt-PT"

Defined in src/constants/rfc4646-language-codes.ts:96

RO_RO

RO_RO: string = "ro-RO"

Defined in src/constants/rfc4646-language-codes.ts:98

RU_RU

RU_RU: string = "ru-RU"

Defined in src/constants/rfc4646-language-codes.ts:99

SA_IN

SA_IN: string = "sa-IN"

Defined in src/constants/rfc4646-language-codes.ts:100

SK_SK

SK_SK: string = "sk-SK"

Defined in src/constants/rfc4646-language-codes.ts:103

SL_SI

SL_SI: string = "sl-SI"

Defined in src/constants/rfc4646-language-codes.ts:104

SQ_AL

SQ_AL: string = "sq-AL"

Defined in src/constants/rfc4646-language-codes.ts:3

SV_FI

SV_FI: string = "sv-FI"

Defined in src/constants/rfc4646-language-codes.ts:125

SV_SE

SV_SE: string = "sv-SE"

Defined in src/constants/rfc4646-language-codes.ts:126

SW_KE

SW_KE: string = "sw-KE"

Defined in src/constants/rfc4646-language-codes.ts:124

SYR_SY

SYR_SY: string = "syr-SY"

Defined in src/constants/rfc4646-language-codes.ts:127

TA_IN

TA_IN: string = "ta-IN"

Defined in src/constants/rfc4646-language-codes.ts:128

TE_IN

TE_IN: string = "te-IN"

Defined in src/constants/rfc4646-language-codes.ts:130

TH_TH

TH_TH: string = "th-TH"

Defined in src/constants/rfc4646-language-codes.ts:131

TR_TR

TR_TR: string = "tr-TR"

Defined in src/constants/rfc4646-language-codes.ts:132

TT_RU

TT_RU: string = "tt-RU"

Defined in src/constants/rfc4646-language-codes.ts:129

UK_UA

UK_UA: string = "uk-UA"

Defined in src/constants/rfc4646-language-codes.ts:133

UR_PK

UR_PK: string = "ur-PK"

Defined in src/constants/rfc4646-language-codes.ts:134

VI_VN

VI_VN: string = "vi-VN"

Defined in src/constants/rfc4646-language-codes.ts:137

ZH_CHS

ZH_CHS: string = "zh-CHS"

Defined in src/constants/rfc4646-language-codes.ts:32

ZH_CHT

ZH_CHT: string = "zh-CHT"

Defined in src/constants/rfc4646-language-codes.ts:33

ZH_CN

ZH_CN: string = "zh-CN"

Defined in src/constants/rfc4646-language-codes.ts:27

ZH_HK

ZH_HK: string = "zh-HK"

Defined in src/constants/rfc4646-language-codes.ts:28

ZH_MO

ZH_MO: string = "zh-MO"

Defined in src/constants/rfc4646-language-codes.ts:29

ZH_SG

ZH_SG: string = "zh-SG"

Defined in src/constants/rfc4646-language-codes.ts:30

ZH_TW

ZH_TW: string = "zh-TW"

Defined in src/constants/rfc4646-language-codes.ts:31


Const RouteUtils

RouteUtils: object

Defined in src/utilities/route-utils.ts:146

appendQueryParams

appendQueryParams: appendQueryParams

Defined in src/utilities/route-utils.ts:147

getUrl

getUrl: getUrl

Defined in src/utilities/route-utils.ts:148

getUrlFromPath

getUrlFromPath: getUrlFromPath

Defined in src/utilities/route-utils.ts:149

isAbsoluteUrl

isAbsoluteUrl: isAbsoluteUrl

Defined in src/utilities/route-utils.ts:150

queryStringToObject

queryStringToObject: queryStringToObject

Defined in src/utilities/route-utils.ts:151

replacePathParams

replacePathParams: replacePathParams

Defined in src/utilities/route-utils.ts:152


Const ScrollUtils

ScrollUtils: object

Defined in src/utilities/scroll-utils.ts:91

scrollToElementById

scrollToElementById: _scrollToElementById = _scrollToElementById

Defined in src/utilities/scroll-utils.ts:92

scrollToHash

scrollToHash: _scrollToHash = _scrollToHash

Defined in src/utilities/scroll-utils.ts:93


Const ServiceUtils

ServiceUtils: object

Defined in src/utilities/service-utils.ts:159

configure

configure: _configure = _configure

Defined in src/utilities/service-utils.ts:160

configureCultureCode

configureCultureCode: _configureCultureCode = _configureCultureCode

Defined in src/utilities/service-utils.ts:161

mapAxiosResponse

mapAxiosResponse: _mapAxiosResponse = _mapAxiosResponse

Defined in src/utilities/service-utils.ts:162

mapPagedAxiosResponse

mapPagedAxiosResponse: _mapPagedAxiosResponse = _mapPagedAxiosResponse

Defined in src/utilities/service-utils.ts:163


Const StringUtils

StringUtils: object

Defined in src/utilities/string-utils.ts:264

camelCase

camelCase: camelCase

Defined in src/utilities/string-utils.ts:265

capitalize

capitalize: capitalize

Defined in src/utilities/string-utils.ts:266

filename

filename: filename

Defined in src/utilities/string-utils.ts:267

hasValue

hasValue: hasValue

Defined in src/utilities/string-utils.ts:268

isEmpty

isEmpty: isEmpty

Defined in src/utilities/string-utils.ts:269

isValidCultureCode

isValidCultureCode: isValidCultureCode

Defined in src/utilities/string-utils.ts:270

isValidEmail

isValidEmail: isValidEmail

Defined in src/utilities/string-utils.ts:271

join

join: join

Defined in src/utilities/string-utils.ts:272

lowerFirst

lowerFirst: lowerFirst

Defined in src/utilities/string-utils.ts:273

pad

pad: pad

Defined in src/utilities/string-utils.ts:274

padEnd

padEnd: padEnd

Defined in src/utilities/string-utils.ts:275

padStart

padStart: padStart

Defined in src/utilities/string-utils.ts:276

pluralize

pluralize: pluralize

Defined in src/utilities/string-utils.ts:277

repeat

repeat: repeat

Defined in src/utilities/string-utils.ts:278

snakeCase

snakeCase: snakeCase

Defined in src/utilities/string-utils.ts:279

startCase

startCase: startCase

Defined in src/utilities/string-utils.ts:280

template

template: template

Defined in src/utilities/string-utils.ts:281

truncateRight

truncateRight: truncateRight

Defined in src/utilities/string-utils.ts:282

upperFirst

upperFirst: upperFirst

Defined in src/utilities/string-utils.ts:283

words

words: words

Defined in src/utilities/string-utils.ts:284


Const defaultInitOptions

defaultInitOptions: object

Defined in src/utilities/localization-utils.ts:34

debug

debug: boolean = EnvironmentUtils.isDevelopment()

Defined in src/utilities/localization-utils.ts:35

detection

detection: DetectorOptions = detectionOptions

Defined in src/utilities/localization-utils.ts:36

escapeValue

escapeValue: false = false

Defined in src/utilities/localization-utils.ts:37


Const defaultValues

defaultValues: object

Defined in src/view-models/result-error-record.ts:5

Defined in src/view-models/result-record.ts:8

errors

errors: undefined = undefined

Defined in src/view-models/result-record.ts:9

key

key: undefined = undefined

Defined in src/view-models/result-error-record.ts:6

message

message: undefined = undefined

Defined in src/view-models/result-error-record.ts:7

resultObject

resultObject: undefined = undefined

Defined in src/view-models/result-record.ts:10

type

type: Error = ErrorType.Error

Defined in src/view-models/result-error-record.ts:8


Const detectionOptions

detectionOptions: object

Defined in src/utilities/localization-utils.ts:28

Defaults detection options for i18next-browser-languageDetector

lookupFromPathIndex

lookupFromPathIndex: number = 0

Defined in src/utilities/localization-utils.ts:29

lookupQuerystring

lookupQuerystring: string = routeParam

Defined in src/utilities/localization-utils.ts:30

order

order: string[] = ["path", "querystring"]

Defined in src/utilities/localization-utils.ts:31