survey-creator-react 1.12.6 → 1.12.8

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
@@ -16,7 +16,9 @@
16
16
  <script src="./node_modules/survey-core/survey.i18n.min.js"></script>
17
17
  <script src="./node_modules/survey-core/themes/index.js"></script>
18
18
  <script src="./node_modules/survey-react-ui/survey-react-ui.js"></script>
19
+ <script src="./node_modules/survey-creator-core/themes/index.js"></script>
19
20
  <script src="./node_modules/survey-creator-core/survey-creator-core.js"></script>
21
+ <script src="./node_modules/survey-creator-core/survey-creator-core.i18n.min.js"></script>
20
22
 
21
23
  <!--<script src="./build/survey-creator-react.js"></script>-->
22
24
  <link rel="stylesheet" type="text/css" href="./node_modules/survey-core/defaultV2.css" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-creator-react",
3
- "version": "1.12.6",
3
+ "version": "1.12.8",
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.6",
33
- "survey-react-ui": "1.12.6",
34
- "survey-creator-core": "1.12.6"
32
+ "survey-core": "1.12.8",
33
+ "survey-react-ui": "1.12.8",
34
+ "survey-creator-core": "1.12.8"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v1.12.6
2
+ * SurveyJS Creator React v1.12.8
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
@@ -118,7 +118,7 @@ var AddQuestionButtonComponent = /** @class */ (function (_super) {
118
118
  _this.model.addNewQuestion(_this.model, new _events__WEBPACK_IMPORTED_MODULE_3__.ReactMouseEvent(e));
119
119
  }, onMouseOver: function (e) { return _this.model.hoverStopper && _this.model.hoverStopper(e.nativeEvent, e.currentTarget); } },
120
120
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: "svc-panel__add-new-question-icon", iconName: "icon-add_24x24", size: 24 }),
121
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-text svc-text--normal svc-text--bold" }, this.model.addNewQuestionText),
121
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.addNewQuestionText),
122
122
  this.props.renderPopup !== false ? this.renderTypeSelector() : null)),
123
123
  this.props.renderPopup === false ? this.renderTypeSelector() : null);
124
124
  };
@@ -783,7 +783,7 @@ var SurveyPageNavigatorItem = /** @class */ (function (_super) {
783
783
  } },
784
784
  react__WEBPACK_IMPORTED_MODULE_4__.createElement("div", { className: "svc-page-navigator-item__dot", title: item.title }),
785
785
  react__WEBPACK_IMPORTED_MODULE_4__.createElement("div", { className: "svc-page-navigator-item__banner" },
786
- react__WEBPACK_IMPORTED_MODULE_4__.createElement("span", { className: "svc-text svc-text--small svc-text--bold" }, item.title),
786
+ react__WEBPACK_IMPORTED_MODULE_4__.createElement("span", { className: "svc-page-navigator-item__text" }, item.title),
787
787
  react__WEBPACK_IMPORTED_MODULE_4__.createElement("span", { className: "svc-page-navigator-item__dot" }))))));
788
788
  };
789
789
  return SurveyPageNavigatorItem;
@@ -1414,6 +1414,8 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
1414
1414
  var areaClassName = "svc-full-container svc-creator__area svc-flex-column" + (this.props.creator.haveCommercialLicense ? "" : " svc-creator__area--with-banner");
1415
1415
  var contentWrapperClassName = "svc-creator__content-wrapper svc-flex-row" + (this.props.creator.isMobileView ? " svc-creator__content-wrapper--footer-toolbar" : "");
1416
1416
  var fullContainerClassName = "svc-flex-row svc-full-container" + (" svc-creator__side-bar--" + this.creator.sidebarLocation);
1417
+ var creatorStyles = {};
1418
+ (0,survey_creator_core__WEBPACK_IMPORTED_MODULE_4__.assign)(creatorStyles, this.style, this.props.creator.themeVariables);
1417
1419
  var licenseBanner = null;
1418
1420
  if (!this.props.creator.haveCommercialLicense) {
1419
1421
  var htmlValue = { __html: this.props.creator.licenseText };
@@ -1421,8 +1423,9 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
1421
1423
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-creator__non-commercial-text", dangerouslySetInnerHTML: htmlValue })));
1422
1424
  }
1423
1425
  //AM: width unrecognized by react
