survey-creator-react 1.12.3 → 1.12.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-creator-react",
3
- "version": "1.12.3",
3
+ "version": "1.12.4",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -29,9 +29,9 @@
29
29
  "ace-builds": "^1.4.12",
30
30
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0",
31
31
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0",
32
- "survey-core": "1.12.3",
33
- "survey-react-ui": "1.12.3",
34
- "survey-creator-core": "1.12.3"
32
+ "survey-core": "1.12.4",
33
+ "survey-react-ui": "1.12.4",
34
+ "survey-creator-core": "1.12.4"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v1.12.3
2
+ * SurveyJS Creator React v1.12.4
3
3
  * (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1874,6 +1874,13 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1874
1874
  }
1875
1875
  this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_4__.PageAdorner(props.creator, props.page);
1876
1876
  };
1877
+ CreatorSurveyPageComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
1878
+ var _a;
1879
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
1880
+ if (!!((_a = this.rootRef) === null || _a === void 0 ? void 0 : _a.current)) {
1881
+ this.model.rootElement = this.rootRef.current;
1882
+ }
1883
+ };
1877
1884
  CreatorSurveyPageComponent.prototype.getUpdatedModelProps = function () {
1878
1885
  return ["creator", "page"];
1879
1886
  };
@@ -1881,17 +1888,14 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1881
1888
  return this.model;
1882
1889
  };
1883
1890
  CreatorSurveyPageComponent.prototype.componentDidMount = function () {
1884
- var _this = this;
1885
1891
  _super.prototype.componentDidMount.call(this);
1886
- this.model.onPageSelectedCallback = function () {
1887
- if (!!_this.rootRef.current) {
1888
- survey_creator_core__WEBPACK_IMPORTED_MODULE_4__.SurveyHelper.scrollIntoViewIfNeeded(_this.rootRef.current);
1889
- }
1890
- };
1892
+ if (!!this.rootRef.current) {
1893
+ this.model.rootElement = this.rootRef.current;
1894
+ }
1891
1895
  };
1892
1896
  CreatorSurveyPageComponent.prototype.componentWillUnmount = function () {
1893
1897
  _super.prototype.componentWillUnmount.call(this);
1894
- this.model.onPageSelectedCallback = undefined;
1898
+ this.model.dispose();
1895
1899
  };
1896
1900
  CreatorSurveyPageComponent.prototype.canRender = function () {
1897
1901
  return (!!this.model &&
@@ -2029,8 +2033,10 @@ __webpack_require__.r(__webpack_exports__);
2029
2033
 
2030
2034
  var QuestionAdornerComponent = /** @class */ (function (_super) {
2031
2035
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(QuestionAdornerComponent, _super);
2032
- function QuestionAdornerComponent() {
2033
- return _super !== null && _super.apply(this, arguments) || this;
2036
+ function QuestionAdornerComponent(props) {
2037
+ var _this = _super.call(this, props) || this;
2038
+ _this.rootRef = react__WEBPACK_IMPORTED_MODULE_2__.createRef();
2039
+ return _this;
2034
2040
  }
2035
2041
  QuestionAdornerComponent.prototype.createModel = function (props) {
2036
2042
  if (this.modelValue) {
@@ -2061,8 +2067,11 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2061
2067
  var _this = this;
2062
2068
  var allowInteractions = this.model.element
2063
2069
  .isInteractiveDesignElement;
2070
+ var titleForCollapsedState = this.renderQuestionTitle();
2064
2071
  var content = this.renderContent(allowInteractions);
2065
- return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, "data-sv-drop-target-survey-element": this.model.element.name || null, className: "svc-question__adorner " + this.model.rootCss(), onDoubleClick: function (e) { allowInteractions && _this.model.dblclick(e.nativeEvent); e.stopPropagation(); }, onMouseLeave: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); }, onMouseOver: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); } }, content));
2072
+ return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, "data-sv-drop-target-survey-element": this.model.element.name || null, className: this.model.rootCss(), onDoubleClick: function (e) { allowInteractions && _this.model.dblclick(e.nativeEvent); e.stopPropagation(); }, onMouseLeave: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); }, onMouseOver: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); } },
2073
+ titleForCollapsedState,
2074
+ content));
2066
2075
  };
2067
2076
  QuestionAdornerComponent.prototype.disableTabStop = function () {
2068
2077
  return true;
@@ -2094,19 +2103,31 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2094
2103
  return survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement("svc-question-banner", this.model.createBannerParams());
2095
2104
  };
2096
2105
  QuestionAdornerComponent.prototype.renderQuestionTitle = function () {
2106
+ var _this = this;
2097
2107
  if (!this.model.showHiddenTitle)
2098
2108
  return null;
2099
2109
  var element = this.model.element;
2100
2110
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: this.model.cssCollapsedHiddenHeader },
2101
- react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: this.model.cssCollapsedHiddenTitle }, element.title ? survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase.renderLocString(element.locTitle, null, "q_title") : react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-fake-title" }, element.name))));
2111
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: function (node) { return node && (!_this.model.renderedCollapsed ?
2112
+ node.setAttribute("inert", "") : node.removeAttribute("inert")); }, className: this.model.cssCollapsedHiddenTitle }, element.hasTitle ? survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase.renderLocString(element.locTitle, null, "q_title") : react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-fake-title" }, element.name))));
2102
2113
  };
2103
2114
  QuestionAdornerComponent.prototype.renderElementContent = function () {
2104
2115
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2105
- this.renderQuestionTitle(),
2106
2116
  this.props.element,
2107
2117
  this.renderElementPlaceholder(),
2108
2118
  this.renderCarryForwardBanner()));
2109
2119
  };
2120
+ QuestionAdornerComponent.prototype.componentDidMount = function () {
2121
+ _super.prototype.componentDidMount.call(this);
2122
+ this.model.rootElement = this.rootRef.current;
2123
+ };
2124
+ QuestionAdornerComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
2125
+ var _a;
2126
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
2127
+ if (((_a = this.rootRef) === null || _a === void 0 ? void 0 : _a.current) && this.modelValue) {
2128
+ this.modelValue.rootElement = this.rootRef.current;
2129
+ }
2130
+ };
2110
2131
  QuestionAdornerComponent.prototype.renderElementPlaceholder = function () {
2111
2132
  if (!this.model.isEmptyElement) {
2112
2133
  return null;
@@ -2115,6 +2136,11 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2115
2136
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-panel__placeholder_frame" },
2116
2137
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-panel__placeholder" }, this.model.placeholderText))));
2117
2138
  };
2139
+ QuestionAdornerComponent.prototype.componentWillUnmount = function () {
2140
+ if (this.model) {
2141
+ this.model.dispose();
2142
+ }
2143
+ };
2118
2144
  return QuestionAdornerComponent;
2119
2145
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_5__.CreatorModelElement));
2120
2146
 
@@ -2355,13 +2381,11 @@ __webpack_require__.r(__webpack_exports__);
2355
2381
 
2356
2382
  var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2357
2383
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(QuestionImageAdornerComponent, _super);
2358
- function QuestionImageAdornerComponent(props) {
2359
- var _this = _super.call(this, props) || this;
2360
- _this.rootRef = react__WEBPACK_IMPORTED_MODULE_2__.createRef();
2361
- return _this;
2384
+ function QuestionImageAdornerComponent() {
2385
+ return _super !== null && _super.apply(this, arguments) || this;
2362
2386
  }
2363
2387
  QuestionImageAdornerComponent.prototype.createQuestionViewModel = function (props) {
2364
- return new survey_creator_core__WEBPACK_IMPORTED_MODULE_1__.QuestionImageAdornerViewModel(props.componentData, props.question, null, null);
2388
+ return new survey_creator_core__WEBPACK_IMPORTED_MODULE_1__.QuestionImageAdornerViewModel(props.componentData, props.question, null);
2365
2389
  };
2366
2390
  Object.defineProperty(QuestionImageAdornerComponent.prototype, "imageModel", {
2367
2391
  get: function () {
@@ -2370,10 +2394,6 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2370
2394
  enumerable: false,
2371
2395
  configurable: true
2372
2396
  });
2373
- QuestionImageAdornerComponent.prototype.componentDidMount = function () {
2374
- _super.prototype.componentDidMount.call(this);
2375
- this.imageModel.questionRoot = this.rootRef.current;
2376
- };
2377
2397
  QuestionImageAdornerComponent.prototype.renderHeader = function () {
2378
2398
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2379
2399
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("input", { type: "file", "aria-hidden": "true", tabIndex: -1, accept: this.imageModel.acceptedTypes, className: "svc-choose-file-input", style: {
@@ -2408,13 +2428,10 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2408
2428
  isDisplayMode: false,
2409
2429
  question: this.imageModel.filePresentationModel
2410
2430
  });
2411
- return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2412
- this.renderQuestionTitle(),
2413
- fileQuestion));
2431
+ return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, fileQuestion));
2414
2432
  }
2415
2433
  else {
2416
2434
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2417
- this.renderQuestionTitle(),
2418
2435
  this.props.element,
2419
2436
  this.renderElementPlaceholder()));
2420
2437
  }
@@ -2609,6 +2626,46 @@ survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.regist
2609
2626
  });
2610
2627
 
2611
2628
 
2629
+ /***/ }),
2630
+
2631
+ /***/ "./src/components/SurfacePlaceholder.tsx":
2632
+ /*!***********************************************!*\
2633
+ !*** ./src/components/SurfacePlaceholder.tsx ***!
2634
+ \***********************************************/
2635
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2636
+
2637
+ __webpack_require__.r(__webpack_exports__);
2638
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2639
+ /* harmony export */ SurfacePlaceholder: () => (/* binding */ SurfacePlaceholder)
2640
+ /* harmony export */ });
2641
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
2642
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2643
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2644
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
2645
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
2646
+
2647
+
2648
+
2649
+ var SurfacePlaceholder = /** @class */ (function (_super) {
2650
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SurfacePlaceholder, _super);
2651
+ function SurfacePlaceholder(props) {
2652
+ return _super.call(this, props) || this;
2653
+ }
2654
+ SurfacePlaceholder.prototype.render = function () {
2655
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder" },
2656
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__image svc-surface-placeholder__image--" + this.props.name }),
2657
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__text" },
2658
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__title" }, this.props.placeholderTitleText),
2659
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__description" }, this.props.placeholderDescriptionText))));
2660
+ };
2661
+ return SurfacePlaceholder;
2662
+ }(react__WEBPACK_IMPORTED_MODULE_1__.Component));
2663
+
2664
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("svc-surface-placeholder", function (props) {
2665
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(SurfacePlaceholder, props);
2666
+ });
2667
+
2668
+
2612
2669
  /***/ }),
2613
2670
 
2614
2671
  /***/ "./src/custom-questions/BooleanSwitch.tsx":
@@ -3717,6 +3774,8 @@ __webpack_require__.r(__webpack_exports__);
3717
3774
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
3718
3775
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
3719
3776
  /* harmony import */ var _PageNavigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../PageNavigator */ "./src/PageNavigator.tsx");
3777
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
3778
+
3720
3779
 
3721
3780
 
3722
3781
 
@@ -3837,7 +3896,7 @@ var TabDesignerComponent = /** @class */ (function (_super) {
3837
3896
  this.renderNewPage("svc-designer-placeholder-page"))));
3838
3897
  };
3839
3898
  TabDesignerComponent.prototype.renderPlaceHolderContent = function () {
3840
- return react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-designer-placeholder-text svc-text svc-text--normal" }, this.model.placeholderText);
3899
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_4__.SurfacePlaceholder, { name: "designer", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText });
3841
3900
  };
3842
3901
  TabDesignerComponent.prototype.renderTabContent = function () {
3843
3902
  var survey = this.creator.survey;
@@ -4066,6 +4125,8 @@ __webpack_require__.r(__webpack_exports__);
4066
4125
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
4067
4126
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4068
4127
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4128
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4129
+
4069
4130
 
4070
4131
 
4071
4132
 
@@ -4117,18 +4178,18 @@ var TabLogicComponent = /** @class */ (function (_super) {
4117
4178
  };
4118
4179
  TabLogicComponent.prototype.renderElement = function () {
4119
4180
  var logic = this.model;
4120
- var rootClass = "svc-creator-tab__content";
4181
+ var rootClass = "svc-creator-tab__content svc-logic-tab";
4121
4182
  var content = this.renderViewContent();
4122
4183
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: rootClass }, content);
4123
4184
  };
4124
4185
  TabLogicComponent.prototype.renderViewContent = function () {
4125
- var logicTabClassName = "svc-plugin-tab__content svc-logic-tab__content " + (this.model.hasItems ? "" : "svc-logic-tab__empty");
4186
+ var logicTabClassName = "svc-plugin-tab__content svc-logic-tab svc-logic-tab__content " + (this.model.hasItems ? "" : "svc-logic-tab--empty");
4126
4187
  var addLogic = !this.model.readOnly ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabLogicAddButtonComponent, { button: this.model.addNewButton }) : undefined;
4127
4188
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
4128
4189
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: logicTabClassName },
4129
4190
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Survey, { model: this.model.itemsSurvey }),
4130
4191
  this.model.hasItems ? null : (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-logic-tab__content-empty" },
4131
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-text" }, this.model.emptyTabPlaceholder))),
4192
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__.SurfacePlaceholder, { name: "logic", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText }))),
4132
4193
  addLogic)));
4133
4194
  };
4134
4195
  return TabLogicComponent;
@@ -4159,6 +4220,8 @@ __webpack_require__.r(__webpack_exports__);
4159
4220
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4160
4221
  /* harmony import */ var _SurveySimulator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SurveySimulator */ "./src/tabs/SurveySimulator.tsx");
4161
4222
  /* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Results */ "./src/Results.tsx");
4223
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4224
+
4162
4225
 
4163
4226
 
4164
4227
 
@@ -4209,12 +4272,19 @@ var TabPreviewSurveyComponent = /** @class */ (function (_super) {
4209
4272
  TabPreviewSurveyComponent.prototype.getStateElement = function () {
4210
4273
  return this.model;
4211
4274
  };
4275
+ TabPreviewSurveyComponent.prototype.renderPlaceholder = function () {
4276
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-test-tab--empty" },
4277
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__.SurfacePlaceholder, { name: "preview", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText })));
4278
+ };
4279
+ TabPreviewSurveyComponent.prototype.renderSimulator = function () {
4280
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-plugin-tab__content" },
4281
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_SurveySimulator__WEBPACK_IMPORTED_MODULE_3__.SurveySimulator, { model: this.model.simulator }),
4282
+ this.model.showResults ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Results__WEBPACK_IMPORTED_MODULE_4__.SurveyResults, { survey: this.model.simulator.survey }) : null));
4283
+ };
4212
4284
  TabPreviewSurveyComponent.prototype.renderElement = function () {
4213
4285
  var tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
4214
4286
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: tabContentClassName },
4215
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-plugin-tab__content" },
4216
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_SurveySimulator__WEBPACK_IMPORTED_MODULE_3__.SurveySimulator, { model: this.model.simulator }),
4217
- this.model.showResults ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Results__WEBPACK_IMPORTED_MODULE_4__.SurveyResults, { survey: this.model.simulator.survey }) : null),
4287
+ this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
4218
4288
  this.getBottomToolbar()));
4219
4289
  };
