survey-react 1.12.2 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +65 -50
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +69 -84
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +59 -24
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +102 -42
- package/survey.react.js +624 -279
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.4
|
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
|
*/
|
@@ -964,7 +964,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
|
|
964
964
|
/*!********************************************!*\
|
965
965
|
!*** ./src/entries/react.ts + 282 modules ***!
|
966
966
|
\********************************************/
|
967
|
-
/*! 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, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, 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 */
|
967
|
+
/*! 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, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, 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 */
|
968
968
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"} (<- Module is not an ECMAScript module) */
|
969
969
|
/*! ModuleConcatenation bailout: Cannot concat with external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"} (<- Module is not an ECMAScript module) */
|
970
970
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
@@ -1160,6 +1160,9 @@ __webpack_require__.d(__webpack_exports__, "increaseHeightByContent", function()
|
|
1160
1160
|
__webpack_require__.d(__webpack_exports__, "createSvg", function() { return /* reexport */ createSvg; });
|
1161
1161
|
__webpack_require__.d(__webpack_exports__, "chooseFiles", function() { return /* reexport */ chooseFiles; });
|
1162
1162
|
__webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return /* reexport */ sanitizeEditableContent; });
|
1163
|
+
__webpack_require__.d(__webpack_exports__, "prepareElementForVerticalAnimation", function() { return /* reexport */ prepareElementForVerticalAnimation; });
|
1164
|
+
__webpack_require__.d(__webpack_exports__, "cleanHtmlElementAfterAnimation", function() { return /* reexport */ cleanHtmlElementAfterAnimation; });
|
1165
|
+
__webpack_require__.d(__webpack_exports__, "classesToSelector", function() { return /* reexport */ classesToSelector; });
|
1163
1166
|
__webpack_require__.d(__webpack_exports__, "InputMaskBase", function() { return /* reexport */ mask_base_InputMaskBase; });
|
1164
1167
|
__webpack_require__.d(__webpack_exports__, "InputMaskPattern", function() { return /* reexport */ mask_pattern_InputMaskPattern; });
|
1165
1168
|
__webpack_require__.d(__webpack_exports__, "InputMaskNumeric", function() { return /* reexport */ mask_numeric_InputMaskNumeric; });
|
@@ -1710,7 +1713,7 @@ var helpers_Helpers = /** @class */ (function () {
|
|
1710
1713
|
var value = newValue ? newValue.length : "0";
|
1711
1714
|
return [value, maxLength].join("/");
|
1712
1715
|
};
|
1713
|
-
Helpers.getNumberByIndex = function (index, startIndexStr) {
|
1716
|
+
Helpers.getNumberByIndex = function (index, startIndexStr, parentIndex) {
|
1714
1717
|
if (index < 0)
|
1715
1718
|
return "";
|
1716
1719
|
var startIndex = 1;
|
@@ -1719,16 +1722,19 @@ var helpers_Helpers = /** @class */ (function () {
|
|
1719
1722
|
var isNumeric = true;
|
1720
1723
|
var strIndex = "A";
|
1721
1724
|
var str = "";
|
1725
|
+
var hasDigitFunc = function (str) {
|
1726
|
+
if (!str)
|
1727
|
+
return false;
|
1728
|
+
for (var i = 0; i < str.length; i++) {
|
1729
|
+
if (Helpers.isCharDigit(str[i]))
|
1730
|
+
return true;
|
1731
|
+
}
|
1732
|
+
return false;
|
1733
|
+
};
|
1722
1734
|
if (!!startIndexStr) {
|
1723
1735
|
str = startIndexStr;
|
1724
1736
|
var ind = str.length - 1;
|
1725
|
-
var hasDigit =
|
1726
|
-
for (var i = 0; i < str.length; i++) {
|
1727
|
-
if (Helpers.isCharDigit(str[i])) {
|
1728
|
-
hasDigit = true;
|
1729
|
-
break;
|
1730
|
-
}
|
1731
|
-
}
|
1737
|
+
var hasDigit = hasDigitFunc(str);
|
1732
1738
|
var checkLetter = function () {
|
1733
1739
|
return ((hasDigit && !Helpers.isCharDigit(str[ind])) ||
|
1734
1740
|
Helpers.isCharNotLetterAndDigit(str[ind]));
|
@@ -1758,6 +1764,9 @@ var helpers_Helpers = /** @class */ (function () {
|
|
1758
1764
|
postfix = newPostfix;
|
1759
1765
|
}
|
1760
1766
|
}
|
1767
|
+
if (parentIndex > -1 && hasDigitFunc(prefix)) {
|
1768
|
+
prefix = this.getNumberByIndex(parentIndex, prefix);
|
1769
|
+
}
|
1761
1770
|
if (isNumeric) {
|
1762
1771
|
var val = (index + startIndex).toString();
|
1763
1772
|
while (val.length < strIndex.length)
|
@@ -10214,6 +10223,66 @@ var base_Base = /** @class */ (function () {
|
|
10214
10223
|
return Base;
|
10215
10224
|
}());
|
10216
10225
|
|
10226
|
+
var RenderingCompletedAwaiter = /** @class */ (function () {
|
10227
|
+
function RenderingCompletedAwaiter(_elements, _renderedHandler, waitingTimeout) {
|
10228
|
+
var _this = this;
|
10229
|
+
if (waitingTimeout === void 0) { waitingTimeout = 100; }
|
10230
|
+
this._elements = _elements;
|
10231
|
+
this._renderedHandler = _renderedHandler;
|
10232
|
+
this._elementsToRenderCount = 0;
|
10233
|
+
this._elementsToRenderTimer = undefined;
|
10234
|
+
this._elementRenderedHandler = function (s, o) {
|
10235
|
+
var _a;
|
10236
|
+
(_a = s.onElementRerendered) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
|
10237
|
+
_this._elementsToRenderCount--;
|
10238
|
+
if (_this._elementsToRenderCount <= 0) {
|
10239
|
+
_this.visibleElementsRendered();
|
10240
|
+
}
|
10241
|
+
};
|
10242
|
+
this._elements.forEach(function (element) {
|
10243
|
+
if (element.onElementRerendered) {
|
10244
|
+
element.onElementRerendered.add(_this._elementRenderedHandler);
|
10245
|
+
_this._elementsToRenderCount++;
|
10246
|
+
}
|
10247
|
+
});
|
10248
|
+
if (this._elementsToRenderCount > 0) {
|
10249
|
+
this._elementsToRenderTimer = setTimeout(function () {
|
10250
|
+
if (_this._elementsToRenderCount > 0) {
|
10251
|
+
_this.visibleElementsRendered();
|
10252
|
+
}
|
10253
|
+
}, waitingTimeout);
|
10254
|
+
}
|
10255
|
+
else {
|
10256
|
+
this.visibleElementsRendered();
|
10257
|
+
}
|
10258
|
+
}
|
10259
|
+
RenderingCompletedAwaiter.prototype.stopWaitingForElementsRendering = function () {
|
10260
|
+
var _this = this;
|
10261
|
+
if (this._elementsToRenderTimer) {
|
10262
|
+
clearTimeout(this._elementsToRenderTimer);
|
10263
|
+
this._elementsToRenderTimer = undefined;
|
10264
|
+
}
|
10265
|
+
this._elements.forEach(function (element) {
|
10266
|
+
var _a;
|
10267
|
+
(_a = element.onElementRerendered) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
|
10268
|
+
});
|
10269
|
+
this._elementsToRenderCount = 0;
|
10270
|
+
};
|
10271
|
+
RenderingCompletedAwaiter.prototype.visibleElementsRendered = function () {
|
10272
|
+
var renderedHandler = this._renderedHandler;
|
10273
|
+
this.dispose();
|
10274
|
+
if (typeof renderedHandler == "function") {
|
10275
|
+
renderedHandler();
|
10276
|
+
}
|
10277
|
+
};
|
10278
|
+
RenderingCompletedAwaiter.prototype.dispose = function () {
|
10279
|
+
this.stopWaitingForElementsRendering();
|
10280
|
+
this._elements = undefined;
|
10281
|
+
this._renderedHandler = undefined;
|
10282
|
+
};
|
10283
|
+
return RenderingCompletedAwaiter;
|
10284
|
+
}());
|
10285
|
+
|
10217
10286
|
var ArrayChanges = /** @class */ (function () {
|
10218
10287
|
function ArrayChanges(index, deleteCount, itemsToAdd, deletedItems) {
|
10219
10288
|
this.index = index;
|
@@ -12778,7 +12847,7 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
12778
12847
|
return this.getLocalizableStringText("title", this.getDefaultTitleValue());
|
12779
12848
|
},
|
12780
12849
|
set: function (val) {
|
12781
|
-
this.
|
12850
|
+
this.setTitleValue(val);
|
12782
12851
|
},
|
12783
12852
|
enumerable: false,
|
12784
12853
|
configurable: true
|
@@ -12791,6 +12860,9 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
12791
12860
|
configurable: true
|
12792
12861
|
});
|
12793
12862
|
SurveyElementCore.prototype.getDefaultTitleValue = function () { return undefined; };
|
12863
|
+
SurveyElementCore.prototype.setTitleValue = function (val) {
|
12864
|
+
this.setLocalizableStringText("title", val);
|
12865
|
+
};
|
12794
12866
|
SurveyElementCore.prototype.updateDescriptionVisibility = function (newDescription) {
|
12795
12867
|
var showPlaceholder = false;
|
12796
12868
|
if (this.isDesignMode) {
|
@@ -12979,14 +13051,14 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
12979
13051
|
}
|
12980
13052
|
return info;
|
12981
13053
|
};
|
12982
|
-
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions) {
|
13054
|
+
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
|
12983
13055
|
var root = settings.environment.root;
|
12984
13056
|
if (!elementId || typeof root === "undefined")
|
12985
13057
|
return false;
|
12986
13058
|
var el = root.getElementById(elementId);
|
12987
|
-
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions);
|
13059
|
+
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions, doneCallback);
|
12988
13060
|
};
|
12989
|
-
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions) {
|
13061
|
+
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
|
12990
13062
|
if (!el || !el.scrollIntoView)
|
12991
13063
|
return false;
|
12992
13064
|
var elTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
|
@@ -13006,6 +13078,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
13006
13078
|
}
|
13007
13079
|
if (needScroll) {
|
13008
13080
|
el.scrollIntoView(scrollIntoViewOptions);
|
13081
|
+
if (typeof doneCallback === "function") {
|
13082
|
+
var currPageXOffset_1 = window.pageXOffset;
|
13083
|
+
var currPageYOffset_1 = window.pageYOffset;
|
13084
|
+
var scrollDone = setInterval(function () {
|
13085
|
+
if (currPageXOffset_1 == window.pageXOffset && currPageYOffset_1 == window.pageYOffset) {
|
13086
|
+
clearInterval(scrollDone);
|
13087
|
+
doneCallback();
|
13088
|
+
}
|
13089
|
+
currPageXOffset_1 = window.pageXOffset;
|
13090
|
+
currPageYOffset_1 = window.pageYOffset;
|
13091
|
+
}, 25);
|
13092
|
+
}
|
13009
13093
|
}
|
13010
13094
|
return needScroll;
|
13011
13095
|
};
|
@@ -13373,6 +13457,17 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
13373
13457
|
this.surveyChangedCallback();
|
13374
13458
|
}
|
13375
13459
|
};
|
13460
|
+
Object.defineProperty(SurveyElement.prototype, "skeletonHeight", {
|
13461
|
+
get: function () {
|
13462
|
+
var skeletonHeight = undefined;
|
13463
|
+
if (!!this.survey && this.survey.skeletonHeight) {
|
13464
|
+
skeletonHeight = this.survey.skeletonHeight + "px";
|
13465
|
+
}
|
13466
|
+
return skeletonHeight;
|
13467
|
+
},
|
13468
|
+
enumerable: false,
|
13469
|
+
configurable: true
|
13470
|
+
});
|
13376
13471
|
Object.defineProperty(SurveyElement.prototype, "isInternal", {
|
13377
13472
|
get: function () {
|
13378
13473
|
return this.isContentElement;
|
@@ -14097,7 +14192,8 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14097
14192
|
},
|
14098
14193
|
getLeaveOptions: function () {
|
14099
14194
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
14100
|
-
return {
|
14195
|
+
return {
|
14196
|
+
cssClass: cssClasses.contentLeave,
|
14101
14197
|
onBeforeRunAnimation: beforeRunAnimation,
|
14102
14198
|
onAfterRunAnimation: afterRunAnimation
|
14103
14199
|
};
|
@@ -14907,7 +15003,7 @@ function findScrollableParent(element) {
|
|
14907
15003
|
}
|
14908
15004
|
return findScrollableParent(element.parentElement);
|
14909
15005
|
}
|
14910
|
-
function
|
15006
|
+
function activateLazyRenderingChecks(id) {
|
14911
15007
|
var environment = settings.environment;
|
14912
15008
|
if (!environment)
|
14913
15009
|
return;
|
@@ -17526,7 +17622,7 @@ var text_area_TextAreaModel = /** @class */ (function () {
|
|
17526
17622
|
};
|
17527
17623
|
TextAreaModel.prototype.getTextValue = function () {
|
17528
17624
|
if (!!this.options.getTextValue)
|
17529
|
-
return this.options.getTextValue();
|
17625
|
+
return this.options.getTextValue() || "";
|
17530
17626
|
return "";
|
17531
17627
|
};
|
17532
17628
|
TextAreaModel.prototype.onTextAreaChange = function (event) {
|
@@ -19403,7 +19499,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19403
19499
|
});
|
19404
19500
|
Object.defineProperty(Question.prototype, "isDisabledAttr", {
|
19405
19501
|
get: function () {
|
19406
|
-
return this.isDesignModeV2;
|
19502
|
+
return this.isDesignModeV2 || (!!this.readOnlyCallback && this.readOnlyCallback());
|
19407
19503
|
},
|
19408
19504
|
enumerable: false,
|
19409
19505
|
configurable: true
|
@@ -19424,6 +19520,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
19424
19520
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
19425
19521
|
*
|
19426
19522
|
* Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
|
19523
|
+
*
|
19524
|
+
* [View Demo](https://surveyjs.io/form-library/examples/how-to-conditionally-make-input-field-read-only/ (linkStyle))
|
19427
19525
|
* @see readOnly
|
19428
19526
|
* @see isReadOnly
|
19429
19527
|
*/
|
@@ -19449,6 +19547,20 @@ var question_Question = /** @class */ (function (_super) {
|
|
19449
19547
|
this.runDefaultValueExpression(this.defaultValueRunner, values, properties);
|
19450
19548
|
}
|
19451
19549
|
};
|
19550
|
+
Object.defineProperty(Question.prototype, "isInDesignMode", {
|
19551
|
+
get: function () {
|
19552
|
+
return !this.isContentElement && this.isDesignMode;
|
19553
|
+
},
|
19554
|
+
enumerable: false,
|
19555
|
+
configurable: true
|
19556
|
+
});
|
19557
|
+
Object.defineProperty(Question.prototype, "isInDesignModeV2", {
|
19558
|
+
get: function () {
|
19559
|
+
return !this.isContentElement && this.isDesignModeV2;
|
19560
|
+
},
|
19561
|
+
enumerable: false,
|
19562
|
+
configurable: true
|
19563
|
+
});
|
19452
19564
|
Object.defineProperty(Question.prototype, "no", {
|
19453
19565
|
/**
|
19454
19566
|
* A question number or letter (depends on the `questionStartIndex` property of the question container (panel, page, or survey)).
|
@@ -19466,9 +19578,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
19466
19578
|
configurable: true
|
19467
19579
|
});
|
19468
19580
|
Question.prototype.calcNo = function () {
|
19581
|
+
var _a;
|
19469
19582
|
if (!this.hasTitle || this.hideNumber)
|
19470
19583
|
return "";
|
19471
|
-
var
|
19584
|
+
var parentIndex = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.visibleIndex;
|
19585
|
+
var no = helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex(), parentIndex);
|
19472
19586
|
if (!!this.survey) {
|
19473
19587
|
no = this.survey.getUpdatedQuestionNo(this, no);
|
19474
19588
|
}
|
@@ -19579,7 +19693,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19579
19693
|
*
|
19580
19694
|
* | Question type | Value type(s) |
|
19581
19695
|
* | ------------- | ------------- |
|
19582
|
-
* | Checkboxes |
|
19696
|
+
* | Checkboxes | <code>Array<string | number></code> |
|
19583
19697
|
* | Dropdown | `string` \| `number` |
|
19584
19698
|
* | Dynamic Matrix | `Array<object>` |
|
19585
19699
|
* | Dynamic Panel | `Array<object>` |
|
@@ -19587,14 +19701,14 @@ var question_Question = /** @class */ (function (_super) {
|
|
19587
19701
|
* | File Upload | `File` \| `Array<File>` |
|
19588
19702
|
* | HTML | (no value) |
|
19589
19703
|
* | Image | (no value) |
|
19590
|
-
* | Image Picker |
|
19704
|
+
* | Image Picker | <code>Array<string | number></code> |
|
19591
19705
|
* | Long Text | `string` |
|
19592
19706
|
* | Multi-Select Dropdown | `object` |
|
19593
19707
|
* | Multi-Select Matrix | `object` |
|
19594
19708
|
* | Multiple Textboxes | `Array<string>` |
|
19595
19709
|
* | Panel | (no value) |
|
19596
19710
|
* | Radio Button Group | `string` \| `number` |
|
19597
|
-
* | Ranking |
|
19711
|
+
* | Ranking | <code>Array<string | number></code> |
|
19598
19712
|
* | Rating Scale | `number` \| `string` |
|
19599
19713
|
* | Signature | `string` (base64-encoded image) |
|
19600
19714
|
* | Single-Line Input | `string` \| `number` \| `Date` |
|
@@ -19848,7 +19962,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19848
19962
|
*
|
19849
19963
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
19850
19964
|
*
|
19851
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
19965
|
+
* [View Demo](https://surveyjs.io/form-library/examples/set-question-value-dynamically/ (linkStyle))
|
19852
19966
|
* @see setValueIf
|
19853
19967
|
*/
|
19854
19968
|
get: function () {
|
@@ -19866,7 +19980,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19866
19980
|
*
|
19867
19981
|
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
19868
19982
|
*
|
19869
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
19983
|
+
* [View Demo](https://surveyjs.io/form-library/examples/set-question-value-dynamically/ (linkStyle))
|
19870
19984
|
* @see resetValueIf
|
19871
19985
|
*/
|
19872
19986
|
get: function () {
|
@@ -19884,7 +19998,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19884
19998
|
*
|
19885
19999
|
* You can use `setValueExpression` as a standalone property or in conjunction with the [`setValueIf`](#setValueIf) expression, in which case the calculated question value applies only when `setValueIf` evaluates to `true`.
|
19886
20000
|
*
|
19887
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
20001
|
+
* [View Demo](https://surveyjs.io/form-library/examples/set-question-value-dynamically/ (linkStyle))
|
19888
20002
|
* @see defaultValueExpression
|
19889
20003
|
* @see resetValueIf
|
19890
20004
|
*/
|
@@ -20349,11 +20463,12 @@ var question_Question = /** @class */ (function (_super) {
|
|
20349
20463
|
};
|
20350
20464
|
Question.prototype.removeError = function (error) {
|
20351
20465
|
if (!error)
|
20352
|
-
return;
|
20466
|
+
return false;
|
20353
20467
|
var errors = this.errors;
|
20354
20468
|
var index = errors.indexOf(error);
|
20355
20469
|
if (index !== -1)
|
20356
20470
|
errors.splice(index, 1);
|
20471
|
+
return index !== -1;
|
20357
20472
|
};
|
20358
20473
|
Question.prototype.checkForErrors = function (isOnValueChanged, fireCallback) {
|
20359
20474
|
var qErrors = new Array();
|
@@ -21056,7 +21171,7 @@ Serializer.addClass("question", [
|
|
21056
21171
|
name: "title:text", serializationProperty: "locTitle", layout: "row", dependsOn: "name",
|
21057
21172
|
onPropertyEditorUpdate: function (obj, editor) {
|
21058
21173
|
if (!!obj && !!editor) {
|
21059
|
-
editor.placeholder = obj.
|
21174
|
+
editor.placeholder = obj.getDefaultTitle();
|
21060
21175
|
}
|
21061
21176
|
}
|
21062
21177
|
},
|
@@ -22299,8 +22414,8 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
|
|
22299
22414
|
.replace(ChoicesRestful.noCacheText, "");
|
22300
22415
|
}
|
22301
22416
|
if (textProcessor) {
|
22302
|
-
var pUrl = textProcessor.processTextEx(urlText,
|
22303
|
-
var pPath = textProcessor.processTextEx(this.path,
|
22417
|
+
var pUrl = textProcessor.processTextEx({ text: urlText, runAtDesign: true });
|
22418
|
+
var pPath = textProcessor.processTextEx({ text: this.path, runAtDesign: true });
|
22304
22419
|
if (!pUrl.hasAllValuesOnLastRun || !pPath.hasAllValuesOnLastRun) {
|
22305
22420
|
this.processedUrl = "";
|
22306
22421
|
this.processedPath = "";
|
@@ -23002,10 +23117,11 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
23002
23117
|
}
|
23003
23118
|
};
|
23004
23119
|
QuestionMatrixBaseModel.prototype.isVisibleCore = function () {
|
23120
|
+
var _a;
|
23005
23121
|
var res = _super.prototype.isVisibleCore.call(this);
|
23006
23122
|
if (!res || !this.hideIfRowsEmpty)
|
23007
23123
|
return res;
|
23008
|
-
return this.visibleRows.length > 0;
|
23124
|
+
return ((_a = this.visibleRows) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
23009
23125
|
};
|
23010
23126
|
QuestionMatrixBaseModel.prototype.shouldRunColumnExpression = function () {
|
23011
23127
|
return !this.survey || !this.survey.areInvisibleElementsShowing;
|
@@ -23357,12 +23473,12 @@ var textPreProcessor_QuestionTextProcessor = /** @class */ (function () {
|
|
23357
23473
|
text = this.processTextCore(this.getParentTextProcessor(), text, returnDisplayValue);
|
23358
23474
|
return this.processTextCore(this.survey, text, returnDisplayValue);
|
23359
23475
|
};
|
23360
|
-
QuestionTextProcessor.prototype.processTextEx = function (
|
23361
|
-
text = this.processText(text, returnDisplayValue);
|
23476
|
+
QuestionTextProcessor.prototype.processTextEx = function (params) {
|
23477
|
+
params.text = this.processText(params.text, params.returnDisplayValue);
|
23362
23478
|
var hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
|
23363
|
-
var res = { hasAllValuesOnLastRun: true, text: text };
|
23479
|
+
var res = { hasAllValuesOnLastRun: true, text: params.text };
|
23364
23480
|
if (this.survey) {
|
23365
|
-
res = this.survey.processTextEx(
|
23481
|
+
res = this.survey.processTextEx(params);
|
23366
23482
|
}
|
23367
23483
|
res.hasAllValuesOnLastRun =
|
23368
23484
|
res.hasAllValuesOnLastRun && hasAllValuesOnLastRun;
|
@@ -24512,6 +24628,13 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
|
|
24512
24628
|
};
|
24513
24629
|
}
|
24514
24630
|
};
|
24631
|
+
Object.defineProperty(QuestionCompositeModel.prototype, "ariaRole", {
|
24632
|
+
get: function () {
|
24633
|
+
return "group";
|
24634
|
+
},
|
24635
|
+
enumerable: false,
|
24636
|
+
configurable: true
|
24637
|
+
});
|
24515
24638
|
QuestionCompositeModel.ItemVariableName = "composite";
|
24516
24639
|
return QuestionCompositeModel;
|
24517
24640
|
}(question_custom_QuestionCustomModelBase));
|
@@ -29138,6 +29261,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
29138
29261
|
counter++;
|
29139
29262
|
} while (!helpers_Helpers.isTwoValueEquals(prevTotalValue, this.totalValue) &&
|
29140
29263
|
counter < 3);
|
29264
|
+
this.updateVisibilityBasedOnRows();
|
29141
29265
|
};
|
29142
29266
|
QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value) {
|
29143
29267
|
_super.prototype.runTriggers.call(this, name, value);
|
@@ -29318,7 +29442,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
29318
29442
|
* }
|
29319
29443
|
* ```
|
29320
29444
|
*
|
29321
|
-
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with
|
29445
|
+
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
29322
29446
|
*
|
29323
29447
|
* If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
|
29324
29448
|
*
|
@@ -29860,9 +29984,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
29860
29984
|
rec.validationValues = this.getDataFilteredValues();
|
29861
29985
|
rec.isSingleDetailPanel = this.detailPanelMode === "underRowSingle";
|
29862
29986
|
for (var i = 0; i < rows.length; i++) {
|
29863
|
-
|
29864
|
-
|
29865
|
-
|
29987
|
+
if (rows[i].isVisible) {
|
29988
|
+
res = rows[i].hasErrors(fireCallback, rec, function () {
|
29989
|
+
_this.raiseOnCompletedAsyncValidators();
|
29990
|
+
}) || res;
|
29991
|
+
}
|
29866
29992
|
}
|
29867
29993
|
return res;
|
29868
29994
|
};
|
@@ -29949,7 +30075,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
29949
30075
|
if (duplicatedRows.indexOf(row) < 0) {
|
29950
30076
|
var question = row.getQuestionByName(columnName);
|
29951
30077
|
if (question) {
|
29952
|
-
_this.removeDuplicationError(question);
|
30078
|
+
_this.removeDuplicationError(row, question);
|
29953
30079
|
}
|
29954
30080
|
}
|
29955
30081
|
});
|
@@ -29967,8 +30093,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
29967
30093
|
question.addError(new KeyDuplicationError(this.keyDuplicationError, this));
|
29968
30094
|
}
|
29969
30095
|
};
|
29970
|
-
QuestionMatrixDropdownModelBase.prototype.removeDuplicationError = function (question) {
|
29971
|
-
question.removeError(this.getDuplicationError(question))
|
30096
|
+
QuestionMatrixDropdownModelBase.prototype.removeDuplicationError = function (row, question) {
|
30097
|
+
if (question.removeError(this.getDuplicationError(question)) && question.errors.length === 0 && !!row.editingObj) {
|
30098
|
+
row.editingObj[question.getValueName()] = question.value;
|
30099
|
+
}
|
29972
30100
|
};
|
29973
30101
|
QuestionMatrixDropdownModelBase.prototype.getFirstQuestionToFocus = function (withError) {
|
29974
30102
|
return this.getFirstCellQuestion(withError);
|
@@ -32425,6 +32553,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32425
32553
|
newRow = lastDelRow;
|
32426
32554
|
}
|
32427
32555
|
else {
|
32556
|
+
lastDelRow = undefined;
|
32428
32557
|
newRow = this.createMatrixRow(val[index]);
|
32429
32558
|
}
|
32430
32559
|
rows.splice(index, 0, newRow);
|
@@ -32441,6 +32570,12 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
32441
32570
|
QuestionMatrixDynamicModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
32442
32571
|
if (clearData === void 0) { clearData = false; }
|
32443
32572
|
this.setRowCountValueFromData = true;
|
32573
|
+
if (this.minRowCount > 0 && helpers_Helpers.isValueEmpty(newValue) && !helpers_Helpers.isValueEmpty(this.defaultRowValue)) {
|
32574
|
+
newValue = [];
|
32575
|
+
for (var i = 0; i < this.minRowCount; i++) {
|
32576
|
+
newValue.push(helpers_Helpers.createCopy(this.defaultRowValue));
|
32577
|
+
}
|
32578
|
+
}
|
32444
32579
|
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
32445
32580
|
this.setRowCountValueFromData = false;
|
32446
32581
|
};
|
@@ -32685,7 +32820,6 @@ var defaultV2Css = {
|
|
32685
32820
|
titleExpanded: "sd-element__title--expanded",
|
32686
32821
|
titleCollapsed: "sd-element__title--collapsed",
|
32687
32822
|
titleDisabled: "sd-element__title--disabled",
|
32688
|
-
titleHidden: "sd-element__title--hidden",
|
32689
32823
|
titleOnExpand: "sd-panel__title--expanded",
|
32690
32824
|
titleOnError: "sd-panel__title--error",
|
32691
32825
|
titleBar: "sd-action-title-bar",
|
@@ -32698,7 +32832,6 @@ var defaultV2Css = {
|
|
32698
32832
|
footer: "sd-panel__footer",
|
32699
32833
|
requiredText: "sd-panel__required-text",
|
32700
32834
|
header: "sd-panel__header sd-element__header sd-element__header--location-top",
|
32701
|
-
headerHidden: "sd-panel__header--hidden",
|
32702
32835
|
collapsed: "sd-element--collapsed",
|
32703
32836
|
expanded: "sd-element--expanded",
|
32704
32837
|
expandable: "sd-element--expandable",
|
@@ -33397,6 +33530,7 @@ var defaultV2Css = {
|
|
33397
33530
|
rootSelectToRankEmptyValueMod: "sv-ranking--select-to-rank-empty-value",
|
33398
33531
|
rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
|
33399
33532
|
rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
|
33533
|
+
rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
|
33400
33534
|
item: "sv-ranking-item",
|
33401
33535
|
itemContent: "sv-ranking-item__content sd-ranking-item__content",
|
33402
33536
|
itemIndex: "sv-ranking-item__index sd-ranking-item__index",
|
@@ -34212,7 +34346,13 @@ var header_Cover = /** @class */ (function (_super) {
|
|
34212
34346
|
};
|
34213
34347
|
Object.defineProperty(Cover.prototype, "renderedHeight", {
|
34214
34348
|
get: function () {
|
34215
|
-
|
34349
|
+
if (this.survey && !this.survey.isMobile || !this.survey) {
|
34350
|
+
return this.height ? Math.max(this.height, this.actualHeight + 40) + "px" : undefined;
|
34351
|
+
}
|
34352
|
+
if (this.survey && this.survey.isMobile) {
|
34353
|
+
return this.mobileHeight ? Math.max(this.mobileHeight, this.actualHeight + 40) + "px" : undefined;
|
34354
|
+
}
|
34355
|
+
return undefined;
|
34216
34356
|
},
|
34217
34357
|
enumerable: false,
|
34218
34358
|
configurable: true
|
@@ -34313,6 +34453,9 @@ var header_Cover = /** @class */ (function (_super) {
|
|
34313
34453
|
header_decorate([
|
34314
34454
|
jsonobject_property()
|
34315
34455
|
], Cover.prototype, "height", void 0);
|
34456
|
+
header_decorate([
|
34457
|
+
jsonobject_property()
|
34458
|
+
], Cover.prototype, "mobileHeight", void 0);
|
34316
34459
|
header_decorate([
|
34317
34460
|
jsonobject_property()
|
34318
34461
|
], Cover.prototype, "inheritWidthFrom", void 0);
|
@@ -34394,6 +34537,7 @@ var header_Cover = /** @class */ (function (_super) {
|
|
34394
34537
|
|
34395
34538
|
Serializer.addClass("cover", [
|
34396
34539
|
{ name: "height:number", minValue: 0, default: 256 },
|
34540
|
+
{ name: "mobileHeight:number", minValue: 0, default: 0 },
|
34397
34541
|
{ name: "inheritWidthFrom", default: "container" },
|
34398
34542
|
{ name: "textAreaWidth:number", minValue: 0, default: 512 },
|
34399
34543
|
{ name: "textGlowEnabled:boolean" },
|
@@ -34795,6 +34939,13 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
34795
34939
|
QuestionRowModel.getRowId = function () {
|
34796
34940
|
return "pr_" + QuestionRowModel.rowCounter++;
|
34797
34941
|
};
|
34942
|
+
Object.defineProperty(QuestionRowModel.prototype, "allowRendering", {
|
34943
|
+
get: function () {
|
34944
|
+
return !this.panel || !this.panel.survey || !this.panel.survey["isLazyRenderingSuspended"];
|
34945
|
+
},
|
34946
|
+
enumerable: false,
|
34947
|
+
configurable: true
|
34948
|
+
});
|
34798
34949
|
QuestionRowModel.prototype.startLazyRendering = function (rowContainerDiv, findScrollableContainer) {
|
34799
34950
|
var _this = this;
|
34800
34951
|
if (findScrollableContainer === void 0) { findScrollableContainer = findScrollableParent; }
|
@@ -34809,6 +34960,9 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
34809
34960
|
this.isNeedRender = !hasScroll;
|
34810
34961
|
if (hasScroll) {
|
34811
34962
|
this._updateVisibility = function () {
|
34963
|
+
if (!_this.allowRendering) {
|
34964
|
+
return;
|
34965
|
+
}
|
34812
34966
|
var isRowContainerDivVisible = isElementVisible(rowContainerDiv, 50);
|
34813
34967
|
if (!_this.isNeedRender && isRowContainerDivVisible) {
|
34814
34968
|
_this.isNeedRender = true;
|
@@ -34942,6 +35096,10 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
34942
35096
|
if (this.elements[i].isVisible) {
|
34943
35097
|
visElements.push(this.elements[i]);
|
34944
35098
|
}
|
35099
|
+
if (this.elements[i].isPanel || this.elements[i].getType() === "paneldynamic") {
|
35100
|
+
this.setIsLazyRendering(false);
|
35101
|
+
this.stopLazyRendering();
|
35102
|
+
}
|
34945
35103
|
}
|
34946
35104
|
this.visibleElements = visElements;
|
34947
35105
|
return;
|
@@ -35084,6 +35242,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
35084
35242
|
_this.registerPropertyChangedHandlers(["questionStartIndex", "showQuestionNumbers"], function () {
|
35085
35243
|
_this.updateVisibleIndexes();
|
35086
35244
|
});
|
35245
|
+
_this.registerPropertyChangedHandlers(["title"], function () {
|
35246
|
+
_this.calcHasTextInTitle();
|
35247
|
+
});
|
35087
35248
|
_this.dragDropPanelHelper = new drag_drop_panel_helper_v1_DragDropPanelHelperV1(_this);
|
35088
35249
|
return _this;
|
35089
35250
|
}
|
@@ -35158,10 +35319,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
35158
35319
|
col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
|
35159
35320
|
});
|
35160
35321
|
};
|
35322
|
+
PanelModelBase.prototype.calcHasTextInTitle = function () {
|
35323
|
+
this.hasTextInTitle = !!this.title;
|
35324
|
+
};
|
35161
35325
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
35162
35326
|
get: function () {
|
35163
|
-
return ((this.canShowTitle() && this.locTitle.textOrHtml.length > 0) ||
|
35164
|
-
(this.isDesignMode && (this.
|
35327
|
+
return ((this.canShowTitle() && (this.hasTextInTitle || this.locTitle.textOrHtml.length > 0)) ||
|
35328
|
+
(this.isDesignMode && !(settings.supportCreatorV2 && this.isPanel) && this.showTitle && settings.designMode.showEmptyTitles));
|
35165
35329
|
},
|
35166
35330
|
enumerable: false,
|
35167
35331
|
configurable: true
|
@@ -35649,6 +35813,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
35649
35813
|
* @see questions
|
35650
35814
|
*/
|
35651
35815
|
get: function () {
|
35816
|
+
base_Base.collectDependency(this, "elements");
|
35652
35817
|
return this.elementsValue;
|
35653
35818
|
},
|
35654
35819
|
enumerable: false,
|
@@ -36145,11 +36310,21 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36145
36310
|
this.onVisibleChanged();
|
36146
36311
|
}
|
36147
36312
|
};
|
36313
|
+
PanelModelBase.prototype.canRenderFirstRows = function () {
|
36314
|
+
return this.isPage;
|
36315
|
+
};
|
36316
|
+
PanelModelBase.prototype.isLazyRenderInRow = function (rowIndex) {
|
36317
|
+
if (!this.survey || !this.survey.isLazyRendering)
|
36318
|
+
return false;
|
36319
|
+
return (rowIndex >= this.survey.lazyRenderingFirstBatchSize ||
|
36320
|
+
!this.canRenderFirstRows());
|
36321
|
+
};
|
36148
36322
|
PanelModelBase.prototype.createRowAndSetLazy = function (index) {
|
36149
36323
|
var row = this.createRow();
|
36150
36324
|
row.setIsLazyRendering(this.isLazyRenderInRow(index));
|
36151
36325
|
return row;
|
36152
36326
|
};
|
36327
|
+
// TODO V2: make all createRow API private (at least protected) after removing DragDropPanelHelperV1
|
36153
36328
|
PanelModelBase.prototype.createRow = function () {
|
36154
36329
|
return new panel_QuestionRowModel(this);
|
36155
36330
|
};
|
@@ -36161,6 +36336,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36161
36336
|
}
|
36162
36337
|
this.onElementVisibilityChanged(this);
|
36163
36338
|
this.releaseAnimations();
|
36339
|
+
this.calcHasTextInTitle();
|
36164
36340
|
};
|
36165
36341
|
PanelModelBase.prototype.onFirstRendering = function () {
|
36166
36342
|
_super.prototype.onFirstRendering.call(this);
|
@@ -36379,15 +36555,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36379
36555
|
}
|
36380
36556
|
return result;
|
36381
36557
|
};
|
36382
|
-
PanelModelBase.prototype.isLazyRenderInRow = function (rowIndex) {
|
36383
|
-
if (!this.survey || !this.survey.isLazyRendering)
|
36384
|
-
return false;
|
36385
|
-
return (rowIndex >= this.survey.lazyRenderingFirstBatchSize ||
|
36386
|
-
!this.canRenderFirstRows());
|
36387
|
-
};
|
36388
|
-
PanelModelBase.prototype.canRenderFirstRows = function () {
|
36389
|
-
return this.isPage;
|
36390
|
-
};
|
36391
36558
|
PanelModelBase.prototype.getDragDropInfo = function () {
|
36392
36559
|
var page = this.getPage(this.parent);
|
36393
36560
|
return !!page ? page.getDragDropInfo() : undefined;
|
@@ -36417,27 +36584,74 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36417
36584
|
}
|
36418
36585
|
}
|
36419
36586
|
};
|
36420
|
-
PanelModelBase.prototype.
|
36421
|
-
var
|
36422
|
-
var
|
36423
|
-
|
36424
|
-
var
|
36425
|
-
|
36426
|
-
|
36427
|
-
|
36428
|
-
|
36429
|
-
|
36430
|
-
|
36431
|
-
|
36432
|
-
|
36587
|
+
PanelModelBase.prototype.getAllRows = function () {
|
36588
|
+
var _this = this;
|
36589
|
+
var allRows = [];
|
36590
|
+
this.rows.forEach(function (row) {
|
36591
|
+
var nestedRows = [];
|
36592
|
+
row.elements.forEach(function (element) {
|
36593
|
+
if (element.isPanel) {
|
36594
|
+
nestedRows.push.apply(nestedRows, element.getAllRows());
|
36595
|
+
}
|
36596
|
+
else if (element.getType() == "paneldynamic") {
|
36597
|
+
if (_this.isDesignMode) {
|
36598
|
+
nestedRows.push.apply(nestedRows, element.template.getAllRows());
|
36599
|
+
}
|
36600
|
+
else {
|
36601
|
+
element.panels.forEach(function (panel) { return nestedRows.push.apply(nestedRows, panel.getAllRows()); });
|
36602
|
+
}
|
36603
|
+
}
|
36604
|
+
});
|
36605
|
+
allRows.push(row);
|
36606
|
+
allRows.push.apply(allRows, nestedRows);
|
36607
|
+
});
|
36608
|
+
return allRows;
|
36433
36609
|
};
|
36434
|
-
PanelModelBase.prototype.
|
36435
|
-
|
36610
|
+
PanelModelBase.prototype.findRowAndIndexByElement = function (el, rows) {
|
36611
|
+
if (!el) {
|
36612
|
+
return { row: undefined, index: this.rows.length - 1 };
|
36613
|
+
}
|
36614
|
+
rows = rows || this.rows;
|
36436
36615
|
for (var i = 0; i < rows.length; i++) {
|
36437
36616
|
if (rows[i].elements.indexOf(el) > -1)
|
36438
|
-
return rows[i];
|
36617
|
+
return { row: rows[i], index: i };
|
36439
36618
|
}
|
36440
|
-
return null;
|
36619
|
+
return { row: null, index: -1 };
|
36620
|
+
};
|
36621
|
+
PanelModelBase.prototype.forceRenderRow = function (row) {
|
36622
|
+
if (!!row && !row.isNeedRender) {
|
36623
|
+
row.isNeedRender = true;
|
36624
|
+
row.stopLazyRendering();
|
36625
|
+
}
|
36626
|
+
};
|
36627
|
+
PanelModelBase.prototype.forceRenderElement = function (el, elementsRendered, gap) {
|
36628
|
+
if (elementsRendered === void 0) { elementsRendered = function () { }; }
|
36629
|
+
if (gap === void 0) { gap = 0; }
|
36630
|
+
var allRows = this.getAllRows();
|
36631
|
+
var _a = this.findRowAndIndexByElement(el, allRows), row = _a.row, index = _a.index;
|
36632
|
+
if (index >= 0 && index < allRows.length) {
|
36633
|
+
var rowsToRender = [];
|
36634
|
+
rowsToRender.push(row);
|
36635
|
+
for (var i = index - 1; i >= index - gap && i >= 0; i--) {
|
36636
|
+
rowsToRender.push(allRows[i]);
|
36637
|
+
}
|
36638
|
+
this.forceRenderRows(rowsToRender, elementsRendered);
|
36639
|
+
}
|
36640
|
+
};
|
36641
|
+
PanelModelBase.prototype.forceRenderRows = function (rows, elementsRendered) {
|
36642
|
+
var _this = this;
|
36643
|
+
if (elementsRendered === void 0) { elementsRendered = function () { }; }
|
36644
|
+
var rowRenderedHandler = (function (rowsCount) { return function () {
|
36645
|
+
rowsCount--;
|
36646
|
+
if (rowsCount <= 0) {
|
36647
|
+
elementsRendered();
|
36648
|
+
}
|
36649
|
+
}; })(rows.length);
|
36650
|
+
rows.forEach(function (row) { return new RenderingCompletedAwaiter(row.visibleElements, rowRenderedHandler); });
|
36651
|
+
rows.forEach(function (row) { return _this.forceRenderRow(row); });
|
36652
|
+
};
|
36653
|
+
PanelModelBase.prototype.findRowByElement = function (el) {
|
36654
|
+
return this.findRowAndIndexByElement(el).row;
|
36441
36655
|
};
|
36442
36656
|
PanelModelBase.prototype.elementWidthChanged = function (el) {
|
36443
36657
|
if (this.isLoadingFromJson)
|
@@ -36913,6 +37127,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36913
37127
|
panel_decorate([
|
36914
37128
|
jsonobject_property({ defaultValue: true })
|
36915
37129
|
], PanelModelBase.prototype, "showTitle", void 0);
|
37130
|
+
panel_decorate([
|
37131
|
+
jsonobject_property({ defaultValue: false })
|
37132
|
+
], PanelModelBase.prototype, "hasTextInTitle", void 0);
|
36916
37133
|
panel_decorate([
|
36917
37134
|
jsonobject_property({ defaultValue: true })
|
36918
37135
|
], PanelModelBase.prototype, "showDescription", void 0);
|
@@ -36943,9 +37160,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
36943
37160
|
});
|
36944
37161
|
_this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
|
36945
37162
|
_this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
|
36946
|
-
_this.registerPropertyChangedHandlers(["title"], function () {
|
36947
|
-
_this.calcHasTextInTitle();
|
36948
|
-
});
|
36949
37163
|
return _this;
|
36950
37164
|
}
|
36951
37165
|
PanelModel.prototype.getType = function () {
|
@@ -36965,37 +37179,15 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
36965
37179
|
}
|
36966
37180
|
return _super.prototype.getSurvey.call(this, live);
|
36967
37181
|
};
|
36968
|
-
Object.defineProperty(PanelModel.prototype, "hasTextInTitle", {
|
36969
|
-
get: function () {
|
36970
|
-
return this.getPropertyValue("hasTextInTitle");
|
36971
|
-
},
|
36972
|
-
enumerable: false,
|
36973
|
-
configurable: true
|
36974
|
-
});
|
36975
|
-
PanelModel.prototype.calcHasTextInTitle = function () {
|
36976
|
-
this.setPropertyValue("hasTextInTitle", !!this.title);
|
36977
|
-
};
|
36978
37182
|
PanelModel.prototype.onSurveyLoad = function () {
|
36979
37183
|
_super.prototype.onSurveyLoad.call(this);
|
36980
37184
|
this.onIndentChanged();
|
36981
|
-
this.calcHasTextInTitle();
|
36982
37185
|
};
|
36983
37186
|
PanelModel.prototype.onSetData = function () {
|
36984
37187
|
_super.prototype.onSetData.call(this);
|
36985
37188
|
this.onIndentChanged();
|
36986
37189
|
this.calcHasTextInTitle();
|
36987
37190
|
};
|
36988
|
-
Object.defineProperty(PanelModel.prototype, "cssHeader", {
|
36989
|
-
get: function () {
|
36990
|
-
return new CssClassBuilder()
|
36991
|
-
.append(this.cssClasses.panel.header)
|
36992
|
-
.append(this.cssClasses.panel.headerHidden, !this.hasTextInTitle &&
|
36993
|
-
!this.hasDescription &&
|
36994
|
-
this.isDesignMode).toString();
|
36995
|
-
},
|
36996
|
-
enumerable: false,
|
36997
|
-
configurable: true
|
36998
|
-
});
|
36999
37191
|
Object.defineProperty(PanelModel.prototype, "isPanel", {
|
37000
37192
|
get: function () {
|
37001
37193
|
return true;
|
@@ -37134,7 +37326,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
37134
37326
|
var _this = this;
|
37135
37327
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
37136
37328
|
locTitleValue.onGetTextCallback = function (text) {
|
37137
|
-
if (!text && (_this.state !== "default"
|
37329
|
+
if (!text && (_this.state !== "default")) {
|
37138
37330
|
text = _this.name;
|
37139
37331
|
}
|
37140
37332
|
return text;
|
@@ -37143,7 +37335,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
37143
37335
|
};
|
37144
37336
|
PanelModel.prototype.beforeSetVisibleIndex = function (index) {
|
37145
37337
|
var visibleIndex = -1;
|
37146
|
-
if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty)) {
|
37338
|
+
if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty || this.hasParentInQuestionIndex())) {
|
37147
37339
|
visibleIndex = index;
|
37148
37340
|
}
|
37149
37341
|
this.setPropertyValue("visibleIndex", visibleIndex);
|
@@ -37151,14 +37343,21 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
37151
37343
|
return visibleIndex < 0 ? 0 : 1;
|
37152
37344
|
};
|
37153
37345
|
PanelModel.prototype.getPanelStartIndex = function (index) {
|
37154
|
-
if (this.showQuestionNumbers
|
37346
|
+
if (this.showQuestionNumbers === "off")
|
37155
37347
|
return -1;
|
37156
|
-
if (this.showQuestionNumbers
|
37348
|
+
if (this.showQuestionNumbers === "onpanel")
|
37157
37349
|
return 0;
|
37158
37350
|
return index;
|
37159
37351
|
};
|
37352
|
+
PanelModel.prototype.hasParentInQuestionIndex = function () {
|
37353
|
+
if (this.showQuestionNumbers !== "onpanel")
|
37354
|
+
return false;
|
37355
|
+
var str = this.questionStartIndex;
|
37356
|
+
var index = str.indexOf(".");
|
37357
|
+
return index > -1 && index < str.length - 1;
|
37358
|
+
};
|
37160
37359
|
PanelModel.prototype.isContinueNumbering = function () {
|
37161
|
-
return
|
37360
|
+
return this.showQuestionNumbers !== "off" && this.showQuestionNumbers !== "onpanel";
|
37162
37361
|
};
|
37163
37362
|
PanelModel.prototype.notifySurveyOnVisibilityChanged = function () {
|
37164
37363
|
if (this.survey != null && !this.isLoadingFromJson) {
|
@@ -37297,10 +37496,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
37297
37496
|
};
|
37298
37497
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
37299
37498
|
get: function () {
|
37300
|
-
return
|
37301
|
-
.append(this.getCssTitle(this.cssClasses.panel))
|
37302
|
-
.append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
|
37303
|
-
.toString();
|
37499
|
+
return this.getCssTitle(this.cssClasses.panel);
|
37304
37500
|
},
|
37305
37501
|
enumerable: false,
|
37306
37502
|
configurable: true
|
@@ -37783,6 +37979,10 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
37783
37979
|
PageModel.prototype.canShowTitle = function () {
|
37784
37980
|
return this.survey && this.survey.showPageTitles;
|
37785
37981
|
};
|
37982
|
+
PageModel.prototype.setTitleValue = function (val) {
|
37983
|
+
_super.prototype.setTitleValue.call(this, val);
|
37984
|
+
this.navigationLocStrChanged();
|
37985
|
+
};
|
37786
37986
|
Object.defineProperty(PageModel.prototype, "navigationTitle", {
|
37787
37987
|
/**
|
37788
37988
|
* A caption displayed on a navigation button in the TOC or progress bar. Applies when [`showTOC`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTOC) is `true` or when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar), [`progressBarType`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarType) is set to `"pages"`, and [`progressBarShowPageTitles`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarShowPageTitles) is `true`.
|
@@ -37825,6 +38025,13 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
37825
38025
|
this.locNavigationTitle.strChanged();
|
37826
38026
|
this.locNavigationDescription.strChanged();
|
37827
38027
|
};
|
38028
|
+
PageModel.prototype.getMarkdownHtml = function (text, name) {
|
38029
|
+
var result = _super.prototype.getMarkdownHtml.call(this, text, name);
|
38030
|
+
if (name === "navigationTitle" && this.canShowPageNumber() && result) {
|
38031
|
+
return this.num + ". " + result;
|
38032
|
+
}
|
38033
|
+
return result;
|
38034
|
+
};
|
37828
38035
|
Object.defineProperty(PageModel.prototype, "passed", {
|
37829
38036
|
get: function () {
|
37830
38037
|
return this.getPropertyValue("passed", false);
|
@@ -38367,24 +38574,8 @@ function tryFocusPage(survey, panel) {
|
|
38367
38574
|
return true;
|
38368
38575
|
}
|
38369
38576
|
function createTOCListModel(survey, onAction) {
|
38370
|
-
var
|
38371
|
-
var
|
38372
|
-
var items = (pagesSource || []).map(function (page) {
|
38373
|
-
return new action_Action({
|
38374
|
-
id: page.name,
|
38375
|
-
locTitle: page.locNavigationTitle,
|
38376
|
-
action: function () {
|
38377
|
-
DomDocumentHelper.activeElementBlur();
|
38378
|
-
!!onAction && onAction();
|
38379
|
-
if (page instanceof page_PageModel) {
|
38380
|
-
return survey.tryNavigateToPage(page);
|
38381
|
-
}
|
38382
|
-
return tryFocusPage(survey, page);
|
38383
|
-
},
|
38384
|
-
visible: new ComputedUpdater(function () { return page.isVisible && !(page["isStartPage"]); })
|
38385
|
-
});
|
38386
|
-
});
|
38387
|
-
var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0];
|
38577
|
+
var items = getTOCItems(survey, onAction);
|
38578
|
+
var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items[0];
|
38388
38579
|
var listOptions = {
|
38389
38580
|
items: items,
|
38390
38581
|
onSelectionChanged: function (item) {
|
@@ -38400,10 +38591,35 @@ function createTOCListModel(survey, onAction) {
|
|
38400
38591
|
var listModel = new list_ListModel(listOptions);
|
38401
38592
|
listModel.allowSelection = false;
|
38402
38593
|
survey.onCurrentPageChanged.add(function (s, o) {
|
38403
|
-
listModel.selectedItem =
|
38594
|
+
listModel.selectedItem = listModel.actions.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
|
38404
38595
|
});
|
38596
|
+
survey.registerFunctionOnPropertyValueChanged("pages", function () {
|
38597
|
+
listModel.setItems(getTOCItems(survey, onAction));
|
38598
|
+
}, "toc");
|
38405
38599
|
return listModel;
|
38406
38600
|
}
|
38601
|
+
function getTOCItems(survey, onAction) {
|
38602
|
+
var _a;
|
38603
|
+
var pagesSource = survey.questionsOnPageMode === "singlePage" ? (_a = survey.pages[0]) === null || _a === void 0 ? void 0 : _a.elements : survey.pages;
|
38604
|
+
var items = (pagesSource || []).map(function (page) {
|
38605
|
+
return new action_Action({
|
38606
|
+
id: page.name,
|
38607
|
+
locTitle: page.locNavigationTitle,
|
38608
|
+
action: function () {
|
38609
|
+
DomDocumentHelper.activeElementBlur();
|
38610
|
+
!!onAction && onAction();
|
38611
|
+
if (page instanceof page_PageModel) {
|
38612
|
+
return survey.tryNavigateToPage(page);
|
38613
|
+
}
|
38614
|
+
return tryFocusPage(survey, page);
|
38615
|
+
},
|
38616
|
+
visible: new ComputedUpdater(function () {
|
38617
|
+
return page.isVisible && !(page["isStartPage"]);
|
38618
|
+
})
|
38619
|
+
});
|
38620
|
+
});
|
38621
|
+
return items;
|
38622
|
+
}
|
38407
38623
|
function getTocRootCss(survey, isMobile) {
|
38408
38624
|
if (isMobile === void 0) { isMobile = false; }
|
38409
38625
|
var rootCss = surveyToc_TOCModel.RootStyle;
|
@@ -38474,6 +38690,7 @@ var surveyToc_TOCModel = /** @class */ (function () {
|
|
38474
38690
|
configurable: true
|
38475
38691
|
});
|
38476
38692
|
TOCModel.prototype.dispose = function () {
|
38693
|
+
this.survey.unRegisterFunctionOnPropertyValueChanged("pages", "toc");
|
38477
38694
|
this.popupModel.dispose();
|
38478
38695
|
this.listModel.dispose();
|
38479
38696
|
};
|
@@ -39216,6 +39433,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39216
39433
|
*/
|
39217
39434
|
_this.jsonErrors = null;
|
39218
39435
|
_this.cssValue = null;
|
39436
|
+
_this._isLazyRenderingSuspended = false;
|
39219
39437
|
/**
|
39220
39438
|
* Specifies whether to hide validation errors thrown by the Required validation in the UI.
|
39221
39439
|
*
|
@@ -39252,6 +39470,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39252
39470
|
_this.onResize = new EventBase();
|
39253
39471
|
_this.isCurrentPageRendering = true;
|
39254
39472
|
_this.isCurrentPageRendered = undefined;
|
39473
|
+
_this.skeletonHeight = undefined;
|
39255
39474
|
_this.isTriggerIsRunning = false;
|
39256
39475
|
_this.triggerValues = null;
|
39257
39476
|
_this.triggerKeys = null;
|
@@ -39738,22 +39957,29 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39738
39957
|
enumerable: false,
|
39739
39958
|
configurable: true
|
39740
39959
|
});
|
39741
|
-
SurveyModel.prototype
|
39742
|
-
|
39743
|
-
|
39744
|
-
|
39745
|
-
|
39746
|
-
|
39747
|
-
|
39748
|
-
|
39749
|
-
|
39960
|
+
Object.defineProperty(SurveyModel.prototype, "isLazyRenderingSuspended", {
|
39961
|
+
get: function () {
|
39962
|
+
return this._isLazyRenderingSuspended;
|
39963
|
+
},
|
39964
|
+
enumerable: false,
|
39965
|
+
configurable: true
|
39966
|
+
});
|
39967
|
+
SurveyModel.prototype.suspendLazyRendering = function () {
|
39968
|
+
if (!this.isLazyRendering)
|
39969
|
+
return;
|
39970
|
+
this._isLazyRenderingSuspended = true;
|
39971
|
+
};
|
39972
|
+
SurveyModel.prototype.releaseLazyRendering = function () {
|
39973
|
+
if (!this.isLazyRendering)
|
39974
|
+
return;
|
39975
|
+
this._isLazyRenderingSuspended = false;
|
39750
39976
|
};
|
39751
39977
|
SurveyModel.prototype.updateLazyRenderingRowsOnRemovingElements = function () {
|
39752
39978
|
if (!this.isLazyRendering)
|
39753
39979
|
return;
|
39754
39980
|
var page = this.currentPage;
|
39755
39981
|
if (!!page) {
|
39756
|
-
|
39982
|
+
activateLazyRenderingChecks(page.id);
|
39757
39983
|
}
|
39758
39984
|
};
|
39759
39985
|
Object.defineProperty(SurveyModel.prototype, "triggers", {
|
@@ -40986,13 +41212,20 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40986
41212
|
/**
|
40987
41213
|
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns a result value.
|
40988
41214
|
* @param expression An expression to calculate.
|
41215
|
+
* @param callback A callback function that you can use to access the calculation result if the expression uses asynchronous functions.
|
40989
41216
|
*/
|
40990
|
-
SurveyModel.prototype.runExpression = function (expression) {
|
41217
|
+
SurveyModel.prototype.runExpression = function (expression, callback) {
|
40991
41218
|
if (!expression)
|
40992
41219
|
return null;
|
40993
41220
|
var values = this.getFilteredValues();
|
40994
41221
|
var properties = this.getFilteredProperties();
|
40995
|
-
|
41222
|
+
var exp = new ExpressionRunner(expression);
|
41223
|
+
var onCompleteRes = undefined;
|
41224
|
+
exp.onRunComplete = function (res) {
|
41225
|
+
onCompleteRes = res;
|
41226
|
+
callback && callback(res);
|
41227
|
+
};
|
41228
|
+
return exp.run(values, properties) || onCompleteRes;
|
40996
41229
|
};
|
40997
41230
|
/**
|
40998
41231
|
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
|
@@ -44280,7 +44513,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44280
44513
|
this.onGetMatrixRowActions.fire(this, options);
|
44281
44514
|
return options.actions;
|
44282
44515
|
};
|
44283
|
-
SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions) {
|
44516
|
+
SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions, passedRootElement) {
|
44517
|
+
var _this = this;
|
44284
44518
|
var options = {
|
44285
44519
|
element: element,
|
44286
44520
|
question: question,
|
@@ -44290,7 +44524,25 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44290
44524
|
};
|
44291
44525
|
this.onScrollingElementToTop.fire(this, options);
|
44292
44526
|
if (!options.cancel) {
|
44293
|
-
|
44527
|
+
var elementPage_1 = this.getPageByElement(element);
|
44528
|
+
if (this.isLazyRendering) {
|
44529
|
+
var elementsToRenderBefore = 1;
|
44530
|
+
var rootElement = settings.environment.rootElement;
|
44531
|
+
var surveyRootElement = this.rootElement || passedRootElement || rootElement;
|
44532
|
+
if (!!this.skeletonHeight && !!surveyRootElement && typeof surveyRootElement.getBoundingClientRect === "function") {
|
44533
|
+
elementsToRenderBefore = surveyRootElement.getBoundingClientRect().height / this.skeletonHeight - 1;
|
44534
|
+
}
|
44535
|
+
elementPage_1.forceRenderElement(element, function () {
|
44536
|
+
_this.suspendLazyRendering();
|
44537
|
+
survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions, function () {
|
44538
|
+
_this.releaseLazyRendering();
|
44539
|
+
activateLazyRenderingChecks(elementPage_1.id);
|
44540
|
+
});
|
44541
|
+
}, elementsToRenderBefore);
|
44542
|
+
}
|
44543
|
+
else {
|
44544
|
+
survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions);
|
44545
|
+
}
|
44294
44546
|
}
|
44295
44547
|
};
|
44296
44548
|
/**
|
@@ -45928,13 +46180,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45928
46180
|
return this.processText(options.html, true);
|
45929
46181
|
};
|
45930
46182
|
SurveyModel.prototype.processText = function (text, returnDisplayValue) {
|
45931
|
-
return this.processTextEx(text, returnDisplayValue, false).text;
|
46183
|
+
return this.processTextEx({ text: text, returnDisplayValue: returnDisplayValue, doEncoding: false }).text;
|
45932
46184
|
};
|
45933
|
-
SurveyModel.prototype.processTextEx = function (
|
45934
|
-
var
|
45935
|
-
|
45936
|
-
|
45937
|
-
|
46185
|
+
SurveyModel.prototype.processTextEx = function (params) {
|
46186
|
+
var doEncoding = params.doEncoding === undefined ? settings.web.encodeUrlParams : params.doEncoding;
|
46187
|
+
var text = params.text;
|
46188
|
+
if (params.runAtDesign || !this.isDesignMode) {
|
46189
|
+
text = this.textPreProcessor.process(text, params.returnDisplayValue === true, doEncoding);
|
46190
|
+
}
|
46191
|
+
var res = { text: text, hasAllValuesOnLastRun: true };
|
45938
46192
|
res.hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
|
45939
46193
|
return res;
|
45940
46194
|
};
|
@@ -45952,12 +46206,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45952
46206
|
enumerable: false,
|
45953
46207
|
configurable: true
|
45954
46208
|
});
|
45955
|
-
SurveyModel.prototype.processTextCore = function (text, returnDisplayValue, doEncoding) {
|
45956
|
-
if (doEncoding === void 0) { doEncoding = false; }
|
45957
|
-
if (this.isDesignMode)
|
45958
|
-
return text;
|
45959
|
-
return this.textPreProcessor.process(text, returnDisplayValue, doEncoding);
|
45960
|
-
};
|
45961
46209
|
SurveyModel.prototype.getSurveyMarkdownHtml = function (element, text, name) {
|
45962
46210
|
var options = {
|
45963
46211
|
element: element,
|
@@ -48192,7 +48440,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48192
48440
|
* }
|
48193
48441
|
* ```
|
48194
48442
|
*
|
48195
|
-
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with
|
48443
|
+
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
48196
48444
|
*
|
48197
48445
|
* If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
|
48198
48446
|
*
|
@@ -48228,7 +48476,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48228
48476
|
this.isLockVisibleChoices = !!question && question.name === val;
|
48229
48477
|
if (!!question && question.name !== val) {
|
48230
48478
|
question.removeDependedQuestion(this);
|
48231
|
-
if (this.
|
48479
|
+
if (this.isInDesignMode && !this.isLoadingFromJson && !!val) {
|
48232
48480
|
this.setPropertyValue("choicesFromQuestion", undefined);
|
48233
48481
|
}
|
48234
48482
|
}
|
@@ -48575,8 +48823,8 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48575
48823
|
};
|
48576
48824
|
Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
|
48577
48825
|
get: function () {
|
48578
|
-
return settings.showDefaultItemsInCreatorV2 && this.
|
48579
|
-
!this.customWidget
|
48826
|
+
return settings.showDefaultItemsInCreatorV2 && this.isInDesignModeV2 &&
|
48827
|
+
!this.customWidget;
|
48580
48828
|
},
|
48581
48829
|
enumerable: false,
|
48582
48830
|
configurable: true
|
@@ -48702,7 +48950,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48702
48950
|
});
|
48703
48951
|
Object.defineProperty(QuestionSelectBase.prototype, "isEmptyActiveChoicesInDesign", {
|
48704
48952
|
get: function () {
|
48705
|
-
return this.
|
48953
|
+
return this.isInDesignModeV2 && (this.hasChoicesUrl || this.isMessagePanelVisible);
|
48706
48954
|
},
|
48707
48955
|
enumerable: false,
|
48708
48956
|
configurable: true
|
@@ -48742,7 +48990,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48742
48990
|
return !!question && question.isValueArray ? question : null;
|
48743
48991
|
};
|
48744
48992
|
QuestionSelectBase.prototype.getChoicesFromArrayQuestion = function (question) {
|
48745
|
-
if (this.
|
48993
|
+
if (this.isInDesignMode)
|
48746
48994
|
return [];
|
48747
48995
|
var val = question.value;
|
48748
48996
|
if (!Array.isArray(val))
|
@@ -48767,7 +49015,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48767
49015
|
return keys.length > 0 ? keys[0] : undefined;
|
48768
49016
|
};
|
48769
49017
|
QuestionSelectBase.prototype.getChoicesFromSelectQuestion = function (question) {
|
48770
|
-
if (this.
|
49018
|
+
if (this.isInDesignMode)
|
48771
49019
|
return [];
|
48772
49020
|
var res = [];
|
48773
49021
|
var isSelected = this.choicesFromQuestionMode == "selected"
|
@@ -48942,7 +49190,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48942
49190
|
};
|
48943
49191
|
QuestionSelectBase.prototype.runChoicesByUrl = function () {
|
48944
49192
|
this.updateIsUsingRestful();
|
48945
|
-
if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.
|
49193
|
+
if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isInDesignModeV2)
|
48946
49194
|
return;
|
48947
49195
|
var processor = this.surveyImpl
|
48948
49196
|
? this.surveyImpl.getTextProcessor()
|
@@ -49110,7 +49358,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49110
49358
|
return !choices || choices.length > 0;
|
49111
49359
|
};
|
49112
49360
|
QuestionSelectBase.prototype.sortVisibleChoices = function (array) {
|
49113
|
-
if (this.
|
49361
|
+
if (this.isInDesignMode)
|
49114
49362
|
return array;
|
49115
49363
|
var order = this.choicesOrder.toLowerCase();
|
49116
49364
|
if (order == "asc")
|
@@ -49335,7 +49583,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49335
49583
|
});
|
49336
49584
|
Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
|
49337
49585
|
get: function () {
|
49338
|
-
var count = (this.separateSpecialChoices || this.
|
49586
|
+
var count = (this.separateSpecialChoices || this.isInDesignMode) ? this.headItemsCount : 0;
|
49339
49587
|
var res = [];
|
49340
49588
|
for (var i = 0; i < count; i++) {
|
49341
49589
|
if (this.renderedChoices[i]) {
|
@@ -49349,7 +49597,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49349
49597
|
});
|
49350
49598
|
Object.defineProperty(QuestionSelectBase.prototype, "footItems", {
|
49351
49599
|
get: function () {
|
49352
|
-
var count = (this.separateSpecialChoices || this.
|
49600
|
+
var count = (this.separateSpecialChoices || this.isInDesignMode) ? this.footItemsCount : 0;
|
49353
49601
|
var res = [];
|
49354
49602
|
var items = this.renderedChoices;
|
49355
49603
|
for (var i = 0; i < count; i++) {
|
@@ -49396,7 +49644,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49396
49644
|
var columns = [];
|
49397
49645
|
var colCount = this.getCurrentColCount();
|
49398
49646
|
if (this.hasColumns && this.renderedChoices.length > 0) {
|
49399
|
-
var choicesToBuildColumns = (!this.separateSpecialChoices && !this.
|
49647
|
+
var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isInDesignMode) ?
|
49400
49648
|
this.renderedChoices : this.dataChoices;
|
49401
49649
|
if (settings.showItemsInOrder == "column") {
|
49402
49650
|
var prevIndex = 0;
|
@@ -52032,11 +52280,16 @@ var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
|
|
52032
52280
|
return MatrixRowModel;
|
52033
52281
|
}(base_Base));
|
52034
52282
|
|
52035
|
-
var question_matrix_MatrixCells = /** @class */ (function () {
|
52283
|
+
var question_matrix_MatrixCells = /** @class */ (function (_super) {
|
52284
|
+
question_matrix_extends(MatrixCells, _super);
|
52036
52285
|
function MatrixCells(cellsOwner) {
|
52037
|
-
|
52038
|
-
|
52286
|
+
var _this = _super.call(this) || this;
|
52287
|
+
_this.cellsOwner = cellsOwner;
|
52288
|
+
_this.values = {};
|
52289
|
+
_this.locs = {};
|
52290
|
+
return _this;
|
52039
52291
|
}
|
52292
|
+
MatrixCells.prototype.getType = function () { return "cells"; };
|
52040
52293
|
Object.defineProperty(MatrixCells.prototype, "isEmpty", {
|
52041
52294
|
get: function () {
|
52042
52295
|
return Object.keys(this.values).length == 0;
|
@@ -52045,78 +52298,97 @@ var question_matrix_MatrixCells = /** @class */ (function () {
|
|
52045
52298
|
configurable: true
|
52046
52299
|
});
|
52047
52300
|
MatrixCells.prototype.valuesChanged = function () {
|
52048
|
-
if (!!this.onValuesChanged) {
|
52301
|
+
if (!this.locNotification && !!this.onValuesChanged) {
|
52049
52302
|
this.onValuesChanged();
|
52050
52303
|
}
|
52051
52304
|
};
|
52052
|
-
MatrixCells.prototype.
|
52305
|
+
MatrixCells.prototype.getDefaultCellLocText = function (column) {
|
52306
|
+
return this.getCellLocCore(this.defaultRowValue, column);
|
52307
|
+
};
|
52308
|
+
MatrixCells.prototype.getCellDisplayLocText = function (row, column) {
|
52309
|
+
return this.getCellLocCore(row, column);
|
52310
|
+
};
|
52311
|
+
MatrixCells.prototype.getCellLocCore = function (row, col) {
|
52312
|
+
var _this = this;
|
52053
52313
|
row = this.getCellRowColumnValue(row, this.rows);
|
52054
|
-
|
52055
|
-
if (
|
52056
|
-
return;
|
52057
|
-
if (
|
52058
|
-
|
52059
|
-
this.values[row] = {};
|
52060
|
-
if (!this.values[row][column])
|
52061
|
-
this.values[row][column] = this.createString();
|
52062
|
-
this.values[row][column].text = val;
|
52314
|
+
col = this.getCellRowColumnValue(col, this.columns);
|
52315
|
+
if (helpers_Helpers.isValueEmpty(row) || helpers_Helpers.isValueEmpty(col))
|
52316
|
+
return null;
|
52317
|
+
if (!this.locs[row]) {
|
52318
|
+
this.locs[row] = {};
|
52063
52319
|
}
|
52064
|
-
|
52065
|
-
|
52066
|
-
|
52067
|
-
|
52068
|
-
|
52069
|
-
|
52070
|
-
|
52071
|
-
|
52320
|
+
var res = this.locs[row][col];
|
52321
|
+
if (!res) {
|
52322
|
+
res = this.createString();
|
52323
|
+
res.setJson(this.getCellLocData(row, col));
|
52324
|
+
res.onGetTextCallback = function (str) {
|
52325
|
+
if (!str) {
|
52326
|
+
var column = itemvalue_ItemValue.getItemByValue(_this.columns, col);
|
52327
|
+
if (column) {
|
52328
|
+
return column.locText.getJson() || column.value;
|
52072
52329
|
}
|
52073
52330
|
}
|
52074
|
-
|
52331
|
+
return str;
|
52332
|
+
};
|
52333
|
+
res.onStrChanged = function (oldValue, newValue) {
|
52334
|
+
_this.updateValues(row, col, newValue);
|
52335
|
+
};
|
52336
|
+
this.locs[row][col] = res;
|
52075
52337
|
}
|
52076
|
-
|
52338
|
+
return res;
|
52077
52339
|
};
|
52078
|
-
MatrixCells.prototype
|
52079
|
-
|
52340
|
+
Object.defineProperty(MatrixCells.prototype, "defaultRowValue", {
|
52341
|
+
get: function () { return settings.matrix.defaultRowName; },
|
52342
|
+
enumerable: false,
|
52343
|
+
configurable: true
|
52344
|
+
});
|
52345
|
+
MatrixCells.prototype.getCellLocData = function (row, col) {
|
52346
|
+
var data = this.getCellLocDataFromValue(row, col);
|
52347
|
+
if (data)
|
52348
|
+
return data;
|
52349
|
+
return this.getCellLocDataFromValue(this.defaultRowValue, col);
|
52080
52350
|
};
|
52081
|
-
MatrixCells.prototype.
|
52082
|
-
row = this.getCellRowColumnValue(row, this.rows);
|
52083
|
-
column = this.getCellRowColumnValue(column, this.columns);
|
52084
|
-
if (!row || !column)
|
52085
|
-
return null;
|
52351
|
+
MatrixCells.prototype.getCellLocDataFromValue = function (row, column) {
|
52086
52352
|
if (!this.values[row])
|
52087
52353
|
return null;
|
52088
52354
|
if (!this.values[row][column])
|
52089
52355
|
return null;
|
52090
52356
|
return this.values[row][column];
|
52091
52357
|
};
|
52092
|
-
MatrixCells.prototype.
|
52093
|
-
|
52358
|
+
MatrixCells.prototype.getCellText = function (row, column) {
|
52359
|
+
var loc = this.getCellLocCore(row, column);
|
52360
|
+
return loc ? loc.calculatedText : null;
|
52094
52361
|
};
|
52095
|
-
MatrixCells.prototype.
|
52096
|
-
var
|
52097
|
-
if (
|
52098
|
-
|
52099
|
-
cellText = this.getCellLocText(settings.matrix.defaultRowName, column);
|
52100
|
-
if (cellText && !cellText.isEmpty)
|
52101
|
-
return cellText;
|
52102
|
-
if (typeof column == "number") {
|
52103
|
-
column =
|
52104
|
-
column >= 0 && column < this.columns.length
|
52105
|
-
? this.columns[column]
|
52106
|
-
: null;
|
52362
|
+
MatrixCells.prototype.setCellText = function (row, column, val) {
|
52363
|
+
var loc = this.getCellLocCore(row, column);
|
52364
|
+
if (loc) {
|
52365
|
+
loc.text = val;
|
52107
52366
|
}
|
52108
|
-
if (column && column.locText)
|
52109
|
-
return column.locText;
|
52110
|
-
return null;
|
52111
52367
|
};
|
52112
|
-
MatrixCells.prototype.
|
52113
|
-
|
52114
|
-
|
52368
|
+
MatrixCells.prototype.updateValues = function (row, column, val) {
|
52369
|
+
if (val) {
|
52370
|
+
if (!this.values[row])
|
52371
|
+
this.values[row] = {};
|
52372
|
+
this.values[row][column] = val;
|
52373
|
+
this.valuesChanged();
|
52374
|
+
}
|
52375
|
+
else {
|
52376
|
+
if (this.values[row] && this.values[row][column]) {
|
52377
|
+
delete this.values[row][column];
|
52378
|
+
if (Object.keys(this.values[row]).length == 0) {
|
52379
|
+
delete this.values[row];
|
52380
|
+
}
|
52381
|
+
this.valuesChanged();
|
52382
|
+
}
|
52383
|
+
}
|
52115
52384
|
};
|
52116
52385
|
MatrixCells.prototype.getDefaultCellText = function (column) {
|
52117
|
-
var loc = this.
|
52386
|
+
var loc = this.getCellLocCore(this.defaultRowValue, column);
|
52118
52387
|
return loc ? loc.calculatedText : null;
|
52119
52388
|
};
|
52389
|
+
MatrixCells.prototype.setDefaultCellText = function (column, val) {
|
52390
|
+
this.setCellText(this.defaultRowValue, column, val);
|
52391
|
+
};
|
52120
52392
|
MatrixCells.prototype.getCellDisplayText = function (row, column) {
|
52121
52393
|
var loc = this.getCellDisplayLocText(row, column);
|
52122
52394
|
return loc ? loc.calculatedText : null;
|
@@ -52150,18 +52422,22 @@ var question_matrix_MatrixCells = /** @class */ (function () {
|
|
52150
52422
|
MatrixCells.prototype.getJson = function () {
|
52151
52423
|
if (this.isEmpty)
|
52152
52424
|
return null;
|
52425
|
+
var defaultRow = this.values[this.defaultRowValue];
|
52153
52426
|
var res = {};
|
52154
52427
|
for (var row in this.values) {
|
52155
52428
|
var resRow = {};
|
52156
52429
|
var rowValues = this.values[row];
|
52157
52430
|
for (var col in rowValues) {
|
52158
|
-
|
52431
|
+
if (row === this.defaultRowValue || !defaultRow || defaultRow[col] !== rowValues[col]) {
|
52432
|
+
resRow[col] = rowValues[col];
|
52433
|
+
}
|
52159
52434
|
}
|
52160
52435
|
res[row] = resRow;
|
52161
52436
|
}
|
52162
52437
|
return res;
|
52163
52438
|
};
|
52164
52439
|
MatrixCells.prototype.setJson = function (value) {
|
52440
|
+
var _this = this;
|
52165
52441
|
this.values = {};
|
52166
52442
|
if (!!value) {
|
52167
52443
|
for (var row in value) {
|
@@ -52172,21 +52448,23 @@ var question_matrix_MatrixCells = /** @class */ (function () {
|
|
52172
52448
|
for (var col in rowValues) {
|
52173
52449
|
if (col == "pos")
|
52174
52450
|
continue;
|
52175
|
-
|
52176
|
-
loc.setJson(rowValues[col]);
|
52177
|
-
this.values[row][col] = loc;
|
52451
|
+
this.values[row][col] = rowValues[col];
|
52178
52452
|
}
|
52179
52453
|
}
|
52180
52454
|
}
|
52455
|
+
this.locNotification = true;
|
52456
|
+
this.runFuncOnLocs(function (row, col, loc) { return loc.setJson(_this.getCellLocData(row, col)); });
|
52457
|
+
this.locNotification = false;
|
52181
52458
|
this.valuesChanged();
|
52182
52459
|
};
|
52183
52460
|
MatrixCells.prototype.locStrsChanged = function () {
|
52184
|
-
|
52185
|
-
|
52186
|
-
|
52187
|
-
|
52461
|
+
this.runFuncOnLocs(function (row, col, loc) { return loc.strChanged(); });
|
52462
|
+
};
|
52463
|
+
MatrixCells.prototype.runFuncOnLocs = function (func) {
|
52464
|
+
for (var row in this.locs) {
|
52465
|
+
var rowValues = this.locs[row];
|
52188
52466
|
for (var col in rowValues) {
|
52189
|
-
rowValues[col]
|
52467
|
+
func(row, col, rowValues[col]);
|
52190
52468
|
}
|
52191
52469
|
}
|
52192
52470
|
};
|
@@ -52194,7 +52472,7 @@ var question_matrix_MatrixCells = /** @class */ (function () {
|
|
52194
52472
|
return new localizablestring_LocalizableString(this.cellsOwner, true);
|
52195
52473
|
};
|
52196
52474
|
return MatrixCells;
|
52197
|
-
}());
|
52475
|
+
}(base_Base));
|
52198
52476
|
|
52199
52477
|
/**
|
52200
52478
|
* A class that describes the Single-Select Matrix question type.
|
@@ -53155,6 +53433,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
53155
53433
|
_this.updateRemainingCharacterCounter(event.target.value);
|
53156
53434
|
};
|
53157
53435
|
_this.onKeyUp = function (event) {
|
53436
|
+
_this.updateDateValidationMessage(event);
|
53158
53437
|
if (_this.isInputTextUpdate) {
|
53159
53438
|
if (!_this._isWaitingForEnter || event.keyCode === 13) {
|
53160
53439
|
_this.updateValueOnEvent(event);
|
@@ -53169,7 +53448,6 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
53169
53448
|
_this.updateRemainingCharacterCounter(event.target.value);
|
53170
53449
|
};
|
53171
53450
|
_this.onKeyDown = function (event) {
|
53172
|
-
_this.updateDateValidationMessage(event);
|
53173
53451
|
_this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
|
53174
53452
|
if (_this.isInputTextUpdate) {
|
53175
53453
|
_this._isWaitingForEnter = event.keyCode === 229;
|
@@ -54723,7 +55001,7 @@ var question_multipletext_QuestionMultipleTextModel = /** @class */ (function (_
|
|
54723
55001
|
* }
|
54724
55002
|
* ```
|
54725
55003
|
*
|
54726
|
-
* To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with
|
55004
|
+
* To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
54727
55005
|
* @see itemTitleWidth
|
54728
55006
|
* @see addItem
|
54729
55007
|
*/
|
@@ -57238,19 +57516,31 @@ var choices_DragDropChoices = /** @class */ (function (_super) {
|
|
57238
57516
|
return false;
|
57239
57517
|
return true;
|
57240
57518
|
};
|
57241
|
-
DragDropChoices.prototype.
|
57242
|
-
|
57243
|
-
|
57244
|
-
|
57519
|
+
DragDropChoices.prototype.isDropTargetDoesntChanged = function (newIsBottom) {
|
57520
|
+
return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom);
|
57521
|
+
};
|
57522
|
+
DragDropChoices.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
57523
|
+
var rect = dropTargetNode.getBoundingClientRect();
|
57524
|
+
return clientY >= rect.y + rect.height / 2;
|
57245
57525
|
};
|
57246
57526
|
DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
|
57247
|
-
if (this.isDropTargetDoesntChanged(this.isBottom))
|
57248
|
-
return;
|
57527
|
+
//if (this.isDropTargetDoesntChanged(this.isBottom)) return;
|
57249
57528
|
var choices = this.getVisibleChoices();
|
57250
57529
|
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
57251
57530
|
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
57252
|
-
|
57253
|
-
|
57531
|
+
if (draggedElementIndex < dropTargetIndex && this.isBottom === true) {
|
57532
|
+
// drag "down"
|
57533
|
+
choices.splice(draggedElementIndex, 1);
|
57534
|
+
choices.splice(dropTargetIndex, 0, this.draggedElement);
|
57535
|
+
}
|
57536
|
+
else if (draggedElementIndex > dropTargetIndex && this.isBottom === false) {
|
57537
|
+
// drag "up"
|
57538
|
+
choices.splice(dropTargetIndex, 1);
|
57539
|
+
choices.splice(draggedElementIndex, 0, this.dropTarget);
|
57540
|
+
}
|
57541
|
+
else {
|
57542
|
+
return;
|
57543
|
+
}
|
57254
57544
|
if (this.parentElement.getType() === "imagepicker")
|
57255
57545
|
return;
|
57256
57546
|
if (draggedElementIndex !== dropTargetIndex) {
|
@@ -57410,10 +57700,9 @@ var ranking_choices_DragDropRankingChoices = /** @class */ (function (_super) {
|
|
57410
57700
|
};
|
57411
57701
|
DragDropRankingChoices.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
57412
57702
|
if (this.dropTarget instanceof itemvalue_ItemValue && this.draggedElement !== this.dropTarget) {
|
57413
|
-
|
57414
|
-
return clientY >= rect.y + rect.height / 2;
|
57703
|
+
return _super.prototype.calculateIsBottom.call(this, clientY, dropTargetNode);
|
57415
57704
|
}
|
57416
|
-
return
|
57705
|
+
return false;
|
57417
57706
|
};
|
57418
57707
|
DragDropRankingChoices.prototype.getIndices = function (model, fromChoicesArray, toChoicesArray) {
|
57419
57708
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
@@ -57771,6 +58060,7 @@ var question_ranking_QuestionRankingModel = /** @class */ (function (_super) {
|
|
57771
58060
|
.append(this.cssClasses.rootSelectToRankEmptyValueMod, this.isEmpty())
|
57772
58061
|
.append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal")
|
57773
58062
|
.append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "vertical")
|
58063
|
+
.append(this.cssClasses.rootSelectToRankSwapAreas, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal" && this.selectToRankSwapAreas)
|
57774
58064
|
.toString();
|
57775
58065
|
},
|
57776
58066
|
enumerable: false,
|
@@ -57865,6 +58155,11 @@ var question_ranking_QuestionRankingModel = /** @class */ (function (_super) {
|
|
57865
58155
|
this.updateRankingChoices();
|
57866
58156
|
this.releaseAnimations();
|
57867
58157
|
};
|
58158
|
+
QuestionRankingModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
58159
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
58160
|
+
if (newValue)
|
58161
|
+
this.isValueSetByUser = true;
|
58162
|
+
};
|
57868
58163
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
57869
58164
|
var newValue = this.value.slice();
|
57870
58165
|
this.visibleChoices.forEach(function (choice) {
|
@@ -58192,6 +58487,16 @@ var question_ranking_QuestionRankingModel = /** @class */ (function (_super) {
|
|
58192
58487
|
enumerable: false,
|
58193
58488
|
configurable: true
|
58194
58489
|
});
|
58490
|
+
Object.defineProperty(QuestionRankingModel.prototype, "selectToRankSwapAreas", {
|
58491
|
+
get: function () {
|
58492
|
+
return this.getPropertyValue("selectToRankSwapAreas", false);
|
58493
|
+
},
|
58494
|
+
set: function (val) {
|
58495
|
+
this.setPropertyValue("selectToRankSwapAreas", val);
|
58496
|
+
},
|
58497
|
+
enumerable: false,
|
58498
|
+
configurable: true
|
58499
|
+
});
|
58195
58500
|
Object.defineProperty(QuestionRankingModel.prototype, "selectToRankAreasLayout", {
|
58196
58501
|
/**
|
58197
58502
|
* Specifies the layout of the ranked and unranked areas. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
|
@@ -58321,6 +58626,13 @@ Serializer.addClass("ranking", [
|
|
58321
58626
|
visible: true,
|
58322
58627
|
isSerializable: true,
|
58323
58628
|
},
|
58629
|
+
{
|
58630
|
+
name: "selectToRankSwapAreas:switch",
|
58631
|
+
default: false,
|
58632
|
+
visible: false,
|
58633
|
+
isSerializable: true,
|
58634
|
+
dependsOn: "selectToRankEnabled",
|
58635
|
+
},
|
58324
58636
|
{
|
58325
58637
|
name: "selectToRankAreasLayout",
|
58326
58638
|
default: "horizontal",
|
@@ -60558,8 +60870,14 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60558
60870
|
}
|
60559
60871
|
_this.createRenderedRateItems();
|
60560
60872
|
});
|
60561
|
-
_this.createLocalizableString("minRateDescription", _this, true)
|
60562
|
-
|
60873
|
+
_this.createLocalizableString("minRateDescription", _this, true)
|
60874
|
+
.onStringChanged.add(function (sender, options) {
|
60875
|
+
_this.hasMinRateDescription = !sender.isEmpty;
|
60876
|
+
});
|
60877
|
+
_this.createLocalizableString("maxRateDescription", _this, true)
|
60878
|
+
.onStringChanged.add(function (sender, options) {
|
60879
|
+
_this.hasMaxRateDescription = !sender.isEmpty;
|
60880
|
+
});
|
60563
60881
|
_this.initPropertyDependencies();
|
60564
60882
|
return _this;
|
60565
60883
|
}
|
@@ -60571,8 +60889,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60571
60889
|
};
|
60572
60890
|
QuestionRatingModel.prototype.endLoadingFromJson = function () {
|
60573
60891
|
_super.prototype.endLoadingFromJson.call(this);
|
60574
|
-
this.hasMinRateDescription = !!this.minRateDescription;
|
60575
|
-
this.hasMaxRateDescription = !!this.maxRateDescription;
|
60576
60892
|
if (this.jsonObj.rateMin !== undefined && this.jsonObj.rateCount !== undefined && this.jsonObj.rateMax === undefined) {
|
60577
60893
|
this.updateRateMax();
|
60578
60894
|
}
|
@@ -60674,7 +60990,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60674
60990
|
*
|
60675
60991
|
* If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
|
60676
60992
|
*
|
60677
|
-
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with
|
60993
|
+
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with markdown-it](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
60678
60994
|
*
|
60679
60995
|
* If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
|
60680
60996
|
*
|
@@ -60830,6 +61146,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60830
61146
|
}
|
60831
61147
|
if (this.rateType == "smileys" && rateValues.length > 10)
|
60832
61148
|
rateValues = rateValues.slice(0, 10);
|
61149
|
+
this.visibleChoicesValue = rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
|
60833
61150
|
this.renderedRateItems = rateValues.map(function (v, i) {
|
60834
61151
|
var renderedItem = null;
|
60835
61152
|
if (_this.displayRateDescriptionsAsExtremeItems) {
|
@@ -60849,14 +61166,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60849
61166
|
var step = this.rateStep;
|
60850
61167
|
while (value <= this.rateMax &&
|
60851
61168
|
res.length < settings.ratingMaximumRateValueCount) {
|
60852
|
-
var
|
60853
|
-
if (value === this.rateMin) {
|
60854
|
-
description = this.minRateDescription && this.locMinRateDescription;
|
60855
|
-
}
|
60856
|
-
if (value === this.rateMax || res.length === settings.ratingMaximumRateValueCount) {
|
60857
|
-
description = this.maxRateDescription && this.locMaxRateDescription;
|
60858
|
-
}
|
60859
|
-
var item = new RatingItemValue(value, description);
|
61169
|
+
var item = new itemvalue_ItemValue(value);
|
60860
61170
|
item.locOwner = this;
|
60861
61171
|
item.ownerPropertyName = "rateValues";
|
60862
61172
|
res.push(item);
|
@@ -60864,6 +61174,22 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60864
61174
|
}
|
60865
61175
|
return res;
|
60866
61176
|
};
|
61177
|
+
QuestionRatingModel.prototype.getRatingItemValue = function (item, index) {
|
61178
|
+
if (!item)
|
61179
|
+
return null;
|
61180
|
+
var value = item.value;
|
61181
|
+
var description;
|
61182
|
+
if (value === this.rateMin) {
|
61183
|
+
description = this.minRateDescription && this.locMinRateDescription;
|
61184
|
+
}
|
61185
|
+
if (value === this.rateMax || index === settings.ratingMaximumRateValueCount) {
|
61186
|
+
description = this.maxRateDescription && this.locMaxRateDescription;
|
61187
|
+
}
|
61188
|
+
var newItem = new RatingItemValue(value, description);
|
61189
|
+
newItem.locOwner = item.locOwner;
|
61190
|
+
newItem.ownerPropertyName = item.ownerPropertyName;
|
61191
|
+
return newItem;
|
61192
|
+
};
|
60867
61193
|
QuestionRatingModel.prototype.correctValue = function (value, step) {
|
60868
61194
|
if (!value)
|
60869
61195
|
return value;
|
@@ -60918,7 +61244,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60918
61244
|
},
|
60919
61245
|
set: function (val) {
|
60920
61246
|
this.setLocalizableStringText("minRateDescription", val);
|
60921
|
-
this.hasMinRateDescription = !!this.minRateDescription;
|
60922
61247
|
},
|
60923
61248
|
enumerable: false,
|
60924
61249
|
configurable: true
|
@@ -60943,7 +61268,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
60943
61268
|
},
|
60944
61269
|
set: function (val) {
|
60945
61270
|
this.setLocalizableStringText("maxRateDescription", val);
|
60946
|
-
this.hasMaxRateDescription = !!this.maxRateDescription;
|
60947
61271
|
},
|
60948
61272
|
enumerable: false,
|
60949
61273
|
configurable: true
|
@@ -61311,7 +61635,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
61311
61635
|
};
|
61312
61636
|
Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
|
61313
61637
|
get: function () {
|
61314
|
-
return this.
|
61638
|
+
return this.visibleChoicesValue;
|
61315
61639
|
},
|
61316
61640
|
enumerable: false,
|
61317
61641
|
configurable: true
|
@@ -61363,6 +61687,11 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
61363
61687
|
enumerable: false,
|
61364
61688
|
configurable: true
|
61365
61689
|
});
|
61690
|
+
QuestionRatingModel.prototype.onBlurCore = function (event) {
|
61691
|
+
var _a;
|
61692
|
+
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
61693
|
+
_super.prototype.onBlurCore.call(this, event);
|
61694
|
+
};
|
61366
61695
|
QuestionRatingModel.prototype.updateCssClasses = function (res, css) {
|
61367
61696
|
_super.prototype.updateCssClasses.call(this, res, css);
|
61368
61697
|
if (!!this.dropdownListModel) {
|
@@ -64382,6 +64711,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
64382
64711
|
_this.updateFooterActions();
|
64383
64712
|
});
|
64384
64713
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
64714
|
+
_this.registerPropertyChangedHandlers(["minPanelCount"], function () { _this.onMinPanelCountChanged(); });
|
64715
|
+
_this.registerPropertyChangedHandlers(["maxPanelCount"], function () { _this.onMaxPanelCountChanged(); });
|
64385
64716
|
return _this;
|
64386
64717
|
}
|
64387
64718
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "isCompositeQuestion", {
|
@@ -65318,8 +65649,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65318
65649
|
value = [];
|
65319
65650
|
if (value.length == this.panelCount)
|
65320
65651
|
return;
|
65321
|
-
for (var i = value.length; i < this.panelCount; i++)
|
65322
|
-
|
65652
|
+
for (var i = value.length; i < this.panelCount; i++) {
|
65653
|
+
var panelValue = this.panels[i].getValue();
|
65654
|
+
var val = !helpers_Helpers.isValueEmpty(panelValue) ? panelValue : {};
|
65655
|
+
value.push(val);
|
65656
|
+
}
|
65323
65657
|
if (value.length > this.panelCount) {
|
65324
65658
|
value.splice(this.panelCount, value.length - this.panelCount);
|
65325
65659
|
}
|
@@ -65342,17 +65676,18 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65342
65676
|
set: function (val) {
|
65343
65677
|
if (val < 0)
|
65344
65678
|
val = 0;
|
65345
|
-
if (val == this.minPanelCount)
|
65346
|
-
return;
|
65347
65679
|
this.setPropertyValue("minPanelCount", val);
|
65348
|
-
if (val > this.maxPanelCount)
|
65349
|
-
this.maxPanelCount = val;
|
65350
|
-
if (this.panelCount < val)
|
65351
|
-
this.panelCount = val;
|
65352
65680
|
},
|
65353
65681
|
enumerable: false,
|
65354
65682
|
configurable: true
|
65355
65683
|
});
|
65684
|
+
QuestionPanelDynamicModel.prototype.onMinPanelCountChanged = function () {
|
65685
|
+
var val = this.minPanelCount;
|
65686
|
+
if (val > this.maxPanelCount)
|
65687
|
+
this.maxPanelCount = val;
|
65688
|
+
if (this.panelCount < val)
|
65689
|
+
this.panelCount = val;
|
65690
|
+
};
|
65356
65691
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "maxPanelCount", {
|
65357
65692
|
/**
|
65358
65693
|
* A maximum number of panels in Dynamic Panel. Users cannot add new panels if `panelCount` equals `maxPanelCount`.
|
@@ -65370,17 +65705,20 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65370
65705
|
return;
|
65371
65706
|
if (val > settings.panel.maxPanelCount)
|
65372
65707
|
val = settings.panel.maxPanelCount;
|
65373
|
-
if (val == this.maxPanelCount)
|
65374
|
-
return;
|
65375
65708
|
this.setPropertyValue("maxPanelCount", val);
|
65376
|
-
|
65377
|
-
this.minPanelCount = val;
|
65378
|
-
if (this.panelCount > val)
|
65379
|
-
this.panelCount = val;
|
65709
|
+
this.updateFooterActions();
|
65380
65710
|
},
|
65381
65711
|
enumerable: false,
|
65382
65712
|
configurable: true
|
65383
65713
|
});
|
65714
|
+
QuestionPanelDynamicModel.prototype.onMaxPanelCountChanged = function () {
|
65715
|
+
var val = this.maxPanelCount;
|
65716
|
+
if (val < this.minPanelCount)
|
65717
|
+
this.minPanelCount = val;
|
65718
|
+
if (this.panelCount > val)
|
65719
|
+
this.panelCount = val;
|
65720
|
+
this.updateFooterActions();
|
65721
|
+
};
|
65384
65722
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowAddPanel", {
|
65385
65723
|
/**
|
65386
65724
|
* Specifies whether users are allowed to add new panels.
|
@@ -66128,6 +66466,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
66128
66466
|
QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
|
66129
66467
|
this.template.readOnly = this.isReadOnly;
|
66130
66468
|
this.template.onSurveyLoad();
|
66469
|
+
if (this.panelCount < this.minPanelCount) {
|
66470
|
+
this.panelCount = this.minPanelCount;
|
66471
|
+
}
|
66472
|
+
if (this.panelCount > this.maxPanelCount) {
|
66473
|
+
this.panelCount = this.maxPanelCount;
|
66474
|
+
}
|
66131
66475
|
this.buildPanelsFirstTime();
|
66132
66476
|
_super.prototype.onSurveyLoad.call(this);
|
66133
66477
|
};
|
@@ -70040,8 +70384,8 @@ Serializer.addClass("currencymask", [
|
|
70040
70384
|
|
70041
70385
|
var Version;
|
70042
70386
|
var ReleaseDate;
|
70043
|
-
Version = "" + "1.12.
|
70044
|
-
ReleaseDate = "" + "2024-
|
70387
|
+
Version = "" + "1.12.4";
|
70388
|
+
ReleaseDate = "" + "2024-10-01";
|
70045
70389
|
function checkLibraryVersion(ver, libraryName) {
|
70046
70390
|
if (Version != ver) {
|
70047
70391
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -70742,6 +71086,7 @@ var defaultStandardCss = {
|
|
70742
71086
|
rootSelectToRankMod: "sv-ranking--select-to-rank",
|
70743
71087
|
rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
|
70744
71088
|
rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
|
71089
|
+
rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
|
70745
71090
|
item: "sv-ranking-item",
|
70746
71091
|
itemContent: "sv-ranking-item__content",
|
70747
71092
|
itemIndex: "sv-ranking-item__index",
|
@@ -71176,6 +71521,7 @@ var modernCss = {
|
|
71176
71521
|
rootSelectToRankMod: "sv-ranking--select-to-rank",
|
71177
71522
|
rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
|
71178
71523
|
rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
|
71524
|
+
rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
|
71179
71525
|
item: "sv-ranking-item",
|
71180
71526
|
itemContent: "sv-ranking-item__content",
|
71181
71527
|
itemIndex: "sv-ranking-item__index",
|
@@ -72066,6 +72412,7 @@ var cssbootstrapmaterial_defaultCss = {
|
|
72066
72412
|
rootSelectToRankMod: "sv-ranking--select-to-rank",
|
72067
72413
|
rootSelectToRankAlignVertical: "sv-ranking--select-to-rank-vertical",
|
72068
72414
|
rootSelectToRankAlignHorizontal: "sv-ranking--select-to-rank-horizontal",
|
72415
|
+
rootSelectToRankSwapAreas: "sv-ranking--select-to-rank-swap-areas",
|
72069
72416
|
item: "sv-ranking-item",
|
72070
72417
|
itemContent: "sv-ranking-item__content",
|
72071
72418
|
itemIndex: "sv-ranking-item__index",
|
@@ -72640,7 +72987,6 @@ function setStyles() {
|
|
72640
72987
|
".sv-popup--modal .sv-popup__body-content": "padding: calc(4 * var(--base-unit, 8px));",
|
72641
72988
|
".sv-popup--overlay": "width: 100%;",
|
72642
72989
|
".sv-popup--overlay .sv-popup__container": "background: rgba(144, 144, 144, 0.5); max-width: 100vw; max-height: calc(100vh - 1 * var(--base-unit, 8px)); height: calc(100vh - 1 * var(--base-unit, 8px)); width: 100%; padding-top: calc(2 * var(--base-unit, 8px)); border: unset;",
|
72643
|
-
".sv-popup__shadow": "width: 100%; height: 100%; border-radius: calc(1 * var(--base-unit, 8px));",
|
72644
72990
|
".sv-popup--overlay .sv-popup__body-content": "border-radius: calc(2 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) 0px 0px; background: var(--background, #fff); box-shadow: 0px calc(1 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) rgba(0, 0, 0, 0.1); padding: calc(3 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)) calc(2 * var(--base-unit, 8px)); height: calc(100% - calc(1 * var(--base-unit, 8px))); max-height: 100vh; max-width: 100vw;",
|
72645
72991
|
".sv-popup--overlay .sv-popup__scrolling-content": "height: calc(100% - (10 * var(--base-unit, 8px)));",
|
72646
72992
|
".sv-popup--overlay .sv-popup__body-footer": "margin-top: calc(2 * var(--base-unit, 8px));",
|
@@ -80963,12 +81309,11 @@ var popup_PopupContainer = /** @class */ (function (_super) {
|
|
80963
81309
|
}, onClick: function (ev) {
|
80964
81310
|
_this.clickInside(ev);
|
80965
81311
|
} },
|
80966
|
-
|
80967
|
-
|
80968
|
-
|
80969
|
-
|
80970
|
-
|
80971
|
-
footerContent))));
|
81312
|
+
headerPopup,
|
81313
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-popup__body-content" },
|
81314
|
+
headerContent,
|
81315
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-popup__scrolling-content" }, content),
|
81316
|
+
footerContent)));
|
80972
81317
|
};
|
80973
81318
|
PopupContainer.prototype.renderHeaderContent = function () {
|
80974
81319
|
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-popup__body-header" }, this.model.title);
|
@@ -88486,8 +88831,8 @@ var skeleton_Skeleton = /** @class */ (function (_super) {
|
|
88486
88831
|
return _super !== null && _super.apply(this, arguments) || this;
|
88487
88832
|
}
|
88488
88833
|
Skeleton.prototype.render = function () {
|
88489
|
-
var _a;
|
88490
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.id }));
|
88834
|
+
var _a, _b;
|
88835
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.id, style: { height: (_b = this.props.element) === null || _b === void 0 ? void 0 : _b.skeletonHeight } }));
|
88491
88836
|
};
|
88492
88837
|
return Skeleton;
|
88493
88838
|
}(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component));
|