survey-creator-react 2.3.9 → 2.3.11

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-react",
3
- "version": "2.3.9",
3
+ "version": "2.3.11",
4
4
  "description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -37,9 +37,9 @@
37
37
  "ace-builds": "^1.4.12",
38
38
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
39
39
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
40
- "survey-core": "2.3.9",
41
- "survey-react-ui": "2.3.9",
42
- "survey-creator-core": "2.3.9"
40
+ "survey-core": "2.3.11",
41
+ "survey-react-ui": "2.3.11",
42
+ "survey-creator-core": "2.3.11"
43
43
  },
44
44
  "peerDependenciesMeta": {
45
45
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v2.3.9
2
+ * SurveyJS Creator React v2.3.11
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
@@ -355,19 +355,46 @@ var ItemValueAdornerComponent = /** @class */ (function (_super) {
355
355
  this.model.allowRemove ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__remove", "aria-label": this.model.tooltip, onClick: function () { return _this.model.remove(_this.model); } },
356
356
  react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: "auto", iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
357
357
  var itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
358
- return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
359
- (this.model.allowAdd ? " svc-item-value--new" : "") +
360
- (this.model.isDragging ? " svc-item-value--dragging" : "") +
361
- (this.model.isDragDropGhost ? " svc-item-value--ghost" : "") +
362
- (this.model.isDragDropMoveDown ? " svc-item-value--movedown" : "") +
363
- (this.model.isDragDropMoveUp ? " svc-item-value--moveup" : ""), key: itemkey, "data-sv-drop-target-item-value": this.model.isDraggable ? this.model.item.value : undefined, onPointerDown: function (event) { return _this.model.onPointerDown(event); } },
364
- react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value__ghost" }),
365
- react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value-controls", onBlur: this.onBlur }, button),
366
- react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value__item", onClick: function (event) { return _this.model.select(_this.model, event.nativeEvent); } }, this.props.element)));
358
+ return (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
359
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
360
+ (this.model.allowAdd ? " svc-item-value--new" : "") +
361
+ (this.model.isDragging ? " svc-item-value--dragging" : "") +
362
+ (this.model.isDragDropGhost ? " svc-item-value--ghost" : "") +
363
+ (this.model.isDragDropMoveDown ? " svc-item-value--movedown" : "") +
364
+ (this.model.isDragDropMoveUp ? " svc-item-value--moveup" : ""), key: itemkey, "data-sv-drop-target-item-value": this.model.isDraggable ? this.model.item.value : undefined, onPointerDown: function (event) { return _this.model.onPointerDown(event); } },
365
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value__ghost" }),
366
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value-controls", onBlur: this.onBlur }, button),
367
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value__item", onClick: function (event) { return _this.model.select(_this.model, event.nativeEvent); } }, this.props.element),
368
+ this.renderPanelAction()),
369
+ this.renderPanel()));
370
+ };
371
+ ItemValueAdornerComponent.prototype.renderPanelAction = function () {
372
+ var _this = this;
373
+ if (!this.model.canShowPanel())
374
+ return null;
375
+ var isShowPanel = this.model.showPanel;
376
+ var icName = isShowPanel ? "icon-collapsepanel-16x16" : "icon-expandpanel-16x16";
377
+ var btn = (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { role: "button", className: "svc-item-value-controls__button svc-item-value-controls__add svc-choice-elements-button", onClick: function () {
378
+ _this.model.togglePanel();
379
+ } },
380
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: "auto", iconName: icName })));
381
+ return react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value-controls svc-choice-elements-button-container" }, btn);
382
+ };
383
+ ItemValueAdornerComponent.prototype.renderPanel = function () {
384
+ if (!this.model.showPanel)
385
+ return null;
386
+ var creator = this.model.creator;
387
+ var survey = creator.survey;
388
+ return react__WEBPACK_IMPORTED_MODULE_2__.createElement(ChoiceItemPanel, { element: this.model.item.panel, survey: survey, creator: creator, css: survey.getCss() });
367
389
  };
368
390
  return ItemValueAdornerComponent;
369
391
  }(_ModelElement__WEBPACK_IMPORTED_MODULE_4__.CreatorModelElement));
370
392
 
393
+ var ChoiceItemPanel = react__WEBPACK_IMPORTED_MODULE_2__.memo(function (_a) {
394
+ var element = _a.element, survey = _a.survey, creator = _a.creator, css = _a.css;
395
+ return react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyPanel, { element: element, survey: survey, creator: creator, cssClasses: css });
396
+ });
397
+ ChoiceItemPanel.displayName = "ChoiceItemPanel";
371
398
  survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.ReactElementFactory.Instance.registerElement("svc-item-value", function (props) {
372
399
  return react__WEBPACK_IMPORTED_MODULE_2__.createElement(ItemValueAdornerComponent, props);
373
400
  });
@@ -2178,7 +2205,7 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
2178
2205
  var element = this.model.element;
2179
2206
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: function (node) { return node && (!_this.model.renderedCollapsed ?
2180
2207
  node.setAttribute("inert", "") : node.removeAttribute("inert")); }, className: this.model.cssCollapsedHiddenHeader }, (element.hasTitle ?
2181
- react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.TitleElement, { element: element }) :
2208
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.TitleElement, { element: element, renderActions: false }) :
2182
2209
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: this.model.cssCollapsedHiddenTitle },
2183
2210
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-fake-title" }, element.name)))));
2184
2211
  };
@@ -3370,7 +3397,7 @@ __webpack_require__.r(__webpack_exports__);
3370
3397
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
3371
3398
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
3372
3399
  var Version;
3373
- Version = "".concat("2.3.9");
3400
+ Version = "".concat("2.3.11");
3374
3401
  // import "@survey/creator/survey-creator-core.css";
3375
3402
 
3376
3403
 
@@ -3442,7 +3469,7 @@ Version = "".concat("2.3.9");
3442
3469
 
3443
3470
 
3444
3471
 
3445
- (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.3.9"), "survey-creator-react");
3472
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.3.11"), "survey-creator-react");
3446
3473
 
3447
3474
 
3448
3475
  /***/ }),