survey-creator-react 1.12.20 → 2.0.0-rc.0

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/index.html CHANGED
@@ -21,7 +21,7 @@
21
21
  <script src="./node_modules/survey-creator-core/survey-creator-core.i18n.min.js"></script>
22
22
 
23
23
  <!--<script src="./build/survey-creator-react.js"></script>-->
24
- <link rel="stylesheet" type="text/css" href="./node_modules/survey-core/defaultV2.css" />
24
+ <link rel="stylesheet" type="text/css" href="./node_modules/survey-core/default.css" />
25
25
  <!-- <link rel="stylesheet" type="text/css" href="./node_modules/survey-core/modern.css" /> -->
26
26
  <link rel="stylesheet" type="text/css" href="./node_modules/survey-creator-core/survey-creator-core.css" />
27
27
  <!-- <link rel="stylesheet" type="text/css" href="./build/survey-creator-react.css" /> -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-creator-react",
3
- "version": "1.12.20",
3
+ "version": "2.0.0-rc.0",
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 || ^19.0.0",
31
31
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
32
- "survey-core": "1.12.20",
33
- "survey-react-ui": "1.12.20",
34
- "survey-creator-core": "1.12.20"
32
+ "survey-core": "2.0.0-rc.0",
33
+ "survey-react-ui": "2.0.0-rc.0",
34
+ "survey-creator-core": "2.0.0-rc.0"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v1.12.20
2
+ * SurveyJS Creator React v2.0.0-rc.0
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
@@ -1162,9 +1162,8 @@ __webpack_require__.r(__webpack_exports__);
1162
1162
  var SurveyLocStringEditor = /** @class */ (function (_super) {
1163
1163
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SurveyLocStringEditor, _super);
1164
1164
  function SurveyLocStringEditor(props) {
1165
- var _this = this;
1166
1165
  var _a;
1167
- _this = _super.call(this, props) || this;
1166
+ var _this = _super.call(this, props) || this;
1168
1167
  _this.onChangedHandler = function (sender, options) {
1169
1168
  _this.setState({ changed: !!_this.state && _this.state.changed ? _this.state.changed + 1 : 1 });
1170
1169
  };
@@ -1614,10 +1613,13 @@ __webpack_require__.r(__webpack_exports__);
1614
1613
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
1615
1614
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1616
1615
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1617
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-core */ "survey-core");
1618
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_2__);
1619
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
1620
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__);
1616
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
1617
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
1618
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-core */ "survey-core");
1619
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_3__);
1620
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
1621
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__);
1622
+
1621
1623
 
1622
1624
 
1623
1625
 
@@ -1640,7 +1642,7 @@ var TabbedMenuComponent = /** @class */ (function (_super) {
1640
1642
  return this.model;
1641
1643
  };
1642
1644
  TabbedMenuComponent.prototype.renderElement = function () {
1643
- var items = this.model.renderedActions.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabbedMenuItemWrapper, { item: item, key: item.id }); });
1645
+ var items = this.model.renderedActions.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }); });
1644
1646
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu" }, items));
1645
1647
  };
1646
1648
  TabbedMenuComponent.prototype.componentDidMount = function () {
@@ -1648,19 +1650,21 @@ var TabbedMenuComponent = /** @class */ (function (_super) {
1648
1650
  var container = this.rootRef.current;
1649
1651
  if (!container)
1650
1652
  return;
1651
- this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_2__.ResponsivityManager(container, this.model, ".svc-tabbed-menu-item-container:not(.sv-dots)>.sv-action__content");
1653
+ this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_3__.ResponsivityManager(container, this.model);
1652
1654
  };
1653
1655
  TabbedMenuComponent.prototype.componentWillUnmount = function () {
1654
1656
  this.manager && (this.manager.dispose());
1655
1657
  _super.prototype.componentWillUnmount.call(this);
1656
1658
  };
1657
1659
  return TabbedMenuComponent;
1658
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
1660
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase));
1659
1661
 
