@progress/kendo-angular-inputs 17.0.0-develop.9 → 17.0.1-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.
- package/checkbox/checkbox.component.d.ts +1 -1
- package/checkbox/checkbox.directive.d.ts +1 -1
- package/checkbox/checked-state.d.ts +1 -1
- package/colorpicker/color-contrast-svg.component.d.ts +1 -1
- package/colorpicker/color-gradient-numeric-label.directive.d.ts +1 -1
- package/colorpicker/color-gradient.component.d.ts +1 -1
- package/colorpicker/color-input.component.d.ts +1 -1
- package/colorpicker/color-palette.component.d.ts +1 -1
- package/colorpicker/colorpicker.component.d.ts +1 -1
- package/colorpicker/contrast-validation.component.d.ts +1 -1
- package/colorpicker/contrast.component.d.ts +1 -1
- package/colorpicker/flatcolorpicker-actions.component.d.ts +1 -1
- package/colorpicker/flatcolorpicker-header.component.d.ts +1 -1
- package/colorpicker/flatcolorpicker.component.d.ts +1 -1
- package/colorpicker/localization/messages.d.ts +1 -1
- package/colorpicker/models/actions-layout.d.ts +1 -1
- package/colorpicker/models/colorpicker-view.d.ts +1 -1
- package/colorpicker/models/output-format.d.ts +1 -1
- package/common/models/fillmode.d.ts +1 -1
- package/common/models/rounded.d.ts +2 -2
- package/common/models/size.d.ts +1 -1
- package/common/models/type.d.ts +1 -1
- package/common/radio-checkbox.base.d.ts +1 -1
- package/common/utils.d.ts +1 -1
- package/{esm2020 → esm2022}/checkbox/checkbox.component.mjs +49 -44
- package/{esm2020 → esm2022}/checkbox/checkbox.directive.mjs +12 -10
- package/{esm2020 → esm2022}/checkbox.module.mjs +4 -4
- package/{esm2020 → esm2022}/colorpicker/color-contrast-svg.component.mjs +13 -7
- package/{esm2020 → esm2022}/colorpicker/color-gradient-numeric-label.directive.mjs +6 -3
- package/{esm2020 → esm2022}/colorpicker/color-gradient.component.mjs +142 -125
- package/{esm2020 → esm2022}/colorpicker/color-input.component.mjs +69 -49
- package/{esm2020 → esm2022}/colorpicker/color-palette.component.mjs +129 -98
- package/{esm2020 → esm2022}/colorpicker/colorpicker.component.mjs +211 -158
- package/{esm2020 → esm2022}/colorpicker/contrast-validation.component.mjs +10 -6
- package/{esm2020 → esm2022}/colorpicker/contrast.component.mjs +9 -6
- package/{esm2020 → esm2022}/colorpicker/events/active-color-click-event.mjs +2 -1
- package/{esm2020 → esm2022}/colorpicker/events/cancel-event.mjs +4 -0
- package/{esm2020 → esm2022}/colorpicker/flatcolorpicker-actions.component.mjs +11 -8
- package/{esm2020 → esm2022}/colorpicker/flatcolorpicker-header.component.mjs +23 -13
- package/{esm2020 → esm2022}/colorpicker/flatcolorpicker.component.mjs +155 -127
- package/{esm2020 → esm2022}/colorpicker/localization/colorgradient-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/colorpicker/localization/colorpalette-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/colorpicker/localization/colorpicker-localization.service.mjs +3 -3
- package/{esm2020 → esm2022}/colorpicker/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/colorpicker/localization/flatcolorpicker-localization.service.mjs +4 -3
- package/{esm2020 → esm2022}/colorpicker/localization/localized-colorpicker-messages.directive.mjs +9 -8
- package/esm2022/colorpicker/localization/messages.mjs +183 -0
- package/{esm2020 → esm2022}/colorpicker/services/color-palette.service.mjs +4 -6
- package/{esm2020 → esm2022}/colorpicker/services/flatcolorpicker.service.mjs +3 -3
- package/{esm2020 → esm2022}/colorpicker.module.mjs +4 -4
- package/{esm2020 → esm2022}/common/radio-checkbox.base.mjs +80 -56
- package/{esm2020 → esm2022}/formfield/error.component.mjs +18 -20
- package/{esm2020 → esm2022}/formfield/formfield.component.mjs +67 -55
- package/{esm2020 → esm2022}/formfield/hint.component.mjs +17 -19
- package/{esm2020 → esm2022}/formfield.module.mjs +4 -4
- package/{esm2020 → esm2022}/index.mjs +0 -1
- package/esm2022/inputs.module.mjs +96 -0
- package/{esm2020 → esm2022}/maskedtextbox/maskedtextbox.component.mjs +263 -223
- package/{esm2020 → esm2022}/maskedtextbox/masking.service.mjs +12 -14
- package/{esm2020 → esm2022}/maskedtextbox/parsing/parsers.mjs +1 -0
- package/{esm2020 → esm2022}/maskedtextbox/parsing/result.mjs +3 -0
- package/{esm2020 → esm2022}/maskedtextbox/parsing/stream.mjs +4 -2
- package/{esm2020 → esm2022}/maskedtextbox.module.mjs +7 -7
- package/{esm2020 → esm2022}/numerictextbox/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/numerictextbox/localization/localized-numerictextbox-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/numerictextbox/localization/messages.mjs +11 -3
- package/{esm2020 → esm2022}/numerictextbox/numerictextbox.component.mjs +367 -319
- package/{esm2020 → esm2022}/numerictextbox.module.mjs +7 -7
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/radiobutton/radiobutton.component.mjs +58 -51
- package/{esm2020 → esm2022}/radiobutton/radiobutton.directive.mjs +12 -10
- package/{esm2020 → esm2022}/radiobutton.module.mjs +4 -4
- package/{esm2020 → esm2022}/rangeslider/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/rangeslider/localization/localized-rangeslider-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/rangeslider/localization/messages.mjs +11 -3
- package/{esm2020 → esm2022}/rangeslider/rangeslider-model.mjs +2 -0
- package/{esm2020 → esm2022}/rangeslider/rangeslider.component.mjs +117 -101
- package/{esm2020 → esm2022}/rangeslider.module.mjs +4 -4
- package/{esm2020 → esm2022}/rating/directives/rating-hovered-item.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rating/directives/rating-item.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rating/directives/rating-selected-item.directive.mjs +4 -3
- package/{esm2020 → esm2022}/rating/rating.component.mjs +96 -76
- package/{esm2020 → esm2022}/rating.module.mjs +4 -4
- package/{esm2020 → esm2022}/shared/input-separator.component.mjs +10 -12
- package/{esm2020 → esm2022}/shared/shared-events.directive.mjs +13 -7
- package/{esm2020 → esm2022}/shared/textarea.directive.mjs +66 -52
- package/{esm2020 → esm2022}/signature/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/signature/localization/localized-signature-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/signature/localization/messages.mjs +19 -3
- package/{esm2020 → esm2022}/signature/signature.component.mjs +205 -151
- package/{esm2020 → esm2022}/signature.module.mjs +4 -4
- package/{esm2020 → esm2022}/slider/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/slider/localization/localized-slider-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/slider/localization/messages.mjs +15 -3
- package/{esm2020 → esm2022}/slider/slider-model.mjs +1 -0
- package/{esm2020 → esm2022}/slider/slider.component.mjs +121 -99
- package/{esm2020 → esm2022}/slider.module.mjs +4 -4
- package/{esm2020 → esm2022}/sliders-common/label-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/sliders-common/slider-base.mjs +112 -90
- package/{esm2020 → esm2022}/sliders-common/slider-model.base.mjs +6 -0
- package/{esm2020 → esm2022}/sliders-common/slider-ticks.component.mjs +19 -11
- package/{esm2020 → esm2022}/switch/events/blur-event.mjs +4 -0
- package/{esm2020 → esm2022}/switch/events/focus-event.mjs +4 -0
- package/{esm2020 → esm2022}/switch/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/switch/localization/localized-switch-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/switch/localization/messages.mjs +11 -3
- package/{esm2020 → esm2022}/switch/switch.component.mjs +125 -106
- package/{esm2020 → esm2022}/switch.module.mjs +4 -4
- package/esm2022/text-fields-common/text-fields-base.mjs +150 -0
- package/{esm2020 → esm2022}/textarea/textarea-prefix.component.mjs +12 -14
- package/{esm2020 → esm2022}/textarea/textarea-suffix.component.mjs +12 -14
- package/{esm2020 → esm2022}/textarea/textarea.component.mjs +173 -144
- package/{esm2020 → esm2022}/textarea.module.mjs +7 -7
- package/{esm2020 → esm2022}/textbox/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/textbox/localization/localized-textbox-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/textbox/localization/messages.mjs +7 -3
- package/{esm2020 → esm2022}/textbox/textbox-prefix.directive.mjs +8 -7
- package/{esm2020 → esm2022}/textbox/textbox-suffix.directive.mjs +8 -7
- package/{esm2020 → esm2022}/textbox/textbox.component.mjs +286 -204
- package/{esm2020 → esm2022}/textbox/textbox.directive.mjs +36 -33
- package/{esm2020 → esm2022}/textbox.module.mjs +7 -7
- package/{fesm2020 → fesm2022}/progress-kendo-angular-inputs.mjs +3718 -2910
- package/formfield/error.component.d.ts +1 -1
- package/formfield/formfield.component.d.ts +1 -1
- package/formfield/hint.component.d.ts +1 -1
- package/formfield/models/message-align.d.ts +1 -1
- package/formfield/models/orientation.d.ts +1 -1
- package/formfield/models/show-options.d.ts +1 -1
- package/index.d.ts +0 -1
- package/inputs.module.d.ts +1 -1
- package/maskedtextbox/maskedtextbox.component.d.ts +1 -1
- package/maskedtextbox.module.d.ts +1 -1
- package/numerictextbox/localization/messages.d.ts +1 -1
- package/numerictextbox/numerictextbox.component.d.ts +1 -1
- package/numerictextbox.module.d.ts +1 -1
- package/package.json +20 -26
- package/radiobutton/radiobutton.component.d.ts +1 -1
- package/radiobutton/radiobutton.directive.d.ts +1 -1
- package/rangeslider/localization/messages.d.ts +1 -1
- package/rangeslider/rangeslider-model.d.ts +0 -1
- package/rangeslider/rangeslider-value.type.d.ts +1 -1
- package/rangeslider/rangeslider.component.d.ts +1 -1
- package/rating/models/precision.d.ts +1 -1
- package/rating/models/selection.d.ts +1 -1
- package/rating/rating.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +1 -1
- package/shared/input-separator.component.d.ts +1 -1
- package/shared/shared-events.directive.d.ts +1 -1
- package/shared/textarea.directive.d.ts +1 -1
- package/signature/localization/messages.d.ts +1 -1
- package/signature/signature.component.d.ts +1 -1
- package/slider/localization/messages.d.ts +1 -1
- package/slider/slider-model.d.ts +0 -1
- package/slider/slider.component.d.ts +1 -1
- package/sliders-common/slider-base.d.ts +1 -1
- package/sliders-common/slider-ticks.component.d.ts +1 -1
- package/sliders-common/title-callback.d.ts +1 -1
- package/switch/localization/messages.d.ts +1 -1
- package/switch/switch.component.d.ts +1 -1
- package/text-fields-common/text-fields-base.d.ts +1 -1
- package/textarea/models/adornments-orientation.d.ts +1 -1
- package/textarea/models/flow.d.ts +1 -1
- package/textarea/models/resize.d.ts +1 -1
- package/textarea/textarea-prefix.component.d.ts +1 -1
- package/textarea/textarea-suffix.component.d.ts +1 -1
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea.module.d.ts +1 -1
- package/textbox/localization/messages.d.ts +1 -1
- package/textbox/models/icon-show-options.d.ts +1 -1
- package/textbox/textbox-prefix.directive.d.ts +1 -1
- package/textbox/textbox-suffix.directive.d.ts +1 -1
- package/textbox/textbox.component.d.ts +1 -1
- package/textbox/textbox.directive.d.ts +1 -1
- package/textbox.module.d.ts +1 -1
- package/esm2020/colorpicker/localization/messages.mjs +0 -75
- package/esm2020/inputs.module.mjs +0 -96
- package/esm2020/shared.module.mjs +0 -32
- package/esm2020/text-fields-common/text-fields-base.mjs +0 -131
- package/fesm2015/progress-kendo-angular-inputs.mjs +0 -17268
- package/shared.module.d.ts +0 -19
- /package/{esm2020 → esm2022}/checkbox/checked-state.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events/close-event.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events/kendo-drag-event.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events/open-event.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/events.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/actions-layout.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/colorpicker-view.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/gradient-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/hsva.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/output-format.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/palette-presets.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/palette-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/popup-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/rgb.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/rgba.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/table-cell.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models/tile-size.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/models.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/utils/color-parser.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/utils/contrast-curve.mjs +0 -0
- /package/{esm2020 → esm2022}/colorpicker/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/common/dom-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/common/math.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/fillmode.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/rounded.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/size.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/styling-classes.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models/type.mjs +0 -0
- /package/{esm2020 → esm2022}/common/models.mjs +0 -0
- /package/{esm2020 → esm2022}/common/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/formfield/models/message-align.mjs +0 -0
- /package/{esm2020 → esm2022}/formfield/models/orientation.mjs +0 -0
- /package/{esm2020 → esm2022}/formfield/models/show-options.mjs +0 -0
- /package/{esm2020 → esm2022}/maskedtextbox/parsing/combinators.mjs +0 -0
- /package/{esm2020 → esm2022}/numerictextbox/arrow-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/numerictextbox/constants.mjs +0 -0
- /package/{esm2020 → esm2022}/numerictextbox/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-inputs.mjs +0 -0
- /package/{esm2020 → esm2022}/rangeslider/rangeslider-value.type.mjs +0 -0
- /package/{esm2020 → esm2022}/rating/models/precision.mjs +0 -0
- /package/{esm2020 → esm2022}/rating/models/rating-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/rating/models/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/shared/utils.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/events/close-event.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/events/index.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/events/open-event.mjs +0 -0
- /package/{esm2020 → esm2022}/signature/localization/index.mjs +0 -0
- /package/{esm2020 → esm2022}/sliders-common/sliders-util.mjs +0 -0
- /package/{esm2020 → esm2022}/sliders-common/title-callback.mjs +0 -0
- /package/{esm2020 → esm2022}/textarea/models/adornments-orientation.mjs +0 -0
- /package/{esm2020 → esm2022}/textarea/models/flow.mjs +0 -0
- /package/{esm2020 → esm2022}/textarea/models/resize.mjs +0 -0
- /package/{esm2020 → esm2022}/textbox/models/icon-show-options.mjs +0 -0
- /package/{esm2020 → esm2022}/validators/max.validator.mjs +0 -0
- /package/{esm2020 → esm2022}/validators/min.validator.mjs +0 -0
|
@@ -31,81 +31,20 @@ let serial = 0;
|
|
|
31
31
|
* The ColorPalette is independently used by `kendo-colorpicker` and can be directly added to the page.
|
|
32
32
|
*/
|
|
33
33
|
export class ColorPaletteComponent {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.id = `k-colorpalette-${serial++}`;
|
|
49
|
-
/**
|
|
50
|
-
* Specifies the output format of the ColorPaletteComponent.
|
|
51
|
-
* The input value may be in a different format. However, it will be parsed into the output `format`
|
|
52
|
-
* after the component processes it.
|
|
53
|
-
*
|
|
54
|
-
* The supported values are:
|
|
55
|
-
* * (Default) `hex`
|
|
56
|
-
* * `rgba`
|
|
57
|
-
* * `name`
|
|
58
|
-
*/
|
|
59
|
-
this.format = 'hex';
|
|
60
|
-
/**
|
|
61
|
-
* Sets the disabled state of the ColorPalette. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_colorpalette#toc-managing-the-colorpalette-disabled-state-in-reactive-forms).
|
|
62
|
-
*/
|
|
63
|
-
this.disabled = false;
|
|
64
|
-
/**
|
|
65
|
-
* Sets the read-only state of the ColorPalette.
|
|
66
|
-
*
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
|
-
this.readonly = false;
|
|
70
|
-
/**
|
|
71
|
-
* Specifies the size of a color cell.
|
|
72
|
-
*
|
|
73
|
-
* The possible values are:
|
|
74
|
-
* * (Default) `tileSize = 24`
|
|
75
|
-
* * `{ width: number, height: number }`
|
|
76
|
-
*/
|
|
77
|
-
this.tileSize = { width: DEFAULT_TILE_SIZE, height: DEFAULT_TILE_SIZE };
|
|
78
|
-
/**
|
|
79
|
-
* Fires each time the color selection is changed.
|
|
80
|
-
*/
|
|
81
|
-
this.selectionChange = new EventEmitter();
|
|
82
|
-
/**
|
|
83
|
-
* Fires each time the value is changed.
|
|
84
|
-
*/
|
|
85
|
-
this.valueChange = new EventEmitter();
|
|
86
|
-
/**
|
|
87
|
-
* Fires each time the user selects a cell with the mouse or presses `Enter`.
|
|
88
|
-
*
|
|
89
|
-
* @hidden
|
|
90
|
-
*/
|
|
91
|
-
this.cellSelection = new EventEmitter();
|
|
92
|
-
/**
|
|
93
|
-
* @hidden
|
|
94
|
-
*/
|
|
95
|
-
this.hostClasses = true;
|
|
96
|
-
/**
|
|
97
|
-
* @hidden
|
|
98
|
-
*/
|
|
99
|
-
this.uniqueId = guid();
|
|
100
|
-
this._tabindex = 0;
|
|
101
|
-
this.subs = new Subscription();
|
|
102
|
-
this.notifyNgTouched = () => { };
|
|
103
|
-
this.notifyNgChanged = () => { };
|
|
104
|
-
validatePackage(packageMetadata);
|
|
105
|
-
this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
|
|
106
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
|
107
|
-
});
|
|
108
|
-
}
|
|
34
|
+
host;
|
|
35
|
+
service;
|
|
36
|
+
cdr;
|
|
37
|
+
renderer;
|
|
38
|
+
localizationService;
|
|
39
|
+
ngZone;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
direction;
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
role = 'grid';
|
|
109
48
|
/**
|
|
110
49
|
* @hidden
|
|
111
50
|
*/
|
|
@@ -118,6 +57,21 @@ export class ColorPaletteComponent {
|
|
|
118
57
|
get paletteId() {
|
|
119
58
|
return this.id;
|
|
120
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
id = `k-colorpalette-${serial++}`;
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the output format of the ColorPaletteComponent.
|
|
66
|
+
* The input value may be in a different format. However, it will be parsed into the output `format`
|
|
67
|
+
* after the component processes it.
|
|
68
|
+
*
|
|
69
|
+
* The supported values are:
|
|
70
|
+
* * (Default) `hex`
|
|
71
|
+
* * `rgba`
|
|
72
|
+
* * `name`
|
|
73
|
+
*/
|
|
74
|
+
format = 'hex';
|
|
121
75
|
/**
|
|
122
76
|
* Specifies the value of the initially selected color.
|
|
123
77
|
*/
|
|
@@ -171,6 +125,24 @@ export class ColorPaletteComponent {
|
|
|
171
125
|
get tabindex() {
|
|
172
126
|
return !this.disabled ? this._tabindex : undefined;
|
|
173
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Sets the disabled state of the ColorPalette. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_colorpalette#toc-managing-the-colorpalette-disabled-state-in-reactive-forms).
|
|
130
|
+
*/
|
|
131
|
+
disabled = false;
|
|
132
|
+
/**
|
|
133
|
+
* Sets the read-only state of the ColorPalette.
|
|
134
|
+
*
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
readonly = false;
|
|
138
|
+
/**
|
|
139
|
+
* Specifies the size of a color cell.
|
|
140
|
+
*
|
|
141
|
+
* The possible values are:
|
|
142
|
+
* * (Default) `tileSize = 24`
|
|
143
|
+
* * `{ width: number, height: number }`
|
|
144
|
+
*/
|
|
145
|
+
tileSize = { width: DEFAULT_TILE_SIZE, height: DEFAULT_TILE_SIZE };
|
|
174
146
|
/**
|
|
175
147
|
* @hidden
|
|
176
148
|
*/
|
|
@@ -180,6 +152,20 @@ export class ColorPaletteComponent {
|
|
|
180
152
|
}
|
|
181
153
|
return { width: this.tileSize, height: this.tileSize };
|
|
182
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Fires each time the color selection is changed.
|
|
157
|
+
*/
|
|
158
|
+
selectionChange = new EventEmitter();
|
|
159
|
+
/**
|
|
160
|
+
* Fires each time the value is changed.
|
|
161
|
+
*/
|
|
162
|
+
valueChange = new EventEmitter();
|
|
163
|
+
/**
|
|
164
|
+
* Fires each time the user selects a cell with the mouse or presses `Enter`.
|
|
165
|
+
*
|
|
166
|
+
* @hidden
|
|
167
|
+
*/
|
|
168
|
+
cellSelection = new EventEmitter();
|
|
183
169
|
/**
|
|
184
170
|
* @hidden
|
|
185
171
|
*/
|
|
@@ -190,6 +176,10 @@ export class ColorPaletteComponent {
|
|
|
190
176
|
* @hidden
|
|
191
177
|
*/
|
|
192
178
|
get hostTabindex() { return this.tabindex; }
|
|
179
|
+
/**
|
|
180
|
+
* @hidden
|
|
181
|
+
*/
|
|
182
|
+
hostClasses = true;
|
|
193
183
|
/**
|
|
194
184
|
* @hidden
|
|
195
185
|
*/
|
|
@@ -198,6 +188,45 @@ export class ColorPaletteComponent {
|
|
|
198
188
|
* @hidden
|
|
199
189
|
*/
|
|
200
190
|
get readonlyAttribute() { return this.readonly; }
|
|
191
|
+
/**
|
|
192
|
+
* @hidden
|
|
193
|
+
*/
|
|
194
|
+
activeCellId;
|
|
195
|
+
/**
|
|
196
|
+
* @hidden
|
|
197
|
+
*/
|
|
198
|
+
focusedCell;
|
|
199
|
+
/**
|
|
200
|
+
* @hidden
|
|
201
|
+
*/
|
|
202
|
+
selectedCell;
|
|
203
|
+
/**
|
|
204
|
+
* @hidden
|
|
205
|
+
*/
|
|
206
|
+
focusInComponent;
|
|
207
|
+
/**
|
|
208
|
+
* @hidden
|
|
209
|
+
*/
|
|
210
|
+
uniqueId = guid();
|
|
211
|
+
selection;
|
|
212
|
+
_value;
|
|
213
|
+
_columns;
|
|
214
|
+
_palette;
|
|
215
|
+
_tabindex = 0;
|
|
216
|
+
subs = new Subscription();
|
|
217
|
+
dynamicRTLSubscription;
|
|
218
|
+
constructor(host, service, cdr, renderer, localizationService, ngZone) {
|
|
219
|
+
this.host = host;
|
|
220
|
+
this.service = service;
|
|
221
|
+
this.cdr = cdr;
|
|
222
|
+
this.renderer = renderer;
|
|
223
|
+
this.localizationService = localizationService;
|
|
224
|
+
this.ngZone = ngZone;
|
|
225
|
+
validatePackage(packageMetadata);
|
|
226
|
+
this.dynamicRTLSubscription = localizationService.changes.subscribe(({ rtl }) => {
|
|
227
|
+
this.direction = rtl ? 'rtl' : 'ltr';
|
|
228
|
+
});
|
|
229
|
+
}
|
|
201
230
|
ngOnInit() {
|
|
202
231
|
if (this.colorRows.length === 0) {
|
|
203
232
|
const defaultPreset = (this.format !== 'name') ? DEFAULT_PRESET : DEFAULT_ACCESSIBLE_PRESET;
|
|
@@ -395,28 +424,29 @@ export class ColorPaletteComponent {
|
|
|
395
424
|
const selectedColor = this.service.getColorAt(this.focusedCell);
|
|
396
425
|
this.handleCellSelection(selectedColor, this.focusedCell);
|
|
397
426
|
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
427
|
+
notifyNgTouched = () => { };
|
|
428
|
+
notifyNgChanged = () => { };
|
|
429
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPaletteComponent, deps: [{ token: i0.ElementRef }, { token: i1.ColorPaletteService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColorPaletteComponent, isStandalone: true, selector: "kendo-colorpalette", inputs: { id: "id", format: "format", value: "value", columns: "columns", palette: "palette", tabindex: "tabindex", disabled: "disabled", readonly: "readonly", tileSize: "tileSize" }, outputs: { selectionChange: "selectionChange", valueChange: "valueChange", cellSelection: "cellSelection" }, host: { properties: { "attr.dir": "this.direction", "attr.role": "this.role", "attr.aria-activedescendant": "this.activeDescendant", "attr.id": "this.paletteId", "class.k-readonly": "this.readonly", "attr.tabindex": "this.hostTabindex", "class.k-colorpalette": "this.hostClasses", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.aria-readonly": "this.readonlyAttribute" } }, providers: [
|
|
431
|
+
{
|
|
432
|
+
multi: true,
|
|
433
|
+
provide: NG_VALUE_ACCESSOR,
|
|
434
|
+
useExisting: forwardRef(() => ColorPaletteComponent)
|
|
435
|
+
}, {
|
|
436
|
+
provide: KendoInput,
|
|
437
|
+
useExisting: forwardRef(() => ColorPaletteComponent)
|
|
438
|
+
},
|
|
439
|
+
ColorPaletteService,
|
|
440
|
+
ColorPaletteLocalizationService,
|
|
441
|
+
{
|
|
442
|
+
provide: LocalizationService,
|
|
443
|
+
useExisting: ColorPaletteLocalizationService
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
provide: L10N_PREFIX,
|
|
447
|
+
useValue: 'kendo.colorpalette'
|
|
448
|
+
}
|
|
449
|
+
], exportAs: ["kendoColorPalette"], usesOnChanges: true, ngImport: i0, template: `
|
|
420
450
|
<ng-container kendoColorPaletteLocalizedMessages
|
|
421
451
|
i18n-colorPaletteNoColor="kendo.colorpalette.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty."
|
|
422
452
|
colorPaletteNoColor="Colorpalette no color chosen">
|
|
@@ -445,7 +475,8 @@ ColorPaletteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
445
475
|
</tbody>
|
|
446
476
|
</table>
|
|
447
477
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
448
|
-
|
|
478
|
+
}
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorPaletteComponent, decorators: [{
|
|
449
480
|
type: Component,
|
|
450
481
|
args: [{
|
|
451
482
|
exportAs: 'kendoColorPalette',
|