survey-react 1.9.91 → 1.9.93

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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.91
2
+ * surveyjs - Survey JavaScript library v1.9.93
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
  */
@@ -101,617 +101,575 @@ return /******/ (function(modules) { // webpackBootstrap
101
101
  /************************************************************************/
102
102
  /******/ ({
103
103
 
104
- /***/ "./node_modules/signature_pad/dist/signature_pad.mjs":
105
- /*!***********************************************************!*\
106
- !*** ./node_modules/signature_pad/dist/signature_pad.mjs ***!
107
- \***********************************************************/
104
+ /***/ "./node_modules/signature_pad/dist/signature_pad.js":
105
+ /*!**********************************************************!*\
106
+ !*** ./node_modules/signature_pad/dist/signature_pad.js ***!
107
+ \**********************************************************/
108
108
  /*! exports provided: default */
109
- /***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
109
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
110
110
 
111
111
  "use strict";
112
112
  __webpack_require__.r(__webpack_exports__);
113
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SignaturePad; });
113
114
  /*!
114
- * Signature Pad v2.3.2
115
- * https://github.com/szimek/signature_pad
116
- *
117
- * Copyright 2017 Szymon Nowak
118
- * Released under the MIT license
119
- *
120
- * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:
121
- * http://corner.squareup.com/2012/07/smoother-signatures.html
122
- *
123
- * Implementation of interpolation using cubic Bézier curves is taken from:
124
- * http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript
125
- *
126
- * Algorithm for approximated length of a Bézier curve is taken from:
127
- * http://www.lemoda.net/maths/bezier-length/index.html
128
- *
115
+ * Signature Pad v4.1.5 | https://github.com/szimek/signature_pad
116
+ * (c) 2023 Szymon Nowak | Released under the MIT license
129
117
  */
130
118
 
131
- function Point(x, y, time) {
132
- this.x = x;
133
- this.y = y;
134
- this.time = time || new Date().getTime();
119
+ class Point {
120
+ constructor(x, y, pressure, time) {
121
+ if (isNaN(x) || isNaN(y)) {
122
+ throw new Error(`Point is invalid: (${x}, ${y})`);
123
+ }
124
+ this.x = +x;
125
+ this.y = +y;
126
+ this.pressure = pressure || 0;
127
+ this.time = time || Date.now();
128
+ }
129
+ distanceTo(start) {
130
+ return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2));
131
+ }
132
+ equals(other) {
133
+ return (this.x === other.x &&
134
+ this.y === other.y &&
135
+ this.pressure === other.pressure &&
136
+ this.time === other.time);
137
+ }
138
+ velocityFrom(start) {
139
+ return this.time !== start.time
140
+ ? this.distanceTo(start) / (this.time - start.time)
141
+ : 0;
142
+ }
135
143
  }
136
144
 
137
- Point.prototype.velocityFrom = function (start) {
138
- return this.time !== start.time ? this.distanceTo(start) / (this.time - start.time) : 1;
139
- };
140
-
141
- Point.prototype.distanceTo = function (start) {
142
- return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2));
143
- };
144
-
145
- Point.prototype.equals = function (other) {
146
- return this.x === other.x && this.y === other.y && this.time === other.time;
147
- };
148
-
149
- function Bezier(startPoint, control1, control2, endPoint) {
150
- this.startPoint = startPoint;
151
- this.control1 = control1;
152
- this.control2 = control2;
153
- this.endPoint = endPoint;
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
+ static fromPoints(points, widths) {
155
+ const c2 = this.calculateControlPoints(points[0], points[1], points[2]).c2;
156
+ const c3 = this.calculateControlPoints(points[1], points[2], points[3]).c1;
157
+ return new Bezier(points[1], c2, c3, points[2], widths.start, widths.end);
158
+ }
159
+ static calculateControlPoints(s1, s2, s3) {
160
+ const dx1 = s1.x - s2.x;
161
+ const dy1 = s1.y - s2.y;
162
+ const dx2 = s2.x - s3.x;
163
+ const dy2 = s2.y - s3.y;
164
+ const m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };
165
+ const m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };
166
+ const l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);
167
+ const l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);
168
+ const dxm = m1.x - m2.x;
169
+ const dym = m1.y - m2.y;
170
+ const k = l2 / (l1 + l2);
171
+ const cm = { x: m2.x + dxm * k, y: m2.y + dym * k };
172
+ const tx = s2.x - cm.x;
173
+ const ty = s2.y - cm.y;
174
+ return {
175
+ c1: new Point(m1.x + tx, m1.y + ty),
176
+ c2: new Point(m2.x + tx, m2.y + ty),
177
+ };
178
+ }
179
+ length() {
180
+ const steps = 10;
181
+ let length = 0;
182
+ let px;
183
+ let py;
184
+ for (let i = 0; i <= steps; i += 1) {
185
+ const t = i / steps;
186
+ const cx = this.point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x);
187
+ const cy = this.point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
188
+ if (i > 0) {
189
+ const xdiff = cx - px;
190
+ const ydiff = cy - py;
191
+ length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);
192
+ }
193
+ px = cx;
194
+ py = cy;
195
+ }
196
+ return length;
197
+ }
198
+ point(t, start, c1, c2, end) {
199
+ return (start * (1.0 - t) * (1.0 - t) * (1.0 - t))
200
+ + (3.0 * c1 * (1.0 - t) * (1.0 - t) * t)
201
+ + (3.0 * c2 * (1.0 - t) * t * t)
202
+ + (end * t * t * t);
203
+ }
154
204
  }
155
205
 
156
- // Returns approximated length.
157
- Bezier.prototype.length = function () {
158
- var steps = 10;
159
- var length = 0;
160
- var px = void 0;
161
- var py = void 0;
162
-
163
- for (var i = 0; i <= steps; i += 1) {
164
- var t = i / steps;
165
- var cx = this._point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x);
166
- var cy = this._point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);
167
- if (i > 0) {
168
- var xdiff = cx - px;
169
- var ydiff = cy - py;
170
- length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);
206
+ class SignatureEventTarget {
207
+ constructor() {
208
+ try {
209
+ this._et = new EventTarget();
210
+ }
211
+ catch (error) {
212
+ this._et = document;
213
+ }
171
214
  }
172
- px = cx;
173
- py = cy;
174
- }
175
-
176
- return length;
177
- };
178
-
179
- /* eslint-disable no-multi-spaces, space-in-parens */
180
- Bezier.prototype._point = function (t, start, c1, c2, end) {
181
- return start * (1.0 - t) * (1.0 - t) * (1.0 - t) + 3.0 * c1 * (1.0 - t) * (1.0 - t) * t + 3.0 * c2 * (1.0 - t) * t * t + end * t * t * t;
182
- };
183
-
184
- /* eslint-disable */
215
+ addEventListener(type, listener, options) {
216
+ this._et.addEventListener(type, listener, options);
217
+ }
218
+ dispatchEvent(event) {
219
+ return this._et.dispatchEvent(event);
220
+ }
221
+ removeEventListener(type, callback, options) {
222
+ this._et.removeEventListener(type, callback, options);
223
+ }
224
+ }
185
225
 
