survey-core 1.9.133 → 1.9.134
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 +6 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +6 -1
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- 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/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.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +1452 -49
- 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/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/dragdrop/core.d.ts +1 -0
- package/ts3.4/typings/entries/chunks/model.d.ts +5 -0
- package/ts3.4/typings/mask/input_element_adapter.d.ts +15 -0
- package/ts3.4/typings/mask/mask_base.d.ts +11 -0
- package/ts3.4/typings/mask/mask_currency.d.ts +11 -0
- package/ts3.4/typings/mask/mask_datetime.d.ts +37 -0
- package/ts3.4/typings/mask/mask_numeric.d.ts +30 -0
- package/ts3.4/typings/mask/mask_pattern.d.ts +23 -0
- package/ts3.4/typings/mask/mask_utils.d.ts +18 -0
- package/ts3.4/typings/question_text.d.ts +16 -0
- package/ts3.4/typings/settings.d.ts +7 -0
- package/ts3.4/typings/survey-element.d.ts +1 -0
- package/ts3.4/typings/survey.d.ts +2 -2
- package/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/dragdrop/core.d.ts +1 -0
- package/typings/entries/chunks/model.d.ts +5 -0
- package/typings/mask/input_element_adapter.d.ts +15 -0
- package/typings/mask/mask_base.d.ts +11 -0
- package/typings/mask/mask_currency.d.ts +11 -0
- package/typings/mask/mask_datetime.d.ts +37 -0
- package/typings/mask/mask_numeric.d.ts +30 -0
- package/typings/mask/mask_pattern.d.ts +23 -0
- package/typings/mask/mask_utils.d.ts +18 -0
- package/typings/question_text.d.ts +18 -0
- package/typings/settings.d.ts +7 -0
- package/typings/survey-element.d.ts +1 -0
- package/typings/survey.d.ts +2 -2
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.134
|
|
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
|
*/
|
|
@@ -1075,6 +1075,7 @@ var Action = /** @class */ (function (_super) {
|
|
|
1075
1075
|
return this._component;
|
|
1076
1076
|
};
|
|
1077
1077
|
Action.prototype.dispose = function () {
|
|
1078
|
+
this.updateCallback = undefined;
|
|
1078
1079
|
this.action = undefined;
|
|
1079
1080
|
_super.prototype.dispose.call(this);
|
|
1080
1081
|
if (this.popupModel) {
|
|
@@ -5970,6 +5971,7 @@ var defaultV2Css = {
|
|
|
5970
5971
|
chooseFileAsIcon: "sd-file__choose-btn--icon",
|
|
5971
5972
|
chooseFileIconId: "icon-choosefile",
|
|
5972
5973
|
disabled: "sd-file__choose-btn--disabled",
|
|
5974
|
+
controlDisabled: "sd-file__choose-file-btn--disabled",
|
|
5973
5975
|
//todo: remove it in v2
|
|
5974
5976
|
removeButton: "sd-context-btn--negative",
|
|
5975
5977
|
removeButtonBottom: "",
|
|
@@ -6881,11 +6883,13 @@ var DragDropCore = /** @class */ (function () {
|
|
|
6881
6883
|
configurable: true
|
|
6882
6884
|
});
|
|
6883
6885
|
DragDropCore.prototype.startDrag = function (event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode) {
|
|
6884
|
-
var _a;
|
|
6885
6886
|
if (preventSaveTargetNode === void 0) { preventSaveTargetNode = false; }
|
|
6886
|
-
this.domAdapter.rootContainer = (
|
|
6887
|
+
this.domAdapter.rootContainer = this.getRootElement(this.survey, this.creator);
|
|
6887
6888
|
this.domAdapter.startDrag(event, draggedElement, parentElement, draggedElementNode, preventSaveTargetNode);
|
|
6888
6889
|
};
|
|
6890
|
+
DragDropCore.prototype.getRootElement = function (survey, creator) {
|
|
6891
|
+
return creator ? creator.rootElement : survey.rootElement;
|
|
6892
|
+
};
|
|
6889
6893
|
DragDropCore.prototype.dragInit = function (event, draggedElement, parentElement, draggedElementNode) {
|
|
6890
6894
|
this.draggedElement = draggedElement;
|
|
6891
6895
|
this.parentElement = parentElement;
|
|
@@ -7685,15 +7689,12 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7685
7689
|
if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
|
|
7686
7690
|
return dragOverNode;
|
|
7687
7691
|
}
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
if (!!fromContainer)
|
|
7695
|
-
return fromContainer;
|
|
7696
|
-
}
|
|
7692
|
+
var toContainer = dragOverNode.closest("[data-ranking='to-container']");
|
|
7693
|
+
var fromContainer = dragOverNode.closest("[data-ranking='from-container']");
|
|
7694
|
+
if (this.parentElement.unRankingChoices.length === 0 && fromContainer)
|
|
7695
|
+
return fromContainer;
|
|
7696
|
+
if (this.parentElement.rankingChoices.length === 0 && toContainer)
|
|
7697
|
+
return toContainer;
|
|
7697
7698
|
return _super.prototype.findDropTargetNodeByDragOverNode.call(this, dragOverNode);
|
|
7698
7699
|
};
|
|
7699
7700
|
DragDropRankingSelectToRank.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue) {
|
|
@@ -8960,7 +8961,7 @@ var ElementHelper = /** @class */ (function () {
|
|
|
8960
8961
|
/*!*************************************!*\
|
|
8961
8962
|
!*** ./src/entries/chunks/model.ts ***!
|
|
8962
8963
|
\*************************************/
|
|
8963
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank */
|
|
8964
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank */
|
|
8964
8965
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8965
8966
|
|
|
8966
8967
|
"use strict";
|
|
@@ -9417,32 +9418,47 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9417
9418
|
|
|
9418
9419
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _utils_utils__WEBPACK_IMPORTED_MODULE_83__["sanitizeEditableContent"]; });
|
|
9419
9420
|
|
|
9420
|
-
/* harmony import */ var
|
|
9421
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
9421
|
+
/* harmony import */ var _mask_mask_base__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ../../mask/mask_base */ "./src/mask/mask_base.ts");
|
|
9422
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskBase", function() { return _mask_mask_base__WEBPACK_IMPORTED_MODULE_84__["InputMaskBase"]; });
|
|
9423
|
+
|
|
9424
|
+
/* harmony import */ var _mask_mask_pattern__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ../../mask/mask_pattern */ "./src/mask/mask_pattern.ts");
|
|
9425
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskPattern", function() { return _mask_mask_pattern__WEBPACK_IMPORTED_MODULE_85__["InputMaskPattern"]; });
|
|
9426
|
+
|
|
9427
|
+
/* harmony import */ var _mask_mask_numeric__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ../../mask/mask_numeric */ "./src/mask/mask_numeric.ts");
|
|
9428
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { return _mask_mask_numeric__WEBPACK_IMPORTED_MODULE_86__["InputMaskNumeric"]; });
|
|
9429
|
+
|
|
9430
|
+
/* harmony import */ var _mask_mask_datetime__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ../../mask/mask_datetime */ "./src/mask/mask_datetime.ts");
|
|
9431
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return _mask_mask_datetime__WEBPACK_IMPORTED_MODULE_87__["InputMaskDateTime"]; });
|
|
9422
9432
|
|
|
9423
|
-
/* harmony import */ var
|
|
9424
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
9433
|
+
/* harmony import */ var _mask_mask_currency__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ../../mask/mask_currency */ "./src/mask/mask_currency.ts");
|
|
9434
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return _mask_mask_currency__WEBPACK_IMPORTED_MODULE_88__["InputMaskCurrency"]; });
|
|
9425
9435
|
|
|
9426
|
-
/* harmony
|
|
9436
|
+
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ../../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
9437
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_89__["CssClassBuilder"]; });
|
|
9427
9438
|
|
|
9428
|
-
/* harmony
|
|
9439
|
+
/* harmony import */ var _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ../../defaultCss/defaultV2Css */ "./src/defaultCss/defaultV2Css.ts");
|
|
9440
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_90__["surveyCss"]; });
|
|
9429
9441
|
|
|
9430
|
-
/* harmony
|
|
9431
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropCore", function() { return _dragdrop_core__WEBPACK_IMPORTED_MODULE_86__["DragDropCore"]; });
|
|
9442
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultV2Css", function() { return _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_90__["defaultV2Css"]; });
|
|
9432
9443
|
|
|
9433
|
-
/* harmony
|
|
9434
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return _dragdrop_choices__WEBPACK_IMPORTED_MODULE_87__["DragDropChoices"]; });
|
|
9444
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultV2ThemeName", function() { return _defaultCss_defaultV2Css__WEBPACK_IMPORTED_MODULE_90__["defaultV2ThemeName"]; });
|
|
9435
9445
|
|
|
9436
|
-
/* harmony import */ var
|
|
9437
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
9446
|
+
/* harmony import */ var _dragdrop_core__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ../../dragdrop/core */ "./src/dragdrop/core.ts");
|
|
9447
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropCore", function() { return _dragdrop_core__WEBPACK_IMPORTED_MODULE_91__["DragDropCore"]; });
|
|
9448
|
+
|
|
9449
|
+
/* harmony import */ var _dragdrop_choices__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ../../dragdrop/choices */ "./src/dragdrop/choices.ts");
|
|
9450
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropChoices", function() { return _dragdrop_choices__WEBPACK_IMPORTED_MODULE_92__["DragDropChoices"]; });
|
|
9451
|
+
|
|
9452
|
+
/* harmony import */ var _dragdrop_ranking_select_to_rank__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ../../dragdrop/ranking-select-to-rank */ "./src/dragdrop/ranking-select-to-rank.ts");
|
|
9453
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return _dragdrop_ranking_select_to_rank__WEBPACK_IMPORTED_MODULE_93__["DragDropRankingSelectToRank"]; });
|
|
9438
9454
|
|
|
9439
9455
|
// styles
|
|
9440
9456
|
// import "../../main.scss";
|
|
9441
9457
|
//import "../../modern.scss";
|
|
9442
9458
|
var Version;
|
|
9443
9459
|
var ReleaseDate;
|
|
9444
|
-
Version = "" + "1.9.
|
|
9445
|
-
ReleaseDate = "" + "2024-03-
|
|
9460
|
+
Version = "" + "1.9.134";
|
|
9461
|
+
ReleaseDate = "" + "2024-03-13";
|
|
9446
9462
|
function checkLibraryVersion(ver, libraryName) {
|
|
9447
9463
|
if (Version != ver) {
|
|
9448
9464
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -9602,6 +9618,11 @@ function checkPrefix(prefix) {
|
|
|
9602
9618
|
|
|
9603
9619
|
|
|
9604
9620
|
|
|
9621
|
+
|
|
9622
|
+
|
|
9623
|
+
|
|
9624
|
+
|
|
9625
|
+
|
|
9605
9626
|
|
|
9606
9627
|
|
|
9607
9628
|
//Uncomment to include the "date" question type.
|
|
@@ -9617,7 +9638,7 @@ function checkPrefix(prefix) {
|
|
|
9617
9638
|
/*!**************************************!*\
|
|
9618
9639
|
!*** ./src/entries/core-wo-model.ts ***!
|
|
9619
9640
|
\**************************************/
|
|
9620
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
|
|
9641
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
|
|
9621
9642
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9622
9643
|
|
|
9623
9644
|
"use strict";
|
|
@@ -9997,6 +10018,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9997
10018
|
|
|
9998
10019
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["sanitizeEditableContent"]; });
|
|
9999
10020
|
|
|
10021
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskBase", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskBase"]; });
|
|
10022
|
+
|
|
10023
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskPattern", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskPattern"]; });
|
|
10024
|
+
|
|
10025
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskNumeric"]; });
|
|
10026
|
+
|
|
10027
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskDateTime"]; });
|
|
10028
|
+
|
|
10029
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskCurrency"]; });
|
|
10030
|
+
|
|
10000
10031
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]; });
|
|
10001
10032
|
|
|
10002
10033
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _chunks_model__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]; });
|
|
@@ -10086,7 +10117,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10086
10117
|
/*!*****************************!*\
|
|
10087
10118
|
!*** ./src/entries/core.ts ***!
|
|
10088
10119
|
\*****************************/
|
|
10089
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
10120
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, 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, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
10090
10121
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10091
10122
|
|
|
10092
10123
|
"use strict";
|
|
@@ -10466,6 +10497,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10466
10497
|
|
|
10467
10498
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["sanitizeEditableContent"]; });
|
|
10468
10499
|
|
|
10500
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskBase", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskBase"]; });
|
|
10501
|
+
|
|
10502
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskPattern", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskPattern"]; });
|
|
10503
|
+
|
|
10504
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskNumeric"]; });
|
|
10505
|
+
|
|
10506
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskDateTime"]; });
|
|
10507
|
+
|
|
10508
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["InputMaskCurrency"]; });
|
|
10509
|
+
|
|
10469
10510
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CssClassBuilder", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["CssClassBuilder"]; });
|
|
10470
10511
|
|
|
10471
10512
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "surveyCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["surveyCss"]; });
|
|
@@ -21232,6 +21273,1209 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("matrixbase", [
|
|
|
21232
21273
|
], undefined, "question");
|
|
21233
21274
|
|
|
21234
21275
|
|
|
21276
|
+
/***/ }),
|
|
21277
|
+
|
|
21278
|
+
/***/ "./src/mask/input_element_adapter.ts":
|
|
21279
|
+
/*!*******************************************!*\
|
|
21280
|
+
!*** ./src/mask/input_element_adapter.ts ***!
|
|
21281
|
+
\*******************************************/
|
|
21282
|
+
/*! exports provided: InputElementAdapter */
|
|
21283
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21284
|
+
|
|
21285
|
+
"use strict";
|
|
21286
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21287
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputElementAdapter", function() { return InputElementAdapter; });
|
|
21288
|
+
var InputElementAdapter = /** @class */ (function () {
|
|
21289
|
+
function InputElementAdapter(inputMaskInstance, inputElement, value) {
|
|
21290
|
+
var _this = this;
|
|
21291
|
+
if (value === void 0) { value = ""; }
|
|
21292
|
+
this.inputMaskInstance = inputMaskInstance;
|
|
21293
|
+
this.inputElement = inputElement;
|
|
21294
|
+
this.prevUnmaskedValue = undefined;
|
|
21295
|
+
this.inputMaskInstancePropertyChangedHandler = function (sender, options) {
|
|
21296
|
+
if (options.name !== "saveMaskedValue") {
|
|
21297
|
+
var maskedValue = _this.inputMaskInstance.getMaskedValue(_this.prevUnmaskedValue);
|
|
21298
|
+
_this.inputElement.value = maskedValue;
|
|
21299
|
+
}
|
|
21300
|
+
};
|
|
21301
|
+
this.beforeInputHandler = function (event) {
|
|
21302
|
+
var args = _this.createArgs(event);
|
|
21303
|
+
var result = _this.inputMaskInstance.processInput(args);
|
|
21304
|
+
_this.inputElement.value = result.value;
|
|
21305
|
+
_this.inputElement.setSelectionRange(result.caretPosition, result.caretPosition);
|
|
21306
|
+
if (!result.cancelPreventDefault) {
|
|
21307
|
+
event.preventDefault();
|
|
21308
|
+
}
|
|
21309
|
+
};
|
|
21310
|
+
this.blurInputHandler = function (event) {
|
|
21311
|
+
var unmaskedValue = _this.inputMaskInstance.getUnmaskedValue(event.target.value);
|
|
21312
|
+
_this.prevUnmaskedValue = unmaskedValue;
|
|
21313
|
+
var maskedValue = _this.inputMaskInstance.getMaskedValue(unmaskedValue);
|
|
21314
|
+
_this.inputElement.value = maskedValue;
|
|
21315
|
+
};
|
|
21316
|
+
this.inputElement.value = inputMaskInstance.getMaskedValue(value);
|
|
21317
|
+
this.prevUnmaskedValue = value;
|
|
21318
|
+
inputMaskInstance.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler);
|
|
21319
|
+
this.addInputEventListener();
|
|
21320
|
+
}
|
|
21321
|
+
InputElementAdapter.prototype.createArgs = function (event) {
|
|
21322
|
+
var args = {
|
|
21323
|
+
insertedChars: event.data,
|
|
21324
|
+
selectionStart: event.target.selectionStart,
|
|
21325
|
+
selectionEnd: event.target.selectionEnd,
|
|
21326
|
+
prevValue: event.target.value,
|
|
21327
|
+
inputDirection: "forward"
|
|
21328
|
+
};
|
|
21329
|
+
if (event.inputType === "deleteContentBackward") {
|
|
21330
|
+
args.inputDirection = "backward";
|
|
21331
|
+
if (args.selectionStart === args.selectionEnd) {
|
|
21332
|
+
args.selectionStart = Math.max(args.selectionStart - 1, 0);
|
|
21333
|
+
}
|
|
21334
|
+
}
|
|
21335
|
+
if (event.inputType === "deleteContentForward" && args.selectionStart === args.selectionEnd) {
|
|
21336
|
+
args.selectionEnd += 1;
|
|
21337
|
+
}
|
|
21338
|
+
return args;
|
|
21339
|
+
};
|
|
21340
|
+
InputElementAdapter.prototype.addInputEventListener = function () {
|
|
21341
|
+
if (!!this.inputElement) {
|
|
21342
|
+
this.inputElement.addEventListener("beforeinput", this.beforeInputHandler);
|
|
21343
|
+
this.inputElement.addEventListener("blur", this.blurInputHandler);
|
|
21344
|
+
}
|
|
21345
|
+
};
|
|
21346
|
+
InputElementAdapter.prototype.removeInputEventListener = function () {
|
|
21347
|
+
if (!!this.inputElement) {
|
|
21348
|
+
this.inputElement.removeEventListener("beforeinput", this.beforeInputHandler);
|
|
21349
|
+
this.inputElement.removeEventListener("blur", this.blurInputHandler);
|
|
21350
|
+
}
|
|
21351
|
+
};
|
|
21352
|
+
InputElementAdapter.prototype.dispose = function () {
|
|
21353
|
+
this.removeInputEventListener();
|
|
21354
|
+
this.inputMaskInstance.onPropertyChanged.remove(this.inputMaskInstancePropertyChangedHandler);
|
|
21355
|
+
};
|
|
21356
|
+
return InputElementAdapter;
|
|
21357
|
+
}());
|
|
21358
|
+
|
|
21359
|
+
|
|
21360
|
+
|
|
21361
|
+
/***/ }),
|
|
21362
|
+
|
|
21363
|
+
/***/ "./src/mask/mask_base.ts":
|
|
21364
|
+
/*!*******************************!*\
|
|
21365
|
+
!*** ./src/mask/mask_base.ts ***!
|
|
21366
|
+
\*******************************/
|
|
21367
|
+
/*! exports provided: InputMaskBase */
|
|
21368
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21369
|
+
|
|
21370
|
+
"use strict";
|
|
21371
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21372
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputMaskBase", function() { return InputMaskBase; });
|
|
21373
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../base */ "./src/base.ts");
|
|
21374
|
+
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
|
|
21375
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
21376
|
+
var extendStatics = function (d, b) {
|
|
21377
|
+
extendStatics = Object.setPrototypeOf ||
|
|
21378
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21379
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
21380
|
+
return extendStatics(d, b);
|
|
21381
|
+
};
|
|
21382
|
+
return function (d, b) {
|
|
21383
|
+
if (typeof b !== "function" && b !== null)
|
|
21384
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
21385
|
+
extendStatics(d, b);
|
|
21386
|
+
function __() { this.constructor = d; }
|
|
21387
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21388
|
+
};
|
|
21389
|
+
})();
|
|
21390
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
21391
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
21392
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21393
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21394
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21395
|
+
};
|
|
21396
|
+
|
|
21397
|
+
|
|
21398
|
+
var InputMaskBase = /** @class */ (function (_super) {
|
|
21399
|
+
__extends(InputMaskBase, _super);
|
|
21400
|
+
function InputMaskBase() {
|
|
21401
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21402
|
+
}
|
|
21403
|
+
InputMaskBase.prototype.getType = function () {
|
|
21404
|
+
return "masksettings";
|
|
21405
|
+
};
|
|
21406
|
+
InputMaskBase.prototype.setData = function (json) {
|
|
21407
|
+
var _this = this;
|
|
21408
|
+
var properties = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getProperties(this.getType());
|
|
21409
|
+
properties.forEach(function (property) {
|
|
21410
|
+
var currentValue = json[property.name];
|
|
21411
|
+
_this[property.name] = currentValue !== undefined ? currentValue : property.defaultValue;
|
|
21412
|
+
});
|
|
21413
|
+
};
|
|
21414
|
+
InputMaskBase.prototype.getData = function () {
|
|
21415
|
+
var _this = this;
|
|
21416
|
+
var res = {};
|
|
21417
|
+
var properties = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getProperties(this.getType());
|
|
21418
|
+
properties.forEach(function (property) {
|
|
21419
|
+
var currentValue = _this[property.name];
|
|
21420
|
+
if (!property.isDefaultValue(currentValue)) {
|
|
21421
|
+
res[property.name] = currentValue;
|
|
21422
|
+
}
|
|
21423
|
+
});
|
|
21424
|
+
return res;
|
|
21425
|
+
};
|
|
21426
|
+
// public get maskedInputValue(): string {
|
|
21427
|
+
// return this.input.value;
|
|
21428
|
+
// }
|
|
21429
|
+
// public get unmaskedInputValue(): string {
|
|
21430
|
+
// return this.getUnmaskedValue(this.input.value, true);
|
|
21431
|
+
// }
|
|
21432
|
+
InputMaskBase.prototype.processInput = function (args) {
|
|
21433
|
+
return { value: args.prevValue, caretPosition: args.selectionEnd, cancelPreventDefault: false };
|
|
21434
|
+
};
|
|
21435
|
+
InputMaskBase.prototype.getUnmaskedValue = function (src) { return src; };
|
|
21436
|
+
InputMaskBase.prototype.getMaskedValue = function (src) { return src; };
|
|
21437
|
+
__decorate([
|
|
21438
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
21439
|
+
], InputMaskBase.prototype, "saveMaskedValue", void 0);
|
|
21440
|
+
return InputMaskBase;
|
|
21441
|
+
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
|
|
21442
|
+
|
|
21443
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("masksettings", [
|
|
21444
|
+
{
|
|
21445
|
+
name: "saveMaskedValue:boolean",
|
|
21446
|
+
visibleIf: function (obj) {
|
|
21447
|
+
if (!obj)
|
|
21448
|
+
return false;
|
|
21449
|
+
return obj.getType() !== "masksettings";
|
|
21450
|
+
},
|
|
21451
|
+
},
|
|
21452
|
+
], function () {
|
|
21453
|
+
return new InputMaskBase();
|
|
21454
|
+
});
|
|
21455
|
+
|
|
21456
|
+
|
|
21457
|
+
/***/ }),
|
|
21458
|
+
|
|
21459
|
+
/***/ "./src/mask/mask_currency.ts":
|
|
21460
|
+
/*!***********************************!*\
|
|
21461
|
+
!*** ./src/mask/mask_currency.ts ***!
|
|
21462
|
+
\***********************************/
|
|
21463
|
+
/*! exports provided: InputMaskCurrency */
|
|
21464
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21465
|
+
|
|
21466
|
+
"use strict";
|
|
21467
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21468
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputMaskCurrency", function() { return InputMaskCurrency; });
|
|
21469
|
+
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
|
|
21470
|
+
/* harmony import */ var _mask_numeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mask_numeric */ "./src/mask/mask_numeric.ts");
|
|
21471
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
21472
|
+
var extendStatics = function (d, b) {
|
|
21473
|
+
extendStatics = Object.setPrototypeOf ||
|
|
21474
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21475
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
21476
|
+
return extendStatics(d, b);
|
|
21477
|
+
};
|
|
21478
|
+
return function (d, b) {
|
|
21479
|
+
if (typeof b !== "function" && b !== null)
|
|
21480
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
21481
|
+
extendStatics(d, b);
|
|
21482
|
+
function __() { this.constructor = d; }
|
|
21483
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21484
|
+
};
|
|
21485
|
+
})();
|
|
21486
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
21487
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
21488
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21489
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21490
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21491
|
+
};
|
|
21492
|
+
|
|
21493
|
+
|
|
21494
|
+
var InputMaskCurrency = /** @class */ (function (_super) {
|
|
21495
|
+
__extends(InputMaskCurrency, _super);
|
|
21496
|
+
function InputMaskCurrency() {
|
|
21497
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21498
|
+
}
|
|
21499
|
+
InputMaskCurrency.prototype.getType = function () {
|
|
21500
|
+
return "currencymask";
|
|
21501
|
+
};
|
|
21502
|
+
InputMaskCurrency.prototype.wrapText = function (str) {
|
|
21503
|
+
var prefixValue = this.prefix || "";
|
|
21504
|
+
var suffixValue = this.suffix || "";
|
|
21505
|
+
var result = str;
|
|
21506
|
+
if (!result)
|
|
21507
|
+
return result;
|
|
21508
|
+
if (result.indexOf(prefixValue) === -1) {
|
|
21509
|
+
result = prefixValue + result;
|
|
21510
|
+
}
|
|
21511
|
+
if (result.indexOf(suffixValue) === -1) {
|
|
21512
|
+
result += suffixValue;
|
|
21513
|
+
}
|
|
21514
|
+
return result;
|
|
21515
|
+
};
|
|
21516
|
+
InputMaskCurrency.prototype.unwrapInputArgs = function (args) {
|
|
21517
|
+
var result = args.prevValue;
|
|
21518
|
+
if (!result)
|
|
21519
|
+
return;
|
|
21520
|
+
if (this.prefix && result.indexOf(this.prefix) !== -1) {
|
|
21521
|
+
result = result.slice(result.indexOf(this.prefix) + this.prefix.length);
|
|
21522
|
+
var preffixPadding = (this.prefix || "").length;
|
|
21523
|
+
args.selectionStart = Math.max((args.selectionStart - preffixPadding), 0);
|
|
21524
|
+
args.selectionEnd -= preffixPadding;
|
|
21525
|
+
}
|
|
21526
|
+
if (this.suffix && result.indexOf(this.suffix) !== -1) {
|
|
21527
|
+
result = result.slice(0, result.indexOf(this.suffix));
|
|
21528
|
+
}
|
|
21529
|
+
args.prevValue = result;
|
|
21530
|
+
};
|
|
21531
|
+
InputMaskCurrency.prototype.processInput = function (args) {
|
|
21532
|
+
this.unwrapInputArgs(args);
|
|
21533
|
+
var result = _super.prototype.processInput.call(this, args);
|
|
21534
|
+
var preffixPadding = (this.prefix || "").length;
|
|
21535
|
+
if (!!result.value) {
|
|
21536
|
+
result.caretPosition += preffixPadding;
|
|
21537
|
+
}
|
|
21538
|
+
result.value = this.wrapText(result.value);
|
|
21539
|
+
return result;
|
|
21540
|
+
};
|
|
21541
|
+
InputMaskCurrency.prototype.getMaskedValue = function (src) {
|
|
21542
|
+
var result = _super.prototype.getMaskedValue.call(this, src);
|
|
21543
|
+
return this.wrapText(result);
|
|
21544
|
+
};
|
|
21545
|
+
__decorate([
|
|
21546
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
21547
|
+
], InputMaskCurrency.prototype, "prefix", void 0);
|
|
21548
|
+
__decorate([
|
|
21549
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
21550
|
+
], InputMaskCurrency.prototype, "suffix", void 0);
|
|
21551
|
+
return InputMaskCurrency;
|
|
21552
|
+
}(_mask_numeric__WEBPACK_IMPORTED_MODULE_1__["InputMaskNumeric"]));
|
|
21553
|
+
|
|
21554
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("currencymask", [
|
|
21555
|
+
{ name: "prefix" },
|
|
21556
|
+
{ name: "suffix" },
|
|
21557
|
+
], function () {
|
|
21558
|
+
return new InputMaskCurrency();
|
|
21559
|
+
}, "numericmask");
|
|
21560
|
+
|
|
21561
|
+
|
|
21562
|
+
/***/ }),
|
|
21563
|
+
|
|
21564
|
+
/***/ "./src/mask/mask_datetime.ts":
|
|
21565
|
+
/*!***********************************!*\
|
|
21566
|
+
!*** ./src/mask/mask_datetime.ts ***!
|
|
21567
|
+
\***********************************/
|
|
21568
|
+
/*! exports provided: getDateTimeLexems, InputMaskDateTime */
|
|
21569
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21570
|
+
|
|
21571
|
+
"use strict";
|
|
21572
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21573
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDateTimeLexems", function() { return getDateTimeLexems; });
|
|
21574
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputMaskDateTime", function() { return InputMaskDateTime; });
|
|
21575
|
+
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
|
|
21576
|
+
/* harmony import */ var _mask_pattern__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mask_pattern */ "./src/mask/mask_pattern.ts");
|
|
21577
|
+
/* harmony import */ var _mask_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mask_utils */ "./src/mask/mask_utils.ts");
|
|
21578
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
21579
|
+
var extendStatics = function (d, b) {
|
|
21580
|
+
extendStatics = Object.setPrototypeOf ||
|
|
21581
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21582
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
21583
|
+
return extendStatics(d, b);
|
|
21584
|
+
};
|
|
21585
|
+
return function (d, b) {
|
|
21586
|
+
if (typeof b !== "function" && b !== null)
|
|
21587
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
21588
|
+
extendStatics(d, b);
|
|
21589
|
+
function __() { this.constructor = d; }
|
|
21590
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21591
|
+
};
|
|
21592
|
+
})();
|
|
21593
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
21594
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
21595
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21596
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21597
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21598
|
+
};
|
|
21599
|
+
|
|
21600
|
+
|
|
21601
|
+
|
|
21602
|
+
function getMaxCountLexem(currentLexemType, count) {
|
|
21603
|
+
switch (currentLexemType) {
|
|
21604
|
+
case ("day"):
|
|
21605
|
+
case ("month"): {
|
|
21606
|
+
return 2;
|
|
21607
|
+
}
|
|
21608
|
+
case ("year"): {
|
|
21609
|
+
return count;
|
|
21610
|
+
}
|
|
21611
|
+
default: {
|
|
21612
|
+
return 1;
|
|
21613
|
+
}
|
|
21614
|
+
}
|
|
21615
|
+
}
|
|
21616
|
+
function trimDatePart(lexem, data) {
|
|
21617
|
+
var result = data;
|
|
21618
|
+
if (lexem.count < lexem.maxCount && ((lexem.type === "day" && parseInt(data[0]) === 0) || (lexem.type === "month" && parseInt(data[0]) === 0))) {
|
|
21619
|
+
result = data.slice(1, data.length);
|
|
21620
|
+
}
|
|
21621
|
+
return result;
|
|
21622
|
+
}
|
|
21623
|
+
function getDefaultYearForValidation(minYear, maxYear) {
|
|
21624
|
+
var defaultVal = 2000;
|
|
21625
|
+
if (defaultVal > maxYear) {
|
|
21626
|
+
defaultVal = parseInt(maxYear.toString().slice(0, maxYear.toString().length - 2)) * 100;
|
|
21627
|
+
}
|
|
21628
|
+
if (defaultVal < minYear) {
|
|
21629
|
+
var middle = (maxYear - minYear) / 2 + minYear;
|
|
21630
|
+
defaultVal = parseInt(middle.toString().slice(0, middle.toString().length - 1)) * 10;
|
|
21631
|
+
}
|
|
21632
|
+
if (defaultVal >= minYear && defaultVal <= maxYear) {
|
|
21633
|
+
return defaultVal;
|
|
21634
|
+
}
|
|
21635
|
+
return minYear;
|
|
21636
|
+
}
|
|
21637
|
+
function getDateTimeLexems(pattern) {
|
|
21638
|
+
var result = [];
|
|
21639
|
+
var prevLexemType;
|
|
21640
|
+
var createOrUpdateLexem = function (currentLexemType, currentChar) {
|
|
21641
|
+
if (!!prevLexemType && prevLexemType === currentLexemType) {
|
|
21642
|
+
result[result.length - 1].count++;
|
|
21643
|
+
var maxCount = getMaxCountLexem(currentLexemType, result[result.length - 1].count);
|
|
21644
|
+
result[result.length - 1].maxCount = maxCount;
|
|
21645
|
+
}
|
|
21646
|
+
else {
|
|
21647
|
+
var maxCount = getMaxCountLexem(currentLexemType, 1);
|
|
21648
|
+
// result.push({ type: currentLexemType, value: currentChar, count: 1, data: { value: "", isCompleted: false, isCorrect: false }, maxCount: maxCount });
|
|
21649
|
+
result.push({ type: currentLexemType, value: currentChar, count: 1, maxCount: maxCount });
|
|
21650
|
+
}
|
|
21651
|
+
};
|
|
21652
|
+
for (var index = 0; index < pattern.length; index++) {
|
|
21653
|
+
var currentChar = pattern[index];
|
|
21654
|
+
switch (currentChar) {
|
|
21655
|
+
case "m":
|
|
21656
|
+
createOrUpdateLexem("month", "m");
|
|
21657
|
+
break;
|
|
21658
|
+
case "d":
|
|
21659
|
+
createOrUpdateLexem("day", "d");
|
|
21660
|
+
break;
|
|
21661
|
+
case "y":
|
|
21662
|
+
createOrUpdateLexem("year", "y");
|
|
21663
|
+
break;
|
|
21664
|
+
default:
|
|
21665
|
+
result.push({ type: "separator", value: currentChar, count: 1, maxCount: 1 });
|
|
21666
|
+
break;
|
|
21667
|
+
}
|
|
21668
|
+
prevLexemType = result[result.length - 1].type;
|
|
21669
|
+
}
|
|
21670
|
+
return result;
|
|
21671
|
+
}
|
|
21672
|
+
var InputMaskDateTime = /** @class */ (function (_super) {
|
|
21673
|
+
__extends(InputMaskDateTime, _super);
|
|
21674
|
+
function InputMaskDateTime() {
|
|
21675
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
21676
|
+
_this.turnOfTheCentury = 68;
|
|
21677
|
+
_this.lexems = [];
|
|
21678
|
+
_this.inputDateTimeData = [];
|
|
21679
|
+
return _this;
|
|
21680
|
+
}
|
|
21681
|
+
InputMaskDateTime.prototype.getType = function () {
|
|
21682
|
+
return "datetimemask";
|
|
21683
|
+
};
|
|
21684
|
+
InputMaskDateTime.prototype.updateLiterals = function () {
|
|
21685
|
+
this.lexems = getDateTimeLexems(this.pattern || "");
|
|
21686
|
+
};
|
|
21687
|
+
InputMaskDateTime.prototype.leaveOnlyNumbers = function (input) {
|
|
21688
|
+
var result = "";
|
|
21689
|
+
for (var index = 0; index < input.length; index++) {
|
|
21690
|
+
if (input[index].match(_mask_utils__WEBPACK_IMPORTED_MODULE_2__["numberDefinition"])) {
|
|
21691
|
+
result += input[index];
|
|
21692
|
+
}
|
|
21693
|
+
}
|
|
21694
|
+
return result;
|
|
21695
|
+
};
|
|
21696
|
+
InputMaskDateTime.prototype.getMaskedStrFromISO = function (str) {
|
|
21697
|
+
var _this = this;
|
|
21698
|
+
var date = new Date(str);
|
|
21699
|
+
this.initInputDateTimeData();
|
|
21700
|
+
if (!isNaN(date)) {
|
|
21701
|
+
this.lexems.forEach(function (lexem, index) {
|
|
21702
|
+
var inputData = _this.inputDateTimeData[index];
|
|
21703
|
+
inputData.isCompleted = true;
|
|
21704
|
+
switch (lexem.type) {
|
|
21705
|
+
case ("day"): {
|
|
21706
|
+
inputData.value = date.getDate().toString();
|
|
21707
|
+
break;
|
|
21708
|
+
}
|
|
21709
|
+
case ("month"): {
|
|
21710
|
+
inputData.value = (date.getMonth() + 1).toString();
|
|
21711
|
+
break;
|
|
21712
|
+
}
|
|
21713
|
+
case ("year"): {
|
|
21714
|
+
var year = date.getFullYear();
|
|
21715
|
+
if (lexem.count == 2)
|
|
21716
|
+
year = year % 100;
|
|
21717
|
+
inputData.value = year.toString();
|
|
21718
|
+
break;
|
|
21719
|
+
}
|
|
21720
|
+
default: {
|
|
21721
|
+
break;
|
|
21722
|
+
}
|
|
21723
|
+
}
|
|
21724
|
+
});
|
|
21725
|
+
}
|
|
21726
|
+
return this.getFormatedString(true);
|
|
21727
|
+
};
|
|
21728
|
+
InputMaskDateTime.prototype.initInputDateTimeData = function () {
|
|
21729
|
+
var _this = this;
|
|
21730
|
+
this.inputDateTimeData = [];
|
|
21731
|
+
this.lexems.forEach(function (lexem) {
|
|
21732
|
+
_this.inputDateTimeData.push({ lexem: lexem, isCompleted: false, value: undefined });
|
|
21733
|
+
});
|
|
21734
|
+
};
|
|
21735
|
+
InputMaskDateTime.prototype.getISO_8601Format = function (dateTime) {
|
|
21736
|
+
if (dateTime.year === undefined || dateTime.month === undefined || dateTime.day === undefined)
|
|
21737
|
+
return "";
|
|
21738
|
+
var year = this.getPlaceholder(4, dateTime.year.toString(), "0") + dateTime.year;
|
|
21739
|
+
var month = this.getPlaceholder(2, dateTime.month.toString(), "0") + dateTime.month;
|
|
21740
|
+
var day = this.getPlaceholder(2, dateTime.day.toString(), "0") + dateTime.day;
|
|
21741
|
+
return [year, month, day].join("-");
|
|
21742
|
+
};
|
|
21743
|
+
InputMaskDateTime.prototype.isYearValid = function (dateTime) {
|
|
21744
|
+
if (dateTime.min === undefined && dateTime.max === undefined)
|
|
21745
|
+
return false;
|
|
21746
|
+
var data = dateTime.year.toString();
|
|
21747
|
+
var minYearPart = dateTime.min.toISOString().slice(0, data.length);
|
|
21748
|
+
var maxYearPart = dateTime.max.toISOString().slice(0, data.length);
|
|
21749
|
+
return dateTime.year >= parseInt(minYearPart) && dateTime.year <= parseInt(maxYearPart);
|
|
21750
|
+
};
|
|
21751
|
+
InputMaskDateTime.prototype.isDateValid = function (dateTime) {
|
|
21752
|
+
var min = dateTime.min;
|
|
21753
|
+
var max = dateTime.max;
|
|
21754
|
+
var year = dateTime.year !== undefined ? dateTime.year : getDefaultYearForValidation(min.getFullYear(), max.getFullYear());
|
|
21755
|
+
var month = dateTime.month !== undefined ? dateTime.month : 1;
|
|
21756
|
+
var day = dateTime.day !== undefined ? dateTime.day : 1;
|
|
21757
|
+
var date = new Date(this.getISO_8601Format({ year: year, month: month, day: day }));
|
|
21758
|
+
var monthIndex = month - 1;
|
|
21759
|
+
return !isNaN(date) &&
|
|
21760
|
+
date.getDate() === day &&
|
|
21761
|
+
date.getMonth() === monthIndex &&
|
|
21762
|
+
date.getFullYear() === year &&
|
|
21763
|
+
date >= dateTime.min && date <= dateTime.max;
|
|
21764
|
+
};
|
|
21765
|
+
InputMaskDateTime.prototype.getPlaceholder = function (lexemLength, str, char) {
|
|
21766
|
+
var paddingsLength = lexemLength - (str || "").length;
|
|
21767
|
+
var paddings = paddingsLength > 0 ? char.repeat(paddingsLength) : "";
|
|
21768
|
+
return paddings;
|
|
21769
|
+
};
|
|
21770
|
+
InputMaskDateTime.prototype.updateInputDateTimeData = function (newItem, dateTime) {
|
|
21771
|
+
var data = newItem.value;
|
|
21772
|
+
if (!data)
|
|
21773
|
+
return;
|
|
21774
|
+
var propertyName = newItem.lexem.type;
|
|
21775
|
+
dateTime[propertyName] = parseInt(data);
|
|
21776
|
+
if (data.length === newItem.lexem.maxCount) {
|
|
21777
|
+
if (this.isDateValid(dateTime)) {
|
|
21778
|
+
newItem.isCompleted = true;
|
|
21779
|
+
}
|
|
21780
|
+
else {
|
|
21781
|
+
data = data.slice(0, data.length - 1);
|
|
21782
|
+
}
|
|
21783
|
+
}
|
|
21784
|
+
else if (propertyName === "year" && !this.isYearValid(dateTime)) {
|
|
21785
|
+
data = data.slice(0, data.length - 1);
|
|
21786
|
+
}
|
|
21787
|
+
else if ((propertyName === "day" && parseInt(data[0]) > 3) || (propertyName === "month" && parseInt(data[0]) > 1)) {
|
|
21788
|
+
newItem.isCompleted = true;
|
|
21789
|
+
}
|
|
21790
|
+
newItem.value = data;
|
|
21791
|
+
dateTime[propertyName] = parseInt(data) > 0 ? parseInt(data) : undefined;
|
|
21792
|
+
};
|
|
21793
|
+
InputMaskDateTime.prototype.getCorrectDatePartFormat = function (inputData, matchWholeMask) {
|
|
21794
|
+
var lexem = inputData.lexem;
|
|
21795
|
+
var dataStr = inputData.value || "";
|
|
21796
|
+
if (!!dataStr && inputData.isCompleted) {
|
|
21797
|
+
dataStr = parseInt(dataStr).toString();
|
|
21798
|
+
}
|
|
21799
|
+
if (!!dataStr && inputData.isCompleted) {
|
|
21800
|
+
var zeroPaddings = this.getPlaceholder(lexem.count, dataStr, "0");
|
|
21801
|
+
dataStr = zeroPaddings + dataStr;
|
|
21802
|
+
}
|
|
21803
|
+
else {
|
|
21804
|
+
// !!!
|
|
21805
|
+
dataStr = trimDatePart(lexem, dataStr);
|
|
21806
|
+
if (matchWholeMask) {
|
|
21807
|
+
dataStr += this.getPlaceholder(lexem.count, dataStr, lexem.value);
|
|
21808
|
+
}
|
|
21809
|
+
}
|
|
21810
|
+
return dataStr;
|
|
21811
|
+
};
|
|
21812
|
+
InputMaskDateTime.prototype.createIDateTimeComposition = function () {
|
|
21813
|
+
var tempDateTime = {
|
|
21814
|
+
day: undefined,
|
|
21815
|
+
month: undefined,
|
|
21816
|
+
year: undefined,
|
|
21817
|
+
min: new Date(this.min || "0001-01-01"),
|
|
21818
|
+
max: new Date(this.max || "9999-12-31")
|
|
21819
|
+
};
|
|
21820
|
+
return tempDateTime;
|
|
21821
|
+
};
|
|
21822
|
+
InputMaskDateTime.prototype.parseTwoDigitYear = function (data) {
|
|
21823
|
+
var inputData = data.value;
|
|
21824
|
+
if (data.lexem.type !== "year" || data.lexem.count > 2)
|
|
21825
|
+
return inputData;
|
|
21826
|
+
if (!!this.max && this.max.length >= 4) {
|
|
21827
|
+
this.turnOfTheCentury = parseInt(this.max.slice(2, 4));
|
|
21828
|
+
}
|
|
21829
|
+
var year = parseInt(inputData);
|
|
21830
|
+
var result = (year > this.turnOfTheCentury ? "19" : "20") + inputData;
|
|
21831
|
+
return result;
|
|
21832
|
+
};
|
|
21833
|
+
InputMaskDateTime.prototype.getFormatedString = function (matchWholeMask) {
|
|
21834
|
+
var result = "";
|
|
21835
|
+
var prevSeparator = "";
|
|
21836
|
+
var prevIsCompleted = false;
|
|
21837
|
+
for (var index = 0; index < this.inputDateTimeData.length; index++) {
|
|
21838
|
+
var inputData = this.inputDateTimeData[index];
|
|
21839
|
+
switch (inputData.lexem.type) {
|
|
21840
|
+
case "day":
|
|
21841
|
+
case "month":
|
|
21842
|
+
case "year":
|
|
21843
|
+
if (inputData.value === undefined && !matchWholeMask) {
|
|
21844
|
+
result += (prevIsCompleted ? prevSeparator : "");
|
|
21845
|
+
return result;
|
|
21846
|
+
}
|
|
21847
|
+
else {
|
|
21848
|
+
var data = this.getCorrectDatePartFormat(inputData, matchWholeMask);
|
|
21849
|
+
result += (prevSeparator + data);
|
|
21850
|
+
prevIsCompleted = inputData.isCompleted;
|
|
21851
|
+
}
|
|
21852
|
+
break;
|
|
21853
|
+
case "separator":
|
|
21854
|
+
prevSeparator = inputData.lexem.value;
|
|
21855
|
+
break;
|
|
21856
|
+
}
|
|
21857
|
+
}
|
|
21858
|
+
return result;
|
|
21859
|
+
};
|
|
21860
|
+
InputMaskDateTime.prototype.setInputDateTimeData = function (numberParts) {
|
|
21861
|
+
var _this = this;
|
|
21862
|
+
var numberPartsArrayIndex = 0;
|
|
21863
|
+
this.initInputDateTimeData();
|
|
21864
|
+
this.lexems.forEach(function (lexem, index) {
|
|
21865
|
+
if (lexem.type !== "separator" && numberParts.length > 0 && numberPartsArrayIndex < numberParts.length) {
|
|
21866
|
+
var inputData = _this.inputDateTimeData[index];
|
|
21867
|
+
var currentPart = numberParts[numberPartsArrayIndex];
|
|
21868
|
+
var _data = _this.leaveOnlyNumbers(currentPart);
|
|
21869
|
+
inputData.value = _data.slice(0, lexem.maxCount);
|
|
21870
|
+
numberPartsArrayIndex++;
|
|
21871
|
+
}
|
|
21872
|
+
});
|
|
21873
|
+
};
|
|
21874
|
+
InputMaskDateTime.prototype._getMaskedValue = function (src, matchWholeMask) {
|
|
21875
|
+
var _this = this;
|
|
21876
|
+
if (matchWholeMask === void 0) { matchWholeMask = true; }
|
|
21877
|
+
var input = (src === undefined || src === null) ? "" : src.toString();
|
|
21878
|
+
var inputParts = this.getParts(input);
|
|
21879
|
+
this.setInputDateTimeData(inputParts);
|
|
21880
|
+
var tempDateTime = this.createIDateTimeComposition();
|
|
21881
|
+
this.inputDateTimeData.forEach(function (itemData) { return _this.updateInputDateTimeData(itemData, tempDateTime); });
|
|
21882
|
+
var result = this.getFormatedString(matchWholeMask);
|
|
21883
|
+
return result;
|
|
21884
|
+
};
|
|
21885
|
+
InputMaskDateTime.prototype.getPartsOld = function (input) {
|
|
21886
|
+
var inputParts = [];
|
|
21887
|
+
var separatorLexems = this.lexems.filter(function (l) { return l.type === "separator"; });
|
|
21888
|
+
var separatorLexemsIndex = 0;
|
|
21889
|
+
do {
|
|
21890
|
+
if (!separatorLexems[separatorLexemsIndex]) {
|
|
21891
|
+
if (!!input) {
|
|
21892
|
+
inputParts.push(input);
|
|
21893
|
+
input = "";
|
|
21894
|
+
}
|
|
21895
|
+
break;
|
|
21896
|
+
}
|
|
21897
|
+
var separatorCharIndex = input.indexOf(separatorLexems[separatorLexemsIndex].value);
|
|
21898
|
+
if (separatorCharIndex !== -1) {
|
|
21899
|
+
var part = input.slice(0, separatorCharIndex);
|
|
21900
|
+
if (!!part) {
|
|
21901
|
+
inputParts.push(part);
|
|
21902
|
+
}
|
|
21903
|
+
input = input.slice(separatorCharIndex + 1);
|
|
21904
|
+
}
|
|
21905
|
+
else {
|
|
21906
|
+
}
|
|
21907
|
+
separatorLexemsIndex++;
|
|
21908
|
+
} while (!!input);
|
|
21909
|
+
return inputParts;
|
|
21910
|
+
};
|
|
21911
|
+
InputMaskDateTime.prototype.getParts = function (input) {
|
|
21912
|
+
var inputParts = [];
|
|
21913
|
+
var lexemsWithValue = this.lexems.filter(function (l) { return l.type !== "separator"; });
|
|
21914
|
+
var separators = this.lexems.filter(function (l) { return l.type === "separator"; }).map(function (s) { return s.value; });
|
|
21915
|
+
var curPart = "";
|
|
21916
|
+
var foundSeparator = false;
|
|
21917
|
+
var foundPseudoSeparator = false;
|
|
21918
|
+
for (var i = 0; i < input.length; i++) {
|
|
21919
|
+
var inputChar = input[i];
|
|
21920
|
+
if (inputChar.match(_mask_utils__WEBPACK_IMPORTED_MODULE_2__["numberDefinition"]) || inputChar === lexemsWithValue[inputParts.length].value) {
|
|
21921
|
+
foundSeparator = false;
|
|
21922
|
+
foundPseudoSeparator = false;
|
|
21923
|
+
curPart += inputChar;
|
|
21924
|
+
}
|
|
21925
|
+
else {
|
|
21926
|
+
if (separators.indexOf(inputChar) !== -1) {
|
|
21927
|
+
if (!foundPseudoSeparator) {
|
|
21928
|
+
foundSeparator = true;
|
|
21929
|
+
inputParts.push(curPart);
|
|
21930
|
+
curPart = "";
|
|
21931
|
+
}
|
|
21932
|
+
}
|
|
21933
|
+
else {
|
|
21934
|
+
if (!foundSeparator) {
|
|
21935
|
+
foundPseudoSeparator = true;
|
|
21936
|
+
inputParts.push(curPart);
|
|
21937
|
+
curPart = "";
|
|
21938
|
+
}
|
|
21939
|
+
}
|
|
21940
|
+
}
|
|
21941
|
+
if (inputParts.length >= lexemsWithValue.length) {
|
|
21942
|
+
foundSeparator = false;
|
|
21943
|
+
break;
|
|
21944
|
+
}
|
|
21945
|
+
}
|
|
21946
|
+
if (curPart != "" || foundSeparator) {
|
|
21947
|
+
inputParts.push(curPart);
|
|
21948
|
+
}
|
|
21949
|
+
return inputParts;
|
|
21950
|
+
};
|
|
21951
|
+
InputMaskDateTime.prototype.getUnmaskedValue = function (src) {
|
|
21952
|
+
var _this = this;
|
|
21953
|
+
var input = (src === undefined || src === null) ? "" : src.toString();
|
|
21954
|
+
var inputParts = this.getParts(input);
|
|
21955
|
+
this.setInputDateTimeData(inputParts);
|
|
21956
|
+
var tempDateTime = this.createIDateTimeComposition();
|
|
21957
|
+
this.inputDateTimeData.forEach(function (inputData) {
|
|
21958
|
+
var str = inputData.value;
|
|
21959
|
+
if (!str || str.length < inputData.lexem.count)
|
|
21960
|
+
return undefined;
|
|
21961
|
+
tempDateTime[inputData.lexem.type] = parseInt(_this.parseTwoDigitYear(inputData));
|
|
21962
|
+
});
|
|
21963
|
+
return this.getISO_8601Format(tempDateTime);
|
|
21964
|
+
};
|
|
21965
|
+
InputMaskDateTime.prototype.getMaskedValue = function (src) {
|
|
21966
|
+
if (this.saveMaskedValue) {
|
|
21967
|
+
return this._getMaskedValue(src);
|
|
21968
|
+
}
|
|
21969
|
+
else {
|
|
21970
|
+
return this.getMaskedStrFromISO(src);
|
|
21971
|
+
}
|
|
21972
|
+
};
|
|
21973
|
+
InputMaskDateTime.prototype.processInput = function (args) {
|
|
21974
|
+
var result = { value: args.prevValue, caretPosition: args.selectionEnd, cancelPreventDefault: false };
|
|
21975
|
+
var leftPart = args.prevValue.slice(0, args.selectionStart);
|
|
21976
|
+
var rightPart = args.prevValue.slice(args.selectionEnd);
|
|
21977
|
+
result.value = this._getMaskedValue(leftPart + (args.insertedChars || "") + rightPart);
|
|
21978
|
+
if (!args.insertedChars && args.inputDirection === "backward") {
|
|
21979
|
+
result.caretPosition = args.selectionStart;
|
|
21980
|
+
}
|
|
21981
|
+
else {
|
|
21982
|
+
result.caretPosition = this._getMaskedValue(leftPart + (args.insertedChars || ""), false).length;
|
|
21983
|
+
}
|
|
21984
|
+
return result;
|
|
21985
|
+
};
|
|
21986
|
+
__decorate([
|
|
21987
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
21988
|
+
], InputMaskDateTime.prototype, "min", void 0);
|
|
21989
|
+
__decorate([
|
|
21990
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
21991
|
+
], InputMaskDateTime.prototype, "max", void 0);
|
|
21992
|
+
return InputMaskDateTime;
|
|
21993
|
+
}(_mask_pattern__WEBPACK_IMPORTED_MODULE_1__["InputMaskPattern"]));
|
|
21994
|
+
|
|
21995
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("datetimemask", [
|
|
21996
|
+
{
|
|
21997
|
+
name: "min",
|
|
21998
|
+
type: "datetime",
|
|
21999
|
+
enableIf: function (obj) {
|
|
22000
|
+
return !!obj.pattern;
|
|
22001
|
+
}
|
|
22002
|
+
},
|
|
22003
|
+
{
|
|
22004
|
+
name: "max",
|
|
22005
|
+
type: "datetime",
|
|
22006
|
+
enableIf: function (obj) {
|
|
22007
|
+
return !!obj.pattern;
|
|
22008
|
+
}
|
|
22009
|
+
}
|
|
22010
|
+
], function () {
|
|
22011
|
+
return new InputMaskDateTime();
|
|
22012
|
+
}, "patternmask");
|
|
22013
|
+
|
|
22014
|
+
|
|
22015
|
+
/***/ }),
|
|
22016
|
+
|
|
22017
|
+
/***/ "./src/mask/mask_numeric.ts":
|
|
22018
|
+
/*!**********************************!*\
|
|
22019
|
+
!*** ./src/mask/mask_numeric.ts ***!
|
|
22020
|
+
\**********************************/
|
|
22021
|
+
/*! exports provided: splitString, InputMaskNumeric */
|
|
22022
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
22023
|
+
|
|
22024
|
+
"use strict";
|
|
22025
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22026
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitString", function() { return splitString; });
|
|
22027
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { return InputMaskNumeric; });
|
|
22028
|
+
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
|
|
22029
|
+
/* harmony import */ var _mask_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mask_base */ "./src/mask/mask_base.ts");
|
|
22030
|
+
/* harmony import */ var _mask_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mask_utils */ "./src/mask/mask_utils.ts");
|
|
22031
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
22032
|
+
var extendStatics = function (d, b) {
|
|
22033
|
+
extendStatics = Object.setPrototypeOf ||
|
|
22034
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
22035
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
22036
|
+
return extendStatics(d, b);
|
|
22037
|
+
};
|
|
22038
|
+
return function (d, b) {
|
|
22039
|
+
if (typeof b !== "function" && b !== null)
|
|
22040
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
22041
|
+
extendStatics(d, b);
|
|
22042
|
+
function __() { this.constructor = d; }
|
|
22043
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
22044
|
+
};
|
|
22045
|
+
})();
|
|
22046
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
22047
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22048
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
22049
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22050
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22051
|
+
};
|
|
22052
|
+
|
|
22053
|
+
|
|
22054
|
+
|
|
22055
|
+
function splitString(str, reverse, n) {
|
|
22056
|
+
if (reverse === void 0) { reverse = true; }
|
|
22057
|
+
if (n === void 0) { n = 3; }
|
|
22058
|
+
var arr = [];
|
|
22059
|
+
if (reverse) {
|
|
22060
|
+
for (var i = str.length - n; i > -n; i -= n) {
|
|
22061
|
+
arr.push(str.substring(i, i + n));
|
|
22062
|
+
}
|
|
22063
|
+
arr = arr.reverse();
|
|
22064
|
+
}
|
|
22065
|
+
else {
|
|
22066
|
+
for (var i = 0; i < str.length; i += n) {
|
|
22067
|
+
arr.push(str.substring(i, i + n));
|
|
22068
|
+
}
|
|
22069
|
+
}
|
|
22070
|
+
return arr;
|
|
22071
|
+
}
|
|
22072
|
+
var InputMaskNumeric = /** @class */ (function (_super) {
|
|
22073
|
+
__extends(InputMaskNumeric, _super);
|
|
22074
|
+
function InputMaskNumeric() {
|
|
22075
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22076
|
+
}
|
|
22077
|
+
InputMaskNumeric.prototype.calccaretPosition = function (leftPart, args, maskedValue) {
|
|
22078
|
+
var leftPartMaskedLength = !!leftPart ? this.displayNumber(this.parseNumber(leftPart), false).length : 0;
|
|
22079
|
+
var validCharIndex = 0;
|
|
22080
|
+
var result = args.selectionStart;
|
|
22081
|
+
// let result = 0;
|
|
22082
|
+
var isDeleteKeyOperation = !args.insertedChars && args.inputDirection === "forward";
|
|
22083
|
+
for (var index = 0; index < maskedValue.length; index++) {
|
|
22084
|
+
var currentChar = maskedValue[index];
|
|
22085
|
+
if (currentChar !== this.thousandsSeparator) {
|
|
22086
|
+
validCharIndex++;
|
|
22087
|
+
}
|
|
22088
|
+
if (validCharIndex === (leftPartMaskedLength + (isDeleteKeyOperation ? 1 : 0))) {
|
|
22089
|
+
if (isDeleteKeyOperation) {
|
|
22090
|
+
result = index;
|
|
22091
|
+
}
|
|
22092
|
+
else {
|
|
22093
|
+
result = index + 1;
|
|
22094
|
+
}
|
|
22095
|
+
break;
|
|
22096
|
+
}
|
|
22097
|
+
// if (validCharIndex === leftPartMaskedLength) {
|
|
22098
|
+
// result = index + 1;
|
|
22099
|
+
// break;
|
|
22100
|
+
// }
|
|
22101
|
+
}
|
|
22102
|
+
return result;
|
|
22103
|
+
};
|
|
22104
|
+
InputMaskNumeric.prototype.displayNumber = function (parsedNumber, insertThousandsSeparator, matchWholeMask) {
|
|
22105
|
+
if (insertThousandsSeparator === void 0) { insertThousandsSeparator = true; }
|
|
22106
|
+
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
|
22107
|
+
var displayIntegralPart = parsedNumber.integralPart;
|
|
22108
|
+
if (insertThousandsSeparator && !!displayIntegralPart) {
|
|
22109
|
+
displayIntegralPart = splitString(displayIntegralPart).join(this.thousandsSeparator);
|
|
22110
|
+
}
|
|
22111
|
+
var displayFractionalPart = parsedNumber.fractionalPart;
|
|
22112
|
+
var minusSign = parsedNumber.isNegative ? "-" : "";
|
|
22113
|
+
if (displayFractionalPart === "") {
|
|
22114
|
+
if (matchWholeMask) {
|
|
22115
|
+
return (!displayIntegralPart || displayIntegralPart === "0") ? displayIntegralPart : minusSign + displayIntegralPart;
|
|
22116
|
+
}
|
|
22117
|
+
else {
|
|
22118
|
+
var displayDecimalSeparator = parsedNumber.hasDecimalSeparator && !matchWholeMask ? this.decimalSeparator : "";
|
|
22119
|
+
var src = displayIntegralPart + displayDecimalSeparator;
|
|
22120
|
+
return src === "0" ? src : minusSign + src;
|
|
22121
|
+
}
|
|
22122
|
+
}
|
|
22123
|
+
else {
|
|
22124
|
+
displayIntegralPart = displayIntegralPart || "0";
|
|
22125
|
+
displayFractionalPart = displayFractionalPart.substring(0, this.precision);
|
|
22126
|
+
return [minusSign + displayIntegralPart, displayFractionalPart].join(this.decimalSeparator);
|
|
22127
|
+
}
|
|
22128
|
+
};
|
|
22129
|
+
InputMaskNumeric.prototype.convertNumber = function (parsedNumber) {
|
|
22130
|
+
var value;
|
|
22131
|
+
var minusSign = parsedNumber.isNegative ? "-" : "";
|
|
22132
|
+
if (!!parsedNumber.fractionalPart) {
|
|
22133
|
+
value = parseFloat(minusSign + (parsedNumber.integralPart || "0") + "." + parsedNumber.fractionalPart.substring(0, this.precision));
|
|
22134
|
+
}
|
|
22135
|
+
else {
|
|
22136
|
+
value = parseInt(minusSign + parsedNumber.integralPart || "0");
|
|
22137
|
+
}
|
|
22138
|
+
return value;
|
|
22139
|
+
};
|
|
22140
|
+
InputMaskNumeric.prototype.validateNumber = function (number) {
|
|
22141
|
+
var min = this.min || Number.MIN_SAFE_INTEGER;
|
|
22142
|
+
var max = this.max || Number.MAX_SAFE_INTEGER;
|
|
22143
|
+
if (this.min !== undefined || this.max !== undefined) {
|
|
22144
|
+
var value = this.convertNumber(number);
|
|
22145
|
+
if (Number.isNaN(value)) {
|
|
22146
|
+
return true;
|
|
22147
|
+
}
|
|
22148
|
+
return value >= min && value <= max;
|
|
22149
|
+
}
|
|
22150
|
+
return true;
|
|
22151
|
+
};
|
|
22152
|
+
InputMaskNumeric.prototype.parseNumber = function (src) {
|
|
22153
|
+
var result = { integralPart: "", fractionalPart: "", hasDecimalSeparator: false, isNegative: false };
|
|
22154
|
+
var input = (src === undefined || src === null) ? "" : src.toString();
|
|
22155
|
+
if (typeof src === "number") {
|
|
22156
|
+
input = src.toString().replace(".", this.decimalSeparator);
|
|
22157
|
+
}
|
|
22158
|
+
var minusCharCount = 0;
|
|
22159
|
+
for (var inputIndex = 0; inputIndex < input.length; inputIndex++) {
|
|
22160
|
+
var currentChar = input[inputIndex];
|
|
22161
|
+
switch (currentChar) {
|
|
22162
|
+
case "-": {
|
|
22163
|
+
if (this.allowNegativeValues) {
|
|
22164
|
+
minusCharCount++;
|
|
22165
|
+
}
|
|
22166
|
+
break;
|
|
22167
|
+
}
|
|
22168
|
+
case this.decimalSeparator: {
|
|
22169
|
+
if (this.precision > 0) {
|
|
22170
|
+
result.hasDecimalSeparator = true;
|
|
22171
|
+
}
|
|
22172
|
+
break;
|
|
22173
|
+
}
|
|
22174
|
+
case this.thousandsSeparator: {
|
|
22175
|
+
break;
|
|
22176
|
+
}
|
|
22177
|
+
default: {
|
|
22178
|
+
if (currentChar.match(_mask_utils__WEBPACK_IMPORTED_MODULE_2__["numberDefinition"])) {
|
|
22179
|
+
if (result.hasDecimalSeparator) {
|
|
22180
|
+
result.fractionalPart += currentChar;
|
|
22181
|
+
}
|
|
22182
|
+
else {
|
|
22183
|
+
result.integralPart += currentChar;
|
|
22184
|
+
}
|
|
22185
|
+
}
|
|
22186
|
+
}
|
|
22187
|
+
}
|
|
22188
|
+
}
|
|
22189
|
+
result.isNegative = minusCharCount % 2 !== 0;
|
|
22190
|
+
if (result.integralPart.length > 1 && result.integralPart[0] === "0") {
|
|
22191
|
+
result.integralPart = result.integralPart.slice(1);
|
|
22192
|
+
}
|
|
22193
|
+
return result;
|
|
22194
|
+
};
|
|
22195
|
+
InputMaskNumeric.prototype.getNumberMaskedValue = function (src, matchWholeMask) {
|
|
22196
|
+
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
|
22197
|
+
var input = (src === undefined || src === null) ? "" : src;
|
|
22198
|
+
var parsedNumber = this.parseNumber(input);
|
|
22199
|
+
var displayText = this.displayNumber(parsedNumber, true, matchWholeMask);
|
|
22200
|
+
return displayText;
|
|
22201
|
+
};
|
|
22202
|
+
InputMaskNumeric.prototype.getNumberUnmaskedValue = function (str) {
|
|
22203
|
+
var parsedNumber = this.parseNumber(str);
|
|
22204
|
+
return this.convertNumber(parsedNumber);
|
|
22205
|
+
};
|
|
22206
|
+
InputMaskNumeric.prototype.getMaskedValue = function (src) {
|
|
22207
|
+
return this.getNumberMaskedValue(src, true);
|
|
22208
|
+
};
|
|
22209
|
+
InputMaskNumeric.prototype.getUnmaskedValue = function (src) {
|
|
22210
|
+
return this.getNumberUnmaskedValue(src);
|
|
22211
|
+
};
|
|
22212
|
+
InputMaskNumeric.prototype.processInput = function (args) {
|
|
22213
|
+
var result = { value: args.prevValue, caretPosition: args.selectionEnd, cancelPreventDefault: false };
|
|
22214
|
+
var leftPart = args.prevValue.slice(0, args.selectionStart) + (args.insertedChars || "");
|
|
22215
|
+
var rightPart = args.prevValue.slice(args.selectionEnd);
|
|
22216
|
+
var src = leftPart + rightPart;
|
|
22217
|
+
var parsedNumber = this.parseNumber(src);
|
|
22218
|
+
if (!this.validateNumber(parsedNumber)) {
|
|
22219
|
+
return result;
|
|
22220
|
+
}
|
|
22221
|
+
var maskedValue = this.getNumberMaskedValue(src);
|
|
22222
|
+
var caretPosition = this.calccaretPosition(leftPart, args, maskedValue);
|
|
22223
|
+
result.value = maskedValue;
|
|
22224
|
+
result.caretPosition = caretPosition;
|
|
22225
|
+
return result;
|
|
22226
|
+
};
|
|
22227
|
+
InputMaskNumeric.prototype.getType = function () {
|
|
22228
|
+
return "numericmask";
|
|
22229
|
+
};
|
|
22230
|
+
InputMaskNumeric.prototype.isPropertyEmpty = function (value) {
|
|
22231
|
+
return value === "" || value === undefined || value === null;
|
|
22232
|
+
};
|
|
22233
|
+
__decorate([
|
|
22234
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
22235
|
+
], InputMaskNumeric.prototype, "allowNegativeValues", void 0);
|
|
22236
|
+
__decorate([
|
|
22237
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
22238
|
+
], InputMaskNumeric.prototype, "decimalSeparator", void 0);
|
|
22239
|
+
__decorate([
|
|
22240
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
22241
|
+
], InputMaskNumeric.prototype, "precision", void 0);
|
|
22242
|
+
__decorate([
|
|
22243
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
22244
|
+
], InputMaskNumeric.prototype, "thousandsSeparator", void 0);
|
|
22245
|
+
__decorate([
|
|
22246
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
22247
|
+
], InputMaskNumeric.prototype, "min", void 0);
|
|
22248
|
+
__decorate([
|
|
22249
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
22250
|
+
], InputMaskNumeric.prototype, "max", void 0);
|
|
22251
|
+
return InputMaskNumeric;
|
|
22252
|
+
}(_mask_base__WEBPACK_IMPORTED_MODULE_1__["InputMaskBase"]));
|
|
22253
|
+
|
|
22254
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("numericmask", [
|
|
22255
|
+
{ name: "allowNegativeValues:boolean", default: true },
|
|
22256
|
+
{ name: "decimalSeparator", default: ".", maxLength: 1 },
|
|
22257
|
+
{ name: "thousandsSeparator", default: ",", maxLength: 1 },
|
|
22258
|
+
{ name: "precision:number", default: 2, minValue: 0 },
|
|
22259
|
+
{ name: "min:number" },
|
|
22260
|
+
{ name: "max:number" },
|
|
22261
|
+
], function () {
|
|
22262
|
+
return new InputMaskNumeric();
|
|
22263
|
+
}, "masksettings");
|
|
22264
|
+
|
|
22265
|
+
|
|
22266
|
+
/***/ }),
|
|
22267
|
+
|
|
22268
|
+
/***/ "./src/mask/mask_pattern.ts":
|
|
22269
|
+
/*!**********************************!*\
|
|
22270
|
+
!*** ./src/mask/mask_pattern.ts ***!
|
|
22271
|
+
\**********************************/
|
|
22272
|
+
/*! exports provided: getLiterals, getMaskedValueByPattern, getUnmaskedValueByPattern, InputMaskPattern */
|
|
22273
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
22274
|
+
|
|
22275
|
+
"use strict";
|
|
22276
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22277
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLiterals", function() { return getLiterals; });
|
|
22278
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMaskedValueByPattern", function() { return getMaskedValueByPattern; });
|
|
22279
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnmaskedValueByPattern", function() { return getUnmaskedValueByPattern; });
|
|
22280
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InputMaskPattern", function() { return InputMaskPattern; });
|
|
22281
|
+
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../settings */ "./src/settings.ts");
|
|
22282
|
+
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../jsonobject */ "./src/jsonobject.ts");
|
|
22283
|
+
/* harmony import */ var _mask_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mask_base */ "./src/mask/mask_base.ts");
|
|
22284
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
22285
|
+
var extendStatics = function (d, b) {
|
|
22286
|
+
extendStatics = Object.setPrototypeOf ||
|
|
22287
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
22288
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
22289
|
+
return extendStatics(d, b);
|
|
22290
|
+
};
|
|
22291
|
+
return function (d, b) {
|
|
22292
|
+
if (typeof b !== "function" && b !== null)
|
|
22293
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
22294
|
+
extendStatics(d, b);
|
|
22295
|
+
function __() { this.constructor = d; }
|
|
22296
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
22297
|
+
};
|
|
22298
|
+
})();
|
|
22299
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
22300
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22301
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
22302
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22303
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22304
|
+
};
|
|
22305
|
+
|
|
22306
|
+
|
|
22307
|
+
|
|
22308
|
+
function getLiterals(pattern) {
|
|
22309
|
+
var result = [];
|
|
22310
|
+
var prevCharIsEscaped = false;
|
|
22311
|
+
var definitionsKeys = Object.keys(_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].maskSettings.patternDefinitions);
|
|
22312
|
+
for (var index = 0; index < pattern.length; index++) {
|
|
22313
|
+
var currentChar = pattern[index];
|
|
22314
|
+
if (currentChar === _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].maskSettings.patternEscapeChar) {
|
|
22315
|
+
prevCharIsEscaped = true;
|
|
22316
|
+
}
|
|
22317
|
+
else if (prevCharIsEscaped) {
|
|
22318
|
+
prevCharIsEscaped = false;
|
|
22319
|
+
result.push({ type: "fixed", value: currentChar });
|
|
22320
|
+
}
|
|
22321
|
+
else {
|
|
22322
|
+
result.push({ type: definitionsKeys.indexOf(currentChar) !== -1 ? "regex" : "const", value: currentChar });
|
|
22323
|
+
}
|
|
22324
|
+
}
|
|
22325
|
+
return result;
|
|
22326
|
+
}
|
|
22327
|
+
function getFirstMatch(str, strIndex, literal) {
|
|
22328
|
+
var currentDefinition = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].maskSettings.patternDefinitions[literal.value];
|
|
22329
|
+
while (strIndex < str.length) {
|
|
22330
|
+
if (str[strIndex].match(currentDefinition)) {
|
|
22331
|
+
return strIndex;
|
|
22332
|
+
}
|
|
22333
|
+
strIndex++;
|
|
22334
|
+
}
|
|
22335
|
+
return strIndex;
|
|
22336
|
+
}
|
|
22337
|
+
function getMaskedValueByPattern(src, pattern, matchWholeMask) {
|
|
22338
|
+
var input = (src === undefined || src === null) ? "" : src;
|
|
22339
|
+
var result = "";
|
|
22340
|
+
var strIndex = 0;
|
|
22341
|
+
var literals = (typeof pattern === "string") ? getLiterals(pattern) : pattern;
|
|
22342
|
+
for (var maskIndex = 0; maskIndex < literals.length; maskIndex++) {
|
|
22343
|
+
switch (literals[maskIndex].type) {
|
|
22344
|
+
case "regex":
|
|
22345
|
+
if (strIndex < input.length) {
|
|
22346
|
+
strIndex = getFirstMatch(input, strIndex, literals[maskIndex]);
|
|
22347
|
+
}
|
|
22348
|
+
if (strIndex < input.length) {
|
|
22349
|
+
result += input[strIndex];
|
|
22350
|
+
}
|
|
22351
|
+
else if (matchWholeMask) {
|
|
22352
|
+
result += _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].maskSettings.patternPlaceholderChar;
|
|
22353
|
+
}
|
|
22354
|
+
else {
|
|
22355
|
+
return result;
|
|
22356
|
+
}
|
|
22357
|
+
strIndex++;
|
|
22358
|
+
break;
|
|
22359
|
+
case "const":
|
|
22360
|
+
case "fixed":
|
|
22361
|
+
result += literals[maskIndex].value;
|
|
22362
|
+
if (literals[maskIndex].value === input[strIndex]) {
|
|
22363
|
+
strIndex++;
|
|
22364
|
+
}
|
|
22365
|
+
break;
|
|
22366
|
+
}
|
|
22367
|
+
}
|
|
22368
|
+
return result;
|
|
22369
|
+
}
|
|
22370
|
+
function getUnmaskedValueByPattern(str, pattern, matchWholeMask, skipFixedChar) {
|
|
22371
|
+
if (skipFixedChar === void 0) { skipFixedChar = false; }
|
|
22372
|
+
var result = "";
|
|
22373
|
+
if (!str)
|
|
22374
|
+
return result;
|
|
22375
|
+
var literals = (typeof pattern === "string") ? getLiterals(pattern) : pattern;
|
|
22376
|
+
for (var index = 0; index < literals.length; index++) {
|
|
22377
|
+
if (literals[index].type === "fixed" && !skipFixedChar) {
|
|
22378
|
+
result += literals[index].value;
|
|
22379
|
+
}
|
|
22380
|
+
if (literals[index].type === "regex") {
|
|
22381
|
+
var currentDefinition = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].maskSettings.patternDefinitions[literals[index].value];
|
|
22382
|
+
if (!!str[index] && str[index].match(currentDefinition)) {
|
|
22383
|
+
result += str[index];
|
|
22384
|
+
}
|
|
22385
|
+
else if (matchWholeMask) {
|
|
22386
|
+
result = "";
|
|
22387
|
+
break;
|
|
22388
|
+
}
|
|
22389
|
+
else {
|
|
22390
|
+
break;
|
|
22391
|
+
}
|
|
22392
|
+
}
|
|
22393
|
+
}
|
|
22394
|
+
return result;
|
|
22395
|
+
}
|
|
22396
|
+
var InputMaskPattern = /** @class */ (function (_super) {
|
|
22397
|
+
__extends(InputMaskPattern, _super);
|
|
22398
|
+
function InputMaskPattern() {
|
|
22399
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
22400
|
+
_this.literals = [];
|
|
22401
|
+
return _this;
|
|
22402
|
+
}
|
|
22403
|
+
InputMaskPattern.prototype.updateLiterals = function () {
|
|
22404
|
+
this.literals = getLiterals(this.pattern || "");
|
|
22405
|
+
};
|
|
22406
|
+
InputMaskPattern.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
|
|
22407
|
+
if (name === "pattern") {
|
|
22408
|
+
this.updateLiterals();
|
|
22409
|
+
}
|
|
22410
|
+
};
|
|
22411
|
+
InputMaskPattern.prototype.getType = function () {
|
|
22412
|
+
return "patternmask";
|
|
22413
|
+
};
|
|
22414
|
+
InputMaskPattern.prototype.fromJSON = function (json, options) {
|
|
22415
|
+
_super.prototype.fromJSON.call(this, json, options);
|
|
22416
|
+
this.updateLiterals();
|
|
22417
|
+
};
|
|
22418
|
+
InputMaskPattern.prototype._getMaskedValue = function (src, matchWholeMask) {
|
|
22419
|
+
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
|
22420
|
+
var input = (src === undefined || src === null) ? "" : src;
|
|
22421
|
+
return getMaskedValueByPattern(input, this.literals, matchWholeMask);
|
|
22422
|
+
};
|
|
22423
|
+
InputMaskPattern.prototype._getUnmaskedValue = function (src, matchWholeMask) {
|
|
22424
|
+
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
|
22425
|
+
var input = (src === undefined || src === null) ? "" : src;
|
|
22426
|
+
return getUnmaskedValueByPattern(input, this.literals, matchWholeMask);
|
|
22427
|
+
};
|
|
22428
|
+
InputMaskPattern.prototype.processInput = function (args) {
|
|
22429
|
+
var result = { value: args.prevValue, caretPosition: args.selectionEnd, cancelPreventDefault: false };
|
|
22430
|
+
if (!args.insertedChars && args.selectionStart === args.selectionEnd) {
|
|
22431
|
+
return result;
|
|
22432
|
+
}
|
|
22433
|
+
var leftPart = args.prevValue.slice(0, args.selectionStart) + (args.insertedChars || "");
|
|
22434
|
+
var leftPartUnmasked = getUnmaskedValueByPattern(args.prevValue.slice(0, args.selectionStart), this.literals.slice(0, args.selectionStart), false);
|
|
22435
|
+
var rightPartUnmasked = getUnmaskedValueByPattern(args.prevValue.slice(args.selectionEnd), this.literals.slice(args.selectionEnd), false, true);
|
|
22436
|
+
result.value = this._getMaskedValue(leftPartUnmasked + (args.insertedChars || "") + rightPartUnmasked, true);
|
|
22437
|
+
if (!args.insertedChars && args.inputDirection === "backward") {
|
|
22438
|
+
result.caretPosition = args.selectionStart;
|
|
22439
|
+
}
|
|
22440
|
+
else {
|
|
22441
|
+
result.caretPosition = this._getMaskedValue(leftPart).length;
|
|
22442
|
+
}
|
|
22443
|
+
return result;
|
|
22444
|
+
};
|
|
22445
|
+
InputMaskPattern.prototype.getMaskedValue = function (src) {
|
|
22446
|
+
return this._getMaskedValue(src, true);
|
|
22447
|
+
};
|
|
22448
|
+
InputMaskPattern.prototype.getUnmaskedValue = function (src) {
|
|
22449
|
+
return this._getUnmaskedValue(src, true);
|
|
22450
|
+
};
|
|
22451
|
+
__decorate([
|
|
22452
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
22453
|
+
], InputMaskPattern.prototype, "pattern", void 0);
|
|
22454
|
+
return InputMaskPattern;
|
|
22455
|
+
}(_mask_base__WEBPACK_IMPORTED_MODULE_2__["InputMaskBase"]));
|
|
22456
|
+
|
|
22457
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("patternmask", [
|
|
22458
|
+
{ name: "pattern" },
|
|
22459
|
+
], function () {
|
|
22460
|
+
return new InputMaskPattern();
|
|
22461
|
+
}, "masksettings");
|
|
22462
|
+
|
|
22463
|
+
|
|
22464
|
+
/***/ }),
|
|
22465
|
+
|
|
22466
|
+
/***/ "./src/mask/mask_utils.ts":
|
|
22467
|
+
/*!********************************!*\
|
|
22468
|
+
!*** ./src/mask/mask_utils.ts ***!
|
|
22469
|
+
\********************************/
|
|
22470
|
+
/*! exports provided: numberDefinition */
|
|
22471
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
22472
|
+
|
|
22473
|
+
"use strict";
|
|
22474
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22475
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "numberDefinition", function() { return numberDefinition; });
|
|
22476
|
+
var numberDefinition = /[0-9]/;
|
|
22477
|
+
|
|
22478
|
+
|
|
21235
22479
|
/***/ }),
|
|
21236
22480
|
|
|
21237
22481
|
/***/ "./src/multiSelectListModel.ts":
|
|
@@ -30772,7 +32016,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30772
32016
|
vals.push(!onGetValueCallback ? value[i] : onGetValueCallback(i));
|
|
30773
32017
|
}
|
|
30774
32018
|
if (_helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isTwoValueEquals(this.value, vals)) {
|
|
30775
|
-
this.getMultipleSelectedItems().forEach(function (item) { return strs.push(_this.getItemDisplayValue(item)); });
|
|
32019
|
+
this.getMultipleSelectedItems().forEach(function (item, index) { return strs.push(_this.getItemDisplayValue(item, vals[index])); });
|
|
30776
32020
|
}
|
|
30777
32021
|
if (strs.length === 0) {
|
|
30778
32022
|
for (var i = 0; i < vals.length; i++) {
|
|
@@ -30784,9 +32028,15 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
30784
32028
|
}
|
|
30785
32029
|
return strs.join(", ");
|
|
30786
32030
|
};
|
|
30787
|
-
QuestionSelectBase.prototype.getItemDisplayValue = function (item) {
|
|
30788
|
-
if (item === this.otherItem
|
|
30789
|
-
|
|
32031
|
+
QuestionSelectBase.prototype.getItemDisplayValue = function (item, val) {
|
|
32032
|
+
if (item === this.otherItem) {
|
|
32033
|
+
if (this.hasOther && this.showCommentArea && !!val) {
|
|
32034
|
+
return val;
|
|
32035
|
+
}
|
|
32036
|
+
if (this.comment) {
|
|
32037
|
+
return this.comment;
|
|
32038
|
+
}
|
|
32039
|
+
}
|
|
30790
32040
|
return item.locText.textOrHtml;
|
|
30791
32041
|
};
|
|
30792
32042
|
QuestionSelectBase.prototype.getFilteredChoices = function () {
|
|
@@ -31026,7 +32276,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
31026
32276
|
newValue = this.setOtherValueIntoValue(newValue);
|
|
31027
32277
|
}
|
|
31028
32278
|
else {
|
|
31029
|
-
|
|
32279
|
+
if (this.data) {
|
|
32280
|
+
newComment = this.data.getComment(this.getValueName());
|
|
32281
|
+
}
|
|
31030
32282
|
}
|
|
31031
32283
|
}
|
|
31032
32284
|
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
|
@@ -35977,6 +37229,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
35977
37229
|
id: "sv-file-choose-file",
|
|
35978
37230
|
iconSize: "auto",
|
|
35979
37231
|
data: { question: _this },
|
|
37232
|
+
enabledIf: function () { return !_this.isInputReadOnly; },
|
|
35980
37233
|
component: "sv-file-choose-btn"
|
|
35981
37234
|
});
|
|
35982
37235
|
_this.startCameraAction = new _actions_action__WEBPACK_IMPORTED_MODULE_8__["Action"]({
|
|
@@ -52041,6 +53294,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52041
53294
|
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./error */ "./src/error.ts");
|
|
52042
53295
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
52043
53296
|
/* harmony import */ var _question_textbase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./question_textbase */ "./src/question_textbase.ts");
|
|
53297
|
+
/* harmony import */ var _mask_input_element_adapter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./mask/input_element_adapter */ "./src/mask/input_element_adapter.ts");
|
|
52044
53298
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
52045
53299
|
var extendStatics = function (d, b) {
|
|
52046
53300
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -52056,6 +53310,13 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
52056
53310
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
52057
53311
|
};
|
|
52058
53312
|
})();
|
|
53313
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
53314
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
53315
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
53316
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
53317
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
53318
|
+
};
|
|
53319
|
+
|
|
52059
53320
|
|
|
52060
53321
|
|
|
52061
53322
|
|
|
@@ -52105,7 +53366,8 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52105
53366
|
_this.onTextKeyDownHandler(event);
|
|
52106
53367
|
};
|
|
52107
53368
|
_this.onChange = function (event) {
|
|
52108
|
-
|
|
53369
|
+
var elementIsFocused = event.target === _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].environment.root.activeElement;
|
|
53370
|
+
if (elementIsFocused) {
|
|
52109
53371
|
if (_this.isInputTextUpdate) {
|
|
52110
53372
|
_this.updateValueOnEvent(event);
|
|
52111
53373
|
}
|
|
@@ -52124,6 +53386,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52124
53386
|
};
|
|
52125
53387
|
_this.createLocalizableString("minErrorText", _this, true, "minError");
|
|
52126
53388
|
_this.createLocalizableString("maxErrorText", _this, true, "maxError");
|
|
53389
|
+
_this.setNewMaskSettingsProperty();
|
|
52127
53390
|
_this.locDataListValue = new _localizablestring__WEBPACK_IMPORTED_MODULE_2__["LocalizableStrings"](_this);
|
|
52128
53391
|
_this.locDataListValue.onValueChanged = function (oldValue, newValue) {
|
|
52129
53392
|
_this.propertyValueChanged("dataList", oldValue, newValue);
|
|
@@ -52137,6 +53400,57 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52137
53400
|
});
|
|
52138
53401
|
return _this;
|
|
52139
53402
|
}
|
|
53403
|
+
QuestionTextModel.prototype.createMaskAdapter = function () {
|
|
53404
|
+
if (!!this.input && !this.maskTypeIsEmpty) {
|
|
53405
|
+
this.maskInputAdapter = new _mask_input_element_adapter__WEBPACK_IMPORTED_MODULE_8__["InputElementAdapter"](this.maskInstance, this.input, this.value);
|
|
53406
|
+
}
|
|
53407
|
+
};
|
|
53408
|
+
QuestionTextModel.prototype.deleteMaskAdapter = function () {
|
|
53409
|
+
if (this.maskInputAdapter) {
|
|
53410
|
+
this.maskInputAdapter.dispose();
|
|
53411
|
+
this.maskInputAdapter = undefined;
|
|
53412
|
+
}
|
|
53413
|
+
};
|
|
53414
|
+
QuestionTextModel.prototype.updateMaskAdapter = function () {
|
|
53415
|
+
this.deleteMaskAdapter();
|
|
53416
|
+
this.createMaskAdapter();
|
|
53417
|
+
};
|
|
53418
|
+
QuestionTextModel.prototype.onSetMaskType = function (newValue) {
|
|
53419
|
+
this.setNewMaskSettingsProperty();
|
|
53420
|
+
this.updateMaskAdapter();
|
|
53421
|
+
};
|
|
53422
|
+
Object.defineProperty(QuestionTextModel.prototype, "maskTypeIsEmpty", {
|
|
53423
|
+
get: function () {
|
|
53424
|
+
return this.maskType === "none";
|
|
53425
|
+
},
|
|
53426
|
+
enumerable: false,
|
|
53427
|
+
configurable: true
|
|
53428
|
+
});
|
|
53429
|
+
Object.defineProperty(QuestionTextModel.prototype, "maskSettings", {
|
|
53430
|
+
get: function () {
|
|
53431
|
+
return this.getPropertyValue("maskSettings");
|
|
53432
|
+
},
|
|
53433
|
+
set: function (val) {
|
|
53434
|
+
if (!val)
|
|
53435
|
+
return;
|
|
53436
|
+
this.setNewMaskSettingsProperty();
|
|
53437
|
+
this.maskSettings.fromJSON(val.toJSON());
|
|
53438
|
+
this.updateMaskAdapter();
|
|
53439
|
+
},
|
|
53440
|
+
enumerable: false,
|
|
53441
|
+
configurable: true
|
|
53442
|
+
});
|
|
53443
|
+
QuestionTextModel.prototype.setNewMaskSettingsProperty = function () {
|
|
53444
|
+
this.setPropertyValue("maskSettings", this.createMaskSettings());
|
|
53445
|
+
};
|
|
53446
|
+
QuestionTextModel.prototype.createMaskSettings = function () {
|
|
53447
|
+
var maskClassName = (!this.maskType || this.maskType === "none") ? "masksettings" : (this.maskType + "mask");
|
|
53448
|
+
if (!_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(maskClassName)) {
|
|
53449
|
+
maskClassName = "masksettings";
|
|
53450
|
+
}
|
|
53451
|
+
var inputMask = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(maskClassName);
|
|
53452
|
+
return inputMask;
|
|
53453
|
+
};
|
|
52140
53454
|
QuestionTextModel.prototype.isTextValue = function () {
|
|
52141
53455
|
return ["text", "number", "password"].indexOf(this.inputType) > -1;
|
|
52142
53456
|
};
|
|
@@ -52383,6 +53697,30 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52383
53697
|
enumerable: false,
|
|
52384
53698
|
configurable: true
|
|
52385
53699
|
});
|
|
53700
|
+
Object.defineProperty(QuestionTextModel.prototype, "maskInstance", {
|
|
53701
|
+
get: function () {
|
|
53702
|
+
return this.maskSettings;
|
|
53703
|
+
},
|
|
53704
|
+
enumerable: false,
|
|
53705
|
+
configurable: true
|
|
53706
|
+
});
|
|
53707
|
+
Object.defineProperty(QuestionTextModel.prototype, "inputValue", {
|
|
53708
|
+
get: function () {
|
|
53709
|
+
return !this.maskTypeIsEmpty ? this.maskInstance.getMaskedValue(this.value) : this.value;
|
|
53710
|
+
},
|
|
53711
|
+
set: function (val) {
|
|
53712
|
+
var value = val;
|
|
53713
|
+
if (!this.maskTypeIsEmpty) {
|
|
53714
|
+
value = this.maskInstance.getUnmaskedValue(val);
|
|
53715
|
+
if (!!value && this.maskSettings.saveMaskedValue) {
|
|
53716
|
+
value = this.maskInstance.getMaskedValue(value);
|
|
53717
|
+
}
|
|
53718
|
+
}
|
|
53719
|
+
this.value = value;
|
|
53720
|
+
},
|
|
53721
|
+
enumerable: false,
|
|
53722
|
+
configurable: true
|
|
53723
|
+
});
|
|
52386
53724
|
QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
52387
53725
|
var _this = this;
|
|
52388
53726
|
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
@@ -52581,9 +53919,24 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
52581
53919
|
QuestionTextModel.prototype.updateValueOnEvent = function (event) {
|
|
52582
53920
|
var newValue = event.target.value;
|
|
52583
53921
|
if (!this.isTwoValueEquals(this.value, newValue)) {
|
|
52584
|
-
this.
|
|
53922
|
+
this.inputValue = newValue;
|
|
52585
53923
|
}
|
|
52586
53924
|
};
|
|
53925
|
+
QuestionTextModel.prototype.afterRenderQuestionElement = function (el) {
|
|
53926
|
+
if (!!el) {
|
|
53927
|
+
this.input = el instanceof HTMLInputElement ? el : el.querySelector("input");
|
|
53928
|
+
this.createMaskAdapter();
|
|
53929
|
+
}
|
|
53930
|
+
_super.prototype.afterRenderQuestionElement.call(this, el);
|
|
53931
|
+
};
|
|
53932
|
+
QuestionTextModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
53933
|
+
this.deleteMaskAdapter();
|
|
53934
|
+
};
|
|
53935
|
+
__decorate([
|
|
53936
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
|
53937
|
+
onSet: function (newValue, target) { target.onSetMaskType(newValue); }
|
|
53938
|
+
})
|
|
53939
|
+
], QuestionTextModel.prototype, "maskType", void 0);
|
|
52587
53940
|
return QuestionTextModel;
|
|
52588
53941
|
}(_question_textbase__WEBPACK_IMPORTED_MODULE_7__["QuestionTextBase"]));
|
|
52589
53942
|
|
|
@@ -52747,6 +54100,30 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
|
52747
54100
|
return isMinMaxType(obj);
|
|
52748
54101
|
},
|
|
52749
54102
|
},
|
|
54103
|
+
{
|
|
54104
|
+
name: "maskType:masktype",
|
|
54105
|
+
default: "none",
|
|
54106
|
+
visibleIndex: 0,
|
|
54107
|
+
dependsOn: "inputType",
|
|
54108
|
+
visibleIf: function (obj) {
|
|
54109
|
+
return obj.inputType === "text";
|
|
54110
|
+
}
|
|
54111
|
+
},
|
|
54112
|
+
{
|
|
54113
|
+
name: "maskSettings:masksettings",
|
|
54114
|
+
className: "masksettings",
|
|
54115
|
+
visibleIndex: 1,
|
|
54116
|
+
dependsOn: "inputType",
|
|
54117
|
+
visibleIf: function (obj) {
|
|
54118
|
+
return obj.inputType === "text";
|
|
54119
|
+
},
|
|
54120
|
+
onGetValue: function (obj) {
|
|
54121
|
+
return obj.maskSettings.getData();
|
|
54122
|
+
},
|
|
54123
|
+
onSetValue: function (obj, value) {
|
|
54124
|
+
obj.maskSettings.setData(value);
|
|
54125
|
+
},
|
|
54126
|
+
},
|
|
52750
54127
|
{
|
|
52751
54128
|
name: "step:number",
|
|
52752
54129
|
dependsOn: "inputType",
|
|
@@ -54005,7 +55382,16 @@ var settings = {
|
|
|
54005
55382
|
"impp",
|
|
54006
55383
|
]
|
|
54007
55384
|
},
|
|
54008
|
-
legacyProgressBarView: false
|
|
55385
|
+
legacyProgressBarView: false,
|
|
55386
|
+
maskSettings: {
|
|
55387
|
+
patternPlaceholderChar: "_",
|
|
55388
|
+
patternEscapeChar: "\\",
|
|
55389
|
+
patternDefinitions: {
|
|
55390
|
+
"9": /[0-9]/,
|
|
55391
|
+
"a": /[a-zA-Z]/,
|
|
55392
|
+
"#": /[a-zA-Z0-9]/
|
|
55393
|
+
}
|
|
55394
|
+
}
|
|
54009
55395
|
};
|
|
54010
55396
|
|
|
54011
55397
|
|
|
@@ -54668,13 +56054,25 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
54668
56054
|
if (!elementId || typeof root === "undefined")
|
|
54669
56055
|
return false;
|
|
54670
56056
|
var el = root.getElementById(elementId);
|
|
56057
|
+
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible);
|
|
56058
|
+
};
|
|
56059
|
+
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible) {
|
|
54671
56060
|
if (!el || !el.scrollIntoView)
|
|
54672
56061
|
return false;
|
|
54673
|
-
var
|
|
54674
|
-
var needScroll =
|
|
54675
|
-
|
|
56062
|
+
var elTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
|
|
56063
|
+
var needScroll = elTop < 0;
|
|
56064
|
+
var elLeft = -1;
|
|
56065
|
+
if (!needScroll && checkLeft) {
|
|
56066
|
+
elLeft = el.getBoundingClientRect().left;
|
|
56067
|
+
needScroll = elLeft < 0;
|
|
56068
|
+
}
|
|
56069
|
+
if (!!window && !needScroll) {
|
|
54676
56070
|
var height = window.innerHeight;
|
|
54677
|
-
needScroll = height > 0 && height <
|
|
56071
|
+
needScroll = height > 0 && height < elTop;
|
|
56072
|
+
if (!needScroll && checkLeft) {
|
|
56073
|
+
var width = window.innerWidth;
|
|
56074
|
+
needScroll = width > 0 && width < elLeft;
|
|
56075
|
+
}
|
|
54678
56076
|
}
|
|
54679
56077
|
if (needScroll) {
|
|
54680
56078
|
el.scrollIntoView();
|
|
@@ -54717,6 +56115,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
54717
56115
|
var el = root.getElementById(elementId);
|
|
54718
56116
|
// https://stackoverflow.com/questions/19669786/check-if-element-is-visible-in-dom
|
|
54719
56117
|
if (el && !el["disabled"] && el.style.display !== "none" && el.offsetParent !== null) {
|
|
56118
|
+
SurveyElement.ScrollElementToViewCore(el, true, false);
|
|
54720
56119
|
el.focus();
|
|
54721
56120
|
return true;
|
|
54722
56121
|
}
|
|
@@ -59094,6 +60493,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59094
60493
|
this.onEditingObjPropertyChanged = function (sender, options) {
|
|
59095
60494
|
if (!_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].hasOriginalProperty(_this.editingObj, options.name))
|
|
59096
60495
|
return;
|
|
60496
|
+
if (options.name === "locale") {
|
|
60497
|
+
_this.setDataCore({});
|
|
60498
|
+
}
|
|
59097
60499
|
_this.updateOnSetValue(options.name, _this.editingObj[options.name], options.oldValue);
|
|
59098
60500
|
};
|
|
59099
60501
|
this.editingObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
|
|
@@ -60499,7 +61901,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60499
61901
|
return;
|
|
60500
61902
|
if (this.isShowingPreview) {
|
|
60501
61903
|
this.runningPages = this.pages.slice(0, this.pages.length);
|
|
60502
|
-
this.setupPagesForPageModes(true);
|
|
61904
|
+
this.setupPagesForPageModes(true, false);
|
|
60503
61905
|
}
|
|
60504
61906
|
else {
|
|
60505
61907
|
if (this.runningPages) {
|
|
@@ -60526,7 +61928,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60526
61928
|
}
|
|
60527
61929
|
}
|
|
60528
61930
|
};
|
|
60529
|
-
SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
|
|
61931
|
+
SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue, isFirstLoad) {
|
|
61932
|
+
if (isFirstLoad === void 0) { isFirstLoad = false; }
|
|
60530
61933
|
if (this.isShowingPreview)
|
|
60531
61934
|
return;
|
|
60532
61935
|
if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
|
|
@@ -60539,7 +61942,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60539
61942
|
if (!oldValue || oldValue == "standard") {
|
|
60540
61943
|
this.originalPages = this.pages.slice(0, this.pages.length);
|
|
60541
61944
|
}
|
|
60542
|
-
this.setupPagesForPageModes(this.isSinglePage);
|
|
61945
|
+
this.setupPagesForPageModes(this.isSinglePage, isFirstLoad);
|
|
60543
61946
|
}
|
|
60544
61947
|
this.runConditions();
|
|
60545
61948
|
this.updateVisibleIndexes();
|
|
@@ -60556,9 +61959,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60556
61959
|
SurveyModel.prototype.getPageStartIndex = function () {
|
|
60557
61960
|
return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
|
|
60558
61961
|
};
|
|
60559
|
-
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage) {
|
|
61962
|
+
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
|
|
60560
61963
|
this.questionHashesClear();
|
|
60561
|
-
this.
|
|
61964
|
+
this.isLockingUpdateOnPageModes = !isFirstLoad;
|
|
60562
61965
|
var startIndex = this.getPageStartIndex();
|
|
60563
61966
|
_super.prototype.startLoadingFromJson.call(this);
|
|
60564
61967
|
var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
|
|
@@ -60573,7 +61976,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60573
61976
|
}
|
|
60574
61977
|
this.doElementsOnLoad();
|
|
60575
61978
|
this.updateCurrentPage();
|
|
60576
|
-
this.
|
|
61979
|
+
this.isLockingUpdateOnPageModes = false;
|
|
60577
61980
|
};
|
|
60578
61981
|
SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
|
|
60579
61982
|
if (isSinglePage) {
|
|
@@ -62445,7 +63848,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
62445
63848
|
SurveyModel.prototype.endLoadingFromJson = function () {
|
|
62446
63849
|
this.isEndLoadingFromJson = "processing";
|
|
62447
63850
|
this.onFirstPageIsStartedChanged();
|
|
62448
|
-
this.onQuestionsOnPageModeChanged("standard");
|
|
63851
|
+
this.onQuestionsOnPageModeChanged("standard", true);
|
|
62449
63852
|
_super.prototype.endLoadingFromJson.call(this);
|
|
62450
63853
|
if (this.hasCookie) {
|
|
62451
63854
|
this.isCompletedBefore = true;
|
|
@@ -62774,7 +64177,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
62774
64177
|
SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
|
|
62775
64178
|
if (locNotification === void 0) { locNotification = false; }
|
|
62776
64179
|
if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
|
|
62777
|
-
if (this.
|
|
64180
|
+
if (this.isLockingUpdateOnPageModes)
|
|
62778
64181
|
return;
|
|
62779
64182
|
var newValue = newQuestionValue;
|
|
62780
64183
|
if (allowNotifyValueChanged) {
|