survey-creator-js 2.2.0 → 2.2.2

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-js",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -28,9 +28,9 @@
28
28
  "typings": "./typings/survey-creator-js/entries/index.d.ts",
29
29
  "peerDependencies": {
30
30
  "ace-builds": "^1.4.12",
31
- "survey-core": "2.2.0",
32
- "survey-js-ui": "2.2.0",
33
- "survey-creator-core": "2.2.0",
31
+ "survey-core": "2.2.2",
32
+ "survey-js-ui": "2.2.2",
33
+ "survey-creator-core": "2.2.2",
34
34
  "@types/react-dom": "*",
35
35
  "@types/react": "*"
36
36
  },
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator UI v2.2.0
2
+ * SurveyJS Creator UI v2.2.2
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
@@ -1501,12 +1501,12 @@ var SurveyLocStringEditor = /** @class */ (function (_super) {
1501
1501
  if (this.htmlValue.__html !== this.locString.renderedHtml) {
1502
1502
  this.htmlValue = { __html: this.locString.renderedHtml };
1503
1503
  }
1504
- control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor sv-string-editor--html", contentEditable: this.contentEditable, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true,
1504
+ control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor sv-string-editor--html", contentEditable: this.contentEditable, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true, tabIndex: this.baseModel.tabIndex,
1505
1505
  // style={this.style}
1506
1506
  dangerouslySetInnerHTML: this.htmlValue, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, onMouseUp: this.onMouseUp, onClick: this.edit }));
1507
1507
  }
1508
1508
  else {
1509
- control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor", contentEditable: this.contentEditable, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true,
1509
+ control = (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { role: "textbox", ref: this.svStringEditorRef, className: "sv-string-editor", contentEditable: this.contentEditable, tabIndex: this.baseModel.tabIndex, spellCheck: false, "aria-placeholder": this.placeholder, "aria-label": this.placeholder || "content editable", suppressContentEditableWarning: true,
1510
1510
  // style={this.style}
1511
1511
  key: this.locString.renderedHtml, onBlur: this.onBlur, onInput: this.onInput, onPaste: this.onPaste, onCompositionStart: this.onCompositionStart, onCompositionEnd: this.onCompositionEnd, onFocus: this.onFocus, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp, onMouseUp: this.onMouseUp, onClick: this.edit }, this.locString.renderedHtml));
1512
1512
  }
@@ -1806,8 +1806,6 @@ __webpack_require__.r(__webpack_exports__);
1806
1806
  /* harmony export */ });
1807
1807
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-react-ui */ "survey-js-ui");
1808
1808
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1809
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
1810
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
1811
1809
  var __extends = (undefined && undefined.__extends) || (function () {
1812
1810
  var extendStatics = function (d, b) {
1813
1811
  extendStatics = Object.setPrototypeOf ||
@@ -1826,7 +1824,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
1826
1824
 
1827
1825
 
1828
1826
 
1829
-
1830
1827
  var TabbedMenuComponent = /** @class */ (function (_super) {
1831
1828
  __extends(TabbedMenuComponent, _super);
1832
1829
  function TabbedMenuComponent(props) {
@@ -1846,17 +1843,24 @@ var TabbedMenuComponent = /** @class */ (function (_super) {
1846
1843
  };
1847
1844
  TabbedMenuComponent.prototype.renderElement = function () {
1848
1845
  var items = this.model.renderedActions.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_0__.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }); });
1849
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist" }, items));
1846
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist", style: this.model.getRootStyle() }, items));
1847
+ };
1848
+ TabbedMenuComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
1849
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
1850
+ var container = this.rootRef.current;
1851
+ if (!container)
1852
+ return;
1853
+ this.model.initResponsivityManager(container);
1850
1854
  };
1851
1855
  TabbedMenuComponent.prototype.componentDidMount = function () {
1852
1856
  _super.prototype.componentDidMount.call(this);
1853
1857
  var container = this.rootRef.current;
1854
1858
  if (!container)
1855
1859
  return;
1856
- this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ResponsivityManager(container, this.model);
1860
+ this.model.initResponsivityManager(container);
1857
1861
  };
1858
1862
  TabbedMenuComponent.prototype.componentWillUnmount = function () {
1859
- this.manager && (this.manager.dispose());
1863
+ this.model.resetResponsivityManager();
1860
1864
  _super.prototype.componentWillUnmount.call(this);
1861
1865
  };
1862
1866
  return TabbedMenuComponent;
@@ -3724,7 +3728,7 @@ __webpack_require__.r(__webpack_exports__);
3724
3728
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
3725
3729
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
3726
3730
  var Version;
3727
- Version = "".concat("2.2.0");
3731
+ Version = "".concat("2.2.2");
3728
3732
  // import "@survey/creator/survey-creator-core.css";
3729
3733
 
3730
3734
 
@@ -3796,7 +3800,7 @@ Version = "".concat("2.2.0");
3796
3800
 
3797
3801
 
3798
3802
 
3799
- (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.2.0"), "survey-creator-react");
3803
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.2.2"), "survey-creator-react");
3800
3804
 
3801
3805
 
3802
3806
  /***/ }),
@@ -5650,11 +5654,9 @@ __webpack_require__.r(__webpack_exports__);
5650
5654
  /* harmony export */ });
