survey-creator-js 1.11.13 → 1.12.1

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": "1.11.13",
3
+ "version": "1.12.1",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -27,9 +27,9 @@
27
27
  "typings": "./typings/survey-creator-js/entries/index.d.ts",
28
28
  "peerDependencies": {
29
29
  "ace-builds": "^1.4.12",
30
- "survey-core": "1.11.13",
31
- "survey-js-ui": "1.11.13",
32
- "survey-creator-core": "1.11.13",
30
+ "survey-core": "1.12.1",
31
+ "survey-js-ui": "1.12.1",
32
+ "survey-creator-core": "1.12.1",
33
33
  "@types/react-dom": "*",
34
34
  "@types/react": "*"
35
35
  },
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator UI v1.11.13
2
+ * SurveyJS Creator UI v1.12.1
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
@@ -287,11 +287,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
287
287
 
288
288
  var ItemValueAdornerComponent = /** @class */ (function (_super) {
289
289
  __extends(ItemValueAdornerComponent, _super);
290
- function ItemValueAdornerComponent() {
291
- var _this = _super !== null && _super.apply(this, arguments) || this;
290
+ function ItemValueAdornerComponent(props) {
291
+ var _this = _super.call(this, props) || this;
292
292
  _this.onBlur = function (event) {
293
293
  _this.model.onFocusOut(event.nativeEvent);
294
294
  };
295
+ _this.rootRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
295
296
  return _this;
296
297
  }
297
298
  ItemValueAdornerComponent.prototype.createModel = function (props) {
@@ -303,6 +304,21 @@ var ItemValueAdornerComponent = /** @class */ (function (_super) {
303
304
  ItemValueAdornerComponent.prototype.getStateElement = function () {
304
305
  return this.model;
305
306
  };
307
+ ItemValueAdornerComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
308
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
309
+ this.props.item.setRootElement(this.rootRef.current);
310
+ if (prevProps.item !== this.props.item && prevProps.item) {
311
+ prevProps.item.setRootElement(undefined);
312
+ }
313
+ };
314
+ ItemValueAdornerComponent.prototype.componentDidMount = function () {
315
+ _super.prototype.componentDidMount.call(this);
316
+ this.props.item.setRootElement(this.rootRef.current);
317
+ };
318
+ ItemValueAdornerComponent.prototype.componentWillUnmount = function () {
319
+ _super.prototype.componentWillUnmount.call(this);
320
+ this.props.item.setRootElement(undefined);
321
+ };
306
322
  ItemValueAdornerComponent.prototype.render = function () {
307
323
  var _this = this;
308
324
  // if (this.model.question.isDragged) {
@@ -320,7 +336,7 @@ var ItemValueAdornerComponent = /** @class */ (function (_super) {
320
336
  this.model.allowRemove ? (0,react__WEBPACK_IMPORTED_MODULE_1__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-item-value-controls__button svc-item-value-controls__remove", "aria-label": this.model.tooltip, onClick: function () { return _this.model.remove(_this.model); } },
321
337
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.SvgIcon, { size: 16, iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
322
338
  var itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
323
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-item-value-wrapper" +
339
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
324
340
  (this.model.allowAdd ? " svc-item-value--new" : "") +
325
341
  (this.model.isDragging ? " svc-item-value--dragging" : "") +
326
342
  (this.model.isDragDropGhost ? " svc-item-value--ghost" : "") +
@@ -1514,7 +1530,7 @@ var SidebarComponent = /** @class */ (function (_super) {
1514
1530
  };
1515
1531
  SidebarComponent.prototype.renderElement = function () {
1516
1532
  var _this = this;
1517
- var style = { display: !this.model.visible ? "none" : "" };
1533
+ var style = { display: !this.model.renderedIsVisible ? "none" : "" };
1518
1534
  var className = "svc-side-bar" + (this.model.flyoutPanelMode ? " svc-flyout-side-bar" : "");
1519
1535
  var items = this.model.tabs.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_0__.createElement(SidebarTab, { item: item, key: item.id }); });
1520
1536
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: className, style: { display: !this.model.hasVisibleTabs ? "none" : "" } },
@@ -1766,8 +1782,8 @@ var SurveyLocStringEditor = /** @class */ (function (_super) {
1766
1782
  var counter = this.baseModel.showCharacterCounter ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.CharacterCounterComponent, { counter: this.baseModel.characterCounter, remainingCharacterCounter: this.baseModel.getCharacterCounterClass })) : null;
1767
1783
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.className },
1768
1784
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "svc-string-editor__content" },
1769
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-string-editor__border", onClick: this.edit },
1770
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.SvgIcon, { className: "svc-string-editor__button svc-string-editor__button--edit", size: 16, iconName: "icon-edit" })),
1785
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-string-editor__border svc-string-editor__border--hover", onClick: this.edit }),
1786
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-string-editor__border svc-string-editor__border--focus", onClick: this.edit }),
1771
1787
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "svc-string-editor__input" },
1772
1788
  control,
1773
1789
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-string-editor__controls", onClick: this.edit }),
@@ -1867,7 +1883,6 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
1867
1883
  var creator = this.props.creator;
1868
1884
  if (creator.isCreatorDisposed)
1869
1885
  return null;
1870
- var creatorClassName = "svc-creator" + (this.props.creator.isMobileView ? " svc-creator--mobile" : "") + (this.props.creator.isTouch ? " svc-creator--touch" : "");
1871
1886
  var areaClassName = "svc-full-container svc-creator__area svc-flex-column" + (this.props.creator.haveCommercialLicense ? "" : " svc-creator__area--with-banner");
1872
1887
  var contentWrapperClassName = "svc-creator__content-wrapper svc-flex-row" + (this.props.creator.isMobileView ? " svc-creator__content-wrapper--footer-toolbar" : "");
1873
1888
  var fullContainerClassName = "svc-flex-row svc-full-container" + (" svc-creator__side-bar--" + this.creator.sidebarLocation);
@@ -1878,7 +1893,7 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
1878
1893
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "svc-creator__non-commercial-text", dangerouslySetInnerHTML: htmlValue })));
1879
1894
  }
