survey-core 1.9.117 → 1.9.119
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 +125 -42
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +125 -42
- 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 +4 -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 +413 -183
- 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/base-interfaces.d.ts +2 -1
- package/ts3.4/typings/conditionProcessValue.d.ts +1 -0
- 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 +9 -3
- package/ts3.4/typings/dragdrop/choices.d.ts +1 -0
- package/ts3.4/typings/jsonobject.d.ts +2 -0
- package/ts3.4/typings/localization/english.d.ts +1 -0
- package/ts3.4/typings/martixBase.d.ts +1 -0
- package/ts3.4/typings/notifier.d.ts +11 -8
- package/ts3.4/typings/page.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +4 -1
- package/ts3.4/typings/question.d.ts +3 -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_ranking.d.ts +6 -0
- package/ts3.4/typings/question_rating.d.ts +1 -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 +20 -8
- package/ts3.4/typings/survey.d.ts +47 -11
- package/ts3.4/typings/surveyStrings.d.ts +1 -0
- package/ts3.4/typings/themes.d.ts +2 -2
- package/typings/base-interfaces.d.ts +2 -1
- package/typings/conditionProcessValue.d.ts +1 -0
- package/typings/defaultCss/cssmodern.d.ts +1 -0
- package/typings/defaultCss/cssstandard.d.ts +1 -0
- package/typings/defaultCss/defaultV2Css.d.ts +9 -3
- package/typings/dragdrop/choices.d.ts +1 -0
- package/typings/jsonobject.d.ts +2 -0
- package/typings/localization/english.d.ts +1 -0
- package/typings/martixBase.d.ts +1 -0
- package/typings/notifier.d.ts +11 -8
- package/typings/page.d.ts +1 -0
- package/typings/panel.d.ts +4 -1
- package/typings/question.d.ts +3 -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_ranking.d.ts +6 -0
- package/typings/question_rating.d.ts +1 -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 +20 -8
- package/typings/survey.d.ts +48 -11
- package/typings/surveyStrings.d.ts +1 -0
- package/typings/themes.d.ts +2 -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.119
|
|
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);
|
|
@@ -2135,7 +2137,7 @@ var Base = /** @class */ (function () {
|
|
|
2135
2137
|
Base.prototype.resetPropertyValue = function (name) {
|
|
2136
2138
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
|
2137
2139
|
if (locStr) {
|
|
2138
|
-
locStr.
|
|
2140
|
+
locStr.clear();
|
|
2139
2141
|
}
|
|
2140
2142
|
else {
|
|
2141
2143
|
this.setPropertyValue(name, undefined);
|
|
@@ -3967,7 +3969,20 @@ var ProcessValue = /** @class */ (function () {
|
|
|
3967
3969
|
return res;
|
|
3968
3970
|
};
|
|
3969
3971
|
ProcessValue.prototype.getNonNestedObject = function (obj, text, createPath) {
|
|
3970
|
-
var
|
|
3972
|
+
var checkedKeys = new Array();
|
|
3973
|
+
var len = 0;
|
|
3974
|
+
var res = this.getNonNestedObjectCore(obj, text, createPath, checkedKeys);
|
|
3975
|
+
while (!res && len < checkedKeys.length) {
|
|
3976
|
+
len = checkedKeys.length;
|
|
3977
|
+
res = this.getNonNestedObjectCore(obj, text, createPath, checkedKeys);
|
|
3978
|
+
}
|
|
3979
|
+
return res;
|
|
3980
|
+
};
|
|
3981
|
+
ProcessValue.prototype.getNonNestedObjectCore = function (obj, text, createPath, checkedKeys) {
|
|
3982
|
+
var curName = this.getFirstPropertyName(text, obj, createPath, checkedKeys);
|
|
3983
|
+
if (!!curName) {
|
|
3984
|
+
checkedKeys.push(curName);
|
|
3985
|
+
}
|
|
3971
3986
|
var path = !!curName ? [curName] : null;
|
|
3972
3987
|
while (text != curName && !!obj) {
|
|
3973
3988
|
var isArray = text[0] == "[";
|
|
@@ -3990,7 +4005,7 @@ var ProcessValue = /** @class */ (function () {
|
|
|
3990
4005
|
if (!!text && text[0] == ".") {
|
|
3991
4006
|
text = text.substring(1);
|
|
3992
4007
|
}
|
|
3993
|
-
curName = this.getFirstPropertyName(text, obj, createPath);
|
|
4008
|
+
curName = this.getFirstPropertyName(text, obj, createPath, checkedKeys);
|
|
3994
4009
|
if (!!curName) {
|
|
3995
4010
|
path.push(curName);
|
|
3996
4011
|
}
|
|
@@ -4012,8 +4027,9 @@ var ProcessValue = /** @class */ (function () {
|
|
|
4012
4027
|
return null;
|
|
4013
4028
|
return { value: curValue[index], text: text, index: index };
|
|
4014
4029
|
};
|
|
4015
|
-
ProcessValue.prototype.getFirstPropertyName = function (name, obj, createProp) {
|
|
4030
|
+
ProcessValue.prototype.getFirstPropertyName = function (name, obj, createProp, checkedKeys) {
|
|
4016
4031
|
if (createProp === void 0) { createProp = false; }
|
|
4032
|
+
if (checkedKeys === void 0) { checkedKeys = undefined; }
|
|
4017
4033
|
if (!name)
|
|
4018
4034
|
return name;
|
|
4019
4035
|
if (!obj)
|
|
@@ -4024,6 +4040,8 @@ var ProcessValue = /** @class */ (function () {
|
|
|
4024
4040
|
var A = nameInLow[0];
|
|
4025
4041
|
var a = A.toUpperCase();
|
|
4026
4042
|
for (var key in obj) {
|
|
4043
|
+
if (Array.isArray(checkedKeys) && checkedKeys.indexOf(key) > -1)
|
|
4044
|
+
continue;
|
|
4027
4045
|
var first = key[0];
|
|
4028
4046
|
if (first === a || first === A) {
|
|
4029
4047
|
var keyName = key.toLowerCase();
|
|
@@ -4820,6 +4838,7 @@ var modernCss = {
|
|
|
4820
4838
|
},
|
|
4821
4839
|
saveData: {
|
|
4822
4840
|
root: "sv-save-data_root",
|
|
4841
|
+
rootWithButtons: "sv-save-data_root--with-buttons",
|
|
4823
4842
|
info: "sv-save-data_info",
|
|
4824
4843
|
error: "sv-save-data_error",
|
|
4825
4844
|
success: "sv-save-data_success",
|
|
@@ -5212,6 +5231,7 @@ var defaultStandardCss = {
|
|
|
5212
5231
|
},
|
|
5213
5232
|
saveData: {
|
|
5214
5233
|
root: "sv-save-data_root",
|
|
5234
|
+
rootWithButtons: "sv-save-data_root--with-buttons",
|
|
5215
5235
|
info: "sv-save-data_info",
|
|
5216
5236
|
error: "sv-save-data_error",
|
|
5217
5237
|
success: "sv-save-data_success",
|
|
@@ -5361,7 +5381,8 @@ var defaultV2Css = {
|
|
|
5361
5381
|
nested: "sd-element--nested sd-element--nested-with-borders",
|
|
5362
5382
|
invisible: "sd-element--invisible",
|
|
5363
5383
|
navigationButton: "",
|
|
5364
|
-
compact: "sd-element--with-frame sd-element--compact"
|
|
5384
|
+
compact: "sd-element--with-frame sd-element--compact",
|
|
5385
|
+
errorsContainer: "sd-panel__errbox sd-element__erbox sd-element__erbox--above-element"
|
|
5365
5386
|
},
|
|
5366
5387
|
paneldynamic: {
|
|
5367
5388
|
mainRoot: "sd-element sd-question sd-question--paneldynamic sd-element--complex sd-question--complex sd-row__question",
|
|
@@ -5427,7 +5448,8 @@ var defaultV2Css = {
|
|
|
5427
5448
|
root: "sd-page sd-body__page",
|
|
5428
5449
|
emptyHeaderRoot: "sd-page__empty-header",
|
|
5429
5450
|
title: "sd-title sd-page__title",
|
|
5430
|
-
description: "sd-description sd-page__description"
|
|
5451
|
+
description: "sd-description sd-page__description",
|
|
5452
|
+
errorsContainer: "sd-page__errbox"
|
|
5431
5453
|
},
|
|
5432
5454
|
pageTitle: "sd-title sd-page__title",
|
|
5433
5455
|
pageDescription: "sd-description sd-page__description",
|
|
@@ -5482,6 +5504,9 @@ var defaultV2Css = {
|
|
|
5482
5504
|
invisible: "sd-element--invisible",
|
|
5483
5505
|
composite: "sd-element--complex",
|
|
5484
5506
|
disabled: "sd-question--disabled",
|
|
5507
|
+
errorsContainer: "sd-element__erbox sd-question__erbox",
|
|
5508
|
+
errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
|
|
5509
|
+
errorsContainerBottom: "sd-question__erbox--below-question"
|
|
5485
5510
|
},
|
|
5486
5511
|
image: {
|
|
5487
5512
|
mainRoot: "sd-question sd-question--image",
|
|
@@ -5498,14 +5523,11 @@ var defaultV2Css = {
|
|
|
5498
5523
|
withFrame: ""
|
|
5499
5524
|
},
|
|
5500
5525
|
error: {
|
|
5501
|
-
root: "sd-
|
|
5526
|
+
root: "sd-error",
|
|
5502
5527
|
icon: "",
|
|
5503
5528
|
item: "",
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
belowQuestion: "sd-question__erbox--below-question",
|
|
5507
|
-
locationTop: "sd-question__erbox--location--top",
|
|
5508
|
-
locationBottom: "sd-question__erbox--location--bottom"
|
|
5529
|
+
locationTop: "",
|
|
5530
|
+
locationBottom: ""
|
|
5509
5531
|
},
|
|
5510
5532
|
checkbox: {
|
|
5511
5533
|
root: "sd-selectbase",
|
|
@@ -5724,6 +5746,8 @@ var defaultV2Css = {
|
|
|
5724
5746
|
rowHasEndActions: "sd-table__row--has-end-actions",
|
|
5725
5747
|
headerCell: "sd-table__cell sd-table__cell--header",
|
|
5726
5748
|
rowTextCell: "sd-table__cell sd-table__cell--row-text",
|
|
5749
|
+
footerCell: "sd-table__cell sd-table__cell--footer",
|
|
5750
|
+
footerTotalCell: "sd-table__cell sd-table__cell--footer-total",
|
|
5727
5751
|
columnTitleCell: "sd-table__cell--column-title",
|
|
5728
5752
|
cellRequiredText: "sd-question__required-text",
|
|
5729
5753
|
detailButton: "sd-table__cell--detail-button",
|
|
@@ -5759,6 +5783,7 @@ var defaultV2Css = {
|
|
|
5759
5783
|
itemCell: "sd-table__cell--item",
|
|
5760
5784
|
headerCell: "sd-table__cell sd-table__cell--header",
|
|
5761
5785
|
rowTextCell: "sd-table__cell sd-table__cell--row-text",
|
|
5786
|
+
footerCell: "sd-table__cell sd-table__cell--footer",
|
|
5762
5787
|
columnTitleCell: "sd-table__cell--column-title",
|
|
5763
5788
|
cellRequiredText: "sd-question__required-text",
|
|
5764
5789
|
button: "sd-action sd-matrixdynamic__btn",
|
|
@@ -5909,6 +5934,7 @@ var defaultV2Css = {
|
|
|
5909
5934
|
},
|
|
5910
5935
|
saveData: {
|
|
5911
5936
|
root: "sv-save-data_root",
|
|
5937
|
+
rootWithButtons: "sv-save-data_root--with-buttons",
|
|
5912
5938
|
info: "sv-save-data_info",
|
|
5913
5939
|
error: "sv-save-data_error",
|
|
5914
5940
|
success: "sv-save-data_success",
|
|
@@ -6174,7 +6200,10 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
|
6174
6200
|
allow: true,
|
|
6175
6201
|
target: this.dragDropInfo.target,
|
|
6176
6202
|
source: this.dragDropInfo.source,
|
|
6203
|
+
toElement: this.dragDropInfo.target,
|
|
6204
|
+
draggedElement: this.dragDropInfo.source,
|
|
6177
6205
|
parent: parent,
|
|
6206
|
+
fromElement: this.dragDropInfo.source ? this.dragDropInfo.source.parent : null,
|
|
6178
6207
|
insertAfter: insertAfter,
|
|
6179
6208
|
insertBefore: insertBefore,
|
|
6180
6209
|
};
|
|
@@ -6587,10 +6616,12 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6587
6616
|
var draggedElementShortcut = document.createElement("div");
|
|
6588
6617
|
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
6618
|
var itemValueNode = draggedElementNode.closest("[data-sv-drop-target-item-value]");
|
|
6590
|
-
|
|
6619
|
+
this.imagepickerControlsNode = itemValueNode.querySelector(".svc-image-item-value-controls");
|
|
6591
6620
|
var imageContainerNode = itemValueNode.querySelector(".sd-imagepicker__image-container");
|
|
6592
6621
|
var imageNode = itemValueNode.querySelector(item.imageLink ? "img" : ".sd-imagepicker__no-image").cloneNode(true);
|
|
6593
|
-
|
|
6622
|
+
if (!!this.imagepickerControlsNode) {
|
|
6623
|
+
this.imagepickerControlsNode.style.display = "none";
|
|
6624
|
+
}
|
|
6594
6625
|
imageContainerNode.style.width = imageNode.width + "px";
|
|
6595
6626
|
imageContainerNode.style.height = imageNode.height + "px";
|
|
6596
6627
|
imageNode.style.objectFit = "cover";
|
|
@@ -6680,6 +6711,10 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6680
6711
|
if (!!this.parentElement) {
|
|
6681
6712
|
this.updateVisibleChoices(this.parentElement);
|
|
6682
6713
|
}
|
|
6714
|
+
if (!!this.imagepickerControlsNode) {
|
|
6715
|
+
this.imagepickerControlsNode.style.display = "flex";
|
|
6716
|
+
this.imagepickerControlsNode = null;
|
|
6717
|
+
}
|
|
6683
6718
|
_super.prototype.clear.call(this);
|
|
6684
6719
|
};
|
|
6685
6720
|
DragDropChoices.prototype.updateVisibleChoices = function (parent) {
|
|
@@ -9273,8 +9308,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9273
9308
|
//import "../../modern.scss";
|
|
9274
9309
|
var Version;
|
|
9275
9310
|
var ReleaseDate;
|
|
9276
|
-
Version = "" + "1.9.
|
|
9277
|
-
ReleaseDate = "" + "2023-11-
|
|
9311
|
+
Version = "" + "1.9.119";
|
|
9312
|
+
ReleaseDate = "" + "2023-11-28";
|
|
9278
9313
|
function checkLibraryVersion(ver, libraryName) {
|
|
9279
9314
|
if (Version != ver) {
|
|
9280
9315
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15531,7 +15566,7 @@ var Cover = /** @class */ (function (_super) {
|
|
|
15531
15566
|
|
|
15532
15567
|
_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("cover", [
|
|
15533
15568
|
{ name: "height:number", minValue: 0, default: 256 },
|
|
15534
|
-
{ name: "inheritWidthFrom", default: "
|
|
15569
|
+
{ name: "inheritWidthFrom", default: "container" },
|
|
15535
15570
|
{ name: "textAreaWidth:number", minValue: 0, default: 512 },
|
|
15536
15571
|
{ name: "textGlowEnabled:boolean" },
|
|
15537
15572
|
{ name: "overlapEnabled:boolean" },
|
|
@@ -17592,6 +17627,11 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
|
17592
17627
|
return ((value === false && (this.type == "boolean" || this.type == "switch")) ||
|
|
17593
17628
|
value === "" || _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value));
|
|
17594
17629
|
};
|
|
17630
|
+
JsonObjectProperty.prototype.getSerializableValue = function (obj) {
|
|
17631
|
+
if (!!this.onSerializeValue)
|
|
17632
|
+
return this.onSerializeValue(obj);
|
|
17633
|
+
return this.getValue(obj);
|
|
17634
|
+
};
|
|
17595
17635
|
JsonObjectProperty.prototype.getValue = function (obj) {
|
|
17596
17636
|
if (this.onGetValue)
|
|
17597
17637
|
return this.onGetValue(obj);
|
|
@@ -18183,6 +18223,9 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
|
18183
18223
|
if (!!propInfo.baseValue) {
|
|
18184
18224
|
prop.setBaseValue(propInfo.baseValue);
|
|
18185
18225
|
}
|
|
18226
|
+
if (propInfo.onSerializeValue) {
|
|
18227
|
+
prop.onSerializeValue = propInfo.onSerializeValue;
|
|
18228
|
+
}
|
|
18186
18229
|
if (propInfo.onGetValue) {
|
|
18187
18230
|
prop.onGetValue = propInfo.onGetValue;
|
|
18188
18231
|
}
|
|
@@ -18977,7 +19020,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
18977
19020
|
if (property.isSerializable === false ||
|
|
18978
19021
|
(property.isLightSerializable === false && this.lightSerializing))
|
|
18979
19022
|
return;
|
|
18980
|
-
var value = property.
|
|
19023
|
+
var value = property.getSerializableValue(obj);
|
|
18981
19024
|
if (!storeDefaults && property.isDefaultValueByObj(obj, value))
|
|
18982
19025
|
return;
|
|
18983
19026
|
if (this.isValueArray(value)) {
|
|
@@ -20224,8 +20267,8 @@ var englishStrings = {
|
|
|
20224
20267
|
textMaxLength: "Please enter no more than {0} character(s).",
|
|
20225
20268
|
textMinMaxLength: "Please enter at least {0} and no more than {1} characters.",
|
|
20226
20269
|
minRowCountError: "Please fill in at least {0} row(s).",
|
|
20227
|
-
minSelectError: "Please select at least {0}
|
|
20228
|
-
maxSelectError: "Please select no more than {0}
|
|
20270
|
+
minSelectError: "Please select at least {0} option(s).",
|
|
20271
|
+
maxSelectError: "Please select no more than {0} option(s).",
|
|
20229
20272
|
numericMinMax: "The '{0}' should be at least {1} and at most {2}",
|
|
20230
20273
|
numericMin: "The '{0}' should be at least {1}",
|
|
20231
20274
|
numericMax: "The '{0}' should be at most {1}",
|
|
@@ -20234,6 +20277,7 @@ var englishStrings = {
|
|
|
20234
20277
|
urlRequestError: "The request returned error '{0}'. {1}",
|
|
20235
20278
|
urlGetChoicesError: "The request returned empty data or the 'path' property is incorrect",
|
|
20236
20279
|
exceedMaxSize: "The file size should not exceed {0}.",
|
|
20280
|
+
noUploadFilesHandler: "Files cannot be uploaded. Please add a handler for the 'onUploadFiles' event.",
|
|
20237
20281
|
otherRequiredError: "Response required: enter another value.",
|
|
20238
20282
|
uploadingFile: "Your file is uploading. Please wait several seconds and try again.",
|
|
20239
20283
|
loadingFile: "Loading...",
|
|
@@ -20677,9 +20721,19 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
|
20677
20721
|
enumerable: false,
|
|
20678
20722
|
configurable: true
|
|
20679
20723
|
});
|
|
20724
|
+
//a11y
|
|
20680
20725
|
QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
|
|
20681
|
-
|
|
20726
|
+
var row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase();
|
|
20727
|
+
var column = (this.getLocalizationString("matrix_column") || "column").toLocaleLowerCase();
|
|
20728
|
+
return row + " " + rowTitle + ", " + column + " " + columnTitle;
|
|
20682
20729
|
};
|
|
20730
|
+
Object.defineProperty(QuestionMatrixBaseModel.prototype, "isNewA11yStructure", {
|
|
20731
|
+
get: function () {
|
|
20732
|
+
return true;
|
|
20733
|
+
},
|
|
20734
|
+
enumerable: false,
|
|
20735
|
+
configurable: true
|
|
20736
|
+
});
|
|
20683
20737
|
__decorate([
|
|
20684
20738
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
20685
20739
|
], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
|
|
@@ -20859,6 +20913,7 @@ var Notifier = /** @class */ (function (_super) {
|
|
|
20859
20913
|
Notifier.prototype.getCssClass = function (type) {
|
|
20860
20914
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
|
|
20861
20915
|
.append(this.cssClasses.root)
|
|
20916
|
+
.append(this.cssClasses.rootWithButtons, this.actionBar.visibleActions.length > 0)
|
|
20862
20917
|
.append(this.cssClasses.info, type !== "error" && type !== "success")
|
|
20863
20918
|
.append(this.cssClasses.error, type === "error")
|
|
20864
20919
|
.append(this.cssClasses.success, type === "success")
|
|
@@ -21110,8 +21165,9 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
21110
21165
|
configurable: true
|
|
21111
21166
|
});
|
|
21112
21167
|
PageModel.prototype.calcCssClasses = function (css) {
|
|
21113
|
-
var classes = { page: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
21168
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
21114
21169
|
this.copyCssClasses(classes.page, css.page);
|
|
21170
|
+
this.copyCssClasses(classes.error, css.error);
|
|
21115
21171
|
if (!!css.pageTitle) {
|
|
21116
21172
|
classes.pageTitle = css.pageTitle;
|
|
21117
21173
|
}
|
|
@@ -21159,6 +21215,11 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
21159
21215
|
enumerable: false,
|
|
21160
21216
|
configurable: true
|
|
21161
21217
|
});
|
|
21218
|
+
PageModel.prototype.getCssError = function (cssClasses) {
|
|
21219
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
21220
|
+
.append(_super.prototype.getCssError.call(this, cssClasses))
|
|
21221
|
+
.append(cssClasses.page.errorsContainer).toString();
|
|
21222
|
+
};
|
|
21162
21223
|
Object.defineProperty(PageModel.prototype, "navigationButtonsVisibility", {
|
|
21163
21224
|
/**
|
|
21164
21225
|
* Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false.
|
|
@@ -21655,7 +21716,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
21655
21716
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
|
21656
21717
|
get: function () {
|
|
21657
21718
|
return ((this.canShowTitle() && this.locTitle.textOrHtml.length > 0) ||
|
|
21658
|
-
(this.
|
|
21719
|
+
(this.isDesignMode && (this.showTitle && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].designMode.showEmptyTitles)));
|
|
21659
21720
|
},
|
|
21660
21721
|
enumerable: false,
|
|
21661
21722
|
configurable: true
|
|
@@ -23003,6 +23064,16 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23003
23064
|
enumerable: false,
|
|
23004
23065
|
configurable: true
|
|
23005
23066
|
});
|
|
23067
|
+
Object.defineProperty(PanelModelBase.prototype, "cssError", {
|
|
23068
|
+
get: function () {
|
|
23069
|
+
return this.getCssError(this.cssClasses);
|
|
23070
|
+
},
|
|
23071
|
+
enumerable: false,
|
|
23072
|
+
configurable: true
|
|
23073
|
+
});
|
|
23074
|
+
PanelModelBase.prototype.getCssError = function (cssClasses) {
|
|
23075
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.error.root).toString();
|
|
23076
|
+
};
|
|
23006
23077
|
PanelModelBase.prototype.dispose = function () {
|
|
23007
23078
|
_super.prototype.dispose.call(this);
|
|
23008
23079
|
if (this.rows) {
|
|
@@ -23201,11 +23272,17 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
23201
23272
|
PanelModel.prototype.setNo = function (visibleIndex) {
|
|
23202
23273
|
this.setPropertyValue("no", _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].getNumberByIndex(this.visibleIndex, this.getStartIndex()));
|
|
23203
23274
|
};
|
|
23275
|
+
PanelModel.prototype.notifyStateChanged = function () {
|
|
23276
|
+
if (!this.isLoadingFromJson) {
|
|
23277
|
+
this.locTitle.strChanged();
|
|
23278
|
+
}
|
|
23279
|
+
_super.prototype.notifyStateChanged.call(this);
|
|
23280
|
+
};
|
|
23204
23281
|
PanelModel.prototype.createLocTitleProperty = function () {
|
|
23205
23282
|
var _this = this;
|
|
23206
23283
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
|
23207
23284
|
locTitleValue.onGetTextCallback = function (text) {
|
|
23208
|
-
if (!text && (_this.
|
|
23285
|
+
if (!text && (_this.state !== "default")) {
|
|
23209
23286
|
text = _this.name;
|
|
23210
23287
|
}
|
|
23211
23288
|
return text;
|
|
@@ -23378,26 +23455,17 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
23378
23455
|
enumerable: false,
|
|
23379
23456
|
configurable: true
|
|
23380
23457
|
});
|
|
23381
|
-
Object.defineProperty(PanelModel.prototype, "cssError", {
|
|
23382
|
-
get: function () {
|
|
23383
|
-
return this.getCssError(this.cssClasses);
|
|
23384
|
-
},
|
|
23385
|
-
enumerable: false,
|
|
23386
|
-
configurable: true
|
|
23387
|
-
});
|
|
23388
23458
|
Object.defineProperty(PanelModel.prototype, "showErrorsAbovePanel", {
|
|
23389
23459
|
get: function () {
|
|
23390
|
-
return this.isDefaultV2Theme;
|
|
23460
|
+
return this.isDefaultV2Theme && !this.showPanelAsPage;
|
|
23391
23461
|
},
|
|
23392
23462
|
enumerable: false,
|
|
23393
23463
|
configurable: true
|
|
23394
23464
|
});
|
|
23395
23465
|
PanelModel.prototype.getCssError = function (cssClasses) {
|
|
23396
|
-
var isDefaultV2Theme = this.isDefaultV2Theme;
|
|
23397
23466
|
var builder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
|
23398
|
-
.append(
|
|
23399
|
-
.append(
|
|
23400
|
-
.append(this.cssClasses.error.aboveQuestion, isDefaultV2Theme);
|
|
23467
|
+
.append(_super.prototype.getCssError.call(this, cssClasses))
|
|
23468
|
+
.append(cssClasses.panel.errorsContainer);
|
|
23401
23469
|
return builder.append("panel-error-root", builder.isEmpty()).toString();
|
|
23402
23470
|
};
|
|
23403
23471
|
PanelModel.prototype.onVisibleChanged = function () {
|
|
@@ -23418,16 +23486,23 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
23418
23486
|
this.survey.whenPanelFocusIn(this);
|
|
23419
23487
|
};
|
|
23420
23488
|
PanelModel.prototype.getHasFrameV2 = function () {
|
|
23421
|
-
return _super.prototype.getHasFrameV2.call(this) &&
|
|
23489
|
+
return _super.prototype.getHasFrameV2.call(this) && !this.showPanelAsPage;
|
|
23422
23490
|
};
|
|
23423
23491
|
PanelModel.prototype.getIsNested = function () {
|
|
23424
23492
|
return _super.prototype.getIsNested.call(this) && this.parent !== undefined;
|
|
23425
23493
|
};
|
|
23494
|
+
Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
|
|
23495
|
+
get: function () {
|
|
23496
|
+
return !!this.originalPage && !this.survey.isShowingPreview;
|
|
23497
|
+
},
|
|
23498
|
+
enumerable: false,
|
|
23499
|
+
configurable: true
|
|
23500
|
+
});
|
|
23426
23501
|
PanelModel.prototype.getCssRoot = function (cssClasses) {
|
|
23427
23502
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
|
23428
23503
|
.append(_super.prototype.getCssRoot.call(this, cssClasses))
|
|
23429
23504
|
.append(cssClasses.container)
|
|
23430
|
-
.append(cssClasses.asPage,
|
|
23505
|
+
.append(cssClasses.asPage, this.showPanelAsPage)
|
|
23431
23506
|
.append(cssClasses.invisible, !this.isDesignMode && this.areInvisibleElementsShowing && !this.visible)
|
|
23432
23507
|
.toString();
|
|
23433
23508
|
};
|
|
@@ -25887,16 +25962,6 @@ var Question = /** @class */ (function (_super) {
|
|
|
25887
25962
|
this.updateCommentElements();
|
|
25888
25963
|
}
|
|
25889
25964
|
};
|
|
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
25965
|
Question.prototype.onCommentChange = function (event) {
|
|
25901
25966
|
this.comment = event.target.value;
|
|
25902
25967
|
if (this.comment !== event.target.value) {
|
|
@@ -26160,9 +26225,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
26160
26225
|
Question.prototype.getCssError = function (cssClasses) {
|
|
26161
26226
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
|
|
26162
26227
|
.append(cssClasses.error.root)
|
|
26163
|
-
.append(cssClasses.
|
|
26164
|
-
.append(cssClasses.
|
|
26165
|
-
.append(cssClasses.
|
|
26228
|
+
.append(cssClasses.errorsContainer, this.showErrorsBelowQuestion || this.showErrorsAboveQuestion)
|
|
26229
|
+
.append(cssClasses.errorsContainerTop, this.showErrorsAboveQuestion)
|
|
26230
|
+
.append(cssClasses.errorsContainerBottom, this.showErrorsBelowQuestion)
|
|
26166
26231
|
.append(cssClasses.error.locationTop, this.showErrorOnTop)
|
|
26167
26232
|
.append(cssClasses.error.locationBottom, this.showErrorOnBottom)
|
|
26168
26233
|
.toString();
|
|
@@ -26424,6 +26489,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
26424
26489
|
* @see otherItem
|
|
26425
26490
|
* @see otherErrorText
|
|
26426
26491
|
* @see showCommentArea
|
|
26492
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
26427
26493
|
*/
|
|
26428
26494
|
get: function () {
|
|
26429
26495
|
return this.getPropertyValue("showOtherItem", false);
|
|
@@ -26888,6 +26954,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
26888
26954
|
* - `{row.other_question_name}` (to access questions inside the same dynamic matrix or multi-column dropdown)
|
|
26889
26955
|
*
|
|
26890
26956
|
* An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Built-In Functions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#built-in-functions).
|
|
26957
|
+
*
|
|
26958
|
+
* [View Demo](https://surveyjs.io/form-library/examples/specify-default-question-value-dynamically (linkStyle))
|
|
26891
26959
|
* @see defaultValue
|
|
26892
26960
|
* @see setValueExpression
|
|
26893
26961
|
*/
|
|
@@ -27593,7 +27661,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
27593
27661
|
});
|
|
27594
27662
|
}
|
|
27595
27663
|
else {
|
|
27596
|
-
this.updateValueFromSurveyCore(newValue,
|
|
27664
|
+
this.updateValueFromSurveyCore(newValue, this.data !== this.getSurvey());
|
|
27597
27665
|
}
|
|
27598
27666
|
this.updateDependedQuestions();
|
|
27599
27667
|
this.updateIsAnswered();
|
|
@@ -28594,6 +28662,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
28594
28662
|
* When users select the "None" item in multi-select questions, all other items become unselected.
|
|
28595
28663
|
* @see noneItem
|
|
28596
28664
|
* @see noneText
|
|
28665
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
28597
28666
|
*/
|
|
28598
28667
|
get: function () {
|
|
28599
28668
|
return this.getPropertyValue("showNoneItem");
|
|
@@ -29075,6 +29144,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29075
29144
|
*
|
|
29076
29145
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdownrestfull/ (linkStyle))
|
|
29077
29146
|
* @see choices
|
|
29147
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29078
29148
|
*/
|
|
29079
29149
|
get: function () {
|
|
29080
29150
|
return this.getPropertyValue("choicesByUrl");
|
|
@@ -29108,6 +29178,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29108
29178
|
* 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
29179
|
* @see choicesByUrl
|
|
29110
29180
|
* @see choicesFromQuestion
|
|
29181
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29111
29182
|
*/
|
|
29112
29183
|
get: function () {
|
|
29113
29184
|
return this.getPropertyValue("choices");
|
|
@@ -29250,6 +29321,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29250
29321
|
* - `"asc"`- Sorts choice items in ascending order.
|
|
29251
29322
|
* - `"desc"`- Sorts choice items in ascending order.
|
|
29252
29323
|
* - `"random"` - Displays choice items in random order.
|
|
29324
|
+
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
|
29253
29325
|
*/
|
|
29254
29326
|
get: function () {
|
|
29255
29327
|
return this.getPropertyValue("choicesOrder");
|
|
@@ -29774,16 +29846,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
29774
29846
|
this.updateCommentElements();
|
|
29775
29847
|
}
|
|
29776
29848
|
};
|
|
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
29849
|
QuestionSelectBase.prototype.onOtherValueChange = function (event) {
|
|
29788
29850
|
this.otherValue = event.target.value;
|
|
29789
29851
|
if (this.otherValue !== event.target.value) {
|
|
@@ -31447,12 +31509,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31447
31509
|
* @see enabledChoices
|
|
31448
31510
|
*/
|
|
31449
31511
|
get: function () {
|
|
31512
|
+
var val = this.renderedValue;
|
|
31513
|
+
var visChoices = this.visibleChoices;
|
|
31514
|
+
var selectedItemValues = this.selectedItemValues;
|
|
31450
31515
|
if (this.isEmpty())
|
|
31451
31516
|
return [];
|
|
31452
|
-
var
|
|
31453
|
-
var allChoices = !!this.defaultSelectedItemValues ? [].concat(this.defaultSelectedItemValues, this.visibleChoices) : this.visibleChoices;
|
|
31517
|
+
var allChoices = !!this.defaultSelectedItemValues ? [].concat(this.defaultSelectedItemValues, visChoices) : visChoices;
|
|
31454
31518
|
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 && !
|
|
31519
|
+
if (!itemValues.length && !selectedItemValues) {
|
|
31456
31520
|
this.updateSelectedItemValues();
|
|
31457
31521
|
}
|
|
31458
31522
|
return this.validateItemValues(itemValues);
|
|
@@ -32050,7 +32114,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
32050
32114
|
this.updateRemainingCharacterCounter(event.target.value);
|
|
32051
32115
|
};
|
|
32052
32116
|
QuestionCommentModel.prototype.onKeyDown = function (event) {
|
|
32053
|
-
this.
|
|
32117
|
+
this.onKeyDownPreprocess && this.onKeyDownPreprocess(event);
|
|
32054
32118
|
if (!this.acceptCarriageReturn && (event.key === "Enter" || event.keyCode === 13)) {
|
|
32055
32119
|
event.preventDefault();
|
|
32056
32120
|
event.stopPropagation();
|
|
@@ -34191,7 +34255,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34191
34255
|
_this.onUploadStateChanged = _this.addEvent();
|
|
34192
34256
|
_this.onStateChanged = _this.addEvent();
|
|
34193
34257
|
_this.fileNavigator = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
34194
|
-
_this.actionsContainer = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
34195
34258
|
_this.canFlipCameraValue = undefined;
|
|
34196
34259
|
_this.prevPreviewLength = 0;
|
|
34197
34260
|
_this.calcAvailableItemsCount = function (availableWidth, itemWidth, gap) {
|
|
@@ -34250,6 +34313,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34250
34313
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["loadFileFromBase64"])(data.content, data.name);
|
|
34251
34314
|
}
|
|
34252
34315
|
};
|
|
34316
|
+
_this.createLocalizableString("takePhotoCaption", _this, false, true);
|
|
34317
|
+
_this.actionsContainer = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
|
|
34318
|
+
_this.actionsContainer.locOwner = _this;
|
|
34253
34319
|
_this.fileIndexAction = new _actions_action__WEBPACK_IMPORTED_MODULE_8__["Action"]({
|
|
34254
34320
|
id: "fileIndex",
|
|
34255
34321
|
title: _this.getFileIndexCaption(),
|
|
@@ -34276,7 +34342,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34276
34342
|
id: "sv-file-take-picture",
|
|
34277
34343
|
iconSize: "auto",
|
|
34278
34344
|
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
|
-
|
|
34345
|
+
locTitle: _this.locTakePhotoCaption,
|
|
34280
34346
|
showTitle: false,
|
|
34281
34347
|
action: function () {
|
|
34282
34348
|
_this.snapPicture();
|
|
@@ -34312,7 +34378,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34312
34378
|
iconName: "icon-takepicture_24x24",
|
|
34313
34379
|
id: "sv-file-start-camera",
|
|
34314
34380
|
iconSize: "auto",
|
|
34315
|
-
|
|
34381
|
+
locTitle: _this.locTakePhotoCaption,
|
|
34316
34382
|
showTitle: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return !_this.isAnswered; }),
|
|
34317
34383
|
enabledIf: function () { return !_this.isInputReadOnly; },
|
|
34318
34384
|
action: function () {
|
|
@@ -34647,6 +34713,17 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34647
34713
|
QuestionFileModel.prototype.getConfirmRemoveMessage = function (fileName) {
|
|
34648
34714
|
return this.confirmRemoveMessage.format(fileName);
|
|
34649
34715
|
};
|
|
34716
|
+
Object.defineProperty(QuestionFileModel.prototype, "takePhotoCaption", {
|
|
34717
|
+
get: function () { return this.getLocalizableStringText("takePhotoCaption"); },
|
|
34718
|
+
set: function (val) { this.setLocalizableStringText("takePhotoCaption", val); },
|
|
34719
|
+
enumerable: false,
|
|
34720
|
+
configurable: true
|
|
34721
|
+
});
|
|
34722
|
+
Object.defineProperty(QuestionFileModel.prototype, "locTakePhotoCaption", {
|
|
34723
|
+
get: function () { return this.getLocalizableString("takePhotoCaption"); },
|
|
34724
|
+
enumerable: false,
|
|
34725
|
+
configurable: true
|
|
34726
|
+
});
|
|
34650
34727
|
Object.defineProperty(QuestionFileModel.prototype, "locRenderedPlaceholder", {
|
|
34651
34728
|
get: function () {
|
|
34652
34729
|
var _this = this;
|
|
@@ -34884,14 +34961,22 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34884
34961
|
}
|
|
34885
34962
|
else {
|
|
34886
34963
|
if (_this.survey) {
|
|
34887
|
-
_this.survey.uploadFiles(_this, _this.name, files, function (
|
|
34888
|
-
if (
|
|
34889
|
-
_this.
|
|
34890
|
-
|
|
34891
|
-
|
|
34964
|
+
_this.survey.uploadFiles(_this, _this.name, files, function (arg1, arg2) {
|
|
34965
|
+
if (Array.isArray(arg1)) {
|
|
34966
|
+
_this.value = (_this.value || []).concat(arg1.map(function (r) {
|
|
34967
|
+
return {
|
|
34968
|
+
name: r.file.name,
|
|
34969
|
+
type: r.file.type,
|
|
34970
|
+
content: r.content,
|
|
34971
|
+
};
|
|
34972
|
+
}));
|
|
34973
|
+
if (Array.isArray(arg2)) {
|
|
34974
|
+
arg2.forEach(function (error) { return _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](error, _this)); });
|
|
34975
|
+
_this.stateChanged("error");
|
|
34976
|
+
}
|
|
34892
34977
|
}
|
|
34893
|
-
if (
|
|
34894
|
-
_this.value = (_this.value || []).concat(
|
|
34978
|
+
if (arg1 === "success" && Array.isArray(arg2)) {
|
|
34979
|
+
_this.value = (_this.value || []).concat(arg2.map(function (r) {
|
|
34895
34980
|
return {
|
|
34896
34981
|
name: r.file.name,
|
|
34897
34982
|
type: r.file.type,
|
|
@@ -34899,6 +34984,16 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
34899
34984
|
};
|
|
34900
34985
|
}));
|
|
34901
34986
|
}
|
|
34987
|
+
if (arg1 === "error") {
|
|
34988
|
+
if (typeof (arg2) === "string") {
|
|
34989
|
+
_this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](arg2, _this));
|
|
34990
|
+
}
|
|
34991
|
+
if (Array.isArray(arg2) && arg2.length > 0) {
|
|
34992
|
+
arg2.forEach(function (error) { return _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](error, _this)); });
|
|
34993
|
+
}
|
|
34994
|
+
_this.stateChanged("error");
|
|
34995
|
+
}
|
|
34996
|
+
_this.stateChanged("loaded");
|
|
34902
34997
|
});
|
|
34903
34998
|
}
|
|
34904
34999
|
}
|
|
@@ -35255,9 +35350,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
35255
35350
|
__decorate([
|
|
35256
35351
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "chooseFileCaption" } })
|
|
35257
35352
|
], 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
35353
|
__decorate([
|
|
35262
35354
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: { defaultStr: "replaceFileCaption" } })
|
|
35263
35355
|
], QuestionFileModel.prototype, "replaceButtonCaption", void 0);
|
|
@@ -37503,7 +37595,19 @@ var MatrixDropdownCell = /** @class */ (function () {
|
|
|
37503
37595
|
this.data = data;
|
|
37504
37596
|
this.questionValue = this.createQuestion(column, row, data);
|
|
37505
37597
|
this.questionValue.updateCustomWidget();
|
|
37598
|
+
this.updateCellQuestionTitleDueToAccessebility(row);
|
|
37506
37599
|
}
|
|
37600
|
+
MatrixDropdownCell.prototype.updateCellQuestionTitleDueToAccessebility = function (row) {
|
|
37601
|
+
var _this = this;
|
|
37602
|
+
this.questionValue.locTitle.onGetTextCallback = function (str) {
|
|
37603
|
+
if (!row || !row.getSurvey())
|
|
37604
|
+
return _this.questionValue.title;
|
|
37605
|
+
var rowTitle = row.getAccessbilityText();
|
|
37606
|
+
if (!rowTitle)
|
|
37607
|
+
return _this.questionValue.title;
|
|
37608
|
+
return _this.column.colOwner.getCellAriaLabel(rowTitle, _this.questionValue.title);
|
|
37609
|
+
};
|
|
37610
|
+
};
|
|
37507
37611
|
MatrixDropdownCell.prototype.locStrsChanged = function () {
|
|
37508
37612
|
this.question.locStrsChanged();
|
|
37509
37613
|
};
|
|
@@ -37661,6 +37765,13 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
37661
37765
|
enumerable: false,
|
|
37662
37766
|
configurable: true
|
|
37663
37767
|
});
|
|
37768
|
+
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "dataName", {
|
|
37769
|
+
get: function () {
|
|
37770
|
+
return this.rowName;
|
|
37771
|
+
},
|
|
37772
|
+
enumerable: false,
|
|
37773
|
+
configurable: true
|
|
37774
|
+
});
|
|
37664
37775
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "text", {
|
|
37665
37776
|
get: function () {
|
|
37666
37777
|
return this.rowName;
|
|
@@ -37717,6 +37828,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
37717
37828
|
enumerable: false,
|
|
37718
37829
|
configurable: true
|
|
37719
37830
|
});
|
|
37831
|
+
MatrixDropdownRowModelBase.prototype.getAccessbilityText = function () {
|
|
37832
|
+
return this.locText && this.locText.renderedHtml;
|
|
37833
|
+
};
|
|
37720
37834
|
Object.defineProperty(MatrixDropdownRowModelBase.prototype, "hasPanel", {
|
|
37721
37835
|
get: function () {
|
|
37722
37836
|
if (!this.data)
|
|
@@ -39325,7 +39439,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39325
39439
|
questionPlainData.isNode = true;
|
|
39326
39440
|
questionPlainData.data = this.visibleRows.map(function (row) {
|
|
39327
39441
|
var rowDataItem = {
|
|
39328
|
-
name: row.
|
|
39442
|
+
name: row.dataName,
|
|
39329
39443
|
title: row.text,
|
|
39330
39444
|
value: row.value,
|
|
39331
39445
|
displayValue: _this.getRowDisplayValue(false, row, row.value),
|
|
@@ -39886,6 +40000,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
39886
40000
|
this.onCreateDetailPanelCallback(row, panel);
|
|
39887
40001
|
}
|
|
39888
40002
|
panel.questions.forEach(function (q) { return q.setParentQuestion(_this); });
|
|
40003
|
+
panel.onSurveyLoad();
|
|
39889
40004
|
return panel;
|
|
39890
40005
|
};
|
|
39891
40006
|
QuestionMatrixDropdownModelBase.prototype.getSharedQuestionByName = function (columnName, row) {
|
|
@@ -41139,12 +41254,6 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41139
41254
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "headers", {
|
|
41140
41255
|
get: function () {
|
|
41141
41256
|
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
41257
|
if (this.matrix.IsMultiplyColumn(this.cell.column)) {
|
|
41149
41258
|
if (!!this.item) {
|
|
41150
41259
|
return this.item.locText.renderedHtml;
|
|
@@ -41153,6 +41262,13 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
|
41153
41262
|
return "";
|
|
41154
41263
|
}
|
|
41155
41264
|
}
|
|
41265
|
+
var cellHint = this.cell.column.cellHint;
|
|
41266
|
+
if (!!cellHint) {
|
|
41267
|
+
if (cellHint.trim() === "")
|
|
41268
|
+
return "";
|
|
41269
|
+
return this.cell.column.locCellHint.renderedHtml;
|
|
41270
|
+
}
|
|
41271
|
+
return this.cell.column.title;
|
|
41156
41272
|
}
|
|
41157
41273
|
if (this.hasQuestion && this.question.isVisible) {
|
|
41158
41274
|
return this.question.locTitle.renderedHtml;
|
|
@@ -41580,7 +41696,10 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41580
41696
|
this.footerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
41581
41697
|
}
|
|
41582
41698
|
if (this.matrix.hasRowText) {
|
|
41583
|
-
this.
|
|
41699
|
+
var cell_1 = this.createTextCell(this.matrix.getFooterText());
|
|
41700
|
+
cell_1.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(cell_1.className)
|
|
41701
|
+
.append(this.cssClasses.footerTotalCell).toString();
|
|
41702
|
+
this.footerRow.cells.push(cell_1);
|
|
41584
41703
|
}
|
|
41585
41704
|
var cells = this.matrix.visibleTotalRow.cells;
|
|
41586
41705
|
for (var i = 0; i < cells.length; i++) {
|
|
@@ -41595,6 +41714,8 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
41595
41714
|
if (cell.column) {
|
|
41596
41715
|
this.setHeaderCellWidth(cell.column, editCell);
|
|
41597
41716
|
}
|
|
41717
|
+
editCell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(editCell.className)
|
|
41718
|
+
.append(this.cssClasses.footerCell).toString();
|
|
41598
41719
|
this.footerRow.cells.push(editCell);
|
|
41599
41720
|
}
|
|
41600
41721
|
}
|
|
@@ -42210,6 +42331,23 @@ var MatrixDynamicRowModel = /** @class */ (function (_super) {
|
|
|
42210
42331
|
enumerable: false,
|
|
42211
42332
|
configurable: true
|
|
42212
42333
|
});
|
|
42334
|
+
Object.defineProperty(MatrixDynamicRowModel.prototype, "dataName", {
|
|
42335
|
+
get: function () {
|
|
42336
|
+
return "row" + (this.index + 1);
|
|
42337
|
+
},
|
|
42338
|
+
enumerable: false,
|
|
42339
|
+
configurable: true
|
|
42340
|
+
});
|
|
42341
|
+
Object.defineProperty(MatrixDynamicRowModel.prototype, "text", {
|
|
42342
|
+
get: function () {
|
|
42343
|
+
return "row " + (this.index + 1);
|
|
42344
|
+
},
|
|
42345
|
+
enumerable: false,
|
|
42346
|
+
configurable: true
|
|
42347
|
+
});
|
|
42348
|
+
MatrixDynamicRowModel.prototype.getAccessbilityText = function () {
|
|
42349
|
+
return (this.index + 1).toString();
|
|
42350
|
+
};
|
|
42213
42351
|
Object.defineProperty(MatrixDynamicRowModel.prototype, "shortcutText", {
|
|
42214
42352
|
get: function () {
|
|
42215
42353
|
var matrix = this.data;
|
|
@@ -47931,6 +48069,15 @@ var RenderedRatingItem = /** @class */ (function (_super) {
|
|
|
47931
48069
|
return RenderedRatingItem;
|
|
47932
48070
|
}(_base__WEBPACK_IMPORTED_MODULE_7__["Base"]));
|
|
47933
48071
|
|
|
48072
|
+
var RatingItemValue = /** @class */ (function (_super) {
|
|
48073
|
+
__extends(RatingItemValue, _super);
|
|
48074
|
+
function RatingItemValue(value, description) {
|
|
48075
|
+
var _this = _super.call(this, value) || this;
|
|
48076
|
+
_this.description = description;
|
|
48077
|
+
return _this;
|
|
48078
|
+
}
|
|
48079
|
+
return RatingItemValue;
|
|
48080
|
+
}(_itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"]));
|
|
47934
48081
|
/**
|
|
47935
48082
|
* A class that describes the Rating Scale question type.
|
|
47936
48083
|
*
|
|
@@ -48225,18 +48372,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48225
48372
|
rateValues = this.rateValues;
|
|
48226
48373
|
}
|
|
48227
48374
|
else {
|
|
48228
|
-
|
|
48229
|
-
var value = this.rateMin;
|
|
48230
|
-
var step = this.rateStep;
|
|
48231
|
-
while (value <= this.rateMax &&
|
|
48232
|
-
res.length < _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].ratingMaximumRateValueCount) {
|
|
48233
|
-
var item = new _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"](value);
|
|
48234
|
-
item.locOwner = this;
|
|
48235
|
-
item.ownerPropertyName = "rateValues";
|
|
48236
|
-
res.push(item);
|
|
48237
|
-
value = this.correctValue(value + step, step);
|
|
48238
|
-
}
|
|
48239
|
-
rateValues = res;
|
|
48375
|
+
rateValues = this.createRateValues();
|
|
48240
48376
|
}
|
|
48241
48377
|
if (this.rateType == "smileys" && rateValues.length > 10)
|
|
48242
48378
|
rateValues = rateValues.slice(0, 10);
|
|
@@ -48253,6 +48389,27 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48253
48389
|
return renderedItem;
|
|
48254
48390
|
});
|
|
48255
48391
|
};
|
|
48392
|
+
QuestionRatingModel.prototype.createRateValues = function () {
|
|
48393
|
+
var res = [];
|
|
48394
|
+
var value = this.rateMin;
|
|
48395
|
+
var step = this.rateStep;
|
|
48396
|
+
while (value <= this.rateMax &&
|
|
48397
|
+
res.length < _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].ratingMaximumRateValueCount) {
|
|
48398
|
+
var description = void 0;
|
|
48399
|
+
if (value === this.rateMin) {
|
|
48400
|
+
description = this.minRateDescription && this.locMinRateDescription;
|
|
48401
|
+
}
|
|
48402
|
+
if (value === this.rateMax || res.length === _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].ratingMaximumRateValueCount) {
|
|
48403
|
+
description = this.maxRateDescription && this.locMaxRateDescription;
|
|
48404
|
+
}
|
|
48405
|
+
var item = new RatingItemValue(value, description);
|
|
48406
|
+
item.locOwner = this;
|
|
48407
|
+
item.ownerPropertyName = "rateValues";
|
|
48408
|
+
res.push(item);
|
|
48409
|
+
value = this.correctValue(value + step, step);
|
|
48410
|
+
}
|
|
48411
|
+
return res;
|
|
48412
|
+
};
|
|
48256
48413
|
QuestionRatingModel.prototype.correctValue = function (value, step) {
|
|
48257
48414
|
if (!value)
|
|
48258
48415
|
return value;
|
|
@@ -48375,7 +48532,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48375
48532
|
});
|
|
48376
48533
|
QuestionRatingModel.prototype.getDefaultItemComponent = function () {
|
|
48377
48534
|
if (this.renderAs == "dropdown")
|
|
48378
|
-
return "";
|
|
48535
|
+
return "sv-rating-dropdown-item";
|
|
48379
48536
|
if (this.isStar)
|
|
48380
48537
|
return "sv-rating-item-star";
|
|
48381
48538
|
if (this.isSmiley)
|
|
@@ -49786,7 +49943,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
49786
49943
|
_this.updateRemainingCharacterCounter(event.target.value);
|
|
49787
49944
|
};
|
|
49788
49945
|
_this.onKeyDown = function (event) {
|
|
49789
|
-
_this.
|
|
49946
|
+
_this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
|
|
49790
49947
|
if (_this.isInputTextUpdate) {
|
|
49791
49948
|
_this._isWaitingForEnter = event.keyCode === 229;
|
|
49792
49949
|
}
|
|
@@ -50547,7 +50704,6 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
|
50547
50704
|
function QuestionTextBase(name) {
|
|
50548
50705
|
var _this = _super.call(this, name) || this;
|
|
50549
50706
|
_this.characterCounter = new CharacterCounter();
|
|
50550
|
-
_this.disableNativeUndoRedo = false;
|
|
50551
50707
|
return _this;
|
|
50552
50708
|
}
|
|
50553
50709
|
QuestionTextBase.prototype.isTextValue = function () {
|
|
@@ -50673,13 +50829,6 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
|
50673
50829
|
return val;
|
|
50674
50830
|
};
|
|
50675
50831
|
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
50832
|
QuestionTextBase.prototype.getControlCssClassBuilder = function () {
|
|
50684
50833
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
|
|
50685
50834
|
.append(this.cssClasses.root)
|
|
@@ -51571,6 +51720,27 @@ var settings = {
|
|
|
51571
51720
|
* Default value: `"none"`
|
|
51572
51721
|
*/
|
|
51573
51722
|
noneItemValue: "none",
|
|
51723
|
+
/**
|
|
51724
|
+
* An object whose properties specify the order of the special choice items (None, Other, Select All) in select-based questions.
|
|
51725
|
+
*
|
|
51726
|
+
* Default value: `{ selectAllItem: [-1], noneItem: [1], otherItem: [2] }`
|
|
51727
|
+
*
|
|
51728
|
+
* 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.
|
|
51729
|
+
*
|
|
51730
|
+
* ```js
|
|
51731
|
+
* import { settings } from "survey-core";
|
|
51732
|
+
*
|
|
51733
|
+
* settings.specialChoicesOrder.noneItem = [-2];
|
|
51734
|
+
* settings.specialChoicesOrder.selectAllItem = [-1];
|
|
51735
|
+
* settings.specialChoicesOrder.otherItem = [1];
|
|
51736
|
+
* ```
|
|
51737
|
+
*
|
|
51738
|
+
* If you want to duplicate a special choice item above and below other choices, add two numbers to the corresponding array:
|
|
51739
|
+
*
|
|
51740
|
+
* ```js
|
|
51741
|
+
* settings.specialChoicesOrder.selectAllItem = [-1, 3] // Displays Select All above and below other choices
|
|
51742
|
+
* ```
|
|
51743
|
+
*/
|
|
51574
51744
|
specialChoicesOrder: {
|
|
51575
51745
|
selectAllItem: [-1],
|
|
51576
51746
|
noneItem: [1],
|
|
@@ -52498,9 +52668,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52498
52668
|
* @see isExpanded
|
|
52499
52669
|
*/
|
|
52500
52670
|
get: function () {
|
|
52501
|
-
|
|
52502
|
-
return;
|
|
52503
|
-
return this.state === "collapsed";
|
|
52671
|
+
return this.state === "collapsed" && !this.isDesignMode;
|
|
52504
52672
|
},
|
|
52505
52673
|
enumerable: false,
|
|
52506
52674
|
configurable: true
|
|
@@ -54220,7 +54388,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54220
54388
|
* Specifies whether to hide validation errors thrown by the Required validation in the UI.
|
|
54221
54389
|
*
|
|
54222
54390
|
* [Built-In Client-Side Validators](https://surveyjs.io/form-library/documentation/data-validation#built-in-client-side-validators (linkStyle))
|
|
54223
|
-
* @see
|
|
54391
|
+
* @see validationEnabled
|
|
54392
|
+
* @see validationAllowSwitchPages
|
|
54224
54393
|
*/
|
|
54225
54394
|
_this.hideRequiredErrors = false;
|
|
54226
54395
|
//#endregion
|
|
@@ -54229,15 +54398,27 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54229
54398
|
_this._isCompact = false;
|
|
54230
54399
|
_this._isDesignMode = false;
|
|
54231
54400
|
/**
|
|
54232
|
-
* Specifies whether
|
|
54401
|
+
* Specifies whether data validation is enabled.
|
|
54233
54402
|
*
|
|
54234
|
-
* Default value: `
|
|
54403
|
+
* Default value: `true`
|
|
54404
|
+
* @see checkErrorsMode
|
|
54235
54405
|
* @see hideRequiredErrors
|
|
54236
|
-
* @see nextPage
|
|
54237
|
-
* @see isPrevPage
|
|
54238
|
-
* @see completeLastPage
|
|
54239
54406
|
*/
|
|
54240
|
-
_this.
|
|
54407
|
+
_this.validationEnabled = true;
|
|
54408
|
+
/**
|
|
54409
|
+
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
|
54410
|
+
*
|
|
54411
|
+
* Default value: `false`
|
|
54412
|
+
* @see checkErrorsMode
|
|
54413
|
+
*/
|
|
54414
|
+
_this.validationAllowSwitchPages = false;
|
|
54415
|
+
/**
|
|
54416
|
+
* Specifies whether respondents can end a survey with validation errors.
|
|
54417
|
+
*
|
|
54418
|
+
* Default value: `false`
|
|
54419
|
+
* @see checkErrorsMode
|
|
54420
|
+
*/
|
|
54421
|
+
_this.validationAllowComplete = false;
|
|
54241
54422
|
_this.isNavigationButtonPressed = false;
|
|
54242
54423
|
_this.mouseDownPage = null;
|
|
54243
54424
|
_this.isCalculatingProgressText = false;
|
|
@@ -54671,6 +54852,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54671
54852
|
enumerable: false,
|
|
54672
54853
|
configurable: true
|
|
54673
54854
|
});
|
|
54855
|
+
SurveyModel.prototype.insertAdvancedHeader = function (advHeader) {
|
|
54856
|
+
advHeader.survey = this;
|
|
54857
|
+
this.layoutElements.push({
|
|
54858
|
+
id: "advanced-header",
|
|
54859
|
+
container: "header",
|
|
54860
|
+
component: "sv-header",
|
|
54861
|
+
index: -100,
|
|
54862
|
+
data: advHeader,
|
|
54863
|
+
processResponsiveness: function (width) { return advHeader.processResponsiveness(width); }
|
|
54864
|
+
});
|
|
54865
|
+
};
|
|
54674
54866
|
SurveyModel.prototype.getNavigationCss = function (main, btn) {
|
|
54675
54867
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]().append(main)
|
|
54676
54868
|
.append(btn).toString();
|
|
@@ -55205,6 +55397,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
55205
55397
|
* - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
|
|
55206
55398
|
*
|
|
55207
55399
|
* Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
|
|
55400
|
+
* @see validationEnabled
|
|
55401
|
+
* @see validationAllowSwitchPages
|
|
55402
|
+
* @see validationAllowComplete
|
|
55403
|
+
* @see validate
|
|
55208
55404
|
*/
|
|
55209
55405
|
get: function () {
|
|
55210
55406
|
return this.getPropertyValue("checkErrorsMode");
|
|
@@ -57236,6 +57432,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57236
57432
|
this.notify(this.completedStateText, this.completedState, value === "error");
|
|
57237
57433
|
}
|
|
57238
57434
|
};
|
|
57435
|
+
/**
|
|
57436
|
+
* Displays a toast notification with a specified message.
|
|
57437
|
+
*
|
|
57438
|
+
* Depending on the `type` argument, a survey can display the following notification types:
|
|
57439
|
+
*
|
|
57440
|
+
* 
|
|
57441
|
+
* @param message A message to display.
|
|
57442
|
+
* @param type A notification type: `"info"` (default), `"success"`, or `"error"`.
|
|
57443
|
+
* @param showActions For internal use.
|
|
57444
|
+
*/
|
|
57239
57445
|
SurveyModel.prototype.notify = function (message, type, showActions) {
|
|
57240
57446
|
if (showActions === void 0) { showActions = false; }
|
|
57241
57447
|
this.notifier.showActions = showActions;
|
|
@@ -57525,6 +57731,15 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57525
57731
|
return;
|
|
57526
57732
|
document.cookie = this.cookieName + "=;";
|
|
57527
57733
|
};
|
|
57734
|
+
Object.defineProperty(SurveyModel.prototype, "ignoreValidation", {
|
|
57735
|
+
/**
|
|
57736
|
+
* This property is obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
|
|
57737
|
+
*/
|
|
57738
|
+
get: function () { return !this.validationEnabled; },
|
|
57739
|
+
set: function (val) { this.validationEnabled = !val; },
|
|
57740
|
+
enumerable: false,
|
|
57741
|
+
configurable: true
|
|
57742
|
+
});
|
|
57528
57743
|
/**
|
|
57529
57744
|
* Switches the survey to the next page.
|
|
57530
57745
|
*
|
|
@@ -57541,19 +57756,20 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
57541
57756
|
};
|
|
57542
57757
|
SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
|
|
57543
57758
|
var _this = this;
|
|
57544
|
-
if (this.
|
|
57759
|
+
if (!this.isEditMode || this.ignoreValidation)
|
|
57545
57760
|
return false;
|
|
57761
|
+
var skipValidation = doComplete && this.validationAllowComplete || !doComplete && this.validationAllowSwitchPages;
|
|
57546
57762
|
var func = function (hasErrors) {
|
|
57547
|
-
if (!hasErrors) {
|
|
57763
|
+
if (!hasErrors || skipValidation) {
|
|
57548
57764
|
_this.doCurrentPageCompleteCore(doComplete);
|
|
57549
57765
|
}
|
|
57550
57766
|
};
|
|
57551
57767
|
if (this.isValidateOnComplete) {
|
|
57552
57768
|
if (!this.isLastPage)
|
|
57553
57769
|
return false;
|
|
57554
|
-
return this.validate(true, true, func) !== true;
|
|
57770
|
+
return this.validate(true, true, func) !== true && !skipValidation;
|
|
57555
57771
|
}
|
|
57556
|
-
return this.validateCurrentPage(func) !== true;
|
|
57772
|
+
return this.validateCurrentPage(func) !== true && !skipValidation;
|
|
57557
57773
|
};
|
|
57558
57774
|
SurveyModel.prototype.checkForAsyncQuestionValidation = function (questions, func) {
|
|
57559
57775
|
var _this = this;
|
|
@@ -58056,14 +58272,14 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58056
58272
|
if (this.isShowingPreview)
|
|
58057
58273
|
return;
|
|
58058
58274
|
if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
|
|
58059
|
-
if (this.
|
|
58060
|
-
this.restoreOriginalPages(this.
|
|
58275
|
+
if (this.originalPages) {
|
|
58276
|
+
this.restoreOriginalPages(this.originalPages);
|
|
58061
58277
|
}
|
|
58062
|
-
this.
|
|
58278
|
+
this.originalPages = undefined;
|
|
58063
58279
|
}
|
|
58064
58280
|
else {
|
|
58065
58281
|
if (!oldValue || oldValue == "standard") {
|
|
58066
|
-
this.
|
|
58282
|
+
this.originalPages = this.pages.slice(0, this.pages.length);
|
|
58067
58283
|
}
|
|
58068
58284
|
this.setupPagesForPageModes(this.isSinglePage);
|
|
58069
58285
|
}
|
|
@@ -58913,7 +59129,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58913
59129
|
});
|
|
58914
59130
|
Object.defineProperty(SurveyModel.prototype, "isValidateOnComplete", {
|
|
58915
59131
|
get: function () {
|
|
58916
|
-
return this.checkErrorsMode === "onComplete";
|
|
59132
|
+
return this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages && !this.validationAllowComplete;
|
|
58917
59133
|
},
|
|
58918
59134
|
enumerable: false,
|
|
58919
59135
|
configurable: true
|
|
@@ -59064,13 +59280,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59064
59280
|
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
|
|
59065
59281
|
* @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
|
|
59066
59282
|
* @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
|
|
59067
|
-
* @param callback A callback function that allows you to
|
|
59283
|
+
* @param callback A callback function that allows you to access successfully uploaded files as the first argument. If any files fail to upload, the second argument contains an array of error messages.
|
|
59068
59284
|
* @see onUploadFiles
|
|
59069
59285
|
* @see downloadFile
|
|
59070
59286
|
*/
|
|
59071
59287
|
SurveyModel.prototype.uploadFiles = function (question, name, files, callback) {
|
|
59072
59288
|
if (this.onUploadFiles.isEmpty) {
|
|
59073
|
-
callback("error",
|
|
59289
|
+
callback("error", this.getLocString("noUploadFilesHandler"));
|
|
59074
59290
|
}
|
|
59075
59291
|
else {
|
|
59076
59292
|
this.onUploadFiles.fire(this, {
|
|
@@ -61196,6 +61412,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61196
61412
|
SurveyModel.prototype.stopMovingQuestion = function () {
|
|
61197
61413
|
this.isMovingQuestion = false;
|
|
61198
61414
|
};
|
|
61415
|
+
Object.defineProperty(SurveyModel.prototype, "isQuestionDragging", {
|
|
61416
|
+
get: function () { return this.isMovingQuestion; },
|
|
61417
|
+
enumerable: false,
|
|
61418
|
+
configurable: true
|
|
61419
|
+
});
|
|
61199
61420
|
/**
|
|
61200
61421
|
* Focuses a question with a specified name. Switches the current page if needed.
|
|
61201
61422
|
* @param name A question name.
|
|
@@ -61384,6 +61605,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61384
61605
|
}
|
|
61385
61606
|
}
|
|
61386
61607
|
}
|
|
61608
|
+
containerLayoutElements.sort(function (a, b) { return (a.index || 0) - (b.index || 0); });
|
|
61387
61609
|
return containerLayoutElements;
|
|
61388
61610
|
};
|
|
61389
61611
|
SurveyModel.prototype.processPopupVisiblityChanged = function (question, popup, visible) {
|
|
@@ -61402,15 +61624,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61402
61624
|
Object.keys(theme).forEach(function (key) {
|
|
61403
61625
|
if (key === "header") {
|
|
61404
61626
|
_this.removeLayoutElement("advanced-header");
|
|
61405
|
-
var
|
|
61406
|
-
|
|
61407
|
-
_this.
|
|
61408
|
-
|
|
61409
|
-
container: "header",
|
|
61410
|
-
component: "sv-header",
|
|
61411
|
-
data: advHeader_1,
|
|
61412
|
-
processResponsiveness: function (width) { return advHeader_1.processResponsiveness(width); }
|
|
61413
|
-
});
|
|
61627
|
+
var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
|
|
61628
|
+
advHeader.fromTheme(theme);
|
|
61629
|
+
_this.insertAdvancedHeader(advHeader);
|
|
61630
|
+
_this.headerView = "advanced";
|
|
61414
61631
|
}
|
|
61415
61632
|
if (key === "isPanelless") {
|
|
61416
61633
|
_this.isCompact = theme[key];
|
|
@@ -61507,14 +61724,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61507
61724
|
advHeader.titlePositionY = "middle";
|
|
61508
61725
|
advHeader.descriptionPositionX = target.logoPosition === "right" ? "left" : "right";
|
|
61509
61726
|
advHeader.descriptionPositionY = "middle";
|
|
61510
|
-
advHeader
|
|
61511
|
-
target.layoutElements.unshift({
|
|
61512
|
-
id: "advanced-header",
|
|
61513
|
-
container: "header",
|
|
61514
|
-
component: "sv-header",
|
|
61515
|
-
data: advHeader,
|
|
61516
|
-
processResponsiveness: function (width) { return advHeader.processResponsiveness(width); }
|
|
61517
|
-
});
|
|
61727
|
+
target.insertAdvancedHeader(advHeader);
|
|
61518
61728
|
}
|
|
61519
61729
|
}
|
|
61520
61730
|
else {
|
|
@@ -61620,7 +61830,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
|
61620
61830
|
className: "htmlconditionitem", isArray: true
|
|
61621
61831
|
},
|
|
61622
61832
|
{ name: "loadingHtml:html", serializationProperty: "locLoadingHtml" },
|
|
61623
|
-
{ name: "pages:surveypages", className: "page", isArray: true },
|
|
61833
|
+
{ name: "pages:surveypages", className: "page", isArray: true, onSerializeValue: function (obj) { return obj.originalPages || obj.pages; } },
|
|
61624
61834
|
{
|
|
61625
61835
|
name: "elements",
|
|
61626
61836
|
alternativeName: "questions",
|
|
@@ -64063,19 +64273,36 @@ var ResponsivityManager = /** @class */ (function () {
|
|
|
64063
64273
|
configurable: true
|
|
64064
64274
|
});
|
|
64065
64275
|
ResponsivityManager.prototype.process = function () {
|
|
64066
|
-
var
|
|
64276
|
+
var _this = this;
|
|
64067
64277
|
if (this.isContainerVisible && !this.model.isResponsivenessDisabled) {
|
|
64068
64278
|
if (!this.isInitialized) {
|
|
64069
64279
|
this.model.setActionsMode("large");
|
|
64070
|
-
|
|
64071
|
-
|
|
64280
|
+
var recalcItemSizes = function () {
|
|
64281
|
+
_this.calcItemsSizes();
|
|
64282
|
+
_this.isInitialized = true;
|
|
64283
|
+
};
|
|
64284
|
+
if (queueMicrotask) {
|
|
64285
|
+
queueMicrotask(recalcItemSizes);
|
|
64286
|
+
}
|
|
64287
|
+
else {
|
|
64288
|
+
recalcItemSizes();
|
|
64289
|
+
}
|
|
64072
64290
|
}
|
|
64073
|
-
var
|
|
64074
|
-
|
|
64075
|
-
var
|
|
64076
|
-
|
|
64291
|
+
var processResponsiveness = function () {
|
|
64292
|
+
var _a;
|
|
64293
|
+
var dotsItemSize = _this.dotsItemSize;
|
|
64294
|
+
if (!_this.dotsItemSize) {
|
|
64295
|
+
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(".sv-dots");
|
|
64296
|
+
dotsItemSize = dotsItemElement && _this.calcItemSize(dotsItemElement) || _this.dotsSizeConst;
|
|
64297
|
+
}
|
|
64298
|
+
_this.model.fit(_this.getAvailableSpace(), dotsItemSize);
|
|
64299
|
+
};
|
|
64300
|
+
if (queueMicrotask) {
|
|
64301
|
+
queueMicrotask(processResponsiveness);
|
|
64302
|
+
}
|
|
64303
|
+
else {
|
|
64304
|
+
processResponsiveness();
|
|
64077
64305
|
}
|
|
64078
|
-
this.model.fit(this.getAvailableSpace(), dotsItemSize);
|
|
64079
64306
|
}
|
|
64080
64307
|
};
|
|
64081
64308
|
ResponsivityManager.prototype.dispose = function () {
|
|
@@ -64497,6 +64724,9 @@ function findParentByClassNames(element, classNames) {
|
|
|
64497
64724
|
function sanitizeEditableContent(element) {
|
|
64498
64725
|
if (window.getSelection && document.createRange && element.childNodes.length > 0) {
|
|
64499
64726
|
var selection = document.getSelection();
|
|
64727
|
+
if (selection.rangeCount == 0) {
|
|
64728
|
+
return;
|
|
64729
|
+
}
|
|
64500
64730
|
var range = selection.getRangeAt(0);
|
|
64501
64731
|
range.setStart(range.endContainer, range.endOffset);
|
|
64502
64732
|
range.setEndAfter(element.lastChild);
|