@progress/kendo-angular-inputs 13.2.1-develop.11 → 13.2.1-develop.13

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 (289) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +654 -0
  3. package/README.md +184 -0
  4. package/checkbox/checkbox.directive.d.ts +52 -0
  5. package/checkbox.module.d.ts +43 -0
  6. package/colorpicker/color-contrast-svg.component.d.ts +29 -0
  7. package/colorpicker/color-gradient-numeric-label.directive.d.ts +20 -0
  8. package/colorpicker/color-gradient.component.d.ts +281 -0
  9. package/colorpicker/color-input.component.d.ts +95 -0
  10. package/colorpicker/color-palette.component.d.ts +221 -0
  11. package/colorpicker/colorpicker.component.d.ts +383 -0
  12. package/colorpicker/constants.d.ts +41 -0
  13. package/colorpicker/contrast-validation.component.d.ts +24 -0
  14. package/colorpicker/contrast.component.d.ts +25 -0
  15. package/colorpicker/events/active-color-click-event.d.ts +53 -0
  16. package/colorpicker/events/cancel-event.d.ts +15 -0
  17. package/colorpicker/events/close-event.d.ts +10 -0
  18. package/colorpicker/events/kendo-drag-event.d.ts +21 -0
  19. package/colorpicker/events/open-event.d.ts +10 -0
  20. package/colorpicker/events.d.ts +8 -0
  21. package/colorpicker/flatcolorpicker-actions.component.d.ts +24 -0
  22. package/colorpicker/flatcolorpicker-header.component.d.ts +43 -0
  23. package/colorpicker/flatcolorpicker.component.d.ts +267 -0
  24. package/colorpicker/focus-on-dom-ready.directive.d.ts +18 -0
  25. package/colorpicker/localization/colorgradient-localization.service.d.ts +17 -0
  26. package/colorpicker/localization/colorpalette-localization.service.d.ts +17 -0
  27. package/colorpicker/localization/colorpicker-localization.service.d.ts +14 -0
  28. package/colorpicker/localization/custom-messages.component.d.ts +17 -0
  29. package/colorpicker/localization/flatcolorpicker-localization.service.d.ts +17 -0
  30. package/colorpicker/localization/localized-colorpicker-messages.directive.d.ts +16 -0
  31. package/colorpicker/localization/messages.d.ts +121 -0
  32. package/colorpicker/models/actions-layout.d.ts +8 -0
  33. package/colorpicker/models/colorpicker-view.d.ts +8 -0
  34. package/colorpicker/models/gradient-settings.d.ts +35 -0
  35. package/colorpicker/models/hsva.d.ts +13 -0
  36. package/colorpicker/models/output-format.d.ts +8 -0
  37. package/colorpicker/models/palette-presets.d.ts +61 -0
  38. package/colorpicker/models/palette-settings.d.ts +33 -0
  39. package/colorpicker/models/popup-settings.d.ts +18 -0
  40. package/colorpicker/models/rgb.d.ts +12 -0
  41. package/colorpicker/models/rgba.d.ts +13 -0
  42. package/colorpicker/models/table-cell.d.ts +11 -0
  43. package/colorpicker/models/tile-size.d.ts +11 -0
  44. package/colorpicker/models.d.ts +16 -0
  45. package/colorpicker/services/color-palette.service.d.ts +19 -0
  46. package/colorpicker/services/flatcolorpicker.service.d.ts +15 -0
  47. package/colorpicker/utils/color-parser.d.ts +77 -0
  48. package/colorpicker/utils/contrast-curve.d.ts +37 -0
  49. package/colorpicker/utils.d.ts +6 -0
  50. package/colorpicker.module.d.ts +35 -0
  51. package/common/dom-utils.d.ts +25 -0
  52. package/common/math.d.ts +36 -0
  53. package/common/models/fillmode.d.ts +9 -0
  54. package/common/models/rounded.d.ts +14 -0
  55. package/common/models/size.d.ts +9 -0
  56. package/common/models/styling-classes.d.ts +11 -0
  57. package/common/models.d.ts +8 -0
  58. package/common/utils.d.ts +56 -0
  59. package/esm2020/checkbox/checkbox.directive.mjs +94 -0
  60. package/esm2020/checkbox.module.mjs +52 -0
  61. package/esm2020/colorpicker/color-contrast-svg.component.mjs +97 -0
  62. package/esm2020/colorpicker/color-gradient-numeric-label.directive.mjs +31 -0
  63. package/esm2020/colorpicker/color-gradient.component.mjs +1003 -0
  64. package/esm2020/colorpicker/color-input.component.mjs +433 -0
  65. package/esm2020/colorpicker/color-palette.component.mjs +553 -0
  66. package/esm2020/colorpicker/colorpicker.component.mjs +1086 -0
  67. package/esm2020/colorpicker/constants.mjs +40 -0
  68. package/esm2020/colorpicker/contrast-validation.component.mjs +72 -0
  69. package/esm2020/colorpicker/contrast.component.mjs +100 -0
  70. package/esm2020/colorpicker/events/active-color-click-event.mjs +58 -0
  71. package/esm2020/colorpicker/events/cancel-event.mjs +14 -0
  72. package/esm2020/colorpicker/events/close-event.mjs +10 -0
  73. package/esm2020/colorpicker/events/kendo-drag-event.mjs +5 -0
  74. package/esm2020/colorpicker/events/open-event.mjs +10 -0
  75. package/esm2020/colorpicker/events.mjs +8 -0
  76. package/esm2020/colorpicker/flatcolorpicker-actions.component.mjs +93 -0
  77. package/esm2020/colorpicker/flatcolorpicker-header.component.mjs +217 -0
  78. package/esm2020/colorpicker/flatcolorpicker.component.mjs +829 -0
  79. package/esm2020/colorpicker/focus-on-dom-ready.directive.mjs +29 -0
  80. package/esm2020/colorpicker/localization/colorgradient-localization.service.mjs +45 -0
  81. package/esm2020/colorpicker/localization/colorpalette-localization.service.mjs +45 -0
  82. package/esm2020/colorpicker/localization/colorpicker-localization.service.mjs +31 -0
  83. package/esm2020/colorpicker/localization/custom-messages.component.mjs +41 -0
  84. package/esm2020/colorpicker/localization/flatcolorpicker-localization.service.mjs +45 -0
  85. package/esm2020/colorpicker/localization/localized-colorpicker-messages.directive.mjs +37 -0
  86. package/esm2020/colorpicker/localization/messages.mjs +75 -0
  87. package/esm2020/colorpicker/models/actions-layout.mjs +5 -0
  88. package/esm2020/colorpicker/models/colorpicker-view.mjs +5 -0
  89. package/esm2020/colorpicker/models/gradient-settings.mjs +5 -0
  90. package/esm2020/colorpicker/models/hsva.mjs +5 -0
  91. package/esm2020/colorpicker/models/output-format.mjs +5 -0
  92. package/esm2020/colorpicker/models/palette-presets.mjs +62 -0
  93. package/esm2020/colorpicker/models/palette-settings.mjs +5 -0
  94. package/esm2020/colorpicker/models/popup-settings.mjs +5 -0
  95. package/esm2020/colorpicker/models/rgb.mjs +5 -0
  96. package/esm2020/colorpicker/models/rgba.mjs +5 -0
  97. package/esm2020/colorpicker/models/table-cell.mjs +5 -0
  98. package/esm2020/colorpicker/models/tile-size.mjs +6 -0
  99. package/esm2020/colorpicker/models.mjs +16 -0
  100. package/esm2020/colorpicker/services/color-palette.service.mjs +67 -0
  101. package/esm2020/colorpicker/services/flatcolorpicker.service.mjs +39 -0
  102. package/esm2020/colorpicker/utils/color-parser.mjs +164 -0
  103. package/esm2020/colorpicker/utils/contrast-curve.mjs +85 -0
  104. package/esm2020/colorpicker/utils.mjs +6 -0
  105. package/esm2020/colorpicker.module.mjs +104 -0
  106. package/esm2020/common/dom-utils.mjs +36 -0
  107. package/esm2020/common/math.mjs +65 -0
  108. package/esm2020/common/models/fillmode.mjs +5 -0
  109. package/esm2020/common/models/rounded.mjs +5 -0
  110. package/esm2020/common/models/size.mjs +5 -0
  111. package/esm2020/common/models/styling-classes.mjs +5 -0
  112. package/esm2020/common/models.mjs +8 -0
  113. package/esm2020/common/utils.mjs +81 -0
  114. package/esm2020/formfield/error.component.mjs +68 -0
  115. package/esm2020/formfield/formfield.component.mjs +284 -0
  116. package/esm2020/formfield/hint.component.mjs +63 -0
  117. package/esm2020/formfield/models/message-align.mjs +5 -0
  118. package/esm2020/formfield/models/orientation.mjs +5 -0
  119. package/esm2020/formfield/models/show-options.mjs +5 -0
  120. package/esm2020/formfield.module.mjs +54 -0
  121. package/esm2020/index.mjs +66 -0
  122. package/esm2020/inputs.module.mjs +98 -0
  123. package/esm2020/maskedtextbox/maskedtextbox.component.mjs +711 -0
  124. package/esm2020/maskedtextbox/masking.service.mjs +191 -0
  125. package/esm2020/maskedtextbox/parsing/combinators.mjs +28 -0
  126. package/esm2020/maskedtextbox/parsing/parsers.mjs +147 -0
  127. package/esm2020/maskedtextbox/parsing/result.mjs +41 -0
  128. package/esm2020/maskedtextbox/parsing/stream.mjs +41 -0
  129. package/esm2020/maskedtextbox.module.mjs +53 -0
  130. package/esm2020/numerictextbox/arrow-direction.mjs +13 -0
  131. package/esm2020/numerictextbox/constants.mjs +28 -0
  132. package/esm2020/numerictextbox/localization/custom-messages.component.mjs +41 -0
  133. package/esm2020/numerictextbox/localization/localized-numerictextbox-messages.directive.mjs +37 -0
  134. package/esm2020/numerictextbox/localization/messages.mjs +25 -0
  135. package/esm2020/numerictextbox/numerictextbox.component.mjs +1105 -0
  136. package/esm2020/numerictextbox/utils.mjs +92 -0
  137. package/esm2020/numerictextbox.module.mjs +66 -0
  138. package/esm2020/package-metadata.mjs +15 -0
  139. package/esm2020/progress-kendo-angular-inputs.mjs +8 -0
  140. package/esm2020/radiobutton/radiobutton.directive.mjs +76 -0
  141. package/esm2020/radiobutton.module.mjs +52 -0
  142. package/esm2020/rangeslider/localization/custom-messages.component.mjs +41 -0
  143. package/esm2020/rangeslider/localization/localized-rangeslider-messages.directive.mjs +37 -0
  144. package/esm2020/rangeslider/localization/messages.mjs +25 -0
  145. package/esm2020/rangeslider/rangeslider-model.mjs +52 -0
  146. package/esm2020/rangeslider/rangeslider-value.type.mjs +5 -0
  147. package/esm2020/rangeslider/rangeslider.component.mjs +605 -0
  148. package/esm2020/rangeslider.module.mjs +71 -0
  149. package/esm2020/shared/input-separator.component.mjs +41 -0
  150. package/esm2020/shared/textarea.directive.mjs +260 -0
  151. package/esm2020/shared/utils.mjs +13 -0
  152. package/esm2020/shared.module.mjs +32 -0
  153. package/esm2020/signature/events/close-event.mjs +10 -0
  154. package/esm2020/signature/events/index.mjs +6 -0
  155. package/esm2020/signature/events/open-event.mjs +10 -0
  156. package/esm2020/signature/localization/custom-messages.component.mjs +41 -0
  157. package/esm2020/signature/localization/index.mjs +7 -0
  158. package/esm2020/signature/localization/localized-signature-messages.directive.mjs +37 -0
  159. package/esm2020/signature/localization/messages.mjs +29 -0
  160. package/esm2020/signature/signature.component.mjs +906 -0
  161. package/esm2020/signature.module.mjs +79 -0
  162. package/esm2020/slider/localization/custom-messages.component.mjs +41 -0
  163. package/esm2020/slider/localization/localized-slider-messages.directive.mjs +37 -0
  164. package/esm2020/slider/localization/messages.mjs +27 -0
  165. package/esm2020/slider/slider-model.mjs +34 -0
  166. package/esm2020/slider/slider.component.mjs +646 -0
  167. package/esm2020/slider.module.mjs +73 -0
  168. package/esm2020/sliders-common/label-template.directive.mjs +45 -0
  169. package/esm2020/sliders-common/slider-base.mjs +255 -0
  170. package/esm2020/sliders-common/slider-model.base.mjs +93 -0
  171. package/esm2020/sliders-common/slider-ticks.component.mjs +125 -0
  172. package/esm2020/sliders-common/sliders-common.module.mjs +42 -0
  173. package/esm2020/sliders-common/sliders-util.mjs +219 -0
  174. package/esm2020/sliders-common/title-callback.mjs +5 -0
  175. package/esm2020/switch/events/blur-event.mjs +9 -0
  176. package/esm2020/switch/events/focus-event.mjs +9 -0
  177. package/esm2020/switch/localization/custom-messages.component.mjs +41 -0
  178. package/esm2020/switch/localization/localized-switch-messages.directive.mjs +37 -0
  179. package/esm2020/switch/localization/messages.mjs +25 -0
  180. package/esm2020/switch/switch.component.mjs +577 -0
  181. package/esm2020/switch.module.mjs +68 -0
  182. package/esm2020/text-fields-common/text-fields-base.mjs +128 -0
  183. package/esm2020/textarea/models/flow.mjs +5 -0
  184. package/esm2020/textarea/models/resize.mjs +5 -0
  185. package/esm2020/textarea/textarea-suffix.component.mjs +40 -0
  186. package/esm2020/textarea/textarea.component.mjs +604 -0
  187. package/esm2020/textarea.module.mjs +68 -0
  188. package/esm2020/textbox/localization/custom-messages.component.mjs +41 -0
  189. package/esm2020/textbox/localization/localized-textbox-messages.directive.mjs +37 -0
  190. package/esm2020/textbox/localization/messages.mjs +23 -0
  191. package/esm2020/textbox/models/icon-show-options.mjs +5 -0
  192. package/esm2020/textbox/textbox-prefix.directive.mjs +38 -0
  193. package/esm2020/textbox/textbox-suffix.directive.mjs +37 -0
  194. package/esm2020/textbox/textbox.component.mjs +849 -0
  195. package/esm2020/textbox/textbox.directive.mjs +121 -0
  196. package/esm2020/textbox.module.mjs +89 -0
  197. package/esm2020/validators/max.validator.mjs +21 -0
  198. package/esm2020/validators/min.validator.mjs +21 -0
  199. package/fesm2015/progress-kendo-angular-inputs.mjs +15090 -0
  200. package/fesm2020/progress-kendo-angular-inputs.mjs +15055 -0
  201. package/formfield/error.component.d.ts +31 -0
  202. package/formfield/formfield.component.d.ts +98 -0
  203. package/formfield/hint.component.d.ts +29 -0
  204. package/formfield/models/message-align.d.ts +8 -0
  205. package/formfield/models/orientation.d.ts +9 -0
  206. package/formfield/models/show-options.d.ts +16 -0
  207. package/formfield.module.d.ts +45 -0
  208. package/index.d.ts +76 -0
  209. package/inputs.module.d.ts +55 -0
  210. package/maskedtextbox/maskedtextbox.component.d.ts +315 -0
  211. package/maskedtextbox/masking.service.d.ts +48 -0
  212. package/maskedtextbox/parsing/combinators.d.ts +13 -0
  213. package/maskedtextbox/parsing/parsers.d.ts +51 -0
  214. package/maskedtextbox/parsing/result.d.ts +27 -0
  215. package/maskedtextbox/parsing/stream.d.ts +26 -0
  216. package/maskedtextbox.module.d.ts +44 -0
  217. package/numerictextbox/arrow-direction.d.ts +12 -0
  218. package/numerictextbox/constants.d.ts +28 -0
  219. package/numerictextbox/localization/custom-messages.component.d.ts +17 -0
  220. package/numerictextbox/localization/localized-numerictextbox-messages.directive.d.ts +16 -0
  221. package/numerictextbox/localization/messages.d.ts +21 -0
  222. package/numerictextbox/numerictextbox.component.d.ts +364 -0
  223. package/numerictextbox/utils.d.ts +44 -0
  224. package/numerictextbox.module.d.ts +47 -0
  225. package/package-metadata.d.ts +9 -0
  226. package/package.json +74 -0
  227. package/progress-kendo-angular-inputs.d.ts +9 -0
  228. package/radiobutton/radiobutton.directive.d.ts +38 -0
  229. package/radiobutton.module.d.ts +43 -0
  230. package/rangeslider/localization/custom-messages.component.d.ts +17 -0
  231. package/rangeslider/localization/localized-rangeslider-messages.directive.d.ts +16 -0
  232. package/rangeslider/localization/messages.d.ts +21 -0
  233. package/rangeslider/rangeslider-model.d.ts +15 -0
  234. package/rangeslider/rangeslider-value.type.d.ts +9 -0
  235. package/rangeslider/rangeslider.component.d.ts +139 -0
  236. package/rangeslider.module.d.ts +48 -0
  237. package/schematics/collection.json +12 -0
  238. package/schematics/ngAdd/index.js +11 -0
  239. package/schematics/ngAdd/schema.json +28 -0
  240. package/shared/input-separator.component.d.ts +28 -0
  241. package/shared/textarea.directive.d.ts +99 -0
  242. package/shared/utils.d.ts +10 -0
  243. package/shared.module.d.ts +19 -0
  244. package/signature/events/close-event.d.ts +10 -0
  245. package/signature/events/index.d.ts +6 -0
  246. package/signature/events/open-event.d.ts +10 -0
  247. package/signature/localization/custom-messages.component.d.ts +17 -0
  248. package/signature/localization/index.d.ts +7 -0
  249. package/signature/localization/localized-signature-messages.directive.d.ts +16 -0
  250. package/signature/localization/messages.d.ts +29 -0
  251. package/signature/signature.component.d.ts +364 -0
  252. package/signature.module.d.ts +48 -0
  253. package/slider/localization/custom-messages.component.d.ts +17 -0
  254. package/slider/localization/localized-slider-messages.directive.d.ts +16 -0
  255. package/slider/localization/messages.d.ts +25 -0
  256. package/slider/slider-model.d.ts +14 -0
  257. package/slider/slider.component.d.ts +175 -0
  258. package/slider.module.d.ts +50 -0
  259. package/sliders-common/label-template.directive.d.ts +36 -0
  260. package/sliders-common/slider-base.d.ts +141 -0
  261. package/sliders-common/slider-model.base.d.ts +26 -0
  262. package/sliders-common/slider-ticks.component.d.ts +26 -0
  263. package/sliders-common/sliders-common.module.d.ts +17 -0
  264. package/sliders-common/sliders-util.d.ts +119 -0
  265. package/sliders-common/title-callback.d.ts +10 -0
  266. package/switch/events/blur-event.d.ts +13 -0
  267. package/switch/events/focus-event.d.ts +13 -0
  268. package/switch/localization/custom-messages.component.d.ts +17 -0
  269. package/switch/localization/localized-switch-messages.directive.d.ts +16 -0
  270. package/switch/localization/messages.d.ts +21 -0
  271. package/switch/switch.component.d.ts +216 -0
  272. package/switch.module.d.ts +46 -0
  273. package/text-fields-common/text-fields-base.d.ts +91 -0
  274. package/textarea/models/flow.d.ts +12 -0
  275. package/textarea/models/resize.d.ts +16 -0
  276. package/textarea/textarea-suffix.component.d.ts +26 -0
  277. package/textarea/textarea.component.d.ts +225 -0
  278. package/textarea.module.d.ts +48 -0
  279. package/textbox/localization/custom-messages.component.d.ts +17 -0
  280. package/textbox/localization/localized-textbox-messages.directive.d.ts +16 -0
  281. package/textbox/localization/messages.d.ts +17 -0
  282. package/textbox/models/icon-show-options.d.ts +13 -0
  283. package/textbox/textbox-prefix.directive.d.ts +29 -0
  284. package/textbox/textbox-suffix.directive.d.ts +28 -0
  285. package/textbox/textbox.component.d.ts +376 -0
  286. package/textbox/textbox.directive.d.ts +59 -0
  287. package/textbox.module.d.ts +53 -0
  288. package/validators/max.validator.d.ts +8 -0
  289. package/validators/min.validator.d.ts +8 -0
