@progress/kendo-angular-inputs 7.5.2-dev.202111191702 → 8.0.0-dev.202112251033

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 (225) hide show
  1. package/dist/cdn/js/kendo-angular-inputs.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/checkbox/checkbox.directive.js +79 -3
  4. package/dist/es/colorpicker/color-contrast-svg.component.js +95 -0
  5. package/dist/es/colorpicker/color-gradient.component.js +109 -81
  6. package/dist/es/colorpicker/color-input.component.js +39 -18
  7. package/dist/es/colorpicker/color-palette.component.js +28 -18
  8. package/dist/es/colorpicker/colorpicker.component.js +297 -80
  9. package/dist/es/colorpicker/constants.js +12 -0
  10. package/dist/es/colorpicker/contrast-validation.component.js +8 -6
  11. package/dist/es/colorpicker/contrast.component.js +6 -8
  12. package/dist/es/colorpicker/{models → events}/active-color-click-event.js +0 -0
  13. package/dist/es/colorpicker/events/cancel-event.js +19 -0
  14. package/dist/es/colorpicker/events/close-event.js +17 -0
  15. package/dist/es/colorpicker/{models → events}/kendo-drag-event.js +0 -0
  16. package/dist/es/colorpicker/events/open-event.js +17 -0
  17. package/dist/es/colorpicker/events.js +8 -0
  18. package/dist/es/colorpicker/flatcolorpicker-actions.component.js +50 -0
  19. package/dist/es/colorpicker/flatcolorpicker-header.component.js +94 -0
  20. package/dist/es/colorpicker/flatcolorpicker.component.js +553 -0
  21. package/dist/es/colorpicker/localization/colorgradient-localization.service.js +7 -7
  22. package/dist/es/colorpicker/localization/colorpalette-localization.service.js +7 -7
  23. package/dist/es/colorpicker/localization/custom-messages.component.js +1 -1
  24. package/dist/es/colorpicker/localization/flatcolorpicker-localization.service.js +34 -0
  25. package/dist/es/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
  26. package/dist/es/colorpicker/localization/messages.js +36 -0
  27. package/dist/es/colorpicker/models/{color-picker-view.js → actions-layout.js} +0 -0
  28. package/dist/{es2015/colorpicker/models/color-picker-view.js → es/colorpicker/models/colorpicker-view.js} +0 -0
  29. package/dist/es/colorpicker/{utils → models}/palette-presets.js +0 -0
  30. package/dist/es/colorpicker/models.js +1 -2
  31. package/dist/es/colorpicker/services/flatcolorpicker.service.js +41 -0
  32. package/dist/es/colorpicker/utils/color-parser.js +18 -5
  33. package/dist/es/colorpicker/utils/contrast-curve.js +91 -0
  34. package/dist/es/colorpicker/utils.js +1 -1
  35. package/dist/es/colorpicker.module.js +9 -1
  36. package/dist/es/common/models/fillmode.js +4 -0
  37. package/dist/es/common/models/rounded.js +4 -0
  38. package/dist/es/common/models/size.js +4 -0
  39. package/dist/es/common/models/styling-classes.js +4 -0
  40. package/dist/{es2015/colorpicker/models/kendo-drag-event.js → es/common/models.js} +0 -0
  41. package/dist/es/common/utils.js +37 -0
  42. package/dist/es/index.js +5 -0
  43. package/dist/es/main.js +4 -2
  44. package/dist/es/maskedtextbox/maskedtextbox.component.js +101 -6
  45. package/dist/es/numerictextbox/numerictextbox.component.js +116 -20
  46. package/dist/es/package-metadata.js +1 -1
  47. package/dist/es/radiobutton/radiobutton.directive.js +52 -3
  48. package/dist/es/shared/textarea.directive.js +3 -2
  49. package/dist/es/switch/switch.component.js +167 -21
  50. package/dist/es/text-fields-common/text-fields-base.js +1 -1
  51. package/dist/es/textarea/textarea.component.js +101 -5
  52. package/dist/es/textbox/textbox.component.js +108 -11
  53. package/dist/es/textbox/textbox.directive.js +3 -2
  54. package/dist/es/textbox.module.js +0 -3
  55. package/dist/es2015/checkbox/checkbox.directive.d.ts +31 -0
  56. package/dist/es2015/checkbox/checkbox.directive.js +68 -10
  57. package/dist/es2015/colorpicker/color-contrast-svg.component.d.ts +26 -0
  58. package/dist/es2015/colorpicker/color-contrast-svg.component.js +97 -0
  59. package/dist/es2015/colorpicker/color-gradient.component.d.ts +32 -43
  60. package/dist/es2015/colorpicker/color-gradient.component.js +126 -93
  61. package/dist/es2015/colorpicker/color-input.component.d.ts +11 -4
  62. package/dist/es2015/colorpicker/color-input.component.js +52 -32
  63. package/dist/es2015/colorpicker/color-palette.component.d.ts +8 -3
  64. package/dist/es2015/colorpicker/color-palette.component.js +28 -18
  65. package/dist/es2015/colorpicker/colorpicker.component.d.ts +129 -23
  66. package/dist/es2015/colorpicker/colorpicker.component.js +319 -125
  67. package/dist/es2015/colorpicker/constants.d.ts +12 -0
  68. package/dist/es2015/colorpicker/constants.js +12 -0
  69. package/dist/es2015/colorpicker/contrast-validation.component.d.ts +1 -1
  70. package/dist/es2015/colorpicker/contrast-validation.component.js +16 -12
  71. package/dist/es2015/colorpicker/contrast.component.d.ts +1 -3
  72. package/dist/es2015/colorpicker/contrast.component.js +17 -17
  73. package/dist/es2015/colorpicker/{models → events}/active-color-click-event.d.ts +0 -0
  74. package/dist/es2015/colorpicker/{models → events}/active-color-click-event.js +0 -0
  75. package/dist/es2015/colorpicker/events/cancel-event.d.ts +15 -0
  76. package/dist/es2015/colorpicker/events/cancel-event.js +14 -0
  77. package/dist/es2015/colorpicker/events/close-event.d.ts +10 -0
  78. package/dist/es2015/colorpicker/events/close-event.js +10 -0
  79. package/dist/es2015/colorpicker/{models → events}/kendo-drag-event.d.ts +0 -0
  80. package/dist/es2015/colorpicker/events/kendo-drag-event.js +4 -0
  81. package/dist/es2015/colorpicker/events/open-event.d.ts +10 -0
  82. package/dist/es2015/colorpicker/events/open-event.js +10 -0
  83. package/dist/es2015/colorpicker/events.d.ts +8 -0
  84. package/dist/es2015/colorpicker/events.js +8 -0
  85. package/dist/es2015/colorpicker/flatcolorpicker-actions.component.d.ts +18 -0
  86. package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +60 -0
  87. package/dist/es2015/colorpicker/flatcolorpicker-header.component.d.ts +30 -0
  88. package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +131 -0
  89. package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +214 -0
  90. package/dist/es2015/colorpicker/flatcolorpicker.component.js +593 -0
  91. package/dist/es2015/colorpicker/localization/colorgradient-localization.service.d.ts +3 -3
  92. package/dist/es2015/colorpicker/localization/colorgradient-localization.service.js +7 -7
  93. package/dist/es2015/colorpicker/localization/colorpalette-localization.service.d.ts +3 -3
  94. package/dist/es2015/colorpicker/localization/colorpalette-localization.service.js +7 -7
  95. package/dist/es2015/colorpicker/localization/custom-messages.component.js +1 -1
  96. package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.d.ts +14 -0
  97. package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.js +31 -0
  98. package/dist/es2015/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
  99. package/dist/es2015/colorpicker/localization/messages.d.ts +36 -0
  100. package/dist/es2015/colorpicker/localization/messages.js +36 -0
  101. package/dist/es2015/colorpicker/models/actions-layout.d.ts +8 -0
  102. package/dist/es2015/colorpicker/models/actions-layout.js +4 -0
  103. package/dist/es2015/colorpicker/models/colorpicker-view.d.ts +8 -0
  104. package/dist/es2015/colorpicker/models/colorpicker-view.js +4 -0
  105. package/dist/es2015/colorpicker/models/gradient-settings.d.ts +4 -3
  106. package/dist/es2015/colorpicker/models/output-format.d.ts +0 -5
  107. package/dist/es2015/colorpicker/{utils → models}/palette-presets.d.ts +0 -0
  108. package/dist/es2015/colorpicker/{utils → models}/palette-presets.js +0 -0
  109. package/dist/es2015/colorpicker/models/palette-settings.d.ts +2 -3
  110. package/dist/es2015/colorpicker/models/tile-size.d.ts +1 -5
  111. package/dist/es2015/colorpicker/models.d.ts +10 -10
  112. package/dist/es2015/colorpicker/models.js +1 -2
  113. package/dist/es2015/colorpicker/services/flatcolorpicker.service.d.ts +12 -0
  114. package/dist/es2015/colorpicker/services/flatcolorpicker.service.js +38 -0
  115. package/dist/es2015/colorpicker/utils/color-parser.d.ts +8 -2
  116. package/dist/es2015/colorpicker/utils/color-parser.js +15 -5
  117. package/dist/es2015/colorpicker/utils/contrast-curve.d.ts +37 -0
  118. package/dist/es2015/colorpicker/utils/contrast-curve.js +85 -0
  119. package/dist/es2015/colorpicker/utils.d.ts +1 -1
  120. package/dist/es2015/colorpicker/utils.js +1 -1
  121. package/dist/es2015/colorpicker.module.js +9 -1
  122. package/dist/es2015/{colorpicker/models/color-picker-view.d.ts → common/models/fillmode.d.ts} +5 -5
  123. package/dist/es2015/common/models/fillmode.js +4 -0
  124. package/dist/es2015/common/models/rounded.d.ts +23 -0
  125. package/dist/es2015/common/models/rounded.js +4 -0
  126. package/dist/es2015/common/models/size.d.ts +14 -0
  127. package/dist/es2015/common/models/size.js +4 -0
  128. package/dist/es2015/common/models/styling-classes.d.ts +11 -0
  129. package/dist/es2015/common/models/styling-classes.js +4 -0
  130. package/dist/es2015/common/models.d.ts +8 -0
  131. package/dist/es2015/common/models.js +4 -0
  132. package/dist/es2015/common/utils.d.ts +7 -0
  133. package/dist/es2015/common/utils.js +37 -0
  134. package/dist/es2015/index.d.ts +5 -0
  135. package/dist/es2015/index.js +5 -0
  136. package/dist/es2015/index.metadata.json +1 -1
  137. package/dist/es2015/main.d.ts +5 -2
  138. package/dist/es2015/main.js +4 -2
  139. package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +39 -1
  140. package/dist/es2015/maskedtextbox/maskedtextbox.component.js +88 -6
  141. package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +39 -2
  142. package/dist/es2015/numerictextbox/numerictextbox.component.js +124 -40
  143. package/dist/es2015/package-metadata.js +1 -1
  144. package/dist/es2015/radiobutton/radiobutton.directive.d.ts +18 -0
  145. package/dist/es2015/radiobutton/radiobutton.directive.js +46 -11
  146. package/dist/es2015/shared/textarea.directive.d.ts +1 -1
  147. package/dist/es2015/shared/textarea.directive.js +3 -2
  148. package/dist/es2015/switch/switch.component.d.ts +48 -5
  149. package/dist/es2015/switch/switch.component.js +166 -24
  150. package/dist/es2015/text-fields-common/text-fields-base.js +1 -1
  151. package/dist/es2015/textarea/textarea.component.d.ts +39 -1
  152. package/dist/es2015/textarea/textarea.component.js +89 -5
  153. package/dist/es2015/textbox/textbox.component.d.ts +40 -1
  154. package/dist/es2015/textbox/textbox.component.js +96 -11
  155. package/dist/es2015/textbox/textbox.directive.d.ts +1 -1
  156. package/dist/es2015/textbox/textbox.directive.js +3 -2
  157. package/dist/es2015/textbox.module.js +0 -3
  158. package/dist/fesm2015/index.js +3114 -1478
  159. package/dist/fesm5/index.js +3114 -1462
  160. package/dist/npm/checkbox/checkbox.directive.js +78 -2
  161. package/dist/npm/colorpicker/color-contrast-svg.component.js +97 -0
  162. package/dist/npm/colorpicker/color-gradient.component.js +109 -81
  163. package/dist/npm/colorpicker/color-input.component.js +38 -17
  164. package/dist/npm/colorpicker/color-palette.component.js +29 -19
  165. package/dist/npm/colorpicker/colorpicker.component.js +303 -86
  166. package/dist/npm/colorpicker/constants.js +12 -0
  167. package/dist/npm/colorpicker/contrast-validation.component.js +8 -6
  168. package/dist/npm/colorpicker/contrast.component.js +6 -8
  169. package/dist/npm/colorpicker/{models → events}/active-color-click-event.js +0 -0
  170. package/dist/npm/colorpicker/events/cancel-event.js +21 -0
  171. package/dist/npm/colorpicker/events/close-event.js +19 -0
  172. package/dist/npm/colorpicker/{models → events}/kendo-drag-event.js +0 -0
  173. package/dist/npm/colorpicker/events/open-event.js +19 -0
  174. package/dist/npm/colorpicker/events.js +11 -0
  175. package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +52 -0
  176. package/dist/npm/colorpicker/flatcolorpicker-header.component.js +96 -0
  177. package/dist/npm/colorpicker/flatcolorpicker.component.js +555 -0
  178. package/dist/npm/colorpicker/localization/colorgradient-localization.service.js +7 -7
  179. package/dist/npm/colorpicker/localization/colorpalette-localization.service.js +7 -7
  180. package/dist/npm/colorpicker/localization/custom-messages.component.js +1 -1
  181. package/dist/npm/colorpicker/localization/flatcolorpicker-localization.service.js +36 -0
  182. package/dist/npm/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
  183. package/dist/npm/colorpicker/localization/messages.js +36 -0
  184. package/dist/npm/colorpicker/models/{color-picker-view.js → actions-layout.js} +0 -0
  185. package/dist/npm/colorpicker/models/colorpicker-view.js +6 -0
  186. package/dist/npm/colorpicker/{utils → models}/palette-presets.js +0 -0
  187. package/dist/npm/colorpicker/models.js +1 -2
  188. package/dist/npm/colorpicker/services/flatcolorpicker.service.js +43 -0
  189. package/dist/npm/colorpicker/utils/color-parser.js +18 -5
  190. package/dist/npm/colorpicker/utils/contrast-curve.js +93 -0
  191. package/dist/npm/colorpicker/utils.js +1 -1
  192. package/dist/npm/colorpicker.module.js +9 -1
  193. package/dist/npm/common/models/fillmode.js +6 -0
  194. package/dist/npm/common/models/rounded.js +6 -0
  195. package/dist/npm/common/models/size.js +6 -0
  196. package/dist/npm/common/models/styling-classes.js +6 -0
  197. package/dist/npm/common/models.js +6 -0
  198. package/dist/npm/common/utils.js +37 -0
  199. package/dist/npm/index.js +10 -0
  200. package/dist/npm/main.js +7 -4
  201. package/dist/npm/maskedtextbox/maskedtextbox.component.js +100 -5
  202. package/dist/npm/numerictextbox/numerictextbox.component.js +115 -19
  203. package/dist/npm/package-metadata.js +1 -1
  204. package/dist/npm/radiobutton/radiobutton.directive.js +51 -2
  205. package/dist/npm/shared/textarea.directive.js +3 -2
  206. package/dist/npm/switch/switch.component.js +166 -20
  207. package/dist/npm/text-fields-common/text-fields-base.js +1 -1
  208. package/dist/npm/textarea/textarea.component.js +100 -4
  209. package/dist/npm/textbox/textbox.component.js +107 -10
  210. package/dist/npm/textbox/textbox.directive.js +3 -2
  211. package/dist/npm/textbox.module.js +0 -3
  212. package/dist/systemjs/kendo-angular-inputs.js +1 -1
  213. package/package.json +11 -10
  214. package/dist/es/colorpicker/models/preventable-event.js +0 -29
  215. package/dist/es/textbox/floating-label-input-adapter.js +0 -58
  216. package/dist/es/textbox/textbox-container.component.js +0 -224
  217. package/dist/es2015/colorpicker/models/preventable-event.d.ts +0 -21
  218. package/dist/es2015/colorpicker/models/preventable-event.js +0 -27
  219. package/dist/es2015/textbox/floating-label-input-adapter.d.ts +0 -20
  220. package/dist/es2015/textbox/floating-label-input-adapter.js +0 -52
  221. package/dist/es2015/textbox/textbox-container.component.d.ts +0 -59
  222. package/dist/es2015/textbox/textbox-container.component.js +0 -209
  223. package/dist/npm/colorpicker/models/preventable-event.js +0 -31
  224. package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
  225. package/dist/npm/textbox/textbox-container.component.js +0 -226
