survey-creator-react 2.0.6 → 2.0.8
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 +21 -16
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +21 -15
- package/survey-creator-react.js.map +1 -1
- package/survey-creator-react.min.js +1 -1
- package/survey-creator-react.min.js.LICENSE.txt +1 -1
- package/typings/ImageItemValueWrapper.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"ace-builds": "^1.4.12",
|
|
38
38
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
39
39
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
40
|
-
"survey-core": "2.0.
|
|
41
|
-
"survey-react-ui": "2.0.
|
|
42
|
-
"survey-creator-core": "2.0.
|
|
40
|
+
"survey-core": "2.0.8",
|
|
41
|
+
"survey-react-ui": "2.0.8",
|
|
42
|
+
"survey-creator-core": "2.0.8"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"ace-builds": {
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.0.
|
|
2
|
+
* SurveyJS Creator React v2.0.8
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -220,6 +220,16 @@ var ImageItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
220
220
|
return react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value__loading" },
|
|
221
221
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.LoadingIndicatorComponent, null));
|
|
222
222
|
};
|
|
223
|
+
ImageItemValueAdornerComponent.prototype.renderNewItemControls = function () {
|
|
224
|
+
var _this = this;
|
|
225
|
+
var addButton = (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: this.model.addButtonCss, onClick: function () { return _this.model.chooseNewFile(_this.model); } }, this.model.showChooseButtonAsIcon ?
|
|
226
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { size: "auto", iconName: "icon-add-lg", title: this.model.addFileTitle }) :
|
|
227
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", null, this.model.chooseImageText)));
|
|
228
|
+
var placeholder = this.model.showPlaceholder ? react__WEBPACK_IMPORTED_MODULE_2__.createElement("span", { className: "svc-image-item-value__placeholder" }, this.model.placeholderText) : null;
|
|
229
|
+
return react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
|
|
230
|
+
placeholder,
|
|
231
|
+
addButton);
|
|
232
|
+
};
|
|
223
233
|
ImageItemValueAdornerComponent.prototype.render = function () {
|
|
224
234
|
var _this = this;
|
|
225
235
|
this.model.item = this.props.item;
|
|
@@ -229,12 +239,13 @@ var ImageItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
229
239
|
var content = null;
|
|
230
240
|
if (isNew || this.model.isUploading) {
|
|
231
241
|
content = (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
|
|
232
|
-
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value__item"
|
|
242
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value__item" },
|
|
233
243
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "sd-imagepicker__item sd-imagepicker__item--inline" },
|
|
234
244
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement("label", { className: "sd-imagepicker__label" },
|
|
235
245
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { style: imageStyle, className: "sd-imagepicker__image" }, this.model.isUploading ? this.renderLoadingIndicator() : null)))),
|
|
236
|
-
|
|
237
|
-
react__WEBPACK_IMPORTED_MODULE_2__.createElement(
|
|
246
|
+
this.model.allowAdd && !this.model.isUploading ?
|
|
247
|
+
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value-controls" }, this.renderNewItemControls())
|
|
248
|
+
: null));
|
|
238
249
|
}
|
|
239
250
|
else {
|
|
240
251
|
content = (react__WEBPACK_IMPORTED_MODULE_2__.createElement(react__WEBPACK_IMPORTED_MODULE_2__.Fragment, null,
|
|
@@ -251,7 +262,7 @@ var ImageItemValueAdornerComponent = /** @class */ (function (_super) {
|
|
|
251
262
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SvgIcon, { role: "button", size: "auto", iconName: "icon-delete", title: this.model.removeFileTitle }))) : null)
|
|
252
263
|
: null));
|
|
253
264
|
}
|
|
254
|
-
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, className: this.model.getRootCss(), key: this.props.element.key, "data-sv-drop-target-item-value": this.model.isDraggable ? this.model.item.value : undefined, onPointerDown: function (event) { return _this.model.onPointerDown(event); }, onDragStart: this.preventDragHandler },
|
|
265
|
+
return (react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { ref: this.rootRef, className: this.model.getRootCss(), key: this.props.element.key, "data-sv-drop-target-item-value": this.model.isDraggable ? this.model.item.value : undefined, onPointerDown: function (event) { return _this.model.onPointerDown(event); }, onDragStart: this.preventDragHandler, onDrop: this.model.onDrop, onDragEnter: this.model.onDragEnter, onDragOver: this.model.onDragOver, onDragLeave: this.model.onDragLeave },
|
|
255
266
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value-wrapper__ghost", style: imageStyle }),
|
|
256
267
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { className: "svc-image-item-value-wrapper__content" },
|
|
257
268
|
react__WEBPACK_IMPORTED_MODULE_2__.createElement("input", { type: "file", "aria-hidden": "true", tabIndex: -1, accept: this.model.acceptedTypes, className: "svc-choose-file-input", style: {
|
|
@@ -2953,7 +2964,7 @@ var SurveyQuestionFileEditor = /** @class */ (function (_super) {
|
|
|
2953
2964
|
SurveyQuestionFileEditor.prototype.renderInput = function () {
|
|
2954
2965
|
var _this = this;
|
|
2955
2966
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
|
|
2956
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { disabled: this.
|
|
2967
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { disabled: this.question.isTextInputReadOnly, className: this.questionFile.cssClasses.control, placeholder: this.questionFile.renderedPlaceholder, ref: function (input) { return (_this.setControl(input)); }, autoComplete: "off", type: "text", onBlur: function (event) { return _this.questionFile.onInputBlur(event.nativeEvent); }, onChange: function (event) { return _this.questionFile.onInputChange(event.nativeEvent); } })));
|
|
2957
2968
|
};
|
|
2958
2969
|
SurveyQuestionFileEditor.prototype.renderFileInput = function () {
|
|
2959
2970
|
var _this = this;
|
|
@@ -3324,7 +3335,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3324
3335
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
3325
3336
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
|
|
3326
3337
|
var Version;
|
|
3327
|
-
Version = "".concat("2.0.
|
|
3338
|
+
Version = "".concat("2.0.8");
|
|
3328
3339
|
// import "@survey/creator/survey-creator-core.css";
|
|
3329
3340
|
|
|
3330
3341
|
|
|
@@ -3396,7 +3407,7 @@ Version = "".concat("2.0.6");
|
|
|
3396
3407
|
|
|
3397
3408
|
|
|
3398
3409
|
|
|
3399
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.
|
|
3410
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.8"), "survey-creator-react");
|
|
3400
3411
|
|
|
3401
3412
|
|
|
3402
3413
|
/***/ }),
|
|
@@ -3597,9 +3608,6 @@ var PropertyGridComponent = /** @class */ (function (_super) {
|
|
|
3597
3608
|
return PropertyGridComponent;
|
|
3598
3609
|
}(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
|
|
3599
3610
|
|
|
3600
|
-
survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactQuestionFactory.Instance.registerQuestion("buttongroup", function (props) {
|
|
3601
|
-
return react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionButtonGroup, props);
|
|
3602
|
-
});
|
|
3603
3611
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PropertyGridComponent);
|
|
3604
3612
|
survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.registerElement("svc-property-grid", function (props) {
|
|
3605
3613
|
return react__WEBPACK_IMPORTED_MODULE_1__.createElement(PropertyGridComponent, props);
|
|
@@ -4725,14 +4733,12 @@ var SurveyLogicOpertor = /** @class */ (function (_super) {
|
|
|
4725
4733
|
SurveyLogicOpertor.prototype.renderInput = function () {
|
|
4726
4734
|
var q = this.question;
|
|
4727
4735
|
(0,survey_creator_core__WEBPACK_IMPORTED_MODULE_3__.initLogicOperator)(q);
|
|
4728
|
-
var text = (q.
|
|
4736
|
+
var text = (q.locReadOnlyText) ? this.renderLocString(q.locReadOnlyText) : "";
|
|
4729
4737
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { id: this.question.inputId, className: q.getControlClass(), tabIndex: this.question.isInputReadOnly ? undefined : 0,
|
|
4730
4738
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
4731
4739
|
// @ts-ignore
|
|
4732
4740
|
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onKeyUp: this.keyhandler, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-labelledby": this.question.ariaLabelledBy, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded },
|
|
4733
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.question.cssClasses.controlValue },
|
|
4734
|
-
text,
|
|
4735
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", null, q.readOnlyText)),
|
|
4741
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.question.cssClasses.controlValue }, text),
|
|
4736
4742
|
this.createClearButton()));
|
|
4737
4743
|
};
|
|
4738
4744
|
return SurveyLogicOpertor;
|