1660
1662
  var TabbedMenuItemWrapper = /** @class */ (function (_super) {
1661
1663
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabbedMenuItemWrapper, _super);
1662
- function TabbedMenuItemWrapper() {
1663
- return _super !== null && _super.apply(this, arguments) || this;
1664
+ function TabbedMenuItemWrapper(props) {
1665
+ var _this = _super.call(this, props) || this;
1666
+ _this.ref = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
1667
+ return _this;
1664
1668
  }
1665
1669
  Object.defineProperty(TabbedMenuItemWrapper.prototype, "item", {
1666
1670
  get: function () {
@@ -1678,12 +1682,36 @@ var TabbedMenuItemWrapper = /** @class */ (function (_super) {
1678
1682
  css += " " + this.item.css;
1679
1683
  }
1680
1684
  css += (!this.item.isVisible ? " sv-action--hidden" : "");
1681
- var component = survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.createElement(this.item.component || "svc-tabbed-menu-item", { item: this.item });
1682
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { key: this.item.id, className: css },
1685
+ var component = survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.item.component || "svc-tabbed-menu-item", { item: this.item });
1686
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { key: this.item.id, className: css, ref: this.ref },
1683
1687
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "sv-action__content" }, component)));
1684
1688
  };
1689
+ TabbedMenuItemWrapper.prototype.componentDidMount = function () {
1690
+ var _this = this;
1691
+ _super.prototype.componentDidMount.call(this);
1692
+ this.item.updateModeCallback = function (mode, callback) {
1693
+ queueMicrotask(function () {
1694
+ if (react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync) {
1695
+ react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync(function () {
1696
+ _this.item.mode = mode;
1697
+ });
1698
+ }
1699
+ else {
1700
+ _this.item.mode = mode;
1701
+ }
1702
+ queueMicrotask(function () {
1703
+ callback(mode, _this.ref.current);
1704
+ });
1705
+ });
1706
+ };
1707
+ this.item.afterRender();
1708
+ };
1709
+ TabbedMenuItemWrapper.prototype.componentWillUnmount = function () {
1710
+ _super.prototype.componentWillUnmount.call(this);
1711
+ this.item.updateModeCallback = undefined;
1712
+ };
1685
1713
  return TabbedMenuItemWrapper;
1686
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
1714
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase));
1687
1715
  var TabbedMenuItemComponent = /** @class */ (function (_super) {
1688
1716
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabbedMenuItemComponent, _super);
1689
1717
  function TabbedMenuItemComponent() {
@@ -1701,14 +1729,14 @@ var TabbedMenuItemComponent = /** @class */ (function (_super) {
1701
1729
  };
1702
1730
  TabbedMenuItemComponent.prototype.render = function () {
1703
1731
  var item = this.item;
1704
- 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); } },
1732
+ return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.getRootCss(), onClick: function () { return item.action(item); } },
1705
1733
  item.hasTitle ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: item.getTitleCss() }, item.title) : null,
1706
- 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)));
1734
+ 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)));
1707
1735
  };
1708
1736
  return TabbedMenuItemComponent;
1709
- }(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase));
1737
+ }(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SurveyElementBase));
1710
1738
 
1711
- survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item", function (props) {
1739
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item", function (props) {
1712
1740
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabbedMenuItemComponent, props);
1713
1741
  });
1714
1742
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TabbedMenuComponent);
@@ -1926,7 +1954,8 @@ var CreatorSurveyPageComponent = /** @class */ (function (_super) {
1926
1954
  CreatorSurveyPageComponent.prototype.renderHeader = function () {
1927
1955
  var _this = this;
1928
1956
  var actions = (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-page__content-actions" },
1929
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyActionBar, { model: this.model.actionContainer })));
1957
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyActionBar, { model: this.model.actionContainer }),
1958
+ (this.model.topActionContainer.hasActions ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyActionBar, { model: this.model.topActionContainer }) : null)));
1930
1959
  if (this.model.isGhost || !this.model.allowDragging) {
1931
1960
  return actions;
1932
1961
  }
@@ -4359,7 +4388,7 @@ var TabPreviewSurveyComponent = /** @class */ (function (_super) {
4359
4388
  return TabPreviewSurveyComponent;
4360
4389
  }(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
4361
4390
 
4362
- survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("svc-tab-test", function (props) {
4391
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("svc-tab-preview", function (props) {
4363
4392
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabPreviewSurveyComponent, props);
4364
4393
  });
4365
4394
 
@@ -4745,17 +4774,12 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4745
4774
  return _this;
4746
4775
  }
4747
4776
  AdaptiveToolbox.prototype.componentDidMount = function () {
4748
- var _this = this;
4749
4777
  _super.prototype.componentDidMount.call(this);
4750
4778
  var container = this.rootRef.current;
4751
4779
  this.toolbox.setRootElement(container);
4752
4780
  if (!container)
4753
4781
  return;
4754
- this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_2__.VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox, this.toolbox.itemSelector, null, undefined, function (callback) { return setTimeout(function () {
4755
- if (!_this.toolbox.isResponsivenessDisabled) {
4756
- callback();
4757
- }
4758
- }, 10); });
4782
+ this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_2__.VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox);
4759
4783
  };
