survey-creator-react 2.2.1 → 2.2.3

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": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -37,9 +37,9 @@
37
37
  "ace-builds": "^1.4.12",
38
38
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
39
39
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
40
- "survey-core": "2.2.1",
41
- "survey-react-ui": "2.2.1",
42
- "survey-creator-core": "2.2.1"
40
+ "survey-core": "2.2.3",
41
+ "survey-react-ui": "2.2.3",
42
+ "survey-creator-core": "2.2.3"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v2.2.1
2
+ * SurveyJS Creator React v2.2.3
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
@@ -1618,11 +1618,8 @@ __webpack_require__.r(__webpack_exports__);
1618
1618
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1619
1619
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
1620
1620
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
1621
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-core */ "survey-core");
1622
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_3__);
1623
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
1624
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__);
1625
-
1621
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
1622
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__);
1626
1623
 
1627
1624
 
1628
1625
 
@@ -1646,21 +1643,28 @@ var TabbedMenuComponent = /** @class */ (function (_super) {
1646
1643
  };
1647
1644
  TabbedMenuComponent.prototype.renderElement = function () {
1648
1645
  var items = this.model.renderedActions.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }); });
1649
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist" }, items));
1646
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist", style: this.model.getRootStyle() }, items));
1647
+ };
1648
+ TabbedMenuComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
1649
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
1650
+ var container = this.rootRef.current;
1651
+ if (!container)
1652
+ return;
1653
+ this.model.initResponsivityManager(container);
1650
1654
  };
1651
1655
  TabbedMenuComponent.prototype.componentDidMount = function () {
1652
1656
  _super.prototype.componentDidMount.call(this);
1653
1657
  var container = this.rootRef.current;
1654
1658
  if (!container)
1655
1659
  return;
1656
- this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_3__.ResponsivityManager(container, this.model);
1660
+ this.model.initResponsivityManager(container);
1657
1661
  };
1658
1662
  TabbedMenuComponent.prototype.componentWillUnmount = function () {
1659
- this.manager && (this.manager.dispose());
1663
+ this.model.resetResponsivityManager();
1660
1664
  _super.prototype.componentWillUnmount.call(this);
1661
1665
  };
1662
1666
  return TabbedMenuComponent;
1663
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase));
1667
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
1664
1668
 
1665
1669
  var TabbedMenuItemWrapper = /** @class */ (function (_super) {
1666
1670
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabbedMenuItemWrapper, _super);
@@ -1685,7 +1689,7 @@ var TabbedMenuItemWrapper = /** @class */ (function (_super) {
1685
1689
  css += " " + this.item.css;
1686
1690
  }
1687
1691
  css += (!this.item.isVisible ? " sv-action--hidden" : "");
1688
- var component = survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.item.component || "svc-tabbed-menu-item", { item: this.item });
1692
+ var component = survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.createElement(this.item.component || "svc-tabbed-menu-item", { item: this.item });
1689
1693
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { key: this.item.id, className: css, ref: this.ref },
1690
1694
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "sv-action__content" }, component)));
1691
1695
  };
@@ -1714,7 +1718,7 @@ var TabbedMenuItemWrapper = /** @class */ (function (_super) {
1714
1718
  this.item.updateModeCallback = undefined;
1715
1719
  };
1716
1720
  return TabbedMenuItemWrapper;
1717
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase));
1721
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
1718
1722
  var TabbedMenuItemComponent = /** @class */ (function (_super) {
1719
1723
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabbedMenuItemComponent, _super);
1720
1724
  function TabbedMenuItemComponent() {
@@ -1732,14 +1736,14 @@ var TabbedMenuItemComponent = /** @class */ (function (_super) {
1732
1736
  };
1733
1737
  TabbedMenuItemComponent.prototype.render = function () {
1734
1738
  var item = this.item;
1735
- return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { role: "tab", id: "tab-" + item.id, "aria-selected": item.active, "aria-controls": "scrollableDiv-" + item.id, className: item.getRootCss(), onClick: function () { return item.action(item); } },
1739
+ return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { role: "tab", id: "tab-" + item.id, "aria-selected": item.active, "aria-controls": "scrollableDiv-" + item.id, className: item.getRootCss(), onClick: function () { return item.action(item); } },
1736
1740
  item.hasTitle ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: item.getTitleCss() }, item.title) : null,
1737
- item.hasIcon ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SvgIcon, { iconName: item.iconName, className: item.getIconCss(), size: "auto", title: item.tooltip || item.title }) : null)));
1741
+ 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)));
1738
1742
  };
1739
1743
  return TabbedMenuItemComponent;
1740
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase));
1744
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
1741
1745
 
1742
- survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item", function (props) {
1746
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item", function (props) {
1743
1747
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabbedMenuItemComponent, props);
1744
1748
  });
1745
1749
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TabbedMenuComponent);
@@ -3354,7 +3358,7 @@ __webpack_require__.r(__webpack_exports__);
3354
3358
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
3355
3359
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
3356
3360
  var Version;
3357
- Version = "".concat("2.2.1");
3361
+ Version = "".concat("2.2.3");
3358
3362
  // import "@survey/creator/survey-creator-core.css";
3359
3363
 
3360
3364
 
@@ -3426,7 +3430,7 @@ Version = "".concat("2.2.1");
3426
3430
 
3427
3431
 
3428
3432
 
