survey-react 1.9.114 → 1.9.115
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 +113 -24
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +67 -5
- package/survey.react.js +331 -120
- 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.9.
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.115
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -1062,6 +1062,8 @@ var Action = /** @class */ (function (_super) {
|
|
1062
1062
|
this._enabled = val;
|
1063
1063
|
};
|
1064
1064
|
Action.prototype.getEnabled = function () {
|
1065
|
+
if (this.enabledIf)
|
1066
|
+
return this.enabledIf();
|
1065
1067
|
return this._enabled;
|
1066
1068
|
};
|
1067
1069
|
Action.prototype.setComponent = function (val) {
|
@@ -5592,6 +5594,7 @@ var defaultV2Css = {
|
|
5592
5594
|
root: "sd-input sd-text",
|
5593
5595
|
small: "sd-row__question--small",
|
5594
5596
|
controlDisabled: "sd-input--disabled",
|
5597
|
+
constrolWithCharacterCounter: "sd-text__character-counter",
|
5595
5598
|
content: "sd-text__content sd-question__content",
|
5596
5599
|
remainingCharacterCounter: "sd-remaining-character-counter",
|
5597
5600
|
onError: "sd-input--error"
|
@@ -5603,6 +5606,7 @@ var defaultV2Css = {
|
|
5603
5606
|
itemLabelOnError: "sd-multipletext__item-container--error",
|
5604
5607
|
itemLabelAllowFocus: "sd-multipletext__item-container--allow-focus",
|
5605
5608
|
itemLabelAnswered: "sd-multipletext__item-container--answered",
|
5609
|
+
itemWithCharacterCounter: "sd-multipletext-item__character-counter",
|
5606
5610
|
item: "sd-multipletext__item",
|
5607
5611
|
itemTitle: "sd-multipletext__item-title",
|
5608
5612
|
content: "sd-multipletext__content sd-question__content",
|
@@ -5700,6 +5704,7 @@ var defaultV2Css = {
|
|
5700
5704
|
rootScroll: "sd-question--scroll",
|
5701
5705
|
root: "sd-table sd-matrixdropdown",
|
5702
5706
|
noHeader: "sd-table--no-header",
|
5707
|
+
hasFooter: "sd-table--has-footer",
|
5703
5708
|
rootVerticalAlignTop: "sd-table--align-top",
|
5704
5709
|
rootVerticalAlignMiddle: "sd-table--align-middle",
|
5705
5710
|
tableWrapper: "sd-table-wrapper",
|
@@ -5710,6 +5715,9 @@ var defaultV2Css = {
|
|
5710
5715
|
errorsCellBottom: "sd-table__cell--error-bottom",
|
5711
5716
|
itemCell: "sd-table__cell--item",
|
5712
5717
|
row: "sd-table__row",
|
5718
|
+
expandedRow: "sd-table__row--expanded",
|
5719
|
+
rowHasPanel: "sd-table__row--has-panel",
|
5720
|
+
rowHasEndActions: "sd-table__row--has-end-actions",
|
5713
5721
|
headerCell: "sd-table__cell sd-table__cell--header",
|
5714
5722
|
rowTextCell: "sd-table__cell sd-table__cell--row-text",
|
5715
5723
|
columnTitleCell: "sd-table__cell--column-title",
|
@@ -5721,6 +5729,8 @@ var defaultV2Css = {
|
|
5721
5729
|
detailIconId: "icon-expanddetail",
|
5722
5730
|
detailIconExpandedId: "icon-collapsedetail",
|
5723
5731
|
detailPanelCell: "sd-table__cell--detail-panel",
|
5732
|
+
detailRowCell: "sd-table__cell--detail",
|
5733
|
+
actionsCellPrefix: "sd-table__cell-action",
|
5724
5734
|
actionsCell: "sd-table__cell sd-table__cell--actions",
|
5725
5735
|
actionsCellDrag: "sd-table__cell--drag",
|
5726
5736
|
emptyCell: "sd-table__cell--empty",
|
@@ -5734,10 +5744,14 @@ var defaultV2Css = {
|
|
5734
5744
|
empty: "sd-question--empty",
|
5735
5745
|
root: "sd-table sd-matrixdynamic",
|
5736
5746
|
noHeader: "sd-table--no-header",
|
5747
|
+
hasFooter: "sd-table--has-footer",
|
5737
5748
|
tableWrapper: "sd-table-wrapper",
|
5738
5749
|
content: "sd-matrixdynamic__content sd-question__content",
|
5739
5750
|
cell: "sd-table__cell",
|
5740
5751
|
row: "sd-table__row",
|
5752
|
+
rowHasPanel: "sd-table__row--has-panel",
|
5753
|
+
rowHasEndActions: "sd-table__row--has-end-actions",
|
5754
|
+
expandedRow: "sd-table__row--expanded",
|
5741
5755
|
itemCell: "sd-table__cell--item",
|
5742
5756
|
headerCell: "sd-table__cell sd-table__cell--header",
|
5743
5757
|
rowTextCell: "sd-table__cell sd-table__cell--row-text",
|
@@ -5752,6 +5766,8 @@ var defaultV2Css = {
|
|
5752
5766
|
detailIconId: "icon-expanddetail",
|
5753
5767
|
detailIconExpandedId: "icon-collapsedetail",
|
5754
5768
|
detailPanelCell: "sd-table__cell--detail-panel",
|
5769
|
+
detailRowCell: "sd-table__cell--detail",
|
5770
|
+
actionsCellPrefix: "sd-table__cell-action",
|
5755
5771
|
actionsCell: "sd-table__cell sd-table__cell--actions",
|
5756
5772
|
actionsCellDrag: "sd-table__cell--drag",
|
5757
5773
|
buttonAdd: "sd-matrixdynamic__add-btn",
|
@@ -5863,6 +5879,7 @@ var defaultV2Css = {
|
|
5863
5879
|
removeFileButton: "sd-context-btn--negative sd-file__remove-file-button",
|
5864
5880
|
dragAreaPlaceholder: "sd-file__drag-area-placeholder",
|
5865
5881
|
imageWrapper: "sd-file__image-wrapper",
|
5882
|
+
imageWrapperDefaultImage: "sd-file__image-wrapper--default-image",
|
5866
5883
|
single: "sd-file--single",
|
5867
5884
|
singleImage: "sd-file--single-image",
|
5868
5885
|
mobile: "sd-file--mobile",
|
@@ -6871,6 +6888,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
6871
6888
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
|
6872
6889
|
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
|
6873
6890
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings */ "./src/settings.ts");
|
6891
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
|
6892
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
6893
|
+
to[j] = from[i];
|
6894
|
+
return to;
|
6895
|
+
};
|
6874
6896
|
|
6875
6897
|
|
6876
6898
|
|
@@ -6941,11 +6963,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6941
6963
|
if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
|
6942
6964
|
_this.savedTargetNode.style.cssText = null;
|
6943
6965
|
_this.savedTargetNode && _this.savedTargetNode.parentElement.removeChild(_this.savedTargetNode);
|
6944
|
-
_this.savedTargetNodeParent.
|
6966
|
+
_this.insertNodeToParentAtIndex(_this.savedTargetNodeParent, _this.savedTargetNode, _this.savedTargetNodeIndex);
|
6945
6967
|
DragDropDOMAdapter.PreventScrolling = false;
|
6946
6968
|
}
|
6947
6969
|
_this.savedTargetNode = null;
|
6948
6970
|
_this.savedTargetNodeParent = null;
|
6971
|
+
_this.savedTargetNodeIndex = null;
|
6949
6972
|
_this.returnUserSelectBack();
|
6950
6973
|
};
|
6951
6974
|
this.drop = function () {
|
@@ -6991,6 +7014,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
6991
7014
|
_this.savedTargetNode.style.cssText =
|
6992
7015
|
"\n position: absolute;\n height: 1px!important;\n width: 1px!important;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n ";
|
6993
7016
|
_this.savedTargetNodeParent = _this.savedTargetNode.parentElement;
|
7017
|
+
_this.savedTargetNodeIndex = _this.getNodeIndexInParent(_this.savedTargetNode);
|
6994
7018
|
_this.rootElement.appendChild(_this.savedTargetNode);
|
6995
7019
|
}
|
6996
7020
|
_this.stopLongTap();
|
@@ -7148,6 +7172,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
7148
7172
|
}
|
7149
7173
|
this.doStartDrag(event, draggedElement, parentElement, draggedElementNode);
|
7150
7174
|
};
|
7175
|
+
DragDropDOMAdapter.prototype.getNodeIndexInParent = function (node) {
|
7176
|
+
return __spreadArray([], node.parentElement.childNodes).indexOf(node);
|
7177
|
+
};
|
7178
|
+
DragDropDOMAdapter.prototype.insertNodeToParentAtIndex = function (parent, node, index) {
|
7179
|
+
parent.insertBefore(node, parent.childNodes[index]);
|
7180
|
+
};
|
7151
7181
|
DragDropDOMAdapter.PreventScrolling = false;
|
7152
7182
|
return DragDropDOMAdapter;
|
7153
7183
|
}());
|
@@ -8124,7 +8154,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8124
8154
|
var _a;
|
8125
8155
|
var focusedItem = this.listModel.focusedItem;
|
8126
8156
|
if (!focusedItem && this.question.selectedItem) {
|
8127
|
-
if (_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(this.question.
|
8157
|
+
if (_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(this.question.visibleChoices, this.question.value)) {
|
8128
8158
|
this.listModel.focusedItem = this.question.selectedItem;
|
8129
8159
|
}
|
8130
8160
|
}
|
@@ -9340,8 +9370,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9340
9370
|
//import "../../modern.scss";
|
9341
9371
|
var Version;
|
9342
9372
|
var ReleaseDate;
|
9343
|
-
Version = "" + "1.9.
|
9344
|
-
ReleaseDate = "" + "2023-
|
9373
|
+
Version = "" + "1.9.115";
|
9374
|
+
ReleaseDate = "" + "2023-11-01";
|
9345
9375
|
function checkLibraryVersion(ver, libraryName) {
|
9346
9376
|
if (Version != ver) {
|
9347
9377
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -15153,6 +15183,15 @@ var UnaryOperand = /** @class */ (function (_super) {
|
|
15153
15183
|
var uOp = op;
|
15154
15184
|
return uOp.operator == this.operator && this.areOperatorsEquals(this.expression, uOp.expression);
|
15155
15185
|
};
|
15186
|
+
UnaryOperand.prototype.hasFunction = function () {
|
15187
|
+
return this.expression.hasFunction();
|
15188
|
+
};
|
15189
|
+
UnaryOperand.prototype.hasAsyncFunction = function () {
|
15190
|
+
return this.expression.hasAsyncFunction();
|
15191
|
+
};
|
15192
|
+
UnaryOperand.prototype.addToAsyncList = function (list) {
|
15193
|
+
this.expression.addToAsyncList(list);
|
15194
|
+
};
|
15156
15195
|
UnaryOperand.prototype.evaluate = function (processValue) {
|
15157
15196
|
var value = this.expression.evaluate(processValue);
|
15158
15197
|
return this.consumer.call(this, value);
|
@@ -18383,7 +18422,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
|
|
18383
18422
|
/*!***************************!*\
|
18384
18423
|
!*** ./src/jsonobject.ts ***!
|
18385
18424
|
\***************************/
|
18386
|
-
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonObject, Serializer */
|
18425
|
+
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
|
18387
18426
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
18388
18427
|
|
18389
18428
|
"use strict";
|
@@ -18400,6 +18439,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
18400
18439
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return JsonMissingTypeError; });
|
18401
18440
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
|
18402
18441
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
|
18442
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
|
18403
18443
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
|
18404
18444
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
|
18405
18445
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
@@ -19299,6 +19339,10 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
19299
19339
|
}
|
19300
19340
|
if (propInfo.baseClassName) {
|
19301
19341
|
prop.baseClassName = propInfo.baseClassName;
|
19342
|
+
prop.isArray = true;
|
19343
|
+
}
|
19344
|
+
if (prop.isArray === true) {
|
19345
|
+
prop.isArray = true;
|
19302
19346
|
}
|
19303
19347
|
if (propInfo.classNamePart) {
|
19304
19348
|
prop.classNamePart = propInfo.classNamePart;
|
@@ -19942,6 +19986,17 @@ var JsonRequiredPropertyError = /** @class */ (function (_super) {
|
|
19942
19986
|
return JsonRequiredPropertyError;
|
19943
19987
|
}(JsonError));
|
19944
19988
|
|
19989
|
+
var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
|
19990
|
+
__extends(JsonRequiredArrayPropertyError, _super);
|
19991
|
+
function JsonRequiredArrayPropertyError(propertyName, className) {
|
19992
|
+
var _this = _super.call(this, "arrayproperty", "The property '" + propertyName + "' should be an array in '" + className + "'.") || this;
|
19993
|
+
_this.propertyName = propertyName;
|
19994
|
+
_this.className = className;
|
19995
|
+
return _this;
|
19996
|
+
}
|
19997
|
+
return JsonRequiredArrayPropertyError;
|
19998
|
+
}(JsonError));
|
19999
|
+
|
19945
20000
|
var JsonObject = /** @class */ (function () {
|
19946
20001
|
function JsonObject() {
|
19947
20002
|
this.errors = new Array();
|
@@ -19997,7 +20052,7 @@ var JsonObject = /** @class */ (function () {
|
|
19997
20052
|
}
|
19998
20053
|
continue;
|
19999
20054
|
}
|
20000
|
-
this.valueToObj(jsonObj[key], obj, property);
|
20055
|
+
this.valueToObj(jsonObj[key], obj, property, jsonObj);
|
20001
20056
|
}
|
20002
20057
|
if (obj.endLoadingFromJson) {
|
20003
20058
|
obj.endLoadingFromJson();
|
@@ -20071,7 +20126,7 @@ var JsonObject = /** @class */ (function () {
|
|
20071
20126
|
}
|
20072
20127
|
}
|
20073
20128
|
};
|
20074
|
-
JsonObject.prototype.valueToObj = function (value, obj, property) {
|
20129
|
+
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
|
20075
20130
|
if (value === null || value === undefined)
|
20076
20131
|
return;
|
20077
20132
|
this.removePos(property, value);
|
@@ -20079,6 +20134,11 @@ var JsonObject = /** @class */ (function () {
|
|
20079
20134
|
property.setValue(obj, value, this);
|
20080
20135
|
return;
|
20081
20136
|
}
|
20137
|
+
if (property.isArray && !Array.isArray(value) && !!value) {
|
20138
|
+
value = [value];
|
20139
|
+
var propName = !!jsonObj && property.alternativeName && !!jsonObj[property.alternativeName] ? property.alternativeName : property.name;
|
20140
|
+
this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
|
20141
|
+
}
|
20082
20142
|
if (this.isValueArray(value)) {
|
20083
20143
|
this.valueToArray(value, obj, property.name, property);
|
20084
20144
|
return;
|
@@ -22452,6 +22512,8 @@ var englishStrings = {
|
|
22452
22512
|
emptyRowsText: "There are no rows.",
|
22453
22513
|
addPanel: "Add new",
|
22454
22514
|
removePanel: "Remove",
|
22515
|
+
showDetails: "Show Details",
|
22516
|
+
hideDetails: "Hide Details",
|
22455
22517
|
choices_Item: "item",
|
22456
22518
|
matrix_column: "Column",
|
22457
22519
|
matrix_row: "Row",
|
@@ -28287,9 +28349,11 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
28287
28349
|
return true;
|
28288
28350
|
};
|
28289
28351
|
QuestionMatrixBaseModel.prototype.getTableCss = function () {
|
28352
|
+
var _a;
|
28290
28353
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
28291
28354
|
.append(this.cssClasses.root)
|
28292
28355
|
.append(this.cssClasses.noHeader, !this.showHeader)
|
28356
|
+
.append(this.cssClasses.hasFooter, !!((_a = this.renderedTable) === null || _a === void 0 ? void 0 : _a.showAddRowOnBottom))
|
28293
28357
|
.append(this.cssClasses.rootAlternateRows, this.alternateRows)
|
28294
28358
|
.append(this.cssClasses.rootVerticalAlignTop, (this.verticalAlign === "top"))
|
28295
28359
|
.append(this.cssClasses.rootVerticalAlignMiddle, (this.verticalAlign === "middle")).toString();
|
@@ -28301,7 +28365,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
28301
28365
|
* @see width
|
28302
28366
|
*/
|
28303
28367
|
get: function () {
|
28304
|
-
return this.getPropertyValue("columnMinWidth"
|
28368
|
+
return this.getPropertyValue("columnMinWidth") || "";
|
28305
28369
|
},
|
28306
28370
|
set: function (val) {
|
28307
28371
|
this.setPropertyValue("columnMinWidth", val);
|
@@ -28314,7 +28378,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
28314
28378
|
* A width for the column that displays row titles (first column). Accepts CSS values.
|
28315
28379
|
*/
|
28316
28380
|
get: function () {
|
28317
|
-
return this.getPropertyValue("rowTitleWidth"
|
28381
|
+
return this.getPropertyValue("rowTitleWidth") || "";
|
28318
28382
|
},
|
28319
28383
|
set: function (val) {
|
28320
28384
|
this.setPropertyValue("rowTitleWidth", val);
|
@@ -35700,7 +35764,7 @@ var Question = /** @class */ (function (_super) {
|
|
35700
35764
|
if (!!this.comment) {
|
35701
35765
|
this.comment = undefined;
|
35702
35766
|
}
|
35703
|
-
this.
|
35767
|
+
this.setValueChangedDirectly(false);
|
35704
35768
|
};
|
35705
35769
|
Question.prototype.unbindValue = function () {
|
35706
35770
|
this.clearValue();
|
@@ -35764,7 +35828,7 @@ var Question = /** @class */ (function (_super) {
|
|
35764
35828
|
Question.prototype.clearValueIfInvisibleCore = function (reason) {
|
35765
35829
|
if (this.canClearValueAsInvisible(reason)) {
|
35766
35830
|
this.clearValue();
|
35767
|
-
this.
|
35831
|
+
this.setValueChangedDirectly(undefined);
|
35768
35832
|
}
|
35769
35833
|
};
|
35770
35834
|
Object.defineProperty(Question.prototype, "clearIfInvisible", {
|
@@ -36116,13 +36180,16 @@ var Question = /** @class */ (function (_super) {
|
|
36116
36180
|
};
|
36117
36181
|
Question.prototype.setDefaultValue = function () {
|
36118
36182
|
var _this = this;
|
36119
|
-
this.
|
36120
|
-
this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) {
|
36183
|
+
this.setDefaultValueCore(function (val) {
|
36121
36184
|
if (!_this.isTwoValueEquals(_this.value, val)) {
|
36122
36185
|
_this.value = val;
|
36123
36186
|
}
|
36124
36187
|
});
|
36125
36188
|
};
|
36189
|
+
Question.prototype.setDefaultValueCore = function (func) {
|
36190
|
+
this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
|
36191
|
+
this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) { return func(val); });
|
36192
|
+
};
|
36126
36193
|
Question.prototype.isValueExpression = function (val) {
|
36127
36194
|
return !!val && typeof val == "string" && val.length > 0 && val[0] == "=";
|
36128
36195
|
};
|
@@ -36563,31 +36630,46 @@ var Question = /** @class */ (function (_super) {
|
|
36563
36630
|
};
|
36564
36631
|
//IQuestion
|
36565
36632
|
Question.prototype.updateValueFromSurvey = function (newValue) {
|
36633
|
+
var _this = this;
|
36566
36634
|
newValue = this.getUnbindValue(newValue);
|
36567
36635
|
if (!!this.valueFromDataCallback) {
|
36568
36636
|
newValue = this.valueFromDataCallback(newValue);
|
36569
36637
|
}
|
36570
36638
|
if (!this.checkIsValueCorrect(newValue))
|
36571
36639
|
return;
|
36572
|
-
|
36573
|
-
|
36574
|
-
|
36640
|
+
var isEmpty = this.isValueEmpty(newValue);
|
36641
|
+
if (!isEmpty && this.defaultValueExpression) {
|
36642
|
+
this.setDefaultValueCore(function (val) {
|
36643
|
+
_this.updateValueFromSurveyCore(newValue, _this.isTwoValueEquals(newValue, val));
|
36644
|
+
});
|
36645
|
+
}
|
36646
|
+
else {
|
36647
|
+
this.updateValueFromSurveyCore(newValue, isEmpty);
|
36648
|
+
}
|
36575
36649
|
this.updateDependedQuestions();
|
36576
36650
|
this.updateIsAnswered();
|
36577
36651
|
};
|
36652
|
+
Question.prototype.updateValueFromSurveyCore = function (newValue, viaDefaultVal) {
|
36653
|
+
this.isChangingViaDefaultValue = viaDefaultVal;
|
36654
|
+
this.setQuestionValue(this.valueFromData(newValue));
|
36655
|
+
this.isChangingViaDefaultValue = false;
|
36656
|
+
};
|
36578
36657
|
Question.prototype.updateCommentFromSurvey = function (newValue) {
|
36579
36658
|
this.questionComment = newValue;
|
36580
36659
|
};
|
36581
36660
|
Question.prototype.onChangeQuestionValue = function (newValue) { };
|
36582
|
-
Question.prototype.setValueChangedDirectly = function () {
|
36583
|
-
this.isValueChangedDirectly =
|
36661
|
+
Question.prototype.setValueChangedDirectly = function (val) {
|
36662
|
+
this.isValueChangedDirectly = val;
|
36663
|
+
if (!!this.setValueChangedDirectlyCallback) {
|
36664
|
+
this.setValueChangedDirectlyCallback(val);
|
36665
|
+
}
|
36584
36666
|
};
|
36585
36667
|
Question.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
|
36586
36668
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
36587
36669
|
newValue = this.convertToCorrectValue(newValue);
|
36588
36670
|
var isEqual = this.isTwoValueEquals(this.questionValue, newValue);
|
36589
36671
|
if (!isEqual && !this.isChangingViaDefaultValue) {
|
36590
|
-
this.setValueChangedDirectly();
|
36672
|
+
this.setValueChangedDirectly(true);
|
36591
36673
|
}
|
36592
36674
|
this.questionValue = newValue;
|
36593
36675
|
if (!isEqual) {
|
@@ -40919,7 +41001,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
40919
41001
|
* @see autoGrow
|
40920
41002
|
*/
|
40921
41003
|
get: function () {
|
40922
|
-
return this.getPropertyValue("allowResize")
|
41004
|
+
return this.getPropertyValue("allowResize");
|
40923
41005
|
},
|
40924
41006
|
set: function (val) {
|
40925
41007
|
this.setPropertyValue("allowResize", val);
|
@@ -40927,9 +41009,16 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
40927
41009
|
enumerable: false,
|
40928
41010
|
configurable: true
|
40929
41011
|
});
|
41012
|
+
Object.defineProperty(QuestionCommentModel.prototype, "renderedAllowResize", {
|
41013
|
+
get: function () {
|
41014
|
+
return this.allowResize && (this.survey && this.survey.allowResizeComment);
|
41015
|
+
},
|
41016
|
+
enumerable: false,
|
41017
|
+
configurable: true
|
41018
|
+
});
|
40930
41019
|
Object.defineProperty(QuestionCommentModel.prototype, "resizeStyle", {
|
40931
41020
|
get: function () {
|
40932
|
-
return this.
|
41021
|
+
return this.renderedAllowResize ? "both" : "none";
|
40933
41022
|
},
|
40934
41023
|
enumerable: false,
|
40935
41024
|
configurable: true
|
@@ -41530,6 +41619,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
41530
41619
|
_this.onUpdateQuestionCssClasses(res, css);
|
41531
41620
|
};
|
41532
41621
|
res.hasCssErrorCallback = function () { return _this.errors.length > 0; };
|
41622
|
+
res.setValueChangedDirectlyCallback = function (val) { _this.setValueChangedDirectly(val); };
|
41533
41623
|
}
|
41534
41624
|
return res;
|
41535
41625
|
};
|
@@ -41597,6 +41687,16 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
41597
41687
|
return this.getContentQuestionValue();
|
41598
41688
|
return _super.prototype.getValueCore.call(this);
|
41599
41689
|
};
|
41690
|
+
QuestionCustomModel.prototype.setValueChangedDirectly = function (val) {
|
41691
|
+
if (this.isSettingValueChanged)
|
41692
|
+
return;
|
41693
|
+
this.isSettingValueChanged = true;
|
41694
|
+
_super.prototype.setValueChangedDirectly.call(this, val);
|
41695
|
+
if (!!this.contentQuestion) {
|
41696
|
+
this.contentQuestion.setValueChangedDirectly(val);
|
41697
|
+
}
|
41698
|
+
this.isSettingValueChanged = false;
|
41699
|
+
};
|
41600
41700
|
QuestionCustomModel.prototype.initElement = function (el) {
|
41601
41701
|
var _this = this;
|
41602
41702
|
_super.prototype.initElement.call(this, el);
|
@@ -43037,6 +43137,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
43037
43137
|
|
43038
43138
|
|
43039
43139
|
|
43140
|
+
|
43040
43141
|
/**
|
43041
43142
|
* A class that describes the File Upload question type.
|
43042
43143
|
*
|
@@ -43184,6 +43285,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43184
43285
|
iconSize: "auto",
|
43185
43286
|
title: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.takePhotoCaption; }),
|
43186
43287
|
showTitle: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return !_this.isAnswered; }),
|
43288
|
+
enabledIf: function () { return !_this.isInputReadOnly; },
|
43187
43289
|
action: function () {
|
43188
43290
|
_this.startVideo();
|
43189
43291
|
}
|
@@ -43194,6 +43296,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43194
43296
|
iconSize: "auto",
|
43195
43297
|
title: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.clearButtonCaption; }),
|
43196
43298
|
showTitle: false,
|
43299
|
+
enabledIf: function () { return !_this.isInputReadOnly; },
|
43197
43300
|
innerCss: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.cssClasses.removeButton; }),
|
43198
43301
|
action: function () {
|
43199
43302
|
_this.doClean();
|
@@ -43202,10 +43305,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43202
43305
|
[_this.closeCameraAction, _this.changeCameraAction, _this.takePictureAction].forEach(function (action) {
|
43203
43306
|
action.cssClasses = {};
|
43204
43307
|
});
|
43205
|
-
_this.registerFunctionOnPropertiesValueChanged(["currentMode", "isAnswered"], function () {
|
43206
|
-
_this.
|
43308
|
+
_this.registerFunctionOnPropertiesValueChanged(["sourceType", "currentMode", "isAnswered"], function () {
|
43309
|
+
_this.updateActionsVisibility();
|
43207
43310
|
});
|
43208
|
-
_this.updateActions();
|
43209
43311
|
_this.actionsContainer.actions = [_this.chooseFileAction, _this.startCameraAction, _this.cleanAction];
|
43210
43312
|
_this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
|
43211
43313
|
return _this;
|
@@ -43233,8 +43335,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43233
43335
|
var isUploading = this.isUploading;
|
43234
43336
|
var isPlayingVideo = this.isPlayingVideo;
|
43235
43337
|
var isDefaultV2Theme = this.isDefaultV2Theme;
|
43236
|
-
|
43237
|
-
return !isUploading && !isPlayingVideo && !isReadOnly && isDefaultV2Theme;
|
43338
|
+
return !isUploading && !isPlayingVideo && isDefaultV2Theme;
|
43238
43339
|
},
|
43239
43340
|
enumerable: false,
|
43240
43341
|
configurable: true
|
@@ -43270,7 +43371,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43270
43371
|
if (!stream) {
|
43271
43372
|
_this.stopVideo();
|
43272
43373
|
}
|
43273
|
-
}, this.imageWidth, this.imageHeight);
|
43374
|
+
}, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["getRenderedSize"])(this.imageWidth), Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["getRenderedSize"])(this.imageHeight));
|
43274
43375
|
};
|
43275
43376
|
QuestionFileModel.prototype.stopVideo = function () {
|
43276
43377
|
this.setIsPlayingVideo(false);
|
@@ -43576,9 +43677,10 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43576
43677
|
}
|
43577
43678
|
}
|
43578
43679
|
};
|
43579
|
-
QuestionFileModel.prototype.
|
43580
|
-
|
43581
|
-
this.
|
43680
|
+
QuestionFileModel.prototype.updateActionsVisibility = function () {
|
43681
|
+
var isDesignMode = this.isDesignMode;
|
43682
|
+
this.chooseFileAction.visible = (!isDesignMode && this.hasFileUI) || (isDesignMode && this.sourceType !== "camera");
|
43683
|
+
this.startCameraAction.visible = (!isDesignMode && this.hasVideoUI) || (isDesignMode && this.sourceType !== "file");
|
43582
43684
|
this.cleanAction.visible = !!this.isAnswered;
|
43583
43685
|
};
|
43584
43686
|
Object.defineProperty(QuestionFileModel.prototype, "inputTitle", {
|
@@ -43908,6 +44010,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43908
44010
|
}
|
43909
44011
|
return questionPlainData;
|
43910
44012
|
};
|
44013
|
+
QuestionFileModel.prototype.getImageWrapperCss = function (data) {
|
44014
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.cssClasses.imageWrapper).append(this.cssClasses.imageWrapperDefaultImage, this.defaultImage(data)).toString();
|
44015
|
+
};
|
43911
44016
|
QuestionFileModel.prototype.getActionsContainerCss = function (css) {
|
43912
44017
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
43913
44018
|
.append(css.actionsContainer)
|
@@ -43995,7 +44100,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
43995
44100
|
QuestionFileModel.prototype.endLoadingFromJson = function () {
|
43996
44101
|
_super.prototype.endLoadingFromJson.call(this);
|
43997
44102
|
this.updateCurrentMode();
|
43998
|
-
this.
|
44103
|
+
this.updateActionsVisibility();
|
43999
44104
|
this.loadPreview(this.value);
|
44000
44105
|
};
|
44001
44106
|
QuestionFileModel.prototype.needResponsiveness = function () {
|
@@ -44752,6 +44857,8 @@ var ImageItemValue = /** @class */ (function (_super) {
|
|
44752
44857
|
},
|
44753
44858
|
set: function (val) {
|
44754
44859
|
this.setLocalizableStringText("imageLink", val);
|
44860
|
+
this.imageNotLoaded = false;
|
44861
|
+
this.videoNotLoaded = false;
|
44755
44862
|
},
|
44756
44863
|
enumerable: false,
|
44757
44864
|
configurable: true
|
@@ -47416,7 +47523,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
47416
47523
|
};
|
47417
47524
|
QuestionMatrixDropdownModelBase.prototype.onStartRowAddingRemoving = function () {
|
47418
47525
|
this.lockResetRenderedTable = true;
|
47419
|
-
this.setValueChangedDirectly();
|
47526
|
+
this.setValueChangedDirectly(true);
|
47420
47527
|
};
|
47421
47528
|
QuestionMatrixDropdownModelBase.prototype.onEndRowAdding = function () {
|
47422
47529
|
this.lockResetRenderedTable = false;
|
@@ -48825,7 +48932,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
48825
48932
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownbase", [
|
48826
48933
|
{
|
48827
48934
|
name: "columns:matrixdropdowncolumns",
|
48828
|
-
className: "matrixdropdowncolumn",
|
48935
|
+
className: "matrixdropdowncolumn", isArray: true
|
48829
48936
|
},
|
48830
48937
|
{
|
48831
48938
|
name: "columnLayout",
|
@@ -49881,6 +49988,7 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
49881
49988
|
this.isActionsCell = false;
|
49882
49989
|
this.isErrorsCell = false;
|
49883
49990
|
this.isDragHandlerCell = false;
|
49991
|
+
this.isDetailRowCell = false;
|
49884
49992
|
this.classNameValue = "";
|
49885
49993
|
this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
|
49886
49994
|
}
|
@@ -50041,6 +50149,7 @@ var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
|
|
50041
50149
|
var _this = _super.call(this) || this;
|
50042
50150
|
_this.cssClasses = cssClasses;
|
50043
50151
|
_this.isDetailRow = isDetailRow;
|
50152
|
+
_this.hasEndActions = false;
|
50044
50153
|
_this.isErrorsRow = false;
|
50045
50154
|
_this.cells = [];
|
50046
50155
|
_this.idValue = QuestionMatrixDropdownRenderedRow.counter++;
|
@@ -50064,9 +50173,13 @@ var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
|
|
50064
50173
|
});
|
50065
50174
|
Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "className", {
|
50066
50175
|
get: function () {
|
50176
|
+
var _a, _b;
|
50067
50177
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
50068
50178
|
.append(this.cssClasses.row)
|
50069
50179
|
.append(this.cssClasses.detailRow, this.isDetailRow)
|
50180
|
+
.append(this.cssClasses.rowHasPanel, (_a = this.row) === null || _a === void 0 ? void 0 : _a.hasPanel)
|
50181
|
+
.append(this.cssClasses.expandedRow, ((_b = this.row) === null || _b === void 0 ? void 0 : _b.isDetailPanelShowing) && !this.isDetailRow)
|
50182
|
+
.append(this.cssClasses.rowHasEndActions, this.hasEndActions)
|
50070
50183
|
.append(this.cssClasses.ghostRow, this.isGhostRow)
|
50071
50184
|
.append(this.cssClasses.rowAdditional, this.isAdditionalClasses)
|
50072
50185
|
.toString();
|
@@ -50419,7 +50532,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50419
50532
|
this.footerRow.cells.push(this.createHeaderCell(null));
|
50420
50533
|
}
|
50421
50534
|
if (this.hasActionCellInRows("start")) {
|
50422
|
-
this.footerRow.cells.push(this.createHeaderCell(null));
|
50535
|
+
this.footerRow.cells.push(this.createHeaderCell(null, "action"));
|
50423
50536
|
}
|
50424
50537
|
if (this.matrix.hasRowText) {
|
50425
50538
|
this.footerRow.cells.push(this.createTextCell(this.matrix.getFooterText()));
|
@@ -50441,7 +50554,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50441
50554
|
}
|
50442
50555
|
}
|
50443
50556
|
if (this.hasActionCellInRows("end")) {
|
50444
|
-
this.footerRow.cells.push(this.createHeaderCell(null));
|
50557
|
+
this.footerRow.cells.push(this.createHeaderCell(null, "action"));
|
50445
50558
|
}
|
50446
50559
|
};
|
50447
50560
|
QuestionMatrixDropdownRenderedTable.prototype.buildRows = function () {
|
@@ -50511,10 +50624,25 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50511
50624
|
return cell;
|
50512
50625
|
};
|
50513
50626
|
QuestionMatrixDropdownRenderedTable.prototype.getActionsCellClassName = function (cell) {
|
50627
|
+
var _this = this;
|
50514
50628
|
if (cell === void 0) { cell = null; }
|
50515
|
-
|
50629
|
+
var classBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
50630
|
+
.append(this.cssClasses.actionsCell)
|
50631
|
+
.append(this.cssClasses.actionsCellDrag, cell === null || cell === void 0 ? void 0 : cell.isDragHandlerCell)
|
50632
|
+
.append(this.cssClasses.detailRowCell, cell === null || cell === void 0 ? void 0 : cell.isDetailRowCell)
|
50633
|
+
.append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal);
|
50634
|
+
if (cell.isActionsCell) {
|
50635
|
+
var actions = cell.item.value.actions;
|
50636
|
+
if (this.cssClasses.actionsCellPrefix) {
|
50637
|
+
actions.forEach(function (action) {
|
50638
|
+
classBuilder.append(_this.cssClasses.actionsCellPrefix + "--" + action.id);
|
50639
|
+
});
|
50640
|
+
}
|
50641
|
+
}
|
50642
|
+
return classBuilder.toString();
|
50516
50643
|
};
|
50517
|
-
QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location) {
|
50644
|
+
QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location, isDetailRow) {
|
50645
|
+
if (isDetailRow === void 0) { isDetailRow = false; }
|
50518
50646
|
var rowActions = this.getRowActions(rowIndex, location);
|
50519
50647
|
if (!this.isValueEmpty(rowActions)) {
|
50520
50648
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
@@ -50527,6 +50655,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50527
50655
|
cell.item = itemValue;
|
50528
50656
|
cell.isActionsCell = true;
|
50529
50657
|
cell.isDragHandlerCell = false;
|
50658
|
+
cell.isDetailRowCell = isDetailRow;
|
50530
50659
|
cell.className = this.getActionsCellClassName(cell);
|
50531
50660
|
cell.row = this.matrix.visibleRows[rowIndex];
|
50532
50661
|
return cell;
|
@@ -50560,6 +50689,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50560
50689
|
configurable: true
|
50561
50690
|
});
|
50562
50691
|
QuestionMatrixDropdownRenderedTable.prototype.setDefaultRowActions = function (row, actions) {
|
50692
|
+
var _this = this;
|
50563
50693
|
var matrix = this.matrix;
|
50564
50694
|
if (this.hasRemoveRows && this.canRemoveRow(row)) {
|
50565
50695
|
if (!this.showRemoveButtonAsIcon) {
|
@@ -50590,14 +50720,28 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50590
50720
|
}
|
50591
50721
|
}
|
50592
50722
|
if (row.hasPanel) {
|
50593
|
-
|
50594
|
-
|
50595
|
-
|
50596
|
-
|
50597
|
-
|
50598
|
-
|
50599
|
-
|
50600
|
-
|
50723
|
+
if (this.matrix.isMobile) {
|
50724
|
+
actions.unshift(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
|
50725
|
+
id: "show-detail-mobile",
|
50726
|
+
title: "Show Details",
|
50727
|
+
showTitle: true,
|
50728
|
+
location: "end",
|
50729
|
+
action: function (context) {
|
50730
|
+
context.title = row.isDetailPanelShowing ? _this.matrix.getLocalizationString("showDetails") : _this.matrix.getLocalizationString("hideDetails");
|
50731
|
+
row.showHideDetailPanelClick();
|
50732
|
+
},
|
50733
|
+
}));
|
50734
|
+
}
|
50735
|
+
else {
|
50736
|
+
actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
|
50737
|
+
id: "show-detail",
|
50738
|
+
title: this.matrix.getLocalizationString("editText"),
|
50739
|
+
showTitle: false,
|
50740
|
+
location: "start",
|
50741
|
+
component: "sv-matrix-detail-button",
|
50742
|
+
data: { row: row, question: this.matrix },
|
50743
|
+
}));
|
50744
|
+
}
|
50601
50745
|
}
|
50602
50746
|
};
|
50603
50747
|
QuestionMatrixDropdownRenderedTable.prototype.createErrorRow = function (row) {
|
@@ -50665,13 +50809,15 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50665
50809
|
QuestionMatrixDropdownRenderedTable.prototype.addRowActionsCell = function (row, renderedRow, location) {
|
50666
50810
|
var rowIndex = this.matrix.visibleRows.indexOf(row);
|
50667
50811
|
if (this.hasActionCellInRows(location)) {
|
50668
|
-
var actions = this.getRowActionsCell(rowIndex, location);
|
50812
|
+
var actions = this.getRowActionsCell(rowIndex, location, renderedRow.isDetailRow);
|
50669
50813
|
if (!!actions) {
|
50670
50814
|
renderedRow.cells.push(actions);
|
50815
|
+
renderedRow.hasEndActions = true;
|
50671
50816
|
}
|
50672
50817
|
else {
|
50673
50818
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
50674
50819
|
cell.isEmpty = true;
|
50820
|
+
cell.isDetailRowCell = renderedRow.isDetailRow;
|
50675
50821
|
renderedRow.cells.push(cell);
|
50676
50822
|
}
|
50677
50823
|
}
|
@@ -50701,7 +50847,12 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50701
50847
|
cell.className = this.cssClasses.detailPanelCell;
|
50702
50848
|
res.cells.push(cell);
|
50703
50849
|
if (!!actionsCell) {
|
50704
|
-
|
50850
|
+
if (this.matrix.isMobile) {
|
50851
|
+
this.addRowActionsCell(row, res, "end");
|
50852
|
+
}
|
50853
|
+
else {
|
50854
|
+
res.cells.push(actionsCell);
|
50855
|
+
}
|
50705
50856
|
}
|
50706
50857
|
if (typeof this.matrix.onCreateDetailPanelRenderedRowCallback === "function") {
|
50707
50858
|
this.matrix.onCreateDetailPanelRenderedRowCallback(res);
|
@@ -52372,6 +52523,19 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
52372
52523
|
enumerable: false,
|
52373
52524
|
configurable: true
|
52374
52525
|
});
|
52526
|
+
Object.defineProperty(MultipleTextItemModel.prototype, "defaultValueExpression", {
|
52527
|
+
/**
|
52528
|
+
* An expression used to calculate the [defaultValue](https://surveyjs.io/form-library/documentation/question#defaultValue).
|
52529
|
+
*/
|
52530
|
+
get: function () {
|
52531
|
+
return this.editor.defaultValueExpression;
|
52532
|
+
},
|
52533
|
+
set: function (val) {
|
52534
|
+
this.editor.defaultValueExpression = val;
|
52535
|
+
},
|
52536
|
+
enumerable: false,
|
52537
|
+
configurable: true
|
52538
|
+
});
|
52375
52539
|
Object.defineProperty(MultipleTextItemModel.prototype, "minValueExpression", {
|
52376
52540
|
/**
|
52377
52541
|
* The minimum value specified as an expression. For example, `"minValueExpression": "today(-1)"` sets the minimum value to yesterday.
|
@@ -52985,6 +53149,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
52985
53149
|
.append(this.cssClasses.itemLabelAnswered, item.editor.isAnswered)
|
52986
53150
|
.append(this.cssClasses.itemLabelAllowFocus, !this.isDesignMode)
|
52987
53151
|
.append(this.cssClasses.itemLabelOnError, item.editor.errors.length > 0)
|
53152
|
+
.append(this.cssClasses.itemWithCharacterCounter, !!item.getMaxLength())
|
52988
53153
|
.toString();
|
52989
53154
|
};
|
52990
53155
|
QuestionMultipleTextModel.prototype.getItemCss = function () {
|
@@ -53090,6 +53255,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
53090
53255
|
name: "requiredErrorText:text",
|
53091
53256
|
serializationProperty: "locRequiredErrorText",
|
53092
53257
|
},
|
53258
|
+
{ name: "defaultValueExpression:expression", visible: false },
|
53093
53259
|
{
|
53094
53260
|
name: "minValueExpression:expression",
|
53095
53261
|
category: "logic",
|
@@ -53115,7 +53281,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
53115
53281
|
return new MultipleTextItemModel("");
|
53116
53282
|
});
|
53117
53283
|
_jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext", [
|
53118
|
-
{ name: "!items:textitems", className: "multipletextitem" },
|
53284
|
+
{ name: "!items:textitems", className: "multipletextitem", isArray: true },
|
53119
53285
|
{ name: "itemSize:number", minValue: 0 },
|
53120
53286
|
{ name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
|
53121
53287
|
{ name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false }
|
@@ -56151,14 +56317,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
56151
56317
|
get: function () {
|
56152
56318
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
56153
56319
|
.append(this.cssClasses.root)
|
56154
|
-
.append(this.cssClasses.rootMobileMod,
|
56320
|
+
.append(this.cssClasses.rootMobileMod, this.isMobileMode())
|
56155
56321
|
.append(this.cssClasses.rootDisabled, this.isReadOnly)
|
56156
56322
|
.append(this.cssClasses.rootDesignMode, !!this.isDesignMode)
|
56157
56323
|
.append(this.cssClasses.itemOnError, this.hasCssError())
|
56158
56324
|
.append(this.cssClasses.rootDragHandleAreaIcon, _src_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].rankingDragHandleArea === "icon")
|
56159
56325
|
.append(this.cssClasses.rootSelectToRankMod, this.selectToRankEnabled)
|
56160
|
-
.append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.
|
56161
|
-
.append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.
|
56326
|
+
.append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal")
|
56327
|
+
.append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "vertical")
|
56162
56328
|
.toString();
|
56163
56329
|
},
|
56164
56330
|
enumerable: false,
|
@@ -56491,9 +56657,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
56491
56657
|
* @see selectToRankAreasLayout
|
56492
56658
|
*/
|
56493
56659
|
get: function () {
|
56494
|
-
|
56495
|
-
return "vertical";
|
56496
|
-
return this.getPropertyValue("selectToRankAreasLayout", "horizontal");
|
56660
|
+
return this.getPropertyValue("selectToRankAreasLayout");
|
56497
56661
|
},
|
56498
56662
|
set: function (val) {
|
56499
56663
|
this.setPropertyValue("selectToRankAreasLayout", val);
|
@@ -56501,6 +56665,18 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
56501
56665
|
enumerable: false,
|
56502
56666
|
configurable: true
|
56503
56667
|
});
|
56668
|
+
Object.defineProperty(QuestionRankingModel.prototype, "renderedSelectToRankAreasLayout", {
|
56669
|
+
get: function () {
|
56670
|
+
if (this.isMobileMode())
|
56671
|
+
return "vertical";
|
56672
|
+
return this.selectToRankAreasLayout;
|
56673
|
+
},
|
56674
|
+
enumerable: false,
|
56675
|
+
configurable: true
|
56676
|
+
});
|
56677
|
+
QuestionRankingModel.prototype.isMobileMode = function () {
|
56678
|
+
return _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsMobile"];
|
56679
|
+
};
|
56504
56680
|
Object.defineProperty(QuestionRankingModel.prototype, "useFullItemSizeForShortcut", {
|
56505
56681
|
get: function () {
|
56506
56682
|
return this.getPropertyValue("useFullItemSizeForShortcut");
|
@@ -57714,11 +57890,12 @@ _questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.regist
|
|
57714
57890
|
/*!**************************************!*\
|
57715
57891
|
!*** ./src/question_signaturepad.ts ***!
|
57716
57892
|
\**************************************/
|
57717
|
-
/*! exports provided: QuestionSignaturePadModel */
|
57893
|
+
/*! exports provided: getCanvasRatio, QuestionSignaturePadModel */
|
57718
57894
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
57719
57895
|
|
57720
57896
|
"use strict";
|
57721
57897
|
__webpack_require__.r(__webpack_exports__);
|
57898
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCanvasRatio", function() { return getCanvasRatio; });
|
57722
57899
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return QuestionSignaturePadModel; });
|
57723
57900
|
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
57724
57901
|
/* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
|
@@ -57755,7 +57932,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
57755
57932
|
|
57756
57933
|
var defaultWidth = 300;
|
57757
57934
|
var defaultHeight = 200;
|
57758
|
-
function
|
57935
|
+
function getCanvasRatio(canvas) {
|
57759
57936
|
var context = canvas.getContext("2d");
|
57760
57937
|
var devicePixelRatio = window.devicePixelRatio || 1;
|
57761
57938
|
var backingStoreRatio = context.webkitBackingStorePixelRatio ||
|
@@ -57764,7 +57941,11 @@ function resizeCanvas(canvas) {
|
|
57764
57941
|
context.oBackingStorePixelRatio ||
|
57765
57942
|
context.backingStorePixelRatio ||
|
57766
57943
|
1;
|
57767
|
-
|
57944
|
+
return devicePixelRatio / backingStoreRatio;
|
57945
|
+
}
|
57946
|
+
function resizeCanvas(canvas) {
|
57947
|
+
var context = canvas.getContext("2d");
|
57948
|
+
var ratio = getCanvasRatio(canvas);
|
57768
57949
|
var oldWidth = canvas.width;
|
57769
57950
|
var oldHeight = canvas.height;
|
57770
57951
|
canvas.width = oldWidth * ratio;
|
@@ -58089,10 +58270,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
|
|
58089
58270
|
default: true,
|
58090
58271
|
},
|
58091
58272
|
{ name: "showPlaceholder:boolean", category: "general", default: true },
|
58092
|
-
{
|
58273
|
+
{
|
58274
|
+
name: "placeholder:text",
|
58093
58275
|
serializationProperty: "locPlaceholder",
|
58094
58276
|
category: "general",
|
58095
|
-
dependsOn: "showPlaceholder",
|
58277
|
+
dependsOn: "showPlaceholder",
|
58278
|
+
visibleIf: function (obj) { return obj.showPlaceholder; }
|
58279
|
+
},
|
58096
58280
|
{
|
58097
58281
|
name: "backgroundImage:file",
|
58098
58282
|
category: "general",
|
@@ -58353,8 +58537,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58353
58537
|
}
|
58354
58538
|
};
|
58355
58539
|
QuestionTagboxModel.prototype.clearValue = function () {
|
58540
|
+
var _a;
|
58356
58541
|
_super.prototype.clearValue.call(this);
|
58357
|
-
this.dropdownListModel.clear();
|
58542
|
+
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
|
58358
58543
|
};
|
58359
58544
|
Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
|
58360
58545
|
get: function () {
|
@@ -58967,6 +59152,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
58967
59152
|
QuestionTextModel.prototype.hasPlaceholder = function () {
|
58968
59153
|
return !this.isReadOnly && this.inputType !== "range";
|
58969
59154
|
};
|
59155
|
+
QuestionTextModel.prototype.getControlCssClassBuilder = function () {
|
59156
|
+
return _super.prototype.getControlCssClassBuilder.call(this)
|
59157
|
+
.append(this.cssClasses.constrolWithCharacterCounter, !!this.getMaxLength());
|
59158
|
+
};
|
58970
59159
|
QuestionTextModel.prototype.isReadOnlyRenderDiv = function () {
|
58971
59160
|
return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].readOnly.textRenderMode === "div";
|
58972
59161
|
};
|
@@ -59395,12 +59584,14 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
59395
59584
|
}
|
59396
59585
|
}
|
59397
59586
|
};
|
59398
|
-
QuestionTextBase.prototype.
|
59587
|
+
QuestionTextBase.prototype.getControlCssClassBuilder = function () {
|
59399
59588
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
|
59400
59589
|
.append(this.cssClasses.root)
|
59401
59590
|
.append(this.cssClasses.onError, this.hasCssError())
|
59402
|
-
.append(this.cssClasses.controlDisabled, this.isReadOnly)
|
59403
|
-
|
59591
|
+
.append(this.cssClasses.controlDisabled, this.isReadOnly);
|
59592
|
+
};
|
59593
|
+
QuestionTextBase.prototype.getControlClass = function () {
|
59594
|
+
return this.getControlCssClassBuilder().toString();
|
59404
59595
|
};
|
59405
59596
|
Object.defineProperty(QuestionTextBase.prototype, "isNewA11yStructure", {
|
59406
59597
|
//a11y
|
@@ -59630,6 +59821,20 @@ var QuestionNonValue = /** @class */ (function (_super) {
|
|
59630
59821
|
if (path === void 0) { path = null; }
|
59631
59822
|
return null;
|
59632
59823
|
};
|
59824
|
+
Object.defineProperty(QuestionNonValue.prototype, "ariaRole", {
|
59825
|
+
get: function () {
|
59826
|
+
return null;
|
59827
|
+
},
|
59828
|
+
enumerable: false,
|
59829
|
+
configurable: true
|
59830
|
+
});
|
59831
|
+
Object.defineProperty(QuestionNonValue.prototype, "ariaRequired", {
|
59832
|
+
get: function () {
|
59833
|
+
return null;
|
59834
|
+
},
|
59835
|
+
enumerable: false,
|
59836
|
+
configurable: true
|
59837
|
+
});
|
59633
59838
|
return QuestionNonValue;
|
59634
59839
|
}(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));
|
59635
59840
|
|
@@ -60465,7 +60670,7 @@ var SurveyFileChooseButton = /** @class */ (function (_super) {
|
|
60465
60670
|
configurable: true
|
60466
60671
|
});
|
60467
60672
|
SurveyFileChooseButton.prototype.render = function () {
|
60468
|
-
return Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_1__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", {
|
60673
|
+
return Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_1__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText },
|
60469
60674
|
(!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null,
|
60470
60675
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, this.question.chooseButtonText)));
|
60471
60676
|
};
|
@@ -60541,7 +60746,7 @@ var SurveyFilePreview = /** @class */ (function (_super) {
|
|
60541
60746
|
return null;
|
60542
60747
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.preview, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
|
60543
60748
|
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
60544
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.
|
60749
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
60545
60750
|
_this.question.canPreviewImage(val) ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
|
60546
60751
|
val.name && !_this.question.isReadOnly ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function () { return _this.question.doRemoveFile(val); } },
|
60547
60752
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
|
@@ -60790,7 +60995,7 @@ var ListItem = /** @class */ (function (_super) {
|
|
60790
60995
|
content.push(newElement);
|
60791
60996
|
}
|
60792
60997
|
}
|
60793
|
-
var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody }, content);
|
60998
|
+
var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText }, content);
|
60794
60999
|
var separator = this.item.needSeparator ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
|
60795
61000
|
var isVisible = this.model.isItemVisible(this.item);
|
60796
61001
|
var style = {
|
@@ -62901,7 +63106,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
62901
63106
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
62902
63107
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
62903
63108
|
valueElement,
|
62904
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
63109
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
62905
63110
|
this.createClearButton()));
|
62906
63111
|
};
|
62907
63112
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
@@ -63638,7 +63843,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
63638
63843
|
SurveyQuestionImagePicker.prototype.renderElement = function () {
|
63639
63844
|
var cssClasses = this.question.cssClasses;
|
63640
63845
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss() },
|
63641
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", {
|
63846
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
63642
63847
|
this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
|
63643
63848
|
};
|
63644
63849
|
SurveyQuestionImagePicker.prototype.getColumns = function (cssClasses) {
|
@@ -65607,7 +65812,7 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
|
|
65607
65812
|
var _this = this;
|
65608
65813
|
var cssClasses = this.question.cssClasses;
|
65609
65814
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy },
|
65610
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", {
|
65815
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
65611
65816
|
this.getHeader(),
|
65612
65817
|
this.question.hasColumns
|
65613
65818
|
? this.getColumnedBody(cssClasses)
|
@@ -65787,7 +65992,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
65787
65992
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
65788
65993
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
65789
65994
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
|
65790
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged }),
|
65995
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.value, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged }),
|
65791
65996
|
this.cssClasses.materialDecorator ?
|
65792
65997
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
65793
65998
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
@@ -66903,7 +67108,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
|
66903
67108
|
headers)));
|
66904
67109
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
|
66905
67110
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", null,
|
66906
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { "
|
67111
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
66907
67112
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getTableCss() },
|
66908
67113
|
header,
|
66909
67114
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows)))));
|
@@ -67226,8 +67431,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
67226
67431
|
matrixrow.push(this.renderCell(cells[i], i, cssClasses, reason));
|
67227
67432
|
}
|
67228
67433
|
var key = "row" + keyValue;
|
67229
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key },
|
67230
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
|
67434
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key }, (reason == "row-footer") ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null, matrixrow) : react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
|
67231
67435
|
};
|
67232
67436
|
SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses, reason) {
|
67233
67437
|
var key = "cell" + index;
|
@@ -69331,7 +69535,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
69331
69535
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
69332
69536
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
|
69333
69537
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
|
69334
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
|
69538
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
|
69335
69539
|
};
|
69336
69540
|
return TagboxFilterString;
|
69337
69541
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
@@ -79820,6 +80024,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
79820
80024
|
}
|
79821
80025
|
}
|
79822
80026
|
}
|
80027
|
+
else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
|
80028
|
+
if (this.state === "running" && layoutElement.container === container) {
|
80029
|
+
containerLayoutElements.push(layoutElement);
|
80030
|
+
}
|
80031
|
+
}
|
79823
80032
|
else {
|
79824
80033
|
if (Array.isArray(layoutElement.container) && layoutElement.container.indexOf(container) !== -1 || layoutElement.container === container) {
|
79825
80034
|
containerLayoutElements.push(layoutElement);
|
@@ -79843,15 +80052,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
79843
80052
|
return;
|
79844
80053
|
Object.keys(theme).forEach(function (key) {
|
79845
80054
|
if (key === "header") {
|
79846
|
-
_this.removeLayoutElement("
|
79847
|
-
var
|
79848
|
-
|
80055
|
+
_this.removeLayoutElement("advanced-header");
|
80056
|
+
var advHeader_1 = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
80057
|
+
advHeader_1.fromTheme(theme);
|
79849
80058
|
_this.layoutElements.push({
|
79850
|
-
id: "
|
80059
|
+
id: "advanced-header",
|
79851
80060
|
container: "header",
|
79852
80061
|
component: "sv-header",
|
79853
|
-
data:
|
79854
|
-
processResponsiveness: function (width) { return
|
80062
|
+
data: advHeader_1,
|
80063
|
+
processResponsiveness: function (width) { return advHeader_1.processResponsiveness(width); }
|
79855
80064
|
});
|
79856
80065
|
}
|
79857
80066
|
if (key === "isPanelless") {
|
@@ -79940,27 +80149,27 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
79940
80149
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
79941
80150
|
onSet: function (newValue, target) {
|
79942
80151
|
if (newValue === "advanced") {
|
79943
|
-
var layoutElement = target.layoutElements.filter(function (a) { return a.id === "
|
80152
|
+
var layoutElement = target.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
|
79944
80153
|
if (!layoutElement) {
|
79945
|
-
var
|
79946
|
-
|
79947
|
-
|
79948
|
-
|
79949
|
-
|
79950
|
-
|
79951
|
-
|
79952
|
-
|
80154
|
+
var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
80155
|
+
advHeader.logoPositionX = target.logoPosition === "right" ? "right" : "left";
|
80156
|
+
advHeader.logoPositionY = "middle";
|
80157
|
+
advHeader.titlePositionX = target.logoPosition === "right" ? "left" : "right";
|
80158
|
+
advHeader.titlePositionY = "middle";
|
80159
|
+
advHeader.descriptionPositionX = target.logoPosition === "right" ? "left" : "right";
|
80160
|
+
advHeader.descriptionPositionY = "middle";
|
80161
|
+
advHeader.survey = target;
|
79953
80162
|
target.layoutElements.unshift({
|
79954
|
-
id: "
|
80163
|
+
id: "advanced-header",
|
79955
80164
|
container: "header",
|
79956
80165
|
component: "sv-header",
|
79957
|
-
data:
|
79958
|
-
processResponsiveness: function (width) { return
|
80166
|
+
data: advHeader,
|
80167
|
+
processResponsiveness: function (width) { return advHeader.processResponsiveness(width); }
|
79959
80168
|
});
|
79960
80169
|
}
|
79961
80170
|
}
|
79962
80171
|
else {
|
79963
|
-
target.removeLayoutElement("
|
80172
|
+
target.removeLayoutElement("advanced-header");
|
79964
80173
|
}
|
79965
80174
|
}
|
79966
80175
|
})
|
@@ -80059,13 +80268,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
80059
80268
|
},
|
80060
80269
|
{
|
80061
80270
|
name: "completedHtmlOnCondition:htmlconditions",
|
80062
|
-
className: "htmlconditionitem",
|
80271
|
+
className: "htmlconditionitem", isArray: true
|
80063
80272
|
},
|
80064
80273
|
{ name: "loadingHtml:html", serializationProperty: "locLoadingHtml" },
|
80065
|
-
{ name: "pages:surveypages", className: "page" },
|
80274
|
+
{ name: "pages:surveypages", className: "page", isArray: true },
|
80066
80275
|
{
|
80067
|
-
name: "
|
80068
|
-
alternativeName: "
|
80276
|
+
name: "elements",
|
80277
|
+
alternativeName: "questions",
|
80069
80278
|
baseClassName: "question",
|
80070
80279
|
visible: false,
|
80071
80280
|
isLightSerializable: false,
|
@@ -80085,7 +80294,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
80085
80294
|
},
|
80086
80295
|
{
|
80087
80296
|
name: "calculatedValues:calculatedvalues",
|
80088
|
-
className: "calculatedvalue",
|
80297
|
+
className: "calculatedvalue", isArray: true
|
80089
80298
|
},
|
80090
80299
|
{ name: "surveyId", visible: false },
|
80091
80300
|
{ name: "surveyPostId", visible: false },
|
@@ -80104,7 +80313,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
80104
80313
|
"navigateToUrl",
|
80105
80314
|
{
|
80106
80315
|
name: "navigateToUrlOnCondition:urlconditions",
|
80107
|
-
className: "urlconditionitem",
|
80316
|
+
className: "urlconditionitem", isArray: true
|
80108
80317
|
},
|
80109
80318
|
{
|
80110
80319
|
name: "questionsOrder",
|
@@ -81967,7 +82176,7 @@ var Camera = /** @class */ (function () {
|
|
81967
82176
|
this.hasCameraCallback(callback);
|
81968
82177
|
}
|
81969
82178
|
};
|
81970
|
-
Camera.prototype.getMediaConstraints = function (
|
82179
|
+
Camera.prototype.getMediaConstraints = function (videoSize) {
|
81971
82180
|
var devices = Camera.cameraList;
|
81972
82181
|
if (!Array.isArray(devices) || devices.length < 1)
|
81973
82182
|
return undefined;
|
@@ -81981,9 +82190,13 @@ var Camera = /** @class */ (function () {
|
|
81981
82190
|
else {
|
81982
82191
|
videoConstraints.facingMode = Camera.cameraFacingMode;
|
81983
82192
|
}
|
81984
|
-
if (
|
81985
|
-
|
81986
|
-
|
82193
|
+
if (videoSize) {
|
82194
|
+
if (videoSize === null || videoSize === void 0 ? void 0 : videoSize.height) {
|
82195
|
+
videoConstraints.height = { ideal: videoSize.height };
|
82196
|
+
}
|
82197
|
+
if (videoSize === null || videoSize === void 0 ? void 0 : videoSize.width) {
|
82198
|
+
videoConstraints.width = { ideal: videoSize.width };
|
82199
|
+
}
|
81987
82200
|
}
|
81988
82201
|
return {
|
81989
82202
|
video: videoConstraints,
|
@@ -81998,19 +82211,11 @@ var Camera = /** @class */ (function () {
|
|
81998
82211
|
callback(undefined);
|
81999
82212
|
return;
|
82000
82213
|
}
|
82001
|
-
|
82002
|
-
|
82003
|
-
|
82004
|
-
|
82005
|
-
|
82006
|
-
}
|
82007
|
-
if (imageHeight) {
|
82008
|
-
videoEl.height = imageHeight;
|
82009
|
-
}
|
82010
|
-
else {
|
82011
|
-
videoEl.style.height = "100%";
|
82012
|
-
}
|
82013
|
-
var mediaConstraints = this.getMediaConstraints(videoEl);
|
82214
|
+
videoEl.style.width = "100%";
|
82215
|
+
videoEl.style.height = "auto";
|
82216
|
+
videoEl.style.height = "100%";
|
82217
|
+
videoEl.style.objectFit = "contain";
|
82218
|
+
var mediaConstraints = this.getMediaConstraints({ width: imageWidth, height: imageHeight });
|
82014
82219
|
navigator.mediaDevices.getUserMedia(mediaConstraints).then(function (stream) {
|
82015
82220
|
var _a;
|
82016
82221
|
videoEl.srcObject = stream;
|
@@ -82025,6 +82230,9 @@ var Camera = /** @class */ (function () {
|
|
82025
82230
|
callback(undefined);
|
82026
82231
|
});
|
82027
82232
|
};
|
82233
|
+
Camera.prototype.getImageSize = function (videoEl) {
|
82234
|
+
return { width: videoEl.videoWidth, height: videoEl.videoHeight };
|
82235
|
+
};
|
82028
82236
|
Camera.prototype.snap = function (videoElementId, callback) {
|
82029
82237
|
if ("undefined" === typeof document)
|
82030
82238
|
return false;
|
@@ -82033,8 +82241,9 @@ var Camera = /** @class */ (function () {
|
|
82033
82241
|
if (!videoEl)
|
82034
82242
|
return false;
|
82035
82243
|
var canvasEl = root.createElement("canvas");
|
82036
|
-
|
82037
|
-
canvasEl.
|
82244
|
+
var imageSize = this.getImageSize(videoEl);
|
82245
|
+
canvasEl.height = imageSize.height;
|
82246
|
+
canvasEl.width = imageSize.width;
|
82038
82247
|
var context = canvasEl.getContext("2d");
|
82039
82248
|
/*
|
82040
82249
|
if(this._facingMode == 'user'){
|
@@ -82894,7 +83103,9 @@ function increaseHeightByContent(element, getComputedStyle) {
|
|
82894
83103
|
getComputedStyle = function (elt) { return window.getComputedStyle(elt); };
|
82895
83104
|
var style = getComputedStyle(element);
|
82896
83105
|
element.style.height = "auto";
|
82897
|
-
|
83106
|
+
if (!!element.scrollHeight) {
|
83107
|
+
element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
|
83108
|
+
}
|
82898
83109
|
}
|
82899
83110
|
function getOriginalEvent(event) {
|
82900
83111
|
return event.originalEvent || event;
|