@progress/kendo-vue-inputs 3.7.4-dev.202301120847 → 3.7.4-dev.202301151601

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.
Files changed (38) hide show
  1. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  2. package/dist/es/input/Input.d.ts +12 -3
  3. package/dist/es/package-metadata.js +1 -1
  4. package/dist/es/signature/Signature.js +189 -179
  5. package/dist/es/signature/SignatureBottomActions.d.ts +45 -0
  6. package/dist/es/signature/SignatureBottomActions.js +73 -0
  7. package/dist/es/signature/SignatureCanvas.js +29 -164
  8. package/dist/es/signature/SignatureDialog.d.ts +54 -0
  9. package/dist/es/signature/SignatureDialog.js +306 -0
  10. package/dist/es/signature/SignatureLine.d.ts +42 -0
  11. package/dist/es/signature/SignatureLine.js +33 -0
  12. package/dist/es/signature/interfaces/SignatureCanvasProps.d.ts +2 -0
  13. package/dist/es/textarea/interfaces/TextAreaProps.d.ts +10 -0
  14. package/dist/esm/input/Input.d.ts +12 -3
  15. package/dist/esm/package-metadata.js +1 -1
  16. package/dist/esm/signature/Signature.js +189 -179
  17. package/dist/esm/signature/SignatureBottomActions.d.ts +45 -0
  18. package/dist/esm/signature/SignatureBottomActions.js +73 -0
  19. package/dist/esm/signature/SignatureCanvas.js +29 -164
  20. package/dist/esm/signature/SignatureDialog.d.ts +54 -0
  21. package/dist/esm/signature/SignatureDialog.js +306 -0
  22. package/dist/esm/signature/SignatureLine.d.ts +42 -0
  23. package/dist/esm/signature/SignatureLine.js +33 -0
  24. package/dist/esm/signature/interfaces/SignatureCanvasProps.d.ts +2 -0
  25. package/dist/esm/textarea/interfaces/TextAreaProps.d.ts +10 -0
  26. package/dist/npm/input/Input.d.ts +12 -3
  27. package/dist/npm/package-metadata.js +1 -1
  28. package/dist/npm/signature/Signature.js +187 -177
  29. package/dist/npm/signature/SignatureBottomActions.d.ts +45 -0
  30. package/dist/npm/signature/SignatureBottomActions.js +80 -0
  31. package/dist/npm/signature/SignatureCanvas.js +29 -164
  32. package/dist/npm/signature/SignatureDialog.d.ts +54 -0
  33. package/dist/npm/signature/SignatureDialog.js +313 -0
  34. package/dist/npm/signature/SignatureLine.d.ts +42 -0
  35. package/dist/npm/signature/SignatureLine.js +40 -0
  36. package/dist/npm/signature/interfaces/SignatureCanvasProps.d.ts +2 -0
  37. package/dist/npm/textarea/interfaces/TextAreaProps.d.ts +10 -0
  38. package/package.json +13 -13
@@ -21,6 +21,16 @@ export interface TextAreaProps extends FormComponentProps {
21
21
  * Identifies the title of the TextArea component.
22
22
  */
23
23
  title?: string;
24
+ /**
25
+ * Defines the built-in [minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength) property of the text inputs.
26
+ * * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `minlength`. Camel-case and kebap-case won't work in this scenario.
27
+ */
28
+ minlength?: string;
29
+ /**
30
+ * Defines the built-in [maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength) property of the text inputs.
31
+ * * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `maxlength`. Camel-case and kebap-case won't work in this scenario.
32
+ */
33
+ maxlength?: string;
24
34
  /**
25
35
  * Specifies if the textarea element will resize its height automatically ([see example]({% slug sizing_textarea %})).
26
36
  * Defaults to `false`.
@@ -126,14 +126,23 @@ export interface InputProps extends FormComponentProps {
126
126
  */
127
127
  inputClass?: String;
128
128
  /**
129
- * Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
130
- * For example these elements could contain error or hint message.
129
+ * Identifies the element(s) which will label the component.
131
130
  */
132
131
  ariaDescribedBy?: string;
133
132
  /**
134
- * Identifies the element(s) which will label the component.
133
+ * Defines a string value that labels an interactive element.
135
134
  */
136
135
  ariaLabelledBy?: string;
136
+ /**
137
+ * Defines the built-in [minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength) property of the text inputs.
138
+ * * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `minlength`. Camel-case and kebap-case won't work in this scenario.
139
+ */
140
+ minlength?: string;
141
+ /**
142
+ * Defines the built-in [maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength) property of the text inputs.
143
+ * * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `maxlength`. Camel-case and kebap-case won't work in this scenario.
144
+ */
145
+ maxlength?: string;
137
146
  }
