src/utils/Utils.ts
Properties |
|
Methods |
|
Static browserShortcutsOverridden |
Type : Keys[]
|
Default value : [
Keys.control + Keys.k,
Keys.control + Keys.shift + Keys.p
]
|
List of browser shortcuts that need to be overridden. |
Static fromHtmlEntities | ||||||
fromHtmlEntities(text: any)
|
||||||
Parameters :
Returns :
any
|
Static isDefaultValue | ||||||||||||
isDefaultValue(property: any, defaultValue: any)
|
||||||||||||
Returns the default value of the property if it is null or undefined.
Parameters :
Returns :
any
|
Static preventDefaultBrowserShortcuts | ||||||
preventDefaultBrowserShortcuts(event: any)
|
||||||
Calls the event preventDefault if the key combination is a browser shortcut.
Parameters :
Returns :
void
|
Static preventPropagation | ||||||||
preventPropagation(event: any)
|
||||||||
Method prevents propagation of the same event from being called outside. Use shouldAllowPreventDefault to enable the preventDefault behavior
Parameters :
Returns :
void
|
Private Static regexReDosReplaceMaskRules | ||||||||
regexReDosReplaceMaskRules(regex: any)
|
||||||||
Replace mask rules for respective regex representation.
Parameters :
Returns :
any
|
Static regexReDosValidation | ||||||||||||
regexReDosValidation(regex: any, isMask: boolean)
|
||||||||||||
Validates if regex could produce a ReDoS vulnerability and generate performance degradation.
Parameters :
Returns :
void
|
Static removeLabelSpecial |
removeLabelSpecial(value: string, underline?: boolean)
|
Removes ampersand entiti
Returns :
string
{string} |
Static replaceNewLines | ||||||||
replaceNewLines(text: any)
|
||||||||
Return a new string where the new line characters are replaced with the
Parameters :
Returns :
any
new string with replaced characters |
Static setTimeoutFunctionExecution |
setTimeoutFunctionExecution(functionToExecute: () => void, timeout: number)
|
Executes the given function inside the setTimeout. You can specify the timeout value, the default is 0.
Returns :
any
Returns the timeoutId. |
Static toHtmlEntities | ||||||||
toHtmlEntities(text: any)
|
||||||||
Return a new string where the white space and < and > is replaced for the html entities
Parameters :
Returns :
any
new string with entities |
Static validateTabOrder | ||||||||||||
validateTabOrder(model: any, tabIndexInput: any)
|
||||||||||||
Validates TabIndex model property and tabindex input to determine TabOrder value returns -1 if both values are undefined
Parameters :
Returns :
number
tab order if it exists in model or angular input, returns -1 if both values are undefined |