@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.
- package/dist/cdn/js/kendo-angular-inputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/checkbox/checkbox.directive.js +79 -3
- package/dist/es/colorpicker/color-contrast-svg.component.js +95 -0
- package/dist/es/colorpicker/color-gradient.component.js +109 -81
- package/dist/es/colorpicker/color-input.component.js +39 -18
- package/dist/es/colorpicker/color-palette.component.js +28 -18
- package/dist/es/colorpicker/colorpicker.component.js +297 -80
- package/dist/es/colorpicker/constants.js +12 -0
- package/dist/es/colorpicker/contrast-validation.component.js +8 -6
- package/dist/es/colorpicker/contrast.component.js +6 -8
- package/dist/es/colorpicker/{models → events}/active-color-click-event.js +0 -0
- package/dist/es/colorpicker/events/cancel-event.js +19 -0
- package/dist/es/colorpicker/events/close-event.js +17 -0
- package/dist/es/colorpicker/{models → events}/kendo-drag-event.js +0 -0
- package/dist/es/colorpicker/events/open-event.js +17 -0
- package/dist/es/colorpicker/events.js +8 -0
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +50 -0
- package/dist/es/colorpicker/flatcolorpicker-header.component.js +94 -0
- package/dist/es/colorpicker/flatcolorpicker.component.js +553 -0
- package/dist/es/colorpicker/localization/colorgradient-localization.service.js +7 -7
- package/dist/es/colorpicker/localization/colorpalette-localization.service.js +7 -7
- package/dist/es/colorpicker/localization/custom-messages.component.js +1 -1
- package/dist/es/colorpicker/localization/flatcolorpicker-localization.service.js +34 -0
- package/dist/es/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
- package/dist/es/colorpicker/localization/messages.js +36 -0
- package/dist/es/colorpicker/models/{color-picker-view.js → actions-layout.js} +0 -0
- package/dist/{es2015/colorpicker/models/color-picker-view.js → es/colorpicker/models/colorpicker-view.js} +0 -0
- package/dist/es/colorpicker/{utils → models}/palette-presets.js +0 -0
- package/dist/es/colorpicker/models.js +1 -2
- package/dist/es/colorpicker/services/flatcolorpicker.service.js +41 -0
- package/dist/es/colorpicker/utils/color-parser.js +18 -5
- package/dist/es/colorpicker/utils/contrast-curve.js +91 -0
- package/dist/es/colorpicker/utils.js +1 -1
- package/dist/es/colorpicker.module.js +9 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/models/styling-classes.js +4 -0
- package/dist/{es2015/colorpicker/models/kendo-drag-event.js → es/common/models.js} +0 -0
- package/dist/es/common/utils.js +37 -0
- package/dist/es/index.js +5 -0
- package/dist/es/main.js +4 -2
- package/dist/es/maskedtextbox/maskedtextbox.component.js +101 -6
- package/dist/es/numerictextbox/numerictextbox.component.js +116 -20
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/radiobutton.directive.js +52 -3
- package/dist/es/shared/textarea.directive.js +3 -2
- package/dist/es/switch/switch.component.js +167 -21
- package/dist/es/text-fields-common/text-fields-base.js +1 -1
- package/dist/es/textarea/textarea.component.js +101 -5
- package/dist/es/textbox/textbox.component.js +108 -11
- package/dist/es/textbox/textbox.directive.js +3 -2
- package/dist/es/textbox.module.js +0 -3
- package/dist/es2015/checkbox/checkbox.directive.d.ts +31 -0
- package/dist/es2015/checkbox/checkbox.directive.js +68 -10
- package/dist/es2015/colorpicker/color-contrast-svg.component.d.ts +26 -0
- package/dist/es2015/colorpicker/color-contrast-svg.component.js +97 -0
- package/dist/es2015/colorpicker/color-gradient.component.d.ts +32 -43
- package/dist/es2015/colorpicker/color-gradient.component.js +126 -93
- package/dist/es2015/colorpicker/color-input.component.d.ts +11 -4
- package/dist/es2015/colorpicker/color-input.component.js +52 -32
- package/dist/es2015/colorpicker/color-palette.component.d.ts +8 -3
- package/dist/es2015/colorpicker/color-palette.component.js +28 -18
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +129 -23
- package/dist/es2015/colorpicker/colorpicker.component.js +319 -125
- package/dist/es2015/colorpicker/constants.d.ts +12 -0
- package/dist/es2015/colorpicker/constants.js +12 -0
- package/dist/es2015/colorpicker/contrast-validation.component.d.ts +1 -1
- package/dist/es2015/colorpicker/contrast-validation.component.js +16 -12
- package/dist/es2015/colorpicker/contrast.component.d.ts +1 -3
- package/dist/es2015/colorpicker/contrast.component.js +17 -17
- package/dist/es2015/colorpicker/{models → events}/active-color-click-event.d.ts +0 -0
- package/dist/es2015/colorpicker/{models → events}/active-color-click-event.js +0 -0
- package/dist/es2015/colorpicker/events/cancel-event.d.ts +15 -0
- package/dist/es2015/colorpicker/events/cancel-event.js +14 -0
- package/dist/es2015/colorpicker/events/close-event.d.ts +10 -0
- package/dist/es2015/colorpicker/events/close-event.js +10 -0
- package/dist/es2015/colorpicker/{models → events}/kendo-drag-event.d.ts +0 -0
- package/dist/es2015/colorpicker/events/kendo-drag-event.js +4 -0
- package/dist/es2015/colorpicker/events/open-event.d.ts +10 -0
- package/dist/es2015/colorpicker/events/open-event.js +10 -0
- package/dist/es2015/colorpicker/events.d.ts +8 -0
- package/dist/es2015/colorpicker/events.js +8 -0
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.d.ts +18 -0
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +60 -0
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.d.ts +30 -0
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +131 -0
- package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +214 -0
- package/dist/es2015/colorpicker/flatcolorpicker.component.js +593 -0
- package/dist/es2015/colorpicker/localization/colorgradient-localization.service.d.ts +3 -3
- package/dist/es2015/colorpicker/localization/colorgradient-localization.service.js +7 -7
- package/dist/es2015/colorpicker/localization/colorpalette-localization.service.d.ts +3 -3
- package/dist/es2015/colorpicker/localization/colorpalette-localization.service.js +7 -7
- package/dist/es2015/colorpicker/localization/custom-messages.component.js +1 -1
- package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.d.ts +14 -0
- package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.js +31 -0
- package/dist/es2015/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
- package/dist/es2015/colorpicker/localization/messages.d.ts +36 -0
- package/dist/es2015/colorpicker/localization/messages.js +36 -0
- package/dist/es2015/colorpicker/models/actions-layout.d.ts +8 -0
- package/dist/es2015/colorpicker/models/actions-layout.js +4 -0
- package/dist/es2015/colorpicker/models/colorpicker-view.d.ts +8 -0
- package/dist/es2015/colorpicker/models/colorpicker-view.js +4 -0
- package/dist/es2015/colorpicker/models/gradient-settings.d.ts +4 -3
- package/dist/es2015/colorpicker/models/output-format.d.ts +0 -5
- package/dist/es2015/colorpicker/{utils → models}/palette-presets.d.ts +0 -0
- package/dist/es2015/colorpicker/{utils → models}/palette-presets.js +0 -0
- package/dist/es2015/colorpicker/models/palette-settings.d.ts +2 -3
- package/dist/es2015/colorpicker/models/tile-size.d.ts +1 -5
- package/dist/es2015/colorpicker/models.d.ts +10 -10
- package/dist/es2015/colorpicker/models.js +1 -2
- package/dist/es2015/colorpicker/services/flatcolorpicker.service.d.ts +12 -0
- package/dist/es2015/colorpicker/services/flatcolorpicker.service.js +38 -0
- package/dist/es2015/colorpicker/utils/color-parser.d.ts +8 -2
- package/dist/es2015/colorpicker/utils/color-parser.js +15 -5
- package/dist/es2015/colorpicker/utils/contrast-curve.d.ts +37 -0
- package/dist/es2015/colorpicker/utils/contrast-curve.js +85 -0
- package/dist/es2015/colorpicker/utils.d.ts +1 -1
- package/dist/es2015/colorpicker/utils.js +1 -1
- package/dist/es2015/colorpicker.module.js +9 -1
- package/dist/es2015/{colorpicker/models/color-picker-view.d.ts → common/models/fillmode.d.ts} +5 -5
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +23 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/models/styling-classes.d.ts +11 -0
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/dist/es2015/common/models.d.ts +8 -0
- package/dist/es2015/common/models.js +4 -0
- package/dist/es2015/common/utils.d.ts +7 -0
- package/dist/es2015/common/utils.js +37 -0
- package/dist/es2015/index.d.ts +5 -0
- package/dist/es2015/index.js +5 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/main.d.ts +5 -2
- package/dist/es2015/main.js +4 -2
- package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +39 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.js +88 -6
- package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +39 -2
- package/dist/es2015/numerictextbox/numerictextbox.component.js +124 -40
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/radiobutton/radiobutton.directive.d.ts +18 -0
- package/dist/es2015/radiobutton/radiobutton.directive.js +46 -11
- package/dist/es2015/shared/textarea.directive.d.ts +1 -1
- package/dist/es2015/shared/textarea.directive.js +3 -2
- package/dist/es2015/switch/switch.component.d.ts +48 -5
- package/dist/es2015/switch/switch.component.js +166 -24
- package/dist/es2015/text-fields-common/text-fields-base.js +1 -1
- package/dist/es2015/textarea/textarea.component.d.ts +39 -1
- package/dist/es2015/textarea/textarea.component.js +89 -5
- package/dist/es2015/textbox/textbox.component.d.ts +40 -1
- package/dist/es2015/textbox/textbox.component.js +96 -11
- package/dist/es2015/textbox/textbox.directive.d.ts +1 -1
- package/dist/es2015/textbox/textbox.directive.js +3 -2
- package/dist/es2015/textbox.module.js +0 -3
- package/dist/fesm2015/index.js +3114 -1478
- package/dist/fesm5/index.js +3114 -1462
- package/dist/npm/checkbox/checkbox.directive.js +78 -2
- package/dist/npm/colorpicker/color-contrast-svg.component.js +97 -0
- package/dist/npm/colorpicker/color-gradient.component.js +109 -81
- package/dist/npm/colorpicker/color-input.component.js +38 -17
- package/dist/npm/colorpicker/color-palette.component.js +29 -19
- package/dist/npm/colorpicker/colorpicker.component.js +303 -86
- package/dist/npm/colorpicker/constants.js +12 -0
- package/dist/npm/colorpicker/contrast-validation.component.js +8 -6
- package/dist/npm/colorpicker/contrast.component.js +6 -8
- package/dist/npm/colorpicker/{models → events}/active-color-click-event.js +0 -0
- package/dist/npm/colorpicker/events/cancel-event.js +21 -0
- package/dist/npm/colorpicker/events/close-event.js +19 -0
- package/dist/npm/colorpicker/{models → events}/kendo-drag-event.js +0 -0
- package/dist/npm/colorpicker/events/open-event.js +19 -0
- package/dist/npm/colorpicker/events.js +11 -0
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +52 -0
- package/dist/npm/colorpicker/flatcolorpicker-header.component.js +96 -0
- package/dist/npm/colorpicker/flatcolorpicker.component.js +555 -0
- package/dist/npm/colorpicker/localization/colorgradient-localization.service.js +7 -7
- package/dist/npm/colorpicker/localization/colorpalette-localization.service.js +7 -7
- package/dist/npm/colorpicker/localization/custom-messages.component.js +1 -1
- package/dist/npm/colorpicker/localization/flatcolorpicker-localization.service.js +36 -0
- package/dist/npm/colorpicker/localization/localized-colorpicker-messages.directive.js +1 -1
- package/dist/npm/colorpicker/localization/messages.js +36 -0
- package/dist/npm/colorpicker/models/{color-picker-view.js → actions-layout.js} +0 -0
- package/dist/npm/colorpicker/models/colorpicker-view.js +6 -0
- package/dist/npm/colorpicker/{utils → models}/palette-presets.js +0 -0
- package/dist/npm/colorpicker/models.js +1 -2
- package/dist/npm/colorpicker/services/flatcolorpicker.service.js +43 -0
- package/dist/npm/colorpicker/utils/color-parser.js +18 -5
- package/dist/npm/colorpicker/utils/contrast-curve.js +93 -0
- package/dist/npm/colorpicker/utils.js +1 -1
- package/dist/npm/colorpicker.module.js +9 -1
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/models/styling-classes.js +6 -0
- package/dist/npm/common/models.js +6 -0
- package/dist/npm/common/utils.js +37 -0
- package/dist/npm/index.js +10 -0
- package/dist/npm/main.js +7 -4
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +100 -5
- package/dist/npm/numerictextbox/numerictextbox.component.js +115 -19
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/radiobutton.directive.js +51 -2
- package/dist/npm/shared/textarea.directive.js +3 -2
- package/dist/npm/switch/switch.component.js +166 -20
- package/dist/npm/text-fields-common/text-fields-base.js +1 -1
- package/dist/npm/textarea/textarea.component.js +100 -4
- package/dist/npm/textbox/textbox.component.js +107 -10
- package/dist/npm/textbox/textbox.directive.js +3 -2
- package/dist/npm/textbox.module.js +0 -3
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +11 -10
- package/dist/es/colorpicker/models/preventable-event.js +0 -29
- package/dist/es/textbox/floating-label-input-adapter.js +0 -58
- package/dist/es/textbox/textbox-container.component.js +0 -224
- package/dist/es2015/colorpicker/models/preventable-event.d.ts +0 -21
- package/dist/es2015/colorpicker/models/preventable-event.js +0 -27
- package/dist/es2015/textbox/floating-label-input-adapter.d.ts +0 -20
- package/dist/es2015/textbox/floating-label-input-adapter.js +0 -52
- package/dist/es2015/textbox/textbox-container.component.d.ts +0 -59
- package/dist/es2015/textbox/textbox-container.component.js +0 -209
- package/dist/npm/colorpicker/models/preventable-event.js +0 -31
- package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
- package/dist/npm/textbox/textbox-container.component.js +0 -226
|
@@ -7,64 +7,94 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
var tslib_1 = require("tslib");
|
|
8
8
|
var core_1 = require("@angular/core");
|
|
9
9
|
var forms_1 = require("@angular/forms");
|
|
10
|
+
var flatcolorpicker_component_1 = require("./flatcolorpicker.component");
|
|
10
11
|
var kendo_angular_popup_1 = require("@progress/kendo-angular-popup");
|
|
11
12
|
var kendo_licensing_1 = require("@progress/kendo-licensing");
|
|
12
|
-
var package_metadata_1 = require("../package-metadata");
|
|
13
|
-
var models_1 = require("./models");
|
|
14
|
-
var color_parser_1 = require("./utils/color-parser");
|
|
15
|
-
var utils_1 = require("../common/utils");
|
|
16
13
|
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
17
14
|
var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
|
|
18
|
-
var
|
|
15
|
+
var package_metadata_1 = require("../package-metadata");
|
|
16
|
+
var models_1 = require("./models");
|
|
17
|
+
var events_1 = require("./events");
|
|
18
|
+
var utils_1 = require("./utils");
|
|
19
|
+
var utils_2 = require("../common/utils");
|
|
19
20
|
var colorpicker_localization_service_1 = require("./localization/colorpicker-localization.service");
|
|
20
|
-
var
|
|
21
|
-
var DEFAULT_PRESET = 'office';
|
|
22
|
-
var DEFAULT_ACCESSIBLE_PRESET = 'accessible';
|
|
21
|
+
var constants_1 = require("./constants");
|
|
23
22
|
var serial = 0;
|
|
24
23
|
/**
|
|
25
24
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
26
|
-
*
|
|
25
|
+
*
|
|
26
|
+
* The ColorPicker is a powerful tool for choosing colors from Gradient and Palette views
|
|
27
|
+
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
27
28
|
*/
|
|
28
29
|
var ColorPickerComponent = /** @class */ (function () {
|
|
29
|
-
function ColorPickerComponent(popupService, cdr, localizationService, ngZone) {
|
|
30
|
+
function ColorPickerComponent(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
30
31
|
var _this = this;
|
|
32
|
+
this.host = host;
|
|
31
33
|
this.popupService = popupService;
|
|
32
34
|
this.cdr = cdr;
|
|
33
35
|
this.localizationService = localizationService;
|
|
34
36
|
this.ngZone = ngZone;
|
|
35
|
-
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
37
|
+
this.renderer = renderer;
|
|
38
38
|
this.hostClasses = true;
|
|
39
39
|
/**
|
|
40
40
|
* @hidden
|
|
41
41
|
*/
|
|
42
42
|
this.focusableId = "k-colorpicker-" + serial++;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Specifies the views that will be rendered in the popup.
|
|
45
|
+
* By default both the gradient and palette views will be rendered.
|
|
45
46
|
*/
|
|
46
|
-
this.
|
|
47
|
+
this.views = ['gradient', 'palette'];
|
|
47
48
|
/**
|
|
48
49
|
* Sets the read-only state of the ColorPicker.
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
49
52
|
*/
|
|
50
53
|
this.readonly = false;
|
|
51
54
|
/**
|
|
52
55
|
* Sets the disabled state of the ColorPicker.
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
53
58
|
*/
|
|
54
59
|
this.disabled = false;
|
|
55
60
|
/**
|
|
56
61
|
* Specifies the output format of the ColorPicker.
|
|
57
|
-
* The input value may be in a different format. However, it will be parsed into the output `format`
|
|
58
|
-
* after the component processes it.
|
|
59
62
|
*
|
|
60
|
-
* If the
|
|
63
|
+
* If the input value is in a different format, it will be parsed into the specified output `format`.
|
|
61
64
|
*
|
|
62
65
|
* The supported values are:
|
|
63
66
|
* * `rgba` (default)
|
|
64
67
|
* * `hex`
|
|
65
|
-
* * [name](https://www.w3.org/wiki/CSS/Properties/color/keywords)
|
|
66
68
|
*/
|
|
67
69
|
this.format = 'rgba';
|
|
70
|
+
/**
|
|
71
|
+
* Specifies whether the ColorPicker should display a 'Clear color' button.
|
|
72
|
+
*
|
|
73
|
+
* @default true
|
|
74
|
+
*/
|
|
75
|
+
this.clearButton = true;
|
|
76
|
+
/**
|
|
77
|
+
* Displays `Apply` and `Cancel` action buttons and color preview panes.
|
|
78
|
+
*
|
|
79
|
+
* When enabled, the component value will not change immediately upon
|
|
80
|
+
* color selection, but only after the `Apply` button is clicked.
|
|
81
|
+
*
|
|
82
|
+
* The `Cancel` button reverts the current selection to its
|
|
83
|
+
* previous state i.e. to the current value.
|
|
84
|
+
*
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
this.preview = false;
|
|
88
|
+
/**
|
|
89
|
+
* Configures the layout of the `Apply` and `Cancel` action buttons.
|
|
90
|
+
*
|
|
91
|
+
* The possible values are:
|
|
92
|
+
* * `start`
|
|
93
|
+
* * `center`
|
|
94
|
+
* * `end` (default)
|
|
95
|
+
* * `stretch`
|
|
96
|
+
*/
|
|
97
|
+
this.actionsLayout = 'end';
|
|
68
98
|
/**
|
|
69
99
|
* Fires each time the value is changed.
|
|
70
100
|
*/
|
|
@@ -87,6 +117,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
87
117
|
* Fires each time the ColorPicker is blurred.
|
|
88
118
|
*/
|
|
89
119
|
this.onBlur = new core_1.EventEmitter();
|
|
120
|
+
/**
|
|
121
|
+
* Fires when the user cancels the current color selection.
|
|
122
|
+
*
|
|
123
|
+
* Fires on preview pane or 'Cancel' button click.
|
|
124
|
+
*/
|
|
125
|
+
this.cancel = new core_1.EventEmitter();
|
|
90
126
|
/**
|
|
91
127
|
* Fires each time the left side of the ColorPicker wrapper is clicked.
|
|
92
128
|
* The event is triggered regardless of whether a ColorPicker icon is set or not.
|
|
@@ -94,10 +130,18 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
94
130
|
* The [ActiveColorClickEvent]({% slug api_inputs_activecolorclickevent %}) event provides the option to prevent the popup opening.
|
|
95
131
|
*/
|
|
96
132
|
this.activeColorClick = new core_1.EventEmitter();
|
|
133
|
+
/**
|
|
134
|
+
* Fires each time the view is about to change.
|
|
135
|
+
* Used to provide a two-way binding for the `activeView` property.
|
|
136
|
+
*/
|
|
137
|
+
this.activeViewChange = new core_1.EventEmitter();
|
|
97
138
|
this._tabindex = 0;
|
|
98
139
|
this._popupSettings = { animate: true };
|
|
99
140
|
this._paletteSettings = {};
|
|
100
|
-
this._gradientSettings = { opacity: true,
|
|
141
|
+
this._gradientSettings = { opacity: true, delay: 0 };
|
|
142
|
+
this._size = 'medium';
|
|
143
|
+
this._rounded = 'medium';
|
|
144
|
+
this._fillMode = 'solid';
|
|
101
145
|
this.notifyNgTouched = function () { };
|
|
102
146
|
this.notifyNgChanged = function () { };
|
|
103
147
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
@@ -107,6 +151,19 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
107
151
|
});
|
|
108
152
|
}
|
|
109
153
|
ColorPickerComponent_1 = ColorPickerComponent;
|
|
154
|
+
Object.defineProperty(ColorPickerComponent.prototype, "view", {
|
|
155
|
+
get: function () {
|
|
156
|
+
return (this.views && this.views.length > 0) ? this.views[0] : null;
|
|
157
|
+
},
|
|
158
|
+
/**
|
|
159
|
+
* @hidden
|
|
160
|
+
*/
|
|
161
|
+
set: function (view) {
|
|
162
|
+
this.views = [view];
|
|
163
|
+
},
|
|
164
|
+
enumerable: true,
|
|
165
|
+
configurable: true
|
|
166
|
+
});
|
|
110
167
|
Object.defineProperty(ColorPickerComponent.prototype, "value", {
|
|
111
168
|
get: function () {
|
|
112
169
|
return this._value;
|
|
@@ -115,7 +172,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
115
172
|
* Specifies the value of the initially selected color.
|
|
116
173
|
*/
|
|
117
174
|
set: function (value) {
|
|
118
|
-
this._value =
|
|
175
|
+
this._value = utils_1.parseColor(value, this.format, this.gradientSettings.opacity);
|
|
119
176
|
},
|
|
120
177
|
enumerable: true,
|
|
121
178
|
configurable: true
|
|
@@ -165,6 +222,8 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
165
222
|
},
|
|
166
223
|
/**
|
|
167
224
|
* Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
225
|
+
*
|
|
226
|
+
* @default 0
|
|
168
227
|
*/
|
|
169
228
|
set: function (value) {
|
|
170
229
|
var tabindex = Number(value);
|
|
@@ -174,12 +233,76 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
174
233
|
enumerable: true,
|
|
175
234
|
configurable: true
|
|
176
235
|
});
|
|
236
|
+
Object.defineProperty(ColorPickerComponent.prototype, "size", {
|
|
237
|
+
get: function () {
|
|
238
|
+
return this._size;
|
|
239
|
+
},
|
|
240
|
+
/**
|
|
241
|
+
* The size property specifies the font size and line height of the ColorPicker
|
|
242
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
243
|
+
*
|
|
244
|
+
* The possible values are:
|
|
245
|
+
* * `'small'`
|
|
246
|
+
* * `'medium'` (default)
|
|
247
|
+
* * `'large'`
|
|
248
|
+
* * `null`
|
|
249
|
+
*/
|
|
250
|
+
set: function (size) {
|
|
251
|
+
this.handleClasses(size, 'size');
|
|
252
|
+
this._size = size;
|
|
253
|
+
},
|
|
254
|
+
enumerable: true,
|
|
255
|
+
configurable: true
|
|
256
|
+
});
|
|
257
|
+
Object.defineProperty(ColorPickerComponent.prototype, "rounded", {
|
|
258
|
+
get: function () {
|
|
259
|
+
return this._rounded;
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* The rounded property specifies the border radius of the ColorPicker
|
|
263
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
|
|
264
|
+
*
|
|
265
|
+
* The possible values are:
|
|
266
|
+
* * `'small'`
|
|
267
|
+
* * `'medium'` (default)
|
|
268
|
+
* * `'large'`
|
|
269
|
+
* * `'full'`
|
|
270
|
+
* * `null`
|
|
271
|
+
*/
|
|
272
|
+
set: function (rounded) {
|
|
273
|
+
this.handleClasses(rounded, 'rounded');
|
|
274
|
+
this._rounded = rounded;
|
|
275
|
+
},
|
|
276
|
+
enumerable: true,
|
|
277
|
+
configurable: true
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(ColorPickerComponent.prototype, "fillMode", {
|
|
280
|
+
get: function () {
|
|
281
|
+
return this._fillMode;
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* The fillMode property specifies the background and border styles of the ColorPicker
|
|
285
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
|
|
286
|
+
*
|
|
287
|
+
* The possible values are:
|
|
288
|
+
* * `'flat'`
|
|
289
|
+
* * `'solid'` (default)
|
|
290
|
+
* * `'outline'`
|
|
291
|
+
* * `null`
|
|
292
|
+
*/
|
|
293
|
+
set: function (fillMode) {
|
|
294
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
295
|
+
this._fillMode = fillMode;
|
|
296
|
+
},
|
|
297
|
+
enumerable: true,
|
|
298
|
+
configurable: true
|
|
299
|
+
});
|
|
177
300
|
Object.defineProperty(ColorPickerComponent.prototype, "isOpen", {
|
|
178
301
|
/**
|
|
179
302
|
* Indicates whether the ColorPicker popup is open.
|
|
180
303
|
*/
|
|
181
304
|
get: function () {
|
|
182
|
-
return
|
|
305
|
+
return utils_2.isPresent(this.popupRef);
|
|
183
306
|
},
|
|
184
307
|
enumerable: true,
|
|
185
308
|
configurable: true
|
|
@@ -200,10 +323,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
200
323
|
configurable: true
|
|
201
324
|
});
|
|
202
325
|
ColorPickerComponent.prototype.ngOnInit = function () {
|
|
203
|
-
var defaultPreset = (this.format !== 'name') ? DEFAULT_PRESET : DEFAULT_ACCESSIBLE_PRESET;
|
|
326
|
+
var defaultPreset = (this.format !== 'name') ? constants_1.DEFAULT_PRESET : constants_1.DEFAULT_ACCESSIBLE_PRESET;
|
|
204
327
|
var settingsPalette = this._paletteSettings.palette;
|
|
205
|
-
var presetColumns = typeof settingsPalette === 'string' &&
|
|
206
|
-
|
|
328
|
+
var presetColumns = typeof settingsPalette === 'string' && models_1.PALETTEPRESETS[settingsPalette] ?
|
|
329
|
+
models_1.PALETTEPRESETS[settingsPalette].columns :
|
|
207
330
|
undefined;
|
|
208
331
|
this._paletteSettings = {
|
|
209
332
|
palette: settingsPalette || defaultPreset,
|
|
@@ -211,13 +334,20 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
211
334
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
212
335
|
};
|
|
213
336
|
};
|
|
337
|
+
ColorPickerComponent.prototype.ngAfterViewInit = function () {
|
|
338
|
+
var _this = this;
|
|
339
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
340
|
+
stylingInputs.forEach(function (input) {
|
|
341
|
+
_this.handleClasses(_this[input], input);
|
|
342
|
+
});
|
|
343
|
+
};
|
|
214
344
|
ColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
215
345
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
216
|
-
this.
|
|
346
|
+
this.activeView = 'palette';
|
|
217
347
|
}
|
|
218
|
-
if (this.
|
|
348
|
+
if (this.activeView === 'gradient' && this.gradientSettings.opacity) {
|
|
219
349
|
this.format = 'rgba';
|
|
220
|
-
this.value =
|
|
350
|
+
this.value = utils_1.parseColor(this.value, this.format, this.gradientSettings.opacity);
|
|
221
351
|
}
|
|
222
352
|
};
|
|
223
353
|
ColorPickerComponent.prototype.ngOnDestroy = function () {
|
|
@@ -226,10 +356,26 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
226
356
|
this.dynamicRTLSubscription.unsubscribe();
|
|
227
357
|
}
|
|
228
358
|
};
|
|
359
|
+
Object.defineProperty(ColorPickerComponent.prototype, "colorPickerAriaLabel", {
|
|
360
|
+
/**
|
|
361
|
+
* @hidden
|
|
362
|
+
*/
|
|
363
|
+
get: function () {
|
|
364
|
+
return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
|
|
365
|
+
},
|
|
366
|
+
enumerable: true,
|
|
367
|
+
configurable: true
|
|
368
|
+
});
|
|
229
369
|
/**
|
|
230
370
|
* @hidden
|
|
231
371
|
*/
|
|
232
|
-
ColorPickerComponent.prototype.
|
|
372
|
+
ColorPickerComponent.prototype.handleCancelEvent = function (ev) {
|
|
373
|
+
this.cancel.emit(ev);
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* @hidden
|
|
377
|
+
*/
|
|
378
|
+
ColorPickerComponent.prototype.togglePopup = function () {
|
|
233
379
|
this.toggleWithEvents(!this.isOpen);
|
|
234
380
|
this.focus();
|
|
235
381
|
};
|
|
@@ -238,10 +384,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
238
384
|
*/
|
|
239
385
|
ColorPickerComponent.prototype.handleActiveColorClick = function () {
|
|
240
386
|
this.focus();
|
|
241
|
-
var event = new
|
|
387
|
+
var event = new events_1.ActiveColorClickEvent(this.value);
|
|
242
388
|
this.activeColorClick.emit(event);
|
|
243
389
|
if (!event.isOpenPrevented() || this.isOpen) {
|
|
244
|
-
this.
|
|
390
|
+
this.togglePopup();
|
|
245
391
|
}
|
|
246
392
|
};
|
|
247
393
|
/**
|
|
@@ -257,9 +403,6 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
257
403
|
* @hidden
|
|
258
404
|
*/
|
|
259
405
|
ColorPickerComponent.prototype.handleWrapperFocus = function () {
|
|
260
|
-
if (utils_1.isPresent(this.palette)) {
|
|
261
|
-
this.palette.nativeElement.focus();
|
|
262
|
-
}
|
|
263
406
|
if (this.isFocused) {
|
|
264
407
|
return;
|
|
265
408
|
}
|
|
@@ -284,10 +427,10 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
284
427
|
this.notifyNgTouched();
|
|
285
428
|
};
|
|
286
429
|
/**
|
|
287
|
-
* Clears the
|
|
430
|
+
* Clears the value of the ColorPicker.
|
|
288
431
|
*/
|
|
289
432
|
ColorPickerComponent.prototype.reset = function () {
|
|
290
|
-
if (!
|
|
433
|
+
if (!utils_2.isPresent(this.value)) {
|
|
291
434
|
return;
|
|
292
435
|
}
|
|
293
436
|
this._value = undefined;
|
|
@@ -304,7 +447,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
304
447
|
return;
|
|
305
448
|
}
|
|
306
449
|
this.closePopup();
|
|
307
|
-
open =
|
|
450
|
+
open = utils_2.isPresent(open) ? open : !this.isOpen;
|
|
308
451
|
if (open) {
|
|
309
452
|
this.openPopup();
|
|
310
453
|
}
|
|
@@ -312,13 +455,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
312
455
|
/**
|
|
313
456
|
* @hidden
|
|
314
457
|
*/
|
|
315
|
-
ColorPickerComponent.prototype.handleValueChange = function (color
|
|
316
|
-
var parsedColor =
|
|
458
|
+
ColorPickerComponent.prototype.handleValueChange = function (color) {
|
|
459
|
+
var parsedColor = utils_1.parseColor(color, this.format, this.gradientSettings.opacity);
|
|
317
460
|
var valueChange = parsedColor !== this.value;
|
|
318
|
-
if (closePopup) {
|
|
319
|
-
this.toggleWithEvents(false);
|
|
320
|
-
this.focus();
|
|
321
|
-
}
|
|
322
461
|
if (valueChange) {
|
|
323
462
|
this.value = parsedColor;
|
|
324
463
|
this.valueChange.emit(parsedColor);
|
|
@@ -329,9 +468,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
329
468
|
* @hidden
|
|
330
469
|
*/
|
|
331
470
|
ColorPickerComponent.prototype.handlePopupBlur = function (event) {
|
|
332
|
-
|
|
333
|
-
var wrapperClicked = event.relatedTarget === this.wrapper.nativeElement;
|
|
334
|
-
if (!this.isFocused || wrapperClicked || focusInPopupElement) {
|
|
471
|
+
if (this.popupBlurInvalid(event)) {
|
|
335
472
|
return;
|
|
336
473
|
}
|
|
337
474
|
this.isFocused = false;
|
|
@@ -382,53 +519,67 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
382
519
|
this.wrapper.nativeElement.focus();
|
|
383
520
|
}
|
|
384
521
|
if (event.keyCode === kendo_angular_common_1.Keys.Tab) {
|
|
385
|
-
var
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
event.preventDefault();
|
|
391
|
-
lastElement.focus();
|
|
392
|
-
return;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
else {
|
|
396
|
-
if (event.target === lastElement) {
|
|
397
|
-
event.preventDefault();
|
|
398
|
-
firstElement.focus();
|
|
399
|
-
return;
|
|
400
|
-
}
|
|
522
|
+
var currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
523
|
+
var nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
524
|
+
if (event.target === currentElement) {
|
|
525
|
+
event.preventDefault();
|
|
526
|
+
nextElement.nativeElement.focus();
|
|
401
527
|
}
|
|
402
528
|
}
|
|
403
529
|
};
|
|
404
530
|
/**
|
|
405
531
|
* @hidden
|
|
406
|
-
* Used by the
|
|
532
|
+
* Used by the FloatingLabel to determine if the component is empty.
|
|
407
533
|
*/
|
|
408
534
|
ColorPickerComponent.prototype.isEmpty = function () {
|
|
409
535
|
return false;
|
|
410
536
|
};
|
|
537
|
+
ColorPickerComponent.prototype.handleClasses = function (value, input) {
|
|
538
|
+
var elem = this.host.nativeElement;
|
|
539
|
+
var classes = utils_2.getStylingClasses('picker', input, this[input], value);
|
|
540
|
+
if (classes.toRemove) {
|
|
541
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
542
|
+
}
|
|
543
|
+
if (classes.toAdd) {
|
|
544
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
|
|
548
|
+
var focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
549
|
+
var wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
|
|
550
|
+
return !this.isFocused || wrapperClicked || focusInPopupElement;
|
|
551
|
+
};
|
|
411
552
|
ColorPickerComponent.prototype.toggleWithEvents = function (open) {
|
|
412
|
-
var _this = this;
|
|
413
553
|
var sameState = this.isOpen === open;
|
|
414
554
|
if (this.disabled || this.readonly || sameState) {
|
|
415
555
|
return;
|
|
416
556
|
}
|
|
417
|
-
var eventArgs
|
|
418
|
-
|
|
557
|
+
var eventArgs;
|
|
558
|
+
if (open) {
|
|
559
|
+
eventArgs = new events_1.ColorPickerOpenEvent();
|
|
560
|
+
this.open.emit(eventArgs);
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
eventArgs = new events_1.ColorPickerCloseEvent();
|
|
564
|
+
this.close.emit(eventArgs);
|
|
565
|
+
}
|
|
419
566
|
if (!eventArgs.isDefaultPrevented()) {
|
|
420
567
|
this.toggle(open);
|
|
421
568
|
}
|
|
422
569
|
if (open) {
|
|
423
|
-
this.
|
|
424
|
-
setTimeout(function () {
|
|
425
|
-
if (_this.colorGradient) {
|
|
426
|
-
_this.colorGradient.gradientDragHandle.nativeElement.focus();
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
});
|
|
570
|
+
this.focusFirstElement();
|
|
430
571
|
}
|
|
431
572
|
};
|
|
573
|
+
ColorPickerComponent.prototype.focusFirstElement = function () {
|
|
574
|
+
var _this = this;
|
|
575
|
+
this.ngZone.runOutsideAngular(function () {
|
|
576
|
+
setTimeout(function () {
|
|
577
|
+
var elementToFocus = _this.flatColorPicker.gradient ? _this.flatColorPicker.gradient.gradientDragHandle :
|
|
578
|
+
_this.flatColorPicker.palette.host;
|
|
579
|
+
elementToFocus.nativeElement.focus();
|
|
580
|
+
});
|
|
581
|
+
});
|
|
582
|
+
};
|
|
432
583
|
ColorPickerComponent.prototype.openPopup = function () {
|
|
433
584
|
var _this = this;
|
|
434
585
|
var horizontalAlign = this.direction === "rtl" ? "right" : "left";
|
|
@@ -459,12 +610,35 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
459
610
|
}
|
|
460
611
|
this.popupRef.close();
|
|
461
612
|
this.popupRef = null;
|
|
462
|
-
this.palette = null;
|
|
463
613
|
};
|
|
614
|
+
Object.defineProperty(ColorPickerComponent.prototype, "firstFocusableElement", {
|
|
615
|
+
get: function () {
|
|
616
|
+
if (!this.flatColorPicker.header || (this.views.length <= 1 && !this.flatColorPicker.clearButton)) {
|
|
617
|
+
return this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle : this.flatColorPicker.palette.host;
|
|
618
|
+
}
|
|
619
|
+
return this.views.length > 1 ? this.flatColorPicker.header.viewButtonsCollection.toArray()[0] : this.flatColorPicker.header.clearButtonElement;
|
|
620
|
+
},
|
|
621
|
+
enumerable: true,
|
|
622
|
+
configurable: true
|
|
623
|
+
});
|
|
624
|
+
Object.defineProperty(ColorPickerComponent.prototype, "lastFocusableElement", {
|
|
625
|
+
get: function () {
|
|
626
|
+
if (this.preview) {
|
|
627
|
+
return this.flatColorPicker.footer.lastButton;
|
|
628
|
+
}
|
|
629
|
+
if (this.flatColorPicker.palette) {
|
|
630
|
+
return this.flatColorPicker.palette.host;
|
|
631
|
+
}
|
|
632
|
+
return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
|
|
633
|
+
},
|
|
634
|
+
enumerable: true,
|
|
635
|
+
configurable: true
|
|
636
|
+
});
|
|
464
637
|
var ColorPickerComponent_1;
|
|
465
638
|
tslib_1.__decorate([
|
|
466
|
-
core_1.HostBinding('class.k-widget'),
|
|
467
639
|
core_1.HostBinding('class.k-colorpicker'),
|
|
640
|
+
core_1.HostBinding('class.k-icon-picker'),
|
|
641
|
+
core_1.HostBinding('class.k-picker'),
|
|
468
642
|
tslib_1.__metadata("design:type", Boolean)
|
|
469
643
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
470
644
|
tslib_1.__decorate([
|
|
@@ -475,10 +649,19 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
475
649
|
core_1.Input(),
|
|
476
650
|
tslib_1.__metadata("design:type", String)
|
|
477
651
|
], ColorPickerComponent.prototype, "focusableId", void 0);
|
|
652
|
+
tslib_1.__decorate([
|
|
653
|
+
core_1.Input(),
|
|
654
|
+
tslib_1.__metadata("design:type", Array)
|
|
655
|
+
], ColorPickerComponent.prototype, "views", void 0);
|
|
656
|
+
tslib_1.__decorate([
|
|
657
|
+
core_1.Input(),
|
|
658
|
+
tslib_1.__metadata("design:type", String),
|
|
659
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
660
|
+
], ColorPickerComponent.prototype, "view", null);
|
|
478
661
|
tslib_1.__decorate([
|
|
479
662
|
core_1.Input(),
|
|
480
663
|
tslib_1.__metadata("design:type", String)
|
|
481
|
-
], ColorPickerComponent.prototype, "
|
|
664
|
+
], ColorPickerComponent.prototype, "activeView", void 0);
|
|
482
665
|
tslib_1.__decorate([
|
|
483
666
|
core_1.Input(),
|
|
484
667
|
tslib_1.__metadata("design:type", Boolean)
|
|
@@ -519,11 +702,38 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
519
702
|
core_1.Input(),
|
|
520
703
|
tslib_1.__metadata("design:type", Object)
|
|
521
704
|
], ColorPickerComponent.prototype, "iconClass", void 0);
|
|
705
|
+
tslib_1.__decorate([
|
|
706
|
+
core_1.Input(),
|
|
707
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
708
|
+
], ColorPickerComponent.prototype, "clearButton", void 0);
|
|
522
709
|
tslib_1.__decorate([
|
|
523
710
|
core_1.Input(),
|
|
524
711
|
tslib_1.__metadata("design:type", Number),
|
|
525
712
|
tslib_1.__metadata("design:paramtypes", [Number])
|
|
526
713
|
], ColorPickerComponent.prototype, "tabindex", null);
|
|
714
|
+
tslib_1.__decorate([
|
|
715
|
+
core_1.Input(),
|
|
716
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
717
|
+
], ColorPickerComponent.prototype, "preview", void 0);
|
|
718
|
+
tslib_1.__decorate([
|
|
719
|
+
core_1.Input(),
|
|
720
|
+
tslib_1.__metadata("design:type", String)
|
|
721
|
+
], ColorPickerComponent.prototype, "actionsLayout", void 0);
|
|
722
|
+
tslib_1.__decorate([
|
|
723
|
+
core_1.Input(),
|
|
724
|
+
tslib_1.__metadata("design:type", String),
|
|
725
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
726
|
+
], ColorPickerComponent.prototype, "size", null);
|
|
727
|
+
tslib_1.__decorate([
|
|
728
|
+
core_1.Input(),
|
|
729
|
+
tslib_1.__metadata("design:type", String),
|
|
730
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
731
|
+
], ColorPickerComponent.prototype, "rounded", null);
|
|
732
|
+
tslib_1.__decorate([
|
|
733
|
+
core_1.Input(),
|
|
734
|
+
tslib_1.__metadata("design:type", String),
|
|
735
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
736
|
+
], ColorPickerComponent.prototype, "fillMode", null);
|
|
527
737
|
tslib_1.__decorate([
|
|
528
738
|
core_1.Output(),
|
|
529
739
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -544,10 +754,18 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
544
754
|
core_1.Output('blur'),
|
|
545
755
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
546
756
|
], ColorPickerComponent.prototype, "onBlur", void 0);
|
|
757
|
+
tslib_1.__decorate([
|
|
758
|
+
core_1.Output(),
|
|
759
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
760
|
+
], ColorPickerComponent.prototype, "cancel", void 0);
|
|
547
761
|
tslib_1.__decorate([
|
|
548
762
|
core_1.Output(),
|
|
549
763
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
550
764
|
], ColorPickerComponent.prototype, "activeColorClick", void 0);
|
|
765
|
+
tslib_1.__decorate([
|
|
766
|
+
core_1.Output(),
|
|
767
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
768
|
+
], ColorPickerComponent.prototype, "activeViewChange", void 0);
|
|
551
769
|
tslib_1.__decorate([
|
|
552
770
|
core_1.ViewChild('container', { read: core_1.ViewContainerRef, static: true }),
|
|
553
771
|
tslib_1.__metadata("design:type", core_1.ViewContainerRef)
|
|
@@ -561,15 +779,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
561
779
|
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
562
780
|
], ColorPickerComponent.prototype, "popupTemplate", void 0);
|
|
563
781
|
tslib_1.__decorate([
|
|
564
|
-
core_1.ViewChild('
|
|
565
|
-
tslib_1.__metadata("design:type",
|
|
566
|
-
], ColorPickerComponent.prototype, "
|
|
567
|
-
tslib_1.__decorate([
|
|
568
|
-
core_1.ViewChild('colorGradient', { static: false }),
|
|
569
|
-
tslib_1.__metadata("design:type", color_gradient_component_1.ColorGradientComponent)
|
|
570
|
-
], ColorPickerComponent.prototype, "colorGradient", void 0);
|
|
782
|
+
core_1.ViewChild('flatColorPicker', { static: false }),
|
|
783
|
+
tslib_1.__metadata("design:type", flatcolorpicker_component_1.FlatColorPickerComponent)
|
|
784
|
+
], ColorPickerComponent.prototype, "flatColorPicker", void 0);
|
|
571
785
|
ColorPickerComponent = ColorPickerComponent_1 = tslib_1.__decorate([
|
|
572
786
|
core_1.Component({
|
|
787
|
+
exportAs: 'kendoColorPicker',
|
|
573
788
|
selector: 'kendo-colorpicker',
|
|
574
789
|
providers: [{
|
|
575
790
|
multi: true,
|
|
@@ -589,12 +804,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
589
804
|
useValue: 'kendo.colorpicker'
|
|
590
805
|
}
|
|
591
806
|
],
|
|
592
|
-
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-
|
|
807
|
+
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span\n #wrapper\n [ngClass]=\"{\n 'k-input-inner': true,\n 'k-disabled': this.disabled,\n 'k-focus': this.isFocused\n }\"\n role=\"listbox\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-readonly]=\"readonly\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n [id]=\"focusableId\"\n [attr.tabindex]=\"tabindex\"\n (focus)=\"handleWrapperFocus()\"\n (blur)=\"handleWrapperBlur()\"\n (mousedown)=\"$event.preventDefault()\"\n (keydown)=\"handleWrapperKeyDown($event)\"\n >\n <span\n class=\"k-value-icon k-color-preview\"\n [ngClass]=\"{'k-icon-color-preview': iconStyles, 'k-no-color': !value}\"\n (click)=\"handleActiveColorClick()\">\n <span *ngIf=\"iconClass || icon\" class=\"k-color-preview-icon k-icon\" [ngClass]=\"iconStyles\"></span>\n <span class=\"k-color-preview-mask\" [style.background-color]=\"value\"></span>\n </span>\n </span>\n <button\n type=\"button\"\n class=\"k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button\"\n [attr.aria-label]=\"colorPickerAriaLabel\"\n (click)=\"togglePopup()\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n <ng-template #popupTemplate>\n <kendo-flatcolorpicker\n #flatColorPicker\n [value]=\"value\"\n [format]=\"format\"\n [views]=\"views\"\n [activeView]=\"activeView\"\n [actionsLayout]=\"actionsLayout\"\n [preview]=\"preview\"\n [gradientSettings]=\"gradientSettings\"\n [paletteSettings]=\"paletteSettings\"\n [clearButton]=\"clearButton\"\n (focusout)=\"handlePopupBlur($event)\"\n (cancel)=\"handleCancelEvent($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
593
808
|
}),
|
|
594
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
809
|
+
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
810
|
+
kendo_angular_popup_1.PopupService,
|
|
595
811
|
core_1.ChangeDetectorRef,
|
|
596
812
|
kendo_angular_l10n_1.LocalizationService,
|
|
597
|
-
core_1.NgZone
|
|
813
|
+
core_1.NgZone,
|
|
814
|
+
core_1.Renderer2])
|
|
598
815
|
], ColorPickerComponent);
|
|
599
816
|
return ColorPickerComponent;
|
|
600
817
|
}());
|