survey-react 1.12.13 → 1.12.15
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 +27 -4
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +8 -4
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +400 -304
- package/survey.react.js +383 -258
- 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.15
|
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
|
*/
|
@@ -1705,7 +1705,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
1705
1705
|
/*!********************************************!*\
|
1706
1706
|
!*** ./src/entries/react.ts + 287 modules ***!
|
1707
1707
|
\********************************************/
|
1708
|
-
/*! 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, setupLocale, 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, SvgThemeSets, addIconsToThemeSet, 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 */
|
1708
|
+
/*! 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, setupLocale, 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, SvgThemeSets, addIconsToThemeSet, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, activateLazyRenderingChecks, 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 */
|
1709
1709
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} (<- Module is not an ECMAScript module) */
|
1710
1710
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} (<- Module is not an ECMAScript module) */
|
1711
1711
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
@@ -1935,6 +1935,7 @@ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", functi
|
|
1935
1935
|
__webpack_require__.d(__webpack_exports__, "unwrap", function() { return /* reexport */ unwrap; });
|
1936
1936
|
__webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return /* reexport */ getOriginalEvent; });
|
1937
1937
|
__webpack_require__.d(__webpack_exports__, "getElement", function() { return /* reexport */ getElement; });
|
1938
|
+
__webpack_require__.d(__webpack_exports__, "activateLazyRenderingChecks", function() { return /* reexport */ activateLazyRenderingChecks; });
|
1938
1939
|
__webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return /* reexport */ createDropdownActionModel; });
|
1939
1940
|
__webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return /* reexport */ createDropdownActionModelAdvanced; });
|
1940
1941
|
__webpack_require__.d(__webpack_exports__, "createPopupModelWithListModel", function() { return /* reexport */ createPopupModelWithListModel; });
|
@@ -2855,12 +2856,13 @@ var surveyLocalization = {
|
|
2855
2856
|
//TODO remove on next week
|
2856
2857
|
get showNamesInEnglish() { return this.useEnglishNames; },
|
2857
2858
|
set showNamesInEnglish(val) { this.useEnglishNames = val; },
|
2858
|
-
setupLocale: function (
|
2859
|
-
|
2860
|
-
this.
|
2861
|
-
this.
|
2862
|
-
|
2863
|
-
|
2859
|
+
setupLocale: function (localeConfig) {
|
2860
|
+
var loc = localeConfig.localeCode;
|
2861
|
+
this.locales[loc] = localeConfig.strings;
|
2862
|
+
this.localeNames[loc] = localeConfig.nativeName;
|
2863
|
+
this.localeNamesInEnglish[loc] = localeConfig.englishName;
|
2864
|
+
if (localeConfig.rtl !== undefined) {
|
2865
|
+
this.localeDirections[loc] = localeConfig.rtl;
|
2864
2866
|
}
|
2865
2867
|
},
|
2866
2868
|
get currentLocale() {
|
@@ -2959,7 +2961,7 @@ function getLocaleString(strName, locale) {
|
|
2959
2961
|
return surveyLocalization.getString(strName, locale);
|
2960
2962
|
}
|
2961
2963
|
function setupLocale(localeConfig) {
|
2962
|
-
surveyLocalization.setupLocale(localeConfig
|
2964
|
+
surveyLocalization.setupLocale(localeConfig);
|
2963
2965
|
}
|
2964
2966
|
var surveyStrings = englishStrings;
|
2965
2967
|
surveyLocalization.locales["en"] = englishStrings;
|
@@ -3053,9 +3055,11 @@ function jsonobject_property(options) {
|
|
3053
3055
|
set: function (val) {
|
3054
3056
|
var newValue = processComputedUpdater(this, val);
|
3055
3057
|
var prevValue = this.getPropertyValue(key);
|
3056
|
-
|
3057
|
-
|
3058
|
-
options.onSet
|
3058
|
+
if (newValue !== prevValue) {
|
3059
|
+
this.setPropertyValue(key, newValue);
|
3060
|
+
if (!!options && options.onSet) {
|
3061
|
+
options.onSet(newValue, this, prevValue);
|
3062
|
+
}
|
3059
3063
|
}
|
3060
3064
|
},
|
3061
3065
|
});
|
@@ -10370,8 +10374,7 @@ var base_Base = /** @class */ (function () {
|
|
10370
10374
|
* @param name A property name.
|
10371
10375
|
* @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
|
10372
10376
|
*/
|
10373
|
-
Base.prototype.getPropertyValue = function (name, defaultValue) {
|
10374
|
-
if (defaultValue === void 0) { defaultValue = null; }
|
10377
|
+
Base.prototype.getPropertyValue = function (name, defaultValue, calcFunc) {
|
10375
10378
|
var res = this.getPropertyValueWithoutDefault(name);
|
10376
10379
|
if (this.isPropertyEmpty(res)) {
|
10377
10380
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
@@ -10379,6 +10382,13 @@ var base_Base = /** @class */ (function () {
|
|
10379
10382
|
return locStr.text;
|
10380
10383
|
if (defaultValue !== null && defaultValue !== undefined)
|
10381
10384
|
return defaultValue;
|
10385
|
+
if (!!calcFunc) {
|
10386
|
+
var newVal = calcFunc();
|
10387
|
+
if (newVal !== undefined) {
|
10388
|
+
this.setPropertyValueDirectly(name, newVal);
|
10389
|
+
return newVal;
|
10390
|
+
}
|
10391
|
+
}
|
10382
10392
|
var propDefaultValue = this.getDefaultPropertyValue(name);
|
10383
10393
|
if (propDefaultValue !== undefined)
|
10384
10394
|
return propDefaultValue;
|
@@ -11699,6 +11709,7 @@ var defaultListCss = {
|
|
11699
11709
|
loadingIndicator: "sv-list__loading-indicator",
|
11700
11710
|
itemSelected: "sv-list__item--selected",
|
11701
11711
|
itemGroup: "sv-list__item--group",
|
11712
|
+
itemGroupSelected: "sv-list__item--group-selected",
|
11702
11713
|
itemWithIcon: "sv-list__item--with-icon",
|
11703
11714
|
itemDisabled: "sv-list__item--disabled",
|
11704
11715
|
itemFocused: "sv-list__item--focused",
|
@@ -11758,21 +11769,29 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11758
11769
|
.toString();
|
11759
11770
|
};
|
11760
11771
|
_this.getItemClass = function (itemValue) {
|
11772
|
+
var isSelected = _this.isItemSelected(itemValue);
|
11761
11773
|
return new CssClassBuilder()
|
11762
11774
|
.append(_this.cssClasses.item)
|
11763
11775
|
.append(_this.cssClasses.itemWithIcon, !!itemValue.iconName)
|
11764
11776
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
11765
11777
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
11766
|
-
.append(_this.cssClasses.itemSelected,
|
11778
|
+
.append(_this.cssClasses.itemSelected, !itemValue.hasSubItems && isSelected)
|
11767
11779
|
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
11780
|
+
.append(_this.cssClasses.itemGroupSelected, itemValue.hasSubItems && isSelected)
|
11768
11781
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
11769
11782
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
11770
11783
|
.append(itemValue.css)
|
11771
11784
|
.toString();
|
11772
11785
|
};
|
11773
|
-
|
11786
|
+
// public getItemIndent = (itemValue: any) => {
|
11787
|
+
// const level: number = itemValue.level || 0;
|
11788
|
+
// return (level + 1) * ListModel.INDENT + "px";
|
11789
|
+
// };
|
11790
|
+
_this.getItemStyle = function (itemValue) {
|
11774
11791
|
var level = itemValue.level || 0;
|
11775
|
-
return
|
11792
|
+
return {
|
11793
|
+
"--sjs-list-item-level": level + 1
|
11794
|
+
};
|
11776
11795
|
};
|
11777
11796
|
if (Object.keys(items).indexOf("items") !== -1) {
|
11778
11797
|
var options_1 = items;
|
@@ -11791,6 +11810,7 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11791
11810
|
_this[key] = options_1[key];
|
11792
11811
|
}
|
11793
11812
|
});
|
11813
|
+
_this.updateActionsIds();
|
11794
11814
|
}
|
11795
11815
|
else {
|
11796
11816
|
_this.setItems(items);
|
@@ -11847,10 +11867,13 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11847
11867
|
configurable: true
|
11848
11868
|
});
|
11849
11869
|
ListModel.prototype.onFilterStringChanged = function (text) {
|
11850
|
-
var _this = this;
|
11851
11870
|
if (!!this.onFilterStringChangedCallback) {
|
11852
11871
|
this.onFilterStringChangedCallback(text);
|
11853
11872
|
}
|
11873
|
+
this.updateIsEmpty();
|
11874
|
+
};
|
11875
|
+
ListModel.prototype.updateIsEmpty = function () {
|
11876
|
+
var _this = this;
|
11854
11877
|
this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
|
11855
11878
|
};
|
11856
11879
|
ListModel.prototype.scrollToItem = function (selector, ms) {
|
@@ -11874,16 +11897,19 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11874
11897
|
this.onTextSearchCallback = callback;
|
11875
11898
|
};
|
11876
11899
|
ListModel.prototype.setItems = function (items, sortByVisibleIndex) {
|
11877
|
-
var _this = this;
|
11878
11900
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
11879
11901
|
_super.prototype.setItems.call(this, items, sortByVisibleIndex);
|
11880
|
-
|
11881
|
-
this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
|
11882
|
-
}
|
11902
|
+
this.updateActionsIds();
|
11883
11903
|
if (!this.isAllDataLoaded && !!this.actions.length) {
|
11884
11904
|
this.actions.push(this.loadingIndicator);
|
11885
11905
|
}
|
11886
11906
|
};
|
11907
|
+
ListModel.prototype.updateActionsIds = function () {
|
11908
|
+
var _this = this;
|
11909
|
+
if (this.elementId) {
|
11910
|
+
this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
|
11911
|
+
}
|
11912
|
+
};
|
11887
11913
|
ListModel.prototype.setSearchEnabled = function (newValue) {
|
11888
11914
|
this.searchEnabled = newValue;
|
11889
11915
|
this.showSearchClearButton = newValue;
|
@@ -11924,7 +11950,7 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11924
11950
|
});
|
11925
11951
|
Object.defineProperty(ListModel.prototype, "scrollableContainer", {
|
11926
11952
|
get: function () {
|
11927
|
-
return this.listContainerHtmlElement.querySelector("." + this.
|
11953
|
+
return this.listContainerHtmlElement.querySelector("." + this.cssClasses.itemsContainer);
|
11928
11954
|
},
|
11929
11955
|
enumerable: false,
|
11930
11956
|
configurable: true
|
@@ -11978,7 +12004,12 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11978
12004
|
};
|
11979
12005
|
ListModel.prototype.onPointerDown = function (event, item) { };
|
11980
12006
|
ListModel.prototype.refresh = function () {
|
11981
|
-
this.filterString
|
12007
|
+
if (this.filterString !== "") {
|
12008
|
+
this.filterString = "";
|
12009
|
+
}
|
12010
|
+
else {
|
12011
|
+
this.updateIsEmpty();
|
12012
|
+
}
|
11982
12013
|
this.resetFocusedItem();
|
11983
12014
|
};
|
11984
12015
|
ListModel.prototype.onClickSearchClearButton = function (event) {
|
@@ -12047,10 +12078,15 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
12047
12078
|
}
|
12048
12079
|
};
|
12049
12080
|
ListModel.prototype.scrollToFocusedItem = function () {
|
12050
|
-
this.scrollToItem(this.
|
12081
|
+
this.scrollToItem(this.cssClasses.itemFocused);
|
12051
12082
|
};
|
12052
12083
|
ListModel.prototype.scrollToSelectedItem = function () {
|
12053
|
-
this.
|
12084
|
+
if (!!this.selectedItem && this.selectedItem.items && this.selectedItem.items.length > 0) {
|
12085
|
+
this.scrollToItem(this.cssClasses.itemGroupSelected, 110);
|
12086
|
+
}
|
12087
|
+
else {
|
12088
|
+
this.scrollToItem(this.cssClasses.itemSelected, 110);
|
12089
|
+
}
|
12054
12090
|
};
|
12055
12091
|
ListModel.prototype.addScrollEventListener = function (handler) {
|
12056
12092
|
if (!!handler) {
|
@@ -12403,7 +12439,6 @@ var action_BaseAction = /** @class */ (function (_super) {
|
|
12403
12439
|
function BaseAction() {
|
12404
12440
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
12405
12441
|
_this.rendredIdValue = BaseAction.getNextRendredId();
|
12406
|
-
_this.markerIconSize = 16;
|
12407
12442
|
return _this;
|
12408
12443
|
}
|
12409
12444
|
BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
|
@@ -12658,9 +12693,6 @@ var action_BaseAction = /** @class */ (function (_super) {
|
|
12658
12693
|
action_decorate([
|
12659
12694
|
jsonobject_property()
|
12660
12695
|
], BaseAction.prototype, "markerIconName", void 0);
|
12661
|
-
action_decorate([
|
12662
|
-
jsonobject_property()
|
12663
|
-
], BaseAction.prototype, "markerIconSize", void 0);
|
12664
12696
|
action_decorate([
|
12665
12697
|
jsonobject_property()
|
12666
12698
|
], BaseAction.prototype, "css", void 0);
|
@@ -12675,13 +12707,14 @@ var action_BaseAction = /** @class */ (function (_super) {
|
|
12675
12707
|
|
12676
12708
|
var action_Action = /** @class */ (function (_super) {
|
12677
12709
|
action_extends(Action, _super);
|
12678
|
-
function Action(
|
12710
|
+
function Action(innerItemData) {
|
12679
12711
|
var _this = _super.call(this) || this;
|
12680
|
-
_this.innerItem = innerItem;
|
12681
12712
|
_this.locTitleChanged = function () {
|
12682
12713
|
var val = _this.locTitle.renderedHtml;
|
12683
12714
|
_this.setPropertyValue("_title", !!val ? val : undefined);
|
12684
12715
|
};
|
12716
|
+
var innerItem = (innerItemData instanceof Action) ? innerItemData.innerItem : innerItemData;
|
12717
|
+
_this.innerItem = innerItem;
|
12685
12718
|
_this.locTitle = !!innerItem ? innerItem["locTitle"] : null;
|
12686
12719
|
//Object.assign(this, item) to support IE11
|
12687
12720
|
if (!!innerItem) {
|
@@ -14262,7 +14295,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14262
14295
|
this.textProcessorValue = this.surveyImplValue.getTextProcessor();
|
14263
14296
|
this.onSetData();
|
14264
14297
|
}
|
14265
|
-
if (!!this.survey) {
|
14298
|
+
if (!!this.survey /* && !this.isLoadingFromJson*/) {
|
14266
14299
|
this.updateDescriptionVisibility(this.description);
|
14267
14300
|
this.clearCssClasses();
|
14268
14301
|
}
|
@@ -14405,20 +14438,28 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14405
14438
|
});
|
14406
14439
|
Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
|
14407
14440
|
get: function () {
|
14408
|
-
|
14409
|
-
|
14410
|
-
|
14411
|
-
|
14441
|
+
var res = this.getPropertyValueWithoutDefault("cssClassesValue");
|
14442
|
+
if (!res && !this.isCssValueCalculating) {
|
14443
|
+
this.isCssValueCalculating = true;
|
14444
|
+
res = this.createCssClassesValue();
|
14445
|
+
this.isCssValueCalculating = false;
|
14446
|
+
}
|
14447
|
+
return res;
|
14412
14448
|
},
|
14413
14449
|
enumerable: false,
|
14414
14450
|
configurable: true
|
14415
14451
|
});
|
14416
14452
|
SurveyElement.prototype.ensureCssClassesValue = function () {
|
14417
14453
|
if (!this.cssClassesValue) {
|
14418
|
-
this.
|
14419
|
-
this.updateElementCssCore(this.cssClassesValue);
|
14454
|
+
this.createCssClassesValue();
|
14420
14455
|
}
|
14421
14456
|
};
|
14457
|
+
SurveyElement.prototype.createCssClassesValue = function () {
|
14458
|
+
var res = this.calcCssClasses(this.css);
|
14459
|
+
this.setPropertyValue("cssClassesValue", res);
|
14460
|
+
this.updateElementCssCore(this.cssClassesValue);
|
14461
|
+
return res;
|
14462
|
+
};
|
14422
14463
|
Object.defineProperty(SurveyElement.prototype, "cssClasses", {
|
14423
14464
|
/**
|
14424
14465
|
* Returns an object in which keys are UI elements and values are CSS classes applied to them.
|
@@ -14474,7 +14515,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14474
14515
|
this.clearCssClasses();
|
14475
14516
|
};
|
14476
14517
|
SurveyElement.prototype.clearCssClasses = function () {
|
14477
|
-
this.cssClassesValue
|
14518
|
+
this.resetPropertyValue("cssClassesValue");
|
14478
14519
|
};
|
14479
14520
|
SurveyElement.prototype.getIsLoadingFromJson = function () {
|
14480
14521
|
if (_super.prototype.getIsLoadingFromJson.call(this))
|
@@ -14569,7 +14610,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14569
14610
|
configurable: true
|
14570
14611
|
});
|
14571
14612
|
SurveyElement.prototype.onFirstRendering = function () {
|
14572
|
-
this.
|
14613
|
+
if (!this.wasRendered) {
|
14614
|
+
this.wasRenderedValue = true;
|
14615
|
+
this.onFirstRenderingCore();
|
14616
|
+
}
|
14617
|
+
};
|
14618
|
+
SurveyElement.prototype.onFirstRenderingCore = function () {
|
14573
14619
|
this.ensureCssClassesValue();
|
14574
14620
|
};
|
14575
14621
|
SurveyElement.prototype.endLoadingFromJson = function () {
|
@@ -14864,17 +14910,19 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14864
14910
|
};
|
14865
14911
|
Object.defineProperty(SurveyElement.prototype, "paddingLeft", {
|
14866
14912
|
get: function () {
|
14867
|
-
|
14868
|
-
|
14869
|
-
set: function (val) {
|
14870
|
-
this.setPropertyValue("paddingLeft", val);
|
14913
|
+
var _this = this;
|
14914
|
+
return this.getPropertyValue("paddingLeft", undefined, function () { return _this.calcPaddingLeft(); });
|
14871
14915
|
},
|
14872
14916
|
enumerable: false,
|
14873
14917
|
configurable: true
|
14874
14918
|
});
|
14919
|
+
SurveyElement.prototype.calcPaddingLeft = function () {
|
14920
|
+
return "";
|
14921
|
+
};
|
14875
14922
|
Object.defineProperty(SurveyElement.prototype, "paddingRight", {
|
14876
14923
|
get: function () {
|
14877
|
-
|
14924
|
+
var _this = this;
|
14925
|
+
return this.getPropertyValue("paddingRight", undefined, function () { return _this.calcPaddingRight(); });
|
14878
14926
|
},
|
14879
14927
|
set: function (val) {
|
14880
14928
|
this.setPropertyValue("paddingRight", val);
|
@@ -14882,6 +14930,13 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14882
14930
|
enumerable: false,
|
14883
14931
|
configurable: true
|
14884
14932
|
});
|
14933
|
+
SurveyElement.prototype.calcPaddingRight = function () {
|
14934
|
+
return "";
|
14935
|
+
};
|
14936
|
+
SurveyElement.prototype.resetIndents = function () {
|
14937
|
+
this.resetPropertyValue("paddingLeft");
|
14938
|
+
this.resetPropertyValue("paddingRight");
|
14939
|
+
};
|
14885
14940
|
SurveyElement.prototype.updateRootStyle = function () {
|
14886
14941
|
var style = {};
|
14887
14942
|
var _width;
|
@@ -16393,6 +16448,12 @@ function mergeValues(src, dest) {
|
|
16393
16448
|
}
|
16394
16449
|
}
|
16395
16450
|
}
|
16451
|
+
function updateListCssValues(res, css) {
|
16452
|
+
var listCssClasses = {};
|
16453
|
+
mergeValues(css.list, listCssClasses);
|
16454
|
+
mergeValues(res.list, listCssClasses);
|
16455
|
+
res["list"] = listCssClasses;
|
16456
|
+
}
|
16396
16457
|
var Logger = /** @class */ (function () {
|
16397
16458
|
function Logger() {
|
16398
16459
|
this._result = "";
|
@@ -18866,7 +18927,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
18866
18927
|
_this.createNewArray("validators", function (validator) {
|
18867
18928
|
validator.errorOwner = _this;
|
18868
18929
|
});
|
18869
|
-
_this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
|
18870
18930
|
_this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; });
|
18871
18931
|
_this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
|
18872
18932
|
_this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
|
@@ -18894,7 +18954,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
18894
18954
|
_this.clearCssClasses();
|
18895
18955
|
});
|
18896
18956
|
_this.registerPropertyChangedHandlers(["indent", "rightIndent"], function () {
|
18897
|
-
_this.
|
18957
|
+
_this.resetIndents();
|
18898
18958
|
});
|
18899
18959
|
_this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
|
18900
18960
|
_this.initCommentFromSurvey();
|
@@ -18909,26 +18969,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
18909
18969
|
Question.getQuestionId = function () {
|
18910
18970
|
return "sq_" + Question.questionCounter++;
|
18911
18971
|
};
|
18912
|
-
Question.prototype.getCommentTextAreaOptions = function () {
|
18913
|
-
var _this = this;
|
18914
|
-
var options = {
|
18915
|
-
question: this,
|
18916
|
-
id: function () { return _this.commentId; },
|
18917
|
-
propertyName: "comment",
|
18918
|
-
className: function () { return _this.cssClasses.comment; },
|
18919
|
-
placeholder: function () { return _this.renderedCommentPlaceholder; },
|
18920
|
-
isDisabledAttr: function () { return _this.isInputReadOnly || false; },
|
18921
|
-
rows: function () { return _this.commentAreaRows; },
|
18922
|
-
autoGrow: function () { return _this.autoGrowComment; },
|
18923
|
-
maxLength: function () { return _this.getOthersMaxLength(); },
|
18924
|
-
ariaRequired: function () { return _this.a11y_input_ariaRequired; },
|
18925
|
-
ariaLabel: function () { return _this.a11y_input_ariaLabel; },
|
18926
|
-
getTextValue: function () { return _this.comment; },
|
18927
|
-
onTextAreaChange: function (e) { _this.onCommentChange(e); },
|
18928
|
-
onTextAreaInput: function (e) { _this.onCommentInput(e); },
|
18929
|
-
};
|
18930
|
-
return options;
|
18931
|
-
};
|
18932
18972
|
Question.prototype.isReadOnlyRenderDiv = function () {
|
18933
18973
|
return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
|
18934
18974
|
};
|
@@ -18973,6 +19013,36 @@ var question_Question = /** @class */ (function (_super) {
|
|
18973
19013
|
this.locProcessedTitle.sharedData = locTitleValue;
|
18974
19014
|
return locTitleValue;
|
18975
19015
|
};
|
19016
|
+
Object.defineProperty(Question.prototype, "commentTextAreaModel", {
|
19017
|
+
get: function () {
|
19018
|
+
if (!this.commentTextAreaModelValue) {
|
19019
|
+
this.commentTextAreaModelValue = new text_area_TextAreaModel(this.getCommentTextAreaOptions());
|
19020
|
+
}
|
19021
|
+
return this.commentTextAreaModelValue;
|
19022
|
+
},
|
19023
|
+
enumerable: false,
|
19024
|
+
configurable: true
|
19025
|
+
});
|
19026
|
+
Question.prototype.getCommentTextAreaOptions = function () {
|
19027
|
+
var _this = this;
|
19028
|
+
var options = {
|
19029
|
+
question: this,
|
19030
|
+
id: function () { return _this.commentId; },
|
19031
|
+
propertyName: "comment",
|
19032
|
+
className: function () { return _this.cssClasses.comment; },
|
19033
|
+
placeholder: function () { return _this.renderedCommentPlaceholder; },
|
19034
|
+
isDisabledAttr: function () { return _this.isInputReadOnly || false; },
|
19035
|
+
rows: function () { return _this.commentAreaRows; },
|
19036
|
+
autoGrow: function () { return _this.autoGrowComment; },
|
19037
|
+
maxLength: function () { return _this.getOthersMaxLength(); },
|
19038
|
+
ariaRequired: function () { return _this.a11y_input_ariaRequired; },
|
19039
|
+
ariaLabel: function () { return _this.a11y_input_ariaLabel; },
|
19040
|
+
getTextValue: function () { return _this.comment; },
|
19041
|
+
onTextAreaChange: function (e) { _this.onCommentChange(e); },
|
19042
|
+
onTextAreaInput: function (e) { _this.onCommentInput(e); },
|
19043
|
+
};
|
19044
|
+
return options;
|
19045
|
+
};
|
18976
19046
|
Question.prototype.getSurvey = function (live) {
|
18977
19047
|
if (live === void 0) { live = false; }
|
18978
19048
|
if (live) {
|
@@ -19460,7 +19530,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
19460
19530
|
if (isLight !== true) {
|
19461
19531
|
this.runConditions();
|
19462
19532
|
}
|
19463
|
-
this.calcRenderedCommentPlaceholder();
|
19464
19533
|
if (!this.visible) {
|
19465
19534
|
this.updateIsVisibleProp();
|
19466
19535
|
}
|
@@ -19478,7 +19547,9 @@ var question_Question = /** @class */ (function (_super) {
|
|
19478
19547
|
return;
|
19479
19548
|
this.removeFromParent();
|
19480
19549
|
this.setPropertyValue("parent", val);
|
19481
|
-
|
19550
|
+
if (!!val) {
|
19551
|
+
this.updateQuestionCss();
|
19552
|
+
}
|
19482
19553
|
this.onParentChanged();
|
19483
19554
|
},
|
19484
19555
|
enumerable: false,
|
@@ -19806,14 +19877,17 @@ var question_Question = /** @class */ (function (_super) {
|
|
19806
19877
|
});
|
19807
19878
|
Object.defineProperty(Question.prototype, "renderedCommentPlaceholder", {
|
19808
19879
|
get: function () {
|
19809
|
-
|
19880
|
+
var _this = this;
|
19881
|
+
var func = function () {
|
19882
|
+
return !_this.isReadOnly ? _this.commentPlaceHolder : undefined;
|
19883
|
+
};
|
19884
|
+
return this.getPropertyValue("renderedCommentPlaceholder", undefined, func);
|
19810
19885
|
},
|
19811
19886
|
enumerable: false,
|
19812
19887
|
configurable: true
|
19813
19888
|
});
|
19814
|
-
Question.prototype.
|
19815
|
-
|
19816
|
-
this.setPropertyValue("renderedCommentPlaceholder", res);
|
19889
|
+
Question.prototype.resetRenderedCommentPlaceholder = function () {
|
19890
|
+
this.resetPropertyValue("renderedCommentPlaceholder");
|
19817
19891
|
};
|
19818
19892
|
Question.prototype.getAllErrors = function () {
|
19819
19893
|
return this.errors.slice();
|
@@ -19841,7 +19915,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19841
19915
|
};
|
19842
19916
|
Question.prototype.localeChanged = function () {
|
19843
19917
|
_super.prototype.localeChanged.call(this);
|
19844
|
-
this.
|
19918
|
+
this.resetRenderedCommentPlaceholder();
|
19845
19919
|
if (!!this.localeChangedCallback) {
|
19846
19920
|
this.localeChangedCallback();
|
19847
19921
|
}
|
@@ -20170,7 +20244,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
20170
20244
|
if (reNew) {
|
20171
20245
|
this.updateQuestionCss(true);
|
20172
20246
|
}
|
20173
|
-
this.
|
20247
|
+
this.resetIndents();
|
20174
20248
|
};
|
20175
20249
|
Question.prototype.updateQuestionCss = function (reNew) {
|
20176
20250
|
if (this.isLoadingFromJson ||
|
@@ -20224,9 +20298,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
20224
20298
|
enumerable: false,
|
20225
20299
|
configurable: true
|
20226
20300
|
});
|
20227
|
-
Question.prototype.
|
20228
|
-
|
20229
|
-
|
20301
|
+
Question.prototype.calcPaddingLeft = function () {
|
20302
|
+
return this.getIndentSize(this.indent);
|
20303
|
+
};
|
20304
|
+
Question.prototype.calcPaddingRight = function () {
|
20305
|
+
return this.getIndentSize(this.rightIndent);
|
20230
20306
|
};
|
20231
20307
|
Question.prototype.getIndentSize = function (indent) {
|
20232
20308
|
if (indent < 1 || !this.getSurvey() || !this.cssClasses || !this.cssClasses.indent)
|
@@ -20531,7 +20607,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
20531
20607
|
this.clearErrors();
|
20532
20608
|
}
|
20533
20609
|
this.updateQuestionCss();
|
20534
|
-
this.
|
20610
|
+
this.resetRenderedCommentPlaceholder();
|
20535
20611
|
};
|
20536
20612
|
Object.defineProperty(Question.prototype, "enableIf", {
|
20537
20613
|
/**
|
@@ -20622,15 +20698,10 @@ var question_Question = /** @class */ (function (_super) {
|
|
20622
20698
|
if (this.isEmpty()) {
|
20623
20699
|
this.initDataFromSurvey();
|
20624
20700
|
}
|
20625
|
-
this.calcRenderedCommentPlaceholder();
|
20626
|
-
this.onIndentChanged();
|
20627
20701
|
};
|
20628
20702
|
Question.prototype.onSetData = function () {
|
20629
20703
|
_super.prototype.onSetData.call(this);
|
20630
|
-
if (!this.survey)
|
20631
|
-
return;
|
20632
|
-
this.onIndentChanged();
|
20633
|
-
if (!this.isDesignMode) {
|
20704
|
+
if (!this.isDesignMode && !!this.survey && !this.isLoadingFromJson) {
|
20634
20705
|
this.initDataFromSurvey();
|
20635
20706
|
this.onSurveyValueChanged(this.value);
|
20636
20707
|
this.updateValueWithDefaults();
|
@@ -20850,7 +20921,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
20850
20921
|
Question.prototype.clearValueIfInvisibleCore = function (reason) {
|
20851
20922
|
if (this.canClearValueAsInvisible(reason)) {
|
20852
20923
|
this.clearValue();
|
20853
|
-
this.setValueChangedDirectly(undefined);
|
20854
20924
|
}
|
20855
20925
|
};
|
20856
20926
|
Object.defineProperty(Question.prototype, "clearIfInvisible", {
|
@@ -22142,7 +22212,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
22142
22212
|
jsonobject_property()
|
22143
22213
|
], Question.prototype, "ariaExpanded", void 0);
|
22144
22214
|
question_decorate([
|
22145
|
-
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.
|
22215
|
+
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedCommentPlaceholder(); } })
|
22146
22216
|
], Question.prototype, "commentPlaceholder", void 0);
|
22147
22217
|
question_decorate([
|
22148
22218
|
jsonobject_property()
|
@@ -24842,12 +24912,12 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
24842
24912
|
this.customQuestion.onItemValuePropertyChanged(this, item, item.ownerPropertyName, name, newValue);
|
24843
24913
|
}
|
24844
24914
|
};
|
24845
|
-
QuestionCustomModelBase.prototype.
|
24915
|
+
QuestionCustomModelBase.prototype.onFirstRenderingCore = function () {
|
24916
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
24846
24917
|
var el = this.getElement();
|
24847
24918
|
if (!!el) {
|
24848
24919
|
el.onFirstRendering();
|
24849
24920
|
}
|
24850
|
-
_super.prototype.onFirstRendering.call(this);
|
24851
24921
|
};
|
24852
24922
|
QuestionCustomModelBase.prototype.onHidingContent = function () {
|
24853
24923
|
_super.prototype.onHidingContent.call(this);
|
@@ -26328,6 +26398,9 @@ Serializer.addClass("expression", [
|
|
26328
26398
|
{ name: "isRequired", visible: false },
|
26329
26399
|
{ name: "readOnly", visible: false },
|
26330
26400
|
{ name: "requiredErrorText", visible: false },
|
26401
|
+
{ name: "resetValueIf", visible: false },
|
26402
|
+
{ name: "setValueIf", visible: false },
|
26403
|
+
{ name: "setValueExpression", visible: false },
|
26331
26404
|
{ name: "defaultValueExpression", visible: false },
|
26332
26405
|
{ name: "defaultValue", visible: false },
|
26333
26406
|
{ name: "correctAnswer", visible: false },
|
@@ -28037,8 +28110,12 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
28037
28110
|
var dataRowIndex = 0;
|
28038
28111
|
for (var i = 0; i < this.rows.length; i++) {
|
28039
28112
|
if (dataRowIndex === index) {
|
28040
|
-
if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow)
|
28113
|
+
if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow) {
|
28041
28114
|
res++;
|
28115
|
+
if (i + 1 < this.rows.length && this.rows[i + 1].isDetailRow) {
|
28116
|
+
res++;
|
28117
|
+
}
|
28118
|
+
}
|
28042
28119
|
break;
|
28043
28120
|
}
|
28044
28121
|
res++;
|
@@ -30325,6 +30402,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30325
30402
|
}
|
30326
30403
|
};
|
30327
30404
|
QuestionMatrixDropdownModelBase.prototype.runCondition = function (values, properties) {
|
30405
|
+
var oldRowVariables = values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName];
|
30328
30406
|
_super.prototype.runCondition.call(this, values, properties);
|
30329
30407
|
var counter = 0;
|
30330
30408
|
var prevTotalValue;
|
@@ -30336,6 +30414,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30336
30414
|
} while (!helpers_Helpers.isTwoValueEquals(prevTotalValue, this.totalValue) &&
|
30337
30415
|
counter < 3);
|
30338
30416
|
this.updateVisibilityBasedOnRows();
|
30417
|
+
values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName] = oldRowVariables;
|
30339
30418
|
};
|
30340
30419
|
QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value, keys) {
|
30341
30420
|
_super.prototype.runTriggers.call(this, name, value, keys);
|
@@ -31354,10 +31433,9 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
31354
31433
|
if (isDeletingValue) {
|
31355
31434
|
delete rowValue[columnName];
|
31356
31435
|
}
|
31357
|
-
|
31358
|
-
|
31359
|
-
|
31360
|
-
}
|
31436
|
+
row.questions.forEach(function (q) {
|
31437
|
+
delete rowValue[q.getValueName()];
|
31438
|
+
});
|
31361
31439
|
if (newRowValue) {
|
31362
31440
|
newRowValue = JSON.parse(JSON.stringify(newRowValue));
|
31363
31441
|
for (var key in newRowValue) {
|
@@ -36435,7 +36513,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36435
36513
|
_this.updateVisibleIndexes();
|
36436
36514
|
});
|
36437
36515
|
_this.registerPropertyChangedHandlers(["title"], function () {
|
36438
|
-
_this.
|
36516
|
+
_this.resetHasTextInTitle();
|
36439
36517
|
});
|
36440
36518
|
_this.dragDropPanelHelper = new drag_drop_panel_helper_v1_DragDropPanelHelperV1(_this);
|
36441
36519
|
return _this;
|
@@ -36492,6 +36570,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36492
36570
|
return "panelbase";
|
36493
36571
|
};
|
36494
36572
|
PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
|
36573
|
+
//if(this.surveyImpl === value) return; TODO refactor
|
36495
36574
|
this.blockAnimations();
|
36496
36575
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
36497
36576
|
if (this.isDesignMode)
|
@@ -36511,8 +36590,16 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36511
36590
|
col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
|
36512
36591
|
});
|
36513
36592
|
};
|
36514
|
-
PanelModelBase.prototype
|
36515
|
-
|
36593
|
+
Object.defineProperty(PanelModelBase.prototype, "hasTextInTitle", {
|
36594
|
+
get: function () {
|
36595
|
+
var _this = this;
|
36596
|
+
return this.getPropertyValue("hasTextInTitle", undefined, function () { return !!_this.title; });
|
36597
|
+
},
|
36598
|
+
enumerable: false,
|
36599
|
+
configurable: true
|
36600
|
+
});
|
36601
|
+
PanelModelBase.prototype.resetHasTextInTitle = function () {
|
36602
|
+
this.resetPropertyValue("hasTextInTitle");
|
36516
36603
|
};
|
36517
36604
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
36518
36605
|
get: function () {
|
@@ -37525,14 +37612,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37525
37612
|
}
|
37526
37613
|
this.onElementVisibilityChanged(this);
|
37527
37614
|
this.releaseAnimations();
|
37528
|
-
this.calcHasTextInTitle();
|
37529
37615
|
};
|
37530
|
-
PanelModelBase.prototype.
|
37531
|
-
_super.prototype.
|
37532
|
-
for (var i = 0; i < this.elements.length; i++) {
|
37533
|
-
this.elements[i].onFirstRendering();
|
37534
|
-
}
|
37616
|
+
PanelModelBase.prototype.onFirstRenderingCore = function () {
|
37617
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
37535
37618
|
this.onRowsChanged();
|
37619
|
+
this.elements.forEach(function (el) { return el.onFirstRendering(); });
|
37536
37620
|
};
|
37537
37621
|
PanelModelBase.prototype.updateRows = function () {
|
37538
37622
|
if (this.isLoadingFromJson)
|
@@ -37976,9 +38060,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37976
38060
|
PanelModelBase.prototype.getPanelStartIndex = function (index) {
|
37977
38061
|
return index;
|
37978
38062
|
};
|
37979
|
-
PanelModelBase.prototype.isContinueNumbering = function () {
|
37980
|
-
return true;
|
37981
|
-
};
|
38063
|
+
PanelModelBase.prototype.isContinueNumbering = function () { return true; };
|
37982
38064
|
Object.defineProperty(PanelModelBase.prototype, "isReadOnly", {
|
37983
38065
|
get: function () {
|
37984
38066
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
@@ -38319,9 +38401,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
38319
38401
|
panel_decorate([
|
38320
38402
|
jsonobject_property({ defaultValue: true })
|
38321
38403
|
], PanelModelBase.prototype, "showTitle", void 0);
|
38322
|
-
panel_decorate([
|
38323
|
-
jsonobject_property({ defaultValue: false })
|
38324
|
-
], PanelModelBase.prototype, "hasTextInTitle", void 0);
|
38325
38404
|
panel_decorate([
|
38326
38405
|
jsonobject_property({ defaultValue: true })
|
38327
38406
|
], PanelModelBase.prototype, "showDescription", void 0);
|
@@ -38350,7 +38429,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38350
38429
|
_this.parent.elementWidthChanged(_this);
|
38351
38430
|
}
|
38352
38431
|
});
|
38353
|
-
_this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.
|
38432
|
+
_this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.resetIndents(); });
|
38354
38433
|
_this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
|
38355
38434
|
return _this;
|
38356
38435
|
}
|
@@ -38371,15 +38450,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38371
38450
|
}
|
38372
38451
|
return _super.prototype.getSurvey.call(this, live);
|
38373
38452
|
};
|
38374
|
-
PanelModel.prototype.onSurveyLoad = function () {
|
38375
|
-
_super.prototype.onSurveyLoad.call(this);
|
38376
|
-
this.onIndentChanged();
|
38377
|
-
};
|
38378
|
-
PanelModel.prototype.onSetData = function () {
|
38379
|
-
_super.prototype.onSetData.call(this);
|
38380
|
-
this.onIndentChanged();
|
38381
|
-
this.calcHasTextInTitle();
|
38382
|
-
};
|
38383
38453
|
Object.defineProperty(PanelModel.prototype, "isPanel", {
|
38384
38454
|
get: function () {
|
38385
38455
|
return true;
|
@@ -38603,7 +38673,11 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38603
38673
|
});
|
38604
38674
|
Object.defineProperty(PanelModel.prototype, "innerPaddingLeft", {
|
38605
38675
|
get: function () {
|
38606
|
-
|
38676
|
+
var _this = this;
|
38677
|
+
var func = function () {
|
38678
|
+
return _this.getIndentSize(_this.innerIndent);
|
38679
|
+
};
|
38680
|
+
return this.getPropertyValue("innerPaddingLeft", undefined, func);
|
38607
38681
|
},
|
38608
38682
|
set: function (val) {
|
38609
38683
|
this.setPropertyValue("innerPaddingLeft", val);
|
@@ -38611,18 +38685,23 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38611
38685
|
enumerable: false,
|
38612
38686
|
configurable: true
|
38613
38687
|
});
|
38614
|
-
PanelModel.prototype.
|
38615
|
-
|
38616
|
-
|
38617
|
-
|
38618
|
-
|
38619
|
-
|
38688
|
+
PanelModel.prototype.calcPaddingLeft = function () {
|
38689
|
+
return this.getIndentSize(this.indent);
|
38690
|
+
};
|
38691
|
+
PanelModel.prototype.calcPaddingRight = function () {
|
38692
|
+
return this.getIndentSize(this.rightIndent);
|
38693
|
+
};
|
38694
|
+
PanelModel.prototype.resetIndents = function () {
|
38695
|
+
this.resetPropertyValue("innerPaddingLeft");
|
38696
|
+
_super.prototype.resetIndents.call(this);
|
38620
38697
|
};
|
38621
38698
|
PanelModel.prototype.getIndentSize = function (indent) {
|
38699
|
+
if (!this.survey)
|
38700
|
+
return undefined;
|
38622
38701
|
if (indent < 1)
|
38623
38702
|
return "";
|
38624
38703
|
var css = this.survey["css"];
|
38625
|
-
if (!css || !css.question.indent)
|
38704
|
+
if (!css || !css.question || !css.question.indent)
|
38626
38705
|
return "";
|
38627
38706
|
return indent * css.question.indent + "px";
|
38628
38707
|
};
|
@@ -39262,11 +39341,6 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39262
39341
|
this.removeSelfFromList(this.survey.pages);
|
39263
39342
|
}
|
39264
39343
|
};
|
39265
|
-
PageModel.prototype.onFirstRendering = function () {
|
39266
|
-
if (this.wasShown)
|
39267
|
-
return;
|
39268
|
-
_super.prototype.onFirstRendering.call(this);
|
39269
|
-
};
|
39270
39344
|
Object.defineProperty(PageModel.prototype, "visibleIndex", {
|
39271
39345
|
/**
|
39272
39346
|
* The visible index of the page. It has values from 0 to visible page count - 1.
|
@@ -45499,6 +45573,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45499
45573
|
width: width,
|
45500
45574
|
};
|
45501
45575
|
this.onResize.fire(this, options);
|
45576
|
+
// this.setResponsiveStartWidth(width);
|
45502
45577
|
return isMobileChanged;
|
45503
45578
|
};
|
45504
45579
|
SurveyModel.prototype.triggerResponsiveness = function (hard) {
|
@@ -47812,10 +47887,33 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47812
47887
|
});
|
47813
47888
|
Object.defineProperty(SurveyModel.prototype, "renderedWidth", {
|
47814
47889
|
get: function () {
|
47890
|
+
var isStaticWidth = this.getPropertyValue("calculatedWidthMode") == "static";
|
47815
47891
|
var width = this.getPropertyValue("width");
|
47892
|
+
if (this.isScaled && this.responsiveStartWidth > 1) {
|
47893
|
+
var initialWidth = this.responsiveStartWidth;
|
47894
|
+
try {
|
47895
|
+
width = width || this.staticStartWidth;
|
47896
|
+
initialWidth = !isNaN(width) ? width : parseFloat(width.toString().replace("px", ""));
|
47897
|
+
}
|
47898
|
+
catch (e) { }
|
47899
|
+
return (isStaticWidth ? initialWidth : this.responsiveStartWidth) * this.widthScale / 100 + "px";
|
47900
|
+
}
|
47816
47901
|
if (width && !isNaN(width))
|
47817
47902
|
width = width + "px";
|
47818
|
-
return
|
47903
|
+
return isStaticWidth && width || undefined;
|
47904
|
+
},
|
47905
|
+
enumerable: false,
|
47906
|
+
configurable: true
|
47907
|
+
});
|
47908
|
+
SurveyModel.prototype.setStaticStartWidth = function (width) {
|
47909
|
+
this.staticStartWidth = width;
|
47910
|
+
};
|
47911
|
+
SurveyModel.prototype.setResponsiveStartWidth = function (width) {
|
47912
|
+
this.responsiveStartWidth = width;
|
47913
|
+
};
|
47914
|
+
Object.defineProperty(SurveyModel.prototype, "isScaled", {
|
47915
|
+
get: function () {
|
47916
|
+
return Math.abs(this.widthScale - 100) > 0.001;
|
47819
47917
|
},
|
47820
47918
|
enumerable: false,
|
47821
47919
|
configurable: true
|
@@ -48645,6 +48743,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
48645
48743
|
survey_decorate([
|
48646
48744
|
jsonobject_property()
|
48647
48745
|
], SurveyModel.prototype, "calculatedWidthMode", void 0);
|
48746
|
+
survey_decorate([
|
48747
|
+
jsonobject_property({ defaultValue: 100 })
|
48748
|
+
], SurveyModel.prototype, "widthScale", void 0);
|
48749
|
+
survey_decorate([
|
48750
|
+
jsonobject_property()
|
48751
|
+
], SurveyModel.prototype, "staticStartWidth", void 0);
|
48752
|
+
survey_decorate([
|
48753
|
+
jsonobject_property()
|
48754
|
+
], SurveyModel.prototype, "responsiveStartWidth", void 0);
|
48648
48755
|
survey_decorate([
|
48649
48756
|
propertyArray()
|
48650
48757
|
], SurveyModel.prototype, "layoutElements", void 0);
|
@@ -49020,7 +49127,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49020
49127
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
49021
49128
|
_this.onVisibleChanged();
|
49022
49129
|
});
|
49023
|
-
_this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
|
49024
49130
|
_this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
|
49025
49131
|
_this.setNewRestfulProperty();
|
49026
49132
|
var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
|
@@ -49051,6 +49157,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49051
49157
|
enumerable: false,
|
49052
49158
|
configurable: true
|
49053
49159
|
});
|
49160
|
+
QuestionSelectBase.prototype.getType = function () {
|
49161
|
+
return "selectbase";
|
49162
|
+
};
|
49163
|
+
QuestionSelectBase.prototype.dispose = function () {
|
49164
|
+
_super.prototype.dispose.call(this);
|
49165
|
+
var q = this.getQuestionWithChoices();
|
49166
|
+
if (!!q) {
|
49167
|
+
q.removeDependedQuestion(this);
|
49168
|
+
}
|
49169
|
+
};
|
49170
|
+
Object.defineProperty(QuestionSelectBase.prototype, "otherTextAreaModel", {
|
49171
|
+
get: function () {
|
49172
|
+
if (!this.otherTextAreaModelValue) {
|
49173
|
+
this.otherTextAreaModelValue = new text_area_TextAreaModel(this.getOtherTextAreaOptions());
|
49174
|
+
}
|
49175
|
+
return this.otherTextAreaModelValue;
|
49176
|
+
},
|
49177
|
+
enumerable: false,
|
49178
|
+
configurable: true
|
49179
|
+
});
|
49054
49180
|
QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
|
49055
49181
|
var _this = this;
|
49056
49182
|
var options = {
|
@@ -49071,16 +49197,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49071
49197
|
};
|
49072
49198
|
return options;
|
49073
49199
|
};
|
49074
|
-
QuestionSelectBase.prototype.getType = function () {
|
49075
|
-
return "selectbase";
|
49076
|
-
};
|
49077
|
-
QuestionSelectBase.prototype.dispose = function () {
|
49078
|
-
_super.prototype.dispose.call(this);
|
49079
|
-
var q = this.getQuestionWithChoices();
|
49080
|
-
if (!!q) {
|
49081
|
-
q.removeDependedQuestion(this);
|
49082
|
-
}
|
49083
|
-
};
|
49084
49200
|
QuestionSelectBase.prototype.resetDependedQuestion = function () {
|
49085
49201
|
this.choicesFromQuestion = "";
|
49086
49202
|
};
|
@@ -51247,22 +51363,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
51247
51363
|
enumerable: false,
|
51248
51364
|
configurable: true
|
51249
51365
|
});
|
51250
|
-
QuestionSelectBase.prototype.updateCssClasses = function (res, css) {
|
51251
|
-
_super.prototype.updateCssClasses.call(this, res, css);
|
51252
|
-
if (!!this.dropdownListModel) {
|
51253
|
-
var listCssClasses = {};
|
51254
|
-
mergeValues(css.list, listCssClasses);
|
51255
|
-
mergeValues(res.list, listCssClasses);
|
51256
|
-
res["list"] = listCssClasses;
|
51257
|
-
}
|
51258
|
-
};
|
51259
|
-
QuestionSelectBase.prototype.calcCssClasses = function (css) {
|
51260
|
-
var classes = _super.prototype.calcCssClasses.call(this, css);
|
51261
|
-
if (this.dropdownListModel) {
|
51262
|
-
this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
|
51263
|
-
}
|
51264
|
-
return classes;
|
51265
|
-
};
|
51266
51366
|
question_baseselect_decorate([
|
51267
51367
|
jsonobject_property({
|
51268
51368
|
onSet: function (newVal, target) {
|
@@ -52436,7 +52536,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52436
52536
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
52437
52537
|
_this.itemSelector = ".sv-list__item";
|
52438
52538
|
_this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
|
52439
|
-
_this.popupCssClasses = "sv-single-select-list";
|
52440
52539
|
_this.listModelFilterStringChanged = function (newValue) {
|
52441
52540
|
if (_this.filterString !== newValue) {
|
52442
52541
|
_this.filterString = newValue;
|
@@ -52446,7 +52545,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52446
52545
|
_this.onPropertyChangedHandler(sender, options);
|
52447
52546
|
};
|
52448
52547
|
_this.htmlCleanerElement = DomDocumentHelper.createElement("div");
|
52449
|
-
_this.question.ariaExpanded = "false";
|
52450
52548
|
question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
|
52451
52549
|
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
52452
52550
|
_this.listModel = _this.createListModel();
|
@@ -52456,6 +52554,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52456
52554
|
_this.setTextWrapEnabled(_this.question.textWrapEnabled);
|
52457
52555
|
_this.createPopup();
|
52458
52556
|
_this.resetItemsSettings();
|
52557
|
+
var classes = question.cssClasses;
|
52558
|
+
_this.updateCssClasses(classes.popup, classes.list);
|
52459
52559
|
return _this;
|
52460
52560
|
}
|
52461
52561
|
Object.defineProperty(DropdownListModel.prototype, "focusFirstInputSelector", {
|
@@ -52558,7 +52658,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52558
52658
|
this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
|
52559
52659
|
_this.updatePopupFocusFirstInputSelector();
|
52560
52660
|
});
|
52561
|
-
this._popupModel.cssClass = this.popupCssClasses;
|
52562
52661
|
this._popupModel.onVisibilityChanged.add(function (_, option) {
|
52563
52662
|
if (option.isVisible) {
|
52564
52663
|
_this.listModel.renderElements = true;
|
@@ -52672,8 +52771,9 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52672
52771
|
model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
|
52673
52772
|
model.actions.forEach(function (a) { return a.disableTabStop = true; });
|
52674
52773
|
};
|
52774
|
+
DropdownListModel.prototype.getPopupCssClasses = function () { return "sv-single-select-list"; };
|
52675
52775
|
DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
|
52676
|
-
this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.
|
52776
|
+
this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.getPopupCssClasses()).toString();
|
52677
52777
|
this.listModel.cssClasses = listCssClasses;
|
52678
52778
|
};
|
52679
52779
|
DropdownListModel.prototype.resetFilterString = function () {
|
@@ -53151,6 +53251,7 @@ var question_dropdown_decorate = (undefined && undefined.__decorate) || function
|
|
53151
53251
|
|
53152
53252
|
|
53153
53253
|
|
53254
|
+
|
53154
53255
|
/**
|
53155
53256
|
* A class that describes the Dropdown question type.
|
53156
53257
|
*
|
@@ -53163,6 +53264,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53163
53264
|
_this.lastSelectedItemValue = null;
|
53164
53265
|
_this.minMaxChoices = [];
|
53165
53266
|
_this.onOpened = _this.addEvent();
|
53267
|
+
_this.ariaExpanded = "false";
|
53166
53268
|
_this.createLocalizableString("placeholder", _this, false, true);
|
53167
53269
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
53168
53270
|
_this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
|
@@ -53387,6 +53489,19 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53387
53489
|
.append(this.cssClasses.controlInputFieldComponent, !!this.inputFieldComponentName)
|
53388
53490
|
.toString();
|
53389
53491
|
};
|
53492
|
+
QuestionDropdownModel.prototype.updateCssClasses = function (res, css) {
|
53493
|
+
_super.prototype.updateCssClasses.call(this, res, css);
|
53494
|
+
if (this.useDropdownList) {
|
53495
|
+
updateListCssValues(res, css);
|
53496
|
+
}
|
53497
|
+
};
|
53498
|
+
QuestionDropdownModel.prototype.calcCssClasses = function (css) {
|
53499
|
+
var classes = _super.prototype.calcCssClasses.call(this, css);
|
53500
|
+
if (this.dropdownListModelValue) {
|
53501
|
+
this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
|
53502
|
+
}
|
53503
|
+
return classes;
|
53504
|
+
};
|
53390
53505
|
Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemLocText", {
|
53391
53506
|
get: function () {
|
53392
53507
|
var item = this.suggestedItem || this.selectedItem;
|
@@ -53424,9 +53539,14 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53424
53539
|
enumerable: false,
|
53425
53540
|
configurable: true
|
53426
53541
|
});
|
53542
|
+
Object.defineProperty(QuestionDropdownModel.prototype, "useDropdownList", {
|
53543
|
+
get: function () { return this.renderAs !== "select"; },
|
53544
|
+
enumerable: false,
|
53545
|
+
configurable: true
|
53546
|
+
});
|
53427
53547
|
Object.defineProperty(QuestionDropdownModel.prototype, "dropdownListModel", {
|
53428
53548
|
get: function () {
|
53429
|
-
if (this.
|
53549
|
+
if (this.useDropdownList && !this.dropdownListModelValue) {
|
53430
53550
|
this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
|
53431
53551
|
}
|
53432
53552
|
return this.dropdownListModelValue;
|
@@ -53439,8 +53559,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53439
53559
|
});
|
53440
53560
|
Object.defineProperty(QuestionDropdownModel.prototype, "popupModel", {
|
53441
53561
|
get: function () {
|
53442
|
-
|
53443
|
-
return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
|
53562
|
+
return this.dropdownListModel.popupModel;
|
53444
53563
|
},
|
53445
53564
|
enumerable: false,
|
53446
53565
|
configurable: true
|
@@ -53450,7 +53569,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53450
53569
|
};
|
53451
53570
|
QuestionDropdownModel.prototype.onSelectedItemValuesChangedHandler = function (newValue) {
|
53452
53571
|
var _a;
|
53453
|
-
(_a = this.
|
53572
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.setInputStringFromSelectedItem(newValue);
|
53454
53573
|
_super.prototype.onSelectedItemValuesChangedHandler.call(this, newValue);
|
53455
53574
|
};
|
53456
53575
|
QuestionDropdownModel.prototype.hasUnknownValue = function (val, includeOther, isFilteredChoices, checkEmptyValue) {
|
@@ -53476,7 +53595,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53476
53595
|
};
|
53477
53596
|
QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
|
53478
53597
|
_super.prototype.onVisibleChoicesChanged.call(this);
|
53479
|
-
if (
|
53598
|
+
if (!!this.dropdownListModelValue) {
|
53480
53599
|
this.dropdownListModel.updateItems();
|
53481
53600
|
}
|
53482
53601
|
};
|
@@ -53490,7 +53609,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53490
53609
|
var _a;
|
53491
53610
|
_super.prototype.clearValue.call(this, keepComment);
|
53492
53611
|
this.lastSelectedItemValue = null;
|
53493
|
-
(_a = this.
|
53612
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
|
53494
53613
|
};
|
53495
53614
|
QuestionDropdownModel.prototype.afterRenderCore = function (el) {
|
53496
53615
|
_super.prototype.afterRenderCore.call(this, el);
|
@@ -53511,19 +53630,18 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53511
53630
|
};
|
53512
53631
|
QuestionDropdownModel.prototype.supportEmptyValidation = function () { return true; };
|
53513
53632
|
QuestionDropdownModel.prototype.onBlurCore = function (event) {
|
53514
|
-
|
53515
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
53633
|
+
this.dropdownListModel.onBlur(event);
|
53516
53634
|
_super.prototype.onBlurCore.call(this, event);
|
53517
53635
|
};
|
53518
53636
|
QuestionDropdownModel.prototype.onFocusCore = function (event) {
|
53519
|
-
|
53520
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
53637
|
+
this.dropdownListModel.onFocus(event);
|
53521
53638
|
_super.prototype.onFocusCore.call(this, event);
|
53522
53639
|
};
|
53523
53640
|
QuestionDropdownModel.prototype.dispose = function () {
|
53524
53641
|
_super.prototype.dispose.call(this);
|
53525
53642
|
if (!!this.dropdownListModelValue) {
|
53526
53643
|
this.dropdownListModelValue.dispose();
|
53644
|
+
this.dropdownListModelValue = undefined;
|
53527
53645
|
}
|
53528
53646
|
};
|
53529
53647
|
question_dropdown_decorate([
|
@@ -53532,7 +53650,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53532
53650
|
question_dropdown_decorate([
|
53533
53651
|
jsonobject_property({
|
53534
53652
|
onSet: function (newValue, target) {
|
53535
|
-
if (!!target.
|
53653
|
+
if (!!target.dropdownListModelValue) {
|
53536
53654
|
target.dropdownListModel.setSearchEnabled(newValue);
|
53537
53655
|
}
|
53538
53656
|
}
|
@@ -53553,7 +53671,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53553
53671
|
question_dropdown_decorate([
|
53554
53672
|
jsonobject_property({
|
53555
53673
|
onSet: function (newValue, target) {
|
53556
|
-
if (!!target.
|
53674
|
+
if (!!target.dropdownListModelValue) {
|
53557
53675
|
target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
|
53558
53676
|
}
|
53559
53677
|
}
|
@@ -54647,37 +54765,26 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
|
|
54647
54765
|
};
|
54648
54766
|
Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
|
54649
54767
|
get: function () {
|
54650
|
-
|
54768
|
+
var _this = this;
|
54769
|
+
var func = function () {
|
54770
|
+
return _this.hasPlaceholder() ? _this.placeHolder : undefined;
|
54771
|
+
};
|
54772
|
+
return this.getPropertyValue("renderedPlaceholder", undefined, func);
|
54651
54773
|
},
|
54652
54774
|
enumerable: false,
|
54653
54775
|
configurable: true
|
54654
54776
|
});
|
54655
|
-
QuestionTextBase.prototype.setRenderedPlaceholder = function (val) {
|
54656
|
-
this.setPropertyValue("renderedPlaceholder", val);
|
54657
|
-
};
|
54658
54777
|
QuestionTextBase.prototype.onReadOnlyChanged = function () {
|
54659
54778
|
_super.prototype.onReadOnlyChanged.call(this);
|
54660
|
-
this.
|
54661
|
-
};
|
54662
|
-
QuestionTextBase.prototype.onSurveyLoad = function () {
|
54663
|
-
this.calcRenderedPlaceholder();
|
54664
|
-
_super.prototype.onSurveyLoad.call(this);
|
54779
|
+
this.resetRenderedPlaceholder();
|
54665
54780
|
};
|
54666
54781
|
QuestionTextBase.prototype.localeChanged = function () {
|
54667
54782
|
_super.prototype.localeChanged.call(this);
|
54668
|
-
this.
|
54669
|
-
};
|
54670
|
-
QuestionTextBase.prototype.setSurveyImpl = function (value, isLight) {
|
54671
|
-
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
54672
|
-
this.calcRenderedPlaceholder();
|
54783
|
+
this.resetRenderedPlaceholder();
|
54673
54784
|
};
|
54674
54785
|
QuestionTextBase.prototype.supportEmptyValidation = function () { return true; };
|
54675
|
-
QuestionTextBase.prototype.
|
54676
|
-
|
54677
|
-
if (!!res && !this.hasPlaceholder()) {
|
54678
|
-
res = undefined;
|
54679
|
-
}
|
54680
|
-
this.setRenderedPlaceholder(res);
|
54786
|
+
QuestionTextBase.prototype.resetRenderedPlaceholder = function () {
|
54787
|
+
this.resetPropertyValue("renderedPlaceholder");
|
54681
54788
|
};
|
54682
54789
|
QuestionTextBase.prototype.hasPlaceholder = function () {
|
54683
54790
|
return !this.isReadOnly;
|
@@ -54717,7 +54824,7 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
|
|
54717
54824
|
configurable: true
|
54718
54825
|
});
|
54719
54826
|
question_textbase_decorate([
|
54720
|
-
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.
|
54827
|
+
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedPlaceholder(); } })
|
54721
54828
|
], QuestionTextBase.prototype, "placeholder", void 0);
|
54722
54829
|
return QuestionTextBase;
|
54723
54830
|
}(question_Question));
|
@@ -54924,7 +55031,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
54924
55031
|
});
|
54925
55032
|
_this.registerPropertyChangedHandlers(["inputType", "size"], function () {
|
54926
55033
|
_this.updateInputSize();
|
54927
|
-
_this.
|
55034
|
+
_this.resetRenderedPlaceholder();
|
54928
55035
|
});
|
54929
55036
|
return _this;
|
54930
55037
|
}
|
@@ -58337,7 +58444,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
58337
58444
|
dropdownMultiSelectListModel_extends(DropdownMultiSelectListModel, _super);
|
58338
58445
|
function DropdownMultiSelectListModel(question, onSelectionChanged) {
|
58339
58446
|
var _this = _super.call(this, question, onSelectionChanged) || this;
|
58340
|
-
_this.popupCssClasses = "sv-multi-select-list";
|
58341
58447
|
_this.setHideSelectedItems(question.hideSelectedItems);
|
58342
58448
|
_this.syncFilterStringPlaceholder();
|
58343
58449
|
_this.closeOnSelect = question.closeOnSelect;
|
@@ -58371,6 +58477,7 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
58371
58477
|
return _super.prototype.getFocusFirstInputSelector.call(this);
|
58372
58478
|
}
|
58373
58479
|
};
|
58480
|
+
DropdownMultiSelectListModel.prototype.getPopupCssClasses = function () { return "sv-multi-select-list"; };
|
58374
58481
|
DropdownMultiSelectListModel.prototype.createListModel = function () {
|
58375
58482
|
var _this = this;
|
58376
58483
|
var visibleItems = this.getAvailableItems();
|
@@ -58404,7 +58511,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
58404
58511
|
elementId: this.listElementId
|
58405
58512
|
};
|
58406
58513
|
var res = new multiSelectListModel_MultiSelectListModel(listOptions);
|
58407
|
-
res.actions.forEach(function (a) { return a.disableTabStop = true; });
|
58408
58514
|
this.setOnTextSearchCallbackForListModel(res);
|
58409
58515
|
res.forceShowFilter = true;
|
58410
58516
|
return res;
|
@@ -58569,6 +58675,7 @@ var question_tagbox_decorate = (undefined && undefined.__decorate) || function (
|
|
58569
58675
|
|
58570
58676
|
|
58571
58677
|
|
58678
|
+
|
58572
58679
|
/**
|
58573
58680
|
* A class that describes the Multi-Select Dropdown (Tag Box) question type.
|
58574
58681
|
*
|
@@ -58580,6 +58687,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58580
58687
|
var _this = _super.call(this, name) || this;
|
58581
58688
|
_this.itemDisplayNameMap = {};
|
58582
58689
|
_this.onOpened = _this.addEvent();
|
58690
|
+
_this.ariaExpanded = "false";
|
58583
58691
|
_this.createLocalizableString("placeholder", _this, false, true);
|
58584
58692
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
58585
58693
|
_this.createLocalizableString("readOnlyText", _this, true);
|
@@ -58594,7 +58702,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58594
58702
|
var _a;
|
58595
58703
|
_super.prototype.locStrsChanged.call(this);
|
58596
58704
|
this.updateReadOnlyText();
|
58597
|
-
(_a = this.
|
58705
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
|
58598
58706
|
};
|
58599
58707
|
QuestionTagboxModel.prototype.updateReadOnlyText = function () {
|
58600
58708
|
this.readOnlyText = this.displayValue || this.placeholder;
|
@@ -58602,19 +58710,19 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58602
58710
|
QuestionTagboxModel.prototype.getDefaultItemComponent = function () {
|
58603
58711
|
return "";
|
58604
58712
|
};
|
58605
|
-
QuestionTagboxModel.prototype
|
58606
|
-
|
58607
|
-
|
58608
|
-
|
58609
|
-
|
58610
|
-
|
58611
|
-
|
58612
|
-
|
58613
|
-
|
58614
|
-
|
58615
|
-
|
58616
|
-
|
58617
|
-
};
|
58713
|
+
Object.defineProperty(QuestionTagboxModel.prototype, "dropdownListModel", {
|
58714
|
+
get: function () {
|
58715
|
+
if (!this.dropdownListModelValue) {
|
58716
|
+
this.dropdownListModelValue = new dropdownMultiSelectListModel_DropdownMultiSelectListModel(this);
|
58717
|
+
}
|
58718
|
+
return this.dropdownListModelValue;
|
58719
|
+
},
|
58720
|
+
set: function (val) {
|
58721
|
+
this.dropdownListModelValue = val;
|
58722
|
+
},
|
58723
|
+
enumerable: false,
|
58724
|
+
configurable: true
|
58725
|
+
});
|
58618
58726
|
Object.defineProperty(QuestionTagboxModel.prototype, "placeholder", {
|
58619
58727
|
/**
|
58620
58728
|
* A text displayed in the input field when it doesn't have a value.
|
@@ -58681,8 +58789,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58681
58789
|
});
|
58682
58790
|
Object.defineProperty(QuestionTagboxModel.prototype, "popupModel", {
|
58683
58791
|
get: function () {
|
58684
|
-
|
58685
|
-
return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
|
58792
|
+
return this.dropdownListModel.popupModel;
|
58686
58793
|
},
|
58687
58794
|
enumerable: false,
|
58688
58795
|
configurable: true
|
@@ -58698,6 +58805,17 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58698
58805
|
.append(this.cssClasses.controlPreview, this.isPreviewStyle)
|
58699
58806
|
.toString();
|
58700
58807
|
};
|
58808
|
+
QuestionTagboxModel.prototype.updateCssClasses = function (res, css) {
|
58809
|
+
_super.prototype.updateCssClasses.call(this, res, css);
|
58810
|
+
updateListCssValues(res, css);
|
58811
|
+
};
|
58812
|
+
QuestionTagboxModel.prototype.calcCssClasses = function (css) {
|
58813
|
+
var classes = _super.prototype.calcCssClasses.call(this, css);
|
58814
|
+
if (this.dropdownListModelValue) {
|
58815
|
+
this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
|
58816
|
+
}
|
58817
|
+
return classes;
|
58818
|
+
};
|
58701
58819
|
QuestionTagboxModel.prototype.onOpenedCallBack = function () {
|
58702
58820
|
this.onOpened.fire(this, { question: this, choices: this.choices });
|
58703
58821
|
};
|
@@ -58718,7 +58836,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58718
58836
|
};
|
58719
58837
|
QuestionTagboxModel.prototype.onVisibleChoicesChanged = function () {
|
58720
58838
|
_super.prototype.onVisibleChoicesChanged.call(this);
|
58721
|
-
if (this.
|
58839
|
+
if (!!this.dropdownListModelValue) {
|
58722
58840
|
this.dropdownListModel.updateItems();
|
58723
58841
|
}
|
58724
58842
|
};
|
@@ -58766,13 +58884,11 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58766
58884
|
};
|
58767
58885
|
QuestionTagboxModel.prototype.supportEmptyValidation = function () { return true; };
|
58768
58886
|
QuestionTagboxModel.prototype.onBlurCore = function (event) {
|
58769
|
-
|
58770
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
58887
|
+
this.dropdownListModel.onBlur(event);
|
58771
58888
|
_super.prototype.onBlurCore.call(this, event);
|
58772
58889
|
};
|
58773
58890
|
QuestionTagboxModel.prototype.onFocusCore = function (event) {
|
58774
|
-
|
58775
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
58891
|
+
this.dropdownListModel.onFocus(event);
|
58776
58892
|
_super.prototype.onFocusCore.call(this, event);
|
58777
58893
|
};
|
58778
58894
|
QuestionTagboxModel.prototype.allElementsSelected = function () {
|
@@ -58785,14 +58901,15 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58785
58901
|
};
|
58786
58902
|
QuestionTagboxModel.prototype.dispose = function () {
|
58787
58903
|
_super.prototype.dispose.call(this);
|
58788
|
-
if (!!this.
|
58789
|
-
this.
|
58904
|
+
if (!!this.dropdownListModelValue) {
|
58905
|
+
this.dropdownListModelValue.dispose();
|
58906
|
+
this.dropdownListModelValue = undefined;
|
58790
58907
|
}
|
58791
58908
|
};
|
58792
58909
|
QuestionTagboxModel.prototype.clearValue = function (keepComment) {
|
58793
58910
|
var _a;
|
58794
58911
|
_super.prototype.clearValue.call(this, keepComment);
|
58795
|
-
(_a = this.
|
58912
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
|
58796
58913
|
};
|
58797
58914
|
Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
|
58798
58915
|
get: function () {
|
@@ -58818,7 +58935,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58818
58935
|
question_tagbox_decorate([
|
58819
58936
|
jsonobject_property({
|
58820
58937
|
onSet: function (newValue, target) {
|
58821
|
-
if (!!target.
|
58938
|
+
if (!!target.dropdownListModelValue) {
|
58822
58939
|
target.dropdownListModel.setSearchEnabled(newValue);
|
58823
58940
|
}
|
58824
58941
|
}
|
@@ -58827,7 +58944,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58827
58944
|
question_tagbox_decorate([
|
58828
58945
|
jsonobject_property({
|
58829
58946
|
onSet: function (newValue, target) {
|
58830
|
-
if (!!target.
|
58947
|
+
if (!!target.dropdownListModelValue) {
|
58831
58948
|
target.dropdownListModel.setHideSelectedItems(newValue);
|
58832
58949
|
}
|
58833
58950
|
}
|
@@ -58836,7 +58953,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58836
58953
|
question_tagbox_decorate([
|
58837
58954
|
jsonobject_property({
|
58838
58955
|
onSet: function (newValue, target) {
|
58839
|
-
if (!!target.
|
58956
|
+
if (!!target.dropdownListModelValue) {
|
58840
58957
|
target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
|
58841
58958
|
}
|
58842
58959
|
}
|
@@ -60206,10 +60323,18 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
60206
60323
|
var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
60207
60324
|
question_comment_extends(QuestionCommentModel, _super);
|
60208
60325
|
function QuestionCommentModel(name) {
|
60209
|
-
|
60210
|
-
_this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
|
60211
|
-
return _this_1;
|
60326
|
+
return _super.call(this, name) || this;
|
60212
60327
|
}
|
60328
|
+
Object.defineProperty(QuestionCommentModel.prototype, "textAreaModel", {
|
60329
|
+
get: function () {
|
60330
|
+
if (!this.textAreaModelValue) {
|
60331
|
+
this.textAreaModelValue = new text_area_TextAreaModel(this.getTextAreaOptions());
|
60332
|
+
}
|
60333
|
+
return this.textAreaModelValue;
|
60334
|
+
},
|
60335
|
+
enumerable: false,
|
60336
|
+
configurable: true
|
60337
|
+
});
|
60213
60338
|
QuestionCommentModel.prototype.getTextAreaOptions = function () {
|
60214
60339
|
var _this_1 = this;
|
60215
60340
|
var _this = this;
|
@@ -61199,7 +61324,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
61199
61324
|
if (this.previewValue.length > 0 && !this.calculatedGapBetweenItems && !this.calculatedItemWidth) {
|
61200
61325
|
setTimeout(function () {
|
61201
61326
|
_this.processResponsiveness(0, _this._width);
|
61202
|
-
});
|
61327
|
+
}, 1);
|
61203
61328
|
}
|
61204
61329
|
this.prevPreviewLength = this.previewValue.length;
|
61205
61330
|
};
|
@@ -61422,7 +61547,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
61422
61547
|
};
|
61423
61548
|
QuestionFileModel.prototype.updateCurrentMode = function () {
|
61424
61549
|
var _this = this;
|
61425
|
-
if (!this.isDesignMode) {
|
61550
|
+
if (!this.isDesignMode && this.survey) {
|
61426
61551
|
if (this.sourceType !== "file") {
|
61427
61552
|
this.camera.hasCamera(function (res) {
|
61428
61553
|
_this.setPropertyValue("currentMode", res && _this.isDefaultV2Theme ? _this.sourceType : "file");
|
@@ -61637,9 +61762,12 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
61637
61762
|
};
|
61638
61763
|
QuestionFileModel.prototype.loadPreview = function (newValue) {
|
61639
61764
|
var _this = this;
|
61765
|
+
if (this.showPreview && this.prevLoadedPreviewValue === newValue)
|
61766
|
+
return;
|
61640
61767
|
this.previewValue.splice(0, this.previewValue.length);
|
61641
61768
|
if (!this.showPreview || !newValue)
|
61642
61769
|
return;
|
61770
|
+
this.prevLoadedPreviewValue = newValue;
|
61643
61771
|
var newValues = Array.isArray(newValue)
|
61644
61772
|
? newValue
|
61645
61773
|
: !!newValue
|
@@ -63265,7 +63393,8 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63265
63393
|
};
|
63266
63394
|
QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
|
63267
63395
|
if (!this.dropdownListModelValue) {
|
63268
|
-
this.
|
63396
|
+
this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
|
63397
|
+
this.ariaExpanded = "false";
|
63269
63398
|
}
|
63270
63399
|
};
|
63271
63400
|
QuestionRatingModel.prototype.getCompactRenderAs = function () {
|
@@ -63283,6 +63412,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63283
63412
|
},
|
63284
63413
|
set: function (val) {
|
63285
63414
|
this.dropdownListModelValue = val;
|
63415
|
+
this.ariaExpanded = !!val ? "false" : undefined;
|
63286
63416
|
this.updateElementCss();
|
63287
63417
|
},
|
63288
63418
|
enumerable: false,
|
@@ -63295,17 +63425,12 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63295
63425
|
};
|
63296
63426
|
QuestionRatingModel.prototype.updateCssClasses = function (res, css) {
|
63297
63427
|
_super.prototype.updateCssClasses.call(this, res, css);
|
63298
|
-
|
63299
|
-
var listCssClasses = {};
|
63300
|
-
mergeValues(css.list, listCssClasses);
|
63301
|
-
mergeValues(res.list, listCssClasses);
|
63302
|
-
res["list"] = listCssClasses;
|
63303
|
-
}
|
63428
|
+
updateListCssValues(res, css);
|
63304
63429
|
};
|
63305
63430
|
QuestionRatingModel.prototype.calcCssClasses = function (css) {
|
63306
63431
|
var classes = _super.prototype.calcCssClasses.call(this, css);
|
63307
|
-
if (this.
|
63308
|
-
this.
|
63432
|
+
if (this.dropdownListModelValue) {
|
63433
|
+
this.dropdownListModelValue.updateCssClasses(classes.popup, classes.list);
|
63309
63434
|
}
|
63310
63435
|
return classes;
|
63311
63436
|
};
|
@@ -63325,6 +63450,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63325
63450
|
_super.prototype.dispose.call(this);
|
63326
63451
|
if (!!this.dropdownListModelValue) {
|
63327
63452
|
this.dropdownListModelValue.dispose();
|
63453
|
+
this.dropdownListModelValue = undefined;
|
63328
63454
|
}
|
63329
63455
|
};
|
63330
63456
|
QuestionRatingModel.colorsCalculated = false;
|
@@ -68183,8 +68309,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68183
68309
|
enumerable: false,
|
68184
68310
|
configurable: true
|
68185
68311
|
});
|
68186
|
-
QuestionPanelDynamicModel.prototype.
|
68187
|
-
_super.prototype.
|
68312
|
+
QuestionPanelDynamicModel.prototype.onFirstRenderingCore = function () {
|
68313
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
68188
68314
|
this.buildPanelsFirstTime();
|
68189
68315
|
this.template.onFirstRendering();
|
68190
68316
|
for (var i = 0; i < this.panelsCore.length; i++) {
|
@@ -68471,12 +68597,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68471
68597
|
if (!this.isDesignMode && !this.isReadOnly && !this.isValueEmpty(panel.getValue())) {
|
68472
68598
|
this.runPanelsCondition([panel], this.getDataFilteredValues(), this.getDataFilteredProperties());
|
68473
68599
|
}
|
68474
|
-
panel.onFirstRendering();
|
68475
68600
|
var questions = panel.questions;
|
68476
68601
|
for (var i = 0; i < questions.length; i++) {
|
68477
68602
|
questions[i].setParentQuestion(this);
|
68478
68603
|
}
|
68479
|
-
|
68604
|
+
if (this.wasRendered) {
|
68605
|
+
panel.onFirstRendering();
|
68606
|
+
panel.locStrsChanged();
|
68607
|
+
}
|
68480
68608
|
panel.onGetFooterActionsCallback = function () {
|
68481
68609
|
return _this.getPanelActions(panel);
|
68482
68610
|
};
|
@@ -68572,7 +68700,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68572
68700
|
};
|
68573
68701
|
QuestionPanelDynamicModel.prototype.onSetData = function () {
|
68574
68702
|
_super.prototype.onSetData.call(this);
|
68575
|
-
if (this.useTemplatePanel) {
|
68703
|
+
if (!this.isLoadingFromJson && this.useTemplatePanel) {
|
68576
68704
|
this.setTemplatePanelSurveyImpl();
|
68577
68705
|
this.rebuildPanels();
|
68578
68706
|
}
|
@@ -72031,8 +72159,8 @@ Serializer.addClass("currencymask", [
|
|
72031
72159
|
|
72032
72160
|
var Version;
|
72033
72161
|
var ReleaseDate;
|
72034
|
-
Version = "" + "1.12.
|
72035
|
-
ReleaseDate = "" + "2024-12-
|
72162
|
+
Version = "" + "1.12.15";
|
72163
|
+
ReleaseDate = "" + "2024-12-16";
|
72036
72164
|
function checkLibraryVersion(ver, libraryName) {
|
72037
72165
|
if (Version != ver) {
|
72038
72166
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -83278,7 +83406,7 @@ var action_bar_SurveyActionBar = /** @class */ (function (_super) {
|
|
83278
83406
|
return;
|
83279
83407
|
var container = this.rootRef.current;
|
83280
83408
|
if (!!container) {
|
83281
|
-
this.model.initResponsivityManager(container, function (callback) { setTimeout(callback); });
|
83409
|
+
this.model.initResponsivityManager(container, function (callback) { setTimeout(callback, 100); });
|
83282
83410
|
}
|
83283
83411
|
};
|
83284
83412
|
SurveyActionBar.prototype.componentWillUnmount = function () {
|
@@ -83293,7 +83421,7 @@ var action_bar_SurveyActionBar = /** @class */ (function (_super) {
|
|
83293
83421
|
if (!!this.model.hasActions) {
|
83294
83422
|
var container = this.rootRef.current;
|
83295
83423
|
if (!!container) {
|
83296
|
-
this.model.initResponsivityManager(container, function (callback) { setTimeout(callback); });
|
83424
|
+
this.model.initResponsivityManager(container, function (callback) { setTimeout(callback, 100); });
|
83297
83425
|
}
|
83298
83426
|
}
|
83299
83427
|
};
|
@@ -89347,13 +89475,10 @@ var list_item_ListItem = /** @class */ (function (_super) {
|
|
89347
89475
|
var _this = this;
|
89348
89476
|
if (!this.item)
|
89349
89477
|
return null;
|
89350
|
-
var contentWrapStyle = {
|
89351
|
-
paddingInlineStart: this.model.getItemIndent(this.item)
|
89352
|
-
};
|
89353
89478
|
var className = this.model.getItemClass(this.item);
|
89354
89479
|
var itemContent = this.item.component || this.model.itemComponent;
|
89355
89480
|
var newElement = ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
|
89356
|
-
var contentWrap = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { style:
|
89481
|
+
var contentWrap = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { style: this.model.getItemStyle(this.item), className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText, onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
|
89357
89482
|
var separator = this.item.needSeparator ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
|
89358
89483
|
var isVisible = this.model.isItemVisible(this.item);
|
89359
89484
|
var style = {
|
@@ -90097,7 +90222,7 @@ var image_SurveyQuestionImage = /** @class */ (function (_super) {
|
|
90097
90222
|
}
|
90098
90223
|
var control = null;
|
90099
90224
|
if (this.question.renderedMode === "image") {
|
90100
|
-
control = (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml, alt: this.question.altText || this.question.title, width: this.question.renderedWidth, height: this.question.renderedHeight,
|
90225
|
+
control = (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml || null, alt: this.question.altText || this.question.title, width: this.question.renderedWidth, height: this.question.renderedHeight,
|
90101
90226
|
//alt={item.text || item.value}
|
90102
90227
|
style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
90103
90228
|
}
|
@@ -90425,7 +90550,7 @@ var list_item_content_ListItemContent = /** @class */ (function (_super) {
|
|
90425
90550
|
content.push(text);
|
90426
90551
|
}
|
90427
90552
|
if (this.item.markerIconName) {
|
90428
|
-
var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size:
|
90553
|
+
var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: "auto" });
|
90429
90554
|
content.push(icon);
|
90430
90555
|
}
|
90431
90556
|
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, content);
|
@@ -90528,7 +90653,7 @@ var logo_image_LogoImage = /** @class */ (function (_super) {
|
|
90528
90653
|
LogoImage.prototype.render = function () {
|
90529
90654
|
var content = [];
|
90530
90655
|
content.push(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { key: "logo-image", className: this.survey.logoClassNames },
|
90531
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", { className: this.survey.css.logoImage, src: this.survey.locLogo.renderedHtml, alt: this.survey.locTitle.renderedHtml, width: this.survey.renderedLogoWidth, height: this.survey.renderedLogoHeight, style: { objectFit: this.survey.logoFit, width: this.survey.renderedStyleLogoWidth, height: this.survey.renderedStyleLogoHeight } })));
|
90656
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("img", { className: this.survey.css.logoImage, src: this.survey.locLogo.renderedHtml || null, alt: this.survey.locTitle.renderedHtml, width: this.survey.renderedLogoWidth, height: this.survey.renderedLogoHeight, style: { objectFit: this.survey.logoFit, width: this.survey.renderedStyleLogoWidth, height: this.survey.renderedStyleLogoHeight } })));
|
90532
90657
|
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, content);
|
90533
90658
|
};
|
90534
90659
|
return LogoImage;
|