survey-react 1.12.13 → 1.12.14
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 +5 -3
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +5 -3
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +50 -36
- package/survey.react.js +346 -233
- 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.14
|
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
|
*/
|
@@ -3053,9 +3053,11 @@ function jsonobject_property(options) {
|
|
3053
3053
|
set: function (val) {
|
3054
3054
|
var newValue = processComputedUpdater(this, val);
|
3055
3055
|
var prevValue = this.getPropertyValue(key);
|
3056
|
-
|
3057
|
-
|
3058
|
-
options.onSet
|
3056
|
+
if (newValue !== prevValue) {
|
3057
|
+
this.setPropertyValue(key, newValue);
|
3058
|
+
if (!!options && options.onSet) {
|
3059
|
+
options.onSet(newValue, this, prevValue);
|
3060
|
+
}
|
3059
3061
|
}
|
3060
3062
|
},
|
3061
3063
|
});
|
@@ -10370,8 +10372,7 @@ var base_Base = /** @class */ (function () {
|
|
10370
10372
|
* @param name A property name.
|
10371
10373
|
* @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
|
10372
10374
|
*/
|
10373
|
-
Base.prototype.getPropertyValue = function (name, defaultValue) {
|
10374
|
-
if (defaultValue === void 0) { defaultValue = null; }
|
10375
|
+
Base.prototype.getPropertyValue = function (name, defaultValue, calcFunc) {
|
10375
10376
|
var res = this.getPropertyValueWithoutDefault(name);
|
10376
10377
|
if (this.isPropertyEmpty(res)) {
|
10377
10378
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
@@ -10379,6 +10380,13 @@ var base_Base = /** @class */ (function () {
|
|
10379
10380
|
return locStr.text;
|
10380
10381
|
if (defaultValue !== null && defaultValue !== undefined)
|
10381
10382
|
return defaultValue;
|
10383
|
+
if (!!calcFunc) {
|
10384
|
+
var newVal = calcFunc();
|
10385
|
+
if (newVal !== undefined) {
|
10386
|
+
this.setPropertyValueDirectly(name, newVal);
|
10387
|
+
return newVal;
|
10388
|
+
}
|
10389
|
+
}
|
10382
10390
|
var propDefaultValue = this.getDefaultPropertyValue(name);
|
10383
10391
|
if (propDefaultValue !== undefined)
|
10384
10392
|
return propDefaultValue;
|
@@ -11699,6 +11707,7 @@ var defaultListCss = {
|
|
11699
11707
|
loadingIndicator: "sv-list__loading-indicator",
|
11700
11708
|
itemSelected: "sv-list__item--selected",
|
11701
11709
|
itemGroup: "sv-list__item--group",
|
11710
|
+
itemGroupSelected: "sv-list__item--group-selected",
|
11702
11711
|
itemWithIcon: "sv-list__item--with-icon",
|
11703
11712
|
itemDisabled: "sv-list__item--disabled",
|
11704
11713
|
itemFocused: "sv-list__item--focused",
|
@@ -11758,13 +11767,15 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11758
11767
|
.toString();
|
11759
11768
|
};
|
11760
11769
|
_this.getItemClass = function (itemValue) {
|
11770
|
+
var isSelected = _this.isItemSelected(itemValue);
|
11761
11771
|
return new CssClassBuilder()
|
11762
11772
|
.append(_this.cssClasses.item)
|
11763
11773
|
.append(_this.cssClasses.itemWithIcon, !!itemValue.iconName)
|
11764
11774
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
11765
11775
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
11766
|
-
.append(_this.cssClasses.itemSelected,
|
11776
|
+
.append(_this.cssClasses.itemSelected, !itemValue.hasSubItems && isSelected)
|
11767
11777
|
.append(_this.cssClasses.itemGroup, itemValue.hasSubItems)
|
11778
|
+
.append(_this.cssClasses.itemGroupSelected, itemValue.hasSubItems && isSelected)
|
11768
11779
|
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
11769
11780
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
11770
11781
|
.append(itemValue.css)
|
@@ -11791,6 +11802,7 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11791
11802
|
_this[key] = options_1[key];
|
11792
11803
|
}
|
11793
11804
|
});
|
11805
|
+
_this.updateActionsIds();
|
11794
11806
|
}
|
11795
11807
|
else {
|
11796
11808
|
_this.setItems(items);
|
@@ -11847,10 +11859,13 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11847
11859
|
configurable: true
|
11848
11860
|
});
|
11849
11861
|
ListModel.prototype.onFilterStringChanged = function (text) {
|
11850
|
-
var _this = this;
|
11851
11862
|
if (!!this.onFilterStringChangedCallback) {
|
11852
11863
|
this.onFilterStringChangedCallback(text);
|
11853
11864
|
}
|
11865
|
+
this.updateIsEmpty();
|
11866
|
+
};
|
11867
|
+
ListModel.prototype.updateIsEmpty = function () {
|
11868
|
+
var _this = this;
|
11854
11869
|
this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
|
11855
11870
|
};
|
11856
11871
|
ListModel.prototype.scrollToItem = function (selector, ms) {
|
@@ -11874,16 +11889,19 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11874
11889
|
this.onTextSearchCallback = callback;
|
11875
11890
|
};
|
11876
11891
|
ListModel.prototype.setItems = function (items, sortByVisibleIndex) {
|
11877
|
-
var _this = this;
|
11878
11892
|
if (sortByVisibleIndex === void 0) { sortByVisibleIndex = true; }
|
11879
11893
|
_super.prototype.setItems.call(this, items, sortByVisibleIndex);
|
11880
|
-
|
11881
|
-
this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
|
11882
|
-
}
|
11894
|
+
this.updateActionsIds();
|
11883
11895
|
if (!this.isAllDataLoaded && !!this.actions.length) {
|
11884
11896
|
this.actions.push(this.loadingIndicator);
|
11885
11897
|
}
|
11886
11898
|
};
|
11899
|
+
ListModel.prototype.updateActionsIds = function () {
|
11900
|
+
var _this = this;
|
11901
|
+
if (this.elementId) {
|
11902
|
+
this.renderedActions.forEach(function (action) { action.elementId = _this.elementId + action.id; });
|
11903
|
+
}
|
11904
|
+
};
|
11887
11905
|
ListModel.prototype.setSearchEnabled = function (newValue) {
|
11888
11906
|
this.searchEnabled = newValue;
|
11889
11907
|
this.showSearchClearButton = newValue;
|
@@ -11924,7 +11942,7 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11924
11942
|
});
|
11925
11943
|
Object.defineProperty(ListModel.prototype, "scrollableContainer", {
|
11926
11944
|
get: function () {
|
11927
|
-
return this.listContainerHtmlElement.querySelector("." + this.
|
11945
|
+
return this.listContainerHtmlElement.querySelector("." + this.cssClasses.itemsContainer);
|
11928
11946
|
},
|
11929
11947
|
enumerable: false,
|
11930
11948
|
configurable: true
|
@@ -11978,7 +11996,12 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11978
11996
|
};
|
11979
11997
|
ListModel.prototype.onPointerDown = function (event, item) { };
|
11980
11998
|
ListModel.prototype.refresh = function () {
|
11981
|
-
this.filterString
|
11999
|
+
if (this.filterString !== "") {
|
12000
|
+
this.filterString = "";
|
12001
|
+
}
|
12002
|
+
else {
|
12003
|
+
this.updateIsEmpty();
|
12004
|
+
}
|
11982
12005
|
this.resetFocusedItem();
|
11983
12006
|
};
|
11984
12007
|
ListModel.prototype.onClickSearchClearButton = function (event) {
|
@@ -12047,10 +12070,15 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
12047
12070
|
}
|
12048
12071
|
};
|
12049
12072
|
ListModel.prototype.scrollToFocusedItem = function () {
|
12050
|
-
this.scrollToItem(this.
|
12073
|
+
this.scrollToItem(this.cssClasses.itemFocused);
|
12051
12074
|
};
|
12052
12075
|
ListModel.prototype.scrollToSelectedItem = function () {
|
12053
|
-
this.
|
12076
|
+
if (!!this.selectedItem && this.selectedItem.items && this.selectedItem.items.length > 0) {
|
12077
|
+
this.scrollToItem(this.cssClasses.itemGroupSelected, 110);
|
12078
|
+
}
|
12079
|
+
else {
|
12080
|
+
this.scrollToItem(this.cssClasses.itemSelected, 110);
|
12081
|
+
}
|
12054
12082
|
};
|
12055
12083
|
ListModel.prototype.addScrollEventListener = function (handler) {
|
12056
12084
|
if (!!handler) {
|
@@ -12403,7 +12431,6 @@ var action_BaseAction = /** @class */ (function (_super) {
|
|
12403
12431
|
function BaseAction() {
|
12404
12432
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
12405
12433
|
_this.rendredIdValue = BaseAction.getNextRendredId();
|
12406
|
-
_this.markerIconSize = 16;
|
12407
12434
|
return _this;
|
12408
12435
|
}
|
12409
12436
|
BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
|
@@ -12658,9 +12685,6 @@ var action_BaseAction = /** @class */ (function (_super) {
|
|
12658
12685
|
action_decorate([
|
12659
12686
|
jsonobject_property()
|
12660
12687
|
], BaseAction.prototype, "markerIconName", void 0);
|
12661
|
-
action_decorate([
|
12662
|
-
jsonobject_property()
|
12663
|
-
], BaseAction.prototype, "markerIconSize", void 0);
|
12664
12688
|
action_decorate([
|
12665
12689
|
jsonobject_property()
|
12666
12690
|
], BaseAction.prototype, "css", void 0);
|
@@ -14262,7 +14286,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14262
14286
|
this.textProcessorValue = this.surveyImplValue.getTextProcessor();
|
14263
14287
|
this.onSetData();
|
14264
14288
|
}
|
14265
|
-
if (!!this.survey) {
|
14289
|
+
if (!!this.survey /* && !this.isLoadingFromJson*/) {
|
14266
14290
|
this.updateDescriptionVisibility(this.description);
|
14267
14291
|
this.clearCssClasses();
|
14268
14292
|
}
|
@@ -14405,20 +14429,28 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14405
14429
|
});
|
14406
14430
|
Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
|
14407
14431
|
get: function () {
|
14408
|
-
|
14409
|
-
|
14410
|
-
|
14411
|
-
|
14432
|
+
var res = this.getPropertyValueWithoutDefault("cssClassesValue");
|
14433
|
+
if (!res && !this.isCssValueCalculating) {
|
14434
|
+
this.isCssValueCalculating = true;
|
14435
|
+
res = this.createCssClassesValue();
|
14436
|
+
this.isCssValueCalculating = false;
|
14437
|
+
}
|
14438
|
+
return res;
|
14412
14439
|
},
|
14413
14440
|
enumerable: false,
|
14414
14441
|
configurable: true
|
14415
14442
|
});
|
14416
14443
|
SurveyElement.prototype.ensureCssClassesValue = function () {
|
14417
14444
|
if (!this.cssClassesValue) {
|
14418
|
-
this.
|
14419
|
-
this.updateElementCssCore(this.cssClassesValue);
|
14445
|
+
this.createCssClassesValue();
|
14420
14446
|
}
|
14421
14447
|
};
|
14448
|
+
SurveyElement.prototype.createCssClassesValue = function () {
|
14449
|
+
var res = this.calcCssClasses(this.css);
|
14450
|
+
this.setPropertyValue("cssClassesValue", res);
|
14451
|
+
this.updateElementCssCore(this.cssClassesValue);
|
14452
|
+
return res;
|
14453
|
+
};
|
14422
14454
|
Object.defineProperty(SurveyElement.prototype, "cssClasses", {
|
14423
14455
|
/**
|
14424
14456
|
* Returns an object in which keys are UI elements and values are CSS classes applied to them.
|
@@ -14474,7 +14506,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14474
14506
|
this.clearCssClasses();
|
14475
14507
|
};
|
14476
14508
|
SurveyElement.prototype.clearCssClasses = function () {
|
14477
|
-
this.cssClassesValue
|
14509
|
+
this.resetPropertyValue("cssClassesValue");
|
14478
14510
|
};
|
14479
14511
|
SurveyElement.prototype.getIsLoadingFromJson = function () {
|
14480
14512
|
if (_super.prototype.getIsLoadingFromJson.call(this))
|
@@ -14569,7 +14601,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14569
14601
|
configurable: true
|
14570
14602
|
});
|
14571
14603
|
SurveyElement.prototype.onFirstRendering = function () {
|
14572
|
-
this.
|
14604
|
+
if (!this.wasRendered) {
|
14605
|
+
this.wasRenderedValue = true;
|
14606
|
+
this.onFirstRenderingCore();
|
14607
|
+
}
|
14608
|
+
};
|
14609
|
+
SurveyElement.prototype.onFirstRenderingCore = function () {
|
14573
14610
|
this.ensureCssClassesValue();
|
14574
14611
|
};
|
14575
14612
|
SurveyElement.prototype.endLoadingFromJson = function () {
|
@@ -14864,17 +14901,19 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14864
14901
|
};
|
14865
14902
|
Object.defineProperty(SurveyElement.prototype, "paddingLeft", {
|
14866
14903
|
get: function () {
|
14867
|
-
|
14868
|
-
|
14869
|
-
set: function (val) {
|
14870
|
-
this.setPropertyValue("paddingLeft", val);
|
14904
|
+
var _this = this;
|
14905
|
+
return this.getPropertyValue("paddingLeft", undefined, function () { return _this.calcPaddingLeft(); });
|
14871
14906
|
},
|
14872
14907
|
enumerable: false,
|
14873
14908
|
configurable: true
|
14874
14909
|
});
|
14910
|
+
SurveyElement.prototype.calcPaddingLeft = function () {
|
14911
|
+
return "";
|
14912
|
+
};
|
14875
14913
|
Object.defineProperty(SurveyElement.prototype, "paddingRight", {
|
14876
14914
|
get: function () {
|
14877
|
-
|
14915
|
+
var _this = this;
|
14916
|
+
return this.getPropertyValue("paddingRight", undefined, function () { return _this.calcPaddingRight(); });
|
14878
14917
|
},
|
14879
14918
|
set: function (val) {
|
14880
14919
|
this.setPropertyValue("paddingRight", val);
|
@@ -14882,6 +14921,13 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14882
14921
|
enumerable: false,
|
14883
14922
|
configurable: true
|
14884
14923
|
});
|
14924
|
+
SurveyElement.prototype.calcPaddingRight = function () {
|
14925
|
+
return "";
|
14926
|
+
};
|
14927
|
+
SurveyElement.prototype.resetIndents = function () {
|
14928
|
+
this.resetPropertyValue("paddingLeft");
|
14929
|
+
this.resetPropertyValue("paddingRight");
|
14930
|
+
};
|
14885
14931
|
SurveyElement.prototype.updateRootStyle = function () {
|
14886
14932
|
var style = {};
|
14887
14933
|
var _width;
|
@@ -16393,6 +16439,12 @@ function mergeValues(src, dest) {
|
|
16393
16439
|
}
|
16394
16440
|
}
|
16395
16441
|
}
|
16442
|
+
function updateListCssValues(res, css) {
|
16443
|
+
var listCssClasses = {};
|
16444
|
+
mergeValues(css.list, listCssClasses);
|
16445
|
+
mergeValues(res.list, listCssClasses);
|
16446
|
+
res["list"] = listCssClasses;
|
16447
|
+
}
|
16396
16448
|
var Logger = /** @class */ (function () {
|
16397
16449
|
function Logger() {
|
16398
16450
|
this._result = "";
|
@@ -18866,7 +18918,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
18866
18918
|
_this.createNewArray("validators", function (validator) {
|
18867
18919
|
validator.errorOwner = _this;
|
18868
18920
|
});
|
18869
|
-
_this.commentTextAreaModel = new text_area_TextAreaModel(_this.getCommentTextAreaOptions());
|
18870
18921
|
_this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; });
|
18871
18922
|
_this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
|
18872
18923
|
_this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
|
@@ -18894,7 +18945,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
18894
18945
|
_this.clearCssClasses();
|
18895
18946
|
});
|
18896
18947
|
_this.registerPropertyChangedHandlers(["indent", "rightIndent"], function () {
|
18897
|
-
_this.
|
18948
|
+
_this.resetIndents();
|
18898
18949
|
});
|
18899
18950
|
_this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
|
18900
18951
|
_this.initCommentFromSurvey();
|
@@ -18909,26 +18960,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
18909
18960
|
Question.getQuestionId = function () {
|
18910
18961
|
return "sq_" + Question.questionCounter++;
|
18911
18962
|
};
|
18912
|
-
Question.prototype.getCommentTextAreaOptions = function () {
|
18913
|
-
var _this = this;
|
18914
|
-
var options = {
|
18915
|
-
question: this,
|
18916
|
-
id: function () { return _this.commentId; },
|
18917
|
-
propertyName: "comment",
|
18918
|
-
className: function () { return _this.cssClasses.comment; },
|
18919
|
-
placeholder: function () { return _this.renderedCommentPlaceholder; },
|
18920
|
-
isDisabledAttr: function () { return _this.isInputReadOnly || false; },
|
18921
|
-
rows: function () { return _this.commentAreaRows; },
|
18922
|
-
autoGrow: function () { return _this.autoGrowComment; },
|
18923
|
-
maxLength: function () { return _this.getOthersMaxLength(); },
|
18924
|
-
ariaRequired: function () { return _this.a11y_input_ariaRequired; },
|
18925
|
-
ariaLabel: function () { return _this.a11y_input_ariaLabel; },
|
18926
|
-
getTextValue: function () { return _this.comment; },
|
18927
|
-
onTextAreaChange: function (e) { _this.onCommentChange(e); },
|
18928
|
-
onTextAreaInput: function (e) { _this.onCommentInput(e); },
|
18929
|
-
};
|
18930
|
-
return options;
|
18931
|
-
};
|
18932
18963
|
Question.prototype.isReadOnlyRenderDiv = function () {
|
18933
18964
|
return this.isReadOnly && settings.readOnly.commentRenderMode === "div";
|
18934
18965
|
};
|
@@ -18973,6 +19004,36 @@ var question_Question = /** @class */ (function (_super) {
|
|
18973
19004
|
this.locProcessedTitle.sharedData = locTitleValue;
|
18974
19005
|
return locTitleValue;
|
18975
19006
|
};
|
19007
|
+
Object.defineProperty(Question.prototype, "commentTextAreaModel", {
|
19008
|
+
get: function () {
|
19009
|
+
if (!this.commentTextAreaModelValue) {
|
19010
|
+
this.commentTextAreaModelValue = new text_area_TextAreaModel(this.getCommentTextAreaOptions());
|
19011
|
+
}
|
19012
|
+
return this.commentTextAreaModelValue;
|
19013
|
+
},
|
19014
|
+
enumerable: false,
|
19015
|
+
configurable: true
|
19016
|
+
});
|
19017
|
+
Question.prototype.getCommentTextAreaOptions = function () {
|
19018
|
+
var _this = this;
|
19019
|
+
var options = {
|
19020
|
+
question: this,
|
19021
|
+
id: function () { return _this.commentId; },
|
19022
|
+
propertyName: "comment",
|
19023
|
+
className: function () { return _this.cssClasses.comment; },
|
19024
|
+
placeholder: function () { return _this.renderedCommentPlaceholder; },
|
19025
|
+
isDisabledAttr: function () { return _this.isInputReadOnly || false; },
|
19026
|
+
rows: function () { return _this.commentAreaRows; },
|
19027
|
+
autoGrow: function () { return _this.autoGrowComment; },
|
19028
|
+
maxLength: function () { return _this.getOthersMaxLength(); },
|
19029
|
+
ariaRequired: function () { return _this.a11y_input_ariaRequired; },
|
19030
|
+
ariaLabel: function () { return _this.a11y_input_ariaLabel; },
|
19031
|
+
getTextValue: function () { return _this.comment; },
|
19032
|
+
onTextAreaChange: function (e) { _this.onCommentChange(e); },
|
19033
|
+
onTextAreaInput: function (e) { _this.onCommentInput(e); },
|
19034
|
+
};
|
19035
|
+
return options;
|
19036
|
+
};
|
18976
19037
|
Question.prototype.getSurvey = function (live) {
|
18977
19038
|
if (live === void 0) { live = false; }
|
18978
19039
|
if (live) {
|
@@ -19460,7 +19521,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
19460
19521
|
if (isLight !== true) {
|
19461
19522
|
this.runConditions();
|
19462
19523
|
}
|
19463
|
-
this.calcRenderedCommentPlaceholder();
|
19464
19524
|
if (!this.visible) {
|
19465
19525
|
this.updateIsVisibleProp();
|
19466
19526
|
}
|
@@ -19478,7 +19538,9 @@ var question_Question = /** @class */ (function (_super) {
|
|
19478
19538
|
return;
|
19479
19539
|
this.removeFromParent();
|
19480
19540
|
this.setPropertyValue("parent", val);
|
19481
|
-
|
19541
|
+
if (!!val) {
|
19542
|
+
this.updateQuestionCss();
|
19543
|
+
}
|
19482
19544
|
this.onParentChanged();
|
19483
19545
|
},
|
19484
19546
|
enumerable: false,
|
@@ -19806,14 +19868,17 @@ var question_Question = /** @class */ (function (_super) {
|
|
19806
19868
|
});
|
19807
19869
|
Object.defineProperty(Question.prototype, "renderedCommentPlaceholder", {
|
19808
19870
|
get: function () {
|
19809
|
-
|
19871
|
+
var _this = this;
|
19872
|
+
var func = function () {
|
19873
|
+
return !_this.isReadOnly ? _this.commentPlaceHolder : undefined;
|
19874
|
+
};
|
19875
|
+
return this.getPropertyValue("renderedCommentPlaceholder", undefined, func);
|
19810
19876
|
},
|
19811
19877
|
enumerable: false,
|
19812
19878
|
configurable: true
|
19813
19879
|
});
|
19814
|
-
Question.prototype.
|
19815
|
-
|
19816
|
-
this.setPropertyValue("renderedCommentPlaceholder", res);
|
19880
|
+
Question.prototype.resetRenderedCommentPlaceholder = function () {
|
19881
|
+
this.resetPropertyValue("renderedCommentPlaceholder");
|
19817
19882
|
};
|
19818
19883
|
Question.prototype.getAllErrors = function () {
|
19819
19884
|
return this.errors.slice();
|
@@ -19841,7 +19906,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19841
19906
|
};
|
19842
19907
|
Question.prototype.localeChanged = function () {
|
19843
19908
|
_super.prototype.localeChanged.call(this);
|
19844
|
-
this.
|
19909
|
+
this.resetRenderedCommentPlaceholder();
|
19845
19910
|
if (!!this.localeChangedCallback) {
|
19846
19911
|
this.localeChangedCallback();
|
19847
19912
|
}
|
@@ -20170,7 +20235,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
20170
20235
|
if (reNew) {
|
20171
20236
|
this.updateQuestionCss(true);
|
20172
20237
|
}
|
20173
|
-
this.
|
20238
|
+
this.resetIndents();
|
20174
20239
|
};
|
20175
20240
|
Question.prototype.updateQuestionCss = function (reNew) {
|
20176
20241
|
if (this.isLoadingFromJson ||
|
@@ -20224,9 +20289,11 @@ var question_Question = /** @class */ (function (_super) {
|
|
20224
20289
|
enumerable: false,
|
20225
20290
|
configurable: true
|
20226
20291
|
});
|
20227
|
-
Question.prototype.
|
20228
|
-
|
20229
|
-
|
20292
|
+
Question.prototype.calcPaddingLeft = function () {
|
20293
|
+
return this.getIndentSize(this.indent);
|
20294
|
+
};
|
20295
|
+
Question.prototype.calcPaddingRight = function () {
|
20296
|
+
return this.getIndentSize(this.rightIndent);
|
20230
20297
|
};
|
20231
20298
|
Question.prototype.getIndentSize = function (indent) {
|
20232
20299
|
if (indent < 1 || !this.getSurvey() || !this.cssClasses || !this.cssClasses.indent)
|
@@ -20531,7 +20598,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
20531
20598
|
this.clearErrors();
|
20532
20599
|
}
|
20533
20600
|
this.updateQuestionCss();
|
20534
|
-
this.
|
20601
|
+
this.resetRenderedCommentPlaceholder();
|
20535
20602
|
};
|
20536
20603
|
Object.defineProperty(Question.prototype, "enableIf", {
|
20537
20604
|
/**
|
@@ -20622,15 +20689,10 @@ var question_Question = /** @class */ (function (_super) {
|
|
20622
20689
|
if (this.isEmpty()) {
|
20623
20690
|
this.initDataFromSurvey();
|
20624
20691
|
}
|
20625
|
-
this.calcRenderedCommentPlaceholder();
|
20626
|
-
this.onIndentChanged();
|
20627
20692
|
};
|
20628
20693
|
Question.prototype.onSetData = function () {
|
20629
20694
|
_super.prototype.onSetData.call(this);
|
20630
|
-
if (!this.survey)
|
20631
|
-
return;
|
20632
|
-
this.onIndentChanged();
|
20633
|
-
if (!this.isDesignMode) {
|
20695
|
+
if (!this.isDesignMode && !!this.survey && !this.isLoadingFromJson) {
|
20634
20696
|
this.initDataFromSurvey();
|
20635
20697
|
this.onSurveyValueChanged(this.value);
|
20636
20698
|
this.updateValueWithDefaults();
|
@@ -20850,7 +20912,6 @@ var question_Question = /** @class */ (function (_super) {
|
|
20850
20912
|
Question.prototype.clearValueIfInvisibleCore = function (reason) {
|
20851
20913
|
if (this.canClearValueAsInvisible(reason)) {
|
20852
20914
|
this.clearValue();
|
20853
|
-
this.setValueChangedDirectly(undefined);
|
20854
20915
|
}
|
20855
20916
|
};
|
20856
20917
|
Object.defineProperty(Question.prototype, "clearIfInvisible", {
|
@@ -22142,7 +22203,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
22142
22203
|
jsonobject_property()
|
22143
22204
|
], Question.prototype, "ariaExpanded", void 0);
|
22144
22205
|
question_decorate([
|
22145
|
-
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.
|
22206
|
+
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedCommentPlaceholder(); } })
|
22146
22207
|
], Question.prototype, "commentPlaceholder", void 0);
|
22147
22208
|
question_decorate([
|
22148
22209
|
jsonobject_property()
|
@@ -24842,12 +24903,12 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
24842
24903
|
this.customQuestion.onItemValuePropertyChanged(this, item, item.ownerPropertyName, name, newValue);
|
24843
24904
|
}
|
24844
24905
|
};
|
24845
|
-
QuestionCustomModelBase.prototype.
|
24906
|
+
QuestionCustomModelBase.prototype.onFirstRenderingCore = function () {
|
24907
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
24846
24908
|
var el = this.getElement();
|
24847
24909
|
if (!!el) {
|
24848
24910
|
el.onFirstRendering();
|
24849
24911
|
}
|
24850
|
-
_super.prototype.onFirstRendering.call(this);
|
24851
24912
|
};
|
24852
24913
|
QuestionCustomModelBase.prototype.onHidingContent = function () {
|
24853
24914
|
_super.prototype.onHidingContent.call(this);
|
@@ -26328,6 +26389,9 @@ Serializer.addClass("expression", [
|
|
26328
26389
|
{ name: "isRequired", visible: false },
|
26329
26390
|
{ name: "readOnly", visible: false },
|
26330
26391
|
{ name: "requiredErrorText", visible: false },
|
26392
|
+
{ name: "resetValueIf", visible: false },
|
26393
|
+
{ name: "setValueIf", visible: false },
|
26394
|
+
{ name: "setValueExpression", visible: false },
|
26331
26395
|
{ name: "defaultValueExpression", visible: false },
|
26332
26396
|
{ name: "defaultValue", visible: false },
|
26333
26397
|
{ name: "correctAnswer", visible: false },
|
@@ -28037,8 +28101,12 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
28037
28101
|
var dataRowIndex = 0;
|
28038
28102
|
for (var i = 0; i < this.rows.length; i++) {
|
28039
28103
|
if (dataRowIndex === index) {
|
28040
|
-
if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow)
|
28104
|
+
if (this.rows[i].isErrorsRow || this.rows[i].isDetailRow) {
|
28041
28105
|
res++;
|
28106
|
+
if (i + 1 < this.rows.length && this.rows[i + 1].isDetailRow) {
|
28107
|
+
res++;
|
28108
|
+
}
|
28109
|
+
}
|
28042
28110
|
break;
|
28043
28111
|
}
|
28044
28112
|
res++;
|
@@ -30325,6 +30393,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30325
30393
|
}
|
30326
30394
|
};
|
30327
30395
|
QuestionMatrixDropdownModelBase.prototype.runCondition = function (values, properties) {
|
30396
|
+
var oldRowVariables = values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName];
|
30328
30397
|
_super.prototype.runCondition.call(this, values, properties);
|
30329
30398
|
var counter = 0;
|
30330
30399
|
var prevTotalValue;
|
@@ -30336,6 +30405,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
30336
30405
|
} while (!helpers_Helpers.isTwoValueEquals(prevTotalValue, this.totalValue) &&
|
30337
30406
|
counter < 3);
|
30338
30407
|
this.updateVisibilityBasedOnRows();
|
30408
|
+
values[question_matrixdropdownbase_MatrixDropdownRowModelBase.RowVariableName] = oldRowVariables;
|
30339
30409
|
};
|
30340
30410
|
QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value, keys) {
|
30341
30411
|
_super.prototype.runTriggers.call(this, name, value, keys);
|
@@ -36435,7 +36505,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36435
36505
|
_this.updateVisibleIndexes();
|
36436
36506
|
});
|
36437
36507
|
_this.registerPropertyChangedHandlers(["title"], function () {
|
36438
|
-
_this.
|
36508
|
+
_this.resetHasTextInTitle();
|
36439
36509
|
});
|
36440
36510
|
_this.dragDropPanelHelper = new drag_drop_panel_helper_v1_DragDropPanelHelperV1(_this);
|
36441
36511
|
return _this;
|
@@ -36492,6 +36562,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36492
36562
|
return "panelbase";
|
36493
36563
|
};
|
36494
36564
|
PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
|
36565
|
+
//if(this.surveyImpl === value) return; TODO refactor
|
36495
36566
|
this.blockAnimations();
|
36496
36567
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
36497
36568
|
if (this.isDesignMode)
|
@@ -36511,8 +36582,16 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36511
36582
|
col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
|
36512
36583
|
});
|
36513
36584
|
};
|
36514
|
-
PanelModelBase.prototype
|
36515
|
-
|
36585
|
+
Object.defineProperty(PanelModelBase.prototype, "hasTextInTitle", {
|
36586
|
+
get: function () {
|
36587
|
+
var _this = this;
|
36588
|
+
return this.getPropertyValue("hasTextInTitle", undefined, function () { return !!_this.title; });
|
36589
|
+
},
|
36590
|
+
enumerable: false,
|
36591
|
+
configurable: true
|
36592
|
+
});
|
36593
|
+
PanelModelBase.prototype.resetHasTextInTitle = function () {
|
36594
|
+
this.resetPropertyValue("hasTextInTitle");
|
36516
36595
|
};
|
36517
36596
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
36518
36597
|
get: function () {
|
@@ -37525,14 +37604,11 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37525
37604
|
}
|
37526
37605
|
this.onElementVisibilityChanged(this);
|
37527
37606
|
this.releaseAnimations();
|
37528
|
-
this.calcHasTextInTitle();
|
37529
37607
|
};
|
37530
|
-
PanelModelBase.prototype.
|
37531
|
-
_super.prototype.
|
37532
|
-
for (var i = 0; i < this.elements.length; i++) {
|
37533
|
-
this.elements[i].onFirstRendering();
|
37534
|
-
}
|
37608
|
+
PanelModelBase.prototype.onFirstRenderingCore = function () {
|
37609
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
37535
37610
|
this.onRowsChanged();
|
37611
|
+
this.elements.forEach(function (el) { return el.onFirstRendering(); });
|
37536
37612
|
};
|
37537
37613
|
PanelModelBase.prototype.updateRows = function () {
|
37538
37614
|
if (this.isLoadingFromJson)
|
@@ -37976,9 +38052,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37976
38052
|
PanelModelBase.prototype.getPanelStartIndex = function (index) {
|
37977
38053
|
return index;
|
37978
38054
|
};
|
37979
|
-
PanelModelBase.prototype.isContinueNumbering = function () {
|
37980
|
-
return true;
|
37981
|
-
};
|
38055
|
+
PanelModelBase.prototype.isContinueNumbering = function () { return true; };
|
37982
38056
|
Object.defineProperty(PanelModelBase.prototype, "isReadOnly", {
|
37983
38057
|
get: function () {
|
37984
38058
|
var isParentReadOnly = !!this.parent && this.parent.isReadOnly;
|
@@ -38319,9 +38393,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
38319
38393
|
panel_decorate([
|
38320
38394
|
jsonobject_property({ defaultValue: true })
|
38321
38395
|
], PanelModelBase.prototype, "showTitle", void 0);
|
38322
|
-
panel_decorate([
|
38323
|
-
jsonobject_property({ defaultValue: false })
|
38324
|
-
], PanelModelBase.prototype, "hasTextInTitle", void 0);
|
38325
38396
|
panel_decorate([
|
38326
38397
|
jsonobject_property({ defaultValue: true })
|
38327
38398
|
], PanelModelBase.prototype, "showDescription", void 0);
|
@@ -38350,7 +38421,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38350
38421
|
_this.parent.elementWidthChanged(_this);
|
38351
38422
|
}
|
38352
38423
|
});
|
38353
|
-
_this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.
|
38424
|
+
_this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.resetIndents(); });
|
38354
38425
|
_this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
|
38355
38426
|
return _this;
|
38356
38427
|
}
|
@@ -38371,15 +38442,6 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38371
38442
|
}
|
38372
38443
|
return _super.prototype.getSurvey.call(this, live);
|
38373
38444
|
};
|
38374
|
-
PanelModel.prototype.onSurveyLoad = function () {
|
38375
|
-
_super.prototype.onSurveyLoad.call(this);
|
38376
|
-
this.onIndentChanged();
|
38377
|
-
};
|
38378
|
-
PanelModel.prototype.onSetData = function () {
|
38379
|
-
_super.prototype.onSetData.call(this);
|
38380
|
-
this.onIndentChanged();
|
38381
|
-
this.calcHasTextInTitle();
|
38382
|
-
};
|
38383
38445
|
Object.defineProperty(PanelModel.prototype, "isPanel", {
|
38384
38446
|
get: function () {
|
38385
38447
|
return true;
|
@@ -38603,7 +38665,11 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38603
38665
|
});
|
38604
38666
|
Object.defineProperty(PanelModel.prototype, "innerPaddingLeft", {
|
38605
38667
|
get: function () {
|
38606
|
-
|
38668
|
+
var _this = this;
|
38669
|
+
var func = function () {
|
38670
|
+
return _this.getIndentSize(_this.innerIndent);
|
38671
|
+
};
|
38672
|
+
return this.getPropertyValue("innerPaddingLeft", undefined, func);
|
38607
38673
|
},
|
38608
38674
|
set: function (val) {
|
38609
38675
|
this.setPropertyValue("innerPaddingLeft", val);
|
@@ -38611,18 +38677,23 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
38611
38677
|
enumerable: false,
|
38612
38678
|
configurable: true
|
38613
38679
|
});
|
38614
|
-
PanelModel.prototype.
|
38615
|
-
|
38616
|
-
|
38617
|
-
|
38618
|
-
|
38619
|
-
|
38680
|
+
PanelModel.prototype.calcPaddingLeft = function () {
|
38681
|
+
return this.getIndentSize(this.indent);
|
38682
|
+
};
|
38683
|
+
PanelModel.prototype.calcPaddingRight = function () {
|
38684
|
+
return this.getIndentSize(this.rightIndent);
|
38685
|
+
};
|
38686
|
+
PanelModel.prototype.resetIndents = function () {
|
38687
|
+
this.resetPropertyValue("innerPaddingLeft");
|
38688
|
+
_super.prototype.resetIndents.call(this);
|
38620
38689
|
};
|
38621
38690
|
PanelModel.prototype.getIndentSize = function (indent) {
|
38691
|
+
if (!this.survey)
|
38692
|
+
return undefined;
|
38622
38693
|
if (indent < 1)
|
38623
38694
|
return "";
|
38624
38695
|
var css = this.survey["css"];
|
38625
|
-
if (!css || !css.question.indent)
|
38696
|
+
if (!css || !css.question || !css.question.indent)
|
38626
38697
|
return "";
|
38627
38698
|
return indent * css.question.indent + "px";
|
38628
38699
|
};
|
@@ -39262,11 +39333,6 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39262
39333
|
this.removeSelfFromList(this.survey.pages);
|
39263
39334
|
}
|
39264
39335
|
};
|
39265
|
-
PageModel.prototype.onFirstRendering = function () {
|
39266
|
-
if (this.wasShown)
|
39267
|
-
return;
|
39268
|
-
_super.prototype.onFirstRendering.call(this);
|
39269
|
-
};
|
39270
39336
|
Object.defineProperty(PageModel.prototype, "visibleIndex", {
|
39271
39337
|
/**
|
39272
39338
|
* The visible index of the page. It has values from 0 to visible page count - 1.
|
@@ -45499,6 +45565,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45499
45565
|
width: width,
|
45500
45566
|
};
|
45501
45567
|
this.onResize.fire(this, options);
|
45568
|
+
this.setResponsiveStartWidth(width);
|
45502
45569
|
return isMobileChanged;
|
45503
45570
|
};
|
45504
45571
|
SurveyModel.prototype.triggerResponsiveness = function (hard) {
|
@@ -47812,10 +47879,29 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47812
47879
|
});
|
47813
47880
|
Object.defineProperty(SurveyModel.prototype, "renderedWidth", {
|
47814
47881
|
get: function () {
|
47882
|
+
var isStaticWidth = this.getPropertyValue("calculatedWidthMode") == "static";
|
47815
47883
|
var width = this.getPropertyValue("width");
|
47884
|
+
if (this.isScaled && this.responsiveStartWidth > 1) {
|
47885
|
+
var initialWidth = this.responsiveStartWidth;
|
47886
|
+
try {
|
47887
|
+
initialWidth = !isNaN(width) ? width : parseFloat(width.toString().replace("px", ""));
|
47888
|
+
}
|
47889
|
+
catch (e) { }
|
47890
|
+
return (isStaticWidth ? initialWidth : this.responsiveStartWidth) * this.widthScale / 100 + "px";
|
47891
|
+
}
|
47816
47892
|
if (width && !isNaN(width))
|
47817
47893
|
width = width + "px";
|
47818
|
-
return
|
47894
|
+
return isStaticWidth && width || undefined;
|
47895
|
+
},
|
47896
|
+
enumerable: false,
|
47897
|
+
configurable: true
|
47898
|
+
});
|
47899
|
+
SurveyModel.prototype.setResponsiveStartWidth = function (width) {
|
47900
|
+
this.responsiveStartWidth = width;
|
47901
|
+
};
|
47902
|
+
Object.defineProperty(SurveyModel.prototype, "isScaled", {
|
47903
|
+
get: function () {
|
47904
|
+
return Math.abs(this.widthScale - 100) > 0.001;
|
47819
47905
|
},
|
47820
47906
|
enumerable: false,
|
47821
47907
|
configurable: true
|
@@ -48645,6 +48731,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
48645
48731
|
survey_decorate([
|
48646
48732
|
jsonobject_property()
|
48647
48733
|
], SurveyModel.prototype, "calculatedWidthMode", void 0);
|
48734
|
+
survey_decorate([
|
48735
|
+
jsonobject_property({ defaultValue: 100 })
|
48736
|
+
], SurveyModel.prototype, "widthScale", void 0);
|
48737
|
+
survey_decorate([
|
48738
|
+
jsonobject_property()
|
48739
|
+
], SurveyModel.prototype, "responsiveStartWidth", void 0);
|
48648
48740
|
survey_decorate([
|
48649
48741
|
propertyArray()
|
48650
48742
|
], SurveyModel.prototype, "layoutElements", void 0);
|
@@ -49020,7 +49112,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49020
49112
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
49021
49113
|
_this.onVisibleChanged();
|
49022
49114
|
});
|
49023
|
-
_this.otherTextAreaModel = new text_area_TextAreaModel(_this.getOtherTextAreaOptions());
|
49024
49115
|
_this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
|
49025
49116
|
_this.setNewRestfulProperty();
|
49026
49117
|
var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
|
@@ -49051,6 +49142,26 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49051
49142
|
enumerable: false,
|
49052
49143
|
configurable: true
|
49053
49144
|
});
|
49145
|
+
QuestionSelectBase.prototype.getType = function () {
|
49146
|
+
return "selectbase";
|
49147
|
+
};
|
49148
|
+
QuestionSelectBase.prototype.dispose = function () {
|
49149
|
+
_super.prototype.dispose.call(this);
|
49150
|
+
var q = this.getQuestionWithChoices();
|
49151
|
+
if (!!q) {
|
49152
|
+
q.removeDependedQuestion(this);
|
49153
|
+
}
|
49154
|
+
};
|
49155
|
+
Object.defineProperty(QuestionSelectBase.prototype, "otherTextAreaModel", {
|
49156
|
+
get: function () {
|
49157
|
+
if (!this.otherTextAreaModelValue) {
|
49158
|
+
this.otherTextAreaModelValue = new text_area_TextAreaModel(this.getOtherTextAreaOptions());
|
49159
|
+
}
|
49160
|
+
return this.otherTextAreaModelValue;
|
49161
|
+
},
|
49162
|
+
enumerable: false,
|
49163
|
+
configurable: true
|
49164
|
+
});
|
49054
49165
|
QuestionSelectBase.prototype.getOtherTextAreaOptions = function () {
|
49055
49166
|
var _this = this;
|
49056
49167
|
var options = {
|
@@ -49071,16 +49182,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
49071
49182
|
};
|
49072
49183
|
return options;
|
49073
49184
|
};
|
49074
|
-
QuestionSelectBase.prototype.getType = function () {
|
49075
|
-
return "selectbase";
|
49076
|
-
};
|
49077
|
-
QuestionSelectBase.prototype.dispose = function () {
|
49078
|
-
_super.prototype.dispose.call(this);
|
49079
|
-
var q = this.getQuestionWithChoices();
|
49080
|
-
if (!!q) {
|
49081
|
-
q.removeDependedQuestion(this);
|
49082
|
-
}
|
49083
|
-
};
|
49084
49185
|
QuestionSelectBase.prototype.resetDependedQuestion = function () {
|
49085
49186
|
this.choicesFromQuestion = "";
|
49086
49187
|
};
|
@@ -51247,22 +51348,6 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
51247
51348
|
enumerable: false,
|
51248
51349
|
configurable: true
|
51249
51350
|
});
|
51250
|
-
QuestionSelectBase.prototype.updateCssClasses = function (res, css) {
|
51251
|
-
_super.prototype.updateCssClasses.call(this, res, css);
|
51252
|
-
if (!!this.dropdownListModel) {
|
51253
|
-
var listCssClasses = {};
|
51254
|
-
mergeValues(css.list, listCssClasses);
|
51255
|
-
mergeValues(res.list, listCssClasses);
|
51256
|
-
res["list"] = listCssClasses;
|
51257
|
-
}
|
51258
|
-
};
|
51259
|
-
QuestionSelectBase.prototype.calcCssClasses = function (css) {
|
51260
|
-
var classes = _super.prototype.calcCssClasses.call(this, css);
|
51261
|
-
if (this.dropdownListModel) {
|
51262
|
-
this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
|
51263
|
-
}
|
51264
|
-
return classes;
|
51265
|
-
};
|
51266
51351
|
question_baseselect_decorate([
|
51267
51352
|
jsonobject_property({
|
51268
51353
|
onSet: function (newVal, target) {
|
@@ -52436,7 +52521,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52436
52521
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
52437
52522
|
_this.itemSelector = ".sv-list__item";
|
52438
52523
|
_this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
|
52439
|
-
_this.popupCssClasses = "sv-single-select-list";
|
52440
52524
|
_this.listModelFilterStringChanged = function (newValue) {
|
52441
52525
|
if (_this.filterString !== newValue) {
|
52442
52526
|
_this.filterString = newValue;
|
@@ -52446,7 +52530,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52446
52530
|
_this.onPropertyChangedHandler(sender, options);
|
52447
52531
|
};
|
52448
52532
|
_this.htmlCleanerElement = DomDocumentHelper.createElement("div");
|
52449
|
-
_this.question.ariaExpanded = "false";
|
52450
52533
|
question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
|
52451
52534
|
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
52452
52535
|
_this.listModel = _this.createListModel();
|
@@ -52456,6 +52539,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52456
52539
|
_this.setTextWrapEnabled(_this.question.textWrapEnabled);
|
52457
52540
|
_this.createPopup();
|
52458
52541
|
_this.resetItemsSettings();
|
52542
|
+
var classes = question.cssClasses;
|
52543
|
+
_this.updateCssClasses(classes.popup, classes.list);
|
52459
52544
|
return _this;
|
52460
52545
|
}
|
52461
52546
|
Object.defineProperty(DropdownListModel.prototype, "focusFirstInputSelector", {
|
@@ -52558,7 +52643,6 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52558
52643
|
this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
|
52559
52644
|
_this.updatePopupFocusFirstInputSelector();
|
52560
52645
|
});
|
52561
|
-
this._popupModel.cssClass = this.popupCssClasses;
|
52562
52646
|
this._popupModel.onVisibilityChanged.add(function (_, option) {
|
52563
52647
|
if (option.isVisible) {
|
52564
52648
|
_this.listModel.renderElements = true;
|
@@ -52672,8 +52756,9 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
52672
52756
|
model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
|
52673
52757
|
model.actions.forEach(function (a) { return a.disableTabStop = true; });
|
52674
52758
|
};
|
52759
|
+
DropdownListModel.prototype.getPopupCssClasses = function () { return "sv-single-select-list"; };
|
52675
52760
|
DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
|
52676
|
-
this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.
|
52761
|
+
this.popupModel.cssClass = new CssClassBuilder().append(popupCssClass).append(this.getPopupCssClasses()).toString();
|
52677
52762
|
this.listModel.cssClasses = listCssClasses;
|
52678
52763
|
};
|
52679
52764
|
DropdownListModel.prototype.resetFilterString = function () {
|
@@ -53151,6 +53236,7 @@ var question_dropdown_decorate = (undefined && undefined.__decorate) || function
|
|
53151
53236
|
|
53152
53237
|
|
53153
53238
|
|
53239
|
+
|
53154
53240
|
/**
|
53155
53241
|
* A class that describes the Dropdown question type.
|
53156
53242
|
*
|
@@ -53163,6 +53249,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53163
53249
|
_this.lastSelectedItemValue = null;
|
53164
53250
|
_this.minMaxChoices = [];
|
53165
53251
|
_this.onOpened = _this.addEvent();
|
53252
|
+
_this.ariaExpanded = "false";
|
53166
53253
|
_this.createLocalizableString("placeholder", _this, false, true);
|
53167
53254
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
53168
53255
|
_this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
|
@@ -53387,6 +53474,19 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53387
53474
|
.append(this.cssClasses.controlInputFieldComponent, !!this.inputFieldComponentName)
|
53388
53475
|
.toString();
|
53389
53476
|
};
|
53477
|
+
QuestionDropdownModel.prototype.updateCssClasses = function (res, css) {
|
53478
|
+
_super.prototype.updateCssClasses.call(this, res, css);
|
53479
|
+
if (this.useDropdownList) {
|
53480
|
+
updateListCssValues(res, css);
|
53481
|
+
}
|
53482
|
+
};
|
53483
|
+
QuestionDropdownModel.prototype.calcCssClasses = function (css) {
|
53484
|
+
var classes = _super.prototype.calcCssClasses.call(this, css);
|
53485
|
+
if (this.dropdownListModelValue) {
|
53486
|
+
this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
|
53487
|
+
}
|
53488
|
+
return classes;
|
53489
|
+
};
|
53390
53490
|
Object.defineProperty(QuestionDropdownModel.prototype, "selectedItemLocText", {
|
53391
53491
|
get: function () {
|
53392
53492
|
var item = this.suggestedItem || this.selectedItem;
|
@@ -53424,9 +53524,14 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53424
53524
|
enumerable: false,
|
53425
53525
|
configurable: true
|
53426
53526
|
});
|
53527
|
+
Object.defineProperty(QuestionDropdownModel.prototype, "useDropdownList", {
|
53528
|
+
get: function () { return this.renderAs !== "select"; },
|
53529
|
+
enumerable: false,
|
53530
|
+
configurable: true
|
53531
|
+
});
|
53427
53532
|
Object.defineProperty(QuestionDropdownModel.prototype, "dropdownListModel", {
|
53428
53533
|
get: function () {
|
53429
|
-
if (this.
|
53534
|
+
if (this.useDropdownList && !this.dropdownListModelValue) {
|
53430
53535
|
this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
|
53431
53536
|
}
|
53432
53537
|
return this.dropdownListModelValue;
|
@@ -53439,8 +53544,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53439
53544
|
});
|
53440
53545
|
Object.defineProperty(QuestionDropdownModel.prototype, "popupModel", {
|
53441
53546
|
get: function () {
|
53442
|
-
|
53443
|
-
return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
|
53547
|
+
return this.dropdownListModel.popupModel;
|
53444
53548
|
},
|
53445
53549
|
enumerable: false,
|
53446
53550
|
configurable: true
|
@@ -53450,7 +53554,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53450
53554
|
};
|
53451
53555
|
QuestionDropdownModel.prototype.onSelectedItemValuesChangedHandler = function (newValue) {
|
53452
53556
|
var _a;
|
53453
|
-
(_a = this.
|
53557
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.setInputStringFromSelectedItem(newValue);
|
53454
53558
|
_super.prototype.onSelectedItemValuesChangedHandler.call(this, newValue);
|
53455
53559
|
};
|
53456
53560
|
QuestionDropdownModel.prototype.hasUnknownValue = function (val, includeOther, isFilteredChoices, checkEmptyValue) {
|
@@ -53476,7 +53580,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53476
53580
|
};
|
53477
53581
|
QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
|
53478
53582
|
_super.prototype.onVisibleChoicesChanged.call(this);
|
53479
|
-
if (
|
53583
|
+
if (!!this.dropdownListModelValue) {
|
53480
53584
|
this.dropdownListModel.updateItems();
|
53481
53585
|
}
|
53482
53586
|
};
|
@@ -53490,7 +53594,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53490
53594
|
var _a;
|
53491
53595
|
_super.prototype.clearValue.call(this, keepComment);
|
53492
53596
|
this.lastSelectedItemValue = null;
|
53493
|
-
(_a = this.
|
53597
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
|
53494
53598
|
};
|
53495
53599
|
QuestionDropdownModel.prototype.afterRenderCore = function (el) {
|
53496
53600
|
_super.prototype.afterRenderCore.call(this, el);
|
@@ -53511,19 +53615,18 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53511
53615
|
};
|
53512
53616
|
QuestionDropdownModel.prototype.supportEmptyValidation = function () { return true; };
|
53513
53617
|
QuestionDropdownModel.prototype.onBlurCore = function (event) {
|
53514
|
-
|
53515
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
53618
|
+
this.dropdownListModel.onBlur(event);
|
53516
53619
|
_super.prototype.onBlurCore.call(this, event);
|
53517
53620
|
};
|
53518
53621
|
QuestionDropdownModel.prototype.onFocusCore = function (event) {
|
53519
|
-
|
53520
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
53622
|
+
this.dropdownListModel.onFocus(event);
|
53521
53623
|
_super.prototype.onFocusCore.call(this, event);
|
53522
53624
|
};
|
53523
53625
|
QuestionDropdownModel.prototype.dispose = function () {
|
53524
53626
|
_super.prototype.dispose.call(this);
|
53525
53627
|
if (!!this.dropdownListModelValue) {
|
53526
53628
|
this.dropdownListModelValue.dispose();
|
53629
|
+
this.dropdownListModelValue = undefined;
|
53527
53630
|
}
|
53528
53631
|
};
|
53529
53632
|
question_dropdown_decorate([
|
@@ -53532,7 +53635,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53532
53635
|
question_dropdown_decorate([
|
53533
53636
|
jsonobject_property({
|
53534
53637
|
onSet: function (newValue, target) {
|
53535
|
-
if (!!target.
|
53638
|
+
if (!!target.dropdownListModelValue) {
|
53536
53639
|
target.dropdownListModel.setSearchEnabled(newValue);
|
53537
53640
|
}
|
53538
53641
|
}
|
@@ -53553,7 +53656,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53553
53656
|
question_dropdown_decorate([
|
53554
53657
|
jsonobject_property({
|
53555
53658
|
onSet: function (newValue, target) {
|
53556
|
-
if (!!target.
|
53659
|
+
if (!!target.dropdownListModelValue) {
|
53557
53660
|
target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
|
53558
53661
|
}
|
53559
53662
|
}
|
@@ -54647,37 +54750,26 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
|
|
54647
54750
|
};
|
54648
54751
|
Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
|
54649
54752
|
get: function () {
|
54650
|
-
|
54753
|
+
var _this = this;
|
54754
|
+
var func = function () {
|
54755
|
+
return _this.hasPlaceholder() ? _this.placeHolder : undefined;
|
54756
|
+
};
|
54757
|
+
return this.getPropertyValue("renderedPlaceholder", undefined, func);
|
54651
54758
|
},
|
54652
54759
|
enumerable: false,
|
54653
54760
|
configurable: true
|
54654
54761
|
});
|
54655
|
-
QuestionTextBase.prototype.setRenderedPlaceholder = function (val) {
|
54656
|
-
this.setPropertyValue("renderedPlaceholder", val);
|
54657
|
-
};
|
54658
54762
|
QuestionTextBase.prototype.onReadOnlyChanged = function () {
|
54659
54763
|
_super.prototype.onReadOnlyChanged.call(this);
|
54660
|
-
this.
|
54661
|
-
};
|
54662
|
-
QuestionTextBase.prototype.onSurveyLoad = function () {
|
54663
|
-
this.calcRenderedPlaceholder();
|
54664
|
-
_super.prototype.onSurveyLoad.call(this);
|
54764
|
+
this.resetRenderedPlaceholder();
|
54665
54765
|
};
|
54666
54766
|
QuestionTextBase.prototype.localeChanged = function () {
|
54667
54767
|
_super.prototype.localeChanged.call(this);
|
54668
|
-
this.
|
54669
|
-
};
|
54670
|
-
QuestionTextBase.prototype.setSurveyImpl = function (value, isLight) {
|
54671
|
-
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
54672
|
-
this.calcRenderedPlaceholder();
|
54768
|
+
this.resetRenderedPlaceholder();
|
54673
54769
|
};
|
54674
54770
|
QuestionTextBase.prototype.supportEmptyValidation = function () { return true; };
|
54675
|
-
QuestionTextBase.prototype.
|
54676
|
-
|
54677
|
-
if (!!res && !this.hasPlaceholder()) {
|
54678
|
-
res = undefined;
|
54679
|
-
}
|
54680
|
-
this.setRenderedPlaceholder(res);
|
54771
|
+
QuestionTextBase.prototype.resetRenderedPlaceholder = function () {
|
54772
|
+
this.resetPropertyValue("renderedPlaceholder");
|
54681
54773
|
};
|
54682
54774
|
QuestionTextBase.prototype.hasPlaceholder = function () {
|
54683
54775
|
return !this.isReadOnly;
|
@@ -54717,7 +54809,7 @@ var question_textbase_QuestionTextBase = /** @class */ (function (_super) {
|
|
54717
54809
|
configurable: true
|
54718
54810
|
});
|
54719
54811
|
question_textbase_decorate([
|
54720
|
-
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.
|
54812
|
+
jsonobject_property({ localizable: true, onSet: function (val, target) { return target.resetRenderedPlaceholder(); } })
|
54721
54813
|
], QuestionTextBase.prototype, "placeholder", void 0);
|
54722
54814
|
return QuestionTextBase;
|
54723
54815
|
}(question_Question));
|
@@ -54924,7 +55016,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
54924
55016
|
});
|
54925
55017
|
_this.registerPropertyChangedHandlers(["inputType", "size"], function () {
|
54926
55018
|
_this.updateInputSize();
|
54927
|
-
_this.
|
55019
|
+
_this.resetRenderedPlaceholder();
|
54928
55020
|
});
|
54929
55021
|
return _this;
|
54930
55022
|
}
|
@@ -58337,7 +58429,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
58337
58429
|
dropdownMultiSelectListModel_extends(DropdownMultiSelectListModel, _super);
|
58338
58430
|
function DropdownMultiSelectListModel(question, onSelectionChanged) {
|
58339
58431
|
var _this = _super.call(this, question, onSelectionChanged) || this;
|
58340
|
-
_this.popupCssClasses = "sv-multi-select-list";
|
58341
58432
|
_this.setHideSelectedItems(question.hideSelectedItems);
|
58342
58433
|
_this.syncFilterStringPlaceholder();
|
58343
58434
|
_this.closeOnSelect = question.closeOnSelect;
|
@@ -58371,6 +58462,7 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
58371
58462
|
return _super.prototype.getFocusFirstInputSelector.call(this);
|
58372
58463
|
}
|
58373
58464
|
};
|
58465
|
+
DropdownMultiSelectListModel.prototype.getPopupCssClasses = function () { return "sv-multi-select-list"; };
|
58374
58466
|
DropdownMultiSelectListModel.prototype.createListModel = function () {
|
58375
58467
|
var _this = this;
|
58376
58468
|
var visibleItems = this.getAvailableItems();
|
@@ -58404,7 +58496,6 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
58404
58496
|
elementId: this.listElementId
|
58405
58497
|
};
|
58406
58498
|
var res = new multiSelectListModel_MultiSelectListModel(listOptions);
|
58407
|
-
res.actions.forEach(function (a) { return a.disableTabStop = true; });
|
58408
58499
|
this.setOnTextSearchCallbackForListModel(res);
|
58409
58500
|
res.forceShowFilter = true;
|
58410
58501
|
return res;
|
@@ -58569,6 +58660,7 @@ var question_tagbox_decorate = (undefined && undefined.__decorate) || function (
|
|
58569
58660
|
|
58570
58661
|
|
58571
58662
|
|
58663
|
+
|
58572
58664
|
/**
|
58573
58665
|
* A class that describes the Multi-Select Dropdown (Tag Box) question type.
|
58574
58666
|
*
|
@@ -58580,6 +58672,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58580
58672
|
var _this = _super.call(this, name) || this;
|
58581
58673
|
_this.itemDisplayNameMap = {};
|
58582
58674
|
_this.onOpened = _this.addEvent();
|
58675
|
+
_this.ariaExpanded = "false";
|
58583
58676
|
_this.createLocalizableString("placeholder", _this, false, true);
|
58584
58677
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
58585
58678
|
_this.createLocalizableString("readOnlyText", _this, true);
|
@@ -58594,7 +58687,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58594
58687
|
var _a;
|
58595
58688
|
_super.prototype.locStrsChanged.call(this);
|
58596
58689
|
this.updateReadOnlyText();
|
58597
|
-
(_a = this.
|
58690
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
|
58598
58691
|
};
|
58599
58692
|
QuestionTagboxModel.prototype.updateReadOnlyText = function () {
|
58600
58693
|
this.readOnlyText = this.displayValue || this.placeholder;
|
@@ -58602,19 +58695,19 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58602
58695
|
QuestionTagboxModel.prototype.getDefaultItemComponent = function () {
|
58603
58696
|
return "";
|
58604
58697
|
};
|
58605
|
-
QuestionTagboxModel.prototype
|
58606
|
-
|
58607
|
-
|
58608
|
-
|
58609
|
-
|
58610
|
-
|
58611
|
-
|
58612
|
-
|
58613
|
-
|
58614
|
-
|
58615
|
-
|
58616
|
-
|
58617
|
-
};
|
58698
|
+
Object.defineProperty(QuestionTagboxModel.prototype, "dropdownListModel", {
|
58699
|
+
get: function () {
|
58700
|
+
if (!this.dropdownListModelValue) {
|
58701
|
+
this.dropdownListModelValue = new dropdownMultiSelectListModel_DropdownMultiSelectListModel(this);
|
58702
|
+
}
|
58703
|
+
return this.dropdownListModelValue;
|
58704
|
+
},
|
58705
|
+
set: function (val) {
|
58706
|
+
this.dropdownListModelValue = val;
|
58707
|
+
},
|
58708
|
+
enumerable: false,
|
58709
|
+
configurable: true
|
58710
|
+
});
|
58618
58711
|
Object.defineProperty(QuestionTagboxModel.prototype, "placeholder", {
|
58619
58712
|
/**
|
58620
58713
|
* A text displayed in the input field when it doesn't have a value.
|
@@ -58681,8 +58774,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58681
58774
|
});
|
58682
58775
|
Object.defineProperty(QuestionTagboxModel.prototype, "popupModel", {
|
58683
58776
|
get: function () {
|
58684
|
-
|
58685
|
-
return (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
|
58777
|
+
return this.dropdownListModel.popupModel;
|
58686
58778
|
},
|
58687
58779
|
enumerable: false,
|
58688
58780
|
configurable: true
|
@@ -58698,6 +58790,17 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58698
58790
|
.append(this.cssClasses.controlPreview, this.isPreviewStyle)
|
58699
58791
|
.toString();
|
58700
58792
|
};
|
58793
|
+
QuestionTagboxModel.prototype.updateCssClasses = function (res, css) {
|
58794
|
+
_super.prototype.updateCssClasses.call(this, res, css);
|
58795
|
+
updateListCssValues(res, css);
|
58796
|
+
};
|
58797
|
+
QuestionTagboxModel.prototype.calcCssClasses = function (css) {
|
58798
|
+
var classes = _super.prototype.calcCssClasses.call(this, css);
|
58799
|
+
if (this.dropdownListModelValue) {
|
58800
|
+
this.dropdownListModel.updateCssClasses(classes.popup, classes.list);
|
58801
|
+
}
|
58802
|
+
return classes;
|
58803
|
+
};
|
58701
58804
|
QuestionTagboxModel.prototype.onOpenedCallBack = function () {
|
58702
58805
|
this.onOpened.fire(this, { question: this, choices: this.choices });
|
58703
58806
|
};
|
@@ -58718,7 +58821,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58718
58821
|
};
|
58719
58822
|
QuestionTagboxModel.prototype.onVisibleChoicesChanged = function () {
|
58720
58823
|
_super.prototype.onVisibleChoicesChanged.call(this);
|
58721
|
-
if (this.
|
58824
|
+
if (!!this.dropdownListModelValue) {
|
58722
58825
|
this.dropdownListModel.updateItems();
|
58723
58826
|
}
|
58724
58827
|
};
|
@@ -58766,13 +58869,11 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58766
58869
|
};
|
58767
58870
|
QuestionTagboxModel.prototype.supportEmptyValidation = function () { return true; };
|
58768
58871
|
QuestionTagboxModel.prototype.onBlurCore = function (event) {
|
58769
|
-
|
58770
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
58872
|
+
this.dropdownListModel.onBlur(event);
|
58771
58873
|
_super.prototype.onBlurCore.call(this, event);
|
58772
58874
|
};
|
58773
58875
|
QuestionTagboxModel.prototype.onFocusCore = function (event) {
|
58774
|
-
|
58775
|
-
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
58876
|
+
this.dropdownListModel.onFocus(event);
|
58776
58877
|
_super.prototype.onFocusCore.call(this, event);
|
58777
58878
|
};
|
58778
58879
|
QuestionTagboxModel.prototype.allElementsSelected = function () {
|
@@ -58785,14 +58886,15 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58785
58886
|
};
|
58786
58887
|
QuestionTagboxModel.prototype.dispose = function () {
|
58787
58888
|
_super.prototype.dispose.call(this);
|
58788
|
-
if (!!this.
|
58789
|
-
this.
|
58889
|
+
if (!!this.dropdownListModelValue) {
|
58890
|
+
this.dropdownListModelValue.dispose();
|
58891
|
+
this.dropdownListModelValue = undefined;
|
58790
58892
|
}
|
58791
58893
|
};
|
58792
58894
|
QuestionTagboxModel.prototype.clearValue = function (keepComment) {
|
58793
58895
|
var _a;
|
58794
58896
|
_super.prototype.clearValue.call(this, keepComment);
|
58795
|
-
(_a = this.
|
58897
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.clear();
|
58796
58898
|
};
|
58797
58899
|
Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
|
58798
58900
|
get: function () {
|
@@ -58818,7 +58920,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58818
58920
|
question_tagbox_decorate([
|
58819
58921
|
jsonobject_property({
|
58820
58922
|
onSet: function (newValue, target) {
|
58821
|
-
if (!!target.
|
58923
|
+
if (!!target.dropdownListModelValue) {
|
58822
58924
|
target.dropdownListModel.setSearchEnabled(newValue);
|
58823
58925
|
}
|
58824
58926
|
}
|
@@ -58827,7 +58929,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58827
58929
|
question_tagbox_decorate([
|
58828
58930
|
jsonobject_property({
|
58829
58931
|
onSet: function (newValue, target) {
|
58830
|
-
if (!!target.
|
58932
|
+
if (!!target.dropdownListModelValue) {
|
58831
58933
|
target.dropdownListModel.setHideSelectedItems(newValue);
|
58832
58934
|
}
|
58833
58935
|
}
|
@@ -58836,7 +58938,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58836
58938
|
question_tagbox_decorate([
|
58837
58939
|
jsonobject_property({
|
58838
58940
|
onSet: function (newValue, target) {
|
58839
|
-
if (!!target.
|
58941
|
+
if (!!target.dropdownListModelValue) {
|
58840
58942
|
target.dropdownListModel.setChoicesLazyLoadEnabled(newValue);
|
58841
58943
|
}
|
58842
58944
|
}
|
@@ -60206,10 +60308,18 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
|
|
60206
60308
|
var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
60207
60309
|
question_comment_extends(QuestionCommentModel, _super);
|
60208
60310
|
function QuestionCommentModel(name) {
|
60209
|
-
|
60210
|
-
_this_1.textAreaModel = new text_area_TextAreaModel(_this_1.getTextAreaOptions());
|
60211
|
-
return _this_1;
|
60311
|
+
return _super.call(this, name) || this;
|
60212
60312
|
}
|
60313
|
+
Object.defineProperty(QuestionCommentModel.prototype, "textAreaModel", {
|
60314
|
+
get: function () {
|
60315
|
+
if (!this.textAreaModelValue) {
|
60316
|
+
this.textAreaModelValue = new text_area_TextAreaModel(this.getTextAreaOptions());
|
60317
|
+
}
|
60318
|
+
return this.textAreaModelValue;
|
60319
|
+
},
|
60320
|
+
enumerable: false,
|
60321
|
+
configurable: true
|
60322
|
+
});
|
60213
60323
|
QuestionCommentModel.prototype.getTextAreaOptions = function () {
|
60214
60324
|
var _this_1 = this;
|
60215
60325
|
var _this = this;
|
@@ -61422,7 +61532,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
61422
61532
|
};
|
61423
61533
|
QuestionFileModel.prototype.updateCurrentMode = function () {
|
61424
61534
|
var _this = this;
|
61425
|
-
if (!this.isDesignMode) {
|
61535
|
+
if (!this.isDesignMode && this.survey) {
|
61426
61536
|
if (this.sourceType !== "file") {
|
61427
61537
|
this.camera.hasCamera(function (res) {
|
61428
61538
|
_this.setPropertyValue("currentMode", res && _this.isDefaultV2Theme ? _this.sourceType : "file");
|
@@ -61637,9 +61747,12 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
|
|
61637
61747
|
};
|
61638
61748
|
QuestionFileModel.prototype.loadPreview = function (newValue) {
|
61639
61749
|
var _this = this;
|
61750
|
+
if (this.showPreview && this.prevLoadedPreviewValue === newValue)
|
61751
|
+
return;
|
61640
61752
|
this.previewValue.splice(0, this.previewValue.length);
|
61641
61753
|
if (!this.showPreview || !newValue)
|
61642
61754
|
return;
|
61755
|
+
this.prevLoadedPreviewValue = newValue;
|
61643
61756
|
var newValues = Array.isArray(newValue)
|
61644
61757
|
? newValue
|
61645
61758
|
: !!newValue
|
@@ -63265,7 +63378,8 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63265
63378
|
};
|
63266
63379
|
QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
|
63267
63380
|
if (!this.dropdownListModelValue) {
|
63268
|
-
this.
|
63381
|
+
this.dropdownListModelValue = new dropdownListModel_DropdownListModel(this);
|
63382
|
+
this.ariaExpanded = "false";
|
63269
63383
|
}
|
63270
63384
|
};
|
63271
63385
|
QuestionRatingModel.prototype.getCompactRenderAs = function () {
|
@@ -63283,6 +63397,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63283
63397
|
},
|
63284
63398
|
set: function (val) {
|
63285
63399
|
this.dropdownListModelValue = val;
|
63400
|
+
this.ariaExpanded = !!val ? "false" : undefined;
|
63286
63401
|
this.updateElementCss();
|
63287
63402
|
},
|
63288
63403
|
enumerable: false,
|
@@ -63295,17 +63410,12 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63295
63410
|
};
|
63296
63411
|
QuestionRatingModel.prototype.updateCssClasses = function (res, css) {
|
63297
63412
|
_super.prototype.updateCssClasses.call(this, res, css);
|
63298
|
-
|
63299
|
-
var listCssClasses = {};
|
63300
|
-
mergeValues(css.list, listCssClasses);
|
63301
|
-
mergeValues(res.list, listCssClasses);
|
63302
|
-
res["list"] = listCssClasses;
|
63303
|
-
}
|
63413
|
+
updateListCssValues(res, css);
|
63304
63414
|
};
|
63305
63415
|
QuestionRatingModel.prototype.calcCssClasses = function (css) {
|
63306
63416
|
var classes = _super.prototype.calcCssClasses.call(this, css);
|
63307
|
-
if (this.
|
63308
|
-
this.
|
63417
|
+
if (this.dropdownListModelValue) {
|
63418
|
+
this.dropdownListModelValue.updateCssClasses(classes.popup, classes.list);
|
63309
63419
|
}
|
63310
63420
|
return classes;
|
63311
63421
|
};
|
@@ -63325,6 +63435,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63325
63435
|
_super.prototype.dispose.call(this);
|
63326
63436
|
if (!!this.dropdownListModelValue) {
|
63327
63437
|
this.dropdownListModelValue.dispose();
|
63438
|
+
this.dropdownListModelValue = undefined;
|
63328
63439
|
}
|
63329
63440
|
};
|
63330
63441
|
QuestionRatingModel.colorsCalculated = false;
|
@@ -68183,8 +68294,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68183
68294
|
enumerable: false,
|
68184
68295
|
configurable: true
|
68185
68296
|
});
|
68186
|
-
QuestionPanelDynamicModel.prototype.
|
68187
|
-
_super.prototype.
|
68297
|
+
QuestionPanelDynamicModel.prototype.onFirstRenderingCore = function () {
|
68298
|
+
_super.prototype.onFirstRenderingCore.call(this);
|
68188
68299
|
this.buildPanelsFirstTime();
|
68189
68300
|
this.template.onFirstRendering();
|
68190
68301
|
for (var i = 0; i < this.panelsCore.length; i++) {
|
@@ -68471,12 +68582,14 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68471
68582
|
if (!this.isDesignMode && !this.isReadOnly && !this.isValueEmpty(panel.getValue())) {
|
68472
68583
|
this.runPanelsCondition([panel], this.getDataFilteredValues(), this.getDataFilteredProperties());
|
68473
68584
|
}
|
68474
|
-
panel.onFirstRendering();
|
68475
68585
|
var questions = panel.questions;
|
68476
68586
|
for (var i = 0; i < questions.length; i++) {
|
68477
68587
|
questions[i].setParentQuestion(this);
|
68478
68588
|
}
|
68479
|
-
|
68589
|
+
if (this.wasRendered) {
|
68590
|
+
panel.onFirstRendering();
|
68591
|
+
panel.locStrsChanged();
|
68592
|
+
}
|
68480
68593
|
panel.onGetFooterActionsCallback = function () {
|
68481
68594
|
return _this.getPanelActions(panel);
|
68482
68595
|
};
|
@@ -68572,7 +68685,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68572
68685
|
};
|
68573
68686
|
QuestionPanelDynamicModel.prototype.onSetData = function () {
|
68574
68687
|
_super.prototype.onSetData.call(this);
|
68575
|
-
if (this.useTemplatePanel) {
|
68688
|
+
if (!this.isLoadingFromJson && this.useTemplatePanel) {
|
68576
68689
|
this.setTemplatePanelSurveyImpl();
|
68577
68690
|
this.rebuildPanels();
|
68578
68691
|
}
|
@@ -72031,8 +72144,8 @@ Serializer.addClass("currencymask", [
|
|
72031
72144
|
|
72032
72145
|
var Version;
|
72033
72146
|
var ReleaseDate;
|
72034
|
-
Version = "" + "1.12.
|
72035
|
-
ReleaseDate = "" + "2024-12-
|
72147
|
+
Version = "" + "1.12.14";
|
72148
|
+
ReleaseDate = "" + "2024-12-09";
|
72036
72149
|
function checkLibraryVersion(ver, libraryName) {
|
72037
72150
|
if (Version != ver) {
|
72038
72151
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -90425,7 +90538,7 @@ var list_item_content_ListItemContent = /** @class */ (function (_super) {
|
|
90425
90538
|
content.push(text);
|
90426
90539
|
}
|
90427
90540
|
if (this.item.markerIconName) {
|
90428
|
-
var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size:
|
90541
|
+
var icon = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: "auto" });
|
90429
90542
|
content.push(icon);
|
90430
90543
|
}
|
90431
90544
|
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, content);
|