3429
- (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.2.1"), "survey-creator-react");
3433
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.2.3"), "survey-creator-react");
3430
3434
 
3431
3435
 
3432
3436
  /***/ }),
@@ -4935,14 +4939,11 @@ __webpack_require__.r(__webpack_exports__);
4935
4939
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
4936
4940
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
4937
4941
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
4938
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-core */ "survey-core");
4939
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_2__);
4940
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4941
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__);
4942
- /* harmony import */ var _ToolboxItem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ToolboxItem */ "./src/toolbox/ToolboxItem.tsx");
4943
- /* harmony import */ var _components_Search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/Search */ "./src/components/Search.tsx");
4944
- /* harmony import */ var _ToolboxCategory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ToolboxCategory */ "./src/toolbox/ToolboxCategory.tsx");
4945
-
4942
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4943
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__);
4944
+ /* harmony import */ var _ToolboxItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ToolboxItem */ "./src/toolbox/ToolboxItem.tsx");
4945
+ /* harmony import */ var _components_Search__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../components/Search */ "./src/components/Search.tsx");
4946
+ /* harmony import */ var _ToolboxCategory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ToolboxCategory */ "./src/toolbox/ToolboxCategory.tsx");
4946
4947
 
4947
4948
 
4948
4949
 
@@ -4956,17 +4957,22 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4956
4957
  _this.rootRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
4957
4958
  return _this;
4958
4959
  }
4960
+ AdaptiveToolbox.prototype.componentDidUpdate = function (prevProps, prevState) {
4961
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
4962
+ var container = this.rootRef.current;
4963
+ if (container) {
4964
+ this.toolbox.afterRender(container);
4965
+ }
4966
+ };
4959
4967
  AdaptiveToolbox.prototype.componentDidMount = function () {
4960
4968
  _super.prototype.componentDidMount.call(this);
4961
4969
  var container = this.rootRef.current;
4962
- this.toolbox.setRootElement(container);
4963
- if (!container)
4964
- return;
4965
- this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_2__.VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox);
4970
+ if (container) {
4971
+ this.toolbox.afterRender(container);
4972
+ }
4966
4973
  };
4967
4974
  AdaptiveToolbox.prototype.componentWillUnmount = function () {
4968
- this.manager && (this.manager.dispose());
4969
- this.toolbox.setRootElement(undefined);
4975
+ this.toolbox.beforeDestroy();
4970
4976
  _super.prototype.componentWillUnmount.call(this);
4971
4977
  };
4972
4978
  Object.defineProperty(AdaptiveToolbox.prototype, "creator", {
@@ -4990,43 +4996,41 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4990
4996
  var _this = this;
4991
4997
  if (isCompact === void 0) { isCompact = false; }
4992
4998
  return items.map(function (item, itemIndex) {
4993
- return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_4__.SurveyCreatorToolboxTool, { item: item, creator: _this.creator, parentModel: _this.toolbox, isCompact: isCompact, key: item.renderedId });
4999
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_3__.SurveyCreatorToolboxTool, { item: item, creator: _this.creator, parentModel: _this.toolbox, isCompact: isCompact, key: item.renderedId });
4994
5000
  });
4995
5001
  };
4996
5002
  AdaptiveToolbox.prototype.renderCategories = function () {
4997
5003
  var _this = this;
4998
5004
  return this.toolbox.categories.map(function (category, index) {
4999
- return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxCategory__WEBPACK_IMPORTED_MODULE_6__.SurveyCreatorToolboxCategory, { category: category, toolbox: _this.toolbox, key: "category" + index });
5005
+ return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxCategory__WEBPACK_IMPORTED_MODULE_5__.SurveyCreatorToolboxCategory, { category: category, toolbox: _this.toolbox, key: "category" + index });
5000
5006
  });
5001
5007
  };
5002
5008
  AdaptiveToolbox.prototype.renderSearch = function () {
5003
5009
  var searchButton = this.toolbox.isCompactRendered ?
5004
5010
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
5005
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_4__.SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" })) :
5011
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_3__.SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" })) :
5006
5012
  null;
5007
5013
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__search-container" },
5008
5014
  searchButton,
5009
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_Search__WEBPACK_IMPORTED_MODULE_5__.SearchComponent, { model: this.toolbox.searchManager }),
5015
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_components_Search__WEBPACK_IMPORTED_MODULE_4__.SearchComponent, { model: this.toolbox.searchManager }),
5010
5016
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })));
5011
5017
  };
5012
5018
  AdaptiveToolbox.prototype.render = function () {
5013
5019
  var _this = this;
5014
- if (!this.toolbox.hasActions)
5015
- return null;
5016
5020
  var search = this.toolbox.showSearch ? this.renderSearch() : null;
5017
5021
  var placeholder = this.toolbox.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
5018
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
5022
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() },
5019
5023
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__panel" },
5020
5024
  search,
5021
5025
  placeholder,
5022
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.Scroll, null, (this.toolbox.showInSingleCategory) ?
5026
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Scroll, null, (this.toolbox.showInSingleCategory) ?
5023
5027
  (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
5024
5028
  : this.renderCategories()))));
5025
5029
  };
5026
5030
  return AdaptiveToolbox;
5027
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
5031
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
5028
5032
 
5029
- survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.registerElement("svc-toolbox", function (props) {
5033
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("svc-toolbox", function (props) {
5030
5034
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(AdaptiveToolbox, props);
5031
5035
  });
5032
5036