@progress/kendo-vue-inputs 3.7.4-dev.202301131104 → 3.7.4-dev.202301161618

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 (42) hide show
  1. package/NOTICE.txt +11 -11
  2. package/dist/cdn/js/kendo-vue-inputs.js +1 -1
  3. package/dist/es/package-metadata.js +1 -1
  4. package/dist/es/radiobutton/RadioButton.js +4 -1
  5. package/dist/es/radiobutton/RadioGroup.js +2 -0
  6. package/dist/es/radiobutton/interfaces/RadioButtonProps.d.ts +5 -0
  7. package/dist/es/signature/Signature.js +106 -54
  8. package/dist/es/signature/SignatureBottomActions.d.ts +3 -0
  9. package/dist/es/signature/SignatureBottomActions.js +3 -0
  10. package/dist/es/signature/SignatureCanvas.js +28 -164
  11. package/dist/es/signature/SignatureDialog.d.ts +3 -0
  12. package/dist/es/signature/SignatureDialog.js +34 -9
  13. package/dist/es/signature/SignatureLine.d.ts +3 -0
  14. package/dist/es/signature/SignatureLine.js +3 -0
  15. package/dist/es/signature/interfaces/SignatureCanvasProps.d.ts +1 -0
  16. package/dist/esm/package-metadata.js +1 -1
  17. package/dist/esm/radiobutton/RadioButton.js +4 -1
  18. package/dist/esm/radiobutton/RadioGroup.js +2 -0
  19. package/dist/esm/radiobutton/interfaces/RadioButtonProps.d.ts +5 -0
  20. package/dist/esm/signature/Signature.js +106 -54
  21. package/dist/esm/signature/SignatureBottomActions.d.ts +3 -0
  22. package/dist/esm/signature/SignatureBottomActions.js +3 -0
  23. package/dist/esm/signature/SignatureCanvas.js +28 -164
  24. package/dist/esm/signature/SignatureDialog.d.ts +3 -0
  25. package/dist/esm/signature/SignatureDialog.js +34 -9
  26. package/dist/esm/signature/SignatureLine.d.ts +3 -0
  27. package/dist/esm/signature/SignatureLine.js +3 -0
  28. package/dist/esm/signature/interfaces/SignatureCanvasProps.d.ts +1 -0
  29. package/dist/npm/package-metadata.js +1 -1
  30. package/dist/npm/radiobutton/RadioButton.js +4 -1
  31. package/dist/npm/radiobutton/RadioGroup.js +2 -0
  32. package/dist/npm/radiobutton/interfaces/RadioButtonProps.d.ts +5 -0
  33. package/dist/npm/signature/Signature.js +106 -54
  34. package/dist/npm/signature/SignatureBottomActions.d.ts +3 -0
  35. package/dist/npm/signature/SignatureBottomActions.js +3 -0
  36. package/dist/npm/signature/SignatureCanvas.js +28 -164
  37. package/dist/npm/signature/SignatureDialog.d.ts +3 -0
  38. package/dist/npm/signature/SignatureDialog.js +33 -8
  39. package/dist/npm/signature/SignatureLine.d.ts +3 -0
  40. package/dist/npm/signature/SignatureLine.js +3 -0
  41. package/dist/npm/signature/interfaces/SignatureCanvasProps.d.ts +1 -0
  42. package/package.json +13 -13
@@ -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: 1673606827,
8
+ publishDate: 1673884908,
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
  };
@@ -19,6 +19,7 @@ var RadioButtonVue2 = {
19
19
  disabled: Boolean,
20
20
  className: String,
21
21
  content: [String, Number, Boolean, Object],
22
+ dataItem: Object,
22
23
  id: String,
23
24
  label: String,
24
25
  labelRender: [String, Number, Boolean, Object],
@@ -179,7 +180,9 @@ var RadioButtonVue2 = {
179
180
  focus: this.handleFocus,
180
181
  blur: this.handleBlur
181
182
  },
182
- additionalProps: {}
183
+ additionalProps: {
184
+ dataItem: this.$props.dataItem
185
+ }
183
186
  });
