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.
- package/fesm/survey-creator-react.mjs +103 -87
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +104 -91
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "Embeddable SurveyJS drag-and-drop form builder for JSON-based forms in React. Create dynamic surveys, polls, quizzes, and other forms, configure conditional logic and validation, and customize the editor UI.",
|
|
5
5
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
6
6
|
"homepage": "https://surveyjs.io/",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"ace-builds": "^1.4.12",
|
|
68
68
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
69
69
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
70
|
-
"survey-core": "3.2.
|
|
71
|
-
"survey-react-ui": "3.2.
|
|
72
|
-
"survey-creator-core": "3.2.
|
|
70
|
+
"survey-core": "3.2.6",
|
|
71
|
+
"survey-react-ui": "3.2.6",
|
|
72
|
+
"survey-creator-core": "3.2.6"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"ace-builds": {
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v3.2.
|
|
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
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
getStateElement() {
|
|
127
127
|
return this.item;
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
renderElement() {
|
|
130
130
|
const item = this.item;
|
|
131
131
|
return (surveyReactUi.attachKey2click(React__namespace.createElement("div", { role: "tab", id: "tab-" + item.id, "aria-selected": item.active, "aria-controls": "scrollableDiv-" + item.id, className: item.getRootCss(), "data-sv-tooltip": item.hasIcon ? item.tooltip || item.title : undefined, onClick: () => item.doAction() },
|
|
132
132
|
item.hasTitle ? React__namespace.createElement("span", { className: item.getTitleCss() }, item.title) : null,
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
this.model.unsubscribeElementChanges();
|
|
356
356
|
super.componentWillUnmount();
|
|
357
357
|
}
|
|
358
|
-
|
|
358
|
+
renderElement() {
|
|
359
359
|
return (React__namespace.createElement("div", { key: "svc-row-" + this.props.row.id, className: this.model.cssClasses },
|
|
360
360
|
React__namespace.createElement("div", { className: "svc-row__drop-indicator svc-row__drop-indicator--top" }),
|
|
361
361
|
React__namespace.createElement("div", { className: "svc-row__drop-indicator svc-row__drop-indicator--bottom" }),
|
|
@@ -586,8 +586,9 @@
|
|
|
586
586
|
React__namespace.createElement("span", null,
|
|
587
587
|
this.props.text,
|
|
588
588
|
" "),
|
|
589
|
-
|
|
590
|
-
React__namespace.createElement(
|
|
589
|
+
this.props.actionText ?
|
|
590
|
+
React__namespace.createElement("span", { className: "svc-carry-forward-panel__link" },
|
|
591
|
+
React__namespace.createElement(ActionButton, { click: () => this.props.onClick(), text: this.props.actionText })) : null)));
|
|
591
592
|
}
|
|
592
593
|
}
|
|
593
594
|
surveyReactUi.ReactElementFactory.Instance.registerElement("svc-question-banner", (props) => {
|
|
@@ -758,7 +759,7 @@
|
|
|
758
759
|
getUpdatedModelProps() {
|
|
759
760
|
return ["question", "componentData"];
|
|
760
761
|
}
|
|
761
|
-
|
|
762
|
+
renderElement() {
|
|
762
763
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
763
764
|
React__namespace.createElement("div", { "data-sv-drop-target-survey-element": this.model.element.name, className: "svc-question__adorner" },
|
|
764
765
|
React__namespace.createElement("div", { className: " svc-question__content--in-popup svc-question__content" }, this.props.element))));
|
|
@@ -778,7 +779,7 @@
|
|
|
778
779
|
getStateElement() {
|
|
779
780
|
return this.model;
|
|
780
781
|
}
|
|
781
|
-
|
|
782
|
+
renderElement() {
|
|
782
783
|
const question = this.props.question;
|
|
783
784
|
const textStyle = this.props.question.textStyle;
|
|
784
785
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
@@ -804,11 +805,18 @@
|
|
|
804
805
|
// panes. Chrome-free: no designer adorner, no itemvalue wrappers - the choice texts render
|
|
805
806
|
// through the survey's string renderer (editable in the target pane, plain in the source one).
|
|
806
807
|
class TranslationDropdownQuestionComponent extends CreatorModelElement {
|
|
808
|
+
get model() {
|
|
809
|
+
return this.modelValue;
|
|
810
|
+
}
|
|
807
811
|
createModel(props) {
|
|
808
|
-
|
|
809
|
-
|
|
812
|
+
const { question } = props;
|
|
813
|
+
const translation = props.componentData ? props.componentData.translation : undefined;
|
|
814
|
+
if (!this.modelValue) {
|
|
815
|
+
this.modelValue = new surveyCreatorCore.TranslationDropdownViewModel(question, translation);
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
this.modelValue.attachToUI(question, translation);
|
|
810
819
|
}
|
|
811
|
-
this.model = new surveyCreatorCore.TranslationDropdownViewModel(props.question, props.componentData ? props.componentData.translation : undefined);
|
|
812
820
|
}
|
|
813
821
|
getUpdatedModelProps() {
|
|
814
822
|
return ["question", "componentData"];
|
|
@@ -816,9 +824,14 @@
|
|
|
816
824
|
getStateElement() {
|
|
817
825
|
return this.model;
|
|
818
826
|
}
|
|
827
|
+
componentDidMount() {
|
|
828
|
+
super.componentDidMount();
|
|
829
|
+
this.createModel(this.props);
|
|
830
|
+
}
|
|
819
831
|
componentWillUnmount() {
|
|
832
|
+
var _a;
|
|
820
833
|
super.componentWillUnmount();
|
|
821
|
-
this.model.
|
|
834
|
+
(_a = this.model) === null || _a === void 0 ? void 0 : _a.detachFromUI();
|
|
822
835
|
}
|
|
823
836
|
renderElement() {
|
|
824
837
|
const question = this.props.question;
|
|
@@ -898,7 +911,7 @@
|
|
|
898
911
|
renderElement() {
|
|
899
912
|
if (!this.props.page)
|
|
900
913
|
return null;
|
|
901
|
-
return (surveyReactUi.attachKey2click(React__namespace.createElement("div", { ref: this.rootRef, id: this.props.page.
|
|
914
|
+
return (surveyReactUi.attachKey2click(React__namespace.createElement("div", { ref: this.rootRef, id: this.props.page.renderedId, "data-sv-drop-target-survey-page": this.model.dropTargetName, className: "svc-page__content " + this.model.css, role: this.model.ariaRole, "aria-label": this.model.ariaLabel, onClick: (e) => {
|
|
902
915
|
return this.model.select(this.model, new ReactMouseEvent(e));
|
|
903
916
|
}, onDoubleClick: e => this.model.dblclick(e.nativeEvent), onMouseLeave: (e) => this.model.hover(e.nativeEvent, e.currentTarget), onMouseOver: (e) => this.model.hover(e.nativeEvent, e.currentTarget) },
|
|
904
917
|
React__namespace.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--top" }),
|
|
@@ -906,7 +919,7 @@
|
|
|
906
919
|
this.renderContent(),
|
|
907
920
|
this.renderPlaceholder(),
|
|
908
921
|
this.renderHeader(),
|
|
909
|
-
this.renderFooter())));
|
|
922
|
+
this.renderFooter()), undefined, { disableTabStop: true }));
|
|
910
923
|
}
|
|
911
924
|
renderPlaceholder() {
|
|
912
925
|
if (!this.model.showPlaceholder)
|
|
@@ -961,12 +974,14 @@
|
|
|
961
974
|
return React__namespace.createElement("div", { className: this.item.cssClasses.itemTypeSelector }, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item-dropdown", { item: this.model.questionTypeSelectorModel }));
|
|
962
975
|
}
|
|
963
976
|
renderElement() {
|
|
964
|
-
return React__namespace.createElement(React__namespace.Fragment, null,
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
977
|
+
return React__namespace.createElement(React__namespace.Fragment, null,
|
|
978
|
+
React__namespace.createElement("div", { className: this.item.getActionBarItemCss(), onClick: (e) => {
|
|
979
|
+
e.stopPropagation();
|
|
980
|
+
this.model.addNewQuestion(this.model, new ReactMouseEvent(e));
|
|
981
|
+
}, onMouseOver: (e) => this.model.hoverStopper && this.model.hoverStopper(e.nativeEvent, e.currentTarget) },
|
|
982
|
+
React__namespace.createElement("button", { type: "button", className: "svc-surface-btn__title-button" },
|
|
983
|
+
React__namespace.createElement("span", { className: this.item.getActionBarItemTitleCss() }, this.model.addNewQuestionText)),
|
|
984
|
+
this.renderTypeSelector()));
|
|
970
985
|
}
|
|
971
986
|
}
|
|
972
987
|
surveyReactUi.ReactElementFactory.Instance.registerElement("svc-add-new-question-btn", (props) => {
|
|
@@ -1002,6 +1017,9 @@
|
|
|
1002
1017
|
class LogoImageComponent extends CreatorModelElement {
|
|
1003
1018
|
constructor(props) {
|
|
1004
1019
|
super(props);
|
|
1020
|
+
this.reactOnStrChanged = () => {
|
|
1021
|
+
this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
|
|
1022
|
+
};
|
|
1005
1023
|
this.rootRef = React__namespace.createRef();
|
|
1006
1024
|
}
|
|
1007
1025
|
createModel(props) {
|
|
@@ -1017,8 +1035,17 @@
|
|
|
1017
1035
|
getStateElement() {
|
|
1018
1036
|
return this.model;
|
|
1019
1037
|
}
|
|
1038
|
+
componentDidUpdate(prevProps, prevState) {
|
|
1039
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
1040
|
+
this.model.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
1041
|
+
}
|
|
1042
|
+
componentWillUnmount() {
|
|
1043
|
+
super.componentWillUnmount();
|
|
1044
|
+
this.model.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
|
|
1045
|
+
}
|
|
1020
1046
|
componentDidMount() {
|
|
1021
1047
|
super.componentDidMount();
|
|
1048
|
+
this.model.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
1022
1049
|
this.model.root = this.rootRef.current;
|
|
1023
1050
|
}
|
|
1024
1051
|
renderButtons() {
|
|
@@ -1030,7 +1057,7 @@
|
|
|
1030
1057
|
React__namespace.createElement(surveyReactUi.LogoImage, { data: this.props.data.survey }));
|
|
1031
1058
|
}
|
|
1032
1059
|
renderPlaceHolder() {
|
|
1033
|
-
return this.model.allowEdit && !this.model.isUploading ? surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: "svc-logo-image-placeholder", onClick: () => this.model.chooseFile(this.model) },
|
|
1060
|
+
return this.model.allowEdit && !this.model.isUploading ? surveyReactUi.attachKey2click(React__namespace.createElement("div", { className: "svc-logo-image-placeholder", role: "button", "aria-label": this.model.chooseLogoAriaLabel, onClick: () => this.model.chooseFile(this.model) },
|
|
1034
1061
|
React__namespace.createElement("svg", null,
|
|
1035
1062
|
React__namespace.createElement("use", { xlinkHref: "#icon-image-48x48" })))) : null;
|
|
1036
1063
|
}
|
|
@@ -1041,7 +1068,7 @@
|
|
|
1041
1068
|
return React__namespace.createElement("div", { className: "svc-logo-image__loading" },
|
|
1042
1069
|
React__namespace.createElement(surveyReactUi.LoadingIndicatorComponent, null));
|
|
1043
1070
|
}
|
|
1044
|
-
|
|
1071
|
+
renderElement() {
|
|
1045
1072
|
let content = null;
|
|
1046
1073
|
if (this.model.survey.locLogo.renderedHtml && !this.model.isUploading) {
|
|
1047
1074
|
content = this.renderImage();
|
|
@@ -1107,10 +1134,11 @@
|
|
|
1107
1134
|
this.embeddedSurvey.rootElement = this.rootRef.current;
|
|
1108
1135
|
}
|
|
1109
1136
|
}
|
|
1110
|
-
|
|
1137
|
+
canRender() {
|
|
1138
|
+
return !!this.embeddedSurvey;
|
|
1139
|
+
}
|
|
1140
|
+
renderElement() {
|
|
1111
1141
|
const survey = this.embeddedSurvey;
|
|
1112
|
-
if (!survey)
|
|
1113
|
-
return null;
|
|
1114
1142
|
return React__namespace.createElement("div", { style: { display: "contents" }, ref: this.rootRef },
|
|
1115
1143
|
React__namespace.createElement(surveyReactUi.SurveyPage, { survey: survey, page: survey.currentPage, css: survey.css, creator: this.creator }));
|
|
1116
1144
|
}
|
|
@@ -1198,7 +1226,7 @@
|
|
|
1198
1226
|
item: action,
|
|
1199
1227
|
});
|
|
1200
1228
|
}
|
|
1201
|
-
|
|
1229
|
+
renderElement() {
|
|
1202
1230
|
this.model.item = this.props.item;
|
|
1203
1231
|
const button = this.model.allowAdd ? (this.renderButton(this.model.addAction)) : (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1204
1232
|
" ",
|
|
@@ -1293,7 +1321,7 @@
|
|
|
1293
1321
|
placeholder,
|
|
1294
1322
|
controls);
|
|
1295
1323
|
}
|
|
1296
|
-
|
|
1324
|
+
renderElement() {
|
|
1297
1325
|
this.model.item = this.props.item;
|
|
1298
1326
|
const isNew = !this.props.question.isItemInList(this.props.item);
|
|
1299
1327
|
this.model.isNew = isNew;
|
|
@@ -1366,7 +1394,7 @@
|
|
|
1366
1394
|
getStateElement() {
|
|
1367
1395
|
return this.model;
|
|
1368
1396
|
}
|
|
1369
|
-
|
|
1397
|
+
renderElement() {
|
|
1370
1398
|
let controls = null;
|
|
1371
1399
|
if (!!this.model.isSupportCellEditor) {
|
|
1372
1400
|
controls = React__namespace.createElement("div", { className: "svc-matrix-cell__question-controls" }, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item", {
|
|
@@ -1395,7 +1423,7 @@
|
|
|
1395
1423
|
getStateElement() {
|
|
1396
1424
|
return this.model;
|
|
1397
1425
|
}
|
|
1398
|
-
|
|
1426
|
+
renderElement() {
|
|
1399
1427
|
if (!this.model) {
|
|
1400
1428
|
return null;
|
|
1401
1429
|
}
|
|
@@ -1443,7 +1471,7 @@
|
|
|
1443
1471
|
getStateElement() {
|
|
1444
1472
|
return this.row;
|
|
1445
1473
|
}
|
|
1446
|
-
|
|
1474
|
+
renderElement() {
|
|
1447
1475
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1448
1476
|
surveyReactUi.attachKey2click(React__namespace.createElement("tr", { onClick: () => this.row.toggle() },
|
|
1449
1477
|
React__namespace.createElement("td", { key: 1, style: { paddingLeft: this.row.textMargin }, className: "svd-dark-border-color" },
|
|
@@ -1478,7 +1506,7 @@
|
|
|
1478
1506
|
getStateElement() {
|
|
1479
1507
|
return this.item;
|
|
1480
1508
|
}
|
|
1481
|
-
|
|
1509
|
+
renderElement() {
|
|
1482
1510
|
const item = this.item;
|
|
1483
1511
|
const itemComponent = surveyReactUi.ReactElementFactory.Instance.createElement(this.model.itemComponent, {
|
|
1484
1512
|
item: item,
|
|
@@ -1487,7 +1515,7 @@
|
|
|
1487
1515
|
model: this.model,
|
|
1488
1516
|
isCompact: this.isCompact
|
|
1489
1517
|
});
|
|
1490
|
-
return (React__namespace.createElement("div", { className: item.css, key: item.id, ref: this.rootRef },
|
|
1518
|
+
return (React__namespace.createElement("div", { className: item.css, key: item.id, ref: this.rootRef, role: this.model.ariaRole },
|
|
1491
1519
|
(item.needSeparator && !this.creator.toolbox.showCategoryTitles) ? (React__namespace.createElement("div", { className: "svc-toolbox__category-separator" })) : null,
|
|
1492
1520
|
React__namespace.createElement("div", { className: "svc-toolbox__tool-content", onPointerDown: (event) => {
|
|
1493
1521
|
event.persist();
|
|
@@ -1537,7 +1565,7 @@
|
|
|
1537
1565
|
getStateElement() {
|
|
1538
1566
|
return this.model;
|
|
1539
1567
|
}
|
|
1540
|
-
|
|
1568
|
+
renderElement() {
|
|
1541
1569
|
const banner = (this.props.isCompact ?
|
|
1542
1570
|
React__namespace.createElement("span", { className: "svc-toolbox__item-banner", onClick: (event) => {
|
|
1543
1571
|
event.persist();
|
|
@@ -1590,7 +1618,7 @@
|
|
|
1590
1618
|
getStateElement() {
|
|
1591
1619
|
return this.item;
|
|
1592
1620
|
}
|
|
1593
|
-
|
|
1621
|
+
renderElement() {
|
|
1594
1622
|
return React__namespace.createElement(React__namespace.Fragment, null,
|
|
1595
1623
|
React__namespace.createElement(SurveyCreatorToolboxItem, { item: this.item, creator: this.creator, model: this.model, parentModel: this.parentModel, isCompact: this.isCompact }),
|
|
1596
1624
|
React__namespace.createElement("div", { className: "svc-toolbox__item-submenu-button", onMouseOver: (event) => this.model.onMouseOver(this.item, event), onMouseLeave: (event) => this.model.onMouseLeave(this.item, event) },
|
|
@@ -1617,7 +1645,7 @@
|
|
|
1617
1645
|
getStateElement() {
|
|
1618
1646
|
return this.category;
|
|
1619
1647
|
}
|
|
1620
|
-
|
|
1648
|
+
renderElement() {
|
|
1621
1649
|
const header = this.renderCategoryHeader();
|
|
1622
1650
|
const items = this.renderCategoryContent();
|
|
1623
1651
|
return (React__namespace.createElement("div", { className: this.class, key: this.category.name },
|
|
@@ -1665,11 +1693,11 @@
|
|
|
1665
1693
|
getStateElement() {
|
|
1666
1694
|
return this.model;
|
|
1667
1695
|
}
|
|
1668
|
-
|
|
1696
|
+
renderElement() {
|
|
1669
1697
|
if (!this.model || !this.model.renderElements)
|
|
1670
1698
|
return null;
|
|
1671
1699
|
const items = this.renderItems();
|
|
1672
|
-
return (React__namespace.createElement("div", { className: this.model.cssClasses.root }, items));
|
|
1700
|
+
return (React__namespace.createElement("div", { className: this.model.cssClasses.root, role: "list" }, items));
|
|
1673
1701
|
}
|
|
1674
1702
|
renderItems() {
|
|
1675
1703
|
const items = this.model.renderedActions;
|
|
@@ -1689,9 +1717,6 @@
|
|
|
1689
1717
|
}
|
|
1690
1718
|
constructor(props) {
|
|
1691
1719
|
super(props);
|
|
1692
|
-
this.state = {
|
|
1693
|
-
filterString: this.model.filterString || ""
|
|
1694
|
-
};
|
|
1695
1720
|
}
|
|
1696
1721
|
renderElement() {
|
|
1697
1722
|
if (!this.model.isVisible)
|
|
@@ -1708,7 +1733,7 @@
|
|
|
1708
1733
|
return (React__namespace.createElement("div", { className: "svc-search" },
|
|
1709
1734
|
React__namespace.createElement("div", { className: "svc-search__search-icon" },
|
|
1710
1735
|
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: "icon-search", size: "auto" })),
|
|
1711
|
-
React__namespace.createElement("input", { type: "text", className: "svc-search__input", "aria-label": this.model.filterStringPlaceholder, placeholder: this.model.filterStringPlaceholder, value: this.
|
|
1736
|
+
React__namespace.createElement("input", { type: "text", className: "svc-search__input", "aria-label": this.model.filterStringPlaceholder, placeholder: this.model.filterStringPlaceholder, value: this.model.filterString || "", onChange: onChange, tabIndex: this.model.getTabIndex() }),
|
|
1712
1737
|
React__namespace.createElement("div", { className: "svc-search__toolbar" },
|
|
1713
1738
|
React__namespace.createElement("div", { className: "svc-search__toolbar-counter" }, this.model.matchCounterText),
|
|
1714
1739
|
React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.model.searchActionBar }))));
|
|
@@ -1774,7 +1799,7 @@
|
|
|
1774
1799
|
React__namespace.createElement(SearchComponent, { model: this.toolbox.searchManager }),
|
|
1775
1800
|
React__namespace.createElement("div", { className: "svc-toolbox__category-separator svc-toolbox__category-separator--search" })));
|
|
1776
1801
|
}
|
|
1777
|
-
|
|
1802
|
+
renderElement() {
|
|
1778
1803
|
const search = this.toolbox.showSearch ? this.renderSearch() : null;
|
|
1779
1804
|
const placeholder = this.toolbox.showPlaceholder ? React__namespace.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
|
|
1780
1805
|
return (React__namespace.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames, style: this.toolbox.getRootStyle() },
|
|
@@ -1782,7 +1807,7 @@
|
|
|
1782
1807
|
search,
|
|
1783
1808
|
placeholder,
|
|
1784
1809
|
React__namespace.createElement(surveyReactUi.Scroll, null, (this.toolbox.showInSingleCategory) ?
|
|
1785
|
-
(React__namespace.createElement("div", { className: "svc-toolbox__category" }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
|
|
1810
|
+
(React__namespace.createElement("div", { className: "svc-toolbox__category", role: "list", "aria-label": this.toolbox.toolboxAriaLabel }, this.renderItems(this.toolbox.renderedActions, this.toolbox.isCompactRendered)))
|
|
1786
1811
|
: this.renderCategories()))));
|
|
1787
1812
|
}
|
|
1788
1813
|
}
|
|
@@ -1791,46 +1816,6 @@
|
|
|
1791
1816
|
});
|
|
1792
1817
|
|
|
1793
1818
|
class SurveyNavigation extends surveyReactUi.SurveyElementBase {
|
|
1794
|
-
constructor() {
|
|
1795
|
-
super(...arguments);
|
|
1796
|
-
this.onPropChangedHandler = (sender, options) => {
|
|
1797
|
-
if (this.isRendering)
|
|
1798
|
-
return;
|
|
1799
|
-
const reactiveProps = [
|
|
1800
|
-
"showProgressBar",
|
|
1801
|
-
"progressBarType",
|
|
1802
|
-
"currentPageValue"
|
|
1803
|
-
];
|
|
1804
|
-
if (reactiveProps.indexOf(options.name) < 0)
|
|
1805
|
-
return;
|
|
1806
|
-
var val = {};
|
|
1807
|
-
for (var i = 0; i < reactiveProps.length; i++) {
|
|
1808
|
-
var propName = reactiveProps[i];
|
|
1809
|
-
val[propName] = this.survey[propName];
|
|
1810
|
-
}
|
|
1811
|
-
this.setState(val);
|
|
1812
|
-
};
|
|
1813
|
-
}
|
|
1814
|
-
componentDidMount() {
|
|
1815
|
-
super.componentDidMount();
|
|
1816
|
-
this.setHandler();
|
|
1817
|
-
}
|
|
1818
|
-
componentDidUpdate(prevProps, prevState) {
|
|
1819
|
-
super.componentDidUpdate(prevProps, prevState);
|
|
1820
|
-
this.setHandler();
|
|
1821
|
-
}
|
|
1822
|
-
setHandler() {
|
|
1823
|
-
if (!this.survey ||
|
|
1824
|
-
this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler))
|
|
1825
|
-
return;
|
|
1826
|
-
this.survey.onPropertyChanged.add(this.onPropChangedHandler);
|
|
1827
|
-
}
|
|
1828
|
-
componentWillUnmount() {
|
|
1829
|
-
super.componentWillUnmount();
|
|
1830
|
-
if (this.survey) {
|
|
1831
|
-
this.survey.onPropertyChanged.remove(this.onPropChangedHandler);
|
|
1832
|
-
}
|
|
1833
|
-
}
|
|
1834
1819
|
get survey() {
|
|
1835
1820
|
return this.props.survey;
|
|
1836
1821
|
}
|
|
@@ -2206,7 +2191,7 @@
|
|
|
2206
2191
|
get className() {
|
|
2207
2192
|
return this.baseModel.className(this.locString.renderedHtml);
|
|
2208
2193
|
}
|
|
2209
|
-
|
|
2194
|
+
renderElement() {
|
|
2210
2195
|
if (!this.locString) {
|
|
2211
2196
|
return null;
|
|
2212
2197
|
}
|
|
@@ -2357,16 +2342,16 @@
|
|
|
2357
2342
|
this.denyUpdate = () => {
|
|
2358
2343
|
this.denyComponentUpdate();
|
|
2359
2344
|
};
|
|
2360
|
-
this.
|
|
2345
|
+
this.allowUpdateHandler = () => {
|
|
2361
2346
|
this.allowComponentUpdate();
|
|
2362
2347
|
};
|
|
2363
2348
|
this.addDragDropEvents = () => {
|
|
2364
2349
|
this.creator.onDragStart.add(this.denyUpdate);
|
|
2365
|
-
this.creator.onDragClear.add(this.
|
|
2350
|
+
this.creator.onDragClear.add(this.allowUpdateHandler);
|
|
2366
2351
|
};
|
|
2367
2352
|
this.clearDragDropEvents = () => {
|
|
2368
2353
|
this.creator.onDragStart.remove(this.denyUpdate);
|
|
2369
|
-
this.creator.onDragClear.remove(this.
|
|
2354
|
+
this.creator.onDragClear.remove(this.allowUpdateHandler);
|
|
2370
2355
|
};
|
|
2371
2356
|
}
|
|
2372
2357
|
get model() {
|
|
@@ -2382,7 +2367,6 @@
|
|
|
2382
2367
|
componentWillUnmount() {
|
|
2383
2368
|
super.componentWillUnmount();
|
|
2384
2369
|
this.clearDragDropEvents();
|
|
2385
|
-
super.componentWillUnmount();
|
|
2386
2370
|
}
|
|
2387
2371
|
getStateElements() {
|
|
2388
2372
|
return [this.model, this.model.survey, this.model.pagesController];
|
|
@@ -2550,6 +2534,7 @@
|
|
|
2550
2534
|
return this.props.data;
|
|
2551
2535
|
}
|
|
2552
2536
|
componentDidMount() {
|
|
2537
|
+
super.componentDidMount();
|
|
2553
2538
|
this.model.init(ace.edit(this.aceEditorrRef.current));
|
|
2554
2539
|
}
|
|
2555
2540
|
renderElement() {
|
|
@@ -2564,6 +2549,33 @@
|
|
|
2564
2549
|
return React__namespace.createElement(TabJsonEditorAceComponent, props);
|
|
2565
2550
|
});
|
|
2566
2551
|
|
|
2552
|
+
class TabJsonEditorMonacoComponent extends surveyReactUi.SurveyElementBase {
|
|
2553
|
+
constructor(props) {
|
|
2554
|
+
super(props);
|
|
2555
|
+
this.monacoEditorRef = React__namespace.createRef();
|
|
2556
|
+
}
|
|
2557
|
+
getStateElement() {
|
|
2558
|
+
return this.model;
|
|
2559
|
+
}
|
|
2560
|
+
get model() {
|
|
2561
|
+
return this.props.data;
|
|
2562
|
+
}
|
|
2563
|
+
componentDidMount() {
|
|
2564
|
+
super.componentDidMount();
|
|
2565
|
+
this.model.init(this.monacoEditorRef.current);
|
|
2566
|
+
}
|
|
2567
|
+
renderElement() {
|
|
2568
|
+
const errors = React__namespace.createElement(TabJsonEditorErrorsComponent, { data: this.model });
|
|
2569
|
+
return (React__namespace.createElement("div", { className: "svc-creator-tab__content" },
|
|
2570
|
+
React__namespace.createElement("div", { className: "svc-json-editor-tab__content" },
|
|
2571
|
+
React__namespace.createElement("div", { className: "svc-json-editor-tab__monaco-editor", ref: this.monacoEditorRef }),
|
|
2572
|
+
errors)));
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
surveyReactUi.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-monaco", (props) => {
|
|
2576
|
+
return React__namespace.createElement(TabJsonEditorMonacoComponent, props);
|
|
2577
|
+
});
|
|
2578
|
+
|
|
2567
2579
|
class TabLogicComponent extends surveyReactUi.SurveyElementBase {
|
|
2568
2580
|
get model() {
|
|
2569
2581
|
return this.props.data;
|
|
@@ -3001,7 +3013,7 @@
|
|
|
3001
3013
|
});
|
|
3002
3014
|
|
|
3003
3015
|
let ItemTemplateComponent$1 = class ItemTemplateComponent extends surveyReactUi.SurveyElementBase {
|
|
3004
|
-
|
|
3016
|
+
renderElement() {
|
|
3005
3017
|
const item = this.props.item;
|
|
3006
3018
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3007
3019
|
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: item.iconName, size: item.iconSize, className: "svc-json-error__icon" }),
|
|
@@ -3120,7 +3132,7 @@
|
|
|
3120
3132
|
}
|
|
3121
3133
|
|
|
3122
3134
|
class ItemTemplateComponent extends surveyReactUi.SurveyElementBase {
|
|
3123
|
-
|
|
3135
|
+
renderElement() {
|
|
3124
3136
|
const item = this.props.item;
|
|
3125
3137
|
return (React__namespace.createElement("div", { className: "sd-color-swatch-item" },
|
|
3126
3138
|
React__namespace.createElement("div", { className: "sd-color-swatch-item__label" },
|
|
@@ -3221,8 +3233,8 @@
|
|
|
3221
3233
|
});
|
|
3222
3234
|
|
|
3223
3235
|
exports.Version = void 0;
|
|
3224
|
-
exports.Version = `${"3.2.
|
|
3225
|
-
surveyCore.checkLibraryVersion(`${"3.2.
|
|
3236
|
+
exports.Version = `${"3.2.6"}`;
|
|
3237
|
+
surveyCore.checkLibraryVersion(`${"3.2.6"}`, "survey-creator-react");
|
|
3226
3238
|
|
|
3227
3239
|
Object.defineProperty(exports, "PropertyGridEditorCollection", {
|
|
3228
3240
|
enumerable: true,
|
|
@@ -3319,6 +3331,7 @@
|
|
|
3319
3331
|
exports.TabDesignerComponent = TabDesignerComponent;
|
|
3320
3332
|
exports.TabJsonEditorAceComponent = TabJsonEditorAceComponent;
|
|
3321
3333
|
exports.TabJsonEditorErrorsComponent = TabJsonEditorErrorsComponent;
|
|
3334
|
+
exports.TabJsonEditorMonacoComponent = TabJsonEditorMonacoComponent;
|
|
3322
3335
|
exports.TabJsonEditorTextareaComponent = TabJsonEditorTextareaComponent;
|
|
3323
3336
|
exports.TabLogicComponent = TabLogicComponent;
|
|
3324
3337
|
exports.TabPreviewSurveyComponent = TabPreviewSurveyComponent;
|