survey-creator-react 3.2.4 → 3.2.6

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,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v3.2.4
2
+ * SurveyJS Creator v3.2.6
3
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
@@ -106,7 +106,7 @@ class TabbedMenuItemComponent extends SurveyElementBase {
106
106
  getStateElement() {
107
107
  return this.item;
108
108
  }
109
- render() {
109
+ renderElement() {
110
110
  const item = this.item;
111
111
  return attachKey2click(
112
112
  /* @__PURE__ */ React.createElement(
@@ -326,7 +326,7 @@ class RowWrapper extends CreatorModelElement {
326
326
  this.model.unsubscribeElementChanges();
327
327
  super.componentWillUnmount();
328
328
  }
329
- render() {
329
+ renderElement() {
330
330
  return /* @__PURE__ */ React.createElement(
331
331
  "div",
332
332
  {
@@ -621,7 +621,7 @@ ReactElementFactory.Instance.registerElement("svc-action-button", (props) => {
621
621
 
622
622
  class QuestionBanner extends React.Component {
623
623
  render() {
624
- return /* @__PURE__ */ React.createElement("div", { className: "svc-carry-forward-panel-wrapper" }, /* @__PURE__ */ React.createElement("div", { className: "svc-carry-forward-panel" }, /* @__PURE__ */ React.createElement("span", null, this.props.text, " "), /* @__PURE__ */ React.createElement("span", { className: "svc-carry-forward-panel__link" }, /* @__PURE__ */ React.createElement(ActionButton, { click: () => this.props.onClick(), text: this.props.actionText }))));
624
+ return /* @__PURE__ */ React.createElement("div", { className: "svc-carry-forward-panel-wrapper" }, /* @__PURE__ */ React.createElement("div", { className: "svc-carry-forward-panel" }, /* @__PURE__ */ React.createElement("span", null, this.props.text, " "), this.props.actionText ? /* @__PURE__ */ React.createElement("span", { className: "svc-carry-forward-panel__link" }, /* @__PURE__ */ React.createElement(ActionButton, { click: () => this.props.onClick(), text: this.props.actionText })) : null));
625
625
  }
626
626
  }
627
627
  ReactElementFactory.Instance.registerElement(
@@ -853,7 +853,7 @@ class CellQuestionAdornerComponent extends CreatorModelElement {
853
853
  getUpdatedModelProps() {
854
854
  return ["question", "componentData"];
855
855
  }
856
- render() {
856
+ renderElement() {
857
857
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
858
858
  "div",
859
859
  {
@@ -885,7 +885,7 @@ class CellQuestionDropdownAdornerComponent extends CreatorModelElement {
885
885
  getStateElement() {
886
886
  return this.model;
887
887
  }
888
- render() {
888
+ renderElement() {
889
889
  const question = this.props.question;
890
890
  const textStyle = this.props.question.textStyle;
891
891
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
@@ -931,14 +931,17 @@ ReactElementFactory.Instance.registerElement(
931
931
  );
932
932
 
933
933
  class TranslationDropdownQuestionComponent extends CreatorModelElement {
934
+ get model() {
935
+ return this.modelValue;
936
+ }
934
937
  createModel(props) {
935
- if (!!this.model) {
936
- this.model.dispose();
938
+ const { question } = props;
939
+ const translation = props.componentData ? props.componentData.translation : void 0;
940
+ if (!this.modelValue) {
941
+ this.modelValue = new TranslationDropdownViewModel(question, translation);
942
+ } else {
943
+ this.modelValue.attachToUI(question, translation);
937
944
  }
938
- this.model = new TranslationDropdownViewModel(
939
- props.question,
940
- props.componentData ? props.componentData.translation : void 0
941
- );
942
945
  }
943
946
  getUpdatedModelProps() {
944
947
  return ["question", "componentData"];
@@ -946,9 +949,13 @@ class TranslationDropdownQuestionComponent extends CreatorModelElement {
946
949
  getStateElement() {
947
950
  return this.model;
948
951
  }
952
+ componentDidMount() {
953
+ super.componentDidMount();
954
+ this.createModel(this.props);
955
+ }
949
956
  componentWillUnmount() {
950
957
  super.componentWillUnmount();
951
- this.model.dispose();
958
+ this.model?.detachFromUI();
952
959
  }
953
960
  renderElement() {
954
961
  const question = this.props.question;
@@ -1030,9 +1037,11 @@ class CreatorSurveyPageComponent extends CreatorModelElement {
1030
1037
  "div",
1031
1038
  {
1032
1039
  ref: this.rootRef,
1033
- id: this.props.page.id,
1040
+ id: this.props.page.renderedId,
1034
1041
  "data-sv-drop-target-survey-page": this.model.dropTargetName,
1035
1042
  className: "svc-page__content " + this.model.css,
1043
+ role: this.model.ariaRole,
1044
+ "aria-label": this.model.ariaLabel,
1036
1045
  onClick: (e) => {
1037
1046
  return this.model.select(this.model, new ReactMouseEvent(e));
1038
1047
  },
@@ -1046,7 +1055,7 @@ class CreatorSurveyPageComponent extends CreatorModelElement {
1046
1055
  this.renderPlaceholder(),
1047
1056
  this.renderHeader(),
1048
1057
  this.renderFooter()
1049
- ));
1058
+ ), void 0, { disableTabStop: true });
1050
1059
  }
1051
1060
  renderPlaceholder() {
1052
1061
  if (!this.model.showPlaceholder) return null;
@@ -1104,7 +1113,7 @@ class AddQuestionButtonComponent extends SurveyElementBase {
1104
1113
  return /* @__PURE__ */ React.createElement("div", { className: this.item.cssClasses.itemTypeSelector }, ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown", { item: this.model.questionTypeSelectorModel }));
1105
1114
  }
1106
1115
  renderElement() {
1107
- return /* @__PURE__ */ React.createElement(React.Fragment, null, attachKey2click(/* @__PURE__ */ React.createElement(
1116
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
1108
1117
  "div",
1109
1118
  {
1110
1119
  className: this.item.getActionBarItemCss(),
@@ -1114,9 +1123,9 @@ class AddQuestionButtonComponent extends SurveyElementBase {
1114
1123
  },
1115
1124
  onMouseOver: (e) => this.model.hoverStopper && this.model.hoverStopper(e.nativeEvent, e.currentTarget)
1116
1125
  },
1117
- /* @__PURE__ */ React.createElement("span", { className: this.item.getActionBarItemTitleCss() }, this.model.addNewQuestionText),
1126
+ /* @__PURE__ */ React.createElement("button", { type: "button", className: "svc-surface-btn__title-button" }, /* @__PURE__ */ React.createElement("span", { className: this.item.getActionBarItemTitleCss() }, this.model.addNewQuestionText)),
1118
1127
  this.renderTypeSelector()
1119
- )));
1128
+ ));
1120
1129
  }
1121
1130
  }
1122
1131
  ReactElementFactory.Instance.registerElement("svc-add-new-question-btn", (props) => {
@@ -1154,6 +1163,9 @@ ReactElementFactory.Instance.registerElement(
1154
1163
  class LogoImageComponent extends CreatorModelElement {
1155
1164
  constructor(props) {
1156
1165
  super(props);
1166
+ this.reactOnStrChanged = () => {
1167
+ this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
1168
+ };
1157
1169
  this.rootRef = React.createRef();
1158
1170
  }
1159
1171
  createModel(props) {
@@ -1169,8 +1181,17 @@ class LogoImageComponent extends CreatorModelElement {
1169
1181
  getStateElement() {
1170
1182
  return this.model;
1171
1183
  }
1184
+ componentDidUpdate(prevProps, prevState) {
1185
+ super.componentDidUpdate(prevProps, prevState);
1186
+ this.model.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
1187
+ }
1188
+ componentWillUnmount() {
1189
+ super.componentWillUnmount();
1190
+ this.model.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
1191
+ }
1172
1192
  componentDidMount() {
1173
1193
  super.componentDidMount();
1194
+ this.model.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
1174
1195
  this.model.root = this.rootRef.current;
1175
1196
  }
1176
1197
  renderButtons() {
@@ -1180,7 +1201,7 @@ class LogoImageComponent extends CreatorModelElement {
1180
1201
  return /* @__PURE__ */ React.createElement("div", { className: this.model.containerCss }, this.renderButtons(), /* @__PURE__ */ React.createElement(LogoImage, { data: this.props.data.survey }));
1181
1202
  }
1182
1203
  renderPlaceHolder() {
1183
- return this.model.allowEdit && !this.model.isUploading ? attachKey2click(/* @__PURE__ */ React.createElement("div", { className: "svc-logo-image-placeholder", onClick: () => this.model.chooseFile(this.model) }, /* @__PURE__ */ React.createElement("svg", null, /* @__PURE__ */ React.createElement("use", { xlinkHref: "#icon-image-48x48" })))) : null;
1204
+ return this.model.allowEdit && !this.model.isUploading ? attachKey2click(/* @__PURE__ */ React.createElement("div", { className: "svc-logo-image-placeholder", role: "button", "aria-label": this.model.chooseLogoAriaLabel, onClick: () => this.model.chooseFile(this.model) }, /* @__PURE__ */ React.createElement("svg", null, /* @__PURE__ */ React.createElement("use", { xlinkHref: "#icon-image-48x48" })))) : null;
1184
1205
  }
1185
1206
  renderInput() {
1186
1207
  return /* @__PURE__ */ React.createElement("input", { "aria-hidden": "true", type: "file", tabIndex: -1, accept: this.model.acceptedTypes, className: "svc-choose-file-input" });
@@ -1188,7 +1209,7 @@ class LogoImageComponent extends CreatorModelElement {
1188
1209
  renderLoadingIndicator() {
1189
1210
  return /* @__PURE__ */ React.createElement("div", { className: "svc-logo-image__loading" }, /* @__PURE__ */ React.createElement(LoadingIndicatorComponent, null));
1190
1211
  }
1191
- render() {
1212
+ renderElement() {
1192
1213
  let content = null;
1193
1214
  if (this.model.survey.locLogo.renderedHtml && !this.model.isUploading) {
1194
1215
  content = this.renderImage();
@@ -1266,9 +1287,11 @@ class SurveyElementEmbeddedSurvey extends SurveyQuestionElementBase {
1266
1287
  this.embeddedSurvey.rootElement = this.rootRef.current;
1267
1288
  }
1268
1289
  }
1269
- render() {
1290
+ canRender() {
1291
+ return !!this.embeddedSurvey;
1292
+ }
1293
+ renderElement() {
1270
1294
  const survey = this.embeddedSurvey;
1271
- if (!survey) return null;
1272
1295
  return /* @__PURE__ */ React.createElement("div", { style: { display: "contents" }, ref: this.rootRef }, /* @__PURE__ */ React.createElement(
1273
1296
  SurveyPage,
1274
1297
  {
@@ -1368,7 +1391,7 @@ class ItemValueAdornerComponent extends CreatorModelElement {
1368
1391
  item: action
1369
1392
  });
1370
1393
  }
1371
- render() {
1394
+ renderElement() {
1372
1395
  this.model.item = this.props.item;
1373
1396
  const button = this.model.allowAdd ? this.renderButton(this.model.addAction) : /* @__PURE__ */ React.createElement(React.Fragment, null, " ", this.model.isDraggable ? /* @__PURE__ */ React.createElement(
1374
1397
  "span",
@@ -1470,7 +1493,7 @@ class ImageItemValueAdornerComponent extends CreatorModelElement {
1470
1493
  const placeholder = this.model.showPlaceholder ? /* @__PURE__ */ React.createElement("span", { className: "svc-image-item-value__placeholder" }, this.model.placeholderText) : null;
1471
1494
  return /* @__PURE__ */ React.createElement(React.Fragment, null, placeholder, controls);
1472
1495
  }
1473
- render() {
1496
+ renderElement() {
1474
1497
  this.model.item = this.props.item;
1475
1498
  const isNew = !this.props.question.isItemInList(this.props.item);
1476
1499
  this.model.isNew = isNew;
@@ -1571,7 +1594,7 @@ class MatrixCellAdornerComponent extends CreatorModelElement {
1571
1594
  getStateElement() {
1572
1595
  return this.model;
1573
1596
  }
1574
- render() {
1597
+ renderElement() {
1575
1598
  let controls = null;
1576
1599
  if (!!this.model.isSupportCellEditor) {
1577
1600
  controls = /* @__PURE__ */ React.createElement("div", { className: "svc-matrix-cell__question-controls" }, ReactElementFactory.Instance.createElement("sv-action-bar-item", {
@@ -1613,7 +1636,7 @@ class SurveyResults extends CreatorModelElement {
1613
1636
  getStateElement() {
1614
1637
  return this.model;
1615
1638
  }
1616
- render() {
1639
+ renderElement() {
1617
1640
  if (!this.model) {
1618
1641
  return null;
1619
1642
  }
@@ -1662,7 +1685,7 @@ class SurveyResultsByRow extends CreatorModelElement {
1662
1685
  getStateElement() {
1663
1686
  return this.row;
1664
1687
  }
1665
- render() {
1688
+ renderElement() {
1666
1689
  return /* @__PURE__ */ React.createElement(React.Fragment, null, attachKey2click(/* @__PURE__ */ React.createElement("tr", { onClick: () => this.row.toggle() }, /* @__PURE__ */ React.createElement(
1667
1690
  "td",
1668
1691
  {
@@ -1712,7 +1735,7 @@ class SurveyCreatorToolboxTool extends CreatorModelElement {
1712
1735
  getStateElement() {
1713
1736
  return this.item;
1714
1737
  }
1715
- render() {
1738
+ renderElement() {
1716
1739
  const item = this.item;
1717
1740
  const itemComponent = ReactElementFactory.Instance.createElement(
1718
1741
  this.model.itemComponent,
@@ -1724,7 +1747,7 @@ class SurveyCreatorToolboxTool extends CreatorModelElement {
1724
1747
  isCompact: this.isCompact
1725
1748
  }
1726
1749
  );
1727
- return /* @__PURE__ */ React.createElement("div", { className: item.css, key: item.id, ref: this.rootRef }, item.needSeparator && !this.creator.toolbox.showCategoryTitles ? /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__category-separator" }) : null, /* @__PURE__ */ React.createElement(
1750
+ return /* @__PURE__ */ React.createElement("div", { className: item.css, key: item.id, ref: this.rootRef, role: this.model.ariaRole }, item.needSeparator && !this.creator.toolbox.showCategoryTitles ? /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__category-separator" }) : null, /* @__PURE__ */ React.createElement(
1728
1751
  "div",
1729
1752
  {
1730
1753
  className: "svc-toolbox__tool-content",
@@ -1778,7 +1801,7 @@ class SurveyCreatorToolboxItem extends CreatorModelElement {
1778
1801
  getStateElement() {
1779
1802
  return this.model;
1780
1803
  }
1781
- render() {
1804
+ renderElement() {
1782
1805
  const banner = this.props.isCompact ? /* @__PURE__ */ React.createElement(
1783
1806
  "span",
1784
1807
  {
@@ -1842,7 +1865,7 @@ class SurveyCreatorToolboxItemGroup extends CreatorModelElement {
1842
1865
  getStateElement() {
1843
1866
  return this.item;
1844
1867
  }
1845
- render() {
1868
+ renderElement() {
1846
1869
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SurveyCreatorToolboxItem, { item: this.item, creator: this.creator, model: this.model, parentModel: this.parentModel, isCompact: this.isCompact }), /* @__PURE__ */ React.createElement(
1847
1870
  "div",
1848
1871
  {
@@ -1872,7 +1895,7 @@ class SurveyCreatorToolboxCategory extends SurveyElementBase {
1872
1895
  getStateElement() {
1873
1896
  return this.category;
1874
1897
  }
1875
- render() {
1898
+ renderElement() {
1876
1899
  const header = this.renderCategoryHeader();
1877
1900
  const items = this.renderCategoryContent();
1878
1901
  return /* @__PURE__ */ React.createElement("div", { className: this.class, key: this.category.name }, /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__category-header-wrapper" }, header), items);
@@ -1918,10 +1941,10 @@ class ToolboxList extends SurveyElementBase {
1918
1941
  getStateElement() {
1919
1942
  return this.model;
1920
1943
  }
1921
- render() {
1944
+ renderElement() {
1922
1945
  if (!this.model || !this.model.renderElements) return null;
1923
1946
  const items = this.renderItems();
1924
- return /* @__PURE__ */ React.createElement("div", { className: this.model.cssClasses.root }, items);
1947
+ return /* @__PURE__ */ React.createElement("div", { className: this.model.cssClasses.root, role: "list" }, items);
1925
1948
  }
1926
1949
  renderItems() {
1927
1950
  const items = this.model.renderedActions;
@@ -1943,9 +1966,6 @@ class SearchComponent extends SurveyElementBase {
1943
1966
  }
1944
1967
  constructor(props) {
1945
1968
  super(props);
1946
- this.state = {
1947
- filterString: this.model.filterString || ""
1948
- };
1949
1969
  }
1950
1970
  renderElement() {
1951
1971
  if (!this.model.isVisible) return null;
@@ -1964,7 +1984,7 @@ class SearchComponent extends SurveyElementBase {
1964
1984
  className: "svc-search__input",
1965
1985
  "aria-label": this.model.filterStringPlaceholder,
1966
1986
  placeholder: this.model.filterStringPlaceholder,
1967
- value: this.state.filterString,
1987
+ value: this.model.filterString || "",
1968
1988
  onChange,
1969
1989
  tabIndex: this.model.getTabIndex()
1970
1990
  }
@@ -2028,10 +2048,10 @@ class AdaptiveToolbox extends SurveyElementBase {
2028
2048
  const searchButton = this.toolbox.isCompactRendered ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SurveyCreatorToolboxTool, { item: this.toolbox.searchItem, creator: this.creator, parentModel: this.toolbox, isCompact: this.toolbox.isCompactRendered, key: "searchitem" })) : null;
2029
2049
  return /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__search-container" }, searchButton, /* @__PURE__ */ React.createElement(SearchComponent, { model: this.toolbox.searchManager }), /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" }));
2030
2050
  }
2031
- render() {
2051
+ renderElement() {
2032
2052
  const search = this.toolbox.showSearch ? this.renderSearch() : null;
2033
2053
  const placeholder = this.toolbox.showPlaceholder ? /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
2034
- return /* @__PURE__ */ React.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() }, /* @__PURE__ */ React.createElement("div", { onBlur: (e) => this.toolbox.focusOut(e), className: "svc-toolbox__panel" }, search, placeholder, /* @__PURE__ */ React.createElement(Scroll, null, this.toolbox.showInSingleCategory ? /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)) : this.renderCategories())));
2054
+ return /* @__PURE__ */ React.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() }, /* @__PURE__ */ React.createElement("div", { onBlur: (e) => this.toolbox.focusOut(e), className: "svc-toolbox__panel" }, search, placeholder, /* @__PURE__ */ React.createElement(Scroll, null, this.toolbox.showInSingleCategory ? /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__category", role: "list", "aria-label": this.toolbox.toolboxAriaLabel }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)) : this.renderCategories())));
2035
2055
  }
2036
2056
  }
2037
2057
  ReactElementFactory.Instance.registerElement("svc-toolbox", (props) => {
@@ -2039,43 +2059,6 @@ ReactElementFactory.Instance.registerElement("svc-toolbox", (props) => {
2039
2059
  });
2040
2060
 
2041
2061
  class SurveyNavigation extends SurveyElementBase {
2042
- constructor() {
2043
- super(...arguments);
2044
- this.onPropChangedHandler = (sender, options) => {
2045
- if (this.isRendering) return;
2046
- const reactiveProps = [
2047
- "showProgressBar",
2048
- "progressBarType",
2049
- "currentPageValue"
2050
- ];
2051
- if (reactiveProps.indexOf(options.name) < 0) return;
2052
- var val = {};
2053
- for (var i = 0; i < reactiveProps.length; i++) {
2054
- var propName = reactiveProps[i];
2055
- val[propName] = this.survey[propName];
2056
- }
2057
- this.setState(val);
2058
- };
2059
- }
2060
- componentDidMount() {
2061
- super.componentDidMount();
2062
- this.setHandler();
2063
- }
2064
- componentDidUpdate(prevProps, prevState) {
2065
- super.componentDidUpdate(prevProps, prevState);
2066
- this.setHandler();
2067
- }
2068
- setHandler() {
2069
- if (!this.survey || this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler))
2070
- return;
2071
- this.survey.onPropertyChanged.add(this.onPropChangedHandler);
2072
- }
2073
- componentWillUnmount() {
2074
- super.componentWillUnmount();
2075
- if (this.survey) {
2076
- this.survey.onPropertyChanged.remove(this.onPropChangedHandler);
2077
- }
2078
- }
2079
2062
  get survey() {
2080
2063
  return this.props.survey;
2081
2064
  }
@@ -2416,7 +2399,7 @@ class SurveyLocStringEditor extends CreatorModelElement {
2416
2399
  get className() {
2417
2400
  return this.baseModel.className(this.locString.renderedHtml);
2418
2401
  }
2419
- render() {
2402
+ renderElement() {
2420
2403
  if (!this.locString) {
2421
2404
  return null;
2422
2405
  }
@@ -2643,16 +2626,16 @@ class TabDesignerComponent extends SurveyElementBase {
2643
2626
  this.denyUpdate = () => {
2644
2627
  this.denyComponentUpdate();
2645
2628
  };
2646
- this.allowUpdate = () => {
2629
+ this.allowUpdateHandler = () => {
2647
2630
  this.allowComponentUpdate();
2648
2631
  };
2649
2632
  this.addDragDropEvents = () => {
2650
2633
  this.creator.onDragStart.add(this.denyUpdate);
2651
- this.creator.onDragClear.add(this.allowUpdate);
2634
+ this.creator.onDragClear.add(this.allowUpdateHandler);
2652
2635
  };
2653
2636
  this.clearDragDropEvents = () => {
2654
2637
  this.creator.onDragStart.remove(this.denyUpdate);
2655
- this.creator.onDragClear.remove(this.allowUpdate);
2638
+ this.creator.onDragClear.remove(this.allowUpdateHandler);
2656
2639
  };
2657
2640
  }
2658
2641
  get model() {
@@ -2668,7 +2651,6 @@ class TabDesignerComponent extends SurveyElementBase {
2668
2651
  componentWillUnmount() {
2669
2652
  super.componentWillUnmount();
2670
2653
  this.clearDragDropEvents();
2671
- super.componentWillUnmount();
2672
2654
  }
2673
2655
  getStateElements() {
2674
2656
  return [this.model, this.model.survey, this.model.pagesController];
@@ -2837,6 +2819,7 @@ class TabJsonEditorAceComponent extends SurveyElementBase {
2837
2819
  return this.props.data;
2838
2820
  }
2839
2821
  componentDidMount() {
2822
+ super.componentDidMount();
2840
2823
  this.model.init(ace.edit(this.aceEditorrRef.current));
2841
2824
  }
2842
2825
  renderElement() {
@@ -2857,6 +2840,39 @@ ReactElementFactory.Instance.registerElement(
2857
2840
  }
2858
2841
  );
2859
2842
 
2843
+ class TabJsonEditorMonacoComponent extends SurveyElementBase {
2844
+ constructor(props) {
2845
+ super(props);
2846
+ this.monacoEditorRef = React.createRef();
2847
+ }
2848
+ getStateElement() {
2849
+ return this.model;
2850
+ }
2851
+ get model() {
2852
+ return this.props.data;
2853
+ }
2854
+ componentDidMount() {
2855
+ super.componentDidMount();
2856
+ this.model.init(this.monacoEditorRef.current);
2857
+ }
2858
+ renderElement() {
2859
+ const errors = /* @__PURE__ */ React.createElement(TabJsonEditorErrorsComponent, { data: this.model });
2860
+ return /* @__PURE__ */ React.createElement("div", { className: "svc-creator-tab__content" }, /* @__PURE__ */ React.createElement("div", { className: "svc-json-editor-tab__content" }, /* @__PURE__ */ React.createElement(
2861
+ "div",
2862
+ {
2863
+ className: "svc-json-editor-tab__monaco-editor",
2864
+ ref: this.monacoEditorRef
2865
+ }
2866
+ ), errors));
2867
+ }
2868
+ }
2869
+ ReactElementFactory.Instance.registerElement(
2870
+ "svc-tab-json-editor-monaco",
2871
+ (props) => {
2872
+ return React.createElement(TabJsonEditorMonacoComponent, props);
2873
+ }
2874
+ );
2875
+
2860
2876
  class TabLogicComponent extends SurveyElementBase {
2861
2877
  get model() {
2862
2878
  return this.props.data;
@@ -3306,7 +3322,7 @@ ReactElementFactory.Instance.registerElement("svc-floating-panel", (props) => {
3306
3322
  });
3307
3323
 
3308
3324
  let ItemTemplateComponent$1 = class ItemTemplateComponent extends SurveyElementBase {
3309
- render() {
3325
+ renderElement() {
3310
3326
  const item = this.props.item;
3311
3327
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SvgIcon, { iconName: item.iconName, size: item.iconSize, className: "svc-json-error__icon" }), /* @__PURE__ */ React.createElement("div", { className: "svc-json-error__container" }, /* @__PURE__ */ React.createElement("div", { className: "svc-json-error__title" }, /* @__PURE__ */ React.createElement("span", { key: 2 }, this.renderLocString(item.locTitle, void 0, "locString"))), this.renderFixButton()));
3312
3328
  }
@@ -3480,7 +3496,7 @@ class Swatch extends React.Component {
3480
3496
  }
3481
3497
 
3482
3498
  class ItemTemplateComponent extends SurveyElementBase {
3483
- render() {
3499
+ renderElement() {
3484
3500
  const item = this.props.item;
3485
3501
  return /* @__PURE__ */ React.createElement("div", { className: "sd-color-swatch-item" }, /* @__PURE__ */ React.createElement("div", { className: "sd-color-swatch-item__label" }, /* @__PURE__ */ React.createElement("span", { key: 2, className: "sd-color-swatch-item__caption" }, this.renderLocString(item.locTitle, void 0, "locString"))), /* @__PURE__ */ React.createElement(Swatch, { color: item.value }));
3486
3502
  }
@@ -3656,8 +3672,8 @@ ReactElementFactory.Instance.registerElement("sv-fileedit-button", (props) => {
3656
3672
  });
3657
3673
 
3658
3674
  let Version;
3659
- Version = `${"3.2.4"}`;
3660
- checkLibraryVersion(`${"3.2.4"}`, "survey-creator-react");
3675
+ Version = `${"3.2.6"}`;
3676
+ checkLibraryVersion(`${"3.2.6"}`, "survey-creator-react");
3661
3677
 
3662
- export { ActionButton, AdaptiveToolbox, AddQuestionButtonComponent, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CollabRowComponent, ComponentContainer, CreatorSurveyPageComponent, FloatingPanelComponent, IconItem, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SideBarLaunchCard, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionFileEditorButton, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyResults, SurveyResultsByRow, SurveySimulator, SurveySpinEditorButton, SwitcherComponent, TabButtonComponent, TabContainerComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorTextareaComponent, TabLogicComponent, TabPreviewSurveyComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationDropdownQuestionComponent, TranslationLineSkeleton, TranslationLocaleItemComponent, VariablesViewerComponent, Version };
3678
+ export { ActionButton, AdaptiveToolbox, AddQuestionButtonComponent, CellQuestionAdornerComponent, CellQuestionDropdownAdornerComponent, CollabRowComponent, ComponentContainer, CreatorSurveyPageComponent, FloatingPanelComponent, IconItem, ImageItemValueAdornerComponent, ItemValueAdornerComponent, LogoImageComponent, MatrixCellAdornerComponent, PanelAdornerComponent, PropertyGridComponent, PropertyGridPlaceholderComponent, QuestionAdornerComponent, QuestionBanner, QuestionDropdownAdornerComponent, QuestionEditorContentComponent, QuestionErrorComponent, QuestionImageAdornerComponent, QuestionRatingAdornerComponent, QuestionWidgetAdornerComponent, QuestionWrapperFooter, QuestionWrapperHeader, ReactDragEvent, ReactMouseEvent, RowWrapper, SearchComponent, SideBarDefaultHeader, SideBarLaunchCard, SidebarComponent, SurveyCreator, SurveyCreatorComponent, SurveyCreatorToolboxCategory, SurveyCreatorToolboxItem, SurveyCreatorToolboxItemGroup, SurveyCreatorToolboxTool, SurveyElementEmbeddedSurvey, SurveyLocStringEditor, SurveyLogicOpertor, SurveyNavigation, SurveyQuestionColor, SurveyQuestionFileEditor, SurveyQuestionFileEditorButton, SurveyQuestionLinkValue, SurveyQuestionSpinEditor, SurveyResults, SurveyResultsByRow, SurveySimulator, SurveySpinEditorButton, SwitcherComponent, TabButtonComponent, TabContainerComponent, TabDesignerComponent, TabJsonEditorAceComponent, TabJsonEditorErrorsComponent, TabJsonEditorMonacoComponent, TabJsonEditorTextareaComponent, TabLogicComponent, TabPreviewSurveyComponent, TabThemeSurveyComponent, TabTranslationComponent, TabbedMenuComponent, TabbedMenuItemComponent, ToolboxList, TranslateFromAction, TranslationDropdownQuestionComponent, TranslationLineSkeleton, TranslationLocaleItemComponent, VariablesViewerComponent, Version };
3663
3679
  //# sourceMappingURL=survey-creator-react.mjs.map