survey-creator-core 2.0.6 → 2.0.7

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.
Files changed (142) hide show
  1. package/fesm/i18n/arabic.mjs +1 -1
  2. package/fesm/i18n/bulgarian.mjs +1 -1
  3. package/fesm/i18n/burmese.mjs +1 -1
  4. package/fesm/i18n/croatian.mjs +1 -1
  5. package/fesm/i18n/czech.mjs +1 -1
  6. package/fesm/i18n/danish.mjs +1 -1
  7. package/fesm/i18n/dutch.mjs +1 -1
  8. package/fesm/i18n/english.mjs +1 -1
  9. package/fesm/i18n/finnish.mjs +1 -1
  10. package/fesm/i18n/french.mjs +1 -1
  11. package/fesm/i18n/german.mjs +1 -1
  12. package/fesm/i18n/haitian-creole.mjs +1 -1
  13. package/fesm/i18n/hebrew.mjs +1 -1
  14. package/fesm/i18n/hungarian.mjs +1 -1
  15. package/fesm/i18n/index.mjs +1 -1
  16. package/fesm/i18n/indonesian.mjs +1 -1
  17. package/fesm/i18n/italian.mjs +1 -1
  18. package/fesm/i18n/japanese.mjs +1 -1
  19. package/fesm/i18n/korean.mjs +1 -1
  20. package/fesm/i18n/malay.mjs +1 -1
  21. package/fesm/i18n/mongolian.mjs +1 -1
  22. package/fesm/i18n/norwegian.mjs +1 -1
  23. package/fesm/i18n/persian.mjs +1 -1
  24. package/fesm/i18n/polish.mjs +1 -1
  25. package/fesm/i18n/portuguese.mjs +1 -1
  26. package/fesm/i18n/romanian.mjs +1 -1
  27. package/fesm/i18n/russian.mjs +1 -1
  28. package/fesm/i18n/simplified-chinese.mjs +1 -1
  29. package/fesm/i18n/slovak.mjs +1 -1
  30. package/fesm/i18n/slovenian.mjs +1 -1
  31. package/fesm/i18n/spanish.mjs +1 -1
  32. package/fesm/i18n/swedish.mjs +1 -1
  33. package/fesm/i18n/tajik.mjs +1 -1
  34. package/fesm/i18n/thai.mjs +1 -1
  35. package/fesm/i18n/traditional-chinese.mjs +1 -1
  36. package/fesm/i18n/turkish.mjs +1 -1
  37. package/fesm/survey-creator-core.i18n.mjs +1 -1
  38. package/fesm/survey-creator-core.mjs +153 -110
  39. package/fesm/survey-creator-core.mjs.map +1 -1
  40. package/fesm/themes/index.mjs +1 -1
  41. package/fonts.fontless.css +1 -1
  42. package/fonts.fontless.min.css +1 -1
  43. package/i18n/arabic.js +1 -1
  44. package/i18n/arabic.min.js.LICENSE.txt +1 -1
  45. package/i18n/bulgarian.js +1 -1
  46. package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
  47. package/i18n/burmese.js +1 -1
  48. package/i18n/burmese.min.js.LICENSE.txt +1 -1
  49. package/i18n/croatian.js +1 -1
  50. package/i18n/croatian.min.js.LICENSE.txt +1 -1
  51. package/i18n/czech.js +1 -1
  52. package/i18n/czech.min.js.LICENSE.txt +1 -1
  53. package/i18n/danish.js +1 -1
  54. package/i18n/danish.min.js.LICENSE.txt +1 -1
  55. package/i18n/dutch.js +1 -1
  56. package/i18n/dutch.min.js.LICENSE.txt +1 -1
  57. package/i18n/english.js +1 -1
  58. package/i18n/english.min.js.LICENSE.txt +1 -1
  59. package/i18n/finnish.js +1 -1
  60. package/i18n/finnish.min.js.LICENSE.txt +1 -1
  61. package/i18n/french.js +1 -1
  62. package/i18n/french.min.js.LICENSE.txt +1 -1
  63. package/i18n/german.js +1 -1
  64. package/i18n/german.min.js.LICENSE.txt +1 -1
  65. package/i18n/haitian-creole.js +1 -1
  66. package/i18n/haitian-creole.min.js.LICENSE.txt +1 -1
  67. package/i18n/hebrew.js +1 -1
  68. package/i18n/hebrew.min.js.LICENSE.txt +1 -1
  69. package/i18n/hungarian.js +1 -1
  70. package/i18n/hungarian.min.js.LICENSE.txt +1 -1
  71. package/i18n/index.js +1 -1
  72. package/i18n/index.min.js.LICENSE.txt +1 -1
  73. package/i18n/indonesian.js +1 -1
  74. package/i18n/indonesian.min.js.LICENSE.txt +1 -1
  75. package/i18n/italian.js +1 -1
  76. package/i18n/italian.min.js.LICENSE.txt +1 -1
  77. package/i18n/japanese.js +1 -1
  78. package/i18n/japanese.min.js.LICENSE.txt +1 -1
  79. package/i18n/korean.js +1 -1
  80. package/i18n/korean.min.js.LICENSE.txt +1 -1
  81. package/i18n/malay.js +1 -1
  82. package/i18n/malay.min.js.LICENSE.txt +1 -1
  83. package/i18n/mongolian.js +1 -1
  84. package/i18n/mongolian.min.js.LICENSE.txt +1 -1
  85. package/i18n/norwegian.js +1 -1
  86. package/i18n/norwegian.min.js.LICENSE.txt +1 -1
  87. package/i18n/persian.js +1 -1
  88. package/i18n/persian.min.js.LICENSE.txt +1 -1
  89. package/i18n/polish.js +1 -1
  90. package/i18n/polish.min.js.LICENSE.txt +1 -1
  91. package/i18n/portuguese.js +1 -1
  92. package/i18n/portuguese.min.js.LICENSE.txt +1 -1
  93. package/i18n/romanian.js +1 -1
  94. package/i18n/romanian.min.js.LICENSE.txt +1 -1
  95. package/i18n/russian.js +1 -1
  96. package/i18n/russian.min.js.LICENSE.txt +1 -1
  97. package/i18n/simplified-chinese.js +1 -1
  98. package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
  99. package/i18n/slovak.js +1 -1
  100. package/i18n/slovak.min.js.LICENSE.txt +1 -1
  101. package/i18n/slovenian.js +1 -1
  102. package/i18n/slovenian.min.js.LICENSE.txt +1 -1
  103. package/i18n/spanish.js +1 -1
  104. package/i18n/spanish.min.js.LICENSE.txt +1 -1
  105. package/i18n/swedish.js +1 -1
  106. package/i18n/swedish.min.js.LICENSE.txt +1 -1
  107. package/i18n/tajik.js +1 -1
  108. package/i18n/tajik.min.js.LICENSE.txt +1 -1
  109. package/i18n/thai.js +1 -1
  110. package/i18n/thai.min.js.LICENSE.txt +1 -1
  111. package/i18n/traditional-chinese.js +1 -1
  112. package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
  113. package/i18n/turkish.js +1 -1
  114. package/i18n/turkish.min.js.LICENSE.txt +1 -1
  115. package/package.json +2 -2
  116. package/survey-creator-core.css +60 -20
  117. package/survey-creator-core.fontless.css +59 -19
  118. package/survey-creator-core.fontless.css.map +1 -1
  119. package/survey-creator-core.fontless.min.css +5 -5
  120. package/survey-creator-core.i18n.js +1 -1
  121. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  122. package/survey-creator-core.js +193 -120
  123. package/survey-creator-core.js.map +1 -1
  124. package/survey-creator-core.min.css +6 -6
  125. package/survey-creator-core.min.js +1 -1
  126. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  127. package/themes/default-contrast.js +1 -1
  128. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  129. package/themes/default-dark.js +1 -1
  130. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  131. package/themes/index.js +1 -1
  132. package/themes/index.min.js.LICENSE.txt +1 -1
  133. package/themes/sc2020.js +1 -1
  134. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  135. package/typings/components/image-item-value.d.ts +7 -0
  136. package/typings/creator-base.d.ts +14 -14
  137. package/typings/creator-options.d.ts +4 -12
  138. package/typings/custom-questions/question-file.d.ts +2 -0
  139. package/typings/property-grid/condition.d.ts +3 -0
  140. package/typings/property-grid/matrices.d.ts +0 -1
  141. package/typings/property-grid/object-selector.d.ts +0 -1
  142. package/typings/property-grid-theme/property-grid.d.ts +13 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.6