@@ -0,0 +1,553 @@
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 * as tslib_1 from "tslib";
6
+ import { Component, ElementRef, EventEmitter, forwardRef, HostBinding, Input, isDevMode, NgZone, ChangeDetectorRef, Output, Renderer2, ViewChild } from "@angular/core";
7
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
+ import { Subscription } from 'rxjs';
9
+ import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
10
+ import { isChanged, KendoInput } from '@progress/kendo-angular-common';
11
+ import { FlatColorPickerLocalizationService } from './localization/flatcolorpicker-localization.service';
12
+ import { FlatColorPickerService } from './services/flatcolorpicker.service';
13
+ import { ColorPickerCancelEvent } from './events';
14
+ import { parseColor } from './utils';
15
+ import { isPresent } from '../common/utils';
16
+ import { ColorGradientComponent } from './color-gradient.component';
17
+ import { ColorPaletteComponent } from './color-palette.component';
18
+ import { FlatColorPickerHeaderComponent } from './flatcolorpicker-header.component';
19
+ import { FlatColorPickerActionButtonsComponent } from './flatcolorpicker-actions.component';
20
+ /**
21
+ * Represents the [Kendo UI FlatColorPicker component for Angular]({% slug overview_flatcolorpicker %}).
22
+ *
23
+ * The FlatColorPicker is a powerful tool which allows the user to choose colors through palettes with predefined sets of colors and
24
+ * through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
25
+ */
26
+ var FlatColorPickerComponent = /** @class */ (function () {
27
+ function FlatColorPickerComponent(service, host, localizationService, cdr, renderer, ngZone) {
28
+ var _this = this;
29
+ this.service = service;
30
+ this.host = host;
31
+ this.localizationService = localizationService;
32
+ this.cdr = cdr;
33
+ this.renderer = renderer;
34
+ this.ngZone = ngZone;
35
+ this.hostClasses = true;
36
+ /**
37
+ * Sets the read-only state of the FlatColorPicker.
38
+ *
39
+ * @default false
40
+ */
41
+ this.readonly = false;
42
+ /**
43
+ * Sets the disabled state of the FlatColorPicker.
44
+ *
45
+ * @default false
46
+ */
47
+ this.disabled = false;
48
+ /**
49
+ * Specifies the output format of the FlatColorPicker.
50
+ *
51
+ * If the input value is in a different format, it will be parsed into the specified output `format`.
52
+ *
53
+ * The supported values are:
54
+ * * `rgba` (default)
55
+ * * `hex`
56
+ */
57
+ this.format = 'rgba';
58
+ /**
59
+ * Specifies whether the FlatColorPicker should display a 'Clear color' button.
60
+ *
61
+ * @default true
62
+ */
63
+ this.clearButton = true;
64
+ /**
65
+ * Displays `Apply` and `Cancel` action buttons and a color preview pane.
66
+ *
67
+ * When enabled, the component value will not change immediately upon
68
+ * color selection, but only after the `Apply` button is clicked.
69
+ *
70
+ * The `Cancel` button reverts the current selection to its
71
+ * initial state i.e. to the current value.
72
+ *
73
+ * @default true
74
+ */
75
+ this.preview = true;
76
+ /**
77
+ * Configures the layout of the `Apply` and `Cancel` action buttons.
78
+ * * `start`
79
+ * * `center`
80
+ * * `end` (default)
81
+ * * `stretch`
82
+ */
83
+ this.actionsLayout = 'end';
84
+ /**
85
+ * Specifies the views that will be rendered. Default value is gradient and palette.
86
+ */
87
+ this.views = ['gradient', 'palette'];
88
+ /**
89
+ * Fires each time the component value is changed.
90
+ */
91
+ this.valueChange = new EventEmitter();
92
+ /**
93
+ * Fires when the user cancels the current color selection.
94
+ *
95
+ * The event is emitted on preview pane or on 'Cancel' button click.
96
+ */
97
+ this.cancel = new EventEmitter();
98
+ /**
99
+ * Fires each time the view is about to change.
100
+ * Used to provide a two-way binding for the `activeView` property.
101
+ */
102
+ this.activeViewChange = new EventEmitter();
103
+ /**
104
+ * @hidden
105
+ */
106
+ this.actionButtonClick = new EventEmitter();
107
+ this._tabindex = 0;
108
+ this._gradientSettings = { opacity: true, delay: 0 };
109
+ this._paletteSettings = {};
110
+ this.subscriptions = new Subscription();
111
+ this.notifyNgChanged = function () { };
112
+ this.notifyNgTouched = function () { };
113
+ this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
114
+ var rtl = _a.rtl;
115
+ _this.direction = rtl ? 'rtl' : 'ltr';
116
+ });
117
+ }
118
+ FlatColorPickerComponent_1 = FlatColorPickerComponent;
119
+ Object.defineProperty(FlatColorPickerComponent.prototype, "disabledClass", {
120
+ get: function () {
121
+ return this.disabled;
122
+ },
123
+ enumerable: true,
124
+ configurable: true
125
+ });
126
+ Object.defineProperty(FlatColorPickerComponent.prototype, "ariaReadonly", {
127
+ get: function () {
128
+ return this.readonly;
129
+ },
130
+ enumerable: true,
131
+ configurable: true
132
+ });
133
+ Object.defineProperty(FlatColorPickerComponent.prototype, "hostTabindex", {
134
+ get: function () {
135
+ return this.tabindex;
136
+ },
137
+ enumerable: true,
138
+ configurable: true
139
+ });
140
+ Object.defineProperty(FlatColorPickerComponent.prototype, "value", {
141
+ get: function () {
142
+ return this._value;
143
+ },
144
+ /**
145
+ * Specifies the initially selected color.
146
+ */
147
+ set: function (value) {
148
+ this._value = parseColor(value, this.format, this.gradientSettings.opacity);
149
+ },
150
+ enumerable: true,
151
+ configurable: true
152
+ });
153
+ Object.defineProperty(FlatColorPickerComponent.prototype, "tabindex", {
154
+ get: function () {
155
+ return !this.disabled ? this._tabindex : undefined;
156
+ },
157
+ /**
158
+ * Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
159
+ *
160
+ * @default 0
161
+ */
162
+ set: function (value) {
163
+ var tabindex = Number(value);
164
+ var defaultValue = 0;
165
+ this._tabindex = !isNaN(tabindex) ? tabindex : defaultValue;
166
+ },
167
+ enumerable: true,
168
+ configurable: true
169
+ });
170
+ Object.defineProperty(FlatColorPickerComponent.prototype, "gradientSettings", {
171
+ get: function () {
172
+ return this._gradientSettings;
173
+ },
174
+ /**
175
+ * Configures the gradient view.
176
+ */
177
+ set: function (value) {
178
+ Object.assign(this._gradientSettings, value);
179
+ },
180
+ enumerable: true,
181
+ configurable: true
182
+ });
183
+ Object.defineProperty(FlatColorPickerComponent.prototype, "paletteSettings", {
184
+ get: function () {
185
+ return this._paletteSettings;
186
+ },
187
+ /**
188
+ * Configures the palette view.
189
+ */
190
+ set: function (value) {
191
+ Object.assign(this._paletteSettings, value);
192
+ },
193
+ enumerable: true,
194
+ configurable: true
195
+ });
196
+ FlatColorPickerComponent.prototype.ngOnInit = function () {
197
+ this.selection = this.value;
198
+ this._paletteSettings = this.service.getPaletteSettings(this._paletteSettings, this.format);
199
+ this.setActiveView();
200
+ };
201
+ FlatColorPickerComponent.prototype.ngAfterViewInit = function () {
202
+ this.setHostElementAriaLabel();
203
+ this.initDomEvents();
204
+ this.setSizingVariables();
205
+ };
206
+ FlatColorPickerComponent.prototype.ngOnChanges = function (changes) {
207
+ if (isChanged('value', changes)) {
208
+ this.setHostElementAriaLabel();
209
+ }
210
+ if (isChanged('paletteSettings', changes)) {
211
+ this.setSizingVariables();
212
+ }
213
+ };
214
+ FlatColorPickerComponent.prototype.ngOnDestroy = function () {
215
+ if (this.dynamicRTLSubscription) {
216
+ this.dynamicRTLSubscription.unsubscribe();
217
+ }
218
+ this.subscriptions.unsubscribe();
219
+ };
220
+ Object.defineProperty(FlatColorPickerComponent.prototype, "headerHasContent", {
221
+ /**
222
+ * @hidden
223
+ */
224
+ get: function () {
225
+ return this.preview || this.views.length > 1 || this.clearButton;
226
+ },
227
+ enumerable: true,
228
+ configurable: true
229
+ });
230
+ /**
231
+ * @hidden
232
+ * Used by the FloatingLabel to determine if the component is empty.
233
+ */
234
+ FlatColorPickerComponent.prototype.isEmpty = function () {
235
+ return false;
236
+ };
237
+ /**
238
+ * Focuses the wrapper of the FlatColorPicker.
239
+ */
240
+ FlatColorPickerComponent.prototype.focus = function () {
241
+ if (this.disabled && this.focused) {
242
+ return;
243
+ }
244
+ this.host.nativeElement.focus();
245
+ this.focused = true;
246
+ };
247
+ /**
248
+ * Blurs the wrapper of the FlatColorPicker.
249
+ */
250
+ FlatColorPickerComponent.prototype.blur = function () {
251
+ if (!this.focused) {
252
+ return;
253
+ }
254
+ this.notifyNgTouched();
255
+ this.host.nativeElement.blur();
256
+ this.focused = false;
257
+ };
258
+ /**
259
+ * Clears the value of the FlatColorPicker.
260
+ */
261
+ FlatColorPickerComponent.prototype.reset = function () {
262
+ if (!isPresent(this.value)) {
263
+ return;
264
+ }
265
+ this.value = undefined;
266
+ this.notifyNgChanged(undefined);
267
+ this.setHostElementAriaLabel();
268
+ };
269
+ /**
270
+ * @hidden
271
+ */
272
+ FlatColorPickerComponent.prototype.onViewChange = function (view) {
273
+ var _this = this;
274
+ if (this.activeView === view) {
275
+ return;
276
+ }
277
+ this.activeView = view;
278
+ this.activeViewChange.emit(view);
279
+ if (this.activeView === 'gradient') {
280
+ this.ngZone.runOutsideAngular(function () {
281
+ setTimeout(function () {
282
+ _this.gradient.gradientDragHandle.nativeElement.focus();
283
+ });
284
+ });
285
+ }
286
+ };
287
+ /**
288
+ * @hidden
289
+ */
290
+ FlatColorPickerComponent.prototype.onClearButtonClick = function () {
291
+ this.resetInnerComponentValue();
292
+ this.host.nativeElement.focus();
293
+ };
294
+ /**
295
+ * @hidden
296
+ */
297
+ FlatColorPickerComponent.prototype.handleValueChange = function (color) {
298
+ if (this.value === color) {
299
+ return;
300
+ }
301
+ if (this.preview) {
302
+ this.changeCurrentValue(color);
303
+ }
304
+ else {
305
+ this.setFlatColorPickerValue(color);
306
+ }
307
+ };
308
+ /**
309
+ * @hidden
310
+ */
311
+ FlatColorPickerComponent.prototype.onAction = function (ev) {
312
+ ev.target === 'apply' ? this.setFlatColorPickerValue(this.selection) : this.resetSelection(ev.originalEvent);
313
+ this.actionButtonClick.emit();
314
+ };
315
+ /**
316
+ * @hidden
317
+ */
318
+ FlatColorPickerComponent.prototype.writeValue = function (value) {
319
+ this.value = value;
320
+ };
321
+ /**
322
+ * @hidden
323
+ */
324
+ FlatColorPickerComponent.prototype.registerOnChange = function (fn) {
325
+ this.notifyNgChanged = fn;
326
+ };
327
+ /**
328
+ * @hidden
329
+ */
330
+ FlatColorPickerComponent.prototype.registerOnTouched = function (fn) {
331
+ this.notifyNgTouched = fn;
332
+ };
333
+ /**
334
+ * @hidden
335
+ */
336
+ FlatColorPickerComponent.prototype.setDisabledState = function (isDisabled) {
337
+ this.cdr.markForCheck();
338
+ this.disabled = isDisabled;
339
+ };
340
+ /**
341
+ * @hidden
342
+ */
343
+ FlatColorPickerComponent.prototype.resetSelection = function (ev) {
344
+ var eventArgs = new ColorPickerCancelEvent(ev);
345
+ this.cancel.emit(eventArgs);
346
+ if (!eventArgs.isDefaultPrevented()) {
347
+ this.selection = this.value;
348
+ }
349
+ this.notifyNgTouched();
350
+ };
351
+ FlatColorPickerComponent.prototype.setHostElementAriaLabel = function () {
352
+ var parsed = parseColor(this.value, this.format, this.gradientSettings.opacity);
353
+ var ariaLabelValue = "" + (this.value ? parsed : this.localizationService.get('flatColorPickerNoColor'));
354
+ this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
355
+ };
356
+ FlatColorPickerComponent.prototype.setSizingVariables = function () {
357
+ var paletteTileSize = this.service.paletteTileLayout(this.paletteSettings.tileSize);
358
+ var value = "--kendo-color-preview-columns: " + this.paletteSettings.columns + ";\n --kendo-color-preview-width: " + paletteTileSize.width + "px;\n --kendo-color-preview-height: " + paletteTileSize.height + "px;";
359
+ this.host.nativeElement.querySelector('.k-coloreditor-views.k-vstack').setAttribute('style', value);
360
+ };
361
+ FlatColorPickerComponent.prototype.changeCurrentValue = function (color) {
362
+ this.selection = color;
363
+ this.notifyNgTouched();
364
+ };
365
+ FlatColorPickerComponent.prototype.resetInnerComponentValue = function () {
366
+ this.selection = null;
367
+ if (this.gradient) {
368
+ this.gradient.reset();
369
+ return;
370
+ }
371
+ this.palette.reset();
372
+ };
373
+ FlatColorPickerComponent.prototype.setFlatColorPickerValue = function (color) {
374
+ if (this.value === color) {
375
+ return;
376
+ }
377
+ this.value = color;
378
+ this.valueChange.emit(color);
379
+ this.notifyNgChanged(color);
380
+ this.setHostElementAriaLabel();
381
+ };
382
+ FlatColorPickerComponent.prototype.setActiveView = function () {
383
+ if (!isPresent(this.activeView)) {
384
+ this.activeView = this.views[0];
385
+ return;
386
+ }
387
+ if (isDevMode() && this.views.indexOf(this.activeView) === -1) {
388
+ throw new Error("Invalid configuration: The current activeView is not present in the views collection");
389
+ }
390
+ };
391
+ FlatColorPickerComponent.prototype.initDomEvents = function () {
392
+ var _this = this;
393
+ if (!this.host) {
394
+ return;
395
+ }
396
+ var hostElement = this.host.nativeElement;
397
+ this.ngZone.runOutsideAngular(function () {
398
+ _this.subscriptions.add(_this.renderer.listen(hostElement, 'focus', function () {
399
+ _this.focused = true;
400
+ }));
401
+ _this.subscriptions.add(_this.renderer.listen(hostElement, 'blur', function () {
402
+ _this.focused = false;
403
+ _this.notifyNgTouched();
404
+ }));
405
+ });
406
+ };
407
+ var FlatColorPickerComponent_1;
408
+ tslib_1.__decorate([
409
+ HostBinding('class.k-flatcolorpicker'),
410
+ HostBinding('class.k-coloreditor'),
411
+ tslib_1.__metadata("design:type", Boolean)
412
+ ], FlatColorPickerComponent.prototype, "hostClasses", void 0);
413
+ tslib_1.__decorate([
414
+ HostBinding('class.k-state-disabled'),
415
+ HostBinding('attr.aria-disabled'),
416
+ tslib_1.__metadata("design:type", Boolean),
417
+ tslib_1.__metadata("design:paramtypes", [])
418
+ ], FlatColorPickerComponent.prototype, "disabledClass", null);
419
+ tslib_1.__decorate([
420
+ HostBinding('attr.aria-readonly'),
421
+ tslib_1.__metadata("design:type", Boolean),
422
+ tslib_1.__metadata("design:paramtypes", [])
423
+ ], FlatColorPickerComponent.prototype, "ariaReadonly", null);
424
+ tslib_1.__decorate([
425
+ HostBinding('attr.dir'),
426
+ tslib_1.__metadata("design:type", String)
427
+ ], FlatColorPickerComponent.prototype, "direction", void 0);
428
+ tslib_1.__decorate([
429
+ HostBinding('attr.tabindex'),
430
+ tslib_1.__metadata("design:type", Number),
431
+ tslib_1.__metadata("design:paramtypes", [])
432
+ ], FlatColorPickerComponent.prototype, "hostTabindex", null);
433
+ tslib_1.__decorate([
434
+ Input(),
435
+ tslib_1.__metadata("design:type", Boolean)
436
+ ], FlatColorPickerComponent.prototype, "readonly", void 0);
437
+ tslib_1.__decorate([
438
+ Input(),
439
+ tslib_1.__metadata("design:type", Boolean)
440
+ ], FlatColorPickerComponent.prototype, "disabled", void 0);
441
+ tslib_1.__decorate([
442
+ Input(),
443
+ tslib_1.__metadata("design:type", String)
444
+ ], FlatColorPickerComponent.prototype, "format", void 0);
445
+ tslib_1.__decorate([
446
+ Input(),
447
+ tslib_1.__metadata("design:type", String),
448
+ tslib_1.__metadata("design:paramtypes", [String])
449
+ ], FlatColorPickerComponent.prototype, "value", null);
450
+ tslib_1.__decorate([
451
+ Input(),
452
+ tslib_1.__metadata("design:type", Number),
453
+ tslib_1.__metadata("design:paramtypes", [Number])
454
+ ], FlatColorPickerComponent.prototype, "tabindex", null);
455
+ tslib_1.__decorate([
456
+ Input(),
457
+ tslib_1.__metadata("design:type", Boolean)
458
+ ], FlatColorPickerComponent.prototype, "clearButton", void 0);
459
+ tslib_1.__decorate([
460
+ Input(),
461
+ tslib_1.__metadata("design:type", Boolean)
462
+ ], FlatColorPickerComponent.prototype, "preview", void 0);
463
+ tslib_1.__decorate([
464
+ Input(),
465
+ tslib_1.__metadata("design:type", String)
466
+ ], FlatColorPickerComponent.prototype, "actionsLayout", void 0);
467
+ tslib_1.__decorate([
468
+ Input(),
469
+ tslib_1.__metadata("design:type", String)
470
+ ], FlatColorPickerComponent.prototype, "activeView", void 0);
471
+ tslib_1.__decorate([
472
+ Input(),
473
+ tslib_1.__metadata("design:type", Array)
474
+ ], FlatColorPickerComponent.prototype, "views", void 0);
475
+ tslib_1.__decorate([
476
+ Input(),
477
+ tslib_1.__metadata("design:type", Object),
478
+ tslib_1.__metadata("design:paramtypes", [Object])
479
+ ], FlatColorPickerComponent.prototype, "gradientSettings", null);
480
+ tslib_1.__decorate([
481
+ Input(),
482
+ tslib_1.__metadata("design:type", Object),
483
+ tslib_1.__metadata("design:paramtypes", [Object])
484
+ ], FlatColorPickerComponent.prototype, "paletteSettings", null);
485
+ tslib_1.__decorate([
486
+ Output(),
487
+ tslib_1.__metadata("design:type", EventEmitter)
488
+ ], FlatColorPickerComponent.prototype, "valueChange", void 0);
489
+ tslib_1.__decorate([
490
+ Output(),
491
+ tslib_1.__metadata("design:type", EventEmitter)
492
+ ], FlatColorPickerComponent.prototype, "cancel", void 0);
493
+ tslib_1.__decorate([
494
+ Output(),
495
+ tslib_1.__metadata("design:type", EventEmitter)
496
+ ], FlatColorPickerComponent.prototype, "activeViewChange", void 0);
497
+ tslib_1.__decorate([
498
+ Output(),
499
+ tslib_1.__metadata("design:type", EventEmitter)
500
+ ], FlatColorPickerComponent.prototype, "actionButtonClick", void 0);
501
+ tslib_1.__decorate([
502
+ ViewChild('header', { static: false }),
503
+ tslib_1.__metadata("design:type", FlatColorPickerHeaderComponent)
504
+ ], FlatColorPickerComponent.prototype, "header", void 0);
505
+ tslib_1.__decorate([
506
+ ViewChild('gradient', { static: false }),
507
+ tslib_1.__metadata("design:type", ColorGradientComponent)
508
+ ], FlatColorPickerComponent.prototype, "gradient", void 0);
509
+ tslib_1.__decorate([
510
+ ViewChild('palette', { static: false }),
511
+ tslib_1.__metadata("design:type", ColorPaletteComponent)
512
+ ], FlatColorPickerComponent.prototype, "palette", void 0);
513
+ tslib_1.__decorate([
514
+ ViewChild('footer', { static: false }),
515
+ tslib_1.__metadata("design:type", FlatColorPickerActionButtonsComponent)
516
+ ], FlatColorPickerComponent.prototype, "footer", void 0);
517
+ FlatColorPickerComponent = FlatColorPickerComponent_1 = tslib_1.__decorate([
518
+ Component({
519
+ exportAs: 'kendoFlatColorPicker',
520
+ selector: 'kendo-flatcolorpicker',
521
+ providers: [
522
+ {
523
+ multi: true,
524
+ provide: NG_VALUE_ACCESSOR,
525
+ useExisting: forwardRef(function () { return FlatColorPickerComponent_1; })
526
+ },
527
+ {
528
+ provide: KendoInput,
529
+ useExisting: forwardRef(function () { return FlatColorPickerComponent_1; })
530
+ },
531
+ FlatColorPickerService,
532
+ FlatColorPickerLocalizationService,
533
+ {
534
+ provide: LocalizationService,
535
+ useExisting: FlatColorPickerLocalizationService
536
+ },
537
+ {
538
+ provide: L10N_PREFIX,
539
+ useValue: 'kendo.flatcolorpicker'
540
+ }
541
+ ],
542
+ template: "\n <ng-container kendoFlatColorPickerLocalizedMessages\n i18n-flatColorPickerNoColor=\"kendo.flatcolorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.flatcolorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.flatcolorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.flatcolorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.flatcolorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.flatcolorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.flatcolorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.flatcolorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.flatcolorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.flatcolorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.flatcolorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.flatcolorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.flatcolorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.flatcolorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.flatcolorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <div kendoFlatColorPickerHeader\n *ngIf=\"headerHasContent\"\n #header\n [clearButton]=\"clearButton\"\n [activeView]=\"activeView\"\n [views]=\"views\"\n [value]=\"value\"\n [selection]=\"selection\"\n [preview]=\"preview\"\n (clearButtonClick)=\"onClearButtonClick()\"\n (viewChange)=\"onViewChange($event)\"\n (valuePaneClick)=\"resetSelection($event)\">\n </div>\n <div class=\"k-coloreditor-views k-vstack\">\n <kendo-colorgradient #gradient\n *ngIf=\"activeView === 'gradient'\"\n [tabindex]=\"null\"\n [value]=\"selection\"\n [format]=\"format\"\n [opacity]=\"gradientSettings.opacity\"\n [delay]=\"gradientSettings.delay\"\n [contrastTool]=\"gradientSettings.contrastTool\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleValueChange($event)\"\n >\n </kendo-colorgradient>\n <kendo-colorpalette #palette\n *ngIf=\"activeView === 'palette'\"\n kendoFocusOnDomReady\n [palette]=\"paletteSettings.palette\"\n [columns]=\"paletteSettings.columns\"\n [tileSize]=\"paletteSettings.tileSize\"\n [format]=\"format\"\n [value]=\"selection\"\n (valueChange)=\"handleValueChange($event)\"\n >\n </kendo-colorpalette>\n </div>\n <div kendoFlatColorPickerActionButtons *ngIf=\"preview\"\n #footer\n [ngClass]=\"'k-justify-content-' + actionsLayout\"\n (actionButtonClick)=\"onAction($event)\">\n </div>\n"
543
+ }),
544
+ tslib_1.__metadata("design:paramtypes", [FlatColorPickerService,
545
+ ElementRef,
546
+ LocalizationService,
547
+ ChangeDetectorRef,
548
+ Renderer2,
549
+ NgZone])
550
+ ], FlatColorPickerComponent);
551
+ return FlatColorPickerComponent;
552
+ }());
553
+ export { FlatColorPickerComponent };
@@ -5,20 +5,20 @@
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Inject, Optional } from '@angular/core';
7
7
  import { LocalizationService, L10N_PREFIX, MessageService, RTL } from '@progress/kendo-angular-l10n';