138
147
  /**
139
148
  * @hidden
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-inputs',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1673512136,
8
+ publishDate: 1673797599,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -135,13 +135,15 @@ var isV3 = allVue.version && allVue.version[0] === '3';
135
135
  var ref = allVue.ref;
136
136
  import { Button } from '@progress/kendo-vue-buttons';
137
137
  import { kendoThemeMaps, setRef, getRef, validatePackage } from '@progress/kendo-vue-common';
138
- import { Dialog } from '@progress/kendo-vue-dialogs';
138
+ import { SignatureDialog } from './SignatureDialog.js';
139
+ import { SignatureBottomActions } from './SignatureBottomActions.js';
140
+ import { SignatureLine } from './SignatureLine.js';
139
141
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
140
- import { messages, signatureClear, signatureMaximize, signatureMinimize } from '../messages/main.js';
142
+ import { messages, signatureClear, signatureMaximize } from '../messages/main.js';
141
143
  import { packageMetadata } from '../package-metadata.js';
142
144
  import { SignatureCanvas } from './SignatureCanvas.js';
143
145
  import { hasParent } from './utils.js';
144
- import { hyperlinkOpenIcon, xIcon } from '@progress/kendo-svg-icons';
146
+ import { hyperlinkOpenIcon } from '@progress/kendo-svg-icons';
145
147
  var DEFAULT_WIDTH = 250;
146
148
  var DEFAULT_HEIGHT = 84;
147
149
  var DEFAULT_POPUP_SCALE = 3;
@@ -186,6 +188,7 @@ var SignatureVue2 = {
186
188
  default: DEFAULT_EXPORT_SCALE
187
189
  },
188
190
  modelValue: String,
191
+ name: String,
189
192
  value: String,
190
193
  tabIndex: Number,
191
194
  dir: String,
@@ -214,6 +217,10 @@ var SignatureVue2 = {
214
217
  type: Boolean,
215
218
  default: false
216
219
  },
220
+ valid: {
221
+ type: Boolean,
222
+ default: undefined
223
+ },
217
224
  size: {
218
225
  type: String,
219
226
  default: 'medium',
@@ -247,9 +254,7 @@ var SignatureVue2 = {
247
254
  },
248
255
  openWrapperClass: function openWrapperClass() {
249
256
  var _a;
250
- var isValid =
251
- // !this.validityStylesGetter() ||
252
- this.validityGetter().valid;
257
+ var isValid = !this.validityStyles || this.validityGetter().valid;
253
258
  return _a = {
254
259
  'k-input': true,
255
260
  'k-signature': true,
@@ -277,6 +282,16 @@ var SignatureVue2 = {
277
282
  return this.$props.backgroundColor || defaultBackgroundColor;
278
283
  }
279
284
  },
285
+ watch: {
286
+ computedValue: function computedValue(newValue) {
287
+ if (newValue !== this.currentValue) {
288
+ this.loadImage(newValue);
289
+ }
290
+ },
291
+ computedOpen: function computedOpen() {
292
+ this.loadImage(this.computedValue);
293
+ }
294
+ },
280
295
  data: function data() {
281
296
  return {
282
297
  focused: false,
@@ -287,12 +302,10 @@ var SignatureVue2 = {
287
302
  };
288
303
  },
289
304
  mounted: function mounted() {
290
- this.canvas = getRef(this, 'canvas');
291
- this.minimizeButton = getRef(this, 'minimizeButton');
292
- this.maximizeButton = getRef(this, 'maximizeButton');
293
- this.dialog = getRef(this, 'dialog');
294
- this.popupWidth = this.popupSize().width;
295
- this.popupHeight = this.popupSize().height;
305
+ this.setRefs();
306
+ },
307
+ updated: function updated() {
308
+ this.setRefs();
296
309
  },
297
310
  // @ts-ignore
298
311
  setup: !isV3 ? undefined : function () {
@@ -304,48 +317,13 @@ var SignatureVue2 = {
304
317
  };
305
318
  },
306
319
  render: function render(createElement) {
307
- var _this = this;
308
320
  var h = gh || createElement;
309
321
  var ls = provideLocalizationService(this);
310
322
  var showMaximize = !(this.computedOpen || this.isDrawing || !this.$props.maximizable || this.$props.disabled);
311
- var showMinimize = this.computedOpen && !this.isDrawing;
312
323
  var isEmpty = !this.computedValue;
313
324
  var showClear = !(isEmpty || this.isDrawing || this.$props.readOnly || this.$props.disabled);
314
325
  var maximizeTitle = ls.toLanguageString(signatureMaximize, messages[signatureMaximize]);
315
- var minimizeTitle = ls.toLanguageString(signatureMinimize, messages[signatureMinimize]);
316
326
  var clearTitle = ls.toLanguageString(signatureClear, messages[signatureClear]);
317
- var renderCanvas = function renderCanvas(refName) {
318
- return h(SignatureCanvas, {
319
- ref: setRef(this, refName),
320
- value: this.computedValue,
321
- attrs: this.v3 ? undefined : {
322
- value: this.computedValue,
323
- tabIndex: this.tabIndex,
324
- disabled: this.disabled,
325
- color: this.computedColor,
326
- backgroundColor: this.computedBgColor,
327
- strokeWidth: this.strokeWidth,
328
- smooth: this.smooth,
329
- popupScale: refName === 'openCanvas' ? this.$props.popupScale : 1,
330
- scale: refName === 'openCanvas' ? 1 / this.popupScale * this.exportScale : this.exportScale,
331
- elementSize: this.elementSize
332
- },
333
- tabIndex: this.tabIndex,
334
- disabled: this.disabled,
335
- color: this.computedColor,
336
- backgroundColor: this.computedBgColor,
337
- strokeWidth: this.strokeWidth,
338
- smooth: this.smooth,
339
- popupScale: refName === 'openCanvas' ? this.$props.popupScale : 1,
340
- scale: refName === 'openCanvas' ? 1 / this.popupScale * this.exportScale : this.exportScale,
341
- onChange: this.onValueChange,
342
- on: this.v3 ? undefined : {
343
- "change": this.onValueChange
344
- },
345
- elementSize: this.elementSize
346
- });
347
- };
348
- var canvasDiv = renderCanvas.call(this, 'canvas');
349
327
  var actions = h("div", {
350
328
  "class": 'k-signature-actions k-signature-actions-top'
351
329
  }, [showMaximize &&
@@ -373,66 +351,22 @@ var SignatureVue2 = {
373
351
  },
374
352
  "aria-label": maximizeTitle,
375
353
  title: maximizeTitle
376
- }), showMinimize &&
377
- // @ts-ignore
378
- h(Button, {
379
- "class": 'k-signature-action k-signature-minimize k-rotate-180',
380
- ref: setRef(this, 'minimizeButton'),
381
- icon: 'hyperlink-open',
382
- attrs: this.v3 ? undefined : {
383
- icon: 'hyperlink-open',
384
- svgIcon: hyperlinkOpenIcon,
385
- shape: null,
386
- fillMode: 'flat',
387
- size: this.$props.size,
388
- "aria-label": minimizeTitle,
389
- title: minimizeTitle
390
- },
391
- svgIcon: hyperlinkOpenIcon,
392
- shape: null,
393
- fillMode: 'flat',
394
- size: this.$props.size,
395
- onClick: this.onMinimizeClick,
396
- on: this.v3 ? undefined : {
397
- "click": this.onMinimizeClick
398
- },
399
- "aria-label": minimizeTitle,
400
- title: minimizeTitle
401
354
  })]);
402
- var hideLine = !this.$props.hideLine && h("div", {
403
- "class": 'k-signature-line',
404
- style: {
405
- zIndex: 2,
406
- pointerEvents: 'none'
407
- }
408
- });
409
- var bottomActions = h("div", {
410
- "class": 'k-signature-actions k-signature-actions-bottom'
411
- }, [showClear &&
412
- // @ts-ignore
413
- h(Button, {
414
- "class": 'k-signature-action k-signature-clear',
415
- icon: 'x',
355
+ var hideLine = !this.$props.hideLine && h(SignatureLine);
356
+ var bottomActions = h(SignatureBottomActions, {
357
+ showClear: showClear,
416
358
  attrs: this.v3 ? undefined : {
417
- icon: 'x',
418
- svgIcon: xIcon,
419
- shape: null,
420
- fillMode: 'flat',
421
- size: this.$props.size,
422
- "aria-label": clearTitle,
359
+ showClear: showClear,
360
+ size: this.size,
423
361
  title: clearTitle
424
362
  },
425
- svgIcon: xIcon,
426
- shape: null,
427
- fillMode: 'flat',
428
- size: this.$props.size,
429
- onClick: this.onClear,
363
+ size: this.size,
364
+ onClear: this.onClear,
430
365
  on: this.v3 ? undefined : {
431
- "click": this.onClear
366
+ "clear": this.onClear
432
367
  },
433
- "aria-label": clearTitle,
434
368
  title: clearTitle
435
- })]);
369
+ });
436
370
  return h("div", {
437
371
  dir: this.$props.dir,
438
372
  attrs: this.v3 ? undefined : {
@@ -445,51 +379,105 @@ var SignatureVue2 = {
445
379
  "blur": this.onBlur
446
380
  },
447
381
  onBlur: this.onBlur
448
- }, [canvasDiv, actions, hideLine, bottomActions, this.computedOpen &&
449
- // @ts-ignore function children
450
- h(Dialog, {
451
- ref: setRef(this, 'dialog'),
452
- onOverlayclick: this.onOverlayClick,
382
+ }, [h(SignatureCanvas, {
383
+ ref: setRef(this, 'canvas'),
384
+ name: this.name,
385
+ attrs: this.v3 ? undefined : {
386
+ name: this.name,
387
+ value: this.computedValue,
388
+ tabIndex: this.tabIndex,
389
+ disabled: this.disabled,
390
+ readOnly: this.readOnly,
391
+ color: this.computedColor,
392
+ backgroundColor: this.computedBgColor,
393
+ strokeWidth: this.strokeWidth,
394
+ smooth: this.smooth,
395
+ popupScale: 1,
396
+ scale: this.exportScale,
397
+ elementSize: this.elementSize
398
+ },
399
+ value: this.computedValue,
400
+ tabIndex: this.tabIndex,
401
+ disabled: this.disabled,
402
+ readOnly: this.readOnly,
403
+ color: this.computedColor,
404
+ backgroundColor: this.computedBgColor,
405
+ strokeWidth: this.strokeWidth,
406
+ smooth: this.smooth,
407
+ popupScale: 1,
408
+ scale: this.exportScale,
409
+ onChange: this.onValueChange,
453
410
  on: this.v3 ? undefined : {
454
- "overlayclick": this.onOverlayClick
455
- }
456
- }, this.v3 ? function () {
457
- return [h("div", {
458
- style: {
459
- width: _this.popupWidth + 'px',
460
- height: _this.popupHeight + 'px'
461
- },
462
- dir: _this.$props.dir,
463
- attrs: _this.v3 ? undefined : {
464
- dir: _this.$props.dir
465
- },
466
- "class": _this.openWrapperClass,
467
- onFocus: _this.onFocus,
468
- on: _this.v3 ? undefined : {
469
- "focus": _this.onFocus,
470
- "blur": _this.onBlur
471
- },
472
- onBlur: _this.onBlur
473
- }, [renderCanvas.call(_this, 'openCanvas'), actions, hideLine, bottomActions])];
474
- } : [h("div", {
475
- style: {
476
- width: _this.popupWidth + 'px',
477
- height: _this.popupHeight + 'px'
411
+ "change": this.onValueChange,
412
+ "draw": this.onDraw,
413
+ "drawend": this.onDrawEnd
478
414
  },
479
- dir: _this.$props.dir,
480
- attrs: _this.v3 ? undefined : {
481
- dir: _this.$props.dir
415
+ elementSize: this.elementSize,
416
+ onDraw: this.onDraw,
417
+ onDrawend: this.onDrawEnd
418
+ }), actions, hideLine, bottomActions, this.computedOpen && h(SignatureDialog, {
419
+ ref: setRef(this, 'dialog'),
420
+ openWrapperClass: this.openWrapperClass,
421
+ attrs: this.v3 ? undefined : {
422
+ openWrapperClass: this.openWrapperClass,
423
+ popupWidth: this.popupWidth,
424
+ popupHeight: this.popupHeight,
425
+ showClear: showClear,
426
+ value: this.computedValue,
427
+ tabIndex: this.tabIndex,
428
+ disabled: this.disabled,
429
+ readOnly: this.readOnly,
430
+ color: this.computedColor,
431
+ backgroundColor: this.computedBgColor,
432
+ strokeWidth: this.strokeWidth,
433
+ smooth: this.smooth,
434
+ popupScale: this.$props.popupScale,
435
+ scale: 1 / this.popupScale * this.exportScale,
436
+ elementSize: this.elementSize
482
437
  },
483
- "class": _this.openWrapperClass,
484
- onFocus: _this.onFocus,
485
- on: _this.v3 ? undefined : {
486
- "focus": _this.onFocus,
487
- "blur": _this.onBlur
438
+ popupWidth: this.popupWidth,
439
+ popupHeight: this.popupHeight,
440
+ showClear: showClear,
441
+ onClose: this.onMinimizeClick,
442
+ on: this.v3 ? undefined : {
443
+ "close": this.onMinimizeClick,
444
+ "clear": this.onClear,
445
+ "overlayclick": this.onOverlayClick,
446
+ "focus": this.onFocus,
447
+ "blur": this.onBlur,
448
+ "change": this.onValueChange,
449
+ "draw": this.onDraw,
450
+ "drawend": this.onDrawEnd
488
451
  },
489
- onBlur: _this.onBlur
490
- }, [renderCanvas.call(_this, 'openCanvas'), actions, hideLine, bottomActions])])]);
452
+ onClear: this.onClear,
453
+ onOverlayclick: this.onOverlayClick,
454
+ onFocus: this.onFocus,
455
+ onBlur: this.onBlur,
456
+ value: this.computedValue,
457
+ tabIndex: this.tabIndex,
458
+ disabled: this.disabled,
459
+ readOnly: this.readOnly,
460
+ color: this.computedColor,
461
+ backgroundColor: this.computedBgColor,
462
+ strokeWidth: this.strokeWidth,
463
+ smooth: this.smooth,
464
+ popupScale: this.$props.popupScale,
465
+ scale: 1 / this.popupScale * this.exportScale,
466
+ onChange: this.onValueChange,
467
+ elementSize: this.elementSize,
468
+ onDraw: this.onDraw,
469
+ onDrawend: this.onDrawEnd
470
+ })]);
491
471
  },
492
472
  methods: {
473
+ setRefs: function setRefs() {
474
+ this.canvas = getRef(this, 'canvas');
475
+ this.minimizeButton = getRef(this, 'minimizeButton');
476
+ this.maximizeButton = getRef(this, 'maximizeButton');
477
+ this.dialog = getRef(this, 'dialog');
478
+ this.popupWidth = this.popupSize().width;
479
+ this.popupHeight = this.popupSize().height;
480
+ },
493
481
  onOverlayClick: function onOverlayClick() {
494
482
  this.currentOpen = false;
495
483
  },
@@ -505,8 +493,25 @@ var SignatureVue2 = {
505
493
  this.onValueChange(e.value);
506
494
  },
507
495
  reset: function reset() {
496
+ this.clear();
508
497
  this.onValueChange();
509
498
  },
499
+ clear: function clear() {
500
+ if (this.canvas) {
501
+ this.canvas.clear();
502
+ }
503
+ if (this.dialog && this.dialog.openCanvas) {
504
+ this.dialog.openCanvas.clear();
505
+ }
506
+ },
507
+ loadImage: function loadImage(value) {
508
+ if (this.canvas) {
509
+ this.canvas.loadImage(value);
510
+ }
511
+ if (this.dialog && this.dialog.openCanvas) {
512
+ this.dialog.openCanvas.loadImage(value);
513
+ }
514
+ },
510
515
  onDialogClose: function onDialogClose(event) {
511
516
  var _a;
512
517
  this.onMinimizeClick(event);
@@ -514,29 +519,18 @@ var SignatureVue2 = {
514
519
  },
515
520
  exportImage: function exportImage(exportSize) {
516
521
  var _a;
517
- return __awaiter(this, void 0, void 0, function () {
518
- var width, height;
519
- return __generator(this, function (_b) {
520
- switch (_b.label) {
521
- case 0:
522
- width = exportSize.width, height = exportSize.height;
523
- return [4 /*yield*/, (_a = this.canvas.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
524
- width: width * this.exportScale,
525
- height: height * this.exportScale
526
- })];
527
- case 1:
528
- return [2 /*return*/, _b.sent()];
529
- }
530
- });
522
+ var width = exportSize.width,
523
+ height = exportSize.height;
524
+ return (_a = this.canvas.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
525
+ width: width * this.exportScale,
526
+ height: height * this.exportScale
531
527
  });
