survey-creator-core 1.9.38 → 1.9.39

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,5 +1,5 @@
1
1
  /*
2
- * Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.38
2
+ * Type definition for Survey Creatorlibrary. Platform independent (core) v1.9.39
3
3
  * Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
4
4
  * License: https://surveyjs.io/Licenses#SurveyCreator
5
5
  */
@@ -7,11 +7,11 @@ import { Base, JsonObjectProperty, Question, SurveyModel, ItemValue } from "surv
7
7
  import { MatrixDropdownColumn, IAction, Action, ActionContainer, DragDropSurveyElements } from "survey-core";
8
8
  import { DragDropChoices, Event, AdaptiveActionContainer, PageModel, IElement } from "survey-core";
9
9
  import { IPanel, ISurveyElement, SurveyElement, QuestionSelectBase, QuestionRowModel } from "survey-core";
10
- import { LocalizableString, DragOrClickHelper, PanelModel, QuestionDropdownModel, ListModel } from "survey-core";
11
- import { PopupModel, EventBase, PanelModelBase, QuestionNonValue, SurveyTemplateRendererTemplateData } from "survey-core";
12
- import { QuestionRatingModel, ComputedUpdater, QuestionCheckboxModel, ILocalizableString, ArrayChanges } from "survey-core";
13
- import { ImageItemValue, HashTable, QuestionMatrixDynamicModel, QuestionMatrixModel, QuestionMatrixDropdownModel } from "survey-core";
14
- import { QuestionPanelDynamicModel, QuestionCommentModel, MatrixDynamicRowModel } from "survey-core";
10
+ import { LocalizableString, Operand, DragOrClickHelper, PanelModel, QuestionDropdownModel } from "survey-core";
11
+ import { ListModel, PopupModel, EventBase, PanelModelBase, QuestionNonValue } from "survey-core";
12
+ import { SurveyTemplateRendererTemplateData, QuestionRatingModel, ComputedUpdater, QuestionCheckboxModel, ILocalizableString } from "survey-core";
13
+ import { ArrayChanges, ImageItemValue, HashTable, QuestionMatrixDynamicModel, QuestionMatrixModel } from "survey-core";
14
+ import { QuestionMatrixDropdownModel, QuestionPanelDynamicModel, QuestionCommentModel, MatrixDynamicRowModel } from "survey-core";
15
15
 
16
16
  export { editorLocalization as localization };
17
17
 
@@ -1294,7 +1294,10 @@ export declare class CreatorBase extends Base implements ISurveyCreatorOptions,
1294
1294
  onBeforeDrop: Event<() => any, any>;
1295
1295
  onAfterDrop: Event<() => any, any>;
1296
1296
  updateElementsOnLocaleChanged(obj: Base, propertyName: string): void;
1297
- updateConditionsOnQuestionNameChanged(obj: Base, propertyName: string, oldValue: any): void;
1297
+ updateConditionsOnNameChanged(obj: Base, propertyName: string, oldValue: any): void;
1298
+ surveyLogicForUpdate: SurveyLogic;
1299
+ surveyLogicRenaming: boolean;
1300
+ protected createSurveyLogicForUpdate(): SurveyLogic;
1298
1301
  isObjQuestion(obj: Base): boolean;
1299
1302
  isObjPage(obj: Base): boolean;
1300
1303
  protected setSurvey(survey: SurveyModel): void;
@@ -1563,6 +1566,7 @@ export declare class ExpressionToDisplayText {
1563
1566
  currentQuestion: Question;
1564
1567
  showTitles: boolean;
1565
1568
  toDisplayText(expression: string): string;
1569
+ toExpression(node: Operand): string;
1566
1570
  static operatorText: any;
1567
1571
  }