2
+ * SurveyJS Creator v2.0.7
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.6
2
+ * SurveyJS Creator v2.0.7
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.6
2
+ * SurveyJS Creator v2.0.7
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -350,6 +350,8 @@ __webpack_require__.r(__webpack_exports__);
350
350
  /* harmony import */ var _item_value__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./item-value */ "./src/components/item-value.ts");
351
351
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
352
352
  /* harmony import */ var _image_item_value_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./image-item-value.scss */ "./src/components/image-item-value.scss");
353
+ /* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../editorLocalization */ "./src/editorLocalization.ts");
354
+
353
355
 
354
356
 
355
357
 
@@ -364,25 +366,40 @@ var ImageItemValueWrapperViewModel = /** @class */ (function (_super) {
364
366
  _this.templateData = templateData;
365
367
  _this.itemsRoot = itemsRoot;
366
368
  _this.isChoosingNewFile = false;
369
+ _this.onDragCounter = 0;
370
+ _this.onDragEnter = function (event) {
371
+ if (_this.isNew) {
372
+ _this.onDragCounter++;
373
+ _this.isFileDragging = true;
374
+ }
375
+ };
367
376
  _this.onDragOver = function (event) {
368
- _this.isFileDragging = true;
369
- event.dataTransfer.dropEffect = "copy";
370
- event.preventDefault();
377
+ if (_this.isNew) {
378
+ event.dataTransfer.dropEffect = "copy";
379
+ event.preventDefault();
380
+ }
371
381
  };
372
382
  _this.onDrop = function (event) {
373
- _this.isFileDragging = false;
374
- event.preventDefault();
375
- var input = event.dataTransfer;
376
- if (!input || !input.files || input.files.length < 1)
377
- return;
378
- var files = [];
379
- for (var i = 0; i < input.files.length; i++) {
380
- files.push(input.files[i]);
383
+ if (_this.isNew) {
384
+ _this.onDragCounter = 0;
385
+ _this.isFileDragging = false;
386
+ event.preventDefault();
387
+ var input = event.dataTransfer;
388
+ if (!input || !input.files || input.files.length < 1)
389
+ return;
390
+ var files = [];
391
+ for (var i = 0; i < input.files.length; i++) {
392
+ files.push(input.files[i]);
393
+ }
394
+ _this.uploadFiles(files);
381
395
  }
382
- _this.uploadFiles(files);
383
396
  };
384
397
  _this.onDragLeave = function (event) {
385
- _this.isFileDragging = false;
398
+ if (_this.isNew) {
399
+ if (--_this.onDragCounter == 0) {
400
+ _this.isFileDragging = false;
401
+ }
402
+ }
386
403
  };
387
404
  return _this;
388
405
  }
@@ -426,6 +443,47 @@ var ImageItemValueWrapperViewModel = /** @class */ (function (_super) {
426
443
  enumerable: false,
427
444
  configurable: true
428
445
  });
446
+ Object.defineProperty(ImageItemValueWrapperViewModel.prototype, "placeholderText", {
447
+ get: function () {
448
+ if (this.creator.isMobileView)
449
+ return (0,_editorLocalization__WEBPACK_IMPORTED_MODULE_5__.getLocString)("ed.imagePlaceHolderMobile");
450
+ return (0,_editorLocalization__WEBPACK_IMPORTED_MODULE_5__.getLocString)("ed.imagePlaceHolder");
451
+ },
452
+ enumerable: false,
453
+ configurable: true
454
+ });
455
+ Object.defineProperty(ImageItemValueWrapperViewModel.prototype, "chooseImageText", {
456
+ get: function () {
457
+ return (0,_editorLocalization__WEBPACK_IMPORTED_MODULE_5__.getLocString)("ed.imageChooseImage");
458
+ },
459
+ enumerable: false,
460
+ configurable: true
461
+ });
462
+ Object.defineProperty(ImageItemValueWrapperViewModel.prototype, "showChooseButtonAsIcon", {
463
+ get: function () {
464
+ return !this.getIsNewItemSingle();
465
+ },
466
+ enumerable: false,
467
+ configurable: true
468
+ });
469
+ Object.defineProperty(ImageItemValueWrapperViewModel.prototype, "showPlaceholder", {
470
+ get: function () {
471
+ return this.getIsNewItemSingle();
472
+ },
473
+ enumerable: false,
474
+ configurable: true
475
+ });
476
+ Object.defineProperty(ImageItemValueWrapperViewModel.prototype, "addButtonCss", {
477
+ get: function () {
478
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__.CssClassBuilder()
479
+ .append("svc-image-item-value-controls__add")
480
+ .append("svc-context-button", this.showChooseButtonAsIcon)
481
+ .append("sd-action", !this.showChooseButtonAsIcon)
482
+ .toString();
483
+ },
484
+ enumerable: false,
485
+ configurable: true
486
+ });
429
487
  ImageItemValueWrapperViewModel.prototype.chooseFile = function (model) {
430
488
  var fileInput = model.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];
431
489
  var context = { element: model.question, item: model.item, elementType: model.question.getType(), propertyName: "imageLink" };
@@ -19311,12 +19369,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
19311
19369
  _this.showPagesInTestSurveyTab = true;
19312
19370
  _this.showSimulatorInTestSurveyTab = true;
19313
19371
  /**
19314
- * A [UI theme](https://surveyjs.io/Documentation/Library?id=get-started-react#configure-styles) used to display the survey in the Preview tab.
19315
- *
19316
- * Accepted values: `"default"`
19317
- *
19318
- * Default value: `"default"`
19319
- * @see previewAllowSelectTheme
19372
+ * @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
19320
19373
  */
19321
19374
  _this.previewTheme = "default";
19322
19375
  _this.hasPendingThemeChanges = false;
@@ -19326,12 +19379,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
19326
19379
  _this.showDefaultLanguageInTestSurveyTab = "auto";
19327
19380
  _this.showInvisibleElementsInTestSurveyTab = true;
19328
19381
  /**
19329
- * Specifies whether users can switch between UI themes in the Preview tab.
19330
- *
19331
- * Default value: `true`
19332
- *
19333
- * [View Demo](https://surveyjs.io/Examples/Creator?id=theme-switcher (linkStyle))
19334
- * @see previewTheme
19382
+ * @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
19335
19383
  */
19336
19384
  _this.previewAllowSelectTheme = true;
19337
19385
  _this._tabResponsivenessMode = "icons";
@@ -19956,7 +20004,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
19956
20004
  });
