survey-creator-core 1.9.5-beta.1 → 1.9.6-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.6-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,8 +45,9 @@ 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";
51
52
 
52
53
 
@@ -223,6 +224,9 @@ export declare var enStrings: {
223
224
  question_visibilityName: string;
224
225
  question_enableName: string;
225
226
  question_requireName: string;
227
+ column_visibilityName: string;
228
+ column_enableName: string;
229
+ column_requireName: string;
226
230
  trigger_completeName: string;
227
231
  trigger_setvalueName: string;
228
232
  trigger_copyvalueName: string;
@@ -249,6 +253,9 @@ export declare var enStrings: {
249
253
  question_visibilityText: string;
250
254
  question_enableText: string;
251
255
  question_requireText: string;
256
+ column_visibilityText: string;
257
+ column_enableText: string;
258
+ column_requireText: string;
252
259
  trigger_completeText: string;
253
260
  trigger_setvalueText: string;
254
261
  trigger_copyvalueText: string;
@@ -1051,6 +1058,9 @@ export declare var defaultStrings: {
1051
1058
  question_visibilityName: string;
1052
1059
  question_enableName: string;
1053
1060
  question_requireName: string;
1061
+ column_visibilityName: string;
1062
+ column_enableName: string;
1063
+ column_requireName: string;
1054
1064
  trigger_completeName: string;
1055
1065
  trigger_setvalueName: string;
1056
1066
  trigger_copyvalueName: string;
@@ -1077,6 +1087,9 @@ export declare var defaultStrings: {
1077
1087
  question_visibilityText: string;
1078
1088
  question_enableText: string;
1079
1089
  question_requireText: string;
1090
+ column_visibilityText: string;
1091
+ column_enableText: string;
1092
+ column_requireText: string;
1080
1093
  trigger_completeText: string;
1081
1094
  trigger_setvalueText: string;
1082
1095
  trigger_copyvalueText: string;
@@ -2343,11 +2356,14 @@ export declare class CreatorBase<T extends SurveyModel = SurveyModel> extends Su
2343
2356
  */
2344
2357
  onUploadFile: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2345
2358
  /**
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.
2359
+ * Use this event to modify the list of the strings available in the Translation tab.
2360
+ *
2361
+ * The event handler accepts the following arguments:
2362
+ *
2363
+ * - `sender` - A Survey Creator instance that raised the event.
2364
+ * - `options.obj` - A survey object instance (survey, page, panel, question) whose string translations are being edited in the Translation tab.
2365
+ * - `options.propertyName` - The name of a property being translated.
2366
+ * - `options.visible` - A Boolean value that specifies the property visibility. Set it to `false` to hide the property.
2351
2367
  */
2352
2368
  onTranslationStringVisibility: Survey.Event<(sender: CreatorBase<T>, options: any) => any, any>;
2353
2369
  /**
@@ -2929,6 +2945,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2929
2945
  baseClass: string;
2930
2946
  propertyName: string;
2931
2947
  showIf: (survey: SurveyModel) => boolean;
2948
+ getSelectorChoices(survey: SurveyModel, context: Question): import("survey-core").SurveyElement[];
2932
2949
  showInUI?: undefined;
2933
2950
  isUniqueItem?: undefined;
2934
2951
  isInvisible?: undefined;
@@ -2936,7 +2953,21 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2936
2953
  dependedOnPropertyName?: undefined;
2937
2954
  questionNames?: undefined;
2938
2955
  getDisplayText?: undefined;
2939
- getDisplayTextName?: undefined;
2956
+ getElementName?: undefined;
2957
+ getCollection?: undefined;
2958
+ } | {
2959
+ name: string;
2960
+ baseClass: string;
2961
+ propertyName: string;
2962
+ showIf?: undefined;
2963
+ showInUI?: undefined;
2964
+ isUniqueItem?: undefined;
2965
+ isInvisible?: undefined;
2966
+ dynamicPropertyName?: undefined;
2967
+ dependedOnPropertyName?: undefined;
2968
+ questionNames?: undefined;
2969
+ getDisplayText?: undefined;
2970
+ getElementName?: undefined;
2940
2971
  getCollection?: undefined;
2941
2972
  } | {
2942
2973
  name: string;
@@ -2950,7 +2981,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2950
2981
  dependedOnPropertyName?: undefined;
2951
2982
  questionNames?: undefined;
2952
2983
  getDisplayText?: undefined;
2953
- getDisplayTextName?: undefined;
2984
+ getElementName?: undefined;
2954
2985
  getCollection?: undefined;
2955
2986
  } | {
2956
2987
  name: string;
@@ -2964,7 +2995,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2964
2995
  dependedOnPropertyName?: undefined;
2965
2996
  questionNames?: undefined;
2966
2997
  getDisplayText?: undefined;
2967
- getDisplayTextName?: undefined;
2998
+ getElementName?: undefined;
2968
2999
  getCollection?: undefined;
2969
3000
  } | {
2970
3001
  name: string;
@@ -2978,7 +3009,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2978
3009
  showInUI?: undefined;
2979
3010
  isUniqueItem?: undefined;
2980
3011
  isInvisible?: undefined;
2981
- getDisplayTextName?: undefined;
3012
+ getElementName?: undefined;
2982
3013
  getCollection?: undefined;
2983
3014
  } | {
2984
3015
  name: string;
@@ -2992,7 +3023,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2992
3023
  isInvisible?: undefined;
2993
3024
  dynamicPropertyName?: undefined;
2994
3025
  dependedOnPropertyName?: undefined;
2995
- getDisplayTextName?: undefined;
3026
+ getElementName?: undefined;
2996
3027
  getCollection?: undefined;
2997
3028
  } | {
2998
3029
  name: string;
@@ -3000,7 +3031,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
3000
3031
  propertyName: string;
3001
3032
  questionNames: string[];
3002
3033
  isUniqueItem: boolean;
3003
- getDisplayTextName: (element: Base) => string;
3034
+ getElementName: (element: Base) => string;
3004
3035
  showIf?: undefined;
3005
3036
  showInUI?: undefined;
3006
3037
  isInvisible?: undefined;
@@ -3021,7 +3052,7 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
3021
3052
  dependedOnPropertyName?: undefined;
3022
3053
  questionNames?: undefined;
3023
3054
  getDisplayText?: undefined;
3024
- getDisplayTextName?: undefined;
3055
+ getElementName?: undefined;
3025
3056
  })[];
3026
3057
  invisibleItems: Array<SurveyLogicItem>;
3027
3058
  onChangedCallback: (item: SurveyLogicItem, changeType: string) => void;
@@ -4355,6 +4386,7 @@ export declare class StringEditorViewModelBase extends Base {
4355
4386
  onKeyDown(event: KeyboardEvent): boolean;
4356
4387
  findProperty(): JsonObjectProperty;
4357
4388
  get maxLength(): number;
4389
+ placeholderValue: string;
4358
4390
  get placeholder(): string;
4359
4391
  get contentEditable(): boolean;
4360
4392
  className(text: any): string;
@@ -4603,7 +4635,6 @@ export declare abstract class PropertyGridEditorMatrix extends PropertyGridEdito
4603
4635
  export declare class PropertyGridEditorMatrixItemValues extends PropertyGridEditorMatrix {
4604
4636
  fit(prop: JsonObjectProperty): boolean;
4605
4637
  isPropertyEditorSetupEnabled(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): boolean;
4606
- setupMatrixQuestion(obj: Base, matrix: QuestionMatrixDynamicModel, prop: JsonObjectProperty): void;
4607
4638
  protected getAllowRowDragDrop(): boolean;
4608
4639
  createPropertyEditorSetup(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): IPropertyEditorSetup;
4609
4640
  canClearPropertyValue(obj: Base, prop: JsonObjectProperty, question: Question, options: ISurveyCreatorOptions): boolean;
@@ -5373,6 +5404,10 @@ export declare class SurveyHelper {
5373
5404
  static convertItemValuesToText(items: ItemValue[]): string;
5374
5405
  static convertTextToItemValues(text: string, properties: JsonObjectProperty[], className: string): ItemValue[];
5375
5406
  static sortItems(items: Array<any>, propertyName?: string): void;
5407
+ static getQuestionContextIndexInfo(name: string, prefix?: string): {
5408
+ index: number;
5409
+ name: string;
5410
+ };
5376
5411
  }
5377
5412
 
5378
5413
  import "./notifier.scss";
@@ -5525,6 +5560,7 @@ export declare class SurveyLogicAction {
5525
5560
  constructor(logicType: SurveyLogicType, element: Base, survey: SurveyModel);
5526
5561
  get logicType(): SurveyLogicType;
5527
5562
  get element(): Base;
5563
+ get parentElement(): Base;
5528
5564
  get survey(): SurveyModel;
5529
5565
  apply(expression: string, isRenaming?: boolean): void;
5530
5566
  renameQuestion(oldName: string, newName: string): void;
@@ -5539,6 +5575,7 @@ export declare class SurveyLogicAction {
5539
5575
  isSuitableByQuestionName(questionName: string): boolean;
5540
5576
  isSuitableByLogicType(logicTypeName: string): boolean;
5541
5577
  addQuestionNames(names: string[]): void;
5578
+ get elementName(): string;
5542
5579
  }
5543
5580
  export interface ISurveyLogicItemOwner {
5544
5581
  survey: SurveyModel;
@@ -5572,6 +5609,7 @@ export declare class SurveyLogicItem {
5572
5609
  removeQuestion(name: string): void;
5573
5610
  getQuestionNames(): string[];
5574
5611
  getActionTypes(): string[];
5612
+ getContext(): Base;
5575
5613
  get editText(): string;
5576
5614
  get deleteText(): string;
5577
5615
  get ifText(): string;
@@ -5592,7 +5630,10 @@ export interface ISurveyLogicType {
5592
5630
  isUniqueItem?: boolean;
5593
5631
  questionNames?: Array<string>;
5594
5632
  getDisplayText?: (element: Base, formatStr: string, lt: SurveyLogicType) => string;
5595
- getDisplayTextName?: (element: Base) => string;
5633
+ getElementName?: (element: Base) => string;
5634
+ getSelectorChoices?: (survey: SurveyModel, context: Question) => Array<SurveyElement>;
5635
+ supportContext?: (question: Base) => boolean;
5636
+ getParentElement?(element: Base): Base;
5596
5637
  }
5597
5638
  export declare class SurveyLogicType {
5598
5639
  survey: SurveyModel;
@@ -5616,16 +5657,53 @@ export declare class SurveyLogicType {
5616
5657
  get questionNames(): Array<string>;
5617
5658
  get displayName(): string;
5618
5659
  get description(): string;
5660
+ getParentElement(element: Base): Base;
5661
+ get hasSelectorChoices(): boolean;
5662
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5619
5663
  getDisplayText(element: Base): string;
5620
5664
  formatElName(name: string): string;
5621
5665
  formatExpression(expression: string): string;
5666
+ supportContext(context: Base): boolean;
5622
5667
  }
5623
5668
  export declare class SurveyLogicTypes {
5669
+ static baseTypes: {
5670
+ panel: {
5671
+ showIf: (survey: SurveyModel) => boolean;
5672
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5673
+ };
5674
+ question: {
5675
+ showIf: (survey: SurveyModel) => boolean;
5676
+ supportContext(context: Base): boolean;
5677
+ getParentElement(element: Base): Base;
5678
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5679
+ };
5680
+ matrixdropdowncolumn: {
5681
+ showIf: (survey: SurveyModel) => boolean;
5682
+ supportContext(context: Base): boolean;
5683
+ getParentElement(element: Base): Base;
5684
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5685
+ };
5686
+ };
5624
5687
  static types: ({
5625
5688
  name: string;
5626
5689
  baseClass: string;
5627
5690
  propertyName: string;
5628
5691
  showIf: (survey: SurveyModel) => boolean;
5692
+ getSelectorChoices(survey: SurveyModel, context: Question): Array<SurveyElement>;
5693
+ showInUI?: undefined;
5694
+ isUniqueItem?: undefined;
5695
+ isInvisible?: undefined;
5696
+ dynamicPropertyName?: undefined;
5697
+ dependedOnPropertyName?: undefined;
5698
+ questionNames?: undefined;
5699
+ getDisplayText?: undefined;
5700
+ getElementName?: undefined;
5701
+ getCollection?: undefined;
5702
+ } | {
5703
+ name: string;
5704
+ baseClass: string;
5705
+ propertyName: string;
5706
+ showIf?: undefined;
5629
5707
  showInUI?: undefined;
5630
5708
  isUniqueItem?: undefined;
5631
5709
  isInvisible?: undefined;
@@ -5633,7 +5711,7 @@ export declare class SurveyLogicTypes {
5633
5711
  dependedOnPropertyName?: undefined;
5634
5712
  questionNames?: undefined;
5635
5713
  getDisplayText?: undefined;
5636
- getDisplayTextName?: undefined;
5714
+ getElementName?: undefined;
5637
5715
  getCollection?: undefined;
5638
5716
  } | {
5639
5717
  name: string;
@@ -5647,7 +5725,7 @@ export declare class SurveyLogicTypes {
5647
5725
  dependedOnPropertyName?: undefined;
5648
5726
  questionNames?: undefined;
5649
5727
  getDisplayText?: undefined;
5650
- getDisplayTextName?: undefined;
5728
+ getElementName?: undefined;
5651
5729
  getCollection?: undefined;
5652
5730
  } | {
5653
5731
  name: string;
@@ -5661,7 +5739,7 @@ export declare class SurveyLogicTypes {
5661
5739
  dependedOnPropertyName?: undefined;
5662
5740
  questionNames?: undefined;
5663
5741
  getDisplayText?: undefined;
5664
- getDisplayTextName?: undefined;
5742
+ getElementName?: undefined;
5665
5743
  getCollection?: undefined;
5666
5744
  } | {
5667
5745
  name: string;
@@ -5675,7 +5753,7 @@ export declare class SurveyLogicTypes {
5675
5753
  showInUI?: undefined;
5676
5754
  isUniqueItem?: undefined;
5677
5755
  isInvisible?: undefined;
5678
- getDisplayTextName?: undefined;
5756
+ getElementName?: undefined;
5679
5757
  getCollection?: undefined;
5680
5758
  } | {
5681
5759
  name: string;
@@ -5689,7 +5767,7 @@ export declare class SurveyLogicTypes {
5689
5767
  isInvisible?: undefined;
5690
5768
  dynamicPropertyName?: undefined;
5691
5769
  dependedOnPropertyName?: undefined;
5692
- getDisplayTextName?: undefined;
5770
+ getElementName?: undefined;
5693
5771
  getCollection?: undefined;
5694
5772
  } | {
5695
5773
  name: string;
@@ -5697,7 +5775,7 @@ export declare class SurveyLogicTypes {
5697
5775
  propertyName: string;
5698
5776
  questionNames: string[];
5699
5777
  isUniqueItem: boolean;
5700
- getDisplayTextName: (element: Base) => string;
5778
+ getElementName: (element: Base) => string;
5701
5779
  showIf?: undefined;
5702
5780
  showInUI?: undefined;
5703
5781
  isInvisible?: undefined;
@@ -5718,7 +5796,7 @@ export declare class SurveyLogicTypes {
5718
5796
  dependedOnPropertyName?: undefined;
5719
5797
  questionNames?: undefined;
5720
5798
  getDisplayText?: undefined;
5721
- getDisplayTextName?: undefined;
5799
+ getElementName?: undefined;
5722
5800
  })[];
5723
5801
  }
5724
5802
 
@@ -5745,6 +5823,7 @@ export declare class ConditionEditor extends PropertyEditorSetupValue {
5745
5823
  static canParseExpression(text: string): boolean;
5746
5824
  static canBuildExpression(text: string): boolean;
5747
5825
  allConditionQuestions: Array<ItemValue>;
5826
+ onContextChanged: (context: Question) => void;
5748
5827
  constructor(survey: SurveyModel, object?: Base, options?: ISurveyCreatorOptions, propertyName?: string);
5749
5828
  get title(): string;
5750
5829
  set title(val: string);
@@ -5755,6 +5834,8 @@ export declare class ConditionEditor extends PropertyEditorSetupValue {
5755
5834
  get text(): string;
5756
5835
  set text(val: string);
5757
5836
  isModified(prevText: string): boolean;
5837
+ get context(): Question;
5838
+ set context(val: Question);
5758
5839
  get survey(): SurveyModel;
5759
5840
  get object(): Base;
5760
5841
  get panel(): QuestionPanelDynamicModel;
@@ -5776,6 +5857,8 @@ export declare class LogicItemEditor extends PropertyEditorSetupValue {
5776
5857
  get panels(): Array<PanelModel>;
5777
5858
  getPanelByAction(action: SurveyLogicAction): PanelModel;
5778
5859
  getActionByPanel(panel: PanelModel): SurveyLogicAction;
5860
+ get context(): Question;
5861
+ set context(val: Question);
5779
5862
  protected getSurveyJSON(): any;
5780
5863
  protected getSurveyCreationReason(): string;
5781
5864
  resetModified(): void;