survey-creator-react 1.12.8 → 1.12.9

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": "1.12.8",
3
+ "version": "1.12.9",
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.8",
33
- "survey-react-ui": "1.12.8",
34
- "survey-creator-core": "1.12.8"
32
+ "survey-core": "1.12.9",
33
+ "survey-react-ui": "1.12.9",
34
+ "survey-creator-core": "1.12.9"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "ace-builds": {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator React v1.12.8
2
+ * SurveyJS Creator React v1.12.9
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
@@ -215,12 +215,12 @@ var ImageItemValueAdornerComponent = /** @class */ (function (_super) {
215
215
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value__item" }, this.props.element),
216
216
  this.model.isDraggable && this.model.canRenderControls ?
217
217
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-context-button svc-image-item-value-controls__drag-area-indicator", onPointerDown: function (event) { return _this.model.onPointerDown(event); } },
218
- react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 24, iconName: "icon-drag-area-indicator" }))
218
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 24, iconName: "icon-drag-24x24" }))
219
219
  : null,
220
220
  this.model.canRenderControls ?
221
221
  react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-context-container svc-image-item-value-controls" },
222
222
  this.model.allowRemove && !this.model.isUploading ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-context-button", onClick: function () { return _this.model.chooseFile(_this.model); } },
223
- react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { role: "button", size: 24, iconName: "icon-file", title: this.model.selectFileTitle }))) : null,
223
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { role: "button", size: 24, iconName: "icon-choosefile", title: this.model.selectFileTitle }))) : null,
224
224
  this.model.allowRemove && !this.model.isUploading ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-context-button svc-context-button--danger", onClick: function () { return _this.model.remove(_this.model); } },
225
225
  react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { role: "button", size: 24, iconName: "icon-delete", title: this.model.removeFileTitle }))) : null)
226
226
  : null));
@@ -314,7 +314,7 @@ var ItemValueAdornerComponent = /** @class */ (function (_super) {
314
314
  react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 16, iconName: "icon-add_16x16", title: this.model.tooltip })))) : (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
315
315
  " ",
316
316
  this.model.isDraggable ? (react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-item-value-controls__button svc-item-value-controls__drag" },
317
- react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { className: "svc-item-value-controls__drag-icon", size: 24, iconName: "icon-drag-area-indicator", title: this.model.dragTooltip }))) : null,
317
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { className: "svc-item-value-controls__drag-icon", size: 24, iconName: "icon-drag-24x24", title: this.model.dragTooltip }))) : null,
318
318
  this.model.allowRemove ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.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); } },
319
319
  react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 16, iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
320
320
  var itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
@@ -388,7 +388,7 @@ var LogoImageComponent = /** @class */ (function (_super) {
388
388
  LogoImageComponent.prototype.renderChooseButton = function () {
389
389
  var _this = this;
390
390
  return (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-context-button", onClick: function () { return _this.model.chooseFile(_this.model); } },
391
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: 24, iconName: "icon-file" })));
391
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: 24, iconName: "icon-choosefile" })));
392
392
  };
393
393
  LogoImageComponent.prototype.renderClearButton = function () {
394
394
  var _this = this;
@@ -409,7 +409,7 @@ var LogoImageComponent = /** @class */ (function (_super) {
409
409
  var _this = this;
410
410
  return this.model.allowEdit && !this.model.isUploading ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-logo-image-placeholder", onClick: function () { return _this.model.chooseFile(_this.model); } },
411
411
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("svg", null,
412
- react__WEBPACK_IMPORTED_MODULE_1__.createElement("use", { xlinkHref: "#icon-logo" })))) : null;
412
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement("use", { xlinkHref: "#icon-image-48x48" })))) : null;
413
413
  };
414
414
  LogoImageComponent.prototype.renderInput = function () {
415
415
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { "aria-hidden": "true", type: "file", tabIndex: -1, accept: this.model.acceptedTypes, className: "svc-choose-file-input" });
@@ -2390,7 +2390,7 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
2390
2390
  QuestionImageAdornerComponent.prototype.renderChooseButton = function () {
2391
2391
  var _this = this;
2392
2392
  return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-question-controls" }, this.model.allowEdit ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-context-button", onClick: function () { return _this.imageModel.chooseFile(_this.imageModel); } },
2393
- react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 24, iconName: "icon-file" }))) : null));
2393
+ react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 24, iconName: "icon-choosefile" }))) : null));
2394
2394
  };