1568
1572
  export declare class ItemValueWrapperViewModel extends Base {
@@ -2202,6 +2206,9 @@ export declare class SurveyLogic extends Base implements ISurveyLogicItemOwner {
2202
2206
  protected onEditableItemApply(): void;
2203
2207
  protected onItemChanged(item: SurveyLogicItem, changeType: string): void;
2204
2208
  renameQuestion(oldName: string, newName: string): void;
2209
+ renameItemValue(item: ItemValue, oldValue: any): void;
2210
+ renameRowValue(item: ItemValue, oldValue: any): void;
2211
+ renameColumn(column: MatrixDropdownColumn, oldName: string): void;
2205
2212
  removeQuestion(name: string): void;
2206
2213
  hasError(): boolean;
2207
2214
  getUsedQuestions(): Array<Question>;
@@ -2249,6 +2256,15 @@ export declare class SurveyLogicAction {
2249
2256
  addQuestionNames(names: any): void;
2250
2257
  get elementName(): string;
2251
2258
  }
2259
+ export declare class SurveyLogicExpressionUpdater {
2260
+ constructor(expresion: string);
2261
+ operand: Operand;
2262
+ constChanges: any;
2263
+ update(varName: string, oldValue: any, newValue: any): void;
2264
+ get isModified(): boolean;
2265
+ toString(): string;
2266
+ static operatorText: any;
2267
+ }
2252
2268
  export declare class SurveyLogicItem {
2253
2269
  constructor(owner: ISurveyLogicItemOwner, expression?: string);
2254
2270
  expression: string;
@@ -2276,6 +2292,9 @@ export declare class SurveyLogicItem {
2276
2292
  equals(item: SurveyLogicItem): boolean;
2277
2293
  apply(expression: string): void;
2278
2294
  renameQuestion(oldName: string, newName: string): void;
2295
+ renameColumn(question: Question, column: MatrixDropdownColumn, oldName: string): void;
2296
+ renameItemValue(question: Question, item: ItemValue, oldValue: any): void;
2297
+ renameRowValue(question: Question, item: ItemValue, oldValue: any): void;
2279
2298
  removeQuestion(name: string): void;
2280
2299
  getQuestionNames(): Array<any>;
2281
2300
  getActionTypes(): Array<any>;
@@ -3449,6 +3468,7 @@ export declare function assignDefaultV2Classes(destination: any, questionType: s
3449
3468
  export declare function wrapTextByCurlyBraces(text: string): string;
3450
3469
  export declare function capitalize(str: string): string;
3451
3470
  export declare function getLocString(strName: string, locale?: string): string;
3471
+ export declare function updateLogicExpression(expression: string, varName: string, oldValue: any, newValue: any): string;
3452
3472
  export declare function getLogicString(name: string): string;
3453
3473
  export declare function parsePropertyDescription(text: string): string;
3454
3474
  export declare function setSurveyJSONForPropertyGrid(json: any, updateOnTyping?: boolean, titleLocationLeft?: boolean): void;
@@ -3508,6 +3528,14 @@ export declare var settings: {
3508
3528
  logicItemTitleMaxChars: number,
3509
3529
  openBracket: string,
3510
3530
  closeBracket: string,
3531
+ /*
3532
+ * Set these properties to false if you don't want to update expressions on changing question and column names and on changing choices values
3533
+ */
3534
+ updateExpressionsOnChanging: {
3535
+ questionName: boolean,
3536
+ columnName: boolean,
3537
+ choiceValue: boolean,
3538
+ },
3511
3539
  },
3512
3540
  /*
3513
3541
  * Determines which types of questions the conversion will be available for.
@@ -3810,6 +3838,7 @@ export declare var propertyGridCss: {
3810
3838
  dragElementDecorator: string,
3811
3839
  iconDragElement: string,
3812
3840
  iconDrag: string,
3841
+ footer: string,
3813
3842
  dragDropGhostPositionTop: string,
3814
3843
  dragDropGhostPositionBottom: string,
3815
3844
  emptyRowsSection: string,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v1.9.38
2
+ * SurveyJS Creator v1.9.39
3
3
  * (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v1.9.38
2
+ * SurveyJS Creator v1.9.39
3
3
  * (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator