survey-react 1.12.9 → 1.12.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +1 -1
- package/defaultV2.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 +78 -27
- package/survey.react.js +450 -237
- 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();
|
@@ -4728,7 +4735,7 @@ var jsonobject_JsonObject = /** @class */ (function () {
|
|
4728
4735
|
parentProps[key] = true;
|
4729
4736
|
dProps.forEach(function (propKey) {
|
4730
4737
|
if (!parentProps[propKey]) {
|
4731
|
-
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType,
|
4738
|
+
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, false, options);
|
4732
4739
|
}
|
4733
4740
|
});
|
4734
4741
|
}
|
@@ -10018,6 +10025,7 @@ var ComputedUpdater = /** @class */ (function () {
|
|
10018
10025
|
};
|
10019
10026
|
ComputedUpdater.prototype.dispose = function () {
|
10020
10027
|
this.clearDependencies();
|
10028
|
+
this._updater = undefined;
|
10021
10029
|
};
|
10022
10030
|
ComputedUpdater.ComputedUpdaterType = "__dependency_computed";
|
10023
10031
|
return ComputedUpdater;
|
@@ -10160,6 +10168,13 @@ var base_Base = /** @class */ (function () {
|
|
10160
10168
|
this.onPropertyValueChangedCallback = undefined;
|
10161
10169
|
this.isDisposedValue = true;
|
10162
10170
|
Object.keys(this.dependencies).forEach(function (key) { return _this.dependencies[key].dispose(); });
|
10171
|
+
// this.dependencies = {};
|
10172
|
+
Object.keys(this.propertyHash).forEach(function (key) {
|
10173
|
+
var propVal = _this.getPropertyValueCore(_this.propertyHash, key);
|
10174
|
+
if (!!propVal && propVal.type == ComputedUpdater.ComputedUpdaterType) {
|
10175
|
+
propVal.dispose();
|
10176
|
+
}
|
10177
|
+
});
|
10163
10178
|
};
|
10164
10179
|
Object.defineProperty(Base.prototype, "isDisposed", {
|
10165
10180
|
get: function () {
|
@@ -10699,7 +10714,7 @@ var base_Base = /** @class */ (function () {
|
|
10699
10714
|
return !!locOwner ? locOwner.getLocale() : "";
|
10700
10715
|
};
|
10701
10716
|
Base.prototype.getLocalizationString = function (strName) {
|
10702
|
-
return
|
10717
|
+
return getLocaleString(strName, this.getLocale());
|
10703
10718
|
};
|
10704
10719
|
Base.prototype.getLocalizationFormatString = function (strName) {
|
10705
10720
|
var args = [];
|
@@ -11165,6 +11180,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
11165
11180
|
this.separatorAddConst = 1;
|
11166
11181
|
this.paddingSizeConst = 8;
|
11167
11182
|
this.dotsSizeConst = 48;
|
11183
|
+
this.dotsIconClass = ".sv-dots";
|
11184
|
+
this.iconClass = ".sv-svg-icon";
|
11168
11185
|
this.recalcMinDimensionConst = true;
|
11169
11186
|
this.getComputedStyle = function (elt) {
|
11170
11187
|
return DomDocumentHelper.getComputedStyle(elt);
|
@@ -11199,13 +11216,18 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
11199
11216
|
return space;
|
11200
11217
|
};
|
11201
11218
|
ResponsivityManager.prototype.calcItemSize = function (item) {
|
11202
|
-
return item.offsetWidth;
|
11219
|
+
return item.offsetWidth || item.getBoundingClientRect().width;
|
11203
11220
|
};
|
11204
|
-
ResponsivityManager.prototype.calcMinDimension = function (currentAction) {
|
11205
|
-
var
|
11206
|
-
if (currentAction.iconSize
|
11207
|
-
|
11221
|
+
ResponsivityManager.prototype.calcMinDimension = function (currentAction, item) {
|
11222
|
+
var iconSize;
|
11223
|
+
if (!!item && (!currentAction.iconSize || currentAction.iconSize === "auto")) {
|
11224
|
+
var iconElement = item.querySelector(this.iconClass);
|
11225
|
+
iconSize = iconElement && this.calcItemSize(iconElement);
|
11226
|
+
}
|
11227
|
+
else if (currentAction.iconSize && typeof (currentAction.iconSize) === "number" && this.recalcMinDimensionConst) {
|
11228
|
+
iconSize = currentAction.iconSize;
|
11208
11229
|
}
|
11230
|
+
var minDimensionConst = !!iconSize ? (iconSize + 2 * this.paddingSizeConst) : this.minDimensionConst;
|
11209
11231
|
return currentAction.canShrink
|
11210
11232
|
? minDimensionConst +
|
11211
11233
|
(currentAction.needSeparator ? this.separatorSize : 0)
|
@@ -11213,7 +11235,7 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
11213
11235
|
};
|
11214
11236
|
ResponsivityManager.prototype.calcItemsSizes = function () {
|
11215
11237
|
var _this = this;
|
11216
|
-
if (this.isInitialized)
|
11238
|
+
if (!this.container || this.isInitialized)
|
11217
11239
|
return;
|
11218
11240
|
var actions = this.model.actions;
|
11219
11241
|
var _items = this.container.querySelectorAll(this.itemsSelector);
|
@@ -11226,11 +11248,11 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
11226
11248
|
};
|
11227
11249
|
ResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
|
11228
11250
|
currentAction.maxDimension = this.calcItemSize(item);
|
11229
|
-
currentAction.minDimension = this.calcMinDimension(currentAction);
|
11251
|
+
currentAction.minDimension = this.calcMinDimension(currentAction, item);
|
11230
11252
|
};
|
11231
11253
|
Object.defineProperty(ResponsivityManager.prototype, "isContainerVisible", {
|
11232
11254
|
get: function () {
|
11233
|
-
return isContainerVisible(this.container);
|
11255
|
+
return !!this.container && isContainerVisible(this.container);
|
11234
11256
|
},
|
11235
11257
|
enumerable: false,
|
11236
11258
|
configurable: true
|
@@ -11245,13 +11267,16 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
11245
11267
|
var _a;
|
11246
11268
|
var dotsItemSize = _this.dotsItemSize;
|
11247
11269
|
if (!_this.dotsItemSize) {
|
11248
|
-
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(
|
11270
|
+
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(_this.dotsIconClass);
|
11249
11271
|
dotsItemSize = dotsItemElement && _this.calcItemSize(dotsItemElement) || _this.dotsSizeConst;
|
11250
11272
|
}
|
11251
11273
|
_this.model.fit(_this.getAvailableSpace(), dotsItemSize);
|
11252
11274
|
};
|
11253
11275
|
if (!this.isInitialized) {
|
11254
11276
|
var callback = function () {
|
11277
|
+
if (!_this.container) {
|
11278
|
+
return;
|
11279
|
+
}
|
11255
11280
|
_this.calcItemsSizes();
|
11256
11281
|
_this.isInitialized = true;
|
11257
11282
|
processResponsiveness_1();
|
@@ -11273,6 +11298,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
11273
11298
|
if (!!this.resizeObserver) {
|
11274
11299
|
this.resizeObserver.disconnect();
|
11275
11300
|
}
|
11301
|
+
this.resizeObserver = undefined;
|
11302
|
+
this.container = undefined;
|
11276
11303
|
};
|
11277
11304
|
return ResponsivityManager;
|
11278
11305
|
}());
|
@@ -11485,24 +11512,45 @@ var container_ActionContainer = /** @class */ (function (_super) {
|
|
11485
11512
|
ActionContainer.prototype.addAction = function (val, sortByVisibleIndex) {
|
11486
11513
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
11487
11514
|
var res = this.createAction(val);
|
11488
|
-
this.
|
11489
|
-
|
11515
|
+
if (sortByVisibleIndex && !this.isActionVisible(res))
|
11516
|
+
return res;
|
11517
|
+
var items = [].concat(this.actions, res);
|
11518
|
+
this.sortItems(items);
|
11519
|
+
this.actions = items;
|
11490
11520
|
return res;
|
11491
11521
|
};
|
11492
|
-
ActionContainer.prototype.sortItems = function () {
|
11493
|
-
this.actions = []
|
11494
|
-
.concat(this.actions.filter(function (item) { return item.visibleIndex === undefined || item.visibleIndex >= 0; }))
|
11495
|
-
.sort(function (firstItem, secondItem) {
|
11496
|
-
return firstItem.visibleIndex - secondItem.visibleIndex;
|
11497
|
-
});
|
11498
|
-
};
|
11499
11522
|
ActionContainer.prototype.setItems = function (items, sortByVisibleIndex) {
|
11500
11523
|
var _this = this;
|
11501
11524
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
11502
|
-
|
11525
|
+
var newActions = [];
|
11526
|
+
items.forEach(function (item) {
|
11527
|
+
if (!sortByVisibleIndex || _this.isActionVisible(item)) {
|
11528
|
+
newActions.push(_this.createAction(item));
|
11529
|
+
}
|
11530
|
+
});
|
11503
11531
|
if (sortByVisibleIndex) {
|
11504
|
-
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;
|
11505
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;
|
11506
11554
|
};
|
11507
11555
|
ActionContainer.prototype.popupAfterShowCallback = function (itemValue) {
|
11508
11556
|
};
|
@@ -11529,6 +11577,7 @@ var container_ActionContainer = /** @class */ (function (_super) {
|
|
11529
11577
|
};
|
11530
11578
|
ActionContainer.prototype.dispose = function () {
|
11531
11579
|
_super.prototype.dispose.call(this);
|
11580
|
+
this.resetResponsivityManager();
|
11532
11581
|
this.actions.forEach(function (action) { return action.dispose(); });
|
11533
11582
|
this.actions.length = 0;
|
11534
11583
|
};
|
@@ -11830,6 +11879,10 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11830
11879
|
this.actions.push(this.loadingIndicator);
|
11831
11880
|
}
|
11832
11881
|
};
|
11882
|
+
ListModel.prototype.setSearchEnabled = function (newValue) {
|
11883
|
+
this.searchEnabled = newValue;
|
11884
|
+
this.showSearchClearButton = newValue;
|
11885
|
+
};
|
11833
11886
|
ListModel.prototype.onSet = function () {
|
11834
11887
|
this.showFilter = this.searchEnabled && (this.forceShowFilter || (this.actions || []).length > ListModel.MINELEMENTCOUNT);
|
11835
11888
|
_super.prototype.onSet.call(this);
|
@@ -12159,6 +12212,9 @@ var popup_PopupModel = /** @class */ (function (_super) {
|
|
12159
12212
|
return options.actions;
|
12160
12213
|
};
|
12161
12214
|
PopupModel.prototype.updateDisplayMode = function (menuType) {
|
12215
|
+
if (this.displayMode !== menuType) {
|
12216
|
+
this.setWidthByTarget = menuType === "dropdown";
|
12217
|
+
}
|
12162
12218
|
switch (menuType) {
|
12163
12219
|
case "dropdown": {
|
12164
12220
|
this.displayMode = "popup";
|
@@ -12301,6 +12357,7 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
12301
12357
|
}
|
12302
12358
|
};
|
12303
12359
|
var popupModel = createPopupModelWithListModel(listOptions, popupOptions);
|
12360
|
+
popupModel.getTargetCallback = getActionDropdownButtonTarget;
|
12304
12361
|
var newActionOptions = Object.assign({}, actionOptions, {
|
12305
12362
|
component: "sv-action-bar-item-dropdown",
|
12306
12363
|
popupModel: popupModel,
|
@@ -12723,7 +12780,7 @@ var action_Action = /** @class */ (function (_super) {
|
|
12723
12780
|
Action.prototype.locTooltipChanged = function () {
|
12724
12781
|
if (!this.locTooltipName)
|
12725
12782
|
return;
|
12726
|
-
this.tooltip =
|
12783
|
+
this.tooltip = getLocaleString(this.locTooltipName, this.locTitle.locale);
|
12727
12784
|
};
|
12728
12785
|
//ILocalizableOwner
|
12729
12786
|
Action.prototype.getLocale = function () { return this.owner ? this.owner.getLocale() : ""; };
|
@@ -12732,7 +12789,9 @@ var action_Action = /** @class */ (function (_super) {
|
|
12732
12789
|
Action.prototype.getRenderer = function (name) { return this.owner ? this.owner.getRenderer(name) : null; };
|
12733
12790
|
Action.prototype.getRendererContext = function (locStr) { return this.owner ? this.owner.getRendererContext(locStr) : locStr; };
|
12734
12791
|
Action.prototype.setVisible = function (val) {
|
12735
|
-
this.
|
12792
|
+
if (this.visible !== val) {
|
12793
|
+
this._visible = val;
|
12794
|
+
}
|
12736
12795
|
};
|
12737
12796
|
Action.prototype.getVisible = function () {
|
12738
12797
|
return this._visible;
|
@@ -12753,15 +12812,15 @@ var action_Action = /** @class */ (function (_super) {
|
|
12753
12812
|
};
|
12754
12813
|
Action.prototype.dispose = function () {
|
12755
12814
|
this.updateCallback = undefined;
|
12815
|
+
if (!!this.locTitleValue) {
|
12816
|
+
this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
|
12817
|
+
}
|
12818
|
+
this.locTitleChanged = undefined;
|
12756
12819
|
this.action = undefined;
|
12757
12820
|
_super.prototype.dispose.call(this);
|
12758
12821
|
if (this.popupModel) {
|
12759
12822
|
this.popupModel.dispose();
|
12760
12823
|
}
|
12761
|
-
if (!!this.locTitleValue) {
|
12762
|
-
this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
|
12763
|
-
this.locTitleChanged = undefined;
|
12764
|
-
}
|
12765
12824
|
};
|
12766
12825
|
action_decorate([
|
12767
12826
|
jsonobject_property()
|
@@ -12872,7 +12931,7 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
12872
12931
|
innerCss: "sv-dots__item",
|
12873
12932
|
iconName: "icon-more",
|
12874
12933
|
visible: false,
|
12875
|
-
tooltip:
|
12934
|
+
tooltip: getLocaleString("more"),
|
12876
12935
|
}, {
|
12877
12936
|
items: [],
|
12878
12937
|
allowSelection: false
|
@@ -12984,6 +13043,12 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
12984
13043
|
}
|
12985
13044
|
};
|
12986
13045
|
AdaptiveActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
13046
|
+
if (!!this.responsivityManager) {
|
13047
|
+
if (this.responsivityManager.container == container) {
|
13048
|
+
return;
|
13049
|
+
}
|
13050
|
+
this.responsivityManager.dispose();
|
13051
|
+
}
|
12987
13052
|
this.responsivityManager = new responsivity_manager_ResponsivityManager(container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content", null, delayedUpdateFunction);
|
12988
13053
|
};
|
12989
13054
|
AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
|
@@ -12994,9 +13059,12 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
12994
13059
|
};
|
12995
13060
|
AdaptiveActionContainer.prototype.setActionsMode = function (mode) {
|
12996
13061
|
this.actions.forEach(function (action) {
|
12997
|
-
if (mode == "small" && action.disableShrink)
|
12998
|
-
|
12999
|
-
|
13062
|
+
if (mode == "small" && action.disableShrink) {
|
13063
|
+
action.mode = "large";
|
13064
|
+
}
|
13065
|
+
else {
|
13066
|
+
action.mode = mode;
|
13067
|
+
}
|
13000
13068
|
});
|
13001
13069
|
};
|
13002
13070
|
AdaptiveActionContainer.prototype.dispose = function () {
|
@@ -13455,11 +13523,15 @@ var animation_AnimationGroup = /** @class */ (function (_super) {
|
|
13455
13523
|
newValue = [].concat(newValue);
|
13456
13524
|
var oldValue = [].concat(this.getCurrentValue());
|
13457
13525
|
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
13458
|
-
var
|
13459
|
-
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
13460
|
-
deletedItems = [];
|
13461
|
-
mergedItems = newValue;
|
13526
|
+
var compareResult = compareArrays(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; }));
|
13527
|
+
if (!allowSyncRemovalAddition && (compareResult.reorderedItems.length > 0 || compareResult.addedItems.length > 0)) {
|
13528
|
+
compareResult.deletedItems = [];
|
13529
|
+
compareResult.mergedItems = newValue;
|
13462
13530
|
}
|
13531
|
+
if (!!this.animationOptions.onCompareArrays) {
|
13532
|
+
this.animationOptions.onCompareArrays(compareResult);
|
13533
|
+
}
|
13534
|
+
var addedItems = compareResult.addedItems, reorderedItems = compareResult.reorderedItems, deletedItems = compareResult.deletedItems, mergedItems = compareResult.mergedItems;
|
13463
13535
|
var runAnimationCallback = function () {
|
13464
13536
|
_this.animation.runGroupAnimation(_this.animationOptions, addedItems, deletedItems, reorderedItems, function () {
|
13465
13537
|
if (deletedItems.length > 0) {
|
@@ -14604,6 +14676,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14604
14676
|
};
|
14605
14677
|
SurveyElement.prototype.setPage = function (parent, newPage) {
|
14606
14678
|
var oldPage = this.getPage(parent);
|
14679
|
+
this.prevSurvey = this.survey;
|
14607
14680
|
//fix for the creator v1: https://github.com/surveyjs/survey-creator/issues/1744
|
14608
14681
|
if (typeof newPage === "string") {
|
14609
14682
|
var survey = this.getSurvey();
|
@@ -14619,6 +14692,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14619
14692
|
if (newPage) {
|
14620
14693
|
newPage.addElement(this, -1);
|
14621
14694
|
}
|
14695
|
+
this.prevSurvey = undefined;
|
14622
14696
|
};
|
14623
14697
|
SurveyElement.prototype.getSearchableLocKeys = function (keys) {
|
14624
14698
|
keys.push("title");
|
@@ -15290,7 +15364,7 @@ var localizablestring_LocalizableString = /** @class */ (function () {
|
|
15290
15364
|
};
|
15291
15365
|
LocalizableString.prototype.getLocalizationStr = function () {
|
15292
15366
|
var name = this.getLocalizationName();
|
15293
|
-
return !!name ?
|
15367
|
+
return !!name ? getLocaleString(name, this.locale) : "";
|
15294
15368
|
};
|
15295
15369
|
Object.defineProperty(LocalizableString.prototype, "hasHtml", {
|
15296
15370
|
get: function () {
|
@@ -15898,6 +15972,12 @@ function navigateToUrl(url) {
|
|
15898
15972
|
function wrapUrlForBackgroundImage(url) {
|
15899
15973
|
return !!url ? ["url(", url, ")"].join("") : "";
|
15900
15974
|
}
|
15975
|
+
function isBase64URL(url) {
|
15976
|
+
if (typeof url == "string") {
|
15977
|
+
return /^data:((?:\w+\/(?:(?!;).)+)?)((?:;[^;]+?)*),(.+)$/.test(url);
|
15978
|
+
}
|
15979
|
+
return null;
|
15980
|
+
}
|
15901
15981
|
// old-name: new-name
|
15902
15982
|
var renamedIcons = {
|
15903
15983
|
"changecamera": "flip-24x24",
|
@@ -15916,6 +15996,7 @@ var renamedIcons = {
|
|
15916
15996
|
"takepicture": "camera-32x32",
|
15917
15997
|
"takepicture_24x24": "camera-24x24",
|
15918
15998
|
"v2check": "check-16x16",
|
15999
|
+
"checked": "check-16x16",
|
15919
16000
|
"v2check_24x24": "check-24x24",
|
15920
16001
|
"back-to-panel_16x16": "restoredown-16x16",
|
15921
16002
|
"clear_16x16": "clear-16x16",
|
@@ -16332,9 +16413,9 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
|
|
16332
16413
|
var toolbar = popupViewModel.footerToolbar;
|
16333
16414
|
var applyBtn = toolbar.getActionById("apply");
|
16334
16415
|
var cancelBtn = toolbar.getActionById("cancel");
|
16335
|
-
cancelBtn.title =
|
16416
|
+
cancelBtn.title = getLocaleString("cancel", locale);
|
16336
16417
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
16337
|
-
applyBtn.title = applyTitle ||
|
16418
|
+
applyBtn.title = applyTitle || getLocaleString("ok", locale);
|
16338
16419
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
16339
16420
|
configConfirmDialog(popupViewModel);
|
16340
16421
|
return true;
|
@@ -17340,7 +17421,7 @@ var survey_error_SurveyError = /** @class */ (function () {
|
|
17340
17421
|
return !!this.errorOwner ? this.errorOwner.getLocale() : "";
|
17341
17422
|
};
|
17342
17423
|
SurveyError.prototype.getLocalizationString = function (locStrName) {
|
17343
|
-
return
|
17424
|
+
return getLocaleString(locStrName, this.getLocale());
|
17344
17425
|
};
|
17345
17426
|
SurveyError.prototype.updateText = function () {
|
17346
17427
|
if (this.onUpdateErrorTextCallback) {
|
@@ -17437,8 +17518,7 @@ var error_ExceedSizeError = /** @class */ (function (_super) {
|
|
17437
17518
|
return "exceedsize";
|
17438
17519
|
};
|
17439
17520
|
ExceedSizeError.prototype.getDefaultText = function () {
|
17440
|
-
return
|
17441
|
-
.getString("exceedMaxSize")["format"](this.getTextSize());
|
17521
|
+
return getLocaleString("exceedMaxSize")["format"](this.getTextSize());
|
17442
17522
|
};
|
17443
17523
|
ExceedSizeError.prototype.getTextSize = function () {
|
17444
17524
|
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
@@ -17569,8 +17649,7 @@ var error_MinRowCountError = /** @class */ (function (_super) {
|
|
17569
17649
|
return "minrowcounterror";
|
17570
17650
|
};
|
17571
17651
|
MinRowCountError.prototype.getDefaultText = function () {
|
17572
|
-
return
|
17573
|
-
.getString("minRowCountError")["format"](this.minRowCount);
|
17652
|
+
return getLocaleString("minRowCountError")["format"](this.minRowCount);
|
17574
17653
|
};
|
17575
17654
|
return MinRowCountError;
|
17576
17655
|
}(survey_error_SurveyError));
|
@@ -18531,6 +18610,9 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
18531
18610
|
this.updateElement();
|
18532
18611
|
}
|
18533
18612
|
};
|
18613
|
+
TextAreaModel.prototype.resetElement = function () {
|
18614
|
+
this.element = undefined;
|
18615
|
+
};
|
18534
18616
|
TextAreaModel.prototype.getTextValue = function () {
|
18535
18617
|
if (!!this.options.getTextValue)
|
18536
18618
|
return this.options.getTextValue() || "";
|
@@ -18687,6 +18769,7 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
18687
18769
|
if (this.question) {
|
18688
18770
|
this.question.unRegisterFunctionOnPropertyValueChanged(this.options.propertyName, "__textarea");
|
18689
18771
|
}
|
18772
|
+
this.resetElement();
|
18690
18773
|
};
|
18691
18774
|
return TextAreaModel;
|
18692
18775
|
}());
|
@@ -18779,8 +18862,10 @@ var question_Question = /** @class */ (function (_super) {
|
|
18779
18862
|
_this.createLocalizableString("commentText", _this, true, "otherItemText");
|
18780
18863
|
_this.createLocalizableString("requiredErrorText", _this);
|
18781
18864
|
_this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
|
18865
|
+
_this.startSetValueOnExpression();
|
18782
18866
|
_this.clearValue();
|
18783
18867
|
_this.updateValueWithDefaults();
|
18868
|
+
_this.finishSetValueOnExpression();
|
18784
18869
|
});
|
18785
18870
|
var setValueIfInfo = _this.addTriggerInfo("setValueIf", function () { return true; }, function () { return _this.runSetValueExpression(); });
|
18786
18871
|
setValueIfInfo.runSecondCheck = function (keys) { return _this.checkExpressionIf(keys); };
|
@@ -20531,12 +20616,13 @@ var question_Question = /** @class */ (function (_super) {
|
|
20531
20616
|
_super.prototype.onSetData.call(this);
|
20532
20617
|
if (!this.survey)
|
20533
20618
|
return;
|
20534
|
-
this.initDataFromSurvey();
|
20535
|
-
this.onSurveyValueChanged(this.value);
|
20536
|
-
this.updateValueWithDefaults();
|
20537
20619
|
this.onIndentChanged();
|
20538
|
-
this.
|
20539
|
-
|
20620
|
+
if (!this.isDesignMode) {
|
20621
|
+
this.initDataFromSurvey();
|
20622
|
+
this.onSurveyValueChanged(this.value);
|
20623
|
+
this.updateValueWithDefaults();
|
20624
|
+
this.updateIsAnswered();
|
20625
|
+
}
|
20540
20626
|
};
|
20541
20627
|
Question.prototype.initDataFromSurvey = function () {
|
20542
20628
|
if (!!this.data) {
|
@@ -21146,10 +21232,20 @@ var question_Question = /** @class */ (function (_super) {
|
|
21146
21232
|
var _this = this;
|
21147
21233
|
this.runExpressionSetValueCore(val, function (val) {
|
21148
21234
|
if (!_this.isTwoValueEquals(_this.value, val)) {
|
21235
|
+
_this.startSetValueOnExpression();
|
21149
21236
|
_this.value = val;
|
21237
|
+
_this.finishSetValueOnExpression();
|
21150
21238
|
}
|
21151
21239
|
});
|
21152
21240
|
};
|
21241
|
+
Question.prototype.startSetValueOnExpression = function () {
|
21242
|
+
var _a;
|
21243
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.startSetValueOnExpression();
|
21244
|
+
};
|
21245
|
+
Question.prototype.finishSetValueOnExpression = function () {
|
21246
|
+
var _a;
|
21247
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.finishSetValueOnExpression();
|
21248
|
+
};
|
21153
21249
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
21154
21250
|
var _this = this;
|
21155
21251
|
if (values === void 0) { values = null; }
|
@@ -21226,7 +21322,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
21226
21322
|
};
|
21227
21323
|
Object.defineProperty(Question.prototype, "isAnswered", {
|
21228
21324
|
get: function () {
|
21229
|
-
return this.getPropertyValue("isAnswered");
|
21325
|
+
return this.getPropertyValue("isAnswered") || false;
|
21230
21326
|
},
|
21231
21327
|
set: function (val) {
|
21232
21328
|
this.setPropertyValue("isAnswered", val);
|
@@ -22686,7 +22782,9 @@ var itemvalue_ItemValue = /** @class */ (function (_super) {
|
|
22686
22782
|
return isVisible && visible;
|
22687
22783
|
};
|
22688
22784
|
ItemValue.prototype.setVisible = function (val) {
|
22689
|
-
this.
|
22785
|
+
if (this.visible !== val) {
|
22786
|
+
this._visible = val;
|
22787
|
+
}
|
22690
22788
|
};
|
22691
22789
|
ItemValue.prototype.getLocTitle = function () {
|
22692
22790
|
return this.locText;
|
@@ -25584,18 +25682,15 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
25584
25682
|
}
|
25585
25683
|
Object.defineProperty(QuestionFactory, "DefaultChoices", {
|
25586
25684
|
get: function () {
|
25587
|
-
|
25588
|
-
|
25589
|
-
surveyLocalization.getString("choices_Item") + "2",
|
25590
|
-
surveyLocalization.getString("choices_Item") + "3",
|
25591
|
-
];
|
25685
|
+
var choice = getLocaleString("choices_Item");
|
25686
|
+
return [choice + "1", choice + "2", choice + "3"];
|
25592
25687
|
},
|
25593
25688
|
enumerable: false,
|
25594
25689
|
configurable: true
|
25595
25690
|
});
|
25596
25691
|
Object.defineProperty(QuestionFactory, "DefaultColums", {
|
25597
25692
|
get: function () {
|
25598
|
-
var colName =
|
25693
|
+
var colName = getLocaleString("matrix_column") + " ";
|
25599
25694
|
return [colName + "1", colName + "2", colName + "3"];
|
25600
25695
|
},
|
25601
25696
|
enumerable: false,
|
@@ -25603,7 +25698,7 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
25603
25698
|
});
|
25604
25699
|
Object.defineProperty(QuestionFactory, "DefaultRows", {
|
25605
25700
|
get: function () {
|
25606
|
-
var rowName =
|
25701
|
+
var rowName = getLocaleString("matrix_row") + " ";
|
25607
25702
|
return [rowName + "1", rowName + "2"];
|
25608
25703
|
},
|
25609
25704
|
enumerable: false,
|
@@ -25611,7 +25706,7 @@ var questionfactory_QuestionFactory = /** @class */ (function () {
|
|
25611
25706
|
});
|
25612
25707
|
Object.defineProperty(QuestionFactory, "DefaultMutlipleTextItems", {
|
25613
25708
|
get: function () {
|
25614
|
-
var itemName =
|
25709
|
+
var itemName = getLocaleString("multipletext_itemname");
|
25615
25710
|
return [itemName + "1", itemName + "2"];
|
25616
25711
|
},
|
25617
25712
|
enumerable: false,
|
@@ -26311,26 +26406,18 @@ var matrixDropdownColumnTypes = {
|
|
26311
26406
|
*/
|
26312
26407
|
var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function (_super) {
|
26313
26408
|
question_matrixdropdowncolumn_extends(MatrixDropdownColumn, _super);
|
26314
|
-
function MatrixDropdownColumn(name, title) {
|
26315
|
-
if (title === void 0) { title = null; }
|
26409
|
+
function MatrixDropdownColumn(name, title, colOwner) {
|
26316
26410
|
var _this = _super.call(this) || this;
|
26317
|
-
_this.colOwnerValue = null;
|
26318
26411
|
_this.indexValue = -1;
|
26319
26412
|
_this._hasVisibleCell = true;
|
26320
26413
|
_this.isColumnsVisibleIf = true;
|
26321
26414
|
_this.previousChoicesId = undefined;
|
26415
|
+
_this.colOwnerValue = colOwner;
|
26322
26416
|
_this.createLocalizableString("totalFormat", _this);
|
26323
26417
|
_this.createLocalizableString("cellHint", _this);
|
26324
26418
|
_this.registerPropertyChangedHandlers(["showInMultipleColumns"], function () { _this.doShowInMultipleColumnsChanged(); });
|
26325
26419
|
_this.registerPropertyChangedHandlers(["visible"], function () { _this.doColumnVisibilityChanged(); });
|
26326
|
-
_this.updateTemplateQuestion();
|
26327
|
-
_this.name = name;
|
26328
|
-
if (title) {
|
26329
|
-
_this.title = title;
|
26330
|
-
}
|
26331
|
-
else {
|
26332
|
-
_this.templateQuestion.locTitle.strChanged();
|
26333
|
-
}
|
26420
|
+
_this.updateTemplateQuestion(undefined, name, title);
|
26334
26421
|
return _this;
|
26335
26422
|
}
|
26336
26423
|
MatrixDropdownColumn.getColumnTypes = function () {
|
@@ -27132,7 +27219,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
27132
27219
|
return this.colOwner.getCellType();
|
27133
27220
|
return settings.matrix.defaultCellType;
|
27134
27221
|
};
|
27135
|
-
MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType) {
|
27222
|
+
MatrixDropdownColumn.prototype.updateTemplateQuestion = function (newCellType, name, title) {
|
27136
27223
|
var _this = this;
|
27137
27224
|
var curCellType = this.getDefaultCellQuestionType(newCellType);
|
27138
27225
|
var prevCellType = this.templateQuestion
|
@@ -27146,6 +27233,15 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
27146
27233
|
this.templateQuestionValue = this.createNewQuestion(curCellType);
|
27147
27234
|
this.templateQuestion.locOwner = this;
|
27148
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
|
+
}
|
27149
27245
|
this.templateQuestion.onPropertyChanged.add(function (sender, options) {
|
27150
27246
|
_this.propertyValueChanged(options.name, options.oldValue, options.newValue, options.arrayChanges, options.target);
|
27151
27247
|
});
|
@@ -30488,8 +30584,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30488
30584
|
configurable: true
|
30489
30585
|
});
|
30490
30586
|
QuestionMatrixDropdownModelBase.prototype.addColumn = function (name, title) {
|
30491
|
-
|
30492
|
-
var column = new question_matrixdropdowncolumn_MatrixDropdownColumn(name, title);
|
30587
|
+
var column = new question_matrixdropdowncolumn_MatrixDropdownColumn(name, title, this);
|
30493
30588
|
this.columns.push(column);
|
30494
30589
|
return column;
|
30495
30590
|
};
|
@@ -34771,7 +34866,7 @@ var dxSurveyService_dxSurveyService = /** @class */ (function () {
|
|
34771
34866
|
if (clientId === void 0) { clientId = null; }
|
34772
34867
|
if (isPartialCompleted === void 0) { isPartialCompleted = false; }
|
34773
34868
|
if (!this.canSendResult(result)) {
|
34774
|
-
onSendResult(false,
|
34869
|
+
onSendResult(false, getLocaleString("savingExceedSize", this.locale), undefined);
|
34775
34870
|
}
|
34776
34871
|
else {
|
34777
34872
|
this.sendResultCore(postId, result, onSendResult, clientId, isPartialCompleted);
|
@@ -36404,7 +36499,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36404
36499
|
};
|
36405
36500
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
36406
36501
|
get: function () {
|
36407
|
-
return ((this.canShowTitle() && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
36502
|
+
return ((this.canShowTitle(this.survey) && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
36408
36503
|
(this.isDesignMode && !(settings.supportCreatorV2 && this.isPanel) && this.showTitle && settings.designMode.showEmptyTitles));
|
36409
36504
|
},
|
36410
36505
|
enumerable: false,
|
@@ -36429,7 +36524,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36429
36524
|
}
|
36430
36525
|
};
|
36431
36526
|
PanelModelBase.prototype.removeFromParent = function () { };
|
36432
|
-
PanelModelBase.prototype.canShowTitle = function () { return true; };
|
36527
|
+
PanelModelBase.prototype.canShowTitle = function (survey) { return true; };
|
36433
36528
|
Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
|
36434
36529
|
get: function () {
|
36435
36530
|
if (!this.hasTitle && this.isDesignMode)
|
@@ -37014,7 +37109,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37014
37109
|
PanelModelBase.prototype.hasErrorsInPanels = function (rec) {
|
37015
37110
|
var errors = [];
|
37016
37111
|
this.hasRequiredError(rec, errors);
|
37017
|
-
if (this.survey) {
|
37112
|
+
if (this.isPanel && this.survey) {
|
37018
37113
|
var customError = this.survey.validatePanel(this);
|
37019
37114
|
if (customError) {
|
37020
37115
|
errors.push(customError);
|
@@ -37531,29 +37626,29 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37531
37626
|
}
|
37532
37627
|
}
|
37533
37628
|
};
|
37629
|
+
PanelModelBase.prototype.canFireAddRemoveNotifications = function (element) {
|
37630
|
+
return !!this.survey && element.prevSurvey !== this.survey;
|
37631
|
+
};
|
37534
37632
|
PanelModelBase.prototype.onAddElement = function (element, index) {
|
37535
37633
|
var _this = this;
|
37634
|
+
var survey = this.survey;
|
37635
|
+
var fireNotification = this.canFireAddRemoveNotifications(element);
|
37536
37636
|
element.setSurveyImpl(this.surveyImpl);
|
37537
37637
|
element.parent = this;
|
37538
37638
|
this.markQuestionListDirty();
|
37539
37639
|
if (this.canBuildRows()) {
|
37540
37640
|
this.updateRowsOnElementAdded(element);
|
37541
37641
|
}
|
37542
|
-
if (
|
37543
|
-
|
37544
|
-
|
37545
|
-
this.survey.panelAdded(p, index, this, this.root);
|
37642
|
+
if (fireNotification) {
|
37643
|
+
if (element.isPanel) {
|
37644
|
+
survey.panelAdded(element, index, this, this.root);
|
37546
37645
|
}
|
37547
|
-
|
37548
|
-
|
37549
|
-
if (this.survey) {
|
37550
|
-
var q = element;
|
37551
|
-
this.survey.questionAdded(q, index, this, this.root);
|
37646
|
+
else {
|
37647
|
+
survey.questionAdded(element, index, this, this.root);
|
37552
37648
|
}
|
37553
37649
|
}
|
37554
37650
|
if (!!this.addElementCallback)
|
37555
37651
|
this.addElementCallback(element);
|
37556
|
-
var self = this;
|
37557
37652
|
element.registerPropertyChangedHandlers(["visible", "isVisible"], function () {
|
37558
37653
|
_this.onElementVisibilityChanged(element);
|
37559
37654
|
}, this.id);
|
@@ -37575,7 +37670,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37575
37670
|
this.onElementVisibilityChanged(this);
|
37576
37671
|
};
|
37577
37672
|
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
37578
|
-
if (!this.
|
37673
|
+
if (!this.canFireAddRemoveNotifications(element))
|
37579
37674
|
return;
|
37580
37675
|
if (!element.isPanel) {
|
37581
37676
|
this.survey.questionRemoved(element);
|
@@ -38440,7 +38535,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38440
38535
|
return this.showQuestionNumbers !== "off" && this.showQuestionNumbers !== "onpanel";
|
38441
38536
|
};
|
38442
38537
|
PanelModel.prototype.notifySurveyOnVisibilityChanged = function () {
|
38443
|
-
if (this.survey != null && !this.isLoadingFromJson) {
|
38538
|
+
if (this.survey != null && !this.isLoadingFromJson && !!this.page) {
|
38444
38539
|
this.survey.panelVisibilityChanged(this, this.isVisible);
|
38445
38540
|
}
|
38446
38541
|
};
|
@@ -38574,6 +38669,12 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38574
38669
|
return;
|
38575
38670
|
this.survey.cancelPreviewByPage(this);
|
38576
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
|
+
};
|
38577
38678
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
38578
38679
|
get: function () {
|
38579
38680
|
return this.getCssTitle(this.cssClasses.panel);
|
@@ -39025,6 +39126,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39025
39126
|
* @see timeLimit
|
39026
39127
|
*/
|
39027
39128
|
_this.timeSpent = 0;
|
39129
|
+
_this._isReadyForClean = true;
|
39028
39130
|
_this.createLocalizableString("navigationDescription", _this, true);
|
39029
39131
|
_this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
|
39030
39132
|
return _this;
|
@@ -39072,8 +39174,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39072
39174
|
PageModel.prototype.canShowPageNumber = function () {
|
39073
39175
|
return this.survey && this.survey.showPageNumbers;
|
39074
39176
|
};
|
39075
|
-
PageModel.prototype.canShowTitle = function () {
|
39076
|
-
return
|
39177
|
+
PageModel.prototype.canShowTitle = function (survey) {
|
39178
|
+
return !survey || survey.showPageTitles;
|
39077
39179
|
};
|
39078
39180
|
PageModel.prototype.setTitleValue = function (val) {
|
39079
39181
|
_super.prototype.setTitleValue.call(this, val);
|
@@ -39397,6 +39499,28 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39397
39499
|
_super.prototype.ensureRowsVisibility.call(this);
|
39398
39500
|
this.getPanels().forEach(function (panel) { return panel.ensureRowsVisibility(); });
|
39399
39501
|
};
|
39502
|
+
Object.defineProperty(PageModel.prototype, "isReadyForClean", {
|
39503
|
+
get: function () {
|
39504
|
+
return this._isReadyForClean;
|
39505
|
+
},
|
39506
|
+
set: function (val) {
|
39507
|
+
var oldValue = this._isReadyForClean;
|
39508
|
+
this._isReadyForClean = val;
|
39509
|
+
if (this._isReadyForClean !== oldValue) {
|
39510
|
+
this.isReadyForCleanChangedCallback && this.isReadyForCleanChangedCallback();
|
39511
|
+
}
|
39512
|
+
},
|
39513
|
+
enumerable: false,
|
39514
|
+
configurable: true
|
39515
|
+
});
|
39516
|
+
PageModel.prototype.enableOnElementRerenderedEvent = function () {
|
39517
|
+
_super.prototype.enableOnElementRerenderedEvent.call(this);
|
39518
|
+
this.isReadyForClean = false;
|
39519
|
+
};
|
39520
|
+
PageModel.prototype.disableOnElementRerenderedEvent = function () {
|
39521
|
+
_super.prototype.disableOnElementRerenderedEvent.call(this);
|
39522
|
+
this.isReadyForClean = true;
|
39523
|
+
};
|
39400
39524
|
page_decorate([
|
39401
39525
|
jsonobject_property({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
|
39402
39526
|
], PageModel.prototype, "num", void 0);
|
@@ -40258,9 +40382,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40258
40382
|
*/
|
40259
40383
|
_this.onGetResult = _this.addEvent();
|
40260
40384
|
/**
|
40261
|
-
* An event that is raised when
|
40262
|
-
* @see
|
40263
|
-
* @see uploadFiles
|
40385
|
+
* An event that is raised when a respondent opens a dialog window to select files.
|
40386
|
+
* @see chooseFiles
|
40264
40387
|
*/
|
40265
40388
|
_this.onOpenFileChooser = _this.addEvent();
|
40266
40389
|
/**
|
@@ -40593,7 +40716,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40593
40716
|
*/
|
40594
40717
|
_this.onGetPageTitleActions = _this.addEvent();
|
40595
40718
|
/**
|
40596
|
-
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
|
40719
|
+
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel). This panel may belong to a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) or be a standalone survey element.
|
40597
40720
|
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
40598
40721
|
*/
|
40599
40722
|
_this.onGetPanelFooterActions = _this.addEvent();
|
@@ -40659,6 +40782,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40659
40782
|
_this.cssVariables = {};
|
40660
40783
|
_this._isMobile = false;
|
40661
40784
|
_this._isCompact = false;
|
40785
|
+
_this.setValueOnExpressionCounter = 0;
|
40662
40786
|
_this._isDesignMode = false;
|
40663
40787
|
/**
|
40664
40788
|
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
@@ -40700,6 +40824,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40700
40824
|
valueNames: {},
|
40701
40825
|
valueNamesInsensitive: {},
|
40702
40826
|
};
|
40827
|
+
_this.setValueFromTriggerCounter = 0;
|
40703
40828
|
_this.needRenderIcons = true;
|
40704
40829
|
_this.skippedPages = [];
|
40705
40830
|
_this.skeletonComponentName = "sv-skeleton";
|
@@ -40727,9 +40852,20 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40727
40852
|
_this.doTimer(page);
|
40728
40853
|
};
|
40729
40854
|
_this.createNewArray("pages", function (value) {
|
40855
|
+
if (value.isReadyForCleanChangedCallback) {
|
40856
|
+
value.isReadyForCleanChangedCallback();
|
40857
|
+
}
|
40730
40858
|
_this.doOnPageAdded(value);
|
40731
40859
|
}, function (value) {
|
40732
|
-
|
40860
|
+
if (!value.isReadyForClean) {
|
40861
|
+
value.isReadyForCleanChangedCallback = function () {
|
40862
|
+
_this.doOnPageRemoved(value);
|
40863
|
+
value.isReadyForCleanChangedCallback = undefined;
|
40864
|
+
};
|
40865
|
+
}
|
40866
|
+
else {
|
40867
|
+
_this.doOnPageRemoved(value);
|
40868
|
+
}
|
40733
40869
|
});
|
40734
40870
|
_this.createNewArray("triggers", function (value) {
|
40735
40871
|
value.setOwner(_this);
|
@@ -42441,6 +42577,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
42441
42577
|
};
|
42442
42578
|
return exp.run(values, properties) || onCompleteRes;
|
42443
42579
|
};
|
42580
|
+
Object.defineProperty(SurveyModel.prototype, "isSettingValueOnExpression", {
|
42581
|
+
get: function () { return this.setValueOnExpressionCounter > 0; },
|
42582
|
+
enumerable: false,
|
42583
|
+
configurable: true
|
42584
|
+
});
|
42585
|
+
SurveyModel.prototype.startSetValueOnExpression = function () {
|
42586
|
+
this.setValueOnExpressionCounter++;
|
42587
|
+
};
|
42588
|
+
SurveyModel.prototype.finishSetValueOnExpression = function () {
|
42589
|
+
this.setValueOnExpressionCounter--;
|
42590
|
+
};
|
42444
42591
|
/**
|
42445
42592
|
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
|
42446
42593
|
* @param expression An expression to calculate.
|
@@ -43376,16 +43523,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43376
43523
|
for (var key in this.variablesHash)
|
43377
43524
|
values[key] = this.variablesHash[key];
|
43378
43525
|
this.addCalculatedValuesIntoFilteredValues(values);
|
43379
|
-
|
43380
|
-
|
43381
|
-
var
|
43382
|
-
|
43383
|
-
|
43384
|
-
this.getAllQuestions().forEach(function (q) {
|
43385
|
-
if (q.hasFilteredValue) {
|
43386
|
-
values[q.getFilteredName()] = q.getFilteredValue();
|
43526
|
+
if (!this.isDesignMode) {
|
43527
|
+
var keys = this.getValuesKeys();
|
43528
|
+
for (var i = 0; i < keys.length; i++) {
|
43529
|
+
var key = keys[i];
|
43530
|
+
values[key] = this.getDataValueCore(this.valuesHash, key);
|
43387
43531
|
}
|
43388
|
-
|
43532
|
+
this.getAllQuestions().forEach(function (q) {
|
43533
|
+
if (q.hasFilteredValue) {
|
43534
|
+
values[q.getFilteredName()] = q.getFilteredValue();
|
43535
|
+
}
|
43536
|
+
});
|
43537
|
+
}
|
43389
43538
|
return values;
|
43390
43539
|
};
|
43391
43540
|
SurveyModel.prototype.addCalculatedValuesIntoFilteredValues = function (values) {
|
@@ -44810,9 +44959,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44810
44959
|
single.addPanel(panel);
|
44811
44960
|
var json = new jsonobject_JsonObject().toJsonObject(page);
|
44812
44961
|
new jsonobject_JsonObject().toObject(json, panel);
|
44813
|
-
if (!this.showPageTitles) {
|
44814
|
-
panel.title = "";
|
44815
|
-
}
|
44816
44962
|
}
|
44817
44963
|
return single;
|
44818
44964
|
};
|
@@ -45399,6 +45545,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45399
45545
|
this.rootElement = htmlElement;
|
45400
45546
|
this.addScrollEventListener();
|
45401
45547
|
};
|
45548
|
+
SurveyModel.prototype.beforeDestroySurveyElement = function () {
|
45549
|
+
this.destroyResizeObserver();
|
45550
|
+
this.removeScrollEventListener();
|
45551
|
+
this.rootElement = undefined;
|
45552
|
+
};
|
45402
45553
|
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
|
45403
45554
|
var isMobile = width < mobileWidth;
|
45404
45555
|
var isMobileChanged = this.isMobile !== isMobile;
|
@@ -45629,8 +45780,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45629
45780
|
return options.error ? new CustomError(options.error, this) : null;
|
45630
45781
|
};
|
45631
45782
|
SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
|
45632
|
-
if (!this.isLoadingFromJson) {
|
45633
|
-
this.updateVisibleIndexes();
|
45783
|
+
if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question, true)) {
|
45784
|
+
this.updateVisibleIndexes(question.page);
|
45634
45785
|
}
|
45635
45786
|
if (this.onDynamicPanelAdded.isEmpty)
|
45636
45787
|
return;
|
@@ -45646,13 +45797,26 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45646
45797
|
for (var i = 0; i < questions.length; i++) {
|
45647
45798
|
questions[i].clearOnDeletingContainer();
|
45648
45799
|
}
|
45649
|
-
this.
|
45800
|
+
if (this.hasQuestionVisibleIndeces(question, false)) {
|
45801
|
+
this.updateVisibleIndexes(question.page);
|
45802
|
+
}
|
45650
45803
|
this.onDynamicPanelRemoved.fire(this, {
|
45651
45804
|
question: question,
|
45652
45805
|
panelIndex: panelIndex,
|
45653
45806
|
panel: panel,
|
45654
45807
|
});
|
45655
45808
|
};
|
45809
|
+
SurveyModel.prototype.hasQuestionVisibleIndeces = function (question, checkIndex) {
|
45810
|
+
if (checkIndex) {
|
45811
|
+
question.setVisibleIndex(this.getStartVisibleIndex());
|
45812
|
+
}
|
45813
|
+
var qList = question.getNestedQuestions(true);
|
45814
|
+
for (var i = 0; i < qList.length; i++) {
|
45815
|
+
if (qList[i].visibleIndex > -1)
|
45816
|
+
return true;
|
45817
|
+
}
|
45818
|
+
return false;
|
45819
|
+
};
|
45656
45820
|
SurveyModel.prototype.dynamicPanelRemoving = function (question, panelIndex, panel) {
|
45657
45821
|
var options = {
|
45658
45822
|
question: question,
|
@@ -45765,7 +45929,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45765
45929
|
}, elementsToRenderBefore);
|
45766
45930
|
}
|
45767
45931
|
else {
|
45768
|
-
|
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
|
+
}
|
45769
45939
|
}
|
45770
45940
|
}
|
45771
45941
|
};
|
@@ -46194,6 +46364,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46194
46364
|
page.name = name;
|
46195
46365
|
return page;
|
46196
46366
|
};
|
46367
|
+
SurveyModel.prototype.getValueChangeReason = function () {
|
46368
|
+
if (this.isSettingValueOnExpression)
|
46369
|
+
return "expression";
|
46370
|
+
return this.isSettingValueFromTrigger ? "trigger" : undefined;
|
46371
|
+
};
|
46197
46372
|
SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue, questionValueName) {
|
46198
46373
|
if (!!this.editingObj) {
|
46199
46374
|
var prop = Serializer.findProperty(this.editingObj.getType(), valueName);
|
@@ -46207,6 +46382,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46207
46382
|
question: this.getQuestionByValueName(questionValueName || valueName),
|
46208
46383
|
value: this.getUnbindValue(newValue),
|
46209
46384
|
oldValue: this.getValue(valueName),
|
46385
|
+
reason: this.getValueChangeReason()
|
46210
46386
|
};
|
46211
46387
|
this.onValueChanging.fire(this, options);
|
46212
46388
|
return options.value;
|
@@ -46261,6 +46437,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46261
46437
|
}
|
46262
46438
|
return res;
|
46263
46439
|
};
|
46440
|
+
SurveyModel.prototype.fireOnValueChanged = function (name, value, question) {
|
46441
|
+
this.onValueChanged.fire(this, {
|
46442
|
+
name: name,
|
46443
|
+
question: question,
|
46444
|
+
value: value,
|
46445
|
+
reason: this.getValueChangeReason()
|
46446
|
+
});
|
46447
|
+
};
|
46264
46448
|
SurveyModel.prototype.notifyQuestionOnValueChanged = function (valueName, newValue, questionName) {
|
46265
46449
|
if (this.isLoadingFromJson)
|
46266
46450
|
return;
|
@@ -46270,19 +46454,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46270
46454
|
var question = questions[i];
|
46271
46455
|
this.checkQuestionErrorOnValueChanged(question);
|
46272
46456
|
question.onSurveyValueChanged(newValue);
|
46273
|
-
this.
|
46274
|
-
name: valueName,
|
46275
|
-
question: question,
|
46276
|
-
value: newValue,
|
46277
|
-
});
|
46457
|
+
this.fireOnValueChanged(valueName, newValue, question);
|
46278
46458
|
}
|
46279
46459
|
}
|
46280
46460
|
else {
|
46281
|
-
this.
|
46282
|
-
name: valueName,
|
46283
|
-
question: null,
|
46284
|
-
value: newValue,
|
46285
|
-
});
|
46461
|
+
this.fireOnValueChanged(valueName, newValue, null);
|
46286
46462
|
}
|
46287
46463
|
if (this.isDisposed)
|
46288
46464
|
return;
|
@@ -46607,7 +46783,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46607
46783
|
}
|
46608
46784
|
this.updateVisibleIndexes();
|
46609
46785
|
};
|
46610
|
-
SurveyModel.prototype.updateVisibleIndexes = function () {
|
46786
|
+
SurveyModel.prototype.updateVisibleIndexes = function (page) {
|
46611
46787
|
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson || this.isLockingUpdateOnPageModes)
|
46612
46788
|
return;
|
46613
46789
|
if (this.isRunningConditions &&
|
@@ -46621,22 +46797,28 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46621
46797
|
this.updateVisibleIndexAfterBindings = true;
|
46622
46798
|
return;
|
46623
46799
|
}
|
46624
|
-
this.updatePageVisibleIndexes(
|
46800
|
+
this.updatePageVisibleIndexes();
|
46801
|
+
this.updatePageElementsVisibleIndexes(page);
|
46802
|
+
this.updateProgressText(true);
|
46803
|
+
};
|
46804
|
+
SurveyModel.prototype.updatePageElementsVisibleIndexes = function (page) {
|
46625
46805
|
if (this.showQuestionNumbers == "onPage") {
|
46626
|
-
var visPages = this.visiblePages;
|
46806
|
+
var visPages = !!page ? [page] : this.visiblePages;
|
46627
46807
|
for (var i = 0; i < visPages.length; i++) {
|
46628
46808
|
visPages[i].setVisibleIndex(0);
|
46629
46809
|
}
|
46630
46810
|
}
|
46631
46811
|
else {
|
46632
|
-
var index = this.
|
46633
|
-
for (var
|
46634
|
-
index += this.pages[
|
46812
|
+
var index = this.getStartVisibleIndex();
|
46813
|
+
for (var i_3 = 0; i_3 < this.pages.length; i_3++) {
|
46814
|
+
index += this.pages[i_3].setVisibleIndex(index);
|
46635
46815
|
}
|
46636
46816
|
}
|
46637
|
-
this.updateProgressText(true);
|
46638
46817
|
};
|
46639
|
-
SurveyModel.prototype.
|
46818
|
+
SurveyModel.prototype.getStartVisibleIndex = function () {
|
46819
|
+
return this.showQuestionNumbers == "on" ? 0 : -1;
|
46820
|
+
};
|
46821
|
+
SurveyModel.prototype.updatePageVisibleIndexes = function () {
|
46640
46822
|
this.updateButtonsVisibility();
|
46641
46823
|
var index = 0;
|
46642
46824
|
for (var i = 0; i < this.pages.length; i++) {
|
@@ -47042,8 +47224,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47042
47224
|
return;
|
47043
47225
|
questionName = questionName || name;
|
47044
47226
|
this.checkTriggersAndRunConditions(name, newValue, oldValue);
|
47045
|
-
if (allowNotifyValueChanged)
|
47227
|
+
if (allowNotifyValueChanged) {
|
47046
47228
|
this.notifyQuestionOnValueChanged(name, newValue, questionName);
|
47229
|
+
}
|
47047
47230
|
if (locNotification !== "text") {
|
47048
47231
|
this.tryGoNextPageAutomatic(name);
|
47049
47232
|
}
|
@@ -47181,11 +47364,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47181
47364
|
}
|
47182
47365
|
var question = this.getQuestionByValueName(name);
|
47183
47366
|
if (question) {
|
47184
|
-
this.
|
47185
|
-
name: commentName,
|
47186
|
-
question: question,
|
47187
|
-
value: newValue,
|
47188
|
-
});
|
47367
|
+
this.fireOnValueChanged(commentName, newValue, question);
|
47189
47368
|
question.comment = newValue;
|
47190
47369
|
if (question.comment != newValue) {
|
47191
47370
|
question.comment = newValue;
|
@@ -47226,7 +47405,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47226
47405
|
};
|
47227
47406
|
SurveyModel.prototype.questionVisibilityChanged = function (question, newValue, resetIndexes) {
|
47228
47407
|
if (resetIndexes) {
|
47229
|
-
this.updateVisibleIndexes();
|
47408
|
+
this.updateVisibleIndexes(question.page);
|
47230
47409
|
}
|
47231
47410
|
this.onQuestionVisibleChanged.fire(this, {
|
47232
47411
|
question: question,
|
@@ -47247,7 +47426,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47247
47426
|
});
|
47248
47427
|
};
|
47249
47428
|
SurveyModel.prototype.panelVisibilityChanged = function (panel, newValue) {
|
47250
|
-
this.updateVisibleIndexes();
|
47429
|
+
this.updateVisibleIndexes(panel.page);
|
47251
47430
|
this.onPanelVisibleChanged.fire(this, {
|
47252
47431
|
panel: panel,
|
47253
47432
|
visible: newValue,
|
@@ -47267,7 +47446,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47267
47446
|
if (!this.currentPage) {
|
47268
47447
|
this.updateCurrentPage();
|
47269
47448
|
}
|
47270
|
-
this.updateVisibleIndexes();
|
47449
|
+
this.updateVisibleIndexes(question.page);
|
47271
47450
|
this.setCalculatedWidthModeUpdater();
|
47272
47451
|
}
|
47273
47452
|
if (this.canFireAddElement()) {
|
@@ -47287,7 +47466,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47287
47466
|
};
|
47288
47467
|
SurveyModel.prototype.questionRemoved = function (question) {
|
47289
47468
|
this.questionHashesRemoved(question, question.name, question.getValueName());
|
47290
|
-
this.updateVisibleIndexes();
|
47469
|
+
this.updateVisibleIndexes(question.page);
|
47291
47470
|
this.onQuestionRemoved.fire(this, {
|
47292
47471
|
question: question,
|
47293
47472
|
name: question.name,
|
@@ -47357,7 +47536,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47357
47536
|
panel.name = this.generateNewName(this.getAllPanels(false, true), "panel");
|
47358
47537
|
}
|
47359
47538
|
this.questionHashesPanelAdded(panel);
|
47360
|
-
this.updateVisibleIndexes();
|
47539
|
+
this.updateVisibleIndexes(panel.page);
|
47361
47540
|
if (this.canFireAddElement()) {
|
47362
47541
|
this.onPanelAdded.fire(this, {
|
47363
47542
|
panel: panel,
|
@@ -47371,7 +47550,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47371
47550
|
}
|
47372
47551
|
};
|
47373
47552
|
SurveyModel.prototype.panelRemoved = function (panel) {
|
47374
|
-
this.updateVisibleIndexes();
|
47553
|
+
this.updateVisibleIndexes(panel.page);
|
47375
47554
|
this.onPanelRemoved.fire(this, { panel: panel, name: panel.name });
|
47376
47555
|
this.updateLazyRenderingRowsOnRemovingElements();
|
47377
47556
|
};
|
@@ -47998,6 +48177,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47998
48177
|
}
|
47999
48178
|
else {
|
48000
48179
|
var question = this.getQuestionByName(name);
|
48180
|
+
this.startSetValueFromTrigger();
|
48001
48181
|
if (!!question) {
|
48002
48182
|
question.value = value;
|
48003
48183
|
}
|
@@ -48015,6 +48195,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
48015
48195
|
this.setValue(firstName, data[firstName]);
|
48016
48196
|
}
|
48017
48197
|
}
|
48198
|
+
this.finishSetValueFromTrigger();
|
48018
48199
|
}
|
48019
48200
|
};
|
48020
48201
|
SurveyModel.prototype.copyTriggerValue = function (name, fromName, copyDisplayValue) {
|
@@ -48033,6 +48214,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
48033
48214
|
SurveyModel.prototype.triggerExecuted = function (trigger) {
|
48034
48215
|
this.onTriggerExecuted.fire(this, { trigger: trigger });
|
48035
48216
|
};
|
48217
|
+
Object.defineProperty(SurveyModel.prototype, "isSettingValueFromTrigger", {
|
48218
|
+
get: function () { return this.setValueFromTriggerCounter > 0; },
|
48219
|
+
enumerable: false,
|
48220
|
+
configurable: true
|
48221
|
+
});
|
48222
|
+
SurveyModel.prototype.startSetValueFromTrigger = function () {
|
48223
|
+
this.setValueFromTriggerCounter++;
|
48224
|
+
};
|
48225
|
+
SurveyModel.prototype.finishSetValueFromTrigger = function () {
|
48226
|
+
this.setValueFromTriggerCounter--;
|
48227
|
+
};
|
48036
48228
|
SurveyModel.prototype.startMovingQuestion = function () {
|
48037
48229
|
this.isMovingQuestion = true;
|
48038
48230
|
};
|
@@ -51215,7 +51407,7 @@ Serializer.addClass("selectbase", [
|
|
51215
51407
|
{
|
51216
51408
|
name: "choices:itemvalue[]", uniqueProperty: "value",
|
51217
51409
|
baseValue: function () {
|
51218
|
-
return
|
51410
|
+
return getLocaleString("choices_Item");
|
51219
51411
|
},
|
51220
51412
|
dependsOn: "choicesFromQuestion",
|
51221
51413
|
visibleIf: function (obj) {
|
@@ -51415,15 +51607,16 @@ var PopupUtils = /** @class */ (function () {
|
|
51415
51607
|
}
|
51416
51608
|
return { left: Math.round(currentLeft), top: Math.round(currentTop) };
|
51417
51609
|
};
|
51418
|
-
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink) {
|
51610
|
+
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink, margins) {
|
51419
51611
|
if (canShrink === void 0) { canShrink = true; }
|
51612
|
+
if (margins === void 0) { margins = { top: 0, bottom: 0 }; }
|
51420
51613
|
var result;
|
51421
51614
|
var maxHeight = windowHeight - PopupUtils.bottomIndent;
|
51422
51615
|
if (verticalPosition === "top") {
|
51423
51616
|
result = { height: height, top: top };
|
51424
51617
|
}
|
51425
|
-
if (top <
|
51426
|
-
result = { height: canShrink ? height + top : height, top:
|
51618
|
+
if (top < -margins.top) {
|
51619
|
+
result = { height: canShrink ? height + top : height, top: -margins.top };
|
51427
51620
|
}
|
51428
51621
|
else if (height + top > windowHeight) {
|
51429
51622
|
var newHeight = Math.min(height, maxHeight - top);
|
@@ -51431,7 +51624,7 @@ var PopupUtils = /** @class */ (function () {
|
|
51431
51624
|
}
|
51432
51625
|
if (result) {
|
51433
51626
|
result.height = Math.min(result.height, maxHeight);
|
51434
|
-
result.top = Math.max(result.top,
|
51627
|
+
result.top = Math.max(result.top, -margins.top);
|
51435
51628
|
}
|
51436
51629
|
return result;
|
51437
51630
|
};
|
@@ -51915,7 +52108,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
51915
52108
|
getElement(settings.environment.popupMountContainer).appendChild(container);
|
51916
52109
|
}
|
51917
52110
|
};
|
51918
|
-
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot
|
52111
|
+
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot) {
|
51919
52112
|
if (!!componentRoot) {
|
51920
52113
|
this.containerElement = componentRoot;
|
51921
52114
|
}
|
@@ -52002,10 +52195,8 @@ function calculateIsTablet(windowWidth, windowHeight) {
|
|
52002
52195
|
}
|
52003
52196
|
var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (_super) {
|
52004
52197
|
popup_dropdown_view_model_extends(PopupDropdownViewModel, _super);
|
52005
|
-
function PopupDropdownViewModel(model
|
52198
|
+
function PopupDropdownViewModel(model) {
|
52006
52199
|
var _this = _super.call(this, model) || this;
|
52007
|
-
_this.targetElement = targetElement;
|
52008
|
-
_this.areaElement = areaElement;
|
52009
52200
|
_this.scrollEventCallBack = function (event) {
|
52010
52201
|
if (_this.isOverlay && IsTouch) {
|
52011
52202
|
event.stopPropagation();
|
@@ -52043,22 +52234,30 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52043
52234
|
this.isTablet = calculateIsTablet(windowWidth, windowHeight);
|
52044
52235
|
};
|
52045
52236
|
PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
|
52046
|
-
|
52047
|
-
|
52237
|
+
var areaElement = this.model.getAreaCallback ? this.model.getAreaCallback(this.container) : undefined;
|
52238
|
+
if (areaElement) {
|
52239
|
+
var areaRect = areaElement.getBoundingClientRect();
|
52048
52240
|
return new Rect(areaRect.x, areaRect.y, areaRect.width, areaRect.height);
|
52049
52241
|
}
|
52050
52242
|
return new Rect(0, 0, DomWindowHelper.getInnerWidth(), DomWindowHelper.getInnerHeight());
|
52051
52243
|
};
|
52052
52244
|
PopupDropdownViewModel.prototype.getTargetElementRect = function () {
|
52053
|
-
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();
|
52054
52253
|
var areaRect = this.getAvailableAreaRect();
|
52055
52254
|
return new Rect(rect.left - areaRect.left, rect.top - areaRect.top, rect.width, rect.height);
|
52056
52255
|
};
|
52057
52256
|
PopupDropdownViewModel.prototype._updatePosition = function () {
|
52058
52257
|
var _a, _b, _c;
|
52059
|
-
if (!this.targetElement)
|
52060
|
-
return;
|
52061
52258
|
var targetElementRect = this.getTargetElementRect();
|
52259
|
+
if (!targetElementRect)
|
52260
|
+
return;
|
52062
52261
|
var area = this.getAvailableAreaRect();
|
52063
52262
|
var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
|
52064
52263
|
if (!popupContainer)
|
@@ -52068,6 +52267,8 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52068
52267
|
var popupComputedStyle = DomDocumentHelper.getComputedStyle(popupContainer);
|
52069
52268
|
var marginLeft = (parseFloat(popupComputedStyle.marginLeft) || 0);
|
52070
52269
|
var marginRight = (parseFloat(popupComputedStyle.marginRight) || 0);
|
52270
|
+
var marginTop = (parseFloat(popupComputedStyle.marginTop) || 0);
|
52271
|
+
var marginBottom = (parseFloat(popupComputedStyle.marginBottom) || 0);
|
52071
52272
|
var height = popupContainer.offsetHeight - scrollContent.offsetHeight + scrollContent.scrollHeight;
|
52072
52273
|
var width = popupContainer.getBoundingClientRect().width;
|
52073
52274
|
this.model.setWidthByTarget && (this.minWidth = targetElementRect.width + "px");
|
@@ -52082,7 +52283,7 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52082
52283
|
this.popupDirection = PopupUtils.calculatePopupDirection(verticalPosition, actualHorizontalPosition);
|
52083
52284
|
var pos = PopupUtils.calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.model.positionMode);
|
52084
52285
|
if (DomWindowHelper.isAvailable()) {
|
52085
|
-
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 });
|
52086
52287
|
if (!!newVerticalDimensions) {
|
52087
52288
|
this.height = newVerticalDimensions.height + "px";
|
52088
52289
|
pos.top = newVerticalDimensions.top;
|
@@ -52144,16 +52345,11 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
52144
52345
|
PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
|
52145
52346
|
return "popup-pointer";
|
52146
52347
|
};
|
52147
|
-
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot
|
52348
|
+
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot) {
|
52148
52349
|
_super.prototype.setComponentElement.call(this, componentRoot);
|
52149
|
-
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal) {
|
52150
|
-
this.targetElement = targetElement || componentRoot.parentElement;
|
52151
|
-
this.areaElement = areaElement;
|
52152
|
-
}
|
52153
52350
|
};
|
52154
52351
|
PopupDropdownViewModel.prototype.resetComponentElement = function () {
|
52155
52352
|
_super.prototype.resetComponentElement.call(this);
|
52156
|
-
this.targetElement = undefined;
|
52157
52353
|
};
|
52158
52354
|
PopupDropdownViewModel.prototype.updateOnShowing = function () {
|
52159
52355
|
var root = settings.environment.root;
|
@@ -52437,8 +52633,12 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52437
52633
|
if (option.isVisible) {
|
52438
52634
|
_this.updatePopupFocusFirstInputSelector();
|
52439
52635
|
var dropdownMenuOptions = _this.getDropdownMenuOptions();
|
52636
|
+
var prevMenuType = dropdownMenuOptions.menuType;
|
52440
52637
|
_this.question.processOpenDropdownMenu(dropdownMenuOptions);
|
52441
|
-
|
52638
|
+
if (prevMenuType !== dropdownMenuOptions.menuType) {
|
52639
|
+
_this._popupModel.updateDisplayMode(dropdownMenuOptions.menuType);
|
52640
|
+
_this.listModel.setSearchEnabled(_this.searchEnabled && dropdownMenuOptions.menuType !== "dropdown");
|
52641
|
+
}
|
52442
52642
|
if (!!_this.question.onOpenedCallBack) {
|
52443
52643
|
_this.question.onOpenedCallBack();
|
52444
52644
|
}
|
@@ -52742,8 +52942,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52742
52942
|
configurable: true
|
52743
52943
|
});
|
52744
52944
|
DropdownListModel.prototype.setSearchEnabled = function (newValue) {
|
52745
|
-
this.listModel.
|
52746
|
-
this.listModel.showSearchClearButton = IsTouch;
|
52945
|
+
this.listModel.setSearchEnabled(IsTouch && newValue);
|
52747
52946
|
this.searchEnabled = newValue;
|
52748
52947
|
};
|
52749
52948
|
DropdownListModel.prototype.setChoicesLazyLoadEnabled = function (newValue) {
|
@@ -52933,6 +53132,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52933
53132
|
if (!!this.popupModel) {
|
52934
53133
|
this.popupModel.dispose();
|
52935
53134
|
}
|
53135
|
+
this.htmlCleanerElement = undefined;
|
52936
53136
|
};
|
52937
53137
|
DropdownListModel.prototype.scrollToFocusedItem = function () {
|
52938
53138
|
this.listModel.scrollToFocusedItem();
|
@@ -54359,13 +54559,13 @@ Serializer.addClass("matrix", [
|
|
54359
54559
|
{
|
54360
54560
|
name: "columns:itemvalue[]", uniqueProperty: "value",
|
54361
54561
|
baseValue: function () {
|
54362
|
-
return
|
54562
|
+
return getLocaleString("matrix_column");
|
54363
54563
|
},
|
54364
54564
|
},
|
54365
54565
|
{
|
54366
54566
|
name: "rows:itemvalue[]", uniqueProperty: "value",
|
54367
54567
|
baseValue: function () {
|
54368
|
-
return
|
54568
|
+
return getLocaleString("matrix_row");
|
54369
54569
|
},
|
54370
54570
|
},
|
54371
54571
|
{ name: "cells:cells", serializationProperty: "cells" },
|
@@ -54665,6 +54865,7 @@ var InputElementAdapter = /** @class */ (function () {
|
|
54665
54865
|
};
|
54666
54866
|
InputElementAdapter.prototype.dispose = function () {
|
54667
54867
|
this.removeInputEventListener();
|
54868
|
+
this.inputElement = undefined;
|
54668
54869
|
this.inputMaskInstance.onPropertyChanged.remove(this.inputMaskInstancePropertyChangedHandler);
|
54669
54870
|
};
|
54670
54871
|
return InputElementAdapter;
|
@@ -55117,6 +55318,8 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
55117
55318
|
});
|
55118
55319
|
Object.defineProperty(QuestionTextModel.prototype, "inputValue", {
|
55119
55320
|
get: function () {
|
55321
|
+
if (!this._inputValue && !this.maskTypeIsEmpty)
|
55322
|
+
return this.maskInstance.getMaskedValue("");
|
55120
55323
|
return this._inputValue;
|
55121
55324
|
},
|
55122
55325
|
set: function (val) {
|
@@ -55415,6 +55618,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
55415
55618
|
};
|
55416
55619
|
QuestionTextModel.prototype.beforeDestroyQuestionElement = function (el) {
|
55417
55620
|
this.deleteMaskAdapter();
|
55621
|
+
this.input = undefined;
|
55418
55622
|
};
|
55419
55623
|
question_text_decorate([
|
55420
55624
|
jsonobject_property({
|
@@ -60243,6 +60447,8 @@ questionfactory_QuestionFactory.Instance.registerQuestion("comment", function (n
|
|
60243
60447
|
|
60244
60448
|
// CONCATENATED MODULE: ./packages/survey-core/src/utils/camera.ts
|
60245
60449
|
|
60450
|
+
var envStr = "environment";
|
60451
|
+
var userStr = "user";
|
60246
60452
|
var camera_Camera = /** @class */ (function () {
|
60247
60453
|
function Camera() {
|
60248
60454
|
this.canFlipValue = undefined;
|
@@ -60254,10 +60460,14 @@ var camera_Camera = /** @class */ (function () {
|
|
60254
60460
|
Camera.setCameraList = function (list) {
|
60255
60461
|
var getDeviceType = function (device) {
|
60256
60462
|
var lbl = device.label.toLocaleLowerCase();
|
60257
|
-
if (lbl.indexOf(
|
60258
|
-
return
|
60259
|
-
if (lbl.indexOf(
|
60260
|
-
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;
|
60261
60471
|
return "";
|
60262
60472
|
};
|
60263
60473
|
Camera.clear();
|
@@ -60270,13 +60480,13 @@ var camera_Camera = /** @class */ (function () {
|
|
60270
60480
|
var lblA = getDeviceType(a);
|
60271
60481
|
var lblB = getDeviceType(b);
|
60272
60482
|
if (lblA !== lblB) {
|
60273
|
-
if (lblA ===
|
60483
|
+
if (lblA === userStr)
|
60274
60484
|
return -1;
|
60275
|
-
if (lblB ===
|
60485
|
+
if (lblB === userStr)
|
60276
60486
|
return 1;
|
60277
|
-
if (lblA ===
|
60487
|
+
if (lblA === envStr)
|
60278
60488
|
return -1;
|
60279
|
-
if (lblB ===
|
60489
|
+
if (lblB === envStr)
|
60280
60490
|
return 1;
|
60281
60491
|
}
|
60282
60492
|
}
|
@@ -60414,7 +60624,7 @@ var camera_Camera = /** @class */ (function () {
|
|
60414
60624
|
if (!this.canFlip())
|
60415
60625
|
return;
|
60416
60626
|
if (Camera.canSwitchFacingMode) {
|
60417
|
-
Camera.cameraFacingMode = Camera.cameraFacingMode ===
|
60627
|
+
Camera.cameraFacingMode = Camera.cameraFacingMode === userStr ? "environment" : userStr;
|
60418
60628
|
}
|
60419
60629
|
else if (Camera.cameraIndex >= Camera.cameraList.length - 1) {
|
60420
60630
|
Camera.cameraIndex = 0;
|
@@ -60436,7 +60646,7 @@ var camera_Camera = /** @class */ (function () {
|
|
60436
60646
|
Camera.setCameraList(list.length > 0 ? list : null);
|
60437
60647
|
};
|
60438
60648
|
Camera.cameraIndex = -1;
|
60439
|
-
Camera.cameraFacingMode =
|
60649
|
+
Camera.cameraFacingMode = userStr;
|
60440
60650
|
Camera.canSwitchFacingMode = false;
|
60441
60651
|
return Camera;
|
60442
60652
|
}());
|
@@ -62368,7 +62578,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
62368
62578
|
}
|
62369
62579
|
else {
|
62370
62580
|
for (var i = _this.rateValues.length; i < _this.rateCount; i++) {
|
62371
|
-
_this.rateValues.push(new itemvalue_ItemValue(
|
62581
|
+
_this.rateValues.push(new itemvalue_ItemValue(getLocaleString("choices_Item") + (i + 1)));
|
62372
62582
|
}
|
62373
62583
|
}
|
62374
62584
|
}
|
@@ -63240,7 +63450,7 @@ Serializer.addClass("rating", [
|
|
63240
63450
|
{
|
63241
63451
|
name: "rateValues:itemvalue[]",
|
63242
63452
|
baseValue: function () {
|
63243
|
-
return
|
63453
|
+
return getLocaleString("choices_Item");
|
63244
63454
|
},
|
63245
63455
|
category: "rateValues",
|
63246
63456
|
visibleIf: function (obj) {
|
@@ -65291,6 +65501,8 @@ var question_signaturepad_decorate = (undefined && undefined.__decorate) || func
|
|
65291
65501
|
|
65292
65502
|
|
65293
65503
|
|
65504
|
+
|
65505
|
+
|
65294
65506
|
var defaultWidth = 300;
|
65295
65507
|
var defaultHeight = 200;
|
65296
65508
|
/**
|
@@ -65347,7 +65559,8 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
65347
65559
|
};
|
65348
65560
|
QuestionSignaturePadModel.prototype.afterRenderQuestionElement = function (el) {
|
65349
65561
|
if (!!el) {
|
65350
|
-
this.
|
65562
|
+
if (!this.isDesignMode)
|
65563
|
+
this.initSignaturePad(el);
|
65351
65564
|
this.element = el;
|
65352
65565
|
}
|
65353
65566
|
_super.prototype.afterRenderQuestionElement.call(this, el);
|
@@ -65386,16 +65599,30 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
65386
65599
|
QuestionSignaturePadModel.prototype.fromUrl = function (url) {
|
65387
65600
|
var _this = this;
|
65388
65601
|
this.isFileLoading = true;
|
65389
|
-
|
65390
|
-
|
65391
|
-
|
65392
|
-
|
65393
|
-
|
65394
|
-
|
65395
|
-
|
65396
|
-
|
65397
|
-
|
65398
|
-
|
65602
|
+
if (isBase64URL(url)) {
|
65603
|
+
this.fromDataUrl(url);
|
65604
|
+
this.isFileLoading = false;
|
65605
|
+
}
|
65606
|
+
else {
|
65607
|
+
var img_1 = new Image();
|
65608
|
+
img_1.crossOrigin = "anonymous";
|
65609
|
+
img_1.src = url;
|
65610
|
+
img_1.onload = function () {
|
65611
|
+
if (!!_this.canvas) {
|
65612
|
+
var canvas = DomDocumentHelper.createElement("canvas");
|
65613
|
+
canvas.width = _this.containerWidth;
|
65614
|
+
canvas.height = _this.containerHeight;
|
65615
|
+
var ctx = canvas.getContext("2d");
|
65616
|
+
ctx.drawImage(img_1, 0, 0);
|
65617
|
+
var dataURL = canvas.toDataURL(_this.getFormat());
|
65618
|
+
_this.fromDataUrl(dataURL);
|
65619
|
+
}
|
65620
|
+
_this.isFileLoading = false;
|
65621
|
+
};
|
65622
|
+
img_1.onerror = function () {
|
65623
|
+
_this.isFileLoading = false;
|
65624
|
+
};
|
65625
|
+
}
|
65399
65626
|
};
|
65400
65627
|
QuestionSignaturePadModel.prototype.fromDataUrl = function (data) {
|
65401
65628
|
this._loadedData = data;
|
@@ -65436,11 +65663,11 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
65436
65663
|
this._previewLoader = new FileLoader(this, function (status, loaded) {
|
65437
65664
|
if (status === "success" && loaded && loaded.length > 0 && loaded[0].content) {
|
65438
65665
|
_this.fromDataUrl(loaded[0].content);
|
65666
|
+
_this.isFileLoading = false;
|
65439
65667
|
}
|
65440
65668
|
else if (status === "skipped") {
|
65441
65669
|
_this.fromUrl(newValue);
|
65442
65670
|
}
|
65443
|
-
_this.isFileLoading = false;
|
65444
65671
|
_this._previewLoader.dispose();
|
65445
65672
|
_this._previewLoader = undefined;
|
65446
65673
|
});
|
@@ -70182,12 +70409,12 @@ function createPopupModalViewModel(options, rootElement) {
|
|
70182
70409
|
popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
|
70183
70410
|
return popupViewModel;
|
70184
70411
|
}
|
70185
|
-
function createPopupViewModel(model
|
70412
|
+
function createPopupViewModel(model) {
|
70186
70413
|
if (model.isModal) {
|
70187
70414
|
return new PopupModalViewModel(model);
|
70188
70415
|
}
|
70189
70416
|
else {
|
70190
|
-
return new popup_dropdown_view_model_PopupDropdownViewModel(model
|
70417
|
+
return new popup_dropdown_view_model_PopupDropdownViewModel(model);
|
70191
70418
|
}
|
70192
70419
|
}
|
70193
70420
|
|
@@ -71067,20 +71294,6 @@ function trimDatePart(lexem, data) {
|
|
71067
71294
|
}
|
71068
71295
|
return result;
|
71069
71296
|
}
|
71070
|
-
function getDefaultYearForValidation(minYear, maxYear) {
|
71071
|
-
var defaultVal = 2000;
|
71072
|
-
if (defaultVal > maxYear) {
|
71073
|
-
defaultVal = parseInt(maxYear.toString().slice(0, maxYear.toString().length - 2)) * 100;
|
71074
|
-
}
|
71075
|
-
if (defaultVal < minYear) {
|
71076
|
-
var middle = (maxYear - minYear) / 2 + minYear;
|
71077
|
-
defaultVal = parseInt(middle.toString().slice(0, middle.toString().length - 1)) * 10;
|
71078
|
-
}
|
71079
|
-
if (defaultVal >= minYear && defaultVal <= maxYear) {
|
71080
|
-
return defaultVal;
|
71081
|
-
}
|
71082
|
-
return minYear;
|
71083
|
-
}
|
71084
71297
|
function getDateTimeLexems(pattern) {
|
71085
71298
|
var result = [];
|
71086
71299
|
var prevLexemType;
|
@@ -71325,9 +71538,18 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
71325
71538
|
return dateTime.year >= parseInt(minYearPart) && dateTime.year <= parseInt(maxYearPart);
|
71326
71539
|
};
|
71327
71540
|
InputMaskDateTime.prototype.createIDateTimeCompositionWithDefaults = function (dateTime, isUpperLimit) {
|
71328
|
-
var
|
71329
|
-
var
|
71330
|
-
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;
|
71331
71553
|
var month = dateTime.month !== undefined ? dateTime.month : (isUpperLimit && this.hasDatePart ? 12 : 1);
|
71332
71554
|
var day = dateTime.day !== undefined ? dateTime.day : (isUpperLimit && this.hasDatePart ? this.getMaxDateForMonth(year, month) : 1);
|
71333
71555
|
var hour = dateTime.hour !== undefined ? dateTime.hour : (isUpperLimit ? 23 : 0);
|
@@ -71341,18 +71563,12 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
71341
71563
|
return [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];
|
71342
71564
|
};
|
71343
71565
|
InputMaskDateTime.prototype.isDateValid = function (dateTime) {
|
71344
|
-
var min = dateTime.min;
|
71345
|
-
var max = dateTime.max;
|
71346
|
-
var year = dateTime.year !== undefined ? dateTime.year : getDefaultYearForValidation(min.getFullYear(), max.getFullYear());
|
71347
|
-
var month = dateTime.month !== undefined ? dateTime.month : 1;
|
71348
|
-
var day = dateTime.day !== undefined ? dateTime.day : 1;
|
71349
|
-
var monthIndex = month - 1;
|
71350
71566
|
var date = new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(dateTime, false)));
|
71351
71567
|
var dateH = new Date(this.getISO_8601Format(this.createIDateTimeCompositionWithDefaults(dateTime, true)));
|
71352
71568
|
return !isNaN(date) &&
|
71353
|
-
date.getDate() === day &&
|
71354
|
-
date.getMonth() ===
|
71355
|
-
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) &&
|
71356
71572
|
dateH >= dateTime.min && date <= dateTime.max;
|
71357
71573
|
};
|
71358
71574
|
InputMaskDateTime.prototype.getPlaceholder = function (lexemLength, str, char) {
|
@@ -71408,7 +71624,7 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
71408
71624
|
return;
|
71409
71625
|
var propertyName = newItem.lexem.type;
|
71410
71626
|
var tempDateTime = mask_datetime_assign({}, dateTime);
|
71411
|
-
tempDateTime[propertyName] = parseInt(
|
71627
|
+
tempDateTime[propertyName] = parseInt(this.parseTwoDigitYear(newItem));
|
71412
71628
|
if (data.length === newItem.lexem.maxCount) {
|
71413
71629
|
if (this.isDateValid12(tempDateTime)) {
|
71414
71630
|
newItem.isCompleted = true;
|
@@ -71843,8 +72059,8 @@ Serializer.addClass("currencymask", [
|
|
71843
72059
|
|
71844
72060
|
var Version;
|
71845
72061
|
var ReleaseDate;
|
71846
|
-
Version = "" + "1.12.
|
71847
|
-
ReleaseDate = "" + "2024-11-
|
72062
|
+
Version = "" + "1.12.11";
|
72063
|
+
ReleaseDate = "" + "2024-11-20";
|
71848
72064
|
function checkLibraryVersion(ver, libraryName) {
|
71849
72065
|
if (Version != ver) {
|
71850
72066
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -82759,11 +82975,11 @@ var popup_Popup = /** @class */ (function (_super) {
|
|
82759
82975
|
return this.model;
|
82760
82976
|
};
|
82761
82977
|
Popup.prototype.createModel = function () {
|
82762
|
-
this.popup = createPopupViewModel(this.props.model
|
82978
|
+
this.popup = createPopupViewModel(this.props.model);
|
82763
82979
|
};
|
82764
82980
|
Popup.prototype.setTargetElement = function () {
|
82765
82981
|
var container = this.containerRef.current;
|
82766
|
-
this.popup.setComponentElement(container
|
82982
|
+
this.popup.setComponentElement(container);
|
82767
82983
|
};
|
82768
82984
|
Popup.prototype.componentDidMount = function () {
|
82769
82985
|
_super.prototype.componentDidMount.call(this);
|
@@ -82937,7 +83153,7 @@ var action_bar_item_dropdown_SurveyActionBarItemDropdown = /** @class */ (functi
|
|
82937
83153
|
var button = _super.prototype.renderInnerButton.call(this);
|
82938
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,
|
82939
83155
|
button,
|
82940
|
-
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 })));
|
82941
83157
|
};
|
82942
83158
|
SurveyActionBarItemDropdown.prototype.componentDidMount = function () {
|
82943
83159
|
this.viewModel = new ActionDropdownViewModel(this.item);
|
@@ -83007,17 +83223,14 @@ var action_bar_SurveyActionBar = /** @class */ (function (_super) {
|
|
83007
83223
|
};
|
83008
83224
|
SurveyActionBar.prototype.componentWillUnmount = function () {
|
83009
83225
|
_super.prototype.componentWillUnmount.call(this);
|
83010
|
-
|
83011
|
-
this.model.resetResponsivityManager();
|
83012
|
-
}
|
83226
|
+
this.model.resetResponsivityManager();
|
83013
83227
|
};
|
83014
83228
|
SurveyActionBar.prototype.componentDidUpdate = function (prevProps, prevState) {
|
83015
83229
|
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
83016
|
-
if (prevProps.model
|
83017
|
-
|
83230
|
+
if (prevProps.model != this.props.model) {
|
83231
|
+
prevProps.model.resetResponsivityManager();
|
83018
83232
|
}
|
83019
83233
|
if (!!this.model.hasActions) {
|
83020
|
-
this.model.resetResponsivityManager();
|
83021
83234
|
var container = this.rootRef.current;
|
83022
83235
|
if (!!container) {
|
83023
83236
|
this.model.initResponsivityManager(container, function (callback) { setTimeout(callback); });
|