532
528
  },
533
529
  validityGetter: function validityGetter() {
534
530
  var customError = this.$props.validationMessage !== undefined;
535
- var currentValue = this.computedValue; // valueGetter();
531
+ var currentValue = this.computedValue;
536
532
  var valueMissing = !currentValue;
537
- var valid = this.$props.valid !== undefined ? this.$props.valid :
538
- // !requiredGetter() ||
539
- !valueMissing;
533
+ var valid = this.$props.valid !== undefined ? this.$props.valid : !this.required || !valueMissing;
540
534
  return {
541
535
  customError: customError,
542
536
  valid: valid,
@@ -551,14 +545,27 @@ var SignatureVue2 = {
551
545
  element: this.$el,
552
546
  focus: this.focusElement()
553
547
  };
554
- // Object.defineProperty(options, 'name', { get: nameGetter });
555
- // Object.defineProperty(options, 'value', { get: this.computedValue }); //valueGetter
556
- // Object.defineProperty(options, 'validity', { get: validityGetter });
557
- // Object.defineProperty(options, 'validityStyles', { get: validityStylesGetter });
558
- // Object.defineProperty(options, 'required', { get: requiredGetter });
559
- // Object.defineProperty(options, 'props', { get: propsGetter });
560
- // Object.defineProperty(options, 'color', { get: colorGetter });
561
- // Object.defineProperty(options, 'backgroundColor', { get: backgroundColorGetter });
548
+ Object.defineProperty(options, 'name', {
549
+ get: this.name
550
+ });
551
+ Object.defineProperty(options, 'value', {
552
+ get: this.computedValue
553
+ });
554
+ Object.defineProperty(options, 'validity', {
555
+ get: this.validityGetter()
556
+ });
557
+ Object.defineProperty(options, 'validityStyles', {
558
+ get: this.validityStyles
559
+ });
560
+ Object.defineProperty(options, 'required', {
561
+ get: this.required
562
+ });
563
+ Object.defineProperty(options, 'color', {
564
+ get: this.computedColor
565
+ });
566
+ Object.defineProperty(options, 'backgroundColor', {
567
+ get: this.computedBgColor
568
+ });
562
569
  return options;
563
570
  },
564
571
  onFocus: function onFocus(event) {
@@ -582,20 +589,17 @@ var SignatureVue2 = {
582
589
  },
583
590
  onMaximizeClick: function onMaximizeClick(event) {
584
591
  return __awaiter(this, void 0, void 0, function () {
585
- var _a;
586
- return __generator(this, function (_b) {
587
- switch (_b.label) {
588
- case 0:
589
- _a = this;
590
- return [4 /*yield*/, this.exportImage(this.popupSize())];
591
- case 1:
592
- _a.currentValue = _b.sent();
593
- this.currentOpen = true;
594
- this.$emit('open', __assign({
595
- event: event
596
- }, this.getImperativeHandle()));
597
- return [2 /*return*/];
598
- }
592
+ var that;
593
+ return __generator(this, function (_a) {
594
+ that = this;
595
+ this.exportImage(this.popupSize()).then(function (newValue) {
596
+ that.currentValue = newValue;
597
+ });
598
+ this.currentOpen = true;
599
+ this.$emit('open', __assign({
600
+ event: event
601
+ }, this.getImperativeHandle()));
602
+ return [2 /*return*/];
599
603
  });
600
604
  });
601
605
  },
@@ -626,6 +630,12 @@ var SignatureVue2 = {
626
630
  width: width * this.popupScale,
627
631
  height: height * this.popupScale
628
632
  };
633
+ },
634
+ onDraw: function onDraw() {
635
+ this.isDrawing = true;
636
+ },
637
+ onDrawEnd: function onDrawEnd() {
638
+ this.isDrawing = false;
629
639
  }
630
640
  }
631
641
  };
@@ -0,0 +1,45 @@
1
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
2
+ declare type DefaultData<V> = object | ((this: V) => {});
3
+ declare type DefaultMethods<V> = {
4
+ [key: string]: (this: V, ...args: any[]) => any;
5
+ };
6
+ /**
7
+ * @hidden
8
+ */
9
+ export interface SignatureBottomActionsProps {
10
+ showClear: boolean;
11
+ size: string;
12
+ title: string;
13
+ }
14
+ /**
15
+ * @hidden
16
+ */
17
+ export interface SignatureBottomActionsComputed {
18
+ [key: string]: any;
19
+ }
20
+ /**
21
+ * @hidden
22
+ */
23
+ export interface SignatureBottomActionsMethods {
24
+ [key: string]: any;
25
+ element: () => HTMLSpanElement | null;
26
+ }
27
+ /**
28
+ * @hidden
29
+ */
30
+ export interface SignatureBottomActionsData {
31
+ }
32
+ /**
33
+ * @hidden
34
+ */
35
+ export interface SignatureBottomActionsAll extends Vue2type, SignatureBottomActionsMethods, SignatureBottomActionsData, SignatureBottomActionsComputed, SignatureBottomActionsProps {
36
+ }
37
+ /**
38
+ * @hidden
39
+ */
40
+ declare let SignatureBottomActionsVue2: ComponentOptions<SignatureBottomActionsAll, DefaultData<SignatureBottomActionsData>, DefaultMethods<SignatureBottomActionsAll>, SignatureBottomActionsComputed, RecordPropsDefinition<SignatureBottomActionsProps>>;
41
+ /**
42
+ * @hidden
43
+ */
44
+ declare const SignatureBottomActions: DefineComponent<{}, any, SignatureBottomActionsData, SignatureBottomActionsComputed, SignatureBottomActionsMethods, {}, {}, {}, string, {}, {}, {}>;
45
+ export { SignatureBottomActions, SignatureBottomActionsVue2 };
@@ -0,0 +1,73 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ import { Button } from '@progress/kendo-vue-buttons';
7
+ import { xIcon } from '@progress/kendo-svg-icons';
8
+ /**
9
+ * @hidden
10
+ */
11
+ var SignatureBottomActionsVue2 = {
12
+ name: 'KendoSignatureBottomActions',
13
+ // @ts-ignore
14
+ emits: {
15
+ clear: null
16
+ },
17
+ props: {
18
+ showClear: Boolean,
19
+ size: String,
20
+ title: String
21
+ },
22
+ methods: {
23
+ onClear: function onClear(e) {
24
+ this.$emit('clear', e);
25
+ }
26
+ },
27
+ // @ts-ignore
28
+ setup: !isV3 ? undefined : function () {
29
+ var v3 = !!isV3;
30
+ return {
31
+ v3: v3
32
+ };
33
+ },
34
+ render: function render(createElement) {
35
+ var h = gh || createElement;
36
+ var _a = this.$props,
37
+ showClear = _a.showClear,
38
+ title = _a.title,
39
+ size = _a.size;
40
+ return h("div", {
41
+ "class": 'k-signature-actions k-signature-actions-bottom'
42
+ }, [showClear &&
43
+ // @ts-ignore
44
+ h(Button, {
45
+ "class": 'k-signature-action k-signature-clear',
46
+ icon: 'x',
47
+ attrs: this.v3 ? undefined : {
48
+ icon: 'x',
49
+ svgIcon: xIcon,
50
+ shape: null,
51
+ fillMode: 'flat',
52
+ size: size,
53
+ "aria-label": title,
54
+ title: title
55
+ },
56
+ svgIcon: xIcon,
57
+ shape: null,
58
+ fillMode: 'flat',
59
+ size: size,
60
+ onClick: this.onClear,
61
+ on: this.v3 ? undefined : {
62
+ "click": this.onClear
63
+ },
64
+ "aria-label": title,
65
+ title: title
66
+ })]);
67
+ }
68
+ };
69
+ /**
70
+ * @hidden
71
+ */
72
+ var SignatureBottomActions = SignatureBottomActionsVue2;
73
+ export { SignatureBottomActions, SignatureBottomActionsVue2 };