@progress/kendo-angular-inputs 8.0.8 → 9.0.0-next.202203161725
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/bundles/kendo-angular-inputs.umd.js +5 -0
- package/{dist/es2015/checkbox → checkbox}/checkbox.directive.d.ts +7 -2
- package/{dist/es2015/checkbox.module.d.ts → checkbox.module.d.ts} +6 -0
- package/{dist/es2015/colorpicker → colorpicker}/color-contrast-svg.component.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/color-gradient.component.d.ts +23 -17
- package/{dist/es2015/colorpicker → colorpicker}/color-input.component.d.ts +6 -3
- package/{dist/es2015/colorpicker → colorpicker}/color-palette.component.d.ts +17 -10
- package/{dist/es2015/colorpicker → colorpicker}/colorpicker.component.d.ts +30 -18
- package/{dist/es2015/colorpicker → colorpicker}/constants.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/contrast-validation.component.d.ts +6 -3
- package/{dist/es2015/colorpicker → colorpicker}/contrast.component.d.ts +8 -5
- package/{dist/es2015/colorpicker → colorpicker}/events/active-color-click-event.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/events/cancel-event.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/events/close-event.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/events/kendo-drag-event.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/events/open-event.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/events.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/flatcolorpicker-actions.component.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/flatcolorpicker-header.component.d.ts +5 -2
- package/{dist/es2015/colorpicker → colorpicker}/flatcolorpicker.component.d.ts +15 -8
- package/{dist/es2015/colorpicker → colorpicker}/focus-on-dom-ready.directive.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/localization/colorgradient-localization.service.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/localization/colorpalette-localization.service.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/localization/colorpicker-localization.service.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/colorpicker → colorpicker}/localization/flatcolorpicker-localization.service.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/localization/localized-colorpicker-messages.directive.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/localization/messages.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/actions-layout.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/colorpicker-view.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/gradient-settings.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/hsva.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/output-format.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/palette-presets.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/palette-settings.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/popup-settings.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/rgb.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/rgba.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/table-cell.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/models/tile-size.d.ts +2 -2
- package/{dist/es2015/colorpicker → colorpicker}/models.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/services/color-palette.service.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/services/flatcolorpicker.service.d.ts +3 -0
- package/{dist/es2015/colorpicker → colorpicker}/utils/color-parser.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/utils/contrast-curve.d.ts +0 -0
- package/{dist/es2015/colorpicker → colorpicker}/utils.d.ts +0 -0
- package/colorpicker.module.d.ts +32 -0
- package/{dist/es2015/common → common}/dom-utils.d.ts +0 -0
- package/{dist/es2015/common → common}/math.d.ts +0 -0
- package/{dist/es2015/common → common}/models/fillmode.d.ts +0 -0
- package/{dist/es2015/common → common}/models/rounded.d.ts +0 -0
- package/{dist/es2015/common → common}/models/size.d.ts +0 -0
- package/{dist/es2015/common → common}/models/styling-classes.d.ts +0 -0
- package/{dist/es2015/common → common}/models.d.ts +0 -0
- package/{dist/es2015/common → common}/utils.d.ts +0 -0
- package/{dist/es2015 → esm2015}/checkbox/checkbox.directive.js +19 -26
- package/{dist/es2015 → esm2015}/checkbox.module.js +14 -11
- package/{dist/es2015 → esm2015}/colorpicker/color-contrast-svg.component.js +25 -30
- package/{dist/es2015 → esm2015}/colorpicker/color-gradient.component.js +231 -137
- package/{dist/es2015 → esm2015}/colorpicker/color-input.component.js +143 -65
- package/{dist/es2015 → esm2015}/colorpicker/color-palette.component.js +139 -132
- package/{dist/es2015 → esm2015}/colorpicker/colorpicker.component.js +224 -212
- package/{dist/es2015 → esm2015}/colorpicker/constants.js +0 -0
- package/esm2015/colorpicker/contrast-validation.component.js +67 -0
- package/esm2015/colorpicker/contrast.component.js +95 -0
- package/{dist/es2015 → esm2015}/colorpicker/events/active-color-click-event.js +0 -0
- package/{dist/es2015 → esm2015}/colorpicker/events/cancel-event.js +0 -0
- package/{dist/es2015 → esm2015}/colorpicker/events/close-event.js +0 -0
- package/{dist/es2015 → esm2015}/colorpicker/events/kendo-drag-event.js +1 -0
- package/{dist/es2015 → esm2015}/colorpicker/events/open-event.js +0 -0
- package/{dist/es → esm2015}/colorpicker/events.js +0 -0
- package/esm2015/colorpicker/flatcolorpicker-actions.component.js +77 -0
- package/esm2015/colorpicker/flatcolorpicker-header.component.js +161 -0
- package/{dist/es2015 → esm2015}/colorpicker/flatcolorpicker.component.js +207 -153
- package/esm2015/colorpicker/focus-on-dom-ready.directive.js +29 -0
- package/esm2015/colorpicker/localization/colorgradient-localization.service.js +45 -0
- package/esm2015/colorpicker/localization/colorpalette-localization.service.js +45 -0
- package/esm2015/colorpicker/localization/colorpicker-localization.service.js +31 -0
- package/esm2015/colorpicker/localization/custom-messages.component.js +40 -0
- package/esm2015/colorpicker/localization/flatcolorpicker-localization.service.js +45 -0
- package/esm2015/colorpicker/localization/localized-colorpicker-messages.directive.js +36 -0
- package/esm2015/colorpicker/localization/messages.js +67 -0
- package/{dist/es2015 → esm2015}/colorpicker/models/actions-layout.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/colorpicker-view.js +1 -0
- package/{dist/es2015 → esm2015}/colorpicker/models/gradient-settings.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/hsva.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/output-format.js +1 -0
- package/{dist/es2015 → esm2015}/colorpicker/models/palette-presets.js +1 -1
- package/{dist/es → esm2015}/colorpicker/models/palette-settings.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/popup-settings.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/rgb.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/rgba.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/table-cell.js +1 -0
- package/{dist/es → esm2015}/colorpicker/models/tile-size.js +2 -0
- package/esm2015/colorpicker/models.js +16 -0
- package/{dist/es2015 → esm2015}/colorpicker/services/color-palette.service.js +8 -10
- package/{dist/es2015 → esm2015}/colorpicker/services/flatcolorpicker.service.js +8 -7
- package/{dist/es2015 → esm2015}/colorpicker/utils/color-parser.js +0 -0
- package/{dist/es2015 → esm2015}/colorpicker/utils/contrast-curve.js +0 -0
- package/{dist/es → esm2015}/colorpicker/utils.js +0 -0
- package/{dist/es2015 → esm2015}/colorpicker.module.js +44 -15
- package/{dist/es2015 → esm2015}/common/dom-utils.js +0 -2
- package/{dist/es2015 → esm2015}/common/math.js +0 -2
- package/{dist/es → esm2015}/common/models/fillmode.js +1 -0
- package/{dist/es → esm2015}/common/models/rounded.js +1 -0
- package/{dist/es → esm2015}/common/models/size.js +1 -0
- package/{dist/es → esm2015}/common/models/styling-classes.js +1 -0
- package/{dist/es → esm2015}/common/models.js +4 -0
- package/{dist/es2015 → esm2015}/common/utils.js +0 -0
- package/esm2015/formfield/error.component.js +68 -0
- package/{dist/es2015 → esm2015}/formfield/formfield.component.js +68 -72
- package/esm2015/formfield/hint.component.js +63 -0
- package/{dist/es → esm2015}/formfield/models/message-align.js +1 -0
- package/{dist/es → esm2015}/formfield/models/orientation.js +1 -0
- package/{dist/es → esm2015}/formfield/models/show-options.js +1 -0
- package/{dist/es2015 → esm2015}/formfield.module.js +14 -11
- package/{dist/es2015 → esm2015}/inputs.module.js +45 -22
- package/{dist/es2015/sliders-common/sliders-common.module.d.ts → esm2015/kendo-angular-inputs.js} +2 -3
- package/{dist/es2015 → esm2015}/main.js +6 -0
- package/{dist/es2015 → esm2015}/maskedtextbox/maskedtextbox.component.js +142 -156
- package/{dist/es2015 → esm2015}/maskedtextbox/masking.service.js +8 -10
- package/{dist/es2015 → esm2015}/maskedtextbox/parsing/combinators.js +0 -3
- package/{dist/es2015 → esm2015}/maskedtextbox/parsing/parsers.js +0 -2
- package/{dist/es2015 → esm2015}/maskedtextbox/parsing/result.js +1 -0
- package/{dist/es2015 → esm2015}/maskedtextbox/parsing/stream.js +0 -0
- package/{dist/es → esm2015}/maskedtextbox.module.js +14 -14
- package/{dist/es → esm2015}/numerictextbox/arrow-direction.js +0 -0
- package/{dist/es2015 → esm2015}/numerictextbox/constants.js +0 -0
- package/esm2015/numerictextbox/localization/custom-messages.component.js +40 -0
- package/esm2015/numerictextbox/localization/localized-numerictextbox-messages.directive.js +36 -0
- package/esm2015/numerictextbox/localization/messages.js +25 -0
- package/{dist/es2015 → esm2015}/numerictextbox/numerictextbox.component.js +161 -151
- package/{dist/es2015 → esm2015}/numerictextbox/utils.js +1 -1
- package/{dist/es2015 → esm2015}/numerictextbox.module.js +24 -18
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es2015 → esm2015}/radiobutton/radiobutton.directive.js +17 -20
- package/{dist/es2015 → esm2015}/radiobutton.module.js +14 -11
- package/esm2015/rangeslider/localization/custom-messages.component.js +40 -0
- package/esm2015/rangeslider/localization/localized-rangeslider-messages.directive.js +36 -0
- package/esm2015/rangeslider/localization/messages.js +25 -0
- package/{dist/es2015 → esm2015}/rangeslider/rangeslider-model.js +0 -0
- package/{dist/es → esm2015}/rangeslider/rangeslider-value.type.js +1 -0
- package/{dist/es2015 → esm2015}/rangeslider/rangeslider.component.js +114 -38
- package/{dist/es2015 → esm2015}/rangeslider.module.js +28 -20
- package/esm2015/shared/input-separator.component.js +41 -0
- package/{dist/es2015 → esm2015}/shared/textarea.directive.js +58 -52
- package/{dist/es2015 → esm2015}/shared/utils.js +0 -0
- package/esm2015/shared.module.js +32 -0
- package/esm2015/slider/localization/custom-messages.component.js +40 -0
- package/esm2015/slider/localization/localized-slider-messages.directive.js +36 -0
- package/esm2015/slider/localization/messages.js +27 -0
- package/{dist/es2015 → esm2015}/slider/slider-model.js +0 -0
- package/{dist/es2015 → esm2015}/slider/slider.component.js +133 -71
- package/{dist/es → esm2015}/slider.module.js +28 -23
- package/{dist/es2015 → esm2015}/sliders-common/label-template.directive.js +14 -12
- package/{dist/es2015 → esm2015}/sliders-common/slider-base.js +77 -112
- package/{dist/es2015 → esm2015}/sliders-common/slider-model.base.js +0 -0
- package/esm2015/sliders-common/slider-ticks.component.js +125 -0
- package/esm2015/sliders-common/sliders-common.module.js +42 -0
- package/{dist/es2015 → esm2015}/sliders-common/sliders-util.js +0 -0
- package/esm2015/switch/localization/custom-messages.component.js +40 -0
- package/esm2015/switch/localization/localized-switch-messages.directive.js +36 -0
- package/esm2015/switch/localization/messages.js +25 -0
- package/{dist/es2015 → esm2015}/switch/switch.component.js +140 -134
- package/{dist/es2015 → esm2015}/switch.module.js +26 -19
- package/{dist/es2015 → esm2015}/text-fields-common/text-fields-base.js +37 -47
- package/{dist/es → esm2015}/textarea/models/flow.js +1 -0
- package/{dist/es → esm2015}/textarea/models/resize.js +1 -0
- package/esm2015/textarea/textarea-suffix.component.js +41 -0
- package/{dist/es2015 → esm2015}/textarea/textarea.component.js +102 -104
- package/{dist/es → esm2015}/textarea.module.js +27 -22
- package/esm2015/textbox/localization/custom-messages.component.js +40 -0
- package/esm2015/textbox/localization/localized-textbox-messages.directive.js +36 -0
- package/esm2015/textbox/localization/messages.js +23 -0
- package/{dist/es → esm2015}/textbox/models/icon-show-options.js +1 -0
- package/esm2015/textbox/textbox-prefix.directive.js +38 -0
- package/esm2015/textbox/textbox-suffix.directive.js +38 -0
- package/{dist/es2015 → esm2015}/textbox/textbox.component.js +155 -155
- package/{dist/es2015 → esm2015}/textbox/textbox.directive.js +36 -31
- package/esm2015/textbox.module.js +88 -0
- package/{dist/es2015 → esm2015}/validators/max.validator.js +0 -0
- package/{dist/es2015 → esm2015}/validators/min.validator.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-inputs.js} +4057 -3410
- package/{dist/es2015/formfield → formfield}/error.component.d.ts +6 -3
- package/{dist/es2015/formfield → formfield}/formfield.component.d.ts +9 -6
- package/{dist/es2015/formfield → formfield}/hint.component.d.ts +6 -3
- package/{dist/es2015/formfield → formfield}/models/message-align.d.ts +0 -0
- package/{dist/es2015/formfield → formfield}/models/orientation.d.ts +0 -0
- package/{dist/es2015/formfield → formfield}/models/show-options.d.ts +0 -0
- package/{dist/es2015/formfield.module.d.ts → formfield.module.d.ts} +8 -0
- package/{dist/es2015/inputs.module.d.ts → inputs.module.d.ts} +16 -0
- package/kendo-angular-inputs.d.ts +9 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +5 -0
- package/{dist/es2015/maskedtextbox → maskedtextbox}/maskedtextbox.component.d.ts +19 -8
- package/{dist/es2015/maskedtextbox → maskedtextbox}/masking.service.d.ts +7 -4
- package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/combinators.d.ts +0 -0
- package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/parsers.d.ts +0 -0
- package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/result.d.ts +0 -0
- package/{dist/es2015/maskedtextbox → maskedtextbox}/parsing/stream.d.ts +0 -0
- package/{dist/es2015/maskedtextbox.module.d.ts → maskedtextbox.module.d.ts} +7 -0
- package/{dist/es2015/numerictextbox → numerictextbox}/arrow-direction.d.ts +0 -0
- package/{dist/es2015/numerictextbox → numerictextbox}/constants.d.ts +0 -0
- package/{dist/es2015/numerictextbox → numerictextbox}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/numerictextbox → numerictextbox}/localization/localized-numerictextbox-messages.directive.d.ts +3 -0
- package/{dist/es2015/numerictextbox → numerictextbox}/localization/messages.d.ts +3 -0
- package/{dist/es2015/numerictextbox → numerictextbox}/numerictextbox.component.d.ts +23 -13
- package/{dist/es2015/numerictextbox → numerictextbox}/utils.d.ts +0 -0
- package/{dist/es2015/numerictextbox.module.d.ts → numerictextbox.module.d.ts} +9 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +41 -113
- package/{dist/es2015/radiobutton → radiobutton}/radiobutton.directive.d.ts +5 -1
- package/{dist/es2015/radiobutton.module.d.ts → radiobutton.module.d.ts} +6 -0
- package/{dist/es2015/rangeslider → rangeslider}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/rangeslider → rangeslider}/localization/localized-rangeslider-messages.directive.d.ts +3 -0
- package/{dist/es2015/rangeslider → rangeslider}/localization/messages.d.ts +3 -0
- package/{dist/es2015/rangeslider → rangeslider}/rangeslider-model.d.ts +0 -0
- package/{dist/es2015/rangeslider → rangeslider}/rangeslider-value.type.d.ts +0 -0
- package/{dist/es2015/rangeslider → rangeslider}/rangeslider.component.d.ts +7 -4
- package/{dist/es2015/rangeslider.module.d.ts → rangeslider.module.d.ts} +10 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/shared → shared}/input-separator.component.d.ts +3 -0
- package/{dist/es2015/shared → shared}/textarea.directive.d.ts +7 -2
- package/{dist/es2015/shared → shared}/utils.d.ts +0 -0
- package/{dist/es2015/shared.module.d.ts → shared.module.d.ts} +6 -0
- package/{dist/es2015/slider → slider}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/slider → slider}/localization/localized-slider-messages.directive.d.ts +3 -0
- package/{dist/es2015/slider → slider}/localization/messages.d.ts +3 -0
- package/{dist/es2015/slider → slider}/slider-model.d.ts +0 -0
- package/{dist/es2015/slider → slider}/slider.component.d.ts +11 -7
- package/{dist/es2015/slider.module.d.ts → slider.module.d.ts} +10 -0
- package/{dist/es2015/sliders-common → sliders-common}/label-template.directive.d.ts +3 -0
- package/{dist/es2015/sliders-common → sliders-common}/slider-base.d.ts +9 -7
- package/{dist/es2015/sliders-common → sliders-common}/slider-model.base.d.ts +0 -0
- package/{dist/es2015/sliders-common → sliders-common}/slider-ticks.component.d.ts +3 -0
- package/sliders-common/sliders-common.module.d.ts +17 -0
- package/{dist/es2015/sliders-common → sliders-common}/sliders-util.d.ts +3 -2
- package/{dist/es2015/switch → switch}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/switch → switch}/localization/localized-switch-messages.directive.d.ts +3 -0
- package/{dist/es2015/switch → switch}/localization/messages.d.ts +3 -0
- package/{dist/es2015/switch → switch}/switch.component.d.ts +21 -13
- package/{dist/es2015/switch.module.d.ts → switch.module.d.ts} +9 -0
- package/{dist/es2015/text-fields-common → text-fields-common}/text-fields-base.d.ts +4 -1
- package/{dist/es2015/textarea → textarea}/models/flow.d.ts +0 -0
- package/{dist/es2015/textarea → textarea}/models/resize.d.ts +0 -0
- package/{dist/es2015/textarea → textarea}/textarea-suffix.component.d.ts +3 -0
- package/{dist/es2015/textarea → textarea}/textarea.component.d.ts +16 -8
- package/{dist/es2015/textarea.module.d.ts → textarea.module.d.ts} +11 -0
- package/{dist/es2015/textbox → textbox}/localization/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/textbox → textbox}/localization/localized-textbox-messages.directive.d.ts +3 -0
- package/{dist/es2015/textbox → textbox}/localization/messages.d.ts +3 -0
- package/{dist/es2015/textbox → textbox}/models/icon-show-options.d.ts +0 -0
- package/{dist/es2015/textbox → textbox}/textbox-prefix.directive.d.ts +3 -0
- package/{dist/es2015/textbox → textbox}/textbox-suffix.directive.d.ts +3 -0
- package/{dist/es2015/textbox → textbox}/textbox.component.d.ts +19 -11
- package/{dist/es2015/textbox → textbox}/textbox.directive.d.ts +9 -4
- package/textbox.module.d.ts +52 -0
- package/{dist/es2015/validators → validators}/max.validator.d.ts +0 -0
- package/{dist/es2015/validators → validators}/min.validator.d.ts +0 -0
- package/dist/cdn/js/kendo-angular-inputs.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/checkbox/checkbox.directive.js +0 -107
- package/dist/es/checkbox.module.js +0 -52
- package/dist/es/colorpicker/color-contrast-svg.component.js +0 -95
- package/dist/es/colorpicker/color-gradient.component.js +0 -697
- package/dist/es/colorpicker/color-input.component.js +0 -193
- package/dist/es/colorpicker/color-palette.component.js +0 -523
- package/dist/es/colorpicker/colorpicker.component.js +0 -958
- package/dist/es/colorpicker/constants.js +0 -36
- package/dist/es/colorpicker/contrast-validation.component.js +0 -59
- package/dist/es/colorpicker/contrast.component.js +0 -70
- package/dist/es/colorpicker/events/active-color-click-event.js +0 -60
- package/dist/es/colorpicker/events/cancel-event.js +0 -19
- package/dist/es/colorpicker/events/close-event.js +0 -17
- package/dist/es/colorpicker/events/kendo-drag-event.js +0 -4
- package/dist/es/colorpicker/events/open-event.js +0 -17
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +0 -50
- package/dist/es/colorpicker/flatcolorpicker-header.component.js +0 -94
- package/dist/es/colorpicker/flatcolorpicker.component.js +0 -549
- package/dist/es/colorpicker/focus-on-dom-ready.directive.js +0 -31
- package/dist/es/colorpicker/localization/colorgradient-localization.service.js +0 -34
- package/dist/es/colorpicker/localization/colorpalette-localization.service.js +0 -34
- package/dist/es/colorpicker/localization/colorpicker-localization.service.js +0 -24
- package/dist/es/colorpicker/localization/custom-messages.component.js +0 -43
- package/dist/es/colorpicker/localization/flatcolorpicker-localization.service.js +0 -34
- package/dist/es/colorpicker/localization/localized-colorpicker-messages.directive.js +0 -35
- package/dist/es/colorpicker/localization/messages.js +0 -110
- package/dist/es/colorpicker/models/actions-layout.js +0 -4
- package/dist/es/colorpicker/models/gradient-settings.js +0 -4
- package/dist/es/colorpicker/models/palette-presets.js +0 -62
- package/dist/es/colorpicker/models.js +0 -5
- package/dist/es/colorpicker/services/color-palette.service.js +0 -67
- package/dist/es/colorpicker/services/flatcolorpicker.service.js +0 -41
- package/dist/es/colorpicker/utils/color-parser.js +0 -170
- package/dist/es/colorpicker/utils/contrast-curve.js +0 -91
- package/dist/es/colorpicker.module.js +0 -67
- package/dist/es/common/dom-utils.js +0 -47
- package/dist/es/common/math.js +0 -67
- package/dist/es/common/utils.js +0 -73
- package/dist/es/formfield/error.component.js +0 -85
- package/dist/es/formfield/formfield.component.js +0 -296
- package/dist/es/formfield/hint.component.js +0 -79
- package/dist/es/formfield.module.js +0 -54
- package/dist/es/index.js +0 -37
- package/dist/es/inputs.module.js +0 -74
- package/dist/es/main.js +0 -53
- package/dist/es/maskedtextbox/maskedtextbox.component.js +0 -725
- package/dist/es/maskedtextbox/masking.service.js +0 -215
- package/dist/es/maskedtextbox/parsing/combinators.js +0 -31
- package/dist/es/maskedtextbox/parsing/parsers.js +0 -160
- package/dist/es/maskedtextbox/parsing/result.js +0 -43
- package/dist/es/maskedtextbox/parsing/stream.js +0 -45
- package/dist/es/numerictextbox/constants.js +0 -28
- package/dist/es/numerictextbox/localization/custom-messages.component.js +0 -43
- package/dist/es/numerictextbox/localization/localized-numerictextbox-messages.directive.js +0 -35
- package/dist/es/numerictextbox/localization/messages.js +0 -26
- package/dist/es/numerictextbox/numerictextbox.component.js +0 -1049
- package/dist/es/numerictextbox/utils.js +0 -91
- package/dist/es/numerictextbox.module.js +0 -62
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/radiobutton/radiobutton.directive.js +0 -83
- package/dist/es/radiobutton.module.js +0 -52
- package/dist/es/rangeslider/localization/custom-messages.component.js +0 -43
- package/dist/es/rangeslider/localization/localized-rangeslider-messages.directive.js +0 -35
- package/dist/es/rangeslider/localization/messages.js +0 -26
- package/dist/es/rangeslider/rangeslider-model.js +0 -59
- package/dist/es/rangeslider/rangeslider.component.js +0 -467
- package/dist/es/rangeslider.module.js +0 -66
- package/dist/es/shared/input-separator.component.js +0 -41
- package/dist/es/shared/textarea.directive.js +0 -269
- package/dist/es/shared/utils.js +0 -23
- package/dist/es/shared.module.js +0 -30
- package/dist/es/slider/localization/custom-messages.component.js +0 -43
- package/dist/es/slider/localization/localized-slider-messages.directive.js +0 -35
- package/dist/es/slider/localization/messages.js +0 -30
- package/dist/es/slider/slider-model.js +0 -41
- package/dist/es/slider/slider.component.js +0 -482
- package/dist/es/sliders-common/label-template.directive.js +0 -44
- package/dist/es/sliders-common/slider-base.js +0 -326
- package/dist/es/sliders-common/slider-model.base.js +0 -96
- package/dist/es/sliders-common/slider-ticks.component.js +0 -104
- package/dist/es/sliders-common/sliders-common.module.js +0 -35
- package/dist/es/sliders-common/sliders-util.js +0 -234
- package/dist/es/switch/localization/custom-messages.component.js +0 -43
- package/dist/es/switch/localization/localized-switch-messages.directive.js +0 -35
- package/dist/es/switch/localization/messages.js +0 -26
- package/dist/es/switch/switch.component.js +0 -570
- package/dist/es/switch.module.js +0 -64
- package/dist/es/text-fields-common/text-fields-base.js +0 -144
- package/dist/es/textarea/textarea-suffix.component.js +0 -41
- package/dist/es/textarea/textarea.component.js +0 -600
- package/dist/es/textbox/localization/custom-messages.component.js +0 -43
- package/dist/es/textbox/localization/localized-textbox-messages.directive.js +0 -35
- package/dist/es/textbox/localization/messages.js +0 -22
- package/dist/es/textbox/textbox-prefix.directive.js +0 -37
- package/dist/es/textbox/textbox-suffix.directive.js +0 -37
- package/dist/es/textbox/textbox.component.js +0 -763
- package/dist/es/textbox/textbox.directive.js +0 -127
- package/dist/es/textbox.module.js +0 -75
- package/dist/es/validators/max.validator.js +0 -21
- package/dist/es/validators/min.validator.js +0 -21
- package/dist/es2015/colorpicker/contrast-validation.component.js +0 -58
- package/dist/es2015/colorpicker/contrast.component.js +0 -72
- package/dist/es2015/colorpicker/events.js +0 -8
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +0 -62
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +0 -133
- package/dist/es2015/colorpicker/focus-on-dom-ready.directive.js +0 -29
- package/dist/es2015/colorpicker/localization/colorgradient-localization.service.js +0 -31
- package/dist/es2015/colorpicker/localization/colorpalette-localization.service.js +0 -31
- package/dist/es2015/colorpicker/localization/colorpicker-localization.service.js +0 -22
- package/dist/es2015/colorpicker/localization/custom-messages.component.js +0 -35
- package/dist/es2015/colorpicker/localization/flatcolorpicker-localization.service.js +0 -31
- package/dist/es2015/colorpicker/localization/localized-colorpicker-messages.directive.js +0 -31
- package/dist/es2015/colorpicker/localization/messages.js +0 -104
- package/dist/es2015/colorpicker/models/colorpicker-view.js +0 -4
- package/dist/es2015/colorpicker/models/hsva.js +0 -4
- package/dist/es2015/colorpicker/models/output-format.js +0 -4
- package/dist/es2015/colorpicker/models/palette-settings.js +0 -4
- package/dist/es2015/colorpicker/models/popup-settings.js +0 -4
- package/dist/es2015/colorpicker/models/rgb.js +0 -4
- package/dist/es2015/colorpicker/models/rgba.js +0 -4
- package/dist/es2015/colorpicker/models/table-cell.js +0 -4
- package/dist/es2015/colorpicker/models/tile-size.js +0 -4
- package/dist/es2015/colorpicker/models.js +0 -5
- package/dist/es2015/colorpicker/utils.js +0 -6
- package/dist/es2015/colorpicker.module.d.ts +0 -10
- package/dist/es2015/common/models/fillmode.js +0 -4
- package/dist/es2015/common/models/rounded.js +0 -4
- package/dist/es2015/common/models/size.js +0 -4
- package/dist/es2015/common/models/styling-classes.js +0 -4
- package/dist/es2015/common/models.js +0 -4
- package/dist/es2015/formfield/error.component.js +0 -78
- package/dist/es2015/formfield/hint.component.js +0 -71
- package/dist/es2015/formfield/models/message-align.js +0 -4
- package/dist/es2015/formfield/models/orientation.js +0 -4
- package/dist/es2015/formfield/models/show-options.js +0 -4
- package/dist/es2015/index.d.ts +0 -37
- package/dist/es2015/index.js +0 -37
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/maskedtextbox.module.js +0 -50
- package/dist/es2015/numerictextbox/arrow-direction.js +0 -13
- package/dist/es2015/numerictextbox/localization/custom-messages.component.js +0 -35
- package/dist/es2015/numerictextbox/localization/localized-numerictextbox-messages.directive.js +0 -31
- package/dist/es2015/numerictextbox/localization/messages.js +0 -20
- package/dist/es2015/rangeslider/localization/custom-messages.component.js +0 -35
- package/dist/es2015/rangeslider/localization/localized-rangeslider-messages.directive.js +0 -31
- package/dist/es2015/rangeslider/localization/messages.js +0 -20
- package/dist/es2015/rangeslider/rangeslider-value.type.js +0 -4
- package/dist/es2015/shared/input-separator.component.js +0 -58
- package/dist/es2015/shared.module.js +0 -27
- package/dist/es2015/slider/localization/custom-messages.component.js +0 -35
- package/dist/es2015/slider/localization/localized-slider-messages.directive.js +0 -31
- package/dist/es2015/slider/localization/messages.js +0 -24
- package/dist/es2015/slider.module.js +0 -63
- package/dist/es2015/sliders-common/slider-ticks.component.js +0 -123
- package/dist/es2015/sliders-common/sliders-common.module.js +0 -32
- package/dist/es2015/switch/localization/custom-messages.component.js +0 -35
- package/dist/es2015/switch/localization/localized-switch-messages.directive.js +0 -31
- package/dist/es2015/switch/localization/messages.js +0 -20
- package/dist/es2015/textarea/models/flow.js +0 -4
- package/dist/es2015/textarea/models/resize.js +0 -4
- package/dist/es2015/textarea/textarea-suffix.component.js +0 -57
- package/dist/es2015/textarea.module.js +0 -60
- package/dist/es2015/textbox/localization/custom-messages.component.js +0 -35
- package/dist/es2015/textbox/localization/localized-textbox-messages.directive.js +0 -31
- package/dist/es2015/textbox/localization/messages.js +0 -16
- package/dist/es2015/textbox/models/icon-show-options.js +0 -4
- package/dist/es2015/textbox/textbox-prefix.directive.js +0 -36
- package/dist/es2015/textbox/textbox-suffix.directive.js +0 -36
- package/dist/es2015/textbox.module.d.ts +0 -37
- package/dist/es2015/textbox.module.js +0 -72
- package/dist/fesm5/index.js +0 -12454
- package/dist/npm/checkbox/checkbox.directive.js +0 -109
- package/dist/npm/checkbox.module.js +0 -54
- package/dist/npm/colorpicker/color-contrast-svg.component.js +0 -97
- package/dist/npm/colorpicker/color-gradient.component.js +0 -699
- package/dist/npm/colorpicker/color-input.component.js +0 -195
- package/dist/npm/colorpicker/color-palette.component.js +0 -525
- package/dist/npm/colorpicker/colorpicker.component.js +0 -960
- package/dist/npm/colorpicker/constants.js +0 -38
- package/dist/npm/colorpicker/contrast-validation.component.js +0 -61
- package/dist/npm/colorpicker/contrast.component.js +0 -72
- package/dist/npm/colorpicker/events/active-color-click-event.js +0 -62
- package/dist/npm/colorpicker/events/cancel-event.js +0 -21
- package/dist/npm/colorpicker/events/close-event.js +0 -19
- package/dist/npm/colorpicker/events/kendo-drag-event.js +0 -6
- package/dist/npm/colorpicker/events/open-event.js +0 -19
- package/dist/npm/colorpicker/events.js +0 -11
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +0 -52
- package/dist/npm/colorpicker/flatcolorpicker-header.component.js +0 -96
- package/dist/npm/colorpicker/flatcolorpicker.component.js +0 -551
- package/dist/npm/colorpicker/focus-on-dom-ready.directive.js +0 -33
- package/dist/npm/colorpicker/localization/colorgradient-localization.service.js +0 -36
- package/dist/npm/colorpicker/localization/colorpalette-localization.service.js +0 -36
- package/dist/npm/colorpicker/localization/colorpicker-localization.service.js +0 -26
- package/dist/npm/colorpicker/localization/custom-messages.component.js +0 -45
- package/dist/npm/colorpicker/localization/flatcolorpicker-localization.service.js +0 -36
- package/dist/npm/colorpicker/localization/localized-colorpicker-messages.directive.js +0 -37
- package/dist/npm/colorpicker/localization/messages.js +0 -112
- package/dist/npm/colorpicker/models/actions-layout.js +0 -6
- package/dist/npm/colorpicker/models/colorpicker-view.js +0 -6
- package/dist/npm/colorpicker/models/gradient-settings.js +0 -6
- package/dist/npm/colorpicker/models/hsva.js +0 -6
- package/dist/npm/colorpicker/models/output-format.js +0 -6
- package/dist/npm/colorpicker/models/palette-presets.js +0 -64
- package/dist/npm/colorpicker/models/palette-settings.js +0 -6
- package/dist/npm/colorpicker/models/popup-settings.js +0 -6
- package/dist/npm/colorpicker/models/rgb.js +0 -6
- package/dist/npm/colorpicker/models/rgba.js +0 -6
- package/dist/npm/colorpicker/models/table-cell.js +0 -6
- package/dist/npm/colorpicker/models/tile-size.js +0 -6
- package/dist/npm/colorpicker/models.js +0 -8
- package/dist/npm/colorpicker/services/color-palette.service.js +0 -69
- package/dist/npm/colorpicker/services/flatcolorpicker.service.js +0 -43
- package/dist/npm/colorpicker/utils/color-parser.js +0 -173
- package/dist/npm/colorpicker/utils/contrast-curve.js +0 -93
- package/dist/npm/colorpicker/utils.js +0 -9
- package/dist/npm/colorpicker.module.js +0 -69
- package/dist/npm/common/dom-utils.js +0 -50
- package/dist/npm/common/math.js +0 -69
- package/dist/npm/common/models/fillmode.js +0 -6
- package/dist/npm/common/models/rounded.js +0 -6
- package/dist/npm/common/models/size.js +0 -6
- package/dist/npm/common/models/styling-classes.js +0 -6
- package/dist/npm/common/models.js +0 -6
- package/dist/npm/common/utils.js +0 -75
- package/dist/npm/formfield/error.component.js +0 -87
- package/dist/npm/formfield/formfield.component.js +0 -298
- package/dist/npm/formfield/hint.component.js +0 -81
- package/dist/npm/formfield/models/message-align.js +0 -6
- package/dist/npm/formfield/models/orientation.js +0 -6
- package/dist/npm/formfield/models/show-options.js +0 -6
- package/dist/npm/formfield.module.js +0 -56
- package/dist/npm/index.js +0 -69
- package/dist/npm/inputs.module.js +0 -76
- package/dist/npm/main.js +0 -100
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +0 -727
- package/dist/npm/maskedtextbox/masking.service.js +0 -217
- package/dist/npm/maskedtextbox/parsing/combinators.js +0 -34
- package/dist/npm/maskedtextbox/parsing/parsers.js +0 -162
- package/dist/npm/maskedtextbox/parsing/result.js +0 -45
- package/dist/npm/maskedtextbox/parsing/stream.js +0 -47
- package/dist/npm/maskedtextbox.module.js +0 -55
- package/dist/npm/numerictextbox/arrow-direction.js +0 -15
- package/dist/npm/numerictextbox/constants.js +0 -30
- package/dist/npm/numerictextbox/localization/custom-messages.component.js +0 -45
- package/dist/npm/numerictextbox/localization/localized-numerictextbox-messages.directive.js +0 -37
- package/dist/npm/numerictextbox/localization/messages.js +0 -28
- package/dist/npm/numerictextbox/numerictextbox.component.js +0 -1051
- package/dist/npm/numerictextbox/utils.js +0 -94
- package/dist/npm/numerictextbox.module.js +0 -64
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/radiobutton/radiobutton.directive.js +0 -85
- package/dist/npm/radiobutton.module.js +0 -54
- package/dist/npm/rangeslider/localization/custom-messages.component.js +0 -45
- package/dist/npm/rangeslider/localization/localized-rangeslider-messages.directive.js +0 -37
- package/dist/npm/rangeslider/localization/messages.js +0 -28
- package/dist/npm/rangeslider/rangeslider-model.js +0 -61
- package/dist/npm/rangeslider/rangeslider-value.type.js +0 -6
- package/dist/npm/rangeslider/rangeslider.component.js +0 -469
- package/dist/npm/rangeslider.module.js +0 -68
- package/dist/npm/shared/input-separator.component.js +0 -43
- package/dist/npm/shared/textarea.directive.js +0 -271
- package/dist/npm/shared/utils.js +0 -25
- package/dist/npm/shared.module.js +0 -32
- package/dist/npm/slider/localization/custom-messages.component.js +0 -45
- package/dist/npm/slider/localization/localized-slider-messages.directive.js +0 -37
- package/dist/npm/slider/localization/messages.js +0 -32
- package/dist/npm/slider/slider-model.js +0 -43
- package/dist/npm/slider/slider.component.js +0 -484
- package/dist/npm/slider.module.js +0 -68
- package/dist/npm/sliders-common/label-template.directive.js +0 -46
- package/dist/npm/sliders-common/slider-base.js +0 -328
- package/dist/npm/sliders-common/slider-model.base.js +0 -98
- package/dist/npm/sliders-common/slider-ticks.component.js +0 -106
- package/dist/npm/sliders-common/sliders-common.module.js +0 -37
- package/dist/npm/sliders-common/sliders-util.js +0 -236
- package/dist/npm/switch/localization/custom-messages.component.js +0 -45
- package/dist/npm/switch/localization/localized-switch-messages.directive.js +0 -37
- package/dist/npm/switch/localization/messages.js +0 -28
- package/dist/npm/switch/switch.component.js +0 -572
- package/dist/npm/switch.module.js +0 -66
- package/dist/npm/text-fields-common/text-fields-base.js +0 -146
- package/dist/npm/textarea/models/flow.js +0 -6
- package/dist/npm/textarea/models/resize.js +0 -6
- package/dist/npm/textarea/textarea-suffix.component.js +0 -43
- package/dist/npm/textarea/textarea.component.js +0 -602
- package/dist/npm/textarea.module.js +0 -65
- package/dist/npm/textbox/localization/custom-messages.component.js +0 -45
- package/dist/npm/textbox/localization/localized-textbox-messages.directive.js +0 -37
- package/dist/npm/textbox/localization/messages.js +0 -24
- package/dist/npm/textbox/models/icon-show-options.js +0 -6
- package/dist/npm/textbox/textbox-prefix.directive.js +0 -39
- package/dist/npm/textbox/textbox-suffix.directive.js +0 -39
- package/dist/npm/textbox/textbox.component.js +0 -765
- package/dist/npm/textbox/textbox.directive.js +0 -129
- package/dist/npm/textbox.module.js +0 -77
- package/dist/npm/validators/max.validator.js +0 -23
- package/dist/npm/validators/min.validator.js +0 -23
- package/dist/systemjs/kendo-angular-inputs.js +0 -5
|
@@ -2,14 +2,10 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as tslib_1 from "tslib";
|
|
6
|
-
var ColorPickerComponent_1;
|
|
7
5
|
import { take } from 'rxjs/operators';
|
|
8
|
-
import { Component, HostBinding, Input, Output, EventEmitter, ViewChild,
|
|
6
|
+
import { Component, HostBinding, Input, Output, EventEmitter, ViewChild, ViewContainerRef, forwardRef } from '@angular/core';
|
|
9
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
10
8
|
import { Subscription } from 'rxjs';
|
|
11
|
-
import { FlatColorPickerComponent } from './flatcolorpicker.component';
|
|
12
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
|
13
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
14
10
|
import { Keys, KendoInput, isChanged, closest, guid } from '@progress/kendo-angular-common';
|
|
15
11
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
@@ -20,6 +16,12 @@ import { parseColor } from './utils';
|
|
|
20
16
|
import { getStylingClasses, isPresent } from '../common/utils';
|
|
21
17
|
import { ColorPickerLocalizationService } from './localization/colorpicker-localization.service';
|
|
22
18
|
import { DEFAULT_ACCESSIBLE_PRESET, DEFAULT_PRESET } from './constants';
|
|
19
|
+
import * as i0 from "@angular/core";
|
|
20
|
+
import * as i1 from "@progress/kendo-angular-popup";
|
|
21
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
22
|
+
import * as i3 from "./flatcolorpicker.component";
|
|
23
|
+
import * as i4 from "./localization/localized-colorpicker-messages.directive";
|
|
24
|
+
import * as i5 from "@angular/common";
|
|
23
25
|
const DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
24
26
|
/**
|
|
25
27
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
@@ -27,7 +29,7 @@ const DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
|
27
29
|
* The ColorPicker is a powerful tool for choosing colors from Gradient and Palette views
|
|
28
30
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
export class ColorPickerComponent {
|
|
31
33
|
constructor(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
32
34
|
this.host = host;
|
|
33
35
|
this.popupService = popupService;
|
|
@@ -664,203 +666,119 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
|
|
|
664
666
|
this.focusableId = id;
|
|
665
667
|
}
|
|
666
668
|
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
]
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
]
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
],
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
tslib_1.__metadata("design:type", String),
|
|
781
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
782
|
-
], ColorPickerComponent.prototype, "size", null);
|
|
783
|
-
tslib_1.__decorate([
|
|
784
|
-
Input(),
|
|
785
|
-
tslib_1.__metadata("design:type", String),
|
|
786
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
787
|
-
], ColorPickerComponent.prototype, "rounded", null);
|
|
788
|
-
tslib_1.__decorate([
|
|
789
|
-
Input(),
|
|
790
|
-
tslib_1.__metadata("design:type", String),
|
|
791
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
792
|
-
], ColorPickerComponent.prototype, "fillMode", null);
|
|
793
|
-
tslib_1.__decorate([
|
|
794
|
-
Output(),
|
|
795
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
796
|
-
], ColorPickerComponent.prototype, "valueChange", void 0);
|
|
797
|
-
tslib_1.__decorate([
|
|
798
|
-
Output(),
|
|
799
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
800
|
-
], ColorPickerComponent.prototype, "open", void 0);
|
|
801
|
-
tslib_1.__decorate([
|
|
802
|
-
Output(),
|
|
803
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
804
|
-
], ColorPickerComponent.prototype, "close", void 0);
|
|
805
|
-
tslib_1.__decorate([
|
|
806
|
-
Output('focus'),
|
|
807
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
808
|
-
], ColorPickerComponent.prototype, "onFocus", void 0);
|
|
809
|
-
tslib_1.__decorate([
|
|
810
|
-
Output('blur'),
|
|
811
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
812
|
-
], ColorPickerComponent.prototype, "onBlur", void 0);
|
|
813
|
-
tslib_1.__decorate([
|
|
814
|
-
Output(),
|
|
815
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
816
|
-
], ColorPickerComponent.prototype, "cancel", void 0);
|
|
817
|
-
tslib_1.__decorate([
|
|
818
|
-
Output(),
|
|
819
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
820
|
-
], ColorPickerComponent.prototype, "activeColorClick", void 0);
|
|
821
|
-
tslib_1.__decorate([
|
|
822
|
-
Output(),
|
|
823
|
-
tslib_1.__metadata("design:type", EventEmitter)
|
|
824
|
-
], ColorPickerComponent.prototype, "activeViewChange", void 0);
|
|
825
|
-
tslib_1.__decorate([
|
|
826
|
-
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
827
|
-
tslib_1.__metadata("design:type", ViewContainerRef)
|
|
828
|
-
], ColorPickerComponent.prototype, "container", void 0);
|
|
829
|
-
tslib_1.__decorate([
|
|
830
|
-
ViewChild('activeColor', { static: true }),
|
|
831
|
-
tslib_1.__metadata("design:type", ElementRef)
|
|
832
|
-
], ColorPickerComponent.prototype, "activeColor", void 0);
|
|
833
|
-
tslib_1.__decorate([
|
|
834
|
-
ViewChild('popupTemplate', { static: true }),
|
|
835
|
-
tslib_1.__metadata("design:type", TemplateRef)
|
|
836
|
-
], ColorPickerComponent.prototype, "popupTemplate", void 0);
|
|
837
|
-
tslib_1.__decorate([
|
|
838
|
-
ViewChild('flatColorPicker', { static: false }),
|
|
839
|
-
tslib_1.__metadata("design:type", FlatColorPickerComponent)
|
|
840
|
-
], ColorPickerComponent.prototype, "flatColorPicker", void 0);
|
|
841
|
-
ColorPickerComponent = ColorPickerComponent_1 = tslib_1.__decorate([
|
|
842
|
-
Component({
|
|
843
|
-
exportAs: 'kendoColorPicker',
|
|
844
|
-
selector: 'kendo-colorpicker',
|
|
845
|
-
providers: [{
|
|
846
|
-
multi: true,
|
|
847
|
-
provide: NG_VALUE_ACCESSOR,
|
|
848
|
-
useExisting: forwardRef(() => ColorPickerComponent_1)
|
|
849
|
-
}, {
|
|
850
|
-
provide: KendoInput,
|
|
851
|
-
useExisting: forwardRef(() => ColorPickerComponent_1)
|
|
852
|
-
},
|
|
853
|
-
ColorPickerLocalizationService,
|
|
854
|
-
{
|
|
855
|
-
provide: LocalizationService,
|
|
856
|
-
useExisting: ColorPickerLocalizationService
|
|
857
|
-
},
|
|
858
|
-
{
|
|
859
|
-
provide: L10N_PREFIX,
|
|
860
|
-
useValue: 'kendo.colorpicker'
|
|
861
|
-
}
|
|
862
|
-
],
|
|
863
|
-
template: `
|
|
669
|
+
}
|
|
670
|
+
ColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColorPickerComponent, deps: [{ token: i0.ElementRef }, { token: i1.PopupService }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
671
|
+
ColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ColorPickerComponent, selector: "kendo-colorpicker", inputs: { views: "views", view: "view", activeView: "activeView", readonly: "readonly", disabled: "disabled", format: "format", value: "value", popupSettings: "popupSettings", paletteSettings: "paletteSettings", gradientSettings: "gradientSettings", icon: "icon", iconClass: "iconClass", clearButton: "clearButton", tabindex: "tabindex", preview: "preview", actionsLayout: "actionsLayout", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur", cancel: "cancel", activeColorClick: "activeColorClick", activeViewChange: "activeViewChange" }, host: { properties: { "class.k-colorpicker": "this.hostClasses", "class.k-icon-picker": "this.hostClasses", "class.k-picker": "this.hostClasses", "class.k-focus": "this.focusedClass", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.aria-readonly": "this.ariaReadonly", "attr.aria-expanded": "this.ariaExpanded", "attr.tabindex": "this.hostTabindex", "attr.dir": "this.direction", "attr.role": "this.role" } }, providers: [{
|
|
672
|
+
multi: true,
|
|
673
|
+
provide: NG_VALUE_ACCESSOR,
|
|
674
|
+
useExisting: forwardRef(() => ColorPickerComponent)
|
|
675
|
+
}, {
|
|
676
|
+
provide: KendoInput,
|
|
677
|
+
useExisting: forwardRef(() => ColorPickerComponent)
|
|
678
|
+
},
|
|
679
|
+
ColorPickerLocalizationService,
|
|
680
|
+
{
|
|
681
|
+
provide: LocalizationService,
|
|
682
|
+
useExisting: ColorPickerLocalizationService
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
provide: L10N_PREFIX,
|
|
686
|
+
useValue: 'kendo.colorpicker'
|
|
687
|
+
}
|
|
688
|
+
], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "activeColor", first: true, predicate: ["activeColor"], descendants: true, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "flatColorPicker", first: true, predicate: ["flatColorPicker"], descendants: true }], exportAs: ["kendoColorPicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
689
|
+
<ng-container kendoColorPickerLocalizedMessages
|
|
690
|
+
i18n-colorPickerNoColor="kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty."
|
|
691
|
+
colorPickerNoColor="Colorpicker no color chosen"
|
|
692
|
+
i18n-flatColorPickerNoColor="kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty."
|
|
693
|
+
flatColorPickerNoColor="Flatcolorpicker no color chosen"
|
|
694
|
+
i18n-colorGradientNoColor="kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty."
|
|
695
|
+
colorGradientNoColor="Colorgradient no color chosen"
|
|
696
|
+
i18n-colorPaletteNoColor="kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty."
|
|
697
|
+
colorPaletteNoColor="Colorpalette no color chosen"
|
|
698
|
+
i18n-colorGradientHandle="kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser."
|
|
699
|
+
colorGradientHandle="Choose color"
|
|
700
|
+
i18n-clearButton="kendo.colorpicker.clearButton|The title for the clear button."
|
|
701
|
+
clearButton="Clear value"
|
|
702
|
+
i18n-hueSliderHandle="kendo.colorpicker.hueSliderHandle|The title for the hue slider handle."
|
|
703
|
+
hueSliderHandle="Set hue"
|
|
704
|
+
i18n-opacitySliderHandle="kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle."
|
|
705
|
+
opacitySliderHandle="Set opacity"
|
|
706
|
+
i18n-contrastRatio="kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool."
|
|
707
|
+
contrastRatio="Contrast ratio"
|
|
708
|
+
i18n-previewColor="kendo.colorpicker.previewColor|The message for the color preview pane."
|
|
709
|
+
previewColor="Color preview"
|
|
710
|
+
i18n-revertSelection="kendo.colorpicker.revertSelection|The message for the selected color pane."
|
|
711
|
+
revertSelection="Revert selection"
|
|
712
|
+
i18n-gradientView="kendo.colorpicker.gradientView|The message for the gradient view button."
|
|
713
|
+
gradientView="Gradient view"
|
|
714
|
+
i18n-paletteView="kendo.colorpicker.paletteView|The message for the palette view button."
|
|
715
|
+
paletteView="Palette view"
|
|
716
|
+
i18n-formatButton="kendo.colorpicker.formatButton|The message for the input format toggle button."
|
|
717
|
+
formatButton="Change color format"
|
|
718
|
+
i18n-applyButton="kendo.colorpicker.applyButton|The message for the Apply action button."
|
|
719
|
+
applyButton="Apply"
|
|
720
|
+
i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
|
|
721
|
+
cancelButton="Cancel">
|
|
722
|
+
</ng-container>
|
|
723
|
+
<span #activeColor class="k-input-inner">
|
|
724
|
+
<span
|
|
725
|
+
class="k-value-icon k-color-preview"
|
|
726
|
+
[ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}">
|
|
727
|
+
<span *ngIf="iconClass || icon" class="k-color-preview-icon k-icon" [ngClass]="iconStyles"></span>
|
|
728
|
+
<span class="k-color-preview-mask" [style.background-color]="value"></span>
|
|
729
|
+
</span>
|
|
730
|
+
</span>
|
|
731
|
+
<button
|
|
732
|
+
tabindex="-1"
|
|
733
|
+
type="button"
|
|
734
|
+
class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
|
|
735
|
+
<span class="k-button-icon k-icon k-i-arrow-s"></span>
|
|
736
|
+
</button>
|
|
737
|
+
<ng-template #popupTemplate>
|
|
738
|
+
<kendo-flatcolorpicker
|
|
739
|
+
#flatColorPicker
|
|
740
|
+
[value]="value"
|
|
741
|
+
[format]="format"
|
|
742
|
+
[views]="views"
|
|
743
|
+
[activeView]="activeView"
|
|
744
|
+
[actionsLayout]="actionsLayout"
|
|
745
|
+
[preview]="preview"
|
|
746
|
+
[gradientSettings]="gradientSettings"
|
|
747
|
+
[paletteSettings]="paletteSettings"
|
|
748
|
+
[clearButton]="clearButton"
|
|
749
|
+
(cancel)="handleCancelEvent($event)"
|
|
750
|
+
(focusout)="handlePopupBlur($event)"
|
|
751
|
+
(valueChange)="handleValueChange($event)"
|
|
752
|
+
(keydown)="handlePopupKeyDown($event)"
|
|
753
|
+
(activeViewChange)="activeViewChange.emit($event)"
|
|
754
|
+
(actionButtonClick)="togglePopup()">
|
|
755
|
+
</kendo-flatcolorpicker>
|
|
756
|
+
</ng-template>
|
|
757
|
+
<ng-container #container></ng-container>
|
|
758
|
+
`, isInline: true, components: [{ type: i3.FlatColorPickerComponent, selector: "kendo-flatcolorpicker", inputs: ["readonly", "disabled", "format", "value", "tabindex", "clearButton", "preview", "actionsLayout", "activeView", "views", "gradientSettings", "paletteSettings"], outputs: ["valueChange", "cancel", "activeViewChange", "actionButtonClick"], exportAs: ["kendoFlatColorPicker"] }], directives: [{ type: i4.LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
760
|
+
type: Component,
|
|
761
|
+
args: [{
|
|
762
|
+
exportAs: 'kendoColorPicker',
|
|
763
|
+
selector: 'kendo-colorpicker',
|
|
764
|
+
providers: [{
|
|
765
|
+
multi: true,
|
|
766
|
+
provide: NG_VALUE_ACCESSOR,
|
|
767
|
+
useExisting: forwardRef(() => ColorPickerComponent)
|
|
768
|
+
}, {
|
|
769
|
+
provide: KendoInput,
|
|
770
|
+
useExisting: forwardRef(() => ColorPickerComponent)
|
|
771
|
+
},
|
|
772
|
+
ColorPickerLocalizationService,
|
|
773
|
+
{
|
|
774
|
+
provide: LocalizationService,
|
|
775
|
+
useExisting: ColorPickerLocalizationService
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
provide: L10N_PREFIX,
|
|
779
|
+
useValue: 'kendo.colorpicker'
|
|
780
|
+
}],
|
|
781
|
+
template: `
|
|
864
782
|
<ng-container kendoColorPickerLocalizedMessages
|
|
865
783
|
i18n-colorPickerNoColor="kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty."
|
|
866
784
|
colorPickerNoColor="Colorpicker no color chosen"
|
|
@@ -931,12 +849,106 @@ ColorPickerComponent = ColorPickerComponent_1 = tslib_1.__decorate([
|
|
|
931
849
|
</ng-template>
|
|
932
850
|
<ng-container #container></ng-container>
|
|
933
851
|
`
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
852
|
+
}]
|
|
853
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.PopupService }, { type: i0.ChangeDetectorRef }, { type: i2.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { hostClasses: [{
|
|
854
|
+
type: HostBinding,
|
|
855
|
+
args: ['class.k-colorpicker']
|
|
856
|
+
}, {
|
|
857
|
+
type: HostBinding,
|
|
858
|
+
args: ['class.k-icon-picker']
|
|
859
|
+
}, {
|
|
860
|
+
type: HostBinding,
|
|
861
|
+
args: ['class.k-picker']
|
|
862
|
+
}], focusedClass: [{
|
|
863
|
+
type: HostBinding,
|
|
864
|
+
args: ['class.k-focus']
|
|
865
|
+
}], disabledClass: [{
|
|
866
|
+
type: HostBinding,
|
|
867
|
+
args: ['attr.aria-disabled']
|
|
868
|
+
}, {
|
|
869
|
+
type: HostBinding,
|
|
870
|
+
args: ['class.k-disabled']
|
|
871
|
+
}], ariaReadonly: [{
|
|
872
|
+
type: HostBinding,
|
|
873
|
+
args: ['attr.aria-readonly']
|
|
874
|
+
}], ariaExpanded: [{
|
|
875
|
+
type: HostBinding,
|
|
876
|
+
args: ['attr.aria-expanded']
|
|
877
|
+
}], hostTabindex: [{
|
|
878
|
+
type: HostBinding,
|
|
879
|
+
args: ['attr.tabindex']
|
|
880
|
+
}], direction: [{
|
|
881
|
+
type: HostBinding,
|
|
882
|
+
args: ['attr.dir']
|
|
883
|
+
}], role: [{
|
|
884
|
+
type: HostBinding,
|
|
885
|
+
args: ['attr.role']
|
|
886
|
+
}], views: [{
|
|
887
|
+
type: Input
|
|
888
|
+
}], view: [{
|
|
889
|
+
type: Input
|
|
890
|
+
}], activeView: [{
|
|
891
|
+
type: Input
|
|
892
|
+
}], readonly: [{
|
|
893
|
+
type: Input
|
|
894
|
+
}], disabled: [{
|
|
895
|
+
type: Input
|
|
896
|
+
}], format: [{
|
|
897
|
+
type: Input
|
|
898
|
+
}], value: [{
|
|
899
|
+
type: Input
|
|
900
|
+
}], popupSettings: [{
|
|
901
|
+
type: Input
|
|
902
|
+
}], paletteSettings: [{
|
|
903
|
+
type: Input
|
|
904
|
+
}], gradientSettings: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], icon: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], iconClass: [{
|
|
909
|
+
type: Input
|
|
910
|
+
}], clearButton: [{
|
|
911
|
+
type: Input
|
|
912
|
+
}], tabindex: [{
|
|
913
|
+
type: Input
|
|
914
|
+
}], preview: [{
|
|
915
|
+
type: Input
|
|
916
|
+
}], actionsLayout: [{
|
|
917
|
+
type: Input
|
|
918
|
+
}], size: [{
|
|
919
|
+
type: Input
|
|
920
|
+
}], rounded: [{
|
|
921
|
+
type: Input
|
|
922
|
+
}], fillMode: [{
|
|
923
|
+
type: Input
|
|
924
|
+
}], valueChange: [{
|
|
925
|
+
type: Output
|
|
926
|
+
}], open: [{
|
|
927
|
+
type: Output
|
|
928
|
+
}], close: [{
|
|
929
|
+
type: Output
|
|
930
|
+
}], onFocus: [{
|
|
931
|
+
type: Output,
|
|
932
|
+
args: ['focus']
|
|
933
|
+
}], onBlur: [{
|
|
934
|
+
type: Output,
|
|
935
|
+
args: ['blur']
|
|
936
|
+
}], cancel: [{
|
|
937
|
+
type: Output
|
|
938
|
+
}], activeColorClick: [{
|
|
939
|
+
type: Output
|
|
940
|
+
}], activeViewChange: [{
|
|
941
|
+
type: Output
|
|
942
|
+
}], container: [{
|
|
943
|
+
type: ViewChild,
|
|
944
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
945
|
+
}], activeColor: [{
|
|
946
|
+
type: ViewChild,
|
|
947
|
+
args: ['activeColor', { static: true }]
|
|
948
|
+
}], popupTemplate: [{
|
|
949
|
+
type: ViewChild,
|
|
950
|
+
args: ['popupTemplate', { static: true }]
|
|
951
|
+
}], flatColorPicker: [{
|
|
952
|
+
type: ViewChild,
|
|
953
|
+
args: ['flatColorPicker', { static: false }]
|
|
954
|
+
}] } });
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { AA_RATIO, AAA_RATIO } from './constants';
|
|
6
|
+
import { Component, Input } from '@angular/core';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
9
|
+
import * as i2 from "@angular/common";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class ContrastValidationComponent {
|
|
14
|
+
constructor(localization) {
|
|
15
|
+
this.localization = localization;
|
|
16
|
+
}
|
|
17
|
+
get passMessage() {
|
|
18
|
+
return this.localization.get('passContrast');
|
|
19
|
+
}
|
|
20
|
+
get failMessage() {
|
|
21
|
+
return this.localization.get('failContrast');
|
|
22
|
+
}
|
|
23
|
+
get contrastText() {
|
|
24
|
+
let ratio = this.type === 'AA' ? AA_RATIO : AAA_RATIO;
|
|
25
|
+
return `${this.type}: ${ratio.toFixed(1)}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
ContrastValidationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContrastValidationComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
ContrastValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContrastValidationComponent, selector: "[kendoContrastValidation]", inputs: { type: "type", pass: "pass", value: "value" }, ngImport: i0, template: `
|
|
30
|
+
<span>{{contrastText}}</span>
|
|
31
|
+
<ng-container *ngIf="value">
|
|
32
|
+
<span class="k-contrast-validation k-text-success" *ngIf="pass">
|
|
33
|
+
{{passMessage}}
|
|
34
|
+
<span class="k-icon k-i-check"></span>
|
|
35
|
+
</span>
|
|
36
|
+
<span class="k-contrast-validation k-text-error" *ngIf="!pass">
|
|
37
|
+
{{failMessage}}
|
|
38
|
+
<span class="k-icon k-i-close"></span>
|
|
39
|
+
</span>
|
|
40
|
+
</ng-container>
|
|
41
|
+
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContrastValidationComponent, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
46
|
+
selector: '[kendoContrastValidation]',
|
|
47
|
+
template: `
|
|
48
|
+
<span>{{contrastText}}</span>
|
|
49
|
+
<ng-container *ngIf="value">
|
|
50
|
+
<span class="k-contrast-validation k-text-success" *ngIf="pass">
|
|
51
|
+
{{passMessage}}
|
|
52
|
+
<span class="k-icon k-i-check"></span>
|
|
53
|
+
</span>
|
|
54
|
+
<span class="k-contrast-validation k-text-error" *ngIf="!pass">
|
|
55
|
+
{{failMessage}}
|
|
56
|
+
<span class="k-icon k-i-close"></span>
|
|
57
|
+
</span>
|
|
58
|
+
</ng-container>
|
|
59
|
+
`
|
|
60
|
+
}]
|
|
61
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { type: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], pass: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], value: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}] } });
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, Input } from '@angular/core';
|
|
6
|
+
import { getContrastFromTwoRGBAs, getRGBA } from './utils';
|
|
7
|
+
import { AA_RATIO, AAA_RATIO } from './constants';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
import * as i2 from "./contrast-validation.component";
|
|
11
|
+
import * as i3 from "@angular/common";
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export class ContrastComponent {
|
|
16
|
+
constructor(localization) {
|
|
17
|
+
this.localization = localization;
|
|
18
|
+
}
|
|
19
|
+
get formatedRatio() {
|
|
20
|
+
return this.contrastRatio.toFixed(2);
|
|
21
|
+
}
|
|
22
|
+
get contrastRatioText() {
|
|
23
|
+
return `${this.localization.get('contrastRatio')}: ${this.value ? this.formatedRatio : 'n/a'}`;
|
|
24
|
+
}
|
|
25
|
+
get satisfiesAACondition() {
|
|
26
|
+
return this.contrastRatio >= AA_RATIO;
|
|
27
|
+
}
|
|
28
|
+
get satisfiesAAACondition() {
|
|
29
|
+
return this.contrastRatio >= AAA_RATIO;
|
|
30
|
+
}
|
|
31
|
+
get contrastRatio() {
|
|
32
|
+
let contrast = getContrastFromTwoRGBAs(getRGBA(this.value), getRGBA(this.ratio));
|
|
33
|
+
return contrast;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
ContrastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContrastComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
ContrastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContrastComponent, selector: "[kendoContrastTool]", inputs: { value: "value", ratio: "ratio" }, ngImport: i0, template: `
|
|
38
|
+
<div class="k-contrast-ratio">
|
|
39
|
+
<span class="k-contrast-ratio-text">{{contrastRatioText}}</span>
|
|
40
|
+
<ng-container *ngIf="value">
|
|
41
|
+
<span class="k-contrast-validation k-text-success" *ngIf="satisfiesAACondition">
|
|
42
|
+
<span class="k-icon k-i-check"></span>
|
|
43
|
+
<span class="k-icon k-i-check" *ngIf="satisfiesAAACondition"></span>
|
|
44
|
+
</span>
|
|
45
|
+
<span class="k-contrast-validation k-text-error" *ngIf="!satisfiesAACondition">
|
|
46
|
+
<span class="k-icon k-i-close"></span>
|
|
47
|
+
</span>
|
|
48
|
+
</ng-container>
|
|
49
|
+
</div>
|
|
50
|
+
<div kendoContrastValidation
|
|
51
|
+
type="AA"
|
|
52
|
+
[value]="value"
|
|
53
|
+
[pass]="satisfiesAACondition">
|
|
54
|
+
</div>
|
|
55
|
+
<div kendoContrastValidation
|
|
56
|
+
type="AAA"
|
|
57
|
+
[value]="value"
|
|
58
|
+
[pass]="satisfiesAAACondition">
|
|
59
|
+
</div>
|
|
60
|
+
`, isInline: true, components: [{ type: i2.ContrastValidationComponent, selector: "[kendoContrastValidation]", inputs: ["type", "pass", "value"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContrastComponent, decorators: [{
|
|
62
|
+
type: Component,
|
|
63
|
+
args: [{
|
|
64
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
65
|
+
selector: '[kendoContrastTool]',
|
|
66
|
+
template: `
|
|
67
|
+
<div class="k-contrast-ratio">
|
|
68
|
+
<span class="k-contrast-ratio-text">{{contrastRatioText}}</span>
|
|
69
|
+
<ng-container *ngIf="value">
|
|
70
|
+
<span class="k-contrast-validation k-text-success" *ngIf="satisfiesAACondition">
|
|
71
|
+
<span class="k-icon k-i-check"></span>
|
|
72
|
+
<span class="k-icon k-i-check" *ngIf="satisfiesAAACondition"></span>
|
|
73
|
+
</span>
|
|
74
|
+
<span class="k-contrast-validation k-text-error" *ngIf="!satisfiesAACondition">
|
|
75
|
+
<span class="k-icon k-i-close"></span>
|
|
76
|
+
</span>
|
|
77
|
+
</ng-container>
|
|
78
|
+
</div>
|
|
79
|
+
<div kendoContrastValidation
|
|
80
|
+
type="AA"
|
|
81
|
+
[value]="value"
|
|
82
|
+
[pass]="satisfiesAACondition">
|
|
83
|
+
</div>
|
|
84
|
+
<div kendoContrastValidation
|
|
85
|
+
type="AAA"
|
|
86
|
+
[value]="value"
|
|
87
|
+
[pass]="satisfiesAAACondition">
|
|
88
|
+
</div>
|
|
89
|
+
`
|
|
90
|
+
}]
|
|
91
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { value: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}], ratio: [{
|
|
94
|
+
type: Input
|
|
95
|
+
}] } });
|
|
File without changes
|
|
File without changes
|
|
File without changes
|