5651
5655
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-react-ui */ "survey-js-ui");
5652
5656
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
5653
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
5654
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
5655
- /* harmony import */ var _ToolboxItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ToolboxItem */ "../survey-creator-react/src/toolbox/ToolboxItem.tsx");
5656
- /* harmony import */ var _components_Search__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/Search */ "../survey-creator-react/src/components/Search.tsx");
5657
- /* harmony import */ var _ToolboxCategory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ToolboxCategory */ "../survey-creator-react/src/toolbox/ToolboxCategory.tsx");
5657
+ /* harmony import */ var _ToolboxItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ToolboxItem */ "../survey-creator-react/src/toolbox/ToolboxItem.tsx");
5658
+ /* harmony import */ var _components_Search__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/Search */ "../survey-creator-react/src/components/Search.tsx");
5659
+ /* harmony import */ var _ToolboxCategory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ToolboxCategory */ "../survey-creator-react/src/toolbox/ToolboxCategory.tsx");
5658
5660
  var __extends = (undefined && undefined.__extends) || (function () {
5659
5661
  var extendStatics = function (d, b) {
5660
5662
  extendStatics = Object.setPrototypeOf ||
@@ -5675,7 +5677,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
5675
5677
 
5676
5678
 
5677
5679
 
5678
-
5679
5680
  var AdaptiveToolbox = /** @class */ (function (_super) {
5680
5681
  __extends(AdaptiveToolbox, _super);
5681
5682
  function AdaptiveToolbox(props) {
@@ -5683,17 +5684,22 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
5683
5684
  _this.rootRef = react__WEBPACK_IMPORTED_MODULE_0__.createRef();
5684
5685
  return _this;
5685
5686
  }
5687
+ AdaptiveToolbox.prototype.componentDidUpdate = function (prevProps, prevState) {
5688
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
5689
+ var container = this.rootRef.current;
5690
+ if (container) {
5691
+ this.toolbox.afterRender(container);
5692
+ }
5693
+ };
5686
5694
  AdaptiveToolbox.prototype.componentDidMount = function () {
5687
5695
  _super.prototype.componentDidMount.call(this);
5688
5696
  var container = this.rootRef.current;
5689
- this.toolbox.setRootElement(container);
5690
- if (!container)
5691
- return;
5692
- this.manager = new survey_core__WEBPACK_IMPORTED_MODULE_1__.VerticalResponsivityManager(this.toolbox.containerElement, this.toolbox);
5697
+ if (container) {
5698
+ this.toolbox.afterRender(container);
5699
+ }
5693
5700
  };
5694
5701
  AdaptiveToolbox.prototype.componentWillUnmount = function () {
5695
- this.manager && (this.manager.dispose());
5696
- this.toolbox.setRootElement(undefined);
5702
+ this.toolbox.beforeDestroy();
5697
5703
  _super.prototype.componentWillUnmount.call(this);
5698
5704
  };
5699
5705
  Object.defineProperty(AdaptiveToolbox.prototype, "creator", {
@@ -5717,32 +5723,30 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
5717
5723
  var _this = this;
5718
5724
  if (isCompact === void 0) { isCompact = false; }
5719
5725
  return items.map(function (item, itemIndex) {
5720
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_2__.SurveyCreatorToolboxTool, { item: item, creator: _this.creator, parentModel: _this.toolbox, isCompact: isCompact, key: item.renderedId });
5726
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_1__.SurveyCreatorToolboxTool, { item: item, creator: _this.creator, parentModel: _this.toolbox, isCompact: isCompact, key: item.renderedId });
5721
5727
  });
5722
5728
  };
5723
5729
  AdaptiveToolbox.prototype.renderCategories = function () {
5724
5730
  var _this = this;
5725
5731
  return this.toolbox.categories.map(function (category, index) {
5726
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ToolboxCategory__WEBPACK_IMPORTED_MODULE_4__.SurveyCreatorToolboxCategory, { category: category, toolbox: _this.toolbox, key: "category" + index });
5732
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ToolboxCategory__WEBPACK_IMPORTED_MODULE_3__.SurveyCreatorToolboxCategory, { category: category, toolbox: _this.toolbox, key: "category" + index });
5727
5733
  });
5728
5734
  };
5729
5735
  AdaptiveToolbox.prototype.renderSearch = function () {
5730
5736
  var searchButton = this.toolbox.isCompactRendered ?
5731
5737
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
5732
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_2__.SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" })) :
5738
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_1__.SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" })) :
5733
5739
  null;
5734
5740
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__search-container" },
5735
5741
  searchButton,
5736
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Search__WEBPACK_IMPORTED_MODULE_3__.SearchComponent, { model: this.toolbox.searchManager }),
5742
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_Search__WEBPACK_IMPORTED_MODULE_2__.SearchComponent, { model: this.toolbox.searchManager }),
5737
5743
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })));
5738
5744
  };
5739
5745
  AdaptiveToolbox.prototype.render = function () {
5740
5746
  var _this = this;
5741
- if (!this.toolbox.hasActions)
5742
- return null;
5743
5747
  var search = this.toolbox.showSearch ? this.renderSearch() : null;
5744
5748
  var placeholder = this.toolbox.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
5745
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
5749
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() },
5746
5750
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__panel" },
5747
5751
  search,
5748
5752
  placeholder,