1424
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.creator.getRootCss(), ref: this.rootNode, style: this.style },
1426
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.creator.getRootCss(), ref: this.rootNode, style: creatorStyles },
1425
1427
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgBundleComponent, null),
1428
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.PopupModal, null),
1426
1429
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: areaClassName },
1427
1430
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: fullContainerClassName },
1428
1431
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-flex-column svc-flex-row__element svc-flex-row__element--growing" },
@@ -1965,7 +1968,7 @@ var PanelAdornerComponent = /** @class */ (function (_super) {
1965
1968
  _this.model.addNewQuestion();
1966
1969
  } },
1967
1970
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: "svc-panel__add-new-question-icon", iconName: "icon-add_24x24", size: 24 }),
1968
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-text svc-text--normal svc-text--bold" }, this.model.addNewQuestionText))) : null)));
1971
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.addNewQuestionText))) : null)));
1969
1972
  };
1970
1973
  PanelAdornerComponent.prototype.disableTabStop = function () {
1971
1974
  return true;
@@ -3242,8 +3245,7 @@ var PropertyGridComponent = /** @class */ (function (_super) {
3242
3245
  return _super.prototype.canRender.call(this);
3243
3246
  };
3244
3247
  PropertyGridComponent.prototype.renderElement = function () {
3245
- var rootClassName = this.model.searchEnabled ? "spg-container spg-container_search" : "spg-container";
3246
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: rootClassName },
3248
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.model.rootCss },
3247
3249
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Search__WEBPACK_IMPORTED_MODULE_3__.SearchComponent, { model: this.model.searchManager }),
3248
3250
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Survey, { model: this.model.survey })));
3249
3251
  };
@@ -4129,7 +4131,7 @@ var TabLogicAddButtonComponent = /** @class */ (function (_super) {
4129
4131
  e.stopPropagation();
4130
4132
  _this.model.action();
4131
4133
  }, className: buttonClassName, title: this.model.title },
4132
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-text svc-text--normal svc-text--bold" }, this.model.title)));
4134
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-add-new-item-button__text" }, this.model.title)));
4133
4135
  };
4134
4136
  return TabLogicAddButtonComponent;
4135
4137
  }(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -4225,7 +4227,7 @@ var TabPreviewTestSurveyAgainComponent = /** @class */ (function (_super) {
4225
4227
  e.stopPropagation();
4226
4228
  _this.model.action();
4227
4229
  }, className: buttonClassName, title: this.model.title },
4228
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-text svc-text--normal svc-text--bold" }, this.model.title)));
4230
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-preview-test-again__text" }, this.model.title)));
4229
4231
  };
4230
4232
  return TabPreviewTestSurveyAgainComponent;
4231
4233
  }(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -4668,17 +4670,18 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4668
4670
  };
4669
4671
  AdaptiveToolbox.prototype.componentWillUnmount = function () {
4670
4672
  this.manager && (this.manager.dispose());
4673
+ this.toolbox.unsubscribeRootElement();
4671
4674
  _super.prototype.componentWillUnmount.call(this);
4672
4675
  };
4673
4676
  AdaptiveToolbox.prototype.renderSearch = function () {
4674
4677
  var searchButton = this.toolbox.isCompactRendered ?
4675
4678
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
4676
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_5__.SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" }),
4677
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })) :
4679
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ToolboxItem__WEBPACK_IMPORTED_MODULE_5__.SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" })) :
4678
4680
  null;
4679
4681
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__search-container" },
4680
4682
  searchButton,
4681
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(_side_bar_Search__WEBPACK_IMPORTED_MODULE_6__.SearchComponent, { model: this.toolbox.searchManager })));
4683
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(_side_bar_Search__WEBPACK_IMPORTED_MODULE_6__.SearchComponent, { model: this.toolbox.searchManager }),
4684
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })));
4682
4685
  };
4683
4686
  AdaptiveToolbox.prototype.render = function () {
4684
4687
  var _this = this;
@@ -4688,12 +4691,15 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4688
4691
  var placeholder = this.toolbox.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
4689
4692
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
4690
4693
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__panel" },
4691
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scroller sv-drag-target-skipped", onScroll: function (event) { return _this.toolbox.onScroll(_this.toolbox, event); } },
4692
- search,
4693
- placeholder,
4694
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__container" }, (this.toolbox.showInSingleCategory) ?
4695
- (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
4696
- : this.renderCategories())))));
4694
+ search,
4695
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__scroll-wrapper" },
4696
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scroller sv-drag-target-skipped", onScroll: function (event) { return _this.toolbox.onScroll(_this.toolbox, event); } },
4697
+ placeholder,
4698
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__container" }, (this.toolbox.showInSingleCategory) ?
4699
+ (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
4700
+ : this.renderCategories())),
4701
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scrollbar", onScroll: function (event) { return _this.toolbox.onScrollbarScroll(event.nativeEvent); } },
4702
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scrollbar-sizer" }))))));
4697
4703
  };