19957
20005
  Object.defineProperty(SurveyCreatorModel.prototype, "themeForPreview", {
19958
20006
  /**
19959
- * @deprecated Use the [`previewTheme`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#previewTheme) property instead.
20007
+ * @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
19960
20008
  */
19961
20009
  get: function () { return this.previewTheme; },
19962
20010
  set: function (val) { this.previewTheme = val; },
@@ -20007,18 +20055,30 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
20007
20055
  return this._theme;
20008
20056
  },
20009
20057
  set: function (newTheme) {
20010
- this._theme = newTheme;
20011
- this.hasPendingThemeChanges = true;
20012
- if (this.activeTab !== "theme") {
20013
- this.updatePlugin(this.activeTab);
20014
- }
20015
- if (!!newTheme && newTheme.headerView) {
20016
- this.survey.headerView = newTheme.headerView;
20017
- }
20058
+ this.applyTheme(newTheme);
20018
20059
  },
20019
20060
  enumerable: false,
20020
20061
  configurable: true
20021
20062
  });
20063
+ /**
20064
+ * Applies a [theme](https://surveyjs.io/form-library/documentation/api-reference/itheme) to the survey being configured.
20065
+ *
20066
+ * [Theme Editor](https://surveyjs.io/survey-creator/documentation/theme-editor (linkStyle))
20067
+ * @param surveyTheme An [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme) object with theme settings.
20068
+ * @see theme
20069
+ * @see themeEditor
20070
+ * @see saveThemeFunc
20071
+ */
20072
+ SurveyCreatorModel.prototype.applyTheme = function (surveyTheme) {
20073
+ this._theme = surveyTheme;
20074
+ this.hasPendingThemeChanges = true;
20075
+ if (this.activeTab !== "theme") {
20076
+ this.updatePlugin(this.activeTab);
20077
+ }
20078
+ if (!!surveyTheme && surveyTheme.headerView) {
20079
+ this.survey.headerView = surveyTheme.headerView;
20080
+ }
20081
+ };
20022
20082
  SurveyCreatorModel.prototype._doSaveThemeCore = function (onSaveComplete) {
20023
20083
  var _this = this;
20024
20084
  this.setState("saving");
@@ -20130,7 +20190,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
20130
20190
  });
