survey-core 1.9.21 → 1.9.24

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/survey.core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Type definition for Survey JavaScript library. Platform independent (core) v1.9.21
2
+ * Type definition for Survey JavaScript library. Platform independent (core) v1.9.24
3
3
  * Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -89,124 +89,99 @@ export interface IExpresionExecutor {
89
89
  * This call back runs on executing expression if there is at least one async function
90
90
  */
91
91
  onComplete: any;
92
- /*
93
- * The expression as string, property with get/set
94
- */
95
- expression: string;
96
- /*
97
- * Returns true if the expression is valid and can be executed
98
- */
99
- canRun(): boolean;
100
- /*
101
- * Run the expression. Returns the result of execution.
102
- * The result can be undefined if there is an asyn function. In this case result will be returned onComplete callback.
103
- */
104
- run(values: any, properties: any): any;
105
- /*
106
- * Returns the list of variables that used in the expression. They defined as: {variableName} in default parser.
107
- */
108
- getVariables(): Array<any>;
109
- /*
110
- * Returns true if there is a function in the expression
111
- */
112
- hasFunction(): boolean;
113
- /*
114
- * Returns true if there is an async function in the expression
115
- */
116
- isAsync: boolean;
117
92
  }
118
93
  /*
119
- * Defines an individual action. Action items can be displayed in certain survey elements - in Toolbar (or action bar), in titles (of pages, panels, questions), in matrix rows (as 'expand details' or 'remove row' buttons), and etc.
94
+ * An action item.
95
+ * Action items are used in the Toolbar, matrix rows, titles of pages, panels, questions, and other survey elements.
120
96
  */
121
97
  export interface IAction {
122
98
  /*
123
- * Unique string id
99
+ * A unique action item identifier.
124
100
  */
125
101
  id: string;
126
102
  /*
127
- * Set this property to false to make the toolbar item invisible.
103
+ * Specifies the action item's visibility.
128
104
  */
129
105
  visible?: boolean;
130
106
  /*
131
- * Toolbar item title
107
+ * The action item's title.
132
108
  */
133
109
  title?: string;
134
110
  /*
135
- * Toolbar item tooltip
111
+ * The action item's tooltip.
136
112
  */
137
113
  tooltip?: string;
138
114
  /*
139
- * Set this property to false to disable the toolbar item.
115
+ * Specifies whether users can interact with the action item.
140
116
  */
141
117
  enabled?: boolean;
142
118
  /*
143
- * Set this property to false to hide the toolbar item title.
119
+ * Specifies the visibility of the action item's title.
144
120
  */
145
121
  showTitle?: boolean;
146
122
  /*
147
- * A callback that calls on toolbar item click.
123
+ * A function that is executed when users click the action item.
148
124
  */
149
125
  action?: any;
150
126
  /*
151
- * Toolbar item css class
127
+ * One or several CSS classes that you want to apply to the outer `<div>` element.
128
+ * In the markup, an action item is rendered as an `<input>` wrapped in a `<div>`. The `css` property applies classes to the `<div>`.
129
+ * To apply several classes, separate them with a space character: "myclass1 myclass2".
152
130
  */
153
131
  css?: string;
154
132
  /*
155
- * Toolbar inner element css class
133
+ * One or several CSS classes that you want to apply to the inner `<input>` element.
134
+ * In the markup, an action item is rendered as an `<input>` wrapped in a `<div>`. The `innerCss` property applies classes to the `<input>`.
135
+ * To apply several classes, separate them with a space character: "myclass1 myclass2".
156
136
  */
157
137
  innerCss?: string;
158
138
  /*
159
- * Toolbar item data object. Used as data for custom template or component rendering
139
+ * The action item's data object. Use it to pass required data to a custom template or component.
160
140
  */
161
141
  data?: any;
162
142
  popupModel?: any;
163
143
  needSeparator?: boolean;
164
144
  /*
165
- * Set this property to true to activate the toolbar item (page)
145
+ * Specifies whether the action item is active.
146
+ * Use it as a flag to specify different action item appearances in different states.
166
147
  */
167
148
  active?: boolean;
168
149
  pressed?: boolean;
169
150
  /*
170
- * Toolbar item template name
151
+ * Specifies the name of a template used to render the action item.
171
152
  */
172
153
  template?: string;
173
154
  /*
174
- * Toolbar item component name
155
+ * Specifies the name of a component used to render the action item.
175
156
  */
176
157
  component?: string;
177
158
  /*
178
- * Toolbar item icon name
159
+ * The action item's icon name.
179
160
  */
180
161
  iconName?: string;
181
162
  /*
182
- * Toolbar item icon size
163
+ * The action item's icon size in pixels.
183
164
  */
184
165
  iconSize?: number;
185
166
  /*
186
- * Toolbar item child items. Can be used as contianer for options
187
- */
188
- items?: any;
189
- /*
190
- * Gets or sets an action's location in a matrix question's row.
167
+ * The action item's location in a matrix question's row.
191
168
  *
192
- * The following options are available:
169
+ * The following values are available:
193
170
  *
194
- * - `start` - An action is located at the beginning of a row.
195
- * - `end` - An action is located at the end of a row.
171
+ * - `"start"` - The action item is located at the beginning of the row.
172
+ * - `"end"` - The action is located at the end of the row.
196
173
  */
197
174
  location?: string;
198
175
  /*
199
- * Set it to true to make the tabIndex -1 to disable keyboard navigation to this item
176
+ * Set this property to `true` if you want to disable keyboard navigation for the action item (sets the `tabIndex` attribute to -1).
200
177
  */
201
178
  disableTabStop?: boolean;
202
179
  /*
203
- * Set it to false to force action "large" mode even if has icon and does not fit to action bar space
180
+ * Set this property to `true` if you want the item's `title` to be always visible.
181
+ * If you set it to `false`, the `title` hides when the screen space is limited, and the item displays only the icon.
204
182
  */
205
183
  disableShrink?: boolean;
206
- /*
207
- * Action button display mode
208
- */
209
- mode?: "popup" | "large" | "small";
184
+ mode?: any;
210
185
  visibleIndex?: number;
211
186
  needSpace?: boolean;
212
187
  }
