@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
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-inputs',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1673512136,
11
+ publishDate: 1673797599,
12
12
  version: '',
13
13
  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'
14
14
  };
@@ -141,7 +141,9 @@ var isV3 = allVue.version && allVue.version[0] === '3';
141
141
  var ref = allVue.ref;
142
142
  var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
143
143
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
144
- var kendo_vue_dialogs_1 = require("@progress/kendo-vue-dialogs");
144
+ var SignatureDialog_1 = require("./SignatureDialog");
145
+ var SignatureBottomActions_1 = require("./SignatureBottomActions");
146
+ var SignatureLine_1 = require("./SignatureLine");
145
147
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
146
148
  var main_1 = require("../messages/main");
147
149
  var package_metadata_1 = require("../package-metadata");
@@ -192,6 +194,7 @@ var SignatureVue2 = {
192
194
  default: DEFAULT_EXPORT_SCALE
193
195
  },
194
196
  modelValue: String,
197
+ name: String,
195
198
  value: String,
196
199
  tabIndex: Number,
197
200
  dir: String,
@@ -220,6 +223,10 @@ var SignatureVue2 = {
220
223
  type: Boolean,
221
224
  default: false
222
225
  },
226
+ valid: {
227
+ type: Boolean,
228
+ default: undefined
229
+ },
223
230
  size: {
224
231
  type: String,
225
232
  default: 'medium',
@@ -253,9 +260,7 @@ var SignatureVue2 = {
253
260
  },
254
261
  openWrapperClass: function openWrapperClass() {
255
262
  var _a;
256
- var isValid =
257
- // !this.validityStylesGetter() ||
258
- this.validityGetter().valid;
263
+ var isValid = !this.validityStyles || this.validityGetter().valid;
259
264
  return _a = {
260
265
  'k-input': true,
261
266
  'k-signature': true,
@@ -283,6 +288,16 @@ var SignatureVue2 = {
283
288
  return this.$props.backgroundColor || defaultBackgroundColor;
284
289
  }
285
290
  },
291
+ watch: {
292
+ computedValue: function computedValue(newValue) {
293
+ if (newValue !== this.currentValue) {
294
+ this.loadImage(newValue);
295
+ }
296
+ },
297
+ computedOpen: function computedOpen() {
298
+ this.loadImage(this.computedValue);
299
+ }
300
+ },
286
301
  data: function data() {
287
302
  return {
288
303
  focused: false,
@@ -293,12 +308,10 @@ var SignatureVue2 = {
293
308
  };
294
309
  },
295
310
  mounted: function mounted() {
296
- this.canvas = (0, kendo_vue_common_1.getRef)(this, 'canvas');
297
- this.minimizeButton = (0, kendo_vue_common_1.getRef)(this, 'minimizeButton');
298
- this.maximizeButton = (0, kendo_vue_common_1.getRef)(this, 'maximizeButton');
299
- this.dialog = (0, kendo_vue_common_1.getRef)(this, 'dialog');
300
- this.popupWidth = this.popupSize().width;
301
- this.popupHeight = this.popupSize().height;
311
+ this.setRefs();
312
+ },
313
+ updated: function updated() {
314
+ this.setRefs();
302
315
  },
303
316
  // @ts-ignore
304
317
  setup: !isV3 ? undefined : function () {
@@ -310,48 +323,13 @@ var SignatureVue2 = {
310
323
  };
311
324
  },
312
325
  render: function render(createElement) {
313
- var _this = this;
314
326
  var h = gh || createElement;
315
327
  var ls = (0, kendo_vue_intl_1.provideLocalizationService)(this);
316
328
  var showMaximize = !(this.computedOpen || this.isDrawing || !this.$props.maximizable || this.$props.disabled);
317
- var showMinimize = this.computedOpen && !this.isDrawing;
318
329
  var isEmpty = !this.computedValue;
319
330
  var showClear = !(isEmpty || this.isDrawing || this.$props.readOnly || this.$props.disabled);
320
331
  var maximizeTitle = ls.toLanguageString(main_1.signatureMaximize, main_1.messages[main_1.signatureMaximize]);
321
- var minimizeTitle = ls.toLanguageString(main_1.signatureMinimize, main_1.messages[main_1.signatureMinimize]);
322
332
  var clearTitle = ls.toLanguageString(main_1.signatureClear, main_1.messages[main_1.signatureClear]);
323
- var renderCanvas = function renderCanvas(refName) {
324
- return h(SignatureCanvas_1.SignatureCanvas, {
325
- ref: (0, kendo_vue_common_1.setRef)(this, refName),
326
- value: this.computedValue,
327
- attrs: this.v3 ? undefined : {
328
- value: this.computedValue,
329
- tabIndex: this.tabIndex,
330
- disabled: this.disabled,
331
- color: this.computedColor,
332
- backgroundColor: this.computedBgColor,
333
- strokeWidth: this.strokeWidth,
334
- smooth: this.smooth,
335
- popupScale: refName === 'openCanvas' ? this.$props.popupScale : 1,
336
- scale: refName === 'openCanvas' ? 1 / this.popupScale * this.exportScale : this.exportScale,
337
- elementSize: this.elementSize
338
- },
339
- tabIndex: this.tabIndex,
340
- disabled: this.disabled,
341
- color: this.computedColor,
342
- backgroundColor: this.computedBgColor,
343
- strokeWidth: this.strokeWidth,
344
- smooth: this.smooth,
345
- popupScale: refName === 'openCanvas' ? this.$props.popupScale : 1,
346
- scale: refName === 'openCanvas' ? 1 / this.popupScale * this.exportScale : this.exportScale,
347
- onChange: this.onValueChange,
348
- on: this.v3 ? undefined : {
349
- "change": this.onValueChange
350
- },
351
- elementSize: this.elementSize
352
- });
353
- };
354
- var canvasDiv = renderCanvas.call(this, 'canvas');
355
333
  var actions = h("div", {
356
334
  "class": 'k-signature-actions k-signature-actions-top'
357
335
  }, [showMaximize &&
@@ -379,66 +357,22 @@ var SignatureVue2 = {
379
357
  },
380
358
  "aria-label": maximizeTitle,
381
359
  title: maximizeTitle
382
- }), showMinimize &&
383
- // @ts-ignore
384
- h(kendo_vue_buttons_1.Button, {
385
- "class": 'k-signature-action k-signature-minimize k-rotate-180',
386
- ref: (0, kendo_vue_common_1.setRef)(this, 'minimizeButton'),
387
- icon: 'hyperlink-open',
388
- attrs: this.v3 ? undefined : {
389
- icon: 'hyperlink-open',
390
- svgIcon: kendo_svg_icons_1.hyperlinkOpenIcon,
391
- shape: null,
392
- fillMode: 'flat',
393
- size: this.$props.size,
394
- "aria-label": minimizeTitle,
395
- title: minimizeTitle
396
- },
397
- svgIcon: kendo_svg_icons_1.hyperlinkOpenIcon,
398
- shape: null,
399
- fillMode: 'flat',
400
- size: this.$props.size,
401
- onClick: this.onMinimizeClick,
402
- on: this.v3 ? undefined : {
403
- "click": this.onMinimizeClick
404
- },
405
- "aria-label": minimizeTitle,
406
- title: minimizeTitle
407
360
  })]);
408
- var hideLine = !this.$props.hideLine && h("div", {
409
- "class": 'k-signature-line',
410
- style: {
411
- zIndex: 2,
412
- pointerEvents: 'none'
413
- }
414
- });
415
- var bottomActions = h("div", {
416
- "class": 'k-signature-actions k-signature-actions-bottom'
417
- }, [showClear &&
418
- // @ts-ignore
419
- h(kendo_vue_buttons_1.Button, {
420
- "class": 'k-signature-action k-signature-clear',
421
- icon: 'x',
361
+ var hideLine = !this.$props.hideLine && h(SignatureLine_1.SignatureLine);
362
+ var bottomActions = h(SignatureBottomActions_1.SignatureBottomActions, {
363
+ showClear: showClear,
422
364
  attrs: this.v3 ? undefined : {
423
- icon: 'x',
424
- svgIcon: kendo_svg_icons_1.xIcon,
425
- shape: null,
426
- fillMode: 'flat',
427
- size: this.$props.size,
428
- "aria-label": clearTitle,
365
+ showClear: showClear,
366
+ size: this.size,
429
367
  title: clearTitle
430
368
  },
431
- svgIcon: kendo_svg_icons_1.xIcon,
432
- shape: null,
433
- fillMode: 'flat',
434
- size: this.$props.size,
435
- onClick: this.onClear,
369
+ size: this.size,
370
+ onClear: this.onClear,
436
371
  on: this.v3 ? undefined : {
437
- "click": this.onClear
372
+ "clear": this.onClear
438
373
  },
439
- "aria-label": clearTitle,
440
374
  title: clearTitle
441
- })]);
375
+ });
442
376
  return h("div", {
443
377
  dir: this.$props.dir,
444
378
  attrs: this.v3 ? undefined : {
@@ -451,51 +385,105 @@ var SignatureVue2 = {
451
385
  "blur": this.onBlur
452
386
  },
453
387
  onBlur: this.onBlur
454
- }, [canvasDiv, actions, hideLine, bottomActions, this.computedOpen &&
455
- // @ts-ignore function children
456
- h(kendo_vue_dialogs_1.Dialog, {
457
- ref: (0, kendo_vue_common_1.setRef)(this, 'dialog'),
458
- onOverlayclick: this.onOverlayClick,
388
+ }, [h(SignatureCanvas_1.SignatureCanvas, {
389
+ ref: (0, kendo_vue_common_1.setRef)(this, 'canvas'),
390
+ name: this.name,
391
+ attrs: this.v3 ? undefined : {
392
+ name: this.name,
393
+ value: this.computedValue,
394
+ tabIndex: this.tabIndex,
395
+ disabled: this.disabled,
396
+ readOnly: this.readOnly,
397
+ color: this.computedColor,
398
+ backgroundColor: this.computedBgColor,
399
+ strokeWidth: this.strokeWidth,
400
+ smooth: this.smooth,
401
+ popupScale: 1,
402
+ scale: this.exportScale,
403
+ elementSize: this.elementSize
404
+ },
405
+ value: this.computedValue,
406
+ tabIndex: this.tabIndex,
407
+ disabled: this.disabled,
408
+ readOnly: this.readOnly,
409
+ color: this.computedColor,
410
+ backgroundColor: this.computedBgColor,
411
+ strokeWidth: this.strokeWidth,
412
+ smooth: this.smooth,
413
+ popupScale: 1,
414
+ scale: this.exportScale,
415
+ onChange: this.onValueChange,
459
416
  on: this.v3 ? undefined : {
460
- "overlayclick": this.onOverlayClick
461
- }
462
- }, this.v3 ? function () {
463
- return [h("div", {
464
- style: {
465
- width: _this.popupWidth + 'px',
466
- height: _this.popupHeight + 'px'
467
- },
468
- dir: _this.$props.dir,
469
- attrs: _this.v3 ? undefined : {
470
- dir: _this.$props.dir
471
- },
472
- "class": _this.openWrapperClass,
473
- onFocus: _this.onFocus,
474
- on: _this.v3 ? undefined : {
475
- "focus": _this.onFocus,
476
- "blur": _this.onBlur
477
- },
478
- onBlur: _this.onBlur
479
- }, [renderCanvas.call(_this, 'openCanvas'), actions, hideLine, bottomActions])];
480
- } : [h("div", {
481
- style: {
482
- width: _this.popupWidth + 'px',
483
- height: _this.popupHeight + 'px'
417
+ "change": this.onValueChange,
418
+ "draw": this.onDraw,
419
+ "drawend": this.onDrawEnd
484
420
  },
485
- dir: _this.$props.dir,
486
- attrs: _this.v3 ? undefined : {
487
- dir: _this.$props.dir
421
+ elementSize: this.elementSize,
422
+ onDraw: this.onDraw,
423
+ onDrawend: this.onDrawEnd
424
+ }), actions, hideLine, bottomActions, this.computedOpen && h(SignatureDialog_1.SignatureDialog, {
425
+ ref: (0, kendo_vue_common_1.setRef)(this, 'dialog'),
426
+ openWrapperClass: this.openWrapperClass,
427
+ attrs: this.v3 ? undefined : {
428
+ openWrapperClass: this.openWrapperClass,
429
+ popupWidth: this.popupWidth,
430
+ popupHeight: this.popupHeight,
431
+ showClear: showClear,
432
+ value: this.computedValue,
433
+ tabIndex: this.tabIndex,
434
+ disabled: this.disabled,
435
+ readOnly: this.readOnly,
436
+ color: this.computedColor,
437
+ backgroundColor: this.computedBgColor,
438
+ strokeWidth: this.strokeWidth,
439
+ smooth: this.smooth,
440
+ popupScale: this.$props.popupScale,
441
+ scale: 1 / this.popupScale * this.exportScale,
442
+ elementSize: this.elementSize
488
443
  },
489
- "class": _this.openWrapperClass,
490
- onFocus: _this.onFocus,
491
- on: _this.v3 ? undefined : {
492
- "focus": _this.onFocus,
493
- "blur": _this.onBlur
444
+ popupWidth: this.popupWidth,
445
+ popupHeight: this.popupHeight,
446
+ showClear: showClear,
447
+ onClose: this.onMinimizeClick,
448
+ on: this.v3 ? undefined : {
449
+ "close": this.onMinimizeClick,
450
+ "clear": this.onClear,
451
+ "overlayclick": this.onOverlayClick,
452
+ "focus": this.onFocus,
453
+ "blur": this.onBlur,
454
+ "change": this.onValueChange,
455
+ "draw": this.onDraw,
456
+ "drawend": this.onDrawEnd
494
457
  },
495
- onBlur: _this.onBlur
496
- }, [renderCanvas.call(_this, 'openCanvas'), actions, hideLine, bottomActions])])]);
458
+ onClear: this.onClear,
459
+ onOverlayclick: this.onOverlayClick,
460
+ onFocus: this.onFocus,
461
+ onBlur: this.onBlur,
462
+ value: this.computedValue,
463
+ tabIndex: this.tabIndex,
464
+ disabled: this.disabled,
465
+ readOnly: this.readOnly,
466
+ color: this.computedColor,
467
+ backgroundColor: this.computedBgColor,
468
+ strokeWidth: this.strokeWidth,
469
+ smooth: this.smooth,
470
+ popupScale: this.$props.popupScale,
471
+ scale: 1 / this.popupScale * this.exportScale,
472
+ onChange: this.onValueChange,
473
+ elementSize: this.elementSize,
474
+ onDraw: this.onDraw,
475
+ onDrawend: this.onDrawEnd
476
+ })]);
497
477
  },
498
478
  methods: {
479
+ setRefs: function setRefs() {
480
+ this.canvas = (0, kendo_vue_common_1.getRef)(this, 'canvas');
481
+ this.minimizeButton = (0, kendo_vue_common_1.getRef)(this, 'minimizeButton');
482
+ this.maximizeButton = (0, kendo_vue_common_1.getRef)(this, 'maximizeButton');
483
+ this.dialog = (0, kendo_vue_common_1.getRef)(this, 'dialog');
484
+ this.popupWidth = this.popupSize().width;
485
+ this.popupHeight = this.popupSize().height;
486
+ },
499
487
  onOverlayClick: function onOverlayClick() {
500
488
  this.currentOpen = false;
501
489
  },
@@ -511,8 +499,25 @@ var SignatureVue2 = {
511
499
  this.onValueChange(e.value);
512
500
  },
513
501
  reset: function reset() {
502
+ this.clear();
514
503
  this.onValueChange();
515
504
  },
505
+ clear: function clear() {
506
+ if (this.canvas) {
507
+ this.canvas.clear();
508
+ }
509
+ if (this.dialog && this.dialog.openCanvas) {
510
+ this.dialog.openCanvas.clear();
511
+ }
512
+ },
513
+ loadImage: function loadImage(value) {
514
+ if (this.canvas) {
515
+ this.canvas.loadImage(value);
516
+ }
517
+ if (this.dialog && this.dialog.openCanvas) {
518
+ this.dialog.openCanvas.loadImage(value);
519
+ }
520
+ },
516
521
  onDialogClose: function onDialogClose(event) {
517
522
  var _a;
518
523
  this.onMinimizeClick(event);
@@ -520,29 +525,18 @@ var SignatureVue2 = {
520
525
  },
521
526
  exportImage: function exportImage(exportSize) {
522
527
  var _a;
523
- return __awaiter(this, void 0, void 0, function () {
524
- var width, height;
525
- return __generator(this, function (_b) {
526
- switch (_b.label) {
527
- case 0:
528
- width = exportSize.width, height = exportSize.height;
529
- return [4 /*yield*/, (_a = this.canvas.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
530
- width: width * this.exportScale,
531
- height: height * this.exportScale
532
- })];
533
- case 1:
534
- return [2 /*return*/, _b.sent()];
535
- }
536
- });
528
+ var width = exportSize.width,
529
+ height = exportSize.height;
530
+ return (_a = this.canvas.instance) === null || _a === void 0 ? void 0 : _a.exportImage({
531
+ width: width * this.exportScale,
532
+ height: height * this.exportScale
537
533
  });
538
534
  },
539
535
  validityGetter: function validityGetter() {
540
536
  var customError = this.$props.validationMessage !== undefined;
541
- var currentValue = this.computedValue; // valueGetter();
537
+ var currentValue = this.computedValue;
542
538
  var valueMissing = !currentValue;
543
- var valid = this.$props.valid !== undefined ? this.$props.valid :
544
- // !requiredGetter() ||
545
- !valueMissing;
539
+ var valid = this.$props.valid !== undefined ? this.$props.valid : !this.required || !valueMissing;
546
540
  return {
547
541
  customError: customError,
548
542
  valid: valid,
@@ -557,14 +551,27 @@ var SignatureVue2 = {
557
551
  element: this.$el,
558
552
  focus: this.focusElement()
559
553
  };
560
- // Object.defineProperty(options, 'name', { get: nameGetter });
561
- // Object.defineProperty(options, 'value', { get: this.computedValue }); //valueGetter
562
- // Object.defineProperty(options, 'validity', { get: validityGetter });
563
- // Object.defineProperty(options, 'validityStyles', { get: validityStylesGetter });
564
- // Object.defineProperty(options, 'required', { get: requiredGetter });
565
- // Object.defineProperty(options, 'props', { get: propsGetter });
566
- // Object.defineProperty(options, 'color', { get: colorGetter });
567
- // Object.defineProperty(options, 'backgroundColor', { get: backgroundColorGetter });
554
+ Object.defineProperty(options, 'name', {
555
+ get: this.name
556
+ });
557
+ Object.defineProperty(options, 'value', {
558
+ get: this.computedValue
559
+ });
560
+ Object.defineProperty(options, 'validity', {
561
+ get: this.validityGetter()
562
+ });
563
+ Object.defineProperty(options, 'validityStyles', {
564
+ get: this.validityStyles
565
+ });
566
+ Object.defineProperty(options, 'required', {
567
+ get: this.required
568
+ });
569
+ Object.defineProperty(options, 'color', {
570
+ get: this.computedColor
571
+ });
572
+ Object.defineProperty(options, 'backgroundColor', {
573
+ get: this.computedBgColor
574
+ });
568
575
  return options;
569
576
  },
570
577
  onFocus: function onFocus(event) {
@@ -588,20 +595,17 @@ var SignatureVue2 = {
588
595
  },
589
596
  onMaximizeClick: function onMaximizeClick(event) {
590
597
  return __awaiter(this, void 0, void 0, function () {
591
- var _a;
592
- return __generator(this, function (_b) {
593
- switch (_b.label) {
594
- case 0:
595
- _a = this;
596
- return [4 /*yield*/, this.exportImage(this.popupSize())];
597
- case 1:
598
- _a.currentValue = _b.sent();
599
- this.currentOpen = true;
600
- this.$emit('open', __assign({
601
- event: event
602
- }, this.getImperativeHandle()));
603
- return [2 /*return*/];
604
- }
598
+ var that;
599
+ return __generator(this, function (_a) {
600
+ that = this;
601
+ this.exportImage(this.popupSize()).then(function (newValue) {
602
+ that.currentValue = newValue;
603
+ });
604
+ this.currentOpen = true;
605
+ this.$emit('open', __assign({
606
+ event: event
607
+ }, this.getImperativeHandle()));
608
+ return [2 /*return*/];
605
609
  });
606
610
  });
607
611
  },
@@ -632,6 +636,12 @@ var SignatureVue2 = {
632
636
  width: width * this.popupScale,
633
637
  height: height * this.popupScale
634
638
  };
639
+ },
640
+ onDraw: function onDraw() {
641
+ this.isDrawing = true;
642
+ },
643
+ onDrawEnd: function onDrawEnd() {
644
+ this.isDrawing = false;
635
645
  }
636
646
  }
637
647
  };
@@ -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,80 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SignatureBottomActionsVue2 = exports.SignatureBottomActions = void 0;
7
+ // @ts-ignore
8
+ var Vue = require("vue");
9
+ var allVue = Vue;
10
+ var gh = allVue.h;
11
+ var isV3 = allVue.version && allVue.version[0] === '3';
12
+ var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
13
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
14
+ /**
15
+ * @hidden
16
+ */
17
+ var SignatureBottomActionsVue2 = {
18
+ name: 'KendoSignatureBottomActions',
19
+ // @ts-ignore
20
+ emits: {
21
+ clear: null
22
+ },
23
+ props: {
24
+ showClear: Boolean,
25
+ size: String,
26
+ title: String
27
+ },
28
+ methods: {
29
+ onClear: function onClear(e) {
30
+ this.$emit('clear', e);
31
+ }
32
+ },
33
+ // @ts-ignore
34
+ setup: !isV3 ? undefined : function () {
35
+ var v3 = !!isV3;
36
+ return {
37
+ v3: v3
38
+ };
39
+ },
40
+ render: function render(createElement) {
41
+ var h = gh || createElement;
42
+ var _a = this.$props,
43
+ showClear = _a.showClear,
44
+ title = _a.title,
45
+ size = _a.size;
46
+ return h("div", {
47
+ "class": 'k-signature-actions k-signature-actions-bottom'
48
+ }, [showClear &&
49
+ // @ts-ignore
50
+ h(kendo_vue_buttons_1.Button, {
51
+ "class": 'k-signature-action k-signature-clear',
52
+ icon: 'x',
53
+ attrs: this.v3 ? undefined : {
54
+ icon: 'x',
55
+ svgIcon: kendo_svg_icons_1.xIcon,
56
+ shape: null,
57
+ fillMode: 'flat',
58
+ size: size,
59
+ "aria-label": title,
60
+ title: title
61
+ },
62
+ svgIcon: kendo_svg_icons_1.xIcon,
63
+ shape: null,
64
+ fillMode: 'flat',
65
+ size: size,
66
+ onClick: this.onClear,
67
+ on: this.v3 ? undefined : {
68
+ "click": this.onClear
69
+ },
70
+ "aria-label": title,
71
+ title: title
72
+ })]);
73
+ }
74
+ };
75
+ exports.SignatureBottomActionsVue2 = SignatureBottomActionsVue2;
76
+ /**
77
+ * @hidden
78
+ */
79
+ var SignatureBottomActions = SignatureBottomActionsVue2;
80
+ exports.SignatureBottomActions = SignatureBottomActions;