survey-creator-react 1.12.3 → 1.12.5

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.5",
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.5",
33
+ "survey-react-ui": "1.12.5",
34
+ "survey-creator-core": "1.12.5"
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.5
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
@@ -1476,8 +1476,7 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
1476
1476
  };
1477
1477
  SurveyCreatorComponent.prototype.renderSidebar = function () {
1478
1478
  if (!!this.creator.sidebar) {
1479
- var className = this.creator.isMobileView ? "sv-mobile-side-bar" : "";
1480
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: className }, survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.createElement("svc-side-bar", { model: this.creator.sidebar })));
1479
+ return survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.createElement("svc-side-bar", { model: this.creator.sidebar });
1481
1480
  }
1482
1481
  else {
1483
1482
  return null;
@@ -1692,16 +1691,9 @@ var TabbedMenuItemComponent = /** @class */ (function (_super) {
1692
1691
  };
1693
1692
  TabbedMenuItemComponent.prototype.render = function () {
1694
1693
  var item = this.item;
1695
- var className = "svc-tabbed-menu-item";
1696
- if (item.active)
1697
- className += " svc-tabbed-menu-item--selected";
1698
- if (item.enabled !== undefined && !item.enabled)
1699
- className += " svc-tabbed-menu-item--disabled";
1700
- var titleClassName = "svc-text svc-tabbed-menu-item__text svc-text--normal";
1701
- if (item.active)
1702
- titleClassName += " svc-text--bold";
1703
- return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: className, onClick: function () { return item.action(item); } },
1704
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: titleClassName }, item.title))));
1694
+ return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.getRootCss(), onClick: function () { return item.action(item); } },
1695
+ item.hasTitle ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: item.getTitleCss() }, item.title) : null,
1696
+ item.hasIcon ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { iconName: item.iconName, className: item.getIconCss(), size: "auto", title: item.tooltip || item.title }) : null)));
1705
1697
  };
1706
1698
  return TabbedMenuItemComponent;
1707
1699
  }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
@@ -1874,6 +1866,13 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1874
1866
  }
1875
1867
  this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_4__.PageAdorner(props.creator, props.page);
1876
1868
  };
1869
+ CreatorSurveyPageComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
1870
+ var _a;
1871
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
1872
+ if (!!((_a = this.rootRef) === null || _a === void 0 ? void 0 : _a.current)) {
1873
+ this.model.rootElement = this.rootRef.current;
1874
+ }
1875
+ };
1877
1876
  CreatorSurveyPageComponent.prototype.getUpdatedModelProps = function () {
1878
1877
  return ["creator", "page"];
1879
1878
  };
@@ -1881,17 +1880,14 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1881
1880
  return this.model;
1882
1881
  };
1883
1882
  CreatorSurveyPageComponent.prototype.componentDidMount = function () {
1884
- var _this = this;
1885
1883
  _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
- };
1884
+ if (!!this.rootRef.current) {
1885
+ this.model.rootElement = this.rootRef.current;
1886
+ }
1891
1887
  };
1892
1888
  CreatorSurveyPageComponent.prototype.componentWillUnmount = function () {
1893
1889
  _super.prototype.componentWillUnmount.call(this);
1894
- this.model.onPageSelectedCallback = undefined;
1890
+ this.model.dispose();
1895
1891
  };
1896
1892
  CreatorSurveyPageComponent.prototype.canRender = function () {
1897
1893
  return (!!this.model &&
@@ -2029,8 +2025,10 @@ __webpack_require__.r(__webpack_exports__);
2029
2025
 
2030
2026
  var QuestionAdornerComponent = /** @class */ (function (_super) {
2031
2027
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(QuestionAdornerComponent, _super);
2032
- function QuestionAdornerComponent() {
2033
- return _super !== null && _super.apply(this, arguments) || this;
2028
+ function QuestionAdornerComponent(props) {
2029
+ var _this = _super.call(this, props) || this;
2030
+ _this.rootRef = react__WEBPACK_IMPORTED_MODULE_2__.createRef();
2031
+ return _this;
2034
2032
  }
2035
2033
  QuestionAdornerComponent.prototype.createModel = function (props) {
2036
2034
  if (this.modelValue) {
@@ -2061,8 +2059,11 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2061
2059
  var _this = this;
2062
2060
  var allowInteractions = this.model.element
2063
2061
  .isInteractiveDesignElement;
2062
+ var titleForCollapsedState = this.renderQuestionTitle();
2064
2063
  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));
2064
+ 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); } },
2065
+ titleForCollapsedState,
2066
+ content));
2066
2067
  };
2067
2068
  QuestionAdornerComponent.prototype.disableTabStop = function () {
2068
2069
  return true;
@@ -2094,19 +2095,31 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2094
2095
  return survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement("svc-question-banner", this.model.createBannerParams());
2095
2096
  };
2096
2097
  QuestionAdornerComponent.prototype.renderQuestionTitle = function () {
2098
+ var _this = this;
2097
2099
  if (!this.model.showHiddenTitle)
2098
2100
  return null;
2099
2101
  var element = this.model.element;
2100
2102
  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))));
2103
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: function (node) { return node && (!_this.model.renderedCollapsed ?
2104
+ 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
2105
  };
2103
2106
  QuestionAdornerComponent.prototype.renderElementContent = function () {
2104
2107
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2105
- this.renderQuestionTitle(),
2106
2108
  this.props.element,
2107
2109
  this.renderElementPlaceholder(),
2108
2110
  this.renderCarryForwardBanner()));
2109
2111
  };
2112
+ QuestionAdornerComponent.prototype.componentDidMount = function () {
2113
+ _super.prototype.componentDidMount.call(this);
2114
+ this.model.rootElement = this.rootRef.current;
2115
+ };
2116
+ QuestionAdornerComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
2117
+ var _a;
2118
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
2119
+ if (((_a = this.rootRef) === null || _a === void 0 ? void 0 : _a.current) && this.modelValue) {
2120
+ this.modelValue.rootElement = this.rootRef.current;
2121
+ }
2122
+ };
2110
2123
  QuestionAdornerComponent.prototype.renderElementPlaceholder = function () {
2111
2124
  if (!this.model.isEmptyElement) {
2112
2125
  return null;
@@ -2115,6 +2128,11 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2115
2128
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-panel__placeholder_frame" },
2116
2129
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-panel__placeholder" }, this.model.placeholderText))));
2117
2130
  };
2131
+ QuestionAdornerComponent.prototype.componentWillUnmount = function () {
2132
+ if (this.model) {
2133
+ this.model.dispose();
2134
+ }
2135
+ };
2118
2136
  return QuestionAdornerComponent;
2119
2137
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_5__.CreatorModelElement));
2120
2138
 
@@ -2355,13 +2373,11 @@ __webpack_require__.r(__webpack_exports__);
2355
2373
 
2356
2374
  var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2357
2375
  (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;
2376
+ function QuestionImageAdornerComponent() {
2377
+ return _super !== null && _super.apply(this, arguments) || this;
2362
2378
  }
2363
2379
  QuestionImageAdornerComponent.prototype.createQuestionViewModel = function (props) {
2364
- return new survey_creator_core__WEBPACK_IMPORTED_MODULE_1__.QuestionImageAdornerViewModel(props.componentData, props.question, null, null);
2380
+ return new survey_creator_core__WEBPACK_IMPORTED_MODULE_1__.QuestionImageAdornerViewModel(props.componentData, props.question, null);
2365
2381
  };
2366
2382
  Object.defineProperty(QuestionImageAdornerComponent.prototype, "imageModel", {
2367
2383
  get: function () {
@@ -2370,10 +2386,6 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2370
2386
  enumerable: false,
2371
2387
  configurable: true
2372
2388
  });
2373
- QuestionImageAdornerComponent.prototype.componentDidMount = function () {
2374
- _super.prototype.componentDidMount.call(this);
2375
- this.imageModel.questionRoot = this.rootRef.current;
2376
- };
2377
2389
  QuestionImageAdornerComponent.prototype.renderHeader = function () {
2378
2390
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2379
2391
  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 +2420,10 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2408
2420
  isDisplayMode: false,
2409
2421
  question: this.imageModel.filePresentationModel
2410
2422
  });
2411
- return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2412
- this.renderQuestionTitle(),
2413
- fileQuestion));
2423
+ return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null, fileQuestion));
2414
2424
  }
2415
2425
  else {
2416
2426
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
2417
- this.renderQuestionTitle(),
2418
2427
  this.props.element,
2419
2428
  this.renderElementPlaceholder()));
2420
2429
  }
@@ -2609,6 +2618,46 @@ survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.regist
2609
2618
  });
2610
2619
 
2611
2620
 
2621
+ /***/ }),
2622
+
2623
+ /***/ "./src/components/SurfacePlaceholder.tsx":
2624
+ /*!***********************************************!*\
2625
+ !*** ./src/components/SurfacePlaceholder.tsx ***!
2626
+ \***********************************************/
2627
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2628
+
2629
+ __webpack_require__.r(__webpack_exports__);
2630
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2631
+ /* harmony export */ SurfacePlaceholder: () => (/* binding */ SurfacePlaceholder)
2632
+ /* harmony export */ });
2633
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
2634
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2635
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2636
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
2637
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
2638
+
2639
+
2640
+
2641
+ var SurfacePlaceholder = /** @class */ (function (_super) {
2642
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SurfacePlaceholder, _super);
2643
+ function SurfacePlaceholder(props) {
2644
+ return _super.call(this, props) || this;
2645
+ }
2646
+ SurfacePlaceholder.prototype.render = function () {
2647
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder" },
2648
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__image svc-surface-placeholder__image--" + this.props.name }),
2649
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__text" },
2650
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__title" }, this.props.placeholderTitleText),
2651
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-surface-placeholder__description" }, this.props.placeholderDescriptionText))));
2652
+ };
2653
+ return SurfacePlaceholder;
2654
+ }(react__WEBPACK_IMPORTED_MODULE_1__.Component));
2655
+
2656
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("svc-surface-placeholder", function (props) {
2657
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(SurfacePlaceholder, props);
2658
+ });
2659
+
2660
+
2612
2661
  /***/ }),
2613
2662
 
2614
2663
  /***/ "./src/custom-questions/BooleanSwitch.tsx":
@@ -3393,20 +3442,21 @@ var SidebarComponent = /** @class */ (function (_super) {
3393
3442
  };
3394
3443
  SidebarComponent.prototype.renderElement = function () {
3395
3444
  var _this = this;
3396
- var style = { display: !this.model.renderedIsVisible ? "none" : "" };
3397
- var className = "svc-side-bar" + (this.model.flyoutPanelMode ? " svc-flyout-side-bar" : "");
3445
+ var style = { display: this.model.renderRoot ? "" : "none" };
3446
+ var containerStyle = { display: this.model.renderContainer ? "" : "none" };
3398
3447
  var items = this.model.pages.map(function (page) { return react__WEBPACK_IMPORTED_MODULE_1__.createElement(SidebarPage, { page: page, key: page.id }); });
3399
3448
  var headerArea = survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.createElement(this.model.header.component, { model: this.model.header.componentModel });
3400
3449
  var sideArea = null;
3401
3450
  if (this.model.sideAreaComponentName) {
3402
3451
  sideArea = survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.createElement(this.model.sideAreaComponentName, { model: this.model.sideAreaComponentData });
3403
3452
  }
3404
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: className, style: { display: !this.model.hasVisiblePages ? "none" : "" } },
3405
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-side-bar__shadow", onClick: function () { return _this.model.collapseSidebar(); } }),
3453
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.model.rootCss, style: style },
3454
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-side-bar__shadow", onClick: function () { return _this.model.collapseSidebar(); }, style: containerStyle }),
3406
3455
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-flex-row svc-side-bar__wrapper" },
3407
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.containerRef, style: style, className: "svc-side-bar__container" },
3408
- headerArea,
3409
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-side-bar__container-content" }, items)),
3456
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-side-bar__container-wrapper", style: containerStyle },
3457
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.containerRef, className: "svc-side-bar__container" },
3458
+ headerArea,
3459
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-side-bar__container-content" }, items))),
3410
3460
  sideArea)));
