survey-react 1.12.15 → 1.12.16
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 +8 -8
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +15 -15
- 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 +75 -28
- package/survey.react.js +513 -278
- 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.16
|
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, 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 */
|
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, getLocaleStrings, 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__) {
|
@@ -1869,6 +1869,7 @@ __webpack_require__.d(__webpack_exports__, "englishStrings", function() { return
|
|
1869
1869
|
__webpack_require__.d(__webpack_exports__, "surveyLocalization", function() { return /* reexport */ surveyLocalization; });
|
1870
1870
|
__webpack_require__.d(__webpack_exports__, "surveyStrings", function() { return /* reexport */ surveyStrings; });
|
1871
1871
|
__webpack_require__.d(__webpack_exports__, "getLocaleString", function() { return /* reexport */ getLocaleString; });
|
1872
|
+
__webpack_require__.d(__webpack_exports__, "getLocaleStrings", function() { return /* reexport */ getLocaleStrings; });
|
1872
1873
|
__webpack_require__.d(__webpack_exports__, "setupLocale", function() { return /* reexport */ setupLocale; });
|
1873
1874
|
__webpack_require__.d(__webpack_exports__, "QuestionCustomWidget", function() { return /* reexport */ QuestionCustomWidget; });
|
1874
1875
|
__webpack_require__.d(__webpack_exports__, "CustomWidgetCollection", function() { return /* reexport */ questionCustomWidgets_CustomWidgetCollection; });
|
@@ -2960,6 +2961,9 @@ function getLocaleString(strName, locale) {
|
|
2960
2961
|
if (locale === void 0) { locale = null; }
|
2961
2962
|
return surveyLocalization.getString(strName, locale);
|
2962
2963
|
}
|
2964
|
+
function getLocaleStrings(locale) {
|
2965
|
+
return surveyLocalization.getLocaleStrings(locale);
|
2966
|
+
}
|
2963
2967
|
function setupLocale(localeConfig) {
|
2964
2968
|
surveyLocalization.setupLocale(localeConfig);
|
2965
2969
|
}
|
@@ -5596,6 +5600,24 @@ function dateDiff(params) {
|
|
5596
5600
|
return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
|
5597
5601
|
}
|
5598
5602
|
functionsfactory_FunctionFactory.Instance.register("dateDiff", dateDiff);
|
5603
|
+
function dateAdd(params) {
|
5604
|
+
if (!Array.isArray(params) || params.length < 2 || !params[0] || !params[1])
|
5605
|
+
return null;
|
5606
|
+
var date = createDate("function-dateAdd", params[0]);
|
5607
|
+
var valToAdd = params[1];
|
5608
|
+
var interval = params[2] || "days";
|
5609
|
+
if (interval === "days") {
|
5610
|
+
date.setDate(date.getDate() + valToAdd);
|
5611
|
+
}
|
5612
|
+
if (interval === "months") {
|
5613
|
+
date.setMonth(date.getMonth() + valToAdd);
|
5614
|
+
}
|
5615
|
+
if (interval === "years") {
|
5616
|
+
date.setFullYear(date.getFullYear() + valToAdd);
|
5617
|
+
}
|
5618
|
+
return date;
|
5619
|
+
}
|
5620
|
+
functionsfactory_FunctionFactory.Instance.register("dateAdd", dateAdd);
|
5599
5621
|
function isContainerReadyCore(container) {
|
5600
5622
|
if (!container)
|
5601
5623
|
return false;
|
@@ -13671,7 +13693,13 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
13671
13693
|
Object.defineProperty(SurveyElementCore.prototype, "isPage", {
|
13672
13694
|
/**
|
13673
13695
|
* Returns `true` if the survey element is a page.
|
13674
|
-
*
|
13696
|
+
*
|
13697
|
+
* This property returns `false` for [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) objects in the following cases:
|
13698
|
+
*
|
13699
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
13700
|
+
* - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
13701
|
+
*
|
13702
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
|
13675
13703
|
*/
|
13676
13704
|
get: function () { return false; },
|
13677
13705
|
enumerable: false,
|
@@ -13679,8 +13707,14 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
13679
13707
|
});
|
13680
13708
|
Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
|
13681
13709
|
/**
|
13682
|
-
* Returns `true` if the survey element is a panel.
|
13683
|
-
*
|
13710
|
+
* Returns `true` if the survey element is a panel or acts as one.
|
13711
|
+
*
|
13712
|
+
* This property returns `true` for `PageModel` objects in the following cases:
|
13713
|
+
*
|
13714
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
13715
|
+
* - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
13716
|
+
*
|
13717
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
|
13684
13718
|
*/
|
13685
13719
|
get: function () { return false; },
|
13686
13720
|
enumerable: false,
|
@@ -13689,7 +13723,6 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
13689
13723
|
Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
|
13690
13724
|
/**
|
13691
13725
|
* Returns `true` if the survey element is a question.
|
13692
|
-
* @see Base.getType
|
13693
13726
|
*/
|
13694
13727
|
get: function () { return false; },
|
13695
13728
|
enumerable: false,
|
@@ -13698,7 +13731,6 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
13698
13731
|
Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
|
13699
13732
|
/**
|
13700
13733
|
* Returns `true` if the element is a survey.
|
13701
|
-
* @see Base.getType
|
13702
13734
|
*/
|
13703
13735
|
get: function () { return false; },
|
13704
13736
|
enumerable: false,
|
@@ -14457,9 +14489,11 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14457
14489
|
SurveyElement.prototype.createCssClassesValue = function () {
|
14458
14490
|
var res = this.calcCssClasses(this.css);
|
14459
14491
|
this.setPropertyValue("cssClassesValue", res);
|
14492
|
+
this.onCalcCssClasses(res);
|
14460
14493
|
this.updateElementCssCore(this.cssClassesValue);
|
14461
14494
|
return res;
|
14462
14495
|
};
|
14496
|
+
SurveyElement.prototype.onCalcCssClasses = function (classes) { };
|
14463
14497
|
Object.defineProperty(SurveyElement.prototype, "cssClasses", {
|
14464
14498
|
/**
|
14465
14499
|
* Returns an object in which keys are UI elements and values are CSS classes applied to them.
|
@@ -14713,7 +14747,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14713
14747
|
SurveyElement.prototype.getPage = function (parent) {
|
14714
14748
|
while (parent && parent.parent)
|
14715
14749
|
parent = parent.parent;
|
14716
|
-
if (parent && parent.
|
14750
|
+
if (parent && parent.isPage)
|
14717
14751
|
return parent;
|
14718
14752
|
return null;
|
14719
14753
|
};
|
@@ -14765,7 +14799,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14765
14799
|
});
|
14766
14800
|
Object.defineProperty(SurveyElement.prototype, "hasParent", {
|
14767
14801
|
get: function () {
|
14768
|
-
return (this.parent && !this.parent.isPage
|
14802
|
+
return (this.parent && !this.parent.isPage) || (this.parent === undefined);
|
14769
14803
|
},
|
14770
14804
|
enumerable: false,
|
14771
14805
|
configurable: true
|
@@ -14952,9 +14986,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14952
14986
|
}
|
14953
14987
|
}
|
14954
14988
|
if (Object.keys(style).length == 0) {
|
14955
|
-
var minWidth = this.minWidth;
|
14956
|
-
if (minWidth != "auto")
|
14989
|
+
var minWidth = "" + this.minWidth;
|
14990
|
+
if (!!minWidth && minWidth != "auto") {
|
14991
|
+
if (minWidth.indexOf("px") != -1 && this.survey) {
|
14992
|
+
minWidth = minWidth.replace("px", "");
|
14993
|
+
var minWidthNum = parseFloat(minWidth);
|
14994
|
+
if (!isNaN(minWidthNum)) {
|
14995
|
+
minWidth = minWidthNum * this.survey.widthScale / 100;
|
14996
|
+
minWidth = "" + minWidth + "px";
|
14997
|
+
}
|
14998
|
+
}
|
14957
14999
|
minWidth = "min(100%, " + minWidth + ")";
|
15000
|
+
}
|
14958
15001
|
if (this.allowRootStyle && this.renderWidth) {
|
14959
15002
|
// style["width"] = this.renderWidth;
|
14960
15003
|
style["flexGrow"] = 1;
|
@@ -15025,6 +15068,8 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
15025
15068
|
return null;
|
15026
15069
|
};
|
15027
15070
|
SurveyElement.prototype.getCssTitle = function (cssClasses) {
|
15071
|
+
if (!cssClasses)
|
15072
|
+
return "";
|
15028
15073
|
var isExpandable = this.state !== "default";
|
15029
15074
|
var numInlineLimit = 4;
|
15030
15075
|
return new CssClassBuilder()
|
@@ -15924,18 +15969,18 @@ function confirmAction(message) {
|
|
15924
15969
|
return settings.confirmActionFunc(message);
|
15925
15970
|
return confirm(message);
|
15926
15971
|
}
|
15927
|
-
function confirmActionAsync(
|
15972
|
+
function confirmActionAsync(options) {
|
15928
15973
|
var callbackFunc = function (res) {
|
15929
15974
|
if (res)
|
15930
|
-
funcOnYes();
|
15931
|
-
else if (!!funcOnNo)
|
15932
|
-
funcOnNo();
|
15975
|
+
options.funcOnYes();
|
15976
|
+
else if (!!options.funcOnNo)
|
15977
|
+
options.funcOnNo();
|
15933
15978
|
};
|
15934
15979
|
if (!!settings && !!settings.confirmActionAsync) {
|
15935
|
-
if (settings.confirmActionAsync(message, callbackFunc,
|
15980
|
+
if (settings.confirmActionAsync(options.message, callbackFunc, options))
|
15936
15981
|
return;
|
15937
15982
|
}
|
15938
|
-
callbackFunc(confirmAction(message));
|
15983
|
+
callbackFunc(confirmAction(options.message));
|
15939
15984
|
}
|
15940
15985
|
function detectIEBrowser() {
|
15941
15986
|
var ua = navigator.userAgent;
|
@@ -16471,7 +16516,7 @@ var Logger = /** @class */ (function () {
|
|
16471
16516
|
return Logger;
|
16472
16517
|
}());
|
16473
16518
|
|
16474
|
-
function showConfirmDialog(message, callback,
|
16519
|
+
function showConfirmDialog(message, callback, options) {
|
16475
16520
|
var locStr = new localizablestring_LocalizableString(undefined);
|
16476
16521
|
var popupViewModel = settings.showDialog({
|
16477
16522
|
componentName: "sv-string-viewer",
|
@@ -16484,17 +16529,17 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
|
|
16484
16529
|
callback(false);
|
16485
16530
|
return false;
|
16486
16531
|
},
|
16487
|
-
title: message,
|
16532
|
+
title: message || options.message,
|
16488
16533
|
displayMode: "popup",
|
16489
16534
|
isFocusedContent: false,
|
16490
|
-
cssClass: "sv-popup--confirm
|
16491
|
-
}, rootElement);
|
16535
|
+
cssClass: options.cssClass || "sv-popup--confirm"
|
16536
|
+
}, options.rootElement);
|
16492
16537
|
var toolbar = popupViewModel.footerToolbar;
|
16493
16538
|
var applyBtn = toolbar.getActionById("apply");
|
16494
16539
|
var cancelBtn = toolbar.getActionById("cancel");
|
16495
|
-
cancelBtn.title = getLocaleString("cancel", locale);
|
16540
|
+
cancelBtn.title = getLocaleString("cancel", options.locale);
|
16496
16541
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
16497
|
-
applyBtn.title = applyTitle || getLocaleString("ok", locale);
|
16542
|
+
applyBtn.title = options.applyTitle || getLocaleString("ok", options.locale);
|
16498
16543
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
16499
16544
|
configConfirmDialog(popupViewModel);
|
16500
16545
|
return true;
|
@@ -17111,8 +17156,8 @@ var settings = {
|
|
17111
17156
|
* @param message A message to be displayed in the confirm dialog window.
|
17112
17157
|
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
17113
17158
|
*/
|
17114
|
-
confirmActionAsync: function (message, callback,
|
17115
|
-
return showConfirmDialog(message, callback,
|
17159
|
+
confirmActionAsync: function (message, callback, options) {
|
17160
|
+
return showConfirmDialog(message, callback, options);
|
17116
17161
|
},
|
17117
17162
|
/**
|
17118
17163
|
* A minimum width value for all survey elements.
|
@@ -18341,7 +18386,7 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
18341
18386
|
});
|
18342
18387
|
Object.defineProperty(ExpressionValidator.prototype, "isAsync", {
|
18343
18388
|
get: function () {
|
18344
|
-
if (!this.ensureConditionRunner())
|
18389
|
+
if (!this.ensureConditionRunner(false))
|
18345
18390
|
return false;
|
18346
18391
|
return this.conditionRunner.isAsync;
|
18347
18392
|
},
|
@@ -18360,8 +18405,12 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
18360
18405
|
if (name === void 0) { name = null; }
|
18361
18406
|
if (values === void 0) { values = null; }
|
18362
18407
|
if (properties === void 0) { properties = null; }
|
18363
|
-
if (!this.
|
18408
|
+
if (!this.expression)
|
18364
18409
|
return null;
|
18410
|
+
if (!!this.conditionRunner) {
|
18411
|
+
this.conditionRunner.onRunComplete = null;
|
18412
|
+
}
|
18413
|
+
this.ensureConditionRunner(true);
|
18365
18414
|
this.conditionRunner.onRunComplete = function (res) {
|
18366
18415
|
_this.isRunningValue = false;
|
18367
18416
|
if (!!_this.onAsyncCompleted) {
|
@@ -18384,14 +18433,15 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
|
|
18384
18433
|
ExpressionValidator.prototype.getDefaultErrorText = function (name) {
|
18385
18434
|
return this.getLocalizationFormatString("invalidExpression", this.expression);
|
18386
18435
|
};
|
18387
|
-
ExpressionValidator.prototype.ensureConditionRunner = function () {
|
18388
|
-
if (!!this.conditionRunner) {
|
18389
|
-
this.conditionRunner.expression = this.expression;
|
18390
|
-
return true;
|
18391
|
-
}
|
18436
|
+
ExpressionValidator.prototype.ensureConditionRunner = function (reNew) {
|
18392
18437
|
if (!this.expression)
|
18393
18438
|
return false;
|
18394
|
-
|
18439
|
+
if (reNew || !this.conditionRunner) {
|
18440
|
+
this.conditionRunner = new ConditionRunner(this.expression);
|
18441
|
+
}
|
18442
|
+
else {
|
18443
|
+
this.conditionRunner.expression = this.expression;
|
18444
|
+
}
|
18395
18445
|
return true;
|
18396
18446
|
};
|
18397
18447
|
Object.defineProperty(ExpressionValidator.prototype, "expression", {
|
@@ -20048,13 +20098,16 @@ var question_Question = /** @class */ (function (_super) {
|
|
20048
20098
|
this.copyCssClasses(classes, css.question);
|
20049
20099
|
this.copyCssClasses(classes.error, css.error);
|
20050
20100
|
this.updateCssClasses(classes, css);
|
20101
|
+
return classes;
|
20102
|
+
};
|
20103
|
+
Question.prototype.onCalcCssClasses = function (classes) {
|
20104
|
+
_super.prototype.onCalcCssClasses.call(this, classes);
|
20051
20105
|
if (this.survey) {
|
20052
20106
|
this.survey.updateQuestionCssClasses(this, classes);
|
20053
20107
|
}
|
20054
20108
|
if (this.onUpdateCssClassesCallback) {
|
20055
20109
|
this.onUpdateCssClassesCallback(classes);
|
20056
20110
|
}
|
20057
|
-
return classes;
|
20058
20111
|
};
|
20059
20112
|
Object.defineProperty(Question.prototype, "cssRoot", {
|
20060
20113
|
get: function () {
|
@@ -20240,18 +20293,33 @@ var question_Question = /** @class */ (function (_super) {
|
|
20240
20293
|
.toString();
|
20241
20294
|
};
|
20242
20295
|
Question.prototype.updateElementCss = function (reNew) {
|
20243
|
-
|
20244
|
-
|
20245
|
-
|
20296
|
+
if (this.wasRendered) {
|
20297
|
+
_super.prototype.updateElementCss.call(this, reNew);
|
20298
|
+
if (reNew) {
|
20299
|
+
this.updateQuestionCss(true);
|
20300
|
+
}
|
20301
|
+
}
|
20302
|
+
else {
|
20303
|
+
this.isRequireUpdateElements = true;
|
20246
20304
|
}
|
20247
20305
|
this.resetIndents();
|
20248
20306
|
};
|
20307
|
+
Question.prototype.onFirstRenderingCore = function () {
|
20308
|
+
if (this.isRequireUpdateElements) {
|
20309
|
+
this.isRequireUpdateElements = false;
|
20310
|
+
this.updateElementCss(true);
|
20311
|
+
}
|
20312
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
20313
|
+
};
|
20249
20314
|
Question.prototype.updateQuestionCss = function (reNew) {
|
20250
|
-
if (this.isLoadingFromJson ||
|
20251
|
-
!this.survey ||
|
20252
|
-
(reNew !== true && !this.cssClassesValue))
|
20315
|
+
if (this.isLoadingFromJson || !this.survey)
|
20253
20316
|
return;
|
20254
|
-
|
20317
|
+
if (this.wasRendered) {
|
20318
|
+
this.updateElementCssCore(this.cssClasses);
|
20319
|
+
}
|
20320
|
+
else {
|
20321
|
+
this.isRequireUpdateElements = true;
|
20322
|
+
}
|
20255
20323
|
};
|
20256
20324
|
Question.prototype.ensureElementCss = function () {
|
20257
20325
|
if (!this.cssClassesValue) {
|
@@ -33526,10 +33594,16 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
33526
33594
|
confirmDelete = this.isRequireConfirmOnRowDelete(index);
|
33527
33595
|
}
|
33528
33596
|
if (confirmDelete) {
|
33529
|
-
confirmActionAsync(
|
33530
|
-
|
33531
|
-
|
33532
|
-
|
33597
|
+
confirmActionAsync({
|
33598
|
+
message: this.confirmDeleteText,
|
33599
|
+
funcOnYes: function () {
|
33600
|
+
_this.removeRowAsync(index, row);
|
33601
|
+
onRowRemoved && onRowRemoved();
|
33602
|
+
},
|
33603
|
+
locale: this.getLocale(),
|
33604
|
+
rootElement: this.survey.rootElement,
|
33605
|
+
cssClass: this.cssClasses.confirmDialog
|
33606
|
+
});
|
33533
33607
|
return;
|
33534
33608
|
}
|
33535
33609
|
this.removeRowAsync(index, row);
|
@@ -34255,7 +34329,8 @@ var defaultV2Css = {
|
|
34255
34329
|
noPointerEventsMode: "sd-question--no-pointer-events",
|
34256
34330
|
errorsContainer: "sd-element__erbox sd-question__erbox",
|
34257
34331
|
errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
|
34258
|
-
errorsContainerBottom: "sd-question__erbox--below-question"
|
34332
|
+
errorsContainerBottom: "sd-question__erbox--below-question",
|
34333
|
+
confirmDialog: "sd-popup--confirm sv-popup--confirm"
|
34259
34334
|
},
|
34260
34335
|
image: {
|
34261
34336
|
mainRoot: "sd-question sd-question--image",
|
@@ -36188,7 +36263,6 @@ var panel_spreadArray = (undefined && undefined.__spreadArray) || function (to,
|
|
36188
36263
|
|
36189
36264
|
|
36190
36265
|
|
36191
|
-
|
36192
36266
|
var panel_QuestionRowModel = /** @class */ (function (_super) {
|
36193
36267
|
panel_extends(QuestionRowModel, _super);
|
36194
36268
|
function QuestionRowModel(panel) {
|
@@ -36791,9 +36865,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36791
36865
|
});
|
36792
36866
|
Object.defineProperty(PanelModelBase.prototype, "parent", {
|
36793
36867
|
/**
|
36794
|
-
* Returns a survey element (panel or page) that contains this panel and allows you to move
|
36868
|
+
* Returns a survey element (panel or page) that contains this panel and allows you to move the panel to a different survey element.
|
36869
|
+
*
|
36870
|
+
* For `PageModel` objects, the `parent` property is `null`, except in the following cases:
|
36871
|
+
*
|
36872
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
36873
|
+
* - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
|
36795
36874
|
*
|
36796
|
-
*
|
36875
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and the `parent` property contains this object.
|
36797
36876
|
*/
|
36798
36877
|
get: function () {
|
36799
36878
|
return this.getPropertyValue("parent", null);
|
@@ -36876,10 +36955,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36876
36955
|
configurable: true
|
36877
36956
|
});
|
36878
36957
|
Object.defineProperty(PanelModelBase.prototype, "isPanel", {
|
36879
|
-
/**
|
36880
|
-
* Returns `true` if the survey element is a panel.
|
36881
|
-
* @see Base.getType
|
36882
|
-
*/
|
36883
36958
|
get: function () {
|
36884
36959
|
return false;
|
36885
36960
|
},
|
@@ -37621,11 +37696,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37621
37696
|
PanelModelBase.prototype.updateRows = function () {
|
37622
37697
|
if (this.isLoadingFromJson)
|
37623
37698
|
return;
|
37624
|
-
|
37625
|
-
if (
|
37626
|
-
|
37699
|
+
this.getElementsForRows().forEach(function (el) {
|
37700
|
+
if (el.isPanel) {
|
37701
|
+
el.updateRows();
|
37627
37702
|
}
|
37628
|
-
}
|
37703
|
+
});
|
37629
37704
|
this.onRowsChanged();
|
37630
37705
|
};
|
37631
37706
|
Object.defineProperty(PanelModelBase.prototype, "rows", {
|
@@ -37734,7 +37809,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37734
37809
|
var _this = this;
|
37735
37810
|
var survey = this.survey;
|
37736
37811
|
var fireNotification = this.canFireAddRemoveNotifications(element);
|
37737
|
-
|
37812
|
+
if (!!this.surveyImpl) {
|
37813
|
+
element.setSurveyImpl(this.surveyImpl);
|
37814
|
+
}
|
37738
37815
|
element.parent = this;
|
37739
37816
|
this.markQuestionListDirty();
|
37740
37817
|
if (this.canBuildRows()) {
|
@@ -37760,8 +37837,8 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37760
37837
|
};
|
37761
37838
|
PanelModelBase.prototype.onRemoveElement = function (element) {
|
37762
37839
|
element.parent = null;
|
37840
|
+
this.unregisterElementPropertiesChanged(element);
|
37763
37841
|
this.markQuestionListDirty();
|
37764
|
-
element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
|
37765
37842
|
this.updateRowsOnElementRemoved(element);
|
37766
37843
|
if (this.isRandomizing)
|
37767
37844
|
return;
|
@@ -37770,6 +37847,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37770
37847
|
this.removeElementCallback(element);
|
37771
37848
|
this.onElementVisibilityChanged(this);
|
37772
37849
|
};
|
37850
|
+
PanelModelBase.prototype.unregisterElementPropertiesChanged = function (element) {
|
37851
|
+
element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
|
37852
|
+
};
|
37773
37853
|
PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
|
37774
37854
|
if (!this.canFireAddRemoveNotifications(element))
|
37775
37855
|
return;
|
@@ -37814,19 +37894,21 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37814
37894
|
PanelModelBase.prototype.buildRows = function () {
|
37815
37895
|
if (!this.canBuildRows())
|
37816
37896
|
return [];
|
37817
|
-
var
|
37818
|
-
|
37819
|
-
|
37897
|
+
var res = new Array();
|
37898
|
+
var els = this.getElementsForRows();
|
37899
|
+
for (var i = 0; i < els.length; i++) {
|
37900
|
+
var el = els[i];
|
37820
37901
|
var isNewRow = i == 0 || el.startWithNewLine;
|
37821
|
-
var row = isNewRow ? this.createRowAndSetLazy(
|
37902
|
+
var row = isNewRow ? this.createRowAndSetLazy(res.length) : res[res.length - 1];
|
37822
37903
|
if (isNewRow)
|
37823
|
-
|
37904
|
+
res.push(row);
|
37824
37905
|
row.addElement(el);
|
37825
37906
|
}
|
37826
|
-
|
37827
|
-
|
37828
|
-
|
37829
|
-
|
37907
|
+
res.forEach(function (row) { return row.updateVisible(); });
|
37908
|
+
return res;
|
37909
|
+
};
|
37910
|
+
PanelModelBase.prototype.getElementsForRows = function () {
|
37911
|
+
return this.elements;
|
37830
37912
|
};
|
37831
37913
|
PanelModelBase.prototype.getDragDropInfo = function () {
|
37832
37914
|
var page = this.getPage(this.parent);
|
@@ -38389,10 +38471,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
38389
38471
|
}
|
38390
38472
|
this.rows.splice(0, this.rows.length);
|
38391
38473
|
}
|
38474
|
+
this.disposeElements();
|
38475
|
+
this.elements.splice(0, this.elements.length);
|
38476
|
+
};
|
38477
|
+
PanelModelBase.prototype.disposeElements = function () {
|
38392
38478
|
for (var i = 0; i < this.elements.length; i++) {
|
38393
38479
|
this.elements[i].dispose();
|
38394
38480
|
}
|
38395
|
-
this.elements.splice(0, this.elements.length);
|
38396
38481
|
};
|
38397
38482
|
PanelModelBase.panelCounter = 100;
|
38398
38483
|
panel_decorate([
|
@@ -38445,7 +38530,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38445
38530
|
});
|
38446
38531
|
PanelModel.prototype.getSurvey = function (live) {
|
38447
38532
|
if (live === void 0) { live = false; }
|
38448
|
-
if (live) {
|
38533
|
+
if (live && this.isPanel) {
|
38449
38534
|
return !!this.parent ? this.parent.getSurvey(live) : null;
|
38450
38535
|
}
|
38451
38536
|
return _super.prototype.getSurvey.call(this, live);
|
@@ -38596,6 +38681,8 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38596
38681
|
return locTitleValue;
|
38597
38682
|
};
|
38598
38683
|
PanelModel.prototype.beforeSetVisibleIndex = function (index) {
|
38684
|
+
if (this.isPage)
|
38685
|
+
return _super.prototype.beforeSetVisibleIndex.call(this, index);
|
38599
38686
|
var visibleIndex = -1;
|
38600
38687
|
if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty || this.hasParentInQuestionIndex())) {
|
38601
38688
|
visibleIndex = index;
|
@@ -38627,7 +38714,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38627
38714
|
}
|
38628
38715
|
};
|
38629
38716
|
PanelModel.prototype.getRenderedTitle = function (str) {
|
38630
|
-
if (!str) {
|
38717
|
+
if (this.isPanel && !str) {
|
38631
38718
|
if (this.isCollapsed || this.isExpanded)
|
38632
38719
|
return this.name;
|
38633
38720
|
if (this.isDesignMode)
|
@@ -38752,11 +38839,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38752
38839
|
return this.footerToolbarValue;
|
38753
38840
|
};
|
38754
38841
|
Object.defineProperty(PanelModel.prototype, "hasEditButton", {
|
38755
|
-
get: function () {
|
38756
|
-
if (this.survey && this.survey.state === "preview")
|
38757
|
-
return (this.parent && this.parent instanceof page_PageModel);
|
38758
|
-
return false;
|
38759
|
-
},
|
38842
|
+
get: function () { return false; },
|
38760
38843
|
enumerable: false,
|
38761
38844
|
configurable: true
|
38762
38845
|
});
|
@@ -38765,19 +38848,16 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38765
38848
|
return;
|
38766
38849
|
this.survey.cancelPreviewByPage(this);
|
38767
38850
|
};
|
38768
|
-
PanelModel.prototype.canShowTitle = function (survey) {
|
38769
|
-
var page = this.originalPage;
|
38770
|
-
if (!!page)
|
38771
|
-
return page.canShowTitle(survey);
|
38772
|
-
return _super.prototype.canShowTitle.call(this, survey);
|
38773
|
-
};
|
38774
38851
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
38775
38852
|
get: function () {
|
38776
|
-
return this.
|
38853
|
+
return this.getCssPanelTitle();
|
38777
38854
|
},
|
38778
38855
|
enumerable: false,
|
38779
38856
|
configurable: true
|
38780
38857
|
});
|
38858
|
+
PanelModel.prototype.getCssPanelTitle = function () {
|
38859
|
+
return this.getCssTitle(this.cssClasses.panel);
|
38860
|
+
};
|
38781
38861
|
PanelModel.prototype.getCssTitleExpandableSvg = function () {
|
38782
38862
|
if (this.state === "default")
|
38783
38863
|
return null;
|
@@ -38791,6 +38871,8 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38791
38871
|
configurable: true
|
38792
38872
|
});
|
38793
38873
|
PanelModel.prototype.getCssError = function (cssClasses) {
|
38874
|
+
if (this.isPage)
|
38875
|
+
return _super.prototype.getCssError.call(this, cssClasses);
|
38794
38876
|
var builder = new CssClassBuilder()
|
38795
38877
|
.append(_super.prototype.getCssError.call(this, cssClasses))
|
38796
38878
|
.append(cssClasses.panel.errorsContainer);
|
@@ -38821,10 +38903,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38821
38903
|
};
|
38822
38904
|
Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
|
38823
38905
|
get: function () {
|
38824
|
-
|
38825
|
-
if (!!panel.originalPage)
|
38826
|
-
return true;
|
38827
|
-
return panel.survey.isShowingPreview && panel.survey.isSinglePage && !!panel.parent && !!panel.parent.originalPage;
|
38906
|
+
return false;
|
38828
38907
|
},
|
38829
38908
|
enumerable: false,
|
38830
38909
|
configurable: true
|
@@ -38864,7 +38943,9 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38864
38943
|
PanelModel.prototype.afterRenderCore = function (element) {
|
38865
38944
|
var _a;
|
38866
38945
|
_super.prototype.afterRenderCore.call(this, element);
|
38867
|
-
(
|
38946
|
+
if (this.isPanel) {
|
38947
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.afterRenderPanel(this, element);
|
38948
|
+
}
|
38868
38949
|
};
|
38869
38950
|
return PanelModel;
|
38870
38951
|
}(panel_PanelModelBase));
|
@@ -38912,27 +38993,17 @@ Serializer.addClass("panelbase", [
|
|
38912
38993
|
return new panel_PanelModelBase();
|
38913
38994
|
});
|
38914
38995
|
Serializer.addClass("panel", [
|
38915
|
-
{
|
38916
|
-
name: "state",
|
38917
|
-
default: "default",
|
38918
|
-
choices: ["default", "collapsed", "expanded"],
|
38919
|
-
},
|
38996
|
+
{ name: "state", default: "default", choices: ["default", "collapsed", "expanded"] },
|
38920
38997
|
{ name: "isRequired:switch", overridingProperty: "requiredIf" },
|
38921
|
-
{
|
38922
|
-
name: "requiredErrorText:text",
|
38923
|
-
serializationProperty: "locRequiredErrorText",
|
38924
|
-
},
|
38998
|
+
{ name: "requiredErrorText:text", serializationProperty: "locRequiredErrorText" },
|
38925
38999
|
{ name: "startWithNewLine:boolean", default: true },
|
38926
|
-
"width",
|
39000
|
+
{ name: "width" },
|
38927
39001
|
{ name: "minWidth", defaultFunc: function () { return "auto"; } },
|
38928
39002
|
{ name: "maxWidth", defaultFunc: function () { return settings.maxWidth; } },
|
38929
|
-
{
|
38930
|
-
name: "colSpan:number", visible: false,
|
38931
|
-
onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
|
38932
|
-
},
|
39003
|
+
{ name: "colSpan:number", visible: false, onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); } },
|
38933
39004
|
{
|
38934
39005
|
name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
|
38935
|
-
visibleIf: function (obj) { return !!obj
|
39006
|
+
visibleIf: function (obj) { return !!obj.survey && obj.survey.gridLayoutEnabled; }
|
38936
39007
|
},
|
38937
39008
|
{ name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
|
38938
39009
|
{ name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
|
@@ -38952,13 +39023,9 @@ Serializer.addClass("panel", [
|
|
38952
39023
|
: [];
|
38953
39024
|
},
|
38954
39025
|
},
|
38955
|
-
"showNumber:boolean",
|
38956
|
-
{
|
38957
|
-
|
38958
|
-
default: "default",
|
38959
|
-
choices: ["default", "onpanel", "off"],
|
38960
|
-
},
|
38961
|
-
"questionStartIndex",
|
39026
|
+
{ name: "showNumber:boolean" },
|
39027
|
+
{ name: "showQuestionNumbers", default: "default", choices: ["default", "onpanel", "off"] },
|
39028
|
+
{ name: "questionStartIndex", visibleIf: function (obj) { return obj.isPanel; } },
|
38962
39029
|
{ name: "allowAdaptiveActions:boolean", default: true, visible: false },
|
38963
39030
|
], function () {
|
38964
39031
|
return new panel_PanelModel();
|
@@ -39234,12 +39301,61 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39234
39301
|
return this.name;
|
39235
39302
|
};
|
39236
39303
|
Object.defineProperty(PageModel.prototype, "isPage", {
|
39304
|
+
get: function () {
|
39305
|
+
return !this.isPanel;
|
39306
|
+
},
|
39307
|
+
enumerable: false,
|
39308
|
+
configurable: true
|
39309
|
+
});
|
39310
|
+
Object.defineProperty(PageModel.prototype, "isPanel", {
|
39311
|
+
get: function () {
|
39312
|
+
return !!this.parent;
|
39313
|
+
},
|
39314
|
+
enumerable: false,
|
39315
|
+
configurable: true
|
39316
|
+
});
|
39317
|
+
Object.defineProperty(PageModel.prototype, "showPanelAsPage", {
|
39237
39318
|
get: function () {
|
39238
39319
|
return true;
|
39239
39320
|
},
|
39240
39321
|
enumerable: false,
|
39241
39322
|
configurable: true
|
39242
39323
|
});
|
39324
|
+
Object.defineProperty(PageModel.prototype, "hasEditButton", {
|
39325
|
+
get: function () {
|
39326
|
+
return this.isPanel && this.survey && this.survey.state === "preview"
|
39327
|
+
&& !!this.parent && !this.parent.isPanel;
|
39328
|
+
},
|
39329
|
+
enumerable: false,
|
39330
|
+
configurable: true
|
39331
|
+
});
|
39332
|
+
PageModel.prototype.getElementsForRows = function () {
|
39333
|
+
var _a;
|
39334
|
+
var q = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.currentSingleQuestion;
|
39335
|
+
if (!!q) {
|
39336
|
+
if (q.page === this)
|
39337
|
+
return [q];
|
39338
|
+
return [];
|
39339
|
+
}
|
39340
|
+
return _super.prototype.getElementsForRows.call(this);
|
39341
|
+
};
|
39342
|
+
PageModel.prototype.disposeElements = function () {
|
39343
|
+
if (!this.isPageContainer) {
|
39344
|
+
_super.prototype.disposeElements.call(this);
|
39345
|
+
}
|
39346
|
+
};
|
39347
|
+
PageModel.prototype.onRemoveElement = function (element) {
|
39348
|
+
if (this.isPageContainer) {
|
39349
|
+
element.parent = null;
|
39350
|
+
this.unregisterElementPropertiesChanged(element);
|
39351
|
+
}
|
39352
|
+
else {
|
39353
|
+
_super.prototype.onRemoveElement.call(this, element);
|
39354
|
+
}
|
39355
|
+
};
|
39356
|
+
PageModel.prototype.getTemplate = function () {
|
39357
|
+
return this.isPanel ? "panel" : _super.prototype.getTemplate.call(this);
|
39358
|
+
};
|
39243
39359
|
Object.defineProperty(PageModel.prototype, "no", {
|
39244
39360
|
get: function () {
|
39245
39361
|
if (!this.canShowPageNumber() || !this.survey)
|
@@ -39377,6 +39493,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39377
39493
|
configurable: true
|
39378
39494
|
});
|
39379
39495
|
PageModel.prototype.calcCssClasses = function (css) {
|
39496
|
+
if (this.isPanel)
|
39497
|
+
return _super.prototype.calcCssClasses.call(this, css);
|
39380
39498
|
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowReplace: "" };
|
39381
39499
|
this.copyCssClasses(classes.page, css.page);
|
39382
39500
|
this.copyCssClasses(classes.error, css.error);
|
@@ -39415,20 +39533,18 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39415
39533
|
}
|
39416
39534
|
return classes;
|
39417
39535
|
};
|
39418
|
-
|
39419
|
-
|
39420
|
-
|
39421
|
-
|
39422
|
-
return
|
39423
|
-
|
39424
|
-
|
39425
|
-
|
39426
|
-
|
39427
|
-
configurable: true
|
39428
|
-
});
|
39536
|
+
PageModel.prototype.getCssPanelTitle = function () {
|
39537
|
+
if (this.isPanel)
|
39538
|
+
return _super.prototype.getCssPanelTitle.call(this);
|
39539
|
+
if (!this.cssClasses.page)
|
39540
|
+
return "";
|
39541
|
+
return new CssClassBuilder()
|
39542
|
+
.append(this.cssClasses.page.title)
|
39543
|
+
.toString();
|
39544
|
+
};
|
39429
39545
|
Object.defineProperty(PageModel.prototype, "cssRoot", {
|
39430
39546
|
get: function () {
|
39431
|
-
if (!this.cssClasses.page || !this.survey)
|
39547
|
+
if (this.isPanel || !this.cssClasses.page || !this.survey)
|
39432
39548
|
return "";
|
39433
39549
|
return new CssClassBuilder()
|
39434
39550
|
.append(this.cssClasses.page.root)
|
@@ -39440,6 +39556,8 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39440
39556
|
configurable: true
|
39441
39557
|
});
|
39442
39558
|
PageModel.prototype.getCssError = function (cssClasses) {
|
39559
|
+
if (this.isPanel)
|
39560
|
+
return _super.prototype.getCssError.call(this, cssClasses);
|
39443
39561
|
return new CssClassBuilder()
|
39444
39562
|
.append(_super.prototype.getCssError.call(this, cssClasses))
|
39445
39563
|
.append(cssClasses.page.errorsContainer).toString();
|
@@ -39616,7 +39734,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39616
39734
|
jsonobject_property({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
|
39617
39735
|
], PageModel.prototype, "num", void 0);
|
39618
39736
|
return PageModel;
|
39619
|
-
}(
|
39737
|
+
}(panel_PanelModel));
|
39620
39738
|
|
39621
39739
|
Serializer.addClass("page", [
|
39622
39740
|
{
|
@@ -39641,9 +39759,25 @@ Serializer.addClass("page", [
|
|
39641
39759
|
},
|
39642
39760
|
{ name: "title:text", serializationProperty: "locTitle" },
|
39643
39761
|
{ name: "description:text", serializationProperty: "locDescription" },
|
39762
|
+
{ name: "state", visible: false },
|
39763
|
+
{ name: "isRequired", visible: false },
|
39764
|
+
{ name: "startWithNewLine", visible: false },
|
39765
|
+
{ name: "width", visible: false },
|
39766
|
+
{ name: "minWidth", visible: false },
|
39767
|
+
{ name: "maxWidth", visible: false },
|
39768
|
+
{ name: "colSpan", visible: false, isSerializable: false },
|
39769
|
+
{ name: "effectiveColSpan:number", visible: false, isSerializable: false },
|
39770
|
+
{ name: "innerIndent", visible: false },
|
39771
|
+
{ name: "indent", visible: false },
|
39772
|
+
{ name: "page", visible: false, isSerializable: false },
|
39773
|
+
{ name: "showNumber", visible: false },
|
39774
|
+
{ name: "showQuestionNumbers", visible: false },
|
39775
|
+
{ name: "questionStartIndex", visible: false },
|
39776
|
+
{ name: "allowAdaptiveActions", visible: false },
|
39777
|
+
{ name: "requiredErrorText:text", serializationProperty: "locRequiredErrorText", visible: false },
|
39644
39778
|
], function () {
|
39645
39779
|
return new page_PageModel();
|
39646
|
-
}, "
|
39780
|
+
}, "panel");
|
39647
39781
|
|
39648
39782
|
// CONCATENATED MODULE: ./packages/survey-core/src/progress-buttons.ts
|
39649
39783
|
var progress_buttons_extends = (undefined && undefined.__extends) || (function () {
|
@@ -39885,16 +40019,27 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
|
|
39885
40019
|
|
39886
40020
|
|
39887
40021
|
|
39888
|
-
|
39889
40022
|
function tryFocusPage(survey, panel) {
|
39890
40023
|
if (survey.isDesignMode)
|
39891
40024
|
return true;
|
39892
40025
|
panel.focusFirstQuestion();
|
39893
40026
|
return true;
|
39894
40027
|
}
|
40028
|
+
function getPage(question) {
|
40029
|
+
if (!!question.parentQuestion) {
|
40030
|
+
return getPage(question.parentQuestion);
|
40031
|
+
}
|
40032
|
+
var parent = question.parent;
|
40033
|
+
while (parent && parent.getType() !== "page" && parent.parent) {
|
40034
|
+
parent = parent.parent;
|
40035
|
+
}
|
40036
|
+
if (parent && parent.getType() === "page") {
|
40037
|
+
return parent;
|
40038
|
+
}
|
40039
|
+
return null;
|
40040
|
+
}
|
39895
40041
|
function createTOCListModel(survey, onAction) {
|
39896
40042
|
var items = getTOCItems(survey, onAction);
|
39897
|
-
var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items[0];
|
39898
40043
|
var listOptions = {
|
39899
40044
|
items: items,
|
39900
40045
|
onSelectionChanged: function (item) {
|
@@ -39902,15 +40047,20 @@ function createTOCListModel(survey, onAction) {
|
|
39902
40047
|
listModel.selectedItem = item;
|
39903
40048
|
}
|
39904
40049
|
},
|
39905
|
-
allowSelection: true,
|
39906
40050
|
searchEnabled: false,
|
39907
40051
|
locOwner: survey,
|
39908
|
-
selectedItem: selectedItem
|
39909
40052
|
};
|
39910
40053
|
var listModel = new list_ListModel(listOptions);
|
39911
40054
|
listModel.allowSelection = false;
|
40055
|
+
var updateSelectedItem = function (currentPage, defaultSelection) {
|
40056
|
+
listModel.selectedItem = !!currentPage && listModel.actions.filter(function (i) { return i.id === currentPage.name; })[0] || defaultSelection;
|
40057
|
+
};
|
40058
|
+
updateSelectedItem(survey.currentPage, items[0]);
|
39912
40059
|
survey.onCurrentPageChanged.add(function (s, o) {
|
39913
|
-
|
40060
|
+
updateSelectedItem(survey.currentPage);
|
40061
|
+
});
|
40062
|
+
survey.onFocusInQuestion.add(function (s, o) {
|
40063
|
+
updateSelectedItem(getPage(o.question));
|
39914
40064
|
});
|
39915
40065
|
survey.registerFunctionOnPropertyValueChanged("pages", function () {
|
39916
40066
|
listModel.setItems(getTOCItems(survey, onAction));
|
@@ -39918,8 +40068,7 @@ function createTOCListModel(survey, onAction) {
|
|
39918
40068
|
return listModel;
|
39919
40069
|
}
|
39920
40070
|
function getTOCItems(survey, onAction) {
|
39921
|
-
var
|
39922
|
-
var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
|
40071
|
+
var pagesSource = survey.pages;
|
39923
40072
|
var items = (pagesSource || []).map(function (page) {
|
39924
40073
|
return new action_Action({
|
39925
40074
|
id: page.name,
|
@@ -39927,7 +40076,7 @@ function getTOCItems(survey, onAction) {
|
|
39927
40076
|
action: function () {
|
39928
40077
|
DomDocumentHelper.activeElementBlur();
|
39929
40078
|
!!onAction && onAction();
|
39930
|
-
if (page
|
40079
|
+
if (page.isPage) {
|
39931
40080
|
return survey.tryNavigateToPage(page);
|
39932
40081
|
}
|
39933
40082
|
return tryFocusPage(survey, page);
|
@@ -43640,6 +43789,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43640
43789
|
get: function () {
|
43641
43790
|
if (this.isDesignMode)
|
43642
43791
|
return this.pages;
|
43792
|
+
if (!!this.pageContainerValue && (this.isShowingPreview || this.isSinglePage))
|
43793
|
+
return [this.pageContainerValue];
|
43643
43794
|
var result = new Array();
|
43644
43795
|
for (var i = 0; i < this.pages.length; i++) {
|
43645
43796
|
if (this.isPageInVisibleList(this.pages[i])) {
|
@@ -43773,7 +43924,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43773
43924
|
return false;
|
43774
43925
|
if (index === this.currentPageNo)
|
43775
43926
|
return false;
|
43776
|
-
if (index < this.currentPageNo || this.
|
43927
|
+
if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages) {
|
43777
43928
|
this.currentPageNo = index;
|
43778
43929
|
return true;
|
43779
43930
|
}
|
@@ -44105,6 +44256,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44105
44256
|
this.onFirstPageIsStartedChanged();
|
44106
44257
|
if (goToFirstPage) {
|
44107
44258
|
this.currentPage = this.firstVisiblePage;
|
44259
|
+
if (this.currentSingleQuestion) {
|
44260
|
+
var questions = this.getAllQuestions(true);
|
44261
|
+
this.currentSingleQuestion = questions.length > 0 ? questions[0] : undefined;
|
44262
|
+
}
|
44108
44263
|
}
|
44109
44264
|
if (clearData) {
|
44110
44265
|
this.updateValuesWithDefaults();
|
@@ -44142,7 +44297,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44142
44297
|
SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
|
44143
44298
|
this.notifyQuestionsOnHidingContent(oldValue);
|
44144
44299
|
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
44145
|
-
if (oldValue && !oldValue.passed) {
|
44300
|
+
if (oldValue && !oldValue.isDisposed && !oldValue.passed) {
|
44146
44301
|
if (oldValue.validate(false)) {
|
44147
44302
|
oldValue.passed = true;
|
44148
44303
|
}
|
@@ -44153,9 +44308,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44153
44308
|
this.onCurrentPageChanged.fire(this, options);
|
44154
44309
|
};
|
44155
44310
|
SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
|
44156
|
-
if (!page)
|
44157
|
-
return;
|
44158
|
-
|
44311
|
+
if (page && !page.isDisposed) {
|
44312
|
+
page.questions.forEach(function (q) { return q.onHidingContent(); });
|
44313
|
+
}
|
44159
44314
|
};
|
44160
44315
|
SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue) {
|
44161
44316
|
var diff = !!newValue && !!oldValue ? newValue.visibleIndex - oldValue.visibleIndex : 0;
|
@@ -44391,6 +44546,30 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44391
44546
|
return false;
|
44392
44547
|
return this.doCurrentPageComplete(false);
|
44393
44548
|
};
|
44549
|
+
SurveyModel.prototype.performNext = function () {
|
44550
|
+
var q = this.currentSingleQuestion;
|
44551
|
+
if (!q)
|
44552
|
+
return this.nextPage();
|
44553
|
+
if (!q.validate(true))
|
44554
|
+
return false;
|
44555
|
+
var questions = this.getAllQuestions(true);
|
44556
|
+
var index = questions.indexOf(q);
|
44557
|
+
if (index < 0 || index === questions.length - 1)
|
44558
|
+
return false;
|
44559
|
+
this.currentSingleQuestion = questions[index + 1];
|
44560
|
+
return true;
|
44561
|
+
};
|
44562
|
+
SurveyModel.prototype.performPrevious = function () {
|
44563
|
+
var q = this.currentSingleQuestion;
|
44564
|
+
if (!q)
|
44565
|
+
return this.prevPage();
|
44566
|
+
var questions = this.getAllQuestions(true);
|
44567
|
+
var index = questions.indexOf(q);
|
44568
|
+
if (index === 0)
|
44569
|
+
return false;
|
44570
|
+
this.currentSingleQuestion = questions[index - 1];
|
44571
|
+
return true;
|
44572
|
+
};
|
44394
44573
|
SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
|
44395
44574
|
var _this = this;
|
44396
44575
|
if (!this.isEditMode || this.ignoreValidation)
|
@@ -44720,9 +44899,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44720
44899
|
};
|
44721
44900
|
SurveyModel.prototype.nextPageUIClick = function () {
|
44722
44901
|
if (!!this.mouseDownPage && this.mouseDownPage !== this.activePage)
|
44723
|
-
return;
|
44902
|
+
return false;
|
44724
44903
|
this.mouseDownPage = null;
|
44725
|
-
return this.
|
44904
|
+
return this.performNext();
|
44726
44905
|
};
|
44727
44906
|
SurveyModel.prototype.nextPageMouseDown = function () {
|
44728
44907
|
this.mouseDownPage = this.activePage;
|
@@ -44766,7 +44945,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44766
44945
|
this.isShowingPreview = false;
|
44767
44946
|
};
|
44768
44947
|
SurveyModel.prototype.cancelPreviewByPage = function (panel) {
|
44769
|
-
this.cancelPreview(panel
|
44948
|
+
this.cancelPreview(panel);
|
44770
44949
|
};
|
44771
44950
|
SurveyModel.prototype.doCurrentPageComplete = function (doComplete) {
|
44772
44951
|
if (this.isValidatingOnServer)
|
@@ -44796,6 +44975,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44796
44975
|
enumerable: false,
|
44797
44976
|
configurable: true
|
44798
44977
|
});
|
44978
|
+
Object.defineProperty(SurveyModel.prototype, "isSingleVisibleQuestion", {
|
44979
|
+
get: function () {
|
44980
|
+
return this.isSingleVisibleQuestionVal(this.questionsOnPageMode);
|
44981
|
+
},
|
44982
|
+
enumerable: false,
|
44983
|
+
configurable: true
|
44984
|
+
});
|
44985
|
+
SurveyModel.prototype.isSingleVisibleQuestionVal = function (val) {
|
44986
|
+
return val === "questionPerPage" || val === "questionOnPage";
|
44987
|
+
};
|
44799
44988
|
Object.defineProperty(SurveyModel.prototype, "questionsOnPageMode", {
|
44800
44989
|
/**
|
44801
44990
|
* Specifies how to distribute survey elements between pages.
|
@@ -44871,25 +45060,54 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44871
45060
|
this.pageVisibilityChanged(this.pages[0], !this.isStartedState);
|
44872
45061
|
};
|
44873
45062
|
SurveyModel.prototype.onShowingPreviewChanged = function () {
|
45063
|
+
this.updatePagesContainer();
|
45064
|
+
};
|
45065
|
+
SurveyModel.prototype.createRootPage = function (name, pages) {
|
45066
|
+
var container = Serializer.createClass("page");
|
45067
|
+
container.name = name;
|
45068
|
+
container.isPageContainer = true;
|
45069
|
+
pages.forEach(function (page) {
|
45070
|
+
if (!page.isStartPage) {
|
45071
|
+
container.addElement(page);
|
45072
|
+
}
|
45073
|
+
});
|
45074
|
+
return container;
|
45075
|
+
};
|
45076
|
+
SurveyModel.prototype.disposeContainerPage = function () {
|
45077
|
+
var cPage = this.pageContainerValue;
|
45078
|
+
var elements = [].concat(cPage.elements);
|
45079
|
+
elements.forEach(function (el) { return cPage.removeElement(el); });
|
45080
|
+
cPage.dispose();
|
45081
|
+
this.pageContainerValue = undefined;
|
45082
|
+
};
|
45083
|
+
SurveyModel.prototype.updatePagesContainer = function () {
|
44874
45084
|
if (this.isDesignMode)
|
44875
45085
|
return;
|
44876
|
-
|
44877
|
-
|
44878
|
-
|
44879
|
-
|
44880
|
-
|
44881
|
-
|
44882
|
-
|
45086
|
+
this.getAllQuestions().forEach(function (q) { return q.updateElementVisibility(); });
|
45087
|
+
this.setPropertyValue("currentPage", undefined);
|
45088
|
+
var singleName = "single-page";
|
45089
|
+
var previewName = "preview-page";
|
45090
|
+
var rootPage = undefined;
|
45091
|
+
if (this.isSinglePage) {
|
45092
|
+
var cPage = this.pageContainerValue;
|
45093
|
+
if (cPage && cPage.name === previewName) {
|
45094
|
+
rootPage = cPage.elements[0];
|
45095
|
+
this.disposeContainerPage();
|
45096
|
+
}
|
45097
|
+
else {
|
45098
|
+
rootPage = this.createRootPage(singleName, this.pages);
|
44883
45099
|
}
|
44884
|
-
this.runningPages = undefined;
|
44885
45100
|
}
|
44886
|
-
this.runConditions();
|
44887
|
-
this.updateAllElementsVisibility(this.pages);
|
44888
|
-
this.updateVisibleIndexes();
|
44889
45101
|
if (this.isShowingPreview) {
|
44890
|
-
this.
|
45102
|
+
rootPage = this.createRootPage(previewName, rootPage ? [rootPage] : this.pages);
|
44891
45103
|
}
|
44892
|
-
|
45104
|
+
if (rootPage) {
|
45105
|
+
rootPage.setSurveyImpl(this);
|
45106
|
+
this.pageContainerValue = rootPage;
|
45107
|
+
this.currentPage = rootPage;
|
45108
|
+
}
|
45109
|
+
if (!this.isSinglePage && !this.isShowingPreview) {
|
45110
|
+
this.disposeContainerPage();
|
44893
45111
|
var curPage = this.gotoPageFromPreview;
|
44894
45112
|
this.gotoPageFromPreview = null;
|
44895
45113
|
if (helpers_Helpers.isValueEmpty(curPage) && this.visiblePageCount > 0) {
|
@@ -44901,110 +45119,62 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44901
45119
|
this.changeCurrentPageFromPreview = false;
|
44902
45120
|
}
|
44903
45121
|
}
|
45122
|
+
if (!this.currentPage && this.visiblePageCount > 0) {
|
45123
|
+
this.currentPage = this.visiblePages[0];
|
45124
|
+
}
|
45125
|
+
this.pages.forEach(function (page) {
|
45126
|
+
if (page.hasShown) {
|
45127
|
+
page.updateElementCss(true);
|
45128
|
+
}
|
45129
|
+
});
|
45130
|
+
this.updateButtonsVisibility();
|
44904
45131
|
};
|
44905
|
-
SurveyModel.prototype
|
44906
|
-
|
45132
|
+
Object.defineProperty(SurveyModel.prototype, "currentSingleQuestion", {
|
45133
|
+
get: function () { return this.currentSingleQuestionValue; },
|
45134
|
+
set: function (val) {
|
45135
|
+
if (val !== this.currentSingleQuestion) {
|
45136
|
+
this.currentSingleQuestionValue = val;
|
45137
|
+
if (!!val) {
|
45138
|
+
var page = val.page;
|
45139
|
+
page.updateRows();
|
45140
|
+
if (page !== this.currentPage) {
|
45141
|
+
this.currentPage = page;
|
45142
|
+
}
|
45143
|
+
else {
|
45144
|
+
if (this.focusFirstQuestionAutomatic) {
|
45145
|
+
val.focus();
|
45146
|
+
}
|
45147
|
+
}
|
45148
|
+
this.updateButtonsVisibility();
|
45149
|
+
}
|
45150
|
+
else {
|
45151
|
+
this.visiblePages.forEach(function (page) { return page.updateRows(); });
|
45152
|
+
}
|
45153
|
+
}
|
45154
|
+
},
|
45155
|
+
enumerable: false,
|
45156
|
+
configurable: true
|
45157
|
+
});
|
45158
|
+
SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
|
44907
45159
|
if (this.isShowingPreview)
|
44908
45160
|
return;
|
44909
|
-
|
44910
|
-
|
44911
|
-
|
44912
|
-
}
|
44913
|
-
this.originalPages = undefined;
|
45161
|
+
this.currentSingleQuestion = undefined;
|
45162
|
+
if (oldValue === "singlePage") {
|
45163
|
+
this.updatePagesContainer();
|
44914
45164
|
}
|
44915
|
-
|
44916
|
-
|
44917
|
-
this.originalPages = this.pages.slice(0, this.pages.length);
|
44918
|
-
}
|
44919
|
-
this.setupPagesForPageModes(this.isSinglePage, isFirstLoad);
|
45165
|
+
if (this.isSinglePage) {
|
45166
|
+
this.updatePagesContainer();
|
44920
45167
|
}
|
44921
|
-
this.
|
44922
|
-
|
44923
|
-
|
44924
|
-
|
44925
|
-
|
44926
|
-
this.pages.splice(0, this.pages.length);
|
44927
|
-
for (var i = 0; i < originalPages.length; i++) {
|
44928
|
-
var page = originalPages[i];
|
44929
|
-
page.setWasShown(false);
|
44930
|
-
this.pages.push(page);
|
45168
|
+
if (this.isSingleVisibleQuestion) {
|
45169
|
+
var questions = this.getAllQuestions(true);
|
45170
|
+
if (questions.length > 0) {
|
45171
|
+
this.currentSingleQuestion = questions[0];
|
45172
|
+
}
|
44931
45173
|
}
|
44932
45174
|
};
|
44933
45175
|
SurveyModel.prototype.getPageStartIndex = function () {
|
44934
45176
|
return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
|
44935
45177
|
};
|
44936
|
-
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
|
44937
|
-
var _this = this;
|
44938
|
-
this.questionHashesClear();
|
44939
|
-
if (this.firstPageIsStarted && this.pages.length > 0) {
|
44940
|
-
this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
|
44941
|
-
}
|
44942
|
-
this.isLockingUpdateOnPageModes = !isFirstLoad;
|
44943
|
-
var startIndex = this.getPageStartIndex();
|
44944
|
-
_super.prototype.startLoadingFromJson.call(this);
|
44945
|
-
var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
|
44946
|
-
var deletedLen = this.pages.length - startIndex;
|
44947
|
-
this.pages.splice(startIndex, deletedLen);
|
44948
|
-
for (var i = 0; i < newPages.length; i++) {
|
44949
|
-
this.pages.push(newPages[i]);
|
44950
|
-
}
|
44951
|
-
_super.prototype.endLoadingFromJson.call(this);
|
44952
|
-
for (var i = 0; i < newPages.length; i++) {
|
44953
|
-
newPages[i].setSurveyImpl(this, true);
|
44954
|
-
}
|
44955
|
-
this.doElementsOnLoad();
|
44956
|
-
this.updateCurrentPage();
|
44957
|
-
this.isLockingUpdateOnPageModes = false;
|
44958
|
-
};
|
44959
|
-
SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
|
44960
|
-
if (isSinglePage) {
|
44961
|
-
return [this.createSinglePage(startIndex)];
|
44962
|
-
}
|
44963
|
-
return this.createPagesForEveryQuestion(startIndex);
|
44964
|
-
};
|
44965
|
-
SurveyModel.prototype.createSinglePage = function (startIndex) {
|
44966
|
-
var single = this.createNewPage("all");
|
44967
|
-
single.setSurveyImpl(this);
|
44968
|
-
for (var i = startIndex; i < this.pages.length; i++) {
|
44969
|
-
var page = this.pages[i];
|
44970
|
-
var panel = Serializer.createClass("panel");
|
44971
|
-
panel.originalPage = page;
|
44972
|
-
single.addPanel(panel);
|
44973
|
-
var json = new jsonobject_JsonObject().toJsonObject(page);
|
44974
|
-
new jsonobject_JsonObject().toObject(json, panel);
|
44975
|
-
}
|
44976
|
-
return single;
|
44977
|
-
};
|
44978
|
-
SurveyModel.prototype.createPagesForEveryQuestion = function (startIndex) {
|
44979
|
-
var res = [];
|
44980
|
-
for (var i = startIndex; i < this.pages.length; i++) {
|
44981
|
-
var originalPage = this.pages[i];
|
44982
|
-
// Initialize randomization
|
44983
|
-
originalPage.setWasShown(true);
|
44984
|
-
for (var j = 0; j < originalPage.elements.length; j++) {
|
44985
|
-
var originalElement = originalPage.elements[j];
|
44986
|
-
var element = Serializer.createClass(originalElement.getType());
|
44987
|
-
if (!element)
|
44988
|
-
continue;
|
44989
|
-
var jsonObj = new jsonobject_JsonObject();
|
44990
|
-
//Deserialize page properties only, excluding elements
|
44991
|
-
jsonObj.lightSerializing = true;
|
44992
|
-
var pageJson = jsonObj.toJsonObject(originalPage);
|
44993
|
-
var page = Serializer.createClass(originalPage.getType());
|
44994
|
-
page.fromJSON(pageJson);
|
44995
|
-
page.name = originalElement.name;
|
44996
|
-
page.setSurveyImpl(this);
|
44997
|
-
res.push(page);
|
44998
|
-
var json = new jsonobject_JsonObject().toJsonObject(originalElement);
|
44999
|
-
page.addElement(element);
|
45000
|
-
new jsonobject_JsonObject().toObject(json, element);
|
45001
|
-
for (var k = 0; k < page.questions.length; k++) {
|
45002
|
-
this.questionHashesAdded(page.questions[k]);
|
45003
|
-
}
|
45004
|
-
}
|
45005
|
-
}
|
45006
|
-
return res;
|
45007
|
-
};
|
45008
45178
|
Object.defineProperty(SurveyModel.prototype, "isFirstPage", {
|
45009
45179
|
/**
|
45010
45180
|
* Indicates whether the [current page](#currentPage) is the first page.
|
@@ -45070,30 +45240,73 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45070
45240
|
enumerable: false,
|
45071
45241
|
configurable: true
|
45072
45242
|
});
|
45243
|
+
Object.defineProperty(SurveyModel.prototype, "isFirstElement", {
|
45244
|
+
get: function () {
|
45245
|
+
return this.getPropertyValue("isFirstElement");
|
45246
|
+
},
|
45247
|
+
enumerable: false,
|
45248
|
+
configurable: true
|
45249
|
+
});
|
45250
|
+
Object.defineProperty(SurveyModel.prototype, "isLastElement", {
|
45251
|
+
get: function () {
|
45252
|
+
return this.getPropertyValue("isLastElement");
|
45253
|
+
},
|
45254
|
+
enumerable: false,
|
45255
|
+
configurable: true
|
45256
|
+
});
|
45073
45257
|
SurveyModel.prototype.updateIsFirstLastPageState = function () {
|
45074
45258
|
var curPage = this.currentPage;
|
45075
45259
|
this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage);
|
45076
45260
|
this.setPropertyValue("isLastPage", !!curPage && curPage === this.lastVisiblePage);
|
45261
|
+
var fVal = undefined;
|
45262
|
+
var lVal = undefined;
|
45263
|
+
var q = this.currentSingleQuestion;
|
45264
|
+
if (!!q) {
|
45265
|
+
var questions = this.getAllQuestions(true);
|
45266
|
+
var index = questions.indexOf(q);
|
45267
|
+
if (index >= 0) {
|
45268
|
+
fVal = index === 0;
|
45269
|
+
lVal = index === questions.length - 1;
|
45270
|
+
}
|
45271
|
+
}
|
45272
|
+
this.setPropertyValue("isFirstElement", fVal);
|
45273
|
+
this.setPropertyValue("isLastElement", lVal);
|
45077
45274
|
};
|
45275
|
+
Object.defineProperty(SurveyModel.prototype, "isLastPageOrElement", {
|
45276
|
+
get: function () {
|
45277
|
+
return this.isLastElement !== undefined ? this.isLastElement : this.isLastPage;
|
45278
|
+
},
|
45279
|
+
enumerable: false,
|
45280
|
+
configurable: true
|
45281
|
+
});
|
45282
|
+
Object.defineProperty(SurveyModel.prototype, "isFirstPageOrElement", {
|
45283
|
+
get: function () {
|
45284
|
+
return this.isFirstElement !== undefined ? this.isFirstElement : this.isFirstPage;
|
45285
|
+
},
|
45286
|
+
enumerable: false,
|
45287
|
+
configurable: true
|
45288
|
+
});
|
45078
45289
|
SurveyModel.prototype.calcIsShowPrevButton = function () {
|
45079
|
-
if (this.
|
45290
|
+
if (this.isFirstPageOrElement || !this.showPrevButton || this.state !== "running")
|
45080
45291
|
return false;
|
45292
|
+
if (this.isFirstElement !== undefined)
|
45293
|
+
return true;
|
45081
45294
|
var page = this.visiblePages[this.currentPageNo - 1];
|
45082
45295
|
return page && page.getMaxTimeToFinish() <= 0;
|
45083
45296
|
};
|
45084
45297
|
SurveyModel.prototype.calcIsShowNextButton = function () {
|
45085
|
-
return this.state === "running" && !this.
|
45298
|
+
return this.state === "running" && !this.isLastPageOrElement && !this.canBeCompletedByTrigger;
|
45086
45299
|
};
|
45087
45300
|
SurveyModel.prototype.calcIsCompleteButtonVisible = function () {
|
45088
45301
|
var state = this.state;
|
45089
45302
|
return this.isEditMode && (this.state === "running" &&
|
45090
|
-
(this.
|
45303
|
+
(this.isLastPageOrElement && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
|
45091
45304
|
|| state === "preview") && this.showCompleteButton;
|
45092
45305
|
};
|
45093
45306
|
SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
|
45094
45307
|
return (this.isEditMode &&
|
45095
45308
|
this.isShowPreviewBeforeComplete &&
|
45096
|
-
this.state == "running" && this.
|
45309
|
+
this.state == "running" && this.isLastPageOrElement);
|
45097
45310
|
};
|
45098
45311
|
SurveyModel.prototype.calcIsCancelPreviewButtonVisible = function () {
|
45099
45312
|
return (this.isEditMode &&
|
@@ -45102,6 +45315,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45102
45315
|
};
|
45103
45316
|
Object.defineProperty(SurveyModel.prototype, "firstVisiblePage", {
|
45104
45317
|
get: function () {
|
45318
|
+
if (this.visiblePageCount === 1)
|
45319
|
+
return this.visiblePages[0];
|
45105
45320
|
var pages = this.pages;
|
45106
45321
|
for (var i = 0; i < pages.length; i++) {
|
45107
45322
|
if (this.isPageInVisibleList(pages[i]))
|
@@ -45114,6 +45329,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45114
45329
|
});
|
45115
45330
|
Object.defineProperty(SurveyModel.prototype, "lastVisiblePage", {
|
45116
45331
|
get: function () {
|
45332
|
+
if (this.visiblePageCount === 1)
|
45333
|
+
return this.visiblePages[0];
|
45117
45334
|
var pages = this.pages;
|
45118
45335
|
for (var i = pages.length - 1; i >= 0; i--) {
|
45119
45336
|
if (this.isPageInVisibleList(pages[i]))
|
@@ -45462,7 +45679,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45462
45679
|
});
|
45463
45680
|
SurveyModel.prototype.updateProgressText = function (onValueChanged) {
|
45464
45681
|
if (onValueChanged === void 0) { onValueChanged = false; }
|
45465
|
-
if (this.isCalculatingProgressText || this.isShowingPreview
|
45682
|
+
if (this.isCalculatingProgressText || this.isShowingPreview)
|
45466
45683
|
return;
|
45467
45684
|
if (onValueChanged &&
|
45468
45685
|
this.progressBarType == "pages" &&
|
@@ -46804,7 +47021,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46804
47021
|
this.updateVisibleIndexes();
|
46805
47022
|
};
|
46806
47023
|
SurveyModel.prototype.updateVisibleIndexes = function (page) {
|
46807
|
-
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson
|
47024
|
+
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson)
|
46808
47025
|
return;
|
46809
47026
|
if (this.isRunningConditions &&
|
46810
47027
|
this.onQuestionVisibleChanged.isEmpty &&
|
@@ -46873,12 +47090,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46873
47090
|
SurveyModel.prototype.endLoadingFromJson = function () {
|
46874
47091
|
this.isEndLoadingFromJson = "processing";
|
46875
47092
|
this.onFirstPageIsStartedChanged();
|
46876
|
-
this.onQuestionsOnPageModeChanged("standard", true);
|
46877
47093
|
_super.prototype.endLoadingFromJson.call(this);
|
46878
47094
|
if (this.hasCookie) {
|
46879
47095
|
this.isCompletedBefore = true;
|
46880
47096
|
}
|
46881
47097
|
this.doElementsOnLoad();
|
47098
|
+
this.onQuestionsOnPageModeChanged("standard");
|
46882
47099
|
this.isEndLoadingFromJson = "conditions";
|
46883
47100
|
this.runConditions();
|
46884
47101
|
this.notifyElementsOnAnyValueOrVariableChanged("");
|
@@ -46926,7 +47143,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46926
47143
|
mouseDown: function () { return _this.navigationMouseDown(); },
|
46927
47144
|
},
|
46928
47145
|
locTitle: this.locPagePrevText,
|
46929
|
-
action: function () { return _this.
|
47146
|
+
action: function () { return _this.performPrevious(); },
|
46930
47147
|
component: defaultComponent
|
46931
47148
|
});
|
46932
47149
|
var navNext = new action_Action({
|
@@ -47206,8 +47423,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47206
47423
|
SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
|
47207
47424
|
if (locNotification === void 0) { locNotification = false; }
|
47208
47425
|
if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
|
47209
|
-
if (this.isLockingUpdateOnPageModes)
|
47210
|
-
return;
|
47211
47426
|
var newValue = newQuestionValue;
|
47212
47427
|
if (allowNotifyValueChanged) {
|
47213
47428
|
newValue = this.questionOnValueChanging(name, newQuestionValue);
|
@@ -48744,7 +48959,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
48744
48959
|
jsonobject_property()
|
48745
48960
|
], SurveyModel.prototype, "calculatedWidthMode", void 0);
|
48746
48961
|
survey_decorate([
|
48747
|
-
jsonobject_property({
|
48962
|
+
jsonobject_property({
|
48963
|
+
defaultValue: 100,
|
48964
|
+
onSet: function (val, target, prevVal) {
|
48965
|
+
target.pages.forEach(function (p) { return p.updateRootStyle(); });
|
48966
|
+
},
|
48967
|
+
})
|
48748
48968
|
], SurveyModel.prototype, "widthScale", void 0);
|
48749
48969
|
survey_decorate([
|
48750
48970
|
jsonobject_property()
|
@@ -56003,6 +56223,9 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
|
|
56003
56223
|
if (title) {
|
56004
56224
|
_this.title = title;
|
56005
56225
|
}
|
56226
|
+
_this.editor.onPropertyChanged.add(function (sender, options) {
|
56227
|
+
_this.onPropertyChanged.fire(_this, options);
|
56228
|
+
});
|
56006
56229
|
return _this;
|
56007
56230
|
}
|
56008
56231
|
MultipleTextItemModel.prototype.getType = function () {
|
@@ -61024,7 +61247,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
61024
61247
|
};
|
61025
61248
|
_this.doClean = function () {
|
61026
61249
|
if (_this.needConfirmRemoveFile) {
|
61027
|
-
confirmActionAsync(
|
61250
|
+
confirmActionAsync({
|
61251
|
+
message: _this.confirmRemoveAllMessage,
|
61252
|
+
funcOnYes: function () { _this.clearFilesCore(); },
|
61253
|
+
locale: _this.getLocale(),
|
61254
|
+
rootElement: _this.survey.rootElement,
|
61255
|
+
cssClass: _this.cssClasses.confirmDialog
|
61256
|
+
});
|
61028
61257
|
return;
|
61029
61258
|
}
|
61030
61259
|
_this.clearFilesCore();
|
@@ -62033,7 +62262,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
62033
62262
|
var _this = this;
|
62034
62263
|
event.stopPropagation();
|
62035
62264
|
if (this.needConfirmRemoveFile) {
|
62036
|
-
confirmActionAsync(
|
62265
|
+
confirmActionAsync({
|
62266
|
+
message: this.getConfirmRemoveMessage(data.name),
|
62267
|
+
funcOnYes: function () { _this.clearFilesCore(); },
|
62268
|
+
locale: this.getLocale(),
|
62269
|
+
rootElement: this.survey.rootElement,
|
62270
|
+
cssClass: this.cssClasses.confirmDialog
|
62271
|
+
});
|
62037
62272
|
return;
|
62038
62273
|
}
|
62039
62274
|
this.removeFileCore(data);
|
@@ -68018,7 +68253,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68018
68253
|
}
|
68019
68254
|
};
|
68020
68255
|
if (this.isRequireConfirmOnDelete(value)) {
|
68021
|
-
confirmActionAsync(
|
68256
|
+
confirmActionAsync({
|
68257
|
+
message: this.confirmDeleteText,
|
68258
|
+
funcOnYes: function () { removePanel(); },
|
68259
|
+
locale: this.getLocale(),
|
68260
|
+
rootElement: this.survey.rootElement,
|
68261
|
+
cssClass: this.cssClasses.confirmDialog
|
68262
|
+
});
|
68022
68263
|
}
|
68023
68264
|
else {
|
68024
68265
|
removePanel();
|
@@ -72159,8 +72400,8 @@ Serializer.addClass("currencymask", [
|
|
72159
72400
|
|
72160
72401
|
var Version;
|
72161
72402
|
var ReleaseDate;
|
72162
|
-
Version = "" + "1.12.
|
72163
|
-
ReleaseDate = "" + "2024-12-
|
72403
|
+
Version = "" + "1.12.16";
|
72404
|
+
ReleaseDate = "" + "2024-12-24";
|
72164
72405
|
function checkLibraryVersion(ver, libraryName) {
|
72165
72406
|
if (Version != ver) {
|
72166
72407
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -82670,7 +82911,7 @@ var element_SurveyRowElement = /** @class */ (function (_super) {
|
|
82670
82911
|
if (!this.row.isNeedRender) {
|
82671
82912
|
return ReactElementFactory.Instance.createElement(element.skeletonComponentName, { key: element.name + index, element: element, css: this.css, });
|
82672
82913
|
}
|
82673
|
-
var elementType = element.
|
82914
|
+
var elementType = element.getTemplate();
|
82674
82915
|
if (!ReactElementFactory.Instance.isElementRegistered(elementType)) {
|
82675
82916
|
elementType = "question";
|
82676
82917
|
}
|
@@ -90539,21 +90780,15 @@ var list_item_content_ListItemContent = /** @class */ (function (_super) {
|
|
90539
90780
|
ListItemContent.prototype.render = function () {
|
90540
90781
|
if (!this.item)
|
90541
90782
|
return null;
|
90542
|
-
var content = [];
|
90543
90783
|
var text = this.renderLocString(this.item.locTitle, undefined, "locString");
|
90544
|
-
|
90545
|
-
|
90546
|
-
|
90547
|
-
|
90548
|
-
|
90549
|
-
|
90550
|
-
|
90551
|
-
|
90552
|
-
if (this.item.markerIconName) {
|
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" });
|
90554
|
-
content.push(icon);
|
90555
|
-
}
|
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);
|
90784
|
+
var icon = (this.item.iconName) ?
|
90785
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.model.cssClasses.itemIcon, iconName: this.item.iconName, size: this.item.iconSize, "aria-label": this.item.title }) : null;
|
90786
|
+
var markerIcon = (this.item.markerIconName) ?
|
90787
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: "auto" }) : null;
|
90788
|
+
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,
|
90789
|
+
icon,
|
90790
|
+
text,
|
90791
|
+
markerIcon);
|
90557
90792
|
};
|
90558
90793
|
return ListItemContent;
|
90559
90794
|
}(reactquestion_element_SurveyElementBase));
|