survey-creator-react 1.11.14 → 1.12.1
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/index.html
CHANGED
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.js"></script>
|
|
14
14
|
|
|
15
15
|
<script src="./node_modules/survey-core/survey.core.js"></script>
|
|
16
|
+
<script src="./node_modules/survey-core/survey.i18n.min.js"></script>
|
|
17
|
+
<script src="./node_modules/survey-core/themes/index.js"></script>
|
|
16
18
|
<script src="./node_modules/survey-react-ui/survey-react-ui.js"></script>
|
|
17
19
|
<script src="./node_modules/survey-creator-core/survey-creator-core.js"></script>
|
|
18
|
-
<script src="./node_modules/survey-core/survey.i18n.min.js"></script>
|
|
19
20
|
|
|
20
21
|
<!--<script src="./build/survey-creator-react.js"></script>-->
|
|
21
22
|
<link rel="stylesheet" type="text/css" href="./node_modules/survey-core/defaultV2.css" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.1",
|
|
4
4
|
"description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"ace-builds": "^1.4.12",
|
|
30
30
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
31
31
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
32
|
-
"survey-core": "1.
|
|
33
|
-
"survey-react-ui": "1.
|
|
34
|
-
"survey-creator-core": "1.
|
|
32
|
+
"survey-core": "1.12.1",
|
|
33
|
+
"survey-react-ui": "1.12.1",
|
|
34
|
+
"survey-creator-core": "1.12.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"ace-builds": {
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v1.
|
|
2
|
+
* SurveyJS Creator React v1.12.1
|
|
3
3
|
* (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -208,11 +208,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
208
208
|
|
|
209
209
|
var ItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
210
210
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(ItemValueAdornerComponent, _super);
|
|
211
|
-
function ItemValueAdornerComponent() {
|
|
212
|
-
var _this = _super
|
|
211
|
+
function ItemValueAdornerComponent(props) {
|
|
212
|
+
var _this = _super.call(this, props) || this;
|
|
213
213
|
_this.onBlur = function (event) {
|
|
214
214
|
_this.model.onFocusOut(event.nativeEvent);
|
|
215
215
|
};
|
|
216
|
+
_this.rootRef = react__WEBPACK_IMPORTED_MODULE_2__.createRef();
|
|
216
217
|
return _this;
|
|
217
218
|
}
|
|
218
219
|
ItemValueAdornerComponent.prototype.createModel = function (props) {
|
|
@@ -224,6 +225,21 @@ var ItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
224
225
|
ItemValueAdornerComponent.prototype.getStateElement = function () {
|
|
225
226
|
return this.model;
|
|
226
227
|
};
|
|
228
|
+
ItemValueAdornerComponent.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
229
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
230
|
+
this.props.item.setRootElement(this.rootRef.current);
|
|
231
|
+
if (prevProps.item !== this.props.item && prevProps.item) {
|
|
232
|
+
prevProps.item.setRootElement(undefined);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
ItemValueAdornerComponent.prototype.componentDidMount = function () {
|
|
236
|
+
_super.prototype.componentDidMount.call(this);
|
|
237
|
+
this.props.item.setRootElement(this.rootRef.current);
|
|
238
|
+
};
|
|
239
|
+
ItemValueAdornerComponent.prototype.componentWillUnmount = function () {
|
|
240
|
+
_super.prototype.componentWillUnmount.call(this);
|
|
241
|
+
this.props.item.setRootElement(undefined);
|
|
242
|
+
};
|
|
227
243
|
ItemValueAdornerComponent.prototype.render = function () {
|
|
228
244
|
var _this = this;
|
|
229
245
|
// if (this.model.question.isDragged) {
|
|
@@ -241,7 +257,7 @@ var ItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
241
257
|
this.model.allowRemove ? (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-item-value-controls__button svc-item-value-controls__remove", "aria-label": this.model.tooltip, onClick: function () { return _this.model.remove(_this.model); } },
|
|
242
258
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: 16, iconName: "icon-remove_16x16", title: this.model.tooltip }))) : null));
|
|
243
259
|
var itemkey = this.props.element.key + (this.model.allowAdd ? "_new" : "");
|
|
244
|
-
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-item-value-wrapper" +
|
|
260
|
+
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, className: "svc-item-value-wrapper" +
|
|
245
261
|
(this.model.allowAdd ? " svc-item-value--new" : "") +
|
|
246
262
|
(this.model.isDragging ? " svc-item-value--dragging" : "") +
|
|
247
263
|
(this.model.isDragDropGhost ? " svc-item-value--ghost" : "") +
|
|
@@ -1277,7 +1293,7 @@ var SidebarComponent = /** @class */ (function (_super) {
|
|
|
1277
1293
|
};
|
|
1278
1294
|
SidebarComponent.prototype.renderElement = function () {
|
|
1279
1295
|
var _this = this;
|
|
1280
|
-
var style = { display: !this.model.
|
|
1296
|
+
var style = { display: !this.model.renderedIsVisible ? "none" : "" };
|
|
1281
1297
|
var className = "svc-side-bar" + (this.model.flyoutPanelMode ? " svc-flyout-side-bar" : "");
|
|
1282
1298
|
var items = this.model.tabs.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_1__.createElement(SidebarTab, { item: item, key: item.id }); });
|
|
1283
1299
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: className, style: { display: !this.model.hasVisibleTabs ? "none" : "" } },
|
|
@@ -1518,8 +1534,8 @@ var SurveyLocStringEditor = /** @class */ (function (_super) {
|
|
|
1518
1534
|
var counter = this.baseModel.showCharacterCounter ? (react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.CharacterCounterComponent, { counter: this.baseModel.characterCounter, remainingCharacterCounter: this.baseModel.getCharacterCounterClass })) : null;
|
|
1519
1535
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: this.className },
|
|
1520
1536
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-string-editor__content" },
|
|
1521
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-string-editor__border", onClick: this.edit },
|
|
1522
|
-
|
|
1537
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-string-editor__border svc-string-editor__border--hover", onClick: this.edit }),
|
|
1538
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-string-editor__border svc-string-editor__border--focus", onClick: this.edit }),
|
|
1523
1539
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-string-editor__input" },
|
|
1524
1540
|
control,
|
|
1525
1541
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-string-editor__controls", onClick: this.edit }),
|
|
@@ -1610,7 +1626,6 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
|
|
|
1610
1626
|
var creator = this.props.creator;
|
|
1611
1627
|
if (creator.isCreatorDisposed)
|
|
1612
1628
|
return null;
|
|
1613
|
-
var creatorClassName = "svc-creator" + (this.props.creator.isMobileView ? " svc-creator--mobile" : "") + (this.props.creator.isTouch ? " svc-creator--touch" : "");
|
|
1614
1629
|
var areaClassName = "svc-full-container svc-creator__area svc-flex-column" + (this.props.creator.haveCommercialLicense ? "" : " svc-creator__area--with-banner");
|
|
1615
1630
|
var contentWrapperClassName = "svc-creator__content-wrapper svc-flex-row" + (this.props.creator.isMobileView ? " svc-creator__content-wrapper--footer-toolbar" : "");
|
|
1616
1631
|
var fullContainerClassName = "svc-flex-row svc-full-container" + (" svc-creator__side-bar--" + this.creator.sidebarLocation);
|
|
@@ -1621,7 +1636,7 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
|
|
|
1621
1636
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: "svc-creator__non-commercial-text", dangerouslySetInnerHTML: htmlValue })));
|
|
1622
1637
|
}
|
|
1623
1638
|
//AM: width unrecognized by react
|
|
1624
|
-
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className:
|
|
1639
|
+
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.creator.getRootCss(), ref: this.rootNode, style: this.style },
|
|
1625
1640
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgBundleComponent, null),
|
|
1626
1641
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: areaClassName },
|
|
1627
1642
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: fullContainerClassName },
|
|
@@ -2299,7 +2314,7 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
|
|
|
2299
2314
|
var allowInteractions = this.model.element
|
|
2300
2315
|
.isInteractiveDesignElement;
|
|
2301
2316
|
var content = this.renderContent(allowInteractions);
|
|
2302
|
-
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, "data-sv-drop-target-survey-element": this.model.element.name || null, className: "svc-question__adorner " + this.model.rootCss(), onDoubleClick: function (e) { allowInteractions && _this.model.dblclick(e.nativeEvent); e.stopPropagation(); },
|
|
2317
|
+
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, "data-sv-drop-target-survey-element": this.model.element.name || null, className: "svc-question__adorner " + this.model.rootCss(), onDoubleClick: function (e) { allowInteractions && _this.model.dblclick(e.nativeEvent); e.stopPropagation(); }, onMouseLeave: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); }, onMouseOver: function (e) { return allowInteractions && _this.model.hover(e.nativeEvent, e.currentTarget); } }, content));
|
|
2303
2318
|
};
|
|
2304
2319
|
QuestionAdornerComponent.prototype.disableTabStop = function () {
|
|
2305
2320
|
return true;
|
|
@@ -2309,6 +2324,10 @@ var QuestionAdornerComponent = /** @class */ (function (_super) {
|
|
|
2309
2324
|
var content = this.renderElementContent();
|
|
2310
2325
|
//if (!allowInteractions) return <>{content}{this.renderFooter()}</>;
|
|
2311
2326
|
return (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_4__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: this.model.css(), onClick: function (e) { return _this.model.select(_this.model, new _events__WEBPACK_IMPORTED_MODULE_3__.ReactMouseEvent(e)); } },
|
|
2327
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--left" }),
|
|
2328
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--right" }),
|
|
2329
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--top" }),
|
|
2330
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-question__drop-indicator svc-question__drop-indicator--bottom" }),
|
|
2312
2331
|
allowInteractions ? this.renderHeader() : null,
|
|
2313
2332
|
content,
|
|
2314
2333
|
this.renderFooter()), undefined, { disableTabStop: this.disableTabStop() });
|
|
@@ -2829,7 +2848,10 @@ var RowWrapper = /** @class */ (function (_super) {
|
|
|
2829
2848
|
return this.model;
|
|
2830
2849
|
};
|
|
2831
2850
|
RowWrapper.prototype.render = function () {
|
|
2832
|
-
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { key: "svc-row-" + this.props.row.id, className: this.model.cssClasses },
|
|
2851
|
+
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { key: "svc-row-" + this.props.row.id, className: this.model.cssClasses },
|
|
2852
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-row__drop-indicator svc-row__drop-indicator--top" }),
|
|
2853
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-row__drop-indicator svc-row__drop-indicator--bottom" }),
|
|
2854
|
+
this.props.element));
|
|
2833
2855
|
};
|
|
2834
2856
|
return RowWrapper;
|
|
2835
2857
|
}(_ModelElement__WEBPACK_IMPORTED_MODULE_4__.CreatorModelElement));
|
|
@@ -4237,7 +4259,7 @@ var AdaptiveToolbox = /** @class */ (function (_super) {
|
|
|
4237
4259
|
var placeholder = this.toolbox.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__placeholder" }, this.toolbox.toolboxNoResultsFound) : null;
|
|
4238
4260
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: this.toolbox.classNames },
|
|
4239
4261
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { onBlur: function (e) { return _this.toolbox.focusOut(e); }, className: "svc-toolbox__panel" },
|
|
4240
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scroller", onScroll: function (event) { return _this.toolbox.onScroll(_this.toolbox, event); } },
|
|
4262
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__scroller sv-drag-target-skipped", onScroll: function (event) { return _this.toolbox.onScroll(_this.toolbox, event); } },
|
|
4241
4263
|
search,
|
|
4242
4264
|
placeholder,
|
|
4243
4265
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__container" }, (this.toolbox.showInSingleCategory) ?
|
|
@@ -4964,7 +4986,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4964
4986
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
4965
4987
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_57___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_57__);
|
|
4966
4988
|
var Version;
|
|
4967
|
-
Version = "".concat("1.
|
|
4989
|
+
Version = "".concat("1.12.1");
|
|
4968
4990
|
// import "@survey/creator/survey-creator-core.css";
|
|
4969
4991
|
|
|
4970
4992
|
|
|
@@ -5031,7 +5053,7 @@ Version = "".concat("1.11.14");
|
|
|
5031
5053
|
|
|
5032
5054
|
|
|
5033
5055
|
|
|
5034
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_57__.checkLibraryVersion)("".concat("1.
|
|
5056
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_57__.checkLibraryVersion)("".concat("1.12.1"), "survey-creator-react");
|
|
5035
5057
|
|
|
5036
5058
|
/******/ return __webpack_exports__;
|
|
5037
5059
|
/******/ })()
|