survey-core 1.9.18 → 1.9.21

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.18
2
+ * Type definition for Survey JavaScript library. Platform independent (core) v1.9.21
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
  */
@@ -82,6 +82,40 @@ export interface IParseOptions {
82
82
  tracer?: any;
83
83
  }
84
84
  /*
85
+ * Base interface for expression execution
86
+ */
87
+ export interface IExpresionExecutor {
88
+ /*
89
+ * This call back runs on executing expression if there is at least one async function
90
+ */
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
+ }
118
+ /*
85
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.
86
120
  */
87
121
  export interface IAction {
@@ -174,6 +208,7 @@ export interface IAction {
174
208
  */
175
209
  mode?: "popup" | "large" | "small";
176
210
  visibleIndex?: number;
211
+ needSpace?: boolean;
177
212
  }
178
213
  export interface IDimensions {
179
214
  scroll: number;
@@ -509,6 +544,12 @@ export interface IQuestionPanelDynamicData {
509
544
  getSurvey(): ISurvey;
510
545
  getRootData(): ISurveyData;
511
546
  }
547
+ export declare class ActionDropdownViewModel {
548
+ constructor(item: Action);
549
+ popupModel: any;
550
+ funcKey: string;
551
+ dispose(): void;
552
+ }
512
553
  export declare class ArrayChanges {
513
554
  constructor(index: number, deleteCount: number, itemsToAdd: any, deletedItems: any);
514
555
  index: number;
@@ -850,13 +891,7 @@ export declare class Event<T, Options> {
850
891
  }
851
892
  export declare class ExpressionRunnerBase {
852
893
  constructor(expression: string);
853
- expressionValue: string;
854
- operand: Operand;
855
- processValue: ProcessValue;
856
- parser: ConditionsParser;
857
- isAsyncValue: boolean;
858
- hasFunctionValue: boolean;
859
- asyncFuncList: any;
894
+ expressionExecutor: IExpresionExecutor;
860
895
  get expression(): string;
861
896
  set expression(val: string);
862
897
  getVariables(): Array<any>;
@@ -972,6 +1007,7 @@ export declare class MatrixCells {
972
1007
  cellsOwner: IMatrixCellsOwner;
973
1008
  values: any;
974
1009
  get isEmpty(): boolean;
1010
+ onValuesChanged: any;
975
1011
  setCellText(row: any, column: any, val: string): void;
976
1012
  setDefaultCellText(column: any, val: string): void;
977
1013
  getCellLocText(row: any, column: any): LocalizableString;
@@ -1185,6 +1221,7 @@ export declare class SvgIconRegistry {
1185
1221
  registerIconFromSymbol(iconId: string, iconSymbolSvg: string): void;
1186
1222
  registerIconFromSvgViaElement(iconId: string, iconSvg: string, iconPrefix?: string): void;
1187
1223
  registerIconFromSvg(iconId: string, iconSvg: string, iconPrefix?: string): boolean;
1224
+ registerIconsFromFolder(r: any): void;
1188
1225
  iconsRenderedHtml(): any;
1189
1226
  renderIcons(): void;
1190
1227
  }
@@ -1281,6 +1318,7 @@ export declare class Action extends Base implements IAction {
1281
1318
  mode: "popup" | "large" | "small";
1282
1319
  disableTabStop: boolean;
1283
1320
  disableShrink: boolean;
1321
+ needSpace: boolean;
1284
1322
  cssClassesValue: any;
1285
1323
  get cssClasses(): any;
1286
1324
  get disabled(): boolean;
@@ -1550,6 +1588,24 @@ export declare class ExceedSizeError extends SurveyError {
1550
1588
  getErrorType(): string;
1551
1589
  getDefaultText(): string;
1552
1590
  }
1591
+ export declare class ExpressionExecutor implements IExpresionExecutor {
1592
+ static createExpressionExecutor: any;
1593
+ onComplete: any;
1594
+ expressionValue: string;
1595
+ operand: Operand;
1596
+ processValue: ProcessValue;
1597
+ parser: ConditionsParser;
1598
+ isAsyncValue: boolean;
1599
+ hasFunctionValue: boolean;
1600
+ asyncFuncList: any;
1601
+ get expression(): string;
1602
+ set expression(val: string);
1603
+ getVariables(): Array<any>;
1604
+ hasFunction(): boolean;
1605
+ get isAsync(): boolean;
1606
+ canRun(): boolean;
1607
+ run(values: any, properties?: any): any;
1608
+ }
1553
1609
  /*
1554
1610
  * Base class for HtmlConditionItem and UrlConditionItem classes.
1555
1611
  */
@@ -2536,7 +2592,7 @@ export declare class UploadingFileError extends SurveyError {
2536
2592
  protected getDefaultText(): string;
2537
2593
  }
2538
2594
  export declare class VerticalResponsivityManager extends ResponsivityManager {
2539
- constructor(container: any, model: any, itemsSelector: string, dotsItemSize?: number);
2595
+ constructor(container: any, model: any, itemsSelector: string, dotsItemSize?: number, minDimension?: number);
2540
2596
  protected getDimensions(): IDimensions;
2541
2597
  protected getAvailableSpace(): number;
2542
2598
  protected calcItemSize(item: any): number;
@@ -3984,6 +4040,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3984
4040
  get isLogoAfter(): boolean;
3985
4041
  get logoClassNames(): string;
3986
4042
  get renderedHasTitle(): boolean;
4043
+ get renderedHasDescription(): boolean;
3987
4044
  get hasTitle(): boolean;
3988
4045
  get renderedHasLogo(): boolean;
3989
4046
  get renderedHasHeader(): boolean;
@@ -4523,12 +4580,15 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4523
4580
  isCalculatingProgressText: boolean;
4524
4581
  updateProgressText(onValueChanged?: boolean): void;
4525
4582
  getProgressText(): string;
4583
+ getRootCss(): string;
4584
+ resizeObserver: any;
4526
4585
  afterRenderSurvey(htmlElement: any): void;
4527
4586
  updateQuestionCssClasses(question: IQuestion, cssClasses: any): void;
4528
4587
  updatePanelCssClasses(panel: IPanel, cssClasses: any): void;
4529
4588
  updatePageCssClasses(page: IPage, cssClasses: any): void;
4530
4589
  updateChoiceItemCss(question: IQuestion, options: any): void;
4531
4590
  isFirstPageRendering: boolean;
4591
+ isCurrentPageRendering: boolean;
4532
4592
  afterRenderPage(htmlElement: any): void;
4533
4593
  afterRenderHeader(htmlElement: any): void;
4534
4594
  afterRenderQuestion(question: IQuestion, htmlElement: any): void;
@@ -4742,17 +4802,25 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4742
4802
  processTextEx(text: string, returnDisplayValue: boolean, doEncoding: boolean): any;
4743
4803
  getSurveyMarkdownHtml(element: Base, text: string, name: string): string;
4744
4804
  /*
4745
- * Returns an amount of corrected quiz answers.
4805
+ * Deprecated. Use the getCorrectAnswerCount method instead.
4746
4806
  */
4747
4807
  getCorrectedAnswerCount(): number;
4748
4808
  /*
4809
+ * Returns an amount of corrected quiz answers.
4810
+ */
4811
+ getCorrectAnswerCount(): number;
4812
+ /*
4749
4813
  * Returns quiz question number. It may be different from `getQuizQuestions.length` because some widgets like matrix may have several questions.
4750
4814
  */
4751
4815
  getQuizQuestionCount(): number;
4752
4816
  /*
4753
- * Returns an amount of incorrect quiz answers.
4817
+ * Deprecated. Use the getInCorrectAnswerCount method instead.
4754
4818
  */
4755
4819
  getInCorrectedAnswerCount(): number;
4820
+ /*
4821
+ * Returns an amount of incorrect quiz answers.
4822
+ */
4823
+ getInCorrectAnswerCount(): number;
4756
4824
  getCorrectedAnswers(): number;
4757
4825
  getInCorrectedAnswers(): number;
4758
4826
  /*
@@ -4834,6 +4902,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4834
4902
  */
4835
4903
  focusQuestion(name: string): boolean;
4836
4904
  getElementWrapperComponentName(element: any, reason?: string): string;
4905
+ getQuestionContentWrapperComponentName(element: any): string;
4837
4906
  getRowWrapperComponentName(row: QuestionRowModel): string;
4838
4907
  getElementWrapperComponentData(element: any, reason?: string): any;
4839
4908
  getRowWrapperComponentData(row: QuestionRowModel): any;
@@ -4914,7 +4983,7 @@ export declare class Variable extends Const {
4914
4983
  export declare class DragDropRankingChoices extends DragDropChoices {
4915
4984
  constructor(surveyValue?: ISurvey, creator?: any);
4916
4985
  protected get draggedElementType(): string;
4917
- protected createDraggedElementShortcut(text: string, draggedElementNode: any): any;
4986
+ protected createDraggedElementShortcut(text: string, draggedElementNode: any, event: any): any;
4918
4987
  protected getDropTargetByDataAttributeValue(dataAttributeValue: string): ItemValue;
4919
4988
  isDragOverRootNode: boolean;
4920
4989
  protected findDropTargetNodeByDragOverNode(dragOverNode: any): any;
@@ -5719,6 +5788,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
5719
5788
  protected supportResponsiveness(): boolean;
5720
5789
  resizeObserver: any;
5721
5790
  protected getCompactRenderAs(): string;
5791
+ protected getDesktopRenderAs(): string;
5722
5792
  protected processResponsiveness(requiredWidth: number, availableWidth: number): void;
5723
5793
  dispose(): void;
5724
5794
  }
@@ -5815,6 +5885,7 @@ export declare class PageModel extends PanelModelBase implements IPage {
5815
5885
  get navigationDescription(): string;
5816
5886
  set navigationDescription(val: string);
5817
5887
  get locNavigationDescription(): LocalizableString;
5888
+ navigationLocStrChanged(): void;
5818
5889
  get passed(): boolean;
5819
5890
  set passed(val: boolean);
5820
5891
  delete(): void;
@@ -6735,6 +6806,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
6735
6806
  getPlainData(options?: any): any;
6736
6807
  updateElementCss(reNew?: boolean): void;
6737
6808
  get progressText(): string;
6809
+ get progress(): string;
6738
6810
  getRootCss(): string;
6739
6811
  getPanelWrapperCss(): string;
6740
6812
  getPanelRemoveButtonCss(): string;
@@ -6748,6 +6820,11 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
6748
6820
  set noEntriesText(val: string);
6749
6821
  get locNoEntriesText(): LocalizableString;
6750
6822
  getShowNoEntriesPlaceholder(): boolean;
6823
+ needResponsiveWidth(): boolean;
6824
+ footerToolbarValue: any;
6825
+ get footerToolbar(): any;
6826
+ legacyNavigation: boolean;
6827
+ updateFooterActionsCallback: any;
6751
6828
  }
6752
6829
  /*
6753
6830
  * A Model for a rating question.
@@ -6811,11 +6888,13 @@ export declare class QuestionRatingModel extends Question {
6811
6888
  * are displayed as plain non-clickable texts.
6812
6889
  */
6813
6890
  displayRateDescriptionsAsExtremeItems: boolean;
6891
+ useDropdown: "auto" | "always" | "never";
6814
6892
  protected valueToData(val: any): any;
6815
6893
  /*
6816
6894
  * Click value again to clear.
6817
6895
  */
6818
6896
  setValueFromClick(value: any): void;
6897
+ get ratingRootCss(): string;
6819
6898
  getItemClass(item: ItemValue): string;
6820
6899
  getControlClass(): string;
6821
6900
  get optionsCaption(): string;
@@ -6826,8 +6905,10 @@ export declare class QuestionRatingModel extends Question {
6826
6905
  set renderedValue(val: boolean);
6827
6906
  get visibleChoices(): any;
6828
6907
  get readOnlyText(): any;
6908
+ needResponsiveWidth(): boolean;
6829
6909
  protected supportResponsiveness(): boolean;
6830
6910
  protected getCompactRenderAs(): string;
6911
+ protected getDesktopRenderAs(): string;
6831
6912
  }
6832
6913
  /*
6833
6914
  * It is a base class for checkbox, dropdown and radiogroup questions.
@@ -6977,6 +7058,10 @@ export declare class QuestionSelectBase extends Question {
6977
7058
  set otherText(val: string);
6978
7059
  get locOtherText(): LocalizableString;
6979
7060
  /*
7061
+ * Use this property to show "Select All", "None" and "Other" choices in multi columns .
7062
+ */
7063
+ separateSpecialChoices: boolean;
7064
+ /*
6980
7065
  * Use this property to set the place holder text for other or comment field .
6981
7066
  */
6982
7067
  get otherPlaceHolder(): string;
@@ -7056,6 +7141,10 @@ export declare class QuestionSelectBase extends Question {
7056
7141
  protected getItemClassCore(item: any, options: any): string;
7057
7142
  getLabelClass(item: ItemValue): string;
7058
7143
  getControlLabelClass(item: ItemValue): string;
7144
+ get headItems(): any;
7145
+ get footItems(): any;
7146
+ get hasHeadItems(): boolean;
7147
+ get hasFootItems(): boolean;
7059
7148
  get columns(): any;
7060
7149
  get hasColumns(): boolean;
7061
7150
  choicesLoaded(): void;
@@ -7069,6 +7158,10 @@ export declare class QuestionSelectBase extends Question {
7069
7158
  getItemId(item: ItemValue): string;
7070
7159
  get questionName(): string;
7071
7160
  getItemEnabled(item: ItemValue): any;
7161
+ rootElement: any;
7162
+ afterRender(el: any): void;
7163
+ prevIsOtherSelected: boolean;
7164
+ protected onValueChanged(): void;
7072
7165
  }
7073
7166
  /*
7074
7167
  * A Model for signature pad question.
@@ -7402,6 +7495,7 @@ export declare class QuestionImageModel extends QuestionNonValue {
7402
7495
  * The rendered mode.
7403
7496
  */
7404
7497
  get renderedMode(): string;
7498
+ getImageCss(): string;
7405
7499
  protected calculateRenderedMode(): void;
7406
7500
  }
7407
7501
  /*
@@ -7674,6 +7768,7 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
7674
7768
  get cells(): MatrixCells;
7675
7769
  set cells(val: MatrixCells);
7676
7770
  get hasCellText(): boolean;
7771
+ protected updateHasCellText(): void;
7677
7772
  setCellText(row: any, column: any, val: string): void;
7678
7773
  getCellText(row: any, column: any): string;
7679
7774
  setDefaultCellText(column: any, val: string): void;
@@ -8645,6 +8740,8 @@ export declare var defaultStandardCss: {
8645
8740
  buttonRemove: string,
8646
8741
  buttonRemoveRight: string,
8647
8742
  buttonPrev: string,
8743
+ buttonPrevDisabled: string,
8744
+ buttonNextDisabled: string,
8648
8745
  buttonNext: string,
8649
8746
  progressContainer: string,
8650
8747
  progress: string,
@@ -8752,6 +8849,7 @@ export declare var surveyTimerFunctions: {
8752
8849
  setTimeout: any,
8753
8850
  clearTimeout: any,
8754
8851
  };
8852
+ export declare var keyFocusedClassName: any;
8755
8853
  export declare var matrixDropdownColumnTypes: {
8756
8854
  dropdown: {
8757
8855
  onCellQuestionUpdate: any,
@@ -8996,6 +9094,8 @@ export declare var defaultBootstrapCss: {
8996
9094
  buttonRemoveRight: string,
8997
9095
  buttonPrev: string,
8998
9096
  buttonNext: string,
9097
+ buttonPrevDisabled: string,
9098
+ buttonNextDisabled: string,
8999
9099
  progressContainer: string,
9000
9100
  progress: string,
9001
9101
  progressBar: string,
@@ -9319,6 +9419,8 @@ export declare var defaultBootstrapMaterialCss: {
9319
9419
  buttonRemoveRight: string,
9320
9420
  buttonPrev: string,
9321
9421
  buttonNext: string,
9422
+ buttonPrevDisabled: string,
9423
+ buttonNextDisabled: string,
9322
9424
  progressContainer: string,
9323
9425
  progress: string,
9324
9426
  progressBar: string,
@@ -9424,6 +9526,7 @@ export declare var defaultBootstrapMaterialCss: {
9424
9526
  };
9425
9527
  export declare var defaultV2Css: {
9426
9528
  root: string,
9529
+ rootMobile: string,
9427
9530
  container: string,
9428
9531
  header: string,
9429
9532
  body: string,
@@ -9436,6 +9539,7 @@ export declare var defaultV2Css: {
9436
9539
  headerText: string,
9437
9540
  navigationButton: string,
9438
9541
  completedPage: string,
9542
+ timerRoot: string,
9439
9543
  navigation: {
9440
9544
  complete: string,
9441
9545
  prev: string,
@@ -9473,9 +9577,9 @@ export declare var defaultV2Css: {
9473
9577
  button: string,
9474
9578
  buttonRemove: string,
9475
9579
  buttonAdd: string,
9476
- progressTop: string,
9477
- progressBottom: string,
9478
9580
  buttonPrev: string,
9581
+ buttonPrevDisabled: string,
9582
+ buttonNextDisabled: string,
9479
9583
  buttonNext: string,
9480
9584
  progressContainer: string,
9481
9585
  progress: string,
@@ -9554,6 +9658,7 @@ export declare var defaultV2Css: {
9554
9658
  mainRoot: string,
9555
9659
  root: string,
9556
9660
  image: string,
9661
+ adaptive: string,
9557
9662
  withFrame: string,
9558
9663
  },
9559
9664
  html: {
@@ -9758,6 +9863,7 @@ export declare var defaultV2Css: {
9758
9863
  rating: {
9759
9864
  rootDropdown: string,
9760
9865
  root: string,
9866
+ rootWrappable: string,
9761
9867
  item: string,
9762
9868
  itemOnError: string,
9763
9869
  itemHover: string,
@@ -9793,6 +9899,7 @@ export declare var defaultV2Css: {
9793
9899
  noFileChosen: string,
9794
9900
  chooseFile: string,
9795
9901
  chooseFileAsText: string,
9902
+ chooseFileAsTextDisabled: string,
9796
9903
  chooseFileAsIcon: string,
9797
9904
  chooseFileIconId: string,
9798
9905
  disabled: string,
@@ -9865,10 +9972,15 @@ export declare var defaultV2Css: {
9865
9972
  itemPressed: string,
9866
9973
  itemAsIcon: string,
9867
9974
  itemIcon: string,
9975
+ itemTitle: string,
9976
+ },
9977
+ variables: {
9978
+ mobileWidth: string,
9868
9979
  },
9869
9980
  };
9870
9981
  export declare var modernCss: {
9871
9982
  root: string,
9983
+ timerRoot: string,
9872
9984
  container: string,
9873
9985
  header: string,
9874
9986
  headerClose: string,
@@ -9917,6 +10029,8 @@ export declare var modernCss: {
9917
10029
  progressBottom: string,
9918
10030
  buttonPrev: string,
9919
10031
  buttonNext: string,
10032
+ buttonPrevDisabled: string,
10033
+ buttonNextDisabled: string,
9920
10034
  progressContainer: string,
9921
10035
  progress: string,
9922
10036
  progressBar: string,
@@ -10234,4 +10348,5 @@ export declare var modernCss: {
10234
10348
  },
10235
10349
  };
10236
10350
  export declare var SvgRegistry: SvgIconRegistry;
10237
- export declare var SvgBundleViewModel: any;
10351
+ export declare var SvgBundleViewModel: any;
10352
+ export declare var path: any;