8
- import { ColorPickerLocalizationService } from './colorpicker-localization.service';
8
+ import { FlatColorPickerLocalizationService } from './flatcolorpicker-localization.service';
9
9
  /**
10
10
  * @hidden
11
11
  */
12
12
  var ColorGradientLocalizationService = /** @class */ (function (_super) {
13
13
  tslib_1.__extends(ColorGradientLocalizationService, _super);
14
- function ColorGradientLocalizationService(prefix, messageService, _rtl, colorPickerLocalization) {
14
+ function ColorGradientLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
15
15
  var _this = _super.call(this, prefix, messageService, _rtl) || this;
16
- _this.colorPickerLocalization = colorPickerLocalization;
16
+ _this.flatColorPickerLocalization = flatColorPickerLocalization;
17
17
  return _this;
18
18
  }
19
19
  ColorGradientLocalizationService.prototype.get = function (shortKey) {
20
- if (this.colorPickerLocalization) {
21
- return this.colorPickerLocalization.get(shortKey);
20
+ if (this.flatColorPickerLocalization) {
21
+ return this.flatColorPickerLocalization.get(shortKey);
22
22
  }
23
23
  return _super.prototype.get.call(this, shortKey);
24
24
  };
@@ -26,8 +26,8 @@ var ColorGradientLocalizationService = /** @class */ (function (_super) {
26
26
  tslib_1.__param(0, Inject(L10N_PREFIX)),
27
27
  tslib_1.__param(1, Optional()),
28
28
  tslib_1.__param(2, Optional()), tslib_1.__param(2, Inject(RTL)),
29
- tslib_1.__param(3, Optional()), tslib_1.__param(3, Inject(ColorPickerLocalizationService)),
30
- tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean, ColorPickerLocalizationService])
29
+ tslib_1.__param(3, Optional()), tslib_1.__param(3, Inject(FlatColorPickerLocalizationService)),
30
+ tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
31
31
  ], ColorGradientLocalizationService);
32
32
  return ColorGradientLocalizationService;
33
33
  }(LocalizationService));
