survey-js-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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-js-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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typings": "./typings/src/entries/js-ui.d.ts",
|
|
24
24
|
"dependencies": {},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"survey-core": "1.12.
|
|
26
|
+
"survey-core": "1.12.5",
|
|
27
27
|
"@types/react-dom": "*",
|
|
28
28
|
"@types/react": "*"
|
|
29
29
|
}
|
package/survey-js-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/js-ui.ts":
|
|
105
105
|
/*!********************************************!*\
|
|
106
|
-
!*** ./src/entries/js-ui.ts +
|
|
106
|
+
!*** ./src/entries/js-ui.ts + 102 modules ***!
|
|
107
107
|
\********************************************/
|
|
108
108
|
/*! exports provided: useState, useId, useReducer, useEffect, useLayoutEffect, useInsertionEffect, useTransition, useDeferredValue, useSyncExternalStore, startTransition, useRef, useImperativeHandle, useMemo, useCallback, useContext, useDebugValue, version, Children, render, hydrate, unmountComponentAtNode, createPortal, createElement, createContext, createFactory, cloneElement, createRef, Fragment, isValidElement, isFragment, isMemo, findDOMNode, Component, PureComponent, memo, forwardRef, flushSync, unstable_batchedUpdates, StrictMode, Suspense, SuspenseList, lazy, renderSurvey, renderPopupSurvey, preact, 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, settings, surveyLocalization, surveyStrings, Model */
|
|
109
109
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"Survey","commonjs2":"survey-core","commonjs":"survey-core","amd":"survey-core"} (<- Module is not an ECMAScript module) */
|
|
@@ -549,7 +549,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
|
549
549
|
SurveyElementBase.prototype.makeBaseElementsReact = function () {
|
|
550
550
|
var els = this.getStateElements();
|
|
551
551
|
for (var i = 0; i < els.length; i++) {
|
|
552
|
-
els[i].
|
|
552
|
+
els[i].enableOnElementRerenderedEvent();
|
|
553
553
|
this.makeBaseElementReact(els[i]);
|
|
554
554
|
}
|
|
555
555
|
};
|
|
@@ -561,7 +561,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
|
561
561
|
};
|
|
562
562
|
SurveyElementBase.prototype.disableStateElementsRerenderEvent = function (els) {
|
|
563
563
|
els.forEach(function (el) {
|
|
564
|
-
el.
|
|
564
|
+
el.disableOnElementRerenderedEvent();
|
|
565
565
|
});
|
|
566
566
|
};
|
|
567
567
|
SurveyElementBase.prototype.getStateElements = function () {
|
|
@@ -1148,7 +1148,7 @@ var panel_base_SurveyPanelBase = /** @class */ (function (_super) {
|
|
|
1148
1148
|
var el = this.rootRef.current;
|
|
1149
1149
|
if (el && this.survey) {
|
|
1150
1150
|
if (this.panelBase.isPanel) {
|
|
1151
|
-
this.
|
|
1151
|
+
this.panelBase.afterRender(el);
|
|
1152
1152
|
}
|
|
1153
1153
|
else {
|
|
1154
1154
|
this.survey.afterRenderPage(el);
|
|
@@ -1488,12 +1488,11 @@ var popup_PopupContainer = /** @class */ (function (_super) {
|
|
|
1488
1488
|
}, onClick: function (ev) {
|
|
1489
1489
|
_this.clickInside(ev);
|
|
1490
1490
|
} },
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
footerContent))));
|
|
1491
|
+
headerPopup,
|
|
1492
|
+
Rn.createElement("div", { className: "sv-popup__body-content" },
|
|
1493
|
+
headerContent,
|
|
1494
|
+
Rn.createElement("div", { className: "sv-popup__scrolling-content" }, content),
|
|
1495
|
+
footerContent)));
|
|
1497
1496
|
};
|
|
1498
1497
|
PopupContainer.prototype.renderHeaderContent = function () {
|
|
1499
1498
|
return Rn.createElement("div", { className: "sv-popup__body-header" }, this.model.title);
|
|
@@ -5373,6 +5372,120 @@ ReactQuestionFactory.Instance.registerQuestion("file", function (props) {
|
|
|
5373
5372
|
return preact_module_(reactquestion_file_SurveyQuestionFile, props);
|
|
5374
5373
|
});
|
|
5375
5374
|
|
|
5375
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-item.tsx
|
|
5376
|
+
var file_item_extends = (undefined && undefined.__extends) || (function () {
|
|
5377
|
+
var extendStatics = function (d, b) {
|
|
5378
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5379
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5380
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
5381
|
+
return extendStatics(d, b);
|
|
5382
|
+
};
|
|
5383
|
+
return function (d, b) {
|
|
5384
|
+
if (typeof b !== "function" && b !== null)
|
|
5385
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
5386
|
+
extendStatics(d, b);
|
|
5387
|
+
function __() { this.constructor = d; }
|
|
5388
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5389
|
+
};
|
|
5390
|
+
})();
|
|
5391
|
+
|
|
5392
|
+
|
|
5393
|
+
|
|
5394
|
+
var file_item_SurveyFileItem = /** @class */ (function (_super) {
|
|
5395
|
+
file_item_extends(SurveyFileItem, _super);
|
|
5396
|
+
function SurveyFileItem() {
|
|
5397
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5398
|
+
}
|
|
5399
|
+
Object.defineProperty(SurveyFileItem.prototype, "question", {
|
|
5400
|
+
get: function () {
|
|
5401
|
+
return this.props.question;
|
|
5402
|
+
},
|
|
5403
|
+
enumerable: false,
|
|
5404
|
+
configurable: true
|
|
5405
|
+
});
|
|
5406
|
+
Object.defineProperty(SurveyFileItem.prototype, "item", {
|
|
5407
|
+
get: function () {
|
|
5408
|
+
return this.props.item;
|
|
5409
|
+
},
|
|
5410
|
+
enumerable: false,
|
|
5411
|
+
configurable: true
|
|
5412
|
+
});
|
|
5413
|
+
SurveyFileItem.prototype.renderFileSign = function (className, val) {
|
|
5414
|
+
var _this = this;
|
|
5415
|
+
if (!className || !val.name)
|
|
5416
|
+
return null;
|
|
5417
|
+
return (Rn.createElement("div", { className: className },
|
|
5418
|
+
Rn.createElement("a", { href: val.content, onClick: function (event) {
|
|
5419
|
+
_this.question.doDownloadFile(event, val);
|
|
5420
|
+
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
5421
|
+
};
|
|
5422
|
+
SurveyFileItem.prototype.renderElement = function () {
|
|
5423
|
+
var _this = this;
|
|
5424
|
+
var val = this.item;
|
|
5425
|
+
return (Rn.createElement("span", { className: this.question.cssClasses.previewItem, onClick: function (event) { return _this.question.doDownloadFileFromContainer(event); } },
|
|
5426
|
+
this.renderFileSign(this.question.cssClasses.fileSign, val),
|
|
5427
|
+
Rn.createElement("div", { className: this.question.getImageWrapperCss(val) },
|
|
5428
|
+
this.question.canPreviewImage(val) ? (Rn.createElement("img", { src: val.content, style: { height: this.question.imageHeight, width: this.question.imageWidth }, alt: "File preview" })) : (this.question.cssClasses.defaultImage ? (Rn.createElement(svg_icon_SvgIcon, { iconName: this.question.cssClasses.defaultImageIconId, size: "auto", className: this.question.cssClasses.defaultImage })) : null),
|
|
5429
|
+
val.name && !this.question.isReadOnly ? (Rn.createElement("div", { className: this.question.getRemoveButtonCss(), onClick: function (event) { return _this.question.doRemoveFile(val, event); } },
|
|
5430
|
+
Rn.createElement("span", { className: this.question.cssClasses.removeFile }, this.question.removeFileCaption),
|
|
5431
|
+
(this.question.cssClasses.removeFileSvgIconId) ?
|
|
5432
|
+
(Rn.createElement(svg_icon_SvgIcon, { title: this.question.removeFileCaption, iconName: this.question.cssClasses.removeFileSvgIconId, size: "auto", className: this.question.cssClasses.removeFileSvg })) : null)) : null),
|
|
5433
|
+
this.renderFileSign(this.question.cssClasses.fileSignBottom, val)));
|
|
5434
|
+
};
|
|
5435
|
+
SurveyFileItem.prototype.canRender = function () {
|
|
5436
|
+
return this.question.showPreviewContainer;
|
|
5437
|
+
};
|
|
5438
|
+
return SurveyFileItem;
|
|
5439
|
+
}(reactquestion_element_SurveyElementBase));
|
|
5440
|
+
|
|
5441
|
+
|
|
5442
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-page.tsx
|
|
5443
|
+
var file_page_extends = (undefined && undefined.__extends) || (function () {
|
|
5444
|
+
var extendStatics = function (d, b) {
|
|
5445
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5446
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5447
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
5448
|
+
return extendStatics(d, b);
|
|
5449
|
+
};
|
|
5450
|
+
return function (d, b) {
|
|
5451
|
+
if (typeof b !== "function" && b !== null)
|
|
5452
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
5453
|
+
extendStatics(d, b);
|
|
5454
|
+
function __() { this.constructor = d; }
|
|
5455
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5456
|
+
};
|
|
5457
|
+
})();
|
|
5458
|
+
|
|
5459
|
+
|
|
5460
|
+
|
|
5461
|
+
var file_page_SurveyFilePage = /** @class */ (function (_super) {
|
|
5462
|
+
file_page_extends(SurveyFilePage, _super);
|
|
5463
|
+
function SurveyFilePage() {
|
|
5464
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
5465
|
+
}
|
|
5466
|
+
Object.defineProperty(SurveyFilePage.prototype, "question", {
|
|
5467
|
+
get: function () {
|
|
5468
|
+
return this.props.question;
|
|
5469
|
+
},
|
|
5470
|
+
enumerable: false,
|
|
5471
|
+
configurable: true
|
|
5472
|
+
});
|
|
5473
|
+
Object.defineProperty(SurveyFilePage.prototype, "page", {
|
|
5474
|
+
get: function () {
|
|
5475
|
+
return this.props.page;
|
|
5476
|
+
},
|
|
5477
|
+
enumerable: false,
|
|
5478
|
+
configurable: true
|
|
5479
|
+
});
|
|
5480
|
+
SurveyFilePage.prototype.renderElement = function () {
|
|
5481
|
+
var _this = this;
|
|
5482
|
+
var items = this.page.items.map(function (item, index) { return (Rn.createElement(file_item_SurveyFileItem, { item: item, question: _this.question, key: index })); });
|
|
5483
|
+
return (Rn.createElement("div", { className: this.page.css, id: this.page.id }, items));
|
|
5484
|
+
};
|
|
5485
|
+
return SurveyFilePage;
|
|
5486
|
+
}(reactquestion_element_SurveyElementBase));
|
|
5487
|
+
|
|
5488
|
+
|
|
5376
5489
|
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-preview.tsx
|
|
5377
5490
|
var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
5378
5491
|
var extendStatics = function (d, b) {
|
|
@@ -5393,6 +5506,7 @@ var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
|
5393
5506
|
|
|
5394
5507
|
|
|
5395
5508
|
|
|
5509
|
+
|
|
5396
5510
|
var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
5397
5511
|
file_preview_extends(SurveyFilePreview, _super);
|
|
5398
5512
|
function SurveyFilePreview() {
|
|
@@ -5416,20 +5530,9 @@ var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
|
5416
5530
|
};
|
|
5417
5531
|
SurveyFilePreview.prototype.renderElement = function () {
|
|
5418
5532
|
var _this = this;
|
|
5419
|
-
var
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
return (Rn.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" } },
|
|
5423
|
-
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
|
5424
|
-
Rn.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
|
5425
|
-
_this.question.canPreviewImage(val) ? (Rn.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (Rn.createElement(svg_icon_SvgIcon, { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
|
|
5426
|
-
val.name && !_this.question.isReadOnly ? (Rn.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function (event) { return _this.question.doRemoveFile(val, event); } },
|
|
5427
|
-
Rn.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
|
|
5428
|
-
(_this.question.cssClasses.removeFileSvgIconId) ?
|
|
5429
|
-
(Rn.createElement(svg_icon_SvgIcon, { title: _this.question.removeFileCaption, iconName: _this.question.cssClasses.removeFileSvgIconId, size: "auto", className: _this.question.cssClasses.removeFileSvg })) : null)) : null),
|
|
5430
|
-
_this.renderFileSign(_this.question.cssClasses.fileSignBottom, val)));
|
|
5431
|
-
});
|
|
5432
|
-
return Rn.createElement("div", { className: this.question.cssClasses.fileList || undefined }, previews);
|
|
5533
|
+
var content = this.question.supportFileNavigator ? this.question.renderedPages.map(function (page, index) { return (Rn.createElement(file_page_SurveyFilePage, { page: page, question: _this.question, key: page.id })); })
|
|
5534
|
+
: this.question.previewValue.map(function (item, index) { return (Rn.createElement(file_item_SurveyFileItem, { item: item, question: _this.question, key: index })); });
|
|
5535
|
+
return Rn.createElement("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
|
5433
5536
|
};
|
|
5434
5537
|
SurveyFilePreview.prototype.canRender = function () {
|
|
5435
5538
|
return this.question.showPreviewContainer;
|
|
@@ -9011,8 +9114,8 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
|
|
|
9011
9114
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
9012
9115
|
}
|
|
9013
9116
|
Skeleton.prototype.render = function () {
|
|
9014
|
-
var _a;
|
|
9015
|
-
return (Rn.createElement("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.id }));
|
|
9117
|
+
var _a, _b;
|
|
9118
|
+
return (Rn.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 } }));
|
|
9016
9119
|
};
|
|
9017
9120
|
return Skeleton;
|
|
9018
9121
|
}(Rn.Component));
|
|
@@ -9382,7 +9485,7 @@ var preact = compat_module_namespaceObject;
|
|
|
9382
9485
|
|
|
9383
9486
|
|
|
9384
9487
|
|
|
9385
|
-
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.
|
|
9488
|
+
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.5", "survey-js-ui");
|
|
9386
9489
|
|
|
9387
9490
|
|
|
9388
9491
|
/***/ }),
|