survey-creator-core 1.9.5-beta.1 → 1.9.9-beta.1

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.
@@ -1,4 +1,4 @@
1
- /*Type definitions for SurveyJS Creator JavaScript library v1.9.5-beta.1
1
+ /*Type definitions for SurveyJS Creator JavaScript library v1.9.9-beta.1
2
2
  (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
3
3
  Github: https://github.com/surveyjs/survey-creator
4
4
  License: https://surveyjs.io/Licenses#SurveyCreator
@@ -45,9 +45,11 @@ import { ArrayChanges, Base } from "survey-core";
45
45
  import { Base, SurveyModel, EventBase, PageModel } from "survey-core";
46
46
  import { Action, Base, Event, SurveyModel } from "survey-core";
47
47
  import { SurveyModel, Base } from "survey-core";
48
- import { SurveyModel, QuestionPanelDynamicModel, ItemValue, PanelModel, Base, QuestionCommentModel } from "survey-core";
49
- import { SurveyModel, QuestionPanelDynamicModel, PanelModel } from "survey-core";
48
+ import { SurveyModel, Base, Question, SurveyElement } from "survey-core";
49
+ import { SurveyModel, QuestionPanelDynamicModel, ItemValue, PanelModel, Base, Question, QuestionCommentModel } from "survey-core";
50
+ import { SurveyModel, QuestionPanelDynamicModel, PanelModel, Question } from "survey-core";
50
51
  import { Base, AdaptiveActionContainer, Action, SurveyModel, SurveyElement } from "survey-core";
52
+ import { Base, ItemValue, PanelModel, QuestionDropdownModel, SurveyModel } from "survey-core";
51
53
 
52
54
 
53
55
  import "../components/property-panel/property-panel-item.scss";
@@ -61,28 +63,6 @@ import "../components/side-bar/side-bar.scss";
61
63
  import "../property-grid-theme/property-grid.scss";
62
64
  import "../utils/design.scss";
63
65
  import "../utils/layout.scss";
64
- import "../localization/arabic";
65
- import "../localization/danish";
66
- import "../localization/french";
67
- import "../localization/german";
68
- import "../localization/finnish";
69
- import "../localization/italian";
70
- import "../localization/indonesian";
71
- import "../localization/korean";
72
- import "../localization/persian";
73
- import "../localization/polish";
74
- import "../localization/portuguese";
75
- import "../localization/simplified-chinese";
76
- import "../localization/spanish";
77
- import "../localization/swedish";
78
- import "../localization/traditional-chinese";
79
- import "../localization/turkish";
80
- import "../localization/norwegian";
81
- import "../localization/hungarian";
82
- import "../localization/russian";
83
- import "../localization/tajik";
84
- import "../localization/dutch";
85
- import "../localization/croatian";
86
66
 
87
67
  export declare var enStrings: {
88
68
  survey: {
@@ -197,6 +177,7 @@ export declare var enStrings: {
197
177
  translationLanguages: string;
198
178
  translationAddLanguage: string;
199
179
  translationShowAllStrings: string;
180
+ translationShowUsedStringsOnly: string;
200
181
  translationShowAllPages: string;
201
182
  translationNoStrings: string;
202
183
  translationExportToSCVButton: string;
@@ -211,6 +192,7 @@ export declare var enStrings: {
211
192
  chooseElement: string;
212
193
  htmlPlaceHolder: string;
213
194
  panelPlaceHolder: string;
195
+ surveyPlaceHolder: string;
214
196
  addNewQuestion: string;
215
197
  addNewTypeQuestion: string;
216
198
  chooseLogoPlaceholder: string;
@@ -223,6 +205,9 @@ export declare var enStrings: {
223
205
  question_visibilityName: string;
224
206
  question_enableName: string;
225
207
  question_requireName: string;
208
+ column_visibilityName: string;
209
+ column_enableName: string;
210
+ column_requireName: string;
226
211
  trigger_completeName: string;
227
212
  trigger_setvalueName: string;
228
213
  trigger_copyvalueName: string;
@@ -249,6 +234,9 @@ export declare var enStrings: {
249
234
  question_visibilityText: string;
250
235
  question_enableText: string;
251
236
  question_requireText: string;
237
+ column_visibilityText: string;
238
+ column_enableText: string;
239
+ column_requireText: string;
252
240
  trigger_completeText: string;
253
241
  trigger_setvalueText: string;
254
242
  trigger_copyvalueText: string;
@@ -1025,6 +1013,7 @@ export declare var defaultStrings: {
1025
1013
  translationLanguages: string;
1026
1014
  translationAddLanguage: string;
1027
1015
  translationShowAllStrings: string;
1016
+ translationShowUsedStringsOnly: string;
1028
1017
  translationShowAllPages: string;
1029
1018
  translationNoStrings: string;
1030
1019
  translationExportToSCVButton: string;
@@ -1039,6 +1028,7 @@ export declare var defaultStrings: {
1039
1028
  chooseElement: string;
1040
1029
  htmlPlaceHolder: string;
1041
1030
  panelPlaceHolder: string;
1031
+ surveyPlaceHolder: string;
1042
1032
  addNewQuestion: string;
1043
1033
  addNewTypeQuestion: string;
1044
1034
  chooseLogoPlaceholder: string;
@@ -1051,6 +1041,9 @@ export declare var defaultStrings: {
1051
1041
  question_visibilityName: string;
1052
1042
  question_enableName: string;
1053
1043
  question_requireName: string;
1044
+ column_visibilityName: string;
1045
+ column_enableName: string;
1046
+ column_requireName: string;
1054
1047
  trigger_completeName: string;
1055
1048
  trigger_setvalueName: string;
1056
1049
  trigger_copyvalueName: string;
@@ -1077,6 +1070,9 @@ export declare var defaultStrings: {
1077
1070
  question_visibilityText: string;
1078
1071
  question_enableText: string;
1079
1072
  question_requireText: string;
1073
+ column_visibilityText: string;
1074
+ column_enableText: string;
1075
+ column_requireText: string;
1080
1076
  trigger_completeText: string;
1081
1077
  trigger_setvalueText: string;
1082
1078
  trigger_copyvalueText: string;
@@ -1727,9 +1723,13 @@ export declare enum QuestionConvertMode {
1727
1723
  CompatibleTypes = 1
1728
1724
  }
1729
1725
  export declare var settings: {
1730
- traslation: {
1726
+ translation: {
1731
1727
  sortByName: boolean;
1732
1728
  exportPrefix: string;
1729
+ /**
1730
+ * The maximum number of locales that user can select at once for translation
1731
+ */
1732
+ maximumSelectedLocales: number;
1733
1733
  };