20131
20191
  Object.defineProperty(SurveyCreatorModel.prototype, "allowChangeThemeInPreview", {
20132
20192
  /**
20133
- * @deprecated Use the [`previewAllowSelectTheme`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#previewAllowSelectTheme) property instead.
20193
+ * @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
20134
20194
  */
20135
20195
  get: function () { return this.previewAllowSelectTheme; },
20136
20196
  set: function (val) { this.previewAllowSelectTheme = val; },
@@ -23014,7 +23074,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23014
23074
  var newCssVariable = {};
23015
23075
  (0,_utils_utils__WEBPACK_IMPORTED_MODULE_8__.assign)(newCssVariable, theme === null || theme === void 0 ? void 0 : theme.cssVariables);
23016
23076
  var designerPlugin = this.getPlugin("designer");
23017
- if (designerPlugin) {
23077
+ if (designerPlugin && designerPlugin.model) {
23018
23078
  designerPlugin.model.updateSurfaceCssVariables();
23019
23079
  }
23020
23080
  this.themeVariables = newCssVariable;
@@ -23726,25 +23786,7 @@ var settings = {
23726
23786
  choices: ["Item 1", "Item 2", "Item 3"]
23727
23787
  },
23728
23788
  imagepicker: {
23729
- imageFit: "cover",
23730
- choices: [
23731
- {
23732
- value: "Image 1",
23733
- imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"
23734
- },
23735
- {
23736
- value: "Image 2",
23737
- imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"
23738
- },
23739
- {
23740
- value: "Image 3",
23741
- imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"
23742
- },
23743
- {
23744
- value: "Image 4",
23745
- imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"
23746
- }
23747
- ]
23789
+ imageFit: "cover"
23748
23790
  },
23749
23791
  image: {
23750
23792
  imageFit: "cover",
@@ -24781,6 +24823,13 @@ var QuestionFileEditorModel = /** @class */ (function (_super) {
24781
24823
  enumerable: false,
24782
24824
  configurable: true
24783
24825
  });
24826
+ Object.defineProperty(QuestionFileEditorModel.prototype, "isTextInputReadOnly", {
24827
+ get: function () {
24828
+ return this.disableInput || this.isReadOnly;
24829
+ },
24830
+ enumerable: false,
24831
+ configurable: true
24832
+ });
24784
24833
  QuestionFileEditorModel.prototype.updateRenderedValue = function (value) {
24785
24834
  var matchBase64 = !!value ? value.match(/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),/) : null;
24786
24835
  if (matchBase64) {
@@ -24853,10 +24902,16 @@ var QuestionFileEditorModel = /** @class */ (function (_super) {
24853
24902
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
24854
24903
  (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
24855
24904
  ], QuestionFileEditorModel.prototype, "placeholder", void 0);
24905
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
24906
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
24907
+ ], QuestionFileEditorModel.prototype, "disableInput", void 0);
24856
24908
  return QuestionFileEditorModel;
24857
24909
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionFileModel));
24858
24910
 
24859
- survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.addClass("fileedit", ["placeholder:string"], function () { return new QuestionFileEditorModel(""); }, "file");
24911
+ survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.addClass("fileedit", [
24912
+ "placeholder:string",
24913
+ { name: "disableInput:boolean", default: false },
24914
+ ], function () { return new QuestionFileEditorModel(""); }, "file");
24860
24915
  survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionFactory.Instance.registerQuestion("fileedit", function (name) {
24861
24916
  return new QuestionFileEditorModel(name);
24862
24917
  }, false);
@@ -35448,7 +35503,7 @@ var propertyGridCss = {
35448
35503
  controlReadOnly: "sd-input--disabled sd-input--readonly"
35449
35504
  },
35450
35505
  buttongroup: {
35451
- root: "spg-button-group",
35506
+ root: "sd-button-group-scrollable-container spg-button-group",
35452
35507
  item: "spg-button-group__item",
35453
35508
  itemIcon: "spg-button-group__item-icon",
35454
35509
  itemDecorator: "spg-button-group__item-decorator",
@@ -35457,7 +35512,20 @@ var propertyGridCss = {
35457
35512
  itemSelected: "spg-button-group__item--selected",
35458
35513
  itemDisabled: "spg-button-group__item--disabled",
35459
35514
  itemControl: "sv-visuallyhidden",
35460
- readOnly: "spg-question--disabled"
35515
+ readOnly: "spg-question--disabled",
35516
+ rootDropdown: "sd-button-group-scrollable-container sd-scrollable-container--compact sd-selectbase",
35517
+ selectWrapper: "sv-dropdown_select-wrapper spg-dropdown_select-wrapper",
35518
+ control: "spg-input spg-dropdown sd-input sd-dropdown",
35519
+ controlEmpty: "spg-dropdown--empty sd-dropdown--empty",
35520
+ controlValue: "spg-dropdown__value sd-dropdown__value",
35521
+ controlDisabled: "spg-input--disabled sd-input--disabled",
35522
+ controlReadOnly: "spg-input--readonly sd-input--readonly",
35523
+ controlPreview: "spg-input--preview sd-input--preview",
35524
+ filterStringInput: "sd-dropdown__filter-string-input spg-dropdown__filter-string-input",
35525
+ chevronButton: "sd-dropdown_chevron-button spg-dropdown_chevron-button",
35526
+ chevronButtonSvg: "sd-dropdown_chevron-button-svg spg-dropdown_chevron-button-svg",
35527
+ chevronButtonIconId: "icon-chevron",
35528
+ popup: "spg-dropdown-popup svc-creator-popup",
35461
35529
  },
35462
35530
  imagepicker: {
35463
35531
  root: "spg-imagepicker",
@@ -36999,8 +37067,11 @@ __webpack_require__.r(__webpack_exports__);
36999
37067
  /* harmony export */ PropertyGridEditorExpression: () => (/* binding */ PropertyGridEditorExpression)
37000
37068
  /* harmony export */ });
37001
37069
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
37002
- /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./src/property-grid/index.ts");
37003
- /* harmony import */ var _condition_survey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./condition-survey */ "./src/property-grid/condition-survey.ts");
37070
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
37071
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
37072
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ "./src/property-grid/index.ts");
37073
+ /* harmony import */ var _condition_survey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./condition-survey */ "./src/property-grid/condition-survey.ts");
37074
+
37004
37075
 