2395
2395
  QuestionImageAdornerComponent.prototype.renderElementPlaceholder = function () {
2396
2396
  return this.imageModel.isUploading ? this.renderLoadingPlaceholder() : this.renderChooseButton();
@@ -3776,7 +3776,6 @@ var TabDesignerComponent = /** @class */ (function (_super) {
3776
3776
  _this.creator.onDragStart.remove(_this.denyUpdate);
3777
3777
  _this.creator.onDragEnd.remove(_this.allowUpdate);
3778
3778
  };
3779
- _this.renderedPagesCache = {};
3780
3779
  return _this;
3781
3780
  }
3782
3781
  Object.defineProperty(TabDesignerComponent.prototype, "model", {
@@ -3807,19 +3806,11 @@ var TabDesignerComponent = /** @class */ (function (_super) {
3807
3806
  };
3808
3807
  TabDesignerComponent.prototype.getRenderedPages = function () {
3809
3808
  var _this = this;
3810
- if (this.changedStatePropName !== "pages") {
3811
- this.renderedPagesCache = {};
3812
- }
3813
3809
  var renderedPages = [];
3814
3810
  if (this.creator.pageEditMode !== "bypage") {
3815
3811
  var pages = this.creator.survey.pages;
3816
- pages.forEach(function (page, index) {
3817
- var cachedPage = _this.renderedPagesCache[page.id];
3818
- if (!cachedPage) {
3819
- cachedPage = _this.createRenderedPage(page, index);
3820
- _this.renderedPagesCache[page.id] = cachedPage;
3821
- }
3822
- renderedPages.push(cachedPage);
3812
+ pages.forEach(function (page) {
3813
+ renderedPages.push(_this.createRenderedPage(page));
3823
3814
  });
3824
3815
  if (this.model.showNewPage) {
3825
3816
  renderedPages.push(this.renderNewPage("svc-page", this.model.newPage.id + "-ghost-new-page"));
@@ -3828,18 +3819,13 @@ var TabDesignerComponent = /** @class */ (function (_super) {
3828
3819
  else {
3829
3820
  var page2Display = this.model.pagesController.page2Display;
3830
3821
  if (!!page2Display) {
3831
- var cachedPage = this.renderedPagesCache[page2Display.id];
3832
- if (!cachedPage) {
3833
- cachedPage = this.createRenderedPage(page2Display, 0, this.model.newPage === page2Display);
3834
- this.renderedPagesCache[page2Display.id] = cachedPage;
3835
- }
3836
- renderedPages.push(cachedPage);
3822
+ renderedPages.push(this.createRenderedPage(page2Display, this.model.newPage === page2Display));
3837
3823
  }
3838
3824
  }
3839
3825
  return renderedPages;
3840
3826
  };
3841
- TabDesignerComponent.prototype.createRenderedPage = function (page, index, isGhostPage) {
3842
- return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-page", "data-sv-drop-target-page": page.name, "data-sv-drop-target-survey-element": isGhostPage ? "newGhostPage" : page.name, key: page.id + "-" + index }, this.renderPage(page)));
3827
+ TabDesignerComponent.prototype.createRenderedPage = function (page, isGhostPage) {
3828
+ return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-page", "data-sv-drop-target-page": page.name, "data-sv-drop-target-survey-element": isGhostPage ? "newGhostPage" : page.name, key: page.id }, this.renderPage(page)));
3843
3829
  };
3844
3830
  TabDesignerComponent.prototype.renderNewPage = function (className, key) {
3845
3831
  if (key === void 0) { key = ""; }
@@ -4864,7 +4850,7 @@ var SurveyCreatorToolboxCategory = /** @class */ (function (_super) {
4864
4850
  var suffixName = this.category.collapsed ? "expand" : "collapse";
4865
4851
  var svgIconClassName = "svc-toolbox__category-header__button svc-string-editor__button--" + suffixName;
4866
4852
  return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-header__controls" },
4867
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: svgIconClassName, iconName: "icon-" + iconName, size: 24 })));
4853
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: svgIconClassName, iconName: "icon-" + iconName, size: "auto" })));
4868
4854
  };
4869
4855
  SurveyCreatorToolboxCategory.prototype.renderCategoryContent = function () {
4870
4856
  return this.renderItems(this.category.items);
@@ -5005,7 +4991,7 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
5005
4991
  event.persist();
5006
4992
  _this.model.click(event);
5007
4993
  } },
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 }),
4994
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: "auto", iconName: this.item.iconName, className: "svc-toolbox__item-icon", title: this.item.tooltip }),
5009
4995
  react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", null, this.item.title))
5010
4996
  :
5011
4997
  null);
@@ -5013,7 +4999,7 @@ var SurveyCreatorToolboxItem = /** @class */ (function (_super) {
5013
4999
  event.persist();
5014
5000
  _this.model.click(event);
5015
5001
  } },
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),
5002
+ 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: "auto", iconName: this.item.iconName, className: "svc-toolbox__item-icon" }) : null),
5017
5003
  (this.props.isCompact ?
5018
5004
  null
5019
5005
  :
@@ -5105,7 +5091,7 @@ var SurveyCreatorToolboxItemGroup = /** @class */ (function (_super) {
5105
5091
  return react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
5106
5092
  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 }),
5107
5093
  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); } },
5108
- react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: 24, iconName: this.item.subitemsButtonIcon }),
5094
+ react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: "auto", iconName: this.item.subitemsButtonIcon }),
5109
5095
  react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: this.item.popupModel, getArea: this.item.getArea })));
5110
5096
  };
5111
5097
  return SurveyCreatorToolboxItemGroup;
@@ -5454,7 +5440,7 @@ __webpack_require__.r(__webpack_exports__);
5454
5440
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! survey-core */ "survey-core");
5455
5441
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_64___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_64__);
5456
5442
  var Version;
5457
- Version = "".concat("1.12.8");
5443
+ Version = "".concat("1.12.9");
5458
5444
  // import "@survey/creator/survey-creator-core.css";
5459
5445
 
5460
5446
 
@@ -5528,7 +5514,7 @@ Version = "".concat("1.12.8");
5528
5514
 
5529
5515
 
5530
5516
 
5531
- (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.8"), "survey-creator-react");
5517
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_64__.checkLibraryVersion)("".concat("1.12.9"), "survey-creator-react");
5532
5518
 
5533
5519
  })();
5534
5520