@progress/kendo-angular-inputs 9.0.5-dev.202208101035 → 9.1.0-sig.202208261245

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.
@@ -0,0 +1,767 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { __awaiter } from "tslib";
6
+ import { ChangeDetectionStrategy, Component, EventEmitter, forwardRef, HostBinding, Input, Output, ViewChild } from '@angular/core';
7
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
+ import { anyChanged, closest } from '@progress/kendo-angular-common';
9
+ import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
10
+ import { SignaturePad } from '@progress/kendo-inputs-common';
11
+ import { validatePackage } from '@progress/kendo-licensing';
12
+ import { isNone, isPresent, ROUNDED_MAP, SIZE_MAP } from '../common/utils';
13
+ import { packageMetadata } from '../package-metadata';
14
+ import { SignatureCloseEvent, SignatureOpenEvent } from './events';
15
+ import * as i0 from "@angular/core";
16
+ import * as i1 from "@progress/kendo-angular-l10n";
17
+ import * as i2 from "@progress/kendo-angular-dialog";
18
+ import * as i3 from "./localization/localized-signature-messages.directive";
19
+ import * as i4 from "@angular/common";
20
+ import * as i5 from "@progress/kendo-angular-buttons";
21
+ const noop = () => { };
22
+ const FOCUSED_CLASS = 'k-focus';
23
+ const DEFAULT_SIZE = 'medium';
24
+ const DEFAULT_ROUNDED = 'medium';
25
+ const DEFAULT_FILL_MODE = 'solid';
26
+ const DEFAULT_POPUP_SCALE = 3;
27
+ /**
28
+ * Represents the [Kendo UI Signature component for Angular]({% slug overview_signature %}).
29
+ *
30
+ * The Signature allows users to add a hand-drawn signature to forms.
31
+ */
32
+ export class SignatureComponent {
33
+ constructor(element, renderer, ngZone, cd, localization) {
34
+ this.element = element;
35
+ this.renderer = renderer;
36
+ this.ngZone = ngZone;
37
+ this.cd = cd;
38
+ this.localization = localization;
39
+ this.staticHostClasses = true;
40
+ /**
41
+ * Sets the read-only state of the Signature.
42
+ *
43
+ * @default false
44
+ */
45
+ this.readonly = false;
46
+ /**
47
+ * Sets the disabled state of the Signature.
48
+ *
49
+ * @default false
50
+ */
51
+ this.disabled = false;
52
+ /**
53
+ * The size property specifies the padding of the Signature internal controls
54
+ * ([see example]({% slug appearance_signature %}#toc-size)).
55
+ *
56
+ * The possible values are:
57
+ * * `small`
58
+ * * `medium` (default)
59
+ * * `large`
60
+ * * `none`
61
+ */
62
+ this.size = DEFAULT_SIZE;
63
+ /**
64
+ * The rounded property specifies the border radius of the signature
65
+ * ([see example]({% slug appearance_signature %}#toc-rounded)).
66
+ *
67
+ * The possible values are:
68
+ * * `small`
69
+ * * `medium` (default)
70
+ * * `large`
71
+ * * `full`
72
+ * * `none`
73
+ */
74
+ this.rounded = DEFAULT_ROUNDED;
75
+ /**
76
+ * The fillMode property specifies the background and border styles of the signature
77
+ * ([see example]({% slug appearance_signature %}#toc-fillMode)).
78
+ *
79
+ * The possible values are:
80
+ * * `flat`
81
+ * * `solid` (default)
82
+ * * `outline`
83
+ * * `none`
84
+ */
85
+ this.fillMode = DEFAULT_FILL_MODE;
86
+ /**
87
+ * The stroke color of the signature.
88
+ *
89
+ * Accepts CSS color names and hex values.
90
+ *
91
+ * @default '#000000'
92
+ */
93
+ this.color = '#000000';
94
+ /**
95
+ * The background color of the signature.
96
+ *
97
+ * Accepts CSS color names and hex values.
98
+ *
99
+ * @default '#ffffff'
100
+ */
101
+ this.backgroundColor = '#ffffff';
102
+ /**
103
+ * The stroke width of the signature.
104
+ *
105
+ * @default 1
106
+ */
107
+ this.strokeWidth = 1;
108
+ /**
109
+ * A flag indicating whether to smooth out signature lines.
110
+ *
111
+ * @default false
112
+ */
113
+ this.smooth = false;
114
+ /**
115
+ * A flag indicating if the signature can be maximized.
116
+ *
117
+ * @default true
118
+ */
119
+ this.maximizable = true;
120
+ /**
121
+ * @hidden
122
+ */
123
+ this.maximized = false;
124
+ /**
125
+ * The scale factor for the popup.
126
+ *
127
+ * The Signature width and height will be multiplied by the scale when showing the popup.
128
+ *
129
+ * @default 3
130
+ */
131
+ this.popupScale = DEFAULT_POPUP_SCALE;
132
+ /**
133
+ * A flag indicating whether the dotted line should be displayed in the background.
134
+ *
135
+ * @default false
136
+ */
137
+ this.hideLine = false;
138
+ /**
139
+ * Fires each time the signature value is changed.
140
+ */
141
+ this.valueChange = new EventEmitter();
142
+ /**
143
+ * Fires each time the popup is about to open.
144
+ * This event is preventable. If you cancel it, the popup will remain closed.
145
+ */
146
+ this.open = new EventEmitter();
147
+ /**
148
+ * Fires each time the popup is about to close.
149
+ * This event is preventable. If you cancel it, the popup will remain open.
150
+ */
151
+ this.close = new EventEmitter();
152
+ /**
153
+ * Fires each time Signature is focused.
154
+ */
155
+ this.onFocus = new EventEmitter();
156
+ /**
157
+ * Fires each time the Signature is blurred.
158
+ */
159
+ this.onBlur = new EventEmitter();
160
+ /**
161
+ * @hidden
162
+ */
163
+ this.minimize = new EventEmitter();
164
+ /**
165
+ * Indicates whether the Signature wrapper is focused.
166
+ */
167
+ this.isFocused = false;
168
+ /**
169
+ * @hidden
170
+ */
171
+ this.isDrawing = false;
172
+ this.notifyNgTouched = noop;
173
+ this.notifyNgChanged = noop;
174
+ this._tabindex = 0;
175
+ this.hostClasses = [];
176
+ validatePackage(packageMetadata);
177
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
178
+ }
179
+ /**
180
+ * Gets or sets the value of the signature.
181
+ *
182
+ * The value is a Base64-encoded PNG image.
183
+ */
184
+ set value(value) {
185
+ if (value !== this._value) {
186
+ this._value = value;
187
+ if (this.instance) {
188
+ this.instance.loadImage(value);
189
+ }
190
+ }
191
+ }
192
+ get value() {
193
+ return this._value;
194
+ }
195
+ /**
196
+ * Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
197
+ *
198
+ * @default 0
199
+ */
200
+ set tabindex(value) {
201
+ const tabindex = Number(value);
202
+ const defaultValue = 0;
203
+ this._tabindex = !isNaN(tabindex) ? tabindex : defaultValue;
204
+ }
205
+ get tabindex() {
206
+ return !this.disabled ? this._tabindex : undefined;
207
+ }
208
+ /**
209
+ * @hidden
210
+ */
211
+ get isEmpty() {
212
+ return !this.value;
213
+ }
214
+ /**
215
+ * @hidden
216
+ */
217
+ get clearTitle() {
218
+ return this.getMessage('clear');
219
+ }
220
+ /**
221
+ * @hidden
222
+ */
223
+ get minimizeTitle() {
224
+ return this.getMessage('minimize');
225
+ }
226
+ /**
227
+ * @hidden
228
+ */
229
+ get maximizeTitle() {
230
+ return this.getMessage('maximize');
231
+ }
232
+ /**
233
+ * @hidden
234
+ */
235
+ get popupWidth() {
236
+ const baseWidth = this.width || this.element.nativeElement.offsetWidth;
237
+ return baseWidth * this.popupScale;
238
+ }
239
+ /**
240
+ * @hidden
241
+ */
242
+ get popupHeight() {
243
+ const baseHeight = this.height || this.element.nativeElement.offsetHeight;
244
+ return baseHeight * this.popupScale;
245
+ }
246
+ /**
247
+ * @hidden
248
+ */
249
+ get showMaximize() {
250
+ return !(this.maximized || this.isDrawing || !this.maximizable);
251
+ }
252
+ /**
253
+ * @hidden
254
+ */
255
+ get showMinimize() {
256
+ return this.maximized && !this.isDrawing;
257
+ }
258
+ /**
259
+ * @hidden
260
+ */
261
+ get showClear() {
262
+ return !(this.isEmpty || this.isDrawing || this.readonly);
263
+ }
264
+ get focused() {
265
+ return this.isFocused;
266
+ }
267
+ set focused(value) {
268
+ if (this.isFocused !== value && this.element) {
269
+ const wrap = this.element.nativeElement;
270
+ if (value && !this.maximized) {
271
+ this.renderer.addClass(wrap, FOCUSED_CLASS);
272
+ }
273
+ else {
274
+ this.renderer.removeClass(wrap, FOCUSED_CLASS);
275
+ }
276
+ this.isFocused = value;
277
+ }
278
+ }
279
+ get options() {
280
+ return {
281
+ scale: this.maximized ? this.popupScale : 1,
282
+ color: this.color,
283
+ backgroundColor: this.backgroundColor,
284
+ strokeWidth: this.strokeWidth,
285
+ smooth: this.smooth,
286
+ readonly: this.readonly
287
+ };
288
+ }
289
+ ngOnInit() {
290
+ this.subscriptions = this.localization
291
+ .changes
292
+ .subscribe(({ rtl }) => {
293
+ this.direction = rtl ? 'rtl' : 'ltr';
294
+ });
295
+ }
296
+ ngAfterViewInit() {
297
+ this.applyHostClasses();
298
+ this.ngZone.runOutsideAngular(() => {
299
+ const element = this.canvas.nativeElement;
300
+ this.instance = new SignaturePad(element, Object.assign(Object.assign({}, this.options), { onChange: () => this.onValueChange(), onDraw: () => this.onDraw(), onDrawEnd: () => this.onDrawEnd() }));
301
+ if (this.value) {
302
+ this.instance.loadImage(this.value);
303
+ }
304
+ this.addEventListeners();
305
+ });
306
+ }
307
+ ngOnChanges(changes) {
308
+ if (anyChanged(['readonly', 'color', 'backgroundColor', 'strokeWidth', 'smooth'], changes, true)) {
309
+ this.instance.setOptions(this.options);
310
+ }
311
+ this.applyHostClasses();
312
+ }
313
+ ngOnDestroy() {
314
+ if (this.instance) {
315
+ this.instance.destroy();
316
+ this.instance = null;
317
+ }
318
+ if (this.subscriptions) {
319
+ this.subscriptions.unsubscribe();
320
+ this.subscriptions = null;
321
+ }
322
+ if (this.unsubscribe) {
323
+ this.unsubscribe();
324
+ this.unsubscribe = null;
325
+ }
326
+ }
327
+ /**
328
+ * @hidden
329
+ */
330
+ onClear() {
331
+ this.reset();
332
+ this.valueChange.emit(undefined);
333
+ }
334
+ /**
335
+ * @hidden
336
+ */
337
+ onValueChange() {
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ const value = yield this.instance.exportImage();
340
+ this.ngZone.run(() => {
341
+ this._value = value;
342
+ this.valueChange.emit(value);
343
+ this.notifyNgChanged(value);
344
+ });
345
+ });
346
+ }
347
+ /**
348
+ * @hidden
349
+ */
350
+ onDialogValueChange(value) {
351
+ this.value = value;
352
+ this.valueChange.emit(value);
353
+ this.notifyNgChanged(value);
354
+ }
355
+ /**
356
+ * @hidden
357
+ */
358
+ onDialogClose() {
359
+ const args = new SignatureCloseEvent();
360
+ this.close.next(args);
361
+ if (!args.isDefaultPrevented()) {
362
+ this.isOpen = false;
363
+ }
364
+ }
365
+ /**
366
+ * Clears the value of the Signature.
367
+ */
368
+ reset() {
369
+ var _a;
370
+ if (!isPresent(this.value)) {
371
+ return;
372
+ }
373
+ (_a = this.instance) === null || _a === void 0 ? void 0 : _a.clear();
374
+ this.value = this._value = undefined;
375
+ this.notifyNgChanged(undefined);
376
+ }
377
+ /**
378
+ * Toggles the popup of the Signature.
379
+ * Does not trigger the `open` and `close` events of the component.
380
+ *
381
+ * @param open An optional parameter. Specifies whether the popup will be opened or closed.
382
+ */
383
+ toggle(open) {
384
+ if (this.disabled || this.readonly) {
385
+ return;
386
+ }
387
+ open = isPresent(open) ? open : !this.isOpen;
388
+ this.isOpen = open;
389
+ }
390
+ /**
391
+ * @hidden
392
+ */
393
+ onMaximize() {
394
+ const args = new SignatureOpenEvent();
395
+ this.open.next(args);
396
+ if (!args.isDefaultPrevented()) {
397
+ this.isOpen = true;
398
+ }
399
+ }
400
+ /**
401
+ * @hidden
402
+ */
403
+ onMinimize() {
404
+ this.minimize.next();
405
+ }
406
+ applyHostClasses() {
407
+ const classList = this.element.nativeElement.classList;
408
+ this.hostClasses.forEach(([name]) => classList.remove(name));
409
+ this.hostClasses = [
410
+ [`k-signature-${SIZE_MAP[this.size || DEFAULT_SIZE]}`, !isNone(this.size)],
411
+ [`k-signature-${this.fillMode || DEFAULT_FILL_MODE}`, !isNone(this.fillMode)],
412
+ [`k-rounded-${ROUNDED_MAP[this.rounded || DEFAULT_ROUNDED]}`, !isNone(this.rounded)]
413
+ ];
414
+ this.hostClasses.forEach(([name, enabled]) => classList.toggle(name, enabled));
415
+ }
416
+ /**
417
+ * Focuses the wrapper of the Signature.
418
+ */
419
+ focus() {
420
+ this.focused = true;
421
+ this.element.nativeElement.focus();
422
+ }
423
+ /**
424
+ * @hidden
425
+ */
426
+ onWrapperFocus() {
427
+ if (this.focused) {
428
+ return;
429
+ }
430
+ this.ngZone.run(() => {
431
+ this.focus();
432
+ this.onFocus.emit();
433
+ });
434
+ }
435
+ /**
436
+ * Blurs the Signature.
437
+ */
438
+ blur() {
439
+ this.focused = false;
440
+ this.element.nativeElement.blur();
441
+ this.notifyNgTouched();
442
+ }
443
+ /**
444
+ * @hidden
445
+ */
446
+ onWrapperBlur() {
447
+ if (this.isOpen) {
448
+ return;
449
+ }
450
+ this.ngZone.run(() => {
451
+ this.onBlur.emit();
452
+ this.focused = false;
453
+ this.notifyNgTouched();
454
+ });
455
+ }
456
+ /**
457
+ * @hidden
458
+ */
459
+ onWrapperClick(_event) {
460
+ if (this.disabled) {
461
+ return;
462
+ }
463
+ this.focus();
464
+ }
465
+ /**
466
+ * @hidden
467
+ */
468
+ writeValue(value) {
469
+ this.value = value;
470
+ }
471
+ /**
472
+ * @hidden
473
+ */
474
+ registerOnChange(fn) {
475
+ this.notifyNgChanged = fn;
476
+ }
477
+ /**
478
+ * @hidden
479
+ */
480
+ registerOnTouched(fn) {
481
+ this.notifyNgTouched = fn;
482
+ }
483
+ onDraw() {
484
+ this.isDrawing = true;
485
+ this.cd.detectChanges();
486
+ }
487
+ onDrawEnd() {
488
+ this.isDrawing = false;
489
+ this.cd.detectChanges();
490
+ }
491
+ addEventListeners() {
492
+ const element = this.element.nativeElement;
493
+ const focusIn = this.renderer.listen(element, 'focusin', () => this.onWrapperFocus());
494
+ const focusOut = this.renderer.listen(element, 'focusout', (e) => {
495
+ const insideWrapper = closest(e.relatedTarget, element => element === this.element.nativeElement);
496
+ if (!insideWrapper) {
497
+ this.onWrapperBlur();
498
+ }
499
+ });
500
+ const click = this.renderer.listen(element, 'click', () => {
501
+ this.ngZone.run((e) => {
502
+ this.onWrapperClick(e);
503
+ });
504
+ });
505
+ this.unsubscribe = () => {
506
+ focusIn();
507
+ focusOut();
508
+ click();
509
+ };
510
+ }
511
+ getMessage(key) {
512
+ if (this.maximized && this.parentLocalization) {
513
+ return this.parentLocalization.get(key);
514
+ }
515
+ return this.localization.get(key);
516
+ }
517
+ }
518
+ SignatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignatureComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
519
+ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SignatureComponent, selector: "kendo-signature", inputs: { readonly: "readonly", disabled: "disabled", width: "width", height: "height", value: "value", tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", color: "color", backgroundColor: "backgroundColor", strokeWidth: "strokeWidth", smooth: "smooth", maximizable: "maximizable", maximized: "maximized", popupScale: "popupScale", parentLocalization: "parentLocalization", hideLine: "hideLine" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur", minimize: "minimize" }, host: { properties: { "class.k-signature": "this.staticHostClasses", "class.k-input": "this.staticHostClasses", "attr.dir": "this.direction", "class.k-readonly": "this.readonly", "class.k-disabled": "this.disabled", "style.width.px": "this.width", "style.height.px": "this.height" } }, providers: [
520
+ LocalizationService,
521
+ { provide: L10N_PREFIX, useValue: 'kendo.signature' },
522
+ { multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SignatureComponent) }
523
+ ], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], exportAs: ["kendoSignature"], usesOnChanges: true, ngImport: i0, template: `
524
+ <ng-container kendoSignatureLocalizedMessages
525
+ i18n-clear="kendo.signature.clear|The message for the Clear button."
526
+ clear="Clear"
527
+ i18n-maximize="kendo.signature.maximize|The message for the Maximize button."
528
+ maximize="Maximize"
529
+ i18n-minimize="kendo.signature.minimize|The message for the Minimize button."
530
+ minimize="Minimize">
531
+ </ng-container>
532
+
533
+ <div class="k-signature-actions k-signature-actions-top">
534
+ <button
535
+ *ngIf="showMaximize"
536
+ kendoButton
537
+ class="k-signature-action k-signature-maximize"
538
+ icon="hyperlink-open"
539
+ fillMode="flat"
540
+ (click)="onMaximize()"
541
+ [attr.aria-label]="maximizeTitle"
542
+ [title]="maximizeTitle">
543
+ </button>
544
+ <button
545
+ *ngIf="showMinimize"
546
+ kendoButton
547
+ class="k-signature-action k-signature-minimize"
548
+ icon="window-minimize"
549
+ fillMode="flat"
550
+ (click)="onMinimize()"
551
+ [attr.aria-label]="minimizeTitle"
552
+ [title]="minimizeTitle">
553
+ </button>
554
+ </div>
555
+ <div
556
+ #canvas
557
+ class="k-signature-canvas"
558
+ [attr.tabindex]="tabindex"
559
+ ></div>
560
+ <div
561
+ *ngIf="!hideLine"
562
+ class="k-signature-line"
563
+ style="z-index: 2; pointer-events: none;"
564
+ ></div>
565
+ <div class="k-signature-actions k-signature-actions-bottom">
566
+ <button
567
+ *ngIf="showClear"
568
+ kendoButton
569
+ class="k-signature-action k-signature-clear"
570
+ icon="close"
571
+ fillMode="flat"
572
+ [attr.aria-label]="clearTitle"
573
+ [title]="clearTitle"
574
+ (click)="onClear()" >
575
+ </button>
576
+ </div>
577
+
578
+ <kendo-dialog *ngIf="isOpen">
579
+ <kendo-signature
580
+ [readonly]="readonly"
581
+ [disabled]="disabled"
582
+ [size]="size"
583
+ [rounded]="rounded"
584
+ [fillMode]="fillMode"
585
+ [color]="color"
586
+ [backgroundColor]="backgroundColor"
587
+ [strokeWidth]="strokeWidth"
588
+ [smooth]="smooth"
589
+ [value]="value"
590
+ (valueChange)="onDialogValueChange($event)"
591
+ [hideLine]="hideLine"
592
+ [class.k-signature-maximized]="true"
593
+ [maximized]="true"
594
+ (minimize)="onDialogClose()"
595
+ [width]="popupWidth"
596
+ [height]="popupHeight"
597
+ [popupScale]="popupScale"
598
+ [parentLocalization]="localization">
599
+ </kendo-signature>
600
+ </kendo-dialog>
601
+ `, isInline: true, components: [{ type: i2.DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { type: SignatureComponent, selector: "kendo-signature", inputs: ["readonly", "disabled", "width", "height", "value", "tabindex", "size", "rounded", "fillMode", "color", "backgroundColor", "strokeWidth", "smooth", "maximizable", "maximized", "popupScale", "parentLocalization", "hideLine"], outputs: ["valueChange", "open", "close", "focus", "blur", "minimize"], exportAs: ["kendoSignature"] }], directives: [{ type: i3.LocalizedSignatureMessagesDirective, selector: "[kendoSignatureLocalizedMessages]" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignatureComponent, decorators: [{
603
+ type: Component,
604
+ args: [{
605
+ exportAs: 'kendoSignature',
606
+ selector: 'kendo-signature',
607
+ changeDetection: ChangeDetectionStrategy.OnPush,
608
+ providers: [
609
+ LocalizationService,
610
+ { provide: L10N_PREFIX, useValue: 'kendo.signature' },
611
+ { multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SignatureComponent) }
612
+ ],
613
+ template: `
614
+ <ng-container kendoSignatureLocalizedMessages
615
+ i18n-clear="kendo.signature.clear|The message for the Clear button."
616
+ clear="Clear"
617
+ i18n-maximize="kendo.signature.maximize|The message for the Maximize button."
618
+ maximize="Maximize"
619
+ i18n-minimize="kendo.signature.minimize|The message for the Minimize button."
620
+ minimize="Minimize">
621
+ </ng-container>
622
+
623
+ <div class="k-signature-actions k-signature-actions-top">
624
+ <button
625
+ *ngIf="showMaximize"
626
+ kendoButton
627
+ class="k-signature-action k-signature-maximize"
628
+ icon="hyperlink-open"
629
+ fillMode="flat"
630
+ (click)="onMaximize()"
631
+ [attr.aria-label]="maximizeTitle"
632
+ [title]="maximizeTitle">
633
+ </button>
634
+ <button
635
+ *ngIf="showMinimize"
636
+ kendoButton
637
+ class="k-signature-action k-signature-minimize"
638
+ icon="window-minimize"
639
+ fillMode="flat"
640
+ (click)="onMinimize()"
641
+ [attr.aria-label]="minimizeTitle"
642
+ [title]="minimizeTitle">
643
+ </button>
644
+ </div>
645
+ <div
646
+ #canvas
647
+ class="k-signature-canvas"
648
+ [attr.tabindex]="tabindex"
649
+ ></div>
650
+ <div
651
+ *ngIf="!hideLine"
652
+ class="k-signature-line"
653
+ style="z-index: 2; pointer-events: none;"
654
+ ></div>
655
+ <div class="k-signature-actions k-signature-actions-bottom">
656
+ <button
657
+ *ngIf="showClear"
658
+ kendoButton
659
+ class="k-signature-action k-signature-clear"
660
+ icon="close"
661
+ fillMode="flat"
662
+ [attr.aria-label]="clearTitle"
663
+ [title]="clearTitle"
664
+ (click)="onClear()" >
665
+ </button>
666
+ </div>
667
+
668
+ <kendo-dialog *ngIf="isOpen">
669
+ <kendo-signature
670
+ [readonly]="readonly"
671
+ [disabled]="disabled"
672
+ [size]="size"
673
+ [rounded]="rounded"
674
+ [fillMode]="fillMode"
675
+ [color]="color"
676
+ [backgroundColor]="backgroundColor"
677
+ [strokeWidth]="strokeWidth"
678
+ [smooth]="smooth"
679
+ [value]="value"
680
+ (valueChange)="onDialogValueChange($event)"
681
+ [hideLine]="hideLine"
682
+ [class.k-signature-maximized]="true"
683
+ [maximized]="true"
684
+ (minimize)="onDialogClose()"
685
+ [width]="popupWidth"
686
+ [height]="popupHeight"
687
+ [popupScale]="popupScale"
688
+ [parentLocalization]="localization">
689
+ </kendo-signature>
690
+ </kendo-dialog>
691
+ `
692
+ }]
693
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }]; }, propDecorators: { staticHostClasses: [{
694
+ type: HostBinding,
695
+ args: ['class.k-signature']
696
+ }, {
697
+ type: HostBinding,
698
+ args: ['class.k-input']
699
+ }], direction: [{
700
+ type: HostBinding,
701
+ args: ['attr.dir']
702
+ }], readonly: [{
703
+ type: HostBinding,
704
+ args: ['class.k-readonly']
705
+ }, {
706
+ type: Input
707
+ }], disabled: [{
708
+ type: HostBinding,
709
+ args: ['class.k-disabled']
710
+ }, {
711
+ type: Input
712
+ }], width: [{
713
+ type: Input
714
+ }, {
715
+ type: HostBinding,
716
+ args: ['style.width.px']
717
+ }], height: [{
718
+ type: Input
719
+ }, {
720
+ type: HostBinding,
721
+ args: ['style.height.px']
722
+ }], value: [{
723
+ type: Input
724
+ }], tabindex: [{
725
+ type: Input
726
+ }], size: [{
727
+ type: Input
728
+ }], rounded: [{
729
+ type: Input
730
+ }], fillMode: [{
731
+ type: Input
732
+ }], color: [{
733
+ type: Input
734
+ }], backgroundColor: [{
735
+ type: Input
736
+ }], strokeWidth: [{
737
+ type: Input
738
+ }], smooth: [{
739
+ type: Input
740
+ }], maximizable: [{
741
+ type: Input
742
+ }], maximized: [{
743
+ type: Input
744
+ }], popupScale: [{
745
+ type: Input
746
+ }], parentLocalization: [{
747
+ type: Input
748
+ }], hideLine: [{
749
+ type: Input
750
+ }], valueChange: [{
751
+ type: Output
752
+ }], open: [{
753
+ type: Output
754
+ }], close: [{
755
+ type: Output
756
+ }], onFocus: [{
757
+ type: Output,
758
+ args: ['focus']
759
+ }], onBlur: [{
760
+ type: Output,
761
+ args: ['blur']
762
+ }], minimize: [{
763
+ type: Output
764
+ }], canvas: [{
765
+ type: ViewChild,
766
+ args: ['canvas']
767
+ }] } });