@progress/kendo-angular-inputs 21.4.1 → 22.0.0-develop.1

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 (189) hide show
  1. package/colorpicker/localization/messages.d.ts +1 -1
  2. package/common/radio-checkbox.base.d.ts +1 -1
  3. package/fesm2022/progress-kendo-angular-inputs.mjs +321 -321
  4. package/numerictextbox/localization/messages.d.ts +1 -1
  5. package/otpinput/localization/messages.d.ts +1 -1
  6. package/package.json +17 -25
  7. package/rangeslider/localization/messages.d.ts +1 -1
  8. package/signature/localization/messages.d.ts +1 -1
  9. package/slider/localization/messages.d.ts +1 -1
  10. package/sliders-common/slider-base.d.ts +1 -1
  11. package/switch/localization/messages.d.ts +1 -1
  12. package/text-fields-common/text-fields-base.d.ts +1 -1
  13. package/textbox/localization/messages.d.ts +1 -1
  14. package/esm2022/checkbox/checkbox.component.mjs +0 -227
  15. package/esm2022/checkbox/checkbox.directive.mjs +0 -96
  16. package/esm2022/checkbox/checked-state.mjs +0 -5
  17. package/esm2022/checkbox.module.mjs +0 -42
  18. package/esm2022/colorpicker/adaptiveness/adaptive-close-button.component.mjs +0 -62
  19. package/esm2022/colorpicker/adaptiveness/adaptive-renderer.component.mjs +0 -219
  20. package/esm2022/colorpicker/color-contrast-svg.component.mjs +0 -108
  21. package/esm2022/colorpicker/color-gradient-numeric-label.directive.mjs +0 -37
  22. package/esm2022/colorpicker/color-gradient-text-label.directive.mjs +0 -34
  23. package/esm2022/colorpicker/color-gradient.component.mjs +0 -1110
  24. package/esm2022/colorpicker/color-input.component.mjs +0 -498
  25. package/esm2022/colorpicker/color-palette.component.mjs +0 -629
  26. package/esm2022/colorpicker/colorpicker.component.mjs +0 -1315
  27. package/esm2022/colorpicker/constants.mjs +0 -40
  28. package/esm2022/colorpicker/contrast-validation.component.mjs +0 -83
  29. package/esm2022/colorpicker/contrast.component.mjs +0 -114
  30. package/esm2022/colorpicker/events/active-color-click-event.mjs +0 -55
  31. package/esm2022/colorpicker/events/cancel-event.mjs +0 -18
  32. package/esm2022/colorpicker/events/close-event.mjs +0 -10
  33. package/esm2022/colorpicker/events/kendo-drag-event.mjs +0 -5
  34. package/esm2022/colorpicker/events/open-event.mjs +0 -10
  35. package/esm2022/colorpicker/events.mjs +0 -8
  36. package/esm2022/colorpicker/flatcolorpicker-actions.component.mjs +0 -112
  37. package/esm2022/colorpicker/flatcolorpicker-header.component.mjs +0 -244
  38. package/esm2022/colorpicker/flatcolorpicker.component.mjs +0 -942
  39. package/esm2022/colorpicker/localization/colorgradient-localization.service.mjs +0 -46
  40. package/esm2022/colorpicker/localization/colorpalette-localization.service.mjs +0 -46
  41. package/esm2022/colorpicker/localization/colorpicker-localization.service.mjs +0 -31
  42. package/esm2022/colorpicker/localization/custom-messages.component.mjs +0 -51
  43. package/esm2022/colorpicker/localization/flatcolorpicker-localization.service.mjs +0 -46
  44. package/esm2022/colorpicker/localization/localized-colorpicker-messages.directive.mjs +0 -39
  45. package/esm2022/colorpicker/localization/messages.mjs +0 -201
  46. package/esm2022/colorpicker/models/actions-layout.mjs +0 -5
  47. package/esm2022/colorpicker/models/adaptive-mode.mjs +0 -8
  48. package/esm2022/colorpicker/models/colorpicker-view.mjs +0 -5
  49. package/esm2022/colorpicker/models/gradient-settings.mjs +0 -5
  50. package/esm2022/colorpicker/models/hsva.mjs +0 -5
  51. package/esm2022/colorpicker/models/output-format.mjs +0 -5
  52. package/esm2022/colorpicker/models/palette-presets.mjs +0 -62
  53. package/esm2022/colorpicker/models/palette-settings.mjs +0 -5
  54. package/esm2022/colorpicker/models/popup-settings.mjs +0 -5
  55. package/esm2022/colorpicker/models/rgb.mjs +0 -5
  56. package/esm2022/colorpicker/models/rgba.mjs +0 -5
  57. package/esm2022/colorpicker/models/table-cell.mjs +0 -5
  58. package/esm2022/colorpicker/models/tile-size.mjs +0 -5
  59. package/esm2022/colorpicker/models.mjs +0 -16
  60. package/esm2022/colorpicker/services/color-palette.service.mjs +0 -65
  61. package/esm2022/colorpicker/services/flatcolorpicker.service.mjs +0 -39
  62. package/esm2022/colorpicker/utils/color-parser.mjs +0 -164
  63. package/esm2022/colorpicker/utils/contrast-curve.mjs +0 -85
  64. package/esm2022/colorpicker/utils.mjs +0 -6
  65. package/esm2022/colorpicker.module.mjs +0 -50
  66. package/esm2022/common/dom-utils.mjs +0 -36
  67. package/esm2022/common/formservice.service.mjs +0 -21
  68. package/esm2022/common/math.mjs +0 -65
  69. package/esm2022/common/models/fillmode.mjs +0 -5
  70. package/esm2022/common/models/gutters.mjs +0 -5
  71. package/esm2022/common/models/responsive-breakpoints.mjs +0 -5
  72. package/esm2022/common/models/rounded.mjs +0 -5
  73. package/esm2022/common/models/size.mjs +0 -5
  74. package/esm2022/common/models/styling-classes.mjs +0 -5
  75. package/esm2022/common/models/type.mjs +0 -5
  76. package/esm2022/common/models.mjs +0 -9
  77. package/esm2022/common/radio-checkbox.base.mjs +0 -295
  78. package/esm2022/common/utils.mjs +0 -88
  79. package/esm2022/directives.mjs +0 -430
  80. package/esm2022/form/form.component.mjs +0 -163
  81. package/esm2022/form/formseparator.component.mjs +0 -80
  82. package/esm2022/form/utils.mjs +0 -147
  83. package/esm2022/form.module.mjs +0 -46
  84. package/esm2022/formfield/error.component.mjs +0 -70
  85. package/esm2022/formfield/formfield.component.mjs +0 -353
  86. package/esm2022/formfield/hint.component.mjs +0 -65
  87. package/esm2022/formfield/models/message-align.mjs +0 -5
  88. package/esm2022/formfield/models/orientation.mjs +0 -5
  89. package/esm2022/formfield/models/show-options.mjs +0 -5
  90. package/esm2022/formfield.module.mjs +0 -43
  91. package/esm2022/formfieldset/formfieldset.component.mjs +0 -174
  92. package/esm2022/index.mjs +0 -91
  93. package/esm2022/inputs.module.mjs +0 -91
  94. package/esm2022/maskedtextbox/maskedtextbox.component.mjs +0 -876
  95. package/esm2022/maskedtextbox/masking.service.mjs +0 -189
  96. package/esm2022/maskedtextbox/parsing/combinators.mjs +0 -28
  97. package/esm2022/maskedtextbox/parsing/parsers.mjs +0 -148
  98. package/esm2022/maskedtextbox/parsing/result.mjs +0 -44
  99. package/esm2022/maskedtextbox/parsing/stream.mjs +0 -43
  100. package/esm2022/maskedtextbox.module.mjs +0 -43
  101. package/esm2022/numerictextbox/arrow-direction.mjs +0 -13
  102. package/esm2022/numerictextbox/constants.mjs +0 -28
  103. package/esm2022/numerictextbox/localization/custom-messages.component.mjs +0 -55
  104. package/esm2022/numerictextbox/localization/localized-numerictextbox-messages.directive.mjs +0 -39
  105. package/esm2022/numerictextbox/localization/messages.mjs +0 -33
  106. package/esm2022/numerictextbox/numerictextbox.component.mjs +0 -1314
  107. package/esm2022/numerictextbox/utils.mjs +0 -92
  108. package/esm2022/numerictextbox.module.mjs +0 -46
  109. package/esm2022/otp.module.mjs +0 -44
  110. package/esm2022/otpinput/localization/custom-messages.component.mjs +0 -45
  111. package/esm2022/otpinput/localization/localized-textbox-messages.directive.mjs +0 -39
  112. package/esm2022/otpinput/localization/messages.mjs +0 -34
  113. package/esm2022/otpinput/models/otpinput-type.mjs +0 -5
  114. package/esm2022/otpinput/models/separator-icon.mjs +0 -5
  115. package/esm2022/otpinput/otpinput-separator.component.mjs +0 -93
  116. package/esm2022/otpinput/otpinput.component.mjs +0 -936
  117. package/esm2022/package-metadata.mjs +0 -16
  118. package/esm2022/progress-kendo-angular-inputs.mjs +0 -8
  119. package/esm2022/radiobutton/radiobutton.component.mjs +0 -212
  120. package/esm2022/radiobutton/radiobutton.directive.mjs +0 -81
  121. package/esm2022/radiobutton.module.mjs +0 -43
  122. package/esm2022/rangeslider/localization/custom-messages.component.mjs +0 -53
  123. package/esm2022/rangeslider/localization/localized-rangeslider-messages.directive.mjs +0 -39
  124. package/esm2022/rangeslider/localization/messages.mjs +0 -33
  125. package/esm2022/rangeslider/rangeslider-model.mjs +0 -53
  126. package/esm2022/rangeslider/rangeslider-value.type.mjs +0 -5
  127. package/esm2022/rangeslider/rangeslider.component.mjs +0 -625
  128. package/esm2022/rangeslider.module.mjs +0 -46
  129. package/esm2022/rating/directives/rating-hovered-item.directive.mjs +0 -35
  130. package/esm2022/rating/directives/rating-item.directive.mjs +0 -34
  131. package/esm2022/rating/directives/rating-selected-item.directive.mjs +0 -36
  132. package/esm2022/rating/models/precision.mjs +0 -5
  133. package/esm2022/rating/models/rating-item.interface.mjs +0 -5
  134. package/esm2022/rating/models/selection.mjs +0 -5
  135. package/esm2022/rating/rating.component.mjs +0 -754
  136. package/esm2022/rating.module.mjs +0 -46
  137. package/esm2022/shared/input-separator.component.mjs +0 -55
  138. package/esm2022/shared/input-spacer.component.mjs +0 -56
  139. package/esm2022/shared/shared-events.directive.mjs +0 -102
  140. package/esm2022/shared/utils.mjs +0 -13
  141. package/esm2022/signature/events/close-event.mjs +0 -10
  142. package/esm2022/signature/events/index.mjs +0 -6
  143. package/esm2022/signature/events/open-event.mjs +0 -10
  144. package/esm2022/signature/localization/custom-messages.component.mjs +0 -43
  145. package/esm2022/signature/localization/index.mjs +0 -7
  146. package/esm2022/signature/localization/localized-signature-messages.directive.mjs +0 -39
  147. package/esm2022/signature/localization/messages.mjs +0 -45
  148. package/esm2022/signature/signature.component.mjs +0 -981
  149. package/esm2022/signature.module.mjs +0 -47
  150. package/esm2022/slider/localization/custom-messages.component.mjs +0 -43
  151. package/esm2022/slider/localization/localized-slider-messages.directive.mjs +0 -39
  152. package/esm2022/slider/localization/messages.mjs +0 -39
  153. package/esm2022/slider/slider-model.mjs +0 -32
  154. package/esm2022/slider/slider.component.mjs +0 -671
  155. package/esm2022/slider.module.mjs +0 -48
  156. package/esm2022/sliders-common/label-template.directive.mjs +0 -37
  157. package/esm2022/sliders-common/slider-base.mjs +0 -300
  158. package/esm2022/sliders-common/slider-model.base.mjs +0 -118
  159. package/esm2022/sliders-common/slider-ticks.component.mjs +0 -147
  160. package/esm2022/sliders-common/sliders-util.mjs +0 -206
  161. package/esm2022/sliders-common/title-callback.mjs +0 -5
  162. package/esm2022/switch/events/blur-event.mjs +0 -13
  163. package/esm2022/switch/events/focus-event.mjs +0 -13
  164. package/esm2022/switch/localization/custom-messages.component.mjs +0 -43
  165. package/esm2022/switch/localization/localized-switch-messages.directive.mjs +0 -39
  166. package/esm2022/switch/localization/messages.mjs +0 -33
  167. package/esm2022/switch/switch.component.mjs +0 -585
  168. package/esm2022/switch.module.mjs +0 -44
  169. package/esm2022/text-fields-common/text-fields-base.mjs +0 -150
  170. package/esm2022/textarea/models/adornments-orientation.mjs +0 -5
  171. package/esm2022/textarea/models/flow.mjs +0 -5
  172. package/esm2022/textarea/models/resize.mjs +0 -5
  173. package/esm2022/textarea/models/textarea-settings.mjs +0 -5
  174. package/esm2022/textarea/textarea-prefix.component.mjs +0 -67
  175. package/esm2022/textarea/textarea-suffix.component.mjs +0 -67
  176. package/esm2022/textarea/textarea.component.mjs +0 -740
  177. package/esm2022/textarea/textarea.directive.mjs +0 -288
  178. package/esm2022/textarea.module.mjs +0 -46
  179. package/esm2022/textbox/localization/custom-messages.component.mjs +0 -43
  180. package/esm2022/textbox/localization/localized-textbox-messages.directive.mjs +0 -39
  181. package/esm2022/textbox/localization/messages.mjs +0 -27
  182. package/esm2022/textbox/models/icon-show-options.mjs +0 -5
  183. package/esm2022/textbox/textbox-prefix.directive.mjs +0 -50
  184. package/esm2022/textbox/textbox-suffix.directive.mjs +0 -49
  185. package/esm2022/textbox/textbox.component.mjs +0 -933
  186. package/esm2022/textbox/textbox.directive.mjs +0 -125
  187. package/esm2022/textbox.module.mjs +0 -51
  188. package/esm2022/validators/max.validator.mjs +0 -21
  189. package/esm2022/validators/min.validator.mjs +0 -21
