survey-core 1.12.9 → 1.12.11
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 +1 -1
- package/defaultV2.fontless.css +1 -1
- package/defaultV2.fontless.min.css +1 -1
- package/defaultV2.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +444 -228
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/actions/action.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/actions/container.d.ts +4 -1
- package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/list.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/page.d.ts +7 -2
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -1
- package/ts3.4/typings/packages/survey-core/src/popup-dropdown-view-model.d.ts +2 -4
- package/ts3.4/typings/packages/survey-core/src/popup-utils.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/popup-view-model.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/popup.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/question_buttongroup.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +2 -2
- package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +7 -3
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +17 -4
- package/ts3.4/typings/packages/survey-core/src/surveyStrings.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/utils/animation.d.ts +10 -0
- package/ts3.4/typings/packages/survey-core/src/utils/popup.d.ts +4 -1
- package/ts3.4/typings/packages/survey-core/src/utils/responsivity-manager.d.ts +3 -1
- package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +2 -1
- package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
- package/typings/packages/survey-core/src/actions/action.d.ts +1 -1
- package/typings/packages/survey-core/src/actions/container.d.ts +4 -1
- package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/typings/packages/survey-core/src/list.d.ts +1 -0
- package/typings/packages/survey-core/src/page.d.ts +8 -2
- package/typings/packages/survey-core/src/panel.d.ts +3 -1
- package/typings/packages/survey-core/src/popup-dropdown-view-model.d.ts +2 -4
- package/typings/packages/survey-core/src/popup-utils.d.ts +1 -1
- package/typings/packages/survey-core/src/popup-view-model.d.ts +1 -1
- package/typings/packages/survey-core/src/popup.d.ts +4 -0
- package/typings/packages/survey-core/src/question.d.ts +2 -0
- package/typings/packages/survey-core/src/question_buttongroup.d.ts +1 -1
- package/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +2 -2
- package/typings/packages/survey-core/src/survey-events-api.d.ts +7 -3
- package/typings/packages/survey-core/src/survey.d.ts +17 -4
- package/typings/packages/survey-core/src/surveyStrings.d.ts +1 -0
- package/typings/packages/survey-core/src/utils/animation.d.ts +10 -0
- package/typings/packages/survey-core/src/utils/popup.d.ts +4 -1
- package/typings/packages/survey-core/src/utils/responsivity-manager.d.ts +3 -1
- package/typings/packages/survey-core/src/utils/text-area.d.ts +1 -0
- package/typings/packages/survey-core/src/utils/utils.d.ts +2 -1
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.11
|
|
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
|
*/
|
|
@@ -1731,7 +1731,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
1731
1731
|
/*!*******************************************!*\
|
|
1732
1732
|
!*** ./src/entries/core.ts + 127 modules ***!
|
|
1733
1733
|
\*******************************************/
|
|
1734
|
-
/*! 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, renamedIcons, getIconNameFromProxy, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, svgBundle, 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 */
|
|
1734
|
+
/*! 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, getLocaleString, 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, renamedIcons, getIconNameFromProxy, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, svgBundle, 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 */
|
|
1735
1735
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1736
1736
|
|
|
1737
1737
|
"use strict";
|
|
@@ -1892,6 +1892,7 @@ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { retur
|
|
|
1892
1892
|
__webpack_require__.d(__webpack_exports__, "englishStrings", function() { return /* reexport */ englishStrings; });
|
|
1893
1893
|
__webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return /* reexport */ surveyLocalization; });
|
|
1894
1894
|
__webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return /* reexport */ surveyStrings; });
|
|
1895
|
+
__webpack_require__.d(__webpack_exports__, "getLocaleString", function() { return /* reexport */ getLocaleString; });
|
|
1895
1896
|
__webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return /* reexport */ QuestionCustomWidget; });
|
|
1896
1897
|
__webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return /* reexport */ questionCustomWidgets_CustomWidgetCollection; });
|
|
1897
1898
|
__webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return /* reexport */ question_custom_QuestionCustomModel; });
|
|
@@ -2837,6 +2838,10 @@ var surveyLocalization = {
|
|
|
2837
2838
|
},
|
|
2838
2839
|
onGetExternalString: function (name, locale) { return undefined; }
|
|
2839
2840
|
};
|
|
2841
|
+
function getLocaleString(strName, locale) {
|
|
2842
|
+
if (locale === void 0) { locale = null; }
|
|
2843
|
+
return surveyLocalization.getString(strName, locale);
|
|
2844
|
+
}
|
|
2840
2845
|
var surveyStrings = englishStrings;
|
|
2841
2846
|
surveyLocalization.locales["en"] = englishStrings;
|
|
2842
2847
|
surveyLocalization.localeNames["en"] = "english";
|
|
@@ -2886,7 +2891,7 @@ function getLocStringValue(target, options, key) {
|
|
|
2886
2891
|
return res;
|
|
2887
2892
|
if (typeof options.localizable === "object" && options.localizable.defaultStr) {
|
|
2888
2893
|
var loc = !!target.getLocale ? target.getLocale() : "";
|
|
2889
|
-
return
|
|
2894
|
+
return getLocaleString(options.localizable.defaultStr, loc);
|
|
2890
2895
|
}
|
|
2891
2896
|
return "";
|
|
2892
2897
|
}
|
|
@@ -4353,10 +4358,12 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
4353
4358
|
};
|
|
4354
4359
|
JsonMetadata.prototype.generateSchemaProperty = function (prop, schemaDef, isRoot) {
|
|
4355
4360
|
if (prop.isLocalizable) {
|
|
4356
|
-
return {
|
|
4361
|
+
return {
|
|
4362
|
+
oneOf: [
|
|
4357
4363
|
{ "type": "string" },
|
|
4358
4364
|
{ "$ref": this.getChemeRefName("locstring", isRoot) }
|
|
4359
|
-
]
|
|
4365
|
+
]
|
|
4366
|
+
};
|
|
4360
4367
|
}
|
|
4361
4368
|
var propType = prop.schemaType();
|
|
4362
4369
|
var refType = prop.schemaRef();
|
|
@@ -4615,7 +4622,7 @@ var jsonobject_JsonObject = /** @class */ (function () {
|
|
|
4615
4622
|
parentProps[key] = true;
|
|
4616
4623
|
dProps.forEach(function (propKey) {
|
|
4617
4624
|
if (!parentProps[propKey]) {
|
|
4618
|
-
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType,
|
|
4625
|
+
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, false, options);
|
|
4619
4626
|
}
|
|
4620
4627
|
});
|
|
4621
4628
|
}
|
|
@@ -9905,6 +9912,7 @@ var ComputedUpdater = /** @class */ (function () {
|
|
|
9905
9912
|
};
|
|
9906
9913
|
ComputedUpdater.prototype.dispose = function () {
|
|
9907
9914
|
this.clearDependencies();
|
|
9915
|
+
this._updater = undefined;
|
|
9908
9916
|
};
|
|
9909
9917
|
ComputedUpdater.ComputedUpdaterType = "__dependency_computed";
|
|
9910
9918
|
return ComputedUpdater;
|
|
@@ -10047,6 +10055,13 @@ var base_Base = /** @class */ (function () {
|
|
|
10047
10055
|
this.onPropertyValueChangedCallback = undefined;
|
|
10048
10056
|
this.isDisposedValue = true;
|
|
10049
10057
|
Object.keys(this.dependencies).forEach(function (key) { return _this.dependencies[key].dispose(); });
|
|
10058
|
+
// this.dependencies = {};
|
|
10059
|
+
Object.keys(this.propertyHash).forEach(function (key) {
|
|
10060
|
+
var propVal = _this.getPropertyValueCore(_this.propertyHash, key);
|
|
10061
|
+
if (!!propVal && propVal.type == ComputedUpdater.ComputedUpdaterType) {
|
|
10062
|
+
propVal.dispose();
|
|
10063
|
+
}
|
|
10064
|
+
});
|
|
10050
10065
|
};
|
|
10051
10066
|
Object.defineProperty(Base.prototype, "isDisposed", {
|
|
10052
10067
|
get: function () {
|
|
@@ -10586,7 +10601,7 @@ var base_Base = /** @class */ (function () {
|
|
|
10586
10601
|
return !!locOwner ? locOwner.getLocale() : "";
|
|
10587
10602
|
};
|
|
10588
10603
|
Base.prototype.getLocalizationString = function (strName) {
|
|
10589
|
-
return
|
|
10604
|
+
return getLocaleString(strName, this.getLocale());
|
|
10590
10605
|
};
|
|
10591
10606
|
Base.prototype.getLocalizationFormatString = function (strName) {
|
|
10592
10607
|
var args = [];
|
|
@@ -11052,6 +11067,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11052
11067
|
this.separatorAddConst = 1;
|
|
11053
11068
|
this.paddingSizeConst = 8;
|
|
11054
11069
|
this.dotsSizeConst = 48;
|
|
11070
|
+
this.dotsIconClass = ".sv-dots";
|
|
11071
|
+
this.iconClass = ".sv-svg-icon";
|
|
11055
11072
|
this.recalcMinDimensionConst = true;
|
|
11056
11073
|
this.getComputedStyle = function (elt) {
|
|
11057
11074
|
return DomDocumentHelper.getComputedStyle(elt);
|
|
@@ -11086,13 +11103,18 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11086
11103
|
return space;
|
|
11087
11104
|
};
|
|
11088
11105
|
ResponsivityManager.prototype.calcItemSize = function (item) {
|
|
11089
|
-
return item.offsetWidth;
|
|
11106
|
+
return item.offsetWidth || item.getBoundingClientRect().width;
|
|
11090
11107
|
};
|
|
11091
|
-
ResponsivityManager.prototype.calcMinDimension = function (currentAction) {
|
|
11092
|
-
var
|
|
11093
|
-
if (currentAction.iconSize
|
|
11094
|
-
|
|
11108
|
+
ResponsivityManager.prototype.calcMinDimension = function (currentAction, item) {
|
|
11109
|
+
var iconSize;
|
|
11110
|
+
if (!!item && (!currentAction.iconSize || currentAction.iconSize === "auto")) {
|
|
11111
|
+
var iconElement = item.querySelector(this.iconClass);
|
|
11112
|
+
iconSize = iconElement && this.calcItemSize(iconElement);
|
|
11113
|
+
}
|
|
11114
|
+
else if (currentAction.iconSize && typeof (currentAction.iconSize) === "number" && this.recalcMinDimensionConst) {
|
|
11115
|
+
iconSize = currentAction.iconSize;
|
|
11095
11116
|
}
|
|
11117
|
+
var minDimensionConst = !!iconSize ? (iconSize + 2 * this.paddingSizeConst) : this.minDimensionConst;
|
|
11096
11118
|
return currentAction.canShrink
|
|
11097
11119
|
? minDimensionConst +
|
|
11098
11120
|
(currentAction.needSeparator ? this.separatorSize : 0)
|
|
@@ -11100,7 +11122,7 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11100
11122
|
};
|
|
11101
11123
|
ResponsivityManager.prototype.calcItemsSizes = function () {
|
|
11102
11124
|
var _this = this;
|
|
11103
|
-
if (this.isInitialized)
|
|
11125
|
+
if (!this.container || this.isInitialized)
|
|
11104
11126
|
return;
|
|
11105
11127
|
var actions = this.model.actions;
|
|
11106
11128
|
var _items = this.container.querySelectorAll(this.itemsSelector);
|
|
@@ -11113,11 +11135,11 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11113
11135
|
};
|
|
11114
11136
|
ResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
|
|
11115
11137
|
currentAction.maxDimension = this.calcItemSize(item);
|
|
11116
|
-
currentAction.minDimension = this.calcMinDimension(currentAction);
|
|
11138
|
+
currentAction.minDimension = this.calcMinDimension(currentAction, item);
|
|
11117
11139
|
};
|
|
11118
11140
|
Object.defineProperty(ResponsivityManager.prototype, "isContainerVisible", {
|
|
11119
11141
|
get: function () {
|
|
11120
|
-
return isContainerVisible(this.container);
|
|
11142
|
+
return !!this.container && isContainerVisible(this.container);
|
|
11121
11143
|
},
|
|
11122
11144
|
enumerable: false,
|
|
11123
11145
|
configurable: true
|
|
@@ -11132,13 +11154,16 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11132
11154
|
var _a;
|
|
11133
11155
|
var dotsItemSize = _this.dotsItemSize;
|
|
11134
11156
|
if (!_this.dotsItemSize) {
|
|
11135
|
-
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(
|
|
11157
|
+
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(_this.dotsIconClass);
|
|
11136
11158
|
dotsItemSize = dotsItemElement && _this.calcItemSize(dotsItemElement) || _this.dotsSizeConst;
|
|
11137
11159
|
}
|
|
11138
11160
|
_this.model.fit(_this.getAvailableSpace(), dotsItemSize);
|
|
11139
11161
|
};
|
|
11140
11162
|
if (!this.isInitialized) {
|
|
11141
11163
|
var callback = function () {
|
|
11164
|
+
if (!_this.container) {
|
|
11165
|
+
return;
|
|
11166
|
+
}
|
|
11142
11167
|
_this.calcItemsSizes();
|
|
11143
11168
|
_this.isInitialized = true;
|
|
11144
11169
|
processResponsiveness_1();
|
|
@@ -11160,6 +11185,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11160
11185
|
if (!!this.resizeObserver) {
|
|
11161
11186
|
this.resizeObserver.disconnect();
|
|
11162
11187
|
}
|
|
11188
|
+
this.resizeObserver = undefined;
|
|
11189
|
+
this.container = undefined;
|
|
11163
11190
|
};
|
|
11164
11191
|
return ResponsivityManager;
|
|
11165
11192
|
}());
|
|
@@ -11372,24 +11399,45 @@ var container_ActionContainer = /** @class */ (function (_super) {
|
|
|
11372
11399
|
ActionContainer.prototype.addAction = function (val, sortByVisibleIndex) {
|
|
11373
11400
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
|
11374
11401
|
var res = this.createAction(val);
|
|
11375
|
-
this.
|
|
11376
|
-
|
|
11402
|
+
if (sortByVisibleIndex && !this.isActionVisible(res))
|
|
11403
|
+
return res;
|
|
11404
|
+
var items = [].concat(this.actions, res);
|
|
11405
|
+
this.sortItems(items);
|
|
11406
|
+
this.actions = items;
|
|
11377
11407
|
return res;
|
|
11378
11408
|
};
|
|
11379
|
-
ActionContainer.prototype.sortItems = function () {
|
|
11380
|
-
this.actions = []
|
|
11381
|
-
.concat(this.actions.filter(function (item) { return item.visibleIndex === undefined || item.visibleIndex >= 0; }))
|
|
11382
|
-
.sort(function (firstItem, secondItem) {
|
|
11383
|
-
return firstItem.visibleIndex - secondItem.visibleIndex;
|
|
11384
|
-
});
|
|
11385
|
-
};
|
|
11386
11409
|
ActionContainer.prototype.setItems = function (items, sortByVisibleIndex) {
|
|
11387
11410
|
var _this = this;
|
|
11388
11411
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
|
11389
|
-
|
|
11412
|
+
var newActions = [];
|
|
11413
|
+
items.forEach(function (item) {
|
|
11414
|
+
if (!sortByVisibleIndex || _this.isActionVisible(item)) {
|
|
11415
|
+
newActions.push(_this.createAction(item));
|
|
11416
|
+
}
|
|
11417
|
+
});
|
|
11390
11418
|
if (sortByVisibleIndex) {
|
|
11391
|
-
this.sortItems();
|
|
11419
|
+
this.sortItems(newActions);
|
|
11420
|
+
}
|
|
11421
|
+
this.actions = newActions;
|
|
11422
|
+
};
|
|
11423
|
+
ActionContainer.prototype.sortItems = function (items) {
|
|
11424
|
+
if (this.hasSetVisibleIndex(items)) {
|
|
11425
|
+
items.sort(this.compareByVisibleIndex);
|
|
11426
|
+
}
|
|
11427
|
+
};
|
|
11428
|
+
ActionContainer.prototype.hasSetVisibleIndex = function (items) {
|
|
11429
|
+
for (var i = 0; i < items.length; i++) {
|
|
11430
|
+
var index = items[i].visibleIndex;
|
|
11431
|
+
if (index !== undefined && index >= 0)
|
|
11432
|
+
return true;
|
|
11392
11433
|
}
|
|
11434
|
+
return false;
|
|
11435
|
+
};
|
|
11436
|
+
ActionContainer.prototype.compareByVisibleIndex = function (first, second) {
|
|
11437
|
+
return first.visibleIndex - second.visibleIndex;
|
|
11438
|
+
};
|
|
11439
|
+
ActionContainer.prototype.isActionVisible = function (item) {
|
|
11440
|
+
return item.visibleIndex >= 0 || item.visibleIndex === undefined;
|
|
11393
11441
|
};
|
|
11394
11442
|
ActionContainer.prototype.popupAfterShowCallback = function (itemValue) {
|
|
11395
11443
|
};
|
|
@@ -11416,6 +11464,7 @@ var container_ActionContainer = /** @class */ (function (_super) {
|
|
|
11416
11464
|
};
|
|
11417
11465
|
ActionContainer.prototype.dispose = function () {
|
|
11418
11466
|
_super.prototype.dispose.call(this);
|
|
11467
|
+
this.resetResponsivityManager();
|
|
11419
11468
|
this.actions.forEach(function (action) { return action.dispose(); });
|
|
11420
11469
|
this.actions.length = 0;
|
|
11421
11470
|
};
|
|
@@ -11717,6 +11766,10 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
|
11717
11766
|
this.actions.push(this.loadingIndicator);
|
|
11718
11767
|
}
|
|
11719
11768
|
};
|
|
11769
|
+
ListModel.prototype.setSearchEnabled = function (newValue) {
|
|
11770
|
+
this.searchEnabled = newValue;
|
|
11771
|
+
this.showSearchClearButton = newValue;
|
|
11772
|
+
};
|
|
11720
11773
|
ListModel.prototype.onSet = function () {
|
|
11721
11774
|
this.showFilter = this.searchEnabled && (this.forceShowFilter || (this.actions || []).length > ListModel.MINELEMENTCOUNT);
|
|
11722
11775
|
_super.prototype.onSet.call(this);
|
|
@@ -12046,6 +12099,9 @@ var popup_PopupModel = /** @class */ (function (_super) {
|
|
|
12046
12099
|
return options.actions;
|
|
12047
12100
|
};
|
|
12048
12101
|
PopupModel.prototype.updateDisplayMode = function (menuType) {
|
|
12102
|
+
if (this.displayMode !== menuType) {
|
|
12103
|
+
this.setWidthByTarget = menuType === "dropdown";
|
|
12104
|
+
}
|
|
12049
12105
|
switch (menuType) {
|
|
12050
12106
|
case "dropdown": {
|
|
12051
12107
|
this.displayMode = "popup";
|
|
@@ -12188,6 +12244,7 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
|
12188
12244
|
}
|
|
12189
12245
|
};
|
|
12190
12246
|
var popupModel = createPopupModelWithListModel(listOptions, popupOptions);
|
|
12247
|
+
popupModel.getTargetCallback = getActionDropdownButtonTarget;
|
|
12191
12248
|
var newActionOptions = Object.assign({}, actionOptions, {
|
|
12192
12249
|
component: "sv-action-bar-item-dropdown",
|
|
12193
12250
|
popupModel: popupModel,
|
|
@@ -12610,7 +12667,7 @@ var action_Action = /** @class */ (function (_super) {
|
|
|
12610
12667
|
Action.prototype.locTooltipChanged = function () {
|
|
12611
12668
|
if (!this.locTooltipName)
|
|
12612
12669
|
return;
|
|
12613
|
-
this.tooltip =
|
|
12670
|
+
this.tooltip = getLocaleString(this.locTooltipName, this.locTitle.locale);
|
|
12614
12671
|
};
|
|
12615
12672
|
//ILocalizableOwner
|
|
12616
12673
|
Action.prototype.getLocale = function () { return this.owner ? this.owner.getLocale() : ""; };
|
|
@@ -12619,7 +12676,9 @@ var action_Action = /** @class */ (function (_super) {
|
|
|
12619
12676
|
Action.prototype.getRenderer = function (name) { return this.owner ? this.owner.getRenderer(name) : null; };
|
|
12620
12677
|
Action.prototype.getRendererContext = function (locStr) { return this.owner ? this.owner.getRendererContext(locStr) : locStr; };
|
|
12621
12678
|
Action.prototype.setVisible = function (val) {
|
|
12622
|
-
this.
|
|
12679
|
+
if (this.visible !== val) {
|
|
12680
|
+
this._visible = val;
|
|
12681
|
+
}
|
|
12623
12682
|
};
|
|
12624
12683
|
Action.prototype.getVisible = function () {
|
|
12625
12684
|
return this._visible;
|
|
@@ -12640,15 +12699,15 @@ var action_Action = /** @class */ (function (_super) {
|
|
|
12640
12699
|
};
|
|
12641
12700
|
Action.prototype.dispose = function () {
|
|
12642
12701
|
this.updateCallback = undefined;
|
|
12702
|
+
if (!!this.locTitleValue) {
|
|
12703
|
+
this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
|
|
12704
|
+
}
|
|
12705
|
+
this.locTitleChanged = undefined;
|
|
12643
12706
|
this.action = undefined;
|
|
12644
12707
|
_super.prototype.dispose.call(this);
|
|
12645
12708
|
if (this.popupModel) {
|
|
12646
12709
|
this.popupModel.dispose();
|
|
12647
12710
|
}
|
|
12648
|
-
if (!!this.locTitleValue) {
|
|
12649
|
-
this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
|
|
12650
|
-
this.locTitleChanged = undefined;
|
|
12651
|
-
}
|
|
12652
12711
|
};
|
|
12653
12712
|
action_decorate([
|
|
12654
12713
|
jsonobject_property()
|
|
@@ -12759,7 +12818,7 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
|
12759
12818
|
innerCss: "sv-dots__item",
|
|
12760
12819
|
iconName: "icon-more",
|
|
12761
12820
|
visible: false,
|
|
12762
|
-
tooltip:
|
|
12821
|
+
tooltip: getLocaleString("more"),
|
|
12763
12822
|
}, {
|
|
12764
12823
|
items: [],
|
|
12765
12824
|
allowSelection: false
|
|
@@ -12871,6 +12930,12 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
|
12871
12930
|
}
|
|
12872
12931
|
};
|
|
12873
12932
|
AdaptiveActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
12933
|
+
if (!!this.responsivityManager) {
|
|
12934
|
+
if (this.responsivityManager.container == container) {
|
|
12935
|
+
return;
|
|
12936
|
+
}
|
|
12937
|
+
this.responsivityManager.dispose();
|
|
12938
|
+
}
|
|
12874
12939
|
this.responsivityManager = new responsivity_manager_ResponsivityManager(container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content", null, delayedUpdateFunction);
|
|
12875
12940
|
};
|
|
12876
12941
|
AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
|
|
@@ -12881,9 +12946,12 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
|
12881
12946
|
};
|
|
12882
12947
|
AdaptiveActionContainer.prototype.setActionsMode = function (mode) {
|
|
12883
12948
|
this.actions.forEach(function (action) {
|
|
12884
|
-
if (mode == "small" && action.disableShrink)
|
|
12885
|
-
|
|
12886
|
-
|
|
12949
|
+
if (mode == "small" && action.disableShrink) {
|
|
12950
|
+
action.mode = "large";
|
|
12951
|
+
}
|
|
12952
|
+
else {
|
|
12953
|
+
action.mode = mode;
|
|
12954
|
+
}
|
|
12887
12955
|
});
|
|
12888
12956
|
};
|
|
12889
12957
|
AdaptiveActionContainer.prototype.dispose = function () {
|
|
@@ -13342,11 +13410,15 @@ var animation_AnimationGroup = /** @class */ (function (_super) {
|
|
|
13342
13410
|
newValue = [].concat(newValue);
|
|
13343
13411
|
var oldValue = [].concat(this.getCurrentValue());
|
|
13344
13412
|
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
|
13345
|
-
var
|
|
13346
|
-
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
|
13347
|
-
deletedItems = [];
|
|
13348
|
-
mergedItems = newValue;
|
|
13413
|
+
var compareResult = compareArrays(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; }));
|
|
13414
|
+
if (!allowSyncRemovalAddition && (compareResult.reorderedItems.length > 0 || compareResult.addedItems.length > 0)) {
|
|
13415
|
+
compareResult.deletedItems = [];
|
|
13416
|
+
compareResult.mergedItems = newValue;
|
|
13417
|
+
}
|
|
13418
|
+
if (!!this.animationOptions.onCompareArrays) {
|
|
13419
|
+
this.animationOptions.onCompareArrays(compareResult);
|
|
13349
13420
|
}
|
|
13421
|
+
var addedItems = compareResult.addedItems, reorderedItems = compareResult.reorderedItems, deletedItems = compareResult.deletedItems, mergedItems = compareResult.mergedItems;
|
|
13350
13422
|
var runAnimationCallback = function () {
|
|
13351
13423
|
_this.animation.runGroupAnimation(_this.animationOptions, addedItems, deletedItems, reorderedItems, function () {
|
|
13352
13424
|
if (deletedItems.length > 0) {
|
|
@@ -14491,6 +14563,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
14491
14563
|
};
|
|
14492
14564
|
SurveyElement.prototype.setPage = function (parent, newPage) {
|
|
14493
14565
|
var oldPage = this.getPage(parent);
|
|
14566
|
+
this.prevSurvey = this.survey;
|
|
14494
14567
|
//fix for the creator v1: https://github.com/surveyjs/survey-creator/issues/1744
|
|
14495
14568
|
if (typeof newPage === "string") {
|
|
14496
14569
|
var survey = this.getSurvey();
|
|
@@ -14506,6 +14579,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
14506
14579
|
if (newPage) {
|
|
14507
14580
|
newPage.addElement(this, -1);
|
|
14508
14581
|
}
|
|
14582
|
+
this.prevSurvey = undefined;
|
|
14509
14583
|
};
|
|
14510
14584
|
SurveyElement.prototype.getSearchableLocKeys = function (keys) {
|
|
14511
14585
|
keys.push("title");
|
|
@@ -15177,7 +15251,7 @@ var localizablestring_LocalizableString = /** @class */ (function () {
|
|
|
15177
15251
|
};
|
|
15178
15252
|
LocalizableString.prototype.getLocalizationStr = function () {
|
|
15179
15253
|
var name = this.getLocalizationName();
|
|
15180
|
-
return !!name ?
|
|
15254
|
+
return !!name ? getLocaleString(name, this.locale) : "";
|
|
15181
15255
|
};
|
|
15182
15256
|
Object.defineProperty(LocalizableString.prototype, "hasHtml", {
|
|
15183
15257
|
get: function () {
|
|
@@ -15785,6 +15859,12 @@ function navigateToUrl(url) {
|
|
|
15785
15859
|
function wrapUrlForBackgroundImage(url) {
|
|
15786
15860
|
return !!url ? ["url(", url, ")"].join("") : "";
|
|
15787
15861
|
}
|
|
15862
|
+
function isBase64URL(url) {
|
|
15863
|
+
if (typeof url == "string") {
|
|
15864
|
+
return /^data:((?:\w+\/(?:(?!;).)+)?)((?:;[^;]+?)*),(.+)$/.test(url);
|
|
15865
|
+
}
|
|
15866
|
+
return null;
|
|
15867
|
+
}
|
|
15788
15868
|
// old-name: new-name
|
|
15789
15869
|
var renamedIcons = {
|
|
15790
15870
|
"changecamera": "flip-24x24",
|
|
@@ -15803,6 +15883,7 @@ var renamedIcons = {
|
|
|
15803
15883
|
"takepicture": "camera-32x32",
|
|
15804
15884
|
"takepicture_24x24": "camera-24x24",
|
|
15805
15885
|
"v2check": "check-16x16",
|
|
15886
|
+
"checked": "check-16x16",
|
|
15806
15887
|
"v2check_24x24": "check-24x24",
|
|
15807
15888
|
"back-to-panel_16x16": "restoredown-16x16",
|
|
15808
15889
|
"clear_16x16": "clear-16x16",
|
|
@@ -16219,9 +16300,9 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
|
|
|
16219
16300
|
var toolbar = popupViewModel.footerToolbar;
|
|
16220
16301
|
var applyBtn = toolbar.getActionById("apply");
|
|
16221
16302
|
var cancelBtn = toolbar.getActionById("cancel");
|
|
16222
|
-
cancelBtn.title =
|
|
16303
|
+
cancelBtn.title = getLocaleString("cancel", locale);
|
|
16223
16304
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
|
16224
|
-
applyBtn.title = applyTitle ||
|
|
16305
|
+
applyBtn.title = applyTitle || getLocaleString("ok", locale);
|
|
16225
16306
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
|
16226
16307
|
configConfirmDialog(popupViewModel);
|
|
16227
16308
|
return true;
|
|
@@ -17227,7 +17308,7 @@ var survey_error_SurveyError = /** @class */ (function () {
|
|
|
17227
17308
|
return !!this.errorOwner ? this.errorOwner.getLocale() : "";
|
|
17228
17309
|
};
|
|
17229
17310
|
SurveyError.prototype.getLocalizationString = function (locStrName) {
|
|
17230
|
-
return
|
|
17311
|
+
return getLocaleString(locStrName, this.getLocale());
|
|
17231
17312
|
};
|
|
17232
17313
|
SurveyError.prototype.updateText = function () {
|
|
17233
17314
|
if (this.onUpdateErrorTextCallback) {
|
|
@@ -17324,8 +17405,7 @@ var error_ExceedSizeError = /** @class */ (function (_super) {
|
|
|
17324
17405
|
return "exceedsize";
|
|
17325
17406
|
};
|
|
17326
17407
|
ExceedSizeError.prototype.getDefaultText = function () {
|
|
17327
|
-
return
|
|
17328
|
-
.getString("exceedMaxSize")["format"](this.getTextSize());
|
|
17408
|
+
return getLocaleString("exceedMaxSize")["format"](this.getTextSize());
|
|
17329
17409
|
};
|
|
17330
17410
|
ExceedSizeError.prototype.getTextSize = function () {
|
|
17331
17411
|
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
@@ -17456,8 +17536,7 @@ var error_MinRowCountError = /** @class */ (function (_super) {
|
|
|
17456
17536
|
return "minrowcounterror";
|
|
17457
17537
|
};
|
|
17458
17538
|
MinRowCountError.prototype.getDefaultText = function () {
|
|
17459
|
-
return
|
|
17460
|
-
.getString("minRowCountError")["format"](this.minRowCount);
|
|
17539
|
+
return getLocaleString("minRowCountError")["format"](this.minRowCount);
|
|
17461
17540
|
};
|
|
17462
17541
|
return MinRowCountError;
|
|
17463
17542
|
}(survey_error_SurveyError));
|
|
@@ -18418,6 +18497,9 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
|
18418
18497
|
this.updateElement();
|
|
18419
18498
|
}
|
|
18420
18499
|
};
|
|
18500
|
+
TextAreaModel.prototype.resetElement = function () {
|
|
18501
|
+
this.element = undefined;
|
|
18502
|
+
};
|
|
18421
18503
|
TextAreaModel.prototype.getTextValue = function () {
|
|
18422
18504
|
if (!!this.options.getTextValue)
|
|
18423
18505
|
return this.options.getTextValue() || "";
|
|
@@ -18574,6 +18656,7 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
|
18574
18656
|
if (this.question) {
|
|
18575
18657
|
this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName, "__textarea");
|
|
18576
18658
|
}
|
|
18659
|
+
this.resetElement();
|
|
18577
18660
|
};
|
|
18578
18661
|
return TextAreaModel;
|
|
18579
18662
|
}());
|
|
@@ -18666,8 +18749,10 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18666
18749
|
_this.createLocalizableString("commentText", _this, true, "otherItemText");
|
|
18667
18750
|
_this.createLocalizableString("requiredErrorText", _this);
|
|
18668
18751
|
_this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
|
|
18752
|
+
_this.startSetValueOnExpression();
|
|
18669
18753
|
_this.clearValue();
|
|
18670
18754
|
_this.updateValueWithDefaults();
|
|
18755
|
+
_this.finishSetValueOnExpression();
|
|
18671
18756
|
});
|
|
18672
18757
|
var setValueIfInfo = _this.addTriggerInfo("setValueIf", function () { return true; }, function () { return _this.runSetValueExpression(); });
|
|
18673
18758
|
setValueIfInfo.runSecondCheck = function (keys) { return _this.checkExpressionIf(keys); };
|
|
@@ -20418,12 +20503,13 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
20418
20503
|
_super.prototype.onSetData.call(this);
|
|
20419
20504
|
if (!this.survey)
|
|
20420
20505
|
return;
|
|
20421
|
-
this.initDataFromSurvey();
|
|
20422
|
-
this.onSurveyValueChanged(this.value);
|
|
20423
|
-
this.updateValueWithDefaults();
|
|
20424
20506
|
this.onIndentChanged();
|
|
20425
|
-
this.
|
|
20426
|
-
|
|
20507
|
+
if (!this.isDesignMode) {
|
|
20508
|
+
this.initDataFromSurvey();
|
|
20509
|
+
this.onSurveyValueChanged(this.value);
|
|
20510
|
+
this.updateValueWithDefaults();
|
|
20511
|
+
this.updateIsAnswered();
|
|
20512
|
+
}
|
|
20427
20513
|
};
|
|
20428
20514
|
Question.prototype.initDataFromSurvey = function () {
|
|
20429
20515
|
if (!!this.data) {
|
|
@@ -21033,10 +21119,20 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
21033
21119
|
var _this = this;
|
|
21034
21120
|
this.runExpressionSetValueCore(val, function (val) {
|
|
21035
21121
|
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
21122
|
+
_this.startSetValueOnExpression();
|
|
21036
21123
|
_this.value = val;
|
|
21124
|
+
_this.finishSetValueOnExpression();
|
|
21037
21125
|
}
|
|
21038
21126
|
});
|
|
21039
21127
|
};
|
|
21128
|
+
Question.prototype.startSetValueOnExpression = function () {
|
|
21129
|
+
var _a;
|
|
21130
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.startSetValueOnExpression();
|
|
21131
|
+
};
|
|
21132
|
+
Question.prototype.finishSetValueOnExpression = function () {
|
|
21133
|
+
var _a;
|
|
21134
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.finishSetValueOnExpression();
|
|
21135
|
+
};
|
|
21040
21136
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
|
21041
21137
|
var _this = this;
|
|
21042
21138
|
if (values === void 0) { values = null; }
|
|
@@ -21113,7 +21209,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
21113
21209
|
};
|
|
21114
21210
|
Object.defineProperty(Question.prototype, "isAnswered", {
|
|
21115
21211
|
get: function () {
|
|
21116
|
-
return this.getPropertyValue("isAnswered");
|
|
21212
|
+
return this.getPropertyValue("isAnswered") || false;
|
|
21117
21213
|
},
|
|
21118
21214
|
set: function (val) {
|
|
21119
21215
|
this.setPropertyValue("isAnswered", val);
|
|
@@ -22573,7 +22669,9 @@ var itemvalue_ItemValue = /** @class */ (function (_super) {
|
|
|
22573
22669
|
return isVisible && visible;
|
|
22574
22670
|
};
|
|
22575
22671
|
ItemValue.prototype.setVisible = function (val) {
|
|
22576
|
-
this.
|
|
22672
|
+
if (this.visible !== val) {
|
|
22673
|
+
this._visible = val;
|
|
22674
|
+
}
|
|
22577
22675
|
};
|
|
22578
22676
|
ItemValue.prototype.getLocTitle = function () {
|
|
22579
22677
|
return this.locText;
|
|
@@ -25471,18 +25569,15 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
|
25471
25569
|
}
|
|
25472
25570
|
Object.defineProperty(QuestionFactory, "DefaultChoices", {
|
|
25473
25571
|
get: function () {
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
surveyLocalization.getString("choices_Item") + "2",
|
|
25477
|
-
surveyLocalization.getString("choices_Item") + "3",
|
|
25478
|
-
];
|
|
25572
|
+
var choice = getLocaleString("choices_Item");
|
|
25573
|
+
return [choice + "1", choice + "2", choice + "3"];
|
|
25479
25574
|
},
|
|
25480
25575
|
enumerable: false,
|
|
25481
25576
|
configurable: true
|
|
25482
25577
|
});
|
|
25483
25578
|
Object.defineProperty(QuestionFactory, "DefaultColums", {
|
|
25484
25579
|
get: function () {
|
|
25485
|
-
var colName =
|
|
25580
|
+
var colName = getLocaleString("matrix_column") + " ";
|
|
25486
25581
|
return [colName + "1", colName + "2", colName + "3"];
|
|
25487
25582
|
},
|
|
25488
25583
|
enumerable: false,
|
|
@@ -25490,7 +25585,7 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
|
25490
25585
|
});
|
|
25491
25586
|
Object.defineProperty(QuestionFactory, "DefaultRows", {
|
|
25492
25587
|
get: function () {
|
|
25493
|
-
var rowName =
|
|
25588
|
+
var rowName = getLocaleString("matrix_row") + " ";
|
|
25494
25589
|
return [rowName + "1", rowName + "2"];
|
|
25495
25590
|
},
|
|
25496
25591
|
enumerable: false,
|
|
@@ -25498,7 +25593,7 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
|
25498
25593
|
});
|
|
25499
25594
|
Object.defineProperty(QuestionFactory, "DefaultMutlipleTextItems", {
|
|
25500
25595
|
get: function () {
|
|
25501
|
-
var itemName =
|
|
25596
|
+
var itemName = getLocaleString("multipletext_itemname");
|
|
25502
25597
|
return [itemName + "1", itemName + "2"];
|
|
25503
25598
|
},
|
|
25504
25599
|
enumerable: false,
|
|
@@ -26198,26 +26293,18 @@ var matrixDropdownColumnTypes = {
|
|
|
26198
26293
|
*/
|
|
26199
26294
|
var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
26200
26295
|
question_matrixdropdowncolumn_extends(MatrixDropdownColumn, _super);
|
|
26201
|
-
function MatrixDropdownColumn(name, title) {
|
|
26202
|
-
if (title === void 0) { title = null; }
|
|
26296
|
+
function MatrixDropdownColumn(name, title, colOwner) {
|
|
26203
26297
|
var _this = _super.call(this) || this;
|
|
26204
|
-
_this.colOwnerValue = null;
|
|
26205
26298
|
_this.indexValue = -1;
|
|
26206
26299
|
_this._hasVisibleCell = true;
|
|
26207
26300
|
_this.isColumnsVisibleIf = true;
|
|
26208
26301
|
_this.previousChoicesId = undefined;
|
|
26302
|
+
_this.colOwnerValue = colOwner;
|
|
26209
26303
|
_this.createLocalizableString("totalFormat", _this);
|
|
26210
26304
|
_this.createLocalizableString("cellHint", _this);
|
|
26211
26305
|
_this.registerPropertyChangedHandlers(["showInMultipleColumns"], function () { _this.doShowInMultipleColumnsChanged(); });
|
|
26212
26306
|
_this.registerPropertyChangedHandlers(["visible"], function () { _this.doColumnVisibilityChanged(); });
|
|
26213
|
-
_this.updateTemplateQuestion();
|
|
26214
|
-
_this.name = name;
|
|
26215
|
-
if (title) {
|
|
26216
|
-
_this.title = title;
|
|
26217
|
-
}
|
|
26218
|
-
else {
|
|
26219
|
-
_this.templateQuestion.locTitle.strChanged();
|
|
26220
|
-
}
|
|
26307
|
+
_this.updateTemplateQuestion(undefined, name, title);
|
|
26221
26308
|
return _this;
|
|
26222
26309
|
}
|
|
26223
26310
|
MatrixDropdownColumn.getColumnTypes = function () {
|
|
@@ -27019,7 +27106,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
27019
27106
|
return this.colOwner.getCellType();
|
|
27020
27107
|
return settings.matrix.defaultCellType;
|
|
27021
27108
|
};
|
|
27022
|
-
MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType) {
|
|
27109
|
+
MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType, name, title) {
|
|
27023
27110
|
var _this = this;
|
|
27024
27111
|
var curCellType = this.getDefaultCellQuestionType(newCellType);
|
|
27025
27112
|
var prevCellType = this.templateQuestion
|
|
@@ -27033,6 +27120,15 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
|
27033
27120
|
this.templateQuestionValue = this.createNewQuestion(curCellType);
|
|
27034
27121
|
this.templateQuestion.locOwner = this;
|
|
27035
27122
|
this.addProperties(curCellType);
|
|
27123
|
+
if (!!name) {
|
|
27124
|
+
this.name = name;
|
|
27125
|
+
}
|
|
27126
|
+
if (!!title) {
|
|
27127
|
+
this.title = title;
|
|
27128
|
+
}
|
|
27129
|
+
else {
|
|
27130
|
+
this.templateQuestion.locTitle.strChanged();
|
|
27131
|
+
}
|
|
27036
27132
|
this.templateQuestion.onPropertyChanged.add(function (sender, options) {
|
|
27037
27133
|
_this.propertyValueChanged(options.name, options.oldValue, options.newValue, options.arrayChanges, options.target);
|
|
27038
27134
|
});
|
|
@@ -30375,8 +30471,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
30375
30471
|
configurable: true
|
|
30376
30472
|
});
|
|
30377
30473
|
QuestionMatrixDropdownModelBase.prototype.addColumn = function (name, title) {
|
|
30378
|
-
|
|
30379
|
-
var column = new question_matrixdropdowncolumn_MatrixDropdownColumn(name, title);
|
|
30474
|
+
var column = new question_matrixdropdowncolumn_MatrixDropdownColumn(name, title, this);
|
|
30380
30475
|
this.columns.push(column);
|
|
30381
30476
|
return column;
|
|
30382
30477
|
};
|
|
@@ -34658,7 +34753,7 @@ var dxSurveyService_dxSurveyService = /** @class */ (function () {
|
|
|
34658
34753
|
if (clientId === void 0) { clientId = null; }
|
|
34659
34754
|
if (isPartialCompleted === void 0) { isPartialCompleted = false; }
|
|
34660
34755
|
if (!this.canSendResult(result)) {
|
|
34661
|
-
onSendResult(false,
|
|
34756
|
+
onSendResult(false, getLocaleString("savingExceedSize", this.locale), undefined);
|
|
34662
34757
|
}
|
|
34663
34758
|
else {
|
|
34664
34759
|
this.sendResultCore(postId, result, onSendResult, clientId, isPartialCompleted);
|
|
@@ -36291,7 +36386,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36291
36386
|
};
|
|
36292
36387
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
|
36293
36388
|
get: function () {
|
|
36294
|
-
return ((this.canShowTitle() && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
|
36389
|
+
return ((this.canShowTitle(this.survey) && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
|
36295
36390
|
(this.isDesignMode && !(settings.supportCreatorV2 && this.isPanel) && this.showTitle && settings.designMode.showEmptyTitles));
|
|
36296
36391
|
},
|
|
36297
36392
|
enumerable: false,
|
|
@@ -36316,7 +36411,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36316
36411
|
}
|
|
36317
36412
|
};
|
|
36318
36413
|
PanelModelBase.prototype.removeFromParent = function () { };
|
|
36319
|
-
PanelModelBase.prototype.canShowTitle = function () { return true; };
|
|
36414
|
+
PanelModelBase.prototype.canShowTitle = function (survey) { return true; };
|
|
36320
36415
|
Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
|
|
36321
36416
|
get: function () {
|
|
36322
36417
|
if (!this.hasTitle && this.isDesignMode)
|
|
@@ -36901,7 +36996,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36901
36996
|
PanelModelBase.prototype.hasErrorsInPanels = function (rec) {
|
|
36902
36997
|
var errors = [];
|
|
36903
36998
|
this.hasRequiredError(rec, errors);
|
|
36904
|
-
if (this.survey) {
|
|
36999
|
+
if (this.isPanel && this.survey) {
|
|
36905
37000
|
var customError = this.survey.validatePanel(this);
|
|
36906
37001
|
if (customError) {
|
|
36907
37002
|
errors.push(customError);
|
|
@@ -37418,29 +37513,29 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
37418
37513
|
}
|
|
37419
37514
|
}
|
|
37420
37515
|
};
|
|
37516
|
+
PanelModelBase.prototype.canFireAddRemoveNotifications = function (element) {
|
|
37517
|
+
return !!this.survey && element.prevSurvey !== this.survey;
|
|
37518
|
+
};
|
|
37421
37519
|
PanelModelBase.prototype.onAddElement = function (element, index) {
|
|
37422
37520
|
var _this = this;
|
|
37521
|
+
var survey = this.survey;
|
|
37522
|
+
var fireNotification = this.canFireAddRemoveNotifications(element);
|
|
37423
37523
|
element.setSurveyImpl(this.surveyImpl);
|
|
37424
37524
|
element.parent = this;
|
|
37425
37525
|
this.markQuestionListDirty();
|
|
37426
37526
|
if (this.canBuildRows()) {
|
|
37427
37527
|
this.updateRowsOnElementAdded(element);
|
|
37428
37528
|
}
|
|
37429
|
-
if (
|
|
37430
|
-
|
|
37431
|
-
|
|
37432
|
-
this.survey.panelAdded(p, index, this, this.root);
|
|
37529
|
+
if (fireNotification) {
|
|
37530
|
+
if (element.isPanel) {
|
|
37531
|
+
survey.panelAdded(element, index, this, this.root);
|
|
37433
37532
|
}
|
|
37434
|
-
|
|
37435
|
-
|
|
37436
|
-
if (this.survey) {
|
|
37437
|
-
var q = element;
|
|
37438
|
-
this.survey.questionAdded(q, index, this, this.root);
|
|
37533
|
+
else {
|
|
37534
|
+
survey.questionAdded(element, index, this, this.root);
|
|
37439
37535
|
}
|
|
37440
37536
|
}
|
|
37441
37537
|
if (!!this.addElementCallback)
|
|
37442
37538
|
this.addElementCallback(element);
|
|
37443
|
-
var self = this;
|
|
37444
37539
|
element.registerPropertyChangedHandlers(["visible", "isVisible"], function () {
|
|
37445
37540
|
_this.onElementVisibilityChanged(element);
|
|
37446
37541
|
}, this.id);
|
|
@@ -37462,7 +37557,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
37462
37557
|
this.onElementVisibilityChanged(this);
|
|
37463
37558
|
};
|
|
37464
37559
|
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
|
37465
|
-
if (!this.
|
|
37560
|
+
if (!this.canFireAddRemoveNotifications(element))
|
|
37466
37561
|
return;
|
|
37467
37562
|
if (!element.isPanel) {
|
|
37468
37563
|
this.survey.questionRemoved(element);
|
|
@@ -38327,7 +38422,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
38327
38422
|
return this.showQuestionNumbers !== "off" && this.showQuestionNumbers !== "onpanel";
|
|
38328
38423
|
};
|
|
38329
38424
|
PanelModel.prototype.notifySurveyOnVisibilityChanged = function () {
|
|
38330
|
-
if (this.survey != null && !this.isLoadingFromJson) {
|
|
38425
|
+
if (this.survey != null && !this.isLoadingFromJson && !!this.page) {
|
|
38331
38426
|
this.survey.panelVisibilityChanged(this, this.isVisible);
|
|
38332
38427
|
}
|
|
38333
38428
|
};
|
|
@@ -38461,6 +38556,12 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
38461
38556
|
return;
|
|
38462
38557
|
this.survey.cancelPreviewByPage(this);
|
|
38463
38558
|
};
|
|
38559
|
+
PanelModel.prototype.canShowTitle = function (survey) {
|
|
38560
|
+
var page = this.originalPage;
|
|
38561
|
+
if (!!page)
|
|
38562
|
+
return page.canShowTitle(survey);
|
|
38563
|
+
return _super.prototype.canShowTitle.call(this, survey);
|
|
38564
|
+
};
|
|
38464
38565
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
|
38465
38566
|
get: function () {
|
|
38466
38567
|
return this.getCssTitle(this.cssClasses.panel);
|
|
@@ -38912,6 +39013,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
38912
39013
|
* @see timeLimit
|
|
38913
39014
|
*/
|
|
38914
39015
|
_this.timeSpent = 0;
|
|
39016
|
+
_this._isReadyForClean = true;
|
|
38915
39017
|
_this.createLocalizableString("navigationDescription", _this, true);
|
|
38916
39018
|
_this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
|
|
38917
39019
|
return _this;
|
|
@@ -38959,8 +39061,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
38959
39061
|
PageModel.prototype.canShowPageNumber = function () {
|
|
38960
39062
|
return this.survey && this.survey.showPageNumbers;
|
|
38961
39063
|
};
|
|
38962
|
-
PageModel.prototype.canShowTitle = function () {
|
|
38963
|
-
return
|
|
39064
|
+
PageModel.prototype.canShowTitle = function (survey) {
|
|
39065
|
+
return !survey || survey.showPageTitles;
|
|
38964
39066
|
};
|
|
38965
39067
|
PageModel.prototype.setTitleValue = function (val) {
|
|
38966
39068
|
_super.prototype.setTitleValue.call(this, val);
|
|
@@ -39284,6 +39386,28 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
39284
39386
|
_super.prototype.ensureRowsVisibility.call(this);
|
|
39285
39387
|
this.getPanels().forEach(function (panel) { return panel.ensureRowsVisibility(); });
|
|
39286
39388
|
};
|
|
39389
|
+
Object.defineProperty(PageModel.prototype, "isReadyForClean", {
|
|
39390
|
+
get: function () {
|
|
39391
|
+
return this._isReadyForClean;
|
|
39392
|
+
},
|
|
39393
|
+
set: function (val) {
|
|
39394
|
+
var oldValue = this._isReadyForClean;
|
|
39395
|
+
this._isReadyForClean = val;
|
|
39396
|
+
if (this._isReadyForClean !== oldValue) {
|
|
39397
|
+
this.isReadyForCleanChangedCallback && this.isReadyForCleanChangedCallback();
|
|
39398
|
+
}
|
|
39399
|
+
},
|
|
39400
|
+
enumerable: false,
|
|
39401
|
+
configurable: true
|
|
39402
|
+
});
|
|
39403
|
+
PageModel.prototype.enableOnElementRerenderedEvent = function () {
|
|
39404
|
+
_super.prototype.enableOnElementRerenderedEvent.call(this);
|
|
39405
|
+
this.isReadyForClean = false;
|
|
39406
|
+
};
|
|
39407
|
+
PageModel.prototype.disableOnElementRerenderedEvent = function () {
|
|
39408
|
+
_super.prototype.disableOnElementRerenderedEvent.call(this);
|
|
39409
|
+
this.isReadyForClean = true;
|
|
39410
|
+
};
|
|
39287
39411
|
page_decorate([
|
|
39288
39412
|
jsonobject_property({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
|
|
39289
39413
|
], PageModel.prototype, "num", void 0);
|
|
@@ -40145,9 +40269,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40145
40269
|
*/
|
|
40146
40270
|
_this.onGetResult = _this.addEvent();
|
|
40147
40271
|
/**
|
|
40148
|
-
* An event that is raised when
|
|
40149
|
-
* @see
|
|
40150
|
-
* @see uploadFiles
|
|
40272
|
+
* An event that is raised when a respondent opens a dialog window to select files.
|
|
40273
|
+
* @see chooseFiles
|
|
40151
40274
|
*/
|
|
40152
40275
|
_this.onOpenFileChooser = _this.addEvent();
|
|
40153
40276
|
/**
|
|
@@ -40480,7 +40603,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40480
40603
|
*/
|
|
40481
40604
|
_this.onGetPageTitleActions = _this.addEvent();
|
|
40482
40605
|
/**
|
|
40483
|
-
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
|
|
40606
|
+
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel). This panel may belong to a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) or be a standalone survey element.
|
|
40484
40607
|
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
40485
40608
|
*/
|
|
40486
40609
|
_this.onGetPanelFooterActions = _this.addEvent();
|
|
@@ -40546,6 +40669,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40546
40669
|
_this.cssVariables = {};
|
|
40547
40670
|
_this._isMobile = false;
|
|
40548
40671
|
_this._isCompact = false;
|
|
40672
|
+
_this.setValueOnExpressionCounter = 0;
|
|
40549
40673
|
_this._isDesignMode = false;
|
|
40550
40674
|
/**
|
|
40551
40675
|
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
|
@@ -40587,6 +40711,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40587
40711
|
valueNames: {},
|
|
40588
40712
|
valueNamesInsensitive: {},
|
|
40589
40713
|
};
|
|
40714
|
+
_this.setValueFromTriggerCounter = 0;
|
|
40590
40715
|
_this.needRenderIcons = true;
|
|
40591
40716
|
_this.skippedPages = [];
|
|
40592
40717
|
_this.skeletonComponentName = "sv-skeleton";
|
|
@@ -40614,9 +40739,20 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40614
40739
|
_this.doTimer(page);
|
|
40615
40740
|
};
|
|
40616
40741
|
_this.createNewArray("pages", function (value) {
|
|
40742
|
+
if (value.isReadyForCleanChangedCallback) {
|
|
40743
|
+
value.isReadyForCleanChangedCallback();
|
|
40744
|
+
}
|
|
40617
40745
|
_this.doOnPageAdded(value);
|
|
40618
40746
|
}, function (value) {
|
|
40619
|
-
|
|
40747
|
+
if (!value.isReadyForClean) {
|
|
40748
|
+
value.isReadyForCleanChangedCallback = function () {
|
|
40749
|
+
_this.doOnPageRemoved(value);
|
|
40750
|
+
value.isReadyForCleanChangedCallback = undefined;
|
|
40751
|
+
};
|
|
40752
|
+
}
|
|
40753
|
+
else {
|
|
40754
|
+
_this.doOnPageRemoved(value);
|
|
40755
|
+
}
|
|
40620
40756
|
});
|
|
40621
40757
|
_this.createNewArray("triggers", function (value) {
|
|
40622
40758
|
value.setOwner(_this);
|
|
@@ -42328,6 +42464,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42328
42464
|
};
|
|
42329
42465
|
return exp.run(values, properties) || onCompleteRes;
|
|
42330
42466
|
};
|
|
42467
|
+
Object.defineProperty(SurveyModel.prototype, "isSettingValueOnExpression", {
|
|
42468
|
+
get: function () { return this.setValueOnExpressionCounter > 0; },
|
|
42469
|
+
enumerable: false,
|
|
42470
|
+
configurable: true
|
|
42471
|
+
});
|
|
42472
|
+
SurveyModel.prototype.startSetValueOnExpression = function () {
|
|
42473
|
+
this.setValueOnExpressionCounter++;
|
|
42474
|
+
};
|
|
42475
|
+
SurveyModel.prototype.finishSetValueOnExpression = function () {
|
|
42476
|
+
this.setValueOnExpressionCounter--;
|
|
42477
|
+
};
|
|
42331
42478
|
/**
|
|
42332
42479
|
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
|
|
42333
42480
|
* @param expression An expression to calculate.
|
|
@@ -43263,16 +43410,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43263
43410
|
for (var key in this.variablesHash)
|
|
43264
43411
|
values[key] = this.variablesHash[key];
|
|
43265
43412
|
this.addCalculatedValuesIntoFilteredValues(values);
|
|
43266
|
-
|
|
43267
|
-
|
|
43268
|
-
var
|
|
43269
|
-
|
|
43270
|
-
|
|
43271
|
-
this.getAllQuestions().forEach(function (q) {
|
|
43272
|
-
if (q.hasFilteredValue) {
|
|
43273
|
-
values[q.getFilteredName()] = q.getFilteredValue();
|
|
43413
|
+
if (!this.isDesignMode) {
|
|
43414
|
+
var keys = this.getValuesKeys();
|
|
43415
|
+
for (var i = 0; i < keys.length; i++) {
|
|
43416
|
+
var key = keys[i];
|
|
43417
|
+
values[key] = this.getDataValueCore(this.valuesHash, key);
|
|
43274
43418
|
}
|
|
43275
|
-
|
|
43419
|
+
this.getAllQuestions().forEach(function (q) {
|
|
43420
|
+
if (q.hasFilteredValue) {
|
|
43421
|
+
values[q.getFilteredName()] = q.getFilteredValue();
|
|
43422
|
+
}
|
|
43423
|
+
});
|
|
43424
|
+
}
|
|
43276
43425
|
return values;
|
|
43277
43426
|
};
|
|
43278
43427
|
SurveyModel.prototype.addCalculatedValuesIntoFilteredValues = function (values) {
|
|
@@ -44697,9 +44846,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
44697
44846
|
single.addPanel(panel);
|
|
44698
44847
|
var json = new jsonobject_JsonObject().toJsonObject(page);
|
|
44699
44848
|
new jsonobject_JsonObject().toObject(json, panel);
|
|
44700
|
-
if (!this.showPageTitles) {
|
|
44701
|
-
panel.title = "";
|
|
44702
|
-
}
|
|
44703
44849
|
}
|
|
44704
44850
|
return single;
|
|
44705
44851
|
};
|
|
@@ -45286,6 +45432,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45286
45432
|
this.rootElement = htmlElement;
|
|
45287
45433
|
this.addScrollEventListener();
|
|
45288
45434
|
};
|
|
45435
|
+
SurveyModel.prototype.beforeDestroySurveyElement = function () {
|
|
45436
|
+
this.destroyResizeObserver();
|
|
45437
|
+
this.removeScrollEventListener();
|
|
45438
|
+
this.rootElement = undefined;
|
|
45439
|
+
};
|
|
45289
45440
|
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
|
|
45290
45441
|
var isMobile = width < mobileWidth;
|
|
45291
45442
|
var isMobileChanged = this.isMobile !== isMobile;
|
|
@@ -45516,8 +45667,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45516
45667
|
return options.error ? new CustomError(options.error, this) : null;
|
|
45517
45668
|
};
|
|
45518
45669
|
SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
|
|
45519
|
-
if (!this.isLoadingFromJson) {
|
|
45520
|
-
this.updateVisibleIndexes();
|
|
45670
|
+
if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question, true)) {
|
|
45671
|
+
this.updateVisibleIndexes(question.page);
|
|
45521
45672
|
}
|
|
45522
45673
|
if (this.onDynamicPanelAdded.isEmpty)
|
|
45523
45674
|
return;
|
|
@@ -45533,13 +45684,26 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45533
45684
|
for (var i = 0; i < questions.length; i++) {
|
|
45534
45685
|
questions[i].clearOnDeletingContainer();
|
|
45535
45686
|
}
|
|
45536
|
-
this.
|
|
45687
|
+
if (this.hasQuestionVisibleIndeces(question, false)) {
|
|
45688
|
+
this.updateVisibleIndexes(question.page);
|
|
45689
|
+
}
|
|
45537
45690
|
this.onDynamicPanelRemoved.fire(this, {
|
|
45538
45691
|
question: question,
|
|
45539
45692
|
panelIndex: panelIndex,
|
|
45540
45693
|
panel: panel,
|
|
45541
45694
|
});
|
|
45542
45695
|
};
|
|
45696
|
+
SurveyModel.prototype.hasQuestionVisibleIndeces = function (question, checkIndex) {
|
|
45697
|
+
if (checkIndex) {
|
|
45698
|
+
question.setVisibleIndex(this.getStartVisibleIndex());
|
|
45699
|
+
}
|
|
45700
|
+
var qList = question.getNestedQuestions(true);
|
|
45701
|
+
for (var i = 0; i < qList.length; i++) {
|
|
45702
|
+
if (qList[i].visibleIndex > -1)
|
|
45703
|
+
return true;
|
|
45704
|
+
}
|
|
45705
|
+
return false;
|
|
45706
|
+
};
|
|
45543
45707
|
SurveyModel.prototype.dynamicPanelRemoving = function (question, panelIndex, panel) {
|
|
45544
45708
|
var options = {
|
|
45545
45709
|
question: question,
|
|
@@ -45652,7 +45816,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45652
45816
|
}, elementsToRenderBefore);
|
|
45653
45817
|
}
|
|
45654
45818
|
else {
|
|
45655
|
-
|
|
45819
|
+
if (!elementPage_1 && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
|
|
45820
|
+
var elementToScroll = this.rootElement.querySelector(classesToSelector(this.css.rootWrapper));
|
|
45821
|
+
survey_element_SurveyElement.ScrollElementToViewCore(elementToScroll, false, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
|
|
45822
|
+
}
|
|
45823
|
+
else {
|
|
45824
|
+
survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
|
|
45825
|
+
}
|
|
45656
45826
|
}
|
|
45657
45827
|
}
|
|
45658
45828
|
};
|
|
@@ -46081,6 +46251,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46081
46251
|
page.name = name;
|
|
46082
46252
|
return page;
|
|
46083
46253
|
};
|
|
46254
|
+
SurveyModel.prototype.getValueChangeReason = function () {
|
|
46255
|
+
if (this.isSettingValueOnExpression)
|
|
46256
|
+
return "expression";
|
|
46257
|
+
return this.isSettingValueFromTrigger ? "trigger" : undefined;
|
|
46258
|
+
};
|
|
46084
46259
|
SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue, questionValueName) {
|
|
46085
46260
|
if (!!this.editingObj) {
|
|
46086
46261
|
var prop = Serializer.findProperty(this.editingObj.getType(), valueName);
|
|
@@ -46094,6 +46269,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46094
46269
|
question: this.getQuestionByValueName(questionValueName || valueName),
|
|
46095
46270
|
value: this.getUnbindValue(newValue),
|
|
46096
46271
|
oldValue: this.getValue(valueName),
|
|
46272
|
+
reason: this.getValueChangeReason()
|
|
46097
46273
|
};
|
|
46098
46274
|
this.onValueChanging.fire(this, options);
|
|
46099
46275
|
return options.value;
|
|
@@ -46148,6 +46324,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46148
46324
|
}
|
|
46149
46325
|
return res;
|
|
46150
46326
|
};
|
|
46327
|
+
SurveyModel.prototype.fireOnValueChanged = function (name, value, question) {
|
|
46328
|
+
this.onValueChanged.fire(this, {
|
|
46329
|
+
name: name,
|
|
46330
|
+
question: question,
|
|
46331
|
+
value: value,
|
|
46332
|
+
reason: this.getValueChangeReason()
|
|
46333
|
+
});
|
|
46334
|
+
};
|
|
46151
46335
|
SurveyModel.prototype.notifyQuestionOnValueChanged = function (valueName, newValue, questionName) {
|
|
46152
46336
|
if (this.isLoadingFromJson)
|
|
46153
46337
|
return;
|
|
@@ -46157,19 +46341,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46157
46341
|
var question = questions[i];
|
|
46158
46342
|
this.checkQuestionErrorOnValueChanged(question);
|
|
46159
46343
|
question.onSurveyValueChanged(newValue);
|
|
46160
|
-
this.
|
|
46161
|
-
name: valueName,
|
|
46162
|
-
question: question,
|
|
46163
|
-
value: newValue,
|
|
46164
|
-
});
|
|
46344
|
+
this.fireOnValueChanged(valueName, newValue, question);
|
|
46165
46345
|
}
|
|
46166
46346
|
}
|
|
46167
46347
|
else {
|
|
46168
|
-
this.
|
|
46169
|
-
name: valueName,
|
|
46170
|
-
question: null,
|
|
46171
|
-
value: newValue,
|
|
46172
|
-
});
|
|
46348
|
+
this.fireOnValueChanged(valueName, newValue, null);
|
|
46173
46349
|
}
|
|
46174
46350
|
if (this.isDisposed)
|
|
46175
46351
|
return;
|
|
@@ -46494,7 +46670,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46494
46670
|
}
|
|
46495
46671
|
this.updateVisibleIndexes();
|
|
46496
46672
|
};
|
|
46497
|
-
SurveyModel.prototype.updateVisibleIndexes = function () {
|
|
46673
|
+
SurveyModel.prototype.updateVisibleIndexes = function (page) {
|
|
46498
46674
|
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson || this.isLockingUpdateOnPageModes)
|
|
46499
46675
|
return;
|
|
46500
46676
|
if (this.isRunningConditions &&
|
|
@@ -46508,22 +46684,28 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46508
46684
|
this.updateVisibleIndexAfterBindings = true;
|
|
46509
46685
|
return;
|
|
46510
46686
|
}
|
|
46511
|
-
this.updatePageVisibleIndexes(
|
|
46687
|
+
this.updatePageVisibleIndexes();
|
|
46688
|
+
this.updatePageElementsVisibleIndexes(page);
|
|
46689
|
+
this.updateProgressText(true);
|
|
46690
|
+
};
|
|
46691
|
+
SurveyModel.prototype.updatePageElementsVisibleIndexes = function (page) {
|
|
46512
46692
|
if (this.showQuestionNumbers == "onPage") {
|
|
46513
|
-
var visPages = this.visiblePages;
|
|
46693
|
+
var visPages = !!page ? [page] : this.visiblePages;
|
|
46514
46694
|
for (var i = 0; i < visPages.length; i++) {
|
|
46515
46695
|
visPages[i].setVisibleIndex(0);
|
|
46516
46696
|
}
|
|
46517
46697
|
}
|
|
46518
46698
|
else {
|
|
46519
|
-
var index = this.
|
|
46520
|
-
for (var
|
|
46521
|
-
index += this.pages[
|
|
46699
|
+
var index = this.getStartVisibleIndex();
|
|
46700
|
+
for (var i_3 = 0; i_3 < this.pages.length; i_3++) {
|
|
46701
|
+
index += this.pages[i_3].setVisibleIndex(index);
|
|
46522
46702
|
}
|
|
46523
46703
|
}
|
|
46524
|
-
this.updateProgressText(true);
|
|
46525
46704
|
};
|
|
46526
|
-
SurveyModel.prototype.
|
|
46705
|
+
SurveyModel.prototype.getStartVisibleIndex = function () {
|
|
46706
|
+
return this.showQuestionNumbers == "on" ? 0 : -1;
|
|
46707
|
+
};
|
|
46708
|
+
SurveyModel.prototype.updatePageVisibleIndexes = function () {
|
|
46527
46709
|
this.updateButtonsVisibility();
|
|
46528
46710
|
var index = 0;
|
|
46529
46711
|
for (var i = 0; i < this.pages.length; i++) {
|
|
@@ -46929,8 +47111,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46929
47111
|
return;
|
|
46930
47112
|
questionName = questionName || name;
|
|
46931
47113
|
this.checkTriggersAndRunConditions(name, newValue, oldValue);
|
|
46932
|
-
if (allowNotifyValueChanged)
|
|
47114
|
+
if (allowNotifyValueChanged) {
|
|
46933
47115
|
this.notifyQuestionOnValueChanged(name, newValue, questionName);
|
|
47116
|
+
}
|
|
46934
47117
|
if (locNotification !== "text") {
|
|
46935
47118
|
this.tryGoNextPageAutomatic(name);
|
|
46936
47119
|
}
|
|
@@ -47068,11 +47251,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47068
47251
|
}
|
|
47069
47252
|
var question = this.getQuestionByValueName(name);
|
|
47070
47253
|
if (question) {
|
|
47071
|
-
this.
|
|
47072
|
-
name: commentName,
|
|
47073
|
-
question: question,
|
|
47074
|
-
value: newValue,
|
|
47075
|
-
});
|
|
47254
|
+
this.fireOnValueChanged(commentName, newValue, question);
|
|
47076
47255
|
question.comment = newValue;
|
|
47077
47256
|
if (question.comment != newValue) {
|
|
47078
47257
|
question.comment = newValue;
|
|
@@ -47113,7 +47292,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47113
47292
|
};
|
|
47114
47293
|
SurveyModel.prototype.questionVisibilityChanged = function (question, newValue, resetIndexes) {
|
|
47115
47294
|
if (resetIndexes) {
|
|
47116
|
-
this.updateVisibleIndexes();
|
|
47295
|
+
this.updateVisibleIndexes(question.page);
|
|
47117
47296
|
}
|
|
47118
47297
|
this.onQuestionVisibleChanged.fire(this, {
|
|
47119
47298
|
question: question,
|
|
@@ -47134,7 +47313,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47134
47313
|
});
|
|
47135
47314
|
};
|
|
47136
47315
|
SurveyModel.prototype.panelVisibilityChanged = function (panel, newValue) {
|
|
47137
|
-
this.updateVisibleIndexes();
|
|
47316
|
+
this.updateVisibleIndexes(panel.page);
|
|
47138
47317
|
this.onPanelVisibleChanged.fire(this, {
|
|
47139
47318
|
panel: panel,
|
|
47140
47319
|
visible: newValue,
|
|
@@ -47154,7 +47333,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47154
47333
|
if (!this.currentPage) {
|
|
47155
47334
|
this.updateCurrentPage();
|
|
47156
47335
|
}
|
|
47157
|
-
this.updateVisibleIndexes();
|
|
47336
|
+
this.updateVisibleIndexes(question.page);
|
|
47158
47337
|
this.setCalculatedWidthModeUpdater();
|
|
47159
47338
|
}
|
|
47160
47339
|
if (this.canFireAddElement()) {
|
|
@@ -47174,7 +47353,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47174
47353
|
};
|
|
47175
47354
|
SurveyModel.prototype.questionRemoved = function (question) {
|
|
47176
47355
|
this.questionHashesRemoved(question, question.name, question.getValueName());
|
|
47177
|
-
this.updateVisibleIndexes();
|
|
47356
|
+
this.updateVisibleIndexes(question.page);
|
|
47178
47357
|
this.onQuestionRemoved.fire(this, {
|
|
47179
47358
|
question: question,
|
|
47180
47359
|
name: question.name,
|
|
@@ -47244,7 +47423,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47244
47423
|
panel.name = this.generateNewName(this.getAllPanels(false, true), "panel");
|
|
47245
47424
|
}
|
|
47246
47425
|
this.questionHashesPanelAdded(panel);
|
|
47247
|
-
this.updateVisibleIndexes();
|
|
47426
|
+
this.updateVisibleIndexes(panel.page);
|
|
47248
47427
|
if (this.canFireAddElement()) {
|
|
47249
47428
|
this.onPanelAdded.fire(this, {
|
|
47250
47429
|
panel: panel,
|
|
@@ -47258,7 +47437,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47258
47437
|
}
|
|
47259
47438
|
};
|
|
47260
47439
|
SurveyModel.prototype.panelRemoved = function (panel) {
|
|
47261
|
-
this.updateVisibleIndexes();
|
|
47440
|
+
this.updateVisibleIndexes(panel.page);
|
|
47262
47441
|
this.onPanelRemoved.fire(this, { panel: panel, name: panel.name });
|
|
47263
47442
|
this.updateLazyRenderingRowsOnRemovingElements();
|
|
47264
47443
|
};
|
|
@@ -47885,6 +48064,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47885
48064
|
}
|
|
47886
48065
|
else {
|
|
47887
48066
|
var question = this.getQuestionByName(name);
|
|
48067
|
+
this.startSetValueFromTrigger();
|
|
47888
48068
|
if (!!question) {
|
|
47889
48069
|
question.value = value;
|
|
47890
48070
|
}
|
|
@@ -47902,6 +48082,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47902
48082
|
this.setValue(firstName, data[firstName]);
|
|
47903
48083
|
}
|
|
47904
48084
|
}
|
|
48085
|
+
this.finishSetValueFromTrigger();
|
|
47905
48086
|
}
|
|
47906
48087
|
};
|
|
47907
48088
|
SurveyModel.prototype.copyTriggerValue = function (name, fromName, copyDisplayValue) {
|
|
@@ -47920,6 +48101,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47920
48101
|
SurveyModel.prototype.triggerExecuted = function (trigger) {
|
|
47921
48102
|
this.onTriggerExecuted.fire(this, { trigger: trigger });
|
|
47922
48103
|
};
|
|
48104
|
+
Object.defineProperty(SurveyModel.prototype, "isSettingValueFromTrigger", {
|
|
48105
|
+
get: function () { return this.setValueFromTriggerCounter > 0; },
|
|
48106
|
+
enumerable: false,
|
|
48107
|
+
configurable: true
|
|
48108
|
+
});
|
|
48109
|
+
SurveyModel.prototype.startSetValueFromTrigger = function () {
|
|
48110
|
+
this.setValueFromTriggerCounter++;
|
|
48111
|
+
};
|
|
48112
|
+
SurveyModel.prototype.finishSetValueFromTrigger = function () {
|
|
48113
|
+
this.setValueFromTriggerCounter--;
|
|
48114
|
+
};
|
|
47923
48115
|
SurveyModel.prototype.startMovingQuestion = function () {
|
|
47924
48116
|
this.isMovingQuestion = true;
|
|
47925
48117
|
};
|
|
@@ -51102,7 +51294,7 @@ Serializer.addClass("selectbase", [
|
|
|
51102
51294
|
{
|
|
51103
51295
|
name: "choices:itemvalue[]", uniqueProperty: "value",
|
|
51104
51296
|
baseValue: function () {
|
|
51105
|
-
return
|
|
51297
|
+
return getLocaleString("choices_Item");
|
|
51106
51298
|
},
|
|
51107
51299
|
dependsOn: "choicesFromQuestion",
|
|
51108
51300
|
visibleIf: function (obj) {
|
|
@@ -51302,15 +51494,16 @@ var PopupUtils = /** @class */ (function () {
|
|
|
51302
51494
|
}
|
|
51303
51495
|
return { left: Math.round(currentLeft), top: Math.round(currentTop) };
|
|
51304
51496
|
};
|
|
51305
|
-
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink) {
|
|
51497
|
+
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink, margins) {
|
|
51306
51498
|
if (canShrink === void 0) { canShrink = true; }
|
|
51499
|
+
if (margins === void 0) { margins = { top: 0, bottom: 0 }; }
|
|
51307
51500
|
var result;
|
|
51308
51501
|
var maxHeight = windowHeight - PopupUtils.bottomIndent;
|
|
51309
51502
|
if (verticalPosition === "top") {
|
|
51310
51503
|
result = { height: height, top: top };
|
|
51311
51504
|
}
|
|
51312
|
-
if (top <
|
|
51313
|
-
result = { height: canShrink ? height + top : height, top:
|
|
51505
|
+
if (top < -margins.top) {
|
|
51506
|
+
result = { height: canShrink ? height + top : height, top: -margins.top };
|
|
51314
51507
|
}
|
|
51315
51508
|
else if (height + top > windowHeight) {
|
|
51316
51509
|
var newHeight = Math.min(height, maxHeight - top);
|
|
@@ -51318,7 +51511,7 @@ var PopupUtils = /** @class */ (function () {
|
|
|
51318
51511
|
}
|
|
51319
51512
|
if (result) {
|
|
51320
51513
|
result.height = Math.min(result.height, maxHeight);
|
|
51321
|
-
result.top = Math.max(result.top,
|
|
51514
|
+
result.top = Math.max(result.top, -margins.top);
|
|
51322
51515
|
}
|
|
51323
51516
|
return result;
|
|
51324
51517
|
};
|
|
@@ -51802,7 +51995,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
51802
51995
|
getElement(settings.environment.popupMountContainer).appendChild(container);
|
|
51803
51996
|
}
|
|
51804
51997
|
};
|
|
51805
|
-
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot
|
|
51998
|
+
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot) {
|
|
51806
51999
|
if (!!componentRoot) {
|
|
51807
52000
|
this.containerElement = componentRoot;
|
|
51808
52001
|
}
|
|
@@ -51889,10 +52082,8 @@ function calculateIsTablet(windowWidth, windowHeight) {
|
|
|
51889
52082
|
}
|
|
51890
52083
|
var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
51891
52084
|
popup_dropdown_view_model_extends(PopupDropdownViewModel, _super);
|
|
51892
|
-
function PopupDropdownViewModel(model
|
|
52085
|
+
function PopupDropdownViewModel(model) {
|
|
51893
52086
|
var _this = _super.call(this, model) || this;
|
|
51894
|
-
_this.targetElement = targetElement;
|
|
51895
|
-
_this.areaElement = areaElement;
|
|
51896
52087
|
_this.scrollEventCallBack = function (event) {
|
|
51897
52088
|
if (_this.isOverlay && IsTouch) {
|
|
51898
52089
|
event.stopPropagation();
|
|
@@ -51930,22 +52121,30 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
|
51930
52121
|
this.isTablet = calculateIsTablet(windowWidth, windowHeight);
|
|
51931
52122
|
};
|
|
51932
52123
|
PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
|
|
51933
|
-
|
|
51934
|
-
|
|
52124
|
+
var areaElement = this.model.getAreaCallback ? this.model.getAreaCallback(this.container) : undefined;
|
|
52125
|
+
if (areaElement) {
|
|
52126
|
+
var areaRect = areaElement.getBoundingClientRect();
|
|
51935
52127
|
return new Rect(areaRect.x, areaRect.y, areaRect.width, areaRect.height);
|
|
51936
52128
|
}
|
|
51937
52129
|
return new Rect(0, 0, DomWindowHelper.getInnerWidth(), DomWindowHelper.getInnerHeight());
|
|
51938
52130
|
};
|
|
51939
52131
|
PopupDropdownViewModel.prototype.getTargetElementRect = function () {
|
|
51940
|
-
var
|
|
52132
|
+
var componentRoot = this.container;
|
|
52133
|
+
var targetElement = this.model.getTargetCallback ? this.model.getTargetCallback(componentRoot) : undefined;
|
|
52134
|
+
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal && !targetElement) {
|
|
52135
|
+
targetElement = componentRoot.parentElement;
|
|
52136
|
+
}
|
|
52137
|
+
if (!targetElement)
|
|
52138
|
+
return null;
|
|
52139
|
+
var rect = targetElement.getBoundingClientRect();
|
|
51941
52140
|
var areaRect = this.getAvailableAreaRect();
|
|
51942
52141
|
return new Rect(rect.left - areaRect.left, rect.top - areaRect.top, rect.width, rect.height);
|
|
51943
52142
|
};
|
|
51944
52143
|
PopupDropdownViewModel.prototype._updatePosition = function () {
|
|
51945
52144
|
var _a, _b, _c;
|
|
51946
|
-
if (!this.targetElement)
|
|
51947
|
-
return;
|
|
51948
52145
|
var targetElementRect = this.getTargetElementRect();
|
|
52146
|
+
if (!targetElementRect)
|
|
52147
|
+
return;
|
|
51949
52148
|
var area = this.getAvailableAreaRect();
|
|
51950
52149
|
var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
|
|
51951
52150
|
if (!popupContainer)
|
|
@@ -51955,6 +52154,8 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
|
51955
52154
|
var popupComputedStyle = DomDocumentHelper.getComputedStyle(popupContainer);
|
|
51956
52155
|
var marginLeft = (parseFloat(popupComputedStyle.marginLeft) || 0);
|
|
51957
52156
|
var marginRight = (parseFloat(popupComputedStyle.marginRight) || 0);
|
|
52157
|
+
var marginTop = (parseFloat(popupComputedStyle.marginTop) || 0);
|
|
52158
|
+
var marginBottom = (parseFloat(popupComputedStyle.marginBottom) || 0);
|
|
51958
52159
|
var height = popupContainer.offsetHeight - scrollContent.offsetHeight + scrollContent.scrollHeight;
|
|
51959
52160
|
var width = popupContainer.getBoundingClientRect().width;
|
|
51960
52161
|
this.model.setWidthByTarget && (this.minWidth = targetElementRect.width + "px");
|
|
@@ -51969,7 +52170,7 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
|
51969
52170
|
this.popupDirection = PopupUtils.calculatePopupDirection(verticalPosition, actualHorizontalPosition);
|
|
51970
52171
|
var pos = PopupUtils.calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.model.positionMode);
|
|
51971
52172
|
if (DomWindowHelper.isAvailable()) {
|
|
51972
|
-
var newVerticalDimensions = PopupUtils.getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink);
|
|
52173
|
+
var newVerticalDimensions = PopupUtils.getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink, { top: marginTop, bottom: marginBottom });
|
|
51973
52174
|
if (!!newVerticalDimensions) {
|
|
51974
52175
|
this.height = newVerticalDimensions.height + "px";
|
|
51975
52176
|
pos.top = newVerticalDimensions.top;
|
|
@@ -52031,16 +52232,11 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
|
52031
52232
|
PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
|
|
52032
52233
|
return "popup-pointer";
|
|
52033
52234
|
};
|
|
52034
|
-
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot
|
|
52235
|
+
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot) {
|
|
52035
52236
|
_super.prototype.setComponentElement.call(this, componentRoot);
|
|
52036
|
-
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal) {
|
|
52037
|
-
this.targetElement = targetElement || componentRoot.parentElement;
|
|
52038
|
-
this.areaElement = areaElement;
|
|
52039
|
-
}
|
|
52040
52237
|
};
|
|
52041
52238
|
PopupDropdownViewModel.prototype.resetComponentElement = function () {
|
|
52042
52239
|
_super.prototype.resetComponentElement.call(this);
|
|
52043
|
-
this.targetElement = undefined;
|
|
52044
52240
|
};
|
|
52045
52241
|
PopupDropdownViewModel.prototype.updateOnShowing = function () {
|
|
52046
52242
|
var root = settings.environment.root;
|
|
@@ -52324,8 +52520,12 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
|
52324
52520
|
if (option.isVisible) {
|
|
52325
52521
|
_this.updatePopupFocusFirstInputSelector();
|
|
52326
52522
|
var dropdownMenuOptions = _this.getDropdownMenuOptions();
|
|
52523
|
+
var prevMenuType = dropdownMenuOptions.menuType;
|
|
52327
52524
|
_this.question.processOpenDropdownMenu(dropdownMenuOptions);
|
|
52328
|
-
|
|
52525
|
+
if (prevMenuType !== dropdownMenuOptions.menuType) {
|
|
52526
|
+
_this._popupModel.updateDisplayMode(dropdownMenuOptions.menuType);
|
|
52527
|
+
_this.listModel.setSearchEnabled(_this.searchEnabled && dropdownMenuOptions.menuType !== "dropdown");
|
|
52528
|
+
}
|
|
52329
52529
|
if (!!_this.question.onOpenedCallBack) {
|
|
52330
52530
|
_this.question.onOpenedCallBack();
|
|
52331
52531
|
}
|
|
@@ -52629,8 +52829,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
|
52629
52829
|
configurable: true
|
|
52630
52830
|
});
|
|
52631
52831
|
DropdownListModel.prototype.setSearchEnabled = function (newValue) {
|
|
52632
|
-
this.listModel.
|
|
52633
|
-
this.listModel.showSearchClearButton = IsTouch;
|
|
52832
|
+
this.listModel.setSearchEnabled(IsTouch && newValue);
|
|
52634
52833
|
this.searchEnabled = newValue;
|
|
52635
52834
|
};
|
|
52636
52835
|
DropdownListModel.prototype.setChoicesLazyLoadEnabled = function (newValue) {
|
|
@@ -52820,6 +53019,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
|
52820
53019
|
if (!!this.popupModel) {
|
|
52821
53020
|
this.popupModel.dispose();
|
|
52822
53021
|
}
|
|
53022
|
+
this.htmlCleanerElement = undefined;
|
|
52823
53023
|
};
|
|
52824
53024
|
DropdownListModel.prototype.scrollToFocusedItem = function () {
|
|
52825
53025
|
this.listModel.scrollToFocusedItem();
|
|
@@ -54246,13 +54446,13 @@ Serializer.addClass("matrix", [
|
|
|
54246
54446
|
{
|
|
54247
54447
|
name: "columns:itemvalue[]", uniqueProperty: "value",
|
|
54248
54448
|
baseValue: function () {
|
|
54249
|
-
return
|
|
54449
|
+
return getLocaleString("matrix_column");
|
|
54250
54450
|
},
|
|
54251
54451
|
},
|
|
54252
54452
|
{
|
|
54253
54453
|
name: "rows:itemvalue[]", uniqueProperty: "value",
|
|
54254
54454
|
baseValue: function () {
|
|
54255
|
-
return
|
|
54455
|
+
return getLocaleString("matrix_row");
|
|
54256
54456
|
},
|
|
54257
54457
|
},
|
|
54258
54458
|
{ name: "cells:cells", serializationProperty: "cells" },
|
|
@@ -54552,6 +54752,7 @@ var InputElementAdapter = /** @class */ (function () {
|
|
|
54552
54752
|
};
|
|
54553
54753
|
InputElementAdapter.prototype.dispose = function () {
|
|
54554
54754
|
this.removeInputEventListener();
|
|
54755
|
+
this.inputElement = undefined;
|
|
54555
54756
|
this.inputMaskInstance.onPropertyChanged.remove(this.inputMaskInstancePropertyChangedHandler);
|
|
54556
54757
|
};
|
|
54557
54758
|
return InputElementAdapter;
|
|
@@ -55004,6 +55205,8 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
55004
55205
|
});
|
|
55005
55206
|
Object.defineProperty(QuestionTextModel.prototype, "inputValue", {
|
|
55006
55207
|
get: function () {
|
|
55208
|
+
if (!this._inputValue && !this.maskTypeIsEmpty)
|
|
55209
|
+
return this.maskInstance.getMaskedValue("");
|
|
55007
55210
|
return this._inputValue;
|
|
55008
55211
|
},
|
|
55009
55212
|
set: function (val) {
|
|
@@ -55302,6 +55505,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
55302
55505
|
};
|
|
55303
55506
|
QuestionTextModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
55304
55507
|
this.deleteMaskAdapter();
|
|
55508
|
+
this.input = undefined;
|
|
55305
55509
|
};
|
|
55306
55510
|
question_text_decorate([
|
|
55307
55511
|
jsonobject_property({
|
|
@@ -60130,6 +60334,8 @@ questionfactory_QuestionFactory.Instance.registerQuestion("comment", function (n
|
|
|
60130
60334
|
|
|
60131
60335
|
// CONCATENATED MODULE: ./packages/survey-core/src/utils/camera.ts
|
|
60132
60336
|
|
|
60337
|
+
var envStr = "environment";
|
|
60338
|
+
var userStr = "user";
|
|
60133
60339
|
var camera_Camera = /** @class */ (function () {
|
|
60134
60340
|
function Camera() {
|
|
60135
60341
|
this.canFlipValue = undefined;
|
|
@@ -60141,10 +60347,14 @@ var camera_Camera = /** @class */ (function () {
|
|
|
60141
60347
|
Camera.setCameraList = function (list) {
|
|
60142
60348
|
var getDeviceType = function (device) {
|
|
60143
60349
|
var lbl = device.label.toLocaleLowerCase();
|
|
60144
|
-
if (lbl.indexOf(
|
|
60145
|
-
return
|
|
60146
|
-
if (lbl.indexOf(
|
|
60147
|
-
return
|
|
60350
|
+
if (lbl.indexOf(userStr) > -1)
|
|
60351
|
+
return userStr;
|
|
60352
|
+
if (lbl.indexOf(envStr) > -1)
|
|
60353
|
+
return envStr;
|
|
60354
|
+
if (lbl.indexOf("front") > -1)
|
|
60355
|
+
return userStr;
|
|
60356
|
+
if (lbl.indexOf("back") > -1)
|
|
60357
|
+
return envStr;
|
|
60148
60358
|
return "";
|
|
60149
60359
|
};
|
|
60150
60360
|
Camera.clear();
|
|
@@ -60157,13 +60367,13 @@ var camera_Camera = /** @class */ (function () {
|
|
|
60157
60367
|
var lblA = getDeviceType(a);
|
|
60158
60368
|
var lblB = getDeviceType(b);
|
|
60159
60369
|
if (lblA !== lblB) {
|
|
60160
|
-
if (lblA ===
|
|
60370
|
+
if (lblA === userStr)
|
|
60161
60371
|
return -1;
|
|
60162
|
-
if (lblB ===
|
|
60372
|
+
if (lblB === userStr)
|
|
60163
60373
|
return 1;
|
|
60164
|
-
if (lblA ===
|
|
60374
|
+
if (lblA === envStr)
|
|
60165
60375
|
return -1;
|
|
60166
|
-
if (lblB ===
|
|
60376
|
+
if (lblB === envStr)
|
|
60167
60377
|
return 1;
|
|
60168
60378
|
}
|
|
60169
60379
|
}
|
|
@@ -60301,7 +60511,7 @@ var camera_Camera = /** @class */ (function () {
|
|
|
60301
60511
|
if (!this.canFlip())
|
|
60302
60512
|
return;
|
|
60303
60513
|
if (Camera.canSwitchFacingMode) {
|
|
60304
|
-
Camera.cameraFacingMode = Camera.cameraFacingMode ===
|
|
60514
|
+
Camera.cameraFacingMode = Camera.cameraFacingMode === userStr ? "environment" : userStr;
|
|
60305
60515
|
}
|
|
60306
60516
|
else if (Camera.cameraIndex >= Camera.cameraList.length - 1) {
|
|
60307
60517
|
Camera.cameraIndex = 0;
|
|
@@ -60323,7 +60533,7 @@ var camera_Camera = /** @class */ (function () {
|
|
|
60323
60533
|
Camera.setCameraList(list.length > 0 ? list : null);
|
|
60324
60534
|
};
|
|
60325
60535
|
Camera.cameraIndex = -1;
|
|
60326
|
-
Camera.cameraFacingMode =
|
|
60536
|
+
Camera.cameraFacingMode = userStr;
|
|
60327
60537
|
Camera.canSwitchFacingMode = false;
|
|
60328
60538
|
return Camera;
|
|
60329
60539
|
}());
|
|
@@ -62255,7 +62465,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
62255
62465
|
}
|
|
62256
62466
|
else {
|
|
62257
62467
|
for (var i = _this.rateValues.length; i < _this.rateCount; i++) {
|
|
62258
|
-
_this.rateValues.push(new itemvalue_ItemValue(
|
|
62468
|
+
_this.rateValues.push(new itemvalue_ItemValue(getLocaleString("choices_Item") + (i + 1)));
|
|
62259
62469
|
}
|
|
62260
62470
|
}
|
|
62261
62471
|
}
|
|
@@ -63127,7 +63337,7 @@ Serializer.addClass("rating", [
|
|
|
63127
63337
|
{
|
|
63128
63338
|
name: "rateValues:itemvalue[]",
|
|
63129
63339
|
baseValue: function () {
|
|
63130
|
-
return
|
|
63340
|
+
return getLocaleString("choices_Item");
|
|
63131
63341
|
},
|
|
63132
63342
|
category: "rateValues",
|
|
63133
63343
|
visibleIf: function (obj) {
|
|
@@ -65178,6 +65388,8 @@ var question_signaturepad_decorate = (undefined && undefined.__decorate) || func
|
|
|
65178
65388
|
|
|
65179
65389
|
|
|
65180
65390
|
|
|
65391
|
+
|
|
65392
|
+
|
|
65181
65393
|
var defaultWidth = 300;
|
|
65182
65394
|
var defaultHeight = 200;
|
|
65183
65395
|
/**
|
|
@@ -65234,7 +65446,8 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
65234
65446
|
};
|
|
65235
65447
|
QuestionSignaturePadModel.prototype.afterRenderQuestionElement = function (el) {
|
|
65236
65448
|
if (!!el) {
|
|
65237
|
-
this.
|
|
65449
|
+
if (!this.isDesignMode)
|
|
65450
|
+
this.initSignaturePad(el);
|
|
65238
65451
|
this.element = el;
|
|
65239
65452
|
}
|
|
65240
65453
|
_super.prototype.afterRenderQuestionElement.call(this, el);
|
|
@@ -65273,16 +65486,30 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
65273
65486
|
QuestionSignaturePadModel.prototype.fromUrl = function (url) {
|
|
65274
65487
|
var _this = this;
|
|
65275
65488
|
this.isFileLoading = true;
|
|
65276
|
-
|
|
65277
|
-
|
|
65278
|
-
|
|
65279
|
-
|
|
65280
|
-
|
|
65281
|
-
|
|
65282
|
-
|
|
65283
|
-
|
|
65284
|
-
|
|
65285
|
-
|
|
65489
|
+
if (isBase64URL(url)) {
|
|
65490
|
+
this.fromDataUrl(url);
|
|
65491
|
+
this.isFileLoading = false;
|
|
65492
|
+
}
|
|
65493
|
+
else {
|
|
65494
|
+
var img_1 = new Image();
|
|
65495
|
+
img_1.crossOrigin = "anonymous";
|
|
65496
|
+
img_1.src = url;
|
|
65497
|
+
img_1.onload = function () {
|
|
65498
|
+
if (!!_this.canvas) {
|
|
65499
|
+
var canvas = DomDocumentHelper.createElement("canvas");
|
|
65500
|
+
canvas.width = _this.containerWidth;
|
|
65501
|
+
canvas.height = _this.containerHeight;
|
|
65502
|
+
var ctx = canvas.getContext("2d");
|
|
65503
|
+
ctx.drawImage(img_1, 0, 0);
|
|
65504
|
+
var dataURL = canvas.toDataURL(_this.getFormat());
|
|
65505
|
+
_this.fromDataUrl(dataURL);
|
|
65506
|
+
}
|
|
65507
|
+
_this.isFileLoading = false;
|
|
65508
|
+
};
|
|
65509
|
+
img_1.onerror = function () {
|
|
65510
|
+
_this.isFileLoading = false;
|
|
65511
|
+
};
|
|
65512
|
+
}
|
|
65286
65513
|
};
|
|
65287
65514
|
QuestionSignaturePadModel.prototype.fromDataUrl = function (data) {
|
|
65288
65515
|
this._loadedData = data;
|
|
@@ -65323,11 +65550,11 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
65323
65550
|
this._previewLoader = new FileLoader(this, function (status, loaded) {
|
|
65324
65551
|
if (status === "success" && loaded && loaded.length > 0 && loaded[0].content) {
|
|
65325
65552
|
_this.fromDataUrl(loaded[0].content);
|
|
65553
|
+
_this.isFileLoading = false;
|
|
65326
65554
|
}
|
|
65327
65555
|
else if (status === "skipped") {
|
|
65328
65556
|
_this.fromUrl(newValue);
|
|
65329
65557
|
}
|
|
65330
|
-
_this.isFileLoading = false;
|
|
65331
65558
|
_this._previewLoader.dispose();
|
|
65332
65559
|
_this._previewLoader = undefined;
|
|
65333
65560
|
});
|
|
@@ -70069,12 +70296,12 @@ function createPopupModalViewModel(options, rootElement) {
|
|
|
70069
70296
|
popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
|
|
70070
70297
|
return popupViewModel;
|
|
70071
70298
|
}
|
|
70072
|
-
function createPopupViewModel(model
|
|
70299
|
+
function createPopupViewModel(model) {
|
|
70073
70300
|
if (model.isModal) {
|
|
70074
70301
|
return new PopupModalViewModel(model);
|
|
70075
70302
|
}
|
|
70076
70303
|
else {
|
|
70077
|
-
return new popup_dropdown_view_model_PopupDropdownViewModel(model
|
|
70304
|
+
return new popup_dropdown_view_model_PopupDropdownViewModel(model);
|
|
70078
70305
|
}
|
|
70079
70306
|
}
|
|
70080
70307
|
|
|
@@ -70954,20 +71181,6 @@ function trimDatePart(lexem, data) {
|
|
|
70954
71181
|
}
|
|
70955
71182
|
return result;
|
|
70956
71183
|
}
|
|
70957
|
-
function getDefaultYearForValidation(minYear, maxYear) {
|
|
70958
|
-
var defaultVal = 2000;
|
|
70959
|
-
if (defaultVal > maxYear) {
|
|
70960
|
-
defaultVal = parseInt(maxYear.toString().slice(0, maxYear.toString().length - 2)) * 100;
|
|
70961
|
-
}
|
|
70962
|
-
if (defaultVal < minYear) {
|
|
70963
|
-
var middle = (maxYear - minYear) / 2 + minYear;
|
|
70964
|
-
defaultVal = parseInt(middle.toString().slice(0, middle.toString().length - 1)) * 10;
|
|
70965
|
-
}
|
|
70966
|
-
if (defaultVal >= minYear && defaultVal <= maxYear) {
|
|
70967
|
-
return defaultVal;
|
|
70968
|
-
}
|
|
70969
|
-
return minYear;
|
|
70970
|
-
}
|
|
70971
71184
|
function getDateTimeLexems(pattern) {
|
|
70972
71185
|
var result = [];
|
|
70973
71186
|
var prevLexemType;
|
|
@@ -71212,9 +71425,18 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
71212
71425
|
return dateTime.year >= parseInt(minYearPart) && dateTime.year <= parseInt(maxYearPart);
|
|
71213
71426
|
};
|
|
71214
71427
|
InputMaskDateTime.prototype.createIDateTimeCompositionWithDefaults = function (dateTime, isUpperLimit) {
|
|
71215
|
-
var
|
|
71216
|
-
var
|
|
71217
|
-
var
|
|
71428
|
+
var checkOnlyLeapYears = dateTime.day == 29 && dateTime.month == 2;
|
|
71429
|
+
var minYear = dateTime.min.getFullYear();
|
|
71430
|
+
var maxYear = dateTime.max.getFullYear();
|
|
71431
|
+
if (checkOnlyLeapYears) {
|
|
71432
|
+
minYear = Math.ceil(minYear / 4) * 4;
|
|
71433
|
+
maxYear = Math.floor(minYear / 4) * 4;
|
|
71434
|
+
if (minYear > maxYear) {
|
|
71435
|
+
minYear = undefined;
|
|
71436
|
+
maxYear = undefined;
|
|
71437
|
+
}
|
|
71438
|
+
}
|
|
71439
|
+
var year = dateTime.year !== undefined ? dateTime.year : isUpperLimit ? maxYear : minYear;
|
|
71218
71440
|
var month = dateTime.month !== undefined ? dateTime.month : (isUpperLimit && this.hasDatePart ? 12 : 1);
|
|
71219
71441
|
var day = dateTime.day !== undefined ? dateTime.day : (isUpperLimit && this.hasDatePart ? this.getMaxDateForMonth(year, month) : 1);
|
|
71220
71442
|
var hour = dateTime.hour !== undefined ? dateTime.hour : (isUpperLimit ? 23 : 0);
|
|
@@ -71228,18 +71450,12 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
71228
71450
|
return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];
|
|
71229
71451
|
};
|
|
71230
71452
|
InputMaskDateTime.prototype.isDateValid = function (dateTime) {
|
|
71231
|
-
var min = dateTime.min;
|
|
71232
|
-
var max = dateTime.max;
|
|
71233
|
-
var year = dateTime.year !== undefined ? dateTime.year : getDefaultYearForValidation(min.getFullYear(), max.getFullYear());
|
|
71234
|
-
var month = dateTime.month !== undefined ? dateTime.month : 1;
|
|
71235
|
-
var day = dateTime.day !== undefined ? dateTime.day : 1;
|
|
71236
|
-
var monthIndex = month - 1;
|
|
71237
71453
|
var date = new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(dateTime, false)));
|
|
71238
71454
|
var dateH = new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(dateTime, true)));
|
|
71239
71455
|
return !isNaN(date) &&
|
|
71240
|
-
date.getDate() === day &&
|
|
71241
|
-
date.getMonth() ===
|
|
71242
|
-
date.getFullYear() === year &&
|
|
71456
|
+
(date.getDate() === dateTime.day || dateTime.day === undefined) &&
|
|
71457
|
+
(date.getMonth() === dateTime.month - 1 || dateTime.month === undefined) &&
|
|
71458
|
+
(date.getFullYear() === dateTime.year || dateTime.year === undefined) &&
|
|
71243
71459
|
dateH >= dateTime.min && date <= dateTime.max;
|
|
71244
71460
|
};
|
|
71245
71461
|
InputMaskDateTime.prototype.getPlaceholder = function (lexemLength, str, char) {
|
|
@@ -71295,7 +71511,7 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
71295
71511
|
return;
|
|
71296
71512
|
var propertyName = newItem.lexem.type;
|
|
71297
71513
|
var tempDateTime = mask_datetime_assign({}, dateTime);
|
|
71298
|
-
tempDateTime[propertyName] = parseInt(
|
|
71514
|
+
tempDateTime[propertyName] = parseInt(this.parseTwoDigitYear(newItem));
|
|
71299
71515
|
if (data.length === newItem.lexem.maxCount) {
|
|
71300
71516
|
if (this.isDateValid12(tempDateTime)) {
|
|
71301
71517
|
newItem.isCompleted = true;
|
|
@@ -71730,8 +71946,8 @@ Serializer.addClass("currencymask", [
|
|
|
71730
71946
|
|
|
71731
71947
|
var Version;
|
|
71732
71948
|
var ReleaseDate;
|
|
71733
|
-
Version = "" + "1.12.
|
|
71734
|
-
ReleaseDate = "" + "2024-11-
|
|
71949
|
+
Version = "" + "1.12.11";
|
|
71950
|
+
ReleaseDate = "" + "2024-11-20";
|
|
71735
71951
|
function checkLibraryVersion(ver, libraryName) {
|
|
71736
71952
|
if (Version != ver) {
|
|
71737
71953
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|