alfresco-ng2-components/docs/core/components/text-mask.component.md
Maurizio Vitale 1fa81962a0
👽 Angular 14 rebase 👽 (#7769)
* fix after rebase

* new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>

* peer dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

* Angular 14

fix unit test and storybook

Signed-off-by: eromano <eugenioromano16@gmail.com>

fix after rebase

Signed-off-by: eromano <eugenioromano16@gmail.com>

update pkg.json

Signed-off-by: eromano <eugenioromano16@gmail.com>

missing dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

Fix mistake and missing code

Dream....build only affected libs

Add utility run commands

* Use nx command to run affected tests

* Fix nx test core

fix content tests

Run unit with watch false

core test fixes

reduce test warnings

Fix process cloud unit

Fix adf unit test

Fix lint process cloud

Disable lint next line

Use right core path

Fix insights unit

fix linting insights

Fix process-services unit

fix the extensions test report

fix test warnings

Fix content unit

Fix bunch of content unit

* Produce an adf alpha of 14

* hopefully fixing the content

* Push back the npm publish

* Remove flaky unit

* Fix linting

* Make the branch as root

* Get rid of angualar13

* Remove the travis depth

* Fixing version for npm

* Enabling cache for unit and build

* Fix scss for core and paths

Copy i18 and asset by using ng-packager

Export the theming alias and fix path

Use ng-package to copy assets process-services-cloud

Use ng-package to copy assets process-services

Use ng-package to copy assets content-services

Use ng-package to copy assets insights

* feat: fix api secondary entry point

* fix storybook rebase

* Move dist under dist/libs from lib/dist

* Fix the webstyle

* Use only necessary nrwl deps and improve lint

* Fix unit for libs

* Convert lint.sh to targets - improve performance

* Use latest of angular

* Align alfresco-js-api

Signed-off-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
2022-08-25 10:50:30 +01:00

2.2 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Text Mask directive v2.0.0 Active 2018-11-20

Text Mask directive

Implements text field input masks.

Basic Usage

<input [textMask]="{mask: mask, isReversed: isMaskReversed}">

Class members

Properties

Name Type Default value Description
inputMask Function Object defining mask and "reversed" status.

Details

The Text Mask directive implements the "input mask" feature defined in the Process Services form editor. The mask restricts the way that text data can be added to the field and also adds formatting as you type. A common example of this feature is seen in text boxes that accept credit card numbers. The number is printed on the card as groups of four digits separated by spaces:

1234 5678 9012 3456

When you type into the field, you can only enter digits and spaces (spaces are only valid if you type them in the position they occur in the mask; otherwise, they are added automatically as you type digits). The equivalent text mask in ADF would be:

0000 0000 0000 0000

Mask format characters

The following characters have special meaning within a mask; all other characters are included in the text as they are:

  • "0": Denotes a digit
  • "9": Denotes a digit that can optionally be left out
  • "A": Denotes a alphanumeric character (upper- or lower-case A-Z and digits 0-9)
  • "S": Denotes a alphabetic character (upper- or lower-case A-Z)
  • "#": Denotes a string of zero or more digits

The mask is passed to the directive in the mask field of the parameter object. The reversed field indicates that digits in the mask are "filled up" in right-to-left order rather than the usual left-to-right. For example, with the following mask:

#0.0

...if the user typed the digits "23" in sequence, the normal left-to-right ordering would show

23

...in the textbox. To get the decimal point, the user would have to type it explicitly. However, with reversed (right-to-left) ordering, the textbox would show

2.3

...and these digits would slide leftward as the user typed more.