survey-react 1.11.13 → 1.11.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.11.13
2
+ * surveyjs - Survey JavaScript library v1.11.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
  */
@@ -1941,6 +1941,7 @@ var englishStrings = {
1941
1941
  refuseItemText: "Refuse to answer",
1942
1942
  dontKnowItemText: "Don't know",
1943
1943
  selectAllItemText: "Select All",
1944
+ deselectAllItemText: "Deselect all",
1944
1945
  progressText: "Page {0} of {1}",
1945
1946
  indexText: "{0} of {1}",
1946
1947
  panelDynamicProgressText: "{0} of {1}",
@@ -3376,13 +3377,27 @@ var JsonMetadata = /** @class */ (function () {
3376
3377
  invalidNames = [];
3377
3378
  for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
3378
3379
  var dProp = dynamicProps[i_1];
3379
- if (!hash[dProp.name] && invalidNames.indexOf(dProp.name) < 0) {
3380
+ if (invalidNames.indexOf(dProp.name) < 0 && this.canAddDybamicProp(dProp, hash[dProp.name])) {
3380
3381
  res.push(dProp);
3381
3382
  }
3382
3383
  }
3383
3384
  this.dynamicPropsCache[cacheType] = res;
3384
3385
  return res;
3385
3386
  };
3387
+ JsonMetadata.prototype.canAddDybamicProp = function (dProp, orgProp) {
3388
+ if (!orgProp)
3389
+ return true;
3390
+ if (dProp === orgProp)
3391
+ return false;
3392
+ var classInfo = dProp.classInfo;
3393
+ while (classInfo && classInfo.parentName) {
3394
+ dProp = this.findProperty(classInfo.parentName, dProp.name);
3395
+ if (dProp && dProp === orgProp)
3396
+ return true;
3397
+ classInfo = !!dProp ? dProp.classInfo : undefined;
3398
+ }
3399
+ return false;
3400
+ };
3386
3401
  JsonMetadata.prototype.hasOriginalProperty = function (obj, propName) {
3387
3402
  return !!this.getOriginalProperty(obj, propName);
3388
3403
  };
@@ -4847,16 +4862,16 @@ function dateFromFirstParameterOrToday(params) {
4847
4862
  }
4848
4863
  return date;
4849
4864
  }
4850
- function year(params) {
4865
+ function functionsfactory_year(params) {
4851
4866
  var date = dateFromFirstParameterOrToday(params);
4852
4867
  return date.getFullYear();
4853
4868
  }
4854
- functionsfactory_FunctionFactory.Instance.register("year", year);
4855
- function month(params) {
4869
+ functionsfactory_FunctionFactory.Instance.register("year", functionsfactory_year);
4870
+ function functionsfactory_month(params) {
4856
4871
  var date = dateFromFirstParameterOrToday(params);
4857
4872
  return date.getMonth() + 1;
4858
4873
  }
4859
- functionsfactory_FunctionFactory.Instance.register("month", month);
4874
+ functionsfactory_FunctionFactory.Instance.register("month", functionsfactory_month);
4860
4875
  function day(params) {
4861
4876
  var date = dateFromFirstParameterOrToday(params);
4862
4877
  return date.getDate();
@@ -4870,6 +4885,13 @@ functionsfactory_FunctionFactory.Instance.register("weekday", weekday);
4870
4885
  function getQuestionValueByContext(context, name) {
4871
4886
  if (!context || !name)
4872
4887
  return undefined;
4888
+ var q = context.question;
4889
+ while (q && q.parent) {
4890
+ var res = q.parent.getQuestionByName(name);
4891
+ if (!!res)
4892
+ return res;
4893
+ q = q.parentQuestion;
4894
+ }
4873
4895
  var keys = ["row", "panel", "survey"];
4874
4896
  for (var i = 0; i < keys.length; i++) {
4875
4897
  var ctx = context[keys[i]];
@@ -4881,15 +4903,31 @@ function getQuestionValueByContext(context, name) {
4881
4903
  }
4882
4904
  return null;
4883
4905
  }
4906
+ function getDisplayValueReturnResult(q, params) {
4907
+ if (params.length > 1 && !helpers_Helpers.isValueEmpty(params[1]))
4908
+ return q.getDisplayValue(true, params[1]);
4909
+ return q.displayValue;
4910
+ }
4884
4911
  function displayValue(params) {
4912
+ var _this = this;
4885
4913
  var q = getQuestionValueByContext(this, params[0]);
4886
4914
  if (!q)
4887
4915
  return "";
4888
- if (params.length > 1 && !helpers_Helpers.isValueEmpty(params[1]))
4889
- return q.getDisplayValue(true, params[1]);
4890
- return q.displayValue;
4916
+ if (q.isReady) {
4917
+ this.returnResult(getDisplayValueReturnResult(q, params));
4918
+ }
4919
+ else {
4920
+ var displayValueOnReadyChanged_1 = function (sender, options) {
4921
+ if (sender.isReady) {
4922
+ sender.onReadyChanged.remove(displayValueOnReadyChanged_1);
4923
+ _this.returnResult(getDisplayValueReturnResult(sender, params));
4924
+ }
4925
+ };
4926
+ q.onReadyChanged.add(displayValueOnReadyChanged_1);
4927
+ }
4928
+ return undefined;
4891
4929
  }
4892
- functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue);
4930
+ functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue, true);
4893
4931
  function propertyValue(params) {
4894
4932
  if (params.length !== 2 || !params[0] || !params[1])
4895
4933
  return undefined;
@@ -11192,6 +11230,9 @@ var list_ListModel = /** @class */ (function (_super) {
11192
11230
  list_decorate([
11193
11231
  jsonobject_property({ defaultValue: false })
11194
11232
  ], ListModel.prototype, "textWrapEnabled", void 0);
11233
+ list_decorate([
11234
+ jsonobject_property({ defaultValue: "sv-list-item-content" })
11235
+ ], ListModel.prototype, "itemComponent", void 0);
11195
11236
  return ListModel;
11196
11237
  }(container_ActionContainer));
11197
11238
 
@@ -11824,7 +11865,7 @@ var action_Action = /** @class */ (function (_super) {
11824
11865
  evt.stopPropagation();
11825
11866
  return true;
11826
11867
  };
11827
- Action.prototype.doMouseDown = function () {
11868
+ Action.prototype.doMouseDown = function (args) {
11828
11869
  this.isMouseDown = true;
11829
11870
  };
11830
11871
  Action.prototype.doFocus = function (args) {
@@ -15758,7 +15799,7 @@ var settings = {
15758
15799
  * Nested properties:
15759
15800
  *
15760
15801
  * - `lifetime`: `number`\
15761
- * Specifies a time period during which a notification is displayed; measured in milliseconds.
15802
+ * Specifies a time period during which a notification is displayed; measured in milliseconds. Default value: 2000.
15762
15803
  */
15763
15804
  notifications: {
15764
15805
  lifetime: 2000
@@ -17325,7 +17366,7 @@ var question_Question = /** @class */ (function (_super) {
17325
17366
  _this.registerFunctionOnPropertiesValueChanged(["no", "readOnly", "hasVisibleErrors", "containsErrors"], function () {
17326
17367
  _this.updateQuestionCss();
17327
17368
  });
17328
- _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
17369
+ _this.registerPropertyChangedHandlers(["_isMobile"], function () { _this.onMobileChanged(); });
17329
17370
  _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
17330
17371
  return _this;
17331
17372
  }
@@ -17342,8 +17383,22 @@ var question_Question = /** @class */ (function (_super) {
17342
17383
  this.setIsMobile(this.survey._isMobile);
17343
17384
  };
17344
17385
  Question.prototype.setIsMobile = function (val) {
17345
- this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
17386
+ var newVal = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
17387
+ this.isMobile = newVal;
17388
+ };
17389
+ Question.prototype.getIsMobile = function () {
17390
+ return this._isMobile;
17346
17391
  };
17392
+ Object.defineProperty(Question.prototype, "isMobile", {
17393
+ get: function () {
17394
+ return this.getIsMobile();
17395
+ },
17396
+ set: function (val) {
17397
+ this._isMobile = val;
17398
+ },
17399
+ enumerable: false,
17400
+ configurable: true
17401
+ });
17347
17402
  Question.prototype.themeChanged = function (theme) { };
17348
17403
  Question.prototype.getDefaultTitle = function () { return this.name; };
17349
17404
  Question.prototype.createLocTitleProperty = function () {
@@ -18539,6 +18594,7 @@ var question_Question = /** @class */ (function (_super) {
18539
18594
  Question.prototype.getRootCss = function () {
18540
18595
  return new CssClassBuilder()
18541
18596
  .append(this.cssRoot)
18597
+ .append(this.cssClasses.mobile, this.isMobile)
18542
18598
  .append(this.cssClasses.readOnly, this.isReadOnlyStyle)
18543
18599
  .append(this.cssClasses.disabled, this.isDisabledStyle)
18544
18600
  .append(this.cssClasses.preview, this.isPreviewStyle)
@@ -19709,7 +19765,8 @@ var question_Question = /** @class */ (function (_super) {
19709
19765
  Object.defineProperty(Question.prototype, "validators", {
19710
19766
  /**
19711
19767
  * Question validators.
19712
- * @see [Data Validation](https://surveyjs.io/form-library/documentation/data-validation)
19768
+ *
19769
+ * [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
19713
19770
  */
19714
19771
  get: function () {
19715
19772
  return this.getPropertyValue("validators");
@@ -20482,7 +20539,7 @@ var question_Question = /** @class */ (function (_super) {
20482
20539
  Question.questionCounter = 100;
20483
20540
  question_decorate([
20484
20541
  jsonobject_property({ defaultValue: false })
20485
- ], Question.prototype, "isMobile", void 0);
20542
+ ], Question.prototype, "_isMobile", void 0);
20486
20543
  question_decorate([
20487
20544
  jsonobject_property()
20488
20545
  ], Question.prototype, "forceIsInputReadOnly", void 0);
@@ -22694,6 +22751,25 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22694
22751
  enumerable: false,
22695
22752
  configurable: true
22696
22753
  });
22754
+ Object.defineProperty(QuestionMatrixBaseModel.prototype, "displayMode", {
22755
+ get: function () {
22756
+ return this.getPropertyValue("displayMode");
22757
+ },
22758
+ /**
22759
+ * Specifies how to arrange matrix questions.
22760
+ *
22761
+ * Possible values:
22762
+ *
22763
+ * - `"table"` - Displays matrix questions in a table.
22764
+ * - `"list"` - Displays matrix questions one under another as a list.
22765
+ * - `"auto"` (default) - Uses the `"table"` mode if the survey has sufficient width to fit the table or the `"list"` mode otherwise.
22766
+ */
22767
+ set: function (val) {
22768
+ this.setPropertyValue("displayMode", val);
22769
+ },
22770
+ enumerable: false,
22771
+ configurable: true
22772
+ });
22697
22773
  //a11y
22698
22774
  QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
22699
22775
  var row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase();
@@ -22707,6 +22783,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
22707
22783
  enumerable: false,
22708
22784
  configurable: true
22709
22785
  });
22786
+ // EO a11y
22787
+ QuestionMatrixBaseModel.prototype.getIsMobile = function () {
22788
+ if (this.displayMode == "auto")
22789
+ return _super.prototype.getIsMobile.call(this);
22790
+ return this.displayMode === "list";
22791
+ };
22710
22792
  martixBase_decorate([
22711
22793
  jsonobject_property()
22712
22794
  ], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
@@ -22727,7 +22809,13 @@ Serializer.addClass("matrixbase", [
22727
22809
  choices: ["top", "middle"],
22728
22810
  default: "middle",
22729
22811
  },
22730
- { name: "alternateRows:boolean", default: false }
22812
+ { name: "alternateRows:boolean", default: false },
22813
+ {
22814
+ name: "displayMode",
22815
+ default: "auto",
22816
+ choices: ["auto", "table", "list"],
22817
+ visible: false
22818
+ },
22731
22819
  ], undefined, "question");
22732
22820
 
22733
22821
  // CONCATENATED MODULE: ./packages/survey-core/src/textPreProcessor.ts
@@ -28031,12 +28119,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
28031
28119
  "rowCount",
28032
28120
  "hasFooter",
28033
28121
  "detailPanelMode",
28122
+ "displayMode"
28034
28123
  ], function () {
28035
28124
  _this.resetRenderedTable();
28036
28125
  });
28037
- _this.registerPropertyChangedHandlers(["isMobile"], function () {
28038
- _this.resetRenderedTable();
28039
- });
28040
28126
  return _this;
28041
28127
  }
28042
28128
  Object.defineProperty(QuestionMatrixDropdownModelBase, "defaultCellType", {
@@ -29800,6 +29886,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29800
29886
  enumerable: false,
29801
29887
  configurable: true
29802
29888
  });
29889
+ QuestionMatrixDropdownModelBase.prototype.onMobileChanged = function () {
29890
+ _super.prototype.onMobileChanged.call(this);
29891
+ this.resetRenderedTable();
29892
+ };
29803
29893
  QuestionMatrixDropdownModelBase.prototype.getRootCss = function () {
29804
29894
  return new CssClassBuilder().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.rootScroll, this.horizontalScroll).toString();
29805
29895
  };
@@ -32211,6 +32301,7 @@ var defaultV2Css = {
32211
32301
  question: {
32212
32302
  contentFadeIn: "sd-element__content--fade-in",
32213
32303
  contentFadeOut: "sd-element__content--fade-out",
32304
+ mobile: "sd-question--mobile",
32214
32305
  fadeIn: "sd-element-wrapper--fade-in",
32215
32306
  fadeOut: "sd-element-wrapper--fade-out",
32216
32307
  mainRoot: "sd-element sd-question sd-row__question",
@@ -38587,6 +38678,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38587
38678
  _this.isNavigationButtonPressed = false;
38588
38679
  _this.mouseDownPage = null;
38589
38680
  _this.isCalculatingProgressText = false;
38681
+ /**
38682
+ * An event that is raised when the survey's width or height is changed.
38683
+ */
38684
+ _this.onResize = new EventBase();
38590
38685
  _this.isCurrentPageRendering = true;
38591
38686
  _this.isCurrentPageRendered = undefined;
38592
38687
  _this.isTriggerIsRunning = false;
@@ -43256,7 +43351,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43256
43351
  isProcessed_1 = false;
43257
43352
  }
43258
43353
  else {
43259
- isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
43354
+ isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1, observedElement.offsetHeight);
43260
43355
  }
43261
43356
  });
43262
43357
  });
@@ -43270,13 +43365,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43270
43365
  this.rootElement = htmlElement;
43271
43366
  this.addScrollEventListener();
43272
43367
  };
43273
- SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
43368
+ SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
43274
43369
  var isMobile = width < mobileWidth;
43275
43370
  var isMobileChanged = this.isMobile !== isMobile;
43276
- if (isMobileChanged) {
43277
- this.setIsMobile(isMobile);
43278
- }
43371
+ this.setIsMobile(isMobile);
43279
43372
  this.layoutElements.forEach(function (layoutElement) { return layoutElement.processResponsiveness && layoutElement.processResponsiveness(width); });
43373
+ var options = {
43374
+ height: height,
43375
+ width: width,
43376
+ };
43377
+ this.onResize.fire(this, options);
43280
43378
  return isMobileChanged;
43281
43379
  };
43282
43380
  SurveyModel.prototype.triggerResponsiveness = function (hard) {
@@ -43685,36 +43783,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43685
43783
  this.uploadFilesCore(name, files, callback);
43686
43784
  }
43687
43785
  };
43688
- /**
43689
- * Downloads a file from a server.
43690
- *
43691
- * The following code shows how to call this method:
43692
- *
43693
- * ```js
43694
- * const question = survey.getQuestionByName("myFileQuestion");
43695
- * survey.downloadFile(
43696
- * question,
43697
- * question.name,
43698
- * // Download the first uploaded file
43699
- * question.value[0],
43700
- * (status, data) => {
43701
- * if (status === "success") {
43702
- * // Use `data` to retrieve the file
43703
- * }
43704
- * if (status === "error") {
43705
- * // Handle error
43706
- * }
43707
- * }
43708
- * );
43709
- * ```
43710
- *
43711
- * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
43712
- * @param questionName The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
43713
- * @param fileValue An object from File Upload's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) array. This object contains metadata about the file you want to download.
43714
- * @param callback A callback function that allows you to get the download status (`"success"` or `"error"`) and the file identifier (URL, file name, etc.) that you can use to retrieve the file.
43715
- * @see onDownloadFile
43716
- * @see uploadFiles
43717
- */
43718
43786
  SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
43719
43787
  if (this.onDownloadFile.isEmpty) {
43720
43788
  !!callback && callback("skipped", fileValue.content || fileValue);
@@ -45500,6 +45568,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45500
45568
  * A survey width in CSS values.
45501
45569
  *
45502
45570
  * Default value: `undefined` (the survey inherits the width from its container)
45571
+ * @see onResize
45503
45572
  */
45504
45573
  get: function () {
45505
45574
  return this.getPropertyValue("width");
@@ -47291,6 +47360,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47291
47360
  QuestionSelectBase.prototype.clearValue = function (keepComment) {
47292
47361
  _super.prototype.clearValue.call(this, keepComment);
47293
47362
  this.prevOtherValue = undefined;
47363
+ this.selectedItemValues = undefined;
47294
47364
  };
47295
47365
  QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
47296
47366
  _super.prototype.updateCommentFromSurvey.call(this, newValue);
@@ -52964,8 +53034,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
52964
53034
  }
52965
53035
  if (this.inputType === "month") {
52966
53036
  var d = new Date(newValue);
52967
- var m = d.getMonth() + 1;
52968
- return d.getFullYear() + "-" + (m < 10 ? "0" : "") + m;
53037
+ var isUtc = d.toISOString().indexOf(newValue) == 0 && newValue.indexOf("T") == -1;
53038
+ var month = isUtc ? d.getUTCMonth() : d.getMonth();
53039
+ var year = isUtc ? d.getUTCFullYear() : d.getFullYear();
53040
+ var m = month + 1;
53041
+ return year + "-" + (m < 10 ? "0" : "") + m;
52969
53042
  }
52970
53043
  return newValue;
52971
53044
  };
@@ -54865,9 +54938,9 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
54865
54938
  _this.isChangingValueOnClearIncorrect = false;
54866
54939
  _this.selectAllItemValue = new itemvalue_ItemValue("");
54867
54940
  _this.selectAllItemValue.id = "selectall";
54868
- var selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
54941
+ _this.selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
54869
54942
  _this.selectAllItem.locOwner = _this;
54870
- _this.selectAllItem.setLocText(selectAllItemText);
54943
+ _this.selectAllItem.setLocText(_this.selectAllItemText);
54871
54944
  _this.registerPropertyChangedHandlers(["showSelectAllItem", "selectAllText"], function () {
54872
54945
  _this.onVisibleChoicesChanged();
54873
54946
  });
@@ -54974,28 +55047,7 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
54974
55047
  * @see showSelectAllItem
54975
55048
  */
54976
55049
  get: function () {
54977
- var noneItems = this.getNoneItems();
54978
- for (var i = 0; i < noneItems.length; i++) {
54979
- if (this.isItemSelected(noneItems[i]))
54980
- return false;
54981
- }
54982
- var items = this.getVisibleEnableItems();
54983
- if (items.length === 0)
54984
- return false;
54985
- var val = this.value;
54986
- if (!val || !Array.isArray(val) || val.length === 0)
54987
- return false;
54988
- if (val.length < items.length)
54989
- return false;
54990
- var rVal = [];
54991
- for (var i = 0; i < val.length; i++) {
54992
- rVal.push(this.getRealValue(val[i]));
54993
- }
54994
- for (var i = 0; i < items.length; i++) {
54995
- if (rVal.indexOf(items[i].value) < 0)
54996
- return false;
54997
- }
54998
- return true;
55050
+ return this.allElementsSelected();
54999
55051
  },
55000
55052
  set: function (val) {
55001
55053
  if (val) {
@@ -55011,6 +55063,30 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
55011
55063
  QuestionCheckboxModel.prototype.toggleSelectAll = function () {
55012
55064
  this.isAllSelected = !this.isAllSelected;
55013
55065
  };
55066
+ QuestionCheckboxModel.prototype.allElementsSelected = function () {
55067
+ var noneItems = this.getNoneItems();
55068
+ for (var i = 0; i < noneItems.length; i++) {
55069
+ if (this.isItemSelected(noneItems[i]))
55070
+ return false;
55071
+ }
55072
+ var items = this.getVisibleEnableItems();
55073
+ if (items.length === 0)
55074
+ return false;
55075
+ var val = this.value;
55076
+ if (!val || !Array.isArray(val) || val.length === 0)
55077
+ return false;
55078
+ if (val.length < items.length)
55079
+ return false;
55080
+ var rVal = [];
55081
+ for (var i = 0; i < val.length; i++) {
55082
+ rVal.push(this.getRealValue(val[i]));
55083
+ }
55084
+ for (var i = 0; i < items.length; i++) {
55085
+ if (rVal.indexOf(items[i].value) < 0)
55086
+ return false;
55087
+ }
55088
+ return true;
55089
+ };
55014
55090
  /**
55015
55091
  * Selects all choice items, except "Other" and "None".
55016
55092
  *
@@ -55874,6 +55950,9 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
55874
55950
  };
55875
55951
  DropdownMultiSelectListModel.prototype.selectAllItems = function () {
55876
55952
  this.question.toggleSelectAll();
55953
+ if (this.question.isAllSelected && this.question.hideSelectedItems) {
55954
+ this.popupModel.hide();
55955
+ }
55877
55956
  this.updateListState();
55878
55957
  };
55879
55958
  DropdownMultiSelectListModel.prototype.selectNoneItem = function () {
@@ -56004,6 +56083,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56004
56083
  _this.createLocalizableString("placeholder", _this, false, true);
56005
56084
  _this.createLocalizableString("clearCaption", _this, false, true);
56006
56085
  _this.createLocalizableString("readOnlyText", _this, true);
56086
+ _this.deselectAllItemText = _this.createLocalizableString("deselectAllText", _this.selectAllItem, true, "deselectAllItemText");
56007
56087
  _this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
56008
56088
  _this.updateReadOnlyText();
56009
56089
  });
@@ -56193,6 +56273,14 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
56193
56273
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
56194
56274
  _super.prototype.onFocusCore.call(this, event);
56195
56275
  };
56276
+ QuestionTagboxModel.prototype.allElementsSelected = function () {
56277
+ var result = _super.prototype.allElementsSelected.call(this);
56278
+ this.updateSelectAllItemText(result);
56279
+ return result;
56280
+ };
56281
+ QuestionTagboxModel.prototype.updateSelectAllItemText = function (isAllSelected) {
56282
+ this.selectAllItem.setLocText(isAllSelected ? this.deselectAllItemText : this.selectAllItemText);
56283
+ };
56196
56284
  QuestionTagboxModel.prototype.dispose = function () {
56197
56285
  _super.prototype.dispose.call(this);
56198
56286
  if (!!this.dropdownListModel) {
@@ -59896,12 +59984,14 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
59896
59984
  return;
59897
59985
  if (QuestionRatingModel.colorsCalculated)
59898
59986
  return;
59987
+ function getColorFromProperty(varName) {
59988
+ var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
59989
+ return style.getPropertyValue && style.getPropertyValue(varName);
59990
+ }
59899
59991
  function getRGBColor(colorName, varName) {
59900
59992
  var str = !!themeVariables && themeVariables[colorName];
59901
- if (!str) {
59902
- var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
59903
- str = style.getPropertyValue && style.getPropertyValue(varName);
59904
- }
59993
+ if (!str)
59994
+ str = getColorFromProperty(varName);
59905
59995
  if (!str)
59906
59996
  return null;
59907
59997
  var canvasElement = DomDocumentHelper.createElement("canvas");
@@ -59909,6 +59999,9 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
59909
59999
  return null;
59910
60000
  var ctx = canvasElement.getContext("2d");
59911
60001
  ctx.fillStyle = str;
60002
+ if (ctx.fillStyle == "#000000") {
60003
+ ctx.fillStyle = getColorFromProperty(varName);
60004
+ }
59912
60005
  var newStr = ctx.fillStyle;
59913
60006
  if (newStr.startsWith("rgba")) {
59914
60007
  return newStr.substring(5, newStr.length - 1).split(",").map(function (c) { return +(c.trim()); });
@@ -62792,7 +62885,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
62792
62885
  };
62793
62886
  };
62794
62887
  QuestionSignaturePadModel.prototype.refreshCanvas = function () {
62795
- if (!this.canvas)
62888
+ if (!this.signaturePad || !this.canvas)
62796
62889
  return;
62797
62890
  if (!this.value) {
62798
62891
  this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
@@ -63522,7 +63615,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
63522
63615
  _this.registerPropertyChangedHandlers(["panelsState"], function () {
63523
63616
  _this.setPanelsState();
63524
63617
  });
63525
- _this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "displayMode", "showProgressBar"], function () {
63618
+ _this.registerPropertyChangedHandlers(["newPanelPosition", "displayMode", "showProgressBar"], function () {
63526
63619
  _this.updateFooterActions();
63527
63620
  });
63528
63621
  _this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
@@ -64917,12 +65010,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64917
65010
  return true;
64918
65011
  };
64919
65012
  /**
64920
- * Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method.
64921
- * If a displayMode is different from "list" and the current panel has erros, then
64922
- * @see template
65013
+ * Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
65014
+ *
65015
+ * Unlike the [`addPanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#addPanel) method, `addPanelUI()` performs additional actions: checks whether a new panel [can be added](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canAddPanel), expands and focuses the new panel, and runs animated effects.
64923
65016
  * @see panelCount
64924
65017
  * @see panels
64925
- * @see canAddPanel
64926
65018
  */
64927
65019
  QuestionPanelDynamicModel.prototype.addPanelUI = function () {
64928
65020
  if (!this.canAddPanel)
@@ -65006,13 +65098,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65006
65098
  }
65007
65099
  };
65008
65100
  /**
65009
- * Call removePanel function. Do nothing is canRemovePanel returns false. If confirmDelete set to true, it shows the confirmation dialog first.
65010
- * @param value a panel or panel index
65011
- * @see removePanel
65012
- * @see confirmDelete
65013
- * @see confirmDeleteText
65014
- * @see canRemovePanel
65101
+ * Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
65015
65102
  *
65103
+ * Unlike the [`removePanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#removePanel) method, `removePanelUI()` performs additional actions: checks whether the panel [can be removed](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canRemovePanel) and displays a confirmation dialog (if the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#confirmDelete) property is enabled).
65104
+ * @param value A `PanelModel` instance or zero-based panel index.
65105
+ * @see addPanelUI
65016
65106
  */
65017
65107
  QuestionPanelDynamicModel.prototype.removePanelUI = function (value) {
65018
65108
  var _this = this;
@@ -65055,6 +65145,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65055
65145
  return;
65056
65146
  this.currentIndex--;
65057
65147
  };
65148
+ /**
65149
+ * Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
65150
+ * @param value A `PanelModel` instance or zero-based panel index.
65151
+ * @see addPanel
65152
+ */
65058
65153
  QuestionPanelDynamicModel.prototype.removePanel = function (value) {
65059
65154
  var visIndex = this.getVisualPanelIndex(value);
65060
65155
  if (visIndex < 0 || visIndex >= this.visiblePanelCount)
@@ -65509,11 +65604,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65509
65604
  for (var i = 0; i < panels.length; i++) {
65510
65605
  this.setOnCompleteAsyncInPanel(panels[i]);
65511
65606
  }
65512
- for (var i = 0; i < panels.length; i++) {
65513
- var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focusOnFirstError, rec);
65514
- pnlError = this.isValueDuplicated(panels[i], keyValues, rec, fireCallback) || pnlError;
65515
- if (!this.isRenderModeList && pnlError && !res) {
65516
- this.currentIndex = i;
65607
+ var focusOnError = !!rec && rec.focusOnFirstError;
65608
+ for (var i_1 = 0; i_1 < panels.length; i_1++) {
65609
+ var pnlError = panels[i_1].hasErrors(fireCallback, focusOnError, rec);
65610
+ pnlError = this.isValueDuplicated(panels[i_1], keyValues, rec, fireCallback) || pnlError;
65611
+ if (!this.isRenderModeList && pnlError && !res && focusOnError) {
65612
+ this.currentIndex = i_1;
65517
65613
  }
65518
65614
  res = pnlError || res;
65519
65615
  }
@@ -66106,6 +66202,10 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66106
66202
  }
66107
66203
  return classes;
66108
66204
  };
66205
+ QuestionPanelDynamicModel.prototype.onMobileChanged = function () {
66206
+ _super.prototype.onMobileChanged.call(this);
66207
+ this.updateFooterActions();
66208
+ };
66109
66209
  QuestionPanelDynamicModel.maxCheckCount = 3;
66110
66210
  question_paneldynamic_decorate([
66111
66211
  propertyArray({})
@@ -68515,6 +68615,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
68515
68615
  var _this = this;
68516
68616
  var date = new Date(str);
68517
68617
  this.initInputDateTimeData();
68618
+ if (!this.hasTimePart) {
68619
+ date = new Date(str + "T00:00:00");
68620
+ }
68518
68621
  if (!this.hasDatePart) {
68519
68622
  date = new Date(this.defaultDate + str);
68520
68623
  }
@@ -69138,8 +69241,8 @@ Serializer.addClass("currencymask", [
69138
69241
 
69139
69242
  var Version;
69140
69243
  var ReleaseDate;
69141
- Version = "" + "1.11.13";
69142
- ReleaseDate = "" + "2024-08-27";
69244
+ Version = "" + "1.11.14";
69245
+ ReleaseDate = "" + "2024-09-04";
69143
69246
  function checkLibraryVersion(ver, libraryName) {
69144
69247
  if (Version != ver) {
69145
69248
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -79904,7 +80007,7 @@ var action_bar_item_SurveyActionBarItem = /** @class */ (function (_super) {
79904
80007
  var title = this.item.tooltip || this.item.title;
79905
80008
  var buttonContent = this.renderButtonContent();
79906
80009
  var tabIndex = this.item.disableTabStop ? -1 : undefined;
79907
- var button = attachKey2click(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function () { return _this.item.doMouseDown(); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
80010
+ var button = attachKey2click(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function (args) { return _this.item.doMouseDown(args); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
79908
80011
  return button;
79909
80012
  };
79910
80013
  return SurveyActionBarItem;
@@ -85993,7 +86096,7 @@ var list_item_ListItem = /** @class */ (function (_super) {
85993
86096
  paddingInlineStart: this.model.getItemIndent(this.item)
85994
86097
  };
85995
86098
  var className = this.model.getItemClass(this.item);
85996
- var itemContent = this.item.component || "sv-list-item-content";
86099
+ var itemContent = this.item.component || this.model.itemComponent;
85997
86100
  var newElement = ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
85998
86101
  var contentWrap = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText, onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
85999
86102
  var separator = this.item.needSeparator ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;