survey-creator-react 1.9.106 → 1.9.108
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 +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +30 -10
- package/survey-creator-react.js.map +1 -1
- package/survey-creator-react.min.js +2 -2
- package/typings/ImageItemValueWrapper.d.ts +1 -0
- package/typings/LogoImage.d.ts +1 -0
- package/typings/adorners/QuestionImage.d.ts +2 -0
package/index.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<!--<script src="../build/survey-creator-react.js"></script>-->
|
|
21
21
|
<link rel="stylesheet" type="text/css" href="../node_modules/survey-core/defaultV2.css" />
|
|
22
|
-
<link rel="stylesheet" type="text/css" href="../node_modules/survey-core/modern.css" />
|
|
22
|
+
<!-- <link rel="stylesheet" type="text/css" href="../node_modules/survey-core/modern.css" /> -->
|
|
23
23
|
<link rel="stylesheet" type="text/css" href="../node_modules/survey-creator-core/survey-creator-core.css" />
|
|
24
24
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
|
|
25
25
|
<!-- <link rel="stylesheet" type="text/css" href="../build/survey-creator-react.css" /> -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.108",
|
|
4
4
|
"description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"survey-core": "1.9.
|
|
38
|
-
"survey-react-ui": "1.9.
|
|
39
|
-
"survey-creator-core": "1.9.
|
|
37
|
+
"survey-core": "1.9.108",
|
|
38
|
+
"survey-react-ui": "1.9.108",
|
|
39
|
+
"survey-creator-core": "1.9.108",
|
|
40
40
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
41
41
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
|
|
42
42
|
},
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v1.9.
|
|
2
|
+
* SurveyJS Creator React v1.9.108
|
|
3
3
|
* (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -207,6 +207,10 @@ var ImageItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
207
207
|
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
208
208
|
this.model.itemsRoot = this.rootRef.current;
|
|
209
209
|
};
|
|
210
|
+
ImageItemValueAdornerComponent.prototype.renderLoadingIndicator = function () {
|
|
211
|
+
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-item-value__loading" },
|
|
212
|
+
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["LoadingIndicatorComponent"], null));
|
|
213
|
+
};
|
|
210
214
|
ImageItemValueAdornerComponent.prototype.render = function () {
|
|
211
215
|
var _this = this;
|
|
212
216
|
// if (this.model.question.isDragged) {
|
|
@@ -217,12 +221,12 @@ var ImageItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
217
221
|
this.model.isNew = isNew;
|
|
218
222
|
var imageStyle = !this.model.getIsNewItemSingle() ? { width: this.question.renderedImageWidth, height: this.question.renderedImageHeight } : null;
|
|
219
223
|
var content = null;
|
|
220
|
-
if (isNew) {
|
|
224
|
+
if (isNew || this.model.isUploading) {
|
|
221
225
|
content = (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_2___default.a.Fragment, null,
|
|
222
226
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-item-value__item", onDrop: this.model.onDrop, onDragOver: this.model.onDragOver, onDragLeave: this.model.onDragLeave },
|
|
223
227
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "sd-imagepicker__item sd-imagepicker__item--inline" },
|
|
224
228
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("label", { className: "sd-imagepicker__label" },
|
|
225
|
-
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { style: imageStyle, className: "sd-imagepicker__image" })))),
|
|
229
|
+
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { style: imageStyle, className: "sd-imagepicker__image" }, this.model.isUploading ? this.renderLoadingIndicator() : null)))),
|
|
226
230
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-item-value-controls" }, this.model.allowAdd && !this.model.isUploading ? Object(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("span", { className: "svc-context-button svc-image-item-value-controls__add", onClick: function () { return _this.model.chooseNewFile(_this.model); } },
|
|
227
231
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { size: 24, iconName: "icon-add-lg" }))) : null)));
|
|
228
232
|
}
|
|
@@ -414,11 +418,18 @@ var LogoImageComponent = /** @class */ (function (_super) {
|
|
|
414
418
|
LogoImageComponent.prototype.renderInput = function () {
|
|
415
419
|
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("input", { "aria-hidden": "true", type: "file", tabIndex: -1, accept: this.model.acceptedTypes, className: "svc-choose-file-input" });
|
|
416
420
|
};
|
|
421
|
+
LogoImageComponent.prototype.renderLoadingIndicator = function () {
|
|
422
|
+
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", { className: "svc-logo-image__loading" },
|
|
423
|
+
react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__["LoadingIndicatorComponent"], null));
|
|
424
|
+
};
|
|
417
425
|
LogoImageComponent.prototype.render = function () {
|
|
418
426
|
var content = null;
|
|
419
|
-
if (this.model.survey.locLogo.renderedHtml) {
|
|
427
|
+
if (this.model.survey.locLogo.renderedHtml && !this.model.isUploading) {
|
|
420
428
|
content = this.renderImage();
|
|
421
429
|
}
|
|
430
|
+
else if (this.model.isUploading) {
|
|
431
|
+
content = this.renderLoadingIndicator();
|
|
432
|
+
}
|
|
422
433
|
else {
|
|
423
434
|
content = this.renderPlaceHolder();
|
|
424
435
|
}
|
|
@@ -1402,6 +1413,7 @@ var SurveyLocStringEditor = /** @class */ (function (_super) {
|
|
|
1402
1413
|
_super.prototype.componentDidMount.call(this);
|
|
1403
1414
|
if (!this.locString)
|
|
1404
1415
|
return;
|
|
1416
|
+
this.baseModel.setLocString(this.locString);
|
|
1405
1417
|
this.baseModel.getEditorElement = function () { return _this.svStringEditorRef.current; };
|
|
1406
1418
|
this.baseModel.blurEditor = function () {
|
|
1407
1419
|
_this.svStringEditorRef.current.blur();
|
|
@@ -1551,7 +1563,7 @@ var SurveyCreatorComponent = /** @class */ (function (_super) {
|
|
|
1551
1563
|
var creator = this.props.creator;
|
|
1552
1564
|
if (creator.isCreatorDisposed)
|
|
1553
1565
|
return null;
|
|
1554
|
-
var creatorClassName = "svc-creator" + (this.props.creator.isMobileView ? " svc-creator--mobile" : "");
|
|
1566
|
+
var creatorClassName = "svc-creator" + (this.props.creator.isMobileView ? " svc-creator--mobile" : "") + (this.props.creator.isTouch ? " svc-creator--touch" : "");
|
|
1555
1567
|
var areaClassName = "svc-full-container svc-creator__area svc-flex-column" + (this.props.creator.haveCommercialLicense ? "" : " svc-creator__area--with-banner");
|
|
1556
1568
|
var contentWrapperClassName = "svc-creator__content-wrapper svc-flex-row" + (this.props.creator.isMobileView ? " svc-creator__content-wrapper--footer-toolbar" : "");
|
|
1557
1569
|
var fullContainerClassName = "svc-flex-row svc-full-container" + (" svc-creator__side-bar--" + this.creator.sidebarLocation);
|
|
@@ -2515,11 +2527,19 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
|
|
|
2515
2527
|
} }),
|
|
2516
2528
|
_super.prototype.renderHeader.call(this)));
|
|
2517
2529
|
};
|
|
2518
|
-
QuestionImageAdornerComponent.prototype.
|
|
2530
|
+
QuestionImageAdornerComponent.prototype.renderLoadingPlaceholder = function () {
|
|
2531
|
+
return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question__loading-placeholder" },
|
|
2532
|
+
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question__loading" },
|
|
2533
|
+
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["LoadingIndicatorComponent"], null))));
|
|
2534
|
+
};
|
|
2535
|
+
QuestionImageAdornerComponent.prototype.renderChooseButton = function () {
|
|
2519
2536
|
var _this = this;
|
|
2520
|
-
return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question-controls" }, this.model.allowEdit
|
|
2537
|
+
return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question-controls" }, this.model.allowEdit ? Object(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("span", { className: "svc-context-button", onClick: function () { return _this.imageModel.chooseFile(_this.imageModel); } },
|
|
2521
2538
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { size: 24, iconName: "icon-file" }))) : null));
|
|
2522
2539
|
};
|
|
2540
|
+
QuestionImageAdornerComponent.prototype.renderElementPlaceholder = function () {
|
|
2541
|
+
return this.imageModel.isUploading ? this.renderLoadingPlaceholder() : this.renderChooseButton();
|
|
2542
|
+
};
|
|
2523
2543
|
QuestionImageAdornerComponent.prototype.getStateElements = function () {
|
|
2524
2544
|
return [this.model, this.imageModel.filePresentationModel];
|
|
2525
2545
|
};
|
|
@@ -2813,7 +2833,7 @@ var SurveyQuestionColor = /** @class */ (function (_super) {
|
|
|
2813
2833
|
var _this = this;
|
|
2814
2834
|
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("label", { className: this.question.getSwatchCss(), style: this.question.getSwatchStyle() },
|
|
2815
2835
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](survey_react_ui__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: this.question.cssClasses.swatchIcon, size: "auto" }),
|
|
2816
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("input", { type: "color", disabled: this.isDisplayMode, value: this.question.
|
|
2836
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: function (event) { return _this.question.onColorInputChange(event.nativeEvent); } }));
|
|
2817
2837
|
};
|
|
2818
2838
|
SurveyQuestionColor.prototype.renderDropdownAction = function () {
|
|
2819
2839
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null,
|
|
@@ -3278,7 +3298,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3278
3298
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
3279
3299
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_51__);
|
|
3280
3300
|
var Version;
|
|
3281
|
-
Version = "".concat("1.9.
|
|
3301
|
+
Version = "".concat("1.9.108");
|
|
3282
3302
|
// import "@survey/creator/survey-creator-core.css";
|
|
3283
3303
|
|
|
3284
3304
|
|
|
@@ -3339,7 +3359,7 @@ Version = "".concat("1.9.106");
|
|
|
3339
3359
|
|
|
3340
3360
|
|
|
3341
3361
|
|
|
3342
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_51__["checkLibraryVersion"])("".concat("1.9.
|
|
3362
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_51__["checkLibraryVersion"])("".concat("1.9.108"), "survey-creator-react");
|
|
3343
3363
|
|
|
3344
3364
|
|
|
3345
3365
|
/***/ }),
|