@progress/kendo-angular-inputs 17.0.0-develop.4 → 17.0.0-develop.40
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/README.md +53 -166
- 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 +143 -126
- package/{esm2020 → esm2022}/colorpicker/color-input.component.mjs +70 -50
- package/{esm2020 → esm2022}/colorpicker/color-palette.component.mjs +129 -98
- package/{esm2020 → esm2022}/colorpicker/colorpicker.component.mjs +212 -159
- 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 +24 -14
- 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 +206 -152
- 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 +122 -100
- 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 +3724 -2916
- 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/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
|
@@ -27,96 +27,43 @@ const PRESSED = 'k-pressed';
|
|
|
27
27
|
* Represents the [Kendo UI Slider component for Angular]({% slug overview_slider %}).
|
|
28
28
|
*/
|
|
29
29
|
export class SliderComponent extends SliderBase {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
this.arrowLeftIcon = caretAltLeftIcon;
|
|
69
|
-
/**
|
|
70
|
-
* @hidden
|
|
71
|
-
*/
|
|
72
|
-
this.arrowRightIcon = caretAltRightIcon;
|
|
73
|
-
this.focusChangedProgrammatically = false;
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
this.onWrapClick = (args) => {
|
|
78
|
-
const target = args.target;
|
|
79
|
-
if (!this.isDisabled && !(target.closest('.k-button'))) {
|
|
80
|
-
const value = eventValue(args, this.track.nativeElement, this.getProps());
|
|
81
|
-
this.changeValue(value);
|
|
82
|
-
}
|
|
83
|
-
invokeElementMethod(this.draghandle, 'focus');
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* @hidden
|
|
87
|
-
*/
|
|
88
|
-
this.onKeyDown = (e) => {
|
|
89
|
-
const options = this.getProps();
|
|
90
|
-
const { max, min } = options;
|
|
91
|
-
const handler = this.keyBinding[e.keyCode];
|
|
92
|
-
if (this.isDisabled || !handler) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
const value = handler(options);
|
|
96
|
-
this.changeValue(trimValue(max, min, value));
|
|
97
|
-
e.preventDefault();
|
|
98
|
-
};
|
|
99
|
-
this.ngChange = (_) => { };
|
|
100
|
-
this.ngTouched = () => { };
|
|
101
|
-
this.decreaseValue = () => {
|
|
102
|
-
this.changeValue(decreaseValueToStep(this.value, this.getProps()));
|
|
103
|
-
};
|
|
104
|
-
this.increaseValue = () => {
|
|
105
|
-
this.changeValue(increaseValueToStep(this.value, this.getProps()));
|
|
106
|
-
};
|
|
107
|
-
this.handleBlur = () => {
|
|
108
|
-
this.changeDetector.markForCheck();
|
|
109
|
-
this.focused = false;
|
|
110
|
-
if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.control)) {
|
|
111
|
-
this.ngZone.run(() => {
|
|
112
|
-
this.ngTouched();
|
|
113
|
-
if (!this.focusChangedProgrammatically) {
|
|
114
|
-
this.onBlur.emit();
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
30
|
+
localization;
|
|
31
|
+
injector;
|
|
32
|
+
renderer;
|
|
33
|
+
ngZone;
|
|
34
|
+
changeDetector;
|
|
35
|
+
hostElement;
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
focusableId = `k-${guid()}`;
|
|
40
|
+
/**
|
|
41
|
+
* Changes the `title` attribute of the drag handle so that it can be localized.
|
|
42
|
+
*/
|
|
43
|
+
dragHandleTitle;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the title of the **Increase** button of the Slider ([see example]({% slug sidebuttons_slider %}#toc-titles)).
|
|
46
|
+
*/
|
|
47
|
+
incrementTitle;
|
|
48
|
+
/**
|
|
49
|
+
* Determines if the animation will be played on value change.
|
|
50
|
+
* Regardless of this setting, no animation will be played during the initial rendering.
|
|
51
|
+
*/
|
|
52
|
+
animate = true;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the title of the **Decrease** button of the Slider ([see example]({% slug sidebuttons_slider %}#toc-titles)).
|
|
55
|
+
*/
|
|
56
|
+
decrementTitle;
|
|
57
|
+
/**
|
|
58
|
+
* Renders the arrow side buttons of the Slider ([see example]({% slug sidebuttons_slider %}#toc-hidden-state)).
|
|
59
|
+
* When `showButtons` is set to `false`, the buttons are not displayed.
|
|
60
|
+
*/
|
|
61
|
+
showButtons = true;
|
|
62
|
+
/**
|
|
63
|
+
* The current value of the Slider when it is initially displayed.
|
|
64
|
+
* The component can use either NgModel or the `value` binding but not both of them at the same time.
|
|
65
|
+
*/
|
|
66
|
+
value = this.min;
|
|
120
67
|
/**
|
|
121
68
|
* @hidden
|
|
122
69
|
*/
|
|
@@ -132,6 +79,36 @@ export class SliderComponent extends SliderBase {
|
|
|
132
79
|
get currentValue() {
|
|
133
80
|
return isPresent(this.value) ? this.value.toString() : '';
|
|
134
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
arrowUpIcon = caretAltUpIcon;
|
|
86
|
+
/**
|
|
87
|
+
* @hidden
|
|
88
|
+
*/
|
|
89
|
+
arrowDownIcon = caretAltDownIcon;
|
|
90
|
+
/**
|
|
91
|
+
* @hidden
|
|
92
|
+
*/
|
|
93
|
+
arrowLeftIcon = caretAltLeftIcon;
|
|
94
|
+
/**
|
|
95
|
+
* @hidden
|
|
96
|
+
*/
|
|
97
|
+
arrowRightIcon = caretAltRightIcon;
|
|
98
|
+
draghandle;
|
|
99
|
+
decreaseButton;
|
|
100
|
+
increaseButton;
|
|
101
|
+
focusChangedProgrammatically = false;
|
|
102
|
+
isInvalid;
|
|
103
|
+
constructor(localization, injector, renderer, ngZone, changeDetector, hostElement) {
|
|
104
|
+
super(localization, injector, renderer, ngZone, changeDetector, hostElement);
|
|
105
|
+
this.localization = localization;
|
|
106
|
+
this.injector = injector;
|
|
107
|
+
this.renderer = renderer;
|
|
108
|
+
this.ngZone = ngZone;
|
|
109
|
+
this.changeDetector = changeDetector;
|
|
110
|
+
this.hostElement = hostElement;
|
|
111
|
+
}
|
|
135
112
|
/**
|
|
136
113
|
* Focuses the Slider.
|
|
137
114
|
*
|
|
@@ -210,6 +187,17 @@ export class SliderComponent extends SliderBase {
|
|
|
210
187
|
get dragHandleMessage() {
|
|
211
188
|
return this.dragHandleTitle || this.localizationService.get('dragHandle');
|
|
212
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* @hidden
|
|
192
|
+
*/
|
|
193
|
+
onWrapClick = (args) => {
|
|
194
|
+
const target = args.target;
|
|
195
|
+
if (!this.isDisabled && !(target.closest('.k-button'))) {
|
|
196
|
+
const value = eventValue(args, this.track.nativeElement, this.getProps());
|
|
197
|
+
this.changeValue(value);
|
|
198
|
+
}
|
|
199
|
+
invokeElementMethod(this.draghandle, 'focus');
|
|
200
|
+
};
|
|
213
201
|
/**
|
|
214
202
|
* @hidden
|
|
215
203
|
*/
|
|
@@ -226,6 +214,20 @@ export class SliderComponent extends SliderBase {
|
|
|
226
214
|
this.dragging = true;
|
|
227
215
|
this.changeValue(eventValue(args, this.track.nativeElement, this.getProps()));
|
|
228
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* @hidden
|
|
219
|
+
*/
|
|
220
|
+
onKeyDown = (e) => {
|
|
221
|
+
const options = this.getProps();
|
|
222
|
+
const { max, min } = options;
|
|
223
|
+
const handler = this.keyBinding[e.keyCode];
|
|
224
|
+
if (this.isDisabled || !handler) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const value = handler(options);
|
|
228
|
+
this.changeValue(trimValue(max, min, value));
|
|
229
|
+
e.preventDefault();
|
|
230
|
+
};
|
|
229
231
|
/**
|
|
230
232
|
* @hidden
|
|
231
233
|
*/
|
|
@@ -335,6 +337,14 @@ export class SliderComponent extends SliderBase {
|
|
|
335
337
|
this.subscriptions.add(subscription);
|
|
336
338
|
});
|
|
337
339
|
}
|
|
340
|
+
ngChange = (_) => { };
|
|
341
|
+
ngTouched = () => { };
|
|
342
|
+
decreaseValue = () => {
|
|
343
|
+
this.changeValue(decreaseValueToStep(this.value, this.getProps()));
|
|
344
|
+
};
|
|
345
|
+
increaseValue = () => {
|
|
346
|
+
this.changeValue(increaseValueToStep(this.value, this.getProps()));
|
|
347
|
+
};
|
|
338
348
|
getProps() {
|
|
339
349
|
return {
|
|
340
350
|
buttons: this.showButtons,
|
|
@@ -404,6 +414,18 @@ export class SliderComponent extends SliderBase {
|
|
|
404
414
|
}));
|
|
405
415
|
});
|
|
406
416
|
}
|
|
417
|
+
handleBlur = () => {
|
|
418
|
+
this.changeDetector.markForCheck();
|
|
419
|
+
this.focused = false;
|
|
420
|
+
if (hasObservers(this.onBlur) || requiresZoneOnBlur(this.control)) {
|
|
421
|
+
this.ngZone.run(() => {
|
|
422
|
+
this.ngTouched();
|
|
423
|
+
if (!this.focusChangedProgrammatically) {
|
|
424
|
+
this.onBlur.emit();
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
};
|
|
407
429
|
get decreaseButtonArrowIcon() {
|
|
408
430
|
const icon = !this.vertical ?
|
|
409
431
|
this.direction === 'ltr' ?
|
|
@@ -436,14 +458,13 @@ export class SliderComponent extends SliderBase {
|
|
|
436
458
|
this.arrowUpIcon;
|
|
437
459
|
return icon;
|
|
438
460
|
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
{
|
|
446
|
-
], viewQueries: [{ propertyName: "draghandle", first: true, predicate: ["draghandle"], descendants: true, static: true }, { propertyName: "decreaseButton", first: true, predicate: ["decreaseButton"], descendants: true, read: ElementRef }, { propertyName: "increaseButton", first: true, predicate: ["increaseButton"], descendants: true, read: ElementRef }], exportAs: ["kendoSlider"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
461
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Injector }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
462
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SliderComponent, isStandalone: true, selector: "kendo-slider", inputs: { focusableId: "focusableId", dragHandleTitle: "dragHandleTitle", incrementTitle: "incrementTitle", animate: "animate", decrementTitle: "decrementTitle", showButtons: "showButtons", value: "value", tabIndex: "tabIndex" }, providers: [
|
|
463
|
+
LocalizationService,
|
|
464
|
+
{ provide: L10N_PREFIX, useValue: 'kendo.slider' },
|
|
465
|
+
{ multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SliderComponent) },
|
|
466
|
+
{ provide: KendoInput, useExisting: forwardRef(() => SliderComponent) }
|
|
467
|
+
], viewQueries: [{ propertyName: "draghandle", first: true, predicate: ["draghandle"], descendants: true, static: true }, { propertyName: "decreaseButton", first: true, predicate: ["decreaseButton"], descendants: true, read: ElementRef }, { propertyName: "increaseButton", first: true, predicate: ["increaseButton"], descendants: true, read: ElementRef }], exportAs: ["kendoSlider"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
447
468
|
<ng-container kendoSliderLocalizedMessages
|
|
448
469
|
i18n-increment="kendo.slider.increment|The title of the **Increase** button of the Slider."
|
|
449
470
|
increment="increment"
|
|
@@ -523,8 +544,9 @@ SliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
|
523
544
|
aria-hidden="true"
|
|
524
545
|
></button>
|
|
525
546
|
<kendo-resize-sensor (resize)="sizeComponent(false)"></kendo-resize-sensor>
|
|
526
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSliderMessagesDirective, selector: "[kendoSliderLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]
|
|
527
|
-
|
|
547
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedSliderMessagesDirective, selector: "[kendoSliderLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: SliderTicksComponent, selector: "[kendoSliderTicks]", inputs: ["tickTitle", "vertical", "step", "largeStep", "min", "max", "labelTemplate"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
|
|
548
|
+
}
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderComponent, decorators: [{
|
|
528
550
|
type: Component,
|
|
529
551
|
args: [{
|
|
530
552
|
exportAs: 'kendoSlider',
|
|
@@ -45,11 +45,11 @@ import * as i3 from "./sliders-common/label-template.directive";
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
export class SliderModule {
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
49
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: SliderModule, imports: [i1.SliderComponent, i2.SliderCustomMessagesComponent, i3.LabelTemplateDirective], exports: [i1.SliderComponent, i2.SliderCustomMessagesComponent, i3.LabelTemplateDirective] });
|
|
50
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [i1.SliderComponent] });
|
|
48
51
|
}
|
|
49
|
-
|
|
50
|
-
SliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SliderModule, imports: [i1.SliderComponent, i2.SliderCustomMessagesComponent, i3.LabelTemplateDirective], exports: [i1.SliderComponent, i2.SliderCustomMessagesComponent, i3.LabelTemplateDirective] });
|
|
51
|
-
SliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SliderModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [i1.SliderComponent, i2.SliderCustomMessagesComponent] });
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SliderModule, decorators: [{
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderModule, decorators: [{
|
|
53
53
|
type: NgModule,
|
|
54
54
|
args: [{
|
|
55
55
|
imports: [...KENDO_SLIDER],
|
|
@@ -29,13 +29,14 @@ import * as i0 from "@angular/core";
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
export class LabelTemplateDirective {
|
|
32
|
+
templateRef;
|
|
32
33
|
constructor(templateRef) {
|
|
33
34
|
this.templateRef = templateRef;
|
|
34
35
|
}
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
37
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LabelTemplateDirective, isStandalone: true, selector: "[kendoSliderLabelTemplate]", ngImport: i0 });
|
|
35
38
|
}
|
|
36
|
-
|
|
37
|
-
LabelTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LabelTemplateDirective, isStandalone: true, selector: "[kendoSliderLabelTemplate]", ngImport: i0 });
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LabelTemplateDirective, decorators: [{
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelTemplateDirective, decorators: [{
|
|
39
40
|
type: Directive,
|
|
40
41
|
args: [{
|
|
41
42
|
selector: '[kendoSliderLabelTemplate]',
|
|
@@ -17,6 +17,107 @@ import * as i1 from "@progress/kendo-angular-l10n";
|
|
|
17
17
|
* @hidden
|
|
18
18
|
*/
|
|
19
19
|
export class SliderBase {
|
|
20
|
+
localizationService;
|
|
21
|
+
injector;
|
|
22
|
+
renderer;
|
|
23
|
+
ngZone;
|
|
24
|
+
changeDetector;
|
|
25
|
+
hostElement;
|
|
26
|
+
/**
|
|
27
|
+
* Defines the title of the ticks ([see example]({% slug ticks_slider %}#toc-titles)). The default title
|
|
28
|
+
* for each tick is its Slider value. If you use a callback function, the function accepts an argument
|
|
29
|
+
* that holds the value of the component and returns a string with the new title.
|
|
30
|
+
*/
|
|
31
|
+
title = identity;
|
|
32
|
+
/**
|
|
33
|
+
* Denotes the location of the tick marks in the Slider ([see example]({% slug ticks_slider %}#toc-placement)).
|
|
34
|
+
*
|
|
35
|
+
* The available options are:
|
|
36
|
+
* * `before`—The tick marks are located to the top side of the horizontal track or to the left side of a vertical track.
|
|
37
|
+
* * `after`—The tick marks are located to the bottom side of the horizontal track or to the right side of the vertical track.
|
|
38
|
+
* * `both`— (Default) The tick marks are located on both sides of the track.
|
|
39
|
+
* * `none`—The tick marks are not visible. The actual elements are not added to the DOM tree.
|
|
40
|
+
*/
|
|
41
|
+
tickPlacement = 'both';
|
|
42
|
+
/**
|
|
43
|
+
* If `vertical` is set to `true`, the orientation of the Slider changes from horizontal to vertical
|
|
44
|
+
* ([see example]({% slug orientation_slider %})).
|
|
45
|
+
*/
|
|
46
|
+
vertical = false;
|
|
47
|
+
/**
|
|
48
|
+
* The minimum value of the Slider ([see example]({% slug predefinedsteps_slider %}#toc-small-steps)).
|
|
49
|
+
* The attribute accepts both integers and floating-point numbers.
|
|
50
|
+
*/
|
|
51
|
+
min = 0;
|
|
52
|
+
/**
|
|
53
|
+
* The maximum value of the Slider ([see example]({% slug predefinedsteps_slider %}#toc-small-steps)).
|
|
54
|
+
* The attribute accepts both integers and floating-point numbers.
|
|
55
|
+
*/
|
|
56
|
+
max = 10;
|
|
57
|
+
/**
|
|
58
|
+
* The step value of the Slider ([see example]({% slug predefinedsteps_slider %}#toc-small-steps)).
|
|
59
|
+
* Accepts positive values only. Can be an integer or a floating-point number.
|
|
60
|
+
*/
|
|
61
|
+
smallStep = 1;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies that every n<sup>th</sup> tick will be large and will have a label
|
|
64
|
+
* ([see example]({% slug predefinedsteps_slider %}#toc-large-steps)).
|
|
65
|
+
* Accepts positive integer values only.
|
|
66
|
+
*/
|
|
67
|
+
largeStep = null;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the width between each two ticks along the track ([see example]({% slug ticks_slider %}#toc-width)). The value
|
|
70
|
+
* has to be set in pixels. If no `fixedTickWidth` is provided, the Slider automatically adjusts the tick width to
|
|
71
|
+
* accommodate the elements within the size of the component.
|
|
72
|
+
*/
|
|
73
|
+
fixedTickWidth;
|
|
74
|
+
/**
|
|
75
|
+
* Determines whether the Slider is disabled ([see example]({% slug disabledstate_slider %})). To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_slider#toc-managing-the-slider-disabled-state-in-reactive-forms).
|
|
76
|
+
*/
|
|
77
|
+
disabled = false;
|
|
78
|
+
/**
|
|
79
|
+
* Determines whether the Slider is in its read-only state ([see example]({% slug readonly_slider %})).
|
|
80
|
+
*
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
readonly = false;
|
|
84
|
+
/**
|
|
85
|
+
* Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the Slider.
|
|
86
|
+
*/
|
|
87
|
+
tabindex = 0;
|
|
88
|
+
/**
|
|
89
|
+
* Fires each time the user focuses the component.
|
|
90
|
+
*/
|
|
91
|
+
onFocus = new EventEmitter();
|
|
92
|
+
/**
|
|
93
|
+
* Fires each time the component is blurred.
|
|
94
|
+
*/
|
|
95
|
+
onBlur = new EventEmitter();
|
|
96
|
+
/**
|
|
97
|
+
* Fires each time the user selects a new value.
|
|
98
|
+
*/
|
|
99
|
+
valueChange = new EventEmitter();
|
|
100
|
+
direction;
|
|
101
|
+
get horizontalClass() {
|
|
102
|
+
return !this.vertical;
|
|
103
|
+
}
|
|
104
|
+
get verticalClass() {
|
|
105
|
+
return this.vertical;
|
|
106
|
+
}
|
|
107
|
+
sliderClass = true;
|
|
108
|
+
get disabledClass() {
|
|
109
|
+
return this.disabled;
|
|
110
|
+
}
|
|
111
|
+
wrapper;
|
|
112
|
+
track;
|
|
113
|
+
sliderSelection;
|
|
114
|
+
ticksContainer;
|
|
115
|
+
ticks;
|
|
116
|
+
labelTemplate;
|
|
117
|
+
subscriptions = new Subscription();
|
|
118
|
+
isFocused;
|
|
119
|
+
isDragged;
|
|
120
|
+
control;
|
|
20
121
|
constructor(localizationService, injector, renderer, ngZone, changeDetector, hostElement) {
|
|
21
122
|
this.localizationService = localizationService;
|
|
22
123
|
this.injector = injector;
|
|
@@ -24,96 +125,9 @@ export class SliderBase {
|
|
|
24
125
|
this.ngZone = ngZone;
|
|
25
126
|
this.changeDetector = changeDetector;
|
|
26
127
|
this.hostElement = hostElement;
|
|
27
|
-
/**
|
|
28
|
-
* Defines the title of the ticks ([see example]({% slug ticks_slider %}#toc-titles)). The default title
|
|
29
|
-
* for each tick is its Slider value. If you use a callback function, the function accepts an argument
|
|
30
|
-
* that holds the value of the component and returns a string with the new title.
|
|
31
|
-
*/
|
|
32
|
-
this.title = identity;
|
|
33
|
-
/**
|
|
34
|
-
* Denotes the location of the tick marks in the Slider ([see example]({% slug ticks_slider %}#toc-placement)).
|
|
35
|
-
*
|
|
36
|
-
* The available options are:
|
|
37
|
-
* * `before`—The tick marks are located to the top side of the horizontal track or to the left side of a vertical track.
|
|
38
|
-
* * `after`—The tick marks are located to the bottom side of the horizontal track or to the right side of the vertical track.
|
|
39
|
-
* * `both`— (Default) The tick marks are located on both sides of the track.
|
|
40
|
-
* * `none`—The tick marks are not visible. The actual elements are not added to the DOM tree.
|
|
41
|
-
*/
|
|
42
|
-
this.tickPlacement = 'both';
|
|
43
|
-
/**
|
|
44
|
-
* If `vertical` is set to `true`, the orientation of the Slider changes from horizontal to vertical
|
|
45
|
-
* ([see example]({% slug orientation_slider %})).
|
|
46
|
-
*/
|
|
47
|
-
this.vertical = false;
|
|
48
|
-
/**
|
|
49
|
-
* The minimum value of the Slider ([see example]({% slug predefinedsteps_slider %}#toc-small-steps)).
|
|
50
|
-
* The attribute accepts both integers and floating-point numbers.
|
|
51
|
-
*/
|
|
52
|
-
this.min = 0;
|
|
53
|
-
/**
|
|
54
|
-
* The maximum value of the Slider ([see example]({% slug predefinedsteps_slider %}#toc-small-steps)).
|
|
55
|
-
* The attribute accepts both integers and floating-point numbers.
|
|
56
|
-
*/
|
|
57
|
-
this.max = 10;
|
|
58
|
-
/**
|
|
59
|
-
* The step value of the Slider ([see example]({% slug predefinedsteps_slider %}#toc-small-steps)).
|
|
60
|
-
* Accepts positive values only. Can be an integer or a floating-point number.
|
|
61
|
-
*/
|
|
62
|
-
this.smallStep = 1;
|
|
63
|
-
/**
|
|
64
|
-
* Specifies that every n<sup>th</sup> tick will be large and will have a label
|
|
65
|
-
* ([see example]({% slug predefinedsteps_slider %}#toc-large-steps)).
|
|
66
|
-
* Accepts positive integer values only.
|
|
67
|
-
*/
|
|
68
|
-
this.largeStep = null;
|
|
69
|
-
/**
|
|
70
|
-
* Determines whether the Slider is disabled ([see example]({% slug disabledstate_slider %})). To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_slider#toc-managing-the-slider-disabled-state-in-reactive-forms).
|
|
71
|
-
*/
|
|
72
|
-
this.disabled = false;
|
|
73
|
-
/**
|
|
74
|
-
* Determines whether the Slider is in its read-only state ([see example]({% slug readonly_slider %})).
|
|
75
|
-
*
|
|
76
|
-
* @default false
|
|
77
|
-
*/
|
|
78
|
-
this.readonly = false;
|
|
79
|
-
/**
|
|
80
|
-
* Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the Slider.
|
|
81
|
-
*/
|
|
82
|
-
this.tabindex = 0;
|
|
83
|
-
/**
|
|
84
|
-
* Fires each time the user focuses the component.
|
|
85
|
-
*/
|
|
86
|
-
this.onFocus = new EventEmitter();
|
|
87
|
-
/**
|
|
88
|
-
* Fires each time the component is blurred.
|
|
89
|
-
*/
|
|
90
|
-
this.onBlur = new EventEmitter();
|
|
91
|
-
/**
|
|
92
|
-
* Fires each time the user selects a new value.
|
|
93
|
-
*/
|
|
94
|
-
this.valueChange = new EventEmitter();
|
|
95
|
-
this.sliderClass = true;
|
|
96
|
-
this.subscriptions = new Subscription();
|
|
97
|
-
/**
|
|
98
|
-
* @hidden
|
|
99
|
-
*/
|
|
100
|
-
this.ifEnabled = (callback, event) => {
|
|
101
|
-
if (!this.isDisabled) {
|
|
102
|
-
callback.call(this, event);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
128
|
validatePackage(packageMetadata);
|
|
106
129
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
107
130
|
}
|
|
108
|
-
get horizontalClass() {
|
|
109
|
-
return !this.vertical;
|
|
110
|
-
}
|
|
111
|
-
get verticalClass() {
|
|
112
|
-
return this.vertical;
|
|
113
|
-
}
|
|
114
|
-
get disabledClass() {
|
|
115
|
-
return this.disabled;
|
|
116
|
-
}
|
|
117
131
|
/**
|
|
118
132
|
* @hidden
|
|
119
133
|
* Called when the status of the component changes to or from `disabled`.
|
|
@@ -143,6 +157,14 @@ export class SliderBase {
|
|
|
143
157
|
get isDisabled() {
|
|
144
158
|
return this.disabled || this.readonly;
|
|
145
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* @hidden
|
|
162
|
+
*/
|
|
163
|
+
ifEnabled = (callback, event) => {
|
|
164
|
+
if (!this.isDisabled) {
|
|
165
|
+
callback.call(this, event);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
146
168
|
/**
|
|
147
169
|
* @hidden
|
|
148
170
|
* Used by the FloatingLabel to determine if the component is empty.
|
|
@@ -182,10 +204,10 @@ export class SliderBase {
|
|
|
182
204
|
}
|
|
183
205
|
});
|
|
184
206
|
}
|
|
207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderBase, deps: [{ token: i1.LocalizationService }, { token: i0.Injector }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
208
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SliderBase, selector: "kendo-slider-base", inputs: { title: "title", tickPlacement: "tickPlacement", vertical: "vertical", min: "min", max: "max", smallStep: "smallStep", largeStep: "largeStep", fixedTickWidth: "fixedTickWidth", disabled: "disabled", readonly: "readonly", tabindex: "tabindex" }, outputs: { onFocus: "focus", onBlur: "blur", valueChange: "valueChange" }, host: { properties: { "class.k-readonly": "this.readonly", "attr.dir": "this.direction", "class.k-slider-horizontal": "this.horizontalClass", "class.k-slider-vertical": "this.verticalClass", "class.k-slider": "this.sliderClass", "class.k-disabled": "this.disabledClass" } }, queries: [{ propertyName: "labelTemplate", first: true, predicate: LabelTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrap"], descendants: true, static: true }, { propertyName: "track", first: true, predicate: ["track"], descendants: true, static: true }, { propertyName: "sliderSelection", first: true, predicate: ["sliderSelection"], descendants: true, static: true }, { propertyName: "ticksContainer", first: true, predicate: ["ticks"], descendants: true, read: ElementRef }, { propertyName: "ticks", first: true, predicate: ["ticks"], descendants: true }], ngImport: i0, template: ``, isInline: true });
|
|
185
209
|
}
|
|
186
|
-
|
|
187
|
-
SliderBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SliderBase, selector: "kendo-slider-base", inputs: { title: "title", tickPlacement: "tickPlacement", vertical: "vertical", min: "min", max: "max", smallStep: "smallStep", largeStep: "largeStep", fixedTickWidth: "fixedTickWidth", disabled: "disabled", readonly: "readonly", tabindex: "tabindex" }, outputs: { onFocus: "focus", onBlur: "blur", valueChange: "valueChange" }, host: { properties: { "class.k-readonly": "this.readonly", "attr.dir": "this.direction", "class.k-slider-horizontal": "this.horizontalClass", "class.k-slider-vertical": "this.verticalClass", "class.k-slider": "this.sliderClass", "class.k-disabled": "this.disabledClass" } }, queries: [{ propertyName: "labelTemplate", first: true, predicate: LabelTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrap"], descendants: true, static: true }, { propertyName: "track", first: true, predicate: ["track"], descendants: true, static: true }, { propertyName: "sliderSelection", first: true, predicate: ["sliderSelection"], descendants: true, static: true }, { propertyName: "ticksContainer", first: true, predicate: ["ticks"], descendants: true, read: ElementRef }, { propertyName: "ticks", first: true, predicate: ["ticks"], descendants: true }], ngImport: i0, template: ``, isInline: true });
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SliderBase, decorators: [{
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderBase, decorators: [{
|
|
189
211
|
type: Component,
|
|
190
212
|
args: [{
|
|
191
213
|
selector: 'kendo-slider-base',
|
|
@@ -9,6 +9,12 @@ import { isPresent } from '../common/utils';
|
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
11
11
|
export class SliderModelBase {
|
|
12
|
+
props;
|
|
13
|
+
wrapper;
|
|
14
|
+
track;
|
|
15
|
+
renderer;
|
|
16
|
+
button;
|
|
17
|
+
tickSizes;
|
|
12
18
|
constructor(props, wrapper, track, renderer, button) {
|
|
13
19
|
this.props = props;
|
|
14
20
|
this.wrapper = wrapper;
|
|
@@ -11,21 +11,29 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
13
13
|
class SliderTick {
|
|
14
|
+
value;
|
|
15
|
+
classes = {
|
|
16
|
+
'k-tick': true
|
|
17
|
+
};
|
|
18
|
+
large;
|
|
14
19
|
constructor(value) {
|
|
15
20
|
this.value = value;
|
|
16
|
-
this.classes = {
|
|
17
|
-
'k-tick': true
|
|
18
|
-
};
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* @hidden
|
|
23
25
|
*/
|
|
24
26
|
export class SliderTicksComponent {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
wrapperClasses = 'k-reset k-slider-items';
|
|
28
|
+
tickTitle;
|
|
29
|
+
vertical;
|
|
30
|
+
step;
|
|
31
|
+
largeStep;
|
|
32
|
+
min;
|
|
33
|
+
max;
|
|
34
|
+
labelTemplate;
|
|
35
|
+
tickElements;
|
|
36
|
+
ticks = [];
|
|
29
37
|
ngOnChanges(_) {
|
|
30
38
|
this.createTicks();
|
|
31
39
|
}
|
|
@@ -57,9 +65,8 @@ export class SliderTicksComponent {
|
|
|
57
65
|
'k-last': (!first && !this.vertical) || (first && this.vertical)
|
|
58
66
|
};
|
|
59
67
|
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
SliderTicksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SliderTicksComponent, isStandalone: true, selector: "[kendoSliderTicks]", inputs: { tickTitle: "tickTitle", vertical: "vertical", step: "step", largeStep: "largeStep", min: "min", max: "max", labelTemplate: "labelTemplate" }, host: { properties: { "class": "this.wrapperClasses" } }, viewQueries: [{ propertyName: "tickElements", predicate: ["tickElement"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
68
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderTicksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SliderTicksComponent, isStandalone: true, selector: "[kendoSliderTicks]", inputs: { tickTitle: "tickTitle", vertical: "vertical", step: "step", largeStep: "largeStep", min: "min", max: "max", labelTemplate: "labelTemplate" }, host: { properties: { "class": "this.wrapperClasses" } }, viewQueries: [{ propertyName: "tickElements", predicate: ["tickElement"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
63
70
|
<li #tickElement *ngFor="let tick of ticks;"
|
|
64
71
|
[ngClass]="tick.classes"
|
|
65
72
|
title="{{ tickTitle(tick.value) }}"
|
|
@@ -78,7 +85,8 @@ SliderTicksComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
78
85
|
{{ tickTitle(value) }}
|
|
79
86
|
</ng-template>
|
|
80
87
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
81
|
-
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SliderTicksComponent, decorators: [{
|
|
82
90
|
type: Component,
|
|
83
91
|
args: [{
|
|
84
92
|
selector: '[kendoSliderTicks]',
|