survey-react 1.12.4 → 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/defaultV2.css +81 -4
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +188 -75
- package/survey.react.js +647 -284
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.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
|
*/
|
@@ -962,9 +962,9 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
962
962
|
|
963
963
|
/***/ "./src/entries/react.ts":
|
964
964
|
/*!********************************************!*\
|
965
|
-
!*** ./src/entries/react.ts +
|
965
|
+
!*** ./src/entries/react.ts + 284 modules ***!
|
966
966
|
\********************************************/
|
967
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, 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 */
|
967
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionFilePage, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, 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 */
|
968
968
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} (<- Module is not an ECMAScript module) */
|
969
969
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} (<- Module is not an ECMAScript module) */
|
970
970
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
@@ -1083,6 +1083,7 @@ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() {
|
|
1083
1083
|
__webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return /* reexport */ questionfactory_QuestionFactory; });
|
1084
1084
|
__webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return /* reexport */ questionfactory_ElementFactory; });
|
1085
1085
|
__webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return /* reexport */ question_file_QuestionFileModel; });
|
1086
|
+
__webpack_require__.d(__webpack_exports__, "QuestionFilePage", function() { return /* reexport */ question_file_QuestionFilePage; });
|
1086
1087
|
__webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return /* reexport */ question_html_QuestionHtmlModel; });
|
1087
1088
|
__webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return /* reexport */ question_radiogroup_QuestionRadiogroupModel; });
|
1088
1089
|
__webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return /* reexport */ question_rating_QuestionRatingModel; });
|
@@ -2473,8 +2474,10 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
|
|
2473
2474
|
return this.getValue(obj);
|
2474
2475
|
};
|
2475
2476
|
JsonObjectProperty.prototype.getValue = function (obj) {
|
2476
|
-
if (this.onGetValue)
|
2477
|
+
if (this.onGetValue) {
|
2478
|
+
obj = this.getOriginalObj(obj);
|
2477
2479
|
return this.onGetValue(obj);
|
2480
|
+
}
|
2478
2481
|
if (this.serializationProperty && !!obj[this.serializationProperty])
|
2479
2482
|
return obj[this.serializationProperty].getJson();
|
2480
2483
|
return obj[this.name];
|
@@ -2501,6 +2504,7 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
|
|
2501
2504
|
};
|
2502
2505
|
JsonObjectProperty.prototype.setValue = function (obj, value, jsonConv) {
|
2503
2506
|
if (this.onSetValue) {
|
2507
|
+
obj = this.getOriginalObj(obj);
|
2504
2508
|
this.onSetValue(obj, value, jsonConv);
|
2505
2509
|
}
|
2506
2510
|
else {
|
@@ -2589,7 +2593,7 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
|
|
2589
2593
|
};
|
2590
2594
|
JsonObjectProperty.prototype.isVisible = function (layout, obj) {
|
2591
2595
|
if (obj === void 0) { obj = null; }
|
2592
|
-
var isLayout = !this.layout || this.layout
|
2596
|
+
var isLayout = !this.layout || !layout || this.layout === layout;
|
2593
2597
|
if (!this.visible || !isLayout)
|
2594
2598
|
return false;
|
2595
2599
|
if (!!this.visibleIf && !!obj) {
|
@@ -9254,8 +9258,8 @@ var base_Base = /** @class */ (function () {
|
|
9254
9258
|
this.isCreating = true;
|
9255
9259
|
this.animationAllowedLock = 0;
|
9256
9260
|
//remove when knockout obsolete
|
9257
|
-
this.
|
9258
|
-
this.
|
9261
|
+
this.supportOnElementRerenderedEvent = true;
|
9262
|
+
this.onElementRerenderedEventEnabled = false;
|
9259
9263
|
this._onElementRerendered = new EventBase();
|
9260
9264
|
this.bindingsValue = new base_Bindings(this);
|
9261
9265
|
CustomPropertiesCollection.createProperties(this);
|
@@ -10192,7 +10196,7 @@ var base_Base = /** @class */ (function () {
|
|
10192
10196
|
configurable: true
|
10193
10197
|
});
|
10194
10198
|
Base.prototype.getIsAnimationAllowed = function () {
|
10195
|
-
return settings.animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed && (!!this.onElementRerendered || !this.
|
10199
|
+
return settings.animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed && (!!this.onElementRerendered || !this.supportOnElementRerenderedEvent);
|
10196
10200
|
};
|
10197
10201
|
Base.prototype.blockAnimations = function () {
|
10198
10202
|
this.animationAllowedLock--;
|
@@ -10200,17 +10204,17 @@ var base_Base = /** @class */ (function () {
|
|
10200
10204
|
Base.prototype.releaseAnimations = function () {
|
10201
10205
|
this.animationAllowedLock++;
|
10202
10206
|
};
|
10203
|
-
Base.prototype.
|
10204
|
-
this.
|
10207
|
+
Base.prototype.enableOnElementRerenderedEvent = function () {
|
10208
|
+
this.onElementRerenderedEventEnabled = true;
|
10205
10209
|
};
|
10206
|
-
Base.prototype.
|
10210
|
+
Base.prototype.disableOnElementRerenderedEvent = function () {
|
10207
10211
|
var _a;
|
10208
10212
|
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: true });
|
10209
|
-
this.
|
10213
|
+
this.onElementRerenderedEventEnabled = false;
|
10210
10214
|
};
|
10211
10215
|
Object.defineProperty(Base.prototype, "onElementRerendered", {
|
10212
10216
|
get: function () {
|
10213
|
-
return this.
|
10217
|
+
return this.supportOnElementRerenderedEvent && this.onElementRerenderedEventEnabled ? this._onElementRerendered : undefined;
|
10214
10218
|
},
|
10215
10219
|
enumerable: false,
|
10216
10220
|
configurable: true
|
@@ -10223,66 +10227,6 @@ var base_Base = /** @class */ (function () {
|
|
10223
10227
|
return Base;
|
10224
10228
|
}());
|
10225
10229
|
|
10226
|
-
var RenderingCompletedAwaiter = /** @class */ (function () {
|
10227
|
-
function RenderingCompletedAwaiter(_elements, _renderedHandler, waitingTimeout) {
|
10228
|
-
var _this = this;
|
10229
|
-
if (waitingTimeout === void 0) { waitingTimeout = 100; }
|
10230
|
-
this._elements = _elements;
|
10231
|
-
this._renderedHandler = _renderedHandler;
|
10232
|
-
this._elementsToRenderCount = 0;
|
10233
|
-
this._elementsToRenderTimer = undefined;
|
10234
|
-
this._elementRenderedHandler = function (s, o) {
|
10235
|
-
var _a;
|
10236
|
-
(_a = s.onElementRerendered) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
|
10237
|
-
_this._elementsToRenderCount--;
|
10238
|
-
if (_this._elementsToRenderCount <= 0) {
|
10239
|
-
_this.visibleElementsRendered();
|
10240
|
-
}
|
10241
|
-
};
|
10242
|
-
this._elements.forEach(function (element) {
|
10243
|
-
if (element.onElementRerendered) {
|
10244
|
-
element.onElementRerendered.add(_this._elementRenderedHandler);
|
10245
|
-
_this._elementsToRenderCount++;
|
10246
|
-
}
|
10247
|
-
});
|
10248
|
-
if (this._elementsToRenderCount > 0) {
|
10249
|
-
this._elementsToRenderTimer = setTimeout(function () {
|
10250
|
-
if (_this._elementsToRenderCount > 0) {
|
10251
|
-
_this.visibleElementsRendered();
|
10252
|
-
}
|
10253
|
-
}, waitingTimeout);
|
10254
|
-
}
|
10255
|
-
else {
|
10256
|
-
this.visibleElementsRendered();
|
10257
|
-
}
|
10258
|
-
}
|
10259
|
-
RenderingCompletedAwaiter.prototype.stopWaitingForElementsRendering = function () {
|
10260
|
-
var _this = this;
|
10261
|
-
if (this._elementsToRenderTimer) {
|
10262
|
-
clearTimeout(this._elementsToRenderTimer);
|
10263
|
-
this._elementsToRenderTimer = undefined;
|
10264
|
-
}
|
10265
|
-
this._elements.forEach(function (element) {
|
10266
|
-
var _a;
|
10267
|
-
(_a = element.onElementRerendered) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
|
10268
|
-
});
|
10269
|
-
this._elementsToRenderCount = 0;
|
10270
|
-
};
|
10271
|
-
RenderingCompletedAwaiter.prototype.visibleElementsRendered = function () {
|
10272
|
-
var renderedHandler = this._renderedHandler;
|
10273
|
-
this.dispose();
|
10274
|
-
if (typeof renderedHandler == "function") {
|
10275
|
-
renderedHandler();
|
10276
|
-
}
|
10277
|
-
};
|
10278
|
-
RenderingCompletedAwaiter.prototype.dispose = function () {
|
10279
|
-
this.stopWaitingForElementsRendering();
|
10280
|
-
this._elements = undefined;
|
10281
|
-
this._renderedHandler = undefined;
|
10282
|
-
};
|
10283
|
-
return RenderingCompletedAwaiter;
|
10284
|
-
}());
|
10285
|
-
|
10286
10230
|
var ArrayChanges = /** @class */ (function () {
|
10287
10231
|
function ArrayChanges(index, deleteCount, itemsToAdd, deletedItems) {
|
10288
10232
|
this.index = index;
|
@@ -10462,7 +10406,9 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
10462
10406
|
var _items = this.container.querySelectorAll(this.itemsSelector);
|
10463
10407
|
(_items || []).forEach(function (item, index) {
|
10464
10408
|
var currentAction = actions[index];
|
10465
|
-
|
10409
|
+
if (!!currentAction) {
|
10410
|
+
_this.calcActionDimensions(currentAction, item);
|
10411
|
+
}
|
10466
10412
|
});
|
10467
10413
|
};
|
10468
10414
|
ResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
|
@@ -13022,6 +12968,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
13022
12968
|
}
|
13023
12969
|
}
|
13024
12970
|
}, function () { return _this.renderedIsExpanded; });
|
12971
|
+
_this.onAfterRenderElement = _this.addEvent();
|
13025
12972
|
_this.name = name;
|
13026
12973
|
_this.createNewArray("errors");
|
13027
12974
|
_this.createNewArray("titleActions");
|
@@ -13051,16 +12998,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
13051
12998
|
}
|
13052
12999
|
return info;
|
13053
13000
|
};
|
13054
|
-
SurveyElement.
|
13055
|
-
var root = settings.environment.root;
|
13056
|
-
if (!elementId || typeof root === "undefined")
|
13057
|
-
return false;
|
13058
|
-
var el = root.getElementById(elementId);
|
13059
|
-
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions, doneCallback);
|
13060
|
-
};
|
13061
|
-
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
|
13062
|
-
if (!el || !el.scrollIntoView)
|
13063
|
-
return false;
|
13001
|
+
SurveyElement.IsNeedScrollIntoView = function (el, checkLeft, scrollIfVisible) {
|
13064
13002
|
var elTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
|
13065
13003
|
var needScroll = elTop < 0;
|
13066
13004
|
var elLeft = -1;
|
@@ -13076,20 +13014,55 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
13076
13014
|
needScroll = width > 0 && width < elLeft;
|
13077
13015
|
}
|
13078
13016
|
}
|
13079
|
-
|
13080
|
-
|
13081
|
-
|
13082
|
-
|
13083
|
-
|
13084
|
-
|
13085
|
-
|
13086
|
-
|
13017
|
+
return needScroll;
|
13018
|
+
};
|
13019
|
+
SurveyElement.ScrollIntoView = function (el, scrollIntoViewOptions, doneCallback) {
|
13020
|
+
el.scrollIntoView(scrollIntoViewOptions);
|
13021
|
+
if (typeof doneCallback === "function") {
|
13022
|
+
var lastPos_1 = null;
|
13023
|
+
var same_1 = 0;
|
13024
|
+
var checkPos_1 = function () {
|
13025
|
+
var newPos = el.getBoundingClientRect().top;
|
13026
|
+
if (newPos === lastPos_1) {
|
13027
|
+
if (same_1++ > 2) {
|
13087
13028
|
doneCallback();
|
13029
|
+
return;
|
13088
13030
|
}
|
13089
|
-
|
13090
|
-
|
13091
|
-
|
13092
|
-
|
13031
|
+
}
|
13032
|
+
else {
|
13033
|
+
lastPos_1 = newPos;
|
13034
|
+
same_1 = 0;
|
13035
|
+
}
|
13036
|
+
requestAnimationFrame(checkPos_1);
|
13037
|
+
};
|
13038
|
+
DomWindowHelper.requestAnimationFrame(checkPos_1);
|
13039
|
+
// let currPageXOffset = window.pageXOffset;
|
13040
|
+
// let currPageYOffset = window.pageYOffset;
|
13041
|
+
// var scrollDone = setInterval(() => {
|
13042
|
+
// DomWindowHelper.requestAnimationFrame(() => {
|
13043
|
+
// if (currPageXOffset == window.pageXOffset && currPageYOffset == window.pageYOffset) {
|
13044
|
+
// clearInterval(scrollDone);
|
13045
|
+
// doneCallback();
|
13046
|
+
// }
|
13047
|
+
// currPageXOffset = window.pageXOffset;
|
13048
|
+
// currPageYOffset = window.pageYOffset;
|
13049
|
+
// });
|
13050
|
+
// }, 25);
|
13051
|
+
}
|
13052
|
+
};
|
13053
|
+
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
|
13054
|
+
var root = settings.environment.root;
|
13055
|
+
if (!elementId || typeof root === "undefined")
|
13056
|
+
return false;
|
13057
|
+
var el = root.getElementById(elementId);
|
13058
|
+
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions, doneCallback);
|
13059
|
+
};
|
13060
|
+
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
|
13061
|
+
if (!el || !el.scrollIntoView)
|
13062
|
+
return false;
|
13063
|
+
var needScroll = SurveyElement.IsNeedScrollIntoView(el, checkLeft, scrollIfVisible);
|
13064
|
+
if (needScroll) {
|
13065
|
+
SurveyElement.ScrollIntoView(el, scrollIntoViewOptions, doneCallback);
|
13093
13066
|
}
|
13094
13067
|
return needScroll;
|
13095
13068
|
};
|
@@ -13839,7 +13812,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
13839
13812
|
};
|
13840
13813
|
Object.defineProperty(SurveyElement.prototype, "isDefaultV2Theme", {
|
13841
13814
|
get: function () {
|
13842
|
-
return this.survey && this.survey.getCss().root
|
13815
|
+
return this.survey && this.survey.getCss().root.indexOf("sd-root-modern") !== -1;
|
13843
13816
|
},
|
13844
13817
|
enumerable: false,
|
13845
13818
|
configurable: true
|
@@ -14236,12 +14209,16 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14236
14209
|
SurveyElement.prototype.getIsAnimationAllowed = function () {
|
14237
14210
|
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey && !this.survey["isEndLoadingFromJson"];
|
14238
14211
|
};
|
14212
|
+
SurveyElement.prototype.afterRenderCore = function (element) {
|
14213
|
+
this.onAfterRenderElement.fire(this, { htmlElement: element });
|
14214
|
+
};
|
14239
14215
|
SurveyElement.prototype.dispose = function () {
|
14240
14216
|
_super.prototype.dispose.call(this);
|
14241
14217
|
if (this.titleToolbarValue) {
|
14242
14218
|
this.titleToolbarValue.dispose();
|
14243
14219
|
}
|
14244
14220
|
};
|
14221
|
+
// TODO V2: get rid of this flag
|
14245
14222
|
SurveyElement.CreateDisabledDesignElements = false;
|
14246
14223
|
survey_element_decorate([
|
14247
14224
|
jsonobject_property({ defaultValue: null })
|
@@ -14274,6 +14251,66 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14274
14251
|
return SurveyElement;
|
14275
14252
|
}(survey_element_SurveyElementCore));
|
14276
14253
|
|
14254
|
+
var RenderingCompletedAwaiter = /** @class */ (function () {
|
14255
|
+
function RenderingCompletedAwaiter(_elements, _renderedHandler, waitingTimeout) {
|
14256
|
+
var _this = this;
|
14257
|
+
if (waitingTimeout === void 0) { waitingTimeout = 100; }
|
14258
|
+
this._elements = _elements;
|
14259
|
+
this._renderedHandler = _renderedHandler;
|
14260
|
+
this._elementsToRenderCount = 0;
|
14261
|
+
this._elementsToRenderTimer = undefined;
|
14262
|
+
this._elementRenderedHandler = function (s, o) {
|
14263
|
+
var _a;
|
14264
|
+
(_a = s.onAfterRenderElement) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
|
14265
|
+
_this._elementsToRenderCount--;
|
14266
|
+
if (_this._elementsToRenderCount <= 0) {
|
14267
|
+
_this.visibleElementsRendered();
|
14268
|
+
}
|
14269
|
+
};
|
14270
|
+
this._elements.forEach(function (element) {
|
14271
|
+
if (element.onAfterRenderElement) {
|
14272
|
+
element.onAfterRenderElement.add(_this._elementRenderedHandler);
|
14273
|
+
_this._elementsToRenderCount++;
|
14274
|
+
}
|
14275
|
+
});
|
14276
|
+
if (this._elementsToRenderCount > 0) {
|
14277
|
+
this._elementsToRenderTimer = setTimeout(function () {
|
14278
|
+
if (_this._elementsToRenderCount > 0) {
|
14279
|
+
_this.visibleElementsRendered();
|
14280
|
+
}
|
14281
|
+
}, waitingTimeout);
|
14282
|
+
}
|
14283
|
+
else {
|
14284
|
+
this.visibleElementsRendered();
|
14285
|
+
}
|
14286
|
+
}
|
14287
|
+
RenderingCompletedAwaiter.prototype.stopWaitingForElementsRendering = function () {
|
14288
|
+
var _this = this;
|
14289
|
+
if (this._elementsToRenderTimer) {
|
14290
|
+
clearTimeout(this._elementsToRenderTimer);
|
14291
|
+
this._elementsToRenderTimer = undefined;
|
14292
|
+
}
|
14293
|
+
this._elements.forEach(function (element) {
|
14294
|
+
var _a;
|
14295
|
+
(_a = element.onAfterRenderElement) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
|
14296
|
+
});
|
14297
|
+
this._elementsToRenderCount = 0;
|
14298
|
+
};
|
14299
|
+
RenderingCompletedAwaiter.prototype.visibleElementsRendered = function () {
|
14300
|
+
var renderedHandler = this._renderedHandler;
|
14301
|
+
this.dispose();
|
14302
|
+
if (typeof renderedHandler == "function") {
|
14303
|
+
renderedHandler();
|
14304
|
+
}
|
14305
|
+
};
|
14306
|
+
RenderingCompletedAwaiter.prototype.dispose = function () {
|
14307
|
+
this.stopWaitingForElementsRendering();
|
14308
|
+
this._elements = undefined;
|
14309
|
+
this._renderedHandler = undefined;
|
14310
|
+
};
|
14311
|
+
return RenderingCompletedAwaiter;
|
14312
|
+
}());
|
14313
|
+
|
14277
14314
|
|
14278
14315
|
// CONCATENATED MODULE: ./packages/survey-core/src/localizablestring.ts
|
14279
14316
|
|
@@ -17608,16 +17645,21 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
17608
17645
|
this.onPropertyChangedCallback = function () {
|
17609
17646
|
if (_this.element) {
|
17610
17647
|
_this.element.value = _this.getTextValue();
|
17611
|
-
|
17612
|
-
increaseHeightByContent(_this.element);
|
17613
|
-
}
|
17648
|
+
_this.updateElement();
|
17614
17649
|
}
|
17615
17650
|
};
|
17616
17651
|
this.question.registerFunctionOnPropertyValueChanged(this.options.propertyName, this.onPropertyChangedCallback, "__textarea");
|
17617
17652
|
}
|
17653
|
+
TextAreaModel.prototype.updateElement = function () {
|
17654
|
+
var _this = this;
|
17655
|
+
if (this.element && this.autoGrow) {
|
17656
|
+
setTimeout(function () { return increaseHeightByContent(_this.element); }, 1);
|
17657
|
+
}
|
17658
|
+
};
|
17618
17659
|
TextAreaModel.prototype.setElement = function (element) {
|
17619
17660
|
if (!!element) {
|
17620
17661
|
this.element = element;
|
17662
|
+
this.updateElement();
|
17621
17663
|
}
|
17622
17664
|
};
|
17623
17665
|
TextAreaModel.prototype.getTextValue = function () {
|
@@ -18887,7 +18929,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
18887
18929
|
}
|
18888
18930
|
this.checkForResponsiveness(el);
|
18889
18931
|
};
|
18890
|
-
Question.prototype.afterRenderCore = function (
|
18932
|
+
Question.prototype.afterRenderCore = function (element) {
|
18933
|
+
_super.prototype.afterRenderCore.call(this, element);
|
18891
18934
|
};
|
18892
18935
|
Question.prototype.getCommentElementsId = function () {
|
18893
18936
|
return [this.commentId];
|
@@ -30207,7 +30250,14 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30207
30250
|
});
|
30208
30251
|
Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasInvisibleRows", {
|
30209
30252
|
get: function () {
|
30210
|
-
|
30253
|
+
var rows = this.generatedVisibleRows;
|
30254
|
+
if (!Array.isArray(rows))
|
30255
|
+
return false;
|
30256
|
+
for (var i = 0; i < rows.length; i++) {
|
30257
|
+
if (!rows[i].isVisible)
|
30258
|
+
return true;
|
30259
|
+
}
|
30260
|
+
return false;
|
30211
30261
|
},
|
30212
30262
|
enumerable: false,
|
30213
30263
|
configurable: true
|
@@ -30418,7 +30468,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30418
30468
|
};
|
30419
30469
|
QuestionMatrixDropdownModelBase.prototype.clearInvisibleValuesInRows = function () {
|
30420
30470
|
var _a;
|
30421
|
-
if (this.isEmpty() || !this.isRowsFiltered)
|
30471
|
+
if (this.isEmpty() || !this.isRowsFiltered())
|
30422
30472
|
return;
|
30423
30473
|
var sharedQuestions = ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.questionsByValueName(this.getValueName())) || [];
|
30424
30474
|
if (sharedQuestions.length < 2) {
|
@@ -31698,10 +31748,10 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
31698
31748
|
};
|
31699
31749
|
_this.createLocalizableString("removeRowText", _this, false, "removeRow");
|
31700
31750
|
_this.createLocalizableString("emptyRowsText", _this, false, true);
|
31701
|
-
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
31702
|
-
_this.updateShowTableAndAddRow();
|
31703
|
-
});
|
31751
|
+
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () { _this.updateShowTableAndAddRow(); });
|
31704
31752
|
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
|
31753
|
+
_this.registerPropertyChangedHandlers(["minRowCount"], function () { _this.onMinRowCountChanged(); });
|
31754
|
+
_this.registerPropertyChangedHandlers(["maxRowCount"], function () { _this.onMaxRowCountChanged(); });
|
31705
31755
|
_this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
|
31706
31756
|
return _this;
|
31707
31757
|
}
|
@@ -31809,7 +31859,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
31809
31859
|
return (_super.prototype.isDefaultValueEmpty.call(this) && this.isValueEmpty(this.defaultRowValue));
|
31810
31860
|
};
|
31811
31861
|
QuestionMatrixDynamicModel.prototype.valueFromData = function (val) {
|
31812
|
-
if (this.minRowCount < 1)
|
31862
|
+
if (this.minRowCount < 1 || this.isEmpty())
|
31813
31863
|
return _super.prototype.valueFromData.call(this, val);
|
31814
31864
|
if (!Array.isArray(val))
|
31815
31865
|
val = [];
|
@@ -31979,14 +32029,19 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
31979
32029
|
if (val < 0)
|
31980
32030
|
val = 0;
|
31981
32031
|
this.setPropertyValue("minRowCount", val);
|
31982
|
-
if (val > this.maxRowCount)
|
31983
|
-
this.maxRowCount = val;
|
31984
|
-
if (this.rowCount < val)
|
31985
|
-
this.rowCount = val;
|
31986
32032
|
},
|
31987
32033
|
enumerable: false,
|
31988
32034
|
configurable: true
|
31989
32035
|
});
|
32036
|
+
QuestionMatrixDynamicModel.prototype.onMinRowCountChanged = function () {
|
32037
|
+
var val = this.minRowCount;
|
32038
|
+
if (val > this.maxRowCount)
|
32039
|
+
this.maxRowCount = val;
|
32040
|
+
if (this.initialRowCount < val)
|
32041
|
+
this.initialRowCount = val;
|
32042
|
+
if (this.rowCount < val)
|
32043
|
+
this.rowCount = val;
|
32044
|
+
};
|
31990
32045
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "maxRowCount", {
|
31991
32046
|
/**
|
31992
32047
|
* A maximum number of rows in the matrix. Users cannot add new rows if `rowCount` equals `maxRowCount`.
|
@@ -32007,14 +32062,17 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32007
32062
|
if (val == this.maxRowCount)
|
32008
32063
|
return;
|
32009
32064
|
this.setPropertyValue("maxRowCount", val);
|
32010
|
-
if (val < this.minRowCount)
|
32011
|
-
this.minRowCount = val;
|
32012
|
-
if (this.rowCount > val)
|
32013
|
-
this.rowCount = val;
|
32014
32065
|
},
|
32015
32066
|
enumerable: false,
|
32016
32067
|
configurable: true
|
32017
32068
|
});
|
32069
|
+
QuestionMatrixDynamicModel.prototype.onMaxRowCountChanged = function () {
|
32070
|
+
var val = this.maxRowCount;
|
32071
|
+
if (val < this.minRowCount)
|
32072
|
+
this.minRowCount = val;
|
32073
|
+
if (this.rowCount > val)
|
32074
|
+
this.rowCount = val;
|
32075
|
+
};
|
32018
32076
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "allowAddRows", {
|
32019
32077
|
/**
|
32020
32078
|
* Specifies whether users are allowed to add new rows.
|
@@ -32109,6 +32167,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32109
32167
|
this.addRow(true);
|
32110
32168
|
};
|
32111
32169
|
QuestionMatrixDynamicModel.prototype.getQuestionToFocusOnAddingRow = function () {
|
32170
|
+
if (this.visibleRows.length === 0)
|
32171
|
+
return null;
|
32112
32172
|
var row = this.visibleRows[this.visibleRows.length - 1];
|
32113
32173
|
for (var i = 0; i < row.cells.length; i++) {
|
32114
32174
|
var q = row.cells[i].question;
|
@@ -32186,8 +32246,9 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32186
32246
|
}
|
32187
32247
|
if (this.data) {
|
32188
32248
|
this.runCellsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
32189
|
-
|
32190
|
-
|
32249
|
+
var rows = this.visibleRows;
|
32250
|
+
if (this.isValueEmpty(defaultValue) && rows.length > 0) {
|
32251
|
+
var row = rows[rows.length - 1];
|
32191
32252
|
if (!this.isValueEmpty(row.value)) {
|
32192
32253
|
if (!newValue) {
|
32193
32254
|
newValue = this.createNewValue();
|
@@ -32201,8 +32262,10 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32201
32262
|
}
|
32202
32263
|
}
|
32203
32264
|
if (this.survey) {
|
32204
|
-
|
32205
|
-
|
32265
|
+
var rows = this.visibleRows;
|
32266
|
+
if (prevRowCount + 1 == this.rowCount && rows.length > 0) {
|
32267
|
+
var row = rows[rows.length - 1];
|
32268
|
+
this.survey.matrixRowAdded(this, row);
|
32206
32269
|
this.onRowsChanged();
|
32207
32270
|
}
|
32208
32271
|
}
|
@@ -32636,6 +32699,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32636
32699
|
return result;
|
32637
32700
|
};
|
32638
32701
|
QuestionMatrixDynamicModel.prototype.deleteRowValue = function (newValue, row) {
|
32702
|
+
if (!Array.isArray(newValue))
|
32703
|
+
return newValue;
|
32639
32704
|
var isEmpty = true;
|
32640
32705
|
for (var i = 0; i < newValue.length; i++) {
|
32641
32706
|
if (this.isObject(newValue[i]) && Object.keys(newValue[i]).length > 0) {
|
@@ -33477,6 +33542,7 @@ var defaultV2Css = {
|
|
33477
33542
|
changeCameraButton: "sd-file__change-camera-button",
|
33478
33543
|
takePictureButton: "sd-file__take-picture-button",
|
33479
33544
|
loadingIndicator: "sd-file__loading-indicator",
|
33545
|
+
page: "sd-file__page"
|
33480
33546
|
},
|
33481
33547
|
signaturepad: {
|
33482
33548
|
mainRoot: "sd-element sd-question sd-question--signature sd-row__question",
|
@@ -33807,7 +33873,8 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
|
|
33807
33873
|
function SurveyTimer() {
|
33808
33874
|
this.listenerCounter = 0;
|
33809
33875
|
this.timerId = -1;
|
33810
|
-
this.
|
33876
|
+
this.onTimerTick = new EventBase();
|
33877
|
+
this.onTimer = this.onTimerTick;
|
33811
33878
|
}
|
33812
33879
|
Object.defineProperty(SurveyTimer, "instance", {
|
33813
33880
|
get: function () {
|
@@ -33823,7 +33890,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
|
|
33823
33890
|
var _this = this;
|
33824
33891
|
if (func === void 0) { func = null; }
|
33825
33892
|
if (func) {
|
33826
|
-
this.
|
33893
|
+
this.onTimerTick.add(func);
|
33827
33894
|
}
|
33828
33895
|
this.prevTimeInMs = surveyTimerFunctions.now();
|
33829
33896
|
if (this.timerId < 0) {
|
@@ -33836,7 +33903,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
|
|
33836
33903
|
SurveyTimer.prototype.stop = function (func) {
|
33837
33904
|
if (func === void 0) { func = null; }
|
33838
33905
|
if (func) {
|
33839
|
-
this.
|
33906
|
+
this.onTimerTick.remove(func);
|
33840
33907
|
}
|
33841
33908
|
this.listenerCounter--;
|
33842
33909
|
if (this.listenerCounter == 0 && this.timerId > -1) {
|
@@ -33846,7 +33913,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
|
|
33846
33913
|
};
|
33847
33914
|
SurveyTimer.prototype.doTimer = function () {
|
33848
33915
|
var _this = this;
|
33849
|
-
if (this.
|
33916
|
+
if (this.onTimerTick.isEmpty || this.listenerCounter == 0) {
|
33850
33917
|
this.timerId = -1;
|
33851
33918
|
}
|
33852
33919
|
if (this.timerId < 0)
|
@@ -33858,7 +33925,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
|
|
33858
33925
|
seconds = 1;
|
33859
33926
|
}
|
33860
33927
|
var prevItem = this.timerId;
|
33861
|
-
this.
|
33928
|
+
this.onTimerTick.fire(this, { seconds: seconds });
|
33862
33929
|
//We have to check that we have the same timerId
|
33863
33930
|
//It could be changed during events execution and it will lead to double timer events
|
33864
33931
|
if (prevItem !== this.timerId)
|
@@ -33958,8 +34025,8 @@ var surveyTimerModel_SurveyTimerModel = /** @class */ (function (_super) {
|
|
33958
34025
|
}
|
33959
34026
|
this.spent = this.spent + seconds;
|
33960
34027
|
this.update();
|
33961
|
-
if (this.
|
33962
|
-
this.
|
34028
|
+
if (this.onTimerTick) {
|
34029
|
+
this.onTimerTick(page);
|
33963
34030
|
}
|
33964
34031
|
};
|
33965
34032
|
SurveyTimerModel.prototype.updateProgress = function () {
|
@@ -35710,7 +35777,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
35710
35777
|
PanelModelBase.prototype.getValue = function () {
|
35711
35778
|
var data = {};
|
35712
35779
|
this.collectValues(data, 0);
|
35713
|
-
return data;
|
35780
|
+
return helpers_Helpers.getUnbindValue(data);
|
35714
35781
|
};
|
35715
35782
|
PanelModelBase.prototype.collectValues = function (data, level) {
|
35716
35783
|
var elements = this.elements;
|
@@ -37107,6 +37174,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37107
37174
|
}
|
37108
37175
|
return this.layoutColumns.slice(0, tailIndex + 1);
|
37109
37176
|
};
|
37177
|
+
PanelModelBase.prototype.afterRender = function (el) {
|
37178
|
+
this.afterRenderCore(el);
|
37179
|
+
};
|
37110
37180
|
PanelModelBase.prototype.dispose = function () {
|
37111
37181
|
_super.prototype.dispose.call(this);
|
37112
37182
|
if (this.rows) {
|
@@ -37579,6 +37649,11 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
37579
37649
|
PanelModel.prototype.getContainerCss = function () {
|
37580
37650
|
return this.getCssRoot(this.cssClasses.panel);
|
37581
37651
|
};
|
37652
|
+
PanelModel.prototype.afterRenderCore = function (element) {
|
37653
|
+
var _a;
|
37654
|
+
_super.prototype.afterRenderCore.call(this, element);
|
37655
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.afterRenderPanel(this, element);
|
37656
|
+
};
|
37582
37657
|
return PanelModel;
|
37583
37658
|
}(panel_PanelModelBase));
|
37584
37659
|
|
@@ -37932,7 +38007,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
37932
38007
|
_this.hasShownValue = false;
|
37933
38008
|
/**
|
37934
38009
|
* A time period that a respondent has spent on this page so far; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
37935
|
-
* @see
|
38010
|
+
* @see timeLimit
|
37936
38011
|
*/
|
37937
38012
|
_this.timeSpent = 0;
|
37938
38013
|
_this.createLocalizableString("navigationDescription", _this, true);
|
@@ -38219,12 +38294,6 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
38219
38294
|
this.survey.scrollElementToTop(this, null, this, this.id);
|
38220
38295
|
}
|
38221
38296
|
};
|
38222
|
-
// public get timeSpent(): number {
|
38223
|
-
// return this.getPropertyValue("timeSpent", 0);
|
38224
|
-
// }
|
38225
|
-
// public set timeSpent(val: number) {
|
38226
|
-
// this.setPropertyValue("timeSpent", val);
|
38227
|
-
// }
|
38228
38297
|
/**
|
38229
38298
|
* Returns a list of all panels on this page.
|
38230
38299
|
* @param visibleOnly A Boolean value that specifies whether to include only visible panels.
|
@@ -38242,28 +38311,42 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
38242
38311
|
if (includingDesignTime === void 0) { includingDesignTime = false; }
|
38243
38312
|
return this.getAllPanels(visibleOnly, includingDesignTime);
|
38244
38313
|
};
|
38245
|
-
Object.defineProperty(PageModel.prototype, "
|
38314
|
+
Object.defineProperty(PageModel.prototype, "timeLimit", {
|
38246
38315
|
/**
|
38247
38316
|
* A time period that a respondent has to complete this page; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
38248
38317
|
*
|
38249
|
-
*
|
38318
|
+
* Default value: 0 (time is unlimited)
|
38250
38319
|
*
|
38251
|
-
* Alternatively, you can use the `SurveyModel`'s [`
|
38320
|
+
* Alternatively, you can use the `SurveyModel`'s [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/surveymodel#timeLimitPerPage) property to specify identical time periods for all survey pages.
|
38252
38321
|
* @see timeSpent
|
38253
38322
|
*/
|
38254
38323
|
get: function () {
|
38255
|
-
return this.getPropertyValue("
|
38324
|
+
return this.getPropertyValue("timeLimit", 0);
|
38256
38325
|
},
|
38257
38326
|
set: function (val) {
|
38258
|
-
this.setPropertyValue("
|
38327
|
+
this.setPropertyValue("timeLimit", val);
|
38328
|
+
},
|
38329
|
+
enumerable: false,
|
38330
|
+
configurable: true
|
38331
|
+
});
|
38332
|
+
Object.defineProperty(PageModel.prototype, "maxTimeToFinish", {
|
38333
|
+
/**
|
38334
|
+
* Obsolete. Use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeLimit) property instead.
|
38335
|
+
* @deprecated
|
38336
|
+
*/
|
38337
|
+
get: function () {
|
38338
|
+
return this.timeLimit;
|
38339
|
+
},
|
38340
|
+
set: function (val) {
|
38341
|
+
this.timeLimit = val;
|
38259
38342
|
},
|
38260
38343
|
enumerable: false,
|
38261
38344
|
configurable: true
|
38262
38345
|
});
|
38263
38346
|
PageModel.prototype.getMaxTimeToFinish = function () {
|
38264
|
-
if (this.
|
38265
|
-
return this.
|
38266
|
-
var res = !!this.survey ? this.survey.
|
38347
|
+
if (this.timeLimit !== 0)
|
38348
|
+
return this.timeLimit;
|
38349
|
+
var res = !!this.survey ? this.survey.timeLimitPerPage : 0;
|
38267
38350
|
return res > 0 ? res : 0;
|
38268
38351
|
};
|
38269
38352
|
PageModel.prototype.onNumChanged = function (value) { };
|
@@ -38305,7 +38388,7 @@ Serializer.addClass("page", [
|
|
38305
38388
|
default: "inherit",
|
38306
38389
|
choices: ["inherit", "show", "hide"],
|
38307
38390
|
},
|
38308
|
-
{ name: "
|
38391
|
+
{ name: "timeLimit:number", alternativeName: "maxTimeToFinish", default: 0, minValue: 0 },
|
38309
38392
|
{
|
38310
38393
|
name: "navigationTitle",
|
38311
38394
|
visibleIf: function (obj) {
|
@@ -39331,12 +39414,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39331
39414
|
* An event that is raised every second while the timer is running.
|
39332
39415
|
*
|
39333
39416
|
* Use the [`timeSpent`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeSpent) property to find out how many seconds have elapsed.
|
39334
|
-
* @see
|
39335
|
-
* @see
|
39336
|
-
* @see
|
39417
|
+
* @see timeLimit
|
39418
|
+
* @see timeLimitPerPage
|
39419
|
+
* @see showTimer
|
39420
|
+
* @see timerLocation
|
39337
39421
|
* @see startTimer
|
39338
39422
|
*/
|
39339
|
-
_this.
|
39423
|
+
_this.onTimerTick = _this.addEvent();
|
39424
|
+
/**
|
39425
|
+
* Obsolete. Use the [`onTimerTick`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTimerTick) event instead.
|
39426
|
+
* @deprecated
|
39427
|
+
*/
|
39428
|
+
_this.onTimer = _this.onTimerTick;
|
39340
39429
|
_this.onTimerPanelInfoText = _this.addEvent();
|
39341
39430
|
/**
|
39342
39431
|
* An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
@@ -39433,6 +39522,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39433
39522
|
*/
|
39434
39523
|
_this.jsonErrors = null;
|
39435
39524
|
_this.cssValue = null;
|
39525
|
+
/**
|
39526
|
+
* Specifies whether the [Complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page) should display the [survey header](https://surveyjs.io/form-library/examples/brand-your-survey-header/).
|
39527
|
+
*
|
39528
|
+
* Possible values:
|
39529
|
+
*
|
39530
|
+
* - `true` - Displays the survey header on the Complete page.
|
39531
|
+
* - `false` - Hides the header when users reach the Complete page.
|
39532
|
+
* - `"auto"` (default) - Displays a header with the basic view, but hides a header with the advanced view (see the [`headerView`](https://surveyjs.io/form-library/documentation/api-reference/itheme#headerView) property description).
|
39533
|
+
*
|
39534
|
+
* > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
|
39535
|
+
*/
|
39536
|
+
_this.showHeaderOnCompletePage = "auto";
|
39436
39537
|
_this._isLazyRenderingSuspended = false;
|
39437
39538
|
/**
|
39438
39539
|
* Specifies whether to hide validation errors thrown by the Required validation in the UI.
|
@@ -39509,7 +39610,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39509
39610
|
_this.createLocalizableString("editText", _this, false, true);
|
39510
39611
|
_this.createLocalizableString("questionTitleTemplate", _this, true);
|
39511
39612
|
_this.timerModelValue = new surveyTimerModel_SurveyTimerModel(_this);
|
39512
|
-
_this.timerModelValue.
|
39613
|
+
_this.timerModelValue.onTimerTick = function (page) {
|
39513
39614
|
_this.doTimer(page);
|
39514
39615
|
};
|
39515
39616
|
_this.createNewArray("pages", function (value) {
|
@@ -39886,7 +39987,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39886
39987
|
Object.defineProperty(SurveyModel.prototype, "bodyCss", {
|
39887
39988
|
get: function () {
|
39888
39989
|
return new CssClassBuilder().append(this.css.body)
|
39889
|
-
.append(this.css.bodyWithTimer, this.
|
39990
|
+
.append(this.css.bodyWithTimer, this.showTimer && this.state === "running")
|
39890
39991
|
.append(this.css.body + "--" + this.calculatedWidthMode).toString();
|
39891
39992
|
},
|
39892
39993
|
enumerable: false,
|
@@ -44525,7 +44626,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44525
44626
|
this.onScrollingElementToTop.fire(this, options);
|
44526
44627
|
if (!options.cancel) {
|
44527
44628
|
var elementPage_1 = this.getPageByElement(element);
|
44528
|
-
if (this.isLazyRendering) {
|
44629
|
+
if (this.isLazyRendering && !!elementPage_1) {
|
44529
44630
|
var elementsToRenderBefore = 1;
|
44530
44631
|
var rootElement = settings.environment.rootElement;
|
44531
44632
|
var surveyRootElement = this.rootElement || passedRootElement || rootElement;
|
@@ -46289,64 +46390,117 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46289
46390
|
};
|
46290
46391
|
Object.defineProperty(SurveyModel.prototype, "showTimerPanel", {
|
46291
46392
|
/**
|
46292
|
-
*
|
46393
|
+
* Obsolete. Use the [`showTimer`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer) and [`timerLocation`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerLocation) properties instead.
|
46394
|
+
* @deprecated
|
46395
|
+
*/
|
46396
|
+
get: function () {
|
46397
|
+
if (!this.showTimer)
|
46398
|
+
return "none";
|
46399
|
+
return this.timerLocation;
|
46400
|
+
},
|
46401
|
+
set: function (val) {
|
46402
|
+
this.showTimer = val !== "none";
|
46403
|
+
if (this.showTimer) {
|
46404
|
+
this.timerLocation = val;
|
46405
|
+
}
|
46406
|
+
},
|
46407
|
+
enumerable: false,
|
46408
|
+
configurable: true
|
46409
|
+
});
|
46410
|
+
Object.defineProperty(SurveyModel.prototype, "showTimer", {
|
46411
|
+
/**
|
46412
|
+
* Specifies the timer's visibility. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
46293
46413
|
*
|
46294
|
-
*
|
46414
|
+
* Default value: `false`
|
46295
46415
|
*
|
46296
|
-
*
|
46297
|
-
* - `"bottom"` - Displays the timer panel at the bottom of the survey.
|
46298
|
-
* - `"none"` (default) - Hides the timer panel.
|
46416
|
+
* If you set this property to `true`, the timer starts automatically when the survey begins. To specify time limits, use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimit) and [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimitPerPage) properties.
|
46299
46417
|
*
|
46300
|
-
*
|
46418
|
+
* The timer displays information about time spent on an individual page and the entire survey. If you want to display only the page timer or the survey timer, set the [`timerInfoMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerInfoMode) property to `"page"` or `"survey"`.
|
46301
46419
|
*
|
46302
|
-
*
|
46303
|
-
* @see
|
46304
|
-
* @see stopTimer
|
46420
|
+
* You can enable the timer without displaying it. In this case, you need to specify the required time limits and use the [`startTimer()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startTimer) and [`stopTimer()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#stopTimer) methods to control the timer.
|
46421
|
+
* @see timerLocation
|
46305
46422
|
* @see timeSpent
|
46306
|
-
* @see
|
46423
|
+
* @see onTimerTick
|
46307
46424
|
*/
|
46308
46425
|
get: function () {
|
46309
|
-
return this.getPropertyValue("
|
46426
|
+
return this.getPropertyValue("showTimer");
|
46310
46427
|
},
|
46311
46428
|
set: function (val) {
|
46312
|
-
this.setPropertyValue("
|
46429
|
+
this.setPropertyValue("showTimer", val);
|
46430
|
+
},
|
46431
|
+
enumerable: false,
|
46432
|
+
configurable: true
|
46433
|
+
});
|
46434
|
+
Object.defineProperty(SurveyModel.prototype, "timerLocation", {
|
46435
|
+
/**
|
46436
|
+
* Specifies the timer's position relative to the survey. Applies only if the [`showTimer`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer) property is set to `true`.
|
46437
|
+
*
|
46438
|
+
* Possible values:
|
46439
|
+
*
|
46440
|
+
* - `"top"` (default) - Displays the timer at the top of the survey.
|
46441
|
+
* - `"bottom"` - Displays the timer at the bottom of the survey.
|
46442
|
+
* @see onTimerTick
|
46443
|
+
*/
|
46444
|
+
get: function () {
|
46445
|
+
return this.getPropertyValue("timerLocation");
|
46446
|
+
},
|
46447
|
+
set: function (val) {
|
46448
|
+
this.setPropertyValue("timerLocation", val);
|
46313
46449
|
},
|
46314
46450
|
enumerable: false,
|
46315
46451
|
configurable: true
|
46316
46452
|
});
|
46317
46453
|
Object.defineProperty(SurveyModel.prototype, "isTimerPanelShowingOnTop", {
|
46318
46454
|
get: function () {
|
46319
|
-
return this.
|
46455
|
+
return this.showTimer && this.timerLocation === "top";
|
46320
46456
|
},
|
46321
46457
|
enumerable: false,
|
46322
46458
|
configurable: true
|
46323
46459
|
});
|
46324
46460
|
Object.defineProperty(SurveyModel.prototype, "isTimerPanelShowingOnBottom", {
|
46325
46461
|
get: function () {
|
46326
|
-
return this.
|
46462
|
+
return this.showTimer && this.timerLocation === "bottom";
|
46327
46463
|
},
|
46328
46464
|
enumerable: false,
|
46329
46465
|
configurable: true
|
46330
46466
|
});
|
46331
|
-
Object.defineProperty(SurveyModel.prototype, "
|
46467
|
+
Object.defineProperty(SurveyModel.prototype, "timerInfoMode", {
|
46332
46468
|
/**
|
46333
|
-
* Specifies whether the timer panel displays timers for the current page, the entire survey, or both. Applies only if the timer panel is [visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#
|
46469
|
+
* Specifies whether the timer panel displays timers for the current page, the entire survey, or both. Applies only if the timer panel is [visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer).
|
46334
46470
|
*
|
46335
46471
|
* Possible values:
|
46336
46472
|
*
|
46337
46473
|
* - `"survey"` - Displays only the survey timer.
|
46338
46474
|
* - `"page"` - Displays only the page timer.
|
46339
|
-
* - `"
|
46475
|
+
* - `"combined"` (default) - Displays both the survey and page timers.
|
46340
46476
|
* @see timeSpent
|
46341
|
-
* @see
|
46477
|
+
* @see onTimerTick
|
46342
46478
|
* @see startTimer
|
46343
46479
|
* @see stopTimer
|
46344
46480
|
*/
|
46345
46481
|
get: function () {
|
46346
|
-
return this.getPropertyValue("
|
46482
|
+
return this.getTimerInfoVal(this.getPropertyValue("timerInfoMode"));
|
46483
|
+
},
|
46484
|
+
set: function (val) {
|
46485
|
+
this.setPropertyValue("timerInfoMode", val);
|
46486
|
+
},
|
46487
|
+
enumerable: false,
|
46488
|
+
configurable: true
|
46489
|
+
});
|
46490
|
+
SurveyModel.prototype.getTimerInfoVal = function (val) {
|
46491
|
+
return val === "all" ? "combined" : val;
|
46492
|
+
};
|
46493
|
+
Object.defineProperty(SurveyModel.prototype, "showTimerPanelMode", {
|
46494
|
+
/**
|
46495
|
+
* Obsolete. Use the [`timerInfoMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerInfoMode) property instead.
|
46496
|
+
* @deprecated
|
46497
|
+
*/
|
46498
|
+
get: function () {
|
46499
|
+
var res = this.timerInfoMode;
|
46500
|
+
return res === "combined" ? "all" : res;
|
46347
46501
|
},
|
46348
46502
|
set: function (val) {
|
46349
|
-
this.
|
46503
|
+
this.timerInfoMode = this.getTimerInfoVal(val);
|
46350
46504
|
},
|
46351
46505
|
enumerable: false,
|
46352
46506
|
configurable: true
|
@@ -46465,11 +46619,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46465
46619
|
var pageSpent = page.timeSpent;
|
46466
46620
|
var surveySpent = this.timeSpent;
|
46467
46621
|
var pageLimitSec = page.getMaxTimeToFinish();
|
46468
|
-
var surveyLimit = this.
|
46469
|
-
if (this.
|
46622
|
+
var surveyLimit = this.timeLimit;
|
46623
|
+
if (this.timerInfoMode == "page") {
|
46470
46624
|
return { spent: pageSpent, limit: pageLimitSec };
|
46471
46625
|
}
|
46472
|
-
if (this.
|
46626
|
+
if (this.timerInfoMode == "survey") {
|
46473
46627
|
return { spent: surveySpent, limit: surveyLimit };
|
46474
46628
|
}
|
46475
46629
|
else {
|
@@ -46495,16 +46649,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46495
46649
|
var surveySpent = this.getDisplayTime(this.timeSpent);
|
46496
46650
|
var pageLimitSec = page.getMaxTimeToFinish();
|
46497
46651
|
var pageLimit = this.getDisplayTime(pageLimitSec);
|
46498
|
-
var surveyLimit = this.getDisplayTime(this.
|
46499
|
-
if (this.
|
46652
|
+
var surveyLimit = this.getDisplayTime(this.timeLimit);
|
46653
|
+
if (this.timerInfoMode == "page")
|
46500
46654
|
return this.getTimerInfoPageText(page, pageSpent, pageLimit);
|
46501
|
-
if (this.
|
46655
|
+
if (this.timerInfoMode == "survey")
|
46502
46656
|
return this.getTimerInfoSurveyText(surveySpent, surveyLimit);
|
46503
|
-
if (this.
|
46504
|
-
if (pageLimitSec <= 0 && this.
|
46657
|
+
if (this.timerInfoMode == "combined") {
|
46658
|
+
if (pageLimitSec <= 0 && this.timeLimit <= 0) {
|
46505
46659
|
return this.getLocalizationFormatString("timerSpentAll", pageSpent, surveySpent);
|
46506
46660
|
}
|
46507
|
-
if (pageLimitSec > 0 && this.
|
46661
|
+
if (pageLimitSec > 0 && this.timeLimit > 0) {
|
46508
46662
|
return this.getLocalizationFormatString("timerLimitAll", pageSpent, pageLimit, surveySpent, surveyLimit);
|
46509
46663
|
}
|
46510
46664
|
var pageText = this.getTimerInfoPageText(page, pageSpent, pageLimit);
|
@@ -46519,7 +46673,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46519
46673
|
: this.getLocalizationFormatString("timerSpentPage", pageSpent, pageLimit);
|
46520
46674
|
};
|
46521
46675
|
SurveyModel.prototype.getTimerInfoSurveyText = function (surveySpent, surveyLimit) {
|
46522
|
-
var strName = this.
|
46676
|
+
var strName = this.timeLimit > 0 ? "timerLimitSurvey" : "timerSpentSurvey";
|
46523
46677
|
return this.getLocalizationFormatString(strName, surveySpent, surveyLimit);
|
46524
46678
|
};
|
46525
46679
|
SurveyModel.prototype.getDisplayClockTime = function (val) {
|
@@ -46555,10 +46709,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46555
46709
|
/**
|
46556
46710
|
* Starts a timer that calculates how many seconds a respondent has spent on the survey. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
46557
46711
|
* @see stopTimer
|
46558
|
-
* @see
|
46559
|
-
* @see
|
46712
|
+
* @see timeLimit
|
46713
|
+
* @see timeLimitPerPage
|
46560
46714
|
* @see timeSpent
|
46561
|
-
* @see
|
46715
|
+
* @see onTimerTick
|
46562
46716
|
*/
|
46563
46717
|
SurveyModel.prototype.startTimer = function () {
|
46564
46718
|
if (this.isEditMode) {
|
@@ -46566,17 +46720,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46566
46720
|
}
|
46567
46721
|
};
|
46568
46722
|
SurveyModel.prototype.startTimerFromUI = function () {
|
46569
|
-
if (this.
|
46723
|
+
if (this.showTimer && this.state === "running") {
|
46570
46724
|
this.startTimer();
|
46571
46725
|
}
|
46572
46726
|
};
|
46573
46727
|
/**
|
46574
46728
|
* Stops the timer. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
46575
46729
|
* @see startTimer
|
46576
|
-
* @see
|
46577
|
-
* @see
|
46730
|
+
* @see timeLimit
|
46731
|
+
* @see timeLimitPerPage
|
46578
46732
|
* @see timeSpent
|
46579
|
-
* @see
|
46733
|
+
* @see onTimerTick
|
46580
46734
|
*/
|
46581
46735
|
SurveyModel.prototype.stopTimer = function () {
|
46582
46736
|
this.timerModel.stop();
|
@@ -46588,8 +46742,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46588
46742
|
* Assign a number to this property if you need to start the quiz timer from a specific time (for instance, if you want to continue an interrupted quiz).
|
46589
46743
|
*
|
46590
46744
|
* You can also find out how many seconds a respondent has spent on an individual survey page. To do this, use the [`timeSpent`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeSpent) property of a [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) object.
|
46591
|
-
* @see
|
46592
|
-
* @see
|
46745
|
+
* @see timeLimit
|
46746
|
+
* @see timeLimitPerPage
|
46593
46747
|
* @see startTimer
|
46594
46748
|
*/
|
46595
46749
|
get: function () { return this.timerModel.spent; },
|
@@ -46597,52 +46751,80 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46597
46751
|
enumerable: false,
|
46598
46752
|
configurable: true
|
46599
46753
|
});
|
46600
|
-
Object.defineProperty(SurveyModel.prototype, "
|
46754
|
+
Object.defineProperty(SurveyModel.prototype, "timeLimit", {
|
46601
46755
|
/**
|
46602
46756
|
* A time period that a respondent has to complete the survey; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
46603
46757
|
*
|
46604
|
-
*
|
46758
|
+
* Default value: 0 (time is unlimited)
|
46605
46759
|
*
|
46606
46760
|
* [View Demo](https://surveyjs.io/form-library/examples/make-quiz-javascript/ (linkStyle))
|
46607
|
-
* @see
|
46761
|
+
* @see timeLimitPerPage
|
46608
46762
|
* @see startTimer
|
46609
46763
|
* @see timeSpent
|
46610
46764
|
*/
|
46611
46765
|
get: function () {
|
46612
|
-
return this.getPropertyValue("
|
46766
|
+
return this.getPropertyValue("timeLimit", 0);
|
46613
46767
|
},
|
46614
46768
|
set: function (val) {
|
46615
|
-
this.setPropertyValue("
|
46769
|
+
this.setPropertyValue("timeLimit", val);
|
46616
46770
|
},
|
46617
46771
|
enumerable: false,
|
46618
46772
|
configurable: true
|
46619
46773
|
});
|
46620
|
-
Object.defineProperty(SurveyModel.prototype, "
|
46774
|
+
Object.defineProperty(SurveyModel.prototype, "maxTimeToFinish", {
|
46775
|
+
/**
|
46776
|
+
* Obsolete. Use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimit) property instead.
|
46777
|
+
* @deprecated
|
46778
|
+
*/
|
46779
|
+
get: function () {
|
46780
|
+
return this.timeLimit;
|
46781
|
+
},
|
46782
|
+
set: function (val) {
|
46783
|
+
this.timeLimit = val;
|
46784
|
+
},
|
46785
|
+
enumerable: false,
|
46786
|
+
configurable: true
|
46787
|
+
});
|
46788
|
+
Object.defineProperty(SurveyModel.prototype, "timeLimitPerPage", {
|
46621
46789
|
/**
|
46622
46790
|
* A time period that a respondent has to complete each survey page; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
46623
46791
|
*
|
46624
|
-
*
|
46792
|
+
* Default value: 0 (time is unlimited)
|
46625
46793
|
*
|
46626
|
-
* You can also use `PageModel`'s [`
|
46794
|
+
* You can also use `PageModel`'s [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeLimit) property to specify a time period for an individual survey page.
|
46627
46795
|
*
|
46628
46796
|
* [View Demo](https://surveyjs.io/form-library/examples/make-quiz-javascript/ (linkStyle))
|
46629
|
-
* @see
|
46797
|
+
* @see timeLimit
|
46630
46798
|
* @see startTimer
|
46631
46799
|
* @see timeSpent
|
46632
46800
|
*/
|
46633
46801
|
get: function () {
|
46634
|
-
return this.getPropertyValue("
|
46802
|
+
return this.getPropertyValue("timeLimitPerPage", 0);
|
46803
|
+
},
|
46804
|
+
set: function (val) {
|
46805
|
+
this.setPropertyValue("timeLimitPerPage", val);
|
46806
|
+
},
|
46807
|
+
enumerable: false,
|
46808
|
+
configurable: true
|
46809
|
+
});
|
46810
|
+
Object.defineProperty(SurveyModel.prototype, "maxTimeToFinishPage", {
|
46811
|
+
/**
|
46812
|
+
* Obsolete. Use the [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimitPerPage) property instead.
|
46813
|
+
* @deprecated
|
46814
|
+
*/
|
46815
|
+
get: function () {
|
46816
|
+
return this.timeLimitPerPage;
|
46635
46817
|
},
|
46636
46818
|
set: function (val) {
|
46637
|
-
this.
|
46819
|
+
this.timeLimitPerPage = val;
|
46638
46820
|
},
|
46639
46821
|
enumerable: false,
|
46640
46822
|
configurable: true
|
46641
46823
|
});
|
46642
46824
|
SurveyModel.prototype.doTimer = function (page) {
|
46643
|
-
this.
|
46644
|
-
if (this.
|
46645
|
-
this.timeSpent = this.
|
46825
|
+
this.onTimerTick.fire(this, {});
|
46826
|
+
if (this.timeLimit > 0 && this.timeLimit <= this.timeSpent) {
|
46827
|
+
this.timeSpent = this.timeLimit;
|
46646
46828
|
this.completeLastPage();
|
46647
46829
|
}
|
46648
46830
|
if (page) {
|
@@ -46950,7 +47132,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46950
47132
|
}
|
46951
47133
|
}
|
46952
47134
|
else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
|
46953
|
-
if ((this.state === "running" || this.state === "starting") && layoutElement.container === container) {
|
47135
|
+
if ((this.state === "running" || this.state === "starting" || (this.showHeaderOnCompletePage === true && this.state === "completed")) && layoutElement.container === container) {
|
46954
47136
|
containerLayoutElements.push(layoutElement);
|
46955
47137
|
}
|
46956
47138
|
}
|
@@ -47474,18 +47656,13 @@ Serializer.addClass("survey", [
|
|
47474
47656
|
default: "noPreview",
|
47475
47657
|
choices: ["noPreview", "showAllQuestions", "showAnsweredQuestions"],
|
47476
47658
|
},
|
47477
|
-
{ name: "
|
47478
|
-
{ name: "
|
47479
|
-
{
|
47480
|
-
|
47481
|
-
|
47482
|
-
choices: ["
|
47483
|
-
},
|
47484
|
-
{
|
47485
|
-
name: "showTimerPanelMode",
|
47486
|
-
default: "all",
|
47487
|
-
choices: ["page", "survey", "all"],
|
47488
|
-
},
|
47659
|
+
{ name: "showTimer:boolean" },
|
47660
|
+
{ name: "timeLimit:number", alternativeName: "maxTimeToFinish", default: 0, minValue: 0, enableIf: function (obj) { return obj.showTimer; } },
|
47661
|
+
{ name: "timeLimitPerPage:number", alternativeName: "maxTimeToFinishPage", default: 0, minValue: 0, enableIf: function (obj) { return obj.showTimer; } },
|
47662
|
+
{ name: "timerLocation", default: "top", choices: ["top", "bottom"], enableIf: function (obj) { return obj.showTimer; } },
|
47663
|
+
{ name: "timerInfoMode", alternativeName: "showTimerPanelMode",
|
47664
|
+
default: "combined", choices: ["page", "survey", "combined"], enableIf: function (obj) { return obj.showTimer; } },
|
47665
|
+
{ name: "showTimerPanel", visible: false, isSerializable: false },
|
47489
47666
|
{
|
47490
47667
|
name: "widthMode",
|
47491
47668
|
default: "auto",
|
@@ -47538,6 +47715,7 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
|
|
47538
47715
|
|
47539
47716
|
|
47540
47717
|
|
47718
|
+
|
47541
47719
|
/**
|
47542
47720
|
* A base class for multiple-choice question types ([Checkboxes](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Radio Button Group](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), etc.).
|
47543
47721
|
*/
|
@@ -48176,6 +48354,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48176
48354
|
return this.otherValueCore;
|
48177
48355
|
};
|
48178
48356
|
QuestionSelectBase.prototype.selectOtherValueFromComment = function (val) {
|
48357
|
+
if (val) {
|
48358
|
+
this.prevIsOtherSelected = true;
|
48359
|
+
}
|
48179
48360
|
this.value = val ? this.otherItem.value : undefined;
|
48180
48361
|
};
|
48181
48362
|
QuestionSelectBase.prototype.setQuestionComment = function (newValue) {
|
@@ -49768,24 +49949,8 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49768
49949
|
QuestionSelectBase.prototype.getItemEnabled = function (item) {
|
49769
49950
|
return !this.isDisabledAttr && item.isEnabled;
|
49770
49951
|
};
|
49771
|
-
QuestionSelectBase.prototype.afterRender = function (el) {
|
49772
|
-
_super.prototype.afterRender.call(this, el);
|
49773
|
-
this.rootElement = el;
|
49774
|
-
};
|
49775
|
-
QuestionSelectBase.prototype.beforeDestroyQuestionElement = function (el) {
|
49776
|
-
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
49777
|
-
this.rootElement = undefined;
|
49778
|
-
};
|
49779
49952
|
QuestionSelectBase.prototype.focusOtherComment = function () {
|
49780
|
-
|
49781
|
-
if (!!this.rootElement) {
|
49782
|
-
setTimeout(function () {
|
49783
|
-
var commentEl = _this.rootElement.querySelector("textarea");
|
49784
|
-
if (!!commentEl) {
|
49785
|
-
commentEl.focus();
|
49786
|
-
}
|
49787
|
-
}, 10);
|
49788
|
-
}
|
49953
|
+
survey_element_SurveyElement.FocusElement(this.otherId);
|
49789
49954
|
};
|
49790
49955
|
QuestionSelectBase.prototype.onValueChanged = function () {
|
49791
49956
|
_super.prototype.onValueChanged.call(this);
|
@@ -58710,7 +58875,6 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
58710
58875
|
|
58711
58876
|
|
58712
58877
|
|
58713
|
-
|
58714
58878
|
/**
|
58715
58879
|
* A class that describes the Long Text question type.
|
58716
58880
|
*
|
@@ -58859,15 +59023,8 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
58859
59023
|
QuestionCommentModel.prototype.afterRenderQuestionElement = function (el) {
|
58860
59024
|
var root = settings.environment.root;
|
58861
59025
|
this.element = root.getElementById(this.inputId) || el;
|
58862
|
-
this.updateElement();
|
58863
59026
|
_super.prototype.afterRenderQuestionElement.call(this, el);
|
58864
59027
|
};
|
58865
|
-
QuestionCommentModel.prototype.updateElement = function () {
|
58866
|
-
var _this_1 = this;
|
58867
|
-
if (this.element && this.renderedAutoGrow) {
|
58868
|
-
setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
|
58869
|
-
}
|
58870
|
-
};
|
58871
59028
|
QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
|
58872
59029
|
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
58873
59030
|
this.element = undefined;
|
@@ -58875,8 +59032,6 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
58875
59032
|
QuestionCommentModel.prototype.onInput = function (event) {
|
58876
59033
|
if (this.isInputTextUpdate)
|
58877
59034
|
this.value = event.target.value;
|
58878
|
-
else
|
58879
|
-
this.updateElement();
|
58880
59035
|
this.updateRemainingCharacterCounter(event.target.value);
|
58881
59036
|
};
|
58882
59037
|
QuestionCommentModel.prototype.onBlurCore = function (event) {
|
@@ -58889,15 +59044,6 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
58889
59044
|
event.stopPropagation();
|
58890
59045
|
}
|
58891
59046
|
};
|
58892
|
-
QuestionCommentModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
|
58893
|
-
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
58894
|
-
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
58895
|
-
this.updateElement();
|
58896
|
-
};
|
58897
|
-
QuestionCommentModel.prototype.onValueChanged = function () {
|
58898
|
-
_super.prototype.onValueChanged.call(this);
|
58899
|
-
this.updateElement();
|
58900
|
-
};
|
58901
59047
|
QuestionCommentModel.prototype.setNewValue = function (newValue) {
|
58902
59048
|
if (!this.acceptCarriageReturn && !!newValue) {
|
58903
59049
|
// eslint-disable-next-line no-control-regex
|
@@ -59175,6 +59321,7 @@ var question_file_decorate = (undefined && undefined.__decorate) || function (de
|
|
59175
59321
|
|
59176
59322
|
|
59177
59323
|
|
59324
|
+
|
59178
59325
|
function dataUrl2File(dataUrl, fileName, type) {
|
59179
59326
|
var str = atob(dataUrl.split(",")[1]);
|
59180
59327
|
var buffer = new Uint8Array(str.split("").map(function (c) { return c.charCodeAt(0); })).buffer;
|
@@ -59321,6 +59468,32 @@ var question_file_QuestionFileModelBase = /** @class */ (function (_super) {
|
|
59321
59468
|
*
|
59322
59469
|
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
59323
59470
|
*/
|
59471
|
+
var question_file_QuestionFilePage = /** @class */ (function (_super) {
|
59472
|
+
question_file_extends(QuestionFilePage, _super);
|
59473
|
+
function QuestionFilePage(question, index) {
|
59474
|
+
var _this = _super.call(this) || this;
|
59475
|
+
_this.question = question;
|
59476
|
+
_this.index = index;
|
59477
|
+
_this.id = QuestionFilePage.getId();
|
59478
|
+
return _this;
|
59479
|
+
}
|
59480
|
+
QuestionFilePage.getId = function () {
|
59481
|
+
return "sv_sfp_" + QuestionFilePage.pageCounter++;
|
59482
|
+
};
|
59483
|
+
Object.defineProperty(QuestionFilePage.prototype, "css", {
|
59484
|
+
get: function () {
|
59485
|
+
return this.question.cssClasses.page;
|
59486
|
+
},
|
59487
|
+
enumerable: false,
|
59488
|
+
configurable: true
|
59489
|
+
});
|
59490
|
+
QuestionFilePage.pageCounter = 0;
|
59491
|
+
question_file_decorate([
|
59492
|
+
propertyArray({})
|
59493
|
+
], QuestionFilePage.prototype, "items", void 0);
|
59494
|
+
return QuestionFilePage;
|
59495
|
+
}(base_Base));
|
59496
|
+
|
59324
59497
|
var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
59325
59498
|
question_file_extends(QuestionFileModel, _super);
|
59326
59499
|
function QuestionFileModel(name) {
|
@@ -59329,6 +59502,10 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59329
59502
|
_this.fileNavigator = new container_ActionContainer();
|
59330
59503
|
_this.canFlipCameraValue = undefined;
|
59331
59504
|
_this.prevPreviewLength = 0;
|
59505
|
+
_this._renderedPages = [];
|
59506
|
+
_this.pagesAnimation = new AnimationTab(_this.getPagesAnimationOptions(), function (val) {
|
59507
|
+
_this._renderedPages = val;
|
59508
|
+
}, function () { return _this.renderedPages; });
|
59332
59509
|
_this.calcAvailableItemsCount = function (availableWidth, itemWidth, gap) {
|
59333
59510
|
var itemsCount = Math.floor(availableWidth / (itemWidth + gap));
|
59334
59511
|
if ((itemsCount + 1) * (itemWidth + gap) - gap <= availableWidth)
|
@@ -59407,6 +59584,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59407
59584
|
id: "prevPage",
|
59408
59585
|
iconSize: 16,
|
59409
59586
|
action: function () {
|
59587
|
+
_this.navigationDirection = "left";
|
59410
59588
|
_this.indexToShow = _this.previewValue.length && ((_this.indexToShow - 1 + _this.pagesCount) % _this.pagesCount) || 0;
|
59411
59589
|
_this.fileIndexAction.title = _this.getFileIndexCaption();
|
59412
59590
|
}
|
@@ -59415,6 +59593,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59415
59593
|
id: "nextPage",
|
59416
59594
|
iconSize: 16,
|
59417
59595
|
action: function () {
|
59596
|
+
_this.navigationDirection = "right";
|
59418
59597
|
_this.indexToShow = _this.previewValue.length && ((_this.indexToShow + 1) % _this.pagesCount) || 0;
|
59419
59598
|
_this.fileIndexAction.title = _this.getFileIndexCaption();
|
59420
59599
|
}
|
@@ -59490,6 +59669,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59490
59669
|
_this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
|
59491
59670
|
return _this;
|
59492
59671
|
}
|
59672
|
+
Object.defineProperty(QuestionFileModel.prototype, "supportFileNavigator", {
|
59673
|
+
get: function () {
|
59674
|
+
return this.isDefaultV2Theme;
|
59675
|
+
},
|
59676
|
+
enumerable: false,
|
59677
|
+
configurable: true
|
59678
|
+
});
|
59493
59679
|
Object.defineProperty(QuestionFileModel.prototype, "isFileLoading", {
|
59494
59680
|
get: function () { return this.isFileLoadingValue; },
|
59495
59681
|
set: function (val) {
|
@@ -59623,15 +59809,42 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59623
59809
|
return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
|
59624
59810
|
};
|
59625
59811
|
QuestionFileModel.prototype.updateFileNavigator = function () {
|
59812
|
+
this.updatePages();
|
59813
|
+
this.navigationDirection = undefined;
|
59626
59814
|
this.indexToShow = this.previewValue.length && ((this.indexToShow + this.pagesCount) % this.pagesCount) || 0;
|
59627
59815
|
this.fileIndexAction.title = this.getFileIndexCaption();
|
59628
59816
|
};
|
59817
|
+
QuestionFileModel.prototype.updateRenderedPages = function () {
|
59818
|
+
if (this.pages && this.pages[this.indexToShow]) {
|
59819
|
+
this.renderedPages = [this.pages[this.indexToShow]];
|
59820
|
+
}
|
59821
|
+
};
|
59822
|
+
QuestionFileModel.prototype.updatePages = function () {
|
59823
|
+
var _this = this;
|
59824
|
+
this.blockAnimations();
|
59825
|
+
var currentPage;
|
59826
|
+
this.pages = [];
|
59827
|
+
this.renderedPages = [];
|
59828
|
+
this.previewValue.forEach(function (val, index) {
|
59829
|
+
if (index % _this.pageSize == 0) {
|
59830
|
+
currentPage = new question_file_QuestionFilePage(_this, _this.pages.length);
|
59831
|
+
_this.pages.push(currentPage);
|
59832
|
+
}
|
59833
|
+
currentPage.items.push(val);
|
59834
|
+
});
|
59835
|
+
this.releaseAnimations();
|
59836
|
+
this.updateRenderedPages();
|
59837
|
+
};
|
59629
59838
|
QuestionFileModel.prototype.previewValueChanged = function () {
|
59630
59839
|
var _this = this;
|
59840
|
+
this.navigationDirection = undefined;
|
59631
59841
|
if (this.previewValue.length !== this.prevPreviewLength) {
|
59632
59842
|
if (this.previewValue.length > 0) {
|
59633
59843
|
if (this.prevPreviewLength > this.previewValue.length) {
|
59634
|
-
|
59844
|
+
if (this.indexToShow >= this.pagesCount && this.indexToShow > 0) {
|
59845
|
+
this.indexToShow = this.pagesCount - 1;
|
59846
|
+
this.navigationDirection = "left-delete";
|
59847
|
+
}
|
59635
59848
|
}
|
59636
59849
|
else {
|
59637
59850
|
this.indexToShow = Math.floor(this.prevPreviewLength / this.pageSize);
|
@@ -59641,6 +59854,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59641
59854
|
this.indexToShow = 0;
|
59642
59855
|
}
|
59643
59856
|
}
|
59857
|
+
this.updatePages();
|
59644
59858
|
this.fileIndexAction.title = this.getFileIndexCaption();
|
59645
59859
|
this.containsMultiplyFiles = this.previewValue.length > 1;
|
59646
59860
|
if (this.previewValue.length > 0 && !this.calculatedGapBetweenItems && !this.calculatedItemWidth) {
|
@@ -59650,11 +59864,6 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
59650
59864
|
}
|
59651
59865
|
this.prevPreviewLength = this.previewValue.length;
|
59652
59866
|
};
|
59653
|
-
QuestionFileModel.prototype.isPreviewVisible = function (index) {
|
59654
|
-
var isFileNavigatorVisible = this.fileNavigatorVisible;
|
59655
|
-
var isPreviewVisible = (this.indexToShow * this.pageSize <= index && index < (this.indexToShow + 1) * this.pageSize);
|
59656
|
-
return !isFileNavigatorVisible || isPreviewVisible;
|
59657
|
-
};
|
59658
59867
|
QuestionFileModel.prototype.getType = function () {
|
59659
59868
|
return "file";
|
59660
59869
|
};
|
@@ -60100,6 +60309,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
60100
60309
|
content: content,
|
60101
60310
|
});
|
60102
60311
|
});
|
60312
|
+
this.previewValueChanged();
|
60103
60313
|
}
|
60104
60314
|
else {
|
60105
60315
|
if (!!this._previewLoader) {
|
@@ -60119,7 +60329,6 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
60119
60329
|
});
|
60120
60330
|
this._previewLoader.load(newValues);
|
60121
60331
|
}
|
60122
|
-
this.previewValueChanged();
|
60123
60332
|
};
|
60124
60333
|
QuestionFileModel.prototype.getIsQuestionReady = function () {
|
60125
60334
|
return _super.prototype.getIsQuestionReady.call(this) && !this.isFileLoading;
|
@@ -60263,6 +60472,46 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
60263
60472
|
QuestionFileModel.prototype.getFileListSelector = function () {
|
60264
60473
|
return classesToSelector(this.cssClasses.fileList);
|
60265
60474
|
};
|
60475
|
+
Object.defineProperty(QuestionFileModel.prototype, "renderedPages", {
|
60476
|
+
get: function () {
|
60477
|
+
return this._renderedPages;
|
60478
|
+
},
|
60479
|
+
set: function (val) {
|
60480
|
+
this.pagesAnimation.sync(val);
|
60481
|
+
},
|
60482
|
+
enumerable: false,
|
60483
|
+
configurable: true
|
60484
|
+
});
|
60485
|
+
QuestionFileModel.prototype.getPagesAnimationOptions = function () {
|
60486
|
+
var _this = this;
|
60487
|
+
return {
|
60488
|
+
getEnterOptions: function (page) {
|
60489
|
+
var pageClass = _this.cssClasses.page;
|
60490
|
+
return { cssClass: pageClass ? new CssClassBuilder()
|
60491
|
+
.append(pageClass + "--enter-from-left", _this.navigationDirection == "left" || _this.navigationDirection == "left-delete")
|
60492
|
+
.append(pageClass + "--enter-from-right", _this.navigationDirection == "right").toString() : ""
|
60493
|
+
};
|
60494
|
+
},
|
60495
|
+
getLeaveOptions: function (page) {
|
60496
|
+
var pageClass = _this.cssClasses.page;
|
60497
|
+
return {
|
60498
|
+
cssClass: pageClass ? new CssClassBuilder()
|
60499
|
+
.append(pageClass + "--leave-to-left", _this.navigationDirection == "right")
|
60500
|
+
.append(pageClass + "--leave-to-right", _this.navigationDirection == "left").toString() : ""
|
60501
|
+
};
|
60502
|
+
},
|
60503
|
+
getAnimatedElement: function (page) {
|
60504
|
+
var _a;
|
60505
|
+
return (_a = _this.rootElement) === null || _a === void 0 ? void 0 : _a.querySelector("#" + page.id);
|
60506
|
+
},
|
60507
|
+
isAnimationEnabled: function () {
|
60508
|
+
return _this.animationAllowed && !!_this.rootElement;
|
60509
|
+
},
|
60510
|
+
getRerenderEvent: function () {
|
60511
|
+
return _this.onElementRerendered;
|
60512
|
+
}
|
60513
|
+
};
|
60514
|
+
};
|
60266
60515
|
QuestionFileModel.prototype.triggerResponsiveness = function (hard) {
|
60267
60516
|
if (hard) {
|
60268
60517
|
this.calculatedGapBetweenItems = undefined;
|
@@ -60271,17 +60520,19 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
60271
60520
|
_super.prototype.triggerResponsiveness.call(this);
|
60272
60521
|
};
|
60273
60522
|
QuestionFileModel.prototype.processResponsiveness = function (_, availableWidth) {
|
60274
|
-
var _this = this;
|
60275
60523
|
this._width = availableWidth;
|
60276
60524
|
if (this.rootElement) {
|
60277
60525
|
if ((!this.calculatedGapBetweenItems || !this.calculatedItemWidth) && this.allowMultiple) {
|
60278
60526
|
var fileListSelector = this.getFileListSelector();
|
60279
60527
|
var fileListElement = fileListSelector ? this.rootElement.querySelector(this.getFileListSelector()) : undefined;
|
60280
60528
|
if (fileListElement) {
|
60281
|
-
|
60282
|
-
|
60283
|
-
|
60284
|
-
this.
|
60529
|
+
var visiblePage = fileListElement.querySelector(classesToSelector(this.cssClasses.page));
|
60530
|
+
if (visiblePage) {
|
60531
|
+
var firstVisibleItem = visiblePage.querySelector(classesToSelector(this.cssClasses.previewItem));
|
60532
|
+
this.calculatedGapBetweenItems = Math.ceil(Number.parseFloat(DomDocumentHelper.getComputedStyle(visiblePage).gap));
|
60533
|
+
if (firstVisibleItem) {
|
60534
|
+
this.calculatedItemWidth = Math.ceil(Number.parseFloat(DomDocumentHelper.getComputedStyle(firstVisibleItem).width));
|
60535
|
+
}
|
60285
60536
|
}
|
60286
60537
|
}
|
60287
60538
|
}
|
@@ -60334,7 +60585,12 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
60334
60585
|
propertyArray({})
|
60335
60586
|
], QuestionFileModel.prototype, "previewValue", void 0);
|
60336
60587
|
question_file_decorate([
|
60337
|
-
|
60588
|
+
propertyArray({})
|
60589
|
+
], QuestionFileModel.prototype, "pages", void 0);
|
60590
|
+
question_file_decorate([
|
60591
|
+
jsonobject_property({ defaultValue: 0, onSet: function (val, target) {
|
60592
|
+
target.updateRenderedPages();
|
60593
|
+
} })
|
60338
60594
|
], QuestionFileModel.prototype, "indexToShow", void 0);
|
60339
60595
|
question_file_decorate([
|
60340
60596
|
jsonobject_property({
|
@@ -60398,6 +60654,9 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
60398
60654
|
question_file_decorate([
|
60399
60655
|
jsonobject_property()
|
60400
60656
|
], QuestionFileModel.prototype, "locRenderedPlaceholderValue", void 0);
|
60657
|
+
question_file_decorate([
|
60658
|
+
propertyArray()
|
60659
|
+
], QuestionFileModel.prototype, "_renderedPages", void 0);
|
60401
60660
|
return QuestionFileModel;
|
60402
60661
|
}(question_file_QuestionFileModelBase));
|
60403
60662
|
|
@@ -70384,8 +70643,8 @@ Serializer.addClass("currencymask", [
|
|
70384
70643
|
|
70385
70644
|
var Version;
|
70386
70645
|
var ReleaseDate;
|
70387
|
-
Version = "" + "1.12.
|
70388
|
-
ReleaseDate = "" + "2024-10-
|
70646
|
+
Version = "" + "1.12.5";
|
70647
|
+
ReleaseDate = "" + "2024-10-07";
|
70389
70648
|
function checkLibraryVersion(ver, libraryName) {
|
70390
70649
|
if (Version != ver) {
|
70391
70650
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -80366,7 +80625,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
80366
80625
|
SurveyElementBase.prototype.makeBaseElementsReact = function () {
|
80367
80626
|
var els = this.getStateElements();
|
80368
80627
|
for (var i = 0; i < els.length; i++) {
|
80369
|
-
els[i].
|
80628
|
+
els[i].enableOnElementRerenderedEvent();
|
80370
80629
|
this.makeBaseElementReact(els[i]);
|
80371
80630
|
}
|
80372
80631
|
};
|
@@ -80378,7 +80637,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
80378
80637
|
};
|
80379
80638
|
SurveyElementBase.prototype.disableStateElementsRerenderEvent = function (els) {
|
80380
80639
|
els.forEach(function (el) {
|
80381
|
-
el.
|
80640
|
+
el.disableOnElementRerenderedEvent();
|
80382
80641
|
});
|
80383
80642
|
};
|
80384
80643
|
SurveyElementBase.prototype.getStateElements = function () {
|
@@ -80965,7 +81224,7 @@ var panel_base_SurveyPanelBase = /** @class */ (function (_super) {
|
|
80965
81224
|
var el = this.rootRef.current;
|
80966
81225
|
if (el && this.survey) {
|
80967
81226
|
if (this.panelBase.isPanel) {
|
80968
|
-
this.
|
81227
|
+
this.panelBase.afterRender(el);
|
80969
81228
|
}
|
80970
81229
|
else {
|
80971
81230
|
this.survey.afterRenderPage(el);
|
@@ -85193,6 +85452,120 @@ ReactQuestionFactory.Instance.registerQuestion("file", function (props) {
|
|
85193
85452
|
return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_file_SurveyQuestionFile, props);
|
85194
85453
|
});
|
85195
85454
|
|
85455
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-item.tsx
|
85456
|
+
var file_item_extends = (undefined && undefined.__extends) || (function () {
|
85457
|
+
var extendStatics = function (d, b) {
|
85458
|
+
extendStatics = Object.setPrototypeOf ||
|
85459
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
85460
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
85461
|
+
return extendStatics(d, b);
|
85462
|
+
};
|
85463
|
+
return function (d, b) {
|
85464
|
+
if (typeof b !== "function" && b !== null)
|
85465
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
85466
|
+
extendStatics(d, b);
|
85467
|
+
function __() { this.constructor = d; }
|
85468
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
85469
|
+
};
|
85470
|
+
})();
|
85471
|
+
|
85472
|
+
|
85473
|
+
|
85474
|
+
var file_item_SurveyFileItem = /** @class */ (function (_super) {
|
85475
|
+
file_item_extends(SurveyFileItem, _super);
|
85476
|
+
function SurveyFileItem() {
|
85477
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
85478
|
+
}
|
85479
|
+
Object.defineProperty(SurveyFileItem.prototype, "question", {
|
85480
|
+
get: function () {
|
85481
|
+
return this.props.question;
|
85482
|
+
},
|
85483
|
+
enumerable: false,
|
85484
|
+
configurable: true
|
85485
|
+
});
|
85486
|
+
Object.defineProperty(SurveyFileItem.prototype, "item", {
|
85487
|
+
get: function () {
|
85488
|
+
return this.props.item;
|
85489
|
+
},
|
85490
|
+
enumerable: false,
|
85491
|
+
configurable: true
|
85492
|
+
});
|
85493
|
+
SurveyFileItem.prototype.renderFileSign = function (className, val) {
|
85494
|
+
var _this = this;
|
85495
|
+
if (!className || !val.name)
|
85496
|
+
return null;
|
85497
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: className },
|
85498
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("a", { href: val.content, onClick: function (event) {
|
85499
|
+
_this.question.doDownloadFile(event, val);
|
85500
|
+
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
85501
|
+
};
|
85502
|
+
SurveyFileItem.prototype.renderElement = function () {
|
85503
|
+
var _this = this;
|
85504
|
+
var val = this.item;
|
85505
|
+
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); } },
|
85506
|
+
this.renderFileSign(this.question.cssClasses.fileSign, val),
|
85507
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.getImageWrapperCss(val) },
|
85508
|
+
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),
|
85509
|
+
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); } },
|
85510
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: this.question.cssClasses.removeFile }, this.question.removeFileCaption),
|
85511
|
+
(this.question.cssClasses.removeFileSvgIconId) ?
|
85512
|
+
(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),
|
85513
|
+
this.renderFileSign(this.question.cssClasses.fileSignBottom, val)));
|
85514
|
+
};
|
85515
|
+
SurveyFileItem.prototype.canRender = function () {
|
85516
|
+
return this.question.showPreviewContainer;
|
85517
|
+
};
|
85518
|
+
return SurveyFileItem;
|
85519
|
+
}(reactquestion_element_SurveyElementBase));
|
85520
|
+
|
85521
|
+
|
85522
|
+
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-page.tsx
|
85523
|
+
var file_page_extends = (undefined && undefined.__extends) || (function () {
|
85524
|
+
var extendStatics = function (d, b) {
|
85525
|
+
extendStatics = Object.setPrototypeOf ||
|
85526
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
85527
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
85528
|
+
return extendStatics(d, b);
|
85529
|
+
};
|
85530
|
+
return function (d, b) {
|
85531
|
+
if (typeof b !== "function" && b !== null)
|
85532
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
85533
|
+
extendStatics(d, b);
|
85534
|
+
function __() { this.constructor = d; }
|
85535
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
85536
|
+
};
|
85537
|
+
})();
|
85538
|
+
|
85539
|
+
|
85540
|
+
|
85541
|
+
var file_page_SurveyFilePage = /** @class */ (function (_super) {
|
85542
|
+
file_page_extends(SurveyFilePage, _super);
|
85543
|
+
function SurveyFilePage() {
|
85544
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
85545
|
+
}
|
85546
|
+
Object.defineProperty(SurveyFilePage.prototype, "question", {
|
85547
|
+
get: function () {
|
85548
|
+
return this.props.question;
|
85549
|
+
},
|
85550
|
+
enumerable: false,
|
85551
|
+
configurable: true
|
85552
|
+
});
|
85553
|
+
Object.defineProperty(SurveyFilePage.prototype, "page", {
|
85554
|
+
get: function () {
|
85555
|
+
return this.props.page;
|
85556
|
+
},
|
85557
|
+
enumerable: false,
|
85558
|
+
configurable: true
|
85559
|
+
});
|
85560
|
+
SurveyFilePage.prototype.renderElement = function () {
|
85561
|
+
var _this = this;
|
85562
|
+
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 })); });
|
85563
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.page.css, id: this.page.id }, items));
|
85564
|
+
};
|
85565
|
+
return SurveyFilePage;
|
85566
|
+
}(reactquestion_element_SurveyElementBase));
|
85567
|
+
|
85568
|
+
|
85196
85569
|
// CONCATENATED MODULE: ./packages/survey-react-ui/src/components/file/file-preview.tsx
|
85197
85570
|
var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
85198
85571
|
var extendStatics = function (d, b) {
|
@@ -85213,6 +85586,7 @@ var file_preview_extends = (undefined && undefined.__extends) || (function () {
|
|
85213
85586
|
|
85214
85587
|
|
85215
85588
|
|
85589
|
+
|
85216
85590
|
var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
85217
85591
|
file_preview_extends(SurveyFilePreview, _super);
|
85218
85592
|
function SurveyFilePreview() {
|
@@ -85236,20 +85610,9 @@ var file_preview_SurveyFilePreview = /** @class */ (function (_super) {
|
|
85236
85610
|
};
|
85237
85611
|
SurveyFilePreview.prototype.renderElement = function () {
|
85238
85612
|
var _this = this;
|
85239
|
-
var
|
85240
|
-
|
85241
|
-
|
85242
|
-
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" } },
|
85243
|
-
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
85244
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
85245
|
-
_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),
|
85246
|
-
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); } },
|
85247
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
|
85248
|
-
(_this.question.cssClasses.removeFileSvgIconId) ?
|
85249
|
-
(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),
|
85250
|
-
_this.renderFileSign(_this.question.cssClasses.fileSignBottom, val)));
|
85251
|
-
});
|
85252
|
-
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.cssClasses.fileList || undefined }, previews);
|
85613
|
+
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 })); })
|
85614
|
+
: 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 })); });
|
85615
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
85253
85616
|
};
|
85254
85617
|
SurveyFilePreview.prototype.canRender = function () {
|
85255
85618
|
return this.question.showPreviewContainer;
|