survey-react 1.12.12 → 1.12.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.12
2
+ * surveyjs - Survey JavaScript library v1.12.14
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -2427,13 +2427,16 @@ var helpers_Helpers = /** @class */ (function () {
2427
2427
  };
2428
2428
  Helpers.getNumberCore = function (value) {
2429
2429
  if (typeof value == "string") {
2430
- if (!value.trim())
2430
+ value = value.trim();
2431
+ if (!value)
2431
2432
  return NaN;
2432
2433
  if (value.indexOf("0x") == 0) {
2433
2434
  if (value.length > 32)
2434
2435
  return NaN;
2435
2436
  return parseInt(value);
2436
2437
  }
2438
+ if (value.length > 15 && Helpers.isDigitsOnly(value))
2439
+ return NaN;
2437
2440
  if (Helpers.isStringHasOperator(value))
2438
2441
  return NaN;
2439
2442
  }
@@ -2545,6 +2548,15 @@ var helpers_Helpers = /** @class */ (function () {
2545
2548
  Helpers.isCharDigit = function (ch) {
2546
2549
  return ch >= "0" && ch <= "9";
2547
2550
  };
2551
+ Helpers.isDigitsOnly = function (str) {
2552
+ if (!str)
2553
+ return false;
2554
+ for (var i = 0; i < str.length; i++) {
2555
+ if (!Helpers.isCharDigit(str[i]))
2556
+ return false;
2557
+ }
2558
+ return true;
2559
+ };
2548
2560
  Helpers.getNumberFromStr = function (str, index) {
2549
2561
  if (!this.isCharDigit(str[index]))
2550
2562
  return NaN;
@@ -3041,9 +3053,11 @@ function jsonobject_property(options) {
3041
3053
  set: function (val) {
3042
3054
  var newValue = processComputedUpdater(this, val);
3043
3055
  var prevValue = this.getPropertyValue(key);
3044
- this.setPropertyValue(key, newValue);
3045
- if (!!options && options.onSet) {
3046
- options.onSet(newValue, this, prevValue);
3056
+ if (newValue !== prevValue) {
3057
+ this.setPropertyValue(key, newValue);
3058
+ if (!!options && options.onSet) {
3059
+ options.onSet(newValue, this, prevValue);
3060
+ }
3047
3061
  }
3048
3062
  },
3049
3063
  });
@@ -3607,7 +3621,7 @@ var CustomPropertiesCollection = /** @class */ (function () {
3607
3621
  prop.serializationProperty &&
3608
3622
  obj.createCustomLocalizableObj) {
3609
3623
  var locStr = obj.createCustomLocalizableObj(prop.name);
3610
- locStr.defaultValue = prop.defaultValue;
3624
+ locStr.defaultValue = prop.getDefaultValue(obj);
3611
3625
  var locDesc = {
3612
3626
  get: function () {
3613
3627
  return obj.getLocalizableString(prop.name);
@@ -3625,7 +3639,6 @@ var CustomPropertiesCollection = /** @class */ (function () {
3625
3639
  Object.defineProperty(obj, prop.name, desc);
3626
3640
  }
3627
3641
  else {
3628
- var defaultValue = prop.defaultValue;
3629
3642
  var isArrayProp = prop.isArray || prop.type === "multiplevalues";
3630
3643
  if (typeof obj.createNewArray === "function") {
3631
3644
  if (Serializer.isDescendantOf(prop.className, "itemvalue")) {
@@ -3642,10 +3655,10 @@ var CustomPropertiesCollection = /** @class */ (function () {
3642
3655
  }
3643
3656
  }
3644
3657
  if (isArrayProp) {
3658
+ var defaultValue = prop.getDefaultValue(obj);
3645
3659
  if (Array.isArray(defaultValue)) {
3646
3660
  obj.setPropertyValue(prop.name, defaultValue);
3647
3661
  }
3648
- defaultValue = null;
3649
3662
  }
3650
3663
  }
3651
3664
  if (!!obj.getPropertyValue && !!obj.setPropertyValue) {
@@ -3654,7 +3667,7 @@ var CustomPropertiesCollection = /** @class */ (function () {
3654
3667
  if (!!prop.onGetValue) {
3655
3668
  return prop.onGetValue(obj);
3656
3669
  }
3657
- return obj.getPropertyValue(prop.name, defaultValue);
3670
+ return obj.getPropertyValue(prop.name, undefined);
3658
3671
  },
3659
3672
  set: function (v) {
3660
3673
  if (!!prop.onSetValue) {
@@ -10359,8 +10372,7 @@ var base_Base = /** @class */ (function () {
10359
10372
  * @param name A property name.
10360
10373
  * @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
10361
10374
  */
10362
- Base.prototype.getPropertyValue = function (name, defaultValue) {
10363
- if (defaultValue === void 0) { defaultValue = null; }
10375
+ Base.prototype.getPropertyValue = function (name, defaultValue, calcFunc) {
10364
10376
  var res = this.getPropertyValueWithoutDefault(name);
10365
10377
  if (this.isPropertyEmpty(res)) {
10366
10378
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
@@ -10368,6 +10380,13 @@ var base_Base = /** @class */ (function () {
10368
10380
  return locStr.text;
10369
10381
  if (defaultValue !== null && defaultValue !== undefined)
10370
10382
  return defaultValue;
10383
+ if (!!calcFunc) {
10384
+ var newVal = calcFunc();
10385
+ if (newVal !== undefined) {
10386
+ this.setPropertyValueDirectly(name, newVal);
10387
+ return newVal;
10388
+ }
10389
+ }
10371
10390
  var propDefaultValue = this.getDefaultPropertyValue(name);
10372
10391
  if (propDefaultValue !== undefined)
10373
10392
  return propDefaultValue;
@@ -10378,9 +10397,9 @@ var base_Base = /** @class */ (function () {
10378
10397
  var prop = this.getPropertyByName(name);
10379
10398
  if (!prop || prop.isCustom && this.isCreating)
10380
10399
  return undefined;
10381
- var dValue = prop.defaultValue;
10382
10400
  if (!!prop.defaultValueFunc)
10383
- return dValue;
10401
+ return prop.defaultValueFunc(this);
10402
+ var dValue = prop.getDefaultValue(this);
10384
10403
  if (!this.isPropertyEmpty(dValue) && !Array.isArray(dValue))
10385
10404
  return dValue;
10386
10405
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
@@ -11688,6 +11707,7 @@ var defaultListCss = {
11688
11707
  loadingIndicator: "sv-list__loading-indicator",
11689
11708
  itemSelected: "sv-list__item--selected",
11690
11709
  itemGroup: "sv-list__item--group",
11710
+ itemGroupSelected: "sv-list__item--group-selected",
11691
11711
  itemWithIcon: "sv-list__item--with-icon",
11692
11712
  itemDisabled: "sv-list__item--disabled",
11693
11713
  itemFocused: "sv-list__item--focused",
@@ -11747,13 +11767,15 @@ var list_ListModel = /** @class */ (function (_super) {
11747
11767
  .toString();
11748
11768
  };
11749
11769
  _this.getItemClass = function (itemValue) {
11770
+ var isSelected = _this.isItemSelected(itemValue);
11750
11771
  return new CssClassBuilder()
11751
11772
  .append(_this.cssClasses.item)
11752
11773
  .append(_this.cssClasses.itemWithIcon, !!itemValue.iconName)
11753
11774
  .append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
11754
11775
  .append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
11755
- .append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
11776
+ .append(_this.cssClasses.itemSelected, !itemValue.hasSubItems && isSelected)
11756
11777
  .append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
11778
+ .append(_this.cssClasses.itemGroupSelected, itemValue.hasSubItems && isSelected)
11757
11779
  .append(_this.cssClasses.itemHovered, itemValue.isHovered)
11758
11780
  .append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
11759
11781
  .append(itemValue.css)
@@ -11780,6 +11802,7 @@ var list_ListModel = /** @class */ (function (_super) {
11780
11802
  _this[key] = options_1[key];
11781
11803
  }
11782
11804
  });
11805
+ _this.updateActionsIds();
11783
11806
  }
11784
11807
  else {
11785
11808
  _this.setItems(items);
@@ -11836,10 +11859,13 @@ var list_ListModel = /** @class */ (function (_super) {
11836
11859
  configurable: true
11837
11860
  });
11838
11861
  ListModel.prototype.onFilterStringChanged = function (text) {
11839
- var _this = this;
11840
11862
  if (!!this.onFilterStringChangedCallback) {
11841
11863
  this.onFilterStringChangedCallback(text);
11842
11864
  }
11865
+ this.updateIsEmpty();
11866
+ };
11867
+ ListModel.prototype.updateIsEmpty = function () {
11868
+ var _this = this;
11843
11869
  this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
11844
11870
  };
11845
11871
  ListModel.prototype.scrollToItem = function (selector, ms) {
@@ -11863,16 +11889,19 @@ var list_ListModel = /** @class */ (function (_super) {
11863
11889
  this.onTextSearchCallback = callback;
11864
11890
  };
11865
11891
  ListModel.prototype.setItems = function (items, sortByVisibleIndex) {
11866
- var _this = this;
11867
11892
  if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
11868
11893
  _super.prototype.setItems.call(this, items, sortByVisibleIndex);
11869
- if (this.elementId) {
11870
- this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
11871
- }
11894
+ this.updateActionsIds();
11872
11895
  if (!this.isAllDataLoaded && !!this.actions.length) {
11873
11896
  this.actions.push(this.loadingIndicator);
11874
11897
  }
11875
11898
  };
11899
+ ListModel.prototype.updateActionsIds = function () {
11900
+ var _this = this;
11901
+ if (this.elementId) {
11902
+ this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
11903
+ }
11904
+ };
11876
11905
  ListModel.prototype.setSearchEnabled = function (newValue) {
11877
11906
  this.searchEnabled = newValue;
11878
11907
  this.showSearchClearButton = newValue;
@@ -11913,7 +11942,7 @@ var list_ListModel = /** @class */ (function (_super) {
11913
11942
  });
11914
11943
  Object.defineProperty(ListModel.prototype, "scrollableContainer", {
11915
11944
  get: function () {
11916
- return this.listContainerHtmlElement.querySelector("." + this.getDefaultCssClasses().itemsContainer);
11945
+ return this.listContainerHtmlElement.querySelector("." + this.cssClasses.itemsContainer);
11917
11946
  },
11918
11947
  enumerable: false,
11919
11948
  configurable: true
@@ -11967,7 +11996,12 @@ var list_ListModel = /** @class */ (function (_super) {
11967
11996
  };
11968
11997
  ListModel.prototype.onPointerDown = function (event, item) { };
11969
11998
  ListModel.prototype.refresh = function () {
11970
- this.filterString = "";
11999
+ if (this.filterString !== "") {
12000
+ this.filterString = "";
12001
+ }
12002
+ else {
12003
+ this.updateIsEmpty();
12004
+ }
11971
12005
  this.resetFocusedItem();
11972
12006
  };
11973
12007
  ListModel.prototype.onClickSearchClearButton = function (event) {
@@ -12036,10 +12070,15 @@ var list_ListModel = /** @class */ (function (_super) {
12036
12070
  }
12037
12071
  };
12038
12072
  ListModel.prototype.scrollToFocusedItem = function () {
12039
- this.scrollToItem(this.getDefaultCssClasses().itemFocused);
12073
+ this.scrollToItem(this.cssClasses.itemFocused);
12040
12074
  };
12041
12075
  ListModel.prototype.scrollToSelectedItem = function () {
12042
- this.scrollToItem(this.getDefaultCssClasses().itemSelected, 110);
12076
+ if (!!this.selectedItem && this.selectedItem.items && this.selectedItem.items.length > 0) {
12077
+ this.scrollToItem(this.cssClasses.itemGroupSelected, 110);
12078
+ }
12079
+ else {
12080
+ this.scrollToItem(this.cssClasses.itemSelected, 110);
12081
+ }
12043
12082
  };
12044
12083
  ListModel.prototype.addScrollEventListener = function (handler) {
12045
12084
  if (!!handler) {
@@ -12392,7 +12431,6 @@ var action_BaseAction = /** @class */ (function (_super) {
12392
12431
  function BaseAction() {
12393
12432
  var _this = _super !== null && _super.apply(this, arguments) || this;
12394
12433
  _this.rendredIdValue = BaseAction.getNextRendredId();
12395
- _this.markerIconSize = 16;
12396
12434
  return _this;
12397
12435
  }
12398
12436
  BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
@@ -12647,9 +12685,6 @@ var action_BaseAction = /** @class */ (function (_super) {
12647
12685
  action_decorate([
12648
12686
  jsonobject_property()
12649
12687
  ], BaseAction.prototype, "markerIconName", void 0);
12650
- action_decorate([
12651
- jsonobject_property()
12652
- ], BaseAction.prototype, "markerIconSize", void 0);
12653
12688
  action_decorate([
12654
12689
  jsonobject_property()
12655
12690
  ], BaseAction.prototype, "css", void 0);
@@ -14157,6 +14192,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14157
14192
  SurveyElement.prototype.getTitleToolbar = function () {
14158
14193
  if (!this.titleToolbarValue) {
14159
14194
  this.titleToolbarValue = this.createActionContainer(true);
14195
+ this.titleToolbarValue.locOwner = this;
14160
14196
  this.titleToolbarValue.containerCss = (this.isPanel ? this.cssClasses.panel.titleBar : this.cssClasses.titleBar) || "sv-action-title-bar";
14161
14197
  this.titleToolbarValue.setItems(this.getTitleActions());
14162
14198
  }
@@ -14193,6 +14229,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14193
14229
  }
14194
14230
  this.setPropertyValue("titleActions", actions);
14195
14231
  };
14232
+ SurveyElement.prototype.locStrsChanged = function () {
14233
+ _super.prototype.locStrsChanged.call(this);
14234
+ if (!!this.titleToolbarValue) {
14235
+ this.titleToolbarValue.locStrsChanged();
14236
+ }
14237
+ };
14196
14238
  Object.defineProperty(SurveyElement.prototype, "hasTitleActions", {
14197
14239
  get: function () {
14198
14240
  return this.getTitleActions().length > 0;
@@ -14244,7 +14286,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14244
14286
  this.textProcessorValue = this.surveyImplValue.getTextProcessor();
14245
14287
  this.onSetData();
14246
14288
  }
14247
- if (!!this.survey) {
14289
+ if (!!this.survey /* && !this.isLoadingFromJson*/) {
14248
14290
  this.updateDescriptionVisibility(this.description);
14249
14291
  this.clearCssClasses();
14250
14292
  }
@@ -14387,20 +14429,28 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14387
14429
  });
14388
14430
  Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
14389
14431
  get: function () {
14390
- return this.getPropertyValueWithoutDefault("cssClassesValue");
14391
- },
14392
- set: function (val) {
14393
- this.setPropertyValue("cssClassesValue", val);
14432
+ var res = this.getPropertyValueWithoutDefault("cssClassesValue");
14433
+ if (!res && !this.isCssValueCalculating) {
14434
+ this.isCssValueCalculating = true;
14435
+ res = this.createCssClassesValue();
14436
+ this.isCssValueCalculating = false;
14437
+ }
14438
+ return res;
14394
14439
  },
14395
14440
  enumerable: false,
14396
14441
  configurable: true
14397
14442
  });
14398
14443
  SurveyElement.prototype.ensureCssClassesValue = function () {
14399
14444
  if (!this.cssClassesValue) {
14400
- this.cssClassesValue = this.calcCssClasses(this.css);
14401
- this.updateElementCssCore(this.cssClassesValue);
14445
+ this.createCssClassesValue();
14402
14446
  }
14403
14447
  };
14448
+ SurveyElement.prototype.createCssClassesValue = function () {
14449
+ var res = this.calcCssClasses(this.css);
14450
+ this.setPropertyValue("cssClassesValue", res);
14451
+ this.updateElementCssCore(this.cssClassesValue);
14452
+ return res;
14453
+ };
14404
14454
  Object.defineProperty(SurveyElement.prototype, "cssClasses", {
14405
14455
  /**
14406
14456
  * Returns an object in which keys are UI elements and values are CSS classes applied to them.
@@ -14456,7 +14506,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14456
14506
  this.clearCssClasses();
14457
14507
  };
14458
14508
  SurveyElement.prototype.clearCssClasses = function () {
14459
- this.cssClassesValue = undefined;
14509
+ this.resetPropertyValue("cssClassesValue");
14460
14510
  };
14461
14511
  SurveyElement.prototype.getIsLoadingFromJson = function () {
14462
14512
  if (_super.prototype.getIsLoadingFromJson.call(this))
@@ -14551,7 +14601,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14551
14601
  configurable: true
14552
14602
  });
14553
14603
  SurveyElement.prototype.onFirstRendering = function () {
14554
- this.wasRenderedValue = true;
14604
+ if (!this.wasRendered) {
14605
+ this.wasRenderedValue = true;
14606
+ this.onFirstRenderingCore();
14607
+ }
14608
+ };
14609
+ SurveyElement.prototype.onFirstRenderingCore = function () {
14555
14610
  this.ensureCssClassesValue();
14556
14611
  };
14557
14612
  SurveyElement.prototype.endLoadingFromJson = function () {
@@ -14846,17 +14901,19 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14846
14901
  };
14847
14902
  Object.defineProperty(SurveyElement.prototype, "paddingLeft", {
14848
14903
  get: function () {
14849
- return this.getPropertyValue("paddingLeft", "");
14850
- },
14851
- set: function (val) {
14852
- this.setPropertyValue("paddingLeft", val);
14904
+ var _this = this;
14905
+ return this.getPropertyValue("paddingLeft", undefined, function () { return _this.calcPaddingLeft(); });
14853
14906
  },
14854
14907
  enumerable: false,
14855
14908
  configurable: true
14856
14909
  });
14910
+ SurveyElement.prototype.calcPaddingLeft = function () {
14911
+ return "";
14912
+ };
14857
14913
  Object.defineProperty(SurveyElement.prototype, "paddingRight", {
14858
14914
  get: function () {
14859
- return this.getPropertyValue("paddingRight", "");
14915
+ var _this = this;
14916
+ return this.getPropertyValue("paddingRight", undefined, function () { return _this.calcPaddingRight(); });
14860
14917
  },
14861
14918
  set: function (val) {
14862
14919
  this.setPropertyValue("paddingRight", val);
@@ -14864,6 +14921,13 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14864
14921
  enumerable: false,
14865
14922
  configurable: true
14866
14923
  });
14924
+ SurveyElement.prototype.calcPaddingRight = function () {
14925
+ return "";
14926
+ };
14927
+ SurveyElement.prototype.resetIndents = function () {
14928
+ this.resetPropertyValue("paddingLeft");
14929
+ this.resetPropertyValue("paddingRight");
14930
+ };
14867
14931
  SurveyElement.prototype.updateRootStyle = function () {
14868
14932
  var style = {};
14869
14933
  var _width;
@@ -16375,6 +16439,12 @@ function mergeValues(src, dest) {
16375
16439
  }
16376
16440
  }
16377
16441
  }
16442
+ function updateListCssValues(res, css) {
16443
+ var listCssClasses = {};
16444
+ mergeValues(css.list, listCssClasses);
16445
+ mergeValues(res.list, listCssClasses);
16446
+ res["list"] = listCssClasses;
16447
+ }
16378
16448
  var Logger = /** @class */ (function () {
16379
16449
  function Logger() {
16380
16450
  this._result = "";
@@ -18848,7 +18918,6 @@ var question_Question = /** @class */ (function (_super) {
18848
18918
  _this.createNewArray("validators", function (validator) {
18849
18919
  validator.errorOwner = _this;
18850
18920
  });
18851
- _this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
18852
18921
  _this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; });
18853
18922
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
18854
18923
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
@@ -18876,7 +18945,7 @@ var question_Question = /** @class */ (function (_super) {
18876
18945
  _this.clearCssClasses();
18877
18946
  });
18878
18947
  _this.registerPropertyChangedHandlers(["indent", "rightIndent"], function () {
18879
- _this.onIndentChanged();
18948
+ _this.resetIndents();
18880
18949
  });
18881
18950
  _this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
18882
18951
  _this.initCommentFromSurvey();
@@ -18891,26 +18960,6 @@ var question_Question = /** @class */ (function (_super) {
18891
18960
  Question.getQuestionId = function () {
18892
18961
  return "sq_" + Question.questionCounter++;
18893
18962
  };
18894
- Question.prototype.getCommentTextAreaOptions = function () {
18895
- var _this = this;
18896
- var options = {
18897
- question: this,
18898
- id: function () { return _this.commentId; },
18899
- propertyName: "comment",
18900
- className: function () { return _this.cssClasses.comment; },
18901
- placeholder: function () { return _this.renderedCommentPlaceholder; },
18902
- isDisabledAttr: function () { return _this.isInputReadOnly || false; },
18903
- rows: function () { return _this.commentAreaRows; },
18904
- autoGrow: function () { return _this.autoGrowComment; },
18905
- maxLength: function () { return _this.getOthersMaxLength(); },
18906
- ariaRequired: function () { return _this.a11y_input_ariaRequired; },
18907
- ariaLabel: function () { return _this.a11y_input_ariaLabel; },
18908
- getTextValue: function () { return _this.comment; },
18909
- onTextAreaChange: function (e) { _this.onCommentChange(e); },
18910
- onTextAreaInput: function (e) { _this.onCommentInput(e); },
18911
- };
18912
- return options;
18913
- };
18914
18963
  Question.prototype.isReadOnlyRenderDiv = function () {
18915
18964
  return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
18916
18965
  };
@@ -18955,6 +19004,36 @@ var question_Question = /** @class */ (function (_super) {
18955
19004
  this.locProcessedTitle.sharedData = locTitleValue;
18956
19005
  return locTitleValue;
18957
19006
  };
19007
+ Object.defineProperty(Question.prototype, "commentTextAreaModel", {
19008
+ get: function () {
19009
+ if (!this.commentTextAreaModelValue) {
19010
+ this.commentTextAreaModelValue = new text_area_TextAreaModel(this.getCommentTextAreaOptions());
19011
+ }
19012
+ return this.commentTextAreaModelValue;
19013
+ },
19014
+ enumerable: false,
19015
+ configurable: true
19016
+ });
19017
+ Question.prototype.getCommentTextAreaOptions = function () {
19018
+ var _this = this;
19019
+ var options = {
19020
+ question: this,
19021
+ id: function () { return _this.commentId; },
19022
+ propertyName: "comment",
19023
+ className: function () { return _this.cssClasses.comment; },
19024
+ placeholder: function () { return _this.renderedCommentPlaceholder; },
19025
+ isDisabledAttr: function () { return _this.isInputReadOnly || false; },
19026
+ rows: function () { return _this.commentAreaRows; },
19027
+ autoGrow: function () { return _this.autoGrowComment; },
19028
+ maxLength: function () { return _this.getOthersMaxLength(); },
19029
+ ariaRequired: function () { return _this.a11y_input_ariaRequired; },
19030
+ ariaLabel: function () { return _this.a11y_input_ariaLabel; },
19031
+ getTextValue: function () { return _this.comment; },
19032
+ onTextAreaChange: function (e) { _this.onCommentChange(e); },
19033
+ onTextAreaInput: function (e) { _this.onCommentInput(e); },
19034
+ };
19035
+ return options;
19036
+ };
18958
19037
  Question.prototype.getSurvey = function (live) {
18959
19038
  if (live === void 0) { live = false; }
18960
19039
  if (live) {
@@ -19389,10 +19468,8 @@ var question_Question = /** @class */ (function (_super) {
19389
19468
  this.triggersInfo.push(info);
19390
19469
  return info;
19391
19470
  };
19392
- Question.prototype.runTriggerInfo = function (info, name, value) {
19471
+ Question.prototype.runTriggerInfo = function (info, keys) {
19393
19472
  var expression = this[info.name];
19394
- var keys = {};
19395
- keys[name] = value;
19396
19473
  if (!expression || info.isRunning || !info.canRun()) {
19397
19474
  if (info.runSecondCheck(keys)) {
19398
19475
  info.doComplete();
@@ -19416,12 +19493,16 @@ var question_Question = /** @class */ (function (_super) {
19416
19493
  info.isRunning = true;
19417
19494
  info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
19418
19495
  };
19419
- Question.prototype.runTriggers = function (name, value) {
19496
+ Question.prototype.runTriggers = function (name, value, keys) {
19420
19497
  var _this = this;
19421
19498
  if (this.isSettingQuestionValue || (this.parentQuestion && this.parentQuestion.getValueName() === name))
19422
19499
  return;
19500
+ if (!keys) {
19501
+ keys = {};
19502
+ keys[name] = value;
19503
+ }
19423
19504
  this.triggersInfo.forEach(function (info) {
19424
- _this.runTriggerInfo(info, name, value);
19505
+ _this.runTriggerInfo(info, keys);
19425
19506
  });
19426
19507
  };
19427
19508
  Question.prototype.runConditions = function () {
@@ -19440,7 +19521,6 @@ var question_Question = /** @class */ (function (_super) {
19440
19521
  if (isLight !== true) {
19441
19522
  this.runConditions();
19442
19523
  }
19443
- this.calcRenderedCommentPlaceholder();
19444
19524
  if (!this.visible) {
19445
19525
  this.updateIsVisibleProp();
19446
19526
  }
@@ -19458,7 +19538,9 @@ var question_Question = /** @class */ (function (_super) {
19458
19538
  return;
19459
19539
  this.removeFromParent();
19460
19540
  this.setPropertyValue("parent", val);
19461
- this.updateQuestionCss();
19541
+ if (!!val) {
19542
+ this.updateQuestionCss();
19543
+ }
19462
19544
  this.onParentChanged();
19463
19545
  },
19464
19546
  enumerable: false,
@@ -19786,14 +19868,17 @@ var question_Question = /** @class */ (function (_super) {
19786
19868
  });
19787
19869
  Object.defineProperty(Question.prototype, "renderedCommentPlaceholder", {
19788
19870
  get: function () {
19789
- return this.getPropertyValue("renderedCommentPlaceholder");
19871
+ var _this = this;
19872
+ var func = function () {
19873
+ return !_this.isReadOnly ? _this.commentPlaceHolder : undefined;
19874
+ };
19875
+ return this.getPropertyValue("renderedCommentPlaceholder", undefined, func);
19790
19876
  },
19791
19877
  enumerable: false,
19792
19878
  configurable: true
19793
19879
  });
19794
- Question.prototype.calcRenderedCommentPlaceholder = function () {
19795
- var res = !this.isReadOnly ? this.commentPlaceHolder : undefined;
19796
- this.setPropertyValue("renderedCommentPlaceholder", res);
19880
+ Question.prototype.resetRenderedCommentPlaceholder = function () {
19881
+ this.resetPropertyValue("renderedCommentPlaceholder");
19797
19882
  };
19798
19883
  Question.prototype.getAllErrors = function () {
19799
19884
  return this.errors.slice();
@@ -19821,7 +19906,7 @@ var question_Question = /** @class */ (function (_super) {
19821
19906
  };
19822
19907
  Question.prototype.localeChanged = function () {
19823
19908
  _super.prototype.localeChanged.call(this);
19824
- this.calcRenderedCommentPlaceholder();
19909
+ this.resetRenderedCommentPlaceholder();
19825
19910
  if (!!this.localeChangedCallback) {
19826
19911
  this.localeChangedCallback();
19827
19912
  }
@@ -20063,8 +20148,8 @@ var question_Question = /** @class */ (function (_super) {
20063
20148
  };
20064
20149
  Question.prototype.getCssDescription = function (cssClasses) {
20065
20150
  return new CssClassBuilder()
20066
- .append(cssClasses.description, this.hasDescriptionUnderTitle)
20067
- .append(cssClasses.descriptionUnderInput, this.hasDescriptionUnderInput)
20151
+ .append(cssClasses.description)
20152
+ .append(cssClasses.descriptionUnderInput, this.getDescriptionLocation() == "underInput")
20068
20153
  .toString();
20069
20154
  };
20070
20155
  Question.prototype.showErrorOnCore = function (location) {
@@ -20150,7 +20235,7 @@ var question_Question = /** @class */ (function (_super) {
20150
20235
  if (reNew) {
20151
20236
  this.updateQuestionCss(true);
20152
20237
  }
20153
- this.onIndentChanged();
20238
+ this.resetIndents();
20154
20239
  };
20155
20240
  Question.prototype.updateQuestionCss = function (reNew) {
20156
20241
  if (this.isLoadingFromJson ||
@@ -20204,9 +20289,11 @@ var question_Question = /** @class */ (function (_super) {
20204
20289
  enumerable: false,
20205
20290
  configurable: true
20206
20291
  });
20207
- Question.prototype.onIndentChanged = function () {
20208
- this.paddingLeft = this.getIndentSize(this.indent);
20209
- this.paddingRight = this.getIndentSize(this.rightIndent);
20292
+ Question.prototype.calcPaddingLeft = function () {
20293
+ return this.getIndentSize(this.indent);
20294
+ };
20295
+ Question.prototype.calcPaddingRight = function () {
20296
+ return this.getIndentSize(this.rightIndent);
20210
20297
  };
20211
20298
  Question.prototype.getIndentSize = function (indent) {
20212
20299
  if (indent < 1 || !this.getSurvey() || !this.cssClasses || !this.cssClasses.indent)
@@ -20511,7 +20598,7 @@ var question_Question = /** @class */ (function (_super) {
20511
20598
  this.clearErrors();
20512
20599
  }
20513
20600
  this.updateQuestionCss();
20514
- this.calcRenderedCommentPlaceholder();
20601
+ this.resetRenderedCommentPlaceholder();
20515
20602
  };
20516
20603
  Object.defineProperty(Question.prototype, "enableIf", {
20517
20604
  /**
@@ -20602,15 +20689,10 @@ var question_Question = /** @class */ (function (_super) {
20602
20689
  if (this.isEmpty()) {
20603
20690
  this.initDataFromSurvey();
20604
20691
  }
20605
- this.calcRenderedCommentPlaceholder();
20606
- this.onIndentChanged();
20607
20692
  };
20608
20693
  Question.prototype.onSetData = function () {
20609
20694
  _super.prototype.onSetData.call(this);
20610
- if (!this.survey)
20611
- return;
20612
- this.onIndentChanged();
20613
- if (!this.isDesignMode) {
20695
+ if (!this.isDesignMode && !!this.survey && !this.isLoadingFromJson) {
20614
20696
  this.initDataFromSurvey();
20615
20697
  this.onSurveyValueChanged(this.value);
20616
20698
  this.updateValueWithDefaults();
@@ -20830,7 +20912,6 @@ var question_Question = /** @class */ (function (_super) {
20830
20912
  Question.prototype.clearValueIfInvisibleCore = function (reason) {
20831
20913
  if (this.canClearValueAsInvisible(reason)) {
20832
20914
  this.clearValue();
20833
- this.setValueChangedDirectly(undefined);
20834
20915
  }
20835
20916
  };
20836
20917
  Object.defineProperty(Question.prototype, "clearIfInvisible", {
@@ -22122,7 +22203,7 @@ var question_Question = /** @class */ (function (_super) {
22122
22203
  jsonobject_property()
22123
22204
  ], Question.prototype, "ariaExpanded", void 0);
22124
22205
  question_decorate([
22125
- jsonobject_property({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
22206
+ jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedCommentPlaceholder(); } })
22126
22207
  ], Question.prototype, "commentPlaceholder", void 0);
22127
22208
  question_decorate([
22128
22209
  jsonobject_property()
@@ -24822,12 +24903,12 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
24822
24903
  this.customQuestion.onItemValuePropertyChanged(this, item, item.ownerPropertyName, name, newValue);
24823
24904
  }
24824
24905
  };
24825
- QuestionCustomModelBase.prototype.onFirstRendering = function () {
24906
+ QuestionCustomModelBase.prototype.onFirstRenderingCore = function () {
24907
+ _super.prototype.onFirstRenderingCore.call(this);
24826
24908
  var el = this.getElement();
24827
24909
  if (!!el) {
24828
24910
  el.onFirstRendering();
24829
24911
  }
24830
- _super.prototype.onFirstRendering.call(this);
24831
24912
  };
24832
24913
  QuestionCustomModelBase.prototype.onHidingContent = function () {
24833
24914
  _super.prototype.onHidingContent.call(this);
@@ -26308,6 +26389,9 @@ Serializer.addClass("expression", [
26308
26389
  { name: "isRequired", visible: false },
26309
26390
  { name: "readOnly", visible: false },
26310
26391
  { name: "requiredErrorText", visible: false },
26392
+ { name: "resetValueIf", visible: false },
26393
+ { name: "setValueIf", visible: false },
26394
+ { name: "setValueExpression", visible: false },
26311
26395
  { name: "defaultValueExpression", visible: false },
26312
26396
  { name: "defaultValue", visible: false },
26313
26397
  { name: "correctAnswer", visible: false },
@@ -28017,8 +28101,12 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
28017
28101
  var dataRowIndex = 0;
28018
28102
  for (var i = 0; i < this.rows.length; i++) {
28019
28103
  if (dataRowIndex === index) {
28020
- if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow)
28104
+ if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow) {
28021
28105
  res++;
28106
+ if (i + 1 < this.rows.length && this.rows[i + 1].isDetailRow) {
28107
+ res++;
28108
+ }
28109
+ }
28022
28110
  break;
28023
28111
  }
28024
28112
  res++;
@@ -28117,7 +28205,7 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
28117
28205
  return;
28118
28206
  this.headerRowValue = this.createRenderedRow(this.cssClasses);
28119
28207
  if (this.isRowsDragAndDrop) {
28120
- this.headerRow.cells.push(this.createHeaderCell(null, "action"));
28208
+ this.headerRow.cells.push(this.createHeaderCell(null, "action", this.cssClasses.actionsCellDrag));
28121
28209
  }
28122
28210
  if (this.hasActionCellInRows("start")) {
28123
28211
  this.headerRow.cells.push(this.createHeaderCell(null, "action"));
@@ -28665,22 +28753,23 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
28665
28753
  return null;
28666
28754
  return choices;
28667
28755
  };
28668
- QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellCssClasses = function (cell, cellType) {
28756
+ QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellCssClasses = function (cell, cellType, classMod) {
28669
28757
  cell.className = new CssClassBuilder()
28670
28758
  .append(this.cssClasses.headerCell)
28671
28759
  .append(this.cssClasses.columnTitleCell, this.matrix.isColumnLayoutHorizontal)
28672
28760
  .append(this.cssClasses.emptyCell, !!cell.isEmpty)
28673
28761
  .append(this.cssClasses.cell + "--" + cellType, !!cellType)
28762
+ .append(classMod, !!classMod)
28674
28763
  .toString();
28675
28764
  };
28676
- QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column, cellType) {
28765
+ QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column, cellType, classMod) {
28677
28766
  if (cellType === void 0) { cellType = null; }
28678
28767
  var cell = !!column ? this.createTextCell(column.locTitle) : this.createEmptyCell();
28679
28768
  cell.column = column;
28680
28769
  this.setHeaderCell(column, cell);
28681
28770
  if (!cellType)
28682
28771
  cellType = (!!column && column.cellType !== "default") ? column.cellType : this.matrix.cellType;
28683
- this.setHeaderCellCssClasses(cell, cellType);
28772
+ this.setHeaderCellCssClasses(cell, cellType, classMod);
28684
28773
  return cell;
28685
28774
  };
28686
28775
  QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
@@ -30304,6 +30393,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30304
30393
  }
30305
30394
  };
30306
30395
  QuestionMatrixDropdownModelBase.prototype.runCondition = function (values, properties) {
30396
+ var oldRowVariables = values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName];
30307
30397
  _super.prototype.runCondition.call(this, values, properties);
30308
30398
  var counter = 0;
30309
30399
  var prevTotalValue;
@@ -30315,10 +30405,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30315
30405
  } while (!helpers_Helpers.isTwoValueEquals(prevTotalValue, this.totalValue) &&
30316
30406
  counter < 3);
30317
30407
  this.updateVisibilityBasedOnRows();
30408
+ values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName] = oldRowVariables;
30318
30409
  };
30319
- QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value) {
30320
- _super.prototype.runTriggers.call(this, name, value);
30321
- this.runFuncForCellQuestions(function (q) { q.runTriggers(name, value); });
30410
+ QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value, keys) {
30411
+ _super.prototype.runTriggers.call(this, name, value, keys);
30412
+ this.runFuncForCellQuestions(function (q) { q.runTriggers(name, value, keys); });
30322
30413
  };
30323
30414
  QuestionMatrixDropdownModelBase.prototype.updateElementVisibility = function () {
30324
30415
  _super.prototype.updateElementVisibility.call(this);
@@ -30553,7 +30644,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30553
30644
  /**
30554
30645
  * An error message displayed when users enter a duplicate value into a column that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
30555
30646
  *
30556
- * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
30647
+ * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
30557
30648
  * @see isUniqueCaseSensitive
30558
30649
  */
30559
30650
  get: function () {
@@ -32816,7 +32907,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32816
32907
  return true;
32817
32908
  };
32818
32909
  QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
32819
- if (!row || !this.isRowsDragAndDrop)
32910
+ if (!row || !this.isRowsDragAndDrop || this.isDesignMode)
32820
32911
  return;
32821
32912
  if (this.isBanStartDrag(pointerDownEvent))
32822
32913
  return;
@@ -34131,7 +34222,7 @@ var defaultV2Css = {
34131
34222
  requiredText: "sd-question__required-text",
34132
34223
  number: "sd-element__num",
34133
34224
  description: "sd-description sd-question__description",
34134
- descriptionUnderInput: "sd-description sd-question__description sd-question__description--under-input",
34225
+ descriptionUnderInput: "sd-question__description--under-input",
34135
34226
  comment: "sd-input sd-comment",
34136
34227
  other: "sd-input sd-comment",
34137
34228
  required: "sd-question--required",
@@ -36414,7 +36505,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36414
36505
  _this.updateVisibleIndexes();
36415
36506
  });
36416
36507
  _this.registerPropertyChangedHandlers(["title"], function () {
36417
- _this.calcHasTextInTitle();
36508
+ _this.resetHasTextInTitle();
36418
36509
  });
36419
36510
  _this.dragDropPanelHelper = new drag_drop_panel_helper_v1_DragDropPanelHelperV1(_this);
36420
36511
  return _this;
@@ -36471,6 +36562,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36471
36562
  return "panelbase";
36472
36563
  };
36473
36564
  PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
36565
+ //if(this.surveyImpl === value) return; TODO refactor
36474
36566
  this.blockAnimations();
36475
36567
  _super.prototype.setSurveyImpl.call(this, value, isLight);
36476
36568
  if (this.isDesignMode)
@@ -36490,8 +36582,16 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36490
36582
  col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
36491
36583
  });
36492
36584
  };
36493
- PanelModelBase.prototype.calcHasTextInTitle = function () {
36494
- this.hasTextInTitle = !!this.title;
36585
+ Object.defineProperty(PanelModelBase.prototype, "hasTextInTitle", {
36586
+ get: function () {
36587
+ var _this = this;
36588
+ return this.getPropertyValue("hasTextInTitle", undefined, function () { return !!_this.title; });
36589
+ },
36590
+ enumerable: false,
36591
+ configurable: true
36592
+ });
36593
+ PanelModelBase.prototype.resetHasTextInTitle = function () {
36594
+ this.resetPropertyValue("hasTextInTitle");
36495
36595
  };
36496
36596
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
36497
36597
  get: function () {
@@ -37504,14 +37604,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37504
37604
  }
37505
37605
  this.onElementVisibilityChanged(this);
37506
37606
  this.releaseAnimations();
37507
- this.calcHasTextInTitle();
37508
37607
  };
37509
- PanelModelBase.prototype.onFirstRendering = function () {
37510
- _super.prototype.onFirstRendering.call(this);
37511
- for (var i = 0; i < this.elements.length; i++) {
37512
- this.elements[i].onFirstRendering();
37513
- }
37608
+ PanelModelBase.prototype.onFirstRenderingCore = function () {
37609
+ _super.prototype.onFirstRenderingCore.call(this);
37514
37610
  this.onRowsChanged();
37611
+ this.elements.forEach(function (el) { return el.onFirstRendering(); });
37515
37612
  };
37516
37613
  PanelModelBase.prototype.updateRows = function () {
37517
37614
  if (this.isLoadingFromJson)
@@ -37955,9 +38052,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37955
38052
  PanelModelBase.prototype.getPanelStartIndex = function (index) {
37956
38053
  return index;
37957
38054
  };
37958
- PanelModelBase.prototype.isContinueNumbering = function () {
37959
- return true;
37960
- };
38055
+ PanelModelBase.prototype.isContinueNumbering = function () { return true; };
37961
38056
  Object.defineProperty(PanelModelBase.prototype, "isReadOnly", {
37962
38057
  get: function () {
37963
38058
  var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
@@ -38298,9 +38393,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
38298
38393
  panel_decorate([
38299
38394
  jsonobject_property({ defaultValue: true })
38300
38395
  ], PanelModelBase.prototype, "showTitle", void 0);
38301
- panel_decorate([
38302
- jsonobject_property({ defaultValue: false })
38303
- ], PanelModelBase.prototype, "hasTextInTitle", void 0);
38304
38396
  panel_decorate([
38305
38397
  jsonobject_property({ defaultValue: true })
38306
38398
  ], PanelModelBase.prototype, "showDescription", void 0);
@@ -38329,7 +38421,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
38329
38421
  _this.parent.elementWidthChanged(_this);
38330
38422
  }
38331
38423
  });
38332
- _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
38424
+ _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.resetIndents(); });
38333
38425
  _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
38334
38426
  return _this;
38335
38427
  }
@@ -38350,15 +38442,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
38350
38442
  }
38351
38443
  return _super.prototype.getSurvey.call(this, live);
38352
38444
  };
38353
- PanelModel.prototype.onSurveyLoad = function () {
38354
- _super.prototype.onSurveyLoad.call(this);
38355
- this.onIndentChanged();
38356
- };
38357
- PanelModel.prototype.onSetData = function () {
38358
- _super.prototype.onSetData.call(this);
38359
- this.onIndentChanged();
38360
- this.calcHasTextInTitle();
38361
- };
38362
38445
  Object.defineProperty(PanelModel.prototype, "isPanel", {
38363
38446
  get: function () {
38364
38447
  return true;
@@ -38582,7 +38665,11 @@ var panel_PanelModel = /** @class */ (function (_super) {
38582
38665
  });
38583
38666
  Object.defineProperty(PanelModel.prototype, "innerPaddingLeft", {
38584
38667
  get: function () {
38585
- return this.getPropertyValue("innerPaddingLeft", "");
38668
+ var _this = this;
38669
+ var func = function () {
38670
+ return _this.getIndentSize(_this.innerIndent);
38671
+ };
38672
+ return this.getPropertyValue("innerPaddingLeft", undefined, func);
38586
38673
  },
38587
38674
  set: function (val) {
38588
38675
  this.setPropertyValue("innerPaddingLeft", val);
@@ -38590,18 +38677,23 @@ var panel_PanelModel = /** @class */ (function (_super) {
38590
38677
  enumerable: false,
38591
38678
  configurable: true
38592
38679
  });
38593
- PanelModel.prototype.onIndentChanged = function () {
38594
- if (!this.getSurvey())
38595
- return;
38596
- this.innerPaddingLeft = this.getIndentSize(this.innerIndent);
38597
- this.paddingLeft = this.getIndentSize(this.indent);
38598
- this.paddingRight = this.getIndentSize(this.rightIndent);
38680
+ PanelModel.prototype.calcPaddingLeft = function () {
38681
+ return this.getIndentSize(this.indent);
38682
+ };
38683
+ PanelModel.prototype.calcPaddingRight = function () {
38684
+ return this.getIndentSize(this.rightIndent);
38685
+ };
38686
+ PanelModel.prototype.resetIndents = function () {
38687
+ this.resetPropertyValue("innerPaddingLeft");
38688
+ _super.prototype.resetIndents.call(this);
38599
38689
  };
38600
38690
  PanelModel.prototype.getIndentSize = function (indent) {
38691
+ if (!this.survey)
38692
+ return undefined;
38601
38693
  if (indent < 1)
38602
38694
  return "";
38603
38695
  var css = this.survey["css"];
38604
- if (!css || !css.question.indent)
38696
+ if (!css || !css.question || !css.question.indent)
38605
38697
  return "";
38606
38698
  return indent * css.question.indent + "px";
38607
38699
  };
@@ -39241,11 +39333,6 @@ var page_PageModel = /** @class */ (function (_super) {
39241
39333
  this.removeSelfFromList(this.survey.pages);
39242
39334
  }
39243
39335
  };
39244
- PageModel.prototype.onFirstRendering = function () {
39245
- if (this.wasShown)
39246
- return;
39247
- _super.prototype.onFirstRendering.call(this);
39248
- };
39249
39336
  Object.defineProperty(PageModel.prototype, "visibleIndex", {
39250
39337
  /**
39251
39338
  * The visible index of the page. It has values from 0 to visible page count - 1.
@@ -45478,6 +45565,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45478
45565
  width: width,
45479
45566
  };
45480
45567
  this.onResize.fire(this, options);
45568
+ this.setResponsiveStartWidth(width);
45481
45569
  return isMobileChanged;
45482
45570
  };
45483
45571
  SurveyModel.prototype.triggerResponsiveness = function (hard) {
@@ -45847,7 +45935,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45847
45935
  }, elementsToRenderBefore);
45848
45936
  }
45849
45937
  else {
45850
- if (!elementPage_1 && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
45938
+ if (element.isPage && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
45851
45939
  var elementToScroll = this.rootElement.querySelector(classesToSelector(this.css.rootWrapper));
45852
45940
  survey_element_SurveyElement.ScrollElementToViewCore(elementToScroll, false, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
45853
45941
  }
@@ -46372,12 +46460,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46372
46460
  var question = questions[i];
46373
46461
  this.checkQuestionErrorOnValueChanged(question);
46374
46462
  question.onSurveyValueChanged(newValue);
46375
- this.fireOnValueChanged(valueName, newValue, question);
46376
46463
  }
46377
46464
  }
46378
- else {
46379
- this.fireOnValueChanged(valueName, newValue, null);
46380
- }
46465
+ this.fireOnValueChanged(valueName, newValue, !!questionName ? this.getQuestionByName(questionName) : undefined);
46381
46466
  if (this.isDisposed)
46382
46467
  return;
46383
46468
  this.checkElementsBindings(valueName, newValue);
@@ -46551,11 +46636,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46551
46636
  SurveyModel.prototype.runConditionOnValueChanged = function (name, value) {
46552
46637
  if (this.isRunningConditions) {
46553
46638
  this.conditionValues[name] = value;
46639
+ if (this.questionTriggersKeys) {
46640
+ this.questionTriggersKeys[name] = value;
46641
+ }
46554
46642
  this.isValueChangedOnRunningCondition = true;
46555
46643
  }
46556
46644
  else {
46645
+ this.questionTriggersKeys = {};
46646
+ this.questionTriggersKeys[name] = value;
46557
46647
  this.runConditions();
46558
46648
  this.runQuestionsTriggers(name, value);
46649
+ this.questionTriggersKeys = undefined;
46559
46650
  }
46560
46651
  };
46561
46652
  SurveyModel.prototype.runConditionsCore = function (properties) {
@@ -46572,10 +46663,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46572
46663
  }
46573
46664
  };
46574
46665
  SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
46666
+ var _this = this;
46575
46667
  if (this.isDisplayMode || this.isDesignMode)
46576
46668
  return;
46577
46669
  var questions = this.getAllQuestions();
46578
- questions.forEach(function (q) { return q.runTriggers(name, value); });
46670
+ questions.forEach(function (q) {
46671
+ q.runTriggers(name, value, _this.questionTriggersKeys);
46672
+ });
46579
46673
  };
46580
46674
  SurveyModel.prototype.checkIfNewPagesBecomeVisible = function (oldCurrentPageIndex) {
46581
46675
  var newCurrentPageIndex = this.pages.indexOf(this.currentPage);
@@ -47785,10 +47879,29 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47785
47879
  });
47786
47880
  Object.defineProperty(SurveyModel.prototype, "renderedWidth", {
47787
47881
  get: function () {
47882
+ var isStaticWidth = this.getPropertyValue("calculatedWidthMode") == "static";
47788
47883
  var width = this.getPropertyValue("width");
47884
+ if (this.isScaled && this.responsiveStartWidth > 1) {
47885
+ var initialWidth = this.responsiveStartWidth;
47886
+ try {
47887
+ initialWidth = !isNaN(width) ? width : parseFloat(width.toString().replace("px", ""));
47888
+ }
47889
+ catch (e) { }
47890
+ return (isStaticWidth ? initialWidth : this.responsiveStartWidth) * this.widthScale / 100 + "px";
47891
+ }
47789
47892
  if (width && !isNaN(width))
47790
47893
  width = width + "px";
47791
- return this.getPropertyValue("calculatedWidthMode") == "static" && width || undefined;
47894
+ return isStaticWidth && width || undefined;
47895
+ },
47896
+ enumerable: false,
47897
+ configurable: true
47898
+ });
47899
+ SurveyModel.prototype.setResponsiveStartWidth = function (width) {
47900
+ this.responsiveStartWidth = width;
47901
+ };
47902
+ Object.defineProperty(SurveyModel.prototype, "isScaled", {
47903
+ get: function () {
47904
+ return Math.abs(this.widthScale - 100) > 0.001;
47792
47905
  },
47793
47906
  enumerable: false,
47794
47907
  configurable: true
@@ -48618,6 +48731,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48618
48731
  survey_decorate([
48619
48732
  jsonobject_property()
48620
48733
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
48734
+ survey_decorate([
48735
+ jsonobject_property({ defaultValue: 100 })
48736
+ ], SurveyModel.prototype, "widthScale", void 0);
48737
+ survey_decorate([
48738
+ jsonobject_property()
48739
+ ], SurveyModel.prototype, "responsiveStartWidth", void 0);
48621
48740
  survey_decorate([
48622
48741
  propertyArray()
48623
48742
  ], SurveyModel.prototype, "layoutElements", void 0);
@@ -48993,7 +49112,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
48993
49112
  _this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
48994
49113
  _this.onVisibleChanged();
48995
49114
  });
48996
- _this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
48997
49115
  _this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
48998
49116
  _this.setNewRestfulProperty();
48999
49117
  var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
@@ -49024,6 +49142,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
49024
49142
  enumerable: false,
49025
49143
  configurable: true
49026
49144
  });
49145
+ QuestionSelectBase.prototype.getType = function () {
49146
+ return "selectbase";
49147
+ };
49148
+ QuestionSelectBase.prototype.dispose = function () {
49149
+ _super.prototype.dispose.call(this);
49150
+ var q = this.getQuestionWithChoices();
49151
+ if (!!q) {
49152
+ q.removeDependedQuestion(this);
49153
+ }
49154
+ };
49155
+ Object.defineProperty(QuestionSelectBase.prototype, "otherTextAreaModel", {
49156
+ get: function () {
49157
+ if (!this.otherTextAreaModelValue) {
49158
+ this.otherTextAreaModelValue = new text_area_TextAreaModel(this.getOtherTextAreaOptions());
49159
+ }
49160
+ return this.otherTextAreaModelValue;
49161
+ },
49162
+ enumerable: false,
49163
+ configurable: true
49164
+ });
49027
49165
  QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
49028
49166
  var _this = this;
49029
49167
  var options = {
@@ -49044,16 +49182,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
49044
49182
  };
49045
49183
  return options;
49046
49184
  };
49047
- QuestionSelectBase.prototype.getType = function () {
49048
- return "selectbase";
49049
- };
49050
- QuestionSelectBase.prototype.dispose = function () {
49051
- _super.prototype.dispose.call(this);
49052
- var q = this.getQuestionWithChoices();
49053
- if (!!q) {
49054
- q.removeDependedQuestion(this);
49055
- }
49056
- };
49057
49185
  QuestionSelectBase.prototype.resetDependedQuestion = function () {
49058
49186
  this.choicesFromQuestion = "";
49059
49187
  };
@@ -51220,22 +51348,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
51220
51348
  enumerable: false,
51221
51349
  configurable: true
51222
51350
  });
51223
- QuestionSelectBase.prototype.updateCssClasses = function (res, css) {
51224
- _super.prototype.updateCssClasses.call(this, res, css);
51225
- if (!!this.dropdownListModel) {
51226
- var listCssClasses = {};
51227
- mergeValues(css.list, listCssClasses);
51228
- mergeValues(res.list, listCssClasses);
51229
- res["list"] = listCssClasses;
51230
- }
51231
- };
51232
- QuestionSelectBase.prototype.calcCssClasses = function (css) {
51233
- var classes = _super.prototype.calcCssClasses.call(this, css);
51234
- if (this.dropdownListModel) {
51235
- this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
51236
- }
51237
- return classes;
51238
- };
51239
51351
  question_baseselect_decorate([
51240
51352
  jsonobject_property({
51241
51353
  onSet: function (newVal, target) {
@@ -52409,7 +52521,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52409
52521
  _this.selectedItemSelector = ".sv-list__item--selected";
52410
52522
  _this.itemSelector = ".sv-list__item";
52411
52523
  _this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
52412
- _this.popupCssClasses = "sv-single-select-list";
52413
52524
  _this.listModelFilterStringChanged = function (newValue) {
52414
52525
  if (_this.filterString !== newValue) {
52415
52526
  _this.filterString = newValue;
@@ -52419,7 +52530,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52419
52530
  _this.onPropertyChangedHandler(sender, options);
52420
52531
  };
52421
52532
  _this.htmlCleanerElement = DomDocumentHelper.createElement("div");
52422
- _this.question.ariaExpanded = "false";
52423
52533
  question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
52424
52534
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
52425
52535
  _this.listModel = _this.createListModel();
@@ -52429,6 +52539,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52429
52539
  _this.setTextWrapEnabled(_this.question.textWrapEnabled);
52430
52540
  _this.createPopup();
52431
52541
  _this.resetItemsSettings();
52542
+ var classes = question.cssClasses;
52543
+ _this.updateCssClasses(classes.popup, classes.list);
52432
52544
  return _this;
52433
52545
  }
52434
52546
  Object.defineProperty(DropdownListModel.prototype, "focusFirstInputSelector", {
@@ -52479,11 +52591,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52479
52591
  var _this = this;
52480
52592
  var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
52481
52593
  if (!this.itemsSettings.skip || isUpdate) {
52594
+ this.resetTimer();
52482
52595
  if (!!this.filterString && settings.dropdownSearchDelay > 0) {
52483
- if (!!this.timer) {
52484
- clearTimeout(this.timer);
52485
- this.timer = undefined;
52486
- }
52487
52596
  this.timer = setTimeout(function () {
52488
52597
  _this.loadQuestionChoices(callbackAfterItemsLoaded);
52489
52598
  }, settings.dropdownSearchDelay);
@@ -52493,6 +52602,12 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52493
52602
  }
52494
52603
  }
52495
52604
  };
52605
+ DropdownListModel.prototype.resetTimer = function () {
52606
+ if (!!this.timer) {
52607
+ clearTimeout(this.timer);
52608
+ this.timer = undefined;
52609
+ }
52610
+ };
52496
52611
  DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
52497
52612
  this._popupModel.focusFirstInputSelector = this.focusFirstInputSelector;
52498
52613
  };
@@ -52528,7 +52643,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52528
52643
  this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
52529
52644
  _this.updatePopupFocusFirstInputSelector();
52530
52645
  });
52531
- this._popupModel.cssClass = this.popupCssClasses;
52532
52646
  this._popupModel.onVisibilityChanged.add(function (_, option) {
52533
52647
  if (option.isVisible) {
52534
52648
  _this.listModel.renderElements = true;
@@ -52642,8 +52756,9 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
52642
52756
  model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
52643
52757
  model.actions.forEach(function (a) { return a.disableTabStop = true; });
52644
52758
  };
52759
+ DropdownListModel.prototype.getPopupCssClasses = function () { return "sv-single-select-list"; };
52645
52760
  DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
52646
- this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.popupCssClasses).toString();
52761
+ this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.getPopupCssClasses()).toString();
52647
52762
  this.listModel.cssClasses = listCssClasses;
52648
52763
  };
52649
52764
  DropdownListModel.prototype.resetFilterString = function () {
@@ -53121,6 +53236,7 @@ var question_dropdown_decorate = (undefined && undefined.__decorate) || function
53121
53236
 
53122
53237
 
53123
53238
 
53239
+
53124
53240
  /**
53125
53241
  * A class that describes the Dropdown question type.
53126
53242
  *
@@ -53133,6 +53249,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53133
53249
  _this.lastSelectedItemValue = null;
53134
53250
  _this.minMaxChoices = [];
53135
53251
  _this.onOpened = _this.addEvent();
53252
+ _this.ariaExpanded = "false";
53136
53253
  _this.createLocalizableString("placeholder", _this, false, true);
53137
53254
  _this.createLocalizableString("clearCaption", _this, false, true);
53138
53255
  _this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
@@ -53357,6 +53474,19 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53357
53474
  .append(this.cssClasses.controlInputFieldComponent, !!this.inputFieldComponentName)
53358
53475
  .toString();
53359
53476
  };
53477
+ QuestionDropdownModel.prototype.updateCssClasses = function (res, css) {
53478
+ _super.prototype.updateCssClasses.call(this, res, css);
53479
+ if (this.useDropdownList) {
53480
+ updateListCssValues(res, css);
53481
+ }
53482
+ };
53483
+ QuestionDropdownModel.prototype.calcCssClasses = function (css) {
53484
+ var classes = _super.prototype.calcCssClasses.call(this, css);
53485
+ if (this.dropdownListModelValue) {
53486
+ this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
53487
+ }
53488
+ return classes;
53489
+ };
53360
53490
  Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemLocText", {
53361
53491
  get: function () {
53362
53492
  var item = this.suggestedItem || this.selectedItem;
@@ -53394,9 +53524,14 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53394
53524
  enumerable: false,
53395
53525
  configurable: true
53396
53526
  });
53527
+ Object.defineProperty(QuestionDropdownModel.prototype, "useDropdownList", {
53528
+ get: function () { return this.renderAs !== "select"; },
53529
+ enumerable: false,
53530
+ configurable: true
53531
+ });
53397
53532
  Object.defineProperty(QuestionDropdownModel.prototype, "dropdownListModel", {
53398
53533
  get: function () {
53399
- if (this.renderAs !== "select" && !this.dropdownListModelValue) {
53534
+ if (this.useDropdownList && !this.dropdownListModelValue) {
53400
53535
  this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
53401
53536
  }
53402
53537
  return this.dropdownListModelValue;
@@ -53409,8 +53544,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53409
53544
  });
53410
53545
  Object.defineProperty(QuestionDropdownModel.prototype, "popupModel", {
53411
53546
  get: function () {
53412
- var _a;
53413
- return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
53547
+ return this.dropdownListModel.popupModel;
53414
53548
  },
53415
53549
  enumerable: false,
53416
53550
  configurable: true
@@ -53420,7 +53554,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53420
53554
  };
53421
53555
  QuestionDropdownModel.prototype.onSelectedItemValuesChangedHandler = function (newValue) {
53422
53556
  var _a;
53423
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.setInputStringFromSelectedItem(newValue);
53557
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.setInputStringFromSelectedItem(newValue);
53424
53558
  _super.prototype.onSelectedItemValuesChangedHandler.call(this, newValue);
53425
53559
  };
53426
53560
  QuestionDropdownModel.prototype.hasUnknownValue = function (val, includeOther, isFilteredChoices, checkEmptyValue) {
@@ -53446,7 +53580,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53446
53580
  };
53447
53581
  QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
53448
53582
  _super.prototype.onVisibleChoicesChanged.call(this);
53449
- if (!this.isLoadingFromJson && this.popupModel) {
53583
+ if (!!this.dropdownListModelValue) {
53450
53584
  this.dropdownListModel.updateItems();
53451
53585
  }
53452
53586
  };
@@ -53460,7 +53594,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53460
53594
  var _a;
53461
53595
  _super.prototype.clearValue.call(this, keepComment);
53462
53596
  this.lastSelectedItemValue = null;
53463
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
53597
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
53464
53598
  };
53465
53599
  QuestionDropdownModel.prototype.afterRenderCore = function (el) {
53466
53600
  _super.prototype.afterRenderCore.call(this, el);
@@ -53481,19 +53615,18 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53481
53615
  };
53482
53616
  QuestionDropdownModel.prototype.supportEmptyValidation = function () { return true; };
53483
53617
  QuestionDropdownModel.prototype.onBlurCore = function (event) {
53484
- var _a;
53485
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
53618
+ this.dropdownListModel.onBlur(event);
53486
53619
  _super.prototype.onBlurCore.call(this, event);
53487
53620
  };
53488
53621
  QuestionDropdownModel.prototype.onFocusCore = function (event) {
53489
- var _a;
53490
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
53622
+ this.dropdownListModel.onFocus(event);
53491
53623
  _super.prototype.onFocusCore.call(this, event);
53492
53624
  };
53493
53625
  QuestionDropdownModel.prototype.dispose = function () {
53494
53626
  _super.prototype.dispose.call(this);
53495
53627
  if (!!this.dropdownListModelValue) {
53496
53628
  this.dropdownListModelValue.dispose();
53629
+ this.dropdownListModelValue = undefined;
53497
53630
  }
53498
53631
  };
53499
53632
  question_dropdown_decorate([
@@ -53502,7 +53635,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53502
53635
  question_dropdown_decorate([
53503
53636
  jsonobject_property({
53504
53637
  onSet: function (newValue, target) {
53505
- if (!!target.dropdownListModel) {
53638
+ if (!!target.dropdownListModelValue) {
53506
53639
  target.dropdownListModel.setSearchEnabled(newValue);
53507
53640
  }
53508
53641
  }
@@ -53523,7 +53656,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
53523
53656
  question_dropdown_decorate([
53524
53657
  jsonobject_property({
53525
53658
  onSet: function (newValue, target) {
53526
- if (!!target.dropdownListModel) {
53659
+ if (!!target.dropdownListModelValue) {
53527
53660
  target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
53528
53661
  }
53529
53662
  }
@@ -54617,37 +54750,26 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
54617
54750
  };
54618
54751
  Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
54619
54752
  get: function () {
54620
- return this.getPropertyValue("renderedPlaceholder");
54753
+ var _this = this;
54754
+ var func = function () {
54755
+ return _this.hasPlaceholder() ? _this.placeHolder : undefined;
54756
+ };
54757
+ return this.getPropertyValue("renderedPlaceholder", undefined, func);
54621
54758
  },
54622
54759
  enumerable: false,
54623
54760
  configurable: true
54624
54761
  });
54625
- QuestionTextBase.prototype.setRenderedPlaceholder = function (val) {
54626
- this.setPropertyValue("renderedPlaceholder", val);
54627
- };
54628
54762
  QuestionTextBase.prototype.onReadOnlyChanged = function () {
54629
54763
  _super.prototype.onReadOnlyChanged.call(this);
54630
- this.calcRenderedPlaceholder();
54631
- };
54632
- QuestionTextBase.prototype.onSurveyLoad = function () {
54633
- this.calcRenderedPlaceholder();
54634
- _super.prototype.onSurveyLoad.call(this);
54764
+ this.resetRenderedPlaceholder();
54635
54765
  };
54636
54766
  QuestionTextBase.prototype.localeChanged = function () {
54637
54767
  _super.prototype.localeChanged.call(this);
54638
- this.calcRenderedPlaceholder();
54639
- };
54640
- QuestionTextBase.prototype.setSurveyImpl = function (value, isLight) {
54641
- _super.prototype.setSurveyImpl.call(this, value, isLight);
54642
- this.calcRenderedPlaceholder();
54768
+ this.resetRenderedPlaceholder();
54643
54769
  };
54644
54770
  QuestionTextBase.prototype.supportEmptyValidation = function () { return true; };
54645
- QuestionTextBase.prototype.calcRenderedPlaceholder = function () {
54646
- var res = this.placeHolder;
54647
- if (!!res && !this.hasPlaceholder()) {
54648
- res = undefined;
54649
- }
54650
- this.setRenderedPlaceholder(res);
54771
+ QuestionTextBase.prototype.resetRenderedPlaceholder = function () {
54772
+ this.resetPropertyValue("renderedPlaceholder");
54651
54773
  };
54652
54774
  QuestionTextBase.prototype.hasPlaceholder = function () {
54653
54775
  return !this.isReadOnly;
@@ -54687,7 +54809,7 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
54687
54809
  configurable: true
54688
54810
  });
54689
54811
  question_textbase_decorate([
54690
- jsonobject_property({ localizable: true, onSet: function (val, target) { return target.calcRenderedPlaceholder(); } })
54812
+ jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedPlaceholder(); } })
54691
54813
  ], QuestionTextBase.prototype, "placeholder", void 0);
54692
54814
  return QuestionTextBase;
54693
54815
  }(question_Question));
@@ -54894,7 +55016,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
54894
55016
  });
54895
55017
  _this.registerPropertyChangedHandlers(["inputType", "size"], function () {
54896
55018
  _this.updateInputSize();
54897
- _this.calcRenderedPlaceholder();
55019
+ _this.resetRenderedPlaceholder();
54898
55020
  });
54899
55021
  return _this;
54900
55022
  }
@@ -58307,7 +58429,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
58307
58429
  dropdownMultiSelectListModel_extends(DropdownMultiSelectListModel, _super);
58308
58430
  function DropdownMultiSelectListModel(question, onSelectionChanged) {
58309
58431
  var _this = _super.call(this, question, onSelectionChanged) || this;
58310
- _this.popupCssClasses = "sv-multi-select-list";
58311
58432
  _this.setHideSelectedItems(question.hideSelectedItems);
58312
58433
  _this.syncFilterStringPlaceholder();
58313
58434
  _this.closeOnSelect = question.closeOnSelect;
@@ -58341,6 +58462,7 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
58341
58462
  return _super.prototype.getFocusFirstInputSelector.call(this);
58342
58463
  }
58343
58464
  };
58465
+ DropdownMultiSelectListModel.prototype.getPopupCssClasses = function () { return "sv-multi-select-list"; };
58344
58466
  DropdownMultiSelectListModel.prototype.createListModel = function () {
58345
58467
  var _this = this;
58346
58468
  var visibleItems = this.getAvailableItems();
@@ -58374,7 +58496,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
58374
58496
  elementId: this.listElementId
58375
58497
  };
58376
58498
  var res = new multiSelectListModel_MultiSelectListModel(listOptions);
58377
- res.actions.forEach(function (a) { return a.disableTabStop = true; });
58378
58499
  this.setOnTextSearchCallbackForListModel(res);
58379
58500
  res.forceShowFilter = true;
58380
58501
  return res;
@@ -58539,6 +58660,7 @@ var question_tagbox_decorate = (undefined && undefined.__decorate) || function (
58539
58660
 
58540
58661
 
58541
58662
 
58663
+
58542
58664
  /**
58543
58665
  * A class that describes the Multi-Select Dropdown (Tag Box) question type.
58544
58666
  *
@@ -58550,6 +58672,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58550
58672
  var _this = _super.call(this, name) || this;
58551
58673
  _this.itemDisplayNameMap = {};
58552
58674
  _this.onOpened = _this.addEvent();
58675
+ _this.ariaExpanded = "false";
58553
58676
  _this.createLocalizableString("placeholder", _this, false, true);
58554
58677
  _this.createLocalizableString("clearCaption", _this, false, true);
58555
58678
  _this.createLocalizableString("readOnlyText", _this, true);
@@ -58564,7 +58687,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58564
58687
  var _a;
58565
58688
  _super.prototype.locStrsChanged.call(this);
58566
58689
  this.updateReadOnlyText();
58567
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
58690
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
58568
58691
  };
58569
58692
  QuestionTagboxModel.prototype.updateReadOnlyText = function () {
58570
58693
  this.readOnlyText = this.displayValue || this.placeholder;
@@ -58572,19 +58695,19 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58572
58695
  QuestionTagboxModel.prototype.getDefaultItemComponent = function () {
58573
58696
  return "";
58574
58697
  };
58575
- QuestionTagboxModel.prototype.onSurveyLoad = function () {
58576
- _super.prototype.onSurveyLoad.call(this);
58577
- this.createDropdownListModel();
58578
- };
58579
- QuestionTagboxModel.prototype.onSetData = function () {
58580
- _super.prototype.onSetData.call(this);
58581
- this.createDropdownListModel();
58582
- };
58583
- QuestionTagboxModel.prototype.createDropdownListModel = function () {
58584
- if (!this.dropdownListModel && !this.isLoadingFromJson) {
58585
- this.dropdownListModel = new dropdownMultiSelectListModel_DropdownMultiSelectListModel(this);
58586
- }
58587
- };
58698
+ Object.defineProperty(QuestionTagboxModel.prototype, "dropdownListModel", {
58699
+ get: function () {
58700
+ if (!this.dropdownListModelValue) {
58701
+ this.dropdownListModelValue = new dropdownMultiSelectListModel_DropdownMultiSelectListModel(this);
58702
+ }
58703
+ return this.dropdownListModelValue;
58704
+ },
58705
+ set: function (val) {
58706
+ this.dropdownListModelValue = val;
58707
+ },
58708
+ enumerable: false,
58709
+ configurable: true
58710
+ });
58588
58711
  Object.defineProperty(QuestionTagboxModel.prototype, "placeholder", {
58589
58712
  /**
58590
58713
  * A text displayed in the input field when it doesn't have a value.
@@ -58651,8 +58774,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58651
58774
  });
58652
58775
  Object.defineProperty(QuestionTagboxModel.prototype, "popupModel", {
58653
58776
  get: function () {
58654
- var _a;
58655
- return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
58777
+ return this.dropdownListModel.popupModel;
58656
58778
  },
58657
58779
  enumerable: false,
58658
58780
  configurable: true
@@ -58668,6 +58790,17 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58668
58790
  .append(this.cssClasses.controlPreview, this.isPreviewStyle)
58669
58791
  .toString();
58670
58792
  };
58793
+ QuestionTagboxModel.prototype.updateCssClasses = function (res, css) {
58794
+ _super.prototype.updateCssClasses.call(this, res, css);
58795
+ updateListCssValues(res, css);
58796
+ };
58797
+ QuestionTagboxModel.prototype.calcCssClasses = function (css) {
58798
+ var classes = _super.prototype.calcCssClasses.call(this, css);
58799
+ if (this.dropdownListModelValue) {
58800
+ this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
58801
+ }
58802
+ return classes;
58803
+ };
58671
58804
  QuestionTagboxModel.prototype.onOpenedCallBack = function () {
58672
58805
  this.onOpened.fire(this, { question: this, choices: this.choices });
58673
58806
  };
@@ -58688,7 +58821,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58688
58821
  };
58689
58822
  QuestionTagboxModel.prototype.onVisibleChoicesChanged = function () {
58690
58823
  _super.prototype.onVisibleChoicesChanged.call(this);
58691
- if (this.popupModel) {
58824
+ if (!!this.dropdownListModelValue) {
58692
58825
  this.dropdownListModel.updateItems();
58693
58826
  }
58694
58827
  };
@@ -58736,13 +58869,11 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58736
58869
  };
58737
58870
  QuestionTagboxModel.prototype.supportEmptyValidation = function () { return true; };
58738
58871
  QuestionTagboxModel.prototype.onBlurCore = function (event) {
58739
- var _a;
58740
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
58872
+ this.dropdownListModel.onBlur(event);
58741
58873
  _super.prototype.onBlurCore.call(this, event);
58742
58874
  };
58743
58875
  QuestionTagboxModel.prototype.onFocusCore = function (event) {
58744
- var _a;
58745
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
58876
+ this.dropdownListModel.onFocus(event);
58746
58877
  _super.prototype.onFocusCore.call(this, event);
58747
58878
  };
58748
58879
  QuestionTagboxModel.prototype.allElementsSelected = function () {
@@ -58755,14 +58886,15 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58755
58886
  };
58756
58887
  QuestionTagboxModel.prototype.dispose = function () {
58757
58888
  _super.prototype.dispose.call(this);
58758
- if (!!this.dropdownListModel) {
58759
- this.dropdownListModel.dispose();
58889
+ if (!!this.dropdownListModelValue) {
58890
+ this.dropdownListModelValue.dispose();
58891
+ this.dropdownListModelValue = undefined;
58760
58892
  }
58761
58893
  };
58762
58894
  QuestionTagboxModel.prototype.clearValue = function (keepComment) {
58763
58895
  var _a;
58764
58896
  _super.prototype.clearValue.call(this, keepComment);
58765
- (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
58897
+ (_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
58766
58898
  };
58767
58899
  Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
58768
58900
  get: function () {
@@ -58788,7 +58920,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58788
58920
  question_tagbox_decorate([
58789
58921
  jsonobject_property({
58790
58922
  onSet: function (newValue, target) {
58791
- if (!!target.dropdownListModel) {
58923
+ if (!!target.dropdownListModelValue) {
58792
58924
  target.dropdownListModel.setSearchEnabled(newValue);
58793
58925
  }
58794
58926
  }
@@ -58797,7 +58929,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58797
58929
  question_tagbox_decorate([
58798
58930
  jsonobject_property({
58799
58931
  onSet: function (newValue, target) {
58800
- if (!!target.dropdownListModel) {
58932
+ if (!!target.dropdownListModelValue) {
58801
58933
  target.dropdownListModel.setHideSelectedItems(newValue);
58802
58934
  }
58803
58935
  }
@@ -58806,7 +58938,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
58806
58938
  question_tagbox_decorate([
58807
58939
  jsonobject_property({
58808
58940
  onSet: function (newValue, target) {
58809
- if (!!target.dropdownListModel) {
58941
+ if (!!target.dropdownListModelValue) {
58810
58942
  target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
58811
58943
  }
58812
58944
  }
@@ -60176,10 +60308,18 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
60176
60308
  var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
60177
60309
  question_comment_extends(QuestionCommentModel, _super);
60178
60310
  function QuestionCommentModel(name) {
60179
- var _this_1 = _super.call(this, name) || this;
60180
- _this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
60181
- return _this_1;
60311
+ return _super.call(this, name) || this;
60182
60312
  }
60313
+ Object.defineProperty(QuestionCommentModel.prototype, "textAreaModel", {
60314
+ get: function () {
60315
+ if (!this.textAreaModelValue) {
60316
+ this.textAreaModelValue = new text_area_TextAreaModel(this.getTextAreaOptions());
60317
+ }
60318
+ return this.textAreaModelValue;
60319
+ },
60320
+ enumerable: false,
60321
+ configurable: true
60322
+ });
60183
60323
  QuestionCommentModel.prototype.getTextAreaOptions = function () {
60184
60324
  var _this_1 = this;
60185
60325
  var _this = this;
@@ -60349,6 +60489,12 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
60349
60489
  _super.prototype.setNewValue.call(this, newValue);
60350
60490
  };
60351
60491
  QuestionCommentModel.prototype.getValueSeparator = function () { return "\n"; };
60492
+ QuestionCommentModel.prototype.notifyStateChanged = function (prevState) {
60493
+ _super.prototype.notifyStateChanged.call(this, prevState);
60494
+ if (!this.isCollapsed) {
60495
+ this.textAreaModel.updateElement();
60496
+ }
60497
+ };
60352
60498
  Object.defineProperty(QuestionCommentModel.prototype, "className", {
60353
60499
  get: function () {
60354
60500
  return (this.cssClasses ? this.getControlClass() : "panel-comment-root") || undefined;
@@ -61386,7 +61532,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
61386
61532
  };
61387
61533
  QuestionFileModel.prototype.updateCurrentMode = function () {
61388
61534
  var _this = this;
61389
- if (!this.isDesignMode) {
61535
+ if (!this.isDesignMode && this.survey) {
61390
61536
  if (this.sourceType !== "file") {
61391
61537
  this.camera.hasCamera(function (res) {
61392
61538
  _this.setPropertyValue("currentMode", res && _this.isDefaultV2Theme ? _this.sourceType : "file");
@@ -61601,9 +61747,12 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
61601
61747
  };
61602
61748
  QuestionFileModel.prototype.loadPreview = function (newValue) {
61603
61749
  var _this = this;
61750
+ if (this.showPreview && this.prevLoadedPreviewValue === newValue)
61751
+ return;
61604
61752
  this.previewValue.splice(0, this.previewValue.length);
61605
61753
  if (!this.showPreview || !newValue)
61606
61754
  return;
61755
+ this.prevLoadedPreviewValue = newValue;
61607
61756
  var newValues = Array.isArray(newValue)
61608
61757
  ? newValue
61609
61758
  : !!newValue
@@ -62267,7 +62416,7 @@ var question_radiogroup_QuestionRadiogroupModel = /** @class */ (function (_supe
62267
62416
  var actions = [];
62268
62417
  if (this.isDefaultV2Theme && !this.isDesignMode) {
62269
62418
  var clearAction = new action_Action({
62270
- title: this.clearButtonCaption,
62419
+ locTitleName: "clearCaption",
62271
62420
  id: "sv-clr-btn-" + this.id,
62272
62421
  action: function () { _this.clearValue(true); },
62273
62422
  innerCss: this.cssClasses.clearButton,
@@ -63229,7 +63378,8 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63229
63378
  };
63230
63379
  QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
63231
63380
  if (!this.dropdownListModelValue) {
63232
- this.dropdownListModel = new dropdownListModel_DropdownListModel(this);
63381
+ this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
63382
+ this.ariaExpanded = "false";
63233
63383
  }
63234
63384
  };
63235
63385
  QuestionRatingModel.prototype.getCompactRenderAs = function () {
@@ -63247,6 +63397,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63247
63397
  },
63248
63398
  set: function (val) {
63249
63399
  this.dropdownListModelValue = val;
63400
+ this.ariaExpanded = !!val ? "false" : undefined;
63250
63401
  this.updateElementCss();
63251
63402
  },
63252
63403
  enumerable: false,
@@ -63259,17 +63410,12 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63259
63410
  };
63260
63411
  QuestionRatingModel.prototype.updateCssClasses = function (res, css) {
63261
63412
  _super.prototype.updateCssClasses.call(this, res, css);
63262
- if (!!this.dropdownListModel) {
63263
- var listCssClasses = {};
63264
- mergeValues(css.list, listCssClasses);
63265
- mergeValues(res.list, listCssClasses);
63266
- res["list"] = listCssClasses;
63267
- }
63413
+ updateListCssValues(res, css);
63268
63414
  };
63269
63415
  QuestionRatingModel.prototype.calcCssClasses = function (css) {
63270
63416
  var classes = _super.prototype.calcCssClasses.call(this, css);
63271
- if (this.dropdownListModel) {
63272
- this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
63417
+ if (this.dropdownListModelValue) {
63418
+ this.dropdownListModelValue.updateCssClasses(classes.popup, classes.list);
63273
63419
  }
63274
63420
  return classes;
63275
63421
  };
@@ -63289,6 +63435,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
63289
63435
  _super.prototype.dispose.call(this);
63290
63436
  if (!!this.dropdownListModelValue) {
63291
63437
  this.dropdownListModelValue.dispose();
63438
+ this.dropdownListModelValue = undefined;
63292
63439
  }
63293
63440
  };
63294
63441
  QuestionRatingModel.colorsCalculated = false;
@@ -66514,7 +66661,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66514
66661
  /**
66515
66662
  * A placeholder for tab titles that applies when the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) expression doesn't produce a meaningful value.
66516
66663
  *
66517
- * Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization))
66664
+ * Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization))
66518
66665
  */
66519
66666
  get: function () {
66520
66667
  return this.locTabTitlePlaceholder.text;
@@ -66942,7 +67089,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66942
67089
  /**
66943
67090
  * An error message displayed when users enter a duplicate value into a question that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
66944
67091
  *
66945
- * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
67092
+ * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
66946
67093
  * @see keyName
66947
67094
  */
66948
67095
  get: function () {
@@ -68147,8 +68294,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68147
68294
  enumerable: false,
68148
68295
  configurable: true
68149
68296
  });
68150
- QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
68151
- _super.prototype.onFirstRendering.call(this);
68297
+ QuestionPanelDynamicModel.prototype.onFirstRenderingCore = function () {
68298
+ _super.prototype.onFirstRenderingCore.call(this);
68152
68299
  this.buildPanelsFirstTime();
68153
68300
  this.template.onFirstRendering();
68154
68301
  for (var i = 0; i < this.panelsCore.length; i++) {
@@ -68165,10 +68312,10 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68165
68312
  _super.prototype.runCondition.call(this, values, properties);
68166
68313
  this.runPanelsCondition(this.panelsCore, values, properties);
68167
68314
  };
68168
- QuestionPanelDynamicModel.prototype.runTriggers = function (name, value) {
68169
- _super.prototype.runTriggers.call(this, name, value);
68315
+ QuestionPanelDynamicModel.prototype.runTriggers = function (name, value, keys) {
68316
+ _super.prototype.runTriggers.call(this, name, value, keys);
68170
68317
  this.visiblePanelsCore.forEach(function (p) {
68171
- p.questions.forEach(function (q) { return q.runTriggers(name, value); });
68318
+ p.questions.forEach(function (q) { return q.runTriggers(name, value, keys); });
68172
68319
  });
68173
68320
  };
68174
68321
  QuestionPanelDynamicModel.prototype.reRunCondition = function () {
@@ -68435,12 +68582,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68435
68582
  if (!this.isDesignMode && !this.isReadOnly && !this.isValueEmpty(panel.getValue())) {
68436
68583
  this.runPanelsCondition([panel], this.getDataFilteredValues(), this.getDataFilteredProperties());
68437
68584
  }
68438
- panel.onFirstRendering();
68439
68585
  var questions = panel.questions;
68440
68586
  for (var i = 0; i < questions.length; i++) {
68441
68587
  questions[i].setParentQuestion(this);
68442
68588
  }
68443
- panel.locStrsChanged();
68589
+ if (this.wasRendered) {
68590
+ panel.onFirstRendering();
68591
+ panel.locStrsChanged();
68592
+ }
68444
68593
  panel.onGetFooterActionsCallback = function () {
68445
68594
  return _this.getPanelActions(panel);
68446
68595
  };
@@ -68536,7 +68685,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68536
68685
  };
68537
68686
  QuestionPanelDynamicModel.prototype.onSetData = function () {
68538
68687
  _super.prototype.onSetData.call(this);
68539
- if (this.useTemplatePanel) {
68688
+ if (!this.isLoadingFromJson && this.useTemplatePanel) {
68540
68689
  this.setTemplatePanelSurveyImpl();
68541
68690
  this.rebuildPanels();
68542
68691
  }
@@ -70614,7 +70763,7 @@ var mask_base_InputMaskBase = /** @class */ (function (_super) {
70614
70763
  var properties = Serializer.getProperties(this.getType());
70615
70764
  properties.forEach(function (property) {
70616
70765
  var currentValue = json[property.name];
70617
- _this[property.name] = currentValue !== undefined ? currentValue : property.defaultValue;
70766
+ _this[property.name] = currentValue !== undefined ? currentValue : property.getDefaultValue(_this);
70618
70767
  });
70619
70768
  };
70620
70769
  InputMaskBase.prototype.getData = function () {
@@ -71995,8 +72144,8 @@ Serializer.addClass("currencymask", [
71995
72144
 
71996
72145
  var Version;
71997
72146
  var ReleaseDate;
71998
- Version = "" + "1.12.12";
71999
- ReleaseDate = "" + "2024-11-26";
72147
+ Version = "" + "1.12.14";
72148
+ ReleaseDate = "" + "2024-12-09";
72000
72149
  function checkLibraryVersion(ver, libraryName) {
72001
72150
  if (Version != ver) {
72002
72151
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -83451,7 +83600,7 @@ var title_element_TitleElement = /** @class */ (function (_super) {
83451
83600
  if (!this.element.getCssTitleExpandableSvg())
83452
83601
  return null;
83453
83602
  var iconName = this.element.isExpanded ? "icon-collapse-16x16" : "icon-expand-16x16";
83454
- return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: iconName, size: 16 });
83603
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: iconName, size: "auto" });
83455
83604
  };
83456
83605
  TitleElement.prototype.render = function () {
83457
83606
  var element = this.element;
@@ -83563,6 +83712,7 @@ var text_area_TextAreaComponent = /** @class */ (function (_super) {
83563
83712
  function TextAreaComponent(props) {
83564
83713
  var _this = _super.call(this, props) || this;
83565
83714
  _this.initialValue = _this.viewModel.getTextValue() || "";
83715
+ _this.textareaRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
83566
83716
  return _this;
83567
83717
  }
83568
83718
  Object.defineProperty(TextAreaComponent.prototype, "viewModel", {
@@ -83575,9 +83725,20 @@ var text_area_TextAreaComponent = /** @class */ (function (_super) {
83575
83725
  TextAreaComponent.prototype.canRender = function () {
83576
83726
  return !!this.viewModel.question;
83577
83727
  };
83728
+ TextAreaComponent.prototype.componentDidMount = function () {
83729
+ _super.prototype.componentDidMount.call(this);
83730
+ var el = this.textareaRef.current;
83731
+ if (!!el) {
83732
+ this.viewModel.setElement(el);
83733
+ }
83734
+ };
83735
+ TextAreaComponent.prototype.componentWillUnmount = function () {
83736
+ _super.prototype.componentWillUnmount.call(this);
83737
+ this.viewModel.resetElement();
83738
+ };
83578
83739
  TextAreaComponent.prototype.renderElement = function () {
83579
83740
  var _this = this;
83580
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: function (textarea) { return (_this.viewModel.setElement(textarea)); }, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: function (event) { _this.viewModel.onTextAreaInput(event); }, onFocus: function (event) { _this.viewModel.onTextAreaFocus(event); }, onBlur: function (event) { _this.viewModel.onTextAreaBlur(event); }, onKeyDown: function (event) { _this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
83741
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: this.textareaRef, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: function (event) { _this.viewModel.onTextAreaInput(event); }, onFocus: function (event) { _this.viewModel.onTextAreaFocus(event); }, onBlur: function (event) { _this.viewModel.onTextAreaBlur(event); }, onKeyDown: function (event) { _this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
83581
83742
  };
83582
83743
  return TextAreaComponent;
83583
83744
  }(reactquestion_element_SurveyElementBase));
@@ -90377,7 +90538,7 @@ var list_item_content_ListItemContent = /** @class */ (function (_super) {
90377
90538
  content.push(text);
90378
90539
  }
90379
90540
  if (this.item.markerIconName) {
90380
- var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: this.item.markerIconSize });
90541
+ var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: "auto" });
90381
90542
  content.push(icon);
90382
90543
  }
90383
90544
  return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, content);