3411
3461
  };
3412
3462
  return SidebarComponent;
@@ -3717,6 +3767,8 @@ __webpack_require__.r(__webpack_exports__);
3717
3767
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
3718
3768
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
3719
3769
  /* harmony import */ var _PageNavigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../PageNavigator */ "./src/PageNavigator.tsx");
3770
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
3771
+
3720
3772
 
3721
3773
 
3722
3774
 
@@ -3837,7 +3889,7 @@ var TabDesignerComponent = /** @class */ (function (_super) {
3837
3889
  this.renderNewPage("svc-designer-placeholder-page"))));
3838
3890
  };
3839
3891
  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);
3892
+ 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
3893
  };
3842
3894
  TabDesignerComponent.prototype.renderTabContent = function () {
3843
3895
  var survey = this.creator.survey;
@@ -4066,6 +4118,8 @@ __webpack_require__.r(__webpack_exports__);
4066
4118
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
4067
4119
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4068
4120
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4121
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4122
+
4069
4123
 
4070
4124
 
4071
4125
 
@@ -4117,18 +4171,18 @@ var TabLogicComponent = /** @class */ (function (_super) {
4117
4171
  };
4118
4172
  TabLogicComponent.prototype.renderElement = function () {
4119
4173
  var logic = this.model;
4120
- var rootClass = "svc-creator-tab__content";
4174
+ var rootClass = "svc-creator-tab__content svc-logic-tab";
4121
4175
  var content = this.renderViewContent();
4122
4176
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: rootClass }, content);
4123
4177
  };
4124
4178
  TabLogicComponent.prototype.renderViewContent = function () {
4125
- var logicTabClassName = "svc-plugin-tab__content svc-logic-tab__content " + (this.model.hasItems ? "" : "svc-logic-tab__empty");
4179
+ var logicTabClassName = "svc-plugin-tab__content svc-logic-tab svc-logic-tab__content " + (this.model.hasItems ? "" : "svc-logic-tab--empty");
4126
4180
  var addLogic = !this.model.readOnly ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabLogicAddButtonComponent, { button: this.model.addNewButton }) : undefined;
4127
4181
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
4128
4182
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: logicTabClassName },
4129
4183
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Survey, { model: this.model.itemsSurvey }),
4130
4184
  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))),
4185
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__.SurfacePlaceholder, { name: "logic", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText }))),
4132
4186
  addLogic)));
4133
4187
  };
4134
4188
  return TabLogicComponent;
@@ -4159,6 +4213,8 @@ __webpack_require__.r(__webpack_exports__);
4159
4213
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4160
4214
  /* harmony import */ var _SurveySimulator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SurveySimulator */ "./src/tabs/SurveySimulator.tsx");
4161
4215
  /* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Results */ "./src/Results.tsx");
4216
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4217
+
4162
4218
 
4163
4219
 
4164
4220
 
@@ -4209,12 +4265,19 @@ var TabPreviewSurveyComponent = /** @class */ (function (_super) {
4209
4265
  TabPreviewSurveyComponent.prototype.getStateElement = function () {
4210
4266
  return this.model;
4211
4267
  };
4268
+ TabPreviewSurveyComponent.prototype.renderPlaceholder = function () {
4269
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-test-tab--empty" },
4270
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__.SurfacePlaceholder, { name: "preview", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText })));
4271
+ };
4272
+ TabPreviewSurveyComponent.prototype.renderSimulator = function () {
4273
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-plugin-tab__content" },
4274
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_SurveySimulator__WEBPACK_IMPORTED_MODULE_3__.SurveySimulator, { model: this.model.simulator }),
4275
+ this.model.showResults ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Results__WEBPACK_IMPORTED_MODULE_4__.SurveyResults, { survey: this.model.simulator.survey }) : null));
4276
+ };
4212
4277
  TabPreviewSurveyComponent.prototype.renderElement = function () {
4213
4278
  var tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
4214
4279
  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),