1734
1734
  operators: {
1735
1735
  empty: any[];
@@ -1745,11 +1745,7 @@ export declare var settings: {
1745
1745
  greaterorequal: string[];
1746
1746
  lessorequal: string[];
1747
1747
  };
1748
- defaultNewSurveyJSON: {
1749
- pages: {
1750
- name: string;
1751
- }[];
1752
- };
1748
+ defaultNewSurveyJSON: {};
1753
1749
  logic: {
1754
1750
  visibleActions: any[];
1755
1751
  logicItemTitleMaxChars: number;
@@ -1759,7 +1755,6 @@ export declare var settings: {
1759
1755
  */
1760
1756
  questionConvertMode: QuestionConvertMode;
1761
1757
  propertyGrid: {
1762
- allowCollapse: boolean;
1763
1758
  useButtonGroup: boolean;
1764
1759
  maxCharsInButtonGroup: number;
1765
1760
  showNavigationButtons: boolean;
@@ -1793,6 +1788,7 @@ export declare var settings: {
1793
1788
  layout: {
1794
1789
  showTabs: boolean;
1795
1790
  showToolbar: boolean;
1791
+ allowCollapseSidebar: boolean;
1796
1792
  };
1797
1793
  jsonEditor: {
1798
1794
  indentation: number;
@@ -1905,7 +1901,7 @@ export declare class ToolbarActionContainer extends ActionContainer {
1905
1901
  constructor(creator: CreatorBase);
1906
1902
  protected getRenderedActions(): Array<Action>;
1907
1903
  }
1908
- export declare type toolBoxLocationType = "left" | "right" | "insideSideBar" | "hidden";
1904
+ export declare type toolboxLocationType = "left" | "right" | "sidebar";
1909
1905
  /**
1910
1906
  * Base class for Survey Creator.
1911
1907
  */
@@ -2343,13 +2339,26 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2343
2339
  */
2344
2340
  onUploadFile: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2345
2341
  /**
2346
- * Use this event to modify the list of the strings available in a translation tab.
2347
- * <br/> sender - the survey creator object that fires the event
2348
- * <br/> options.obj - the survey object which property translations are edited in the translation tab.
2349
- * <br/> options.propertyName - the name of the property.
2350
- * <br/> options.visible - a boolean value. You can change it to hide the property.
2342
+ * Use this event to modify the list of the strings available in the Translation tab.
2343
+ *
2344
+ * The event handler accepts the following arguments:
2345
+ *
2346
+ * - `sender` - A Survey Creator instance that raised the event.
2347
+ * - `options.obj` - A survey object instance (survey, page, panel, question) whose string translations are being edited in the Translation tab.
2348
+ * - `options.propertyName` - The name of a property being translated.
2349
+ * - `options.visible` - A Boolean value that specifies the property visibility. Set it to `false` to hide the property.
2351
2350
  */
2352
2351
  onTranslationStringVisibility: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2352
+ /**
2353
+ * Use this event to define is the locale initially selected (default value) and ready for translaion or it is unselected.
2354
+ *
2355
+ * The event handler accepts the following arguments:
2356
+ *
2357
+ * - `sender` - A Survey Creator instance that raised the event.
2358
+ * - `options.locale` - the locale name, like 'en', 'de' and so on.
2359
+ * - `options.isSelected` - it is true by default. Set it to false to make the translation unselected.
2360
+ */
2361
+ onTranslationLocaleInitiallySelected: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2353
2362
  /**
2354
2363
  * This callback is used internally for providing survey JSON text.
2355
2364
  */
@@ -2484,19 +2493,22 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2484
2493
  * @param viewName name of new active view (tab). The following values are available: "designer", "editor", "test", "embed", "logic" and "translation".
2485
2494
  */
2486
2495
  makeNewViewActive(viewName: string): boolean;
2487
- static defaultNewSurveyText: string;
2488
2496
  toolbox: QuestionToolbox;
2489
2497
  get toolboxCategories(): Array<any>;
2490
- sideBar: SideBarModel;
2498
+ sidebar: SidebarModel;
2491
2499
  constructor(options: ICreatorOptions, options2?: ICreatorOptions);
2492
2500
  updateToolboxIsCompact(newVal?: boolean): void;
2493
2501
  onSurveyElementPropertyValueChanged(property: Survey.JsonObjectProperty, obj: any, newValue: any): void;
2494
- get showToolbox(): "left" | "right" | "top" | "none" | boolean;
2495
- set showToolbox(val: "left" | "right" | "top" | "none" | boolean);
2496
- onShowPropertyGridVisiblityChanged: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2502
+ showToolboxValue: boolean;
2503
+ get showToolbox(): boolean;
2504
+ set showToolbox(val: boolean);
2505
+ onShowSidebarVisiblityChanged: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2497
2506
  /**
2498
2507
  * Set this this property grid false to hide the property grid.
2499
2508
  */
2509
+ get showSidebar(): boolean;
2510
+ set showSidebar(val: boolean);
2511
+ onShowPropertyGridVisiblityChanged: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2500
2512
  get showPropertyGrid(): boolean;
2501
2513
  set showPropertyGrid(val: boolean);
2502
2514
  rightContainerActiveItem(name: string): void;
@@ -2531,6 +2543,10 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2531
2543
  * This method stops undo/redo transaction.
2532
2544
  */
2533
2545
  stopUndoRedoTransaction(): void;
2546
+ /**
2547
+ * Returns true if Creator is currently doing undo or redo opertaions
2548
+ */
2549
+ get isProcessingUndoRedo(): boolean;
2534
2550
  /**
2535
2551
  * This method performs undo uperation if possible.
2536
2552
  */
@@ -2783,9 +2799,10 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2783
2799
  showPageNavigator: any;
2784
2800
  showTabs: any;
2785
2801
  showToolbar: any;
2802
+ allowCollapseSidebar: any;
2786
2803
  isMobileView: any;
2787
- toolboxLocation: toolBoxLocationType;
2788
- sideBarLocation: "left" | "right";
2804
+ toolboxLocation: toolboxLocationType;
2805
+ sidebarLocation: "left" | "right";
2789
2806
  selectFromStringEditor: boolean;
2790
2807
  }
2791
2808
  export declare class StylesManager {
@@ -2929,6 +2946,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2929
2946
  baseClass: string;
2930
2947
  propertyName: string;
2931
2948
  showIf: (survey: SurveyModel) => boolean;
2949
+ getSelectorChoices(survey: SurveyModel, context: Question): import("survey-core").SurveyElement[];
2932
2950
  showInUI?: undefined;
2933
2951
  isUniqueItem?: undefined;
2934
2952
  isInvisible?: undefined;
@@ -2936,7 +2954,21 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2936
2954
  dependedOnPropertyName?: undefined;
2937
2955
  questionNames?: undefined;
2938
2956
  getDisplayText?: undefined;
2939
- getDisplayTextName?: undefined;
2957
+ getElementName?: undefined;
2958
+ getCollection?: undefined;
2959
+ } | {
2960
+ name: string;
2961
+ baseClass: string;
2962
+ propertyName: string;
2963
+ showIf?: undefined;
2964
+ showInUI?: undefined;
2965
+ isUniqueItem?: undefined;
2966
+ isInvisible?: undefined;
2967
+ dynamicPropertyName?: undefined;
2968
+ dependedOnPropertyName?: undefined;
2969
+ questionNames?: undefined;
2970
+ getDisplayText?: undefined;
2971
+ getElementName?: undefined;
2940
2972
  getCollection?: undefined;
2941
2973
  } | {
2942
2974
  name: string;
@@ -2950,7 +2982,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2950
2982
  dependedOnPropertyName?: undefined;
2951
2983
  questionNames?: undefined;
2952
2984
  getDisplayText?: undefined;
2953
- getDisplayTextName?: undefined;
2985
+ getElementName?: undefined;
2954
2986
  getCollection?: undefined;
2955
2987
  } | {
2956
2988
  name: string;
@@ -2964,7 +2996,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2964
2996
  dependedOnPropertyName?: undefined;
2965
2997
  questionNames?: undefined;
2966
2998
  getDisplayText?: undefined;
2967
- getDisplayTextName?: undefined;
2999
+ getElementName?: undefined;
2968
3000
  getCollection?: undefined;
2969
3001
  } | {
2970
3002
  name: string;
@@ -2978,7 +3010,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2978
3010
  showInUI?: undefined;
2979
3011
  isUniqueItem?: undefined;
2980
3012
  isInvisible?: undefined;
2981
- getDisplayTextName?: undefined;
3013
+ getElementName?: undefined;
2982
3014
  getCollection?: undefined;
2983
3015
  } | {
2984
3016
  name: string;
@@ -2992,7 +3024,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2992
3024
  isInvisible?: undefined;
2993
3025
  dynamicPropertyName?: undefined;
2994
3026
  dependedOnPropertyName?: undefined;
2995
- getDisplayTextName?: undefined;
3027
+ getElementName?: undefined;
2996
3028
  getCollection?: undefined;
2997
3029
  } | {
2998
3030
  name: string;
@@ -3000,7 +3032,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
3000
3032
  propertyName: string;
3001
3033
  questionNames: string[];
3002
3034
  isUniqueItem: boolean;
3003
- getDisplayTextName: (element: Base) => string;
3035
+ getElementName: (element: Base) => string;
3004
3036
  showIf?: undefined;
3005
3037
  showInUI?: undefined;
3006
3038
  isInvisible?: undefined;
@@ -3021,7 +3053,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
3021
3053
  dependedOnPropertyName?: undefined;
3022
3054
  questionNames?: undefined;
3023
3055
  getDisplayText?: undefined;
3024
- getDisplayTextName?: undefined;
3056
+ getElementName?: undefined;
3025
3057
  })[];
3026
3058
  invisibleItems: Array<SurveyLogicItem>;
3027
3059
  onChangedCallback: (item: SurveyLogicItem, changeType: string) => void;
@@ -3080,6 +3112,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
3080
3112
  protected hasErrorInUI(): boolean;
3081
3113
  protected getExpressionText(): string;
3082
3114
  protected getEditingActions(): Array<SurveyLogicAction>;
3115
+ protected onReadOnlyChanged(): void;
3083
3116
  addNew(): void;
3084
3117
  editItem(item: SurveyLogicItem): void;
3085
3118
  protected onStartEditing(): void;
@@ -3186,6 +3219,7 @@ export declare class Translation extends Base implements ITranslationLocales {
3186
3219
  availableTranlationsChangedCallback: () => void;
3187
3220
  tranlationChangedCallback: (locale: string, name: string, value: string, context: any) => void;
3188
3221
  translationStringVisibilityCallback: (obj: Base, propertyName: string, visible: boolean) => boolean;
3222
+ localeInitialVisibleCallback: (locale: string) => boolean;
3189
3223
  chooseLanguageActions: Array<IAction>;
3190
3224
  constructor(survey: SurveyModel, options?: ISurveyCreatorOptions, hasUI?: boolean);
3191
3225
  getType(): string;
@@ -3538,6 +3572,7 @@ export declare class TabTranslationPlugin implements ICreatorPlugin {
3538
3572
  deactivate(): boolean;
3539
3573
  get selectLanguageOptionsCaption(): any;
3540
3574
  get showAllStringsText(): string;
3575
+ get showUsedStringsOnlyText(): string;
3541
3576
  get showAllPagesText(): string;
3542
3577
  get exportToCSVText(): string;
3543
3578
  get importFromCSVText(): string;
@@ -3545,15 +3580,18 @@ export declare class TabTranslationPlugin implements ICreatorPlugin {
3545
3580
  }
3546
3581
 
3547
3582
  import "./designer.scss";
3583
+ export declare const initialSettingsAllowShowEmptyTitleInDesignMode: boolean;
3548
3584
  export declare class TabDesignerViewModel<T extends SurveyModel> extends Base {
3549
3585
  newPage: PageModel;
3550
3586
  showNewPage: boolean;
3551
3587
  pageCount: number;
3552
3588
  withModifier: string;
3589
+ showPlaceholder: boolean;
3553
3590
  creator: CreatorBase<T>;
3554
3591
  constructor(creator: CreatorBase<T>);
3555
3592
  get survey(): T;
3556
3593
  get isToolboxVisible(): boolean;
3594
+ get placeholderText(): string;
3557
3595
  initSurvey(): void;
3558
3596
  dispose(): void;
3559
3597
  clickDesigner(): void;
@@ -3590,6 +3628,7 @@ export declare class SurveyLogicUI extends SurveyLogic {
3590
3628
  addNewUI(): void;
3591
3629
  toggleExpressionEditorIsFastEntry(): void;
3592
3630
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
3631
+ protected onReadOnlyChanged(): void;
3593
3632
  get expressionEditor(): ConditionEditor;
3594
3633
  get itemEditor(): LogicItemEditor;
3595
3634
  getExpressionEditor(item: SurveyLogicItem): ConditionEditor;
@@ -3977,6 +4016,7 @@ export declare class PageViewModel<T extends SurveyModel> extends ActionContaine
3977
4016
  select(model: PageViewModel<T>, event: IPortableMouseEvent): void;
3978
4017
  get css(): string;
3979
4018
  hover(event: MouseEvent, element: HTMLElement): void;
4019
+ hoverStopper(event: MouseEvent, element: HTMLElement): void;
3980
4020
  protected duplicate(): void;
3981
4021
  get allowEdit(): boolean;
3982
4022
  get addNewQuestionText(): string;
@@ -4305,8 +4345,9 @@ export declare var simulatorDevices: {
4305
4345
  import "./results.scss";
4306
4346
  export declare class SurveyResultsItemModel extends Base {
4307
4347
  collapsed: boolean;
4348
+ lvl: number;
4308
4349
  items: Array<any>;
4309
- constructor(_data: any);
4350
+ constructor(_data: any, _lvl: number);
4310
4351
  get data(): Array<any>;
4311
4352
  toggle: () => void;
4312
4353
  get isNode(): boolean;
@@ -4315,6 +4356,8 @@ export declare class SurveyResultsItemModel extends Base {
4315
4356
  get value(): any;
4316
4357
  get displayValue(): string;
4317
4358
  getString(data: any): string;
4359
+ get markerMargin(): string;
4360
+ get textMargin(): string;
4318
4361
  }
4319
4362
  export declare class SurveyResultsModel extends Base {
4320
4363
  constructor(survey: Survey.SurveyModel);
@@ -4327,8 +4370,10 @@ export declare class SurveyResultsModel extends Base {
4327
4370
  get resultsName(): any;
4328
4371
  get resultsValue(): any;
4329
4372
  get resultsDisplayValue(): any;
4330
- selectTableClick(model: SurveyResultsModel): void;
4331
- selectJsonClick(model: SurveyResultsModel): void;
4373
+ get isTableSelected(): boolean;
4374
+ get isJsonSelected(): boolean;
4375
+ selectTableClick: () => void;
4376
+ selectJsonClick: () => void;
4332
4377
  }
4333
4378
 
4334
4379
  import "./logo-image.scss";
@@ -4344,6 +4389,7 @@ export declare class LogoImageViewModel extends Base {
4344
4389
 
4345
4390
  export declare class StringEditorViewModelBase extends Base {
4346
4391
  errorText: string;
4392
+ focused: boolean;
4347
4393
  constructor(locString: LocalizableString, creator: CreatorBase);
4348
4394
  setLocString(locString: LocalizableString): void;
4349
4395
  checkConstraints(event: any): void;
@@ -4355,6 +4401,7 @@ export declare class StringEditorViewModelBase extends Base {
4355
4401
  onKeyDown(event: KeyboardEvent): boolean;
4356
4402
  findProperty(): JsonObjectProperty;
4357
4403
  get maxLength(): number;
4404
+ placeholderValue: string;
4358
4405
  get placeholder(): string;
4359
4406
  get contentEditable(): boolean;
4360
4407
  className(text: any): string;
@@ -4414,7 +4461,7 @@ export interface IPropertyGridEditor {
4414
4461
  fit(prop: JsonObjectProperty, context?: string): boolean;
4415
4462
  isDefault?: () => boolean;
4416
4463
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
4417
- showModalPropertyEditor(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): any;
4464
+ showModalPropertyEditor?: (editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => any;
4418
4465
  onCreated?: (obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions) => void;
4419
4466
  onAfterRenderQuestion?: (obj: Base, prop: JsonObjectProperty, evtOptions: any) => void;
4420
4467
  createPropertyEditorSetup?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => IPropertyEditorSetup;
@@ -4603,7 +4650,6 @@ export declare abstract class PropertyGridEditorMatrix extends PropertyGridEdito
4603
4650
  export declare class PropertyGridEditorMatrixItemValues extends PropertyGridEditorMatrix {
4604
4651
  fit(prop: JsonObjectProperty): boolean;
4605
4652
  isPropertyEditorSetupEnabled(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): boolean;
4606
- setupMatrixQuestion(obj: Base, matrix: QuestionMatrixDynamicModel, prop: JsonObjectProperty): void;
4607
4653
  protected getAllowRowDragDrop(): boolean;
4608
4654
  createPropertyEditorSetup(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): IPropertyEditorSetup;
4609
4655
  canClearPropertyValue(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): boolean;
@@ -4682,7 +4728,7 @@ export declare class PropertyGridEditorBindings extends PropertyGridEditor {
4682
4728
  fit(prop: JsonObjectProperty): boolean;
4683
4729
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
4684
4730
  onMatrixCellCreated(obj: Base, options: any): void;
4685
- onMatrixCellValueChanged(obj: Base, options: any): void;
4731
+ onCreated(obj: Base, question: Question, prop: JsonObjectProperty): void;
4686
4732
  }
4687
4733
 
4688
4734
  export declare class PropertyGridViewModel<T extends SurveyModel> extends Base {
@@ -4875,7 +4921,6 @@ export declare var propertyGridCss: {
4875
4921
  itemSvgIconId: string;
4876
4922
  labelChecked: string;
4877
4923
  itemControl: string;
4878
- itemDecorator: string;
4879
4924
  controlLabel: string;
4880
4925
  materialDecorator: string;
4881
4926
  other: string;
@@ -4909,7 +4954,6 @@ export declare var propertyGridCss: {
4909
4954
  svgIconId: string;
4910
4955
  label: string;
4911
4956
  disabledLabel: string;
4912
- itemDecorator: string;
4913
4957
  materialDecorator: string;
4914
4958
  };
4915
4959
  text: {
@@ -5148,7 +5192,7 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
5148
5192
  canCollapseCategories: boolean;
5149
5193
  isCompact: boolean;
5150
5194
  constructor(supportedQuestions?: Array<string>, creator?: CreatorBase<SurveyModel>);
5151
- setLocation(toolboxLocation: toolBoxLocationType): void;
5195
+ setLocation(toolboxLocation: toolboxLocationType): void;
5152
5196
  /**
5153
5197
  * The Array of Toolbox items as Text JSON.
5154
5198
  */
@@ -5258,36 +5302,38 @@ export declare class QuestionToolbox extends AdaptiveActionContainer<QuestionToo
5258
5302
  dispose(): void;
5259
5303
  }
5260
5304
 
5261
- export declare class SideBarModel extends Base {
5305
+ export declare class SidebarModel extends Base {
5262
5306
  toolbar: AdaptiveActionContainer;
5263
- tabs: Array<SideBarTabModel>;
5307
+ tabs: Array<SidebarTabModel>;
5264
5308
  headerText: string;
5265
5309
  visible: boolean;
5310
+ collapsedManually: boolean;
5311
+ expandedManually: boolean;
5266
5312
  hasVisibleTabs: boolean;
5267
5313
  flyoutMode: boolean;
5268
5314
  activeTab: string;
5269
5315
  get flyoutPanelMode(): boolean;
5270
5316
  get closeText(): string;
5271
- getTabById(id: string): SideBarTabModel;
5317
+ getTabById(id: string): SidebarTabModel;
5272
5318
  constructor(creator: CreatorBase, collapseAction?: () => void, expandAction?: () => void);
5273
5319
  getExpandAction(): Action;
5274
- collapseSideBar(): void;
5275
- expandSideBar(): void;
5276
- addTab(id: string, componentName?: string, model?: any, buildActions?: () => Array<Action>): SideBarTabModel;
5320
+ collapseSidebar(): void;
5321
+ expandSidebar(): void;
5322
+ addTab(id: string, componentName?: string, model?: any, buildActions?: () => Array<Action>): SidebarTabModel;
5277
5323
  updateHasVisibleTabs(): void;
5278
5324
  dispose(): void;
5279
5325
  initResizeManager(container: HTMLDivElement): void;
5280
5326
  resetResizeManager(): void;
5281
5327
  }
5282
5328
 
5283
- export declare class SideBarTabModel extends Base {
5329
+ export declare class SidebarTabModel extends Base {
5284
5330
  id: string;
5285
- sidePanel: SideBarModel;
5331
+ sidePanel: SidebarModel;
5286
5332
  caption: string;
5287
5333
  visible: boolean;
5288
5334
  model: any;
5289
5335
  componentName: string;
5290
- constructor(id: string, sidePanel: SideBarModel, componentName?: string, model?: any);
5336
+ constructor(id: string, sidePanel: SidebarModel, componentName?: string, model?: any);
5291
5337
  }
5292
5338
 
5293
5339
  export interface IPortableMouseEvent {
@@ -5373,6 +5419,10 @@ export declare class SurveyHelper {
5373
5419
  static convertItemValuesToText(items: ItemValue[]): string;
5374
5420
  static convertTextToItemValues(text: string, properties: JsonObjectProperty[], className: string): ItemValue[];
5375
5421
  static sortItems(items: Array<any>, propertyName?: string): void;
5422
+ static getQuestionContextIndexInfo(name: string, prefix?: string): {
5423
+ index: number;
5424
+ name: string;
5425
+ };
5376
5426
  }
5377
5427
 
5378
5428
  import "./notifier.scss";
@@ -5417,6 +5467,7 @@ export declare class UndoRedoManager {
5417
5467
  canUndoRedoCallback(): void;
5418
5468
  startTransaction(name: string): void;
5419
5469
  stopTransaction(): void;
5470
+ get isProcessingUndoRedo(): boolean;
5420
5471
  canUndo(): boolean;
5421
5472
  undo(): void;
5422
5473
  canRedo(): boolean;
@@ -5525,6 +5576,7 @@ export declare class SurveyLogicAction {
5525
5576
  constructor(logicType: SurveyLogicType, element: Base, survey: SurveyModel);
5526
5577
  get logicType(): SurveyLogicType;
5527
5578
  get element(): Base;
5579
+ get parentElement(): Base;
5528
5580
  get survey(): SurveyModel;
5529
5581
  apply(expression: string, isRenaming?: boolean): void;
5530
5582
  renameQuestion(oldName: string, newName: string): void;
@@ -5539,6 +5591,7 @@ export declare class SurveyLogicAction {
5539
5591
  isSuitableByQuestionName(questionName: string): boolean;
5540
5592
  isSuitableByLogicType(logicTypeName: string): boolean;
5541
5593
  addQuestionNames(names: string[]): void;
5594
+ get elementName(): string;
5542
5595
  }
5543
5596
  export interface ISurveyLogicItemOwner {
5544
5597
  survey: SurveyModel;
@@ -5572,6 +5625,7 @@ export declare class SurveyLogicItem {
5572
5625
  removeQuestion(name: string): void;
5573
5626
  getQuestionNames(): string[];
5574
5627
  getActionTypes(): string[];
5628
+ getContext(): Base;
5575
5629
  get editText(): string;
5576
5630
  get deleteText(): string;
5577
5631
  get ifText(): string;
@@ -5592,7 +5646,10 @@ export interface ISurveyLogicType {
5592
5646
  isUniqueItem?: boolean;
5593
5647
  questionNames?: Array<string>;
5594
5648
  getDisplayText?: (element: Base, formatStr: string, lt: SurveyLogicType) => string;
5595
- getDisplayTextName?: (element: Base) => string;
5649
+ getElementName?: (element: Base) => string;
5650
+ getSelectorChoices?: (survey: SurveyModel, context: Question) => Array<SurveyElement>;
5651
+ supportContext?: (question: Base) => boolean;
5652
+ getParentElement?(element: Base): Base;
5596
5653
  }
5597
5654
  export declare class SurveyLogicType {
5598
5655
  survey: SurveyModel;
@@ -5616,16 +5673,39 @@ export declare class SurveyLogicType {
5616
5673
  get questionNames(): Array<string>;
5617
5674
  get displayName(): string;
5618
5675
  get description(): string;
5676
+ getParentElement(element: Base): Base;
5677
+ get hasSelectorChoices(): boolean;
5678
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5619
5679
  getDisplayText(element: Base): string;
5620
5680
  formatElName(name: string): string;
5621
5681
  formatExpression(expression: string): string;
5682
+ supportContext(context: Base): boolean;
5622
5683
  }
5623
5684
  export declare class SurveyLogicTypes {
5685
+ static baseTypes: {
5686
+ panel: {
5687
+ showIf: (survey: SurveyModel) => boolean;
5688
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5689
+ };
5690
+ question: {
5691
+ showIf: (survey: SurveyModel) => boolean;
5692
+ supportContext(context: Base): boolean;
5693
+ getParentElement(element: Base): Base;
5694
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5695
+ };
5696
+ matrixdropdowncolumn: {
5697
+ showIf: (survey: SurveyModel) => boolean;
5698
+ supportContext(context: Base): boolean;
5699
+ getParentElement(element: Base): Base;
5700
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5701
+ };
5702
+ };
5624
5703
  static types: ({
5625
5704
  name: string;
5626
5705
  baseClass: string;
5627
5706
  propertyName: string;
5628
5707
  showIf: (survey: SurveyModel) => boolean;
5708
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5629
5709
  showInUI?: undefined;
5630
5710
  isUniqueItem?: undefined;
5631
5711
  isInvisible?: undefined;
@@ -5633,7 +5713,21 @@ export declare class SurveyLogicTypes {
5633
5713
  dependedOnPropertyName?: undefined;
5634
5714
  questionNames?: undefined;
5635
5715
  getDisplayText?: undefined;
5636
- getDisplayTextName?: undefined;
5716
+ getElementName?: undefined;
5717
+ getCollection?: undefined;
5718
+ } | {
5719
+ name: string;
5720
+ baseClass: string;
5721
+ propertyName: string;
5722
+ showIf?: undefined;
5723
+ showInUI?: undefined;
5724
+ isUniqueItem?: undefined;
5725
+ isInvisible?: undefined;
5726
+ dynamicPropertyName?: undefined;
5727
+ dependedOnPropertyName?: undefined;
5728
+ questionNames?: undefined;
5729
+ getDisplayText?: undefined;
5730
+ getElementName?: undefined;
5637
5731
  getCollection?: undefined;
5638
5732
  } | {
5639
5733
  name: string;
@@ -5647,7 +5741,7 @@ export declare class SurveyLogicTypes {
5647
5741
  dependedOnPropertyName?: undefined;
5648
5742
  questionNames?: undefined;
5649
5743
  getDisplayText?: undefined;
5650
- getDisplayTextName?: undefined;
5744
+ getElementName?: undefined;
5651
5745
  getCollection?: undefined;
5652
5746
  } | {
5653
5747
  name: string;
@@ -5661,7 +5755,7 @@ export declare class SurveyLogicTypes {
5661
5755
  dependedOnPropertyName?: undefined;
5662
5756
  questionNames?: undefined;
5663
5757
  getDisplayText?: undefined;
5664
- getDisplayTextName?: undefined;
5758
+ getElementName?: undefined;
5665
5759
  getCollection?: undefined;
5666
5760
  } | {
5667
5761
  name: string;
@@ -5675,7 +5769,7 @@ export declare class SurveyLogicTypes {
5675
5769
  showInUI?: undefined;
5676
5770
  isUniqueItem?: undefined;
5677
5771
  isInvisible?: undefined;
5678
- getDisplayTextName?: undefined;
5772
+ getElementName?: undefined;
5679
5773
  getCollection?: undefined;
5680
5774
  } | {
5681
5775
  name: string;
@@ -5689,7 +5783,7 @@ export declare class SurveyLogicTypes {
5689
5783
  isInvisible?: undefined;
5690
5784
  dynamicPropertyName?: undefined;
5691
5785
  dependedOnPropertyName?: undefined;
5692
- getDisplayTextName?: undefined;
5786
+ getElementName?: undefined;
5693
5787
  getCollection?: undefined;
5694
5788
  } | {
5695
5789
  name: string;
@@ -5697,7 +5791,7 @@ export declare class SurveyLogicTypes {
5697
5791
  propertyName: string;
5698
5792
  questionNames: string[];
5699
5793
  isUniqueItem: boolean;
5700
- getDisplayTextName: (element: Base) => string;
5794
+ getElementName: (element: Base) => string;
5701
5795
  showIf?: undefined;
5702
5796
  showInUI?: undefined;
5703
5797
  isInvisible?: undefined;
@@ -5718,7 +5812,7 @@ export declare class SurveyLogicTypes {
5718
5812
  dependedOnPropertyName?: undefined;
5719
5813
  questionNames?: undefined;
5720
5814
  getDisplayText?: undefined;
5721
- getDisplayTextName?: undefined;
5815
+ getElementName?: undefined;
5722
5816
  })[];
5723
5817
  }
5724
5818
 
@@ -5745,6 +5839,7 @@ export declare class ConditionEditor extends PropertyEditorSetupValue {
5745
5839
  static canParseExpression(text: string): boolean;
5746
5840
  static canBuildExpression(text: string): boolean;
5747
5841
  allConditionQuestions: Array<ItemValue>;
5842
+ onContextChanged: (context: Question) => void;
5748
5843
  constructor(survey: SurveyModel, object?: Base, options?: ISurveyCreatorOptions, propertyName?: string);
5749
5844
  get title(): string;
5750
5845
  set title(val: string);
@@ -5755,6 +5850,8 @@ export declare class ConditionEditor extends PropertyEditorSetupValue {
5755
5850
  get text(): string;
5756
5851
  set text(val: string);
5757
5852
  isModified(prevText: string): boolean;
5853
+ get context(): Question;
5854
+ set context(val: Question);
5758
5855
  get survey(): SurveyModel;
5759
5856
  get object(): Base;
5760
5857
  get panel(): QuestionPanelDynamicModel;
@@ -5774,8 +5871,10 @@ export declare class LogicItemEditor extends PropertyEditorSetupValue {
5774
5871
  get isModified(): boolean;
5775
5872
  get panel(): QuestionPanelDynamicModel;
5776
5873
  get panels(): Array<PanelModel>;
5777
- getPanelByAction(action: SurveyLogicAction): PanelModel;
5778
- getActionByPanel(panel: PanelModel): SurveyLogicAction;
5874
+ getActionModelByPanel(panel: PanelModel): LogicActionModelBase;
5875
+ setActionModelByPanel(panel: PanelModel, actionModel: LogicActionModelBase): void;
5876
+ get context(): Question;
5877
+ set context(val: Question);
5779
5878
  protected getSurveyJSON(): any;
5780
5879
  protected getSurveyCreationReason(): string;
5781
5880
  resetModified(): void;
@@ -5823,7 +5922,7 @@ export interface IPropertyGridEditor {
5823
5922
  fit(prop: JsonObjectProperty, context?: string): boolean;
5824
5923
  isDefault?: () => boolean;
5825
5924
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
5826
- showModalPropertyEditor(editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): any;
5925
+ showModalPropertyEditor?: (editor: IPropertyGridEditor, property: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => any;
5827
5926
  onCreated?: (obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions) => void;
5828
5927
  onAfterRenderQuestion?: (obj: Base, prop: JsonObjectProperty, evtOptions: any) => void;
5829
5928
  createPropertyEditorSetup?: (obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions) => IPropertyEditorSetup;
@@ -5968,3 +6067,37 @@ export declare class PropertyGridEditorQuestionValue extends PropertyGridEditorQ
5968
6067
  protected getItemValue(question: Question): any;
5969
6068
  }
5970
6069
 
6070
+ export declare class LogicActionModelBase {
6071
+ protected panel: PanelModel;
6072
+ initialLogicAction: SurveyLogicAction;
6073
+ logicType: SurveyLogicType;
6074
+ isTrigger: boolean;
6075
+ currentLogicAction: SurveyLogicAction;
6076
+ static createActionModel(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType, selectorElementsHash: any): LogicActionModelBase;
6077
+ constructor(panel: PanelModel, initialLogicAction: SurveyLogicAction, logicType: SurveyLogicType);
6078
+ updateCurrentLogicAction(survey: SurveyModel): boolean;
6079
+ afterUpdateInitialLogicAction(): void;
6080
+ resetElements(): void;
6081
+ getSelectedElement(): string;
6082
+ updateInitialLogicAction(): void;
6083
+ setInitialElementValue(question: QuestionDropdownModel, action: SurveyLogicAction, selectedQuestion: string): void;
6084
+ }
6085
+ export declare class LogicActionModel extends LogicActionModelBase {
6086
+ constructor(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType, selectorElementsHash: any);
6087
+ updateCurrentLogicAction(survey: SurveyModel): boolean;
6088
+ resetElements(): void;
6089
+ updatePanelElements(selectedElement: string, choices: Array<ItemValue>): void;
6090
+ getSelectedElement(): string;
6091
+ }
6092
+ export declare class LogicActionTriggerModel extends LogicActionModelBase {
6093
+ isTrigger: boolean;
6094
+ constructor(panel: PanelModel, logicAction: SurveyLogicAction, logicType: SurveyLogicType);
6095
+ afterUpdateInitialLogicAction(): void;
6096
+ updateCurrentLogicAction(survey: SurveyModel): boolean;
6097
+ updatePanel(propertyName: string, newValue: any, options: ISurveyCreatorOptions, survey: SurveyModel): void;
6098
+ setPanelObj(obj: Base): void;
6099
+ resetElements(): void;
6100
+ updatePanelElements(selectedElement: string, options?: ISurveyCreatorOptions): void;
6101
+ getSelectedElement(): string;
6102
+ }
6103
+