184
187
  }
185
188
  };
@@ -161,6 +161,7 @@ var RadioGroupVue2 = {
161
161
  className: option.className,
162
162
  label: option.label,
163
163
  value: option.value,
164
+ dataItem: option,
164
165
  checked: isCurrentlyChecked,
165
166
  disabled: option.disabled || disabled ? true : false,
166
167
  labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
@@ -174,6 +175,7 @@ var RadioGroupVue2 = {
174
175
  className: option.className,
175
176
  label: option.label,
176
177
  value: option.value,
178
+ dataItem: option,
177
179
  checked: isCurrentlyChecked,
178
180
  disabled: option.disabled || disabled ? true : false,
179
181
  labelPlacement: option.labelPlacement ? option.labelPlacement : labelPlacement,
@@ -24,6 +24,11 @@ export interface RadioButtonProps {
24
24
  * Specifies if the Radio button is disabled.
25
25
  */
26
26
  disabled?: boolean;
27
+ /**
28
+ * @hidden
29
+ * Used in RadioGroup scenarios with a custom template to pass dataItem data to the template
30
+ */
31
+ dataItem?: object;
27
32
  /**
28
33
  * Specifies the current index of the Radio button.
29
34
  */
@@ -188,6 +188,7 @@ var SignatureVue2 = {
188
188
  default: DEFAULT_EXPORT_SCALE
189
189
  },
190
190
  modelValue: String,
191
+ name: String,
191
192
  value: String,
192
193
  tabIndex: Number,
193
194
  dir: String,
@@ -216,6 +217,10 @@ var SignatureVue2 = {
216
217
  type: Boolean,
217
218
  default: false
218
219
  },
220
+ valid: {
221
+ type: Boolean,
222
+ default: undefined
223
+ },
219
224
  size: {
220
225
  type: String,
221
226
  default: 'medium',
@@ -249,9 +254,7 @@ var SignatureVue2 = {
249
254
  },
250
255
  openWrapperClass: function openWrapperClass() {
251
256
  var _a;
252
- var isValid =
253
- // !this.validityStylesGetter() ||
254
- this.validityGetter().valid;
257
+ var isValid = !this.validityStyles || this.validityGetter().valid;
255
258
  return _a = {
256
259
  'k-input': true,
257
260
  'k-signature': true,
@@ -279,6 +282,16 @@ var SignatureVue2 = {
279
282
  return this.$props.backgroundColor || defaultBackgroundColor;
280
283
  }
281
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
+ },
282
295
  data: function data() {
283
296
  return {
284
297
  focused: false,
@@ -289,12 +302,10 @@ var SignatureVue2 = {
289
302
  };
290
303
  },
291
304
  mounted: function mounted() {
292
- this.canvas = getRef(this, 'canvas');
293
- this.minimizeButton = getRef(this, 'minimizeButton');
294
- this.maximizeButton = getRef(this, 'maximizeButton');
295
- this.dialog = getRef(this, 'dialog');
296
- this.popupWidth = this.popupSize().width;
297
- this.popupHeight = this.popupSize().height;
305
+ this.setRefs();
306
+ },
307
+ updated: function updated() {
308
+ this.setRefs();
298
309
  },
299
310
  // @ts-ignore
300
311
  setup: !isV3 ? undefined : function () {
@@ -370,8 +381,9 @@ var SignatureVue2 = {
370
381
  onBlur: this.onBlur
371
382
  }, [h(SignatureCanvas, {
372
383
  ref: setRef(this, 'canvas'),
373
- value: this.computedValue,
384
+ name: this.name,
374
385
  attrs: this.v3 ? undefined : {
386
+ name: this.name,
375
387
  value: this.computedValue,
376
388
  tabIndex: this.tabIndex,
377
389
  disabled: this.disabled,
@@ -384,6 +396,7 @@ var SignatureVue2 = {
384
396
  scale: this.exportScale,
385
397
  elementSize: this.elementSize
386
398
  },
399
+ value: this.computedValue,
387
400
  tabIndex: this.tabIndex,
388
401
  disabled: this.disabled,
389
402
  readOnly: this.readOnly,
@@ -395,10 +408,15 @@ var SignatureVue2 = {
395
408
  scale: this.exportScale,
396
409
  onChange: this.onValueChange,
397
410
  on: this.v3 ? undefined : {
398
- "change": this.onValueChange
411
+ "change": this.onValueChange,
412
+ "draw": this.onDraw,
413
+ "drawend": this.onDrawEnd
399
414
  },
400
- elementSize: this.elementSize
415
+ elementSize: this.elementSize,
416
+ onDraw: this.onDraw,
417
+ onDrawend: this.onDrawEnd
401
418
  }), actions, hideLine, bottomActions, this.computedOpen && h(SignatureDialog, {
419
+ ref: setRef(this, 'dialog'),
402
420
  openWrapperClass: this.openWrapperClass,
403
421
  attrs: this.v3 ? undefined : {
404
422
  openWrapperClass: this.openWrapperClass,
@@ -427,7 +445,9 @@ var SignatureVue2 = {
427
445
  "overlayclick": this.onOverlayClick,
428
446
  "focus": this.onFocus,
429
447
  "blur": this.onBlur,
430
- "change": this.onValueChange
448
+ "change": this.onValueChange,
449
+ "draw": this.onDraw,
450
+ "drawend": this.onDrawEnd
431
451
  },
432
452
  onClear: this.onClear,
433
453
  onOverlayclick: this.onOverlayClick,
@@ -444,10 +464,20 @@ var SignatureVue2 = {
444
464
  popupScale: this.$props.popupScale,
445
465
  scale: 1 / this.popupScale * this.exportScale,
446
466
  onChange: this.onValueChange,
447
- elementSize: this.elementSize
467
+ elementSize: this.elementSize,
468
+ onDraw: this.onDraw,
469
+ onDrawend: this.onDrawEnd
448
470
  })]);
449
471
  },
450
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
+ },
451
481
  onOverlayClick: function onOverlayClick() {
452
482
  this.currentOpen = false;
453
483
  },
@@ -463,8 +493,25 @@ var SignatureVue2 = {
463
493
  this.onValueChange(e.value);
464
494
  },
465
495
  reset: function reset() {
496
+ this.clear();
466
497
  this.onValueChange();
467
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
+ },
468
515
  onDialogClose: function onDialogClose(event) {
469
516
  var _a;
470
517
  this.onMinimizeClick(event);
@@ -472,29 +519,18 @@ var SignatureVue2 = {
472
519
  },
473
520
  exportImage: function exportImage(exportSize) {
474
521
  var _a;
475
- return __awaiter(this, void 0, void 0, function () {
476
- var width, height;
477
- return __generator(this, function (_b) {
478
- switch (_b.label) {
479
- case 0:
480
- width = exportSize.width, height = exportSize.height;
481
- return [4 /*yield*/, (_a = this.canvas.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
482
- width: width * this.exportScale,
483
- height: height * this.exportScale
484
- })];
485
- case 1:
486
- return [2 /*return*/, _b.sent()];
487
- }
488
- });
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
489
527
  });
490
528
  },
491
529
  validityGetter: function validityGetter() {
492
530
  var customError = this.$props.validationMessage !== undefined;
493
- var currentValue = this.computedValue; // valueGetter();
531
+ var currentValue = this.computedValue;
494
532
  var valueMissing = !currentValue;
495
- var valid = this.$props.valid !== undefined ? this.$props.valid :
496
- // !requiredGetter() ||
497
- !valueMissing;
533
+ var valid = this.$props.valid !== undefined ? this.$props.valid : !this.required || !valueMissing;
498
534
  return {
499
535
  customError: customError,
500
536
  valid: valid,
@@ -509,14 +545,27 @@ var SignatureVue2 = {
509
545
  element: this.$el,
510
546
  focus: this.focusElement()
511
547
  };
512
- // Object.defineProperty(options, 'name', { get: nameGetter });
513
- // Object.defineProperty(options, 'value', { get: this.computedValue }); //valueGetter
514
- // Object.defineProperty(options, 'validity', { get: validityGetter });
515
- // Object.defineProperty(options, 'validityStyles', { get: validityStylesGetter });
516
- // Object.defineProperty(options, 'required', { get: requiredGetter });
517
- // Object.defineProperty(options, 'props', { get: propsGetter });
518
- // Object.defineProperty(options, 'color', { get: colorGetter });
519
- // 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
+ });
520
569
  return options;
521
570
  },
522
571
  onFocus: function onFocus(event) {
@@ -540,20 +589,17 @@ var SignatureVue2 = {
540
589
  },
541
590
  onMaximizeClick: function onMaximizeClick(event) {
542
591
  return __awaiter(this, void 0, void 0, function () {
543
- var _a;
544
- return __generator(this, function (_b) {
545
- switch (_b.label) {
546
- case 0:
547
- _a = this;
548
- return [4 /*yield*/, this.exportImage(this.popupSize())];
549
- case 1:
550
- _a.currentValue = _b.sent();
551
- this.currentOpen = true;
552
- this.$emit('open', __assign({
553
- event: event
554
- }, this.getImperativeHandle()));
555
- return [2 /*return*/];
556
- }
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*/];
557
603
  });
558
604
  });
559
605
  },
@@ -584,6 +630,12 @@ var SignatureVue2 = {
584
630
  width: width * this.popupScale,
585
631
  height: height * this.popupScale
586
632
  };
633
+ },
634
+ onDraw: function onDraw() {
635
+ this.isDrawing = true;
636
+ },
637
+ onDrawEnd: function onDrawEnd() {
638
+ this.isDrawing = false;
587
639
  }
588
640
  }
589
641
  };
@@ -38,5 +38,8 @@ export interface SignatureBottomActionsAll extends Vue2type, SignatureBottomActi
38
38
  * @hidden
39
39
  */
40
40
  declare let SignatureBottomActionsVue2: ComponentOptions<SignatureBottomActionsAll, DefaultData<SignatureBottomActionsData>, DefaultMethods<SignatureBottomActionsAll>, SignatureBottomActionsComputed, RecordPropsDefinition<SignatureBottomActionsProps>>;
41
+ /**
42
+ * @hidden
43
+ */
41
44
  declare const SignatureBottomActions: DefineComponent<{}, any, SignatureBottomActionsData, SignatureBottomActionsComputed, SignatureBottomActionsMethods, {}, {}, {}, string, {}, {}, {}>;
42
45
  export { SignatureBottomActions, SignatureBottomActionsVue2 };
@@ -66,5 +66,8 @@ var SignatureBottomActionsVue2 = {
66
66
  })]);
67
67
  }