4280
+ this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
4218
4281
  this.getBottomToolbar()));
4219
4282
  };
4220
4283
  TabPreviewSurveyComponent.prototype.getBottomToolbar = function () {
@@ -4321,6 +4384,8 @@ __webpack_require__.r(__webpack_exports__);
4321
4384
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4322
4385
  /* harmony import */ var _SurveySimulator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SurveySimulator */ "./src/tabs/SurveySimulator.tsx");
4323
4386
  /* harmony import */ var _Results__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Results */ "./src/Results.tsx");
4387
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4388
+
4324
4389
 
4325
4390
 
4326
4391
 
@@ -4341,12 +4406,19 @@ var TabThemeSurveyComponent = /** @class */ (function (_super) {
4341
4406
  TabThemeSurveyComponent.prototype.getStateElement = function () {
4342
4407
  return this.model;
4343
4408
  };
4409
+ TabThemeSurveyComponent.prototype.renderPlaceholder = function () {
4410
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-test-tab--empty" },
4411
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_5__.SurfacePlaceholder, { name: "theme", placeholderTitleText: this.model.placeholderTitleText, placeholderDescriptionText: this.model.placeholderDescriptionText })));
4412
+ };
4413
+ TabThemeSurveyComponent.prototype.renderSimulator = function () {
4414
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-plugin-tab__content" },
4415
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_SurveySimulator__WEBPACK_IMPORTED_MODULE_3__.SurveySimulator, { model: this.model.simulator }),
4416
+ this.model.showResults ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Results__WEBPACK_IMPORTED_MODULE_4__.SurveyResults, { survey: this.model.simulator.survey }) : null));
4417
+ };
4344
4418
  TabThemeSurveyComponent.prototype.renderElement = function () {
4345
4419
  var tabContentClassName = "svc-creator-tab__content svc-test-tab__content" + (this.model.isPageToolbarVisible ? " svc-creator-tab__content--with-toolbar" : "");
4346
4420
  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),
4421
+ this.model.simulator.survey.isEmpty ? this.renderPlaceholder() : this.renderSimulator(),
4350
4422
  this.getBottomToolbar()));
4351
4423
  };
4352
4424
  TabThemeSurveyComponent.prototype.getBottomToolbar = function () {
@@ -4485,6 +4557,8 @@ __webpack_require__.r(__webpack_exports__);
4485
4557
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
4486
4558
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4487
4559
  /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4560
+ /* harmony import */ var _components_SurfacePlaceholder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/SurfacePlaceholder */ "./src/components/SurfacePlaceholder.tsx");
4561
+
4488
4562
 
4489
4563
 
4490
4564
 
@@ -4506,12 +4580,11 @@ var TabTranslationComponent = /** @class */ (function (_super) {
4506
4580
  TabTranslationComponent.prototype.renderElement = function () {
4507
4581
  if (!this.model)
4508
4582
  return null;
4509
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-creator-tab__content svc-translation-tab" }, this.renderElementContent()));
4583
+ 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
4584
  };
4511
4585
  TabTranslationComponent.prototype.renderElementContent = function () {
4512
4586
  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)));
4587
+ 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
4588
  }
4516
4589
  else {
4517
4590
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "st-content" },
@@ -4891,6 +4964,7 @@ var SurveyCreatorToolboxTool = /** @class */ (function (_super) {
4891
4964
  item: item,
4892
4965
  creator: this.creator,
4893
4966
  parentModel: this.creator.toolbox,
4967
+ model: this.model,
4894
4968
  isCompact: this.isCompact
4895
4969
  });
4896
4970
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.css, key: item.id },
@@ -4899,7 +4973,7 @@ var SurveyCreatorToolboxTool = /** @class */ (function (_super) {
4899
4973
  event.persist();
4900
4974
  _this.model.onPointerDown(event);
4901
4975
  }, onMouseOver: function (event) {
4902
- _this.model.onMouseOver(item, event);
4976
+ _this.model.onMouseOverTool(item, event);
4903
4977
  }, onMouseLeave: function (event) {
4904
4978
  _this.model.onMouseLeave(item, event);
4905
4979
  } }, itemComponent)));