37005
37076
 
37006
37077
 
@@ -37023,43 +37094,56 @@ var PropertyGridEditorExpression = /** @class */ (function (_super) {
37023
37094
  question.clearValue();
37024
37095
  };
37025
37096
  PropertyGridEditorExpression.prototype.onCreated = function (obj, question, prop, options) {
37097
+ var _this = this;
37026
37098
  question.valueToDataCallback = function (val) {
37027
- if (!val)
37028
- return val;
37029
- return val.replace(/\\n/g, "\n")
37030
- .replace(/\\r/g, "\r")
37031
- .replace(/\\t/g, "\t");
37099
+ return _this.processExpression(val, true);
37032
37100
  };
37033
37101
  question.valueFromDataCallback = function (val) {
37034
- if (!val)
37035
- return val;
37036
- return val.replace(/\n/g, "\\n")
37037
- .replace(/\r/g, "\\r")
37038
- .replace(/\t/g, "\\t");
37102
+ return _this.processExpression(val, false);
37039
37103
  };
37040
- /*
37041
- question.valueFromDataCallback = (val: any): any => {
37042
- if(!val) return val;
37043
- return val.replace(/\\/g, "\\\\")
37044
- .replace(/'/g, "\\'")
37045
- .replace(/"/g, '\\"')
37046
- .replace(/\n/g, "\\n")
37104
+ };
37105
+ PropertyGridEditorExpression.prototype.processExpression = function (val, valueToData) {
37106
+ if (!val)
37107
+ return val;
37108
+ var operand = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ConditionsParser().parseExpression(val);
37109
+ if (!operand)
37110
+ return val;
37111
+ var list = new Array();
37112
+ operand.addOperandsToList(list);
37113
+ var replacedText = new Array();
37114
+ for (var i = 0; i < list.length; i++) {
37115
+ var op = list[i];
37116
+ if (op.getType() === "const") {
37117
+ var constVal = op.correctValue;
37118
+ if (typeof constVal === "string") {
37119
+ var newVal = valueToData ? this.valueToData(constVal) : this.valueFromData(constVal);
37120
+ if (newVal !== constVal) {
37121
+ replacedText.push({ oldText: constVal, newText: newVal });
37122
+ }
37123
+ }
37124
+ }
37125
+ }
37126
+ replacedText.forEach(function (item) {
37127
+ val = val.replace(item.oldText, item.newText);
37128
+ });
37129
+ return val;
37130
+ };
37131
+ PropertyGridEditorExpression.prototype.valueToData = function (val) {
37132
+ if (!val)
37133
+ return val;
37134
+ return val.replace(/\\n/g, "\n")
37135
+ .replace(/\\r/g, "\r")
37136
+ .replace(/\\t/g, "\t");
37137
+ };
37138
+ PropertyGridEditorExpression.prototype.valueFromData = function (val) {
37139
+ if (!val)
37140
+ return val;
37141
+ return val.replace(/\n/g, "\\n")
37047
37142
  .replace(/\r/g, "\\r")
37048
37143
  .replace(/\t/g, "\\t");
37049
- };
37050
- question.valueToDataCallback = (val: any): any => {
37051
- if(!val) return val;
37052
- return val.replace(/\\t/g, "\t")
37053
- .replace(/\\r/g, "\r")
37054
- .replace(/\\n/g, "\n")
37055
- .replace(/\\"/g, '"')
37056
- .replace(/\\'/g, "'")
37057
- .replace(/\\\\/g, "\\");
37058
- };
37059
- */
37060
37144
  };
37061
37145
  return PropertyGridEditorExpression;
37062
- }(_index__WEBPACK_IMPORTED_MODULE_1__.PropertyGridEditor));
37146
+ }(_index__WEBPACK_IMPORTED_MODULE_2__.PropertyGridEditor));
37063
37147
 
