survey-creator-react 1.12.6 → 1.12.7

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.7",
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.7",
33
+ "survey-react-ui": "1.12.7",
34
+ "survey-creator-core": "1.12.7"
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.7
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
@@ -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,7 +1423,7 @@ 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),
1426
1428
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: areaClassName },
1427
1429
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: fullContainerClassName },
@@ -3242,8 +3244,7 @@ var PropertyGridComponent = /** @class */ (function (_super) {
3242
3244
  return _super.prototype.canRender.call(this);
3243
3245
  };
3244
3246
  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 },
3247
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.model.rootCss },
3247
3248
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(_Search__WEBPACK_IMPORTED_MODULE_3__.SearchComponent, { model: this.model.searchManager }),
3248
3249
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Survey, { model: this.model.survey })));
3249
3250
  };
@@ -4668,6 +4669,7 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4668
4669
  };
4669
4670
  AdaptiveToolbox.prototype.componentWillUnmount = function () {
4670
4671
  this.manager && (this.manager.dispose());
4672
+ this.toolbox.unsubscribeRootElement();
4671
4673
  _super.prototype.componentWillUnmount.call(this);
4672
4674
  };
4673
4675
  AdaptiveToolbox.prototype.renderSearch = function () {
@@ -4688,12 +4690,15 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
4688
4690
  var placeholder = this.toolbox.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
4689
4691
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
4690
4692
  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())))));
4693
+ search,
4694
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__scroll-wrapper" },
4695
+ 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); } },
4696
+ placeholder,
4697
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__container" }, (this.toolbox.showInSingleCategory) ?
4698
+ (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
4699
+ : this.renderCategories())),
4700
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scrollbar", onScroll: function (event) { return _this.toolbox.onScrollbarScroll(event.nativeEvent); } },
4701
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scrollbar-sizer" }))))));
4697
4702
  };
4698
4703
  return AdaptiveToolbox;
4699
4704
  }(_Toolbox__WEBPACK_IMPORTED_MODULE_4__.Toolbox));
@@ -4838,7 +4843,7 @@ var SurveyCreatorToolboxCategory = /** @class */ (function (_super) {
4838
4843
  var header = this.renderCategoryHeader();
4839
4844
  var items = this.renderCategoryContent();
4840
4845
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.class, key: this.category.name },
4841
- header,
4846
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-header-wrapper" }, header),
4842
4847
  items));
4843
4848
  };
4844
4849
  SurveyCreatorToolboxCategory.prototype.renderCategoryHeader = function () {
@@ -4952,7 +4957,7 @@ var SurveyCreatorToolboxTool = /** @class */ (function (_super) {
4952
4957
  });
4953
4958
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: item.css, key: item.id },
4954
4959
  (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) {
4960
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__tool-content sv-action__content", onPointerDown: function (event) {
4956
4961
  event.persist();
4957
4962
  _this.model.onPointerDown(event);
4958
4963
  }, onMouseOver: function (event) {
@@ -4998,17 +5003,27 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
4998
5003
  };
4999
5004
  SurveyCreatorToolboxItem.prototype.render = function () {
5000
5005
  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) {
5006
+ var banner = (this.props.isCompact ?
5007
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-banner", onClick: function (event) {
5008
+ event.persist();
5009
+ _this.model.click(event);
5010
+ } },
5011
+ 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 }),
5012
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", null, this.item.title))
5013
+ :
5014
+ null);
5015
+ 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
5016
  event.persist();
5003
5017
  _this.model.click(event);
5004
5018
  } },
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),
5019
+ 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
5020
  (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))
5021
+ null
5010
5022
  :
5011
5023
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-toolbox__item-title" }, this.item.title))));
5024
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
5025
+ item,
5026
+ banner));
5012
5027
  };
5013
5028
  return SurveyCreatorToolboxItem;
5014
5029
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_4__.CreatorModelElement));
@@ -5442,7 +5457,7 @@ __webpack_require__.r(__webpack_exports__);
5442
5457
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! survey-core */ "survey-core");
5443
5458
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_64__);
5444
5459
  var Version;
5445
- Version = "".concat("1.12.6");
5460
+ Version = "".concat("1.12.7");
5446
5461
  // import "@survey/creator/survey-creator-core.css";
5447
5462
 
5448
5463
 
@@ -5516,7 +5531,7 @@ Version = "".concat("1.12.6");
5516
5531
 
5517
5532
 
5518
5533
 
5519
- (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.6"), "survey-creator-react");
5534
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.7"), "survey-creator-react");
5520
5535
 
5521
5536
  })();
5522
5537