@@ -4912,10 +4986,6 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
4912
4986
  function SurveyCreatorToolboxItem(props) {
4913
4987
  return _super.call(this, props) || this;
4914
4988
  }
4915
- SurveyCreatorToolboxItem.prototype.createModel = function (props) {
4916
- var toolboxItem = props.item;
4917
- this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_2__.ToolboxToolViewModel(toolboxItem, props.creator, props.parentModel);
4918
- };
4919
4989
  SurveyCreatorToolboxItem.prototype.getUpdatedModelProps = function () {
4920
4990
  return ["creator", "item"];
4921
4991
  };
@@ -4933,6 +5003,13 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
4933
5003
  enumerable: false,
4934
5004
  configurable: true
4935
5005
  });
5006
+ Object.defineProperty(SurveyCreatorToolboxItem.prototype, "model", {
5007
+ get: function () {
5008
+ return this.props.model;
5009
+ },
5010
+ enumerable: false,
5011
+ configurable: true
5012
+ });
4936
5013
  SurveyCreatorToolboxItem.prototype.getStateElement = function () {
4937
5014
  return this.model;
4938
5015
  };
@@ -4997,6 +5074,13 @@ var SurveyCreatorToolboxItemGroup = /** @class */ (function (_super) {
4997
5074
  enumerable: false,
4998
5075
  configurable: true
4999
5076
  });
5077
+ Object.defineProperty(SurveyCreatorToolboxItemGroup.prototype, "model", {
5078
+ get: function () {
5079
+ return this.props.model;
5080
+ },
5081
+ enumerable: false,
5082
+ configurable: true
5083
+ });
5000
5084
  Object.defineProperty(SurveyCreatorToolboxItemGroup.prototype, "creator", {
5001
5085
  get: function () {
5002
5086
  return this.props.creator;
@@ -5022,8 +5106,11 @@ var SurveyCreatorToolboxItemGroup = /** @class */ (function (_super) {
5022
5106
  return this.item;
5023
5107
  };
5024
5108
  SurveyCreatorToolboxItemGroup.prototype.render = function () {
5109
+ var _this = this;
5025
5110
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
5026
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_4__.SurveyCreatorToolboxItem, { item: this.item, creator: this.creator, parentModel: this.parentModel, isCompact: this.isCompact }),
5111
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_4__.SurveyCreatorToolboxItem, { item: this.item, creator: this.creator, model: this.model, parentModel: this.parentModel, isCompact: this.isCompact }),
5112
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__item-submenu-button", onMouseOver: function (event) { return _this.model.onMouseOver(_this.item, event); }, onMouseLeave: function (event) { return _this.model.onMouseLeave(_this.item, event); } },
5113
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: 24, iconName: this.item.subitemsButtonIcon })),
5027
5114
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: this.item.popupModel, getArea: this.item.getArea }));
5028
5115
  };
5029
5116
  return SurveyCreatorToolboxItemGroup;
@@ -5220,6 +5307,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_survey_react_ui__;
5220
5307
  /******/
5221
5308
  /************************************************************************/
5222
5309
  var __webpack_exports__ = {};
5310
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
5311
+ (() => {
5223
5312
  /*!******************************!*\
5224
5313
  !*** ./src/entries/index.ts ***!
5225
5314
  \******************************/
@@ -5370,7 +5459,7 @@ __webpack_require__.r(__webpack_exports__);
5370
5459
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! survey-core */ "survey-core");
5371
5460
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_64__);
5372
5461
  var Version;
5373
- Version = "".concat("1.12.3");
5462
+ Version = "".concat("1.12.5");
5374
5463
  // import "@survey/creator/survey-creator-core.css";
5375
5464
 
5376
5465
 
@@ -5444,7 +5533,9 @@ Version = "".concat("1.12.3");
5444
5533
 
5445
5534
 
5446
5535
 
5447
- (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.3"), "survey-creator-react");
5536
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.5"), "survey-creator-react");
5537
+
5538
+ })();
5448
5539
 
5449
5540
  /******/ return __webpack_exports__;
5450
5541
  /******/ })()