survey-core 1.9.117 → 1.9.118
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 +14 -4
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +14 -4
- 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 -3
- 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 +5 -2
- package/modern.css.map +1 -1
- package/modern.fontless.css +5 -2
- 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 +208 -97
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +4 -4
- package/survey.css +5 -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/defaultCss/cssmodern.d.ts +1 -0
- package/ts3.4/typings/defaultCss/cssstandard.d.ts +1 -0
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/dragdrop/choices.d.ts +1 -0
- package/ts3.4/typings/jsonobject.d.ts +2 -0
- package/ts3.4/typings/martixBase.d.ts +1 -0
- package/ts3.4/typings/notifier.d.ts +11 -8
- package/ts3.4/typings/question.d.ts +1 -1
- package/ts3.4/typings/question_baseselect.d.ts +5 -1
- package/ts3.4/typings/question_file.d.ts +1 -0
- package/ts3.4/typings/question_matrixdropdownbase.d.ts +3 -0
- package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +1 -0
- package/ts3.4/typings/question_matrixdynamic.d.ts +3 -0
- package/ts3.4/typings/question_signaturepad.d.ts +3 -1
- package/ts3.4/typings/question_textbase.d.ts +1 -2
- package/ts3.4/typings/settings.d.ts +21 -0
- package/ts3.4/typings/survey-events-api.d.ts +18 -6
- package/ts3.4/typings/survey.d.ts +13 -1
- package/typings/defaultCss/cssmodern.d.ts +1 -0
- package/typings/defaultCss/cssstandard.d.ts +1 -0
- package/typings/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/dragdrop/choices.d.ts +1 -0
- package/typings/jsonobject.d.ts +2 -0
- package/typings/martixBase.d.ts +1 -0
- package/typings/notifier.d.ts +11 -8
- package/typings/question.d.ts +1 -1
- package/typings/question_baseselect.d.ts +5 -1
- package/typings/question_file.d.ts +3 -1
- package/typings/question_matrixdropdownbase.d.ts +3 -0
- package/typings/question_matrixdropdowncolumn.d.ts +1 -0
- package/typings/question_matrixdynamic.d.ts +3 -0
- package/typings/question_signaturepad.d.ts +3 -1
- package/typings/question_textbase.d.ts +1 -2
- package/typings/settings.d.ts +21 -0
- package/typings/survey-events-api.d.ts +18 -6
- package/typings/survey.d.ts +13 -1
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.118
|
|
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
|
*/
|
|
@@ -112,7 +112,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
112
112
|
__webpack_require__.r(__webpack_exports__);
|
|
113
113
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SignaturePad; });
|
|
114
114
|
/*!
|
|
115
|
-
* Signature Pad v4.1.
|
|
115
|
+
* Signature Pad v4.1.7 | https://github.com/szimek/signature_pad
|
|
116
116
|
* (c) 2023 Szymon Nowak | Released under the MIT license
|
|
117
117
|
*/
|
|
118
118
|
|
|
@@ -143,14 +143,6 @@ class Point {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
class Bezier {
|
|
146
|
-
constructor(startPoint, control2, control1, endPoint, startWidth, endWidth) {
|
|
147
|
-
this.startPoint = startPoint;
|
|
148
|
-
this.control2 = control2;
|
|
149
|
-
this.control1 = control1;
|
|
150
|
-
this.endPoint = endPoint;
|
|
151
|
-
this.startWidth = startWidth;
|
|
152
|
-
this.endWidth = endWidth;
|
|
153
|
-
}
|
|
154
146
|
static fromPoints(points, widths) {
|
|
155
147
|
const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;
|
|
156
148
|
const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;
|
|
@@ -176,6 +168,14 @@ class Bezier {
|
|
|
176
168
|
c2: new Point(m2.x + tx, m2.y + ty),
|
|
177
169
|
};
|
|
178
170
|
}
|
|
171
|
+
constructor(startPoint, control2, control1, endPoint, startWidth, endWidth) {
|
|
172
|
+
this.startPoint = startPoint;
|
|
173
|
+
this.control2 = control2;
|
|
174
|
+
this.control1 = control1;
|
|
175
|
+
this.endPoint = endPoint;
|
|
176
|
+
this.startWidth = startWidth;
|
|
177
|
+
this.endWidth = endWidth;
|
|
178
|
+
}
|
|
179
179
|
length() {
|
|
180
180
|
const steps = 10;
|
|
181
181
|
let length = 0;
|
|
@@ -266,7 +266,7 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
266
266
|
constructor(canvas, options = {}) {
|
|
267
267
|
super();
|
|
268
268
|
this.canvas = canvas;
|
|
269
|
-
this.
|
|
269
|
+
this._drawingStroke = false;
|
|
270
270
|
this._isEmpty = true;
|
|
271
271
|
this._lastPoints = [];
|
|
272
272
|
this._data = [];
|
|
@@ -274,18 +274,14 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
274
274
|
this._lastWidth = 0;
|
|
275
275
|
this._handleMouseDown = (event) => {
|
|
276
276
|
if (event.buttons === 1) {
|
|
277
|
-
this._drawningStroke = true;
|
|
278
277
|
this._strokeBegin(event);
|
|
279
278
|
}
|
|
280
279
|
};
|
|
281
280
|
this._handleMouseMove = (event) => {
|
|
282
|
-
|
|
283
|
-
this._strokeMoveUpdate(event);
|
|
284
|
-
}
|
|
281
|
+
this._strokeMoveUpdate(event);
|
|
285
282
|
};
|
|
286
283
|
this._handleMouseUp = (event) => {
|
|
287
|
-
if (event.buttons === 1
|
|
288
|
-
this._drawningStroke = false;
|
|
284
|
+
if (event.buttons === 1) {
|
|
289
285
|
this._strokeEnd(event);
|
|
290
286
|
}
|
|
291
287
|
};
|
|
@@ -316,20 +312,15 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
316
312
|
}
|
|
317
313
|
};
|
|
318
314
|
this._handlePointerStart = (event) => {
|
|
319
|
-
this._drawningStroke = true;
|
|
320
315
|
event.preventDefault();
|
|
321
316
|
this._strokeBegin(event);
|
|
322
317
|
};
|
|
323
318
|
this._handlePointerMove = (event) => {
|
|
324
|
-
|
|
325
|
-
event.preventDefault();
|
|
326
|
-
this._strokeMoveUpdate(event);
|
|
327
|
-
}
|
|
319
|
+
this._strokeMoveUpdate(event);
|
|
328
320
|
};
|
|
329
321
|
this._handlePointerEnd = (event) => {
|
|
330
|
-
if (this.
|
|
322
|
+
if (this._drawingStroke) {
|
|
331
323
|
event.preventDefault();
|
|
332
|
-
this._drawningStroke = false;
|
|
333
324
|
this._strokeEnd(event);
|
|
334
325
|
}
|
|
335
326
|
};
|
|
@@ -450,7 +441,11 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
450
441
|
};
|
|
451
442
|
}
|
|
452
443
|
_strokeBegin(event) {
|
|
453
|
-
this.dispatchEvent(new CustomEvent('beginStroke', { detail: event }));
|
|
444
|
+
const cancelled = !this.dispatchEvent(new CustomEvent('beginStroke', { detail: event, cancelable: true }));
|
|
445
|
+
if (cancelled) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
this._drawingStroke = true;
|
|
454
449
|
const pointGroupOptions = this._getPointGroupOptions();
|
|
455
450
|
const newPointGroup = Object.assign(Object.assign({}, pointGroupOptions), { points: [] });
|
|
456
451
|
this._data.push(newPointGroup);
|
|
@@ -458,6 +453,9 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
458
453
|
this._strokeUpdate(event);
|
|
459
454
|
}
|
|
460
455
|
_strokeUpdate(event) {
|
|
456
|
+
if (!this._drawingStroke) {
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
461
459
|
if (this._data.length === 0) {
|
|
462
460
|
this._strokeBegin(event);
|
|
463
461
|
return;
|
|
@@ -496,17 +494,21 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
496
494
|
this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));
|
|
497
495
|
}
|
|
498
496
|
_strokeEnd(event) {
|
|
497
|
+
if (!this._drawingStroke) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
499
500
|
this._strokeUpdate(event);
|
|
501
|
+
this._drawingStroke = false;
|
|
500
502
|
this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));
|
|
501
503
|
}
|
|
502
504
|
_handlePointerEvents() {
|
|
503
|
-
this.
|
|
505
|
+
this._drawingStroke = false;
|
|
504
506
|
this.canvas.addEventListener('pointerdown', this._handlePointerStart);
|
|
505
507
|
this.canvas.addEventListener('pointermove', this._handlePointerMove);
|
|
506
508
|
this.canvas.ownerDocument.addEventListener('pointerup', this._handlePointerEnd);
|
|
507
509
|
}
|
|
508
510
|
_handleMouseEvents() {
|
|
509
|
-
this.
|
|
511
|
+
this._drawingStroke = false;
|
|
510
512
|
this.canvas.addEventListener('mousedown', this._handleMouseDown);
|
|
511
513
|
this.canvas.addEventListener('mousemove', this._handleMouseMove);
|
|
512
514
|
this.canvas.ownerDocument.addEventListener('mouseup', this._handleMouseUp);
|
|
@@ -4820,6 +4822,7 @@ var modernCss = {
|
|
|
4820
4822
|
},
|
|
4821
4823
|
saveData: {
|
|
4822
4824
|
root: "sv-save-data_root",
|
|
4825
|
+
rootWithButtons: "sv-save-data_root--with-buttons",
|
|
4823
4826
|
info: "sv-save-data_info",
|
|
4824
4827
|
error: "sv-save-data_error",
|
|
4825
4828
|
success: "sv-save-data_success",
|
|
@@ -5212,6 +5215,7 @@ var defaultStandardCss = {
|
|
|
5212
5215
|
},
|
|
5213
5216
|
saveData: {
|
|
5214
5217
|
root: "sv-save-data_root",
|
|
5218
|
+
rootWithButtons: "sv-save-data_root--with-buttons",
|
|
5215
5219
|
info: "sv-save-data_info",
|
|
5216
5220
|
error: "sv-save-data_error",
|
|
5217
5221
|
success: "sv-save-data_success",
|
|
@@ -5909,6 +5913,7 @@ var defaultV2Css = {
|
|
|
5909
5913
|
},
|
|
5910
5914
|
saveData: {
|
|
5911
5915
|
root: "sv-save-data_root",
|
|
5916
|
+
rootWithButtons: "sv-save-data_root--with-buttons",
|
|
5912
5917
|
info: "sv-save-data_info",
|
|
5913
5918
|
error: "sv-save-data_error",
|
|
5914
5919
|
success: "sv-save-data_success",
|
|
@@ -6174,7 +6179,10 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6174
6179
|
allow: true,
|
|
6175
6180
|
target: this.dragDropInfo.target,
|
|
6176
6181
|
source: this.dragDropInfo.source,
|
|
6182
|
+
toElement: this.dragDropInfo.target,
|
|
6183
|
+
draggedElement: this.dragDropInfo.source,
|
|
6177
6184
|
parent: parent,
|
|
6185
|
+
fromElement: this.dragDropInfo.source ? this.dragDropInfo.source.parent : null,
|
|
6178
6186
|
insertAfter: insertAfter,
|
|
6179
6187
|
insertBefore: insertBefore,
|
|
6180
6188
|
};
|
|
@@ -6587,10 +6595,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6587
6595
|
var draggedElementShortcut = document.createElement("div");
|
|
6588
6596
|
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n box-shadow: var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n padding: calc(0.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n border-radius: calc(0.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n ";
|
|
6589
6597
|
var itemValueNode = draggedElementNode.closest("[data-sv-drop-target-item-value]");
|
|
6590
|
-
|
|
6598
|
+
this.imagepickerControlsNode = itemValueNode.querySelector(".svc-image-item-value-controls");
|
|
6591
6599
|
var imageContainerNode = itemValueNode.querySelector(".sd-imagepicker__image-container");
|
|
6592
6600
|
var imageNode = itemValueNode.querySelector(item.imageLink ? "img" : ".sd-imagepicker__no-image").cloneNode(true);
|
|
6593
|
-
|
|
6601
|
+
if (!!this.imagepickerControlsNode) {
|
|
6602
|
+
this.imagepickerControlsNode.style.display = "none";
|
|
6603
|
+
}
|
|
6594
6604
|
imageContainerNode.style.width = imageNode.width + "px";
|
|
6595
6605
|
imageContainerNode.style.height = imageNode.height + "px";
|
|
6596
6606
|
imageNode.style.objectFit = "cover";
|
|
@@ -6680,6 +6690,10 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6680
6690
|
if (!!this.parentElement) {
|
|
6681
6691
|
this.updateVisibleChoices(this.parentElement);
|
|
6682
6692
|
}
|
|
6693
|
+
if (!!this.imagepickerControlsNode) {
|
|
6694
|
+
this.imagepickerControlsNode.style.display = "flex";
|
|
6695
|
+
this.imagepickerControlsNode = null;
|
|
6696
|
+
}
|
|
6683
6697
|
_super.prototype.clear.call(this);
|
|
6684
6698
|
};
|
|
6685
6699
|
DragDropChoices.prototype.updateVisibleChoices = function (parent) {
|
|
@@ -9273,8 +9287,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9273
9287
|
//import "../../modern.scss";
|
|
9274
9288
|
var Version;
|
|
9275
9289
|
var ReleaseDate;
|
|
9276
|
-
Version = "" + "1.9.
|
|
9277
|
-
ReleaseDate = "" + "2023-11-
|
|
9290
|
+
Version = "" + "1.9.118";
|
|
9291
|
+
ReleaseDate = "" + "2023-11-21";
|
|
9278
9292
|
function checkLibraryVersion(ver, libraryName) {
|
|
9279
9293
|
if (Version != ver) {
|
|
9280
9294
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -17592,6 +17606,11 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
17592
17606
|
return ((value === false && (this.type == "boolean" || this.type == "switch")) ||
|
|
17593
17607
|
value === "" || _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value));
|
|
17594
17608
|
};
|
|
17609
|
+
JsonObjectProperty.prototype.getSerializableValue = function (obj) {
|
|
17610
|
+
if (!!this.onSerializeValue)
|
|
17611
|
+
return this.onSerializeValue(obj);
|
|
17612
|
+
return this.getValue(obj);
|
|
17613
|
+
};
|
|
17595
17614
|
JsonObjectProperty.prototype.getValue = function (obj) {
|
|
17596
17615
|
if (this.onGetValue)
|
|
17597
17616
|
return this.onGetValue(obj);
|
|
@@ -18183,6 +18202,9 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
|
18183
18202
|
if (!!propInfo.baseValue) {
|
|
18184
18203
|
prop.setBaseValue(propInfo.baseValue);
|
|
18185
18204
|
}
|
|
18205
|
+
if (propInfo.onSerializeValue) {
|
|
18206
|
+
prop.onSerializeValue = propInfo.onSerializeValue;
|
|
18207
|
+
}
|
|
18186
18208
|
if (propInfo.onGetValue) {
|
|
18187
18209
|
prop.onGetValue = propInfo.onGetValue;
|
|
18188
18210
|
}
|
|
@@ -18977,7 +18999,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
18977
18999
|
if (property.isSerializable === false ||
|
|
18978
19000
|
(property.isLightSerializable === false && this.lightSerializing))
|
|
18979
19001
|
return;
|
|
18980
|
-
var value = property.
|
|
19002
|
+
var value = property.getSerializableValue(obj);
|
|
18981
19003
|
if (!storeDefaults && property.isDefaultValueByObj(obj, value))
|
|
18982
19004
|
return;
|
|
18983
19005
|
if (this.isValueArray(value)) {
|
|
@@ -20224,8 +20246,8 @@ var englishStrings = {
|
|
|
20224
20246
|
textMaxLength: "Please enter no more than {0} character(s).",
|
|
20225
20247
|
textMinMaxLength: "Please enter at least {0} and no more than {1} characters.",
|
|
20226
20248
|
minRowCountError: "Please fill in at least {0} row(s).",
|
|
20227
|
-
minSelectError: "Please select at least {0}
|
|
20228
|
-
maxSelectError: "Please select no more than {0}
|
|
20249
|
+
minSelectError: "Please select at least {0} option(s).",
|
|
20250
|
+
maxSelectError: "Please select no more than {0} option(s).",
|
|
20229
20251
|
numericMinMax: "The '{0}' should be at least {1} and at most {2}",
|
|
20230
20252
|
numericMin: "The '{0}' should be at least {1}",
|
|
20231
20253
|
numericMax: "The '{0}' should be at most {1}",
|
|
@@ -20677,9 +20699,19 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
20677
20699
|
enumerable: false,
|
|
20678
20700
|
configurable: true
|
|
20679
20701
|
});
|
|
20702
|
+
//a11y
|
|
20680
20703
|
QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
|
|
20681
|
-
|
|
20704
|
+
var row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase();
|
|
20705
|
+
var column = (this.getLocalizationString("matrix_column") || "column").toLocaleLowerCase();
|
|
20706
|
+
return row + " " + rowTitle + ", " + column + " " + columnTitle;
|
|
20682
20707
|
};
|
|
20708
|
+
Object.defineProperty(QuestionMatrixBaseModel.prototype, "isNewA11yStructure", {
|
|
20709
|
+
get: function () {
|
|
20710
|
+
return true;
|
|
20711
|
+
},
|
|
20712
|
+
enumerable: false,
|
|
20713
|
+
configurable: true
|
|
20714
|
+
});
|
|
20683
20715
|
__decorate([
|
|
20684
20716
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
20685
20717
|
], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
|
|
@@ -20859,6 +20891,7 @@ var Notifier = /** @class */ (function (_super) {
|
|
|
20859
20891
|
Notifier.prototype.getCssClass = function (type) {
|
|
20860
20892
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
|
|
20861
20893
|
.append(this.cssClasses.root)
|
|
20894
|
+
.append(this.cssClasses.rootWithButtons, this.actionBar.visibleActions.length > 0)
|
|
20862
20895
|
.append(this.cssClasses.info, type !== "error" && type !== "success")
|
|
20863
20896
|
.append(this.cssClasses.error, type === "error")
|
|
20864
20897
|
.append(this.cssClasses.success, type === "success")
|
|
@@ -25887,16 +25920,6 @@ var Question = /** @class */ (function (_super) {
|
|
|
25887
25920
|
this.updateCommentElements();
|
|
25888
25921
|
}
|
|
25889
25922
|
};
|
|
25890
|
-
Question.prototype.onCompositionUpdateComment = function (event) {
|
|
25891
|
-
var _this = this;
|
|
25892
|
-
if (this.isInputTextUpdate) {
|
|
25893
|
-
setTimeout(function () {
|
|
25894
|
-
if (event.target) {
|
|
25895
|
-
_this.comment = event.target.value;
|
|
25896
|
-
}
|
|
25897
|
-
}, 1);
|
|
25898
|
-
}
|
|
25899
|
-
};
|
|
25900
25923
|
Question.prototype.onCommentChange = function (event) {
|
|
25901
25924
|
this.comment = event.target.value;
|
|
25902
25925
|
if (this.comment !== event.target.value) {
|
|
@@ -26424,6 +26447,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26424
26447
|
* @see otherItem
|
|
26425
26448
|
* @see otherErrorText
|
|
26426
26449
|
* @see showCommentArea
|
|
26450
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
26427
26451
|
*/
|
|
26428
26452
|
get: function () {
|
|
26429
26453
|
return this.getPropertyValue("showOtherItem", false);
|
|
@@ -28594,6 +28618,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28594
28618
|
* When users select the "None" item in multi-select questions, all other items become unselected.
|
|
28595
28619
|
* @see noneItem
|
|
28596
28620
|
* @see noneText
|
|
28621
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
28597
28622
|
*/
|
|
28598
28623
|
get: function () {
|
|
28599
28624
|
return this.getPropertyValue("showNoneItem");
|
|
@@ -29075,6 +29100,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29075
29100
|
*
|
|
29076
29101
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdownrestfull/ (linkStyle))
|
|
29077
29102
|
* @see choices
|
|
29103
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29078
29104
|
*/
|
|
29079
29105
|
get: function () {
|
|
29080
29106
|
return this.getPropertyValue("choicesByUrl");
|
|
@@ -29108,6 +29134,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29108
29134
|
* If you need to specify only the `value` property, you can set the `choices` property to an array of primitive values, for example, `[ "item1", "item2", "item3" ]`. These values are both saved in survey results and used as display text.
|
|
29109
29135
|
* @see choicesByUrl
|
|
29110
29136
|
* @see choicesFromQuestion
|
|
29137
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29111
29138
|
*/
|
|
29112
29139
|
get: function () {
|
|
29113
29140
|
return this.getPropertyValue("choices");
|
|
@@ -29250,6 +29277,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29250
29277
|
* - `"asc"`- Sorts choice items in ascending order.
|
|
29251
29278
|
* - `"desc"`- Sorts choice items in ascending order.
|
|
29252
29279
|
* - `"random"` - Displays choice items in random order.
|
|
29280
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29253
29281
|
*/
|
|
29254
29282
|
get: function () {
|
|
29255
29283
|
return this.getPropertyValue("choicesOrder");
|
|
@@ -29774,16 +29802,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29774
29802
|
this.updateCommentElements();
|
|
29775
29803
|
}
|
|
29776
29804
|
};
|
|
29777
|
-
QuestionSelectBase.prototype.onCompositionUpdateOtherValue = function (event) {
|
|
29778
|
-
var _this = this;
|
|
29779
|
-
if (this.isInputTextUpdate) {
|
|
29780
|
-
setTimeout(function () {
|
|
29781
|
-
if (event.target) {
|
|
29782
|
-
_this.otherValue = event.target.value;
|
|
29783
|
-
}
|
|
29784
|
-
}, 1);
|
|
29785
|
-
}
|
|
29786
|
-
};
|
|
29787
29805
|
QuestionSelectBase.prototype.onOtherValueChange = function (event) {
|
|
29788
29806
|
this.otherValue = event.target.value;
|
|
29789
29807
|
if (this.otherValue !== event.target.value) {
|
|
@@ -31447,12 +31465,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31447
31465
|
* @see enabledChoices
|
|
31448
31466
|
*/
|
|
31449
31467
|
get: function () {
|
|
31468
|
+
var val = this.renderedValue;
|
|
31469
|
+
var visChoices = this.visibleChoices;
|
|
31470
|
+
var selectedItemValues = this.selectedItemValues;
|
|
31450
31471
|
if (this.isEmpty())
|
|
31451
31472
|
return [];
|
|
31452
|
-
var
|
|
31453
|
-
var allChoices = !!this.defaultSelectedItemValues ? [].concat(this.defaultSelectedItemValues, this.visibleChoices) : this.visibleChoices;
|
|
31473
|
+
var allChoices = !!this.defaultSelectedItemValues ? [].concat(this.defaultSelectedItemValues, visChoices) : visChoices;
|
|
31454
31474
|
var itemValues = val.map(function (item) { return _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"].getItemByValue(allChoices, item); }).filter(function (item) { return !!item; });
|
|
31455
|
-
if (!itemValues.length && !
|
|
31475
|
+
if (!itemValues.length && !selectedItemValues) {
|
|
31456
31476
|
this.updateSelectedItemValues();
|
|
31457
31477
|
}
|
|
31458
31478
|
return this.validateItemValues(itemValues);
|
|
@@ -32050,7 +32070,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
32050
32070
|
this.updateRemainingCharacterCounter(event.target.value);
|
|
32051
32071
|
};
|
|
32052
32072
|
QuestionCommentModel.prototype.onKeyDown = function (event) {
|
|
32053
|
-
this.
|
|
32073
|
+
this.onKeyDownPreprocess && this.onKeyDownPreprocess(event);
|
|
32054
32074
|
if (!this.acceptCarriageReturn && (event.key === "Enter" || event.keyCode === 13)) {
|
|
32055
32075
|
event.preventDefault();
|
|
32056
32076
|
event.stopPropagation();
|
|
@@ -34191,7 +34211,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34191
34211
|
_this.onUploadStateChanged = _this.addEvent();
|
|
34192
34212
|
_this.onStateChanged = _this.addEvent();
|
|
34193
34213
|
_this.fileNavigator = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
34194
|
-
_this.actionsContainer = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
34195
34214
|
_this.canFlipCameraValue = undefined;
|
|
34196
34215
|
_this.prevPreviewLength = 0;
|
|
34197
34216
|
_this.calcAvailableItemsCount = function (availableWidth, itemWidth, gap) {
|
|
@@ -34250,6 +34269,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34250
34269
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["loadFileFromBase64"])(data.content, data.name);
|
|
34251
34270
|
}
|
|
34252
34271
|
};
|
|
34272
|
+
_this.createLocalizableString("takePhotoCaption", _this, false, true);
|
|
34273
|
+
_this.actionsContainer = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
34274
|
+
_this.actionsContainer.locOwner = _this;
|
|
34253
34275
|
_this.fileIndexAction = new _actions_action__WEBPACK_IMPORTED_MODULE_8__["Action"]({
|
|
34254
34276
|
id: "fileIndex",
|
|
34255
34277
|
title: _this.getFileIndexCaption(),
|
|
@@ -34276,7 +34298,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34276
34298
|
id: "sv-file-take-picture",
|
|
34277
34299
|
iconSize: "auto",
|
|
34278
34300
|
innerCss: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(_this.cssClasses.contextButton).append(_this.cssClasses.takePictureButton).toString(); }),
|
|
34279
|
-
|
|
34301
|
+
locTitle: _this.locTakePhotoCaption,
|
|
34280
34302
|
showTitle: false,
|
|
34281
34303
|
action: function () {
|
|
34282
34304
|
_this.snapPicture();
|
|
@@ -34312,7 +34334,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34312
34334
|
iconName: "icon-takepicture_24x24",
|
|
34313
34335
|
id: "sv-file-start-camera",
|
|
34314
34336
|
iconSize: "auto",
|
|
34315
|
-
|
|
34337
|
+
locTitle: _this.locTakePhotoCaption,
|
|
34316
34338
|
showTitle: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return !_this.isAnswered; }),
|
|
34317
34339
|
enabledIf: function () { return !_this.isInputReadOnly; },
|
|
34318
34340
|
action: function () {
|
|
@@ -34647,6 +34669,17 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34647
34669
|
QuestionFileModel.prototype.getConfirmRemoveMessage = function (fileName) {
|
|
34648
34670
|
return this.confirmRemoveMessage.format(fileName);
|
|
34649
34671
|
};
|
|
34672
|
+
Object.defineProperty(QuestionFileModel.prototype, "takePhotoCaption", {
|
|
34673
|
+
get: function () { return this.getLocalizableStringText("takePhotoCaption"); },
|
|
34674
|
+
set: function (val) { this.setLocalizableStringText("takePhotoCaption", val); },
|
|
34675
|
+
enumerable: false,
|
|
34676
|
+
configurable: true
|
|
34677
|
+
});
|
|
34678
|
+
Object.defineProperty(QuestionFileModel.prototype, "locTakePhotoCaption", {
|
|
34679
|
+
get: function () { return this.getLocalizableString("takePhotoCaption"); },
|
|
34680
|
+
enumerable: false,
|
|
34681
|
+
configurable: true
|
|
34682
|
+
});
|
|
34650
34683
|
Object.defineProperty(QuestionFileModel.prototype, "locRenderedPlaceholder", {
|
|
34651
34684
|
get: function () {
|
|
34652
34685
|
var _this = this;
|
|
@@ -35255,9 +35288,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
35255
35288
|
__decorate([
|
|
35256
35289
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "chooseFileCaption" } })
|
|
35257
35290
|
], QuestionFileModel.prototype, "chooseButtonCaption", void 0);
|
|
35258
|
-
__decorate([
|
|
35259
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "takePhotoCaption" } })
|
|
35260
|
-
], QuestionFileModel.prototype, "takePhotoCaption", void 0);
|
|
35261
35291
|
__decorate([
|
|
35262
35292
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "replaceFileCaption" } })
|
|
35263
35293
|
], QuestionFileModel.prototype, "replaceButtonCaption", void 0);
|
|
@@ -37503,7 +37533,19 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
|
37503
37533
|
this.data = data;
|
|
37504
37534
|
this.questionValue = this.createQuestion(column, row, data);
|
|
37505
37535
|
this.questionValue.updateCustomWidget();
|
|
37536
|
+
this.updateCellQuestionTitleDueToAccessebility(row);
|
|
37506
37537
|
}
|
|
37538
|
+
MatrixDropdownCell.prototype.updateCellQuestionTitleDueToAccessebility = function (row) {
|
|
37539
|
+
var _this = this;
|
|
37540
|
+
this.questionValue.locTitle.onGetTextCallback = function (str) {
|
|
37541
|
+
if (!row || !row.getSurvey())
|
|
37542
|
+
return _this.questionValue.title;
|
|
37543
|
+
var rowTitle = row.getAccessbilityText();
|
|
37544
|
+
if (!rowTitle)
|
|
37545
|
+
return _this.questionValue.title;
|
|
37546
|
+
return _this.column.colOwner.getCellAriaLabel(rowTitle, _this.questionValue.title);
|
|
37547
|
+
};
|
|
37548
|
+
};
|
|
37507
37549
|
MatrixDropdownCell.prototype.locStrsChanged = function () {
|
|
37508
37550
|
this.question.locStrsChanged();
|
|
37509
37551
|
};
|
|
@@ -37661,6 +37703,13 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
37661
37703
|
enumerable: false,
|
|
37662
37704
|
configurable: true
|
|
37663
37705
|
});
|
|
37706
|
+
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "dataName", {
|
|
37707
|
+
get: function () {
|
|
37708
|
+
return this.rowName;
|
|
37709
|
+
},
|
|
37710
|
+
enumerable: false,
|
|
37711
|
+
configurable: true
|
|
37712
|
+
});
|
|
37664
37713
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "text", {
|
|
37665
37714
|
get: function () {
|
|
37666
37715
|
return this.rowName;
|
|
@@ -37717,6 +37766,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
37717
37766
|
enumerable: false,
|
|
37718
37767
|
configurable: true
|
|
37719
37768
|
});
|
|
37769
|
+
MatrixDropdownRowModelBase.prototype.getAccessbilityText = function () {
|
|
37770
|
+
return this.locText && this.locText.renderedHtml;
|
|
37771
|
+
};
|
|
37720
37772
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "hasPanel", {
|
|
37721
37773
|
get: function () {
|
|
37722
37774
|
if (!this.data)
|
|
@@ -39325,7 +39377,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39325
39377
|
questionPlainData.isNode = true;
|
|
39326
39378
|
questionPlainData.data = this.visibleRows.map(function (row) {
|
|
39327
39379
|
var rowDataItem = {
|
|
39328
|
-
name: row.
|
|
39380
|
+
name: row.dataName,
|
|
39329
39381
|
title: row.text,
|
|
39330
39382
|
value: row.value,
|
|
39331
39383
|
displayValue: _this.getRowDisplayValue(false, row, row.value),
|
|
@@ -41139,12 +41191,6 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41139
41191
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "headers", {
|
|
41140
41192
|
get: function () {
|
|
41141
41193
|
if (this.cell && this.cell.column) {
|
|
41142
|
-
if (this.cell.column.cellHint === " ") {
|
|
41143
|
-
return "";
|
|
41144
|
-
}
|
|
41145
|
-
if (!!this.cell.column.cellHint) {
|
|
41146
|
-
return this.cell.column.locCellHint.renderedHtml;
|
|
41147
|
-
}
|
|
41148
41194
|
if (this.matrix.IsMultiplyColumn(this.cell.column)) {
|
|
41149
41195
|
if (!!this.item) {
|
|
41150
41196
|
return this.item.locText.renderedHtml;
|
|
@@ -41153,6 +41199,13 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41153
41199
|
return "";
|
|
41154
41200
|
}
|
|
41155
41201
|
}
|
|
41202
|
+
var cellHint = this.cell.column.cellHint;
|
|
41203
|
+
if (!!cellHint) {
|
|
41204
|
+
if (cellHint.trim() === "")
|
|
41205
|
+
return "";
|
|
41206
|
+
return this.cell.column.locCellHint.renderedHtml;
|
|
41207
|
+
}
|
|
41208
|
+
return this.cell.column.title;
|
|
41156
41209
|
}
|
|
41157
41210
|
if (this.hasQuestion && this.question.isVisible) {
|
|
41158
41211
|
return this.question.locTitle.renderedHtml;
|
|
@@ -42210,6 +42263,23 @@ var MatrixDynamicRowModel = /** @class */ (function (_super) {
|
|
|
42210
42263
|
enumerable: false,
|
|
42211
42264
|
configurable: true
|
|
42212
42265
|
});
|
|
42266
|
+
Object.defineProperty(MatrixDynamicRowModel.prototype, "dataName", {
|
|
42267
|
+
get: function () {
|
|
42268
|
+
return "row" + (this.index + 1);
|
|
42269
|
+
},
|
|
42270
|
+
enumerable: false,
|
|
42271
|
+
configurable: true
|
|
42272
|
+
});
|
|
42273
|
+
Object.defineProperty(MatrixDynamicRowModel.prototype, "text", {
|
|
42274
|
+
get: function () {
|
|
42275
|
+
return "row " + (this.index + 1);
|
|
42276
|
+
},
|
|
42277
|
+
enumerable: false,
|
|
42278
|
+
configurable: true
|
|
42279
|
+
});
|
|
42280
|
+
MatrixDynamicRowModel.prototype.getAccessbilityText = function () {
|
|
42281
|
+
return (this.index + 1).toString();
|
|
42282
|
+
};
|
|
42213
42283
|
Object.defineProperty(MatrixDynamicRowModel.prototype, "shortcutText", {
|
|
42214
42284
|
get: function () {
|
|
42215
42285
|
var matrix = this.data;
|
|
@@ -49786,7 +49856,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
49786
49856
|
_this.updateRemainingCharacterCounter(event.target.value);
|
|
49787
49857
|
};
|
|
49788
49858
|
_this.onKeyDown = function (event) {
|
|
49789
|
-
_this.
|
|
49859
|
+
_this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
|
|
49790
49860
|
if (_this.isInputTextUpdate) {
|
|
49791
49861
|
_this._isWaitingForEnter = event.keyCode === 229;
|
|
49792
49862
|
}
|
|
@@ -50547,7 +50617,6 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
|
50547
50617
|
function QuestionTextBase(name) {
|
|
50548
50618
|
var _this = _super.call(this, name) || this;
|
|
50549
50619
|
_this.characterCounter = new CharacterCounter();
|
|
50550
|
-
_this.disableNativeUndoRedo = false;
|
|
50551
50620
|
return _this;
|
|
50552
50621
|
}
|
|
50553
50622
|
QuestionTextBase.prototype.isTextValue = function () {
|
|
@@ -50673,13 +50742,6 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
|
50673
50742
|
return val;
|
|
50674
50743
|
};
|
|
50675
50744
|
QuestionTextBase.prototype.getValueSeparator = function () { return ", "; };
|
|
50676
|
-
QuestionTextBase.prototype.checkForUndo = function (event) {
|
|
50677
|
-
if (this.disableNativeUndoRedo && this.isInputTextUpdate && (event.ctrlKey || event.metaKey)) {
|
|
50678
|
-
if ([89, 90].indexOf(event.keyCode) !== -1) {
|
|
50679
|
-
event.preventDefault();
|
|
50680
|
-
}
|
|
50681
|
-
}
|
|
50682
|
-
};
|
|
50683
50745
|
QuestionTextBase.prototype.getControlCssClassBuilder = function () {
|
|
50684
50746
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
|
|
50685
50747
|
.append(this.cssClasses.root)
|
|
@@ -51571,6 +51633,27 @@ var settings = {
|
|
|
51571
51633
|
* Default value: `"none"`
|
|
51572
51634
|
*/
|
|
51573
51635
|
noneItemValue: "none",
|
|
51636
|
+
/**
|
|
51637
|
+
* An object whose properties specify the order of the special choice items (None, Other, Select All) in select-based questions.
|
|
51638
|
+
*
|
|
51639
|
+
* Default value: `{ selectAllItem: [-1], noneItem: [1], otherItem: [2] }`
|
|
51640
|
+
*
|
|
51641
|
+
* Use this object to reorder special choices. Each property accepts an array of integer numbers. Negative numbers place a special choice item above regular choice items, positive numbers place it below them. For instance, the code below specifies the following order of choices: None, Select All, regular choices, Other.
|
|
51642
|
+
*
|
|
51643
|
+
* ```js
|
|
51644
|
+
* import { settings } from "survey-core";
|
|
51645
|
+
*
|
|
51646
|
+
* settings.specialChoicesOrder.noneItem = [-2];
|
|
51647
|
+
* settings.specialChoicesOrder.selectAllItem = [-1];
|
|
51648
|
+
* settings.specialChoicesOrder.otherItem = [1];
|
|
51649
|
+
* ```
|
|
51650
|
+
*
|
|
51651
|
+
* If you want to duplicate a special choice item above and below other choices, add two numbers to the corresponding array:
|
|
51652
|
+
*
|
|
51653
|
+
* ```js
|
|
51654
|
+
* settings.specialChoicesOrder.selectAllItem = [-1, 3] // Displays Select All above and below other choices
|
|
51655
|
+
* ```
|
|
51656
|
+
*/
|
|
51574
51657
|
specialChoicesOrder: {
|
|
51575
51658
|
selectAllItem: [-1],
|
|
51576
51659
|
noneItem: [1],
|
|
@@ -52498,9 +52581,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52498
52581
|
* @see isExpanded
|
|
52499
52582
|
*/
|
|
52500
52583
|
get: function () {
|
|
52501
|
-
|
|
52502
|
-
return;
|
|
52503
|
-
return this.state === "collapsed";
|
|
52584
|
+
return this.state === "collapsed" && !this.isDesignMode;
|
|
52504
52585
|
},
|
|
52505
52586
|
enumerable: false,
|
|
52506
52587
|
configurable: true
|
|
@@ -57236,6 +57317,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57236
57317
|
this.notify(this.completedStateText, this.completedState, value === "error");
|
|
57237
57318
|
}
|
|
57238
57319
|
};
|
|
57320
|
+
/**
|
|
57321
|
+
* Displays a toast notification with a specified message.
|
|
57322
|
+
*
|
|
57323
|
+
* Depending on the `type` argument, a survey can display the following notification types:
|
|
57324
|
+
*
|
|
57325
|
+
* 
|
|
57326
|
+
* @param message A message to display.
|
|
57327
|
+
* @param type A notification type: `"info"` (default), `"success"`, or `"error"`.
|
|
57328
|
+
* @param showActions For internal use.
|
|
57329
|
+
*/
|
|
57239
57330
|
SurveyModel.prototype.notify = function (message, type, showActions) {
|
|
57240
57331
|
if (showActions === void 0) { showActions = false; }
|
|
57241
57332
|
this.notifier.showActions = showActions;
|
|
@@ -58056,14 +58147,14 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58056
58147
|
if (this.isShowingPreview)
|
|
58057
58148
|
return;
|
|
58058
58149
|
if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
|
|
58059
|
-
if (this.
|
|
58060
|
-
this.restoreOriginalPages(this.
|
|
58150
|
+
if (this.originalPages) {
|
|
58151
|
+
this.restoreOriginalPages(this.originalPages);
|
|
58061
58152
|
}
|
|
58062
|
-
this.
|
|
58153
|
+
this.originalPages = undefined;
|
|
58063
58154
|
}
|
|
58064
58155
|
else {
|
|
58065
58156
|
if (!oldValue || oldValue == "standard") {
|
|
58066
|
-
this.
|
|
58157
|
+
this.originalPages = this.pages.slice(0, this.pages.length);
|
|
58067
58158
|
}
|
|
58068
58159
|
this.setupPagesForPageModes(this.isSinglePage);
|
|
58069
58160
|
}
|
|
@@ -61620,7 +61711,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
61620
61711
|
className: "htmlconditionitem", isArray: true
|
|
61621
61712
|
},
|
|
61622
61713
|
{ name: "loadingHtml:html", serializationProperty: "locLoadingHtml" },
|
|
61623
|
-
{ name: "pages:surveypages", className: "page", isArray: true },
|
|
61714
|
+
{ name: "pages:surveypages", className: "page", isArray: true, onSerializeValue: function (obj) { return obj.originalPages || obj.pages; } },
|
|
61624
61715
|
{
|
|
61625
61716
|
name: "elements",
|
|
61626
61717
|
alternativeName: "questions",
|
|
@@ -64063,19 +64154,36 @@ var ResponsivityManager = /** @class */ (function () {
|
|
|
64063
64154
|
configurable: true
|
|
64064
64155
|
});
|
|
64065
64156
|
ResponsivityManager.prototype.process = function () {
|
|
64066
|
-
var
|
|
64157
|
+
var _this = this;
|
|
64067
64158
|
if (this.isContainerVisible && !this.model.isResponsivenessDisabled) {
|
|
64068
64159
|
if (!this.isInitialized) {
|
|
64069
64160
|
this.model.setActionsMode("large");
|
|
64070
|
-
|
|
64071
|
-
|
|
64161
|
+
var recalcItemSizes = function () {
|
|
64162
|
+
_this.calcItemsSizes();
|
|
64163
|
+
_this.isInitialized = true;
|
|
64164
|
+
};
|
|
64165
|
+
if (queueMicrotask) {
|
|
64166
|
+
queueMicrotask(recalcItemSizes);
|
|
64167
|
+
}
|
|
64168
|
+
else {
|
|
64169
|
+
recalcItemSizes();
|
|
64170
|
+
}
|
|
64072
64171
|
}
|
|
64073
|
-
var
|
|
64074
|
-
|
|
64075
|
-
var
|
|
64076
|
-
|
|
64172
|
+
var processResponsiveness = function () {
|
|
64173
|
+
var _a;
|
|
64174
|
+
var dotsItemSize = _this.dotsItemSize;
|
|
64175
|
+
if (!_this.dotsItemSize) {
|
|
64176
|
+
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(".sv-dots");
|
|
64177
|
+
dotsItemSize = dotsItemElement && _this.calcItemSize(dotsItemElement) || _this.dotsSizeConst;
|
|
64178
|
+
}
|
|
64179
|
+
_this.model.fit(_this.getAvailableSpace(), dotsItemSize);
|
|
64180
|
+
};
|
|
64181
|
+
if (queueMicrotask) {
|
|
64182
|
+
queueMicrotask(processResponsiveness);
|
|
64183
|
+
}
|
|
64184
|
+
else {
|
|
64185
|
+
processResponsiveness();
|
|
64077
64186
|
}
|
|
64078
|
-
this.model.fit(this.getAvailableSpace(), dotsItemSize);
|
|
64079
64187
|
}
|
|
64080
64188
|
};
|
|
64081
64189
|
ResponsivityManager.prototype.dispose = function () {
|
|
@@ -64497,6 +64605,9 @@ function findParentByClassNames(element, classNames) {
|
|
|
64497
64605
|
function sanitizeEditableContent(element) {
|
|
64498
64606
|
if (window.getSelection && document.createRange && element.childNodes.length > 0) {
|
|
64499
64607
|
var selection = document.getSelection();
|
|
64608
|
+
if (selection.rangeCount == 0) {
|
|
64609
|
+
return;
|
|
64610
|
+
}
|
|
64500
64611
|
var range = selection.getRangeAt(0);
|
|
64501
64612
|
range.setStart(range.endContainer, range.endOffset);
|
|
64502
64613
|
range.setEndAfter(element.lastChild);
|