4220
4290
  TabPreviewSurveyComponent.prototype.getBottomToolbar = function () {
@@ -4321,6 +4391,8 @@ __webpack_require__.r(__webpack_exports__);
4321
4391
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4322
4392
  /* harmony import */ var _SurveySimulator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SurveySimulator */ "./src/tabs/SurveySimulator.tsx");
4323
4393
  /* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Results */ "./src/Results.tsx");
4394
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4395
+
4324
4396
 
4325
4397
 
4326
4398
 
@@ -4341,12 +4413,19 @@ var TabThemeSurveyComponent = /** @class */ (function (_super) {
4341
4413
  TabThemeSurveyComponent.prototype.getStateElement = function () {
4342
4414
  return this.model;
4343
4415
  };
4416
+ TabThemeSurveyComponent.prototype.renderPlaceholder = function () {
4417
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-test-tab--empty" },
4418
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__.SurfacePlaceholder, { name: "theme", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText })));
4419
+ };
4420
+ TabThemeSurveyComponent.prototype.renderSimulator = function () {
4421
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-plugin-tab__content" },
4422
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_SurveySimulator__WEBPACK_IMPORTED_MODULE_3__.SurveySimulator, { model: this.model.simulator }),
4423
+ this.model.showResults ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Results__WEBPACK_IMPORTED_MODULE_4__.SurveyResults, { survey: this.model.simulator.survey }) : null));
4424
+ };
4344
4425
  TabThemeSurveyComponent.prototype.renderElement = function () {
4345
4426
  var tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
4346
4427
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: tabContentClassName },
4347
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-plugin-tab__content" },
4348
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_SurveySimulator__WEBPACK_IMPORTED_MODULE_3__.SurveySimulator, { model: this.model.simulator }),
4349
- this.model.showResults ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Results__WEBPACK_IMPORTED_MODULE_4__.SurveyResults, { survey: this.model.simulator.survey }) : null),
4428
+ this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
4350
4429
  this.getBottomToolbar()));
4351
4430
  };
4352
4431
  TabThemeSurveyComponent.prototype.getBottomToolbar = function () {
@@ -4485,6 +4564,8 @@ __webpack_require__.r(__webpack_exports__);
4485
4564
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
4486
4565
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4487
4566
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4567
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4568
+
4488
4569
 
4489
4570
 
4490
4571
 
@@ -4506,12 +4587,11 @@ var TabTranslationComponent = /** @class */ (function (_super) {
4506
4587
  TabTranslationComponent.prototype.renderElement = function () {
4507
4588
  if (!this.model)
4508
4589
  return null;
4509
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-creator-tab__content svc-translation-tab" }, this.renderElementContent()));
4590
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-creator-tab__content svc-translation-tab" + (this.model.isEmpty ? " svc-translation-tab--empty" : "") }, this.renderElementContent()));
4510
4591
  };
4511
4592
  TabTranslationComponent.prototype.renderElementContent = function () {
4512
4593
  if (this.model.isEmpty) {
4513
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "st-no-strings" },
4514
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", null, this.model.noStringsText)));
4594
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__.SurfacePlaceholder, { name: "translation", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText });
4515
4595
  }
4516
4596
  else {
4517
4597
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "st-content" },
@@ -5370,7 +5450,7 @@ __webpack_require__.r(__webpack_exports__);
5370
5450
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! survey-core */ "survey-core");
5371
5451
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_64__);
5372
5452
  var Version;
5373
- Version = "".concat("1.12.3");
5453
+ Version = "".concat("1.12.4");
5374
5454
  // import "@survey/creator/survey-creator-core.css";
5375
5455
 
5376
5456
 
@@ -5444,7 +5524,7 @@ Version = "".concat("1.12.3");
5444
5524
 
5445
5525
 
5446
5526
 
5447
- (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.3"), "survey-creator-react");
5527
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.4"), "survey-creator-react");
5448
5528
 
5449
5529
  /******/ return __webpack_exports__;
5450
5530
  /******/ })()