4760
4784
  AdaptiveToolbox.prototype.componentWillUnmount = function () {
4761
4785
  this.manager && (this.manager.dispose());
@@ -4782,12 +4806,9 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4782
4806
  AdaptiveToolbox.prototype.renderItems = function (items, isCompact) {
4783
4807
  var _this = this;
4784
4808
  if (isCompact === void 0) { isCompact = false; }
4785
- var result = [];
4786
- items.forEach(function (item, itemIndex) {
4787
- var tool = react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_4__.SurveyCreatorToolboxTool, { item: item, creator: _this.creator, parentModel: _this.toolbox, isCompact: isCompact, key: "item" + itemIndex });
4788
- result.push(tool);
4809
+ return items.map(function (item, itemIndex) {
4810
+ 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 });
4789
4811
  });
4790
- return result;
4791
4812
  };
4792
4813
  AdaptiveToolbox.prototype.renderCategories = function () {
4793
4814
  var _this = this;
@@ -4940,11 +4961,14 @@ __webpack_require__.r(__webpack_exports__);
4940
4961
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
4941
4962
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
4942
4963
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
4943
- /* harmony import */ var survey_creator_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! survey-creator-core */ "survey-creator-core");
4944
- /* harmony import */ var survey_creator_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(survey_creator_core__WEBPACK_IMPORTED_MODULE_2__);
4945
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4946
- /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__);
4947
- /* harmony import */ var _ModelElement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ModelElement */ "./src/ModelElement.tsx");
4964
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom");
4965
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__);
4966
+ /* harmony import */ var survey_creator_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-creator-core */ "survey-creator-core");
4967
+ /* harmony import */ var survey_creator_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(survey_creator_core__WEBPACK_IMPORTED_MODULE_3__);
4968
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! survey-react-ui */ "survey-react-ui");
4969
+ /* harmony import */ var survey_react_ui__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__);
4970
+ /* harmony import */ var _ModelElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ModelElement */ "./src/ModelElement.tsx");
4971
+
4948
4972
 
4949
4973
 
4950
4974
 
@@ -4954,10 +4978,12 @@ __webpack_require__.r(__webpack_exports__);
4954
4978
  var SurveyCreatorToolboxTool = /** @class */ (function (_super) {
4955
4979
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SurveyCreatorToolboxTool, _super);
4956
4980
  function SurveyCreatorToolboxTool(props) {
4957
- return _super.call(this, props) || this;
4981
+ var _this = _super.call(this, props) || this;
4982
+ _this.rootRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
4983
+ return _this;
4958
4984
  }
4959
4985
  SurveyCreatorToolboxTool.prototype.createModel = function (props) {
4960
- this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_2__.ToolboxToolViewModel(props.item, props.creator, props.parentModel);
4986
+ this.model = new survey_creator_core__WEBPACK_IMPORTED_MODULE_3__.ToolboxToolViewModel(props.item, props.creator, props.parentModel);
4961
4987
  };
4962
4988
  SurveyCreatorToolboxTool.prototype.getUpdatedModelProps = function () {
4963
4989
  return ["creator", "item"];
@@ -4989,22 +5015,46 @@ var SurveyCreatorToolboxTool = /** @class */ (function (_super) {
4989
5015
  SurveyCreatorToolboxTool.prototype.render = function () {
4990
5016
  var _this = this;
4991
5017
  var item = this.item;
4992
- var itemComponent = survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.createElement(this.model.itemComponent, {
5018
+ var itemComponent = survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.model.itemComponent, {
4993
5019
  item: item,
4994
5020
  creator: this.creator,
4995
5021
  parentModel: this.creator.toolbox,
4996
5022
  model: this.model,
4997
5023
  isCompact: this.isCompact
4998
5024
  });
4999
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.css, key: item.id },
5025
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.css, key: item.id, ref: this.rootRef },
5000
5026
  (item.needSeparator && !this.creator.toolbox.showCategoryTitles) ? (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-separator" })) : null,
5001
5027
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__tool-content sv-action__content", onPointerDown: function (event) {
5002
5028
  event.persist();
5003
5029
  _this.model.onPointerDown(event);
5004
5030
  } }, itemComponent)));
