survey-react 1.12.14 → 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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.14
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, 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; });
@@ -1935,6 +1936,7 @@ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", functi
1935
1936
  __webpack_require__.d(__webpack_exports__, "unwrap", function() { return /* reexport */ unwrap; });
1936
1937
  __webpack_require__.d(__webpack_exports__, "getOriginalEvent", function() { return /* reexport */ getOriginalEvent; });
1937
1938
  __webpack_require__.d(__webpack_exports__, "getElement", function() { return /* reexport */ getElement; });
1939
+ __webpack_require__.d(__webpack_exports__, "activateLazyRenderingChecks", function() { return /* reexport */ activateLazyRenderingChecks; });
1938
1940
  __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return /* reexport */ createDropdownActionModel; });
1939
1941
  __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return /* reexport */ createDropdownActionModelAdvanced; });
1940
1942
  __webpack_require__.d(__webpack_exports__, "createPopupModelWithListModel", function() { return /* reexport */ createPopupModelWithListModel; });
@@ -2855,12 +2857,13 @@ var surveyLocalization = {
2855
2857
  //TODO remove on next week
2856
2858
  get showNamesInEnglish() { return this.useEnglishNames; },
2857
2859
  set showNamesInEnglish(val) { this.useEnglishNames = val; },
2858
- setupLocale: function (loc, strings, name, nameInEngish, direction) {
2859
- this.locales[loc] = strings;
2860
- this.localeNames[loc] = name;
2861
- this.localeNamesInEnglish[loc] = nameInEngish;
2862
- if (direction !== undefined) {
2863
- this.localeDirections[loc] = direction;
2860
+ setupLocale: function (localeConfig) {
2861
+ var loc = localeConfig.localeCode;
2862
+ this.locales[loc] = localeConfig.strings;
2863
+ this.localeNames[loc] = localeConfig.nativeName;
2864
+ this.localeNamesInEnglish[loc] = localeConfig.englishName;
2865
+ if (localeConfig.rtl !== undefined) {
2866
+ this.localeDirections[loc] = localeConfig.rtl;
2864
2867
  }
2865
2868
  },
2866
2869
  get currentLocale() {
@@ -2958,8 +2961,11 @@ function getLocaleString(strName, locale) {
2958
2961
  if (locale === void 0) { locale = null; }
2959
2962
  return surveyLocalization.getString(strName, locale);
2960
2963
  }
2964
+ function getLocaleStrings(locale) {
2965
+ return surveyLocalization.getLocaleStrings(locale);
2966
+ }
2961
2967
  function setupLocale(localeConfig) {
2962
- surveyLocalization.setupLocale(localeConfig.localeCode, localeConfig.strings, localeConfig.nativeName, localeConfig.englishName, localeConfig.rtl ? "rtl" : undefined);
2968
+ surveyLocalization.setupLocale(localeConfig);
2963
2969
  }
2964
2970
  var surveyStrings = englishStrings;
2965
2971
  surveyLocalization.locales["en"] = englishStrings;
@@ -5594,6 +5600,24 @@ function dateDiff(params) {
5594
5600
  return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
5595
5601
  }
5596
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);
5597
5621
  function isContainerReadyCore(container) {
5598
5622
  if (!container)
5599
5623
  return false;
@@ -11781,9 +11805,15 @@ var list_ListModel = /** @class */ (function (_super) {
11781
11805
  .append(itemValue.css)
11782
11806
  .toString();
11783
11807
  };
11784
- _this.getItemIndent = function (itemValue) {
11808
+ // public getItemIndent = (itemValue: any) => {
11809
+ // const level: number = itemValue.level || 0;
11810
+ // return (level + 1) * ListModel.INDENT + "px";
11811
+ // };
11812
+ _this.getItemStyle = function (itemValue) {
11785
11813
  var level = itemValue.level || 0;
11786
- return (level + 1) * ListModel.INDENT + "px";
11814
+ return {
11815
+ "--sjs-list-item-level": level + 1
11816
+ };
11787
11817
  };
11788
11818
  if (Object.keys(items).indexOf("items") !== -1) {
11789
11819
  var options_1 = items;
@@ -12699,13 +12729,14 @@ var action_BaseAction = /** @class */ (function (_super) {
12699
12729
 
12700
12730
  var action_Action = /** @class */ (function (_super) {
12701
12731
  action_extends(Action, _super);
12702
- function Action(innerItem) {
12732
+ function Action(innerItemData) {
12703
12733
  var _this = _super.call(this) || this;
12704
- _this.innerItem = innerItem;
12705
12734
  _this.locTitleChanged = function () {
12706
12735
  var val = _this.locTitle.renderedHtml;
12707
12736
  _this.setPropertyValue("_title", !!val ? val : undefined);
12708
12737
  };
12738
+ var innerItem = (innerItemData instanceof Action) ? innerItemData.innerItem : innerItemData;
12739
+ _this.innerItem = innerItem;
12709
12740
  _this.locTitle = !!innerItem ? innerItem["locTitle"] : null;
12710
12741
  //Object.assign(this, item) to support IE11
12711
12742
  if (!!innerItem) {
@@ -13662,7 +13693,13 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
13662
13693
  Object.defineProperty(SurveyElementCore.prototype, "isPage", {
13663
13694
  /**
13664
13695
  * Returns `true` if the survey element is a page.
13665
- * @see Base.getType
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.
13666
13703
  */
13667
13704
  get: function () { return false; },
13668
13705
  enumerable: false,
@@ -13670,8 +13707,14 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
13670
13707
  });
13671
13708
  Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
13672
13709
  /**
13673
- * Returns `true` if the survey element is a panel.
13674
- * @see Base.getType
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.
13675
13718
  */
13676
13719
  get: function () { return false; },
13677
13720
  enumerable: false,
@@ -13680,7 +13723,6 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
13680
13723
  Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
13681
13724
  /**
13682
13725
  * Returns `true` if the survey element is a question.
13683
- * @see Base.getType
13684
13726
  */
13685
13727
  get: function () { return false; },
13686
13728
  enumerable: false,
@@ -13689,7 +13731,6 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
13689
13731
  Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
13690
13732
  /**
13691
13733
  * Returns `true` if the element is a survey.
13692
- * @see Base.getType
13693
13734
  */
13694
13735
  get: function () { return false; },
13695
13736
  enumerable: false,
@@ -14448,9 +14489,11 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14448
14489
  SurveyElement.prototype.createCssClassesValue = function () {
14449
14490
  var res = this.calcCssClasses(this.css);
14450
14491
  this.setPropertyValue("cssClassesValue", res);
14492
+ this.onCalcCssClasses(res);
14451
14493
  this.updateElementCssCore(this.cssClassesValue);
14452
14494
  return res;
14453
14495
  };
14496
+ SurveyElement.prototype.onCalcCssClasses = function (classes) { };
14454
14497
  Object.defineProperty(SurveyElement.prototype, "cssClasses", {
14455
14498
  /**
14456
14499
  * Returns an object in which keys are UI elements and values are CSS classes applied to them.
@@ -14704,7 +14747,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14704
14747
  SurveyElement.prototype.getPage = function (parent) {
14705
14748
  while (parent && parent.parent)
14706
14749
  parent = parent.parent;
14707
- if (parent && parent.getType() == "page")
14750
+ if (parent && parent.isPage)
14708
14751
  return parent;
14709
14752
  return null;
14710
14753
  };
@@ -14756,7 +14799,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14756
14799
  });
14757
14800
  Object.defineProperty(SurveyElement.prototype, "hasParent", {
14758
14801
  get: function () {
14759
- return (this.parent && !this.parent.isPage && (!this.parent.originalPage)) || (this.parent === undefined);
14802
+ return (this.parent && !this.parent.isPage) || (this.parent === undefined);
14760
14803
  },
14761
14804
  enumerable: false,
14762
14805
  configurable: true
@@ -14943,9 +14986,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14943
14986
  }
14944
14987
  }
14945
14988
  if (Object.keys(style).length == 0) {
14946
- var minWidth = this.minWidth;
14947
- 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
+ }
14948
14999
  minWidth = "min(100%, " + minWidth + ")";
15000
+ }
14949
15001
  if (this.allowRootStyle && this.renderWidth) {
14950
15002
  // style["width"] = this.renderWidth;
14951
15003
  style["flexGrow"] = 1;
@@ -15016,6 +15068,8 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
15016
15068
  return null;
15017
15069
  };
15018
15070
  SurveyElement.prototype.getCssTitle = function (cssClasses) {
15071
+ if (!cssClasses)
15072
+ return "";
15019
15073
  var isExpandable = this.state !== "default";
15020
15074
  var numInlineLimit = 4;
15021
15075
  return new CssClassBuilder()
@@ -15915,18 +15969,18 @@ function confirmAction(message) {
15915
15969
  return settings.confirmActionFunc(message);
15916
15970
  return confirm(message);
15917
15971
  }
15918
- function confirmActionAsync(message, funcOnYes, funcOnNo, locale, rootElement) {
15972
+ function confirmActionAsync(options) {
15919
15973
  var callbackFunc = function (res) {
15920
15974
  if (res)
15921
- funcOnYes();
15922
- else if (!!funcOnNo)
15923
- funcOnNo();
15975
+ options.funcOnYes();
15976
+ else if (!!options.funcOnNo)
15977
+ options.funcOnNo();
15924
15978
  };
15925
15979
  if (!!settings && !!settings.confirmActionAsync) {
15926
- if (settings.confirmActionAsync(message, callbackFunc, undefined, locale, rootElement))
15980
+ if (settings.confirmActionAsync(options.message, callbackFunc, options))
15927
15981
  return;
15928
15982
  }
15929
- callbackFunc(confirmAction(message));
15983
+ callbackFunc(confirmAction(options.message));
15930
15984
  }
15931
15985
  function detectIEBrowser() {
15932
15986
  var ua = navigator.userAgent;
@@ -16462,7 +16516,7 @@ var Logger = /** @class */ (function () {
16462
16516
  return Logger;
16463
16517
  }());
16464
16518
 
16465
- function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
16519
+ function showConfirmDialog(message, callback, options) {
16466
16520
  var locStr = new localizablestring_LocalizableString(undefined);
16467
16521
  var popupViewModel = settings.showDialog({
16468
16522
  componentName: "sv-string-viewer",
@@ -16475,17 +16529,17 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
16475
16529
  callback(false);
16476
16530
  return false;
16477
16531
  },
16478
- title: message,
16532
+ title: message || options.message,
16479
16533
  displayMode: "popup",
16480
16534
  isFocusedContent: false,
16481
- cssClass: "sv-popup--confirm-delete"
16482
- }, rootElement);
16535
+ cssClass: options.cssClass || "sv-popup--confirm"
16536
+ }, options.rootElement);
16483
16537
  var toolbar = popupViewModel.footerToolbar;
16484
16538
  var applyBtn = toolbar.getActionById("apply");
16485
16539
  var cancelBtn = toolbar.getActionById("cancel");
16486
- cancelBtn.title = getLocaleString("cancel", locale);
16540
+ cancelBtn.title = getLocaleString("cancel", options.locale);
16487
16541
  cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
16488
- applyBtn.title = applyTitle || getLocaleString("ok", locale);
16542
+ applyBtn.title = options.applyTitle || getLocaleString("ok", options.locale);
16489
16543
  applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
16490
16544
  configConfirmDialog(popupViewModel);
16491
16545
  return true;
@@ -17102,8 +17156,8 @@ var settings = {
17102
17156
  * @param message A message to be displayed in the confirm dialog window.
17103
17157
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
17104
17158
  */
17105
- confirmActionAsync: function (message, callback, applyTitle, locale, rootElement) {
17106
- return showConfirmDialog(message, callback, applyTitle, locale, rootElement);
17159
+ confirmActionAsync: function (message, callback, options) {
17160
+ return showConfirmDialog(message, callback, options);
17107
17161
  },
17108
17162
  /**
17109
17163
  * A minimum width value for all survey elements.
@@ -18332,7 +18386,7 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
18332
18386
  });
18333
18387
  Object.defineProperty(ExpressionValidator.prototype, "isAsync", {
18334
18388
  get: function () {
18335
- if (!this.ensureConditionRunner())
18389
+ if (!this.ensureConditionRunner(false))
18336
18390
  return false;
18337
18391
  return this.conditionRunner.isAsync;
18338
18392
  },
@@ -18351,8 +18405,12 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
18351
18405
  if (name === void 0) { name = null; }
18352
18406
  if (values === void 0) { values = null; }
18353
18407
  if (properties === void 0) { properties = null; }
18354
- if (!this.ensureConditionRunner())
18408
+ if (!this.expression)
18355
18409
  return null;
18410
+ if (!!this.conditionRunner) {
18411
+ this.conditionRunner.onRunComplete = null;
18412
+ }
18413
+ this.ensureConditionRunner(true);
18356
18414
  this.conditionRunner.onRunComplete = function (res) {
18357
18415
  _this.isRunningValue = false;
18358
18416
  if (!!_this.onAsyncCompleted) {
@@ -18375,14 +18433,15 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
18375
18433
  ExpressionValidator.prototype.getDefaultErrorText = function (name) {
18376
18434
  return this.getLocalizationFormatString("invalidExpression", this.expression);
18377
18435
  };
18378
- ExpressionValidator.prototype.ensureConditionRunner = function () {
18379
- if (!!this.conditionRunner) {
18380
- this.conditionRunner.expression = this.expression;
18381
- return true;
18382
- }
18436
+ ExpressionValidator.prototype.ensureConditionRunner = function (reNew) {
18383
18437
  if (!this.expression)
18384
18438
  return false;
18385
- this.conditionRunner = new ConditionRunner(this.expression);
18439
+ if (reNew || !this.conditionRunner) {
18440
+ this.conditionRunner = new ConditionRunner(this.expression);
18441
+ }
18442
+ else {
18443
+ this.conditionRunner.expression = this.expression;
18444
+ }
18386
18445
  return true;
18387
18446
  };
18388
18447
  Object.defineProperty(ExpressionValidator.prototype, "expression", {
@@ -20039,13 +20098,16 @@ var question_Question = /** @class */ (function (_super) {
20039
20098
  this.copyCssClasses(classes, css.question);
20040
20099
  this.copyCssClasses(classes.error, css.error);
20041
20100
  this.updateCssClasses(classes, css);
20101
+ return classes;
20102
+ };
20103
+ Question.prototype.onCalcCssClasses = function (classes) {
20104
+ _super.prototype.onCalcCssClasses.call(this, classes);
20042
20105
  if (this.survey) {
20043
20106
  this.survey.updateQuestionCssClasses(this, classes);
20044
20107
  }
20045
20108
  if (this.onUpdateCssClassesCallback) {
20046
20109
  this.onUpdateCssClassesCallback(classes);
20047
20110
  }
20048
- return classes;
20049
20111
  };
20050
20112
  Object.defineProperty(Question.prototype, "cssRoot", {
20051
20113
  get: function () {
@@ -20231,18 +20293,33 @@ var question_Question = /** @class */ (function (_super) {
20231
20293
  .toString();
20232
20294
  };
20233
20295
  Question.prototype.updateElementCss = function (reNew) {
20234
- _super.prototype.updateElementCss.call(this, reNew);
20235
- if (reNew) {
20236
- this.updateQuestionCss(true);
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;
20237
20304
  }
20238
20305
  this.resetIndents();
20239
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
+ };
20240
20314
  Question.prototype.updateQuestionCss = function (reNew) {
20241
- if (this.isLoadingFromJson ||
20242
- !this.survey ||
20243
- (reNew !== true && !this.cssClassesValue))
20315
+ if (this.isLoadingFromJson || !this.survey)
20244
20316
  return;
20245
- this.updateElementCssCore(this.cssClasses);
20317
+ if (this.wasRendered) {
20318
+ this.updateElementCssCore(this.cssClasses);
20319
+ }
20320
+ else {
20321
+ this.isRequireUpdateElements = true;
20322
+ }
20246
20323
  };
20247
20324
  Question.prototype.ensureElementCss = function () {
20248
20325
  if (!this.cssClassesValue) {
@@ -31424,10 +31501,9 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
31424
31501
  if (isDeletingValue) {
31425
31502
  delete rowValue[columnName];
31426
31503
  }
31427
- for (var i = 0; i < row.cells.length; i++) {
31428
- var key = row.cells[i].question.getValueName();
31429
- delete rowValue[key];
31430
- }
31504
+ row.questions.forEach(function (q) {
31505
+ delete rowValue[q.getValueName()];
31506
+ });
31431
31507
  if (newRowValue) {
31432
31508
  newRowValue = JSON.parse(JSON.stringify(newRowValue));
31433
31509
  for (var key in newRowValue) {
@@ -33518,10 +33594,16 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
33518
33594
  confirmDelete = this.isRequireConfirmOnRowDelete(index);
33519
33595
  }
33520
33596
  if (confirmDelete) {
33521
- confirmActionAsync(this.confirmDeleteText, function () {
33522
- _this.removeRowAsync(index, row);
33523
- onRowRemoved && onRowRemoved();
33524
- }, undefined, this.getLocale(), this.survey.rootElement);
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
+ });
33525
33607
  return;
33526
33608
  }
33527
33609
  this.removeRowAsync(index, row);
@@ -34247,7 +34329,8 @@ var defaultV2Css = {
34247
34329
  noPointerEventsMode: "sd-question--no-pointer-events",
34248
34330
  errorsContainer: "sd-element__erbox sd-question__erbox",
34249
34331
  errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
34250
- errorsContainerBottom: "sd-question__erbox--below-question"
34332
+ errorsContainerBottom: "sd-question__erbox--below-question",
34333
+ confirmDialog: "sd-popup--confirm sv-popup--confirm"
34251
34334
  },
34252
34335
  image: {
34253
34336
  mainRoot: "sd-question sd-question--image",
@@ -36180,7 +36263,6 @@ var panel_spreadArray = (undefined && undefined.__spreadArray) || function (to,
36180
36263
 
36181
36264
 
36182
36265
 
36183
-
36184
36266
  var panel_QuestionRowModel = /** @class */ (function (_super) {
36185
36267
  panel_extends(QuestionRowModel, _super);
36186
36268
  function QuestionRowModel(panel) {
@@ -36783,9 +36865,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36783
36865
  });
36784
36866
  Object.defineProperty(PanelModelBase.prototype, "parent", {
36785
36867
  /**
36786
- * Returns a survey element (panel or page) that contains this panel and allows you to move this question to a different survey element.
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:
36787
36871
  *
36788
- * This property is always `null` for the `PageModel` object.
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).
36874
+ *
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.
36789
36876
  */
36790
36877
  get: function () {
36791
36878
  return this.getPropertyValue("parent", null);
@@ -36868,10 +36955,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36868
36955
  configurable: true
36869
36956
  });
36870
36957
  Object.defineProperty(PanelModelBase.prototype, "isPanel", {
36871
- /**
36872
- * Returns `true` if the survey element is a panel.
36873
- * @see Base.getType
36874
- */
36875
36958
  get: function () {
36876
36959
  return false;
36877
36960
  },
@@ -37613,11 +37696,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37613
37696
  PanelModelBase.prototype.updateRows = function () {
37614
37697
  if (this.isLoadingFromJson)
37615
37698
  return;
37616
- for (var i = 0; i < this.elements.length; i++) {
37617
- if (this.elements[i].isPanel) {
37618
- this.elements[i].updateRows();
37699
+ this.getElementsForRows().forEach(function (el) {
37700
+ if (el.isPanel) {
37701
+ el.updateRows();
37619
37702
  }
37620
- }
37703
+ });
37621
37704
  this.onRowsChanged();
37622
37705
  };
37623
37706
  Object.defineProperty(PanelModelBase.prototype, "rows", {
@@ -37726,7 +37809,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37726
37809
  var _this = this;
37727
37810
  var survey = this.survey;
37728
37811
  var fireNotification = this.canFireAddRemoveNotifications(element);
37729
- element.setSurveyImpl(this.surveyImpl);
37812
+ if (!!this.surveyImpl) {
37813
+ element.setSurveyImpl(this.surveyImpl);
37814
+ }
37730
37815
  element.parent = this;
37731
37816
  this.markQuestionListDirty();
37732
37817
  if (this.canBuildRows()) {
@@ -37752,8 +37837,8 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37752
37837
  };
37753
37838
  PanelModelBase.prototype.onRemoveElement = function (element) {
37754
37839
  element.parent = null;
37840
+ this.unregisterElementPropertiesChanged(element);
37755
37841
  this.markQuestionListDirty();
37756
- element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
37757
37842
  this.updateRowsOnElementRemoved(element);
37758
37843
  if (this.isRandomizing)
37759
37844
  return;
@@ -37762,6 +37847,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37762
37847
  this.removeElementCallback(element);
37763
37848
  this.onElementVisibilityChanged(this);
37764
37849
  };
37850
+ PanelModelBase.prototype.unregisterElementPropertiesChanged = function (element) {
37851
+ element.unregisterPropertyChangedHandlers(["visible", "isVisible", "startWithNewLine"], this.id);
37852
+ };
37765
37853
  PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
37766
37854
  if (!this.canFireAddRemoveNotifications(element))
37767
37855
  return;
@@ -37806,19 +37894,21 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
37806
37894
  PanelModelBase.prototype.buildRows = function () {
37807
37895
  if (!this.canBuildRows())
37808
37896
  return [];
37809
- var result = new Array();
37810
- for (var i = 0; i < this.elements.length; i++) {
37811
- var el = this.elements[i];
37897
+ var res = new Array();
37898
+ var els = this.getElementsForRows();
37899
+ for (var i = 0; i < els.length; i++) {
37900
+ var el = els[i];
37812
37901
  var isNewRow = i == 0 || el.startWithNewLine;
37813
- var row = isNewRow ? this.createRowAndSetLazy(result.length) : result[result.length - 1];
37902
+ var row = isNewRow ? this.createRowAndSetLazy(res.length) : res[res.length - 1];
37814
37903
  if (isNewRow)
37815
- result.push(row);
37904
+ res.push(row);
37816
37905
  row.addElement(el);
37817
37906
  }
37818
- for (var i = 0; i < result.length; i++) {
37819
- result[i].updateVisible();
37820
- }
37821
- return result;
37907
+ res.forEach(function (row) { return row.updateVisible(); });
37908
+ return res;
37909
+ };
37910
+ PanelModelBase.prototype.getElementsForRows = function () {
37911
+ return this.elements;
37822
37912
  };
37823
37913
  PanelModelBase.prototype.getDragDropInfo = function () {
37824
37914
  var page = this.getPage(this.parent);
@@ -38381,10 +38471,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
38381
38471
  }
38382
38472
  this.rows.splice(0, this.rows.length);
38383
38473
  }
38474
+ this.disposeElements();
38475
+ this.elements.splice(0, this.elements.length);
38476
+ };
38477
+ PanelModelBase.prototype.disposeElements = function () {
38384
38478
  for (var i = 0; i < this.elements.length; i++) {
38385
38479
  this.elements[i].dispose();
38386
38480
  }
38387
- this.elements.splice(0, this.elements.length);
38388
38481
  };
38389
38482
  PanelModelBase.panelCounter = 100;
38390
38483
  panel_decorate([
@@ -38437,7 +38530,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
38437
38530
  });
38438
38531
  PanelModel.prototype.getSurvey = function (live) {
38439
38532
  if (live === void 0) { live = false; }
38440
- if (live) {
38533
+ if (live && this.isPanel) {
38441
38534
  return !!this.parent ? this.parent.getSurvey(live) : null;
38442
38535
  }
38443
38536
  return _super.prototype.getSurvey.call(this, live);
@@ -38588,6 +38681,8 @@ var panel_PanelModel = /** @class */ (function (_super) {
38588
38681
  return locTitleValue;
38589
38682
  };
38590
38683
  PanelModel.prototype.beforeSetVisibleIndex = function (index) {
38684
+ if (this.isPage)
38685
+ return _super.prototype.beforeSetVisibleIndex.call(this, index);
38591
38686
  var visibleIndex = -1;
38592
38687
  if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty || this.hasParentInQuestionIndex())) {
38593
38688
  visibleIndex = index;
@@ -38619,7 +38714,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
38619
38714
  }
38620
38715
  };
38621
38716
  PanelModel.prototype.getRenderedTitle = function (str) {
38622
- if (!str) {
38717
+ if (this.isPanel && !str) {
38623
38718
  if (this.isCollapsed || this.isExpanded)
38624
38719
  return this.name;
38625
38720
  if (this.isDesignMode)
@@ -38744,11 +38839,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
38744
38839
  return this.footerToolbarValue;
38745
38840
  };
38746
38841
  Object.defineProperty(PanelModel.prototype, "hasEditButton", {
38747
- get: function () {
38748
- if (this.survey && this.survey.state === "preview")
38749
- return (this.parent && this.parent instanceof page_PageModel);
38750
- return false;
38751
- },
38842
+ get: function () { return false; },
38752
38843
  enumerable: false,
38753
38844
  configurable: true
38754
38845
  });
@@ -38757,19 +38848,16 @@ var panel_PanelModel = /** @class */ (function (_super) {
38757
38848
  return;
38758
38849
  this.survey.cancelPreviewByPage(this);
38759
38850
  };
38760
- PanelModel.prototype.canShowTitle = function (survey) {
38761
- var page = this.originalPage;
38762
- if (!!page)
38763
- return page.canShowTitle(survey);
38764
- return _super.prototype.canShowTitle.call(this, survey);
38765
- };
38766
38851
  Object.defineProperty(PanelModel.prototype, "cssTitle", {
38767
38852
  get: function () {
38768
- return this.getCssTitle(this.cssClasses.panel);
38853
+ return this.getCssPanelTitle();
38769
38854
  },
38770
38855
  enumerable: false,
38771
38856
  configurable: true
38772
38857
  });
38858
+ PanelModel.prototype.getCssPanelTitle = function () {
38859
+ return this.getCssTitle(this.cssClasses.panel);
38860
+ };
38773
38861
  PanelModel.prototype.getCssTitleExpandableSvg = function () {
38774
38862
  if (this.state === "default")
38775
38863
  return null;
@@ -38783,6 +38871,8 @@ var panel_PanelModel = /** @class */ (function (_super) {
38783
38871
  configurable: true
38784
38872
  });
38785
38873
  PanelModel.prototype.getCssError = function (cssClasses) {
38874
+ if (this.isPage)
38875
+ return _super.prototype.getCssError.call(this, cssClasses);
38786
38876
  var builder = new CssClassBuilder()
38787
38877
  .append(_super.prototype.getCssError.call(this, cssClasses))
38788
38878
  .append(cssClasses.panel.errorsContainer);
@@ -38813,10 +38903,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
38813
38903
  };
38814
38904
  Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
38815
38905
  get: function () {
38816
- var panel = this;
38817
- if (!!panel.originalPage)
38818
- return true;
38819
- return panel.survey.isShowingPreview && panel.survey.isSinglePage && !!panel.parent && !!panel.parent.originalPage;
38906
+ return false;
38820
38907
  },
38821
38908
  enumerable: false,
38822
38909
  configurable: true
@@ -38856,7 +38943,9 @@ var panel_PanelModel = /** @class */ (function (_super) {
38856
38943
  PanelModel.prototype.afterRenderCore = function (element) {
38857
38944
  var _a;
38858
38945
  _super.prototype.afterRenderCore.call(this, element);
38859
- (_a = this.survey) === null || _a === void 0 ? void 0 : _a.afterRenderPanel(this, element);
38946
+ if (this.isPanel) {
38947
+ (_a = this.survey) === null || _a === void 0 ? void 0 : _a.afterRenderPanel(this, element);
38948
+ }
38860
38949
  };
38861
38950
  return PanelModel;
38862
38951
  }(panel_PanelModelBase));
@@ -38904,27 +38993,17 @@ Serializer.addClass("panelbase", [
38904
38993
  return new panel_PanelModelBase();
38905
38994
  });
38906
38995
  Serializer.addClass("panel", [
38907
- {
38908
- name: "state",
38909
- default: "default",
38910
- choices: ["default", "collapsed", "expanded"],
38911
- },
38996
+ { name: "state", default: "default", choices: ["default", "collapsed", "expanded"] },
38912
38997
  { name: "isRequired:switch", overridingProperty: "requiredIf" },
38913
- {
38914
- name: "requiredErrorText:text",
38915
- serializationProperty: "locRequiredErrorText",
38916
- },
38998
+ { name: "requiredErrorText:text", serializationProperty: "locRequiredErrorText" },
38917
38999
  { name: "startWithNewLine:boolean", default: true },
38918
- "width",
39000
+ { name: "width" },
38919
39001
  { name: "minWidth", defaultFunc: function () { return "auto"; } },
38920
39002
  { name: "maxWidth", defaultFunc: function () { return settings.maxWidth; } },
38921
- {
38922
- name: "colSpan:number", visible: false,
38923
- onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
38924
- },
39003
+ { name: "colSpan:number", visible: false, onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); } },
38925
39004
  {
38926
39005
  name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
38927
- visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
39006
+ visibleIf: function (obj) { return !!obj.survey && obj.survey.gridLayoutEnabled; }
38928
39007
  },
38929
39008
  { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
38930
39009
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
@@ -38944,13 +39023,9 @@ Serializer.addClass("panel", [
38944
39023
  : [];
38945
39024
  },
38946
39025
  },
38947
- "showNumber:boolean",
38948
- {
38949
- name: "showQuestionNumbers",
38950
- default: "default",
38951
- choices: ["default", "onpanel", "off"],
38952
- },
38953
- "questionStartIndex",
39026
+ { name: "showNumber:boolean" },
39027
+ { name: "showQuestionNumbers", default: "default", choices: ["default", "onpanel", "off"] },
39028
+ { name: "questionStartIndex", visibleIf: function (obj) { return obj.isPanel; } },
38954
39029
  { name: "allowAdaptiveActions:boolean", default: true, visible: false },
38955
39030
  ], function () {
38956
39031
  return new panel_PanelModel();
@@ -39226,12 +39301,61 @@ var page_PageModel = /** @class */ (function (_super) {
39226
39301
  return this.name;
39227
39302
  };
39228
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", {
39229
39318
  get: function () {
39230
39319
  return true;
39231
39320
  },
39232
39321
  enumerable: false,
39233
39322
  configurable: true
39234
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
+ };
39235
39359
  Object.defineProperty(PageModel.prototype, "no", {
39236
39360
  get: function () {
39237
39361
  if (!this.canShowPageNumber() || !this.survey)
@@ -39369,6 +39493,8 @@ var page_PageModel = /** @class */ (function (_super) {
39369
39493
  configurable: true
39370
39494
  });
39371
39495
  PageModel.prototype.calcCssClasses = function (css) {
39496
+ if (this.isPanel)
39497
+ return _super.prototype.calcCssClasses.call(this, css);
39372
39498
  var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowReplace: "" };
39373
39499
  this.copyCssClasses(classes.page, css.page);
39374
39500
  this.copyCssClasses(classes.error, css.error);
@@ -39407,20 +39533,18 @@ var page_PageModel = /** @class */ (function (_super) {
39407
39533
  }
39408
39534
  return classes;
39409
39535
  };
39410
- Object.defineProperty(PageModel.prototype, "cssTitle", {
39411
- get: function () {
39412
- if (!this.cssClasses.page)
39413
- return "";
39414
- return new CssClassBuilder()
39415
- .append(this.cssClasses.page.title)
39416
- .toString();
39417
- },
39418
- enumerable: false,
39419
- configurable: true
39420
- });
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
+ };
39421
39545
  Object.defineProperty(PageModel.prototype, "cssRoot", {
39422
39546
  get: function () {
39423
- if (!this.cssClasses.page || !this.survey)
39547
+ if (this.isPanel || !this.cssClasses.page || !this.survey)
39424
39548
  return "";
39425
39549
  return new CssClassBuilder()
39426
39550
  .append(this.cssClasses.page.root)
@@ -39432,6 +39556,8 @@ var page_PageModel = /** @class */ (function (_super) {
39432
39556
  configurable: true
39433
39557
  });
39434
39558
  PageModel.prototype.getCssError = function (cssClasses) {
39559
+ if (this.isPanel)
39560
+ return _super.prototype.getCssError.call(this, cssClasses);
39435
39561
  return new CssClassBuilder()
39436
39562
  .append(_super.prototype.getCssError.call(this, cssClasses))
39437
39563
  .append(cssClasses.page.errorsContainer).toString();
@@ -39608,7 +39734,7 @@ var page_PageModel = /** @class */ (function (_super) {
39608
39734
  jsonobject_property({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
39609
39735
  ], PageModel.prototype, "num", void 0);
39610
39736
  return PageModel;
39611
- }(panel_PanelModelBase));
39737
+ }(panel_PanelModel));
39612
39738
 
39613
39739
  Serializer.addClass("page", [
39614
39740
  {
@@ -39633,9 +39759,25 @@ Serializer.addClass("page", [
39633
39759
  },
39634
39760
  { name: "title:text", serializationProperty: "locTitle" },
39635
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 },
39636
39778
  ], function () {
39637
39779
  return new page_PageModel();
39638
- }, "panelbase");
39780
+ }, "panel");
39639
39781
 
39640
39782
  // CONCATENATED MODULE: ./packages/survey-core/src/progress-buttons.ts
39641
39783
  var progress_buttons_extends = (undefined && undefined.__extends) || (function () {
@@ -39877,16 +40019,27 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
39877
40019
 
39878
40020
 
39879
40021
 
39880
-
39881
40022
  function tryFocusPage(survey, panel) {
39882
40023
  if (survey.isDesignMode)
39883
40024
  return true;
39884
40025
  panel.focusFirstQuestion();
39885
40026
  return true;
39886
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
+ }
39887
40041
  function createTOCListModel(survey, onAction) {
39888
40042
  var items = getTOCItems(survey, onAction);
39889
- var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items[0];
39890
40043
  var listOptions = {
39891
40044
  items: items,
39892
40045
  onSelectionChanged: function (item) {
@@ -39894,15 +40047,20 @@ function createTOCListModel(survey, onAction) {
39894
40047
  listModel.selectedItem = item;
39895
40048
  }
39896
40049
  },
39897
- allowSelection: true,
39898
40050
  searchEnabled: false,
39899
40051
  locOwner: survey,
39900
- selectedItem: selectedItem
39901
40052
  };
39902
40053
  var listModel = new list_ListModel(listOptions);
39903
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]);
39904
40059
  survey.onCurrentPageChanged.add(function (s, o) {
39905
- listModel.selectedItem = listModel.actions.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
40060
+ updateSelectedItem(survey.currentPage);
40061
+ });
40062
+ survey.onFocusInQuestion.add(function (s, o) {
40063
+ updateSelectedItem(getPage(o.question));
39906
40064
  });
39907
40065
  survey.registerFunctionOnPropertyValueChanged("pages", function () {
39908
40066
  listModel.setItems(getTOCItems(survey, onAction));
@@ -39910,8 +40068,7 @@ function createTOCListModel(survey, onAction) {
39910
40068
  return listModel;
39911
40069
  }
39912
40070
  function getTOCItems(survey, onAction) {
39913
- var _a;
39914
- var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
40071
+ var pagesSource = survey.pages;
39915
40072
  var items = (pagesSource || []).map(function (page) {
39916
40073
  return new action_Action({
39917
40074
  id: page.name,
@@ -39919,7 +40076,7 @@ function getTOCItems(survey, onAction) {
39919
40076
  action: function () {
39920
40077
  DomDocumentHelper.activeElementBlur();
39921
40078
  !!onAction && onAction();
39922
- if (page instanceof page_PageModel) {
40079
+ if (page.isPage) {
39923
40080
  return survey.tryNavigateToPage(page);
39924
40081
  }
39925
40082
  return tryFocusPage(survey, page);
@@ -43632,6 +43789,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43632
43789
  get: function () {
43633
43790
  if (this.isDesignMode)
43634
43791
  return this.pages;
43792
+ if (!!this.pageContainerValue && (this.isShowingPreview || this.isSinglePage))
43793
+ return [this.pageContainerValue];
43635
43794
  var result = new Array();
43636
43795
  for (var i = 0; i < this.pages.length; i++) {
43637
43796
  if (this.isPageInVisibleList(this.pages[i])) {
@@ -43765,7 +43924,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43765
43924
  return false;
43766
43925
  if (index === this.currentPageNo)
43767
43926
  return false;
43768
- if (index < this.currentPageNo || this.isValidateOnComplete) {
43927
+ if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages) {
43769
43928
  this.currentPageNo = index;
43770
43929
  return true;
43771
43930
  }
@@ -44097,6 +44256,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44097
44256
  this.onFirstPageIsStartedChanged();
44098
44257
  if (goToFirstPage) {
44099
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
+ }
44100
44263
  }
44101
44264
  if (clearData) {
44102
44265
  this.updateValuesWithDefaults();
@@ -44134,7 +44297,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44134
44297
  SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
44135
44298
  this.notifyQuestionsOnHidingContent(oldValue);
44136
44299
  var options = this.createPageChangeEventOptions(newValue, oldValue);
44137
- if (oldValue && !oldValue.passed) {
44300
+ if (oldValue && !oldValue.isDisposed && !oldValue.passed) {
44138
44301
  if (oldValue.validate(false)) {
44139
44302
  oldValue.passed = true;
44140
44303
  }
@@ -44145,9 +44308,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44145
44308
  this.onCurrentPageChanged.fire(this, options);
44146
44309
  };
44147
44310
  SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
44148
- if (!page)
44149
- return;
44150
- page.questions.forEach(function (q) { return q.onHidingContent(); });
44311
+ if (page && !page.isDisposed) {
44312
+ page.questions.forEach(function (q) { return q.onHidingContent(); });
44313
+ }
44151
44314
  };
44152
44315
  SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue) {
44153
44316
  var diff = !!newValue && !!oldValue ? newValue.visibleIndex - oldValue.visibleIndex : 0;
@@ -44383,6 +44546,30 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44383
44546
  return false;
44384
44547
  return this.doCurrentPageComplete(false);
44385
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
+ };
44386
44573
  SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
44387
44574
  var _this = this;
44388
44575
  if (!this.isEditMode || this.ignoreValidation)
@@ -44712,9 +44899,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44712
44899
  };
44713
44900
  SurveyModel.prototype.nextPageUIClick = function () {
44714
44901
  if (!!this.mouseDownPage && this.mouseDownPage !== this.activePage)
44715
- return;
44902
+ return false;
44716
44903
  this.mouseDownPage = null;
44717
- return this.nextPage();
44904
+ return this.performNext();
44718
44905
  };
44719
44906
  SurveyModel.prototype.nextPageMouseDown = function () {
44720
44907
  this.mouseDownPage = this.activePage;
@@ -44758,7 +44945,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44758
44945
  this.isShowingPreview = false;
44759
44946
  };
44760
44947
  SurveyModel.prototype.cancelPreviewByPage = function (panel) {
44761
- this.cancelPreview(panel["originalPage"]);
44948
+ this.cancelPreview(panel);
44762
44949
  };
44763
44950
  SurveyModel.prototype.doCurrentPageComplete = function (doComplete) {
44764
44951
  if (this.isValidatingOnServer)
@@ -44788,6 +44975,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44788
44975
  enumerable: false,
44789
44976
  configurable: true
44790
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
+ };
44791
44988
  Object.defineProperty(SurveyModel.prototype, "questionsOnPageMode", {
44792
44989
  /**
44793
44990
  * Specifies how to distribute survey elements between pages.
@@ -44863,25 +45060,54 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44863
45060
  this.pageVisibilityChanged(this.pages[0], !this.isStartedState);
44864
45061
  };
44865
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 () {
44866
45084
  if (this.isDesignMode)
44867
45085
  return;
44868
- if (this.isShowingPreview) {
44869
- this.runningPages = this.pages.slice(0, this.pages.length);
44870
- this.setupPagesForPageModes(true, false);
44871
- }
44872
- else {
44873
- if (this.runningPages) {
44874
- this.restoreOriginalPages(this.runningPages);
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);
44875
45099
  }
44876
- this.runningPages = undefined;
44877
45100
  }
44878
- this.runConditions();
44879
- this.updateAllElementsVisibility(this.pages);
44880
- this.updateVisibleIndexes();
44881
45101
  if (this.isShowingPreview) {
44882
- this.currentPageNo = 0;
45102
+ rootPage = this.createRootPage(previewName, rootPage ? [rootPage] : this.pages);
44883
45103
  }
44884
- else {
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();
44885
45111
  var curPage = this.gotoPageFromPreview;
44886
45112
  this.gotoPageFromPreview = null;
44887
45113
  if (helpers_Helpers.isValueEmpty(curPage) && this.visiblePageCount > 0) {
@@ -44893,110 +45119,62 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44893
45119
  this.changeCurrentPageFromPreview = false;
44894
45120
  }
44895
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();
44896
45131
  };
44897
- SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue, isFirstLoad) {
44898
- if (isFirstLoad === void 0) { isFirstLoad = false; }
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) {
44899
45159
  if (this.isShowingPreview)
44900
45160
  return;
44901
- if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
44902
- if (this.originalPages) {
44903
- this.restoreOriginalPages(this.originalPages);
44904
- }
44905
- this.originalPages = undefined;
45161
+ this.currentSingleQuestion = undefined;
45162
+ if (oldValue === "singlePage") {
45163
+ this.updatePagesContainer();
44906
45164
  }
44907
- else {
44908
- if (!oldValue || oldValue == "standard") {
44909
- this.originalPages = this.pages.slice(0, this.pages.length);
44910
- }
44911
- this.setupPagesForPageModes(this.isSinglePage, isFirstLoad);
45165
+ if (this.isSinglePage) {
45166
+ this.updatePagesContainer();
44912
45167
  }
44913
- this.runConditions();
44914
- this.updateVisibleIndexes();
44915
- };
44916
- SurveyModel.prototype.restoreOriginalPages = function (originalPages) {
44917
- this.questionHashesClear();
44918
- this.pages.splice(0, this.pages.length);
44919
- for (var i = 0; i < originalPages.length; i++) {
44920
- var page = originalPages[i];
44921
- page.setWasShown(false);
44922
- 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
+ }
44923
45173
  }
44924
45174
  };
44925
45175
  SurveyModel.prototype.getPageStartIndex = function () {
44926
45176
  return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
44927
45177
  };
44928
- SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
44929
- var _this = this;
44930
- this.questionHashesClear();
44931
- if (this.firstPageIsStarted && this.pages.length > 0) {
44932
- this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
44933
- }
44934
- this.isLockingUpdateOnPageModes = !isFirstLoad;
44935
- var startIndex = this.getPageStartIndex();
44936
- _super.prototype.startLoadingFromJson.call(this);
44937
- var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
44938
- var deletedLen = this.pages.length - startIndex;
44939
- this.pages.splice(startIndex, deletedLen);
44940
- for (var i = 0; i < newPages.length; i++) {
44941
- this.pages.push(newPages[i]);
44942
- }
44943
- _super.prototype.endLoadingFromJson.call(this);
44944
- for (var i = 0; i < newPages.length; i++) {
44945
- newPages[i].setSurveyImpl(this, true);
44946
- }
44947
- this.doElementsOnLoad();
44948
- this.updateCurrentPage();
44949
- this.isLockingUpdateOnPageModes = false;
44950
- };
44951
- SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
44952
- if (isSinglePage) {
44953
- return [this.createSinglePage(startIndex)];
44954
- }
44955
- return this.createPagesForEveryQuestion(startIndex);
44956
- };
44957
- SurveyModel.prototype.createSinglePage = function (startIndex) {
44958
- var single = this.createNewPage("all");
44959
- single.setSurveyImpl(this);
44960
- for (var i = startIndex; i < this.pages.length; i++) {
44961
- var page = this.pages[i];
44962
- var panel = Serializer.createClass("panel");
44963
- panel.originalPage = page;
44964
- single.addPanel(panel);
44965
- var json = new jsonobject_JsonObject().toJsonObject(page);
44966
- new jsonobject_JsonObject().toObject(json, panel);
44967
- }
44968
- return single;
44969
- };
44970
- SurveyModel.prototype.createPagesForEveryQuestion = function (startIndex) {
44971
- var res = [];
44972
- for (var i = startIndex; i < this.pages.length; i++) {
44973
- var originalPage = this.pages[i];
44974
- // Initialize randomization
44975
- originalPage.setWasShown(true);
44976
- for (var j = 0; j < originalPage.elements.length; j++) {
44977
- var originalElement = originalPage.elements[j];
44978
- var element = Serializer.createClass(originalElement.getType());
44979
- if (!element)
44980
- continue;
44981
- var jsonObj = new jsonobject_JsonObject();
44982
- //Deserialize page properties only, excluding elements
44983
- jsonObj.lightSerializing = true;
44984
- var pageJson = jsonObj.toJsonObject(originalPage);
44985
- var page = Serializer.createClass(originalPage.getType());
44986
- page.fromJSON(pageJson);
44987
- page.name = originalElement.name;
44988
- page.setSurveyImpl(this);
44989
- res.push(page);
44990
- var json = new jsonobject_JsonObject().toJsonObject(originalElement);
44991
- page.addElement(element);
44992
- new jsonobject_JsonObject().toObject(json, element);
44993
- for (var k = 0; k < page.questions.length; k++) {
44994
- this.questionHashesAdded(page.questions[k]);
44995
- }
44996
- }
44997
- }
44998
- return res;
44999
- };
45000
45178
  Object.defineProperty(SurveyModel.prototype, "isFirstPage", {
45001
45179
  /**
45002
45180
  * Indicates whether the [current page](#currentPage) is the first page.
@@ -45062,30 +45240,73 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45062
45240
  enumerable: false,
45063
45241
  configurable: true
45064
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
+ });
45065
45257
  SurveyModel.prototype.updateIsFirstLastPageState = function () {
45066
45258
  var curPage = this.currentPage;
45067
45259
  this.setPropertyValue("isFirstPage", !!curPage && curPage === this.firstVisiblePage);
45068
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);
45069
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
+ });
45070
45289
  SurveyModel.prototype.calcIsShowPrevButton = function () {
45071
- if (this.isFirstPage || !this.showPrevButton || this.state !== "running")
45290
+ if (this.isFirstPageOrElement || !this.showPrevButton || this.state !== "running")
45072
45291
  return false;
45292
+ if (this.isFirstElement !== undefined)
45293
+ return true;
45073
45294
  var page = this.visiblePages[this.currentPageNo - 1];
45074
45295
  return page && page.getMaxTimeToFinish() <= 0;
45075
45296
  };
45076
45297
  SurveyModel.prototype.calcIsShowNextButton = function () {
45077
- return this.state === "running" && !this.isLastPage && !this.canBeCompletedByTrigger;
45298
+ return this.state === "running" && !this.isLastPageOrElement && !this.canBeCompletedByTrigger;
45078
45299
  };
45079
45300
  SurveyModel.prototype.calcIsCompleteButtonVisible = function () {
45080
45301
  var state = this.state;
45081
45302
  return this.isEditMode && (this.state === "running" &&
45082
- (this.isLastPage && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
45303
+ (this.isLastPageOrElement && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
45083
45304
  || state === "preview") && this.showCompleteButton;
45084
45305
  };
45085
45306
  SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
45086
45307
  return (this.isEditMode &&
45087
45308
  this.isShowPreviewBeforeComplete &&
45088
- this.state == "running" && this.isLastPage);
45309
+ this.state == "running" && this.isLastPageOrElement);
45089
45310
  };
45090
45311
  SurveyModel.prototype.calcIsCancelPreviewButtonVisible = function () {
45091
45312
  return (this.isEditMode &&
@@ -45094,6 +45315,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45094
45315
  };
45095
45316
  Object.defineProperty(SurveyModel.prototype, "firstVisiblePage", {
45096
45317
  get: function () {
45318
+ if (this.visiblePageCount === 1)
45319
+ return this.visiblePages[0];
45097
45320
  var pages = this.pages;
45098
45321
  for (var i = 0; i < pages.length; i++) {
45099
45322
  if (this.isPageInVisibleList(pages[i]))
@@ -45106,6 +45329,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45106
45329
  });
45107
45330
  Object.defineProperty(SurveyModel.prototype, "lastVisiblePage", {
45108
45331
  get: function () {
45332
+ if (this.visiblePageCount === 1)
45333
+ return this.visiblePages[0];
45109
45334
  var pages = this.pages;
45110
45335
  for (var i = pages.length - 1; i >= 0; i--) {
45111
45336
  if (this.isPageInVisibleList(pages[i]))
@@ -45454,7 +45679,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45454
45679
  });
45455
45680
  SurveyModel.prototype.updateProgressText = function (onValueChanged) {
45456
45681
  if (onValueChanged === void 0) { onValueChanged = false; }
45457
- if (this.isCalculatingProgressText || this.isShowingPreview || this.isLockingUpdateOnPageModes)
45682
+ if (this.isCalculatingProgressText || this.isShowingPreview)
45458
45683
  return;
45459
45684
  if (onValueChanged &&
45460
45685
  this.progressBarType == "pages" &&
@@ -45565,7 +45790,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45565
45790
  width: width,
45566
45791
  };
45567
45792
  this.onResize.fire(this, options);
45568
- this.setResponsiveStartWidth(width);
45793
+ // this.setResponsiveStartWidth(width);
45569
45794
  return isMobileChanged;
45570
45795
  };
45571
45796
  SurveyModel.prototype.triggerResponsiveness = function (hard) {
@@ -46796,7 +47021,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46796
47021
  this.updateVisibleIndexes();
46797
47022
  };
46798
47023
  SurveyModel.prototype.updateVisibleIndexes = function (page) {
46799
- if (this.isLoadingFromJson || !!this.isEndLoadingFromJson || this.isLockingUpdateOnPageModes)
47024
+ if (this.isLoadingFromJson || !!this.isEndLoadingFromJson)
46800
47025
  return;
46801
47026
  if (this.isRunningConditions &&
46802
47027
  this.onQuestionVisibleChanged.isEmpty &&
@@ -46865,12 +47090,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46865
47090
  SurveyModel.prototype.endLoadingFromJson = function () {
46866
47091
  this.isEndLoadingFromJson = "processing";
46867
47092
  this.onFirstPageIsStartedChanged();
46868
- this.onQuestionsOnPageModeChanged("standard", true);
46869
47093
  _super.prototype.endLoadingFromJson.call(this);
46870
47094
  if (this.hasCookie) {
46871
47095
  this.isCompletedBefore = true;
46872
47096
  }
46873
47097
  this.doElementsOnLoad();
47098
+ this.onQuestionsOnPageModeChanged("standard");
46874
47099
  this.isEndLoadingFromJson = "conditions";
46875
47100
  this.runConditions();
46876
47101
  this.notifyElementsOnAnyValueOrVariableChanged("");
@@ -46918,7 +47143,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46918
47143
  mouseDown: function () { return _this.navigationMouseDown(); },
46919
47144
  },
46920
47145
  locTitle: this.locPagePrevText,
46921
- action: function () { return _this.prevPage(); },
47146
+ action: function () { return _this.performPrevious(); },
46922
47147
  component: defaultComponent
46923
47148
  });
46924
47149
  var navNext = new action_Action({
@@ -47198,8 +47423,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47198
47423
  SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
47199
47424
  if (locNotification === void 0) { locNotification = false; }
47200
47425
  if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
47201
- if (this.isLockingUpdateOnPageModes)
47202
- return;
47203
47426
  var newValue = newQuestionValue;
47204
47427
  if (allowNotifyValueChanged) {
47205
47428
  newValue = this.questionOnValueChanging(name, newQuestionValue);
@@ -47884,6 +48107,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47884
48107
  if (this.isScaled && this.responsiveStartWidth > 1) {
47885
48108
  var initialWidth = this.responsiveStartWidth;
47886
48109
  try {
48110
+ width = width || this.staticStartWidth;
47887
48111
  initialWidth = !isNaN(width) ? width : parseFloat(width.toString().replace("px", ""));
47888
48112
  }
47889
48113
  catch (e) { }
@@ -47896,6 +48120,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47896
48120
  enumerable: false,
47897
48121
  configurable: true
47898
48122
  });
48123
+ SurveyModel.prototype.setStaticStartWidth = function (width) {
48124
+ this.staticStartWidth = width;
48125
+ };
47899
48126
  SurveyModel.prototype.setResponsiveStartWidth = function (width) {
47900
48127
  this.responsiveStartWidth = width;
47901
48128
  };
@@ -48732,8 +48959,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
48732
48959
  jsonobject_property()
48733
48960
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
48734
48961
  survey_decorate([
48735
- jsonobject_property({ defaultValue: 100 })
48962
+ jsonobject_property({
48963
+ defaultValue: 100,
48964
+ onSet: function (val, target, prevVal) {
48965
+ target.pages.forEach(function (p) { return p.updateRootStyle(); });
48966
+ },
48967
+ })
48736
48968
  ], SurveyModel.prototype, "widthScale", void 0);
48969
+ survey_decorate([
48970
+ jsonobject_property()
48971
+ ], SurveyModel.prototype, "staticStartWidth", void 0);
48737
48972
  survey_decorate([
48738
48973
  jsonobject_property()
48739
48974
  ], SurveyModel.prototype, "responsiveStartWidth", void 0);
@@ -55988,6 +56223,9 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
55988
56223
  if (title) {
55989
56224
  _this.title = title;
55990
56225
  }
56226
+ _this.editor.onPropertyChanged.add(function (sender, options) {
56227
+ _this.onPropertyChanged.fire(_this, options);
56228
+ });
55991
56229
  return _this;
55992
56230
  }
55993
56231
  MultipleTextItemModel.prototype.getType = function () {
@@ -61009,7 +61247,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
61009
61247
  };
61010
61248
  _this.doClean = function () {
61011
61249
  if (_this.needConfirmRemoveFile) {
61012
- confirmActionAsync(_this.confirmRemoveAllMessage, function () { _this.clearFilesCore(); }, undefined, _this.getLocale(), _this.survey.rootElement);
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
+ });
61013
61257
  return;
61014
61258
  }
61015
61259
  _this.clearFilesCore();
@@ -61309,7 +61553,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
61309
61553
  if (this.previewValue.length > 0 && !this.calculatedGapBetweenItems && !this.calculatedItemWidth) {
61310
61554
  setTimeout(function () {
61311
61555
  _this.processResponsiveness(0, _this._width);
61312
- });
61556
+ }, 1);
61313
61557
  }
61314
61558
  this.prevPreviewLength = this.previewValue.length;
61315
61559
  };
@@ -62018,7 +62262,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
62018
62262
  var _this = this;
62019
62263
  event.stopPropagation();
62020
62264
  if (this.needConfirmRemoveFile) {
62021
- confirmActionAsync(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); }, undefined, this.getLocale(), this.survey.rootElement);
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
+ });
62022
62272
  return;
62023
62273
  }
62024
62274
  this.removeFileCore(data);
@@ -68003,7 +68253,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
68003
68253
  }
68004
68254
  };
68005
68255
  if (this.isRequireConfirmOnDelete(value)) {
68006
- confirmActionAsync(this.confirmDeleteText, function () { removePanel(); }, undefined, this.getLocale(), this.survey.rootElement);
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
+ });
68007
68263
  }
68008
68264
  else {
68009
68265
  removePanel();
@@ -72144,8 +72400,8 @@ Serializer.addClass("currencymask", [
72144
72400
 
72145
72401
  var Version;
72146
72402
  var ReleaseDate;
72147
- Version = "" + "1.12.14";
72148
- ReleaseDate = "" + "2024-12-09";
72403
+ Version = "" + "1.12.16";
72404
+ ReleaseDate = "" + "2024-12-24";
72149
72405
  function checkLibraryVersion(ver, libraryName) {
72150
72406
  if (Version != ver) {
72151
72407
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -82655,7 +82911,7 @@ var element_SurveyRowElement = /** @class */ (function (_super) {
82655
82911
  if (!this.row.isNeedRender) {
82656
82912
  return ReactElementFactory.Instance.createElement(element.skeletonComponentName, { key: element.name + index, element: element, css: this.css, });
82657
82913
  }
82658
- var elementType = element.getType();
82914
+ var elementType = element.getTemplate();
82659
82915
  if (!ReactElementFactory.Instance.isElementRegistered(elementType)) {
82660
82916
  elementType = "question";
82661
82917
  }
@@ -83391,7 +83647,7 @@ var action_bar_SurveyActionBar = /** @class */ (function (_super) {
83391
83647
  return;
83392
83648
  var container = this.rootRef.current;
83393
83649
  if (!!container) {
83394
- this.model.initResponsivityManager(container, function (callback) { setTimeout(callback); });
83650
+ this.model.initResponsivityManager(container, function (callback) { setTimeout(callback, 100); });
83395
83651
  }
83396
83652
  };
83397
83653
  SurveyActionBar.prototype.componentWillUnmount = function () {
@@ -83406,7 +83662,7 @@ var action_bar_SurveyActionBar = /** @class */ (function (_super) {
83406
83662
  if (!!this.model.hasActions) {
83407
83663
  var container = this.rootRef.current;
83408
83664
  if (!!container) {
83409
- this.model.initResponsivityManager(container, function (callback) { setTimeout(callback); });
83665
+ this.model.initResponsivityManager(container, function (callback) { setTimeout(callback, 100); });
83410
83666
  }
83411
83667
  }
83412
83668
  };
@@ -89460,13 +89716,10 @@ var list_item_ListItem = /** @class */ (function (_super) {
89460
89716
  var _this = this;
89461
89717
  if (!this.item)
89462
89718
  return null;
89463
- var contentWrapStyle = {
89464
- paddingInlineStart: this.model.getItemIndent(this.item)
89465
- };
89466
89719
  var className = this.model.getItemClass(this.item);
89467
89720
  var itemContent = this.item.component || this.model.itemComponent;
89468
89721
  var newElement = ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
89469
- var contentWrap = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { style: contentWrapStyle, 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);
89722
+ 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);
89470
89723
  var separator = this.item.needSeparator ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
89471
89724
  var isVisible = this.model.isItemVisible(this.item);
89472
89725
  var style = {
@@ -90210,7 +90463,7 @@ var image_SurveyQuestionImage = /** @class */ (function (_super) {
90210
90463
  }
90211
90464
  var control = null;
90212
90465
  if (this.question.renderedMode === "image") {
90213
- 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,
90466
+ 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,
90214
90467
  //alt={item.text || item.value}
90215
90468
  style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
90216
90469
  }
@@ -90527,21 +90780,15 @@ var list_item_content_ListItemContent = /** @class */ (function (_super) {
90527
90780
  ListItemContent.prototype.render = function () {
90528
90781
  if (!this.item)
90529
90782
  return null;
90530
- var content = [];
90531
90783
  var text = this.renderLocString(this.item.locTitle, undefined, "locString");
90532
- if (this.item.iconName) {
90533
- var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "icon", className: this.model.cssClasses.itemIcon, iconName: this.item.iconName, size: this.item.iconSize, "aria-label": this.item.title });
90534
- content.push(icon);
90535
- content.push(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { key: "text" }, text));
90536
- }
90537
- else {
90538
- content.push(text);
90539
- }
90540
- if (this.item.markerIconName) {
90541
- 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" });
90542
- content.push(icon);
90543
- }
90544
- 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);
90545
90792
  };
90546
90793
  return ListItemContent;
90547
90794
  }(reactquestion_element_SurveyElementBase));
@@ -90641,7 +90888,7 @@ var logo_image_LogoImage = /** @class */ (function (_super) {
90641
90888
  LogoImage.prototype.render = function () {
90642
90889
  var content = [];
90643
90890
  content.push(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { key: "logo-image", className: this.survey.logoClassNames },
90644
- 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 } })));
90891
+ 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 } })));
90645
90892
  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);
90646
90893
  };
90647
90894
  return LogoImage;