4698
4704
  return AdaptiveToolbox;
4699
4705
  }(_Toolbox__WEBPACK_IMPORTED_MODULE_4__.Toolbox));
@@ -4838,7 +4844,7 @@ var SurveyCreatorToolboxCategory = /** @class */ (function (_super) {
4838
4844
  var header = this.renderCategoryHeader();
4839
4845
  var items = this.renderCategoryContent();
4840
4846
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.class, key: this.category.name },
4841
- header,
4847
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-header-wrapper" }, header),
4842
4848
  items));
4843
4849
  };
4844
4850
  SurveyCreatorToolboxCategory.prototype.renderCategoryHeader = function () {
@@ -4952,13 +4958,9 @@ var SurveyCreatorToolboxTool = /** @class */ (function (_super) {
4952
4958
  });
4953
4959
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.css, key: item.id },
4954
4960
  (item.needSeparator && !this.creator.toolbox.showCategoryTitles) ? (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-separator" })) : null,
4955
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "sv-action__content", onPointerDown: function (event) {
4961
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__tool-content sv-action__content", onPointerDown: function (event) {
4956
4962
  event.persist();
4957
4963
  _this.model.onPointerDown(event);
4958
- }, onMouseOver: function (event) {
4959
- _this.model.onMouseOverTool(item, event);
4960
- }, onMouseLeave: function (event) {
4961
- _this.model.onMouseLeave(item, event);
4962
4964
  } }, itemComponent)));
4963
4965
  };
4964
4966
  return SurveyCreatorToolboxTool;
@@ -4998,17 +5000,27 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
4998
5000
  };
4999
5001
  SurveyCreatorToolboxItem.prototype.render = function () {
5000
5002
  var _this = this;
5001
- return (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__item " + this.item.className, tabIndex: 0, role: "button", "aria-label": this.item.tooltip, title: this.item.tooltip, onClick: function (event) {
5003
+ var banner = (this.props.isCompact ?
5004
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-banner", onClick: function (event) {
5005
+ event.persist();
5006
+ _this.model.click(event);
5007
+ } },
5008
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 24, iconName: this.item.iconName, className: "svc-toolbox__item-icon", title: this.item.tooltip }),
5009
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", null, this.item.title))
5010
+ :
5011
+ null);
5012
+ 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) {
5002
5013
  event.persist();
5003
5014
  _this.model.click(event);
5004
5015
  } },
5005
- 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: 24, iconName: this.item.iconName, title: this.item.tooltip }) : null),
5016
+ 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: 24, iconName: this.item.iconName }) : null),
5006
5017
  (this.props.isCompact ?
5007
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-banner svc-item__banner" },
5008
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 24, iconName: this.item.iconName, className: "svc-toolbox__item-icon", title: this.item.tooltip }),
5009
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-title" }, this.item.title))
5018
+ null
5010
5019
  :
5011
5020
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-title" }, this.item.title))));
5021
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
5022
+ item,
5023
+ banner));
5012
5024
  };
5013
5025
  return SurveyCreatorToolboxItem;
5014
5026
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_4__.CreatorModelElement));
@@ -5093,8 +5105,8 @@ var SurveyCreatorToolboxItemGroup = /** @class */ (function (_super) {
5093
5105
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
5094
5106
  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 }),
5095
5107
  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); } },
5096
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: 24, iconName: this.item.subitemsButtonIcon })),
5097
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: this.item.popupModel, getArea: this.item.getArea }));
5108
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: 24, iconName: this.item.subitemsButtonIcon }),
5109
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: this.item.popupModel, getArea: this.item.getArea })));
5098
5110
  };
5099
5111
  return SurveyCreatorToolboxItemGroup;
5100
5112
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_3__.CreatorModelElement));
@@ -5442,7 +5454,7 @@ __webpack_require__.r(__webpack_exports__);
5442
5454
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! survey-core */ "survey-core");
5443
5455
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_64__);
5444
5456
  var Version;
5445
- Version = "".concat("1.12.6");
5457
+ Version = "".concat("1.12.8");
5446
5458
  // import "@survey/creator/survey-creator-core.css";
5447
5459
 
5448
5460
 
@@ -5516,7 +5528,7 @@ Version = "".concat("1.12.6");
5516
5528
 
5517
5529
 
5518
5530
 
5519
- (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.6"), "survey-creator-react");
5531
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.8"), "survey-creator-react");
5520
5532
 
5521
5533
  })();
5522
5534