5005
5031
  };
5032
+ SurveyCreatorToolboxTool.prototype.componentWillUnmount = function () {
5033
+ _super.prototype.componentWillUnmount.call(this);
5034
+ this.item.updateModeCallback = undefined;
5035
+ };
5036
+ SurveyCreatorToolboxTool.prototype.componentDidMount = function () {
5037
+ var _this = this;
5038
+ _super.prototype.componentDidMount.call(this);
5039
+ this.item.updateModeCallback = function (mode, callback) {
5040
+ queueMicrotask(function () {
5041
+ if (react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync) {
5042
+ react_dom__WEBPACK_IMPORTED_MODULE_2__.flushSync(function () {
5043
+ _this.item.mode = mode;
5044
+ });
5045
+ }
5046
+ else {
5047
+ _this.item.mode = mode;
5048
+ }
5049
+ queueMicrotask(function () {
5050
+ callback(mode, _this.rootRef.current);
5051
+ });
5052
+ });
5053
+ };
5054
+ this.item.afterRender();
5055
+ };
5006
5056
  return SurveyCreatorToolboxTool;
5007
- }(_ModelElement__WEBPACK_IMPORTED_MODULE_4__.CreatorModelElement));
5057
+ }(_ModelElement__WEBPACK_IMPORTED_MODULE_5__.CreatorModelElement));
5008
5058
 
5009
5059
  var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
5010
5060
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(SurveyCreatorToolboxItem, _super);
@@ -5045,15 +5095,15 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
5045
5095
  event.persist();
5046
5096
  _this.model.click(event);
5047
5097
  } },
5048
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: "auto", iconName: this.item.iconName, className: "svc-toolbox__item-icon", title: this.item.tooltip }),
5098
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SvgIcon, { size: "auto", iconName: this.item.iconName, className: "svc-toolbox__item-icon", title: this.item.tooltip }),
5049
5099
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", null, this.item.title))
5050
5100
  :
5051
5101
  null);
5052
- var item = (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.item.renderedCss, tabIndex: 0, role: "button", "aria-label": this.item.tooltip, onClick: function (event) {
5102
+ var item = (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.item.renderedCss, tabIndex: 0, role: "button", "aria-label": this.item.tooltip, onClick: function (event) {
5053
5103
  event.persist();
5054
5104
  _this.model.click(event);
5055
5105
  } },
5056
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-container" }, !!this.item.iconName ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: "auto", iconName: this.item.iconName, className: "svc-toolbox__item-icon" }) : null),
5106
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-container" }, !!this.item.iconName ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.SvgIcon, { size: "auto", iconName: this.item.iconName, className: "svc-toolbox__item-icon" }) : null),
5057
5107
  (this.props.isCompact ?
5058
5108
  null
5059
5109
  :
@@ -5063,9 +5113,9 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
5063
5113
  banner));
5064
5114
  };
5065
5115
  return SurveyCreatorToolboxItem;
5066
- }(_ModelElement__WEBPACK_IMPORTED_MODULE_4__.CreatorModelElement));
5116
+ }(_ModelElement__WEBPACK_IMPORTED_MODULE_5__.CreatorModelElement));
5067
5117
 
5068
- survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.registerElement("svc-toolbox-item", function (props) {
5118
+ survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.registerElement("svc-toolbox-item", function (props) {
5069
5119
  return (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(SurveyCreatorToolboxItem, props);
5070
5120
  });
5071
5121
 
@@ -5492,7 +5542,7 @@ __webpack_require__.r(__webpack_exports__);
5492
5542
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
5493
5543
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
5494
5544
  var Version;
5495
- Version = "".concat("1.12.20");
5545
+ Version = "".concat("2.0.0-rc.0");
5496
5546
  // import "@survey/creator/survey-creator-core.css";
5497
5547
 
5498
5548
 
@@ -5565,7 +5615,7 @@ Version = "".concat("1.12.20");
5565
5615
 
5566
5616
 
5567
5617
 
5568
- (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("1.12.20"), "survey-creator-react");
5618
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.0-rc.0"), "survey-creator-react");
5569
5619
 
5570
5620
  })();
5571
5621