survey-creator-react 3.2.4 → 3.2.5
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/fesm/survey-creator-react.mjs +93 -79
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +91 -80
- package/survey-creator-react.js.map +1 -1
- package/survey-creator-react.min.js +2 -2
- package/typings/ImageItemValueWrapper.d.ts +1 -1
- package/typings/ItemValueWrapper.d.ts +1 -1
- package/typings/LogoImage.d.ts +4 -1
- package/typings/MatrixCellWrapper.d.ts +1 -1
- package/typings/Navigation.d.ts +0 -5
- package/typings/QuestionEmbeddedSurvey.d.ts +2 -1
- package/typings/Results.d.ts +2 -2
- package/typings/StringEditor.d.ts +1 -1
- package/typings/TabbedMenu.d.ts +1 -1
- package/typings/adorners/CellQuestion.d.ts +1 -1
- package/typings/adorners/CellQuestionDropdown.d.ts +1 -1
- package/typings/adorners/Row.d.ts +1 -1
- package/typings/adorners/TranslationDropdownQuestion.d.ts +3 -1
- package/typings/entries/index-wc.d.ts +1 -0
- package/typings/tabs/Designer.d.ts +1 -1
- package/typings/tabs/JsonEditorMonaco.d.ts +16 -0
- package/typings/toolbox/AdaptiveToolbox.d.ts +1 -1
- package/typings/toolbox/ToolboxCategory.d.ts +1 -1
- package/typings/toolbox/ToolboxItem.d.ts +2 -2
- package/typings/toolbox/ToolboxItemGroup.d.ts +1 -1
- package/typings/toolbox/ToolboxList.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v3.2.
|
|
2
|
+
* SurveyJS Creator v3.2.5
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
936
|
-
|
|
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
|
|
958
|
+
this.model?.detachFromUI();
|
|
952
959
|
}
|
|
953
960
|
renderElement() {
|
|
954
961
|
const question = this.props.question;
|
|
@@ -1030,7 +1037,7 @@ class CreatorSurveyPageComponent extends CreatorModelElement {
|
|
|
1030
1037
|
"div",
|
|
1031
1038
|
{
|
|
1032
1039
|
ref: this.rootRef,
|
|
1033
|
-
id: this.props.page.
|
|
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,
|
|
1036
1043
|
onClick: (e) => {
|
|
@@ -1154,6 +1161,9 @@ ReactElementFactory.Instance.registerElement(
|
|
|
1154
1161
|
class LogoImageComponent extends CreatorModelElement {
|
|
1155
1162
|
constructor(props) {
|
|
1156
1163
|
super(props);
|
|
1164
|
+
this.reactOnStrChanged = () => {
|
|
1165
|
+
this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
|
|
1166
|
+
};
|
|
1157
1167
|
this.rootRef = React.createRef();
|
|
1158
1168
|
}
|
|
1159
1169
|
createModel(props) {
|
|
@@ -1169,8 +1179,17 @@ class LogoImageComponent extends CreatorModelElement {
|
|
|
1169
1179
|
getStateElement() {
|
|
1170
1180
|
return this.model;
|
|
1171
1181
|
}
|
|
1182
|
+
componentDidUpdate(prevProps, prevState) {
|
|
1183
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
1184
|
+
this.model.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
1185
|
+
}
|
|
1186
|
+
componentWillUnmount() {
|
|
1187
|
+
super.componentWillUnmount();
|
|
1188
|
+
this.model.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
|
|
1189
|
+
}
|
|
1172
1190
|
componentDidMount() {
|
|
1173
1191
|
super.componentDidMount();
|
|
1192
|
+
this.model.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
1174
1193
|
this.model.root = this.rootRef.current;
|
|
1175
1194
|
}
|
|
1176
1195
|
renderButtons() {
|
|
@@ -1188,7 +1207,7 @@ class LogoImageComponent extends CreatorModelElement {
|
|
|
1188
1207
|
renderLoadingIndicator() {
|
|
1189
1208
|
return /* @__PURE__ */ React.createElement("div", { className: "svc-logo-image__loading" }, /* @__PURE__ */ React.createElement(LoadingIndicatorComponent, null));
|
|
1190
1209
|
}
|
|
1191
|
-
|
|
1210
|
+
renderElement() {
|
|
1192
1211
|
let content = null;
|
|
1193
1212
|
if (this.model.survey.locLogo.renderedHtml && !this.model.isUploading) {
|
|
1194
1213
|
content = this.renderImage();
|
|
@@ -1266,9 +1285,11 @@ class SurveyElementEmbeddedSurvey extends SurveyQuestionElementBase {
|
|
|
1266
1285
|
this.embeddedSurvey.rootElement = this.rootRef.current;
|
|
1267
1286
|
}
|
|
1268
1287
|
}
|
|
1269
|
-
|
|
1288
|
+
canRender() {
|
|
1289
|
+
return !!this.embeddedSurvey;
|
|
1290
|
+
}
|
|
1291
|
+
renderElement() {
|
|
1270
1292
|
const survey = this.embeddedSurvey;
|
|
1271
|
-
if (!survey) return null;
|
|
1272
1293
|
return /* @__PURE__ */ React.createElement("div", { style: { display: "contents" }, ref: this.rootRef }, /* @__PURE__ */ React.createElement(
|
|
1273
1294
|
SurveyPage,
|
|
1274
1295
|
{
|
|
@@ -1368,7 +1389,7 @@ class ItemValueAdornerComponent extends CreatorModelElement {
|
|
|
1368
1389
|
item: action
|
|
1369
1390
|
});
|
|
1370
1391
|
}
|
|
1371
|
-
|
|
1392
|
+
renderElement() {
|
|
1372
1393
|
this.model.item = this.props.item;
|
|
1373
1394
|
const button = this.model.allowAdd ? this.renderButton(this.model.addAction) : /* @__PURE__ */ React.createElement(React.Fragment, null, " ", this.model.isDraggable ? /* @__PURE__ */ React.createElement(
|
|
1374
1395
|
"span",
|
|
@@ -1470,7 +1491,7 @@ class ImageItemValueAdornerComponent extends CreatorModelElement {
|
|
|
1470
1491
|
const placeholder = this.model.showPlaceholder ? /* @__PURE__ */ React.createElement("span", { className: "svc-image-item-value__placeholder" }, this.model.placeholderText) : null;
|
|
1471
1492
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, placeholder, controls);
|
|
1472
1493
|
}
|
|
1473
|
-
|
|
1494
|
+
renderElement() {
|
|
1474
1495
|
this.model.item = this.props.item;
|
|
1475
1496
|
const isNew = !this.props.question.isItemInList(this.props.item);
|
|
1476
1497
|
this.model.isNew = isNew;
|
|
@@ -1571,7 +1592,7 @@ class MatrixCellAdornerComponent extends CreatorModelElement {
|
|
|
1571
1592
|
getStateElement() {
|
|
1572
1593
|
return this.model;
|
|
1573
1594
|
}
|
|
1574
|
-
|
|
1595
|
+
renderElement() {
|
|
1575
1596
|
let controls = null;
|
|
1576
1597
|
if (!!this.model.isSupportCellEditor) {
|
|
1577
1598
|
controls = /* @__PURE__ */ React.createElement("div", { className: "svc-matrix-cell__question-controls" }, ReactElementFactory.Instance.createElement("sv-action-bar-item", {
|
|
@@ -1613,7 +1634,7 @@ class SurveyResults extends CreatorModelElement {
|
|
|
1613
1634
|
getStateElement() {
|
|
1614
1635
|
return this.model;
|
|
1615
1636
|
}
|
|
1616
|
-
|
|
1637
|
+
renderElement() {
|
|
1617
1638
|
if (!this.model) {
|
|
1618
1639
|
return null;
|
|
1619
1640
|
}
|
|
@@ -1662,7 +1683,7 @@ class SurveyResultsByRow extends CreatorModelElement {
|
|
|
1662
1683
|
getStateElement() {
|
|
1663
1684
|
return this.row;
|
|
1664
1685
|
}
|
|
1665
|
-
|
|
1686
|
+
renderElement() {
|
|
1666
1687
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, attachKey2click(/* @__PURE__ */ React.createElement("tr", { onClick: () => this.row.toggle() }, /* @__PURE__ */ React.createElement(
|
|
1667
1688
|
"td",
|
|
1668
1689
|
{
|
|
@@ -1712,7 +1733,7 @@ class SurveyCreatorToolboxTool extends CreatorModelElement {
|
|
|
1712
1733
|
getStateElement() {
|
|
1713
1734
|
return this.item;
|
|
1714
1735
|
}
|
|
1715
|
-
|
|
1736
|
+
renderElement() {
|
|
1716
1737
|
const item = this.item;
|
|
1717
1738
|
const itemComponent = ReactElementFactory.Instance.createElement(
|
|
1718
1739
|
this.model.itemComponent,
|
|
@@ -1778,7 +1799,7 @@ class SurveyCreatorToolboxItem extends CreatorModelElement {
|
|
|
1778
1799
|
getStateElement() {
|
|
1779
1800
|
return this.model;
|
|
1780
1801
|
}
|
|
1781
|
-
|
|
1802
|
+
renderElement() {
|
|
1782
1803
|
const banner = this.props.isCompact ? /* @__PURE__ */ React.createElement(
|
|
1783
1804
|
"span",
|
|
1784
1805
|
{
|
|
@@ -1842,7 +1863,7 @@ class SurveyCreatorToolboxItemGroup extends CreatorModelElement {
|
|
|
1842
1863
|
getStateElement() {
|
|
1843
1864
|
return this.item;
|
|
1844
1865
|
}
|
|
1845
|
-
|
|
1866
|
+
renderElement() {
|
|
1846
1867
|
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
1868
|
"div",
|
|
1848
1869
|
{
|
|
@@ -1872,7 +1893,7 @@ class SurveyCreatorToolboxCategory extends SurveyElementBase {
|
|
|
1872
1893
|
getStateElement() {
|
|
1873
1894
|
return this.category;
|
|
1874
1895
|
}
|
|
1875
|
-
|
|
1896
|
+
renderElement() {
|
|
1876
1897
|
const header = this.renderCategoryHeader();
|
|
1877
1898
|
const items = this.renderCategoryContent();
|
|
1878
1899
|
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,7 +1939,7 @@ class ToolboxList extends SurveyElementBase {
|
|
|
1918
1939
|
getStateElement() {
|
|
1919
1940
|
return this.model;
|
|
1920
1941
|
}
|
|
1921
|
-
|
|
1942
|
+
renderElement() {
|
|
1922
1943
|
if (!this.model || !this.model.renderElements) return null;
|
|
1923
1944
|
const items = this.renderItems();
|
|
1924
1945
|
return /* @__PURE__ */ React.createElement("div", { className: this.model.cssClasses.root }, items);
|
|
@@ -1943,9 +1964,6 @@ class SearchComponent extends SurveyElementBase {
|
|
|
1943
1964
|
}
|
|
1944
1965
|
constructor(props) {
|
|
1945
1966
|
super(props);
|
|
1946
|
-
this.state = {
|
|
1947
|
-
filterString: this.model.filterString || ""
|
|
1948
|
-
};
|
|
1949
1967
|
}
|
|
1950
1968
|
renderElement() {
|
|
1951
1969
|
if (!this.model.isVisible) return null;
|
|
@@ -1964,7 +1982,7 @@ class SearchComponent extends SurveyElementBase {
|
|
|
1964
1982
|
className: "svc-search__input",
|
|
1965
1983
|
"aria-label": this.model.filterStringPlaceholder,
|
|
1966
1984
|
placeholder: this.model.filterStringPlaceholder,
|
|
1967
|
-
value: this.
|
|
1985
|
+
value: this.model.filterString || "",
|
|
1968
1986
|
onChange,
|
|
1969
1987
|
tabIndex: this.model.getTabIndex()
|
|
1970
1988
|
}
|
|
@@ -2028,7 +2046,7 @@ class AdaptiveToolbox extends SurveyElementBase {
|
|
|
2028
2046
|
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
2047
|
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
2048
|
}
|
|
2031
|
-
|
|
2049
|
+
renderElement() {
|
|
2032
2050
|
const search = this.toolbox.showSearch ? this.renderSearch() : null;
|
|
2033
2051
|
const placeholder = this.toolbox.showPlaceholder ? /* @__PURE__ */ React.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
|
|
2034
2052
|
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())));
|
|
@@ -2039,43 +2057,6 @@ ReactElementFactory.Instance.registerElement("svc-toolbox", (props) => {
|
|
|
2039
2057
|
});
|
|
2040
2058
|
|
|
2041
2059
|
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
2060
|
get survey() {
|
|
2080
2061
|
return this.props.survey;
|
|
2081
2062
|
}
|
|
@@ -2416,7 +2397,7 @@ class SurveyLocStringEditor extends CreatorModelElement {
|
|
|
2416
2397
|
get className() {
|
|
2417
2398
|
return this.baseModel.className(this.locString.renderedHtml);
|
|
2418
2399
|
}
|
|
2419
|
-
|
|
2400
|
+
renderElement() {
|
|
2420
2401
|
if (!this.locString) {
|
|
2421
2402
|
return null;
|
|
2422
2403
|
}
|
|
@@ -2643,16 +2624,16 @@ class TabDesignerComponent extends SurveyElementBase {
|
|
|
2643
2624
|
this.denyUpdate = () => {
|
|
2644
2625
|
this.denyComponentUpdate();
|
|
2645
2626
|
};
|
|
2646
|
-
this.
|
|
2627
|
+
this.allowUpdateHandler = () => {
|
|
2647
2628
|
this.allowComponentUpdate();
|
|
2648
2629
|
};
|
|
2649
2630
|
this.addDragDropEvents = () => {
|
|
2650
2631
|
this.creator.onDragStart.add(this.denyUpdate);
|
|
2651
|
-
this.creator.onDragClear.add(this.
|
|
2632
|
+
this.creator.onDragClear.add(this.allowUpdateHandler);
|
|
2652
2633
|
};
|
|
2653
2634
|
this.clearDragDropEvents = () => {
|
|
2654
2635
|
this.creator.onDragStart.remove(this.denyUpdate);
|
|
2655
|
-
this.creator.onDragClear.remove(this.
|
|
2636
|
+
this.creator.onDragClear.remove(this.allowUpdateHandler);
|
|
2656
2637
|
};
|
|
2657
2638
|
}
|
|
2658
2639
|
get model() {
|
|
@@ -2668,7 +2649,6 @@ class TabDesignerComponent extends SurveyElementBase {
|
|
|
2668
2649
|
componentWillUnmount() {
|
|
2669
2650
|
super.componentWillUnmount();
|
|
2670
2651
|
this.clearDragDropEvents();
|
|
2671
|
-
super.componentWillUnmount();
|
|
2672
2652
|
}
|
|
2673
2653
|
getStateElements() {
|
|
2674
2654
|
return [this.model, this.model.survey, this.model.pagesController];
|
|
@@ -2837,6 +2817,7 @@ class TabJsonEditorAceComponent extends SurveyElementBase {
|
|
|
2837
2817
|
return this.props.data;
|
|
2838
2818
|
}
|
|
2839
2819
|
componentDidMount() {
|
|
2820
|
+
super.componentDidMount();
|
|
2840
2821
|
this.model.init(ace.edit(this.aceEditorrRef.current));
|
|
2841
2822
|
}
|
|
2842
2823
|
renderElement() {
|
|
@@ -2857,6 +2838,39 @@ ReactElementFactory.Instance.registerElement(
|
|
|
2857
2838
|
}
|
|
2858
2839
|
);
|
|
2859
2840
|
|
|
2841
|
+
class TabJsonEditorMonacoComponent extends SurveyElementBase {
|
|
2842
|
+
constructor(props) {
|
|
2843
|
+
super(props);
|
|
2844
|
+
this.monacoEditorRef = React.createRef();
|
|
2845
|
+
}
|
|
2846
|
+
getStateElement() {
|
|
2847
|
+
return this.model;
|
|
2848
|
+
}
|
|
2849
|
+
get model() {
|
|
2850
|
+
return this.props.data;
|
|
2851
|
+
}
|
|
2852
|
+
componentDidMount() {
|
|
2853
|
+
super.componentDidMount();
|
|
2854
|
+
this.model.init(this.monacoEditorRef.current);
|
|
2855
|
+
}
|
|
2856
|
+
renderElement() {
|
|
2857
|
+
const errors = /* @__PURE__ */ React.createElement(TabJsonEditorErrorsComponent, { data: this.model });
|
|
2858
|
+
return /* @__PURE__ */ React.createElement("div", { className: "svc-creator-tab__content" }, /* @__PURE__ */ React.createElement("div", { className: "svc-json-editor-tab__content" }, /* @__PURE__ */ React.createElement(
|
|
2859
|
+
"div",
|
|
2860
|
+
{
|
|
2861
|
+
className: "svc-json-editor-tab__monaco-editor",
|
|
2862
|
+
ref: this.monacoEditorRef
|
|
2863
|
+
}
|
|
2864
|
+
), errors));
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
ReactElementFactory.Instance.registerElement(
|
|
2868
|
+
"svc-tab-json-editor-monaco",
|
|
2869
|
+
(props) => {
|
|
2870
|
+
return React.createElement(TabJsonEditorMonacoComponent, props);
|
|
2871
|
+
}
|
|
2872
|
+
);
|
|
2873
|
+
|
|
2860
2874
|
class TabLogicComponent extends SurveyElementBase {
|
|
2861
2875
|
get model() {
|
|
2862
2876
|
return this.props.data;
|
|
@@ -3306,7 +3320,7 @@ ReactElementFactory.Instance.registerElement("svc-floating-panel", (props) => {
|
|
|
3306
3320
|
});
|
|
3307
3321
|
|
|
3308
3322
|
let ItemTemplateComponent$1 = class ItemTemplateComponent extends SurveyElementBase {
|
|
3309
|
-
|
|
3323
|
+
renderElement() {
|
|
3310
3324
|
const item = this.props.item;
|
|
3311
3325
|
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
3326
|
}
|
|
@@ -3480,7 +3494,7 @@ class Swatch extends React.Component {
|
|
|
3480
3494
|
}
|
|
3481
3495
|
|
|
3482
3496
|
class ItemTemplateComponent extends SurveyElementBase {
|
|
3483
|
-
|
|
3497
|
+
renderElement() {
|
|
3484
3498
|
const item = this.props.item;
|
|
3485
3499
|
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
3500
|
}
|
|
@@ -3656,8 +3670,8 @@ ReactElementFactory.Instance.registerElement("sv-fileedit-button", (props) => {
|
|
|
3656
3670
|
});
|
|
3657
3671
|
|
|
3658
3672
|
let Version;
|
|
3659
|
-
Version = `${"3.2.
|
|
3660
|
-
checkLibraryVersion(`${"3.2.
|
|
3673
|
+
Version = `${"3.2.5"}`;
|
|
3674
|
+
checkLibraryVersion(`${"3.2.5"}`, "survey-creator-react");
|
|
3661
3675
|
|
|
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 };
|
|
3676
|
+
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
3677
|
//# sourceMappingURL=survey-creator-react.mjs.map
|