186
- // http://stackoverflow.com/a/27078401/815507
187
- function throttle(func, wait, options) {
188
- var context, args, result;
189
- var timeout = null;
190
- var previous = 0;
191
- if (!options) options = {};
192
- var later = function later() {
193
- previous = options.leading === false ? 0 : Date.now();
194
- timeout = null;
195
- result = func.apply(context, args);
196
- if (!timeout) context = args = null;
197
- };
198
- return function () {
199
- var now = Date.now();
200
- if (!previous && options.leading === false) previous = now;
201
- var remaining = wait - (now - previous);
202
- context = this;
203
- args = arguments;
204
- if (remaining <= 0 || remaining > wait) {
205
- if (timeout) {
206
- clearTimeout(timeout);
226
+ function throttle(fn, wait = 250) {
227
+ let previous = 0;
228
+ let timeout = null;
229
+ let result;
230
+ let storedContext;
231
+ let storedArgs;
232
+ const later = () => {
233
+ previous = Date.now();
207
234
  timeout = null;
208
- }
209
- previous = now;
210
- result = func.apply(context, args);
211
- if (!timeout) context = args = null;
212
- } else if (!timeout && options.trailing !== false) {
213
- timeout = setTimeout(later, remaining);
214
- }
215
- return result;
216
- };
235
+ result = fn.apply(storedContext, storedArgs);
236
+ if (!timeout) {
237
+ storedContext = null;
238
+ storedArgs = [];
239
+ }
240
+ };
241
+ return function wrapper(...args) {
242
+ const now = Date.now();
243
+ const remaining = wait - (now - previous);
244
+ storedContext = this;
245
+ storedArgs = args;
246
+ if (remaining <= 0 || remaining > wait) {
247
+ if (timeout) {
248
+ clearTimeout(timeout);
249
+ timeout = null;
250
+ }
251
+ previous = now;
252
+ result = fn.apply(storedContext, storedArgs);
253
+ if (!timeout) {
254
+ storedContext = null;
255
+ storedArgs = [];
256
+ }
257
+ }
258
+ else if (!timeout) {
259
+ timeout = window.setTimeout(later, remaining);
260
+ }
261
+ return result;
262
+ };
217
263
  }
218
264
 
219
- function SignaturePad(canvas, options) {
220
- var self = this;
221
- var opts = options || {};
222
-
223
- this.velocityFilterWeight = opts.velocityFilterWeight || 0.7;
224
- this.minWidth = opts.minWidth || 0.5;
225
- this.maxWidth = opts.maxWidth || 2.5;
226
- this.throttle = 'throttle' in opts ? opts.throttle : 16; // in miliseconds
227
- this.minDistance = 'minDistance' in opts ? opts.minDistance : 5;
228
-
229
- if (this.throttle) {
230
- this._strokeMoveUpdate = throttle(SignaturePad.prototype._strokeUpdate, this.throttle);
231
- } else {
232
- this._strokeMoveUpdate = SignaturePad.prototype._strokeUpdate;
233
- }
234
-
235
- this.dotSize = opts.dotSize || function () {
236
- return (this.minWidth + this.maxWidth) / 2;
237
- };
238
- this.penColor = opts.penColor || 'black';
239
- this.backgroundColor = opts.backgroundColor || 'rgba(0,0,0,0)';
240
- this.onBegin = opts.onBegin;
241
- this.onEnd = opts.onEnd;
242
-
243
- this._canvas = canvas;
244
- this._ctx = canvas.getContext('2d');
245
- this.clear();
246
-
247
- // We need add these inline so they are available to unbind while still having
248
- // access to 'self' we could use _.bind but it's not worth adding a dependency.
249
- this._handleMouseDown = function (event) {
250
- if (event.which === 1) {
251
- self._mouseButtonDown = true;
252
- self._strokeBegin(event);
265
+ class SignaturePad extends SignatureEventTarget {
266
+ constructor(canvas, options = {}) {
267
+ super();
268
+ this.canvas = canvas;
269
+ this._drawningStroke = false;
270
+ this._isEmpty = true;
271
+ this._lastPoints = [];
272
+ this._data = [];
273
+ this._lastVelocity = 0;
274
+ this._lastWidth = 0;
275
+ this._handleMouseDown = (event) => {
276
+ if (event.buttons === 1) {
277
+ this._drawningStroke = true;
278
+ this._strokeBegin(event);
279
+ }
280
+ };
281
+ this._handleMouseMove = (event) => {
282
+ if (this._drawningStroke) {
283
+ this._strokeMoveUpdate(event);
284
+ }
285
+ };
286
+ this._handleMouseUp = (event) => {
287
+ if (event.buttons === 1 && this._drawningStroke) {
288
+ this._drawningStroke = false;
289
+ this._strokeEnd(event);
290
+ }
291
+ };
292
+ this._handleTouchStart = (event) => {
293
+ if (event.cancelable) {
294
+ event.preventDefault();
295
+ }
296
+ if (event.targetTouches.length === 1) {
297
+ const touch = event.changedTouches[0];
298
+ this._strokeBegin(touch);
299
+ }
300
+ };
301
+ this._handleTouchMove = (event) => {
302
+ if (event.cancelable) {
303
+ event.preventDefault();
304
+ }
305
+ const touch = event.targetTouches[0];
306
+ this._strokeMoveUpdate(touch);
307
+ };
308
+ this._handleTouchEnd = (event) => {
309
+ const wasCanvasTouched = event.target === this.canvas;
310
+ if (wasCanvasTouched) {
311
+ if (event.cancelable) {
312
+ event.preventDefault();
313
+ }
314
+ const touch = event.changedTouches[0];
315
+ this._strokeEnd(touch);
316
+ }
317
+ };
318
+ this._handlePointerStart = (event) => {
319
+ this._drawningStroke = true;
320
+ event.preventDefault();
321
+ this._strokeBegin(event);
322
+ };
323
+ this._handlePointerMove = (event) => {
324
+ if (this._drawningStroke) {
325
+ event.preventDefault();
326
+ this._strokeMoveUpdate(event);
327
+ }
328
+ };
329
+ this._handlePointerEnd = (event) => {
330
+ if (this._drawningStroke) {
331
+ event.preventDefault();
332
+ this._drawningStroke = false;
333
+ this._strokeEnd(event);
334
+ }
335
+ };
336
+ this.velocityFilterWeight = options.velocityFilterWeight || 0.7;
337
+ this.minWidth = options.minWidth || 0.5;
338
+ this.maxWidth = options.maxWidth || 2.5;
339
+ this.throttle = ('throttle' in options ? options.throttle : 16);
340
+ this.minDistance = ('minDistance' in options ? options.minDistance : 5);
341
+ this.dotSize = options.dotSize || 0;
342
+ this.penColor = options.penColor || 'black';
343
+ this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)';
344
+ this._strokeMoveUpdate = this.throttle
345
+ ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle)
346
+ : SignaturePad.prototype._strokeUpdate;
347
+ this._ctx = canvas.getContext('2d');
348
+ this.clear();
349
+ this.on();
253
350
  }
254
- };
255
-
256
- this._handleMouseMove = function (event) {
257
- if (self._mouseButtonDown) {
258
- self._strokeMoveUpdate(event);
351
+ clear() {
352
+ const { _ctx: ctx, canvas } = this;
353
+ ctx.fillStyle = this.backgroundColor;
354
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
355
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
356
+ this._data = [];
357
+ this._reset(this._getPointGroupOptions());
358
+ this._isEmpty = true;
259
359
  }
260
- };
261
-
262
- this._handleMouseUp = function (event) {
263
- if (event.which === 1 && self._mouseButtonDown) {
264
- self._mouseButtonDown = false;
265
- self._strokeEnd(event);
360
+ fromDataURL(dataUrl, options = {}) {
361
+ return new Promise((resolve, reject) => {
362
+ const image = new Image();
363
+ const ratio = options.ratio || window.devicePixelRatio || 1;
364
+ const width = options.width || this.canvas.width / ratio;
365
+ const height = options.height || this.canvas.height / ratio;
366
+ const xOffset = options.xOffset || 0;
367
+ const yOffset = options.yOffset || 0;
368
+ this._reset(this._getPointGroupOptions());
369
+ image.onload = () => {
370
+ this._ctx.drawImage(image, xOffset, yOffset, width, height);
371
+ resolve();
372
+ };
373
+ image.onerror = (error) => {
374
+ reject(error);
375
+ };
376
+ image.crossOrigin = 'anonymous';
377
+ image.src = dataUrl;
378
+ this._isEmpty = false;
379
+ });
266
380
  }
267
- };
268
-
269
- this._handleTouchStart = function (event) {
270
- if (event.targetTouches.length === 1) {
271
- var touch = event.changedTouches[0];
272
- self._strokeBegin(touch);
381
+ toDataURL(type = 'image/png', encoderOptions) {
382
+ switch (type) {
383
+ case 'image/svg+xml':
384
+ if (typeof encoderOptions !== 'object') {
385
+ encoderOptions = undefined;
386
+ }
387
+ return `data:image/svg+xml;base64,${btoa(this.toSVG(encoderOptions))}`;
388
+ default:
389
+ if (typeof encoderOptions !== 'number') {
390
+ encoderOptions = undefined;
391
+ }
392
+ return this.canvas.toDataURL(type, encoderOptions);
393
+ }
273
394
  }
274
- };
275
-
276
- this._handleTouchMove = function (event) {
277
- // Prevent scrolling.
278
- event.preventDefault();
279
-
280
- var touch = event.targetTouches[0];
281
- self._strokeMoveUpdate(touch);
282
- };
283
-
284
- this._handleTouchEnd = function (event) {
285
- var wasCanvasTouched = event.target === self._canvas;
286
- if (wasCanvasTouched) {
287
- event.preventDefault();
288
- self._strokeEnd(event);
395
+ on() {
396
+ this.canvas.style.touchAction = 'none';
397
+ this.canvas.style.msTouchAction = 'none';
398
+ this.canvas.style.userSelect = 'none';
399
+ const isIOS = /Macintosh/.test(navigator.userAgent) && 'ontouchstart' in document;
400
+ if (window.PointerEvent && !isIOS) {
401
+ this._handlePointerEvents();
402
+ }
403
+ else {
404
+ this._handleMouseEvents();
405
+ if ('ontouchstart' in window) {
406
+ this._handleTouchEvents();
407
+ }
408
+ }
289
409
  }
290
- };
291
-
292
- // Enable mouse and touch event handlers
293
- this.on();
294
- }
295
-
296
- // Public methods
297
- SignaturePad.prototype.clear = function () {
298
- var ctx = this._ctx;
299
- var canvas = this._canvas;
300
-
301
- ctx.fillStyle = this.backgroundColor;
302
- ctx.clearRect(0, 0, canvas.width, canvas.height);
303
- ctx.fillRect(0, 0, canvas.width, canvas.height);
304
-
305
- this._data = [];
306
- this._reset();
307
- this._isEmpty = true;
308
- };
309
-
310
- SignaturePad.prototype.fromDataURL = function (dataUrl) {
311
- var _this = this;
312
-
313
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
314
-
315
- var image = new Image();
316
- var ratio = options.ratio || window.devicePixelRatio || 1;
317
- var width = options.width || this._canvas.width / ratio;
318
- var height = options.height || this._canvas.height / ratio;
319
-
320
- this._reset();
321
- image.src = dataUrl;
322
- image.onload = function () {
323
- _this._ctx.drawImage(image, 0, 0, width, height);
324
- };
325
- this._isEmpty = false;
326
- };
327
-
328
- SignaturePad.prototype.toDataURL = function (type) {
329
- var _canvas;
330
-
331
- switch (type) {
332
- case 'image/svg+xml':
333
- return this._toSVG();
334
- default:
335
- for (var _len = arguments.length, options = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
336
- options[_key - 1] = arguments[_key];
337
- }
338
-
339
- return (_canvas = this._canvas).toDataURL.apply(_canvas, [type].concat(options));
340
- }
341
- };
342
-
343
- SignaturePad.prototype.on = function () {
344
- this._handleMouseEvents();
345
- this._handleTouchEvents();
346
- };
347
-
348
- SignaturePad.prototype.off = function () {
349
- this._canvas.removeEventListener('mousedown', this._handleMouseDown);
350
- this._canvas.removeEventListener('mousemove', this._handleMouseMove);
351
- document.removeEventListener('mouseup', this._handleMouseUp);
352
-
353
- this._canvas.removeEventListener('touchstart', this._handleTouchStart);
354
- this._canvas.removeEventListener('touchmove', this._handleTouchMove);
355
- this._canvas.removeEventListener('touchend', this._handleTouchEnd);
356
- };
357
-
358
- SignaturePad.prototype.isEmpty = function () {
359
- return this._isEmpty;
360
- };
361
-
362
- // Private methods
363
- SignaturePad.prototype._strokeBegin = function (event) {
364
- this._data.push([]);
365
- this._reset();
366
- this._strokeUpdate(event);
367
-
368
- if (typeof this.onBegin === 'function') {
369
- this.onBegin(event);
370
- }
371
- };
372
-
373
- SignaturePad.prototype._strokeUpdate = function (event) {
374
- var x = event.clientX;
375
- var y = event.clientY;
376
-
377
- var point = this._createPoint(x, y);
378
- var lastPointGroup = this._data[this._data.length - 1];
379
- var lastPoint = lastPointGroup && lastPointGroup[lastPointGroup.length - 1];
380
- var isLastPointTooClose = lastPoint && point.distanceTo(lastPoint) < this.minDistance;
381
-
382
- // Skip this point if it's too close to the previous one
383
- if (!(lastPoint && isLastPointTooClose)) {
384
- var _addPoint = this._addPoint(point),
385
- curve = _addPoint.curve,
386
- widths = _addPoint.widths;
387
-
388
- if (curve && widths) {
389
- this._drawCurve(curve, widths.start, widths.end);
410
+ off() {
411
+ this.canvas.style.touchAction = 'auto';
412
+ this.canvas.style.msTouchAction = 'auto';
413
+ this.canvas.style.userSelect = 'auto';
414
+ this.canvas.removeEventListener('pointerdown', this._handlePointerStart);
415
+ this.canvas.removeEventListener('pointermove', this._handlePointerMove);
416
+ this.canvas.ownerDocument.removeEventListener('pointerup', this._handlePointerEnd);
417
+ this.canvas.removeEventListener('mousedown', this._handleMouseDown);
418
+ this.canvas.removeEventListener('mousemove', this._handleMouseMove);
419
+ this.canvas.ownerDocument.removeEventListener('mouseup', this._handleMouseUp);
420
+ this.canvas.removeEventListener('touchstart', this._handleTouchStart);
421
+ this.canvas.removeEventListener('touchmove', this._handleTouchMove);
422
+ this.canvas.removeEventListener('touchend', this._handleTouchEnd);
390
423
  }
391
-
392
- this._data[this._data.length - 1].push({
393
- x: point.x,
394
- y: point.y,
395
- time: point.time,
396
- color: this.penColor
397
- });
398
- }
399
- };
400
-
401
- SignaturePad.prototype._strokeEnd = function (event) {
402
- var canDrawCurve = this.points.length > 2;
403
- var point = this.points[0]; // Point instance
404
-
405
- if (!canDrawCurve && point) {
406
- this._drawDot(point);
407
- }
408
-
409
- if (point) {
410
- var lastPointGroup = this._data[this._data.length - 1];
411
- var lastPoint = lastPointGroup[lastPointGroup.length - 1]; // plain object
412
-
413
- // When drawing a dot, there's only one point in a group, so without this check
414
- // such group would end up with exactly the same 2 points.
415
- if (!point.equals(lastPoint)) {
416
- lastPointGroup.push({
417
- x: point.x,
418
- y: point.y,
419
- time: point.time,
420
- color: this.penColor
421
- });
424
+ isEmpty() {
425
+ return this._isEmpty;
422
426
  }
423
- }
424
-
425
- if (typeof this.onEnd === 'function') {
426
- this.onEnd(event);
427
- }
428
- };
429
-
430
- SignaturePad.prototype._handleMouseEvents = function () {
431
- this._mouseButtonDown = false;
432
-
433
- this._canvas.addEventListener('mousedown', this._handleMouseDown);
434
- this._canvas.addEventListener('mousemove', this._handleMouseMove);
435
- document.addEventListener('mouseup', this._handleMouseUp);
436
- };
437
-
438
- SignaturePad.prototype._handleTouchEvents = function () {
439
- // Pass touch events to canvas element on mobile IE11 and Edge.
440
- this._canvas.style.msTouchAction = 'none';
441
- this._canvas.style.touchAction = 'none';
442
-
443
- this._canvas.addEventListener('touchstart', this._handleTouchStart);
444
- this._canvas.addEventListener('touchmove', this._handleTouchMove);
445
- this._canvas.addEventListener('touchend', this._handleTouchEnd);
446
- };
447
-
448
- SignaturePad.prototype._reset = function () {
449
- this.points = [];
450
- this._lastVelocity = 0;
451
- this._lastWidth = (this.minWidth + this.maxWidth) / 2;
452
- this._ctx.fillStyle = this.penColor;
453
- };
454
-
455
- SignaturePad.prototype._createPoint = function (x, y, time) {
456
- var rect = this._canvas.getBoundingClientRect();
457
-
458
- return new Point(x - rect.left, y - rect.top, time || new Date().getTime());
459
- };
460
-
461
- SignaturePad.prototype._addPoint = function (point) {
462
- var points = this.points;
463
- var tmp = void 0;
464
-
465
- points.push(point);
466
-
467
- if (points.length > 2) {
468
- // To reduce the initial lag make it work with 3 points
469
- // by copying the first point to the beginning.
470
- if (points.length === 3) points.unshift(points[0]);
471
-
472
- tmp = this._calculateCurveControlPoints(points[0], points[1], points[2]);
473
- var c2 = tmp.c2;
474
- tmp = this._calculateCurveControlPoints(points[1], points[2], points[3]);
475
- var c3 = tmp.c1;
476
- var curve = new Bezier(points[1], c2, c3, points[2]);
477
- var widths = this._calculateCurveWidths(curve);
478
-
479
- // Remove the first element from the list,
480
- // so that we always have no more than 4 points in points array.
481
- points.shift();
482
-
483
- return { curve: curve, widths: widths };
484
- }
485
-
486
- return {};
487
- };
488
-
489
- SignaturePad.prototype._calculateCurveControlPoints = function (s1, s2, s3) {
490
- var dx1 = s1.x - s2.x;
491
- var dy1 = s1.y - s2.y;
492
- var dx2 = s2.x - s3.x;
493
- var dy2 = s2.y - s3.y;
494
-
495
- var m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };
496
- var m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };
497
-
498
- var l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);
499
- var l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);
500
-
501
- var dxm = m1.x - m2.x;
502
- var dym = m1.y - m2.y;
503
-
504
- var k = l2 / (l1 + l2);
505
- var cm = { x: m2.x + dxm * k, y: m2.y + dym * k };
506
-
507
- var tx = s2.x - cm.x;
508
- var ty = s2.y - cm.y;
509
-
510
- return {
511
- c1: new Point(m1.x + tx, m1.y + ty),
512
- c2: new Point(m2.x + tx, m2.y + ty)
513
- };
514
- };
515
-
516
- SignaturePad.prototype._calculateCurveWidths = function (curve) {
517
- var startPoint = curve.startPoint;
518
- var endPoint = curve.endPoint;
519
- var widths = { start: null, end: null };
520
-
521
- var velocity = this.velocityFilterWeight * endPoint.velocityFrom(startPoint) + (1 - this.velocityFilterWeight) * this._lastVelocity;
522
-
523
- var newWidth = this._strokeWidth(velocity);
524
-
525
- widths.start = this._lastWidth;
526
- widths.end = newWidth;
527
-
528
- this._lastVelocity = velocity;
529
- this._lastWidth = newWidth;
530
-
531
- return widths;
532
- };
533
-
534
- SignaturePad.prototype._strokeWidth = function (velocity) {
535
- return Math.max(this.maxWidth / (velocity + 1), this.minWidth);
536
- };
537
-
538
- SignaturePad.prototype._drawPoint = function (x, y, size) {
539
- var ctx = this._ctx;
540
-
541
- ctx.moveTo(x, y);
542
- ctx.arc(x, y, size, 0, 2 * Math.PI, false);
543
- this._isEmpty = false;
544
- };
545
-
546
- SignaturePad.prototype._drawCurve = function (curve, startWidth, endWidth) {
547
- var ctx = this._ctx;
548
- var widthDelta = endWidth - startWidth;
549
- var drawSteps = Math.floor(curve.length());
550
-
551
- ctx.beginPath();
552
-
553
- for (var i = 0; i < drawSteps; i += 1) {
554
- // Calculate the Bezier (x, y) coordinate for this step.
555
- var t = i / drawSteps;
556
- var tt = t * t;
557
- var ttt = tt * t;
558
- var u = 1 - t;
559
- var uu = u * u;
560
- var uuu = uu * u;
561
-
562
- var x = uuu * curve.startPoint.x;
563
- x += 3 * uu * t * curve.control1.x;
564
- x += 3 * u * tt * curve.control2.x;
565
- x += ttt * curve.endPoint.x;
566
-
567
- var y = uuu * curve.startPoint.y;
568
- y += 3 * uu * t * curve.control1.y;
569
- y += 3 * u * tt * curve.control2.y;
570
- y += ttt * curve.endPoint.y;
571
-
572
- var width = startWidth + ttt * widthDelta;
573
- this._drawPoint(x, y, width);
574
- }
575
-
576
- ctx.closePath();
577
- ctx.fill();
578
- };
579
-
580
- SignaturePad.prototype._drawDot = function (point) {
581
- var ctx = this._ctx;
582
- var width = typeof this.dotSize === 'function' ? this.dotSize() : this.dotSize;
583
-
584
- ctx.beginPath();
585
- this._drawPoint(point.x, point.y, width);
586
- ctx.closePath();
587
- ctx.fill();
588
- };
589
-
590
- SignaturePad.prototype._fromData = function (pointGroups, drawCurve, drawDot) {
591
- for (var i = 0; i < pointGroups.length; i += 1) {
592
- var group = pointGroups[i];
593
-
594
- if (group.length > 1) {
595
- for (var j = 0; j < group.length; j += 1) {
596
- var rawPoint = group[j];
597
- var point = new Point(rawPoint.x, rawPoint.y, rawPoint.time);
598
- var color = rawPoint.color;
599
-
600
- if (j === 0) {
601
- // First point in a group. Nothing to draw yet.
602
-
603
- // All points in the group have the same color, so it's enough to set
604
- // penColor just at the beginning.
605
- this.penColor = color;
606
- this._reset();
607
-
608
- this._addPoint(point);
609
- } else if (j !== group.length - 1) {
610
- // Middle point in a group.
611
- var _addPoint2 = this._addPoint(point),
612
- curve = _addPoint2.curve,
613
- widths = _addPoint2.widths;
614
-
615
- if (curve && widths) {
616
- drawCurve(curve, widths, color);
617
- }
618
- } else {
619
- // Last point in a group. Do nothing.
620
- }
621
- }
622
- } else {
623
- this._reset();
624
- var _rawPoint = group[0];
625
- drawDot(_rawPoint);
427
+ fromData(pointGroups, { clear = true } = {}) {
428
+ if (clear) {
429
+ this.clear();
430
+ }
431
+ this._fromData(pointGroups, this._drawCurve.bind(this), this._drawDot.bind(this));
432
+ this._data = this._data.concat(pointGroups);
626
433
  }
627
- }
628
- };
629
-
630
- SignaturePad.prototype._toSVG = function () {
631
- var _this2 = this;
632
-
633
- var pointGroups = this._data;
634
- var canvas = this._canvas;
635
- var ratio = Math.max(window.devicePixelRatio || 1, 1);
636
- var minX = 0;
637
- var minY = 0;
638
- var maxX = canvas.width / ratio;
639
- var maxY = canvas.height / ratio;
640
- var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
641
-
642
- svg.setAttributeNS(null, 'width', canvas.width);
643
- svg.setAttributeNS(null, 'height', canvas.height);
644
-
645
- this._fromData(pointGroups, function (curve, widths, color) {
646
- var path = document.createElement('path');
647
-
648
- // Need to check curve for NaN values, these pop up when drawing
649
- // lines on the canvas that are not continuous. E.g. Sharp corners
650
- // or stopping mid-stroke and than continuing without lifting mouse.
651
- if (!isNaN(curve.control1.x) && !isNaN(curve.control1.y) && !isNaN(curve.control2.x) && !isNaN(curve.control2.y)) {
652
- var attr = 'M ' + curve.startPoint.x.toFixed(3) + ',' + curve.startPoint.y.toFixed(3) + ' ' + ('C ' + curve.control1.x.toFixed(3) + ',' + curve.control1.y.toFixed(3) + ' ') + (curve.control2.x.toFixed(3) + ',' + curve.control2.y.toFixed(3) + ' ') + (curve.endPoint.x.toFixed(3) + ',' + curve.endPoint.y.toFixed(3));
653
-
654
- path.setAttribute('d', attr);
655
- path.setAttribute('stroke-width', (widths.end * 2.25).toFixed(3));
656
- path.setAttribute('stroke', color);
657
- path.setAttribute('fill', 'none');
658
- path.setAttribute('stroke-linecap', 'round');
659
-
660
- svg.appendChild(path);
434
+ toData() {
435
+ return this._data;
661
436
  }
662
- }, function (rawPoint) {
663
- var circle = document.createElement('circle');
664
- var dotSize = typeof _this2.dotSize === 'function' ? _this2.dotSize() : _this2.dotSize;
665
- circle.setAttribute('r', dotSize);
666
- circle.setAttribute('cx', rawPoint.x);
667
- circle.setAttribute('cy', rawPoint.y);
668
- circle.setAttribute('fill', rawPoint.color);
669
-
670
- svg.appendChild(circle);
671
- });
672
-
673
- var prefix = 'data:image/svg+xml;base64,';
674
- var header = '<svg' + ' xmlns="http://www.w3.org/2000/svg"' + ' xmlns:xlink="http://www.w3.org/1999/xlink"' + (' viewBox="' + minX + ' ' + minY + ' ' + maxX + ' ' + maxY + '"') + (' width="' + maxX + '"') + (' height="' + maxY + '"') + '>';
675
- var body = svg.innerHTML;
676
-
677
- // IE hack for missing innerHTML property on SVGElement
678
- if (body === undefined) {
679
- var dummy = document.createElement('dummy');
680
- var nodes = svg.childNodes;
681
- dummy.innerHTML = '';
682
-
683
- for (var i = 0; i < nodes.length; i += 1) {
684
- dummy.appendChild(nodes[i].cloneNode(true));
437
+ _getPointGroupOptions(group) {
438
+ return {
439
+ penColor: group && 'penColor' in group ? group.penColor : this.penColor,
440
+ dotSize: group && 'dotSize' in group ? group.dotSize : this.dotSize,
441
+ minWidth: group && 'minWidth' in group ? group.minWidth : this.minWidth,
442
+ maxWidth: group && 'maxWidth' in group ? group.maxWidth : this.maxWidth,
443
+ velocityFilterWeight: group && 'velocityFilterWeight' in group
444
+ ? group.velocityFilterWeight
445
+ : this.velocityFilterWeight,
446
+ };
685
447
  }
448
+ _strokeBegin(event) {
449
+ this.dispatchEvent(new CustomEvent('beginStroke', { detail: event }));
450
+ const pointGroupOptions = this._getPointGroupOptions();
451
+ const newPointGroup = Object.assign(Object.assign({}, pointGroupOptions), { points: [] });
452
+ this._data.push(newPointGroup);
453
+ this._reset(pointGroupOptions);
454
+ this._strokeUpdate(event);
455
+ }
456
+ _strokeUpdate(event) {
457
+ if (this._data.length === 0) {
458
+ this._strokeBegin(event);
459
+ return;
460
+ }
461
+ this.dispatchEvent(new CustomEvent('beforeUpdateStroke', { detail: event }));
462
+ const x = event.clientX;
463
+ const y = event.clientY;
464
+ const pressure = event.pressure !== undefined
465
+ ? event.pressure
466
+ : event.force !== undefined
467
+ ? event.force
468
+ : 0;
469
+ const point = this._createPoint(x, y, pressure);
470
+ const lastPointGroup = this._data[this._data.length - 1];
471
+ const lastPoints = lastPointGroup.points;
472
+ const lastPoint = lastPoints.length > 0 && lastPoints[lastPoints.length - 1];
473
+ const isLastPointTooClose = lastPoint
474
+ ? point.distanceTo(lastPoint) <= this.minDistance
475
+ : false;
476
+ const pointGroupOptions = this._getPointGroupOptions(lastPointGroup);
477
+ if (!lastPoint || !(lastPoint && isLastPointTooClose)) {
478
+ const curve = this._addPoint(point, pointGroupOptions);
479
+ if (!lastPoint) {
480
+ this._drawDot(point, pointGroupOptions);
481
+ }
482
+ else if (curve) {
483
+ this._drawCurve(curve, pointGroupOptions);
484
+ }
485
+ lastPoints.push({
486
+ time: point.time,
487
+ x: point.x,
488
+ y: point.y,
489
+ pressure: point.pressure,
490
+ });
491
+ }
492
+ this.dispatchEvent(new CustomEvent('afterUpdateStroke', { detail: event }));
493
+ }
494
+ _strokeEnd(event) {
495
+ this._strokeUpdate(event);
496
+ this.dispatchEvent(new CustomEvent('endStroke', { detail: event }));
497
+ }
498
+ _handlePointerEvents() {
499
+ this._drawningStroke = false;
500
+ this.canvas.addEventListener('pointerdown', this._handlePointerStart);
501
+ this.canvas.addEventListener('pointermove', this._handlePointerMove);
502
+ this.canvas.ownerDocument.addEventListener('pointerup', this._handlePointerEnd);
503
+ }
504
+ _handleMouseEvents() {
505
+ this._drawningStroke = false;
506
+ this.canvas.addEventListener('mousedown', this._handleMouseDown);
507
+ this.canvas.addEventListener('mousemove', this._handleMouseMove);
508
+ this.canvas.ownerDocument.addEventListener('mouseup', this._handleMouseUp);
509
+ }
510
+ _handleTouchEvents() {
511
+ this.canvas.addEventListener('touchstart', this._handleTouchStart);
512
+ this.canvas.addEventListener('touchmove', this._handleTouchMove);
513
+ this.canvas.addEventListener('touchend', this._handleTouchEnd);
514
+ }
515
+ _reset(options) {
516
+ this._lastPoints = [];
517
+ this._lastVelocity = 0;
518
+ this._lastWidth = (options.minWidth + options.maxWidth) / 2;
519
+ this._ctx.fillStyle = options.penColor;
520
+ }
521
+ _createPoint(x, y, pressure) {
522
+ const rect = this.canvas.getBoundingClientRect();
523
+ return new Point(x - rect.left, y - rect.top, pressure, new Date().getTime());
524
+ }
525
+ _addPoint(point, options) {
526
+ const { _lastPoints } = this;
527
+ _lastPoints.push(point);
528
+ if (_lastPoints.length > 2) {
529
+ if (_lastPoints.length === 3) {
530
+ _lastPoints.unshift(_lastPoints[0]);
531
+ }
532
+ const widths = this._calculateCurveWidths(_lastPoints[1], _lastPoints[2], options);
533
+ const curve = Bezier.fromPoints(_lastPoints, widths);
534
+ _lastPoints.shift();
535
+ return curve;
536
+ }
537
+ return null;
538
+ }
539
+ _calculateCurveWidths(startPoint, endPoint, options) {
540
+ const velocity = options.velocityFilterWeight * endPoint.velocityFrom(startPoint) +
541
+ (1 - options.velocityFilterWeight) * this._lastVelocity;
542
+ const newWidth = this._strokeWidth(velocity, options);
543
+ const widths = {
544
+ end: newWidth,
545
+ start: this._lastWidth,
546
+ };
547
+ this._lastVelocity = velocity;
548
+ this._lastWidth = newWidth;
549
+ return widths;
550
+ }
551
+ _strokeWidth(velocity, options) {
552
+ return Math.max(options.maxWidth / (velocity + 1), options.minWidth);
553
+ }
554
+ _drawCurveSegment(x, y, width) {
555
+ const ctx = this._ctx;
556
+ ctx.moveTo(x, y);
557
+ ctx.arc(x, y, width, 0, 2 * Math.PI, false);
558
+ this._isEmpty = false;
559
+ }
560
+ _drawCurve(curve, options) {
561
+ const ctx = this._ctx;
562
+ const widthDelta = curve.endWidth - curve.startWidth;
563
+ const drawSteps = Math.ceil(curve.length()) * 2;
564
+ ctx.beginPath();
565
+ ctx.fillStyle = options.penColor;
566
+ for (let i = 0; i < drawSteps; i += 1) {
567
+ const t = i / drawSteps;
568
+ const tt = t * t;
569
+ const ttt = tt * t;
570
+ const u = 1 - t;
571
+ const uu = u * u;
572
+ const uuu = uu * u;
573
+ let x = uuu * curve.startPoint.x;
574
+ x += 3 * uu * t * curve.control1.x;
575
+ x += 3 * u * tt * curve.control2.x;
576
+ x += ttt * curve.endPoint.x;
577
+ let y = uuu * curve.startPoint.y;
578
+ y += 3 * uu * t * curve.control1.y;
579
+ y += 3 * u * tt * curve.control2.y;
580
+ y += ttt * curve.endPoint.y;
581
+ const width = Math.min(curve.startWidth + ttt * widthDelta, options.maxWidth);
582
+ this._drawCurveSegment(x, y, width);
583
+ }
584
+ ctx.closePath();
585
+ ctx.fill();
586
+ }
587
+ _drawDot(point, options) {
588
+ const ctx = this._ctx;
589
+ const width = options.dotSize > 0
590
+ ? options.dotSize
591
+ : (options.minWidth + options.maxWidth) / 2;
592
+ ctx.beginPath();
593
+ this._drawCurveSegment(point.x, point.y, width);
594
+ ctx.closePath();
595
+ ctx.fillStyle = options.penColor;
596
+ ctx.fill();
597
+ }
598
+ _fromData(pointGroups, drawCurve, drawDot) {
599
+ for (const group of pointGroups) {
600
+ const { points } = group;
601
+ const pointGroupOptions = this._getPointGroupOptions(group);
602
+ if (points.length > 1) {
603
+ for (let j = 0; j < points.length; j += 1) {
604
+ const basicPoint = points[j];
605
+ const point = new Point(basicPoint.x, basicPoint.y, basicPoint.pressure, basicPoint.time);
606
+ if (j === 0) {
607
+ this._reset(pointGroupOptions);
608
+ }
609
+ const curve = this._addPoint(point, pointGroupOptions);
610
+ if (curve) {
611
+ drawCurve(curve, pointGroupOptions);
612
+ }
613
+ }
614
+ }
615
+ else {
616
+ this._reset(pointGroupOptions);
617
+ drawDot(points[0], pointGroupOptions);
618
+ }
619
+ }
620
+ }
621
+ toSVG({ includeBackgroundColor = false } = {}) {
622
+ const pointGroups = this._data;
623
+ const ratio = Math.max(window.devicePixelRatio || 1, 1);
624
+ const minX = 0;
625
+ const minY = 0;
626
+ const maxX = this.canvas.width / ratio;
627
+ const maxY = this.canvas.height / ratio;
628
+ const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
629
+ svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
630
+ svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
631
+ svg.setAttribute('viewBox', `${minX} ${minY} ${maxX} ${maxY}`);
632
+ svg.setAttribute('width', maxX.toString());
633
+ svg.setAttribute('height', maxY.toString());
634
+ if (includeBackgroundColor && this.backgroundColor) {
635
+ const rect = document.createElement('rect');
636
+ rect.setAttribute('width', '100%');
637
+ rect.setAttribute('height', '100%');
638
+ rect.setAttribute('fill', this.backgroundColor);
639
+ svg.appendChild(rect);
640
+ }
641
+ this._fromData(pointGroups, (curve, { penColor }) => {
642
+ const path = document.createElement('path');
643
+ if (!isNaN(curve.control1.x) &&
644
+ !isNaN(curve.control1.y) &&
645
+ !isNaN(curve.control2.x) &&
646
+ !isNaN(curve.control2.y)) {
647
+ const attr = `M ${curve.startPoint.x.toFixed(3)},${curve.startPoint.y.toFixed(3)} ` +
648
+ `C ${curve.control1.x.toFixed(3)},${curve.control1.y.toFixed(3)} ` +
649
+ `${curve.control2.x.toFixed(3)},${curve.control2.y.toFixed(3)} ` +
650
+ `${curve.endPoint.x.toFixed(3)},${curve.endPoint.y.toFixed(3)}`;
651
+ path.setAttribute('d', attr);
652
+ path.setAttribute('stroke-width', (curve.endWidth * 2.25).toFixed(3));
653
+ path.setAttribute('stroke', penColor);
654
+ path.setAttribute('fill', 'none');
655
+ path.setAttribute('stroke-linecap', 'round');
656
+ svg.appendChild(path);
657
+ }
658
+ }, (point, { penColor, dotSize, minWidth, maxWidth }) => {
659
+ const circle = document.createElement('circle');
660
+ const size = dotSize > 0 ? dotSize : (minWidth + maxWidth) / 2;
661
+ circle.setAttribute('r', size.toString());
662
+ circle.setAttribute('cx', point.x.toString());
663
+ circle.setAttribute('cy', point.y.toString());
664
+ circle.setAttribute('fill', penColor);
665
+ svg.appendChild(circle);
666
+ });
667
+ return svg.outerHTML;
668
+ }
669
+ }
686
670
 
687
- body = dummy.innerHTML;
688
- }
689
-
690
- var footer = '</svg>';
691
- var data = header + body + footer;
692
-
693
- return prefix + btoa(data);
694
- };
695
-
696
- SignaturePad.prototype.fromData = function (pointGroups) {
697
- var _this3 = this;
698
-
699
- this.clear();
700
-
701
- this._fromData(pointGroups, function (curve, widths) {
702
- return _this3._drawCurve(curve, widths.start, widths.end);
703
- }, function (rawPoint) {
704
- return _this3._drawDot(rawPoint);
705
- });
706
-
707
- this._data = pointGroups;
708
- };
709
-
710
- SignaturePad.prototype.toData = function () {
711
- return this._data;
712
- };
713
671
 
714
- /* harmony default export */ __webpack_exports__["default"] = (SignaturePad);
672
+ //# sourceMappingURL=signature_pad.js.map
715
673
 
716
674
 
717
675
  /***/ }),
@@ -1005,11 +963,15 @@ var Action = /** @class */ (function (_super) {
1005
963
  if (!!_this.locTitleName) {
1006
964
  _this.locTitleChanged();
1007
965
  }
966
+ _this.registerFunctionOnPropertyValueChanged("_title", function () {
967
+ _this.raiseUpdate(true);
968
+ });
1008
969
  _this.locStrChangedInPopupModel();
1009
970
  return _this;
1010
971
  }
1011
- Action.prototype.raiseUpdate = function () {
1012
- this.updateCallback && this.updateCallback();
972
+ Action.prototype.raiseUpdate = function (isResetInitialized) {
973
+ if (isResetInitialized === void 0) { isResetInitialized = false; }
974
+ this.updateCallback && this.updateCallback(isResetInitialized);
1013
975
  };
1014
976
  Action.prototype.createLocTitle = function () {
1015
977
  return this.createLocalizableString("title", this, true);
@@ -1225,7 +1187,7 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
1225
1187
  }
1226
1188
  AdaptiveActionContainer.prototype.hideItemsGreaterN = function (visibleItemsCount) {
1227
1189
  var actionsToHide = this.visibleActions.filter(function (action) { return !action.disableHide; });
1228
- visibleItemsCount = Math.max(visibleItemsCount, this.minVisibleItemsCount) - (this.visibleActions.length - actionsToHide.length);
1190
+ visibleItemsCount = Math.max(visibleItemsCount, this.minVisibleItemsCount - (this.visibleActions.length - actionsToHide.length));
1229
1191
  var hiddenItems = [];
1230
1192
  actionsToHide.forEach(function (item) {
1231
1193
  if (visibleItemsCount <= 0) {
@@ -1237,7 +1199,8 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
1237
1199
  this.hiddenItemsListModel.setItems(hiddenItems);
1238
1200
  };
1239
1201
  AdaptiveActionContainer.prototype.getVisibleItemsCount = function (availableSize) {
1240
- var itemsSizes = this.visibleActions.map(function (item) { return item.minDimension; });
1202
+ this.visibleActions.filter(function (action) { return action.disableHide; }).forEach(function (action) { return availableSize -= action.minDimension; });
1203
+ var itemsSizes = this.visibleActions.filter(function (action) { return !action.disableHide; }).map(function (item) { return item.minDimension; });
1241
1204
  var currSize = 0;
1242
1205
  for (var i = 0; i < itemsSizes.length; i++) {
1243
1206
  currSize += itemsSizes[i];
@@ -1282,12 +1245,12 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
1282
1245
  };
1283
1246
  AdaptiveActionContainer.prototype.onSet = function () {
1284
1247
  var _this = this;
1285
- this.actions.forEach(function (action) { return action.updateCallback = function () { return _this.raiseUpdate(false); }; });
1248
+ this.actions.forEach(function (action) { return action.updateCallback = function (isResetInitialized) { return _this.raiseUpdate(isResetInitialized); }; });
1286
1249
  _super.prototype.onSet.call(this);
1287
1250
  };
1288
1251
  AdaptiveActionContainer.prototype.onPush = function (item) {
1289
1252
  var _this = this;
1290
- item.updateCallback = function () { return _this.raiseUpdate(false); };
1253
+ item.updateCallback = function (isResetInitialized) { return _this.raiseUpdate(isResetInitialized); };
1291
1254
  _super.prototype.onPush.call(this, item);
1292
1255
  };
1293
1256
  AdaptiveActionContainer.prototype.getRenderedActions = function () {
@@ -1557,6 +1520,9 @@ var ActionContainer = /** @class */ (function (_super) {
1557
1520
  }
1558
1521
  })
1559
1522
  ], ActionContainer.prototype, "actions", void 0);
1523
+ __decorate([
1524
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
1525
+ ], ActionContainer.prototype, "containerCss", void 0);
1560
1526
  __decorate([
1561
1527
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
1562
1528
  ], ActionContainer.prototype, "isEmpty", void 0);
@@ -2027,8 +1993,9 @@ var Base = /** @class */ (function () {
2027
1993
  * @param propName A property name.
2028
1994
  */
2029
1995
  Base.prototype.getPropertyByName = function (propName) {
2030
- if (!this.classMetaData) {
2031
- this.classMetaData = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].findClass(this.getType());
1996
+ var type = this.getType();
1997
+ if (!this.classMetaData || this.classMetaData.name !== type) {
1998
+ this.classMetaData = _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].findClass(type);
2032
1999
  }
2033
2000
  return !!this.classMetaData ? this.classMetaData.findProperty(propName) : null;
2034
2001
  };
@@ -5201,7 +5168,18 @@ var defaultV2Css = {
5201
5168
  panelWrapperInRow: "sd-paneldynamic__panel-wrapper--in-row",
5202
5169
  progressBtnIcon: "icon-progressbuttonv2",
5203
5170
  noEntriesPlaceholder: "sd-paneldynamic__placeholder sd-question__placeholder",
5204
- compact: "sd-element--with-frame sd-element--compact"
5171
+ compact: "sd-element--with-frame sd-element--compact",
5172
+ tabsRoot: "sd-tabs-toolbar",
5173
+ tabsLeft: "sd-tabs-toolbar--left",
5174
+ tabsRight: "sd-tabs-toolbar--right",
5175
+ tabsCenter: "sd-tabs-toolbar--center",
5176
+ tabs: {
5177
+ item: "sd-tab-item",
5178
+ itemPressed: "sd-tab-item--pressed",
5179
+ itemAsIcon: "sd-tab-item--icon",
5180
+ itemIcon: "sd-tab-item__icon",
5181
+ itemTitle: "sd-tab-item__title"
5182
+ }
5205
5183
  },
5206
5184
  progress: "sd-progress sd-body__progress",
5207
5185
  progressTop: "sd-body__progress--top",
@@ -5722,12 +5700,13 @@ var defaultV2Css = {
5722
5700
  other: "sd-input sd-comment sd-selectbase__other",
5723
5701
  onError: "sd-input--error",
5724
5702
  label: "sd-selectbase__label",
5725
- item: "sd-item sd-radio sd-selectbase__item",
5726
- itemDisabled: "sd-item--disabled sd-radio--disabled",
5727
- itemChecked: "sd-item--checked sd-radio--checked",
5728
- itemHover: "sd-item--allowhover sd-radio--allowhover",
5729
- itemControl: "sd-visuallyhidden sd-item__control sd-radio__control",
5730
- itemDecorator: "sd-item__svg sd-radio__svg",
5703
+ itemSvgIconId: "#icon-v2check",
5704
+ item: "sd-item sd-checkbox sd-selectbase__item",
5705
+ itemDisabled: "sd-item--disabled sd-checkbox--disabled",
5706
+ itemChecked: "sd-item--checked sd-checkbox--checked",
5707
+ itemHover: "sd-item--allowhover sd-checkbox--allowhover",
5708
+ itemControl: "sd-visuallyhidden sd-item__control sd-checkbox__control",
5709
+ itemDecorator: "sd-item__svg sd-checkbox__svg",
5731
5710
  cleanButton: "sd-tagbox_clean-button sd-dropdown_clean-button",
5732
5711
  cleanButtonSvg: "sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",
5733
5712
  cleanButtonIconId: "icon-clear",
@@ -6899,6 +6878,10 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
6899
6878
  enumerable: false,
6900
6879
  configurable: true
6901
6880
  });
6881
+ DragDropMatrixRows.prototype.onStartDrag = function () {
6882
+ this.restoreUserSelectValue = document.body.style.userSelect;
6883
+ document.body.style.userSelect = "none";
6884
+ };
6902
6885
  DragDropMatrixRows.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
6903
6886
  var _this = this;
6904
6887
  var draggedElementShortcut = document.createElement("div");
@@ -7005,6 +6988,7 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
7005
6988
  this.parentElement.clearOnDrop();
7006
6989
  this.fromIndex = null;
7007
6990
  this.toIndex = null;
6991
+ document.body.style.userSelect = this.restoreUserSelectValue || "initial";
7008
6992
  _super.prototype.clear.call(this);
7009
6993
  };
7010
6994
  return DragDropMatrixRows;
@@ -7191,13 +7175,14 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7191
7175
  __webpack_require__.r(__webpack_exports__);
7192
7176
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DropdownListModel", function() { return DropdownListModel; });
7193
7177
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
7194
- /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
7195
- /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./list */ "./src/list.ts");
7196
- /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
7197
- /* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./question_dropdown */ "./src/question_dropdown.ts");
7198
- /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
7199
- /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
7200
- /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
7178
+ /* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
7179
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
7180
+ /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./list */ "./src/list.ts");
7181
+ /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
7182
+ /* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./question_dropdown */ "./src/question_dropdown.ts");
7183
+ /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
7184
+ /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
7185
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
7201
7186
  var __extends = (undefined && undefined.__extends) || (function () {
7202
7187
  var extendStatics = function (d, b) {
7203
7188
  extendStatics = Object.setPrototypeOf ||
@@ -7227,6 +7212,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
7227
7212
 
7228
7213
 
7229
7214
 
7215
+
7230
7216
  var DropdownListModel = /** @class */ (function (_super) {
7231
7217
  __extends(DropdownListModel, _super);
7232
7218
  function DropdownListModel(question, onSelectionChanged) {
@@ -7247,13 +7233,9 @@ var DropdownListModel = /** @class */ (function (_super) {
7247
7233
  }
7248
7234
  };
7249
7235
  question.onPropertyChanged.add(function (sender, options) {
7250
- if (options.name == "value") {
7251
- _this.showInputFieldComponent = _this.question.showInputFieldComponent;
7252
- _this.showSelectedItemLocText = _this.question.showSelectedItemLocText;
7253
- }
7236
+ _this.onPropertyChangedHandler(sender, options);
7254
7237
  });
7255
7238
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
7256
- _this.showSelectedItemLocText = _this.question.showSelectedItemLocText;
7257
7239
  _this.listModel = _this.createListModel();
7258
7240
  _this.updateAfterListModelCreated(_this.listModel);
7259
7241
  _this.setSearchEnabled(_this.question.searchEnabled);
@@ -7269,7 +7251,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7269
7251
  configurable: true
7270
7252
  });
7271
7253
  DropdownListModel.prototype.getFocusFirstInputSelector = function () {
7272
- if (_utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"]) {
7254
+ if (_utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"]) {
7273
7255
  return this.isValueEmpty(this.question.value) ? this.itemSelector : this.selectedItemSelector;
7274
7256
  }
7275
7257
  else {
@@ -7317,12 +7299,12 @@ var DropdownListModel = /** @class */ (function (_super) {
7317
7299
  };
7318
7300
  DropdownListModel.prototype.createPopup = function () {
7319
7301
  var _this = this;
7320
- this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_3__["PopupModel"]("sv-list", { model: this.listModel }, "bottom", "center", false);
7321
- this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"] ? "overlay" : "popup";
7302
+ this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: this.listModel }, "bottom", "center", false);
7303
+ this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"] ? "overlay" : "popup";
7322
7304
  this._popupModel.positionMode = "fixed";
7323
7305
  this._popupModel.isFocusedContainer = false;
7324
- this._popupModel.isFocusedContent = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
7325
- this._popupModel.setWidthByTarget = !_utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
7306
+ this._popupModel.isFocusedContent = _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"];
7307
+ this._popupModel.setWidthByTarget = !_utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"];
7326
7308
  this.updatePopupFocusFirstInputSelector();
7327
7309
  this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
7328
7310
  _this.updatePopupFocusFirstInputSelector();
@@ -7389,7 +7371,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7389
7371
  _this._popupModel.toggleVisibility();
7390
7372
  };
7391
7373
  }
7392
- var res = new _list__WEBPACK_IMPORTED_MODULE_2__["ListModel"](visibleItems, _onSelectionChanged, false, undefined, this.question.choicesLazyLoadEnabled ? this.listModelFilterStringChanged : undefined, this.listElementId);
7374
+ var res = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](visibleItems, _onSelectionChanged, false, undefined, this.question.choicesLazyLoadEnabled ? this.listModelFilterStringChanged : undefined, this.listElementId);
7393
7375
  res.renderElements = false;
7394
7376
  res.forceShowFilter = true;
7395
7377
  res.areSameItemsCallback = function (item1, item2) {
@@ -7409,7 +7391,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7409
7391
  model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
7410
7392
  };
7411
7393
  DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
7412
- this.popupModel.cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(popupCssClass).append(this.popupCssClasses).toString();
7394
+ this.popupModel.cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]().append(popupCssClass).append(this.popupCssClasses).toString();
7413
7395
  this.listModel.cssClasses = listCssClasses;
7414
7396
  };
7415
7397
  DropdownListModel.prototype.resetFilterString = function () {
@@ -7480,7 +7462,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7480
7462
  set: function (val) {
7481
7463
  this.inputString = val;
7482
7464
  this.filterString = val;
7483
- this.applyHintString(this.listModel.focusedItem);
7465
+ this.applyHintString(this.listModel.focusedItem || this.question.selectedItem);
7484
7466
  },
7485
7467
  enumerable: false,
7486
7468
  configurable: true
@@ -7579,14 +7561,14 @@ var DropdownListModel = /** @class */ (function (_super) {
7579
7561
  });
7580
7562
  Object.defineProperty(DropdownListModel.prototype, "inputMode", {
7581
7563
  get: function () {
7582
- return _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"] ? "none" : "text";
7564
+ return _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"] ? "none" : "text";
7583
7565
  },
7584
7566
  enumerable: false,
7585
7567
  configurable: true
7586
7568
  });
7587
7569
  DropdownListModel.prototype.setSearchEnabled = function (newValue) {
7588
- this.listModel.searchEnabled = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
7589
- this.listModel.showSearchClearButton = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
7570
+ this.listModel.searchEnabled = _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"];
7571
+ this.listModel.showSearchClearButton = _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"];
7590
7572
  this.searchEnabled = newValue;
7591
7573
  };
7592
7574
  DropdownListModel.prototype.updateItems = function () {
@@ -7602,6 +7584,11 @@ var DropdownListModel = /** @class */ (function (_super) {
7602
7584
  }
7603
7585
  }
7604
7586
  };
7587
+ DropdownListModel.prototype.onPropertyChangedHandler = function (sender, options) {
7588
+ if (options.name == "value") {
7589
+ this.showInputFieldComponent = this.question.showInputFieldComponent;
7590
+ }
7591
+ };
7605
7592
  DropdownListModel.prototype.focusItemOnClickAndPopup = function () {
7606
7593
  if (this._popupModel.isVisible && this.question.value)
7607
7594
  this.changeSelectionWithKeyboard(false);
@@ -7620,11 +7607,18 @@ var DropdownListModel = /** @class */ (function (_super) {
7620
7607
  DropdownListModel.prototype.changeSelectionWithKeyboard = function (reverse) {
7621
7608
  var _a;
7622
7609
  var focusedItem = this.listModel.focusedItem;
7623
- if (reverse) {
7624
- this.listModel.focusPrevVisibleItem();
7610
+ if (!focusedItem && this.question.selectedItem) {
7611
+ if (_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(this.question.choices, this.question.value)) {
7612
+ this.listModel.focusedItem = this.question.selectedItem;
7613
+ }
7625
7614
  }
7626
7615
  else {
7627
- this.listModel.focusNextVisibleItem();
7616
+ if (reverse) {
7617
+ this.listModel.focusPrevVisibleItem();
7618
+ }
7619
+ else {
7620
+ this.listModel.focusNextVisibleItem();
7621
+ }
7628
7622
  }
7629
7623
  this.beforeScrollToFocusedItem(focusedItem);
7630
7624
  this.scrollToFocusedItem();
@@ -7671,7 +7665,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7671
7665
  event.stopPropagation();
7672
7666
  }
7673
7667
  else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32 && (!this.question.searchEnabled || !this.inputString))) {
7674
- if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
7668
+ if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_5__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
7675
7669
  this._popupModel.isVisible = false;
7676
7670
  this.onClear(event);
7677
7671
  this.question.survey.questionEditFinishCallback(this.question, event);
@@ -7702,7 +7696,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7702
7696
  if (event.keyCode === 32 && this.question.searchEnabled) {
7703
7697
  return;
7704
7698
  }
7705
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_7__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
7699
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
7706
7700
  }
7707
7701
  };
7708
7702
  DropdownListModel.prototype.onEscape = function () {
@@ -7716,24 +7710,25 @@ var DropdownListModel = /** @class */ (function (_super) {
7716
7710
  }
7717
7711
  };
7718
7712
  DropdownListModel.prototype.onBlur = function (event) {
7719
- if (this.popupModel.isVisible && _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"]) {
7713
+ this.focused = false;
7714
+ if (this.popupModel.isVisible && _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsTouch"]) {
7720
7715
  this._popupModel.isVisible = true;
7721
7716
  return;
7722
7717
  }
7723
- if (this.popupModel.isVisible && !!this.filterString) {
7724
- this.listModel.selectFocusedItem();
7725
- }
7726
7718
  this.resetFilterString();
7727
7719
  this.inputString = null;
7728
7720
  this.hintString = "";
7729
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_7__["doKey2ClickBlur"])(event);
7721
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["doKey2ClickBlur"])(event);
7730
7722
  this._popupModel.isVisible = false;
7731
7723
  event.stopPropagation();
7732
7724
  };
7733
7725
  DropdownListModel.prototype.onFocus = function (event) {
7726
+ this.focused = true;
7734
7727
  this.setInputStringFromSelectedItem(this.question.selectedItem);
7735
7728
  };
7736
7729
  DropdownListModel.prototype.setInputStringFromSelectedItem = function (newValue) {
7730
+ if (!this.focused)
7731
+ return;
7737
7732
  if (this.question.searchEnabled && !!newValue) {
7738
7733
  this.applyInputString(newValue);
7739
7734
  }
@@ -7754,10 +7749,10 @@ var DropdownListModel = /** @class */ (function (_super) {
7754
7749
  this.listModel.scrollToFocusedItem();
7755
7750
  };
7756
7751
  __decorate([
7757
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
7752
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
7758
7753
  ], DropdownListModel.prototype, "searchEnabled", void 0);
7759
7754
  __decorate([
7760
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
7755
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
7761
7756
  defaultValue: "",
7762
7757
  onSet: function (_, target) {
7763
7758
  target.onSetFilterString();
@@ -7765,25 +7760,21 @@ var DropdownListModel = /** @class */ (function (_super) {
7765
7760
  })
7766
7761
  ], DropdownListModel.prototype, "filterString", void 0);
7767
7762
  __decorate([
7768
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
7763
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
7769
7764
  defaultValue: "",
7770
7765
  onSet: function (newValue, target) {
7771
7766
  target.question.inputHasValue = !!newValue;
7772
- target.showSelectedItemLocText = target.question.showSelectedItemLocText;
7773
7767
  }
7774
7768
  })
7775
7769
  ], DropdownListModel.prototype, "inputString", void 0);
7776
7770
  __decorate([
7777
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({})
7778
- ], DropdownListModel.prototype, "showSelectedItemLocText", void 0);
7779
- __decorate([
7780
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({})
7771
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({})
7781
7772
  ], DropdownListModel.prototype, "showInputFieldComponent", void 0);
7782
7773
  __decorate([
7783
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
7774
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
7784
7775
  ], DropdownListModel.prototype, "ariaActivedescendant", void 0);
7785
7776
  __decorate([
7786
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
7777
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
7787
7778
  defaultValue: false,
7788
7779
  onSet: function (newVal, target) {
7789
7780
  if (newVal) {
@@ -7796,7 +7787,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7796
7787
  })
7797
7788
  ], DropdownListModel.prototype, "hasScroll", void 0);
7798
7789
  __decorate([
7799
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "" })
7790
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "" })
7800
7791
  ], DropdownListModel.prototype, "hintString", void 0);
7801
7792
  return DropdownListModel;
7802
7793
  }(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
@@ -8018,6 +8009,12 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8018
8009
  }
8019
8010
  this.syncFilterStringPlaceholder();
8020
8011
  };
8012
+ DropdownMultiSelectListModel.prototype.onPropertyChangedHandler = function (sender, options) {
8013
+ _super.prototype.onPropertyChangedHandler.call(this, sender, options);
8014
+ if (options.name === "value" || options.name === "renderedValue") {
8015
+ this.syncFilterStringPlaceholder();
8016
+ }
8017
+ };
8021
8018
  __decorate([
8022
8019
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "" })
8023
8020
  ], DropdownMultiSelectListModel.prototype, "filterStringPlaceholder", void 0);