@@ -612,7 +587,28 @@ export declare class Base {
612
587
  protected addEvent<T>(): EventBase<T>;
613
588
  protected onBaseCreating(): void;
614
589
  /*
615
- * Returns the type of the object as a string as it represents in the json. It should be in lowcase.
590
+ * Returns the question type.
591
+ * Possible values:
592
+ * - [*"boolean"*](https://surveyjs.io/Documentation/Library?id=questionbooleanmodel)
593
+ * - [*"checkbox"*](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel)
594
+ * - [*"comment"*](https://surveyjs.io/Documentation/Library?id=questioncommentmodel)
595
+ * - [*"dropdown"*](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel)
596
+ * - [*"expression"*](https://surveyjs.io/Documentation/Library?id=questionexpressionmodel)
597
+ * - [*"file"*](https://surveyjs.io/Documentation/Library?id=questionfilemodel)
598
+ * - [*"html"*](https://surveyjs.io/Documentation/Library?id=questionhtmlmodel)
599
+ * - [*"image"*](https://surveyjs.io/Documentation/Library?id=questionimagemodel)
600
+ * - [*"imagepicker"*](https://surveyjs.io/Documentation/Library?id=questionimagepickermodel)
601
+ * - [*"matrix"*](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel)
602
+ * - [*"matrixdropdown"*](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel)
603
+ * - [*"matrixdynamic"*](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel)
604
+ * - [*"multipletext"*](https://surveyjs.io/Documentation/Library?id=questionmultipletextmodel)
605
+ * - [*"panel"*](https://surveyjs.io/Documentation/Library?id=panelmodel)
606
+ * - [*"paneldynamic"*](https://surveyjs.io/Documentation/Library?id=questionpaneldynamicmodel)
607
+ * - [*"radiogroup"*](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel)
608
+ * - [*"rating"*](https://surveyjs.io/Documentation/Library?id=questionratingmodel)
609
+ * - [*"ranking"*](https://surveyjs.io/Documentation/Library?id=questionrankingmodel)
610
+ * - [*"signaturepad"*](https://surveyjs.io/Documentation/Library?id=questionsignaturepadmodel)
611
+ * - [*"text"*](https://surveyjs.io/Documentation/Library?id=questiontextmodel)
616
612
  */
617
613
  getType(): string;
618
614
  getSurvey(isLive?: boolean): ISurvey;
@@ -1315,7 +1311,7 @@ export declare class Action extends Base implements IAction {
1315
1311
  component: string;
1316
1312
  items: any;
1317
1313
  visibleIndex: number;
1318
- mode: "popup" | "large" | "small";
1314
+ mode: any;
1319
1315
  disableTabStop: boolean;
1320
1316
  disableShrink: boolean;
1321
1317
  needSpace: boolean;
@@ -1347,6 +1343,7 @@ export declare class ActionContainer<T extends Action = Action> extends Base {
1347
1343
  get visibleActions(): any;
1348
1344
  getRootCss(): string;
1349
1345
  get cssClasses(): any;
1346
+ addAction(val: IAction, sortByVisibleIndex?: boolean): Action;
1350
1347
  setItems(items: any, sortByVisibleIndex?: boolean): void;
1351
1348
  initResponsivityManager(container: any): void;
1352
1349
  resetResponsivityManager(): void;
@@ -1589,6 +1586,7 @@ export declare class ExceedSizeError extends SurveyError {
1589
1586
  getDefaultText(): string;
1590
1587
  }
1591
1588
  export declare class ExpressionExecutor implements IExpresionExecutor {
1589
+ constructor(expression: string);
1592
1590
  static createExpressionExecutor: any;
1593
1591
  onComplete: any;
1594
1592
  expressionValue: string;
@@ -1599,7 +1597,6 @@ export declare class ExpressionExecutor implements IExpresionExecutor {
1599
1597
  hasFunctionValue: boolean;
1600
1598
  asyncFuncList: any;
1601
1599
  get expression(): string;
1602
- set expression(val: string);
1603
1600
  getVariables(): Array<any>;
1604
1601
  hasFunction(): boolean;
1605
1602
  get isAsync(): boolean;
@@ -2616,13 +2613,16 @@ export declare class AdaptiveActionContainer<T extends Action = Action> extends
2616
2613
  protected dotsItemPopupModel: any;
2617
2614
  responsivityManager: ResponsivityManager;
2618
2615
  minVisibleItemsCount: number;
2616
+ isResponsivenessDisabled: boolean;
2619
2617
  protected invisibleItemsListModel: ListModel;
2620
2618
  protected onSet(): void;
2621
2619
  protected onPush(item: T): void;
2622
2620
  protected getRenderedActions(): Array<T>;
2621
+ protected raiseUpdate(isResetInitialized: boolean): void;
2623
2622
  fit(dimension: number, dotsItemSize: number): void;
2624
2623
  initResponsivityManager(container: any): void;
2625
2624
  resetResponsivityManager(): void;
2625
+ setActionsMode(mode: any): void;
2626
2626
  dispose(): void;
2627
2627
  }
2628
2628
  export declare class AnswerCountValidator extends SurveyValidator {
@@ -3117,6 +3117,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3117
3117
  localeValue: string;
3118
3118
  textPreProcessor: TextPreProcessor;
3119
3119
  timerModelValue: SurveyTimerModel;
3120
+ navigationBarValue: any;
3120
3121
  /*
3121
3122
  * The event is fired before the survey is completed and the `onComplete` event is fired. You can prevent the survey from completing by setting `options.allowComplete` to `false`
3122
3123
  * <br/> `sender` - the survey object that fires the event.
@@ -3778,7 +3779,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3778
3779
  get cssNavigationStart(): string;
3779
3780
  get cssNavigationNext(): string;
3780
3781
  get bodyCss(): string;
3781
- get completedCss(): string;
3782
+ completedCss: string;
3783
+ containerCss: string;
3782
3784
  get completedStateCss(): string;
3783
3785
  getCompletedStateCss(): string;
3784
3786
  lazyRenderingValue: boolean;
@@ -4089,6 +4091,12 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4089
4091
  get loadingHtml(): string;
4090
4092
  set loadingHtml(val: string);
4091
4093
  get locLoadingHtml(): LocalizableString;
4094
+ get navigationBar(): any;
4095
+ /*
4096
+ * Adds a custom navigation item similar to the Previous Page, Next Page, and Complete buttons.
4097
+ * Accepts an object described in the [IAction](https://surveyjs.io/Documentation/Library?id=IAction) help section.
4098
+ */
4099
+ addNavigationItem(val: IAction): Action;
4092
4100
  /*
4093
4101
  * Gets or sets the 'Start' button caption.
4094
4102
  * The 'Start' button is shown on the started page. Set the `firstPageIsStarted` property to `true`, to display the started page.
@@ -4580,6 +4588,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4580
4588
  isCalculatingProgressText: boolean;
4581
4589
  updateProgressText(onValueChanged?: boolean): void;
4582
4590
  getProgressText(): string;
4591
+ rootCss: string;
4583
4592
  getRootCss(): string;
4584
4593
  resizeObserver: any;
4585
4594
  afterRenderSurvey(htmlElement: any): void;
@@ -4734,6 +4743,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4734
4743
  setJsonObject(jsonObj: any): void;
4735
4744
  isEndLoadingFromJson: string;
4736
4745
  endLoadingFromJson(): void;
4746
+ updateNavigationItemTitlesCallback: any;
4747
+ updateNavigationItemCssCallback: any;
4748
+ protected createNavigationBar(): ActionContainer;
4749
+ protected createNavigationActions(): Array<IAction>;
4737
4750
  protected onBeforeCreating(): void;
4738
4751
  protected onCreating(): void;
4739
4752
  getBuiltInVariableValue(name: string): number;
@@ -4896,6 +4909,9 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4896
4909
  setTriggerValue(name: string, value: any, isVariable: boolean): void;
4897
4910
  copyTriggerValue(name: string, fromName: string): void;
4898
4911
  isFocusingQuestion: boolean;
4912
+ isMovingQuestion: boolean;
4913
+ startMovingQuestion(): void;
4914
+ stopMovingQuestion(): void;
4899
4915
  /*
4900
4916
  * Focus question by its name. If needed change the current page on the page where question is located.
4901
4917
  * Function returns false if there is no question with this name or question is invisible, otherwise it returns true.
@@ -5009,7 +5025,28 @@ export declare class PanelModelBase extends SurveyElement implements IPanel, ICo
5009
5025
  removeElementCallback: any;
5010
5026
  onGetQuestionTitleLocation: any;
5011
5027
  /*
5012
- * Returns the type of the object as a string as it represents in the json. It should be in lowcase.
5028
+ * Returns the question type.
5029
+ * Possible values:
5030
+ * - [*"boolean"*](https://surveyjs.io/Documentation/Library?id=questionbooleanmodel)
5031
+ * - [*"checkbox"*](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel)
5032
+ * - [*"comment"*](https://surveyjs.io/Documentation/Library?id=questioncommentmodel)
5033
+ * - [*"dropdown"*](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel)
5034
+ * - [*"expression"*](https://surveyjs.io/Documentation/Library?id=questionexpressionmodel)
5035
+ * - [*"file"*](https://surveyjs.io/Documentation/Library?id=questionfilemodel)
5036
+ * - [*"html"*](https://surveyjs.io/Documentation/Library?id=questionhtmlmodel)
5037
+ * - [*"image"*](https://surveyjs.io/Documentation/Library?id=questionimagemodel)
5038
+ * - [*"imagepicker"*](https://surveyjs.io/Documentation/Library?id=questionimagepickermodel)
5039
+ * - [*"matrix"*](https://surveyjs.io/Documentation/Library?id=questionmatrixmodel)
5040
+ * - [*"matrixdropdown"*](https://surveyjs.io/Documentation/Library?id=questionmatrixdropdownmodel)
5041
+ * - [*"matrixdynamic"*](https://surveyjs.io/Documentation/Library?id=questionmatrixdynamicmodel)
5042
+ * - [*"multipletext"*](https://surveyjs.io/Documentation/Library?id=questionmultipletextmodel)
5043
+ * - [*"panel"*](https://surveyjs.io/Documentation/Library?id=panelmodel)
5044
+ * - [*"paneldynamic"*](https://surveyjs.io/Documentation/Library?id=questionpaneldynamicmodel)
5045
+ * - [*"radiogroup"*](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel)
5046
+ * - [*"rating"*](https://surveyjs.io/Documentation/Library?id=questionratingmodel)
5047
+ * - [*"ranking"*](https://surveyjs.io/Documentation/Library?id=questionrankingmodel)
5048
+ * - [*"signaturepad"*](https://surveyjs.io/Documentation/Library?id=questionsignaturepadmodel)
5049
+ * - [*"text"*](https://surveyjs.io/Documentation/Library?id=questiontextmodel)
5013
5050
  */
5014
5051
  getType(): string;
5015
5052
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
@@ -5679,9 +5716,10 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
5679
5716
  getQuestionFromArray(name: string, index: number): IQuestion;
5680
5717
  getDefaultValue(): any;
5681
5718
  protected isDefaultValueEmpty(): boolean;
5719
+ protected getDefaultRunner(runner: ExpressionRunner, expression: string): ExpressionRunner;
5682
5720
  protected setDefaultValue(): void;
5683
5721
  protected isValueExpression(val: any): boolean;
5684
- protected setValueAndRunExpression(expression: string, defaultValue: any, setFunc: any, values?: any, properties?: any): void;
5722
+ protected setValueAndRunExpression(runner: ExpressionRunner, defaultValue: any, setFunc: any, values?: any, properties?: any): void;
5685
5723
  /*
5686
5724
  * The question comment value.
5687
5725
  */
@@ -7101,6 +7139,8 @@ export declare class QuestionSelectBase extends Question {
7101
7139
  protected get activeChoices(): any;
7102
7140
  protected getChoicesFromQuestion(question: QuestionSelectBase): Array<ItemValue>;
7103
7141
  protected get hasActiveChoices(): boolean;
7142
+ protected isHeadChoice(item: ItemValue, question: QuestionSelectBase): boolean;
7143
+ protected isFootChoice(item: ItemValue, question: QuestionSelectBase): boolean;
7104
7144
  protected isBuiltInChoice(item: ItemValue, question: QuestionSelectBase): boolean;
7105
7145
  protected getChoices(): Array<ItemValue>;
7106
7146
  supportComment(): boolean;
@@ -7802,6 +7842,8 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
7802
7842
  export declare class QuestionTextModel extends QuestionTextBase {
7803
7843
  constructor(name: string);
7804
7844
  locDataListValue: LocalizableStrings;
7845
+ minValueRunner: ExpressionRunner;
7846
+ maxValueRunner: ExpressionRunner;
7805
7847
  protected isTextValue(): boolean;
7806
7848
  getType(): string;
7807
7849
  onSurveyLoad(): void;
@@ -7964,7 +8006,7 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
7964
8006
  protected canUseFilteredChoices(): boolean;
7965
8007
  protected supportSelectAll(): boolean;
7966
8008
  protected addToVisibleChoices(items: any, isAddAll: boolean): void;
7967
- protected isBuiltInChoice(item: ItemValue, question: QuestionSelectBase): boolean;
8009
+ protected isHeadChoice(item: ItemValue, question: QuestionSelectBase): boolean;
7968
8010
  /*
7969
8011
  * For internal use in SurveyJS Creator V2.
7970
8012
  */
@@ -8123,6 +8165,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
8123
8165
  */
8124
8166
  get allowRowsDragAndDrop(): boolean;
8125
8167
  set allowRowsDragAndDrop(val: boolean);
8168
+ get iconDragElement(): string;
8126
8169
  protected createRenderedTable(): QuestionMatrixDropdownRenderedTable;
8127
8170
  /*
8128
8171
  * The minimum row count. A user could not delete a row if the rowCount equals to minRowCount
@@ -8474,6 +8517,7 @@ export declare var settings: {
8474
8517
  maxDate: string,
8475
8518
  showModal: any,
8476
8519
  supportCreatorV2: boolean,
8520
+ showDefaultItemsInCreatorV2: boolean,
8477
8521
  /*
8478
8522
  * Specifies a list of custom icons.
8479
8523
  * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons.
@@ -8844,6 +8888,9 @@ export declare var defaultStandardCss: {
8844
8888
  buttonCollapsed: string,
8845
8889
  },
8846
8890
  },
8891
+ variables: {
8892
+ themeMark: string,
8893
+ },
8847
8894
  };
8848
8895
  export declare var surveyTimerFunctions: {
8849
8896
  setTimeout: any,
@@ -9792,6 +9839,9 @@ export declare var defaultV2Css: {
9792
9839
  itemText: string,
9793
9840
  clearButton: string,
9794
9841
  other: string,
9842
+ itemNoImage: string,
9843
+ itemNoImageSvgIcon: string,
9844
+ itemNoImageSvgIconId: string,
9795
9845
  },
9796
9846
  matrix: {
9797
9847
  mainRoot: string,
@@ -9852,6 +9902,8 @@ export declare var defaultV2Css: {
9852
9902
  buttonRemove: string,
9853
9903
  iconAdd: string,
9854
9904
  iconRemove: string,
9905
+ dragElementDecorator: string,
9906
+ iconDragElement: string,
9855
9907
  footer: string,
9856
9908
  emptyRowsSection: string,
9857
9909
  iconDrag: string,
@@ -9976,6 +10028,7 @@ export declare var defaultV2Css: {
9976
10028
  },
9977
10029
  variables: {
9978
10030
  mobileWidth: string,
10031
+ themeMark: string,
9979
10032
  },
9980
10033
  };
9981
10034
  export declare var modernCss: {
@@ -10346,6 +10399,9 @@ export declare var modernCss: {
10346
10399
  buttonCollapsed: string,
10347
10400
  },
10348
10401
  },
10402
+ variables: {
10403
+ themeMark: string,
10404
+ },
10349
10405
  };
10350
10406
  export declare var SvgRegistry: SvgIconRegistry;
10351
10407
  export declare var SvgBundleViewModel: any;