survey-core 1.9.114 → 1.9.116
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 +231 -108
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +231 -108
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +3 -1
- package/i18n/english.js.map +1 -1
- package/i18n/english.min.js +2 -2
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +20 -11
- package/modern.css.map +1 -1
- package/modern.fontless.css +20 -11
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +442 -162
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +11 -2
- package/survey.css.map +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/actions/action.d.ts +9 -7
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +15 -0
- package/ts3.4/typings/dragdrop/dom-adapter.d.ts +3 -0
- package/ts3.4/typings/expressions/expressions.d.ts +3 -0
- package/ts3.4/typings/jsonobject.d.ts +6 -1
- package/ts3.4/typings/localization/english.d.ts +2 -0
- package/ts3.4/typings/question.d.ts +5 -1
- package/ts3.4/typings/question_comment.d.ts +2 -0
- package/ts3.4/typings/question_custom.d.ts +2 -0
- package/ts3.4/typings/question_file.d.ts +2 -1
- package/ts3.4/typings/question_matrixdropdownrendered.d.ts +2 -0
- package/ts3.4/typings/question_multipletext.d.ts +5 -1
- package/ts3.4/typings/question_paneldynamic.d.ts +2 -2
- package/ts3.4/typings/question_ranking.d.ts +2 -0
- package/ts3.4/typings/question_rating.d.ts +8 -8
- package/ts3.4/typings/question_signaturepad.d.ts +30 -0
- package/ts3.4/typings/question_text.d.ts +2 -0
- package/ts3.4/typings/question_textbase.d.ts +2 -0
- package/ts3.4/typings/questionnonvalue.d.ts +2 -0
- package/ts3.4/typings/survey-events-api.d.ts +3 -3
- package/ts3.4/typings/survey.d.ts +12 -12
- package/ts3.4/typings/surveyStrings.d.ts +2 -0
- package/ts3.4/typings/utils/camera.d.ts +9 -2
- package/typings/actions/action.d.ts +9 -7
- package/typings/defaultCss/defaultV2Css.d.ts +15 -0
- package/typings/dragdrop/dom-adapter.d.ts +3 -0
- package/typings/expressions/expressions.d.ts +3 -0
- package/typings/jsonobject.d.ts +6 -1
- package/typings/localization/english.d.ts +2 -0
- package/typings/question.d.ts +5 -1
- package/typings/question_comment.d.ts +2 -0
- package/typings/question_custom.d.ts +2 -0
- package/typings/question_file.d.ts +2 -1
- package/typings/question_matrixdropdownrendered.d.ts +2 -0
- package/typings/question_multipletext.d.ts +6 -1
- package/typings/question_paneldynamic.d.ts +2 -2
- package/typings/question_ranking.d.ts +2 -0
- package/typings/question_rating.d.ts +8 -8
- package/typings/question_signaturepad.d.ts +30 -0
- package/typings/question_text.d.ts +2 -0
- package/typings/question_textbase.d.ts +2 -0
- package/typings/questionnonvalue.d.ts +2 -0
- package/typings/survey-events-api.d.ts +3 -3
- package/typings/survey.d.ts +12 -12
- package/typings/surveyStrings.d.ts +2 -0
- package/typings/utils/camera.d.ts +9 -2
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.116
|
|
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
|
}
|
|
@@ -9229,8 +9259,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9229
9259
|
//import "../../modern.scss";
|
|
9230
9260
|
var Version;
|
|
9231
9261
|
var ReleaseDate;
|
|
9232
|
-
Version = "" + "1.9.
|
|
9233
|
-
ReleaseDate = "" + "2023-
|
|
9262
|
+
Version = "" + "1.9.116";
|
|
9263
|
+
ReleaseDate = "" + "2023-11-07";
|
|
9234
9264
|
function checkLibraryVersion(ver, libraryName) {
|
|
9235
9265
|
if (Version != ver) {
|
|
9236
9266
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -13984,6 +14014,15 @@ var UnaryOperand = /** @class */ (function (_super) {
|
|
|
13984
14014
|
var uOp = op;
|
|
13985
14015
|
return uOp.operator == this.operator && this.areOperatorsEquals(this.expression, uOp.expression);
|
|
13986
14016
|
};
|
|
14017
|
+
UnaryOperand.prototype.hasFunction = function () {
|
|
14018
|
+
return this.expression.hasFunction();
|
|
14019
|
+
};
|
|
14020
|
+
UnaryOperand.prototype.hasAsyncFunction = function () {
|
|
14021
|
+
return this.expression.hasAsyncFunction();
|
|
14022
|
+
};
|
|
14023
|
+
UnaryOperand.prototype.addToAsyncList = function (list) {
|
|
14024
|
+
this.expression.addToAsyncList(list);
|
|
14025
|
+
};
|
|
13987
14026
|
UnaryOperand.prototype.evaluate = function (processValue) {
|
|
13988
14027
|
var value = this.expression.evaluate(processValue);
|
|
13989
14028
|
return this.consumer.call(this, value);
|
|
@@ -17214,7 +17253,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
|
|
|
17214
17253
|
/*!***************************!*\
|
|
17215
17254
|
!*** ./src/jsonobject.ts ***!
|
|
17216
17255
|
\***************************/
|
|
17217
|
-
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonObject, Serializer */
|
|
17256
|
+
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
|
|
17218
17257
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
17219
17258
|
|
|
17220
17259
|
"use strict";
|
|
@@ -17231,6 +17270,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17231
17270
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return JsonMissingTypeError; });
|
|
17232
17271
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
|
|
17233
17272
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
|
|
17273
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
|
|
17234
17274
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
|
|
17235
17275
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
|
|
17236
17276
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
|
@@ -18130,6 +18170,10 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
|
18130
18170
|
}
|
|
18131
18171
|
if (propInfo.baseClassName) {
|
|
18132
18172
|
prop.baseClassName = propInfo.baseClassName;
|
|
18173
|
+
prop.isArray = true;
|
|
18174
|
+
}
|
|
18175
|
+
if (prop.isArray === true) {
|
|
18176
|
+
prop.isArray = true;
|
|
18133
18177
|
}
|
|
18134
18178
|
if (propInfo.classNamePart) {
|
|
18135
18179
|
prop.classNamePart = propInfo.classNamePart;
|
|
@@ -18773,6 +18817,17 @@ var JsonRequiredPropertyError = /** @class */ (function (_super) {
|
|
|
18773
18817
|
return JsonRequiredPropertyError;
|
|
18774
18818
|
}(JsonError));
|
|
18775
18819
|
|
|
18820
|
+
var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
|
|
18821
|
+
__extends(JsonRequiredArrayPropertyError, _super);
|
|
18822
|
+
function JsonRequiredArrayPropertyError(propertyName, className) {
|
|
18823
|
+
var _this = _super.call(this, "arrayproperty", "The property '" + propertyName + "' should be an array in '" + className + "'.") || this;
|
|
18824
|
+
_this.propertyName = propertyName;
|
|
18825
|
+
_this.className = className;
|
|
18826
|
+
return _this;
|
|
18827
|
+
}
|
|
18828
|
+
return JsonRequiredArrayPropertyError;
|
|
18829
|
+
}(JsonError));
|
|
18830
|
+
|
|
18776
18831
|
var JsonObject = /** @class */ (function () {
|
|
18777
18832
|
function JsonObject() {
|
|
18778
18833
|
this.errors = new Array();
|
|
@@ -18828,7 +18883,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
18828
18883
|
}
|
|
18829
18884
|
continue;
|
|
18830
18885
|
}
|
|
18831
|
-
this.valueToObj(jsonObj[key], obj, property);
|
|
18886
|
+
this.valueToObj(jsonObj[key], obj, property, jsonObj);
|
|
18832
18887
|
}
|
|
18833
18888
|
if (obj.endLoadingFromJson) {
|
|
18834
18889
|
obj.endLoadingFromJson();
|
|
@@ -18902,7 +18957,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
18902
18957
|
}
|
|
18903
18958
|
}
|
|
18904
18959
|
};
|
|
18905
|
-
JsonObject.prototype.valueToObj = function (value, obj, property) {
|
|
18960
|
+
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
|
|
18906
18961
|
if (value === null || value === undefined)
|
|
18907
18962
|
return;
|
|
18908
18963
|
this.removePos(property, value);
|
|
@@ -18910,6 +18965,11 @@ var JsonObject = /** @class */ (function () {
|
|
|
18910
18965
|
property.setValue(obj, value, this);
|
|
18911
18966
|
return;
|
|
18912
18967
|
}
|
|
18968
|
+
if (property.isArray && !Array.isArray(value) && !!value) {
|
|
18969
|
+
value = [value];
|
|
18970
|
+
var propName = !!jsonObj && property.alternativeName && !!jsonObj[property.alternativeName] ? property.alternativeName : property.name;
|
|
18971
|
+
this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
|
|
18972
|
+
}
|
|
18913
18973
|
if (this.isValueArray(value)) {
|
|
18914
18974
|
this.valueToArray(value, obj, property.name, property);
|
|
18915
18975
|
return;
|
|
@@ -20150,6 +20210,8 @@ var englishStrings = {
|
|
|
20150
20210
|
emptyRowsText: "There are no rows.",
|
|
20151
20211
|
addPanel: "Add new",
|
|
20152
20212
|
removePanel: "Remove",
|
|
20213
|
+
showDetails: "Show Details",
|
|
20214
|
+
hideDetails: "Hide Details",
|
|
20153
20215
|
choices_Item: "item",
|
|
20154
20216
|
matrix_column: "Column",
|
|
20155
20217
|
matrix_row: "Row",
|
|
@@ -20540,9 +20602,11 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
20540
20602
|
return true;
|
|
20541
20603
|
};
|
|
20542
20604
|
QuestionMatrixBaseModel.prototype.getTableCss = function () {
|
|
20605
|
+
var _a;
|
|
20543
20606
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
20544
20607
|
.append(this.cssClasses.root)
|
|
20545
20608
|
.append(this.cssClasses.noHeader, !this.showHeader)
|
|
20609
|
+
.append(this.cssClasses.hasFooter, !!((_a = this.renderedTable) === null || _a === void 0 ? void 0 : _a.showAddRowOnBottom))
|
|
20546
20610
|
.append(this.cssClasses.rootAlternateRows, this.alternateRows)
|
|
20547
20611
|
.append(this.cssClasses.rootVerticalAlignTop, (this.verticalAlign === "top"))
|
|
20548
20612
|
.append(this.cssClasses.rootVerticalAlignMiddle, (this.verticalAlign === "middle")).toString();
|
|
@@ -20554,7 +20618,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
20554
20618
|
* @see width
|
|
20555
20619
|
*/
|
|
20556
20620
|
get: function () {
|
|
20557
|
-
return this.getPropertyValue("columnMinWidth"
|
|
20621
|
+
return this.getPropertyValue("columnMinWidth") || "";
|
|
20558
20622
|
},
|
|
20559
20623
|
set: function (val) {
|
|
20560
20624
|
this.setPropertyValue("columnMinWidth", val);
|
|
@@ -20567,7 +20631,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
20567
20631
|
* A width for the column that displays row titles (first column). Accepts CSS values.
|
|
20568
20632
|
*/
|
|
20569
20633
|
get: function () {
|
|
20570
|
-
return this.getPropertyValue("rowTitleWidth"
|
|
20634
|
+
return this.getPropertyValue("rowTitleWidth") || "";
|
|
20571
20635
|
},
|
|
20572
20636
|
set: function (val) {
|
|
20573
20637
|
this.setPropertyValue("rowTitleWidth", val);
|
|
@@ -26595,7 +26659,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26595
26659
|
if (!!this.comment) {
|
|
26596
26660
|
this.comment = undefined;
|
|
26597
26661
|
}
|
|
26598
|
-
this.
|
|
26662
|
+
this.setValueChangedDirectly(false);
|
|
26599
26663
|
};
|
|
26600
26664
|
Question.prototype.unbindValue = function () {
|
|
26601
26665
|
this.clearValue();
|
|
@@ -26659,7 +26723,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26659
26723
|
Question.prototype.clearValueIfInvisibleCore = function (reason) {
|
|
26660
26724
|
if (this.canClearValueAsInvisible(reason)) {
|
|
26661
26725
|
this.clearValue();
|
|
26662
|
-
this.
|
|
26726
|
+
this.setValueChangedDirectly(undefined);
|
|
26663
26727
|
}
|
|
26664
26728
|
};
|
|
26665
26729
|
Object.defineProperty(Question.prototype, "clearIfInvisible", {
|
|
@@ -27011,13 +27075,16 @@ var Question = /** @class */ (function (_super) {
|
|
|
27011
27075
|
};
|
|
27012
27076
|
Question.prototype.setDefaultValue = function () {
|
|
27013
27077
|
var _this = this;
|
|
27014
|
-
this.
|
|
27015
|
-
this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) {
|
|
27078
|
+
this.setDefaultValueCore(function (val) {
|
|
27016
27079
|
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
27017
27080
|
_this.value = val;
|
|
27018
27081
|
}
|
|
27019
27082
|
});
|
|
27020
27083
|
};
|
|
27084
|
+
Question.prototype.setDefaultValueCore = function (func) {
|
|
27085
|
+
this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
|
|
27086
|
+
this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) { return func(val); });
|
|
27087
|
+
};
|
|
27021
27088
|
Question.prototype.isValueExpression = function (val) {
|
|
27022
27089
|
return !!val && typeof val == "string" && val.length > 0 && val[0] == "=";
|
|
27023
27090
|
};
|
|
@@ -27458,31 +27525,46 @@ var Question = /** @class */ (function (_super) {
|
|
|
27458
27525
|
};
|
|
27459
27526
|
//IQuestion
|
|
27460
27527
|
Question.prototype.updateValueFromSurvey = function (newValue) {
|
|
27528
|
+
var _this = this;
|
|
27461
27529
|
newValue = this.getUnbindValue(newValue);
|
|
27462
27530
|
if (!!this.valueFromDataCallback) {
|
|
27463
27531
|
newValue = this.valueFromDataCallback(newValue);
|
|
27464
27532
|
}
|
|
27465
27533
|
if (!this.checkIsValueCorrect(newValue))
|
|
27466
27534
|
return;
|
|
27467
|
-
|
|
27468
|
-
|
|
27469
|
-
|
|
27535
|
+
var isEmpty = this.isValueEmpty(newValue);
|
|
27536
|
+
if (!isEmpty && this.defaultValueExpression) {
|
|
27537
|
+
this.setDefaultValueCore(function (val) {
|
|
27538
|
+
_this.updateValueFromSurveyCore(newValue, _this.isTwoValueEquals(newValue, val));
|
|
27539
|
+
});
|
|
27540
|
+
}
|
|
27541
|
+
else {
|
|
27542
|
+
this.updateValueFromSurveyCore(newValue, isEmpty);
|
|
27543
|
+
}
|
|
27470
27544
|
this.updateDependedQuestions();
|
|
27471
27545
|
this.updateIsAnswered();
|
|
27472
27546
|
};
|
|
27547
|
+
Question.prototype.updateValueFromSurveyCore = function (newValue, viaDefaultVal) {
|
|
27548
|
+
this.isChangingViaDefaultValue = viaDefaultVal;
|
|
27549
|
+
this.setQuestionValue(this.valueFromData(newValue));
|
|
27550
|
+
this.isChangingViaDefaultValue = false;
|
|
27551
|
+
};
|
|
27473
27552
|
Question.prototype.updateCommentFromSurvey = function (newValue) {
|
|
27474
27553
|
this.questionComment = newValue;
|
|
27475
27554
|
};
|
|
27476
27555
|
Question.prototype.onChangeQuestionValue = function (newValue) { };
|
|
27477
|
-
Question.prototype.setValueChangedDirectly = function () {
|
|
27478
|
-
this.isValueChangedDirectly =
|
|
27556
|
+
Question.prototype.setValueChangedDirectly = function (val) {
|
|
27557
|
+
this.isValueChangedDirectly = val;
|
|
27558
|
+
if (!!this.setValueChangedDirectlyCallback) {
|
|
27559
|
+
this.setValueChangedDirectlyCallback(val);
|
|
27560
|
+
}
|
|
27479
27561
|
};
|
|
27480
27562
|
Question.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
|
|
27481
27563
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
|
27482
27564
|
newValue = this.convertToCorrectValue(newValue);
|
|
27483
27565
|
var isEqual = this.isTwoValueEquals(this.questionValue, newValue);
|
|
27484
|
-
if (!isEqual && !this.isChangingViaDefaultValue) {
|
|
27485
|
-
this.setValueChangedDirectly();
|
|
27566
|
+
if (!isEqual && !this.isChangingViaDefaultValue && !this.isParentChangingViaDefaultValue) {
|
|
27567
|
+
this.setValueChangedDirectly(true);
|
|
27486
27568
|
}
|
|
27487
27569
|
this.questionValue = newValue;
|
|
27488
27570
|
if (!isEqual) {
|
|
@@ -27493,6 +27575,14 @@ var Question = /** @class */ (function (_super) {
|
|
|
27493
27575
|
if (updateIsAnswered)
|
|
27494
27576
|
this.updateIsAnswered();
|
|
27495
27577
|
};
|
|
27578
|
+
Object.defineProperty(Question.prototype, "isParentChangingViaDefaultValue", {
|
|
27579
|
+
get: function () {
|
|
27580
|
+
var _a;
|
|
27581
|
+
return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.isChangingViaDefaultValue) === true;
|
|
27582
|
+
},
|
|
27583
|
+
enumerable: false,
|
|
27584
|
+
configurable: true
|
|
27585
|
+
});
|
|
27496
27586
|
Question.prototype.onSurveyValueChanged = function (newValue) { };
|
|
27497
27587
|
Question.prototype.setVisibleIndex = function (val) {
|
|
27498
27588
|
if (!this.isVisible ||
|
|
@@ -27955,7 +28045,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
|
|
|
27955
28045
|
"enableIf:condition",
|
|
27956
28046
|
"resetValueIf:condition",
|
|
27957
28047
|
"setValueIf:condition",
|
|
27958
|
-
|
|
28048
|
+
"setValueExpression:expression",
|
|
27959
28049
|
"defaultValue:value",
|
|
27960
28050
|
{
|
|
27961
28051
|
name: "defaultValueExpression:expression",
|
|
@@ -31814,7 +31904,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
31814
31904
|
* @see autoGrow
|
|
31815
31905
|
*/
|
|
31816
31906
|
get: function () {
|
|
31817
|
-
return this.getPropertyValue("allowResize")
|
|
31907
|
+
return this.getPropertyValue("allowResize");
|
|
31818
31908
|
},
|
|
31819
31909
|
set: function (val) {
|
|
31820
31910
|
this.setPropertyValue("allowResize", val);
|
|
@@ -31822,9 +31912,16 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
31822
31912
|
enumerable: false,
|
|
31823
31913
|
configurable: true
|
|
31824
31914
|
});
|
|
31915
|
+
Object.defineProperty(QuestionCommentModel.prototype, "renderedAllowResize", {
|
|
31916
|
+
get: function () {
|
|
31917
|
+
return this.allowResize && (this.survey && this.survey.allowResizeComment);
|
|
31918
|
+
},
|
|
31919
|
+
enumerable: false,
|
|
31920
|
+
configurable: true
|
|
31921
|
+
});
|
|
31825
31922
|
Object.defineProperty(QuestionCommentModel.prototype, "resizeStyle", {
|
|
31826
31923
|
get: function () {
|
|
31827
|
-
return this.
|
|
31924
|
+
return this.renderedAllowResize ? "both" : "none";
|
|
31828
31925
|
},
|
|
31829
31926
|
enumerable: false,
|
|
31830
31927
|
configurable: true
|
|
@@ -31862,6 +31959,11 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
31862
31959
|
event.stopPropagation();
|
|
31863
31960
|
}
|
|
31864
31961
|
};
|
|
31962
|
+
QuestionCommentModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
|
|
31963
|
+
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
|
31964
|
+
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
|
31965
|
+
this.updateElement();
|
|
31966
|
+
};
|
|
31865
31967
|
QuestionCommentModel.prototype.onValueChanged = function () {
|
|
31866
31968
|
_super.prototype.onValueChanged.call(this);
|
|
31867
31969
|
this.updateElement();
|
|
@@ -32425,6 +32527,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
|
32425
32527
|
_this.onUpdateQuestionCssClasses(res, css);
|
|
32426
32528
|
};
|
|
32427
32529
|
res.hasCssErrorCallback = function () { return _this.errors.length > 0; };
|
|
32530
|
+
res.setValueChangedDirectlyCallback = function (val) { _this.setValueChangedDirectly(val); };
|
|
32428
32531
|
}
|
|
32429
32532
|
return res;
|
|
32430
32533
|
};
|
|
@@ -32492,6 +32595,16 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
|
32492
32595
|
return this.getContentQuestionValue();
|
|
32493
32596
|
return _super.prototype.getValueCore.call(this);
|
|
32494
32597
|
};
|
|
32598
|
+
QuestionCustomModel.prototype.setValueChangedDirectly = function (val) {
|
|
32599
|
+
if (this.isSettingValueChanged)
|
|
32600
|
+
return;
|
|
32601
|
+
this.isSettingValueChanged = true;
|
|
32602
|
+
_super.prototype.setValueChangedDirectly.call(this, val);
|
|
32603
|
+
if (!!this.contentQuestion) {
|
|
32604
|
+
this.contentQuestion.setValueChangedDirectly(val);
|
|
32605
|
+
}
|
|
32606
|
+
this.isSettingValueChanged = false;
|
|
32607
|
+
};
|
|
32495
32608
|
QuestionCustomModel.prototype.initElement = function (el) {
|
|
32496
32609
|
var _this = this;
|
|
32497
32610
|
_super.prototype.initElement.call(this, el);
|
|
@@ -33932,6 +34045,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
33932
34045
|
|
|
33933
34046
|
|
|
33934
34047
|
|
|
34048
|
+
|
|
33935
34049
|
/**
|
|
33936
34050
|
* A class that describes the File Upload question type.
|
|
33937
34051
|
*
|
|
@@ -34079,6 +34193,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34079
34193
|
iconSize: "auto",
|
|
34080
34194
|
title: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.takePhotoCaption; }),
|
|
34081
34195
|
showTitle: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return !_this.isAnswered; }),
|
|
34196
|
+
enabledIf: function () { return !_this.isInputReadOnly; },
|
|
34082
34197
|
action: function () {
|
|
34083
34198
|
_this.startVideo();
|
|
34084
34199
|
}
|
|
@@ -34089,6 +34204,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34089
34204
|
iconSize: "auto",
|
|
34090
34205
|
title: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.clearButtonCaption; }),
|
|
34091
34206
|
showTitle: false,
|
|
34207
|
+
enabledIf: function () { return !_this.isInputReadOnly; },
|
|
34092
34208
|
innerCss: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.cssClasses.removeButton; }),
|
|
34093
34209
|
action: function () {
|
|
34094
34210
|
_this.doClean();
|
|
@@ -34097,10 +34213,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34097
34213
|
[_this.closeCameraAction, _this.changeCameraAction, _this.takePictureAction].forEach(function (action) {
|
|
34098
34214
|
action.cssClasses = {};
|
|
34099
34215
|
});
|
|
34100
|
-
_this.registerFunctionOnPropertiesValueChanged(["currentMode", "isAnswered"], function () {
|
|
34101
|
-
_this.
|
|
34216
|
+
_this.registerFunctionOnPropertiesValueChanged(["sourceType", "currentMode", "isAnswered"], function () {
|
|
34217
|
+
_this.updateActionsVisibility();
|
|
34102
34218
|
});
|
|
34103
|
-
_this.updateActions();
|
|
34104
34219
|
_this.actionsContainer.actions = [_this.chooseFileAction, _this.startCameraAction, _this.cleanAction];
|
|
34105
34220
|
_this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
|
|
34106
34221
|
return _this;
|
|
@@ -34128,8 +34243,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34128
34243
|
var isUploading = this.isUploading;
|
|
34129
34244
|
var isPlayingVideo = this.isPlayingVideo;
|
|
34130
34245
|
var isDefaultV2Theme = this.isDefaultV2Theme;
|
|
34131
|
-
|
|
34132
|
-
return !isUploading && !isPlayingVideo && !isReadOnly && isDefaultV2Theme;
|
|
34246
|
+
return !isUploading && !isPlayingVideo && isDefaultV2Theme;
|
|
34133
34247
|
},
|
|
34134
34248
|
enumerable: false,
|
|
34135
34249
|
configurable: true
|
|
@@ -34165,7 +34279,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34165
34279
|
if (!stream) {
|
|
34166
34280
|
_this.stopVideo();
|
|
34167
34281
|
}
|
|
34168
|
-
}, this.imageWidth, this.imageHeight);
|
|
34282
|
+
}, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["getRenderedSize"])(this.imageWidth), Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["getRenderedSize"])(this.imageHeight));
|
|
34169
34283
|
};
|
|
34170
34284
|
QuestionFileModel.prototype.stopVideo = function () {
|
|
34171
34285
|
this.setIsPlayingVideo(false);
|
|
@@ -34471,9 +34585,10 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34471
34585
|
}
|
|
34472
34586
|
}
|
|
34473
34587
|
};
|
|
34474
|
-
QuestionFileModel.prototype.
|
|
34475
|
-
|
|
34476
|
-
this.
|
|
34588
|
+
QuestionFileModel.prototype.updateActionsVisibility = function () {
|
|
34589
|
+
var isDesignMode = this.isDesignMode;
|
|
34590
|
+
this.chooseFileAction.visible = (!isDesignMode && this.hasFileUI) || (isDesignMode && this.sourceType !== "camera");
|
|
34591
|
+
this.startCameraAction.visible = (!isDesignMode && this.hasVideoUI) || (isDesignMode && this.sourceType !== "file");
|
|
34477
34592
|
this.cleanAction.visible = !!this.isAnswered;
|
|
34478
34593
|
};
|
|
34479
34594
|
Object.defineProperty(QuestionFileModel.prototype, "inputTitle", {
|
|
@@ -34650,7 +34765,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34650
34765
|
if (_this.survey) {
|
|
34651
34766
|
_this.survey.uploadFiles(_this, _this.name, files, function (status, data) {
|
|
34652
34767
|
if (status === "error") {
|
|
34768
|
+
_this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](data, _this));
|
|
34653
34769
|
_this.stateChanged("error");
|
|
34770
|
+
_this.stateChanged("loaded");
|
|
34654
34771
|
}
|
|
34655
34772
|
if (status === "success") {
|
|
34656
34773
|
_this.value = (_this.value || []).concat(data.map(function (r) {
|
|
@@ -34803,6 +34920,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34803
34920
|
}
|
|
34804
34921
|
return questionPlainData;
|
|
34805
34922
|
};
|
|
34923
|
+
QuestionFileModel.prototype.getImageWrapperCss = function (data) {
|
|
34924
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.cssClasses.imageWrapper).append(this.cssClasses.imageWrapperDefaultImage, this.defaultImage(data)).toString();
|
|
34925
|
+
};
|
|
34806
34926
|
QuestionFileModel.prototype.getActionsContainerCss = function (css) {
|
|
34807
34927
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
34808
34928
|
.append(css.actionsContainer)
|
|
@@ -34890,7 +35010,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34890
35010
|
QuestionFileModel.prototype.endLoadingFromJson = function () {
|
|
34891
35011
|
_super.prototype.endLoadingFromJson.call(this);
|
|
34892
35012
|
this.updateCurrentMode();
|
|
34893
|
-
this.
|
|
35013
|
+
this.updateActionsVisibility();
|
|
34894
35014
|
this.loadPreview(this.value);
|
|
34895
35015
|
};
|
|
34896
35016
|
QuestionFileModel.prototype.needResponsiveness = function () {
|
|
@@ -35647,6 +35767,8 @@ var ImageItemValue = /** @class */ (function (_super) {
|
|
|
35647
35767
|
},
|
|
35648
35768
|
set: function (val) {
|
|
35649
35769
|
this.setLocalizableStringText("imageLink", val);
|
|
35770
|
+
this.imageNotLoaded = false;
|
|
35771
|
+
this.videoNotLoaded = false;
|
|
35650
35772
|
},
|
|
35651
35773
|
enumerable: false,
|
|
35652
35774
|
configurable: true
|
|
@@ -38311,7 +38433,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
38311
38433
|
};
|
|
38312
38434
|
QuestionMatrixDropdownModelBase.prototype.onStartRowAddingRemoving = function () {
|
|
38313
38435
|
this.lockResetRenderedTable = true;
|
|
38314
|
-
this.setValueChangedDirectly();
|
|
38436
|
+
this.setValueChangedDirectly(true);
|
|
38315
38437
|
};
|
|
38316
38438
|
QuestionMatrixDropdownModelBase.prototype.onEndRowAdding = function () {
|
|
38317
38439
|
this.lockResetRenderedTable = false;
|
|
@@ -39720,7 +39842,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39720
39842
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownbase", [
|
|
39721
39843
|
{
|
|
39722
39844
|
name: "columns:matrixdropdowncolumns",
|
|
39723
|
-
className: "matrixdropdowncolumn",
|
|
39845
|
+
className: "matrixdropdowncolumn", isArray: true
|
|
39724
39846
|
},
|
|
39725
39847
|
{
|
|
39726
39848
|
name: "columnLayout",
|
|
@@ -40671,7 +40793,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
|
|
|
40671
40793
|
"requiredIf:condition",
|
|
40672
40794
|
"resetValueIf:condition",
|
|
40673
40795
|
"setValueIf:condition",
|
|
40674
|
-
|
|
40796
|
+
"setValueExpression:expression",
|
|
40675
40797
|
{
|
|
40676
40798
|
name: "showInMultipleColumns:boolean",
|
|
40677
40799
|
dependsOn: "cellType",
|
|
@@ -40776,6 +40898,7 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
40776
40898
|
this.isActionsCell = false;
|
|
40777
40899
|
this.isErrorsCell = false;
|
|
40778
40900
|
this.isDragHandlerCell = false;
|
|
40901
|
+
this.isDetailRowCell = false;
|
|
40779
40902
|
this.classNameValue = "";
|
|
40780
40903
|
this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
|
|
40781
40904
|
}
|
|
@@ -40936,6 +41059,7 @@ var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
|
|
|
40936
41059
|
var _this = _super.call(this) || this;
|
|
40937
41060
|
_this.cssClasses = cssClasses;
|
|
40938
41061
|
_this.isDetailRow = isDetailRow;
|
|
41062
|
+
_this.hasEndActions = false;
|
|
40939
41063
|
_this.isErrorsRow = false;
|
|
40940
41064
|
_this.cells = [];
|
|
40941
41065
|
_this.idValue = QuestionMatrixDropdownRenderedRow.counter++;
|
|
@@ -40959,9 +41083,13 @@ var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
|
|
|
40959
41083
|
});
|
|
40960
41084
|
Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "className", {
|
|
40961
41085
|
get: function () {
|
|
41086
|
+
var _a, _b;
|
|
40962
41087
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
40963
41088
|
.append(this.cssClasses.row)
|
|
40964
41089
|
.append(this.cssClasses.detailRow, this.isDetailRow)
|
|
41090
|
+
.append(this.cssClasses.rowHasPanel, (_a = this.row) === null || _a === void 0 ? void 0 : _a.hasPanel)
|
|
41091
|
+
.append(this.cssClasses.expandedRow, ((_b = this.row) === null || _b === void 0 ? void 0 : _b.isDetailPanelShowing) && !this.isDetailRow)
|
|
41092
|
+
.append(this.cssClasses.rowHasEndActions, this.hasEndActions)
|
|
40965
41093
|
.append(this.cssClasses.ghostRow, this.isGhostRow)
|
|
40966
41094
|
.append(this.cssClasses.rowAdditional, this.isAdditionalClasses)
|
|
40967
41095
|
.toString();
|
|
@@ -41314,7 +41442,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41314
41442
|
this.footerRow.cells.push(this.createHeaderCell(null));
|
|
41315
41443
|
}
|
|
41316
41444
|
if (this.hasActionCellInRows("start")) {
|
|
41317
|
-
this.footerRow.cells.push(this.createHeaderCell(null));
|
|
41445
|
+
this.footerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
41318
41446
|
}
|
|
41319
41447
|
if (this.matrix.hasRowText) {
|
|
41320
41448
|
this.footerRow.cells.push(this.createTextCell(this.matrix.getFooterText()));
|
|
@@ -41336,7 +41464,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41336
41464
|
}
|
|
41337
41465
|
}
|
|
41338
41466
|
if (this.hasActionCellInRows("end")) {
|
|
41339
|
-
this.footerRow.cells.push(this.createHeaderCell(null));
|
|
41467
|
+
this.footerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
41340
41468
|
}
|
|
41341
41469
|
};
|
|
41342
41470
|
QuestionMatrixDropdownRenderedTable.prototype.buildRows = function () {
|
|
@@ -41406,10 +41534,25 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41406
41534
|
return cell;
|
|
41407
41535
|
};
|
|
41408
41536
|
QuestionMatrixDropdownRenderedTable.prototype.getActionsCellClassName = function (cell) {
|
|
41537
|
+
var _this = this;
|
|
41409
41538
|
if (cell === void 0) { cell = null; }
|
|
41410
|
-
|
|
41539
|
+
var classBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
|
41540
|
+
.append(this.cssClasses.actionsCell)
|
|
41541
|
+
.append(this.cssClasses.actionsCellDrag, cell === null || cell === void 0 ? void 0 : cell.isDragHandlerCell)
|
|
41542
|
+
.append(this.cssClasses.detailRowCell, cell === null || cell === void 0 ? void 0 : cell.isDetailRowCell)
|
|
41543
|
+
.append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal);
|
|
41544
|
+
if (cell.isActionsCell) {
|
|
41545
|
+
var actions = cell.item.value.actions;
|
|
41546
|
+
if (this.cssClasses.actionsCellPrefix) {
|
|
41547
|
+
actions.forEach(function (action) {
|
|
41548
|
+
classBuilder.append(_this.cssClasses.actionsCellPrefix + "--" + action.id);
|
|
41549
|
+
});
|
|
41550
|
+
}
|
|
41551
|
+
}
|
|
41552
|
+
return classBuilder.toString();
|
|
41411
41553
|
};
|
|
41412
|
-
QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location) {
|
|
41554
|
+
QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location, isDetailRow) {
|
|
41555
|
+
if (isDetailRow === void 0) { isDetailRow = false; }
|
|
41413
41556
|
var rowActions = this.getRowActions(rowIndex, location);
|
|
41414
41557
|
if (!this.isValueEmpty(rowActions)) {
|
|
41415
41558
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
|
@@ -41422,6 +41565,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41422
41565
|
cell.item = itemValue;
|
|
41423
41566
|
cell.isActionsCell = true;
|
|
41424
41567
|
cell.isDragHandlerCell = false;
|
|
41568
|
+
cell.isDetailRowCell = isDetailRow;
|
|
41425
41569
|
cell.className = this.getActionsCellClassName(cell);
|
|
41426
41570
|
cell.row = this.matrix.visibleRows[rowIndex];
|
|
41427
41571
|
return cell;
|
|
@@ -41455,6 +41599,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41455
41599
|
configurable: true
|
|
41456
41600
|
});
|
|
41457
41601
|
QuestionMatrixDropdownRenderedTable.prototype.setDefaultRowActions = function (row, actions) {
|
|
41602
|
+
var _this = this;
|
|
41458
41603
|
var matrix = this.matrix;
|
|
41459
41604
|
if (this.hasRemoveRows && this.canRemoveRow(row)) {
|
|
41460
41605
|
if (!this.showRemoveButtonAsIcon) {
|
|
@@ -41485,14 +41630,28 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41485
41630
|
}
|
|
41486
41631
|
}
|
|
41487
41632
|
if (row.hasPanel) {
|
|
41488
|
-
|
|
41489
|
-
|
|
41490
|
-
|
|
41491
|
-
|
|
41492
|
-
|
|
41493
|
-
|
|
41494
|
-
|
|
41495
|
-
|
|
41633
|
+
if (this.matrix.isMobile) {
|
|
41634
|
+
actions.unshift(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
|
|
41635
|
+
id: "show-detail-mobile",
|
|
41636
|
+
title: "Show Details",
|
|
41637
|
+
showTitle: true,
|
|
41638
|
+
location: "end",
|
|
41639
|
+
action: function (context) {
|
|
41640
|
+
context.title = row.isDetailPanelShowing ? _this.matrix.getLocalizationString("showDetails") : _this.matrix.getLocalizationString("hideDetails");
|
|
41641
|
+
row.showHideDetailPanelClick();
|
|
41642
|
+
},
|
|
41643
|
+
}));
|
|
41644
|
+
}
|
|
41645
|
+
else {
|
|
41646
|
+
actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
|
|
41647
|
+
id: "show-detail",
|
|
41648
|
+
title: this.matrix.getLocalizationString("editText"),
|
|
41649
|
+
showTitle: false,
|
|
41650
|
+
location: "start",
|
|
41651
|
+
component: "sv-matrix-detail-button",
|
|
41652
|
+
data: { row: row, question: this.matrix },
|
|
41653
|
+
}));
|
|
41654
|
+
}
|
|
41496
41655
|
}
|
|
41497
41656
|
};
|
|
41498
41657
|
QuestionMatrixDropdownRenderedTable.prototype.createErrorRow = function (row) {
|
|
@@ -41560,13 +41719,15 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41560
41719
|
QuestionMatrixDropdownRenderedTable.prototype.addRowActionsCell = function (row, renderedRow, location) {
|
|
41561
41720
|
var rowIndex = this.matrix.visibleRows.indexOf(row);
|
|
41562
41721
|
if (this.hasActionCellInRows(location)) {
|
|
41563
|
-
var actions = this.getRowActionsCell(rowIndex, location);
|
|
41722
|
+
var actions = this.getRowActionsCell(rowIndex, location, renderedRow.isDetailRow);
|
|
41564
41723
|
if (!!actions) {
|
|
41565
41724
|
renderedRow.cells.push(actions);
|
|
41725
|
+
renderedRow.hasEndActions = true;
|
|
41566
41726
|
}
|
|
41567
41727
|
else {
|
|
41568
41728
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
|
41569
41729
|
cell.isEmpty = true;
|
|
41730
|
+
cell.isDetailRowCell = renderedRow.isDetailRow;
|
|
41570
41731
|
renderedRow.cells.push(cell);
|
|
41571
41732
|
}
|
|
41572
41733
|
}
|
|
@@ -41596,7 +41757,12 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41596
41757
|
cell.className = this.cssClasses.detailPanelCell;
|
|
41597
41758
|
res.cells.push(cell);
|
|
41598
41759
|
if (!!actionsCell) {
|
|
41599
|
-
|
|
41760
|
+
if (this.matrix.isMobile) {
|
|
41761
|
+
this.addRowActionsCell(row, res, "end");
|
|
41762
|
+
}
|
|
41763
|
+
else {
|
|
41764
|
+
res.cells.push(actionsCell);
|
|
41765
|
+
}
|
|
41600
41766
|
}
|
|
41601
41767
|
if (typeof this.matrix.onCreateDetailPanelRenderedRowCallback === "function") {
|
|
41602
41768
|
this.matrix.onCreateDetailPanelRenderedRowCallback(res);
|
|
@@ -43039,7 +43205,7 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
|
|
|
43039
43205
|
/**
|
|
43040
43206
|
* A class that describes an item in a [Multiple Textboxes](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model) question.
|
|
43041
43207
|
*
|
|
43042
|
-
* [View Demo](/form-library/examples/multiple-text-box-question/)
|
|
43208
|
+
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
|
|
43043
43209
|
*/
|
|
43044
43210
|
var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
43045
43211
|
__extends(MultipleTextItemModel, _super);
|
|
@@ -43267,6 +43433,19 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
43267
43433
|
enumerable: false,
|
|
43268
43434
|
configurable: true
|
|
43269
43435
|
});
|
|
43436
|
+
Object.defineProperty(MultipleTextItemModel.prototype, "defaultValueExpression", {
|
|
43437
|
+
/**
|
|
43438
|
+
* An expression used to calculate the [defaultValue](https://surveyjs.io/form-library/documentation/question#defaultValue).
|
|
43439
|
+
*/
|
|
43440
|
+
get: function () {
|
|
43441
|
+
return this.editor.defaultValueExpression;
|
|
43442
|
+
},
|
|
43443
|
+
set: function (val) {
|
|
43444
|
+
this.editor.defaultValueExpression = val;
|
|
43445
|
+
},
|
|
43446
|
+
enumerable: false,
|
|
43447
|
+
configurable: true
|
|
43448
|
+
});
|
|
43270
43449
|
Object.defineProperty(MultipleTextItemModel.prototype, "minValueExpression", {
|
|
43271
43450
|
/**
|
|
43272
43451
|
* The minimum value specified as an expression. For example, `"minValueExpression": "today(-1)"` sets the minimum value to yesterday.
|
|
@@ -43880,6 +44059,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
43880
44059
|
.append(this.cssClasses.itemLabelAnswered, item.editor.isAnswered)
|
|
43881
44060
|
.append(this.cssClasses.itemLabelAllowFocus, !this.isDesignMode)
|
|
43882
44061
|
.append(this.cssClasses.itemLabelOnError, item.editor.errors.length > 0)
|
|
44062
|
+
.append(this.cssClasses.itemWithCharacterCounter, !!item.getMaxLength())
|
|
43883
44063
|
.toString();
|
|
43884
44064
|
};
|
|
43885
44065
|
QuestionMultipleTextModel.prototype.getItemCss = function () {
|
|
@@ -43985,6 +44165,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
|
43985
44165
|
name: "requiredErrorText:text",
|
|
43986
44166
|
serializationProperty: "locRequiredErrorText",
|
|
43987
44167
|
},
|
|
44168
|
+
{ name: "defaultValueExpression:expression", visible: false },
|
|
43988
44169
|
{
|
|
43989
44170
|
name: "minValueExpression:expression",
|
|
43990
44171
|
category: "logic",
|
|
@@ -44010,7 +44191,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
|
44010
44191
|
return new MultipleTextItemModel("");
|
|
44011
44192
|
});
|
|
44012
44193
|
_jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext", [
|
|
44013
|
-
{ name: "!items:textitems", className: "multipletextitem" },
|
|
44194
|
+
{ name: "!items:textitems", className: "multipletextitem", isArray: true },
|
|
44014
44195
|
{ name: "itemSize:number", minValue: 0 },
|
|
44015
44196
|
{ name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
|
|
44016
44197
|
{ name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false }
|
|
@@ -44505,7 +44686,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
44505
44686
|
*
|
|
44506
44687
|
* If you want to customize individual tab titles, handle `SurveyModel`'s [`onGetDynamicPanelTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetDynamicPanelTabTitle) event.
|
|
44507
44688
|
*
|
|
44508
|
-
* [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
44689
|
+
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
44509
44690
|
* @see templateTitle
|
|
44510
44691
|
* @see renderMode
|
|
44511
44692
|
*/
|
|
@@ -45292,7 +45473,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45292
45473
|
* - `"progressTop"` - Renders each panel as a card and displays a progress bar at the top. [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)
|
|
45293
45474
|
* - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
|
|
45294
45475
|
* - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
|
|
45295
|
-
* - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/)
|
|
45476
|
+
* - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/)
|
|
45296
45477
|
*/
|
|
45297
45478
|
get: function () {
|
|
45298
45479
|
return this.getPropertyValue("renderMode");
|
|
@@ -47046,14 +47227,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
47046
47227
|
get: function () {
|
|
47047
47228
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
47048
47229
|
.append(this.cssClasses.root)
|
|
47049
|
-
.append(this.cssClasses.rootMobileMod,
|
|
47230
|
+
.append(this.cssClasses.rootMobileMod, this.isMobileMode())
|
|
47050
47231
|
.append(this.cssClasses.rootDisabled, this.isReadOnly)
|
|
47051
47232
|
.append(this.cssClasses.rootDesignMode, !!this.isDesignMode)
|
|
47052
47233
|
.append(this.cssClasses.itemOnError, this.hasCssError())
|
|
47053
47234
|
.append(this.cssClasses.rootDragHandleAreaIcon, _src_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].rankingDragHandleArea === "icon")
|
|
47054
47235
|
.append(this.cssClasses.rootSelectToRankMod, this.selectToRankEnabled)
|
|
47055
|
-
.append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.
|
|
47056
|
-
.append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.
|
|
47236
|
+
.append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal")
|
|
47237
|
+
.append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "vertical")
|
|
47057
47238
|
.toString();
|
|
47058
47239
|
},
|
|
47059
47240
|
enumerable: false,
|
|
@@ -47386,9 +47567,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
47386
47567
|
* @see selectToRankAreasLayout
|
|
47387
47568
|
*/
|
|
47388
47569
|
get: function () {
|
|
47389
|
-
|
|
47390
|
-
return "vertical";
|
|
47391
|
-
return this.getPropertyValue("selectToRankAreasLayout", "horizontal");
|
|
47570
|
+
return this.getPropertyValue("selectToRankAreasLayout");
|
|
47392
47571
|
},
|
|
47393
47572
|
set: function (val) {
|
|
47394
47573
|
this.setPropertyValue("selectToRankAreasLayout", val);
|
|
@@ -47396,6 +47575,18 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
47396
47575
|
enumerable: false,
|
|
47397
47576
|
configurable: true
|
|
47398
47577
|
});
|
|
47578
|
+
Object.defineProperty(QuestionRankingModel.prototype, "renderedSelectToRankAreasLayout", {
|
|
47579
|
+
get: function () {
|
|
47580
|
+
if (this.isMobileMode())
|
|
47581
|
+
return "vertical";
|
|
47582
|
+
return this.selectToRankAreasLayout;
|
|
47583
|
+
},
|
|
47584
|
+
enumerable: false,
|
|
47585
|
+
configurable: true
|
|
47586
|
+
});
|
|
47587
|
+
QuestionRankingModel.prototype.isMobileMode = function () {
|
|
47588
|
+
return _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsMobile"];
|
|
47589
|
+
};
|
|
47399
47590
|
Object.defineProperty(QuestionRankingModel.prototype, "useFullItemSizeForShortcut", {
|
|
47400
47591
|
get: function () {
|
|
47401
47592
|
return this.getPropertyValue("useFullItemSizeForShortcut");
|
|
@@ -47765,7 +47956,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
47765
47956
|
*
|
|
47766
47957
|
* If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
|
|
47767
47958
|
*
|
|
47768
|
-
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
|
47959
|
+
* [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
|
|
47769
47960
|
*/
|
|
47770
47961
|
get: function () {
|
|
47771
47962
|
return this.getPropertyValue("rateValues");
|
|
@@ -47783,7 +47974,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
47783
47974
|
*
|
|
47784
47975
|
* Default value: 1
|
|
47785
47976
|
*
|
|
47786
|
-
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
|
47977
|
+
* [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
|
|
47787
47978
|
* @see rateMax
|
|
47788
47979
|
* @see rateStep
|
|
47789
47980
|
* @see rateCount
|
|
@@ -47803,7 +47994,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
47803
47994
|
*
|
|
47804
47995
|
* Default value: 5
|
|
47805
47996
|
*
|
|
47806
|
-
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
|
47997
|
+
* [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
|
|
47807
47998
|
* @see rateMin
|
|
47808
47999
|
* @see rateStep
|
|
47809
48000
|
* @see rateCount
|
|
@@ -47823,7 +48014,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
47823
48014
|
*
|
|
47824
48015
|
* Default value: 1
|
|
47825
48016
|
*
|
|
47826
|
-
* [View Demo](/form-library/examples/rating-scale/ (linkStyle))
|
|
48017
|
+
* [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
|
|
47827
48018
|
* @see rateMin
|
|
47828
48019
|
* @see rateMax
|
|
47829
48020
|
* @see rateCount
|
|
@@ -48650,24 +48841,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
48650
48841
|
|
|
48651
48842
|
var defaultWidth = 300;
|
|
48652
48843
|
var defaultHeight = 200;
|
|
48653
|
-
function resizeCanvas(canvas) {
|
|
48654
|
-
var context = canvas.getContext("2d");
|
|
48655
|
-
var devicePixelRatio = window.devicePixelRatio || 1;
|
|
48656
|
-
var backingStoreRatio = context.webkitBackingStorePixelRatio ||
|
|
48657
|
-
context.mozBackingStorePixelRatio ||
|
|
48658
|
-
context.msBackingStorePixelRatio ||
|
|
48659
|
-
context.oBackingStorePixelRatio ||
|
|
48660
|
-
context.backingStorePixelRatio ||
|
|
48661
|
-
1;
|
|
48662
|
-
var ratio = devicePixelRatio / backingStoreRatio;
|
|
48663
|
-
var oldWidth = canvas.width;
|
|
48664
|
-
var oldHeight = canvas.height;
|
|
48665
|
-
canvas.width = oldWidth * ratio;
|
|
48666
|
-
canvas.height = oldHeight * ratio;
|
|
48667
|
-
canvas.style.width = oldWidth + "px";
|
|
48668
|
-
canvas.style.height = oldHeight + "px";
|
|
48669
|
-
context.scale(ratio, ratio);
|
|
48670
|
-
}
|
|
48671
48844
|
/**
|
|
48672
48845
|
* A class that describes the Signature question type.
|
|
48673
48846
|
*
|
|
@@ -48676,7 +48849,13 @@ function resizeCanvas(canvas) {
|
|
|
48676
48849
|
var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
48677
48850
|
__extends(QuestionSignaturePadModel, _super);
|
|
48678
48851
|
function QuestionSignaturePadModel(name) {
|
|
48679
|
-
|
|
48852
|
+
var _this = _super.call(this, name) || this;
|
|
48853
|
+
_this.valueIsUpdatingInternally = false;
|
|
48854
|
+
_this.updateValueHandler = function () {
|
|
48855
|
+
_this.scaleCanvas(false, true);
|
|
48856
|
+
_this.refreshCanvas();
|
|
48857
|
+
};
|
|
48858
|
+
return _this;
|
|
48680
48859
|
}
|
|
48681
48860
|
QuestionSignaturePadModel.prototype.getPenColorFromTheme = function () {
|
|
48682
48861
|
var _survey = this.survey;
|
|
@@ -48702,7 +48881,9 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
48702
48881
|
var format = this.dataFormat === "jpeg" ? "image/jpeg" :
|
|
48703
48882
|
(this.dataFormat === "svg" ? "image/svg+xml" : "");
|
|
48704
48883
|
var data = this.signaturePad.toDataURL(format);
|
|
48884
|
+
this.valueIsUpdatingInternally = true;
|
|
48705
48885
|
this.value = data;
|
|
48886
|
+
this.valueIsUpdatingInternally = false;
|
|
48706
48887
|
}
|
|
48707
48888
|
};
|
|
48708
48889
|
QuestionSignaturePadModel.prototype.getType = function () {
|
|
@@ -48724,10 +48905,44 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
48724
48905
|
this.updateColors(this.signaturePad);
|
|
48725
48906
|
}
|
|
48726
48907
|
};
|
|
48908
|
+
QuestionSignaturePadModel.prototype.resizeCanvas = function () {
|
|
48909
|
+
this.canvas.width = this.containerWidth;
|
|
48910
|
+
this.canvas.height = this.containerHeight;
|
|
48911
|
+
};
|
|
48912
|
+
QuestionSignaturePadModel.prototype.scaleCanvas = function (refresh, resize) {
|
|
48913
|
+
if (refresh === void 0) { refresh = true; }
|
|
48914
|
+
if (resize === void 0) { resize = false; }
|
|
48915
|
+
var canvas = this.canvas;
|
|
48916
|
+
var scale = canvas.offsetWidth / this.containerWidth;
|
|
48917
|
+
if (this.scale != scale || resize) {
|
|
48918
|
+
this.scale = scale;
|
|
48919
|
+
canvas.style.width = this.renderedCanvasWidth;
|
|
48920
|
+
this.resizeCanvas();
|
|
48921
|
+
this.signaturePad.minWidth = this.penMinWidth * scale;
|
|
48922
|
+
this.signaturePad.maxWidth = this.penMaxWidth * scale;
|
|
48923
|
+
canvas.getContext("2d").scale(1 / scale, 1 / scale);
|
|
48924
|
+
if (refresh)
|
|
48925
|
+
this.refreshCanvas();
|
|
48926
|
+
}
|
|
48927
|
+
};
|
|
48928
|
+
QuestionSignaturePadModel.prototype.refreshCanvas = function () {
|
|
48929
|
+
var data = this.value;
|
|
48930
|
+
var canvas = this.canvas;
|
|
48931
|
+
if (!data) {
|
|
48932
|
+
canvas.getContext("2d").clearRect(0, 0, canvas.width * this.scale, canvas.height * this.scale);
|
|
48933
|
+
this.signaturePad.clear();
|
|
48934
|
+
}
|
|
48935
|
+
else {
|
|
48936
|
+
this.signaturePad.fromDataURL(data, { width: canvas.width * this.scale, height: canvas.height * this.scale });
|
|
48937
|
+
}
|
|
48938
|
+
};
|
|
48727
48939
|
QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
|
|
48728
48940
|
var _this = this;
|
|
48729
48941
|
var canvas = el.getElementsByTagName("canvas")[0];
|
|
48942
|
+
this.canvas = canvas;
|
|
48943
|
+
this.resizeCanvas();
|
|
48730
48944
|
var signaturePad = new signature_pad__WEBPACK_IMPORTED_MODULE_3__["default"](canvas, { backgroundColor: "#ffffff" });
|
|
48945
|
+
this.signaturePad = signaturePad;
|
|
48731
48946
|
if (this.isInputReadOnly) {
|
|
48732
48947
|
signaturePad.off();
|
|
48733
48948
|
}
|
|
@@ -48741,6 +48956,7 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
48741
48956
|
};
|
|
48742
48957
|
this.updateColors(signaturePad);
|
|
48743
48958
|
signaturePad.addEventListener("beginStroke", function () {
|
|
48959
|
+
_this.scaleCanvas();
|
|
48744
48960
|
_this.isDrawingValue = true;
|
|
48745
48961
|
canvas.focus();
|
|
48746
48962
|
}, { once: false });
|
|
@@ -48748,24 +48964,12 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
48748
48964
|
_this.isDrawingValue = false;
|
|
48749
48965
|
_this.updateValue();
|
|
48750
48966
|
}, { once: false });
|
|
48751
|
-
|
|
48752
|
-
var data = _this.value;
|
|
48753
|
-
canvas.width = _this.signatureWidth || defaultWidth;
|
|
48754
|
-
canvas.height = _this.signatureHeight || defaultHeight;
|
|
48755
|
-
resizeCanvas(canvas);
|
|
48756
|
-
if (!data) {
|
|
48757
|
-
signaturePad.clear();
|
|
48758
|
-
}
|
|
48759
|
-
else {
|
|
48760
|
-
signaturePad.fromDataURL(data);
|
|
48761
|
-
}
|
|
48762
|
-
};
|
|
48763
|
-
updateValueHandler();
|
|
48967
|
+
this.updateValueHandler();
|
|
48764
48968
|
this.readOnlyChangedCallback();
|
|
48765
|
-
this.signaturePad = signaturePad;
|
|
48766
48969
|
var propertyChangedHandler = function (sender, options) {
|
|
48767
48970
|
if (options.name === "signatureWidth" || options.name === "signatureHeight" || options.name === "value") {
|
|
48768
|
-
|
|
48971
|
+
if (!_this.valueIsUpdatingInternally)
|
|
48972
|
+
_this.updateValueHandler();
|
|
48769
48973
|
}
|
|
48770
48974
|
};
|
|
48771
48975
|
this.onPropertyChanged.add(propertyChangedHandler);
|
|
@@ -48824,6 +49028,27 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
48824
49028
|
enumerable: false,
|
|
48825
49029
|
configurable: true
|
|
48826
49030
|
});
|
|
49031
|
+
Object.defineProperty(QuestionSignaturePadModel.prototype, "containerHeight", {
|
|
49032
|
+
get: function () {
|
|
49033
|
+
return this.signatureHeight || defaultHeight;
|
|
49034
|
+
},
|
|
49035
|
+
enumerable: false,
|
|
49036
|
+
configurable: true
|
|
49037
|
+
});
|
|
49038
|
+
Object.defineProperty(QuestionSignaturePadModel.prototype, "containerWidth", {
|
|
49039
|
+
get: function () {
|
|
49040
|
+
return this.signatureWidth || defaultWidth;
|
|
49041
|
+
},
|
|
49042
|
+
enumerable: false,
|
|
49043
|
+
configurable: true
|
|
49044
|
+
});
|
|
49045
|
+
Object.defineProperty(QuestionSignaturePadModel.prototype, "renderedCanvasWidth", {
|
|
49046
|
+
get: function () {
|
|
49047
|
+
return this.signatureAutoScaleEnabled ? "100%" : this.containerWidth + "px";
|
|
49048
|
+
},
|
|
49049
|
+
enumerable: false,
|
|
49050
|
+
configurable: true
|
|
49051
|
+
});
|
|
48827
49052
|
Object.defineProperty(QuestionSignaturePadModel.prototype, "height", {
|
|
48828
49053
|
//todo: need to remove this property
|
|
48829
49054
|
get: function () {
|
|
@@ -48944,6 +49169,15 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
48944
49169
|
__decorate([
|
|
48945
49170
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
48946
49171
|
], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
|
|
49172
|
+
__decorate([
|
|
49173
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
49174
|
+
], QuestionSignaturePadModel.prototype, "signatureAutoScaleEnabled", void 0);
|
|
49175
|
+
__decorate([
|
|
49176
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 0.5 })
|
|
49177
|
+
], QuestionSignaturePadModel.prototype, "penMinWidth", void 0);
|
|
49178
|
+
__decorate([
|
|
49179
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 2.5 })
|
|
49180
|
+
], QuestionSignaturePadModel.prototype, "penMaxWidth", void 0);
|
|
48947
49181
|
__decorate([
|
|
48948
49182
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
|
|
48949
49183
|
], QuestionSignaturePadModel.prototype, "showPlaceholder", void 0);
|
|
@@ -48972,6 +49206,21 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
|
|
|
48972
49206
|
category: "general",
|
|
48973
49207
|
default: 200,
|
|
48974
49208
|
},
|
|
49209
|
+
{
|
|
49210
|
+
name: "signatureAutoScaleEnabled:boolean",
|
|
49211
|
+
category: "general",
|
|
49212
|
+
default: false,
|
|
49213
|
+
},
|
|
49214
|
+
{
|
|
49215
|
+
name: "penMinWidth:number",
|
|
49216
|
+
category: "general",
|
|
49217
|
+
default: 0.5,
|
|
49218
|
+
},
|
|
49219
|
+
{
|
|
49220
|
+
name: "penMaxWidth:number",
|
|
49221
|
+
category: "general",
|
|
49222
|
+
default: 2.5,
|
|
49223
|
+
},
|
|
48975
49224
|
//need to remove this property
|
|
48976
49225
|
{
|
|
48977
49226
|
name: "height:number",
|
|
@@ -48984,10 +49233,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
|
|
|
48984
49233
|
default: true,
|
|
48985
49234
|
},
|
|
48986
49235
|
{ name: "showPlaceholder:boolean", category: "general", default: true },
|
|
48987
|
-
{
|
|
49236
|
+
{
|
|
49237
|
+
name: "placeholder:text",
|
|
48988
49238
|
serializationProperty: "locPlaceholder",
|
|
48989
49239
|
category: "general",
|
|
48990
|
-
dependsOn: "showPlaceholder",
|
|
49240
|
+
dependsOn: "showPlaceholder",
|
|
49241
|
+
visibleIf: function (obj) { return obj.showPlaceholder; }
|
|
49242
|
+
},
|
|
48991
49243
|
{
|
|
48992
49244
|
name: "backgroundImage:file",
|
|
48993
49245
|
category: "general",
|
|
@@ -49248,8 +49500,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
49248
49500
|
}
|
|
49249
49501
|
};
|
|
49250
49502
|
QuestionTagboxModel.prototype.clearValue = function () {
|
|
49503
|
+
var _a;
|
|
49251
49504
|
_super.prototype.clearValue.call(this);
|
|
49252
|
-
this.dropdownListModel.clear();
|
|
49505
|
+
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
|
|
49253
49506
|
};
|
|
49254
49507
|
Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
|
|
49255
49508
|
get: function () {
|
|
@@ -49862,6 +50115,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
49862
50115
|
QuestionTextModel.prototype.hasPlaceholder = function () {
|
|
49863
50116
|
return !this.isReadOnly && this.inputType !== "range";
|
|
49864
50117
|
};
|
|
50118
|
+
QuestionTextModel.prototype.getControlCssClassBuilder = function () {
|
|
50119
|
+
return _super.prototype.getControlCssClassBuilder.call(this)
|
|
50120
|
+
.append(this.cssClasses.constrolWithCharacterCounter, !!this.getMaxLength());
|
|
50121
|
+
};
|
|
49865
50122
|
QuestionTextModel.prototype.isReadOnlyRenderDiv = function () {
|
|
49866
50123
|
return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].readOnly.textRenderMode === "div";
|
|
49867
50124
|
};
|
|
@@ -50290,12 +50547,14 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
|
50290
50547
|
}
|
|
50291
50548
|
}
|
|
50292
50549
|
};
|
|
50293
|
-
QuestionTextBase.prototype.
|
|
50550
|
+
QuestionTextBase.prototype.getControlCssClassBuilder = function () {
|
|
50294
50551
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
|
|
50295
50552
|
.append(this.cssClasses.root)
|
|
50296
50553
|
.append(this.cssClasses.onError, this.hasCssError())
|
|
50297
|
-
.append(this.cssClasses.controlDisabled, this.isReadOnly)
|
|
50298
|
-
|
|
50554
|
+
.append(this.cssClasses.controlDisabled, this.isReadOnly);
|
|
50555
|
+
};
|
|
50556
|
+
QuestionTextBase.prototype.getControlClass = function () {
|
|
50557
|
+
return this.getControlCssClassBuilder().toString();
|
|
50299
50558
|
};
|
|
50300
50559
|
Object.defineProperty(QuestionTextBase.prototype, "isNewA11yStructure", {
|
|
50301
50560
|
//a11y
|
|
@@ -50525,6 +50784,20 @@ var QuestionNonValue = /** @class */ (function (_super) {
|
|
|
50525
50784
|
if (path === void 0) { path = null; }
|
|
50526
50785
|
return null;
|
|
50527
50786
|
};
|
|
50787
|
+
Object.defineProperty(QuestionNonValue.prototype, "ariaRole", {
|
|
50788
|
+
get: function () {
|
|
50789
|
+
return null;
|
|
50790
|
+
},
|
|
50791
|
+
enumerable: false,
|
|
50792
|
+
configurable: true
|
|
50793
|
+
});
|
|
50794
|
+
Object.defineProperty(QuestionNonValue.prototype, "ariaRequired", {
|
|
50795
|
+
get: function () {
|
|
50796
|
+
return null;
|
|
50797
|
+
},
|
|
50798
|
+
enumerable: false,
|
|
50799
|
+
configurable: true
|
|
50800
|
+
});
|
|
50528
50801
|
return QuestionNonValue;
|
|
50529
50802
|
}(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));
|
|
50530
50803
|
|
|
@@ -53512,16 +53785,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53512
53785
|
*
|
|
53513
53786
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53514
53787
|
*
|
|
53515
|
-
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53788
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53516
53789
|
* @see css
|
|
53517
53790
|
*/
|
|
53518
53791
|
_this.onUpdateQuestionCssClasses = _this.addEvent();
|
|
53519
53792
|
/**
|
|
53520
|
-
* An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
|
|
53793
|
+
* An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
|
|
53521
53794
|
*
|
|
53522
53795
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53523
53796
|
*
|
|
53524
|
-
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53797
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53525
53798
|
* @see css
|
|
53526
53799
|
*/
|
|
53527
53800
|
_this.onUpdatePanelCssClasses = _this.addEvent();
|
|
@@ -53530,7 +53803,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53530
53803
|
*
|
|
53531
53804
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53532
53805
|
*
|
|
53533
|
-
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53806
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53534
53807
|
* @see css
|
|
53535
53808
|
*/
|
|
53536
53809
|
_this.onUpdatePageCssClasses = _this.addEvent();
|
|
@@ -53539,7 +53812,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53539
53812
|
*
|
|
53540
53813
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53541
53814
|
*
|
|
53542
|
-
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53815
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
53543
53816
|
* @see css
|
|
53544
53817
|
*/
|
|
53545
53818
|
_this.onUpdateChoiceItemCss = _this.addEvent();
|
|
@@ -53631,7 +53904,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53631
53904
|
*/
|
|
53632
53905
|
_this.onMatrixRowAdding = _this.addEvent();
|
|
53633
53906
|
/**
|
|
53634
|
-
* This event is obsolete. Use the [`onMatrixRowAdding`](/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
|
|
53907
|
+
* This event is obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
|
|
53635
53908
|
*/
|
|
53636
53909
|
_this.onMatrixBeforeRowAdded = _this.onMatrixRowAdding;
|
|
53637
53910
|
/**
|
|
@@ -53651,7 +53924,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53651
53924
|
*/
|
|
53652
53925
|
_this.onMatrixRenderRemoveButton = _this.addEvent();
|
|
53653
53926
|
/**
|
|
53654
|
-
* This event is obsolete. Use the [`onMatrixRenderRemoveButton`](/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
|
|
53927
|
+
* This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
|
|
53655
53928
|
*/
|
|
53656
53929
|
_this.onMatrixAllowRemoveRow = _this.onMatrixRenderRemoveButton;
|
|
53657
53930
|
/**
|
|
@@ -53670,7 +53943,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53670
53943
|
*/
|
|
53671
53944
|
_this.onAfterRenderMatrixCell = _this.addEvent();
|
|
53672
53945
|
/**
|
|
53673
|
-
* This event is obsolete. Use the [`onAfterRenderMatrixCell`](/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
|
|
53946
|
+
* This event is obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
|
|
53674
53947
|
*/
|
|
53675
53948
|
_this.onMatrixAfterCellRender = _this.onAfterRenderMatrixCell;
|
|
53676
53949
|
/**
|
|
@@ -53728,7 +54001,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
53728
54001
|
*
|
|
53729
54002
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
53730
54003
|
*
|
|
53731
|
-
* [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
54004
|
+
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
53732
54005
|
*/
|
|
53733
54006
|
_this.onGetDynamicPanelTabTitle = _this.addEvent();
|
|
53734
54007
|
/**
|
|
@@ -54157,7 +54430,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54157
54430
|
/**
|
|
54158
54431
|
* Gets or sets an object in which keys are UI elements and values are CSS classes applied to them.
|
|
54159
54432
|
*
|
|
54160
|
-
* [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
54433
|
+
* [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
|
|
54161
54434
|
*/
|
|
54162
54435
|
get: function () {
|
|
54163
54436
|
if (!this.cssValue) {
|
|
@@ -60955,6 +61228,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60955
61228
|
}
|
|
60956
61229
|
}
|
|
60957
61230
|
}
|
|
61231
|
+
else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
|
|
61232
|
+
if (this.state === "running" && layoutElement.container === container) {
|
|
61233
|
+
containerLayoutElements.push(layoutElement);
|
|
61234
|
+
}
|
|
61235
|
+
}
|
|
60958
61236
|
else {
|
|
60959
61237
|
if (Array.isArray(layoutElement.container) && layoutElement.container.indexOf(container) !== -1 || layoutElement.container === container) {
|
|
60960
61238
|
containerLayoutElements.push(layoutElement);
|
|
@@ -60969,8 +61247,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60969
61247
|
/**
|
|
60970
61248
|
* Applies a specified theme to the survey.
|
|
60971
61249
|
*
|
|
60972
|
-
* [Themes & Styles](/form-library/documentation/manage-default-themes-and-styles (linkStyle))
|
|
60973
|
-
* @param theme An [`ITheme`](/form-library/documentation/api-reference/itheme) object with theme settings.
|
|
61250
|
+
* [Themes & Styles](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles (linkStyle))
|
|
61251
|
+
* @param theme An [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme) object with theme settings.
|
|
60974
61252
|
*/
|
|
60975
61253
|
SurveyModel.prototype.applyTheme = function (theme) {
|
|
60976
61254
|
var _this = this;
|
|
@@ -60978,15 +61256,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60978
61256
|
return;
|
|
60979
61257
|
Object.keys(theme).forEach(function (key) {
|
|
60980
61258
|
if (key === "header") {
|
|
60981
|
-
_this.removeLayoutElement("
|
|
60982
|
-
var
|
|
60983
|
-
|
|
61259
|
+
_this.removeLayoutElement("advanced-header");
|
|
61260
|
+
var advHeader_1 = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
|
61261
|
+
advHeader_1.fromTheme(theme);
|
|
60984
61262
|
_this.layoutElements.push({
|
|
60985
|
-
id: "
|
|
61263
|
+
id: "advanced-header",
|
|
60986
61264
|
container: "header",
|
|
60987
61265
|
component: "sv-header",
|
|
60988
|
-
data:
|
|
60989
|
-
processResponsiveness: function (width) { return
|
|
61266
|
+
data: advHeader_1,
|
|
61267
|
+
processResponsiveness: function (width) { return advHeader_1.processResponsiveness(width); }
|
|
60990
61268
|
});
|
|
60991
61269
|
}
|
|
60992
61270
|
if (key === "isPanelless") {
|
|
@@ -61075,27 +61353,27 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61075
61353
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
|
61076
61354
|
onSet: function (newValue, target) {
|
|
61077
61355
|
if (newValue === "advanced") {
|
|
61078
|
-
var layoutElement = target.layoutElements.filter(function (a) { return a.id === "
|
|
61356
|
+
var layoutElement = target.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
|
|
61079
61357
|
if (!layoutElement) {
|
|
61080
|
-
var
|
|
61081
|
-
|
|
61082
|
-
|
|
61083
|
-
|
|
61084
|
-
|
|
61085
|
-
|
|
61086
|
-
|
|
61087
|
-
|
|
61358
|
+
var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
|
61359
|
+
advHeader.logoPositionX = target.logoPosition === "right" ? "right" : "left";
|
|
61360
|
+
advHeader.logoPositionY = "middle";
|
|
61361
|
+
advHeader.titlePositionX = target.logoPosition === "right" ? "left" : "right";
|
|
61362
|
+
advHeader.titlePositionY = "middle";
|
|
61363
|
+
advHeader.descriptionPositionX = target.logoPosition === "right" ? "left" : "right";
|
|
61364
|
+
advHeader.descriptionPositionY = "middle";
|
|
61365
|
+
advHeader.survey = target;
|
|
61088
61366
|
target.layoutElements.unshift({
|
|
61089
|
-
id: "
|
|
61367
|
+
id: "advanced-header",
|
|
61090
61368
|
container: "header",
|
|
61091
61369
|
component: "sv-header",
|
|
61092
|
-
data:
|
|
61093
|
-
processResponsiveness: function (width) { return
|
|
61370
|
+
data: advHeader,
|
|
61371
|
+
processResponsiveness: function (width) { return advHeader.processResponsiveness(width); }
|
|
61094
61372
|
});
|
|
61095
61373
|
}
|
|
61096
61374
|
}
|
|
61097
61375
|
else {
|
|
61098
|
-
target.removeLayoutElement("
|
|
61376
|
+
target.removeLayoutElement("advanced-header");
|
|
61099
61377
|
}
|
|
61100
61378
|
}
|
|
61101
61379
|
})
|
|
@@ -61194,13 +61472,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
61194
61472
|
},
|
|
61195
61473
|
{
|
|
61196
61474
|
name: "completedHtmlOnCondition:htmlconditions",
|
|
61197
|
-
className: "htmlconditionitem",
|
|
61475
|
+
className: "htmlconditionitem", isArray: true
|
|
61198
61476
|
},
|
|
61199
61477
|
{ name: "loadingHtml:html", serializationProperty: "locLoadingHtml" },
|
|
61200
|
-
{ name: "pages:surveypages", className: "page" },
|
|
61478
|
+
{ name: "pages:surveypages", className: "page", isArray: true },
|
|
61201
61479
|
{
|
|
61202
|
-
name: "
|
|
61203
|
-
alternativeName: "
|
|
61480
|
+
name: "elements",
|
|
61481
|
+
alternativeName: "questions",
|
|
61204
61482
|
baseClassName: "question",
|
|
61205
61483
|
visible: false,
|
|
61206
61484
|
isLightSerializable: false,
|
|
@@ -61220,7 +61498,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
61220
61498
|
},
|
|
61221
61499
|
{
|
|
61222
61500
|
name: "calculatedValues:calculatedvalues",
|
|
61223
|
-
className: "calculatedvalue",
|
|
61501
|
+
className: "calculatedvalue", isArray: true
|
|
61224
61502
|
},
|
|
61225
61503
|
{ name: "surveyId", visible: false },
|
|
61226
61504
|
{ name: "surveyPostId", visible: false },
|
|
@@ -61239,7 +61517,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
61239
61517
|
"navigateToUrl",
|
|
61240
61518
|
{
|
|
61241
61519
|
name: "navigateToUrlOnCondition:urlconditions",
|
|
61242
|
-
className: "urlconditionitem",
|
|
61520
|
+
className: "urlconditionitem", isArray: true
|
|
61243
61521
|
},
|
|
61244
61522
|
{
|
|
61245
61523
|
name: "questionsOrder",
|
|
@@ -63102,7 +63380,7 @@ var Camera = /** @class */ (function () {
|
|
|
63102
63380
|
this.hasCameraCallback(callback);
|
|
63103
63381
|
}
|
|
63104
63382
|
};
|
|
63105
|
-
Camera.prototype.getMediaConstraints = function (
|
|
63383
|
+
Camera.prototype.getMediaConstraints = function (videoSize) {
|
|
63106
63384
|
var devices = Camera.cameraList;
|
|
63107
63385
|
if (!Array.isArray(devices) || devices.length < 1)
|
|
63108
63386
|
return undefined;
|
|
@@ -63116,9 +63394,13 @@ var Camera = /** @class */ (function () {
|
|
|
63116
63394
|
else {
|
|
63117
63395
|
videoConstraints.facingMode = Camera.cameraFacingMode;
|
|
63118
63396
|
}
|
|
63119
|
-
if (
|
|
63120
|
-
|
|
63121
|
-
|
|
63397
|
+
if (videoSize) {
|
|
63398
|
+
if (videoSize === null || videoSize === void 0 ? void 0 : videoSize.height) {
|
|
63399
|
+
videoConstraints.height = { ideal: videoSize.height };
|
|
63400
|
+
}
|
|
63401
|
+
if (videoSize === null || videoSize === void 0 ? void 0 : videoSize.width) {
|
|
63402
|
+
videoConstraints.width = { ideal: videoSize.width };
|
|
63403
|
+
}
|
|
63122
63404
|
}
|
|
63123
63405
|
return {
|
|
63124
63406
|
video: videoConstraints,
|
|
@@ -63133,19 +63415,11 @@ var Camera = /** @class */ (function () {
|
|
|
63133
63415
|
callback(undefined);
|
|
63134
63416
|
return;
|
|
63135
63417
|
}
|
|
63136
|
-
|
|
63137
|
-
|
|
63138
|
-
|
|
63139
|
-
|
|
63140
|
-
|
|
63141
|
-
}
|
|
63142
|
-
if (imageHeight) {
|
|
63143
|
-
videoEl.height = imageHeight;
|
|
63144
|
-
}
|
|
63145
|
-
else {
|
|
63146
|
-
videoEl.style.height = "100%";
|
|
63147
|
-
}
|
|
63148
|
-
var mediaConstraints = this.getMediaConstraints(videoEl);
|
|
63418
|
+
videoEl.style.width = "100%";
|
|
63419
|
+
videoEl.style.height = "auto";
|
|
63420
|
+
videoEl.style.height = "100%";
|
|
63421
|
+
videoEl.style.objectFit = "contain";
|
|
63422
|
+
var mediaConstraints = this.getMediaConstraints({ width: imageWidth, height: imageHeight });
|
|
63149
63423
|
navigator.mediaDevices.getUserMedia(mediaConstraints).then(function (stream) {
|
|
63150
63424
|
var _a;
|
|
63151
63425
|
videoEl.srcObject = stream;
|
|
@@ -63160,6 +63434,9 @@ var Camera = /** @class */ (function () {
|
|
|
63160
63434
|
callback(undefined);
|
|
63161
63435
|
});
|
|
63162
63436
|
};
|
|
63437
|
+
Camera.prototype.getImageSize = function (videoEl) {
|
|
63438
|
+
return { width: videoEl.videoWidth, height: videoEl.videoHeight };
|
|
63439
|
+
};
|
|
63163
63440
|
Camera.prototype.snap = function (videoElementId, callback) {
|
|
63164
63441
|
if ("undefined" === typeof document)
|
|
63165
63442
|
return false;
|
|
@@ -63168,8 +63445,9 @@ var Camera = /** @class */ (function () {
|
|
|
63168
63445
|
if (!videoEl)
|
|
63169
63446
|
return false;
|
|
63170
63447
|
var canvasEl = root.createElement("canvas");
|
|
63171
|
-
|
|
63172
|
-
canvasEl.
|
|
63448
|
+
var imageSize = this.getImageSize(videoEl);
|
|
63449
|
+
canvasEl.height = imageSize.height;
|
|
63450
|
+
canvasEl.width = imageSize.width;
|
|
63173
63451
|
var context = canvasEl.getContext("2d");
|
|
63174
63452
|
/*
|
|
63175
63453
|
if(this._facingMode == 'user'){
|
|
@@ -64029,7 +64307,9 @@ function increaseHeightByContent(element, getComputedStyle) {
|
|
|
64029
64307
|
getComputedStyle = function (elt) { return window.getComputedStyle(elt); };
|
|
64030
64308
|
var style = getComputedStyle(element);
|
|
64031
64309
|
element.style.height = "auto";
|
|
64032
|
-
|
|
64310
|
+
if (!!element.scrollHeight) {
|
|
64311
|
+
element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
|
|
64312
|
+
}
|
|
64033
64313
|
}
|
|
64034
64314
|
function getOriginalEvent(event) {
|
|
64035
64315
|
return event.originalEvent || event;
|