@@ -1,65 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from "@angular/core";
6
- import { isPresent } from '../../common/utils';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- */
11
- export class ColorPaletteService {
12
- colorRows = [];
13
- setColorMatrix(palette, columns) {
14
- this.colorRows = [];
15
- if (!(isPresent(palette) && palette.length)) {
16
- return;
17
- }
18
- columns = columns || palette.length;
19
- for (let start = 0; start < palette.length; start += columns) {
20
- const row = palette.slice(start, columns + start);
21
- this.colorRows.push(row);
22
- }
23
- }
24
- getCellCoordsFor(color) {
25
- if (!isPresent(color)) {
26
- return;
27
- }
28
- for (let row = 0; row < this.colorRows.length; row++) {
29
- for (let col = 0; col < this.colorRows[row].length; col++) {
30
- if (this.colorRows[row][col] === color) {
31
- return { row, col };
32
- }
33
- }
34
- }
35
- }
36
- getColorAt(cellCoords) {
37
- if (!(isPresent(cellCoords) && isPresent(this.colorRows[cellCoords.row]))) {
38
- return;
39
- }
40
- return this.colorRows[cellCoords.row][cellCoords.col];
41
- }
42
- getNextCell(current, horizontalStep, verticalStep) {
43
- if (!(isPresent(current) && isPresent(current.row) && isPresent(current.col))) {
44
- return { row: 0, col: 0 };
45
- }
46
- const row = this.clampIndex(current.row + verticalStep, this.colorRows.length - 1);
47
- const col = this.clampIndex(current.col + horizontalStep, this.colorRows[row].length - 1);
48
- return { row, col };
49
- }
50
- clampIndex(index, max) {
51
- const minArrayIndex = 0;
52
- if (index < minArrayIndex) {
53
- return minArrayIndex;
54
- }
55
- if (index > max) {
56
- return max;
57
- }
58
- return index;
59
- }
60
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorPaletteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorPaletteService });
62
- }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorPaletteService, decorators: [{
64
- type: Injectable
65
- }] });
@@ -1,39 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from "@angular/core";
6
- import { DEFAULT_ACCESSIBLE_PRESET, DEFAULT_PRESET } from "../constants";
7
- import { PALETTEPRESETS } from "../models";
8
- import * as i0 from "@angular/core";
9
- /**
10
- * @hidden
11
- */
12
- export class FlatColorPickerService {
13
- getPaletteSettings(settings, format) {
14
- const defaultPreset = (format !== 'name') ? DEFAULT_PRESET : DEFAULT_ACCESSIBLE_PRESET;
15
- const settingsPalette = settings.palette;
16
- const presetColumns = typeof settingsPalette === 'string' && PALETTEPRESETS[settingsPalette] ?
17
- PALETTEPRESETS[settingsPalette].columns :
18
- undefined;
19
- return {
20
- palette: settingsPalette || defaultPreset,
21
- tileSize: settings.tileSize,
22
- columns: settings.columns || presetColumns || 10
23
- };
24
- }
25
- paletteTileLayout(tileSize) {
26
- if (typeof tileSize === 'number') {
27
- return { width: tileSize, height: tileSize };
28
- }
29
- return {
30
- width: tileSize?.width ? tileSize?.width : tileSize?.height,
31
- height: tileSize?.height ? tileSize?.height : tileSize?.width
32
- };
33
- }
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FlatColorPickerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
35
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FlatColorPickerService });
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FlatColorPickerService, decorators: [{
38
- type: Injectable
39
- }] });
@@ -1,164 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { parseColor as parse, Color, namedColors as colors } from '@progress/kendo-drawing';
6
- import { isPresent, fitIntoBounds } from '../../common/utils';
7
- /**
8
- * @hidden
9
- *
10
- * Returns the hex or rgba string representation of the color.
11
- */
12
- export const parseColor = (value, format, opacityEnabled = false, safe = true) => {
13
- const allowedFormats = ['hex', 'rgba', 'name'];
14
- if (allowedFormats.indexOf(format) === -1) {
15
- throw new Error(`Unsupported color output format '${format}'. The available options are 'hex', 'rgba' or 'name'.`);
16
- }
17
- if (!isPresent(value)) {
18
- return;
19
- }
20
- if (format === 'name') {
21
- return nameFormat(value, safe);
22
- }
23
- const parsedColor = parse(value.trim(), safe);
24
- if (!isPresent(parsedColor)) {
25
- return;
26
- }
27
- const parsedColorResult = format === 'hex' ? getHexValue(parsedColor, opacityEnabled) : parsedColor.toCssRgba();
28
- return parsedColorResult;
29
- };
30
- /**
31
- * @hidden
32
- *
33
- * Returns an HSV object representation of the color string.
34
- */
35
- export const getHSV = (value, safe = true) => {
36
- const parsed = parse(value, safe);
37
- if (!isPresent(parsed)) {
38
- return {};
39
- }
40
- return parsed.toHSV();
41
- };
42
- /**
43
- * @hidden
44
- *
45
- * Returns an RGBA object representation of the color string.
46
- */
47
- export const getRGBA = (value, safe = true) => {
48
- const parsed = parse(value, safe);
49
- if (!isPresent(parsed)) {
50
- return {};
51
- }
52
- return parsed.toBytes();
53
- };
54
- /**
55
- * @hidden
56
- *
57
- * Returns the RGBA string representation of the color.
58
- */
59
- export const getColorFromHSV = (hsva, format = 'rgba', opacityEnabled = false) => {
60
- const hue = fitIntoBounds(hsva.h, 0, 359.9);
61
- const saturation = fitIntoBounds(hsva.s, 0, 1);
62
- const value = fitIntoBounds(hsva.v, 0, 1);
63
- const alpha = fitIntoBounds(hsva.a, 0, 1);
64
- const color = Color.fromHSV(hue, saturation, value, alpha);
65
- return format === 'hex' ? getHexValue(color, opacityEnabled) : color.toCssRgba();
66
- };
67
- /**
68
- * @hidden
69
- *
70
- * Returns the HEX value.
71
- */
72
- export const getHexValue = (color, opacity) => {
73
- return opacity && color.a < 1 ? color.toCss({ alpha: true }) : color.toCss();
74
- };
75
- /**
76
- * @hidden
77
- *
78
- * Returns the RGBA string representation of the color based on the `hue`, assuming the `value`, `saturation` and `alpha` have value of `1`.
79
- */
80
- export const getColorFromHue = (hue) => {
81
- return getColorFromHSV({ h: hue, s: 1, v: 1, a: 1 });
82
- };
83
- /**
84
- * @hidden
85
- *
86
- * Returns the RGBA string representation of the color.
87
- */
88
- export const getColorFromRGBA = (rgba) => {
89
- const red = fitIntoBounds(rgba.r, 0, 255);
90
- const green = fitIntoBounds(rgba.g, 0, 255);
91
- const blue = fitIntoBounds(rgba.b, 0, 255);
92
- const alpha = fitIntoBounds(rgba.a, 0, 1);
93
- return Color.fromBytes(red, green, blue, alpha).toCssRgba();
94
- };
95
- /**
96
- *
97
- * @hidden
98
- */
99
- export function nameFormat(value, safe) {
100
- value = value.toLowerCase().trim();
101
- if (isPresent(colors[value])) {
102
- return value;
103
- }
104
- if (parse(value, safe)) {
105
- value = parse(value, safe).toHex();
106
- }
107
- const key = Object.keys(colors).find(key => colors[key] === value);
108
- if (!key && !safe) {
109
- throw new Error(`The provided color ${value} is not supported for 'format="name"' property.To display ${value} color, the component 'format' property should be set to 'hex' or 'rgba' `);
110
- }
111
- return key;
112
- }
113
- /**
114
- * @hidden
115
- *
116
- * Returns the RGB object representation of the color based on the background color.
117
- */
118
- export const getRGBFromRGBA = (foregroundColor, backgroundColor) => {
119
- const r1 = fitIntoBounds(foregroundColor.r, 0, 255);
120
- const g1 = fitIntoBounds(foregroundColor.g, 0, 255);
121
- const b1 = fitIntoBounds(foregroundColor.b, 0, 255);
122
- const a1 = fitIntoBounds(foregroundColor.a, 0, 1);
123
- const r2 = fitIntoBounds(backgroundColor.r, 0, 255);
124
- const g2 = fitIntoBounds(backgroundColor.g, 0, 255);
125
- const b2 = fitIntoBounds(backgroundColor.b, 0, 255);
126
- return {
127
- r: Math.round(((1 - a1) * r2) + (a1 * r1)),
128
- g: Math.round(((1 - a1) * g2) + (a1 * g1)),
129
- b: Math.round(((1 - a1) * b2) + (a1 * b1))
130
- };
131
- };
132
- /**
133
- * @hidden
134
- *
135
- * Returns the relative luminance.
136
- */
137
- export const getLuminance = (rgb) => {
138
- const a = [rgb.r, rgb.g, rgb.b].map(function (v) {
139
- v /= 255;
140
- return v <= 0.03928
141
- ? v / 12.92
142
- : Math.pow((v + 0.055) / 1.055, 2.4);
143
- });
144
- return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;
145
- };
146
- /**
147
- * @hidden
148
- *
149
- * Returns the color contrast.
150
- */
151
- export const getContrast = (luminance1, luminance2) => {
152
- const brightest = Math.max(luminance1, luminance2);
153
- const darkest = Math.min(luminance1, luminance2);
154
- return (brightest + 0.05)
155
- / (darkest + 0.05);
156
- };
157
- /**
158
- * @hidden
159
- *
160
- * Returns the color contrast from two RGBA colors.
161
- */
162
- export const getContrastFromTwoRGBAs = (a, b) => {
163
- return getContrast(getLuminance(getRGBFromRGBA(a, b)), getLuminance(getRGBFromRGBA(b, { r: 0, g: 0, b: 0, a: 1 })));
164
- };
@@ -1,85 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export const bezierCommand = (controlPointCalc) => (point, i, a) => {
9
- // start control point
10
- const [cpsX, cpsY] = controlPointCalc(a[i - 1], a[i - 2], point);
11
- // end control point
12
- const [cpeX, cpeY] = controlPointCalc(point, a[i - 1], a[i + 1], true);
13
- return `C ${cpsX},${cpsY} ${cpeX},${cpeY} ${point[0]},${point[1]}`;
14
- };
15
- /**
16
- * @hidden
17
- */
18
- export const controlPoint = (lineCalc) => (current, previous, next, reverse) => {
19
- // when 'current' is the first or last point of the array
20
- // 'previous' and 'next' are undefined
21
- // replace with 'current'
22
- const p = previous || current;
23
- const n = next || current;
24
- const smooth = 0.1;
25
- // properties of the line between previous and next
26
- const l = lineCalc(p, n);
27
- // If is end-control-point, add PI to the angle to go backward
28
- const angle = l.angle + (reverse ? Math.PI : 0);
29
- const length = l.length * smooth;
30
- // The control point position is relative to the current point
31
- const x = current[0] + Math.cos(angle) * length;
32
- const y = current[1] + Math.sin(angle) * length;
33
- return [x, y];
34
- };
35
- /**
36
- * @hidden
37
- */
38
- export const line = (pointA, pointB) => {
39
- const lengthX = pointB[0] - pointA[0];
40
- const lengthY = pointB[1] - pointA[1];
41
- return {
42
- length: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
43
- angle: Math.atan2(lengthY, lengthX)
44
- };
45
- };
46
- /**
47
- * @hidden
48
- */
49
- export const d = (points, command) => {
50
- if (points.length === 0) {
51
- return '';
52
- }
53
- // build the d attributes by looping over the points
54
- const d = points.reduce((acc, point, i, a) => i === 0 ?
55
- // if first point
56
- `M ${point[0]},${point[1]}` :
57
- // else
58
- `${acc} ${command(point, i, a)}`, '');
59
- return d;
60
- };
61
- /**
62
- * @hidden
63
- *
64
- * Render the svg <path> element.
65
- *
66
- * @param points (array) Represents the points coordinates as an array of tuples.
67
- * @param command (function) The command that is used (bezierCommand, lineCommand).
68
- * @param point (array) [x,y] Represents the current point coordinates.
69
- * @param i (integer) Represents the index of 'point' in the array 'a'.
70
- * @param a (array) Represents the complete array of points coordinates.
71
- * @output (string) a svg path command.
72
- * @output (string) a Svg <path> element
73
- */
74
- export const svgPath = (points, command) => {
75
- if (points.length === 0) {
76
- return '';
77
- }
78
- // build the d attributes by looping over the points
79
- const d = points.reduce((acc, point, i, a) => i === 0 ?
80
- // if first point
81
- `M ${point[0]},${point[1]}` :
82
- // else
83
- `${acc} ${command(point, i, a)}`, '');
84
- return d;
85
- };
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export * from './utils/color-parser';
6
- export * from './utils/contrast-curve';
@@ -1,50 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { NgModule } from '@angular/core';
6
- import { KENDO_COLORGRADIENT, KENDO_COLORPALETTE, KENDO_COLORPICKER, KENDO_FLATCOLORPICKER } from './directives';
7
- import { PopupService } from '@progress/kendo-angular-popup';
8
- import { ResizeBatchService } from '@progress/kendo-angular-common';
9
- import { IconsService } from '@progress/kendo-angular-icons';
10
- import { AdaptiveService } from '@progress/kendo-angular-utils';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "./colorpicker/colorpicker.component";
13
- import * as i2 from "./colorpicker/localization/custom-messages.component";
14
- import * as i3 from "./colorpicker/flatcolorpicker.component";
15
- import * as i4 from "./colorpicker/color-gradient.component";
16
- import * as i5 from "./colorpicker/color-palette.component";
17
- //IMPORTANT: NgModule export kept for backwards compatibility
18
- /**
19
- * Defines the [NgModule](link:site.data.urls.angular['ngmoduleapi']) for the ColorPicker.
20
- *
21
- * Use this module to add ColorPicker features to your NgModule-based Angular application.
22
- *
23
- * @example
24
- * ```typescript
25
- * import { ColorPickerModule } from '@progress/kendo-angular-inputs';
26
- * import { NgModule } from '@angular/core';
27
- * import { BrowserModule } from '@angular/platform-browser';
28
- * import { AppComponent } from './app.component';
29
- *
30
- * @NgModule({
31
- * declarations: [AppComponent],
32
- * imports: [BrowserModule, ColorPickerModule],
33
- * bootstrap: [AppComponent]
34
- * })
35
- * export class AppModule {}
36
- * ```
37
- */
38
- export class ColorPickerModule {
39
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ColorPickerModule, imports: [i1.ColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i3.FlatColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i4.ColorGradientComponent, i2.ColorPickerCustomMessagesComponent, i5.ColorPaletteComponent, i2.ColorPickerCustomMessagesComponent], exports: [i1.ColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i3.FlatColorPickerComponent, i2.ColorPickerCustomMessagesComponent, i4.ColorGradientComponent, i2.ColorPickerCustomMessagesComponent, i5.ColorPaletteComponent, i2.ColorPickerCustomMessagesComponent] });
41
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorPickerModule, providers: [PopupService, IconsService, ResizeBatchService, AdaptiveService], imports: [i1.ColorPickerComponent, i3.FlatColorPickerComponent, i4.ColorGradientComponent] });
42
- }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColorPickerModule, decorators: [{
44
- type: NgModule,
45
- args: [{
46
- imports: [...KENDO_COLORPICKER, ...KENDO_FLATCOLORPICKER, ...KENDO_COLORGRADIENT, ...KENDO_COLORPALETTE],
47
- exports: [...KENDO_COLORPICKER, ...KENDO_FLATCOLORPICKER, ...KENDO_COLORGRADIENT, ...KENDO_COLORPALETTE],
48
- providers: [PopupService, IconsService, ResizeBatchService, AdaptiveService]
49
- }]
50
- }] });
@@ -1,36 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- const UNTOUCHED = 'ng-untouched';
6
- const toClassList = (classNames) => String(classNames).trim().split(' ');
7
- /**
8
- * @hidden
9
- */
10
- export const hasClass = (element, className) => Boolean(toClassList(element.className).find((name) => name === className));
11
- /**
12
- * @hidden
13
- */
14
- export function invokeElementMethod(element, name, ...args) {
15
- if (element && element.nativeElement) {
16
- // eslint-disable-next-line prefer-spread
17
- return element.nativeElement[name].apply(element.nativeElement, args);
18
- }
19
- }
20
- /**
21
- * @hidden
22
- */
23
- export const isUntouched = (element) => element && element.nativeElement && hasClass(element.nativeElement, UNTOUCHED);
24
- /**
25
- * @hidden
26
- */
27
- export const containsFocus = (hostElement, contender) => hostElement && contender && (hostElement === contender || hostElement.contains(contender));
28
- /**
29
- * @hidden
30
- */
31
- export const closest = (node, predicate) => {
32
- while (node && !predicate(node)) {
33
- node = node.parentNode;
34
- }
35
- return node;
36
- };
@@ -1,21 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import { BehaviorSubject } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- */
11
- export class FormService {
12
- formWidth = new BehaviorSubject(null);
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
14
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormService, providedIn: 'root' });
15
- }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FormService, decorators: [{
17
- type: Injectable,
18
- args: [{
19
- providedIn: 'root',
20
- }]
21
- }] });
@@ -1,65 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- const MAX_PRECISION = 20;
9
- /**
10
- * @hidden
11
- */
12
- export const limitPrecision = (precision) => Math.min(precision, MAX_PRECISION);
13
- /**
14
- * @hidden
15
- */
16
- export const fractionLength = (value) => {
17
- return (String(value).split('.')[1] || "").length;
18
- };
19
- const maxFractionLength = (value1, value2) => {
20
- return Math.max(fractionLength(value1), fractionLength(value2));
21
- };
22
- /**
23
- * @hidden
24
- */
25
- export const toFixedPrecision = (value, precision) => {
26
- const maxPrecision = limitPrecision(precision);
27
- return parseFloat(value.toFixed(maxPrecision));
28
- };
29
- /**
30
- * @hidden
31
- */
32
- export const add = (value1, value2) => {
33
- const maxPrecision = maxFractionLength(value1, value2);
34
- return toFixedPrecision(value1 + value2, maxPrecision);
35
- };
36
- /**
37
- * @hidden
38
- */
39
- export const subtract = (value1, value2) => {
40
- return add(value1, -value2);
41
- };
42
- /**
43
- * @hidden
44
- */
45
- export const multiply = (value1, value2) => {
46
- const maxPrecision = fractionLength(value1) + fractionLength(value2);
47
- return toFixedPrecision(value1 * value2, maxPrecision);
48
- };
49
- /**
50
- * @hidden
51
- */
52
- export const divide = (dividend, divisor) => {
53
- if (divisor === 0) {
54
- return NaN;
55
- }
56
- const power = maxFractionLength(dividend, divisor);
57
- const correctionValue = Math.pow(10, power);
58
- return ((correctionValue * dividend) / (correctionValue * divisor));
59
- };
60
- /**
61
- * @hidden
62
- */
63
- export const remainder = (dividend, divisor) => {
64
- return Math.abs(subtract(dividend, multiply(divisor, Math.floor(divide(dividend, divisor)))));
65
- };
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,9 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export * from './models/fillmode';
6
- export * from './models/rounded';
7
- export * from './models/size';
8
- export * from './models/styling-classes';
9
- export * from './models/type';