Skip to content

Commit

Permalink
Add demo links to Masks API
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTsukanov committed Mar 15, 2024
1 parent fb2aacd commit ff64f5e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mask/mask_currency.ts
Expand Up @@ -19,10 +19,14 @@ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
* }]
* }
* ```
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
*/
export class InputMaskCurrency extends InputMaskNumeric {
/**
* One or several symbols to be displayed before the currency value.
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
* @see suffix
*/
@property() prefix: string;
Expand Down
2 changes: 2 additions & 0 deletions src/mask/mask_datetime.ts
Expand Up @@ -118,6 +118,8 @@ export function getDateTimeLexems(pattern: string): Array<IDateTimeMaskLexem> {
* }]
* }
* ```
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
*/
export class InputMaskDateTime extends InputMaskPattern {
private turnOfTheCentury = 68;
Expand Down
4 changes: 4 additions & 0 deletions src/mask/mask_numeric.ts
Expand Up @@ -43,6 +43,8 @@ export function splitString(str: string, reverse = true, n = 3): Array<string> {
* }]
* }
* ```
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
*/
export class InputMaskNumeric extends InputMaskBase {
/**
Expand All @@ -65,6 +67,8 @@ export class InputMaskNumeric extends InputMaskBase {
* Limits how many digits to retain after the decimal point for a displayed number.
*
* Default value: 2
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
* @see decimalSeparator
*/
@property() precision: number;
Expand Down
4 changes: 4 additions & 0 deletions src/mask/mask_pattern.ts
Expand Up @@ -115,6 +115,8 @@ export function getUnmaskedValueByPattern(str: string, pattern: string | Array<I
* }]
* }
* ```
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
*/
export class InputMaskPattern extends InputMaskBase {
private literals: Array<IMaskLiteral> = [];
Expand Down Expand Up @@ -142,6 +144,8 @@ export class InputMaskPattern extends InputMaskBase {
* - `yyyy` - A four-digit year.
*
* Example: `mm/dd/yyyy`
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
* @see [settings.maskSettings](https://surveyjs.io/form-library/documentation/api-reference/settings#maskSettings)
*/
@property() pattern: string;
Expand Down
4 changes: 4 additions & 0 deletions src/question_text.ts
Expand Up @@ -55,6 +55,8 @@ export class QuestionTextModel extends QuestionTextBase {
* - `"currency"`
* - `"datetime"`
* - `"pattern"`
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
* @see maskSettings
*/
@property({
Expand All @@ -76,6 +78,8 @@ export class QuestionTextModel extends QuestionTextBase {
* | `"currency"` | [`InputMaskCurrency`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskcurrency) |
* | `"datetime"` | [`InputMaskDateTime`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskdatetime) |
* | `"pattern"` | [`InputMaskPattern`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern) |
*
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
*/
public get maskSettings(): InputMaskBase {
return this.getPropertyValue("maskSettings");
Expand Down

0 comments on commit ff64f5e

Please sign in to comment.