survey-creator-react 1.9.106 → 1.9.107
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.107",
|
|
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.107",
|
|
38
|
+
"survey-react-ui": "1.9.107",
|
|
39
|
+
"survey-creator-core": "1.9.107",
|
|
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.107
|
|
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
|
}
|
|
@@ -2515,11 +2526,19 @@ var QuestionImageAdornerComponent = /** @class */ (function (_super) {
|
|
|
2515
2526
|
} }),
|
|
2516
2527
|
_super.prototype.renderHeader.call(this)));
|
|
2517
2528
|
};
|
|
2518
|
-
QuestionImageAdornerComponent.prototype.
|
|
2529
|
+
QuestionImageAdornerComponent.prototype.renderLoadingPlaceholder = function () {
|
|
2530
|
+
return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question__loading-placeholder" },
|
|
2531
|
+
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question__loading" },
|
|
2532
|
+
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["LoadingIndicatorComponent"], null))));
|
|
2533
|
+
};
|
|
2534
|
+
QuestionImageAdornerComponent.prototype.renderChooseButton = function () {
|
|
2519
2535
|
var _this = this;
|
|
2520
|
-
return (react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", { className: "svc-image-question-controls" }, this.model.allowEdit
|
|
2536
|
+
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
2537
|
react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { size: 24, iconName: "icon-file" }))) : null));
|
|
2522
2538
|
};
|
|
2539
|
+
QuestionImageAdornerComponent.prototype.renderElementPlaceholder = function () {
|
|
2540
|
+
return this.imageModel.isUploading ? this.renderLoadingPlaceholder() : this.renderChooseButton();
|
|
2541
|
+
};
|
|
2523
2542
|
QuestionImageAdornerComponent.prototype.getStateElements = function () {
|
|
2524
2543
|
return [this.model, this.imageModel.filePresentationModel];
|
|
2525
2544
|
};
|
|
@@ -3278,7 +3297,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3278
3297
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
3279
3298
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_51___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_51__);
|
|
3280
3299
|
var Version;
|
|
3281
|
-
Version = "".concat("1.9.
|
|
3300
|
+
Version = "".concat("1.9.107");
|
|
3282
3301
|
// import "@survey/creator/survey-creator-core.css";
|
|
3283
3302
|
|
|
3284
3303
|
|
|
@@ -3339,7 +3358,7 @@ Version = "".concat("1.9.106");
|
|
|
3339
3358
|
|
|
3340
3359
|
|
|
3341
3360
|
|
|
3342
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_51__["checkLibraryVersion"])("".concat("1.9.
|
|
3361
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_51__["checkLibraryVersion"])("".concat("1.9.107"), "survey-creator-react");
|
|
3343
3362
|
|
|
3344
3363
|
|
|
3345
3364
|
/***/ }),
|