1880
1895
  //AM: width unrecognized by react
1881
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: creatorClassName, ref: this.rootNode, style: this.style },
1896
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.creator.getRootCss(), ref: this.rootNode, style: this.style },
1882
1897
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.SvgBundleComponent, null),
1883
1898
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: areaClassName },
1884
1899
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: fullContainerClassName },
@@ -2633,7 +2648,7 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2633
2648
  var allowInteractions = this.model.element
2634
2649
  .isInteractiveDesignElement;
2635
2650
  var content = this.renderContent(allowInteractions);
2636
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, "data-sv-drop-target-survey-element": this.model.element.name || null, className: "svc-question__adorner " + this.model.rootCss(), onDoubleClick: function (e) { allowInteractions && _this.model.dblclick(e.nativeEvent); e.stopPropagation(); }, onMouseOut: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); }, onMouseOver: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); } }, content));
2651
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, "data-sv-drop-target-survey-element": this.model.element.name || null, className: "svc-question__adorner " + this.model.rootCss(), onDoubleClick: function (e) { allowInteractions && _this.model.dblclick(e.nativeEvent); e.stopPropagation(); }, onMouseLeave: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); }, onMouseOver: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); } }, content));
2637
2652
  };
2638
2653
  QuestionAdornerComponent.prototype.disableTabStop = function () {
2639
2654
  return true;
@@ -2643,6 +2658,10 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2643
2658
  var content = this.renderElementContent();
2644
2659
  //if (!allowInteractions) return <>{content}{this.renderFooter()}</>;
2645
2660
  return (0,react__WEBPACK_IMPORTED_MODULE_1__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.model.css(), onClick: function (e) { return _this.model.select(_this.model, new _events__WEBPACK_IMPORTED_MODULE_2__.ReactMouseEvent(e)); } },
2661
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--left" }),
2662
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--right" }),
2663
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--top" }),
2664
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--bottom" }),
2646
2665
  allowInteractions ? this.renderHeader() : null,
2647
2666
  content,
2648
2667
  this.renderFooter()), undefined, { disableTabStop: this.disableTabStop() });
@@ -3251,7 +3270,10 @@ var RowWrapper = /** @class */ (function (_super) {
3251
3270
  return this.model;
3252
3271
  };
3253
3272
  RowWrapper.prototype.render = function () {
3254
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { key: "svc-row-" + this.props.row.id, className: this.model.cssClasses }, this.props.element));
3273
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { key: "svc-row-" + this.props.row.id, className: this.model.cssClasses },
3274
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-row__drop-indicator svc-row__drop-indicator--top" }),
3275
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-row__drop-indicator svc-row__drop-indicator--bottom" }),
3276
+ this.props.element));
3255
3277
  };
3256
3278
  return RowWrapper;
3257
3279
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_2__.CreatorModelElement));
@@ -3761,7 +3783,7 @@ __webpack_require__.r(__webpack_exports__);
3761
3783
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! survey-core */ "survey-core");
3762
3784
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_57___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_57__);
3763
3785
  var Version;
3764
- Version = "".concat("1.11.13");
3786
+ Version = "".concat("1.12.1");
3765
3787
  // import "@survey/creator/survey-creator-core.css";
3766
3788
 
3767
3789
 
@@ -3828,7 +3850,7 @@ Version = "".concat("1.11.13");
3828
3850
 
3829
3851
 
3830
3852
 
3831
- (0,survey_core__WEBPACK_IMPORTED_MODULE_57__.checkLibraryVersion)("".concat("1.11.13"), "survey-creator-react");
3853
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_57__.checkLibraryVersion)("".concat("1.12.1"), "survey-creator-react");
3832
3854
 
3833
3855
 
3834
3856
  /***/ }),
@@ -5034,7 +5056,7 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
5034
5056
  var placeholder = this.toolbox.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
5035
5057
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
5036
5058
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__panel" },
5037
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__scroller", onScroll: function (event) { return _this.toolbox.onScroll(_this.toolbox, event); } },
5059
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__scroller sv-drag-target-skipped", onScroll: function (event) { return _this.toolbox.onScroll(_this.toolbox, event); } },
5038
5060
  search,
5039
5061
  placeholder,
5040
5062
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "svc-toolbox__container" }, (this.toolbox.showInSingleCategory) ?