survey-core 1.9.136 → 1.9.137
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 +333 -9
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +333 -9
- 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 +2 -2
- package/i18n/german.js.map +1 -1
- package/i18n/german.min.js +2 -2
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +2 -2
- package/i18n/hebrew.js.map +1 -1
- package/i18n/hebrew.min.js +2 -2
- 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 +3 -3
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- 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 +187 -1
- package/modern.css.map +1 -1
- package/modern.fontless.css +187 -1
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- 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 +1096 -178
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +3 -3
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- 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/base.d.ts +4 -4
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +14 -0
- package/ts3.4/typings/dragdrop/ranking-choices.d.ts +1 -1
- package/ts3.4/typings/dragdrop/ranking-select-to-rank.d.ts +6 -3
- package/ts3.4/typings/entries/core-wo-model.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +17 -4
- package/ts3.4/typings/popup-view-model.d.ts +14 -5
- package/ts3.4/typings/question_custom.d.ts +9 -0
- package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +1 -2
- package/ts3.4/typings/question_multipletext.d.ts +67 -20
- package/ts3.4/typings/question_ranking.d.ts +12 -3
- package/ts3.4/typings/question_text.d.ts +2 -0
- package/ts3.4/typings/survey-element.d.ts +12 -1
- package/ts3.4/typings/utils/animation.d.ts +54 -0
- package/ts3.4/typings/utils/taskmanager.d.ts +28 -0
- package/typings/base.d.ts +4 -4
- package/typings/defaultCss/defaultV2Css.d.ts +14 -0
- package/typings/dragdrop/ranking-choices.d.ts +1 -1
- package/typings/dragdrop/ranking-select-to-rank.d.ts +6 -3
- package/typings/entries/core-wo-model.d.ts +1 -0
- package/typings/panel.d.ts +18 -3
- package/typings/popup-view-model.d.ts +15 -5
- package/typings/question_custom.d.ts +9 -0
- package/typings/question_matrixdropdowncolumn.d.ts +1 -2
- package/typings/question_multipletext.d.ts +70 -20
- package/typings/question_ranking.d.ts +12 -1
- package/typings/question_text.d.ts +2 -0
- package/typings/survey-element.d.ts +15 -1
- package/typings/utils/animation.d.ts +50 -0
- package/typings/utils/taskmanager.d.ts +28 -0
package/ts3.4/typings/base.d.ts
CHANGED
|
@@ -292,12 +292,12 @@ export declare class Base {
|
|
|
292
292
|
private getValueInLowCase;
|
|
293
293
|
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
|
294
294
|
}
|
|
295
|
-
export declare class ArrayChanges {
|
|
295
|
+
export declare class ArrayChanges<T = any> {
|
|
296
296
|
index: number;
|
|
297
297
|
deleteCount: number;
|
|
298
|
-
itemsToAdd:
|
|
299
|
-
deletedItems:
|
|
300
|
-
constructor(index: number, deleteCount: number, itemsToAdd:
|
|
298
|
+
itemsToAdd: T[];
|
|
299
|
+
deletedItems: T[];
|
|
300
|
+
constructor(index: number, deleteCount: number, itemsToAdd: T[], deletedItems: T[]);
|
|
301
301
|
}
|
|
302
302
|
export declare class Event<CallbackFunction extends Function, Sender, Options> {
|
|
303
303
|
onCallbacksChanged: () => void;
|
|
@@ -45,6 +45,10 @@ export declare var defaultV2Css: {
|
|
|
45
45
|
edit: string;
|
|
46
46
|
};
|
|
47
47
|
panel: {
|
|
48
|
+
contentFadeIn: string;
|
|
49
|
+
contentFadeOut: string;
|
|
50
|
+
fadeIn: string;
|
|
51
|
+
fadeOut: string;
|
|
48
52
|
asPage: string;
|
|
49
53
|
number: string;
|
|
50
54
|
title: string;
|
|
@@ -67,6 +71,8 @@ export declare var defaultV2Css: {
|
|
|
67
71
|
header: string;
|
|
68
72
|
collapsed: string;
|
|
69
73
|
expanded: string;
|
|
74
|
+
expandable: string;
|
|
75
|
+
expandableAnimating: string;
|
|
70
76
|
nested: string;
|
|
71
77
|
invisible: string;
|
|
72
78
|
navigationButton: string;
|
|
@@ -154,8 +160,14 @@ export declare var defaultV2Css: {
|
|
|
154
160
|
row: string;
|
|
155
161
|
rowMultiple: string;
|
|
156
162
|
rowCompact: string;
|
|
163
|
+
rowFadeIn: string;
|
|
164
|
+
rowFadeOut: string;
|
|
157
165
|
pageRow: string;
|
|
158
166
|
question: {
|
|
167
|
+
contentFadeIn: string;
|
|
168
|
+
contentFadeOut: string;
|
|
169
|
+
fadeIn: string;
|
|
170
|
+
fadeOut: string;
|
|
159
171
|
mainRoot: string;
|
|
160
172
|
flowRoot: string;
|
|
161
173
|
withFrame: string;
|
|
@@ -198,6 +210,8 @@ export declare var defaultV2Css: {
|
|
|
198
210
|
hasErrorTop: string;
|
|
199
211
|
hasErrorBottom: string;
|
|
200
212
|
collapsed: string;
|
|
213
|
+
expandable: string;
|
|
214
|
+
expandableAnimating: string;
|
|
201
215
|
expanded: string;
|
|
202
216
|
nested: string;
|
|
203
217
|
invisible: string;
|
|
@@ -15,6 +15,6 @@ export declare class DragDropRankingChoices extends DragDropChoices {
|
|
|
15
15
|
protected updateDraggedElementShortcut(newIndex: number): void;
|
|
16
16
|
protected ghostPositionChanged(): void;
|
|
17
17
|
protected doBanDropHere: () => any;
|
|
18
|
-
protected doDrop
|
|
18
|
+
protected doDrop(): any;
|
|
19
19
|
clear(): void;
|
|
20
20
|
}
|
|
@@ -12,12 +12,15 @@ export declare class DragDropRankingSelectToRank extends DragDropRankingChoices
|
|
|
12
12
|
fromIndex: number;
|
|
13
13
|
toIndex: number;
|
|
14
14
|
};
|
|
15
|
+
protected calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
|
|
15
16
|
private doUIEffects;
|
|
16
17
|
private readonly isDraggedElementRanked: any;
|
|
17
18
|
private readonly isDropTargetRanked: any;
|
|
18
19
|
private readonly isDraggedElementUnranked: any;
|
|
19
20
|
private readonly isDropTargetUnranked: any;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
private updateChoices;
|
|
22
|
+
selectToRank: (questionModel: QuestionRankingModel, fromIndex: number, toIndex: number) => void;
|
|
23
|
+
unselectFromRank: (questionModel: QuestionRankingModel, fromIndex: number, toIndex?: number) => void;
|
|
24
|
+
reorderRankedItem: (questionModel: QuestionRankingModel, fromIndex: number, toIndex: number, dropTargetNode?: HTMLElement) => void;
|
|
25
|
+
clear(): void;
|
|
23
26
|
}
|
|
@@ -6,6 +6,7 @@ export * from "../rendererFactory";
|
|
|
6
6
|
export * from "../utils/responsivity-manager";
|
|
7
7
|
export { unwrap, getOriginalEvent, getElement } from "../utils/utils";
|
|
8
8
|
export * from "../actions/action";
|
|
9
|
+
export * from "../utils/animation";
|
|
9
10
|
export * from "../actions/adaptive-container";
|
|
10
11
|
export * from "../actions/container";
|
|
11
12
|
export * from "../utils/dragOrClickHelper";
|
package/ts3.4/typings/panel.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { SurveyError } from "./survey-error";
|
|
|
9
9
|
import { IAction } from "./actions/action";
|
|
10
10
|
import { ActionContainer } from "./actions/container";
|
|
11
11
|
import { DragDropInfo } from "./drag-drop-helper-v1";
|
|
12
|
+
import { AnimationGroup } from "./utils/animation";
|
|
12
13
|
export declare class QuestionRowModel extends Base {
|
|
13
14
|
panel: PanelModelBase;
|
|
14
15
|
private static rowCounter;
|
|
@@ -24,8 +25,12 @@ export declare class QuestionRowModel extends Base {
|
|
|
24
25
|
setIsLazyRendering(val: boolean): void;
|
|
25
26
|
isLazyRendering(): boolean;
|
|
26
27
|
readonly id: string;
|
|
28
|
+
protected equalsCore(obj: Base): boolean;
|
|
27
29
|
readonly elements: Array<IElement>;
|
|
28
|
-
|
|
30
|
+
private getVisibleElementsAnimationOptions;
|
|
31
|
+
visibleElementsAnimation: AnimationGroup<IElement>;
|
|
32
|
+
visibleElements: Array<IElement>;
|
|
33
|
+
onVisibleChangedCallback: () => void;
|
|
29
34
|
visible: boolean;
|
|
30
35
|
isNeedRender: boolean;
|
|
31
36
|
updateVisible(): void;
|
|
@@ -35,11 +40,12 @@ export declare class QuestionRowModel extends Base {
|
|
|
35
40
|
private getRenderedCalcWidth;
|
|
36
41
|
private getElementWidth;
|
|
37
42
|
private getRenderedWidthFromWidth;
|
|
38
|
-
private calcVisible;
|
|
39
|
-
private needToUpdateVisibleElements;
|
|
40
43
|
dragTypeOverMe: DragTypeOverMeEnum;
|
|
41
44
|
dispose(): void;
|
|
42
45
|
getRowCss(): string;
|
|
46
|
+
private rootElement?;
|
|
47
|
+
setRootElement(element?: HTMLElement): void;
|
|
48
|
+
getRootElement(): HTMLElement;
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* A base class for the [PanelModel](https://surveyjs.io/form-library/documentation/panelmodel) and [PageModel](https://surveyjs.io/form-library/documentation/pagemodel) classes.
|
|
@@ -54,6 +60,12 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
|
54
60
|
removeElementCallback: (element: IElement) => void;
|
|
55
61
|
onGetQuestionTitleLocation: () => string;
|
|
56
62
|
private dragDropPanelHelper;
|
|
63
|
+
onAddRow(row: QuestionRowModel): void;
|
|
64
|
+
private getRowsAnimationOptions;
|
|
65
|
+
private rowsAnimation;
|
|
66
|
+
visibleRows: Array<QuestionRowModel>;
|
|
67
|
+
onRemoveRow(row: QuestionRowModel): void;
|
|
68
|
+
onRowVisibleChanged(): void;
|
|
57
69
|
constructor(name?: string);
|
|
58
70
|
getType(): string;
|
|
59
71
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
|
@@ -316,7 +328,8 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
|
316
328
|
* @see visible
|
|
317
329
|
*/
|
|
318
330
|
readonly isVisible: boolean;
|
|
319
|
-
|
|
331
|
+
getIsContentVisible(exceptionQuestion?: IQuestion): boolean;
|
|
332
|
+
getIsPageVisible(exceptionQuestion?: IQuestion): boolean;
|
|
320
333
|
private lastVisibleIndex;
|
|
321
334
|
setVisibleIndex(index: number): number;
|
|
322
335
|
private updateVisibleIndexes;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Base } from "./base";
|
|
1
|
+
import { Base, EventBase } from "./base";
|
|
2
2
|
import { PopupModel } from "./popup";
|
|
3
3
|
import { CssClassBuilder } from "./utils/cssClassBuilder";
|
|
4
4
|
import { ActionContainer } from "./actions/container";
|
|
5
|
+
import { AnimationOptions, IAnimationConsumer } from "./utils/animation";
|
|
5
6
|
export declare const FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])";
|
|
6
|
-
export declare class PopupBaseViewModel extends Base {
|
|
7
|
-
private static SubscriptionId;
|
|
8
|
-
private subscriptionId;
|
|
7
|
+
export declare class PopupBaseViewModel extends Base implements IAnimationConsumer {
|
|
9
8
|
protected popupSelector: string;
|
|
10
9
|
protected fixedPopupContainer: string;
|
|
11
10
|
protected containerSelector: string;
|
|
@@ -17,8 +16,17 @@ export declare class PopupBaseViewModel extends Base {
|
|
|
17
16
|
height: string;
|
|
18
17
|
width: string;
|
|
19
18
|
minWidth: string;
|
|
20
|
-
|
|
19
|
+
_isVisible: boolean;
|
|
21
20
|
locale: string;
|
|
21
|
+
private updateIsVisible;
|
|
22
|
+
private visibilityAnimation;
|
|
23
|
+
getLeaveOptions(): AnimationOptions;
|
|
24
|
+
getEnterOptions(): AnimationOptions;
|
|
25
|
+
getAnimatedElement(): HTMLElement;
|
|
26
|
+
isAnimationEnabled(): boolean;
|
|
27
|
+
private getAnimationContainer;
|
|
28
|
+
isVisible: boolean;
|
|
29
|
+
onVisibilityChanged: EventBase<PopupBaseViewModel, any>;
|
|
22
30
|
readonly container: HTMLElement;
|
|
23
31
|
private containerElement;
|
|
24
32
|
private createdContainer;
|
|
@@ -31,6 +39,7 @@ export declare class PopupBaseViewModel extends Base {
|
|
|
31
39
|
protected createFooterActionBar(): void;
|
|
32
40
|
protected resetDimensionsAndPositionStyleProperties(): void;
|
|
33
41
|
protected onModelChanging(newModel: PopupModel): void;
|
|
42
|
+
private onModelIsVisibleChangedCallback;
|
|
34
43
|
private setupModel;
|
|
35
44
|
private _model;
|
|
36
45
|
model: PopupModel;
|
|
@@ -6,6 +6,7 @@ import { SurveyElement } from "./survey-element";
|
|
|
6
6
|
import { PanelModel } from "./panel";
|
|
7
7
|
import { HashTable } from "./helpers";
|
|
8
8
|
import { ItemValue } from "./itemvalue";
|
|
9
|
+
import { SurveyError } from "./survey-error";
|
|
9
10
|
/**
|
|
10
11
|
* An interface used to create custom question types.
|
|
11
12
|
*
|
|
@@ -224,6 +225,12 @@ export interface ICustomQuestionTypeConfiguration {
|
|
|
224
225
|
* @see questionJSON
|
|
225
226
|
*/
|
|
226
227
|
createQuestion?: any;
|
|
228
|
+
/**
|
|
229
|
+
* A function that allows you to display different error texts based on conditions.
|
|
230
|
+
* @param question A custom question. Use the `question.value` property to access the question's value.
|
|
231
|
+
* @returns An error text.
|
|
232
|
+
*/
|
|
233
|
+
getErrorText?: (question: Question) => string;
|
|
227
234
|
valueToQuestion?: (val: any) => any;
|
|
228
235
|
valueFromQuestion?: (val: any) => any;
|
|
229
236
|
getValue?: (val: any) => any;
|
|
@@ -243,6 +250,7 @@ export declare class ComponentQuestionJSON {
|
|
|
243
250
|
onPropertyChanged(question: Question, propertyName: string, newValue: any): void;
|
|
244
251
|
onValueChanged(question: Question, name: string, newValue: any): void;
|
|
245
252
|
onValueChanging(question: Question, name: string, newValue: any): any;
|
|
253
|
+
onGetErrorText(question: Question): string;
|
|
246
254
|
onItemValuePropertyChanged(question: Question, item: ItemValue, propertyName: string, name: string, newValue: any): void;
|
|
247
255
|
getDisplayValue(keyAsText: boolean, value: any, question: Question): any;
|
|
248
256
|
readonly defaultQuestionTitle: any;
|
|
@@ -295,6 +303,7 @@ export declare abstract class QuestionCustomModelBase extends Question implement
|
|
|
295
303
|
protected onUpdateQuestionCssClasses(element: Question, css: any): void;
|
|
296
304
|
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
|
297
305
|
protected setNewValue(newValue: any): void;
|
|
306
|
+
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
|
298
307
|
getSurveyData(): ISurveyData;
|
|
299
308
|
getTextProcessor(): ITextProcessor;
|
|
300
309
|
getValue(name: string): any;
|
|
@@ -95,10 +95,9 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
|
|
|
95
95
|
readonly locTitle: LocalizableString;
|
|
96
96
|
readonly fullTitle: string;
|
|
97
97
|
/*
|
|
98
|
-
* Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a validation error.
|
|
98
|
+
* Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a [validation error](#requiredErrorText).
|
|
99
99
|
*
|
|
100
100
|
* If you want to mark the column as required based on a condition, specify the [`requiredIf`](#requiredIf) property.
|
|
101
|
-
* @see requiredErrorText
|
|
102
101
|
* @see visible
|
|
103
102
|
* @see readOnly
|
|
104
103
|
*/
|
|
@@ -6,6 +6,7 @@ import { QuestionTextModel } from "./question_text";
|
|
|
6
6
|
import { SurveyError } from "./survey-error";
|
|
7
7
|
import { ILocalizableOwner, LocalizableString } from "./localizablestring";
|
|
8
8
|
import { HashTable } from "./helpers";
|
|
9
|
+
import { InputMaskBase } from "./mask/mask_base";
|
|
9
10
|
export interface IMultipleTextData extends ILocalizableOwner, IPanel {
|
|
10
11
|
getSurvey(): ISurvey;
|
|
11
12
|
getTextProcessor(): ITextProcessor;
|
|
@@ -21,9 +22,9 @@ export declare class MultipleTextEditorModel extends QuestionTextModel {
|
|
|
21
22
|
readonly a11y_input_ariaDescribedBy: string;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
|
-
* A class that describes an item
|
|
25
|
+
* A class that describes an [item](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#items) in a Multiple Textboxes question.
|
|
25
26
|
*
|
|
26
|
-
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
|
|
27
|
+
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/ (linkStyle))
|
|
27
28
|
*/
|
|
28
29
|
export declare class MultipleTextItemModel extends Base implements IValidatorOwner, ISurveyData, ISurveyImpl {
|
|
29
30
|
private editorValue;
|
|
@@ -34,7 +35,10 @@ export declare class MultipleTextItemModel extends Base implements IValidatorOwn
|
|
|
34
35
|
readonly id: string;
|
|
35
36
|
getOriginalObj(): Base;
|
|
36
37
|
/*
|
|
37
|
-
*
|
|
38
|
+
* An item ID that is not visible to respondents.
|
|
39
|
+
*
|
|
40
|
+
* > Item IDs must be unique.
|
|
41
|
+
* @see title
|
|
38
42
|
*/
|
|
39
43
|
name: string;
|
|
40
44
|
readonly question: Question;
|
|
@@ -46,62 +50,104 @@ export declare class MultipleTextItemModel extends Base implements IValidatorOwn
|
|
|
46
50
|
setData(data: IMultipleTextData): void;
|
|
47
51
|
focusIn: () => void;
|
|
48
52
|
/*
|
|
49
|
-
*
|
|
53
|
+
* Marks the item as required. If a respondent leaves this item empty, the question displays a [validation error](#requiredErrorText).
|
|
50
54
|
*/
|
|
51
55
|
isRequired: boolean;
|
|
52
56
|
/*
|
|
53
|
-
*
|
|
57
|
+
* A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
|
|
58
|
+
*
|
|
59
|
+
* Default value: `"text"`
|
|
54
60
|
*/
|
|
55
61
|
inputType: string;
|
|
56
62
|
/*
|
|
57
|
-
*
|
|
58
|
-
* @see name
|
|
63
|
+
* A user-friendly item label to display. If `title` is undefined, [`name`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel#name) is displayed instead.
|
|
59
64
|
*/
|
|
60
65
|
title: string;
|
|
61
66
|
readonly locTitle: LocalizableString;
|
|
62
67
|
readonly fullTitle: string;
|
|
63
68
|
/*
|
|
64
|
-
* The maximum text length
|
|
65
|
-
*
|
|
66
|
-
*
|
|
69
|
+
* The maximum text length measured in characters. Assign 0 if the length should be unlimited.
|
|
70
|
+
*
|
|
71
|
+
* Default value: -1 (inherits the actual value from the `SurveyModel`'s [`maxTextLength`](https://surveyjs.io/form-library/documentation/surveymodel#maxTextLength) property).
|
|
67
72
|
*/
|
|
68
73
|
maxLength: number;
|
|
69
74
|
getMaxLength(): any;
|
|
70
75
|
/*
|
|
71
|
-
*
|
|
76
|
+
* A placeholder for the input field.
|
|
72
77
|
*/
|
|
73
78
|
placeholder: string;
|
|
74
79
|
readonly locPlaceholder: LocalizableString;
|
|
75
80
|
placeHolder: string;
|
|
76
81
|
readonly locPlaceHolder: LocalizableString;
|
|
77
82
|
/*
|
|
78
|
-
*
|
|
83
|
+
* Specifies a custom error message for a [required item](#isRequired).
|
|
79
84
|
*/
|
|
80
85
|
requiredErrorText: string;
|
|
81
86
|
readonly locRequiredErrorText: LocalizableString;
|
|
82
87
|
/*
|
|
83
|
-
*
|
|
88
|
+
* A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` element.
|
|
89
|
+
*
|
|
90
|
+
* If you want to set a uniform `size` for all text box items, use the [`itemSize`](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#itemSize) within the Multiple Textboxes configuration.
|
|
84
91
|
*/
|
|
85
92
|
size: number;
|
|
86
93
|
/*
|
|
87
|
-
* An expression
|
|
94
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the default item value.
|
|
95
|
+
* @see minValueExpression
|
|
96
|
+
* @see maxValueExpression
|
|
88
97
|
*/
|
|
89
98
|
defaultValueExpression: string;
|
|
90
99
|
/*
|
|
91
|
-
*
|
|
100
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the minimum item value.
|
|
101
|
+
* @see maxValueExpression
|
|
102
|
+
* @see defaultValueExpression
|
|
92
103
|
*/
|
|
93
104
|
minValueExpression: string;
|
|
94
105
|
/*
|
|
95
|
-
*
|
|
106
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the maximum item value.
|
|
107
|
+
* @see minValueExpression
|
|
108
|
+
* @see defaultValueExpression
|
|
96
109
|
*/
|
|
97
110
|
maxValueExpression: string;
|
|
98
111
|
/*
|
|
99
|
-
*
|
|
112
|
+
* Item validators.
|
|
113
|
+
*
|
|
114
|
+
* [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
|
|
100
115
|
*/
|
|
101
116
|
validators: Array<SurveyValidator>;
|
|
102
117
|
getValidators(): Array<SurveyValidator>;
|
|
103
118
|
/*
|
|
104
|
-
*
|
|
119
|
+
* Specifies the type of a mask applied to the input.
|
|
120
|
+
*
|
|
121
|
+
* Possible values:
|
|
122
|
+
*
|
|
123
|
+
* - `"none"` (default)
|
|
124
|
+
* - `"numeric"`
|
|
125
|
+
* - `"currency"`
|
|
126
|
+
* - `"datetime"`
|
|
127
|
+
* - `"pattern"`
|
|
128
|
+
*
|
|
129
|
+
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
|
|
130
|
+
* @see maskSettings
|
|
131
|
+
*/
|
|
132
|
+
maskType: string;
|
|
133
|
+
/*
|
|
134
|
+
* An object with properties that configure the mask applied to the input.
|
|
135
|
+
*
|
|
136
|
+
* Available properties depend on the specified [`maskType`](#maskType) and belong to corresponding classes. Refer to the class APIs for a full list of properties:
|
|
137
|
+
*
|
|
138
|
+
* | `maskType` | Class |
|
|
139
|
+
* | ---------- | ----- |
|
|
140
|
+
* | `"numeric"` | [`InputMaskNumeric`](https://surveyjs.io/form-library/documentation/api-reference/inputmasknumeric) |
|
|
141
|
+
* | `"currency"` | [`InputMaskCurrency`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskcurrency) |
|
|
142
|
+
* | `"datetime"` | [`InputMaskDateTime`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskdatetime) |
|
|
143
|
+
* | `"pattern"` | [`InputMaskPattern`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern) |
|
|
144
|
+
*
|
|
145
|
+
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
|
|
146
|
+
*/
|
|
147
|
+
maskSettings: InputMaskBase;
|
|
148
|
+
inputTextAlignment: "left" | "right" | "auto";
|
|
149
|
+
/*
|
|
150
|
+
* An item value.
|
|
105
151
|
*/
|
|
106
152
|
value: any;
|
|
107
153
|
isEmpty(): boolean;
|
|
@@ -145,9 +191,9 @@ export declare class QuestionMultipleTextModel extends Question implements IMult
|
|
|
145
191
|
private editorsOnSurveyLoad;
|
|
146
192
|
private performForEveryEditor;
|
|
147
193
|
/*
|
|
148
|
-
* Gets or sets an array of `MultipleTextItemModel` objects that represent input items.
|
|
194
|
+
* Gets or sets an array of [`MultipleTextItemModel`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel) objects that represent input items.
|
|
149
195
|
*
|
|
150
|
-
*
|
|
196
|
+
* Each object in this array should have at least the following properties:
|
|
151
197
|
*
|
|
152
198
|
* ```js
|
|
153
199
|
* {
|
|
@@ -169,6 +215,7 @@ export declare class QuestionMultipleTextModel extends Question implements IMult
|
|
|
169
215
|
*/
|
|
170
216
|
addItem(name: string, title?: string): MultipleTextItemModel;
|
|
171
217
|
getItemByName(name: string): MultipleTextItemModel;
|
|
218
|
+
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
|
172
219
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
|
173
220
|
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
|
174
221
|
getConditionJson(operator?: string, path?: string): any;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ISurveyImpl } from "./base-interfaces";
|
|
2
2
|
import { DragDropRankingChoices } from "./dragdrop/ranking-choices";
|
|
3
|
+
import { DragDropRankingSelectToRank } from "./dragdrop/ranking-select-to-rank";
|
|
3
4
|
import { ItemValue } from "./itemvalue";
|
|
4
5
|
import { QuestionCheckboxModel } from "./question_checkbox";
|
|
6
|
+
import { AnimationGroup } from "./utils/animation";
|
|
5
7
|
/**
|
|
6
8
|
* A class that describes the Ranking question type.
|
|
7
9
|
*
|
|
@@ -21,6 +23,7 @@ export declare class QuestionRankingModel extends QuestionCheckboxModel {
|
|
|
21
23
|
readonly ghostPositionCssClass: string;
|
|
22
24
|
getItemIndexClasses(item: ItemValue): string;
|
|
23
25
|
getNumberByIndex(index: number): string;
|
|
26
|
+
private updateRankingChoicesSync;
|
|
24
27
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
|
25
28
|
isAnswerCorrect(): boolean;
|
|
26
29
|
readonly requireStrictCompare: boolean;
|
|
@@ -29,16 +32,22 @@ export declare class QuestionRankingModel extends QuestionCheckboxModel {
|
|
|
29
32
|
localeChanged: () => void;
|
|
30
33
|
private addToValueByVisibleChoices;
|
|
31
34
|
private removeFromValueByVisibleChoices;
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
private getChoicesAnimation;
|
|
36
|
+
private _rankingChoicesAnimation;
|
|
37
|
+
readonly rankingChoicesAnimation: AnimationGroup<ItemValue>;
|
|
38
|
+
private _unRankingChoicesAnimation;
|
|
39
|
+
readonly unRankingChoicesAnimation: AnimationGroup<ItemValue>;
|
|
40
|
+
rankingChoices: Array<ItemValue>;
|
|
41
|
+
unRankingChoices: Array<ItemValue>;
|
|
34
42
|
private updateRankingChoices;
|
|
43
|
+
updateUnRankingChoices(newRankingChoices: Array<ItemValue>): void;
|
|
35
44
|
private updateRankingChoicesSelectToRankMode;
|
|
36
45
|
dragDropRankingChoices: DragDropRankingChoices;
|
|
37
46
|
currentDropTarget: ItemValue;
|
|
38
47
|
dropTargetNodeMove: string;
|
|
39
48
|
endLoadingFromJson(): void;
|
|
40
49
|
private setDragDropRankingChoices;
|
|
41
|
-
protected createDragDropRankingChoices(): DragDropRankingChoices;
|
|
50
|
+
protected createDragDropRankingChoices(): DragDropRankingChoices | DragDropRankingSelectToRank;
|
|
42
51
|
handlePointerDown: (event: PointerEvent, choice: ItemValue, node: HTMLElement) => void;
|
|
43
52
|
private isDragStartNodeValid;
|
|
44
53
|
private readonly allowStartDrag: any;
|
|
@@ -59,6 +59,8 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
|
59
59
|
onSurveyLoad(): void;
|
|
60
60
|
/*
|
|
61
61
|
* A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
|
|
62
|
+
*
|
|
63
|
+
* Default value: `"text"`
|
|
62
64
|
*/
|
|
63
65
|
inputType: string;
|
|
64
66
|
getMaxLength(): any;
|
|
@@ -316,7 +316,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
|
|
|
316
316
|
protected setPage(parent: IPanel, newPage: IPage): void;
|
|
317
317
|
protected getSearchableLocKeys(keys: Array<string>): void;
|
|
318
318
|
readonly isDefaultV2Theme: boolean;
|
|
319
|
-
readonly hasParent:
|
|
319
|
+
readonly hasParent: boolean;
|
|
320
320
|
isSingleInRow: boolean;
|
|
321
321
|
private shouldAddRunnerStyles;
|
|
322
322
|
protected readonly isCompact: boolean;
|
|
@@ -383,5 +383,16 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
|
|
|
383
383
|
protected getAdditionalTitleToolbar(): ActionContainer | null;
|
|
384
384
|
protected getCssTitle(cssClasses: any): string;
|
|
385
385
|
localeChanged(): void;
|
|
386
|
+
private wrapperElement?;
|
|
387
|
+
setWrapperElement(element?: HTMLElement): void;
|
|
388
|
+
getWrapperElement(): HTMLElement;
|
|
389
|
+
private _renderedIsExpanded;
|
|
390
|
+
private _isAnimatingCollapseExpand;
|
|
391
|
+
private isAnimatingCollapseExpand: any;
|
|
392
|
+
private getExpandCollapseAnimationOptions;
|
|
393
|
+
private animationCollapsed;
|
|
394
|
+
renderedIsExpanded: boolean;
|
|
395
|
+
private animationAllowedValue;
|
|
396
|
+
animationAllowed: boolean;
|
|
386
397
|
dispose(): void;
|
|
387
398
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface AnimationOptions {
|
|
2
|
+
cssClass: string;
|
|
3
|
+
onBeforeRunAnimation?: (element: HTMLElement) => void;
|
|
4
|
+
onAfterRunAnimation?: (element: HTMLElement) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface IAnimationConsumer<T extends Array<any> = [
|
|
7
|
+
]> {
|
|
8
|
+
getLeaveOptions(...args: T): AnimationOptions;
|
|
9
|
+
getEnterOptions(...args: T): AnimationOptions;
|
|
10
|
+
getAnimatedElement(...args: T): HTMLElement;
|
|
11
|
+
isAnimationEnabled(): boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class AnimationUtils {
|
|
14
|
+
private getMsFromRule;
|
|
15
|
+
private getAnimationsCount;
|
|
16
|
+
private getAnimationDuration;
|
|
17
|
+
private cancelQueue;
|
|
18
|
+
protected onAnimationEnd(element: HTMLElement, callback: (isCancel?: boolean) => void, options: AnimationOptions): void;
|
|
19
|
+
protected beforeAnimationRun(element: HTMLElement, options: AnimationOptions | AnimationOptions): void;
|
|
20
|
+
protected runLeaveAnimation(element: HTMLElement, options: AnimationOptions, callback: () => void): void;
|
|
21
|
+
protected runEnterAnimation(element: HTMLElement, options: AnimationOptions): void;
|
|
22
|
+
cancel(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class AnimationPropertyUtils extends AnimationUtils {
|
|
25
|
+
onEnter(getElement: () => HTMLElement, options: AnimationOptions): void;
|
|
26
|
+
onLeave(getElement: () => HTMLElement, callback: () => void, options: AnimationOptions): void;
|
|
27
|
+
}
|
|
28
|
+
export declare class AnimationGroupUtils<T> extends AnimationUtils {
|
|
29
|
+
onEnter(getElement: (el: T) => HTMLElement, getOptions: (el: T) => AnimationOptions, elements: Array<T>): void;
|
|
30
|
+
onLeave(getElement: (el: T) => HTMLElement, callback: () => void, getOptions: (el: T) => AnimationOptions, elements: Array<T>): void;
|
|
31
|
+
}
|
|
32
|
+
declare abstract class AnimationProperty<T, S extends Array<any> = [
|
|
33
|
+
]> {
|
|
34
|
+
protected animationOptions: IAnimationConsumer<S>;
|
|
35
|
+
protected update: (val: T) => void;
|
|
36
|
+
protected getCurrentValue: () => T;
|
|
37
|
+
constructor(animationOptions: IAnimationConsumer<S>, update: (val: T) => void, getCurrentValue: () => T);
|
|
38
|
+
protected animation: AnimationUtils;
|
|
39
|
+
protected abstract _sync(newValue: T): void;
|
|
40
|
+
private _debouncedSync;
|
|
41
|
+
sync(newValue: T): void;
|
|
42
|
+
cancel(): void;
|
|
43
|
+
}
|
|
44
|
+
export declare class AnimationBoolean extends AnimationProperty<boolean> {
|
|
45
|
+
protected animation: AnimationPropertyUtils;
|
|
46
|
+
protected _sync(newValue: boolean): void;
|
|
47
|
+
}
|
|
48
|
+
export declare class AnimationGroup<T> extends AnimationProperty<Array<T>, [
|
|
49
|
+
T
|
|
50
|
+
]> {
|
|
51
|
+
protected animation: AnimationGroupUtils<T>;
|
|
52
|
+
protected _sync(newValue: Array<T>): void;
|
|
53
|
+
}
|
|
54
|
+
export {};
|