File

src/components/kendoUI/apex/maskService/mask-service.service.ts

Description

Mask service to handle format and displayFormat

Index

Properties
Methods
Accessors

Methods

Private assignSuffixPrefix
assignSuffixPrefix(formats: PatternFormatBase)

Assing suffix and prefix to current format

Parameters :
Name Type Optional
formats PatternFormatBase No
Returns : void
escapeRegExp
escapeRegExp(string: string)

it escapes any characters that have special meanings in regular expressions using the replace method and a regular expression pattern. This ensures that the patterns are treated as literal strings when constructing the regular expressions.

Parameters :
Name Type Optional
string string No
Returns : any
fillMaskedValue
fillMaskedValue(string: string, suffix: string, prefix: string)

Assign a valid maskedValue

Parameters :
Name Type Optional
string string No
suffix string No
prefix string No
Returns : string
initialiceMaskService
initialiceMaskService(format: string, displayFormat: string, value: number)

Service should be initialiced with current mask values to split into rules

Parameters :
Name Type Optional
format string No
displayFormat string No
value number No
Returns : void
selectMaskRule
selectMaskRule(maskedTexboxValue: number, formats: PatternFormatBase)

Selects mask rule depending of the value and the type of format.

Parameters :
Name Type Optional
maskedTexboxValue number No
formats PatternFormatBase No
Returns : string

{string}

Private splitStringPrefix
splitStringPrefix(string: string)

Analize string left to right looking for a prefix and return it

Parameters :
Name Type Optional
string string No
Returns : string

{string}

Private splitStringSuffix
splitStringSuffix(string)

Reverse string to analyze string right to lef in order to detect if suffix and return it

Parameters :
Name Optional
string No
Returns : string

{string}

validateNegativeFormat
validateNegativeFormat(formats: PatternFormatBase)

Validate and assign only negative format for special cases

Parameters :
Name Type Optional
formats PatternFormatBase No
Returns : string

{string}

validatePositiveFormat
validatePositiveFormat(formats: PatternFormatBase)

Validate and assign only negative format for special cases

Parameters :
Name Type Optional
formats PatternFormatBase No
Returns : string

{string}

Private validateSuffixPreffixMaskedValue
validateSuffixPreffixMaskedValue(formats: PatternFormatBase, newMask: string)

Performance Validation current mask agains new requested to assign or not suffixPrefix

Parameters :
Name Type Optional
formats PatternFormatBase No
newMask string No
Returns : string

{string}

Properties

Private _displayFormat
Type : DisplayFormat
Default value : new DisplayFormat()

DisplayFormat

Private _format
Type : Format
Default value : new Format()

Format.

Accessors

format
getformat()

Format

Returns : Format
setformat(format: Format)

Format

Parameters :
Name Type Optional
format Format No
Returns : void
displayFormat
getdisplayFormat()

Display format

Returns : DisplayFormat
setdisplayFormat(displayFormat: DisplayFormat)

Display format

Parameters :
Name Type Optional
displayFormat DisplayFormat No
Returns : void

results matching ""

    No results matching ""