37064
37148
  var PropertyGridEditorCondition = /** @class */ (function (_super) {
37065
37149
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(PropertyGridEditorCondition, _super);
@@ -37090,13 +37174,13 @@ var PropertyGridEditorCondition = /** @class */ (function (_super) {
37090
37174
  }
37091
37175
  };
37092
37176
  PropertyGridEditorCondition.prototype.createPropertyEditorSetup = function (obj, prop, question, options) {
37093
- return new _condition_survey__WEBPACK_IMPORTED_MODULE_2__.ConditionEditor(obj.getSurvey(), obj, options, prop.name);
37177
+ return new _condition_survey__WEBPACK_IMPORTED_MODULE_3__.ConditionEditor(obj.getSurvey(), obj, options, prop.name);
37094
37178
  };
37095
37179
  return PropertyGridEditorCondition;
37096
37180
  }(PropertyGridEditorExpression));
37097
37181
 
37098
- _index__WEBPACK_IMPORTED_MODULE_1__.PropertyGridEditorCollection.register(new PropertyGridEditorExpression());
37099
- _index__WEBPACK_IMPORTED_MODULE_1__.PropertyGridEditorCollection.register(new PropertyGridEditorCondition());
37182
+ _index__WEBPACK_IMPORTED_MODULE_2__.PropertyGridEditorCollection.register(new PropertyGridEditorExpression());
37183
+ _index__WEBPACK_IMPORTED_MODULE_2__.PropertyGridEditorCollection.register(new PropertyGridEditorCondition());
37100
37184
 