68
68
  };
69
+ /**
70
+ * @hidden
71
+ */
69
72
  var SignatureBottomActions = SignatureBottomActionsVue2;
70
73
  export { SignatureBottomActions, SignatureBottomActionsVue2 };
@@ -1,120 +1,3 @@
1
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) {
3
- return value instanceof P ? value : new P(function (resolve) {
4
- resolve(value);
5
- });
6
- }
7
- return new (P || (P = Promise))(function (resolve, reject) {
8
- function fulfilled(value) {
9
- try {
10
- step(generator.next(value));
11
- } catch (e) {
12
- reject(e);
13
- }
14
- }
15
- function rejected(value) {
16
- try {
17
- step(generator["throw"](value));
18
- } catch (e) {
19
- reject(e);
20
- }
21
- }
22
- function step(result) {
23
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
24
- }
25
- step((generator = generator.apply(thisArg, _arguments || [])).next());
26
- });
27
- };
28
- var __generator = this && this.__generator || function (thisArg, body) {
29
- var _ = {
30
- label: 0,
31
- sent: function sent() {
32
- if (t[0] & 1) throw t[1];
33
- return t[1];
34
- },
35
- trys: [],
36
- ops: []
37
- },
38
- f,
39
- y,
40
- t,
41
- g;
42
- return g = {
43
- next: verb(0),
44
- "throw": verb(1),
45
- "return": verb(2)
46
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
47
- return this;
48
- }), g;
49
- function verb(n) {
50
- return function (v) {
51
- return step([n, v]);
52
- };
53
- }
54
- function step(op) {
55
- if (f) throw new TypeError("Generator is already executing.");
56
- while (_) {
57
- try {
58
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
59
- if (y = 0, t) op = [op[0] & 2, t.value];
60
- switch (op[0]) {
61
- case 0:
62
- case 1:
63
- t = op;
64
- break;
65
- case 4:
66
- _.label++;
67
- return {
68
- value: op[1],
69
- done: false
70
- };
71
- case 5:
72
- _.label++;
73
- y = op[1];
74
- op = [0];
75
- continue;
76
- case 7:
77
- op = _.ops.pop();
78
- _.trys.pop();
79
- continue;
80
- default:
81
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
82
- _ = 0;
83
- continue;
84
- }
85
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
86
- _.label = op[1];
87
- break;
88
- }
89
- if (op[0] === 6 && _.label < t[1]) {
90
- _.label = t[1];
91
- t = op;
92
- break;
93
- }
94
- if (t && _.label < t[2]) {
95
- _.label = t[2];
96
- _.ops.push(op);
97
- break;
98
- }
99
- if (t[2]) _.ops.pop();
100
- _.trys.pop();
101
- continue;
102
- }
103
- op = body.call(thisArg, _);
104
- } catch (e) {
105
- op = [6, e];
106
- y = 0;
107
- } finally {
108
- f = t = 0;
109
- }
110
- }
111
- if (op[0] & 5) throw op[1];
112
- return {
113
- value: op[0] ? op[1] : void 0,
114
- done: true
115
- };
116
- }
117
- };
118
1
  // @ts-ignore
