survey-react-ui 1.12.3 → 1.12.5
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 +2 -2
- package/survey-react-ui.js +131 -28
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/packages/survey-react-ui/src/components/file/file-item.d.ts +13 -0
- package/typings/packages/survey-react-ui/src/components/file/file-page.d.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.5",
|
|
4
4
|
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"typings": "./typings/src/entries/react-ui.d.ts",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"survey-core": "1.12.
|
|
24
|
+
"survey-core": "1.12.5",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.2.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.5
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -103,7 +103,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
103
103
|
|
|
104
104
|
/***/ "./src/entries/react-ui.ts":
|
|
105
105
|
/*!**********************************************!*\
|
|
106
|
-
!*** ./src/entries/react-ui.ts +
|
|
106
|
+
!*** ./src/entries/react-ui.ts + 98 modules ***!
|
|
107
107
|
\**********************************************/
|
|
108
108
|
/*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent, SurveyModel, SurveyWindowModel, Model, settings, surveyLocalization, surveyStrings */
|
|
109
109
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} (<- Module is not an ECMAScript module) */
|
|
@@ -448,7 +448,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
|
448
448
|
SurveyElementBase.prototype.makeBaseElementsReact = function () {
|
|
449
449
|
var els = this.getStateElements();
|
|
450
450
|
for (var i = 0; i < els.length; i++) {
|
|
451
|
-
els[i].
|
|
451
|
+
els[i].enableOnElementRerenderedEvent();
|
|
452
452
|
this.makeBaseElementReact(els[i]);
|
|
453
453
|
}
|
|
454
454
|
};
|
|
@@ -460,7 +460,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
|
460
460
|
};
|
|
461
461
|
SurveyElementBase.prototype.disableStateElementsRerenderEvent = function (els) {
|
|
462
462
|
els.forEach(function (el) {
|
|
463
|
-
el.
|
|
463
|
+
el.disableOnElementRerenderedEvent();
|
|
464
464
|
});
|
|
465
465
|
};
|
|
466
466
|
SurveyElementBase.prototype.getStateElements = function () {
|
|
@@ -1047,7 +1047,7 @@ var panel_base_SurveyPanelBase = /** @class */ (function (_super) {
|
|
|
1047
1047
|
var el = this.rootRef.current;
|
|
1048
1048
|
if (el && this.survey) {
|
|
1049
1049
|
if (this.panelBase.isPanel) {
|
|
1050
|
-
this.
|
|
1050
|
+
this.panelBase.afterRender(el);
|
|
1051
1051
|
}
|
|
1052
1052
|
else {
|
|
1053
1053
|
this.survey.afterRenderPage(el);
|
|
@@ -1391,12 +1391,11 @@ var popup_PopupContainer = /** @class */ (function (_super) {
|
|
|
1391
1391
|
}, onClick: function (ev) {
|
|
1392
1392
|
_this.clickInside(ev);
|
|
1393
1393
|
} },
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
footerContent))));
|
|
1394
|
+
headerPopup,
|
|
1395
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-popup__body-content" },
|
|
1396
|
+
headerContent,
|
|
1397
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-popup__scrolling-content" }, content),
|
|
1398
|
+
footerContent)));
|
|
1400
1399
|
};
|
|
1401
1400
|
PopupContainer.prototype.renderHeaderContent = function () {
|
|
1402
1401
|
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-popup__body-header" }, this.model.title);
|
|
@@ -5276,6 +5275,120 @@ ReactQuestionFactory.Instance.registerQuestion("file", function (props) {
|
|
|
5276
5275
|
return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_file_SurveyQuestionFile, props);
|
|
5277
5276
|
});
|
|
5278
5277
|
|
|
5278
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-item.tsx
|
|
5279
|
+
var file_item_extends = (undefined && undefined.__extends) || (function () {
|
|
5280
|
+
var extendStatics = function (d, b) {
|
|
5281
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5282
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5283
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
5284
|
+
return extendStatics(d, b);
|
|
5285
|
+
};
|
|
5286
|
+
return function (d, b) {
|
|
5287
|
+
if (typeof b !== "function" && b !== null)
|
|
5288
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
5289
|
+
extendStatics(d, b);
|
|
5290
|
+
function __() { this.constructor = d; }
|
|
5291
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5292
|
+
};
|
|
5293
|
+
})();
|
|
5294
|
+
|
|
5295
|
+
|
|
5296
|
+
|
|
5297
|
+
var file_item_SurveyFileItem = /** @class */ (function (_super) {
|
|
5298
|
+
file_item_extends(SurveyFileItem, _super);
|
|
5299
|
+
function SurveyFileItem() {
|
|
5300
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5301
|
+
}
|
|
5302
|
+
Object.defineProperty(SurveyFileItem.prototype, "question", {
|
|
5303
|
+
get: function () {
|
|
5304
|
+
return this.props.question;
|
|
5305
|
+
},
|
|
5306
|
+
enumerable: false,
|
|
5307
|
+
configurable: true
|
|
5308
|
+
});
|
|
5309
|
+
Object.defineProperty(SurveyFileItem.prototype, "item", {
|
|
5310
|
+
get: function () {
|
|
5311
|
+
return this.props.item;
|
|
5312
|
+
},
|
|
5313
|
+
enumerable: false,
|
|
5314
|
+
configurable: true
|
|
5315
|
+
});
|
|
5316
|
+
SurveyFileItem.prototype.renderFileSign = function (className, val) {
|
|
5317
|
+
var _this = this;
|
|
5318
|
+
if (!className || !val.name)
|
|
5319
|
+
return null;
|
|
5320
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: className },
|
|
5321
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("a", { href: val.content, onClick: function (event) {
|
|
5322
|
+
_this.question.doDownloadFile(event, val);
|
|
5323
|
+
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
5324
|
+
};
|
|
5325
|
+
SurveyFileItem.prototype.renderElement = function () {
|
|
5326
|
+
var _this = this;
|
|
5327
|
+
var val = this.item;
|
|
5328
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: this.question.cssClasses.previewItem, onClick: function (event) { return _this.question.doDownloadFileFromContainer(event); } },
|
|
5329
|
+
this.renderFileSign(this.question.cssClasses.fileSign, val),
|
|
5330
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.getImageWrapperCss(val) },
|
|
5331
|
+
this.question.canPreviewImage(val) ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", { src: val.content, style: { height: this.question.imageHeight, width: this.question.imageWidth }, alt: "File preview" })) : (this.question.cssClasses.defaultImage ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { iconName: this.question.cssClasses.defaultImageIconId, size: "auto", className: this.question.cssClasses.defaultImage })) : null),
|
|
5332
|
+
val.name && !this.question.isReadOnly ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.getRemoveButtonCss(), onClick: function (event) { return _this.question.doRemoveFile(val, event); } },
|
|
5333
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: this.question.cssClasses.removeFile }, this.question.removeFileCaption),
|
|
5334
|
+
(this.question.cssClasses.removeFileSvgIconId) ?
|
|
5335
|
+
(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { title: this.question.removeFileCaption, iconName: this.question.cssClasses.removeFileSvgIconId, size: "auto", className: this.question.cssClasses.removeFileSvg })) : null)) : null),
|
|
5336
|
+
this.renderFileSign(this.question.cssClasses.fileSignBottom, val)));
|
|
5337
|
+
};
|
|
5338
|
+
SurveyFileItem.prototype.canRender = function () {
|
|
5339
|
+
return this.question.showPreviewContainer;
|
|
5340
|
+
};
|
|
5341
|
+
return SurveyFileItem;
|
|
5342
|
+
}(reactquestion_element_SurveyElementBase));
|
|
5343
|
+
|
|
5344
|
+
|
|
5345
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-page.tsx
|
|
5346
|
+
var file_page_extends = (undefined && undefined.__extends) || (function () {
|
|
5347
|
+
var extendStatics = function (d, b) {
|
|
5348
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5349
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5350
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
5351
|
+
return extendStatics(d, b);
|
|
5352
|
+
};
|
|
5353
|
+
return function (d, b) {
|
|
5354
|
+
if (typeof b !== "function" && b !== null)
|
|
5355
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
5356
|
+
extendStatics(d, b);
|
|
5357
|
+
function __() { this.constructor = d; }
|
|
5358
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5359
|
+
};
|
|
5360
|
+
})();
|
|
5361
|
+
|
|
5362
|
+
|
|
5363
|
+
|
|
5364
|
+
var file_page_SurveyFilePage = /** @class */ (function (_super) {
|
|
5365
|
+
file_page_extends(SurveyFilePage, _super);
|
|
5366
|
+
function SurveyFilePage() {
|
|
5367
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5368
|
+
}
|
|
5369
|
+
Object.defineProperty(SurveyFilePage.prototype, "question", {
|
|
5370
|
+
get: function () {
|
|
5371
|
+
return this.props.question;
|
|
5372
|
+
},
|
|
5373
|
+
enumerable: false,
|
|
5374
|
+
configurable: true
|
|
5375
|
+
});
|
|
5376
|
+
Object.defineProperty(SurveyFilePage.prototype, "page", {
|
|
5377
|
+
get: function () {
|
|
5378
|
+
return this.props.page;
|
|
5379
|
+
},
|
|
5380
|
+
enumerable: false,
|
|
5381
|
+
configurable: true
|
|
5382
|
+
});
|
|
5383
|
+
SurveyFilePage.prototype.renderElement = function () {
|
|
5384
|
+
var _this = this;
|
|
5385
|
+
var items = this.page.items.map(function (item, index) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(file_item_SurveyFileItem, { item: item, question: _this.question, key: index })); });
|
|
5386
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.page.css, id: this.page.id }, items));
|
|
5387
|
+
};
|
|
5388
|
+
return SurveyFilePage;
|
|
5389
|
+
}(reactquestion_element_SurveyElementBase));
|
|
5390
|
+
|
|
5391
|
+
|
|
5279
5392
|
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-preview.tsx
|
|
5280
5393
|
var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
5281
5394
|
var extendStatics = function (d, b) {
|
|
@@ -5296,6 +5409,7 @@ var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
|
5296
5409
|
|
|
5297
5410
|
|
|
5298
5411
|
|
|
5412
|
+
|
|
5299
5413
|
var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
5300
5414
|
file_preview_extends(SurveyFilePreview, _super);
|
|
5301
5415
|
function SurveyFilePreview() {
|
|
@@ -5319,20 +5433,9 @@ var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
|
5319
5433
|
};
|
|
5320
5434
|
SurveyFilePreview.prototype.renderElement = function () {
|
|
5321
5435
|
var _this = this;
|
|
5322
|
-
var
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.previewItem, onClick: function (event) { return _this.question.doDownloadFileFromContainer(event); }, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
|
|
5326
|
-
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
|
5327
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
|
5328
|
-
_this.question.canPreviewImage(val) ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
|
|
5329
|
-
val.name && !_this.question.isReadOnly ? (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function (event) { return _this.question.doRemoveFile(val, event); } },
|
|
5330
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
|
|
5331
|
-
(_this.question.cssClasses.removeFileSvgIconId) ?
|
|
5332
|
-
(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { title: _this.question.removeFileCaption, iconName: _this.question.cssClasses.removeFileSvgIconId, size: "auto", className: _this.question.cssClasses.removeFileSvg })) : null)) : null),
|
|
5333
|
-
_this.renderFileSign(_this.question.cssClasses.fileSignBottom, val)));
|
|
5334
|
-
});
|
|
5335
|
-
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.cssClasses.fileList || undefined }, previews);
|
|
5436
|
+
var content = this.question.supportFileNavigator ? this.question.renderedPages.map(function (page, index) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(file_page_SurveyFilePage, { page: page, question: _this.question, key: page.id })); })
|
|
5437
|
+
: this.question.previewValue.map(function (item, index) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(file_item_SurveyFileItem, { item: item, question: _this.question, key: index })); });
|
|
5438
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
|
5336
5439
|
};
|
|
5337
5440
|
SurveyFilePreview.prototype.canRender = function () {
|
|
5338
5441
|
return this.question.showPreviewContainer;
|
|
@@ -8914,8 +9017,8 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
|
|
|
8914
9017
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
8915
9018
|
}
|
|
8916
9019
|
Skeleton.prototype.render = function () {
|
|
8917
|
-
var _a;
|
|
8918
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.id }));
|
|
9020
|
+
var _a, _b;
|
|
9021
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.id, style: { height: (_b = this.props.element) === null || _b === void 0 ? void 0 : _b.skeletonHeight } }));
|
|
8919
9022
|
};
|
|
8920
9023
|
return Skeleton;
|
|
8921
9024
|
}(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component));
|
|
@@ -9213,7 +9316,7 @@ ReactElementFactory.Instance.registerElement(external_root_Survey_commonjs2_surv
|
|
|
9213
9316
|
|
|
9214
9317
|
|
|
9215
9318
|
|
|
9216
|
-
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.
|
|
9319
|
+
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.5", "survey-react-ui");
|
|
9217
9320
|
|
|
9218
9321
|
|
|
9219
9322
|
/***/ }),
|