survey-creator-react 1.12.57 → 1.12.59

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * SurveyJS Creator React v2.3.15
3
- * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
2
+ * SurveyJS Creator React v2.5.7
3
+ * (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
6
6
  */
@@ -281,8 +281,25 @@ class CreatorModelElement extends SurveyElementBase {
281
281
  return true;
282
282
  for (var i = 0; i < names.length; i++) {
283
283
  const key = names[i];
284
- if (this.props[key] !== nextProps[key])
285
- return true;
284
+ if (typeof key === "object") {
285
+ const currentProp = this.props[key.name];
286
+ const nextProp = nextProps[key.name];
287
+ if (key.deepEqual) {
288
+ if (this.props[key.name] === nextProps[key.name])
289
+ return false;
290
+ const currentPropKeys = Object.keys(currentProp || {});
291
+ if (currentPropKeys.length !== Object.keys(nextProp || {}).length)
292
+ return true;
293
+ return currentPropKeys.some(key => currentProp[key] != nextProp[key]);
294
+ }
295
+ else {
296
+ return currentProp !== nextProp;
297
+ }
298
+ }
299
+ else {
300
+ if (this.props[key] !== nextProps[key])
301
+ return true;
302
+ }
286
303
  }
287
304
  return false;
288
305
  }
@@ -302,7 +319,7 @@ class RowWrapper extends CreatorModelElement {
302
319
  this.model = new RowViewModel(props.componentData.creator, props.row, null);
303
320
  }
304
321
  getUpdatedModelProps() {
305
- return ["row", "componentData"];
322
+ return ["row", { name: "componentData", deepEqual: true }];
306
323
  }
307
324
  getStateElement() {
308
325
  return this.model;
@@ -1520,8 +1537,9 @@ class SurveyCreatorToolboxCategory extends SurveyElementBase {
1520
1537
  if (this.toolbox.canCollapseCategories) {
1521
1538
  className += " svc-toolbox__category-header--collapsed";
1522
1539
  }
1540
+ const title = this.renderLocString(this.category.locTitle);
1523
1541
  return attachKey2click(React.createElement("div", { className: className, onClick: e => this.category.toggleState() },
1524
- React.createElement("span", { className: "svc-toolbox__category-title" }, this.category.title),
1542
+ React.createElement("span", { className: "svc-toolbox__category-title" }, title),
1525
1543
  this.renderButton()));
1526
1544
  }
1527
1545
  renderButton() {
@@ -1780,7 +1798,7 @@ class TabControl extends SurveyElementBase {
1780
1798
  React.createElement(TabsComponent, { model: this.props.model.topToolbar })))),
1781
1799
  React.createElement("div", { className: "svc-sidebar-tabs__bottom-container" },
1782
1800
  React.createElement("div", { className: "svc-sidebar-tabs__items" },
1783
- React.createElement(TabsComponent, { model: this.props.model.bottomToolbar })))));
1801
+ React.createElement(SurveyActionBar, { model: this.props.model.bottomToolbar })))));
1784
1802
  }
1785
1803
  }
1786
1804
  ReactElementFactory.Instance.registerElement("svc-tab-control", (props) => {
@@ -2701,6 +2719,20 @@ ReactElementFactory.Instance.registerElement("svc-property-grid", (props) => {
2701
2719
  return React.createElement(PropertyGridComponent, props);
2702
2720
  });
2703
2721
 
2722
+ class ComponentContainer extends React.Component {
2723
+ constructor(props) {
2724
+ super(props);
2725
+ }
2726
+ render() {
2727
+ return (React.createElement("div", { className: "svc-component-container" }, this.props.model.elements.map((element, index) => {
2728
+ return ReactElementFactory.Instance.createElement(element.componentName, { model: element.componentData, key: index });
2729
+ })));
2730
+ }
2731
+ }
2732
+ ReactElementFactory.Instance.registerElement("svc-component-container", (props) => {
2733
+ return React.createElement(ComponentContainer, props);
2734
+ });
2735
+
2704
2736
  class SwitcherComponent extends SurveyElementBase {
2705
2737
  get item() {
2706
2738
  return this.props.item;
@@ -2898,12 +2930,12 @@ ReactQuestionFactory.Instance.registerQuestion("commentwithreset", (props) => {
2898
2930
 
2899
2931
  class SurveyQuestionBooleanSwitch extends SurveyQuestionElementBase {
2900
2932
  renderElement() {
2901
- const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.value ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-checked": this.questionBase.booleanValue || false, "aria-required": this.questionBase.a11y_input_ariaRequired, "aria-label": this.questionBase.a11y_input_ariaLabel, "aria-labelledby": this.questionBase.a11y_input_ariaLabelledBy, "aria-invalid": this.questionBase.a11y_input_ariaInvalid, "aria-errormessage": this.questionBase.a11y_input_ariaErrormessage },
2933
+ const button = attachKey2click(React.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.booleanValue ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-checked": this.questionBase.booleanValue || false, "aria-required": this.questionBase.a11y_input_ariaRequired, "aria-label": this.questionBase.a11y_input_ariaLabel, "aria-labelledby": this.questionBase.a11y_input_ariaLabelledBy, "aria-invalid": this.questionBase.a11y_input_ariaInvalid, "aria-errormessage": this.questionBase.a11y_input_ariaErrormessage },
2902
2934
  React.createElement("div", { className: "spg-boolean-switch__thumb" },
2903
2935
  React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left" })),
2904
2936
  React.createElement("div", { className: "spg-boolean-switch__thumb" },
2905
2937
  React.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--right" }))), this.questionBase, { processEsc: false });
2906
- return (React.createElement("div", { className: "spg-boolean-switch", onClick: () => this.questionBase.value = !this.questionBase.value },
2938
+ return (React.createElement("div", { className: "spg-boolean-switch", onClick: () => this.questionBase.booleanValue = !this.questionBase.booleanValue },
2907
2939
  button,
2908
2940
  React.createElement("div", { className: "spg-boolean-switch__caption" },
2909
2941
  React.createElement("div", { className: "spg-boolean-switch__title", id: this.questionBase.labelRenderedAriaID }, SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
@@ -2915,8 +2947,8 @@ ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
2915
2947
  RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
2916
2948
 
2917
2949
  let Version;
2918
- Version = `${"2.3.15"}`;
2919
- checkLibraryVersion(`${"2.3.15"}`, "survey-creator-react");
2950
+ Version = `${"2.5.7"}`;
2951
+ checkLibraryVersion(`${"2.5.7"}`, "survey-creator-react");
2920
2952
 
2921
- export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CreatorSurveyPageComponent, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyQuestionTextWithReset, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
2953
+ export { ActionButton, AdaptiveToolbox, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, ComponentContainer, CreatorSurveyPageComponent, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionBooleanSwitch, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyQuestionTextWithReset, SurveyResults, SurveyResultsByRow, SurveySimulator, SwitcherComponent, TabButtonComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicAddButtonComponent, TabLogicComponent, TabPreviewSurveyComponent, TabPreviewTestSurveyAgainComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationLineSkeleton, Version };
2922
2954
  //# sourceMappingURL=survey-creator-react.mjs.map