@@ -5,20 +5,20 @@
5
5
  import * as tslib_1 from "tslib";
6
6
  import { Inject, Optional } from '@angular/core';
7
7
  import { LocalizationService, L10N_PREFIX, MessageService, RTL } from '@progress/kendo-angular-l10n';
8
- import { ColorPickerLocalizationService } from './colorpicker-localization.service';
8
+ import { FlatColorPickerLocalizationService } from './flatcolorpicker-localization.service';
9
9
  /**
10
10
  * @hidden
11
11
  */
12
12
  var ColorPaletteLocalizationService = /** @class */ (function (_super) {
13
13
  tslib_1.__extends(ColorPaletteLocalizationService, _super);
14
- function ColorPaletteLocalizationService(prefix, messageService, _rtl, colorPickerLocalization) {
14
+ function ColorPaletteLocalizationService(prefix, messageService, _rtl, flatColorPickerLocalization) {
15
15
  var _this = _super.call(this, prefix, messageService, _rtl) || this;
16
- _this.colorPickerLocalization = colorPickerLocalization;
16
+ _this.flatColorPickerLocalization = flatColorPickerLocalization;
17
17
  return _this;
18
18
  }
19
19
  ColorPaletteLocalizationService.prototype.get = function (shortKey) {
20
- if (this.colorPickerLocalization) {
21
- return this.colorPickerLocalization.get(shortKey);
20
+ if (this.flatColorPickerLocalization) {
21
+ return this.flatColorPickerLocalization.get(shortKey);
22
22
  }
23
23
  return _super.prototype.get.call(this, shortKey);
24
24
  };
@@ -26,8 +26,8 @@ var ColorPaletteLocalizationService = /** @class */ (function (_super) {
26
26
  tslib_1.__param(0, Inject(L10N_PREFIX)),
27
27
  tslib_1.__param(1, Optional()),
28
28
  tslib_1.__param(2, Optional()), tslib_1.__param(2, Inject(RTL)),
29
- tslib_1.__param(3, Optional()), tslib_1.__param(3, Inject(ColorPickerLocalizationService)),
30
- tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean, ColorPickerLocalizationService])
29
+ tslib_1.__param(3, Optional()), tslib_1.__param(3, Inject(FlatColorPickerLocalizationService)),
30
+ tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean, FlatColorPickerLocalizationService])
31
31
  ], ColorPaletteLocalizationService);