37101
37185
 
37102
37186
  /***/ }),
@@ -37944,13 +38028,6 @@ var PropertyGridTitleActionsCreator = /** @class */ (function () {
37944
38028
  action.iconName = _this.getHelpActionIconName(question);
37945
38029
  }
37946
38030
  });
37947
- var baseOnMouseDown = action.doMouseDown;
37948
- action.doMouseDown = function (args) {
37949
- baseOnMouseDown.call(action);
37950
- var evt = !!args.originalEvent ? args.originalEvent : args;
37951
- evt.preventDefault();
37952
- evt.stopPropagation();
37953
- };
37954
38031
  return action;
37955
38032
  };
37956
38033
  PropertyGridTitleActionsCreator.prototype.getHelpActionIconName = function (question) {
@@ -39022,8 +39099,9 @@ var PropertyGridEditorUndefinedBoolean = /** @class */ (function (_super) {
39022
39099
  { value: "false", text: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("pe.disabled") },
39023
39100
  { value: "true", text: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("pe.enabled") },
39024
39101
  ];
39102
+ var _renderAsButtonGroup = _creator_settings__WEBPACK_IMPORTED_MODULE_6__.settings.propertyGrid.useButtonGroup;
39025
39103
  var res = {
39026
- type: "buttongroup",
39104
+ type: _renderAsButtonGroup ? "buttongroup" : "dropdown",
39027
39105
  choices: choices,
39028
39106
  showOptionsCaption: false
39029
39107
  };
@@ -39384,10 +39462,9 @@ var PropertyGridEditorDropdown = /** @class */ (function (_super) {
39384
39462
  };
39385
39463
  PropertyGridEditorDropdown.prototype.getJSON = function (obj, prop, options) {
39386
39464
  var choices = this.getChoices(obj, prop);
39465
+ var _renderAsButtonGroup = this.renderAsButtonGroup(prop, choices);
39387
39466
  var json = {
39388
- type: this.renderAsButtonGroup(prop, choices)
39389
- ? "buttongroup"
39390
- : "dropdown",
39467
+ type: _renderAsButtonGroup ? "buttongroup" : "dropdown",
39391
39468
  choices: choices,
39392
39469
  showOptionsCaption: false
39393
39470
  };
@@ -40222,12 +40299,19 @@ var PropertyGridEditorMatrixItemValues = /** @class */ (function (_super) {
40222
40299
  return (!!column &&
40223
40300
  column.isVisible &&
40224
40301
  !column.readOnly &&
40225
- !this.hasMultipleLanguage(items) &&
40226
- !this.hasVisibleIfOrEnableIf(items));
40302
+ !this.hasMultipleLanguage(items));
40227
40303
  };
40228
40304
  PropertyGridEditorMatrixItemValues.prototype.getAllowRowDragDrop = function (prop) { return true; };
40229
40305
  PropertyGridEditorMatrixItemValues.prototype.createPropertyEditorSetup = function (obj, prop, question, options) {
40230
40306
  var names = question.columns.filter(function (c) { return !c.readOnly; }).map(function (c) { return c.name; });
40307
+ var visibleIfProp = survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.findProperty("itemvalue", "visibleIf");
40308
+ if (visibleIfProp && visibleIfProp.visible) {
40309
+ names.push("visibleIf");
40310
+ var enableIfProp = survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.findProperty("itemvalue", "enableIf");
40311
+ if (enableIfProp && enableIfProp.visible) {
40312
+ names.push("enableIf");
40313
+ }
40314
+ }
40231
40315
  return new _fast_entry__WEBPACK_IMPORTED_MODULE_6__.FastEntryEditor(obj[prop.name], options, prop.className, names);
40232
40316
  };
40233
40317
  PropertyGridEditorMatrixItemValues.prototype.canClearPropertyValue = function (obj, prop, question, options) {
@@ -40282,17 +40366,6 @@ var PropertyGridEditorMatrixItemValues = /** @class */ (function (_super) {
40282
40366
  }
40283
40367
  return false;
40284
40368
  };
40285
- PropertyGridEditorMatrixItemValues.prototype.hasVisibleIfOrEnableIf = function (items) {
40286
- if (!items || !Array.isArray(items)) {
40287
- return false;
40288
- }
40289
- for (var i = 0; i < items.length; i++) {
40290
- if (!!items[i].visibleIf || items[i].enableIf) {
40291
- return true;
40292
- }
40293
- }
40294
- return false;
40295
- };
40296
40369
  PropertyGridEditorMatrixItemValues.prototype.onMatrixCellCreated = function (obj, options) {
40297
40370
  _super.prototype.onMatrixCellCreated.call(this, obj, options);
40298
40371
  function updateHtml(question, value) {
@@ -40740,8 +40813,8 @@ var ObjectSelectorItem = /** @class */ (function (_super) {
40740
40813
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(ObjectSelectorItem, _super);
40741
40814
  function ObjectSelectorItem(id, data, title, level) {
40742
40815
  var _this = _super.call(this, { id: "sv_item_selector_" + id.toString(), title: title }) || this;
40743
- _this.data = data;
40744
40816
  _this.level = level;
40817
+ _this.data = data;
40745
40818
  return _this;
40746
40819
  }
40747
40820
  ObjectSelectorItem.prototype.hasText = function (filteredTextInLow) {
@@ -47888,7 +47961,7 @@ __webpack_require__.r(__webpack_exports__);
47888
47961
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! survey-core */ "survey-core");
47889
47962
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_116__);
47890
47963
  var Version;
47891
- Version = "".concat("2.0.6");
47964
+ Version = "".concat("2.0.7");
47892
47965
  //should be loaded before other styles for easier override
47893
47966
 
47894
47967
 
@@ -48010,7 +48083,7 @@ Version = "".concat("2.0.6");
48010
48083
 
48011
48084
 
48012
48085
 
48013
- (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.0.6"), "survey-creator-core");
48086
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.0.7"), "survey-creator-core");
48014
48087
 
48015
48088
  })();
48016
48089