119
2
  import * as Vue from 'vue';
120
3
  var allVue = Vue;
@@ -133,12 +16,11 @@ var setOptions = function setOptions() {
133
16
  */
134
17
  var SignatureCanvasVue2 = {
135
18
  name: 'KendoSignatureCanvas',
136
- model: {
137
- event: 'changemodel'
138
- },
139
19
  // @ts-ignore
140
20
  emits: {
141
- change: null
21
+ change: null,
22
+ draw: null,
23
+ drawend: null
142
24
  },
143
25
  inject: {
144
26
  kendoIntlService: {
@@ -149,6 +31,7 @@ var SignatureCanvasVue2 = {
149
31
  strokeWidth: Number,
150
32
  popupScale: Number,
151
33
  scale: Number,
34
+ name: String,
152
35
  value: String,
153
36
  tabIndex: Number,
154
37
  disabled: Boolean,
@@ -159,15 +42,6 @@ var SignatureCanvasVue2 = {
159
42
  smooth: Boolean
160
43
  },
161
44
  watch: {
162
- value: function value(newLocale) {
163
- if (this.instance) {
164
- if (newLocale) {
165
- this.instance.loadImage(newLocale);
166
- } else {
167
- this.instance.clear();
168
- }
169
- }
170
- },
171
45
  color: setOptions,
172
46
  backgroundColor: setOptions,
173
47
  smooth: setOptions,
@@ -175,7 +49,6 @@ var SignatureCanvasVue2 = {
175
49
  readOnly: setOptions
176
50
  },
177
51
  mounted: function mounted() {
178
- var _this = this;
179
52
  this.canvas = this.$el;
180
53
  var pad = new SignaturePad(this.canvas, this.getOptions());
181
54
  if (this.value) {
@@ -184,12 +57,8 @@ var SignatureCanvasVue2 = {
184
57
  this.instance = pad;
185
58
  this.instance.setOptions({
186
59
  onChange: this.onValueChange,
187
- onDraw: function onDraw() {
188
- return _this.isDrawing = true;
189
- },
190
- onDrawEnd: function onDrawEnd() {
191
- return _this.isDrawing = false;
192
- }
60
+ onDraw: this.onDraw,
61
+ onDrawEnd: this.onDrawEnd
193
62
  });
194
63
  },
195
64
  destroyed: !!isV3 ? undefined : function () {
@@ -219,6 +88,7 @@ var SignatureCanvasVue2 = {
219
88
  tabIndex: getTabIndex(this.$props.tabIndex, this.$props.disabled),
220
89
  role: "img",
221
90
  id: this.$props.id,
91
+ name: this.$props.name,
222
92
  "aria-label": this.$props.ariaLabel,
223
93
  "aria-labelledby": this.$props.ariaLabelledBy,
224
94
  "aria-describedby": this.$props.ariaDescribedBy,
@@ -226,6 +96,7 @@ var SignatureCanvasVue2 = {
226
96
  },
227
97
  role: "img",
228
98
  id: this.$props.id,
99
+ name: this.$props.name,
229
100
  "aria-label": this.$props.ariaLabel,
230
101
  "aria-labelledby": this.$props.ariaLabelledBy,
231
102
  "aria-describedby": this.$props.ariaDescribedBy,
@@ -234,21 +105,23 @@ var SignatureCanvasVue2 = {
234
105
  },
235
106
  methods: {
236
107
  onValueChange: function onValueChange() {
237
- return __awaiter(this, void 0, void 0, function () {
238
- var nextValue;
239
- return __generator(this, function (_a) {
240
- switch (_a.label) {
241
- case 0:
242
- return [4 /*yield*/, this.exportImage(this.elementSize())];
243
- case 1:
244
- nextValue = _a.sent();
245
- this.$emit('change', nextValue);
246
- return [2 /*return*/];
247
- }
248
- });
108
+ var that = this;
109
+ this.exportImage(this.elementSize()).then(function (nextValue) {
110
+ that.$emit('change', nextValue);
249
111
  });
250
112
  },
251
-
113
+ onDraw: function onDraw() {
114
+ this.$emit('draw');
115
+ },
116
+ onDrawEnd: function onDrawEnd() {
117
+ this.$emit('drawend');
118
+ },
119
+ loadImage: function loadImage(newLocale) {
120
+ this.instance.loadImage(newLocale);
121
+ },
122
+ clear: function clear() {
123
+ this.instance.clear();
124
+ },
252
125
  getOptions: function getOptions() {
253
126
  return {
254
127
  scale: this.popupScale,
@@ -261,20 +134,11 @@ var SignatureCanvasVue2 = {
261
134
  },
262
135
  exportImage: function exportImage(exportSize) {
263
136
  var _a;
264
- return __awaiter(this, void 0, void 0, function () {
265
- var width, height;
266
- return __generator(this, function (_b) {
267
- switch (_b.label) {
268
- case 0:
269
- width = exportSize.width, height = exportSize.height;
270
- return [4 /*yield*/, (_a = this.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
271
- width: width * this.scale,
272
- height: height * this.scale
273
- })];
274
- case 1:
275
- return [2 /*return*/, _b.sent()];
276
- }
277
- });
137
+ var width = exportSize.width,
138
+ height = exportSize.height;
139
+ return (_a = this.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
140
+ width: width * this.scale,
141
+ height: height * this.scale
278
142
  });
279
143
  }
280
144
  }
@@ -4,6 +4,9 @@ declare type DefaultMethods<V> = {
4
4
  [key: string]: (this: V, ...args: any[]) => any;
5
5
  };
6
6
  import { SignatureCanvasProps } from './interfaces/SignatureCanvasProps';
7
+ /**
8
+ * @hidden
9
+ */
7
10
  export interface SignatureDialogProps extends SignatureCanvasProps {
8
11
  openWrapperClass?: object;
9
12
  size?: string;