survey-creator-core 1.9.84 → 1.9.86

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
- * SurveyJS Creator v1.9.84
2
+ * SurveyJS Creator v1.9.86
3
3
  * (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1082,6 +1082,8 @@ __webpack_require__.r(__webpack_exports__);
1082
1082
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
1083
1083
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
1084
1084
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
1085
+ /* harmony import */ var _survey_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../survey-helper */ "./src/survey-helper.ts");
1086
+
1085
1087
 
1086
1088
 
1087
1089
 
@@ -1182,8 +1184,7 @@ var MatrixCellWrapperViewModel = /** @class */ (function (_super) {
1182
1184
  get: function () {
1183
1185
  if (!this.question || !this.question.getType)
1184
1186
  return false;
1185
- var type = this.question.getType();
1186
- return type !== "text" && type !== "comment";
1187
+ return _survey_helper__WEBPACK_IMPORTED_MODULE_3__["SurveyHelper"].isSupportCellEditor(this.question.getType());
1187
1188
  },
1188
1189
  enumerable: false,
1189
1190
  configurable: true
@@ -1440,8 +1441,10 @@ var PageNavigatorViewModel = /** @class */ (function (_super) {
1440
1441
  this._resizeObserver.disconnect();
1441
1442
  this._resizeObserver = undefined;
1442
1443
  }
1443
- this.visibleItemsStartIndex = 0;
1444
- this.visibleItemsCount = Number.MAX_VALUE;
1444
+ if (!this.isDisposed) {
1445
+ this.visibleItemsStartIndex = 0;
1446
+ this.visibleItemsCount = Number.MAX_VALUE;
1447
+ }
1445
1448
  };
1446
1449
  PageNavigatorViewModel.prototype.setScrollableContainer = function (scrollableContainer) {
1447
1450
  this._scrollableContainer = scrollableContainer;
@@ -1639,6 +1642,7 @@ var PageAdorner = /** @class */ (function (_super) {
1639
1642
  "title",
1640
1643
  "description"
1641
1644
  ]);
1645
+ this.page["surveyChangedCallback"] = undefined;
1642
1646
  }
1643
1647
  this.onPropertyValueChangedCallback = undefined;
1644
1648
  };
@@ -1970,10 +1974,13 @@ var QuestionRatingAdornerViewModel = /** @class */ (function (_super) {
1970
1974
  enumerable: false,
1971
1975
  configurable: true
1972
1976
  });
1977
+ QuestionRatingAdornerViewModel.useRateValues = function (element) {
1978
+ return element.useRateValues();
1979
+ };
1973
1980
  QuestionRatingAdornerViewModel.prototype.addItem = function (model) {
1974
1981
  if (!model.allowAdd)
1975
1982
  return;
1976
- if (model.element.rateValues.length === 0) {
1983
+ if (!QuestionRatingAdornerViewModel.useRateValues(model.element)) {
1977
1984
  model.element.rateMax += model.element.rateStep;
1978
1985
  }
1979
1986
  else {
@@ -2011,12 +2018,12 @@ var QuestionRatingAdornerViewModel = /** @class */ (function (_super) {
2011
2018
  var allowDelete = model.creator.onCollectionItemDeletingCallback(model.element, property, model.element.rateValues, item);
2012
2019
  if (allowDelete) {
2013
2020
  var question = model.element;
2014
- if (question.rateValues.length === 0 &&
2021
+ if (!QuestionRatingAdornerViewModel.useRateValues(model.element) &&
2015
2022
  itemIndex === question.rateValues.length - 1) {
2016
2023
  question.rateMax -= question.rateStep;
2017
2024
  }
2018
2025
  else {
2019
- if (question.rateValues.length === 0) {
2026
+ if (!QuestionRatingAdornerViewModel.useRateValues(model.element)) {
2020
2027
  // eslint-disable-next-line no-self-assign
2021
2028
  question.rateValues = question.rateValues;
2022
2029
  }
@@ -2024,15 +2031,42 @@ var QuestionRatingAdornerViewModel = /** @class */ (function (_super) {
2024
2031
  }
2025
2032
  }
2026
2033
  };
2034
+ QuestionRatingAdornerViewModel.allowAddForElement = function (element, maximumRateValues) {
2035
+ if ((maximumRateValues < 1 || maximumRateValues > survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].ratingMaximumRateValueCount) && !QuestionRatingAdornerViewModel.useRateValues(element))
2036
+ maximumRateValues = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].ratingMaximumRateValueCount;
2037
+ if (element.rateDisplayMode == "smileys" && (maximumRateValues < 1 || maximumRateValues > 10))
2038
+ maximumRateValues = 10;
2039
+ if (maximumRateValues < 1)
2040
+ return true;
2041
+ return element.rateCount < maximumRateValues;
2042
+ };
2027
2043
  Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "allowAdd", {
2028
2044
  get: function () {
2029
- return !this.creator.readOnly &&
2030
- (this.creator.maximumRateValues < 1 ||
2031
- ((this.element.rateValues.length > 0 || this.creator.maximumRateValues > this.element.rateMax) && (this.element.rateValues.length < 1 || this.creator.maximumRateValues > this.element.rateValues.length)));
2045
+ return !this.creator.readOnly;
2046
+ },
2047
+ enumerable: false,
2048
+ configurable: true
2049
+ });
2050
+ Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "enableAdd", {
2051
+ get: function () {
2052
+ return this.allowAdd && QuestionRatingAdornerViewModel.allowAddForElement(this.element, this.creator.maximumRateValues);
2032
2053
  },
2033
2054
  enumerable: false,
2034
2055
  configurable: true
2035
2056
  });
2057
+ Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "addClassNames", {
2058
+ get: function () {
2059
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
2060
+ .append("svc-item-value-controls__button")
2061
+ .append("svc-item-value-controls__button--disabled", !this.enableAdd)
2062
+ .append("svc-item-value-controls__add").toString();
2063
+ },
2064
+ enumerable: false,
2065
+ configurable: true
2066
+ });
2067
+ QuestionRatingAdornerViewModel.allowRemoveForElement = function (element) {
2068
+ return element.rateCount > 2;
2069
+ };
2036
2070
  Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "allowRemove", {
2037
2071
  get: function () {
2038
2072
  return !this.creator.readOnly;
@@ -2040,6 +2074,23 @@ var QuestionRatingAdornerViewModel = /** @class */ (function (_super) {
2040
2074
  enumerable: false,
2041
2075
  configurable: true
2042
2076
  });
2077
+ Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "enableRemove", {
2078
+ get: function () {
2079
+ return this.allowRemove && QuestionRatingAdornerViewModel.allowRemoveForElement(this.element);
2080
+ },
2081
+ enumerable: false,
2082
+ configurable: true
2083
+ });
2084
+ Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "removeClassNames", {
2085
+ get: function () {
2086
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
2087
+ .append("svc-item-value-controls__button")
2088
+ .append("svc-item-value-controls__button--disabled", !this.enableRemove)
2089
+ .append("svc-item-value-controls__remove").toString();
2090
+ },
2091
+ enumerable: false,
2092
+ configurable: true
2093
+ });
2043
2094
  Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "addTooltip", {
2044
2095
  get: function () {
2045
2096
  return Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["getLocString"])("pe.addItem");
@@ -2307,23 +2358,26 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
2307
2358
  };
2308
2359
  QuestionAdornerViewModel.prototype.createConvertInputType = function () {
2309
2360
  var _this = this;
2310
- if (this.surveyElement.getType() !== "text")
2311
- return null;
2312
- var prop = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("text", "inputType");
2361
+ var prop = null;
2362
+ if (this.surveyElement.getType() === "text")
2363
+ prop = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("text", "inputType");
2364
+ if (this.surveyElement.getType() === "rating")
2365
+ prop = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("rating", "rateDisplayMode");
2313
2366
  if (!prop || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["isPropertyVisible"])(this.surveyElement, prop.name))
2314
2367
  return null;
2315
- var inputType = this.surveyElement.inputType;
2368
+ var propName = prop.name;
2369
+ var questionSubType = this.surveyElement.getPropertyValue(propName);
2316
2370
  var items = prop.getChoices(this.surveyElement, function (chs) { });
2317
2371
  var availableTypes = [];
2318
2372
  items.forEach(function (item) {
2319
2373
  availableTypes.push({ id: item, title: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getPropertyValueInEditor(prop.name, item) });
2320
2374
  });
2321
- var newAction = this.createDropdownModel("convertInputType", availableTypes, true, 1, inputType, function (item) {
2322
- _this.surveyElement.inputType = item.id;
2375
+ var newAction = this.createDropdownModel("convertInputType", availableTypes, true, 1, questionSubType, function (item) {
2376
+ _this.surveyElement.setPropertyValue(propName, item.id);
2323
2377
  newAction.title = item.title;
2324
2378
  });
2325
- this.surveyElement.registerFunctionOnPropertyValueChanged("inputType", function () {
2326
- var item = _this.getSelectedItem(availableTypes, _this.surveyElement.inputType);
2379
+ this.surveyElement.registerFunctionOnPropertyValueChanged(propName, function () {
2380
+ var item = _this.getSelectedItem(availableTypes, _this.surveyElement.getPropertyValue(propName));
2327
2381
  if (!item)
2328
2382
  return;
2329
2383
  var popup = newAction.popupModel;
@@ -2331,6 +2385,7 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
2331
2385
  list.selectedItem = item;
2332
2386
  newAction.title = item.title;
2333
2387
  }, "inputTypeAdorner");
2388
+ newAction.removePriority = 1;
2334
2389
  return newAction;
2335
2390
  };
2336
2391
  QuestionAdornerViewModel.prototype.getSelectedItem = function (actions, id) {
@@ -4087,6 +4142,7 @@ var TabDesignerPlugin = /** @class */ (function () {
4087
4142
  TabDesignerPlugin.prototype.activate = function () {
4088
4143
  this.model = new _designer__WEBPACK_IMPORTED_MODULE_4__["TabDesignerViewModel"](this.creator);
4089
4144
  this.creator.sidebar.activeTab = this.propertyGridTab.id;
4145
+ this.creator.focusElement(undefined, true);
4090
4146
  };
4091
4147
  TabDesignerPlugin.prototype.deactivate = function () {
4092
4148
  this.model = undefined;
@@ -4368,6 +4424,10 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
4368
4424
  this.pagesController.raisePagesChanged();
4369
4425
  }
4370
4426
  };
4427
+ TabDesignerViewModel.prototype.dispose = function () {
4428
+ _super.prototype.dispose.call(this);
4429
+ this.cssUpdater && this.cssUpdater.dispose();
4430
+ };
4371
4431
  TabDesignerViewModel.prototype.checkLastPageToDelete = function () {
4372
4432
  if (this.survey.pageCount === 0)
4373
4433
  return false;
@@ -11668,7 +11728,7 @@ var CreatorBase = /** @class */ (function (_super) {
11668
11728
  * - `options.allowAddToToolbox` - Allows users to save the current survey element configuration in the Toolbox.
11669
11729
  * - `options.allowChangeRequired` - Allows users to make the survey element required.
11670
11730
  * - `options.allowChangeType` - Allows users to change the survey element type.
11671
- * - `options.allowChangeInputType` - Allows users to change the text question inputType property.
11731
+ * - `options.allowChangeInputType` - Allows users to change the [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) property of Single-Line Input questions.
11672
11732
  * - `options.allowCopy` - Allows users to duplicate the survey element.
11673
11733
  * - `options.allowDelete` - Allows users to delete the survey element.
11674
11734
  * - `options.allowDragging` - Allows users to drag and drop the survey element.
@@ -15107,7 +15167,13 @@ var settings = {
15107
15167
  showAddQuestionButton: true
15108
15168
  },
15109
15169
  logic: {
15110
- defaultOperator: "equal",
15170
+ get defaultOperator() { return settings.logic.defaultOperators.default; },
15171
+ set defaultOperator(val) { settings.logic.defaultOperators.default = val; },
15172
+ defaultOperators: {
15173
+ default: "equal",
15174
+ checkbox: "allof",
15175
+ tagbox: "allof"
15176
+ },
15111
15177
  visibleActions: [],
15112
15178
  logicItemTitleMaxChars: 50,
15113
15179
  openBracket: "{",
@@ -15177,7 +15243,10 @@ var settings = {
15177
15243
  ]
15178
15244
  },
15179
15245
  image: {
15180
- imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"
15246
+ imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg",
15247
+ imageFit: "cover",
15248
+ imageHeight: "auto",
15249
+ imageWidth: "100%"
15181
15250
  }
15182
15251
  }
15183
15252
  },
@@ -15317,12 +15386,12 @@ var QuestionColorModel = /** @class */ (function (_super) {
15317
15386
  newValue += "0";
15318
15387
  }
15319
15388
  }
15320
- return newValue.toUpperCase();
15389
+ return newValue;
15321
15390
  };
15322
15391
  QuestionColorModel.prototype.setNewValue = function (newValue) {
15323
- this._renderedValue = "";
15392
+ this.resetRenderedValue();
15324
15393
  _super.prototype.setNewValue.call(this, this.getCorrectedValue(newValue));
15325
- this._renderedValue = this.value;
15394
+ this.updateRenderedValue();
15326
15395
  };
15327
15396
  QuestionColorModel.prototype.onBeforeInput = function (event) {
15328
15397
  if (!!event.data && !/[\d\w#]/.test(event.data)) {
@@ -15335,10 +15404,16 @@ var QuestionColorModel = /** @class */ (function (_super) {
15335
15404
  QuestionColorModel.prototype.getType = function () {
15336
15405
  return "color";
15337
15406
  };
15407
+ QuestionColorModel.prototype.resetRenderedValue = function () {
15408
+ this._renderedValue = undefined;
15409
+ };
15410
+ QuestionColorModel.prototype.updateRenderedValue = function () {
15411
+ this._renderedValue = this.value;
15412
+ };
15338
15413
  Object.defineProperty(QuestionColorModel.prototype, "renderedValue", {
15339
15414
  get: function () {
15340
15415
  var _a, _b;
15341
- return (_b = (_a = this._renderedValue) !== null && _a !== void 0 ? _a : this.value) !== null && _b !== void 0 ? _b : "#000000";
15416
+ return ((_b = (_a = this._renderedValue) !== null && _a !== void 0 ? _a : this.value) !== null && _b !== void 0 ? _b : "#000000").toUpperCase();
15342
15417
  },
15343
15418
  enumerable: false,
15344
15419
  configurable: true
@@ -15353,6 +15428,10 @@ var QuestionColorModel = /** @class */ (function (_super) {
15353
15428
  enumerable: false,
15354
15429
  configurable: true
15355
15430
  });
15431
+ QuestionColorModel.prototype.onSurveyValueChanged = function (newValue) {
15432
+ _super.prototype.onSurveyValueChanged.call(this, newValue);
15433
+ this.updateRenderedValue();
15434
+ };
15356
15435
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
15357
15436
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])()
15358
15437
  ], QuestionColorModel.prototype, "unit", void 0);
@@ -16544,7 +16623,7 @@ __webpack_require__.r(__webpack_exports__);
16544
16623
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! survey-core */ "survey-core");
16545
16624
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_64__);
16546
16625
  var Version;
16547
- Version = "" + "1.9.84";
16626
+ Version = "" + "1.9.86";
16548
16627
 
16549
16628
 
16550
16629
 
@@ -16625,7 +16704,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
16625
16704
  __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
16626
16705
 
16627
16706
  survey_core__WEBPACK_IMPORTED_MODULE_64__["settings"].supportCreatorV2 = true;
16628
- Object(survey_core__WEBPACK_IMPORTED_MODULE_64__["checkLibraryVersion"])("" + "1.9.84", "survey-creator-core");
16707
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_64__["checkLibraryVersion"])("" + "1.9.86", "survey-creator-core");
16629
16708
 
16630
16709
 
16631
16710
  /***/ }),
@@ -18685,27 +18764,27 @@ var enStrings = {
18685
18764
  // Question types
18686
18765
  qt: {
18687
18766
  default: "Default",
18688
- checkbox: "Checkbox",
18689
- comment: "Comment",
18767
+ checkbox: "Checkboxes",
18768
+ comment: "Long Text",
18690
18769
  imagepicker: "Image Picker",
18691
18770
  ranking: "Ranking",
18692
18771
  image: "Image",
18693
18772
  dropdown: "Dropdown",
18694
- tagbox: "Tag Box",
18695
- file: "File",
18773
+ tagbox: "Multi-Select Dropdown",
18774
+ file: "File Upload",
18696
18775
  html: "HTML",
18697
- matrix: "Single-Choice Matrix",
18698
- matrixdropdown: "Multiple-Choice Matrix",
18776
+ matrix: "Single-Select Matrix",
18777
+ matrixdropdown: "Multi-Select Matrix",
18699
18778
  matrixdynamic: "Dynamic Matrix",
18700
- multipletext: "Multiple Text",
18779
+ multipletext: "Multiple Textboxes",
18701
18780
  panel: "Panel",
18702
18781
  paneldynamic: "Dynamic Panel",
18703
- radiogroup: "Radiogroup",
18704
- rating: "Rating",
18705
- text: "Single Input",
18706
- boolean: "Boolean",
18782
+ radiogroup: "Radio Button Group",
18783
+ rating: "Rating Scale",
18784
+ text: "Single-Line Input",
18785
+ boolean: "Yes/No (Boolean)",
18707
18786
  expression: "Expression (read-only)",
18708
- signaturepad: "Signature Pad",
18787
+ signaturepad: "Signature",
18709
18788
  buttongroup: "Button Group"
18710
18789
  },
18711
18790
  // Strings in SurveyJS Creator
@@ -19433,7 +19512,8 @@ var enStrings = {
19433
19512
  auto: "Auto",
19434
19513
  buttons: "Buttons",
19435
19514
  dropdown: "Dropdown"
19436
- }
19515
+ },
19516
+ rateColorMode: { default: "Default" }
19437
19517
  },
19438
19518
  // Operators
19439
19519
  op: {
@@ -20825,7 +20905,7 @@ __webpack_require__.r(__webpack_exports__);
20825
20905
  var ConditionEditorItem = /** @class */ (function () {
20826
20906
  function ConditionEditorItem() {
20827
20907
  this.conjunction = "and";
20828
- this.operator = _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].logic.defaultOperator;
20908
+ this.operator = _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].logic.defaultOperators.default;
20829
20909
  }
20830
20910
  return ConditionEditorItem;
20831
20911
  }());
@@ -21426,7 +21506,8 @@ var ConditionEditor = /** @class */ (function (_super) {
21426
21506
  questionOperator.choices = this.getOperators();
21427
21507
  questionOperator.value = item.operator;
21428
21508
  questionOperator.onOpened.add(function (_, opt) {
21429
- var json = _this.getQuestionConditionJson(panel.getQuestionByName("questionName").value, _this.defaultOperator);
21509
+ var questionName = panel.getQuestionByName("questionName").value;
21510
+ var json = _this.getQuestionConditionJson(questionName);
21430
21511
  var qType = !!json ? json.type : null;
21431
21512
  opt.choices.forEach(function (choice, index) {
21432
21513
  var isOperatorEnabled = ConditionEditor.isOperatorEnabled(qType, _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].operators[choice.value]);
@@ -21701,6 +21782,9 @@ var ConditionEditor = /** @class */ (function (_super) {
21701
21782
  var question = this.getConditionQuestion(questionName);
21702
21783
  if (!question)
21703
21784
  return null;
21785
+ if (!operator) {
21786
+ operator = this.getDefaultOperatorByQuestion(question);
21787
+ }
21704
21788
  if (questionName.indexOf(question.getValueName()) == 0) {
21705
21789
  path = questionName.substring(question.getValueName().length);
21706
21790
  }
@@ -21715,9 +21799,6 @@ var ConditionEditor = /** @class */ (function (_super) {
21715
21799
  path = path.substring(1);
21716
21800
  }
21717
21801
  var json = question && question.getConditionJson ? question.getConditionJson(operator, path) : null;
21718
- // if (!!json && json.type == "radiogroup") {
21719
- // json.type = "dropdown";
21720
- // }
21721
21802
  if (!!json && json.type == "expression") {
21722
21803
  json.type = "text";
21723
21804
  }
@@ -21732,7 +21813,7 @@ var ConditionEditor = /** @class */ (function (_super) {
21732
21813
  var questionName = panel.getQuestionByName("questionName");
21733
21814
  if (!questionName)
21734
21815
  return;
21735
- var json = this.getQuestionConditionJson(questionName.value, this.defaultOperator);
21816
+ var json = this.getQuestionConditionJson(questionName.value);
21736
21817
  var qType = !!json ? json.type : null;
21737
21818
  var questionOperator = panel.getQuestionByName("operator");
21738
21819
  if (!questionOperator)
@@ -21773,10 +21854,21 @@ var ConditionEditor = /** @class */ (function (_super) {
21773
21854
  }
21774
21855
  };
21775
21856
  Object.defineProperty(ConditionEditor.prototype, "defaultOperator", {
21776
- get: function () { return _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].logic.defaultOperator; },
21857
+ get: function () { return _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].logic.defaultOperators.default; },
21777
21858
  enumerable: false,
21778
21859
  configurable: true
21779
21860
  });
21861
+ ConditionEditor.prototype.getDefaultOperatorByQuestionName = function (questionName) {
21862
+ return this.getDefaultOperatorByQuestion(this.getConditionQuestion(questionName));
21863
+ };
21864
+ ConditionEditor.prototype.getDefaultOperatorByQuestion = function (question) {
21865
+ if (!!question) {
21866
+ var defOps = _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].logic.defaultOperators;
21867
+ if (!!defOps[question.getType()])
21868
+ return defOps[question.getType()];
21869
+ }
21870
+ return this.defaultOperator;
21871
+ };
21780
21872
  ConditionEditor.prototype.getFirstEnabledOperator = function (choices) {
21781
21873
  for (var i = 0; i < choices.length; i++) {
21782
21874
  if (choices[i].isEnabled) {
@@ -21793,7 +21885,7 @@ var ConditionEditor = /** @class */ (function (_super) {
21793
21885
  this.context = this.getContextFromPanels();
21794
21886
  this.rebuildQuestionValue(panel);
21795
21887
  if (!this.isSettingPanelValues) {
21796
- panel.getQuestionByName("operator").value = this.defaultOperator;
21888
+ panel.getQuestionByName("operator").value = this.getDefaultOperatorByQuestionName(panel.getQuestionByName("questionName").value);
21797
21889
  }
21798
21890
  }
21799
21891
  if (name == "operator") {
@@ -23797,6 +23889,8 @@ __webpack_require__.r(__webpack_exports__);
23797
23889
  /* harmony import */ var _fast_entry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./fast-entry */ "./src/property-grid/fast-entry.ts");
23798
23890
  /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index */ "./src/property-grid/index.ts");
23799
23891
  /* harmony import */ var _utils_actions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/actions */ "./src/utils/actions.ts");
23892
+ /* harmony import */ var _components_question_rating__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../components/question-rating */ "./src/components/question-rating.ts");
23893
+
23800
23894
 
23801
23895
 
23802
23896
 
@@ -23839,10 +23933,18 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
23839
23933
  var objType = typeof rowObj.getType === "function" && rowObj.getType();
23840
23934
  if (cellQuestion.getType() === "text" && !!objType) {
23841
23935
  if (propertyName === "text" && objType === "itemvalue") {
23842
- cellQuestion.placeholder = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return rowObj.text; });
23936
+ cellQuestion.placeholder = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () {
23937
+ if (!!rowObj.value)
23938
+ return rowObj.value.toString();
23939
+ return rowObj.text;
23940
+ });
23843
23941
  }
23844
23942
  if (propertyName === "title" && objType === "matrixdropdowncolumn") {
23845
- cellQuestion.placeholder = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return rowObj.title; });
23943
+ cellQuestion.placeholder = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () {
23944
+ if (!!rowObj.name)
23945
+ return rowObj.name;
23946
+ return rowObj.title;
23947
+ });
23846
23948
  }
23847
23949
  }
23848
23950
  };
@@ -24259,6 +24361,27 @@ var PropertyGridEditorMatrixRateValues = /** @class */ (function (_super) {
24259
24361
  PropertyGridEditorMatrixRateValues.prototype.fit = function (prop) {
24260
24362
  return (prop.isArray && survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].isDescendantOf(prop.className, "itemvalue") && prop.name == "rateValues");
24261
24363
  };
24364
+ PropertyGridEditorMatrixRateValues.prototype.updateAllowAddRemove = function (matrixQuestion, obj) {
24365
+ matrixQuestion.allowRemoveRows = _components_question_rating__WEBPACK_IMPORTED_MODULE_8__["QuestionRatingAdornerViewModel"].allowRemoveForElement(obj);
24366
+ matrixQuestion.allowAddRows = _components_question_rating__WEBPACK_IMPORTED_MODULE_8__["QuestionRatingAdornerViewModel"].allowAddForElement(obj, matrixQuestion.maxRowCount);
24367
+ };
24368
+ PropertyGridEditorMatrixRateValues.prototype.onCreated = function (obj, question, prop) {
24369
+ var _this = this;
24370
+ _super.prototype.onCreated.call(this, obj, question, prop);
24371
+ var matrixQuestion = question;
24372
+ this.updateAllowAddRemove(matrixQuestion, obj);
24373
+ obj.onPropertyChanged.add(function (sender, options) {
24374
+ if (options.name == "rateCount" || options.name == "rateDisplayMode") {
24375
+ _this.updateAllowAddRemove(matrixQuestion, obj);
24376
+ }
24377
+ });
24378
+ };
24379
+ PropertyGridEditorMatrixRateValues.prototype.onGetQuestionTitleActions = function (obj, options) {
24380
+ var clearAction = options.titleActions.filter(function (a) { return a.id == "property-grid-clear"; })[0];
24381
+ if (clearAction)
24382
+ clearAction.visible = false;
24383
+ _super.prototype.onGetQuestionTitleActions.call(this, obj, options);
24384
+ };
24262
24385
  PropertyGridEditorMatrixRateValues.prototype.filterPropertyNames = function (propNames) {
24263
24386
  return propNames;
24264
24387
  };
@@ -24906,6 +25029,7 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
24906
25029
  _this.selectorPopupModel.toggleVisibility();
24907
25030
  });
24908
25031
  _this.selectorPopupModel.toggleVisibility();
25032
+ selectorModel.list.scrollToSelectedItem();
24909
25033
  },
24910
25034
  popupModel: this.selectorPopupModel
24911
25035
  });
@@ -26927,7 +27051,7 @@ var SurveyHelper = /** @class */ (function () {
26927
27051
  text += "\n";
26928
27052
  text += item.value;
26929
27053
  if (item.pureText)
26930
- text += "|" + item.pureText;
27054
+ text += survey_core__WEBPACK_IMPORTED_MODULE_0__["ItemValue"].Separator + item.pureText;
26931
27055
  });
26932
27056
  return text;
26933
27057
  };
@@ -26988,6 +27112,14 @@ var SurveyHelper = /** @class */ (function () {
26988
27112
  }
26989
27113
  return undefined;
26990
27114
  };
27115
+ SurveyHelper.isSupportCellEditor = function (type) {
27116
+ var supportedTypes = ["selectbase", "boolean", "rating"];
27117
+ for (var i = 0; i < supportedTypes.length; i++) {
27118
+ if (survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].isDescendantOf(type, supportedTypes[i]))
27119
+ return true;
27120
+ }
27121
+ return false;
27122
+ };
26991
27123
  return SurveyHelper;
26992
27124
  }());
26993
27125