@@ -8788,7 +8785,7 @@ __webpack_require__.r(__webpack_exports__);
8788
8785
  // import "../../main.scss";
8789
8786
  //import "../../modern.scss";
8790
8787
  var Version;
8791
- Version = "" + "1.9.91";
8788
+ Version = "" + "1.9.93";
8792
8789
  function checkLibraryVersion(ver, libraryName) {
8793
8790
  if (Version != ver) {
8794
8791
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -16553,7 +16550,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
16553
16550
 
16554
16551
 
16555
16552
  /**
16556
- * Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows.
16553
+ * Array of ItemValue is used in checkbox, dropdown and radiogroup choices, matrix columns and rows.
16557
16554
  * It has two main properties: value and text. If text is empty, value is used for displaying.
16558
16555
  * The text property is localizable and support markdown.
16559
16556
  */
@@ -17032,7 +17029,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObjectProperty"].getItemValuesDefa
17032
17029
  return res;
17033
17030
  };
17034
17031
  _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
17035
- "!value",
17032
+ { name: "!value", isUnique: true },
17036
17033
  {
17037
17034
  name: "text",
17038
17035
  serializationProperty: "locText",
@@ -19871,7 +19868,7 @@ var arabicSurveyStrings = {
19871
19868
  completingSurveyBefore: "تظهر سجلاتنا أنك قد أكملت هذا الاستطلاع بالفعل.",
19872
19869
  loadingSurvey: "...يتم تحميل النموذج",
19873
19870
  placeholder: "...اختر",
19874
- // ratingOptionsCaption: "Tap to rate here...",
19871
+ // ratingOptionsCaption: "Select...",
19875
19872
  value: "القيمة",
19876
19873
  requiredError: ".يرجى الإجابة على السؤال",
19877
19874
  requiredErrorInPanel: "الرجاء الإجابة على سؤال واحد على الأقل.",
@@ -19978,7 +19975,7 @@ var basqueSurveyStrings = {
19978
19975
  completingSurveyBefore: "Gure datuek diote dagoeneko galdetegia erantzun duzula.",
19979
19976
  loadingSurvey: "Galdetegia kargatzen...",
19980
19977
  placeholder: "Hautatu...",
19981
- // ratingOptionsCaption: "Tap to rate here...",
19978
+ // ratingOptionsCaption: "Select...",
19982
19979
  value: "balioa",
19983
19980
  requiredError: "Mesedez, galdera erantzun.",
19984
19981
  requiredErrorInPanel: "Mesedez, gutxienez galdera bat erantzun.",
@@ -20085,7 +20082,7 @@ var bulgarianStrings = {
20085
20082
  completingSurveyBefore: "Изглежда, че вие вече сте попълнили анкетата.",
20086
20083
  loadingSurvey: "Зареждане на анкетата...",
20087
20084
  placeholder: "Изберете...",
20088
- // ratingOptionsCaption: "Tap to rate here...",
20085
+ // ratingOptionsCaption: "Select...",
20089
20086
  value: "value",
20090
20087
  requiredError: "Моля, отговорете на следния въпрос.",
20091
20088
  requiredErrorInPanel: "Моля, отговорете поне на един от въпросите.",
@@ -20192,7 +20189,7 @@ var catalanSurveyStrings = {
20192
20189
  // completingSurveyBefore: "Our records show that you have already completed this survey.",
20193
20190
  loadingSurvey: "L'enquesta s'està carregant ...",
20194
20191
  placeholder: "Selecciona ...",
20195
- // ratingOptionsCaption: "Tap to rate here...",
20192
+ // ratingOptionsCaption: "Select...",
20196
20193
  // value: "value",
20197
20194
  requiredError: "Si us plau contesti la pregunta.",
20198
20195
  // requiredErrorInPanel: "Response required: answer at least one question.",
@@ -20299,7 +20296,7 @@ var croatianStrings = {
20299
20296
  completingSurveyBefore: "Naši zapisi pokazuju da ste već završili ovu anketu.",
20300
20297
  loadingSurvey: "Anketa o učitavanje...",
20301
20298
  placeholder: "Odaberite...",
20302
- // ratingOptionsCaption: "Tap to rate here...",
20299
+ // ratingOptionsCaption: "Select...",
20303
20300
  value: "vrijednost",
20304
20301
  requiredError: "Molim vas odgovorite na pitanje.",
20305
20302
  requiredErrorInPanel: "Molim vas odgovorite na barem jedno pitanje.",
@@ -20406,7 +20403,7 @@ var czechSurveyStrings = {
20406
20403
  completingSurveyBefore: "Naše záznamy ukazují, že jste tento průzkum již dokončil/a.",
20407
20404
  loadingSurvey: "Probíhá načítání průzkumu...",
20408
20405
  placeholder: "Vyberte...",
20409
- // ratingOptionsCaption: "Tap to rate here...",
20406
+ // ratingOptionsCaption: "Select...",
20410
20407
  value: "hodnota",
20411
20408
  requiredError: "Odpovězte prosím na otázku.",
20412
20409
  requiredErrorInPanel: "Odpovězte prosím alespoň jednu otázku.",
@@ -20513,7 +20510,7 @@ var danishSurveyStrings = {
20513
20510
  completingSurveyBefore: "Vores data viser at du allerede har gennemført dette spørgeskema.",
20514
20511
  loadingSurvey: "Spørgeskemaet hentes fra serveren...",
20515
20512
  placeholder: "Vælg...",
20516
- // ratingOptionsCaption: "Tap to rate here...",
20513
+ // ratingOptionsCaption: "Select...",
20517
20514
  value: "værdi",
20518
20515
  requiredError: "Besvar venligst spørgsmålet.",
20519
20516
  requiredErrorInPanel: "Besvar venligst mindst ét spørgsmål.",
@@ -20620,7 +20617,7 @@ var dutchSurveyStrings = {
20620
20617
  completingSurveyBefore: "Onze gegevens tonen aan dat je deze vragenlijst reeds beantwoord hebt.",
20621
20618
  loadingSurvey: "De vragenlijst is aan het laden...",
20622
20619
  placeholder: "Kies...",
20623
- // ratingOptionsCaption: "Tap to rate here...",
20620
+ // ratingOptionsCaption: "Select...",
20624
20621
  value: "waarde",
20625
20622
  requiredError: "Dit is een vereiste vraag",
20626
20623
  requiredErrorInPanel: "Gelieve ten minste een vraag te beantwoorden.",
@@ -20726,7 +20723,7 @@ var englishStrings = {
20726
20723
  completingSurveyBefore: "Our records show that you have already completed this survey.",
20727
20724
  loadingSurvey: "Loading Survey...",
20728
20725
  placeholder: "Select...",
20729
- ratingOptionsCaption: "Tap to rate here...",
20726
+ ratingOptionsCaption: "Select...",
20730
20727
  value: "value",
20731
20728
  requiredError: "Response required.",
20732
20729
  requiredErrorInPanel: "Response required: answer at least one question.",
@@ -20838,7 +20835,7 @@ var estonianSurveyStrings = {
20838
20835
  completingSurveyBefore: "Meie andmetel oled sa sellele ankeedile juba vastanud.",
20839
20836
  loadingSurvey: "Laen ankeeti...",
20840
20837
  placeholder: "Vali...",
20841
- // ratingOptionsCaption: "Tap to rate here...",
20838
+ // ratingOptionsCaption: "Select...",
20842
20839
  value: "väärtus",
20843
20840
  requiredError: "Palun vasta küsimusele.",
20844
20841
  requiredErrorInPanel: "Palun vasta vähemalt ühele küsimusele.",
@@ -21159,7 +21156,7 @@ var georgianSurveyStrings = {
21159
21156
  // completingSurveyBefore: "Our records show that you have already completed this survey.",
21160
21157
  loadingSurvey: "ჩატვირთვა სერვერიდან...",
21161
21158
  placeholder: "არჩევა...",
21162
- // ratingOptionsCaption: "Tap to rate here...",
21159
+ // ratingOptionsCaption: "Select...",
21163
21160
  // value: "value",
21164
21161
  requiredError: "გთხოვთ უპასუხეთ კითხვას.",
21165
21162
  // requiredErrorInPanel: "Response required: answer at least one question.",
@@ -21481,7 +21478,7 @@ var hebrewSurveyStrings = {
21481
21478
  completingSurveyBefore: "הרשומות שלנו מראות שכבר סיימת את הסקר הזה.",
21482
21479
  loadingSurvey: "טעינה מהשרת...",
21483
21480
  placeholder: "בחר...",
21484
- // ratingOptionsCaption: "Tap to rate here...",
21481
+ // ratingOptionsCaption: "Select...",
21485
21482
  value: "ערך",
21486
21483
  requiredError: "אנא השב על השאלה",
21487
21484
  requiredErrorInPanel: "אנא ענה לפחות על שאלה אחת.",
@@ -21588,7 +21585,7 @@ var hindiStrings = {
21588
21585
  completingSurveyBefore: " हमारे रिकॉर्ड बताते हैं कि आप पहले ही इस सर्वेक्षण को पूरा कर चुके हैं",
21589
21586
  loadingSurvey: "सर्वेक्षण खुल रहा है.…",
21590
21587
  placeholder: "चुनें",
21591
- // ratingOptionsCaption: "Tap to rate here...",
21588
+ // ratingOptionsCaption: "Select...",
21592
21589
  value: "मूल्य",
21593
21590
  requiredError: "कृपया प्रश्न का उत्तर दें",
21594
21591
  requiredErrorInPanel: "कृपया कम से कम एक प्रश्न का उत्तर दें",
@@ -21695,7 +21692,7 @@ var hungarianSurveyStrings = {
21695
21692
  completingSurveyBefore: "Már kitöltötte a felmérést.",
21696
21693
  loadingSurvey: "Felmérés betöltése...",
21697
21694
  placeholder: "Válasszon...",
21698
- // ratingOptionsCaption: "Tap to rate here...",
21695
+ // ratingOptionsCaption: "Select...",
21699
21696
  value: "érték",
21700
21697
  requiredError: "Kérjük, válaszolja meg ezt a kérdést!",
21701
21698
  requiredErrorInPanel: "Kérjük, válaszoljon legalább egy kérdésre.",
@@ -21802,7 +21799,7 @@ var icelandicSurveyStrings = {
21802
21799
  completingSurveyBefore: "Skrár okkar sýna að þú hefur þegar lokið þessari könnun.",
21803
21800
  loadingSurvey: "Könnunin er að hlaða...",
21804
21801
  placeholder: "Veldu...",
21805
- // ratingOptionsCaption: "Tap to rate here...",
21802
+ // ratingOptionsCaption: "Select...",
21806
21803
  value: "gildi",
21807
21804
  requiredError: "Vinsamlegast svarið spurningunni.",
21808
21805
  requiredErrorInPanel: "Vinsamlegast svaraðu að minnsta kosti einni spurningu.",
@@ -21909,7 +21906,7 @@ var indonesianStrings = {
21909
21906
  completingSurveyBefore: "Catatan kami menunjukkan bahwa Anda telah menyelesaikan survei ini.",
21910
21907
  loadingSurvey: "Memuat survei...",
21911
21908
  placeholder: "Pilih...",
21912
- // ratingOptionsCaption: "Tap to rate here...",
21909
+ // ratingOptionsCaption: "Select...",
21913
21910
  value: "nilai",
21914
21911
  requiredError: "Silahkan jawab pertanyaan berikut.",
21915
21912
  requiredErrorInPanel: "Silahkan jawab setidaknya satu petanyaan.",
@@ -22123,7 +22120,7 @@ var japaneseSurveyStrings = {
22123
22120
  completingSurveyBefore: "当社の記録によると、この調査はすでに完了しています。",
22124
22121
  loadingSurvey: "調査をダウンロード中",
22125
22122
  placeholder: "選択",
22126
- // ratingOptionsCaption: "Tap to rate here...",
22123
+ // ratingOptionsCaption: "Select...",
22127
22124
  value: "値打ち",
22128
22125
  requiredError: "質問にお答え下さい",
22129
22126
  requiredErrorInPanel: "最低でも1つの質問に答えてください。",
@@ -22230,7 +22227,7 @@ var kazakhStrings = {
22230
22227
  completingSurveyBefore: "Сіз бұл сауалнаманы өтіп қойдыңыз.",
22231
22228
  loadingSurvey: "Серверден жүктеу...",
22232
22229
  placeholder: "Таңдау...",
22233
- // ratingOptionsCaption: "Tap to rate here...",
22230
+ // ratingOptionsCaption: "Select...",
22234
22231
  value: "мәні",
22235
22232
  requiredError: "Өтінеміз, сұраққа жауап беріңіз.",
22236
22233
  requiredErrorInPanel: "Өтінеміз, кем дегенде бір сұраққа жауап беріңіз.",
@@ -22551,7 +22548,7 @@ var lithuaniaSurveyStrings = {
22551
22548
  completingSurveyBefore: "Mūsų įrašai rodo, kad jau atlikote šią apklausą.",
22552
22549
  loadingSurvey: "Prašome palaukti...",
22553
22550
  placeholder: "Pasirinkti...",
22554
- // ratingOptionsCaption: "Tap to rate here...",
22551
+ // ratingOptionsCaption: "Select...",
22555
22552
  value: "reikšmė",
22556
22553
  requiredError: "Būtina atsakyti į šį klausimą.",
22557
22554
  requiredErrorInPanel: "Būtina atsakyti bent į vieną klausimą.",
@@ -22658,7 +22655,7 @@ var macedonianSurveyStrings = {
22658
22655
  completingSurveyBefore: "Нашите записи покажуваат дека веќе сте го завршиле ова истражување.",
22659
22656
  loadingSurvey: "Анкетата се вчитува ...",
22660
22657
  placeholder: "Изберете ...",
22661
- // ratingOptionsCaption: "Tap to rate here...",
22658
+ // ratingOptionsCaption: "Select...",
22662
22659
  value: "вредност",
22663
22660
  requiredError: "Ве молам, одговорете на прашањето.",
22664
22661
  requiredErrorInPanel: "Ве молам, одговорете барем на едно прашање.",
@@ -22765,7 +22762,7 @@ var malaySurveyStrings = {
22765
22762
  completingSurveyBefore: "Rekod kami menunjukkan yang anda telah melengkapkan tinjauan ini.",
22766
22763
  loadingSurvey: "Memuatkan Tinjauan...",
22767
22764
  placeholder: "Pilih...",
22768
- // ratingOptionsCaption: "Tap to rate here...",
22765
+ // ratingOptionsCaption: "Select...",
22769
22766
  value: "nilai",
22770
22767
  requiredError: "Respons diperlukan.",
22771
22768
  requiredErrorInPanel: "Respons diperlukan: jawab sekurang-kurangnya satu soalan.",
@@ -22896,7 +22893,7 @@ var norwegianSurveyStrings = {
22896
22893
  completingSurveyBefore: "Våre data viser at du allerede har gjennomført denne undersøkelsen.",
22897
22894
  loadingSurvey: "Undersøkelsen laster...",
22898
22895
  placeholder: "Velg...",
22899
- // ratingOptionsCaption: "Tap to rate here...",
22896
+ // ratingOptionsCaption: "Select...",
22900
22897
  value: "verdi",
22901
22898
  requiredError: "Vennligst svar på spørsmålet.",
22902
22899
  requiredErrorInPanel: "Vennligst svar på minst ett spørsmål.",
@@ -23003,7 +23000,7 @@ var persianSurveyStrings = {
23003
23000
  completingSurveyBefore: "به نظر می رسد هم هم اکنون پرسشنامه را تکمیل کرده اید.",
23004
23001
  loadingSurvey: "درحال ایجاد پرسشنامه",
23005
23002
  placeholder: "انتخاب کنید...",
23006
- // ratingOptionsCaption: "Tap to rate here...",
23003
+ // ratingOptionsCaption: "Select...",
23007
23004
  value: "مقدار",
23008
23005
  requiredError: "لطفا به سوال پاسخ دهید",
23009
23006
  requiredErrorInPanel: "لطفا حداقل به یک سوال پاسخ دهید.",
@@ -23220,7 +23217,7 @@ var portugueseBrSurveyStrings = {
23220
23217
  completingSurveyBefore: "Nossos registros mostram que você já finalizou a pesquisa.",
23221
23218
  loadingSurvey: "A pesquisa está carregando...",
23222
23219
  // placeholder: "Select...",
23223
- // ratingOptionsCaption: "Tap to rate here...",
23220
+ // ratingOptionsCaption: "Select...",
23224
23221
  // value: "value",
23225
23222
  requiredError: "Por favor, responda a pergunta.",
23226
23223
  requiredErrorInPanel: "Por favor, responda pelo menos uma pergunta.",
@@ -23435,7 +23432,7 @@ var romanianSurveyStrings = {
23435
23432
  completingSurveyBefore: "Din înregistrările noastre reiese că ați completat deja acest chestionar.",
23436
23433
  loadingSurvey: "Chestionarul se încarcă...",
23437
23434
  placeholder: "Alegeţi...",
23438
- // ratingOptionsCaption: "Tap to rate here...",
23435
+ // ratingOptionsCaption: "Select...",
23439
23436
  value: "valoare",
23440
23437
  requiredError: "Răspunsul la această întrebare este obligatoriu.",
23441
23438
  requiredErrorInPanel: "Vă rugăm să răspundeți la cel puțin o întrebare.",
@@ -23649,7 +23646,7 @@ var serbianStrings = {
23649
23646
  completingSurveyBefore: "Prema našim podacima, već ste popunili ovu anketu.",
23650
23647
  loadingSurvey: "Učitavam anketu...",
23651
23648
  placeholder: "Izaberi...",
23652
- // ratingOptionsCaption: "Tap to rate here...",
23649
+ // ratingOptionsCaption: "Select...",
23653
23650
  value: "vrednost",
23654
23651
  requiredError: "Molimo odgovorite na ovo pitanje.",
23655
23652
  requiredErrorInPanel: "Molimo odgovorite na bar jedno pitanje.",
@@ -23757,7 +23754,7 @@ var simplifiedChineseSurveyStrings = {
23757
23754
  completingSurveyBefore: "你已完成问卷.",
23758
23755
  loadingSurvey: "问卷正在加载中...",
23759
23756
  placeholder: "请选择...",
23760
- // ratingOptionsCaption: "Tap to rate here...",
23757
+ // ratingOptionsCaption: "Select...",
23761
23758
  value: "值",
23762
23759
  requiredError: "请填写此问题",
23763
23760
  requiredErrorInPanel: "至少回答一题.",
@@ -23864,7 +23861,7 @@ var slovakSurveyStrings = {
23864
23861
  completingSurveyBefore: "Podľa našich záznamov ste už tento prieskum dokončili.",
23865
23862
  loadingSurvey: "Načítanie prieskumu...",
23866
23863
  placeholder: "Vybrať...",
23867
- // ratingOptionsCaption: "Tap to rate here...",
23864
+ // ratingOptionsCaption: "Select...",
23868
23865
  value: "hodnota",
23869
23866
  requiredError: "Požaduje sa odozva.",
23870
23867
  requiredErrorInPanel: "Požaduje sa odozva: zodpovedajte aspoň jednu otázku.",
@@ -24078,7 +24075,7 @@ var swahiliStrings = {
24078
24075
  completingSurveyBefore: "Recodi zetu zinatuonyesha tayari umekamilisha utafiti.",
24079
24076
  loadingSurvey: "Tunaandaa utafiti...",
24080
24077
  placeholder: "Chagua...",
24081
- // ratingOptionsCaption: "Tap to rate here...",
24078
+ // ratingOptionsCaption: "Select...",
24082
24079
  value: "thamani",
24083
24080
  requiredError: "Tafadhali jibu hili swali.",
24084
24081
  requiredErrorInPanel: "Tafadhali jibu swali angalau moja.",
@@ -24292,7 +24289,7 @@ var tajikSurveyStrings = {
24292
24289
  completingSurveyBefore: "Шумо аллакай ин пурсишро анҷом додаед.",
24293
24290
  loadingSurvey: "Боргирӣ аз сервер...",
24294
24291
  placeholder: "Интихоб кардан...",
24295
- // ratingOptionsCaption: "Tap to rate here...",
24292
+ // ratingOptionsCaption: "Select...",
24296
24293
  value: "қиммат",
24297
24294
  requiredError: "Илтимос, ба савол ҷавоб диҳед.",
24298
24295
  requiredErrorInPanel: "Илтимос, ақалан ба як савол ҷавоб диҳед.",
@@ -24399,7 +24396,7 @@ var teluguStrings = {
24399
24396
  completingSurveyBefore: " మీరు ఇప్పటికే సర్వేను ముగించినట్లు మా రికార్డులు చూపిస్తున్నాయి",
24400
24397
  loadingSurvey: "సర్వే లోడ్ అవుతుంది",
24401
24398
  placeholder: "ఎన్నుకోండి",
24402
- // ratingOptionsCaption: "Tap to rate here...",
24399
+ // ratingOptionsCaption: "Select...",
24403
24400
  value: "విలువ",
24404
24401
  requiredError: "దయచేసి ప్రశ్నకు జవాబు ఇవ్వండి",
24405
24402
  requiredErrorInPanel: "దయచేసి కనీసం ఒక్క ప్రశ్నకైనా జవాబు ఇవ్వండి",
@@ -24506,7 +24503,7 @@ var thaiStrings = {
24506
24503
  completingSurveyBefore: "รายการของเราแสดงว่าคุณได้ทำ survey เสร็จเรียบร้อยแล้ว",
24507
24504
  loadingSurvey: "กำลังโหลด Survey...",
24508
24505
  placeholder: "เลือก...",
24509
- // ratingOptionsCaption: "Tap to rate here...",
24506
+ // ratingOptionsCaption: "Select...",
24510
24507
  value: "ข้อมูล",
24511
24508
  requiredError: "กรุณาตอบคำถาม",
24512
24509
  requiredErrorInPanel: "กรุณาตอบขั้นต่ำหนึ่งคำถาม",
@@ -24613,7 +24610,7 @@ var traditionalChineseSurveyStrings = {
24613
24610
  // completingSurveyBefore: "Our records show that you have already completed this survey.",
24614
24611
  loadingSurvey: "問卷載入中...",
24615
24612
  placeholder: "請選擇...",
24616
- // ratingOptionsCaption: "Tap to rate here...",
24613
+ // ratingOptionsCaption: "Select...",
24617
24614
  // value: "value",
24618
24615
  requiredError: "請填寫此問題",
24619
24616
  // requiredErrorInPanel: "Response required: answer at least one question.",
@@ -24720,7 +24717,7 @@ var turkishSurveyStrings = {
24720
24717
  completingSurveyBefore: "Kayıtlarımız, bu anketi zaten tamamladığınızı gösteriyor.",
24721
24718
  loadingSurvey: "Anket sunucudan yükleniyor ...",
24722
24719
  placeholder: "Seçiniz ...",
24723
- // ratingOptionsCaption: "Tap to rate here...",
24720
+ // ratingOptionsCaption: "Select...",
24724
24721
  value: "değer",
24725
24722
  requiredError: "Lütfen soruya cevap veriniz",
24726
24723
  requiredErrorInPanel: "Lütfen en az bir soruyu yanıtlayın.",
@@ -24827,7 +24824,7 @@ var ukrainianSurveyStrings = {
24827
24824
  completingSurveyBefore: "Ви вже проходили це опитування.",
24828
24825
  loadingSurvey: "Завантаження опитування...",
24829
24826
  placeholder: "Вибрати...",
24830
- // ratingOptionsCaption: "Tap to rate here...",
24827
+ // ratingOptionsCaption: "Select...",
24831
24828
  value: "значення",
24832
24829
  requiredError: "Будь ласка, дайте відповідь.",
24833
24830
  requiredErrorInPanel: "Будь ласка, дайте відповідь хоча б на одне питання.",
@@ -24934,7 +24931,7 @@ var vietnameseSurveyStrings = {
24934
24931
  completingSurveyBefore: "Hồ sơ chúng tôi cho thấy rằng bạn đã hoàn thành cuộc khảo sát này.",
24935
24932
  loadingSurvey: "Đang tải khảo sát...",
24936
24933
  placeholder: "Chọn...",
24937
- // ratingOptionsCaption: "Tap to rate here...",
24934
+ // ratingOptionsCaption: "Select...",
24938
24935
  value: "Giá trị",
24939
24936
  requiredError: "Vui lòng trả lời câu hỏi.",
24940
24937
  requiredErrorInPanel: "Vui lòng trả lời ít nhất một câu hỏi.",
@@ -25042,7 +25039,7 @@ var welshSurveyStrings = {
25042
25039
  completingSurveyBefore: "Rydych chi wedi llenwi’r arolwg hwn yn barod yn ôl ein cofnodion.",
25043
25040
  loadingSurvey: "Wrthi’n Llwytho’r Arolwg...",
25044
25041
  placeholder: "Dewiswch...",
25045
- // ratingOptionsCaption: "Tap to rate here...",
25042
+ // ratingOptionsCaption: "Select...",
25046
25043
  value: "gwerth",
25047
25044
  requiredError: "Atebwch y cwestiwn.",
25048
25045
  requiredErrorInPanel: "Atebwch o leiaf un cwestiwn.",
@@ -27450,13 +27447,13 @@ var PanelModelBase = /** @class */ (function (_super) {
27450
27447
  if (this.isRandomizing)
27451
27448
  return;
27452
27449
  this.setPropertyValue("isVisible", this.isVisible);
27453
- if (!!this.survey &&
27454
- this.survey.isClearValueOnHiddenContainer &&
27450
+ if (!!this.survey && this.survey.getQuestionClearIfInvisible("default") !== "none" &&
27455
27451
  !this.isLoadingFromJson) {
27456
27452
  var questions = this.questions;
27453
+ var isVisible = this.isVisible;
27457
27454
  for (var i = 0; i < questions.length; i++) {
27458
- if (!this.isVisible) {
27459
- questions[i].clearValueIfInvisible();
27455
+ if (!isVisible) {
27456
+ questions[i].clearValueIfInvisible("onHiddenContainer");
27460
27457
  }
27461
27458
  else {
27462
27459
  questions[i].updateValueWithDefaults();
@@ -30654,11 +30651,11 @@ var PopupModel = /** @class */ (function (_super) {
30654
30651
  }
30655
30652
  this.setPropertyValue("isVisible", value);
30656
30653
  this.onVisibilityChanged.fire(this, { model: this, isVisible: value });
30657
- this.refreshInnerModel();
30658
30654
  if (this.isVisible) {
30659
30655
  this.onShow();
30660
30656
  }
30661
30657
  else {
30658
+ this.refreshInnerModel();
30662
30659
  this.onHide();
30663
30660
  }
30664
30661
  },
@@ -31125,7 +31122,7 @@ var Question = /** @class */ (function (_super) {
31125
31122
  /**
31126
31123
  * Hides the question number from the title and excludes the question from numbering.
31127
31124
  *
31128
- * If you want to disable question numbering in the entire survey, set SurveyModel's `showQuestionNumbers` property to `false`.
31125
+ * If you want to disable question numbering in the entire survey, set `SurveyModel`'s `showQuestionNumbers` property to `false`.
31129
31126
  * @see SurveyModel.showQuestionNumbers
31130
31127
  */
31131
31128
  get: function () {
@@ -31287,13 +31284,17 @@ var Question = /** @class */ (function (_super) {
31287
31284
  if (!this.survey || this.isLoadingFromJson)
31288
31285
  return;
31289
31286
  this.survey.questionVisibilityChanged(this, this.isVisible);
31290
- if (this.isClearValueOnHidden) {
31291
- if (!this.visible) {
31292
- this.clearValueIfInvisible();
31293
- }
31294
- if (this.isVisible) {
31295
- this.updateValueWithDefaults();
31296
- }
31287
+ var isClearOnHidden = this.isClearValueOnHidden;
31288
+ if (!this.visible) {
31289
+ this.clearValueOnHidding(isClearOnHidden);
31290
+ }
31291
+ if (isClearOnHidden && this.isVisible) {
31292
+ this.updateValueWithDefaults();
31293
+ }
31294
+ };
31295
+ Question.prototype.clearValueOnHidding = function (isClearOnHidden) {
31296
+ if (isClearOnHidden) {
31297
+ this.clearValueIfInvisible();
31297
31298
  }
31298
31299
  };
31299
31300
  /**
@@ -32337,7 +32338,9 @@ var Question = /** @class */ (function (_super) {
32337
32338
  return val.length > 0 ? this.isValueSurveyElement(val[0]) : false;
32338
32339
  return !!val.getType && !!val.onPropertyChanged;
32339
32340
  };
32340
- Question.prototype.canClearValueAsInvisible = function () {
32341
+ Question.prototype.canClearValueAsInvisible = function (reason) {
32342
+ if (reason === "onHiddenContainer" && !this.isParentVisible)
32343
+ return true;
32341
32344
  if (this.isVisible && this.isParentVisible)
32342
32345
  return false;
32343
32346
  if (!!this.page && this.page.isStartPage)
@@ -32351,6 +32354,8 @@ var Question = /** @class */ (function (_super) {
32351
32354
  * Returns `true` if a parent element (page or panel) is visible.
32352
32355
  */
32353
32356
  get: function () {
32357
+ if (this.parentQuestion && !this.parentQuestion.isVisible)
32358
+ return false;
32354
32359
  var parent = this.parent;
32355
32360
  while (parent) {
32356
32361
  if (!parent.isVisible)
@@ -32364,16 +32369,17 @@ var Question = /** @class */ (function (_super) {
32364
32369
  });
32365
32370
  Question.prototype.clearValueIfInvisible = function (reason) {
32366
32371
  if (reason === void 0) { reason = "onHidden"; }
32367
- if (this.clearIfInvisible === "none")
32372
+ var clearIf = this.getClearIfInvisible();
32373
+ if (clearIf === "none")
32368
32374
  return;
32369
- if (reason === "onHidden" && this.clearIfInvisible === "onComplete")
32375
+ if (reason === "onHidden" && clearIf === "onComplete")
32370
32376
  return;
32371
- if (reason === "none" && (this.clearIfInvisible === "default" || this.clearIfInvisible === "none"))
32377
+ if (reason === "onHiddenContainer" && clearIf !== reason)
32372
32378
  return;
32373
- this.clearValueIfInvisibleCore();
32379
+ this.clearValueIfInvisibleCore(reason);
32374
32380
  };
32375
- Question.prototype.clearValueIfInvisibleCore = function () {
32376
- if (this.canClearValueAsInvisible()) {
32381
+ Question.prototype.clearValueIfInvisibleCore = function (reason) {
32382
+ if (this.canClearValueAsInvisible(reason)) {
32377
32383
  this.clearValue();
32378
32384
  }
32379
32385
  };
@@ -32385,6 +32391,7 @@ var Question = /** @class */ (function (_super) {
32385
32391
  *
32386
32392
  * - `"default"` (default) - Inherits the setting from the Survey's [`clearInvisibleValues`](https://surveyjs.io/form-library/documentation/surveymodel#clearInvisibleValues) property.
32387
32393
  * - `"onHidden"` - Clears the value when the question becomes invisible. If a question is invisible on startup and has an initial value, this value will be cleared when the survey is complete.
32394
+ * - `"onHiddenContainer"` - Clears the value when the question or its containter (page or panel) becomes invisible. If the question is invisible initially, its value is removed on survey completion.
32388
32395
  * - `"onComplete"` - Clears the value when the survey is complete.
32389
32396
  * - `"none"` - Never clears the value of an invisible question.
32390
32397
  * @see SurveyModel.clearInvisibleValues
@@ -32400,6 +32407,12 @@ var Question = /** @class */ (function (_super) {
32400
32407
  enumerable: false,
32401
32408
  configurable: true
32402
32409
  });
32410
+ Question.prototype.getClearIfInvisible = function () {
32411
+ var res = this.clearIfInvisible;
32412
+ if (!!this.survey)
32413
+ return this.survey.getQuestionClearIfInvisible(res);
32414
+ return res !== "default" ? res : "onComplete";
32415
+ };
32403
32416
  Object.defineProperty(Question.prototype, "displayValue", {
32404
32417
  get: function () {
32405
32418
  if (this.isLoadingFromJson)
@@ -32630,11 +32643,10 @@ var Question = /** @class */ (function (_super) {
32630
32643
  };
32631
32644
  Object.defineProperty(Question.prototype, "isClearValueOnHidden", {
32632
32645
  get: function () {
32633
- if (this.clearIfInvisible === "none" || this.clearIfInvisible === "onComplete")
32646
+ var clearIf = this.getClearIfInvisible();
32647
+ if (clearIf === "none" || clearIf === "onComplete")
32634
32648
  return false;
32635
- if (this.clearIfInvisible === "onHidden")
32636
- return true;
32637
- return !!this.survey && this.survey.isClearValueOnHidden;
32649
+ return clearIf === "onHidden" || clearIf === "onHiddenContainer";
32638
32650
  },
32639
32651
  enumerable: false,
32640
32652
  configurable: true
@@ -33392,7 +33404,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
33392
33404
  {
33393
33405
  name: "clearIfInvisible",
33394
33406
  default: "default",
33395
- choices: ["default", "none", "onComplete", "onHidden"],
33407
+ choices: ["default", "none", "onComplete", "onHidden", "onHiddenContainer"],
33396
33408
  },
33397
33409
  { name: "isRequired:switch", overridingProperty: "requiredIf" },
33398
33410
  "requiredIf:condition",
@@ -33759,10 +33771,21 @@ var QuestionSelectBase = /** @class */ (function (_super) {
33759
33771
  };
33760
33772
  QuestionSelectBase.prototype.createItemValue = function (value, text) {
33761
33773
  var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), value);
33774
+ res.locOwner = this;
33762
33775
  if (!!text)
33763
33776
  res.text = text;
33764
33777
  return res;
33765
33778
  };
33779
+ Object.defineProperty(QuestionSelectBase.prototype, "isUsingCarryForward", {
33780
+ get: function () {
33781
+ return this.getPropertyValue("isUsingCarrayForward", false);
33782
+ },
33783
+ enumerable: false,
33784
+ configurable: true
33785
+ });
33786
+ QuestionSelectBase.prototype.setIsUsingCarrayForward = function (val) {
33787
+ this.setPropertyValue("isUsingCarrayForward", val);
33788
+ };
33766
33789
  QuestionSelectBase.prototype.supportGoNextPageError = function () {
33767
33790
  return !this.isOtherSelected || !!this.otherValue;
33768
33791
  };
@@ -33946,7 +33969,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
33946
33969
  };
33947
33970
  QuestionSelectBase.prototype.runCondition = function (values, properties) {
33948
33971
  _super.prototype.runCondition.call(this, values, properties);
33949
- if (this.isUsingCarrayForward)
33972
+ if (this.isUsingCarryForward)
33950
33973
  return;
33951
33974
  this.runItemsEnableCondition(values, properties);
33952
33975
  this.runItemsCondition(values, properties);
@@ -34379,10 +34402,12 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34379
34402
  },
34380
34403
  set: function (val) {
34381
34404
  var question = this.getQuestionWithChoices();
34382
- if (!!question) {
34405
+ this.isLockVisibleChoices = !!question && question.name === val;
34406
+ if (!!question && question.name !== val) {
34383
34407
  question.removeFromDependedQuestion(this);
34384
34408
  }
34385
34409
  this.setPropertyValue("choicesFromQuestion", val);
34410
+ this.isLockVisibleChoices = false;
34386
34411
  },
34387
34412
  enumerable: false,
34388
34413
  configurable: true
@@ -34621,7 +34646,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34621
34646
  if (!this.newItemValue) {
34622
34647
  this.newItemValue = this.createItemValue("newitem"); //TODO
34623
34648
  }
34624
- if (this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
34649
+ if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
34625
34650
  items.push(this.newItemValue);
34626
34651
  }
34627
34652
  }
@@ -34737,8 +34762,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34737
34762
  Object.defineProperty(QuestionSelectBase.prototype, "activeChoices", {
34738
34763
  get: function () {
34739
34764
  var question = this.getQuestionWithChoices();
34740
- this.isUsingCarrayForward = !!question;
34741
- if (this.isUsingCarrayForward) {
34765
+ this.setIsUsingCarrayForward(!!question);
34766
+ if (this.isUsingCarryForward) {
34742
34767
  this.addIntoDependedQuestion(question);
34743
34768
  return this.getChoicesFromQuestion(question);
34744
34769
  }
@@ -34754,6 +34779,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34754
34779
  return !!res && !!res.visibleChoices && Array.isArray(res.dependedQuestions) && res !== this ? res : null;
34755
34780
  };
34756
34781
  QuestionSelectBase.prototype.getChoicesFromQuestion = function (question) {
34782
+ if (this.isDesignMode)
34783
+ return [];
34757
34784
  var res = [];
34758
34785
  var isSelected = this.choicesFromQuestionMode == "selected"
34759
34786
  ? true
@@ -35035,7 +35062,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
35035
35062
  return { value: value };
35036
35063
  };
35037
35064
  QuestionSelectBase.prototype.updateChoicesDependedQuestions = function () {
35038
- if (this.isLoadingFromJson || this.isUpdatingChoicesDependedQuestions)
35065
+ if (this.isLoadingFromJson || this.isUpdatingChoicesDependedQuestions ||
35066
+ !this.allowNotifyValueChanged || this.choicesByUrl.isRunning)
35039
35067
  return;
35040
35068
  this.isUpdatingChoicesDependedQuestions = true;
35041
35069
  for (var i = 0; i < this.dependedQuestions.length; i++) {
@@ -35050,7 +35078,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
35050
35078
  this.updateChoicesDependedQuestions();
35051
35079
  };
35052
35080
  QuestionSelectBase.prototype.onVisibleChoicesChanged = function () {
35053
- if (this.isLoadingFromJson)
35081
+ if (this.isLoadingFromJson || this.isLockVisibleChoices)
35054
35082
  return;
35055
35083
  this.updateVisibleChoices();
35056
35084
  this.onVisibleChanged();
@@ -35108,8 +35136,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
35108
35136
  return false;
35109
35137
  return !this.keepIncorrectValues && !this.isEmpty();
35110
35138
  };
35111
- QuestionSelectBase.prototype.clearValueIfInvisibleCore = function () {
35112
- _super.prototype.clearValueIfInvisibleCore.call(this);
35139
+ QuestionSelectBase.prototype.clearValueIfInvisibleCore = function (reason) {
35140
+ _super.prototype.clearValueIfInvisibleCore.call(this, reason);
35113
35141
  this.clearIncorrectValues();
35114
35142
  };
35115
35143
  /**
@@ -37071,6 +37099,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
37071
37099
  this.updateRemainingCharacterCounter(event.target.value);
37072
37100
  };
37073
37101
  QuestionCommentModel.prototype.onKeyDown = function (event) {
37102
+ this.checkForUndo(event);
37074
37103
  if (!this.acceptCarriageReturn && (event.key === "Enter" || event.keyCode === 13)) {
37075
37104
  event.preventDefault();
37076
37105
  event.stopPropagation();
@@ -37767,11 +37796,11 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37767
37796
  return res;
37768
37797
  return _super.prototype.findQuestionByName.call(this, name);
37769
37798
  };
37770
- QuestionCompositeModel.prototype.clearValueIfInvisibleCore = function () {
37771
- _super.prototype.clearValueIfInvisibleCore.call(this);
37799
+ QuestionCompositeModel.prototype.clearValueIfInvisibleCore = function (reason) {
37800
+ _super.prototype.clearValueIfInvisibleCore.call(this, reason);
37772
37801
  var questions = this.contentPanel.questions;
37773
37802
  for (var i = 0; i < questions.length; i++) {
37774
- questions[i].clearValueIfInvisible();
37803
+ questions[i].clearValueIfInvisible(reason);
37775
37804
  }
37776
37805
  };
37777
37806
  QuestionCompositeModel.prototype.onAnyValueChanged = function (name) {
@@ -39163,6 +39192,10 @@ var QuestionFileModel = /** @class */ (function (_super) {
39163
39192
  QuestionFileModel.prototype.getType = function () {
39164
39193
  return "file";
39165
39194
  };
39195
+ QuestionFileModel.prototype.clearValue = function () {
39196
+ this.clearOnDeletingContainer();
39197
+ _super.prototype.clearValue.call(this);
39198
+ };
39166
39199
  QuestionFileModel.prototype.clearOnDeletingContainer = function () {
39167
39200
  if (!this.survey)
39168
39201
  return;
@@ -40711,11 +40744,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
40711
40744
  return QuestionImagePickerModel;
40712
40745
  }(_question_baseselect__WEBPACK_IMPORTED_MODULE_2__["QuestionCheckboxBase"]));
40713
40746
 
40714
- _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imageitemvalue", [], function (value) { return new ImageItemValue(value); }, "itemvalue");
40715
- _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("imageitemvalue", {
40716
- name: "imageLink",
40717
- serializationProperty: "locImageLink",
40718
- });
40747
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imageitemvalue", [{ name: "imageLink", serializationProperty: "locImageLink" }], function (value) { return new ImageItemValue(value); }, "itemvalue");
40719
40748
  _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("responsiveImageSize", [], undefined, "number");
40720
40749
  _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("imagepicker", [
40721
40750
  { name: "showOtherItem", visible: false },
@@ -41405,8 +41434,8 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
41405
41434
  json["type"] = question.getType();
41406
41435
  return json;
41407
41436
  };
41408
- QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function () {
41409
- _super.prototype.clearValueIfInvisibleCore.call(this);
41437
+ QuestionMatrixModel.prototype.clearValueIfInvisibleCore = function (reason) {
41438
+ _super.prototype.clearValueIfInvisibleCore.call(this, reason);
41410
41439
  if (this.hasRows) {
41411
41440
  this.clearInvisibleValuesInRows();
41412
41441
  }
@@ -41706,8 +41735,8 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
41706
41735
  }
41707
41736
  _super.prototype.clearIncorrectValues.call(this);
41708
41737
  };
41709
- QuestionMatrixDropdownModel.prototype.clearValueIfInvisibleCore = function () {
41710
- _super.prototype.clearValueIfInvisibleCore.call(this);
41738
+ QuestionMatrixDropdownModel.prototype.clearValueIfInvisibleCore = function (reason) {
41739
+ _super.prototype.clearValueIfInvisibleCore.call(this, reason);
41711
41740
  this.clearInvisibleValuesInRows();
41712
41741
  };
41713
41742
  QuestionMatrixDropdownModel.prototype.generateRows = function () {
@@ -41719,7 +41748,7 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
41719
41748
  if (!val)
41720
41749
  val = {};
41721
41750
  for (var i = 0; i < rows.length; i++) {
41722
- if (!rows[i].value)
41751
+ if (this.isValueEmpty(rows[i].value))
41723
41752
  continue;
41724
41753
  result.push(this.createMatrixRow(rows[i], val[rows[i].value]));
41725
41754
  }
@@ -47932,7 +47961,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
47932
47961
  }(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
47933
47962
 
47934
47963
  _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextitem", [
47935
- "name",
47964
+ { name: "!name", isUnique: true },
47936
47965
  "isRequired:boolean",
47937
47966
  { name: "placeholder", alternativeName: "placeHolder", serializationProperty: "locPlaceholder" },
47938
47967
  {
@@ -49821,18 +49850,31 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49821
49850
  }
49822
49851
  return true;
49823
49852
  };
49824
- QuestionPanelDynamicModel.prototype.clearValueIfInvisibleCore = function () {
49853
+ QuestionPanelDynamicModel.prototype.clearValueOnHidding = function (isClearOnHidden) {
49854
+ if (!isClearOnHidden) {
49855
+ if (!!this.survey && this.survey.getQuestionClearIfInvisible("onHidden") === "none")
49856
+ return;
49857
+ this.clearValueInPanelsIfInvisible("onHiddenContainer");
49858
+ }
49859
+ _super.prototype.clearValueOnHidding.call(this, isClearOnHidden);
49860
+ };
49861
+ QuestionPanelDynamicModel.prototype.clearValueIfInvisible = function (reason) {
49862
+ if (reason === void 0) { reason = "onHidden"; }
49863
+ var panelReason = reason === "onHidden" ? "onHiddenContainer" : reason;
49864
+ this.clearValueInPanelsIfInvisible(panelReason);
49865
+ _super.prototype.clearValueIfInvisible.call(this, reason);
49866
+ };
49867
+ QuestionPanelDynamicModel.prototype.clearValueInPanelsIfInvisible = function (reason) {
49825
49868
  for (var i = 0; i < this.panels.length; i++) {
49826
49869
  var questions = this.panels[i].questions;
49827
49870
  this.isSetPanelItemData = {};
49828
49871
  for (var j = 0; j < questions.length; j++) {
49829
49872
  var q = questions[j];
49830
- q.clearValueIfInvisible();
49873
+ q.clearValueIfInvisible(reason);
49831
49874
  this.isSetPanelItemData[q.getValueName()] = this.maxCheckCount + 1;
49832
49875
  }
49833
49876
  }
49834
49877
  this.isSetPanelItemData = {};
49835
- _super.prototype.clearValueIfInvisibleCore.call(this);
49836
49878
  };
49837
49879
  QuestionPanelDynamicModel.prototype.getIsRunningValidators = function () {
49838
49880
  if (_super.prototype.getIsRunningValidators.call(this))
@@ -50305,14 +50347,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50305
50347
  return null;
50306
50348
  if (!this.additionalTitleToolbarValue) {
50307
50349
  this.additionalTitleToolbarValue = new _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_13__["AdaptiveActionContainer"]();
50308
- this.additionalTitleToolbarValue.containerCss = this.getAdditionalTitleToolbarCss();
50309
- this.additionalTitleToolbarValue.cssClasses = {
50310
- item: "sv-tab-item",
50311
- itemPressed: "sv-tab-item--pressed",
50312
- itemAsIcon: "sv-tab-item--icon",
50313
- itemIcon: "sv-tab-item__icon",
50314
- itemTitle: "sv-tab-item__title"
50315
- };
50350
+ this.additionalTitleToolbarValue.dotsItem.popupModel.showPointer = false;
50351
+ this.additionalTitleToolbarValue.dotsItem.popupModel.verticalPosition = "bottom";
50352
+ this.additionalTitleToolbarValue.dotsItem.popupModel.horizontalPosition = "center";
50353
+ this.updateElementCss(false);
50316
50354
  }
50317
50355
  return this.additionalTitleToolbarValue;
50318
50356
  };
@@ -50396,24 +50434,25 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50396
50434
  return;
50397
50435
  var locTitle = new _localizablestring__WEBPACK_IMPORTED_MODULE_2__["LocalizableString"](panel, true);
50398
50436
  locTitle.sharedData = this.locTemplateTabTitle;
50437
+ var isActive = this.getPanelIndexById(panel.id) === this.currentIndex;
50399
50438
  var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
50400
50439
  id: panel.id,
50401
- css: "sv-tab-item__root",
50402
- pressed: this.getPanelIndexById(panel.id) === this.currentIndex,
50440
+ pressed: isActive,
50403
50441
  locTitle: locTitle,
50442
+ disableHide: isActive,
50404
50443
  action: function () {
50405
50444
  _this.currentIndex = _this.getPanelIndexById(newItem.id);
50406
- _this.updateTabToolbarItemsPressedState();
50407
50445
  }
50408
50446
  });
50409
50447
  return newItem;
50410
50448
  };
50411
- QuestionPanelDynamicModel.prototype.getAdditionalTitleToolbarCss = function () {
50449
+ QuestionPanelDynamicModel.prototype.getAdditionalTitleToolbarCss = function (cssClasses) {
50450
+ var css = cssClasses !== null && cssClasses !== void 0 ? cssClasses : this.cssClasses;
50412
50451
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
50413
- .append("sv-tabs-toolbar")
50414
- .append("sv-tabs-toolbar--left", this.tabAlign === "left")
50415
- .append("sv-tabs-toolbar--right", this.tabAlign === "right")
50416
- .append("sv-tabs-toolbar--center", this.tabAlign === "center")
50452
+ .append(css.tabsRoot)
50453
+ .append(css.tabsLeft, this.tabAlign === "left")
50454
+ .append(css.tabsRight, this.tabAlign === "right")
50455
+ .append(css.tabsCenter, this.tabAlign === "center")
50417
50456
  .toString();
50418
50457
  };
50419
50458
  QuestionPanelDynamicModel.prototype.updateTabToolbarItemsPressedState = function () {
@@ -50422,7 +50461,15 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50422
50461
  if (this.currentIndex < 0 || this.currentIndex >= this.visiblePanelCount)
50423
50462
  return;
50424
50463
  var panel = this.visiblePanels[this.currentIndex];
50425
- this.additionalTitleToolbar.renderedActions.forEach(function (action) { return action.pressed = action.id === panel.id; });
50464
+ this.additionalTitleToolbar.renderedActions.forEach(function (action) {
50465
+ var isActive = action.id === panel.id;
50466
+ action.pressed = isActive;
50467
+ action.disableHide = isActive;
50468
+ //should raise update if dimensions are not changed but action is active now
50469
+ if (action.mode === "popup" && action.disableHide) {
50470
+ action["raiseUpdate"]();
50471
+ }
50472
+ });
50426
50473
  };
50427
50474
  QuestionPanelDynamicModel.prototype.updateTabToolbar = function () {
50428
50475
  var _this = this;
@@ -50465,6 +50512,17 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
50465
50512
  QuestionPanelDynamicModel.prototype.showSeparator = function (index) {
50466
50513
  return this.isRenderModeList && index < this.visiblePanelCount - 1;
50467
50514
  };
50515
+ QuestionPanelDynamicModel.prototype.calcCssClasses = function (css) {
50516
+ var classes = _super.prototype.calcCssClasses.call(this, css);
50517
+ var additionalTitleToolbar = this.additionalTitleToolbar;
50518
+ if (!!additionalTitleToolbar) {
50519
+ additionalTitleToolbar.containerCss = this.getAdditionalTitleToolbarCss(classes);
50520
+ additionalTitleToolbar.cssClasses = classes.tabs;
50521
+ additionalTitleToolbar.dotsItem.cssClasses = classes.tabs;
50522
+ additionalTitleToolbar.dotsItem.popupModel.contentComponentData.model.cssClasses = css.list;
50523
+ }
50524
+ return classes;
50525
+ };
50468
50526
  QuestionPanelDynamicModel.maxCheckCount = 3;
50469
50527
  __decorate([
50470
50528
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_5__["property"])({ defaultValue: false, onSet: function (_, target) { target.updateFooterActions(); } })
@@ -52121,7 +52179,7 @@ __webpack_require__.r(__webpack_exports__);
52121
52179
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
52122
52180
  /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
52123
52181
  /* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question */ "./src/question.ts");
52124
- /* harmony import */ var signature_pad__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! signature_pad */ "./node_modules/signature_pad/dist/signature_pad.mjs");
52182
+ /* harmony import */ var signature_pad__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! signature_pad */ "./node_modules/signature_pad/dist/signature_pad.js");
52125
52183
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
52126
52184
  var __extends = (undefined && undefined.__extends) || (function () {
52127
52185
  var extendStatics = function (d, b) {
@@ -52222,14 +52280,14 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
52222
52280
  };
52223
52281
  signaturePad.penColor = this.penColor;
52224
52282
  signaturePad.backgroundColor = this.backgroundColor;
52225
- signaturePad.onBegin = function () {
52283
+ signaturePad.addEventListener("beginStroke", function () {
52226
52284
  _this.isDrawingValue = true;
52227
52285
  canvas.focus();
52228
- };
52229
- signaturePad.onEnd = function () {
52286
+ }, { once: true });
52287
+ signaturePad.addEventListener("endStroke", function () {
52230
52288
  _this.isDrawingValue = false;
52231
52289
  _this.updateValue();
52232
- };
52290
+ }, { once: true });
52233
52291
  var updateValueHandler = function () {
52234
52292
  var data = _this.value;
52235
52293
  canvas.width = _this.signatureWidth || defaultWidth;
@@ -52794,6 +52852,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
52794
52852
  _this.updateRemainingCharacterCounter(event.target.value);
52795
52853
  };
52796
52854
  _this.onKeyDown = function (event) {
52855
+ _this.checkForUndo(event);
52797
52856
  if (_this.isInputTextUpdate) {
52798
52857
  _this._isWaitingForEnter = event.keyCode === 229;
52799
52858
  }
@@ -53545,6 +53604,7 @@ var QuestionTextBase = /** @class */ (function (_super) {
53545
53604
  function QuestionTextBase(name) {
53546
53605
  var _this = _super.call(this, name) || this;
53547
53606
  _this.characterCounter = new CharacterCounter();
53607
+ _this.disableNativeUndoRedo = false;
53548
53608
  return _this;
53549
53609
  }
53550
53610
  QuestionTextBase.prototype.isTextValue = function () {
@@ -53641,6 +53701,10 @@ var QuestionTextBase = /** @class */ (function (_super) {
53641
53701
  _super.prototype.localeChanged.call(this);
53642
53702
  this.calcRenderedPlaceholder();
53643
53703
  };
53704
+ QuestionTextBase.prototype.setSurveyImpl = function (value, isLight) {
53705
+ _super.prototype.setSurveyImpl.call(this, value, isLight);
53706
+ this.calcRenderedPlaceholder();
53707
+ };
53644
53708
  QuestionTextBase.prototype.calcRenderedPlaceholder = function () {
53645
53709
  var res = this.placeHolder;
53646
53710
  if (!!res && !this.hasPlaceHolder()) {
@@ -53660,6 +53724,13 @@ var QuestionTextBase = /** @class */ (function (_super) {
53660
53724
  _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
53661
53725
  this.updateRemainingCharacterCounter(newValue);
53662
53726
  };
53727
+ QuestionTextBase.prototype.checkForUndo = function (event) {
53728
+ if (this.disableNativeUndoRedo && this.isInputTextUpdate && (event.ctrlKey || event.metaKey)) {
53729
+ if ([89, 90].indexOf(event.keyCode) !== -1) {
53730
+ event.preventDefault();
53731
+ }
53732
+ }
53733
+ };
53663
53734
  QuestionTextBase.prototype.getControlClass = function () {
53664
53735
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
53665
53736
  .append(this.cssClasses.root)
@@ -60027,7 +60098,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
60027
60098
  };
60028
60099
  SurveyElementBase.renderQuestionDescription = function (question) {
60029
60100
  var descriptionText = SurveyElementBase.renderLocString(question.locDescription);
60030
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: question.isDescriptionVisible ? undefined : { display: "none" }, className: question.cssDescription }, descriptionText);
60101
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: question.hasDescription ? undefined : { display: "none" }, className: question.cssDescription }, descriptionText);
60031
60102
  };
60032
60103
  SurveyElementBase.prototype.componentDidMount = function () {
60033
60104
  this.makeBaseElementsReact();
@@ -64291,7 +64362,12 @@ var SurveyElementCore = /** @class */ (function (_super) {
64291
64362
  });
64292
64363
  SurveyElementCore.prototype.getDefaultTitleValue = function () { return undefined; };
64293
64364
  SurveyElementCore.prototype.updateDescriptionVisibility = function (newDescription) {
64294
- this.hasDescription = !!newDescription;
64365
+ var showPlaceholder = false;
64366
+ if (this.isDesignMode) {
64367
+ var property_1 = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].findProperty(this.getType(), "description");
64368
+ showPlaceholder = !!(property_1 === null || property_1 === void 0 ? void 0 : property_1.placeholder);
64369
+ }
64370
+ this.hasDescription = !!newDescription || showPlaceholder;
64295
64371
  };
64296
64372
  Object.defineProperty(SurveyElementCore.prototype, "locDescription", {
64297
64373
  get: function () {
@@ -64394,7 +64470,7 @@ var SurveyElementCore = /** @class */ (function (_super) {
64394
64470
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
64395
64471
  localizable: true,
64396
64472
  onSet: function (newDescription, self) {
64397
- self.updateDescriptionVisibility(self, newDescription);
64473
+ self.updateDescriptionVisibility(newDescription);
64398
64474
  }
64399
64475
  })
64400
64476
  ], SurveyElementCore.prototype, "description", void 0);
@@ -65032,6 +65108,7 @@ var SurveyElement = /** @class */ (function (_super) {
65032
65108
  if (!this.survey) {
65033
65109
  this.onSurveyLoad();
65034
65110
  }
65111
+ this.updateDescriptionVisibility(this.description);
65035
65112
  };
65036
65113
  SurveyElement.prototype.setVisibleIndex = function (index) {
65037
65114
  return 0;
@@ -65378,13 +65455,6 @@ var SurveyElement = /** @class */ (function (_super) {
65378
65455
  enumerable: false,
65379
65456
  configurable: true
65380
65457
  });
65381
- Object.defineProperty(SurveyElement.prototype, "isDescriptionVisible", {
65382
- get: function () {
65383
- return (!!this.description || this.isDesignMode);
65384
- },
65385
- enumerable: false,
65386
- configurable: true
65387
- });
65388
65458
  Object.defineProperty(SurveyElement.prototype, "rootStyle", {
65389
65459
  get: function () {
65390
65460
  var style = {};
@@ -65993,7 +66063,9 @@ var SurveyModel = /** @class */ (function (_super) {
65993
66063
  */
65994
66064
  _this.onUpdateQuestionCssClasses = _this.addEvent();
65995
66065
  /**
65996
- * An event that is raised before rendering a panel. Use it to override default panel CSS classes.
66066
+ * An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
66067
+ *
66068
+ * For information on event handler parameters, refer to descriptions within the interface.
65997
66069
  *
65998
66070
  * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
65999
66071
  * @see css
@@ -66002,6 +66074,8 @@ var SurveyModel = /** @class */ (function (_super) {
66002
66074
  /**
66003
66075
  * An event that is raised before rendering a page. Use it to override default page CSS classes.
66004
66076
  *
66077
+ * For information on event handler parameters, refer to descriptions within the interface.
66078
+ *
66005
66079
  * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
66006
66080
  * @see css
66007
66081
  */
@@ -66009,6 +66083,8 @@ var SurveyModel = /** @class */ (function (_super) {
66009
66083
  /**
66010
66084
  * An event that is raised before rendering a choice item in Radio Button Group, Checkboxes, and Dropdown questions. Use it to override default CSS classes applied to choice items.
66011
66085
  *
66086
+ * For information on event handler parameters, refer to descriptions within the interface.
66087
+ *
66012
66088
  * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
66013
66089
  * @see css
66014
66090
  */
@@ -66085,91 +66161,61 @@ var SurveyModel = /** @class */ (function (_super) {
66085
66161
  */
66086
66162
  _this.onGetChoiceDisplayValue = _this.addEvent();
66087
66163
  /**
66088
- * An event that is raised on adding a new row in Matrix Dynamic question.
66089
- * @see QuestionMatrixDynamicModel
66090
- * @see QuestionMatrixDynamicModel.visibleRows
66164
+ * An event that is raised after a new row is added to a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
66091
66165
  */
66092
66166
  _this.onMatrixRowAdded = _this.addEvent();
66093
66167
  /**
66094
- * An event that is raised before adding a new row in Matrix Dynamic question.
66095
- * @see QuestionMatrixDynamicModel
66096
- * @see QuestionMatrixDynamicModel.visibleRows
66168
+ * An event that is raised before a new row is added to a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
66097
66169
  */
66098
66170
  _this.onMatrixBeforeRowAdded = _this.addEvent();
66099
66171
  /**
66100
- * An event that is raised before removing a row from Matrix Dynamic question. You can disable removing and clear the data instead.
66101
- * @see QuestionMatrixDynamicModel
66102
- * @see onMatrixRowRemoved
66172
+ * An event that is raised before a row is deleted from a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/). You can cancel row deletion and clear row data instead.
66103
66173
  * @see onMatrixAllowRemoveRow
66104
66174
  */
66105
66175
  _this.onMatrixRowRemoving = _this.addEvent();
66106
66176
  /**
66107
- * An event that is raised on removing a row from Matrix Dynamic question.
66108
- * @see QuestionMatrixDynamicModel
66109
- * @see QuestionMatrixDynamicModel.visibleRows
66110
- * @see onMatrixRowRemoving
66177
+ * An event that is raised after a row is deleted from a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
66111
66178
  * @see onMatrixAllowRemoveRow
66112
66179
  */
66113
66180
  _this.onMatrixRowRemoved = _this.addEvent();
66114
66181
  /**
66115
- * An event that is raised before rendering "Remove" button for removing a row from Matrix Dynamic question.
66116
- * @see QuestionMatrixDynamicModel
66182
+ * An event that is raised before rendering the Remove button in a row of a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/). Use this event to hide the Remove button for individual matrix rows.
66117
66183
  * @see onMatrixRowRemoving
66118
66184
  * @see onMatrixRowRemoved
66119
66185
  */
66120
66186
  _this.onMatrixAllowRemoveRow = _this.addEvent();
66121
66187
  /**
66122
- * An event that is raised before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
66123
- * @see onMatrixBeforeRowAdded
66124
- * @see onMatrixCellCreated
66125
- * @see QuestionMatrixDynamicModel
66126
- * @see QuestionMatrixDropdownModel
66188
+ * An event that is raised before a cell in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) is created. Use this event to change the type of individual matrix cells.
66189
+ * @see onMatrixAfterCellRender
66127
66190
  */
66128
66191
  _this.onMatrixCellCreating = _this.addEvent();
66129
66192
  /**
66130
- * An event that is raised for every cell created in Matrix Dynamic and Matrix Dropdown questions.
66131
- * @see onMatrixBeforeRowAdded
66132
- * @see onMatrixCellCreating
66133
- * @see onMatrixRowAdded
66134
- * @see QuestionMatrixDynamicModel
66135
- * @see QuestionMatrixDropdownModel
66193
+ * An event that is raised after a cell in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) is created.
66194
+ * @see onMatrixAfterCellRender
66136
66195
  */
66137
66196
  _this.onMatrixCellCreated = _this.addEvent();
66138
66197
  /**
66139
- * An event that is raised for every cell after is has been rendered in DOM.
66198
+ * An event that is raised for every matrix cell after it is rendered to the DOM.
66140
66199
  * @see onMatrixCellCreated
66141
- * @see QuestionMatrixDynamicModel
66142
- * @see QuestionMatrixDropdownModel
66143
66200
  */
66144
66201
  _this.onMatrixAfterCellRender = _this.addEvent();
66145
66202
  /**
66146
- * An event that is raised when cell value is changed in Matrix Dynamic and Matrix Dropdown questions.
66147
- * @see onMatrixCellValueChanging
66203
+ * An event that is raised after a cell value is changed in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
66148
66204
  * @see onMatrixBeforeRowAdded
66149
- * @see onMatrixRowAdded
66150
- * @see QuestionMatrixDynamicModel
66151
- * @see QuestionMatrixDropdownModel
66152
66205
  */
66153
66206
  _this.onMatrixCellValueChanged = _this.addEvent();
66154
66207
  /**
66155
- * An event that is raised on changing cell value in Matrix Dynamic and Matrix Dropdown questions. You may change the `options.value` property to change a cell value.
66156
- * @see onMatrixCellValueChanged
66208
+ * An event that is raised before a cell value is changed in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/). Use this event to change the cell value.
66157
66209
  * @see onMatrixBeforeRowAdded
66158
- * @see onMatrixRowAdded
66159
- * @see QuestionMatrixDynamicModel
66160
- * @see QuestionMatrixDropdownModel
66161
66210
  */
66162
66211
  _this.onMatrixCellValueChanging = _this.addEvent();
66163
66212
  /**
66164
- * An event that is raised when Matrix Dynamic and Matrix Dropdown questions validate the cell value.
66213
+ * An event that is raised for [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) and [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) questions when they validate a cell value. Use this event to display a custom error message based on a condition.
66165
66214
  * @see onMatrixBeforeRowAdded
66166
- * @see onMatrixRowAdded
66167
- * @see QuestionMatrixDynamicModel
66168
- * @see QuestionMatrixDropdownModel
66169
66215
  */
66170
66216
  _this.onMatrixCellValidate = _this.addEvent();
66171
66217
  /**
66172
- * An event that is raised on adding a new column in Matrix Dynamic or Matrix Dropdown question.
66218
+ * An event that is raised after a new column is added to a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
66173
66219
  */
66174
66220
  _this.onMatrixColumnAdded = _this.addEvent();
66175
66221
  /**
@@ -66247,9 +66293,12 @@ var SurveyModel = /** @class */ (function (_super) {
66247
66293
  */
66248
66294
  _this.onGetPanelFooterActions = _this.addEvent();
66249
66295
  /**
66250
- * Use this event to create/customize actions to be displayed in a matrix question's row.
66296
+ * An event that allows you to add, delete, or modify actions in rows of a [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/).
66297
+ *
66298
+ * For information on event handler parameters, refer to descriptions within the interface.
66299
+ *
66300
+ * [View Demo](https://surveyjs.io/form-library/examples/employee-information-form/ (linkStyle))
66251
66301
  * @see IAction
66252
- * @see QuestionMatrixDropdownModelBase
66253
66302
  */
66254
66303
  _this.onGetMatrixRowActions = _this.addEvent();
66255
66304
  /**
@@ -67503,8 +67552,11 @@ var SurveyModel = /** @class */ (function (_super) {
67503
67552
  Object.defineProperty(SurveyModel.prototype, "logo", {
67504
67553
  //#region Title/Header options
67505
67554
  /**
67506
- * Gets or sets a survey logo.
67507
- * @see title
67555
+ * An image URL or a Base64-encoded image to use as a survey logo.
67556
+ *
67557
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
67558
+ * @see logoPosition
67559
+ * @see logoFit
67508
67560
  */
67509
67561
  get: function () {
67510
67562
  return this.getLocalizableStringText("logo");
@@ -67524,8 +67576,15 @@ var SurveyModel = /** @class */ (function (_super) {
67524
67576
  });
67525
67577
  Object.defineProperty(SurveyModel.prototype, "logoWidth", {
67526
67578
  /**
67527
- * Gets or sets a survey logo width.
67579
+ * A logo width in CSS-accepted values.
67580
+ *
67581
+ * Default value: `300px`
67582
+ *
67583
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
67584
+ * @see logoHeight
67528
67585
  * @see logo
67586
+ * @see logoPosition
67587
+ * @see logoFit
67529
67588
  */
67530
67589
  get: function () {
67531
67590
  var width = this.getPropertyValue("logoWidth");
@@ -67539,8 +67598,15 @@ var SurveyModel = /** @class */ (function (_super) {
67539
67598
  });
67540
67599
  Object.defineProperty(SurveyModel.prototype, "logoHeight", {
67541
67600
  /**
67542
- * Gets or sets a survey logo height.
67601
+ * A logo height in CSS-accepted values.
67602
+ *
67603
+ * Default value: `200px`
67604
+ *
67605
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
67606
+ * @see logoHeight
67543
67607
  * @see logo
67608
+ * @see logoPosition
67609
+ * @see logoFit
67544
67610
  */
67545
67611
  get: function () {
67546
67612
  var height = this.getPropertyValue("logoHeight");
@@ -67554,8 +67620,17 @@ var SurveyModel = /** @class */ (function (_super) {
67554
67620
  });
67555
67621
  Object.defineProperty(SurveyModel.prototype, "logoPosition", {
67556
67622
  /**
67557
- * Gets or sets a survey logo position.
67623
+ * A logo position relative to the [survey title](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#title).
67624
+ *
67625
+ * Possible values:
67626
+ *
67627
+ * - `"left"` (default) - Places the logo to the left of the survey title.
67628
+ * - `"right"` - Places the logo to the right of the survey title.
67629
+ * - `"none"` - Hides the logo.
67630
+ *
67631
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
67558
67632
  * @see logo
67633
+ * @see logoFit
67559
67634
  */
67560
67635
  get: function () {
67561
67636
  return this.getPropertyValue("logoPosition");
@@ -67653,8 +67728,20 @@ var SurveyModel = /** @class */ (function (_super) {
67653
67728
  });
67654
67729
  Object.defineProperty(SurveyModel.prototype, "logoFit", {
67655
67730
  /**
67656
- * The logo fit mode.
67731
+ * Specifies how to resize a logo to fit it into its container.
67732
+ *
67733
+ * Possible values:
67734
+ *
67735
+ * - `"contain"` (default)
67736
+ * - `"cover"`
67737
+ * - `"fill"`
67738
+ * - `"none"`
67739
+ *
67740
+ * Refer to the [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) CSS property description for information on the possible values.
67741
+ *
67742
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-logo/ (linkStyle))
67657
67743
  * @see logo
67744
+ * @see logoPosition
67658
67745
  */
67659
67746
  get: function () {
67660
67747
  return this.getPropertyValue("logoFit");
@@ -68935,12 +69022,12 @@ var SurveyModel = /** @class */ (function (_super) {
68935
69022
  });
68936
69023
  Object.defineProperty(SurveyModel.prototype, "matrixDragHandleArea", {
68937
69024
  /**
68938
- * Specifies which part of a choice item responds to a drag gesture in MatrixDynamic questions.
69025
+ * Specifies which part of a matrix row responds to a drag gesture in [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) questions.
68939
69026
  *
68940
69027
  * Possible values:
68941
69028
  *
68942
- * - `"entireItem"` (default) - Users can use the entire choice item as a drag handle.
68943
- * - `"icon"` - Users can only use the choice item icon as a drag handle.
69029
+ * - `"entireItem"` (default) - Users can use the entire matrix row as a drag handle.
69030
+ * - `"icon"` - Users can only use a drag icon as a drag handle.
68944
69031
  */
68945
69032
  get: function () {
68946
69033
  return this.getPropertyValue("matrixDragHandleArea", "entireItem");
@@ -72212,23 +72299,13 @@ var SurveyModel = /** @class */ (function (_super) {
72212
72299
  enumerable: false,
72213
72300
  configurable: true
72214
72301
  });
72215
- Object.defineProperty(SurveyModel.prototype, "isClearValueOnHidden", {
72216
- get: function () {
72217
- return (this.clearInvisibleValues == "onHidden" ||
72218
- this.isClearValueOnHiddenContainer);
72219
- },
72220
- enumerable: false,
72221
- configurable: true
72222
- });
72223
- Object.defineProperty(SurveyModel.prototype, "isClearValueOnHiddenContainer", {
72224
- get: function () {
72225
- return (this.clearInvisibleValues == "onHiddenContainer" &&
72226
- !this.isShowingPreview &&
72227
- !this.runningPages);
72228
- },
72229
- enumerable: false,
72230
- configurable: true
72231
- });
72302
+ SurveyModel.prototype.getQuestionClearIfInvisible = function (questionClearIf) {
72303
+ if (this.isShowingPreview || this.runningPages)
72304
+ return "none";
72305
+ if (questionClearIf !== "default")
72306
+ return questionClearIf;
72307
+ return this.clearInvisibleValues;
72308
+ };
72232
72309
  SurveyModel.prototype.questionVisibilityChanged = function (question, newValue) {
72233
72310
  this.updateVisibleIndexes();
72234
72311
  this.onQuestionVisibleChanged.fire(this, {
@@ -73398,7 +73475,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
73398
73475
  default: "auto",
73399
73476
  choices: ["auto", "static", "responsive"],
73400
73477
  },
73401
- "width",
73478
+ { name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
73402
73479
  { name: "backgroundImage", serializationProperty: "locBackgroundImage", visible: false },
73403
73480
  { name: "backgroundImageFit", default: "cover", choices: ["auto", "contain", "cover"], visible: false },
73404
73481
  { name: "backgroundOpacity:number", minValue: 0, maxValue: 1, default: 1, visible: false },
@@ -73829,9 +73906,10 @@ __webpack_require__.r(__webpack_exports__);
73829
73906
 
73830
73907
 
73831
73908
 
73832
- function tryNavigateToPage(survey, index) {
73909
+ function tryNavigateToPage(survey, page) {
73833
73910
  if (survey.isDesignMode)
73834
73911
  return;
73912
+ var index = survey.visiblePages.indexOf(page);
73835
73913
  if (index < survey.currentPageNo) {
73836
73914
  survey.currentPageNo = index;
73837
73915
  }
@@ -73844,7 +73922,7 @@ function tryNavigateToPage(survey, index) {
73844
73922
  return true;
73845
73923
  }
73846
73924
  function createTOCListModel(survey) {
73847
- var items = survey.pages.map(function (page, index) {
73925
+ var items = survey.pages.map(function (page) {
73848
73926
  return new _actions_action__WEBPACK_IMPORTED_MODULE_0__["Action"]({
73849
73927
  id: page.name,
73850
73928
  title: page.navigationTitle || page.title || page.name,
@@ -73852,7 +73930,7 @@ function createTOCListModel(survey) {
73852
73930
  if (typeof document !== undefined && !!document.activeElement) {
73853
73931
  !!document.activeElement.blur && document.activeElement.blur();
73854
73932
  }
73855
- return tryNavigateToPage(survey, index);
73933
+ return tryNavigateToPage(survey, page);
73856
73934
  },
73857
73935
  visible: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return page.isVisible && !page.isStartPage; })
73858
73936
  });
@@ -75284,8 +75362,7 @@ var ResponsivityManager = /** @class */ (function () {
75284
75362
  this.model.updateCallback = function (isResetInitialized) {
75285
75363
  if (isResetInitialized)
75286
75364
  _this.isInitialized = false;
75287
- else
75288
- setTimeout(function () { _this.process(); }, 1);
75365
+ setTimeout(function () { _this.process(); }, 1);
75289
75366
  };
75290
75367
  if (typeof ResizeObserver !== "undefined") {
75291
75368
  this.resizeObserver = new ResizeObserver(function (_) { return _this.process(); });