@@ -0,0 +1,906 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ /* eslint-disable @typescript-eslint/no-explicit-any */
6
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, forwardRef, HostBinding, Input, NgZone, Output, Renderer2, ViewChild } from '@angular/core';
7
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
+ import { anyChanged, closest, isDocumentAvailable, Keys } 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 { xIcon, hyperlinkOpenIcon } from '@progress/kendo-svg-icons';
16
+ import { take } from 'rxjs/operators';
17
+ import * as i0 from "@angular/core";
18
+ import * as i1 from "@progress/kendo-angular-l10n";
19
+ import * as i2 from "@progress/kendo-angular-buttons";
20
+ import * as i3 from "@progress/kendo-angular-dialog";
21
+ import * as i4 from "./localization/localized-signature-messages.directive";
22
+ import * as i5 from "@angular/common";
23
+ const noop = () => { };
24
+ let _id = 0;
25
+ const nextId = () => 'k-signature-focusable-' + _id++;
26
+ const FOCUSED_CLASS = 'k-focus';
27
+ const DEFAULT_SIZE = 'medium';
28
+ const DEFAULT_ROUNDED = 'medium';
29
+ const DEFAULT_FILL_MODE = 'solid';
30
+ const DEFAULT_POPUP_SCALE = 3;
31
+ const DEFAULT_EXPORT_SCALE = 2;
32
+ const DEFAULT_COLOR = '#000000';
33
+ const DEFAULT_BACKGROUND_COLOR = '#ffffff';
34
+ const iconsMap = { xIcon, hyperlinkOpenIcon };
35
+ /**
36
+ * Represents the [Kendo UI Signature component for Angular]({% slug overview_signature %}).
37
+ *
38
+ * The Signature allows users to add a hand-drawn signature to forms.
39
+ */
40
+ export class SignatureComponent {
41
+ constructor(element, renderer, ngZone, cd, localization) {
42
+ this.element = element;
43
+ this.renderer = renderer;
44
+ this.ngZone = ngZone;
45
+ this.cd = cd;
46
+ this.localization = localization;
47
+ this.staticHostClasses = true;
48
+ /**
49
+ * @hidden
50
+ */
51
+ this.focusableId = nextId();
52
+ /**
53
+ * Sets the read-only state of the Signature.
54
+ *
55
+ * @default false
56
+ */
57
+ this.readonly = false;
58
+ /**
59
+ * Sets the disabled state of the Signature.
60
+ *
61
+ * @default false
62
+ */
63
+ this.disabled = false;
64
+ /**
65
+ * The size property specifies the padding of the Signature internal controls
66
+ * ([see example]({% slug appearance_signature %}#toc-size)).
67
+ *
68
+ * The possible values are:
69
+ * * `small`
70
+ * * `medium` (default)
71
+ * * `large`
72
+ * * `none`
73
+ */
74
+ this.size = DEFAULT_SIZE;
75
+ /**
76
+ * The rounded property specifies the border radius of the signature
77
+ * ([see example]({% slug appearance_signature %}#toc-rounded)).
78
+ *
79
+ * The possible values are:
80
+ * * `small`
81
+ * * `medium` (default)
82
+ * * `large`
83
+ * * `full` (not supported by the Signature)
84
+ * * `none`
85
+ */
86
+ this.rounded = DEFAULT_ROUNDED;
87
+ /**
88
+ * The fillMode property specifies the background and border styles of the signature
89
+ * ([see example]({% slug appearance_signature %}#toc-fillMode)).
90
+ *
91
+ * The possible values are:
92
+ * * `flat`
93
+ * * `solid` (default)
94
+ * * `outline`
95
+ * * `none`
96
+ */
97
+ this.fillMode = DEFAULT_FILL_MODE;
98
+ /**
99
+ * The stroke width of the signature.
100
+ *
101
+ * @default 1
102
+ */
103
+ this.strokeWidth = 1;
104
+ /**
105
+ * A flag indicating whether to smooth out signature lines.
106
+ *
107
+ * @default false
108
+ */
109
+ this.smooth = false;
110
+ /**
111
+ * A flag indicating if the signature can be maximized.
112
+ *
113
+ * @default true
114
+ */
115
+ this.maximizable = true;
116
+ /**
117
+ * @hidden
118
+ */
119
+ this.maximized = false;
120
+ /**
121
+ * The scale factor for the popup.
122
+ *
123
+ * The Signature width and height will be multiplied by the scale when showing the popup.
124
+ *
125
+ * @default 3
126
+ */
127
+ this.popupScale = DEFAULT_POPUP_SCALE;
128
+ /**
129
+ * The scale factor for the exported image.
130
+ *
131
+ * The Signature width and height will be multiplied by the scale when converting the signature to an image.
132
+ *
133
+ * @default 2
134
+ */
135
+ this.exportScale = DEFAULT_EXPORT_SCALE;
136
+ /**
137
+ * A flag indicating whether the dotted line should be displayed in the background.
138
+ *
139
+ * @default false
140
+ */
141
+ this.hideLine = false;
142
+ /**
143
+ * Fires each time the signature value is changed.
144
+ */
145
+ this.valueChange = new EventEmitter();
146
+ /**
147
+ * Fires each time the popup is about to open.
148
+ * This event is preventable. If you cancel it, the popup will remain closed.
149
+ */
150
+ this.open = new EventEmitter();
151
+ /**
152
+ * Fires each time the popup is about to close.
153
+ * This event is preventable. If you cancel it, the popup will remain open.
154
+ */
155
+ this.close = new EventEmitter();
156
+ /**
157
+ * Fires each time Signature is focused.
158
+ */
159
+ this.onFocus = new EventEmitter();
160
+ /**
161
+ * Fires each time the Signature is blurred.
162
+ */
163
+ this.onBlur = new EventEmitter();
164
+ /**
165
+ * @hidden
166
+ */
167
+ this.minimize = new EventEmitter();
168
+ /**
169
+ * Indicates whether the Signature wrapper is focused.
170
+ */
171
+ this.isFocused = false;
172
+ /**
173
+ * @hidden
174
+ */
175
+ this.isDrawing = false;
176
+ this.notifyNgTouched = noop;
177
+ this.notifyNgChanged = noop;
178
+ this._tabindex = 0;
179
+ this.hostClasses = [];
180
+ validatePackage(packageMetadata);
181
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
182
+ }
183
+ /**
184
+ * Gets or sets the value of the signature.
185
+ *
186
+ * The value is a Base64-encoded PNG image.
187
+ */
188
+ set value(value) {
189
+ if (value !== this._value) {
190
+ this._value = value;
191
+ if (this.instance) {
192
+ this.instance.loadImage(value);
193
+ }
194
+ }
195
+ }
196
+ get value() {
197
+ return this._value;
198
+ }
199
+ /**
200
+ * @hidden
201
+ */
202
+ svgIcon(name) {
203
+ return iconsMap[name];
204
+ }
205
+ /**
206
+ * Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
207
+ *
208
+ * @default 0
209
+ */
210
+ set tabindex(value) {
211
+ const tabindex = Number(value);
212
+ const defaultValue = 0;
213
+ this._tabindex = !isNaN(tabindex) ? tabindex : defaultValue;
214
+ }
215
+ get tabindex() {
216
+ return !this.disabled ? this._tabindex : undefined;
217
+ }
218
+ /**
219
+ * @hidden
220
+ */
221
+ get isEmpty() {
222
+ return !this.value;
223
+ }
224
+ /**
225
+ * @hidden
226
+ */
227
+ get canvasLabel() {
228
+ return this.getMessage('canvasLabel');
229
+ }
230
+ /**
231
+ * @hidden
232
+ */
233
+ get clearTitle() {
234
+ return this.getMessage('clear');
235
+ }
236
+ /**
237
+ * @hidden
238
+ */
239
+ get minimizeTitle() {
240
+ return this.getMessage('minimize');
241
+ }
242
+ /**
243
+ * @hidden
244
+ */
245
+ get maximizeTitle() {
246
+ return this.getMessage('maximize');
247
+ }
248
+ /**
249
+ * @hidden
250
+ */
251
+ get baseWidth() {
252
+ return this.width || this.element.nativeElement.offsetWidth;
253
+ }
254
+ /**
255
+ * @hidden
256
+ */
257
+ get baseHeight() {
258
+ return this.height || this.element.nativeElement.offsetHeight;
259
+ }
260
+ /**
261
+ * @hidden
262
+ */
263
+ get popupWidth() {
264
+ return this.baseWidth * this.popupScale;
265
+ }
266
+ /**
267
+ * @hidden
268
+ */
269
+ get popupHeight() {
270
+ return this.baseHeight * this.popupScale;
271
+ }
272
+ /**
273
+ * @hidden
274
+ */
275
+ get showMaximize() {
276
+ return !(this.maximized || this.isDrawing || !this.maximizable || this.disabled);
277
+ }
278
+ /**
279
+ * @hidden
280
+ */
281
+ get showMinimize() {
282
+ return this.maximized && !this.isDrawing;
283
+ }
284
+ /**
285
+ * @hidden
286
+ */
287
+ get showClear() {
288
+ return !(this.isEmpty || this.isDrawing || this.readonly || this.disabled);
289
+ }
290
+ /**
291
+ * @hidden
292
+ */
293
+ get focused() {
294
+ return this.isFocused;
295
+ }
296
+ set focused(value) {
297
+ if (this.isFocused !== value && this.element) {
298
+ const wrap = this.element.nativeElement;
299
+ if (value && !this.maximized) {
300
+ this.renderer.addClass(wrap, FOCUSED_CLASS);
301
+ }
302
+ else {
303
+ this.renderer.removeClass(wrap, FOCUSED_CLASS);
304
+ }
305
+ this.isFocused = value;
306
+ }
307
+ }
308
+ get options() {
309
+ return {
310
+ scale: this.maximized ? this.popupScale : 1,
311
+ color: this.color,
312
+ backgroundColor: this.backgroundColor,
313
+ strokeWidth: this.strokeWidth,
314
+ smooth: this.smooth,
315
+ readonly: this.readonly
316
+ };
317
+ }
318
+ ngOnInit() {
319
+ this.subscriptions = this.localization
320
+ .changes
321
+ .subscribe(({ rtl }) => {
322
+ this.direction = rtl ? 'rtl' : 'ltr';
323
+ });
324
+ }
325
+ ngAfterViewInit() {
326
+ if (!isDocumentAvailable()) {
327
+ return;
328
+ }
329
+ this.applyHostClasses();
330
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
331
+ this.readThemeColors();
332
+ this.instance.setOptions(this.options);
333
+ });
334
+ this.ngZone.runOutsideAngular(() => {
335
+ const element = this.canvas.nativeElement;
336
+ this.instance = new SignaturePad(element, {
337
+ ...this.options,
338
+ onChange: () => this.onValueChange(),
339
+ onDraw: () => this.onDraw(),
340
+ onDrawEnd: () => this.onDrawEnd()
341
+ });
342
+ if (this.value) {
343
+ this.instance.loadImage(this.value);
344
+ }
345
+ if (this.maximized) {
346
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
347
+ this.minimizeButton?.nativeElement.focus();
348
+ });
349
+ }
350
+ this.addEventListeners();
351
+ });
352
+ }
353
+ ngOnChanges(changes) {
354
+ if (anyChanged(['readonly', 'color', 'backgroundColor', 'strokeWidth', 'smooth'], changes, true)) {
355
+ this.instance.setOptions(this.options);
356
+ }
357
+ this.applyHostClasses();
358
+ }
359
+ ngOnDestroy() {
360
+ if (this.instance) {
361
+ this.instance.destroy();
362
+ this.instance = null;
363
+ }
364
+ if (this.subscriptions) {
365
+ this.subscriptions.unsubscribe();
366
+ this.subscriptions = null;
367
+ }
368
+ if (this.unsubscribe) {
369
+ this.unsubscribe();
370
+ this.unsubscribe = null;
371
+ }
372
+ }
373
+ /**
374
+ * @hidden
375
+ */
376
+ onClear() {
377
+ this.reset();
378
+ this.valueChange.emit(undefined);
379
+ this.canvas.nativeElement.focus();
380
+ }
381
+ /**
382
+ * @hidden
383
+ */
384
+ async onValueChange() {
385
+ const value = await this.instance.exportImage({
386
+ width: this.baseWidth * this.exportScale,
387
+ height: this.baseHeight * this.exportScale
388
+ });
389
+ this._value = value;
390
+ this.cd.markForCheck();
391
+ this.ngZone.run(() => {
392
+ this.valueChange.emit(value);
393
+ this.notifyNgChanged(value);
394
+ });
395
+ }
396
+ /**
397
+ * @hidden
398
+ */
399
+ onDialogValueChange(value) {
400
+ this.value = value;
401
+ this.valueChange.emit(value);
402
+ this.notifyNgTouched();
403
+ this.notifyNgChanged(value);
404
+ }
405
+ /**
406
+ * @hidden
407
+ */
408
+ onDialogClick(e) {
409
+ if (e.target.classList.contains('k-overlay')) {
410
+ this.isOpen = false;
411
+ this.maximizeButton?.nativeElement.focus();
412
+ }
413
+ }
414
+ /**
415
+ * @hidden
416
+ */
417
+ onDialogKeydown(e) {
418
+ if (e.keyCode === Keys.Escape) {
419
+ this.isOpen = false;
420
+ this.cd.detectChanges();
421
+ this.maximizeButton?.nativeElement.focus();
422
+ }
423
+ }
424
+ /**
425
+ * @hidden
426
+ */
427
+ onDialogClose() {
428
+ const args = new SignatureCloseEvent();
429
+ this.close.next(args);
430
+ if (!args.isDefaultPrevented()) {
431
+ this.isOpen = false;
432
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
433
+ (this.maximizeButton || this.element)?.nativeElement?.focus();
434
+ });
435
+ }
436
+ }
437
+ /**
438
+ * Clears the value of the Signature.
439
+ */
440
+ reset() {
441
+ if (!isPresent(this.value)) {
442
+ return;
443
+ }
444
+ this.instance?.clear();
445
+ this.value = this._value = undefined;
446
+ this.notifyNgChanged(undefined);
447
+ }
448
+ /**
449
+ * Toggles the popup of the Signature.
450
+ * Does not trigger the `open` and `close` events of the component.
451
+ *
452
+ * @param open An optional parameter. Specifies whether the popup will be opened or closed.
453
+ */
454
+ toggle(open) {
455
+ if (this.disabled || this.readonly) {
456
+ return;
457
+ }
458
+ open = isPresent(open) ? open : !this.isOpen;
459
+ this.isOpen = open;
460
+ }
461
+ /**
462
+ * @hidden
463
+ */
464
+ async onMaximize() {
465
+ const args = new SignatureOpenEvent();
466
+ this.open.next(args);
467
+ if (!args.isDefaultPrevented()) {
468
+ this.popupValue = await this.instance.exportImage({
469
+ width: this.popupWidth * this.exportScale,
470
+ height: this.popupHeight * this.exportScale
471
+ });
472
+ this.isOpen = true;
473
+ this.cd.detectChanges();
474
+ }
475
+ }
476
+ /**
477
+ * @hidden
478
+ */
479
+ onMinimize() {
480
+ this.minimize.next();
481
+ }
482
+ applyHostClasses() {
483
+ const classList = this.element.nativeElement.classList;
484
+ this.hostClasses.forEach(([name]) => classList.remove(name));
485
+ this.hostClasses = [
486
+ [`k-signature-${SIZE_MAP[this.size || DEFAULT_SIZE]}`, !isNone(this.size)],
487
+ [`k-input-${this.fillMode || DEFAULT_FILL_MODE}`, !isNone(this.fillMode)],
488
+ [`k-rounded-${ROUNDED_MAP[this.rounded || DEFAULT_ROUNDED]}`, !isNone(this.rounded)]
489
+ ];
490
+ this.hostClasses.forEach(([name, enabled]) => classList.toggle(name, enabled));
491
+ }
492
+ readThemeColors() {
493
+ let defaultColor = DEFAULT_COLOR;
494
+ let defaultBackgroundColor = DEFAULT_BACKGROUND_COLOR;
495
+ if (isDocumentAvailable()) {
496
+ const el = this.element.nativeElement;
497
+ defaultColor = getComputedStyle(el).color;
498
+ defaultBackgroundColor = getComputedStyle(el).backgroundColor;
499
+ }
500
+ this.color = this.color || defaultColor;
501
+ this.backgroundColor = this.backgroundColor || defaultBackgroundColor;
502
+ }
503
+ /**
504
+ * Focuses the wrapper of the Signature.
505
+ */
506
+ focus() {
507
+ this.focused = true;
508
+ this.element.nativeElement.focus();
509
+ }
510
+ /**
511
+ * @hidden
512
+ */
513
+ onWrapperFocus() {
514
+ if (this.focused) {
515
+ return;
516
+ }
517
+ this.ngZone.run(() => {
518
+ this.focus();
519
+ this.onFocus.emit();
520
+ });
521
+ }
522
+ /**
523
+ * Blurs the Signature.
524
+ */
525
+ blur() {
526
+ this.focused = false;
527
+ this.element.nativeElement.blur();
528
+ this.notifyNgTouched();
529
+ }
530
+ /**
531
+ * @hidden
532
+ */
533
+ onWrapperBlur() {
534
+ if (this.isOpen) {
535
+ return;
536
+ }
537
+ this.ngZone.run(() => {
538
+ this.onBlur.emit();
539
+ this.focused = false;
540
+ this.notifyNgTouched();
541
+ });
542
+ }
543
+ /**
544
+ * @hidden
545
+ */
546
+ onWrapperClick(_event) {
547
+ if (this.disabled) {
548
+ return;
549
+ }
550
+ this.focus();
551
+ }
552
+ /**
553
+ * @hidden
554
+ */
555
+ writeValue(value) {
556
+ this.value = value;
557
+ }
558
+ /**
559
+ * @hidden
560
+ */
561
+ registerOnChange(fn) {
562
+ this.notifyNgChanged = fn;
563
+ }
564
+ /**
565
+ * @hidden
566
+ */
567
+ registerOnTouched(fn) {
568
+ this.notifyNgTouched = fn;
569
+ }
570
+ onDraw() {
571
+ this.isDrawing = true;
572
+ this.cd.markForCheck();
573
+ }
574
+ onDrawEnd() {
575
+ this.isDrawing = false;
576
+ this.cd.markForCheck();
577
+ }
578
+ addEventListeners() {
579
+ const element = this.element.nativeElement;
580
+ const focusIn = this.renderer.listen(element, 'focusin', () => this.onWrapperFocus());
581
+ const focusOut = this.renderer.listen(element, 'focusout', (e) => {
582
+ const insideWrapper = closest(e.relatedTarget, element => element === this.element.nativeElement);
583
+ if (!insideWrapper) {
584
+ this.onWrapperBlur();
585
+ }
586
+ });
587
+ const click = this.renderer.listen(element, 'click', () => {
588
+ this.ngZone.run((e) => {
589
+ this.onWrapperClick(e);
590
+ });
591
+ });
592
+ this.unsubscribe = () => {
593
+ focusIn();
594
+ focusOut();
595
+ click();
596
+ };
597
+ }
598
+ getMessage(key) {
599
+ if (this.maximized && this.parentLocalization) {
600
+ return this.parentLocalization.get(key);
601
+ }
602
+ return this.localization.get(key);
603
+ }
604
+ }
605
+ SignatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignatureComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
606
+ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignatureComponent, selector: "kendo-signature", inputs: { focusableId: "focusableId", 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", exportScale: "exportScale", 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: [
607
+ LocalizationService,
608
+ { provide: L10N_PREFIX, useValue: 'kendo.signature' },
609
+ { multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SignatureComponent) }
610
+ ], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }, { propertyName: "minimizeButton", first: true, predicate: ["minimize"], descendants: true, read: ElementRef }, { propertyName: "maximizeButton", first: true, predicate: ["maximize"], descendants: true, read: ElementRef }], exportAs: ["kendoSignature"], usesOnChanges: true, ngImport: i0, template: `
611
+ <ng-container kendoSignatureLocalizedMessages
612
+ i18n-clear="kendo.signature.clear|The message for the Clear button."
613
+ clear="Clear"
614
+ i18n-maximize="kendo.signature.maximize|The message for the Maximize button."
615
+ maximize="Maximize"
616
+ i18n-minimize="kendo.signature.minimize|The message for the Minimize button."
617
+ minimize="Minimize"
618
+ i18n-canvasLabel="kendo.signature.canvasLabel|The message for the Canvas element aria-label."
619
+ canvasLabel="Signature canvas">
620
+ </ng-container>
621
+
622
+ <div
623
+ #canvas
624
+ class="k-signature-canvas"
625
+ [attr.tabindex]="tabindex"
626
+ [id]="focusableId"
627
+ role="img"
628
+ [attr.aria-label]="canvasLabel"
629
+ ></div>
630
+
631
+ <div class="k-signature-actions k-signature-actions-top">
632
+ <button
633
+ #maximize
634
+ *ngIf="showMaximize"
635
+ kendoButton
636
+ type="button"
637
+ class="k-signature-action k-signature-maximize"
638
+ icon="hyperlink-open"
639
+ [svgIcon]="svgIcon('hyperlinkOpenIcon')"
640
+ fillMode="flat"
641
+ [size]="size"
642
+ (click)="onMaximize()"
643
+ [attr.aria-label]="maximizeTitle"
644
+ [title]="maximizeTitle">
645
+ </button>
646
+ <button
647
+ #minimize
648
+ *ngIf="showMinimize"
649
+ kendoButton
650
+ type="button"
651
+ class="k-signature-action k-signature-minimize k-rotate-180"
652
+ icon="hyperlink-open"
653
+ [svgIcon]="svgIcon('hyperlinkOpenIcon')"
654
+ fillMode="flat"
655
+ [size]="size"
656
+ (click)="onMinimize()"
657
+ [attr.aria-label]="minimizeTitle"
658
+ [title]="minimizeTitle">
659
+ </button>
660
+ </div>
661
+ <div
662
+ *ngIf="!hideLine"
663
+ class="k-signature-line"
664
+ ></div>
665
+ <div class="k-signature-actions k-signature-actions-bottom">
666
+ <button
667
+ *ngIf="showClear"
668
+ kendoButton
669
+ class="k-signature-action k-signature-clear"
670
+ icon="close"
671
+ type="button"
672
+ [svgIcon]="svgIcon('xIcon')"
673
+ fillMode="flat"
674
+ [size]="size"
675
+ [attr.aria-label]="clearTitle"
676
+ [title]="clearTitle"
677
+ (click)="onClear()" >
678
+ </button>
679
+ </div>
680
+
681
+ <kendo-dialog
682
+ *ngIf="isOpen"
683
+ autoFocusedElement=".k-signature-action.k-signature-minimize"
684
+ (click)="onDialogClick($event)"
685
+ (keydown)="onDialogKeydown($event)">
686
+ <kendo-signature
687
+ [readonly]="readonly"
688
+ [disabled]="disabled"
689
+ [size]="size"
690
+ [rounded]="rounded"
691
+ [fillMode]="fillMode"
692
+ [color]="color"
693
+ [backgroundColor]="backgroundColor"
694
+ [strokeWidth]="strokeWidth"
695
+ [smooth]="smooth"
696
+ [value]="popupValue"
697
+ (valueChange)="onDialogValueChange($event)"
698
+ [hideLine]="hideLine"
699
+ [class.k-signature-maximized]="true"
700
+ [maximized]="true"
701
+ (minimize)="onDialogClose()"
702
+ [width]="popupWidth"
703
+ [height]="popupHeight"
704
+ [popupScale]="popupScale"
705
+ [exportScale]="(1 / popupScale) * exportScale"
706
+ [parentLocalization]="localization">
707
+ </kendo-signature>
708
+ </kendo-dialog>
709
+ `, isInline: true, components: [{ type: i2.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i3.DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { type: SignatureComponent, selector: "kendo-signature", inputs: ["focusableId", "readonly", "disabled", "width", "height", "value", "tabindex", "size", "rounded", "fillMode", "color", "backgroundColor", "strokeWidth", "smooth", "maximizable", "maximized", "popupScale", "exportScale", "parentLocalization", "hideLine"], outputs: ["valueChange", "open", "close", "focus", "blur", "minimize"], exportAs: ["kendoSignature"] }], directives: [{ type: i4.LocalizedSignatureMessagesDirective, selector: "[kendoSignatureLocalizedMessages]" }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
710
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignatureComponent, decorators: [{
711
+ type: Component,
712
+ args: [{
713
+ exportAs: 'kendoSignature',
714
+ selector: 'kendo-signature',
715
+ changeDetection: ChangeDetectionStrategy.OnPush,
716
+ providers: [
717
+ LocalizationService,
718
+ { provide: L10N_PREFIX, useValue: 'kendo.signature' },
719
+ { multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SignatureComponent) }
720
+ ],
721
+ template: `
722
+ <ng-container kendoSignatureLocalizedMessages
723
+ i18n-clear="kendo.signature.clear|The message for the Clear button."
724
+ clear="Clear"
725
+ i18n-maximize="kendo.signature.maximize|The message for the Maximize button."
726
+ maximize="Maximize"
727
+ i18n-minimize="kendo.signature.minimize|The message for the Minimize button."
728
+ minimize="Minimize"
729
+ i18n-canvasLabel="kendo.signature.canvasLabel|The message for the Canvas element aria-label."
730
+ canvasLabel="Signature canvas">
731
+ </ng-container>
732
+
733
+ <div
734
+ #canvas
735
+ class="k-signature-canvas"
736
+ [attr.tabindex]="tabindex"
737
+ [id]="focusableId"
738
+ role="img"
739
+ [attr.aria-label]="canvasLabel"
740
+ ></div>
741
+
742
+ <div class="k-signature-actions k-signature-actions-top">
743
+ <button
744
+ #maximize
745
+ *ngIf="showMaximize"
746
+ kendoButton
747
+ type="button"
748
+ class="k-signature-action k-signature-maximize"
749
+ icon="hyperlink-open"
750
+ [svgIcon]="svgIcon('hyperlinkOpenIcon')"
751
+ fillMode="flat"
752
+ [size]="size"
753
+ (click)="onMaximize()"
754
+ [attr.aria-label]="maximizeTitle"
755
+ [title]="maximizeTitle">
756
+ </button>
757
+ <button
758
+ #minimize
759
+ *ngIf="showMinimize"
760
+ kendoButton
761
+ type="button"
762
+ class="k-signature-action k-signature-minimize k-rotate-180"
763
+ icon="hyperlink-open"
764
+ [svgIcon]="svgIcon('hyperlinkOpenIcon')"
765
+ fillMode="flat"
766
+ [size]="size"
767
+ (click)="onMinimize()"
768
+ [attr.aria-label]="minimizeTitle"
769
+ [title]="minimizeTitle">
770
+ </button>
771
+ </div>
772
+ <div
773
+ *ngIf="!hideLine"
774
+ class="k-signature-line"
775
+ ></div>
776
+ <div class="k-signature-actions k-signature-actions-bottom">
777
+ <button
778
+ *ngIf="showClear"
779
+ kendoButton
780
+ class="k-signature-action k-signature-clear"
781
+ icon="close"
782
+ type="button"
783
+ [svgIcon]="svgIcon('xIcon')"
784
+ fillMode="flat"
785
+ [size]="size"
786
+ [attr.aria-label]="clearTitle"
787
+ [title]="clearTitle"
788
+ (click)="onClear()" >
789
+ </button>
790
+ </div>
791
+
792
+ <kendo-dialog
793
+ *ngIf="isOpen"
794
+ autoFocusedElement=".k-signature-action.k-signature-minimize"
795
+ (click)="onDialogClick($event)"
796
+ (keydown)="onDialogKeydown($event)">
797
+ <kendo-signature
798
+ [readonly]="readonly"
799
+ [disabled]="disabled"
800
+ [size]="size"
801
+ [rounded]="rounded"
802
+ [fillMode]="fillMode"
803
+ [color]="color"
804
+ [backgroundColor]="backgroundColor"
805
+ [strokeWidth]="strokeWidth"
806
+ [smooth]="smooth"
807
+ [value]="popupValue"
808
+ (valueChange)="onDialogValueChange($event)"
809
+ [hideLine]="hideLine"
810
+ [class.k-signature-maximized]="true"
811
+ [maximized]="true"
812
+ (minimize)="onDialogClose()"
813
+ [width]="popupWidth"
814
+ [height]="popupHeight"
815
+ [popupScale]="popupScale"
816
+ [exportScale]="(1 / popupScale) * exportScale"
817
+ [parentLocalization]="localization">
818
+ </kendo-signature>
819
+ </kendo-dialog>
820
+ `
821
+ }]
822
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }]; }, propDecorators: { staticHostClasses: [{
823
+ type: HostBinding,
824
+ args: ['class.k-signature']
825
+ }, {
826
+ type: HostBinding,
827
+ args: ['class.k-input']
828
+ }], focusableId: [{
829
+ type: Input
830
+ }], direction: [{
831
+ type: HostBinding,
832
+ args: ['attr.dir']
833
+ }], readonly: [{
834
+ type: HostBinding,
835
+ args: ['class.k-readonly']
836
+ }, {
837
+ type: Input
838
+ }], disabled: [{
839
+ type: HostBinding,
840
+ args: ['class.k-disabled']
841
+ }, {
842
+ type: Input
843
+ }], width: [{
844
+ type: Input
845
+ }, {
846
+ type: HostBinding,
847
+ args: ['style.width.px']
848
+ }], height: [{
849
+ type: Input
850
+ }, {
851
+ type: HostBinding,
852
+ args: ['style.height.px']
853
+ }], value: [{
854
+ type: Input
855
+ }], tabindex: [{
856
+ type: Input
857
+ }], size: [{
858
+ type: Input
859
+ }], rounded: [{
860
+ type: Input
861
+ }], fillMode: [{
862
+ type: Input
863
+ }], color: [{
864
+ type: Input
865
+ }], backgroundColor: [{
866
+ type: Input
867
+ }], strokeWidth: [{
868
+ type: Input
869
+ }], smooth: [{
870
+ type: Input
871
+ }], maximizable: [{
872
+ type: Input
873
+ }], maximized: [{
874
+ type: Input
875
+ }], popupScale: [{
876
+ type: Input
877
+ }], exportScale: [{
878
+ type: Input
879
+ }], parentLocalization: [{
880
+ type: Input
881
+ }], hideLine: [{
882
+ type: Input
883
+ }], valueChange: [{
884
+ type: Output
885
+ }], open: [{
886
+ type: Output
887
+ }], close: [{
888
+ type: Output
889
+ }], onFocus: [{
890
+ type: Output,
891
+ args: ['focus']
892
+ }], onBlur: [{
893
+ type: Output,
894
+ args: ['blur']
895
+ }], minimize: [{
896
+ type: Output
897
+ }], canvas: [{
898
+ type: ViewChild,
899
+ args: ['canvas']
900
+ }], minimizeButton: [{
901
+ type: ViewChild,
902
+ args: ['minimize', { read: ElementRef }]
903
+ }], maximizeButton: [{
904
+ type: ViewChild,
905
+ args: ['maximize', { read: ElementRef }]
906
+ }] } });