survey-react 1.12.10 → 1.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +1 -1
- package/defaultV2.min.css +1 -1
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +33 -22
- package/survey.react.js +222 -154
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.11
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -1731,7 +1731,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
1731
1731
|
/*!********************************************!*\
|
1732
1732
|
!*** ./src/entries/react.ts + 285 modules ***!
|
1733
1733
|
\********************************************/
|
1734
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionFilePage, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, renamedIcons, getIconNameFromProxy, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, svgBundle, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent, PopupModal */
|
1734
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionFilePage, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, getLocaleString, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, renamedIcons, getIconNameFromProxy, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, svgBundle, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent, PopupModal */
|
1735
1735
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} (<- Module is not an ECMAScript module) */
|
1736
1736
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} (<- Module is not an ECMAScript module) */
|
1737
1737
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
@@ -1894,6 +1894,7 @@ __webpack_require__.d(__webpack_exports__, "dxSurveyService", function() { retur
|
|
1894
1894
|
__webpack_require__.d(__webpack_exports__, "englishStrings", function() { return /* reexport */ englishStrings; });
|
1895
1895
|
__webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return /* reexport */ surveyLocalization; });
|
1896
1896
|
__webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return /* reexport */ surveyStrings; });
|
1897
|
+
__webpack_require__.d(__webpack_exports__, "getLocaleString", function() { return /* reexport */ getLocaleString; });
|
1897
1898
|
__webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return /* reexport */ QuestionCustomWidget; });
|
1898
1899
|
__webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return /* reexport */ questionCustomWidgets_CustomWidgetCollection; });
|
1899
1900
|
__webpack_require__.d(__webpack_exports__, "QuestionCustomModel", function() { return /* reexport */ question_custom_QuestionCustomModel; });
|
@@ -2950,6 +2951,10 @@ var surveyLocalization = {
|
|
2950
2951
|
},
|
2951
2952
|
onGetExternalString: function (name, locale) { return undefined; }
|
2952
2953
|
};
|
2954
|
+
function getLocaleString(strName, locale) {
|
2955
|
+
if (locale === void 0) { locale = null; }
|
2956
|
+
return surveyLocalization.getString(strName, locale);
|
2957
|
+
}
|
2953
2958
|
var surveyStrings = englishStrings;
|
2954
2959
|
surveyLocalization.locales["en"] = englishStrings;
|
2955
2960
|
surveyLocalization.localeNames["en"] = "english";
|
@@ -2999,7 +3004,7 @@ function getLocStringValue(target, options, key) {
|
|
2999
3004
|
return res;
|
3000
3005
|
if (typeof options.localizable === "object" && options.localizable.defaultStr) {
|
3001
3006
|
var loc = !!target.getLocale ? target.getLocale() : "";
|
3002
|
-
return
|
3007
|
+
return getLocaleString(options.localizable.defaultStr, loc);
|
3003
3008
|
}
|
3004
3009
|
return "";
|
3005
3010
|
}
|
@@ -4466,10 +4471,12 @@ var JsonMetadata = /** @class */ (function () {
|
|
4466
4471
|
};
|
4467
4472
|
JsonMetadata.prototype.generateSchemaProperty = function (prop, schemaDef, isRoot) {
|
4468
4473
|
if (prop.isLocalizable) {
|
4469
|
-
return {
|
4474
|
+
return {
|
4475
|
+
oneOf: [
|
4470
4476
|
{ "type": "string" },
|
4471
4477
|
{ "$ref": this.getChemeRefName("locstring", isRoot) }
|
4472
|
-
]
|
4478
|
+
]
|
4479
|
+
};
|
4473
4480
|
}
|
4474
4481
|
var propType = prop.schemaType();
|
4475
4482
|
var refType = prop.schemaRef();
|
@@ -10707,7 +10714,7 @@ var base_Base = /** @class */ (function () {
|
|
10707
10714
|
return !!locOwner ? locOwner.getLocale() : "";
|
10708
10715
|
};
|
10709
10716
|
Base.prototype.getLocalizationString = function (strName) {
|
10710
|
-
return
|
10717
|
+
return getLocaleString(strName, this.getLocale());
|
10711
10718
|
};
|
10712
10719
|
Base.prototype.getLocalizationFormatString = function (strName) {
|
10713
10720
|
var args = [];
|
@@ -11505,24 +11512,45 @@ var container_ActionContainer = /** @class */ (function (_super) {
|
|
11505
11512
|
ActionContainer.prototype.addAction = function (val, sortByVisibleIndex) {
|
11506
11513
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
11507
11514
|
var res = this.createAction(val);
|
11508
|
-
this.
|
11509
|
-
|
11515
|
+
if (sortByVisibleIndex && !this.isActionVisible(res))
|
11516
|
+
return res;
|
11517
|
+
var items = [].concat(this.actions, res);
|
11518
|
+
this.sortItems(items);
|
11519
|
+
this.actions = items;
|
11510
11520
|
return res;
|
11511
11521
|
};
|
11512
|
-
ActionContainer.prototype.sortItems = function () {
|
11513
|
-
this.actions = []
|
11514
|
-
.concat(this.actions.filter(function (item) { return item.visibleIndex === undefined || item.visibleIndex >= 0; }))
|
11515
|
-
.sort(function (firstItem, secondItem) {
|
11516
|
-
return firstItem.visibleIndex - secondItem.visibleIndex;
|
11517
|
-
});
|
11518
|
-
};
|
11519
11522
|
ActionContainer.prototype.setItems = function (items, sortByVisibleIndex) {
|
11520
11523
|
var _this = this;
|
11521
11524
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
11522
|
-
|
11525
|
+
var newActions = [];
|
11526
|
+
items.forEach(function (item) {
|
11527
|
+
if (!sortByVisibleIndex || _this.isActionVisible(item)) {
|
11528
|
+
newActions.push(_this.createAction(item));
|
11529
|
+
}
|
11530
|
+
});
|
11523
11531
|
if (sortByVisibleIndex) {
|
11524
|
-
this.sortItems();
|
11532
|
+
this.sortItems(newActions);
|
11533
|
+
}
|
11534
|
+
this.actions = newActions;
|
11535
|
+
};
|
11536
|
+
ActionContainer.prototype.sortItems = function (items) {
|
11537
|
+
if (this.hasSetVisibleIndex(items)) {
|
11538
|
+
items.sort(this.compareByVisibleIndex);
|
11539
|
+
}
|
11540
|
+
};
|
11541
|
+
ActionContainer.prototype.hasSetVisibleIndex = function (items) {
|
11542
|
+
for (var i = 0; i < items.length; i++) {
|
11543
|
+
var index = items[i].visibleIndex;
|
11544
|
+
if (index !== undefined && index >= 0)
|
11545
|
+
return true;
|
11525
11546
|
}
|
11547
|
+
return false;
|
11548
|
+
};
|
11549
|
+
ActionContainer.prototype.compareByVisibleIndex = function (first, second) {
|
11550
|
+
return first.visibleIndex - second.visibleIndex;
|
11551
|
+
};
|
11552
|
+
ActionContainer.prototype.isActionVisible = function (item) {
|
11553
|
+
return item.visibleIndex >= 0 || item.visibleIndex === undefined;
|
11526
11554
|
};
|
11527
11555
|
ActionContainer.prototype.popupAfterShowCallback = function (itemValue) {
|
11528
11556
|
};
|
@@ -11851,6 +11879,10 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11851
11879
|
this.actions.push(this.loadingIndicator);
|
11852
11880
|
}
|
11853
11881
|
};
|
11882
|
+
ListModel.prototype.setSearchEnabled = function (newValue) {
|
11883
|
+
this.searchEnabled = newValue;
|
11884
|
+
this.showSearchClearButton = newValue;
|
11885
|
+
};
|
11854
11886
|
ListModel.prototype.onSet = function () {
|
11855
11887
|
this.showFilter = this.searchEnabled && (this.forceShowFilter || (this.actions || []).length > ListModel.MINELEMENTCOUNT);
|
11856
11888
|
_super.prototype.onSet.call(this);
|
@@ -12180,6 +12212,9 @@ var popup_PopupModel = /** @class */ (function (_super) {
|
|
12180
12212
|
return options.actions;
|
12181
12213
|
};
|
12182
12214
|
PopupModel.prototype.updateDisplayMode = function (menuType) {
|
12215
|
+
if (this.displayMode !== menuType) {
|
12216
|
+
this.setWidthByTarget = menuType === "dropdown";
|
12217
|
+
}
|
12183
12218
|
switch (menuType) {
|
12184
12219
|
case "dropdown": {
|
12185
12220
|
this.displayMode = "popup";
|
@@ -12322,6 +12357,7 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
12322
12357
|
}
|
12323
12358
|
};
|
12324
12359
|
var popupModel = createPopupModelWithListModel(listOptions, popupOptions);
|
12360
|
+
popupModel.getTargetCallback = getActionDropdownButtonTarget;
|
12325
12361
|
var newActionOptions = Object.assign({}, actionOptions, {
|
12326
12362
|
component: "sv-action-bar-item-dropdown",
|
12327
12363
|
popupModel: popupModel,
|
@@ -12744,7 +12780,7 @@ var action_Action = /** @class */ (function (_super) {
|
|
12744
12780
|
Action.prototype.locTooltipChanged = function () {
|
12745
12781
|
if (!this.locTooltipName)
|
12746
12782
|
return;
|
12747
|
-
this.tooltip =
|
12783
|
+
this.tooltip = getLocaleString(this.locTooltipName, this.locTitle.locale);
|
12748
12784
|
};
|
12749
12785
|
//ILocalizableOwner
|
12750
12786
|
Action.prototype.getLocale = function () { return this.owner ? this.owner.getLocale() : ""; };
|
@@ -12753,7 +12789,9 @@ var action_Action = /** @class */ (function (_super) {
|
|
12753
12789
|
Action.prototype.getRenderer = function (name) { return this.owner ? this.owner.getRenderer(name) : null; };
|
12754
12790
|
Action.prototype.getRendererContext = function (locStr) { return this.owner ? this.owner.getRendererContext(locStr) : locStr; };
|
12755
12791
|
Action.prototype.setVisible = function (val) {
|
12756
|
-
this.
|
12792
|
+
if (this.visible !== val) {
|
12793
|
+
this._visible = val;
|
12794
|
+
}
|
12757
12795
|
};
|
12758
12796
|
Action.prototype.getVisible = function () {
|
12759
12797
|
return this._visible;
|
@@ -12893,7 +12931,7 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
12893
12931
|
innerCss: "sv-dots__item",
|
12894
12932
|
iconName: "icon-more",
|
12895
12933
|
visible: false,
|
12896
|
-
tooltip:
|
12934
|
+
tooltip: getLocaleString("more"),
|
12897
12935
|
}, {
|
12898
12936
|
items: [],
|
12899
12937
|
allowSelection: false
|
@@ -13021,9 +13059,12 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
13021
13059
|
};
|
13022
13060
|
AdaptiveActionContainer.prototype.setActionsMode = function (mode) {
|
13023
13061
|
this.actions.forEach(function (action) {
|
13024
|
-
if (mode == "small" && action.disableShrink)
|
13025
|
-
|
13026
|
-
|
13062
|
+
if (mode == "small" && action.disableShrink) {
|
13063
|
+
action.mode = "large";
|
13064
|
+
}
|
13065
|
+
else {
|
13066
|
+
action.mode = mode;
|
13067
|
+
}
|
13027
13068
|
});
|
13028
13069
|
};
|
13029
13070
|
AdaptiveActionContainer.prototype.dispose = function () {
|
@@ -14635,6 +14676,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14635
14676
|
};
|
14636
14677
|
SurveyElement.prototype.setPage = function (parent, newPage) {
|
14637
14678
|
var oldPage = this.getPage(parent);
|
14679
|
+
this.prevSurvey = this.survey;
|
14638
14680
|
//fix for the creator v1: https://github.com/surveyjs/survey-creator/issues/1744
|
14639
14681
|
if (typeof newPage === "string") {
|
14640
14682
|
var survey = this.getSurvey();
|
@@ -14650,6 +14692,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14650
14692
|
if (newPage) {
|
14651
14693
|
newPage.addElement(this, -1);
|
14652
14694
|
}
|
14695
|
+
this.prevSurvey = undefined;
|
14653
14696
|
};
|
14654
14697
|
SurveyElement.prototype.getSearchableLocKeys = function (keys) {
|
14655
14698
|
keys.push("title");
|
@@ -15321,7 +15364,7 @@ var localizablestring_LocalizableString = /** @class */ (function () {
|
|
15321
15364
|
};
|
15322
15365
|
LocalizableString.prototype.getLocalizationStr = function () {
|
15323
15366
|
var name = this.getLocalizationName();
|
15324
|
-
return !!name ?
|
15367
|
+
return !!name ? getLocaleString(name, this.locale) : "";
|
15325
15368
|
};
|
15326
15369
|
Object.defineProperty(LocalizableString.prototype, "hasHtml", {
|
15327
15370
|
get: function () {
|
@@ -16370,9 +16413,9 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
|
|
16370
16413
|
var toolbar = popupViewModel.footerToolbar;
|
16371
16414
|
var applyBtn = toolbar.getActionById("apply");
|
16372
16415
|
var cancelBtn = toolbar.getActionById("cancel");
|
16373
|
-
cancelBtn.title =
|
16416
|
+
cancelBtn.title = getLocaleString("cancel", locale);
|
16374
16417
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
16375
|
-
applyBtn.title = applyTitle ||
|
16418
|
+
applyBtn.title = applyTitle || getLocaleString("ok", locale);
|
16376
16419
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
16377
16420
|
configConfirmDialog(popupViewModel);
|
16378
16421
|
return true;
|
@@ -17378,7 +17421,7 @@ var survey_error_SurveyError = /** @class */ (function () {
|
|
17378
17421
|
return !!this.errorOwner ? this.errorOwner.getLocale() : "";
|
17379
17422
|
};
|
17380
17423
|
SurveyError.prototype.getLocalizationString = function (locStrName) {
|
17381
|
-
return
|
17424
|
+
return getLocaleString(locStrName, this.getLocale());
|
17382
17425
|
};
|
17383
17426
|
SurveyError.prototype.updateText = function () {
|
17384
17427
|
if (this.onUpdateErrorTextCallback) {
|
@@ -17475,8 +17518,7 @@ var error_ExceedSizeError = /** @class */ (function (_super) {
|
|
17475
17518
|
return "exceedsize";
|
17476
17519
|
};
|
17477
17520
|
ExceedSizeError.prototype.getDefaultText = function () {
|
17478
|
-
return
|
17479
|
-
.getString("exceedMaxSize")["format"](this.getTextSize());
|
17521
|
+
return getLocaleString("exceedMaxSize")["format"](this.getTextSize());
|
17480
17522
|
};
|
17481
17523
|
ExceedSizeError.prototype.getTextSize = function () {
|
17482
17524
|
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
@@ -17607,8 +17649,7 @@ var error_MinRowCountError = /** @class */ (function (_super) {
|
|
17607
17649
|
return "minrowcounterror";
|
17608
17650
|
};
|
17609
17651
|
MinRowCountError.prototype.getDefaultText = function () {
|
17610
|
-
return
|
17611
|
-
.getString("minRowCountError")["format"](this.minRowCount);
|
17652
|
+
return getLocaleString("minRowCountError")["format"](this.minRowCount);
|
17612
17653
|
};
|
17613
17654
|
return MinRowCountError;
|
17614
17655
|
}(survey_error_SurveyError));
|
@@ -18569,6 +18610,9 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
18569
18610
|
this.updateElement();
|
18570
18611
|
}
|
18571
18612
|
};
|
18613
|
+
TextAreaModel.prototype.resetElement = function () {
|
18614
|
+
this.element = undefined;
|
18615
|
+
};
|
18572
18616
|
TextAreaModel.prototype.getTextValue = function () {
|
18573
18617
|
if (!!this.options.getTextValue)
|
18574
18618
|
return this.options.getTextValue() || "";
|
@@ -18725,6 +18769,7 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
18725
18769
|
if (this.question) {
|
18726
18770
|
this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName, "__textarea");
|
18727
18771
|
}
|
18772
|
+
this.resetElement();
|
18728
18773
|
};
|
18729
18774
|
return TextAreaModel;
|
18730
18775
|
}());
|
@@ -22737,7 +22782,9 @@ var itemvalue_ItemValue = /** @class */ (function (_super) {
|
|
22737
22782
|
return isVisible && visible;
|
22738
22783
|
};
|
22739
22784
|
ItemValue.prototype.setVisible = function (val) {
|
22740
|
-
this.
|
22785
|
+
if (this.visible !== val) {
|
22786
|
+
this._visible = val;
|
22787
|
+
}
|
22741
22788
|
};
|
22742
22789
|
ItemValue.prototype.getLocTitle = function () {
|
22743
22790
|
return this.locText;
|
@@ -25635,18 +25682,15 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
25635
25682
|
}
|
25636
25683
|
Object.defineProperty(QuestionFactory, "DefaultChoices", {
|
25637
25684
|
get: function () {
|
25638
|
-
|
25639
|
-
|
25640
|
-
surveyLocalization.getString("choices_Item") + "2",
|
25641
|
-
surveyLocalization.getString("choices_Item") + "3",
|
25642
|
-
];
|
25685
|
+
var choice = getLocaleString("choices_Item");
|
25686
|
+
return [choice + "1", choice + "2", choice + "3"];
|
25643
25687
|
},
|
25644
25688
|
enumerable: false,
|
25645
25689
|
configurable: true
|
25646
25690
|
});
|
25647
25691
|
Object.defineProperty(QuestionFactory, "DefaultColums", {
|
25648
25692
|
get: function () {
|
25649
|
-
var colName =
|
25693
|
+
var colName = getLocaleString("matrix_column") + " ";
|
25650
25694
|
return [colName + "1", colName + "2", colName + "3"];
|
25651
25695
|
},
|
25652
25696
|
enumerable: false,
|
@@ -25654,7 +25698,7 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
25654
25698
|
});
|
25655
25699
|
Object.defineProperty(QuestionFactory, "DefaultRows", {
|
25656
25700
|
get: function () {
|
25657
|
-
var rowName =
|
25701
|
+
var rowName = getLocaleString("matrix_row") + " ";
|
25658
25702
|
return [rowName + "1", rowName + "2"];
|
25659
25703
|
},
|
25660
25704
|
enumerable: false,
|
@@ -25662,7 +25706,7 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
25662
25706
|
});
|
25663
25707
|
Object.defineProperty(QuestionFactory, "DefaultMutlipleTextItems", {
|
25664
25708
|
get: function () {
|
25665
|
-
var itemName =
|
25709
|
+
var itemName = getLocaleString("multipletext_itemname");
|
25666
25710
|
return [itemName + "1", itemName + "2"];
|
25667
25711
|
},
|
25668
25712
|
enumerable: false,
|
@@ -26362,26 +26406,18 @@ var matrixDropdownColumnTypes = {
|
|
26362
26406
|
*/
|
26363
26407
|
var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function (_super) {
|
26364
26408
|
question_matrixdropdowncolumn_extends(MatrixDropdownColumn, _super);
|
26365
|
-
function MatrixDropdownColumn(name, title) {
|
26366
|
-
if (title === void 0) { title = null; }
|
26409
|
+
function MatrixDropdownColumn(name, title, colOwner) {
|
26367
26410
|
var _this = _super.call(this) || this;
|
26368
|
-
_this.colOwnerValue = null;
|
26369
26411
|
_this.indexValue = -1;
|
26370
26412
|
_this._hasVisibleCell = true;
|
26371
26413
|
_this.isColumnsVisibleIf = true;
|
26372
26414
|
_this.previousChoicesId = undefined;
|
26415
|
+
_this.colOwnerValue = colOwner;
|
26373
26416
|
_this.createLocalizableString("totalFormat", _this);
|
26374
26417
|
_this.createLocalizableString("cellHint", _this);
|
26375
26418
|
_this.registerPropertyChangedHandlers(["showInMultipleColumns"], function () { _this.doShowInMultipleColumnsChanged(); });
|
26376
26419
|
_this.registerPropertyChangedHandlers(["visible"], function () { _this.doColumnVisibilityChanged(); });
|
26377
|
-
_this.updateTemplateQuestion();
|
26378
|
-
_this.name = name;
|
26379
|
-
if (title) {
|
26380
|
-
_this.title = title;
|
26381
|
-
}
|
26382
|
-
else {
|
26383
|
-
_this.templateQuestion.locTitle.strChanged();
|
26384
|
-
}
|
26420
|
+
_this.updateTemplateQuestion(undefined, name, title);
|
26385
26421
|
return _this;
|
26386
26422
|
}
|
26387
26423
|
MatrixDropdownColumn.getColumnTypes = function () {
|
@@ -27183,7 +27219,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
27183
27219
|
return this.colOwner.getCellType();
|
27184
27220
|
return settings.matrix.defaultCellType;
|
27185
27221
|
};
|
27186
|
-
MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType) {
|
27222
|
+
MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType, name, title) {
|
27187
27223
|
var _this = this;
|
27188
27224
|
var curCellType = this.getDefaultCellQuestionType(newCellType);
|
27189
27225
|
var prevCellType = this.templateQuestion
|
@@ -27197,6 +27233,15 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
27197
27233
|
this.templateQuestionValue = this.createNewQuestion(curCellType);
|
27198
27234
|
this.templateQuestion.locOwner = this;
|
27199
27235
|
this.addProperties(curCellType);
|
27236
|
+
if (!!name) {
|
27237
|
+
this.name = name;
|
27238
|
+
}
|
27239
|
+
if (!!title) {
|
27240
|
+
this.title = title;
|
27241
|
+
}
|
27242
|
+
else {
|
27243
|
+
this.templateQuestion.locTitle.strChanged();
|
27244
|
+
}
|
27200
27245
|
this.templateQuestion.onPropertyChanged.add(function (sender, options) {
|
27201
27246
|
_this.propertyValueChanged(options.name, options.oldValue, options.newValue, options.arrayChanges, options.target);
|
27202
27247
|
});
|
@@ -30539,8 +30584,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30539
30584
|
configurable: true
|
30540
30585
|
});
|
30541
30586
|
QuestionMatrixDropdownModelBase.prototype.addColumn = function (name, title) {
|
30542
|
-
|
30543
|
-
var column = new question_matrixdropdowncolumn_MatrixDropdownColumn(name, title);
|
30587
|
+
var column = new question_matrixdropdowncolumn_MatrixDropdownColumn(name, title, this);
|
30544
30588
|
this.columns.push(column);
|
30545
30589
|
return column;
|
30546
30590
|
};
|
@@ -34822,7 +34866,7 @@ var dxSurveyService_dxSurveyService = /** @class */ (function () {
|
|
34822
34866
|
if (clientId === void 0) { clientId = null; }
|
34823
34867
|
if (isPartialCompleted === void 0) { isPartialCompleted = false; }
|
34824
34868
|
if (!this.canSendResult(result)) {
|
34825
|
-
onSendResult(false,
|
34869
|
+
onSendResult(false, getLocaleString("savingExceedSize", this.locale), undefined);
|
34826
34870
|
}
|
34827
34871
|
else {
|
34828
34872
|
this.sendResultCore(postId, result, onSendResult, clientId, isPartialCompleted);
|
@@ -36455,7 +36499,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36455
36499
|
};
|
36456
36500
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
36457
36501
|
get: function () {
|
36458
|
-
return ((this.canShowTitle() && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
36502
|
+
return ((this.canShowTitle(this.survey) && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
36459
36503
|
(this.isDesignMode && !(settings.supportCreatorV2 && this.isPanel) && this.showTitle && settings.designMode.showEmptyTitles));
|
36460
36504
|
},
|
36461
36505
|
enumerable: false,
|
@@ -36480,7 +36524,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36480
36524
|
}
|
36481
36525
|
};
|
36482
36526
|
PanelModelBase.prototype.removeFromParent = function () { };
|
36483
|
-
PanelModelBase.prototype.canShowTitle = function () { return true; };
|
36527
|
+
PanelModelBase.prototype.canShowTitle = function (survey) { return true; };
|
36484
36528
|
Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
|
36485
36529
|
get: function () {
|
36486
36530
|
if (!this.hasTitle && this.isDesignMode)
|
@@ -37065,7 +37109,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37065
37109
|
PanelModelBase.prototype.hasErrorsInPanels = function (rec) {
|
37066
37110
|
var errors = [];
|
37067
37111
|
this.hasRequiredError(rec, errors);
|
37068
|
-
if (this.survey) {
|
37112
|
+
if (this.isPanel && this.survey) {
|
37069
37113
|
var customError = this.survey.validatePanel(this);
|
37070
37114
|
if (customError) {
|
37071
37115
|
errors.push(customError);
|
@@ -37582,29 +37626,29 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37582
37626
|
}
|
37583
37627
|
}
|
37584
37628
|
};
|
37629
|
+
PanelModelBase.prototype.canFireAddRemoveNotifications = function (element) {
|
37630
|
+
return !!this.survey && element.prevSurvey !== this.survey;
|
37631
|
+
};
|
37585
37632
|
PanelModelBase.prototype.onAddElement = function (element, index) {
|
37586
37633
|
var _this = this;
|
37634
|
+
var survey = this.survey;
|
37635
|
+
var fireNotification = this.canFireAddRemoveNotifications(element);
|
37587
37636
|
element.setSurveyImpl(this.surveyImpl);
|
37588
37637
|
element.parent = this;
|
37589
37638
|
this.markQuestionListDirty();
|
37590
37639
|
if (this.canBuildRows()) {
|
37591
37640
|
this.updateRowsOnElementAdded(element);
|
37592
37641
|
}
|
37593
|
-
if (
|
37594
|
-
|
37595
|
-
|
37596
|
-
this.survey.panelAdded(p, index, this, this.root);
|
37642
|
+
if (fireNotification) {
|
37643
|
+
if (element.isPanel) {
|
37644
|
+
survey.panelAdded(element, index, this, this.root);
|
37597
37645
|
}
|
37598
|
-
|
37599
|
-
|
37600
|
-
if (this.survey) {
|
37601
|
-
var q = element;
|
37602
|
-
this.survey.questionAdded(q, index, this, this.root);
|
37646
|
+
else {
|
37647
|
+
survey.questionAdded(element, index, this, this.root);
|
37603
37648
|
}
|
37604
37649
|
}
|
37605
37650
|
if (!!this.addElementCallback)
|
37606
37651
|
this.addElementCallback(element);
|
37607
|
-
var self = this;
|
37608
37652
|
element.registerPropertyChangedHandlers(["visible", "isVisible"], function () {
|
37609
37653
|
_this.onElementVisibilityChanged(element);
|
37610
37654
|
}, this.id);
|
@@ -37626,7 +37670,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37626
37670
|
this.onElementVisibilityChanged(this);
|
37627
37671
|
};
|
37628
37672
|
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
37629
|
-
if (!this.
|
37673
|
+
if (!this.canFireAddRemoveNotifications(element))
|
37630
37674
|
return;
|
37631
37675
|
if (!element.isPanel) {
|
37632
37676
|
this.survey.questionRemoved(element);
|
@@ -38625,6 +38669,12 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38625
38669
|
return;
|
38626
38670
|
this.survey.cancelPreviewByPage(this);
|
38627
38671
|
};
|
38672
|
+
PanelModel.prototype.canShowTitle = function (survey) {
|
38673
|
+
var page = this.originalPage;
|
38674
|
+
if (!!page)
|
38675
|
+
return page.canShowTitle(survey);
|
38676
|
+
return _super.prototype.canShowTitle.call(this, survey);
|
38677
|
+
};
|
38628
38678
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
38629
38679
|
get: function () {
|
38630
38680
|
return this.getCssTitle(this.cssClasses.panel);
|
@@ -39124,8 +39174,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39124
39174
|
PageModel.prototype.canShowPageNumber = function () {
|
39125
39175
|
return this.survey && this.survey.showPageNumbers;
|
39126
39176
|
};
|
39127
|
-
PageModel.prototype.canShowTitle = function () {
|
39128
|
-
return
|
39177
|
+
PageModel.prototype.canShowTitle = function (survey) {
|
39178
|
+
return !survey || survey.showPageTitles;
|
39129
39179
|
};
|
39130
39180
|
PageModel.prototype.setTitleValue = function (val) {
|
39131
39181
|
_super.prototype.setTitleValue.call(this, val);
|
@@ -40332,9 +40382,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40332
40382
|
*/
|
40333
40383
|
_this.onGetResult = _this.addEvent();
|
40334
40384
|
/**
|
40335
|
-
* An event that is raised when
|
40336
|
-
* @see
|
40337
|
-
* @see uploadFiles
|
40385
|
+
* An event that is raised when a respondent opens a dialog window to select files.
|
40386
|
+
* @see chooseFiles
|
40338
40387
|
*/
|
40339
40388
|
_this.onOpenFileChooser = _this.addEvent();
|
40340
40389
|
/**
|
@@ -44910,9 +44959,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44910
44959
|
single.addPanel(panel);
|
44911
44960
|
var json = new jsonobject_JsonObject().toJsonObject(page);
|
44912
44961
|
new jsonobject_JsonObject().toObject(json, panel);
|
44913
|
-
if (!this.showPageTitles) {
|
44914
|
-
panel.title = "";
|
44915
|
-
}
|
44916
44962
|
}
|
44917
44963
|
return single;
|
44918
44964
|
};
|
@@ -45499,6 +45545,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45499
45545
|
this.rootElement = htmlElement;
|
45500
45546
|
this.addScrollEventListener();
|
45501
45547
|
};
|
45548
|
+
SurveyModel.prototype.beforeDestroySurveyElement = function () {
|
45549
|
+
this.destroyResizeObserver();
|
45550
|
+
this.removeScrollEventListener();
|
45551
|
+
this.rootElement = undefined;
|
45552
|
+
};
|
45502
45553
|
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
|
45503
45554
|
var isMobile = width < mobileWidth;
|
45504
45555
|
var isMobileChanged = this.isMobile !== isMobile;
|
@@ -45878,7 +45929,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45878
45929
|
}, elementsToRenderBefore);
|
45879
45930
|
}
|
45880
45931
|
else {
|
45881
|
-
|
45932
|
+
if (!elementPage_1 && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
|
45933
|
+
var elementToScroll = this.rootElement.querySelector(classesToSelector(this.css.rootWrapper));
|
45934
|
+
survey_element_SurveyElement.ScrollElementToViewCore(elementToScroll, false, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
|
45935
|
+
}
|
45936
|
+
else {
|
45937
|
+
survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
|
45938
|
+
}
|
45882
45939
|
}
|
45883
45940
|
}
|
45884
45941
|
};
|
@@ -51350,7 +51407,7 @@ Serializer.addClass("selectbase", [
|
|
51350
51407
|
{
|
51351
51408
|
name: "choices:itemvalue[]", uniqueProperty: "value",
|
51352
51409
|
baseValue: function () {
|
51353
|
-
return
|
51410
|
+
return getLocaleString("choices_Item");
|
51354
51411
|
},
|
51355
51412
|
dependsOn: "choicesFromQuestion",
|
51356
51413
|
visibleIf: function (obj) {
|
@@ -51550,15 +51607,16 @@ var PopupUtils = /** @class */ (function () {
|
|
51550
51607
|
}
|
51551
51608
|
return { left: Math.round(currentLeft), top: Math.round(currentTop) };
|
51552
51609
|
};
|
51553
|
-
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink) {
|
51610
|
+
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink, margins) {
|
51554
51611
|
if (canShrink === void 0) { canShrink = true; }
|
51612
|
+
if (margins === void 0) { margins = { top: 0, bottom: 0 }; }
|
51555
51613
|
var result;
|
51556
51614
|
var maxHeight = windowHeight - PopupUtils.bottomIndent;
|
51557
51615
|
if (verticalPosition === "top") {
|
51558
51616
|
result = { height: height, top: top };
|
51559
51617
|
}
|
51560
|
-
if (top <
|
51561
|
-
result = { height: canShrink ? height + top : height, top:
|
51618
|
+
if (top < -margins.top) {
|
51619
|
+
result = { height: canShrink ? height + top : height, top: -margins.top };
|
51562
51620
|
}
|
51563
51621
|
else if (height + top > windowHeight) {
|
51564
51622
|
var newHeight = Math.min(height, maxHeight - top);
|
@@ -51566,7 +51624,7 @@ var PopupUtils = /** @class */ (function () {
|
|
51566
51624
|
}
|
51567
51625
|
if (result) {
|
51568
51626
|
result.height = Math.min(result.height, maxHeight);
|
51569
|
-
result.top = Math.max(result.top,
|
51627
|
+
result.top = Math.max(result.top, -margins.top);
|
51570
51628
|
}
|
51571
51629
|
return result;
|
51572
51630
|
};
|
@@ -52050,7 +52108,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
52050
52108
|
getElement(settings.environment.popupMountContainer).appendChild(container);
|
52051
52109
|
}
|
52052
52110
|
};
|
52053
|
-
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot
|
52111
|
+
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot) {
|
52054
52112
|
if (!!componentRoot) {
|
52055
52113
|
this.containerElement = componentRoot;
|
52056
52114
|
}
|
@@ -52137,10 +52195,8 @@ function calculateIsTablet(windowWidth, windowHeight) {
|
|
52137
52195
|
}
|
52138
52196
|
var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (_super) {
|
52139
52197
|
popup_dropdown_view_model_extends(PopupDropdownViewModel, _super);
|
52140
|
-
function PopupDropdownViewModel(model
|
52198
|
+
function PopupDropdownViewModel(model) {
|
52141
52199
|
var _this = _super.call(this, model) || this;
|
52142
|
-
_this.targetElement = targetElement;
|
52143
|
-
_this.areaElement = areaElement;
|
52144
52200
|
_this.scrollEventCallBack = function (event) {
|
52145
52201
|
if (_this.isOverlay && IsTouch) {
|
52146
52202
|
event.stopPropagation();
|
@@ -52178,22 +52234,30 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52178
52234
|
this.isTablet = calculateIsTablet(windowWidth, windowHeight);
|
52179
52235
|
};
|
52180
52236
|
PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
|
52181
|
-
|
52182
|
-
|
52237
|
+
var areaElement = this.model.getAreaCallback ? this.model.getAreaCallback(this.container) : undefined;
|
52238
|
+
if (areaElement) {
|
52239
|
+
var areaRect = areaElement.getBoundingClientRect();
|
52183
52240
|
return new Rect(areaRect.x, areaRect.y, areaRect.width, areaRect.height);
|
52184
52241
|
}
|
52185
52242
|
return new Rect(0, 0, DomWindowHelper.getInnerWidth(), DomWindowHelper.getInnerHeight());
|
52186
52243
|
};
|
52187
52244
|
PopupDropdownViewModel.prototype.getTargetElementRect = function () {
|
52188
|
-
var
|
52245
|
+
var componentRoot = this.container;
|
52246
|
+
var targetElement = this.model.getTargetCallback ? this.model.getTargetCallback(componentRoot) : undefined;
|
52247
|
+
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal && !targetElement) {
|
52248
|
+
targetElement = componentRoot.parentElement;
|
52249
|
+
}
|
52250
|
+
if (!targetElement)
|
52251
|
+
return null;
|
52252
|
+
var rect = targetElement.getBoundingClientRect();
|
52189
52253
|
var areaRect = this.getAvailableAreaRect();
|
52190
52254
|
return new Rect(rect.left - areaRect.left, rect.top - areaRect.top, rect.width, rect.height);
|
52191
52255
|
};
|
52192
52256
|
PopupDropdownViewModel.prototype._updatePosition = function () {
|
52193
52257
|
var _a, _b, _c;
|
52194
|
-
if (!this.targetElement)
|
52195
|
-
return;
|
52196
52258
|
var targetElementRect = this.getTargetElementRect();
|
52259
|
+
if (!targetElementRect)
|
52260
|
+
return;
|
52197
52261
|
var area = this.getAvailableAreaRect();
|
52198
52262
|
var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
|
52199
52263
|
if (!popupContainer)
|
@@ -52203,6 +52267,8 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52203
52267
|
var popupComputedStyle = DomDocumentHelper.getComputedStyle(popupContainer);
|
52204
52268
|
var marginLeft = (parseFloat(popupComputedStyle.marginLeft) || 0);
|
52205
52269
|
var marginRight = (parseFloat(popupComputedStyle.marginRight) || 0);
|
52270
|
+
var marginTop = (parseFloat(popupComputedStyle.marginTop) || 0);
|
52271
|
+
var marginBottom = (parseFloat(popupComputedStyle.marginBottom) || 0);
|
52206
52272
|
var height = popupContainer.offsetHeight - scrollContent.offsetHeight + scrollContent.scrollHeight;
|
52207
52273
|
var width = popupContainer.getBoundingClientRect().width;
|
52208
52274
|
this.model.setWidthByTarget && (this.minWidth = targetElementRect.width + "px");
|
@@ -52217,7 +52283,7 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52217
52283
|
this.popupDirection = PopupUtils.calculatePopupDirection(verticalPosition, actualHorizontalPosition);
|
52218
52284
|
var pos = PopupUtils.calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.model.positionMode);
|
52219
52285
|
if (DomWindowHelper.isAvailable()) {
|
52220
|
-
var newVerticalDimensions = PopupUtils.getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink);
|
52286
|
+
var newVerticalDimensions = PopupUtils.getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink, { top: marginTop, bottom: marginBottom });
|
52221
52287
|
if (!!newVerticalDimensions) {
|
52222
52288
|
this.height = newVerticalDimensions.height + "px";
|
52223
52289
|
pos.top = newVerticalDimensions.top;
|
@@ -52279,17 +52345,11 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52279
52345
|
PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
|
52280
52346
|
return "popup-pointer";
|
52281
52347
|
};
|
52282
|
-
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot
|
52348
|
+
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot) {
|
52283
52349
|
_super.prototype.setComponentElement.call(this, componentRoot);
|
52284
|
-
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal) {
|
52285
|
-
this.targetElement = targetElement || componentRoot.parentElement;
|
52286
|
-
this.areaElement = areaElement;
|
52287
|
-
}
|
52288
52350
|
};
|
52289
52351
|
PopupDropdownViewModel.prototype.resetComponentElement = function () {
|
52290
52352
|
_super.prototype.resetComponentElement.call(this);
|
52291
|
-
this.targetElement = undefined;
|
52292
|
-
this.areaElement = undefined;
|
52293
52353
|
};
|
52294
52354
|
PopupDropdownViewModel.prototype.updateOnShowing = function () {
|
52295
52355
|
var root = settings.environment.root;
|
@@ -52573,8 +52633,12 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52573
52633
|
if (option.isVisible) {
|
52574
52634
|
_this.updatePopupFocusFirstInputSelector();
|
52575
52635
|
var dropdownMenuOptions = _this.getDropdownMenuOptions();
|
52636
|
+
var prevMenuType = dropdownMenuOptions.menuType;
|
52576
52637
|
_this.question.processOpenDropdownMenu(dropdownMenuOptions);
|
52577
|
-
|
52638
|
+
if (prevMenuType !== dropdownMenuOptions.menuType) {
|
52639
|
+
_this._popupModel.updateDisplayMode(dropdownMenuOptions.menuType);
|
52640
|
+
_this.listModel.setSearchEnabled(_this.searchEnabled && dropdownMenuOptions.menuType !== "dropdown");
|
52641
|
+
}
|
52578
52642
|
if (!!_this.question.onOpenedCallBack) {
|
52579
52643
|
_this.question.onOpenedCallBack();
|
52580
52644
|
}
|
@@ -52878,8 +52942,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52878
52942
|
configurable: true
|
52879
52943
|
});
|
52880
52944
|
DropdownListModel.prototype.setSearchEnabled = function (newValue) {
|
52881
|
-
this.listModel.
|
52882
|
-
this.listModel.showSearchClearButton = IsTouch;
|
52945
|
+
this.listModel.setSearchEnabled(IsTouch && newValue);
|
52883
52946
|
this.searchEnabled = newValue;
|
52884
52947
|
};
|
52885
52948
|
DropdownListModel.prototype.setChoicesLazyLoadEnabled = function (newValue) {
|
@@ -53069,6 +53132,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53069
53132
|
if (!!this.popupModel) {
|
53070
53133
|
this.popupModel.dispose();
|
53071
53134
|
}
|
53135
|
+
this.htmlCleanerElement = undefined;
|
53072
53136
|
};
|
53073
53137
|
DropdownListModel.prototype.scrollToFocusedItem = function () {
|
53074
53138
|
this.listModel.scrollToFocusedItem();
|
@@ -54495,13 +54559,13 @@ Serializer.addClass("matrix", [
|
|
54495
54559
|
{
|
54496
54560
|
name: "columns:itemvalue[]", uniqueProperty: "value",
|
54497
54561
|
baseValue: function () {
|
54498
|
-
return
|
54562
|
+
return getLocaleString("matrix_column");
|
54499
54563
|
},
|
54500
54564
|
},
|
54501
54565
|
{
|
54502
54566
|
name: "rows:itemvalue[]", uniqueProperty: "value",
|
54503
54567
|
baseValue: function () {
|
54504
|
-
return
|
54568
|
+
return getLocaleString("matrix_row");
|
54505
54569
|
},
|
54506
54570
|
},
|
54507
54571
|
{ name: "cells:cells", serializationProperty: "cells" },
|
@@ -54801,6 +54865,7 @@ var InputElementAdapter = /** @class */ (function () {
|
|
54801
54865
|
};
|
54802
54866
|
InputElementAdapter.prototype.dispose = function () {
|
54803
54867
|
this.removeInputEventListener();
|
54868
|
+
this.inputElement = undefined;
|
54804
54869
|
this.inputMaskInstance.onPropertyChanged.remove(this.inputMaskInstancePropertyChangedHandler);
|
54805
54870
|
};
|
54806
54871
|
return InputElementAdapter;
|
@@ -55253,6 +55318,8 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
55253
55318
|
});
|
55254
55319
|
Object.defineProperty(QuestionTextModel.prototype, "inputValue", {
|
55255
55320
|
get: function () {
|
55321
|
+
if (!this._inputValue && !this.maskTypeIsEmpty)
|
55322
|
+
return this.maskInstance.getMaskedValue("");
|
55256
55323
|
return this._inputValue;
|
55257
55324
|
},
|
55258
55325
|
set: function (val) {
|
@@ -55551,6 +55618,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
55551
55618
|
};
|
55552
55619
|
QuestionTextModel.prototype.beforeDestroyQuestionElement = function (el) {
|
55553
55620
|
this.deleteMaskAdapter();
|
55621
|
+
this.input = undefined;
|
55554
55622
|
};
|
55555
55623
|
question_text_decorate([
|
55556
55624
|
jsonobject_property({
|
@@ -60379,6 +60447,8 @@ questionfactory_QuestionFactory.Instance.registerQuestion("comment", function (n
|
|
60379
60447
|
|
60380
60448
|
// CONCATENATED MODULE: ./packages/survey-core/src/utils/camera.ts
|
60381
60449
|
|
60450
|
+
var envStr = "environment";
|
60451
|
+
var userStr = "user";
|
60382
60452
|
var camera_Camera = /** @class */ (function () {
|
60383
60453
|
function Camera() {
|
60384
60454
|
this.canFlipValue = undefined;
|
@@ -60390,10 +60460,14 @@ var camera_Camera = /** @class */ (function () {
|
|
60390
60460
|
Camera.setCameraList = function (list) {
|
60391
60461
|
var getDeviceType = function (device) {
|
60392
60462
|
var lbl = device.label.toLocaleLowerCase();
|
60393
|
-
if (lbl.indexOf(
|
60394
|
-
return
|
60395
|
-
if (lbl.indexOf(
|
60396
|
-
return
|
60463
|
+
if (lbl.indexOf(userStr) > -1)
|
60464
|
+
return userStr;
|
60465
|
+
if (lbl.indexOf(envStr) > -1)
|
60466
|
+
return envStr;
|
60467
|
+
if (lbl.indexOf("front") > -1)
|
60468
|
+
return userStr;
|
60469
|
+
if (lbl.indexOf("back") > -1)
|
60470
|
+
return envStr;
|
60397
60471
|
return "";
|
60398
60472
|
};
|
60399
60473
|
Camera.clear();
|
@@ -60406,13 +60480,13 @@ var camera_Camera = /** @class */ (function () {
|
|
60406
60480
|
var lblA = getDeviceType(a);
|
60407
60481
|
var lblB = getDeviceType(b);
|
60408
60482
|
if (lblA !== lblB) {
|
60409
|
-
if (lblA ===
|
60483
|
+
if (lblA === userStr)
|
60410
60484
|
return -1;
|
60411
|
-
if (lblB ===
|
60485
|
+
if (lblB === userStr)
|
60412
60486
|
return 1;
|
60413
|
-
if (lblA ===
|
60487
|
+
if (lblA === envStr)
|
60414
60488
|
return -1;
|
60415
|
-
if (lblB ===
|
60489
|
+
if (lblB === envStr)
|
60416
60490
|
return 1;
|
60417
60491
|
}
|
60418
60492
|
}
|
@@ -60550,7 +60624,7 @@ var camera_Camera = /** @class */ (function () {
|
|
60550
60624
|
if (!this.canFlip())
|
60551
60625
|
return;
|
60552
60626
|
if (Camera.canSwitchFacingMode) {
|
60553
|
-
Camera.cameraFacingMode = Camera.cameraFacingMode ===
|
60627
|
+
Camera.cameraFacingMode = Camera.cameraFacingMode === userStr ? "environment" : userStr;
|
60554
60628
|
}
|
60555
60629
|
else if (Camera.cameraIndex >= Camera.cameraList.length - 1) {
|
60556
60630
|
Camera.cameraIndex = 0;
|
@@ -60572,7 +60646,7 @@ var camera_Camera = /** @class */ (function () {
|
|
60572
60646
|
Camera.setCameraList(list.length > 0 ? list : null);
|
60573
60647
|
};
|
60574
60648
|
Camera.cameraIndex = -1;
|
60575
|
-
Camera.cameraFacingMode =
|
60649
|
+
Camera.cameraFacingMode = userStr;
|
60576
60650
|
Camera.canSwitchFacingMode = false;
|
60577
60651
|
return Camera;
|
60578
60652
|
}());
|
@@ -62504,7 +62578,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
62504
62578
|
}
|
62505
62579
|
else {
|
62506
62580
|
for (var i = _this.rateValues.length; i < _this.rateCount; i++) {
|
62507
|
-
_this.rateValues.push(new itemvalue_ItemValue(
|
62581
|
+
_this.rateValues.push(new itemvalue_ItemValue(getLocaleString("choices_Item") + (i + 1)));
|
62508
62582
|
}
|
62509
62583
|
}
|
62510
62584
|
}
|
@@ -63376,7 +63450,7 @@ Serializer.addClass("rating", [
|
|
63376
63450
|
{
|
63377
63451
|
name: "rateValues:itemvalue[]",
|
63378
63452
|
baseValue: function () {
|
63379
|
-
return
|
63453
|
+
return getLocaleString("choices_Item");
|
63380
63454
|
},
|
63381
63455
|
category: "rateValues",
|
63382
63456
|
visibleIf: function (obj) {
|
@@ -65428,6 +65502,7 @@ var question_signaturepad_decorate = (undefined && undefined.__decorate) || func
|
|
65428
65502
|
|
65429
65503
|
|
65430
65504
|
|
65505
|
+
|
65431
65506
|
var defaultWidth = 300;
|
65432
65507
|
var defaultHeight = 200;
|
65433
65508
|
/**
|
@@ -65484,7 +65559,8 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
65484
65559
|
};
|
65485
65560
|
QuestionSignaturePadModel.prototype.afterRenderQuestionElement = function (el) {
|
65486
65561
|
if (!!el) {
|
65487
|
-
this.
|
65562
|
+
if (!this.isDesignMode)
|
65563
|
+
this.initSignaturePad(el);
|
65488
65564
|
this.element = el;
|
65489
65565
|
}
|
65490
65566
|
_super.prototype.afterRenderQuestionElement.call(this, el);
|
@@ -65533,9 +65609,12 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
65533
65609
|
img_1.src = url;
|
65534
65610
|
img_1.onload = function () {
|
65535
65611
|
if (!!_this.canvas) {
|
65536
|
-
var
|
65612
|
+
var canvas = DomDocumentHelper.createElement("canvas");
|
65613
|
+
canvas.width = _this.containerWidth;
|
65614
|
+
canvas.height = _this.containerHeight;
|
65615
|
+
var ctx = canvas.getContext("2d");
|
65537
65616
|
ctx.drawImage(img_1, 0, 0);
|
65538
|
-
var dataURL =
|
65617
|
+
var dataURL = canvas.toDataURL(_this.getFormat());
|
65539
65618
|
_this.fromDataUrl(dataURL);
|
65540
65619
|
}
|
65541
65620
|
_this.isFileLoading = false;
|
@@ -70330,12 +70409,12 @@ function createPopupModalViewModel(options, rootElement) {
|
|
70330
70409
|
popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
|
70331
70410
|
return popupViewModel;
|
70332
70411
|
}
|
70333
|
-
function createPopupViewModel(model
|
70412
|
+
function createPopupViewModel(model) {
|
70334
70413
|
if (model.isModal) {
|
70335
70414
|
return new PopupModalViewModel(model);
|
70336
70415
|
}
|
70337
70416
|
else {
|
70338
|
-
return new popup_dropdown_view_model_PopupDropdownViewModel(model
|
70417
|
+
return new popup_dropdown_view_model_PopupDropdownViewModel(model);
|
70339
70418
|
}
|
70340
70419
|
}
|
70341
70420
|
|
@@ -71215,20 +71294,6 @@ function trimDatePart(lexem, data) {
|
|
71215
71294
|
}
|
71216
71295
|
return result;
|
71217
71296
|
}
|
71218
|
-
function getDefaultYearForValidation(minYear, maxYear) {
|
71219
|
-
var defaultVal = 2000;
|
71220
|
-
if (defaultVal > maxYear) {
|
71221
|
-
defaultVal = parseInt(maxYear.toString().slice(0, maxYear.toString().length - 2)) * 100;
|
71222
|
-
}
|
71223
|
-
if (defaultVal < minYear) {
|
71224
|
-
var middle = (maxYear - minYear) / 2 + minYear;
|
71225
|
-
defaultVal = parseInt(middle.toString().slice(0, middle.toString().length - 1)) * 10;
|
71226
|
-
}
|
71227
|
-
if (defaultVal >= minYear && defaultVal <= maxYear) {
|
71228
|
-
return defaultVal;
|
71229
|
-
}
|
71230
|
-
return minYear;
|
71231
|
-
}
|
71232
71297
|
function getDateTimeLexems(pattern) {
|
71233
71298
|
var result = [];
|
71234
71299
|
var prevLexemType;
|
@@ -71473,9 +71538,18 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
71473
71538
|
return dateTime.year >= parseInt(minYearPart) && dateTime.year <= parseInt(maxYearPart);
|
71474
71539
|
};
|
71475
71540
|
InputMaskDateTime.prototype.createIDateTimeCompositionWithDefaults = function (dateTime, isUpperLimit) {
|
71476
|
-
var
|
71477
|
-
var
|
71478
|
-
var
|
71541
|
+
var checkOnlyLeapYears = dateTime.day == 29 && dateTime.month == 2;
|
71542
|
+
var minYear = dateTime.min.getFullYear();
|
71543
|
+
var maxYear = dateTime.max.getFullYear();
|
71544
|
+
if (checkOnlyLeapYears) {
|
71545
|
+
minYear = Math.ceil(minYear / 4) * 4;
|
71546
|
+
maxYear = Math.floor(minYear / 4) * 4;
|
71547
|
+
if (minYear > maxYear) {
|
71548
|
+
minYear = undefined;
|
71549
|
+
maxYear = undefined;
|
71550
|
+
}
|
71551
|
+
}
|
71552
|
+
var year = dateTime.year !== undefined ? dateTime.year : isUpperLimit ? maxYear : minYear;
|
71479
71553
|
var month = dateTime.month !== undefined ? dateTime.month : (isUpperLimit && this.hasDatePart ? 12 : 1);
|
71480
71554
|
var day = dateTime.day !== undefined ? dateTime.day : (isUpperLimit && this.hasDatePart ? this.getMaxDateForMonth(year, month) : 1);
|
71481
71555
|
var hour = dateTime.hour !== undefined ? dateTime.hour : (isUpperLimit ? 23 : 0);
|
@@ -71489,18 +71563,12 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
71489
71563
|
return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];
|
71490
71564
|
};
|
71491
71565
|
InputMaskDateTime.prototype.isDateValid = function (dateTime) {
|
71492
|
-
var min = dateTime.min;
|
71493
|
-
var max = dateTime.max;
|
71494
|
-
var year = dateTime.year !== undefined ? dateTime.year : getDefaultYearForValidation(min.getFullYear(), max.getFullYear());
|
71495
|
-
var month = dateTime.month !== undefined ? dateTime.month : 1;
|
71496
|
-
var day = dateTime.day !== undefined ? dateTime.day : 1;
|
71497
|
-
var monthIndex = month - 1;
|
71498
71566
|
var date = new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(dateTime, false)));
|
71499
71567
|
var dateH = new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(dateTime, true)));
|
71500
71568
|
return !isNaN(date) &&
|
71501
|
-
date.getDate() === day &&
|
71502
|
-
date.getMonth() ===
|
71503
|
-
date.getFullYear() === year &&
|
71569
|
+
(date.getDate() === dateTime.day || dateTime.day === undefined) &&
|
71570
|
+
(date.getMonth() === dateTime.month - 1 || dateTime.month === undefined) &&
|
71571
|
+
(date.getFullYear() === dateTime.year || dateTime.year === undefined) &&
|
71504
71572
|
dateH >= dateTime.min && date <= dateTime.max;
|
71505
71573
|
};
|
71506
71574
|
InputMaskDateTime.prototype.getPlaceholder = function (lexemLength, str, char) {
|
@@ -71556,7 +71624,7 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
71556
71624
|
return;
|
71557
71625
|
var propertyName = newItem.lexem.type;
|
71558
71626
|
var tempDateTime = mask_datetime_assign({}, dateTime);
|
71559
|
-
tempDateTime[propertyName] = parseInt(
|
71627
|
+
tempDateTime[propertyName] = parseInt(this.parseTwoDigitYear(newItem));
|
71560
71628
|
if (data.length === newItem.lexem.maxCount) {
|
71561
71629
|
if (this.isDateValid12(tempDateTime)) {
|
71562
71630
|
newItem.isCompleted = true;
|
@@ -71991,8 +72059,8 @@ Serializer.addClass("currencymask", [
|
|
71991
72059
|
|
71992
72060
|
var Version;
|
71993
72061
|
var ReleaseDate;
|
71994
|
-
Version = "" + "1.12.
|
71995
|
-
ReleaseDate = "" + "2024-11-
|
72062
|
+
Version = "" + "1.12.11";
|
72063
|
+
ReleaseDate = "" + "2024-11-20";
|
71996
72064
|
function checkLibraryVersion(ver, libraryName) {
|
71997
72065
|
if (Version != ver) {
|
71998
72066
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -82907,11 +82975,11 @@ var popup_Popup = /** @class */ (function (_super) {
|
|
82907
82975
|
return this.model;
|
82908
82976
|
};
|
82909
82977
|
Popup.prototype.createModel = function () {
|
82910
|
-
this.popup = createPopupViewModel(this.props.model
|
82978
|
+
this.popup = createPopupViewModel(this.props.model);
|
82911
82979
|
};
|
82912
82980
|
Popup.prototype.setTargetElement = function () {
|
82913
82981
|
var container = this.containerRef.current;
|
82914
|
-
this.popup.setComponentElement(container
|
82982
|
+
this.popup.setComponentElement(container);
|
82915
82983
|
};
|
82916
82984
|
Popup.prototype.componentDidMount = function () {
|
82917
82985
|
_super.prototype.componentDidMount.call(this);
|
@@ -83085,7 +83153,7 @@ var action_bar_item_dropdown_SurveyActionBarItemDropdown = /** @class */ (functi
|
|
83085
83153
|
var button = _super.prototype.renderInnerButton.call(this);
|
83086
83154
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null,
|
83087
83155
|
button,
|
83088
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_Popup, { model: this.item.popupModel
|
83156
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_Popup, { model: this.item.popupModel })));
|
83089
83157
|
};
|
83090
83158
|
SurveyActionBarItemDropdown.prototype.componentDidMount = function () {
|
83091
83159
|
this.viewModel = new ActionDropdownViewModel(this.item);
|