survey-react-ui 1.12.4 → 1.12.6
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 +155 -29
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/packages/survey-react-ui/src/components/action-bar/action-bar-item-dropdown.d.ts +1 -0
- 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/typings/packages/survey-react-ui/src/components/popup/popup.d.ts +1 -0
- package/typings/packages/survey-react-ui/src/components/text-area.d.ts +0 -1
- package/typings/packages/survey-react-ui/src/dropdown-item.d.ts +1 -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.6",
|
|
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.6",
|
|
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.6
|
|
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);
|
|
@@ -1423,6 +1423,12 @@ var popup_PopupContainer = /** @class */ (function (_super) {
|
|
|
1423
1423
|
_this.model.clickOutside(e);
|
|
1424
1424
|
}, onKeyDown: this.handleKeydown }, container));
|
|
1425
1425
|
};
|
|
1426
|
+
PopupContainer.prototype.componentDidMount = function () {
|
|
1427
|
+
_super.prototype.componentDidMount.call(this);
|
|
1428
|
+
if (this.model.isVisible) {
|
|
1429
|
+
this.model.updateOnShowing();
|
|
1430
|
+
}
|
|
1431
|
+
};
|
|
1426
1432
|
return PopupContainer;
|
|
1427
1433
|
}(reactquestion_element_SurveyElementBase));
|
|
1428
1434
|
|
|
@@ -1453,12 +1459,26 @@ function showDialog(dialogOptions, rootElement) {
|
|
|
1453
1459
|
var popupViewModel = Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["createPopupModalViewModel"])(dialogOptions, rootElement);
|
|
1454
1460
|
var onVisibilityChangedCallback = function (_, options) {
|
|
1455
1461
|
if (!options.isVisible) {
|
|
1456
|
-
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.
|
|
1462
|
+
if (typeof external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.createRoot == "function") {
|
|
1463
|
+
if (!!root) {
|
|
1464
|
+
root.unmount();
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
else {
|
|
1468
|
+
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.unmountComponentAtNode(popupViewModel.container);
|
|
1469
|
+
}
|
|
1457
1470
|
popupViewModel.dispose();
|
|
1458
1471
|
}
|
|
1459
1472
|
};
|
|
1460
1473
|
popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
|
|
1461
|
-
|
|
1474
|
+
var root;
|
|
1475
|
+
if (typeof external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.createRoot == "function") {
|
|
1476
|
+
root = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.createRoot(popupViewModel.container);
|
|
1477
|
+
root.render(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_PopupContainer, { model: popupViewModel }));
|
|
1478
|
+
}
|
|
1479
|
+
else {
|
|
1480
|
+
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.render(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_PopupContainer, { model: popupViewModel }), popupViewModel.container);
|
|
1481
|
+
}
|
|
1462
1482
|
popupViewModel.model.isVisible = true;
|
|
1463
1483
|
return popupViewModel;
|
|
1464
1484
|
}
|
|
@@ -1489,9 +1509,7 @@ var action_bar_item_dropdown_extends = (undefined && undefined.__extends) || (fu
|
|
|
1489
1509
|
var action_bar_item_dropdown_SurveyActionBarItemDropdown = /** @class */ (function (_super) {
|
|
1490
1510
|
action_bar_item_dropdown_extends(SurveyActionBarItemDropdown, _super);
|
|
1491
1511
|
function SurveyActionBarItemDropdown(props) {
|
|
1492
|
-
|
|
1493
|
-
_this.viewModel = new external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["ActionDropdownViewModel"](_this.item);
|
|
1494
|
-
return _this;
|
|
1512
|
+
return _super.call(this, props) || this;
|
|
1495
1513
|
}
|
|
1496
1514
|
SurveyActionBarItemDropdown.prototype.renderInnerButton = function () {
|
|
1497
1515
|
var button = _super.prototype.renderInnerButton.call(this);
|
|
@@ -1499,6 +1517,9 @@ var action_bar_item_dropdown_SurveyActionBarItemDropdown = /** @class */ (functi
|
|
|
1499
1517
|
button,
|
|
1500
1518
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_Popup, { model: this.item.popupModel, getTarget: external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["getActionDropdownButtonTarget"] })));
|
|
1501
1519
|
};
|
|
1520
|
+
SurveyActionBarItemDropdown.prototype.componentDidMount = function () {
|
|
1521
|
+
this.viewModel = new external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["ActionDropdownViewModel"](this.item);
|
|
1522
|
+
};
|
|
1502
1523
|
SurveyActionBarItemDropdown.prototype.componentWillUnmount = function () {
|
|
1503
1524
|
_super.prototype.componentWillUnmount.call(this);
|
|
1504
1525
|
this.viewModel.dispose();
|
|
@@ -1889,9 +1910,6 @@ var text_area_TextAreaComponent = /** @class */ (function (_super) {
|
|
|
1889
1910
|
var _this = this;
|
|
1890
1911
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: function (textarea) { return (_this.viewModel.setElement(textarea)); }, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: function (event) { _this.viewModel.onTextAreaInput(event); }, onFocus: function (event) { _this.viewModel.onTextAreaFocus(event); }, onBlur: function (event) { _this.viewModel.onTextAreaBlur(event); }, onKeyDown: function (event) { _this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
|
|
1891
1912
|
};
|
|
1892
|
-
TextAreaComponent.prototype.componentWillUnmount = function () {
|
|
1893
|
-
this.viewModel.dispose();
|
|
1894
|
-
};
|
|
1895
1913
|
return TextAreaComponent;
|
|
1896
1914
|
}(reactquestion_element_SurveyElementBase));
|
|
1897
1915
|
|
|
@@ -2906,6 +2924,7 @@ var reactSurvey_Survey = /** @class */ (function (_super) {
|
|
|
2906
2924
|
if (!!el)
|
|
2907
2925
|
this.survey.afterRenderSurvey(el);
|
|
2908
2926
|
this.survey.startTimerFromUI();
|
|
2927
|
+
this.setSurveyEvents();
|
|
2909
2928
|
}
|
|
2910
2929
|
};
|
|
2911
2930
|
Survey.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
@@ -3062,7 +3081,6 @@ var reactSurvey_Survey = /** @class */ (function (_super) {
|
|
|
3062
3081
|
if (!!newProps.css) {
|
|
3063
3082
|
this.survey.css = this.css;
|
|
3064
3083
|
}
|
|
3065
|
-
this.setSurveyEvents();
|
|
3066
3084
|
};
|
|
3067
3085
|
Survey.prototype.isModelJSONChanged = function (newProps) {
|
|
3068
3086
|
if (!!newProps["model"]) {
|
|
@@ -4366,6 +4384,10 @@ var dropdown_item_SurveyQuestionOptionItem = /** @class */ (function (_super) {
|
|
|
4366
4384
|
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
4367
4385
|
this.setupModel();
|
|
4368
4386
|
};
|
|
4387
|
+
SurveyQuestionOptionItem.prototype.componentDidMount = function () {
|
|
4388
|
+
_super.prototype.componentDidMount.call(this);
|
|
4389
|
+
this.setupModel();
|
|
4390
|
+
};
|
|
4369
4391
|
SurveyQuestionOptionItem.prototype.componentWillUnmount = function () {
|
|
4370
4392
|
_super.prototype.componentWillUnmount.call(this);
|
|
4371
4393
|
if (!!this.item) {
|
|
@@ -5275,6 +5297,120 @@ ReactQuestionFactory.Instance.registerQuestion("file", function (props) {
|
|
|
5275
5297
|
return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_file_SurveyQuestionFile, props);
|
|
5276
5298
|
});
|
|
5277
5299
|
|
|
5300
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-item.tsx
|
|
5301
|
+
var file_item_extends = (undefined && undefined.__extends) || (function () {
|
|
5302
|
+
var extendStatics = function (d, b) {
|
|
5303
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5304
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5305
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
5306
|
+
return extendStatics(d, b);
|
|
5307
|
+
};
|
|
5308
|
+
return function (d, b) {
|
|
5309
|
+
if (typeof b !== "function" && b !== null)
|
|
5310
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
5311
|
+
extendStatics(d, b);
|
|
5312
|
+
function __() { this.constructor = d; }
|
|
5313
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5314
|
+
};
|
|
5315
|
+
})();
|
|
5316
|
+
|
|
5317
|
+
|
|
5318
|
+
|
|
5319
|
+
var file_item_SurveyFileItem = /** @class */ (function (_super) {
|
|
5320
|
+
file_item_extends(SurveyFileItem, _super);
|
|
5321
|
+
function SurveyFileItem() {
|
|
5322
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5323
|
+
}
|
|
5324
|
+
Object.defineProperty(SurveyFileItem.prototype, "question", {
|
|
5325
|
+
get: function () {
|
|
5326
|
+
return this.props.question;
|
|
5327
|
+
},
|
|
5328
|
+
enumerable: false,
|
|
5329
|
+
configurable: true
|
|
5330
|
+
});
|
|
5331
|
+
Object.defineProperty(SurveyFileItem.prototype, "item", {
|
|
5332
|
+
get: function () {
|
|
5333
|
+
return this.props.item;
|
|
5334
|
+
},
|
|
5335
|
+
enumerable: false,
|
|
5336
|
+
configurable: true
|
|
5337
|
+
});
|
|
5338
|
+
SurveyFileItem.prototype.renderFileSign = function (className, val) {
|
|
5339
|
+
var _this = this;
|
|
5340
|
+
if (!className || !val.name)
|
|
5341
|
+
return null;
|
|
5342
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: className },
|
|
5343
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("a", { href: val.content, onClick: function (event) {
|
|
5344
|
+
_this.question.doDownloadFile(event, val);
|
|
5345
|
+
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
5346
|
+
};
|
|
5347
|
+
SurveyFileItem.prototype.renderElement = function () {
|
|
5348
|
+
var _this = this;
|
|
5349
|
+
var val = this.item;
|
|
5350
|
+
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); } },
|
|
5351
|
+
this.renderFileSign(this.question.cssClasses.fileSign, val),
|
|
5352
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.getImageWrapperCss(val) },
|
|
5353
|
+
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),
|
|
5354
|
+
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); } },
|
|
5355
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: this.question.cssClasses.removeFile }, this.question.removeFileCaption),
|
|
5356
|
+
(this.question.cssClasses.removeFileSvgIconId) ?
|
|
5357
|
+
(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),
|
|
5358
|
+
this.renderFileSign(this.question.cssClasses.fileSignBottom, val)));
|
|
5359
|
+
};
|
|
5360
|
+
SurveyFileItem.prototype.canRender = function () {
|
|
5361
|
+
return this.question.showPreviewContainer;
|
|
5362
|
+
};
|
|
5363
|
+
return SurveyFileItem;
|
|
5364
|
+
}(reactquestion_element_SurveyElementBase));
|
|
5365
|
+
|
|
5366
|
+
|
|
5367
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-page.tsx
|
|
5368
|
+
var file_page_extends = (undefined && undefined.__extends) || (function () {
|
|
5369
|
+
var extendStatics = function (d, b) {
|
|
5370
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5371
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5372
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
5373
|
+
return extendStatics(d, b);
|
|
5374
|
+
};
|
|
5375
|
+
return function (d, b) {
|
|
5376
|
+
if (typeof b !== "function" && b !== null)
|
|
5377
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
5378
|
+
extendStatics(d, b);
|
|
5379
|
+
function __() { this.constructor = d; }
|
|
5380
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5381
|
+
};
|
|
5382
|
+
})();
|
|
5383
|
+
|
|
5384
|
+
|
|
5385
|
+
|
|
5386
|
+
var file_page_SurveyFilePage = /** @class */ (function (_super) {
|
|
5387
|
+
file_page_extends(SurveyFilePage, _super);
|
|
5388
|
+
function SurveyFilePage() {
|
|
5389
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5390
|
+
}
|
|
5391
|
+
Object.defineProperty(SurveyFilePage.prototype, "question", {
|
|
5392
|
+
get: function () {
|
|
5393
|
+
return this.props.question;
|
|
5394
|
+
},
|
|
5395
|
+
enumerable: false,
|
|
5396
|
+
configurable: true
|
|
5397
|
+
});
|
|
5398
|
+
Object.defineProperty(SurveyFilePage.prototype, "page", {
|
|
5399
|
+
get: function () {
|
|
5400
|
+
return this.props.page;
|
|
5401
|
+
},
|
|
5402
|
+
enumerable: false,
|
|
5403
|
+
configurable: true
|
|
5404
|
+
});
|
|
5405
|
+
SurveyFilePage.prototype.renderElement = function () {
|
|
5406
|
+
var _this = this;
|
|
5407
|
+
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 })); });
|
|
5408
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.page.css, id: this.page.id }, items));
|
|
5409
|
+
};
|
|
5410
|
+
return SurveyFilePage;
|
|
5411
|
+
}(reactquestion_element_SurveyElementBase));
|
|
5412
|
+
|
|
5413
|
+
|
|
5278
5414
|
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-preview.tsx
|
|
5279
5415
|
var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
5280
5416
|
var extendStatics = function (d, b) {
|
|
@@ -5295,6 +5431,7 @@ var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
|
5295
5431
|
|
|
5296
5432
|
|
|
5297
5433
|
|
|
5434
|
+
|
|
5298
5435
|
var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
5299
5436
|
file_preview_extends(SurveyFilePreview, _super);
|
|
5300
5437
|
function SurveyFilePreview() {
|
|
@@ -5318,20 +5455,9 @@ var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
|
5318
5455
|
};
|
|
5319
5456
|
SurveyFilePreview.prototype.renderElement = function () {
|
|
5320
5457
|
var _this = this;
|
|
5321
|
-
var
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
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" } },
|
|
5325
|
-
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
|
5326
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
|
5327
|
-
_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),
|
|
5328
|
-
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); } },
|
|
5329
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
|
|
5330
|
-
(_this.question.cssClasses.removeFileSvgIconId) ?
|
|
5331
|
-
(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),
|
|
5332
|
-
_this.renderFileSign(_this.question.cssClasses.fileSignBottom, val)));
|
|
5333
|
-
});
|
|
5334
|
-
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.cssClasses.fileList || undefined }, previews);
|
|
5458
|
+
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 })); })
|
|
5459
|
+
: 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 })); });
|
|
5460
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
|
5335
5461
|
};
|
|
5336
5462
|
SurveyFilePreview.prototype.canRender = function () {
|
|
5337
5463
|
return this.question.showPreviewContainer;
|
|
@@ -9212,7 +9338,7 @@ ReactElementFactory.Instance.registerElement(external_root_Survey_commonjs2_surv
|
|
|
9212
9338
|
|
|
9213
9339
|
|
|
9214
9340
|
|
|
9215
|
-
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.
|
|
9341
|
+
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.6", "survey-react-ui");
|
|
9216
9342
|
|
|
9217
9343
|
|
|
9218
9344
|
/***/ }),
|