survey-core 1.9.133 → 1.9.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +6 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +6 -1
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +1452 -49
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/dragdrop/core.d.ts +1 -0
- package/ts3.4/typings/entries/chunks/model.d.ts +5 -0
- package/ts3.4/typings/mask/input_element_adapter.d.ts +15 -0
- package/ts3.4/typings/mask/mask_base.d.ts +11 -0
- package/ts3.4/typings/mask/mask_currency.d.ts +11 -0
- package/ts3.4/typings/mask/mask_datetime.d.ts +37 -0
- package/ts3.4/typings/mask/mask_numeric.d.ts +30 -0
- package/ts3.4/typings/mask/mask_pattern.d.ts +23 -0
- package/ts3.4/typings/mask/mask_utils.d.ts +18 -0
- package/ts3.4/typings/question_text.d.ts +16 -0
- package/ts3.4/typings/settings.d.ts +7 -0
- package/ts3.4/typings/survey-element.d.ts +1 -0
- package/ts3.4/typings/survey.d.ts +2 -2
- package/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/dragdrop/core.d.ts +1 -0
- package/typings/entries/chunks/model.d.ts +5 -0
- package/typings/mask/input_element_adapter.d.ts +15 -0
- package/typings/mask/mask_base.d.ts +11 -0
- package/typings/mask/mask_currency.d.ts +11 -0
- package/typings/mask/mask_datetime.d.ts +37 -0
- package/typings/mask/mask_numeric.d.ts +30 -0
- package/typings/mask/mask_pattern.d.ts +23 -0
- package/typings/mask/mask_utils.d.ts +18 -0
- package/typings/question_text.d.ts +18 -0
- package/typings/settings.d.ts +7 -0
- package/typings/survey-element.d.ts +1 -0
- package/typings/survey.d.ts +2 -2
package/themes/solid-light.js
CHANGED
|
@@ -25,6 +25,7 @@ export declare abstract class DragDropCore<T> implements IDragDropEngine {
|
|
|
25
25
|
protected domAdapter: IDragDropDOMAdapter;
|
|
26
26
|
constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean, domAdapter?: IDragDropDOMAdapter);
|
|
27
27
|
startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
|
|
28
|
+
private getRootElement;
|
|
28
29
|
dragInit(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement): void;
|
|
29
30
|
protected onStartDrag(event?: PointerEvent): void;
|
|
30
31
|
protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
|
|
@@ -89,6 +89,11 @@ export { DropdownMultiSelectListModel } from "../../dropdownMultiSelectListModel
|
|
|
89
89
|
export { QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue } from "../../question_buttongroup";
|
|
90
90
|
export { IsMobile, IsTouch, _setIsTouch } from "../../utils/devices";
|
|
91
91
|
export { confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, IAttachKey2clickOptions } from "../../utils/utils";
|
|
92
|
+
export { InputMaskBase } from "../../mask/mask_base";
|
|
93
|
+
export { InputMaskPattern } from "../../mask/mask_pattern";
|
|
94
|
+
export { InputMaskNumeric } from "../../mask/mask_numeric";
|
|
95
|
+
export { InputMaskDateTime } from "../../mask/mask_datetime";
|
|
96
|
+
export { InputMaskCurrency } from "../../mask/mask_currency";
|
|
92
97
|
export * from "../../utils/cssClassBuilder";
|
|
93
98
|
export { surveyCss, defaultV2Css, defaultV2ThemeName } from "../../defaultCss/defaultV2Css";
|
|
94
99
|
export { DragDropCore } from "../../dragdrop/core";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputMaskBase } from "./mask_base";
|
|
2
|
+
import { ITextInputParams } from "./mask_utils";
|
|
3
|
+
export declare class InputElementAdapter {
|
|
4
|
+
private inputMaskInstance;
|
|
5
|
+
private inputElement;
|
|
6
|
+
private prevUnmaskedValue;
|
|
7
|
+
constructor(inputMaskInstance: InputMaskBase, inputElement: HTMLInputElement, value?: string);
|
|
8
|
+
inputMaskInstancePropertyChangedHandler: (sender: any, options: any) => void;
|
|
9
|
+
beforeInputHandler: (event: any) => void;
|
|
10
|
+
blurInputHandler: (event: any) => void;
|
|
11
|
+
createArgs(event: any): ITextInputParams;
|
|
12
|
+
addInputEventListener(): void;
|
|
13
|
+
removeInputEventListener(): void;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Base } from "../base";
|
|
2
|
+
import { IInputMask, IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
export declare class InputMaskBase extends Base implements IInputMask {
|
|
4
|
+
saveMaskedValue: boolean;
|
|
5
|
+
getType(): string;
|
|
6
|
+
setData(json: any): void;
|
|
7
|
+
getData(): any;
|
|
8
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
9
|
+
getUnmaskedValue(src: string): any;
|
|
10
|
+
getMaskedValue(src: any): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputMaskNumeric } from "./mask_numeric";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
export declare class InputMaskCurrency extends InputMaskNumeric {
|
|
4
|
+
prefix: string;
|
|
5
|
+
suffix: string;
|
|
6
|
+
getType(): string;
|
|
7
|
+
private wrapText;
|
|
8
|
+
unwrapInputArgs(args: ITextInputParams): void;
|
|
9
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
10
|
+
getMaskedValue(src: any): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputMaskPattern } from "./mask_pattern";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
export interface IDateTimeMaskLexem {
|
|
4
|
+
type: "month" | "day" | "year" | "separator";
|
|
5
|
+
value: any;
|
|
6
|
+
count: number;
|
|
7
|
+
maxCount: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function getDateTimeLexems(pattern: string): Array<IDateTimeMaskLexem>;
|
|
10
|
+
export declare class InputMaskDateTime extends InputMaskPattern {
|
|
11
|
+
private turnOfTheCentury;
|
|
12
|
+
private lexems;
|
|
13
|
+
private inputDateTimeData;
|
|
14
|
+
min: string;
|
|
15
|
+
max: string;
|
|
16
|
+
getType(): string;
|
|
17
|
+
protected updateLiterals(): void;
|
|
18
|
+
private leaveOnlyNumbers;
|
|
19
|
+
private getMaskedStrFromISO;
|
|
20
|
+
private initInputDateTimeData;
|
|
21
|
+
private getISO_8601Format;
|
|
22
|
+
private isYearValid;
|
|
23
|
+
private isDateValid;
|
|
24
|
+
private getPlaceholder;
|
|
25
|
+
private updateInputDateTimeData;
|
|
26
|
+
private getCorrectDatePartFormat;
|
|
27
|
+
private createIDateTimeComposition;
|
|
28
|
+
private parseTwoDigitYear;
|
|
29
|
+
private getFormatedString;
|
|
30
|
+
private setInputDateTimeData;
|
|
31
|
+
_getMaskedValue(src: string, matchWholeMask?: boolean): string;
|
|
32
|
+
private getPartsOld;
|
|
33
|
+
private getParts;
|
|
34
|
+
getUnmaskedValue(src: string): any;
|
|
35
|
+
getMaskedValue(src: string): string;
|
|
36
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
37
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InputMaskBase } from "./mask_base";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
interface INumericalComposition {
|
|
4
|
+
integralPart: string;
|
|
5
|
+
fractionalPart: string;
|
|
6
|
+
isNegative?: boolean;
|
|
7
|
+
hasDecimalSeparator?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function splitString(str: string, reverse?: boolean, n?: number): Array<string>;
|
|
10
|
+
export declare class InputMaskNumeric extends InputMaskBase {
|
|
11
|
+
allowNegativeValues: boolean;
|
|
12
|
+
decimalSeparator: string;
|
|
13
|
+
precision: number;
|
|
14
|
+
thousandsSeparator: string;
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
private calccaretPosition;
|
|
18
|
+
displayNumber(parsedNumber: INumericalComposition, insertThousandsSeparator?: boolean, matchWholeMask?: boolean): string;
|
|
19
|
+
convertNumber(parsedNumber: INumericalComposition): number;
|
|
20
|
+
validateNumber(number: INumericalComposition): boolean;
|
|
21
|
+
parseNumber(src: string | number): INumericalComposition;
|
|
22
|
+
getNumberMaskedValue(src: string | number, matchWholeMask?: boolean): string;
|
|
23
|
+
private getNumberUnmaskedValue;
|
|
24
|
+
getMaskedValue(src: any): string;
|
|
25
|
+
getUnmaskedValue(src: string): any;
|
|
26
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
27
|
+
getType(): string;
|
|
28
|
+
protected isPropertyEmpty(value: any): boolean;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InputMaskBase } from "./mask_base";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
import { ILoadFromJSONOptions } from "../base-interfaces";
|
|
4
|
+
export interface IMaskLiteral {
|
|
5
|
+
type: "const" | "regex" | "fixed";
|
|
6
|
+
value: any;
|
|
7
|
+
}
|
|
8
|
+
export declare function getLiterals(pattern: string): Array<IMaskLiteral>;
|
|
9
|
+
export declare function getMaskedValueByPattern(src: string, pattern: string | Array<IMaskLiteral>, matchWholeMask: boolean): string;
|
|
10
|
+
export declare function getUnmaskedValueByPattern(str: string, pattern: string | Array<IMaskLiteral>, matchWholeMask: boolean, skipFixedChar?: boolean): string;
|
|
11
|
+
export declare class InputMaskPattern extends InputMaskBase {
|
|
12
|
+
private literals;
|
|
13
|
+
pattern: string;
|
|
14
|
+
protected updateLiterals(): void;
|
|
15
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
16
|
+
getType(): string;
|
|
17
|
+
fromJSON(json: any, options?: ILoadFromJSONOptions): void;
|
|
18
|
+
_getMaskedValue(src: string, matchWholeMask?: boolean): string;
|
|
19
|
+
_getUnmaskedValue(src: string, matchWholeMask?: boolean): string;
|
|
20
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
21
|
+
getMaskedValue(src: any): string;
|
|
22
|
+
getUnmaskedValue(src: string): any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare var numberDefinition: RegExp;
|
|
2
|
+
export interface IMaskedInputResult {
|
|
3
|
+
value: string;
|
|
4
|
+
caretPosition: number;
|
|
5
|
+
cancelPreventDefault?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ITextInputParams {
|
|
8
|
+
prevValue: string;
|
|
9
|
+
selectionStart: number;
|
|
10
|
+
selectionEnd: number;
|
|
11
|
+
insertedChars: string | null;
|
|
12
|
+
inputDirection?: "forward" | "backward";
|
|
13
|
+
}
|
|
14
|
+
export interface IInputMask {
|
|
15
|
+
getMaskedValue(src: any): string;
|
|
16
|
+
getUnmaskedValue(src: string): any;
|
|
17
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
18
|
+
}
|
|
@@ -3,6 +3,8 @@ import { HashTable } from "./helpers";
|
|
|
3
3
|
import { SurveyError } from "./survey-error";
|
|
4
4
|
import { QuestionTextBase } from "./question_textbase";
|
|
5
5
|
import { CssClassBuilder } from "./utils/cssClassBuilder";
|
|
6
|
+
import { InputMaskBase } from "./mask/mask_base";
|
|
7
|
+
import { IInputMask } from "./mask/mask_utils";
|
|
6
8
|
/**
|
|
7
9
|
* A class that describes the Single-Line Input question type.
|
|
8
10
|
*
|
|
@@ -12,6 +14,16 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
12
14
|
private locDataListValue;
|
|
13
15
|
private minValueRunner;
|
|
14
16
|
private maxValueRunner;
|
|
17
|
+
private maskInputAdapter;
|
|
18
|
+
private createMaskAdapter;
|
|
19
|
+
private deleteMaskAdapter;
|
|
20
|
+
private updateMaskAdapter;
|
|
21
|
+
onSetMaskType(newValue: string): void;
|
|
22
|
+
maskType: string;
|
|
23
|
+
readonly maskTypeIsEmpty: boolean;
|
|
24
|
+
maskSettings: InputMaskBase;
|
|
25
|
+
private setNewMaskSettingsProperty;
|
|
26
|
+
protected createMaskSettings(): InputMaskBase;
|
|
15
27
|
constructor(name: string);
|
|
16
28
|
protected isTextValue(): boolean;
|
|
17
29
|
getType(): string;
|
|
@@ -79,6 +91,8 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
79
91
|
* @see max
|
|
80
92
|
*/
|
|
81
93
|
readonly isMinMaxType: boolean;
|
|
94
|
+
readonly maskInstance: IInputMask;
|
|
95
|
+
inputValue: string;
|
|
82
96
|
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
|
83
97
|
protected canSetValueToSurvey(): boolean;
|
|
84
98
|
protected convertFuncValuetoQuestionValue(val: any): any;
|
|
@@ -116,5 +130,7 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
116
130
|
onChange: (event: any) => void;
|
|
117
131
|
onBlur: (event: any) => void;
|
|
118
132
|
onFocus: (event: any) => void;
|
|
133
|
+
afterRenderQuestionElement(el: HTMLElement): void;
|
|
134
|
+
beforeDestroyQuestionElement(el: HTMLElement): void;
|
|
119
135
|
}
|
|
120
136
|
export declare function isMinMaxType(obj: any): boolean;
|
|
@@ -550,4 +550,11 @@ export declare var settings: {
|
|
|
550
550
|
dataList: string[];
|
|
551
551
|
};
|
|
552
552
|
legacyProgressBarView: boolean;
|
|
553
|
+
maskSettings: {
|
|
554
|
+
patternPlaceholderChar: string;
|
|
555
|
+
patternEscapeChar: string;
|
|
556
|
+
patternDefinitions: {
|
|
557
|
+
[key: string]: RegExp;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
553
560
|
};
|
|
@@ -83,6 +83,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
|
|
|
83
83
|
isDragMe: boolean;
|
|
84
84
|
readOnlyChangedCallback: () => void;
|
|
85
85
|
static ScrollElementToTop(elementId: string, scrollIfVisible?: boolean): boolean;
|
|
86
|
+
private static ScrollElementToViewCore;
|
|
86
87
|
static GetFirstNonTextElement(elements: any, removeSpaces?: boolean): any;
|
|
87
88
|
static FocusElement(elementId: string): boolean;
|
|
88
89
|
private static focusElementCore;
|
|
@@ -1919,10 +1919,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
|
1919
1919
|
private onShowingPreviewChanged;
|
|
1920
1920
|
private changeCurrentPageFromPreview;
|
|
1921
1921
|
private originalPages;
|
|
1922
|
-
protected onQuestionsOnPageModeChanged(oldValue: string): void;
|
|
1922
|
+
protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
|
|
1923
1923
|
private restoreOriginalPages;
|
|
1924
1924
|
private getPageStartIndex;
|
|
1925
|
-
private
|
|
1925
|
+
private isLockingUpdateOnPageModes;
|
|
1926
1926
|
private setupPagesForPageModes;
|
|
1927
1927
|
private createPagesForQuestionOnPageMode;
|
|
1928
1928
|
private createSinglePage;
|
|
@@ -26,6 +26,7 @@ export declare abstract class DragDropCore<T> implements IDragDropEngine {
|
|
|
26
26
|
protected domAdapter: IDragDropDOMAdapter;
|
|
27
27
|
constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean, domAdapter?: IDragDropDOMAdapter);
|
|
28
28
|
startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
|
|
29
|
+
private getRootElement;
|
|
29
30
|
dragInit(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement): void;
|
|
30
31
|
protected onStartDrag(event?: PointerEvent): void;
|
|
31
32
|
protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
|
|
@@ -89,6 +89,11 @@ export { DropdownMultiSelectListModel } from "../../dropdownMultiSelectListModel
|
|
|
89
89
|
export { QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue } from "../../question_buttongroup";
|
|
90
90
|
export { IsMobile, IsTouch, _setIsTouch } from "../../utils/devices";
|
|
91
91
|
export { confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, IAttachKey2clickOptions } from "../../utils/utils";
|
|
92
|
+
export { InputMaskBase } from "../../mask/mask_base";
|
|
93
|
+
export { InputMaskPattern } from "../../mask/mask_pattern";
|
|
94
|
+
export { InputMaskNumeric } from "../../mask/mask_numeric";
|
|
95
|
+
export { InputMaskDateTime } from "../../mask/mask_datetime";
|
|
96
|
+
export { InputMaskCurrency } from "../../mask/mask_currency";
|
|
92
97
|
export * from "../../utils/cssClassBuilder";
|
|
93
98
|
export { surveyCss, defaultV2Css, defaultV2ThemeName } from "../../defaultCss/defaultV2Css";
|
|
94
99
|
export { DragDropCore } from "../../dragdrop/core";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InputMaskBase } from "./mask_base";
|
|
2
|
+
import { ITextInputParams } from "./mask_utils";
|
|
3
|
+
export declare class InputElementAdapter {
|
|
4
|
+
private inputMaskInstance;
|
|
5
|
+
private inputElement;
|
|
6
|
+
private prevUnmaskedValue;
|
|
7
|
+
constructor(inputMaskInstance: InputMaskBase, inputElement: HTMLInputElement, value?: string);
|
|
8
|
+
inputMaskInstancePropertyChangedHandler: (sender: any, options: any) => void;
|
|
9
|
+
beforeInputHandler: (event: any) => void;
|
|
10
|
+
blurInputHandler: (event: any) => void;
|
|
11
|
+
createArgs(event: any): ITextInputParams;
|
|
12
|
+
addInputEventListener(): void;
|
|
13
|
+
removeInputEventListener(): void;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Base } from "../base";
|
|
2
|
+
import { IInputMask, IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
export declare class InputMaskBase extends Base implements IInputMask {
|
|
4
|
+
saveMaskedValue: boolean;
|
|
5
|
+
getType(): string;
|
|
6
|
+
setData(json: any): void;
|
|
7
|
+
getData(): any;
|
|
8
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
9
|
+
getUnmaskedValue(src: string): any;
|
|
10
|
+
getMaskedValue(src: any): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputMaskNumeric } from "./mask_numeric";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
export declare class InputMaskCurrency extends InputMaskNumeric {
|
|
4
|
+
prefix: string;
|
|
5
|
+
suffix: string;
|
|
6
|
+
getType(): string;
|
|
7
|
+
private wrapText;
|
|
8
|
+
unwrapInputArgs(args: ITextInputParams): void;
|
|
9
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
10
|
+
getMaskedValue(src: any): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InputMaskPattern } from "./mask_pattern";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
export interface IDateTimeMaskLexem {
|
|
4
|
+
type: "month" | "day" | "year" | "separator";
|
|
5
|
+
value: any;
|
|
6
|
+
count: number;
|
|
7
|
+
maxCount: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function getDateTimeLexems(pattern: string): Array<IDateTimeMaskLexem>;
|
|
10
|
+
export declare class InputMaskDateTime extends InputMaskPattern {
|
|
11
|
+
private turnOfTheCentury;
|
|
12
|
+
private lexems;
|
|
13
|
+
private inputDateTimeData;
|
|
14
|
+
min: string;
|
|
15
|
+
max: string;
|
|
16
|
+
getType(): string;
|
|
17
|
+
protected updateLiterals(): void;
|
|
18
|
+
private leaveOnlyNumbers;
|
|
19
|
+
private getMaskedStrFromISO;
|
|
20
|
+
private initInputDateTimeData;
|
|
21
|
+
private getISO_8601Format;
|
|
22
|
+
private isYearValid;
|
|
23
|
+
private isDateValid;
|
|
24
|
+
private getPlaceholder;
|
|
25
|
+
private updateInputDateTimeData;
|
|
26
|
+
private getCorrectDatePartFormat;
|
|
27
|
+
private createIDateTimeComposition;
|
|
28
|
+
private parseTwoDigitYear;
|
|
29
|
+
private getFormatedString;
|
|
30
|
+
private setInputDateTimeData;
|
|
31
|
+
_getMaskedValue(src: string, matchWholeMask?: boolean): string;
|
|
32
|
+
private getPartsOld;
|
|
33
|
+
private getParts;
|
|
34
|
+
getUnmaskedValue(src: string): any;
|
|
35
|
+
getMaskedValue(src: string): string;
|
|
36
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
37
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InputMaskBase } from "./mask_base";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
interface INumericalComposition {
|
|
4
|
+
integralPart: string;
|
|
5
|
+
fractionalPart: string;
|
|
6
|
+
isNegative?: boolean;
|
|
7
|
+
hasDecimalSeparator?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function splitString(str: string, reverse?: boolean, n?: number): Array<string>;
|
|
10
|
+
export declare class InputMaskNumeric extends InputMaskBase {
|
|
11
|
+
allowNegativeValues: boolean;
|
|
12
|
+
decimalSeparator: string;
|
|
13
|
+
precision: number;
|
|
14
|
+
thousandsSeparator: string;
|
|
15
|
+
min: number;
|
|
16
|
+
max: number;
|
|
17
|
+
private calccaretPosition;
|
|
18
|
+
displayNumber(parsedNumber: INumericalComposition, insertThousandsSeparator?: boolean, matchWholeMask?: boolean): string;
|
|
19
|
+
convertNumber(parsedNumber: INumericalComposition): number;
|
|
20
|
+
validateNumber(number: INumericalComposition): boolean;
|
|
21
|
+
parseNumber(src: string | number): INumericalComposition;
|
|
22
|
+
getNumberMaskedValue(src: string | number, matchWholeMask?: boolean): string;
|
|
23
|
+
private getNumberUnmaskedValue;
|
|
24
|
+
getMaskedValue(src: any): string;
|
|
25
|
+
getUnmaskedValue(src: string): any;
|
|
26
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
27
|
+
getType(): string;
|
|
28
|
+
protected isPropertyEmpty(value: any): boolean;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InputMaskBase } from "./mask_base";
|
|
2
|
+
import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
|
|
3
|
+
import { ILoadFromJSONOptions } from "../base-interfaces";
|
|
4
|
+
export interface IMaskLiteral {
|
|
5
|
+
type: "const" | "regex" | "fixed";
|
|
6
|
+
value: any;
|
|
7
|
+
}
|
|
8
|
+
export declare function getLiterals(pattern: string): Array<IMaskLiteral>;
|
|
9
|
+
export declare function getMaskedValueByPattern(src: string, pattern: string | Array<IMaskLiteral>, matchWholeMask: boolean): string;
|
|
10
|
+
export declare function getUnmaskedValueByPattern(str: string, pattern: string | Array<IMaskLiteral>, matchWholeMask: boolean, skipFixedChar?: boolean): string;
|
|
11
|
+
export declare class InputMaskPattern extends InputMaskBase {
|
|
12
|
+
private literals;
|
|
13
|
+
pattern: string;
|
|
14
|
+
protected updateLiterals(): void;
|
|
15
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
|
16
|
+
getType(): string;
|
|
17
|
+
fromJSON(json: any, options?: ILoadFromJSONOptions): void;
|
|
18
|
+
_getMaskedValue(src: string, matchWholeMask?: boolean): string;
|
|
19
|
+
_getUnmaskedValue(src: string, matchWholeMask?: boolean): string;
|
|
20
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
21
|
+
getMaskedValue(src: any): string;
|
|
22
|
+
getUnmaskedValue(src: string): any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare var numberDefinition: RegExp;
|
|
2
|
+
export interface IMaskedInputResult {
|
|
3
|
+
value: string;
|
|
4
|
+
caretPosition: number;
|
|
5
|
+
cancelPreventDefault?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ITextInputParams {
|
|
8
|
+
prevValue: string;
|
|
9
|
+
selectionStart: number;
|
|
10
|
+
selectionEnd: number;
|
|
11
|
+
insertedChars: string | null;
|
|
12
|
+
inputDirection?: "forward" | "backward";
|
|
13
|
+
}
|
|
14
|
+
export interface IInputMask {
|
|
15
|
+
getMaskedValue(src: any): string;
|
|
16
|
+
getUnmaskedValue(src: string): any;
|
|
17
|
+
processInput(args: ITextInputParams): IMaskedInputResult;
|
|
18
|
+
}
|
|
@@ -3,6 +3,8 @@ import { HashTable } from "./helpers";
|
|
|
3
3
|
import { SurveyError } from "./survey-error";
|
|
4
4
|
import { QuestionTextBase } from "./question_textbase";
|
|
5
5
|
import { CssClassBuilder } from "./utils/cssClassBuilder";
|
|
6
|
+
import { InputMaskBase } from "./mask/mask_base";
|
|
7
|
+
import { IInputMask } from "./mask/mask_utils";
|
|
6
8
|
/**
|
|
7
9
|
* A class that describes the Single-Line Input question type.
|
|
8
10
|
*
|
|
@@ -12,6 +14,17 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
12
14
|
private locDataListValue;
|
|
13
15
|
private minValueRunner;
|
|
14
16
|
private maxValueRunner;
|
|
17
|
+
private maskInputAdapter;
|
|
18
|
+
private createMaskAdapter;
|
|
19
|
+
private deleteMaskAdapter;
|
|
20
|
+
private updateMaskAdapter;
|
|
21
|
+
onSetMaskType(newValue: string): void;
|
|
22
|
+
maskType: string;
|
|
23
|
+
get maskTypeIsEmpty(): boolean;
|
|
24
|
+
get maskSettings(): InputMaskBase;
|
|
25
|
+
set maskSettings(val: InputMaskBase);
|
|
26
|
+
private setNewMaskSettingsProperty;
|
|
27
|
+
protected createMaskSettings(): InputMaskBase;
|
|
15
28
|
constructor(name: string);
|
|
16
29
|
protected isTextValue(): boolean;
|
|
17
30
|
getType(): string;
|
|
@@ -88,6 +101,9 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
88
101
|
* @see max
|
|
89
102
|
*/
|
|
90
103
|
get isMinMaxType(): boolean;
|
|
104
|
+
get maskInstance(): IInputMask;
|
|
105
|
+
get inputValue(): string;
|
|
106
|
+
set inputValue(val: string);
|
|
91
107
|
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
|
92
108
|
protected canSetValueToSurvey(): boolean;
|
|
93
109
|
protected convertFuncValuetoQuestionValue(val: any): any;
|
|
@@ -127,5 +143,7 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
127
143
|
onChange: (event: any) => void;
|
|
128
144
|
onBlur: (event: any) => void;
|
|
129
145
|
onFocus: (event: any) => void;
|
|
146
|
+
afterRenderQuestionElement(el: HTMLElement): void;
|
|
147
|
+
beforeDestroyQuestionElement(el: HTMLElement): void;
|
|
130
148
|
}
|
|
131
149
|
export declare function isMinMaxType(obj: any): boolean;
|
package/typings/settings.d.ts
CHANGED
|
@@ -550,4 +550,11 @@ export declare var settings: {
|
|
|
550
550
|
dataList: string[];
|
|
551
551
|
};
|
|
552
552
|
legacyProgressBarView: boolean;
|
|
553
|
+
maskSettings: {
|
|
554
|
+
patternPlaceholderChar: string;
|
|
555
|
+
patternEscapeChar: string;
|
|
556
|
+
patternDefinitions: {
|
|
557
|
+
[key: string]: RegExp;
|
|
558
|
+
};
|
|
559
|
+
};
|
|
553
560
|
};
|
|
@@ -84,6 +84,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
|
|
|
84
84
|
isDragMe: boolean;
|
|
85
85
|
readOnlyChangedCallback: () => void;
|
|
86
86
|
static ScrollElementToTop(elementId: string, scrollIfVisible?: boolean): boolean;
|
|
87
|
+
private static ScrollElementToViewCore;
|
|
87
88
|
static GetFirstNonTextElement(elements: any, removeSpaces?: boolean): any;
|
|
88
89
|
static FocusElement(elementId: string): boolean;
|
|
89
90
|
private static focusElementCore;
|
package/typings/survey.d.ts
CHANGED
|
@@ -2004,10 +2004,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
|
2004
2004
|
private onShowingPreviewChanged;
|
|
2005
2005
|
private changeCurrentPageFromPreview;
|
|
2006
2006
|
private originalPages;
|
|
2007
|
-
protected onQuestionsOnPageModeChanged(oldValue: string): void;
|
|
2007
|
+
protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
|
|
2008
2008
|
private restoreOriginalPages;
|
|
2009
2009
|
private getPageStartIndex;
|
|
2010
|
-
private
|
|
2010
|
+
private isLockingUpdateOnPageModes;
|
|
2011
2011
|
private setupPagesForPageModes;
|
|
2012
2012
|
private createPagesForQuestionOnPageMode;
|
|
2013
2013
|
private createSinglePage;
|