32
32
  return ColorPaletteLocalizationService;
33
33
  }(LocalizationService));
@@ -33,7 +33,7 @@ var ColorPickerCustomMessagesComponent = /** @class */ (function (_super) {
33
33
  useExisting: forwardRef(function () { return ColorPickerCustomMessagesComponent_1; }) // tslint:disable-line:no-forward-ref
34
34
  }
35
35
  ],
36
- selector: 'kendo-colorpicker-messages, kendo-colorgradient-messages, kendo-colorpalette-messages',
36
+ selector: 'kendo-colorpicker-messages, kendo-flatcolorpicker-messages, kendo-colorgradient-messages, kendo-colorpalette-messages',
37
37
  template: ""
38
38
  }),
39
39
  tslib_1.__metadata("design:paramtypes", [LocalizationService])
@@ -0,0 +1,34 @@
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 * as tslib_1 from "tslib";
6
+ import { Inject, Optional } from '@angular/core';
7
+ import { LocalizationService, L10N_PREFIX, MessageService, RTL } from '@progress/kendo-angular-l10n';
8
+ import { ColorPickerLocalizationService } from './colorpicker-localization.service';
9
+ /**
10
+ * @hidden
11
+ */
12
+ var FlatColorPickerLocalizationService = /** @class */ (function (_super) {
13
+ tslib_1.__extends(FlatColorPickerLocalizationService, _super);
14
+ function FlatColorPickerLocalizationService(prefix, messageService, _rtl, colorPickerLocalization) {
15
+ var _this = _super.call(this, prefix, messageService, _rtl) || this;
16
+ _this.colorPickerLocalization = colorPickerLocalization;
17
+ return _this;
18
+ }
19
+ FlatColorPickerLocalizationService.prototype.get = function (shortKey) {
20
+ if (this.colorPickerLocalization) {
21
+ return this.colorPickerLocalization.get(shortKey);
22
+ }
23
+ return _super.prototype.get.call(this, shortKey);
24
+ };
25
+ FlatColorPickerLocalizationService = tslib_1.__decorate([
26
+ tslib_1.__param(0, Inject(L10N_PREFIX)),
27
+ tslib_1.__param(1, Optional()),
28
+ tslib_1.__param(2, Optional()), tslib_1.__param(2, Inject(RTL)),
29
+ tslib_1.__param(3, Optional()), tslib_1.__param(3, Inject(ColorPickerLocalizationService)),
30
+ tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean, ColorPickerLocalizationService])
31
+ ], FlatColorPickerLocalizationService);
32
+ return FlatColorPickerLocalizationService;
33
+ }(LocalizationService));
34
+ export { FlatColorPickerLocalizationService };