@koobiq/components 19.8.1 → 20.0.0
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/accordion/index.d.ts +238 -1
- package/actions-panel/index.d.ts +303 -5
- package/alert/index.d.ts +54 -1
- package/app-switcher/index.d.ts +239 -1
- package/autocomplete/index.d.ts +265 -1
- package/badge/index.d.ts +57 -1
- package/breadcrumbs/breadcrumbs.scss +7 -0
- package/breadcrumbs/index.d.ts +243 -1
- package/button/_button-base.scss +20 -0
- package/button/_button-theme.scss +3 -11
- package/button/button.scss +0 -11
- package/button/index.d.ts +153 -1
- package/button-toggle/index.d.ts +155 -1
- package/checkbox/index.d.ts +159 -1
- package/clamped-text/index.d.ts +144 -4
- package/code-block/_code-block-theme.scss +0 -6
- package/code-block/code-block-tokens.scss +0 -2
- package/code-block/index.d.ts +383 -1
- package/content-panel/content-panel.scss +0 -8
- package/content-panel/index.d.ts +158 -2
- package/core/highlight/_highlight-theme.scss +9 -0
- package/core/index.d.ts +4405 -1
- package/core/option/_option-theme.scss +5 -14
- package/core/styles/_koobiq-theme.scss +1 -0
- package/core/styles/theming/_components-theming.scss +0 -62
- package/datepicker/index.d.ts +699 -1
- package/divider/index.d.ts +20 -1
- package/dl/index.d.ts +37 -1
- package/dropdown/_dropdown-theme.scss +4 -8
- package/dropdown/dropdown.scss +4 -0
- package/dropdown/index.d.ts +473 -1
- package/dynamic-translation/index.d.ts +81 -2
- package/ellipsis-center/index.d.ts +38 -1
- package/empty-state/index.d.ts +45 -1
- package/fesm2022/koobiq-components-accordion.mjs +103 -114
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +16 -16
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +35 -49
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +81 -86
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +294 -304
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +35 -42
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +154 -163
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +87 -86
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +209 -96
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +50 -52
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +42 -49
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +111 -136
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +90 -107
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +1635 -628
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +285 -349
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +14 -25
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +27 -29
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +202 -167
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +23 -23
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +16 -21
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +35 -39
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +135 -234
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +321 -561
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +211 -430
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +42 -43
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +65 -60
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +116 -155
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +38 -53
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +105 -114
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +37 -44
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +31 -35
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +169 -163
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +162 -164
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +65 -203
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +36 -36
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +95 -86
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +24 -30
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +25 -32
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +94 -80
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +17 -17
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +69 -60
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +44 -35
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +249 -234
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +59 -55
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +88 -128
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +12 -12
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +27 -20
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +110 -96
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +21 -23
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +269 -275
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +177 -267
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +37 -56
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +64 -65
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +46 -38
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +52 -58
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +23 -30
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +54 -69
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +51 -63
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +91 -119
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +25 -23
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +227 -227
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +217 -209
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +48 -48
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/index.d.ts +574 -1
- package/filter-bar/_filter-bar-theme.scss +0 -4
- package/filter-bar/index.d.ts +796 -1
- package/form-field/index.d.ts +569 -1
- package/icon/index.d.ts +162 -1
- package/index.d.ts +2 -1
- package/inline-edit/index.d.ts +171 -2
- package/input/index.d.ts +339 -1
- package/link/index.d.ts +56 -1
- package/list/index.d.ts +220 -1
- package/loader-overlay/index.d.ts +57 -1
- package/markdown/index.d.ts +68 -1
- package/modal/_modal-theme.scss +0 -8
- package/modal/index.d.ts +311 -1
- package/navbar/index.d.ts +304 -1
- package/navbar/navbar-item.scss +0 -9
- package/notification-center/_notification-center-theme.scss +1 -2
- package/notification-center/index.d.ts +237 -1
- package/notification-center/notification-center.scss +3 -36
- package/notification-center/notification-item.scss +1 -1
- package/overflow-items/index.d.ts +161 -2
- package/package.json +9 -17
- package/popover/index.d.ts +182 -1
- package/popover/popover.scss +8 -12
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/index.d.ts +31 -1
- package/progress-spinner/index.d.ts +37 -1
- package/radio/index.d.ts +207 -1
- package/resizer/index.d.ts +85 -2
- package/schematics/collection.json +5 -0
- package/schematics/migrations/css-selectors/index.js +1 -1
- package/schematics/migrations/deprecated-icons/index.js +1 -1
- package/schematics/migrations/new-icons-pack/index.js +1 -1
- package/schematics/migrations/v20-upgrade/README.md +72 -0
- package/schematics/migrations/v20-upgrade/data.js +274 -0
- package/schematics/migrations/v20-upgrade/index.js +222 -0
- package/schematics/migrations/v20-upgrade/schema.json +20 -0
- package/schematics/migrations.json +10 -0
- package/schematics/ng-add/index.js +3 -4
- package/scrollbar/index.d.ts +136 -1
- package/search-expandable/index.d.ts +98 -1
- package/select/index.d.ts +693 -1
- package/sidebar/index.d.ts +92 -1
- package/sidepanel/index.d.ts +263 -1
- package/sidepanel/sidepanel.scss +0 -8
- package/skeleton/index.d.ts +26 -2
- package/split-button/index.d.ts +46 -1
- package/splitter/index.d.ts +141 -1
- package/table/index.d.ts +23 -1
- package/tabs/_tabs-common.scss +27 -0
- package/tabs/_tabs-theme.scss +2 -2
- package/tabs/index.d.ts +645 -1
- package/tags/index.d.ts +706 -1
- package/textarea/index.d.ts +134 -1
- package/time-range/index.d.ts +310 -7
- package/timepicker/index.d.ts +193 -1
- package/timezone/index.d.ts +122 -1
- package/title/index.d.ts +41 -1
- package/toast/index.d.ts +164 -1
- package/toggle/index.d.ts +84 -1
- package/tooltip/index.d.ts +163 -1
- package/top-bar/index.d.ts +33 -1
- package/tree/_tree-theme.scss +4 -0
- package/tree/index.d.ts +718 -1
- package/tree/tree-option.scss +20 -7
- package/tree-select/_tree-select-theme.scss +39 -0
- package/tree-select/index.d.ts +377 -1
- package/username/index.d.ts +176 -5
- package/accordion/accordion-content.d.ts +0 -6
- package/accordion/accordion-content.directive.d.ts +0 -27
- package/accordion/accordion-header.d.ts +0 -6
- package/accordion/accordion-header.directive.d.ts +0 -7
- package/accordion/accordion-item.d.ts +0 -77
- package/accordion/accordion-trigger.component.d.ts +0 -24
- package/accordion/accordion-trigger.directive.d.ts +0 -21
- package/accordion/accordion.component.d.ts +0 -79
- package/accordion/accordion.module.d.ts +0 -12
- package/accordion/public-api.d.ts +0 -9
- package/actions-panel/actions-panel-config.d.ts +0 -82
- package/actions-panel/actions-panel-container.d.ts +0 -90
- package/actions-panel/actions-panel-ref.d.ts +0 -44
- package/actions-panel/actions-panel.d.ts +0 -84
- package/actions-panel/module.d.ts +0 -7
- package/alert/alert.component.d.ts +0 -43
- package/alert/alert.module.d.ts +0 -9
- package/alert/public-api.d.ts +0 -2
- package/app-switcher/app-switcher-animations.d.ts +0 -5
- package/app-switcher/app-switcher-dropdown-app.d.ts +0 -11
- package/app-switcher/app-switcher-dropdown-site.d.ts +0 -9
- package/app-switcher/app-switcher.d.ts +0 -198
- package/app-switcher/app-switcher.module.d.ts +0 -10
- package/app-switcher/kbq-app-switcher-list-item.d.ts +0 -16
- package/app-switcher/public-api.d.ts +0 -6
- package/autocomplete/autocomplete-origin.directive.d.ts +0 -12
- package/autocomplete/autocomplete-trigger.directive.d.ts +0 -169
- package/autocomplete/autocomplete.component.d.ts +0 -88
- package/autocomplete/autocomplete.module.d.ts +0 -12
- package/autocomplete/public-api.d.ts +0 -4
- package/badge/badge.component.d.ts +0 -46
- package/badge/badge.module.d.ts +0 -9
- package/badge/public-api.d.ts +0 -2
- package/breadcrumbs/breadcrumbs.d.ts +0 -127
- package/breadcrumbs/breadcrumbs.module.d.ts +0 -7
- package/breadcrumbs/breadcrumbs.types.d.ts +0 -22
- package/breadcrumbs/public-api.d.ts +0 -5
- package/breadcrumbs/roving-focus-group.directive.d.ts +0 -50
- package/breadcrumbs/roving-focus-item.directive.d.ts +0 -50
- package/breadcrumbs/utils.d.ts +0 -19
- package/button/button-group.d.ts +0 -45
- package/button/button.component.d.ts +0 -59
- package/button/button.dropdown-trigger.directive.d.ts +0 -14
- package/button/button.module.d.ts +0 -12
- package/button/public-api.d.ts +0 -4
- package/button-toggle/button-toggle.component.d.ts +0 -146
- package/button-toggle/button-toggle.module.d.ts +0 -9
- package/button-toggle/public-api.d.ts +0 -2
- package/checkbox/checkbox-config.d.ts +0 -13
- package/checkbox/checkbox-module.d.ts +0 -9
- package/checkbox/checkbox-required-validator.d.ts +0 -13
- package/checkbox/checkbox.d.ts +0 -128
- package/checkbox/public-api.d.ts +0 -4
- package/clamped-text/clamped-list.d.ts +0 -41
- package/clamped-text/clamped-text.d.ts +0 -65
- package/clamped-text/constants.d.ts +0 -34
- package/clamped-text/module.d.ts +0 -8
- package/code-block/code-block-highlight.d.ts +0 -98
- package/code-block/code-block.d.ts +0 -259
- package/code-block/code-block.module.d.ts +0 -7
- package/code-block/public-api.d.ts +0 -4
- package/code-block/types.d.ts +0 -36
- package/content-panel/content-panel.d.ts +0 -149
- package/content-panel/module.d.ts +0 -7
- package/core/animation/animation.d.ts +0 -37
- package/core/animation/fade-animations.d.ts +0 -2
- package/core/animation/index.d.ts +0 -3
- package/core/animation/select-animations.d.ts +0 -12
- package/core/common-behaviors/checkbox.d.ts +0 -5
- package/core/common-behaviors/clipboard.d.ts +0 -12
- package/core/common-behaviors/color.d.ts +0 -50
- package/core/common-behaviors/common-module.d.ts +0 -38
- package/core/common-behaviors/constructor.d.ts +0 -9
- package/core/common-behaviors/disabled.d.ts +0 -8
- package/core/common-behaviors/error-state.d.ts +0 -46
- package/core/common-behaviors/flex.d.ts +0 -4
- package/core/common-behaviors/hover.d.ts +0 -15
- package/core/common-behaviors/index.d.ts +0 -14
- package/core/common-behaviors/orientation.d.ts +0 -4
- package/core/common-behaviors/read-state.d.ts +0 -12
- package/core/common-behaviors/size.d.ts +0 -4
- package/core/common-behaviors/tabindex.d.ts +0 -8
- package/core/datetime/date-adapter.d.ts +0 -12
- package/core/datetime/date-formats.d.ts +0 -4
- package/core/datetime/index.d.ts +0 -2
- package/core/error/error-state-matcher.d.ts +0 -39
- package/core/form-field/field-sizing-content.d.ts +0 -21
- package/core/form-field/form-field-ref.d.ts +0 -28
- package/core/form-field/index.d.ts +0 -2
- package/core/formatters/date/formatter.d.ts +0 -11
- package/core/formatters/date/formatter.pipe.d.ts +0 -139
- package/core/formatters/filesize/config.d.ts +0 -66
- package/core/formatters/filesize/formatter.d.ts +0 -17
- package/core/formatters/filesize/index.d.ts +0 -3
- package/core/formatters/filesize/size.d.ts +0 -52
- package/core/formatters/index.d.ts +0 -13
- package/core/formatters/number/formatter.d.ts +0 -101
- package/core/forms/forms-module.d.ts +0 -7
- package/core/forms/forms.directive.d.ts +0 -22
- package/core/forms/index.d.ts +0 -3
- package/core/forms/validators.d.ts +0 -120
- package/core/highlight/highlight.pipe.d.ts +0 -10
- package/core/highlight/index.d.ts +0 -9
- package/core/line/line.d.ts +0 -23
- package/core/locales/en-US.d.ts +0 -176
- package/core/locales/es-LA.d.ts +0 -175
- package/core/locales/formatters.d.ts +0 -190
- package/core/locales/index.d.ts +0 -9
- package/core/locales/locale-service.d.ts +0 -1117
- package/core/locales/locale-service.module.d.ts +0 -6
- package/core/locales/pt-BR.d.ts +0 -175
- package/core/locales/ru-RU.d.ts +0 -176
- package/core/locales/tk-TM.d.ts +0 -176
- package/core/locales/types.d.ts +0 -77
- package/core/navbar/index.d.ts +0 -1
- package/core/navbar/rectangle-item.d.ts +0 -14
- package/core/option/action-container.d.ts +0 -5
- package/core/option/action.d.ts +0 -38
- package/core/option/index.d.ts +0 -5
- package/core/option/optgroup.d.ts +0 -16
- package/core/option/option-module.d.ts +0 -10
- package/core/option/option.d.ts +0 -170
- package/core/overlay/overlay-position-map.d.ts +0 -40
- package/core/pop-up/constants.d.ts +0 -56
- package/core/pop-up/focus-trap-strategy.d.ts +0 -5
- package/core/pop-up/index.d.ts +0 -5
- package/core/pop-up/pop-up-styles.d.ts +0 -2
- package/core/pop-up/pop-up-trigger.d.ts +0 -104
- package/core/pop-up/pop-up.d.ts +0 -57
- package/core/public-api.d.ts +0 -23
- package/core/select/common.d.ts +0 -59
- package/core/select/constants.d.ts +0 -22
- package/core/select/errors.d.ts +0 -19
- package/core/select/events.d.ts +0 -1
- package/core/select/index.d.ts +0 -4
- package/core/selection/constants.d.ts +0 -4
- package/core/selection/index.d.ts +0 -3
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +0 -23
- package/core/selection/pseudo-checkbox/pseudo-checkbox.module.d.ts +0 -8
- package/core/services/measure-scrollbar.service.d.ts +0 -11
- package/core/services/theme.service.d.ts +0 -41
- package/core/title/index.d.ts +0 -1
- package/core/title/title-text-ref.d.ts +0 -6
- package/core/tokens/index.d.ts +0 -1
- package/core/tokens/window.d.ts +0 -5
- package/core/utils/dom.d.ts +0 -4
- package/core/utils/index.d.ts +0 -2
- package/core/utils/public-api.d.ts +0 -1
- package/core/utils/utils.d.ts +0 -25
- package/core/validation/index.d.ts +0 -1
- package/core/validation/validation.d.ts +0 -29
- package/core/version.d.ts +0 -2
- package/datepicker/calendar-body.component.d.ts +0 -55
- package/datepicker/calendar-header.component.d.ts +0 -51
- package/datepicker/calendar.component.d.ts +0 -89
- package/datepicker/datepicker-animations.d.ts +0 -9
- package/datepicker/datepicker-errors.d.ts +0 -2
- package/datepicker/datepicker-input.directive.d.ts +0 -221
- package/datepicker/datepicker-intl.d.ts +0 -32
- package/datepicker/datepicker-module.d.ts +0 -21
- package/datepicker/datepicker-toggle.component.d.ts +0 -57
- package/datepicker/datepicker.component.d.ts +0 -148
- package/datepicker/month-view.component.d.ts +0 -73
- package/datepicker/public-api.d.ts +0 -10
- package/divider/divider.component.d.ts +0 -18
- package/divider/divider.module.d.ts +0 -8
- package/divider/public-api.d.ts +0 -2
- package/dl/dl.component.d.ts +0 -26
- package/dl/dl.module.d.ts +0 -9
- package/dl/public-api.d.ts +0 -2
- package/dropdown/dropdown-animations.d.ts +0 -11
- package/dropdown/dropdown-content.directive.d.ts +0 -32
- package/dropdown/dropdown-errors.d.ts +0 -17
- package/dropdown/dropdown-item.component.d.ts +0 -52
- package/dropdown/dropdown-trigger.directive.d.ts +0 -156
- package/dropdown/dropdown.component.d.ts +0 -126
- package/dropdown/dropdown.module.d.ts +0 -13
- package/dropdown/dropdown.types.d.ts +0 -67
- package/dropdown/public-api.d.ts +0 -8
- package/dynamic-translation/dynamic-translation.d.ts +0 -72
- package/dynamic-translation/module.d.ts +0 -7
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -36
- package/ellipsis-center/public-api.d.ts +0 -1
- package/empty-state/empty-state.component.d.ts +0 -36
- package/empty-state/empty-state.module.d.ts +0 -9
- package/empty-state/public-api.d.ts +0 -2
- package/fesm2022/koobiq-components-navbar-ic.mjs +0 -863
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +0 -1
- package/fesm2022/koobiq-components-risk-level.mjs +0 -75
- package/fesm2022/koobiq-components-risk-level.mjs.map +0 -1
- package/file-upload/dropzone.d.ts +0 -147
- package/file-upload/file-upload.d.ts +0 -102
- package/file-upload/file-upload.module.d.ts +0 -20
- package/file-upload/multiple-file-upload.component.d.ts +0 -138
- package/file-upload/primitives/file-drop.d.ts +0 -35
- package/file-upload/primitives/file-picker.d.ts +0 -82
- package/file-upload/primitives/index.d.ts +0 -2
- package/file-upload/public-api.d.ts +0 -7
- package/file-upload/single-file-upload.component.d.ts +0 -118
- package/filter-bar/filter-bar-button.d.ts +0 -14
- package/filter-bar/filter-bar.d.ts +0 -81
- package/filter-bar/filter-bar.module.d.ts +0 -17
- package/filter-bar/filter-bar.types.d.ts +0 -143
- package/filter-bar/filter-refresher.d.ts +0 -5
- package/filter-bar/filter-reset.d.ts +0 -15
- package/filter-bar/filter-search.d.ts +0 -54
- package/filter-bar/filter-search.scss +0 -12
- package/filter-bar/filters.d.ts +0 -122
- package/filter-bar/pipe-add.d.ts +0 -28
- package/filter-bar/pipe.directive.d.ts +0 -13
- package/filter-bar/pipes/base-pipe.d.ts +0 -74
- package/filter-bar/pipes/pipe-button.d.ts +0 -21
- package/filter-bar/pipes/pipe-date.d.ts +0 -65
- package/filter-bar/pipes/pipe-datetime.d.ts +0 -66
- package/filter-bar/pipes/pipe-multi-select.d.ts +0 -56
- package/filter-bar/pipes/pipe-multi-tree-select.d.ts +0 -67
- package/filter-bar/pipes/pipe-readonly.d.ts +0 -7
- package/filter-bar/pipes/pipe-select.d.ts +0 -30
- package/filter-bar/pipes/pipe-state.d.ts +0 -21
- package/filter-bar/pipes/pipe-text.d.ts +0 -26
- package/filter-bar/pipes/pipe-title.d.ts +0 -27
- package/filter-bar/pipes/pipe-tree-select.d.ts +0 -42
- package/filter-bar/public-api.d.ts +0 -21
- package/form-field/cleaner.d.ts +0 -11
- package/form-field/error.d.ts +0 -8
- package/form-field/fieldset.d.ts +0 -27
- package/form-field/form-field-control.d.ts +0 -40
- package/form-field/form-field.d.ts +0 -298
- package/form-field/form-field.module.d.ts +0 -19
- package/form-field/hint.d.ts +0 -15
- package/form-field/label.d.ts +0 -6
- package/form-field/password-hint.d.ts +0 -53
- package/form-field/password-toggle.d.ts +0 -56
- package/form-field/prefix.d.ts +0 -6
- package/form-field/public-api.d.ts +0 -15
- package/form-field/reactive-password-hint.d.ts +0 -20
- package/form-field/stepper.d.ts +0 -59
- package/form-field/suffix.d.ts +0 -6
- package/form-field/validate.directive.d.ts +0 -53
- package/icon/icon-button.component.d.ts +0 -28
- package/icon/icon-item.component.d.ts +0 -11
- package/icon/icon-registry-providers.d.ts +0 -34
- package/icon/icon-registry.d.ts +0 -50
- package/icon/icon.component.d.ts +0 -33
- package/icon/icon.module.d.ts +0 -9
- package/icon/public-api.d.ts +0 -6
- package/inline-edit/inline-edit.d.ts +0 -161
- package/inline-edit/module.d.ts +0 -7
- package/input/input-errors.d.ts +0 -1
- package/input/input-number-validators.d.ts +0 -35
- package/input/input-number.d.ts +0 -96
- package/input/input-password.d.ts +0 -99
- package/input/input-value-accessor.d.ts +0 -4
- package/input/input.d.ts +0 -109
- package/input/input.module.d.ts +0 -14
- package/input/public-api.d.ts +0 -6
- package/link/link.component.d.ts +0 -53
- package/link/link.module.d.ts +0 -8
- package/link/public-api.d.ts +0 -2
- package/list/list-selection.component.d.ts +0 -196
- package/list/list.component.d.ts +0 -18
- package/list/list.module.d.ts +0 -11
- package/list/public-api.d.ts +0 -3
- package/loader-overlay/loader-overlay.component.d.ts +0 -47
- package/loader-overlay/loader-overlay.module.d.ts +0 -10
- package/loader-overlay/public-api.d.ts +0 -2
- package/markdown/markdown.component.d.ts +0 -31
- package/markdown/markdown.module.d.ts +0 -7
- package/markdown/markdown.service.d.ts +0 -19
- package/markdown/markdown.values.d.ts +0 -10
- package/markdown/public-api.d.ts +0 -4
- package/modal/css-unit.pipe.d.ts +0 -7
- package/modal/modal-control.service.d.ts +0 -20
- package/modal/modal-ref.class.d.ts +0 -37
- package/modal/modal-util.d.ts +0 -15
- package/modal/modal.component.d.ts +0 -141
- package/modal/modal.directive.d.ts +0 -20
- package/modal/modal.module.d.ts +0 -15
- package/modal/modal.service.d.ts +0 -42
- package/modal/modal.type.d.ts +0 -72
- package/modal/public-api.d.ts +0 -6
- package/navbar/navbar-brand.component.d.ts +0 -41
- package/navbar/navbar-item.component.d.ts +0 -131
- package/navbar/navbar-toggle.component.d.ts +0 -23
- package/navbar/navbar.component.d.ts +0 -68
- package/navbar/navbar.module.d.ts +0 -15
- package/navbar/public-api.d.ts +0 -6
- package/navbar/vertical-navbar.component.d.ts +0 -47
- package/navbar-ic/_navbar-ic-theme.scss +0 -81
- package/navbar-ic/index.d.ts +0 -1
- package/navbar-ic/navbar-ic-divider.scss +0 -7
- package/navbar-ic/navbar-ic-header.d.ts +0 -22
- package/navbar-ic/navbar-ic-header.scss +0 -49
- package/navbar-ic/navbar-ic-item.d.ts +0 -144
- package/navbar-ic/navbar-ic-item.scss +0 -92
- package/navbar-ic/navbar-ic-tokens.scss +0 -22
- package/navbar-ic/navbar-ic.animation.d.ts +0 -3
- package/navbar-ic/navbar-ic.d.ts +0 -118
- package/navbar-ic/navbar-ic.module.d.ts +0 -14
- package/navbar-ic/navbar-ic.scss +0 -32
- package/navbar-ic/public-api.d.ts +0 -4
- package/notification-center/notification-center-animations.d.ts +0 -5
- package/notification-center/notification-center.d.ts +0 -184
- package/notification-center/notification-center.module.d.ts +0 -7
- package/notification-center/notification-center.service.d.ts +0 -115
- package/notification-center/notification-item.d.ts +0 -27
- package/notification-center/public-api.d.ts +0 -4
- package/overflow-items/module.d.ts +0 -7
- package/overflow-items/overflow-items.d.ts +0 -152
- package/popover/popover-animations.d.ts +0 -4
- package/popover/popover-confirm.component.d.ts +0 -28
- package/popover/popover.component.d.ts +0 -139
- package/popover/popover.module.d.ts +0 -14
- package/popover/public-api.d.ts +0 -4
- package/progress-bar/progress-bar.component.d.ts +0 -20
- package/progress-bar/progress-bar.module.d.ts +0 -8
- package/progress-bar/public-api.d.ts +0 -2
- package/progress-spinner/progress-spinner.component.d.ts +0 -26
- package/progress-spinner/progress-spinner.module.d.ts +0 -9
- package/progress-spinner/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -1
- package/radio/public-api.d.ts +0 -2
- package/radio/radio.component.d.ts +0 -200
- package/radio/radio.module.d.ts +0 -8
- package/resizer/module.d.ts +0 -7
- package/resizer/resizer.d.ts +0 -75
- package/risk-level/_risk-level-theme.scss +0 -74
- package/risk-level/index.d.ts +0 -1
- package/risk-level/public-api.d.ts +0 -2
- package/risk-level/risk-level-tokens.scss +0 -33
- package/risk-level/risk-level.component.d.ts +0 -21
- package/risk-level/risk-level.component.scss +0 -22
- package/risk-level/risk-level.module.d.ts +0 -12
- package/scrollbar/public-api.d.ts +0 -4
- package/scrollbar/scrollbar.component.d.ts +0 -37
- package/scrollbar/scrollbar.directive.d.ts +0 -29
- package/scrollbar/scrollbar.module.d.ts +0 -8
- package/scrollbar/scrollbar.types.d.ts +0 -33
- package/search-expandable/public-api.d.ts +0 -2
- package/search-expandable/search-expandable.d.ts +0 -89
- package/search-expandable/search-expandable.module.d.ts +0 -7
- package/select/public-api.d.ts +0 -4
- package/select/select-common.d.ts +0 -30
- package/select/select-option.directive.d.ts +0 -21
- package/select/select.component.d.ts +0 -627
- package/select/select.module.d.ts +0 -17
- package/sidebar/public-api.d.ts +0 -2
- package/sidebar/sidebar-animations.d.ts +0 -8
- package/sidebar/sidebar.component.d.ts +0 -80
- package/sidebar/sidebar.module.d.ts +0 -8
- package/sidepanel/public-api.d.ts +0 -6
- package/sidepanel/sidepanel-animations.d.ts +0 -20
- package/sidepanel/sidepanel-config.d.ts +0 -43
- package/sidepanel/sidepanel-container.component.d.ts +0 -67
- package/sidepanel/sidepanel-directives.d.ts +0 -61
- package/sidepanel/sidepanel-ref.d.ts +0 -36
- package/sidepanel/sidepanel.module.d.ts +0 -14
- package/sidepanel/sidepanel.service.d.ts +0 -58
- package/skeleton/module.d.ts +0 -7
- package/skeleton/skeleton.d.ts +0 -17
- package/split-button/public-api.d.ts +0 -2
- package/split-button/split-button.d.ts +0 -37
- package/split-button/split-button.module.d.ts +0 -7
- package/splitter/public-api.d.ts +0 -2
- package/splitter/splitter.component.d.ts +0 -136
- package/splitter/splitter.module.d.ts +0 -8
- package/table/public-api.d.ts +0 -2
- package/table/table.component.d.ts +0 -12
- package/table/table.module.d.ts +0 -9
- package/tabs/paginated-tab-header.d.ts +0 -182
- package/tabs/public-api.d.ts +0 -10
- package/tabs/tab-body.component.d.ts +0 -95
- package/tabs/tab-content.directive.d.ts +0 -9
- package/tabs/tab-group.component.d.ts +0 -137
- package/tabs/tab-header.component.d.ts +0 -32
- package/tabs/tab-label-wrapper.directive.d.ts +0 -29
- package/tabs/tab-label.directive.d.ts +0 -9
- package/tabs/tab-nav-bar.d.ts +0 -91
- package/tabs/tab.component.d.ts +0 -68
- package/tabs/tabs-animations.d.ts +0 -4
- package/tabs/tabs.module.d.ts +0 -20
- package/tags/public-api.d.ts +0 -5
- package/tags/tag-default-options.d.ts +0 -13
- package/tags/tag-input.d.ts +0 -110
- package/tags/tag-list.component.d.ts +0 -373
- package/tags/tag-text-control.d.ts +0 -10
- package/tags/tag.component.d.ts +0 -272
- package/tags/tag.module.d.ts +0 -10
- package/textarea/public-api.d.ts +0 -2
- package/textarea/textarea.component.d.ts +0 -123
- package/textarea/textarea.module.d.ts +0 -10
- package/time-range/constants.d.ts +0 -19
- package/time-range/module.d.ts +0 -10
- package/time-range/time-range-editor.d.ts +0 -65
- package/time-range/time-range-title-as-form-field.d.ts +0 -41
- package/time-range/time-range-title.d.ts +0 -18
- package/time-range/time-range.d.ts +0 -78
- package/time-range/time-range.service.d.ts +0 -25
- package/time-range/types.d.ts +0 -69
- package/timepicker/public-api.d.ts +0 -3
- package/timepicker/timepicker.constants.d.ts +0 -22
- package/timepicker/timepicker.directive.d.ts +0 -159
- package/timepicker/timepicker.module.d.ts +0 -11
- package/timezone/cities-by-filter.pipe.d.ts +0 -7
- package/timezone/public-api.d.ts +0 -6
- package/timezone/timezone-option.component.d.ts +0 -15
- package/timezone/timezone-option.directive.d.ts +0 -22
- package/timezone/timezone-select.component.d.ts +0 -16
- package/timezone/timezone.models.d.ts +0 -16
- package/timezone/timezone.module.d.ts +0 -20
- package/timezone/timezone.utils.d.ts +0 -22
- package/timezone/utc-offset.pipe.d.ts +0 -9
- package/title/public-api.d.ts +0 -2
- package/title/title.directive.d.ts +0 -33
- package/title/title.module.d.ts +0 -8
- package/toast/public-api.d.ts +0 -5
- package/toast/toast-animations.d.ts +0 -5
- package/toast/toast-container.component.d.ts +0 -19
- package/toast/toast.component.d.ts +0 -41
- package/toast/toast.module.d.ts +0 -8
- package/toast/toast.service.d.ts +0 -61
- package/toast/toast.type.d.ts +0 -44
- package/toggle/public-api.d.ts +0 -2
- package/toggle/toggle.component.d.ts +0 -77
- package/toggle/toggle.module.d.ts +0 -8
- package/tooltip/public-api.d.ts +0 -2
- package/tooltip/tooltip.animations.d.ts +0 -8
- package/tooltip/tooltip.component.d.ts +0 -156
- package/tooltip/tooltip.module.d.ts +0 -7
- package/top-bar/module.d.ts +0 -7
- package/top-bar/public-api.d.ts +0 -2
- package/top-bar/top-bar.d.ts +0 -25
- package/tree/control/base-tree-control.d.ts +0 -40
- package/tree/control/flat-tree-control.d.ts +0 -55
- package/tree/control/flat-tree-control.filters.d.ts +0 -27
- package/tree/control/nested-tree-control.d.ts +0 -19
- package/tree/control/tree-control.d.ts +0 -44
- package/tree/data-source/flat-data-source.d.ts +0 -80
- package/tree/data-source/nested-data-source.d.ts +0 -15
- package/tree/node.d.ts +0 -34
- package/tree/outlet.d.ts +0 -9
- package/tree/padding.directive.d.ts +0 -45
- package/tree/public-api.d.ts +0 -16
- package/tree/toggle.d.ts +0 -28
- package/tree/tree-base.d.ts +0 -96
- package/tree/tree-errors.d.ts +0 -25
- package/tree/tree-option.component.d.ts +0 -89
- package/tree/tree-selection.component.d.ts +0 -156
- package/tree/tree.d.ts +0 -6
- package/tree/tree.module.d.ts +0 -16
- package/tree-select/public-api.d.ts +0 -2
- package/tree-select/tree-select.component.d.ts +0 -360
- package/tree-select/tree-select.module.d.ts +0 -15
- package/username/constants.d.ts +0 -15
- package/username/module.d.ts +0 -8
- package/username/types.d.ts +0 -62
- package/username/username.d.ts +0 -68
- package/username/username.pipe.d.ts +0 -23
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { NgClass, TitleCasePipe, DOCUMENT } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, Input, Injectable, ChangeDetectorRef, viewChild, InjectionToken, NgZone, ViewContainerRef, forwardRef, ElementRef, Renderer2, EventEmitter, Directive, DestroyRef, NgModule } from '@angular/core';
|
|
3
|
+
import { TitleCasePipe, DOCUMENT } from '@angular/common';
|
|
4
|
+
import * as i1 from '@koobiq/components/button';
|
|
5
5
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
6
|
-
import * as
|
|
7
|
-
import { KbqOptionModule, defaultOffsetY, ruRULocaleData, validationTooltipShowDelay, validationTooltipHideDelay,
|
|
8
|
-
import * as
|
|
6
|
+
import * as i4 from '@koobiq/components/core';
|
|
7
|
+
import { DateAdapter, KbqOptionModule, defaultOffsetY, ruRULocaleData, validationTooltipShowDelay, validationTooltipHideDelay, KBQ_DATE_FORMATS, KBQ_LOCALE_SERVICE, KbqErrorStateTracker, ErrorStateMatcher, TAB, SPACE, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, HOME, PAGE_UP, END, PAGE_DOWN, ESCAPE, isLetterKey, hasModifierKey, isVerticalMovement, isHorizontalMovement, DELETE, BACKSPACE } from '@koobiq/components/core';
|
|
8
|
+
import * as i2 from '@koobiq/components/icon';
|
|
9
9
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i3 from '@koobiq/components/select';
|
|
11
11
|
import { KbqSelectModule } from '@koobiq/components/select';
|
|
12
|
-
import
|
|
13
|
-
import { KbqFormFieldControl, KbqFormField, KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
14
|
-
import { Subject, Subscription, merge, of } from 'rxjs';
|
|
12
|
+
import { Subject, Subscription, merge } from 'rxjs';
|
|
15
13
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
16
14
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
17
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
15
|
+
import { takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
|
|
18
16
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, FormGroupDirective, NgForm } from '@angular/forms';
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import * as i1$1 from '@angular/cdk/overlay';
|
|
17
|
+
import { KbqFormFieldControl, KbqFormField, KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
18
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
22
19
|
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
23
20
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
24
21
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
@@ -43,17 +40,25 @@ class KbqCalendarCell {
|
|
|
43
40
|
*/
|
|
44
41
|
class KbqCalendarBody {
|
|
45
42
|
constructor() {
|
|
43
|
+
/** The cells to display in the table. */
|
|
44
|
+
this.rows = input(undefined, ...(ngDevMode ? [{ debugName: "rows" }] : []));
|
|
45
|
+
/** The value in the table that corresponds to today. */
|
|
46
|
+
this.todayValue = input(undefined, ...(ngDevMode ? [{ debugName: "todayValue" }] : []));
|
|
47
|
+
/** The value in the table that is currently selected. */
|
|
48
|
+
this.selectedValue = input(undefined, ...(ngDevMode ? [{ debugName: "selectedValue" }] : []));
|
|
49
|
+
/** The minimum number of free cells needed to fit the label in the first row. */
|
|
50
|
+
this.labelMinRequiredCells = input(undefined, ...(ngDevMode ? [{ debugName: "labelMinRequiredCells" }] : []));
|
|
46
51
|
/** The number of columns in the table. */
|
|
47
|
-
this.numCols = 7;
|
|
52
|
+
this.numCols = input(7, ...(ngDevMode ? [{ debugName: "numCols" }] : []));
|
|
48
53
|
/** The cell number of the active cell in the table. */
|
|
49
|
-
this.activeCell = 0;
|
|
54
|
+
this.activeCell = input(0, ...(ngDevMode ? [{ debugName: "activeCell" }] : []));
|
|
50
55
|
/**
|
|
51
56
|
* The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
|
|
52
57
|
* maintained even as the table resizes.
|
|
53
58
|
*/
|
|
54
|
-
this.cellAspectRatio = 1;
|
|
59
|
+
this.cellAspectRatio = input(1, ...(ngDevMode ? [{ debugName: "cellAspectRatio" }] : []));
|
|
55
60
|
/** Emits when a new value is selected. */
|
|
56
|
-
this.selectedValueChange =
|
|
61
|
+
this.selectedValueChange = output();
|
|
57
62
|
}
|
|
58
63
|
cellClicked(cell) {
|
|
59
64
|
if (cell.enabled) {
|
|
@@ -62,7 +67,9 @@ class KbqCalendarBody {
|
|
|
62
67
|
}
|
|
63
68
|
ngOnChanges(changes) {
|
|
64
69
|
const columnChanges = changes.numCols;
|
|
65
|
-
const { rows, numCols } = this;
|
|
70
|
+
const { rows: rowsInput, numCols: numColsInput } = this;
|
|
71
|
+
const rows = rowsInput();
|
|
72
|
+
const numCols = numColsInput();
|
|
66
73
|
if (changes.rows || columnChanges) {
|
|
67
74
|
this.firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;
|
|
68
75
|
}
|
|
@@ -76,45 +83,29 @@ class KbqCalendarBody {
|
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
85
|
isActiveCell(rowIndex, colIndex) {
|
|
79
|
-
let cellNumber = rowIndex * this.numCols + colIndex;
|
|
86
|
+
let cellNumber = rowIndex * this.numCols() + colIndex;
|
|
80
87
|
// Account for the fact that the first row may not have as many cells.
|
|
81
88
|
if (rowIndex) {
|
|
82
89
|
cellNumber -= this.firstRowOffset;
|
|
83
90
|
}
|
|
84
|
-
return cellNumber === this.activeCell;
|
|
91
|
+
return cellNumber === this.activeCell();
|
|
85
92
|
}
|
|
86
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
87
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
93
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqCalendarBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqCalendarBody, isStandalone: true, selector: "[kbq-calendar-body]", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, todayValue: { classPropertyName: "todayValue", publicName: "todayValue", isSignal: true, isRequired: false, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, labelMinRequiredCells: { classPropertyName: "labelMinRequiredCells", publicName: "labelMinRequiredCells", isSignal: true, isRequired: false, transformFunction: null }, numCols: { classPropertyName: "numCols", publicName: "numCols", isSignal: true, isRequired: false, transformFunction: null }, activeCell: { classPropertyName: "activeCell", publicName: "activeCell", isSignal: true, isRequired: false, transformFunction: null }, cellAspectRatio: { classPropertyName: "cellAspectRatio", publicName: "cellAspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedValueChange: "selectedValueChange" }, host: { classAttribute: "kbq-calendar__body" }, exportAs: ["kbqCalendarBody"], usesOnChanges: true, ngImport: i0, template: "<!-- Create the first row separately so we can include a special spacer cell. -->\n@for (row of rows(); track $index; let rowIndex = $index) {\n <tr>\n <!-- We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp). -->\n @if (rowIndex === 0 && firstRowOffset) {\n <td class=\"kbq-calendar__body-label\" [attr.colspan]=\"firstRowOffset\"></td>\n }\n @for (item of row; track item.displayValue; let colIndex = $index) {\n <td\n class=\"kbq-calendar__body-cell\"\n [class.kbq-calendar__body_active]=\"isActiveCell(rowIndex, colIndex)\"\n [class]=\"item.cssClasses!\"\n [style.paddingBottom]=\"cellPadding\"\n [style.paddingTop]=\"cellPadding\"\n [style.width]=\"cellWidth\"\n [tabindex]=\"-1\"\n (click)=\"cellClicked(item)\"\n >\n <div\n class=\"kbq-calendar__body-cell-content\"\n [class.kbq-calendar__body-today]=\"todayValue() === item.value\"\n [class.kbq-disabled]=\"!item.enabled\"\n [class.kbq-selected]=\"selectedValue() === item.value\"\n >\n {{ item.displayValue }}\n </div>\n </td>\n }\n </tr>\n}\n", styles: [".kbq-calendar__body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer;padding:0}.kbq-disabled{cursor:default}.kbq-calendar__body-cell-content{display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:32px;line-height:1;border-radius:var(--kbq-datepicker-size-grid-cell-border-radius);margin-bottom:var(--kbq-datepicker-size-grid-content-gap-vertical)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
88
95
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqCalendarBody, decorators: [{
|
|
90
97
|
type: Component,
|
|
91
|
-
args: [{ selector: '[kbq-calendar-body]', imports: [
|
|
92
|
-
NgClass
|
|
93
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'kbqCalendarBody', host: {
|
|
98
|
+
args: [{ selector: '[kbq-calendar-body]', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
94
99
|
class: 'kbq-calendar__body'
|
|
95
|
-
}, template: "<!-- Create the first row separately so we can include a special spacer cell. -->\n@for (row of rows; track $index; let rowIndex = $index) {\n <tr>\n <!-- We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp). -->\n @if (rowIndex === 0 && firstRowOffset) {\n <td class=\"kbq-calendar__body-label\" [attr.colspan]=\"firstRowOffset\"></td>\n }\n @for (item of row; track item.displayValue; let colIndex = $index) {\n <td\n class=\"kbq-calendar__body-cell\"\n [class.kbq-calendar__body_active]=\"isActiveCell(rowIndex, colIndex)\"\n [
|
|
96
|
-
}], propDecorators: { rows: [{
|
|
97
|
-
type: Input
|
|
98
|
-
}], todayValue: [{
|
|
99
|
-
type: Input
|
|
100
|
-
}], selectedValue: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], labelMinRequiredCells: [{
|
|
103
|
-
type: Input
|
|
104
|
-
}], numCols: [{
|
|
105
|
-
type: Input
|
|
106
|
-
}], activeCell: [{
|
|
107
|
-
type: Input
|
|
108
|
-
}], cellAspectRatio: [{
|
|
109
|
-
type: Input
|
|
110
|
-
}], selectedValueChange: [{
|
|
111
|
-
type: Output
|
|
112
|
-
}] } });
|
|
100
|
+
}, exportAs: 'kbqCalendarBody', template: "<!-- Create the first row separately so we can include a special spacer cell. -->\n@for (row of rows(); track $index; let rowIndex = $index) {\n <tr>\n <!-- We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp). -->\n @if (rowIndex === 0 && firstRowOffset) {\n <td class=\"kbq-calendar__body-label\" [attr.colspan]=\"firstRowOffset\"></td>\n }\n @for (item of row; track item.displayValue; let colIndex = $index) {\n <td\n class=\"kbq-calendar__body-cell\"\n [class.kbq-calendar__body_active]=\"isActiveCell(rowIndex, colIndex)\"\n [class]=\"item.cssClasses!\"\n [style.paddingBottom]=\"cellPadding\"\n [style.paddingTop]=\"cellPadding\"\n [style.width]=\"cellWidth\"\n [tabindex]=\"-1\"\n (click)=\"cellClicked(item)\"\n >\n <div\n class=\"kbq-calendar__body-cell-content\"\n [class.kbq-calendar__body-today]=\"todayValue() === item.value\"\n [class.kbq-disabled]=\"!item.enabled\"\n [class.kbq-selected]=\"selectedValue() === item.value\"\n >\n {{ item.displayValue }}\n </div>\n </td>\n }\n </tr>\n}\n", styles: [".kbq-calendar__body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer;padding:0}.kbq-disabled{cursor:default}.kbq-calendar__body-cell-content{display:flex;align-items:center;justify-content:center;box-sizing:border-box;height:32px;line-height:1;border-radius:var(--kbq-datepicker-size-grid-cell-border-radius);margin-bottom:var(--kbq-datepicker-size-grid-content-gap-vertical)}\n"] }]
|
|
101
|
+
}], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], todayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayValue", required: false }] }], selectedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValue", required: false }] }], labelMinRequiredCells: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelMinRequiredCells", required: false }] }], numCols: [{ type: i0.Input, args: [{ isSignal: true, alias: "numCols", required: false }] }], activeCell: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeCell", required: false }] }], cellAspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellAspectRatio", required: false }] }], selectedValueChange: [{ type: i0.Output, args: ["selectedValueChange"] }] } });
|
|
113
102
|
|
|
114
103
|
const defaultMinYear = 1900;
|
|
115
104
|
const defaultMaxYear = 2099;
|
|
116
105
|
/** Default header for KbqCalendar */
|
|
117
106
|
class KbqCalendarHeader {
|
|
107
|
+
// TODO: Skipped for migration because:
|
|
108
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
118
109
|
get activeDate() {
|
|
119
110
|
return this._activeDate;
|
|
120
111
|
}
|
|
@@ -123,6 +114,8 @@ class KbqCalendarHeader {
|
|
|
123
114
|
this.updateSelectedValues();
|
|
124
115
|
this.updateSelectionOptions();
|
|
125
116
|
}
|
|
117
|
+
// TODO: Skipped for migration because:
|
|
118
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
126
119
|
get maxDate() {
|
|
127
120
|
return this._maxDate;
|
|
128
121
|
}
|
|
@@ -133,6 +126,8 @@ class KbqCalendarHeader {
|
|
|
133
126
|
this._maxDate = value;
|
|
134
127
|
this.updateSelectionOptions();
|
|
135
128
|
}
|
|
129
|
+
// TODO: Skipped for migration because:
|
|
130
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
136
131
|
get minDate() {
|
|
137
132
|
return this._minDate;
|
|
138
133
|
}
|
|
@@ -153,15 +148,15 @@ class KbqCalendarHeader {
|
|
|
153
148
|
get nextDisabled() {
|
|
154
149
|
return this.compareDate(this.activeDate, this.maxDate) >= 0;
|
|
155
150
|
}
|
|
156
|
-
constructor(
|
|
157
|
-
this.adapter =
|
|
151
|
+
constructor() {
|
|
152
|
+
this.adapter = inject(DateAdapter);
|
|
158
153
|
this.years = [];
|
|
159
154
|
this._maxDate = this.adapter.createDate(defaultMaxYear, 11);
|
|
160
155
|
this._minDate = this.adapter.createDate(defaultMinYear, 1);
|
|
161
156
|
/** Emits when any date is activated. */
|
|
162
|
-
this.activeDateChange =
|
|
163
|
-
this.monthSelected =
|
|
164
|
-
this.yearSelected =
|
|
157
|
+
this.activeDateChange = output();
|
|
158
|
+
this.monthSelected = output();
|
|
159
|
+
this.yearSelected = output();
|
|
165
160
|
this.monthNames = this.adapter.getMonthNames('long').map((name, i) => {
|
|
166
161
|
return { name, nameShort: this.adapter.getMonthNames('short')[i], value: i, disabled: false };
|
|
167
162
|
});
|
|
@@ -244,10 +239,10 @@ class KbqCalendarHeader {
|
|
|
244
239
|
this.monthNames.forEach((month) => (month.disabled = false));
|
|
245
240
|
}
|
|
246
241
|
}
|
|
247
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
248
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
242
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqCalendarHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
243
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqCalendarHeader, isStandalone: true, selector: "kbq-calendar-header", inputs: { activeDate: "activeDate", maxDate: "maxDate", minDate: "minDate" }, outputs: { activeDateChange: "activeDateChange", monthSelected: "monthSelected", yearSelected: "yearSelected" }, host: { classAttribute: "kbq-calendar-header" }, exportAs: ["kbqCalendarHeader"], ngImport: i0, template: "<div class=\"kbq-calendar-header__select-group\">\n <kbq-select\n #monthSelect=\"kbqSelect\"\n class=\"kbq-calendar-header__select\"\n [panelClass]=\"'kbq-calendar-select-panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selectedMonth\"\n (selectionChange)=\"onMonthSelected($event.value)\"\n >\n <button\n kbq-button\n kbq-select-matcher\n class=\"layout-padding-right-xs\"\n [class.kbq-active]=\"monthSelect.panelOpen\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n >\n {{ monthNames[selectedMonth].nameShort | titlecase }}\n\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"layout-padding-left-3xs\" [color]=\"'contrast'\"></i>\n </button>\n\n @for (month of monthNames; track month.nameShort) {\n <kbq-option [disabled]=\"month.disabled\" [kbqTooltipDisabled]=\"true\" [value]=\"month.value\">\n {{ month.name }}\n </kbq-option>\n }\n </kbq-select>\n\n <kbq-select\n #yearSelect=\"kbqSelect\"\n [panelClass]=\"'kbq-calendar-select-panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selectedYear\"\n (selectionChange)=\"onYearSelected($event.value)\"\n >\n <button\n kbq-button\n kbq-select-matcher\n class=\"layout-padding-right-xs\"\n [class.kbq-active]=\"yearSelect.panelOpen\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n >\n {{ selectedYear }}\n\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"layout-padding-left-3xs\"></i>\n </button>\n\n @for (year of years; track year) {\n <kbq-option [kbqTooltipDisabled]=\"true\" [value]=\"year\">\n {{ year }}\n </kbq-option>\n }\n </kbq-select>\n</div>\n\n<div class=\"kbq-calendar-header__button-group\">\n <button\n kbq-button\n class=\"kbq-calendar-header__previous-button\"\n [color]=\"'contrast'\"\n [disabled]=\"previousDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectPreviousMonth()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n </button>\n\n <button\n kbq-button\n [color]=\"'contrast'\"\n [disabled]=\"currentDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectCurrentDate()\"\n >\n <i kbq-icon=\"kbq-circle-xs_16\"></i>\n </button>\n\n <button\n kbq-button\n class=\"kbq-calendar-header__next-button\"\n [color]=\"'contrast'\"\n [disabled]=\"nextDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectNextMonth()\"\n >\n <i kbq-icon=\"kbq-chevron-right_16\"></i>\n </button>\n</div>\n", styles: [".kbq-calendar-header{display:flex;flex-direction:row;justify-content:space-between;padding-right:var(--kbq-datepicker-size-header-padding-horizontal);padding-left:var(--kbq-datepicker-size-header-padding-horizontal);margin-bottom:var(--kbq-datepicker-size-header-margin-bottom)}.kbq-calendar-header__select{width:auto!important}.kbq-calendar-header__button-group,.kbq-calendar-header__select-group{display:flex;flex-direction:row}.kbq-calendar-select-panel{margin-top:2px;min-width:98%!important}.kbq-calendar-select-panel .kbq-select__content{max-height:384px;overflow-x:hidden;scrollbar-gutter:auto}.kbq-calendar-select-panel .kbq-select__content .kbq-option{min-width:65px}\n"], dependencies: [{ kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "ngmodule", type: KbqSelectModule }, { kind: "component", type: i3.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "showPreselectedValues", "triggerValuesLimit", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "multiline", "searchMinOptionsThreshold", "scrolledToBottomOffset", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "virtualOptionFactory", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "valueChange", "scrolledToBottom"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i4.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "viewValue", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i4.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: ["useDefaultHandlers"] }, { kind: "ngmodule", type: KbqOptionModule }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
249
244
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqCalendarHeader, decorators: [{
|
|
251
246
|
type: Component,
|
|
252
247
|
args: [{ selector: 'kbq-calendar-header', imports: [
|
|
253
248
|
TitleCasePipe,
|
|
@@ -255,22 +250,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
255
250
|
KbqIconModule,
|
|
256
251
|
KbqSelectModule,
|
|
257
252
|
KbqOptionModule
|
|
258
|
-
],
|
|
253
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
259
254
|
class: 'kbq-calendar-header'
|
|
260
|
-
}, template: "<div class=\"kbq-calendar-header__select-group\">\n <kbq-select\n #monthSelect=\"kbqSelect\"\n class=\"kbq-calendar-header__select\"\n [panelClass]=\"'kbq-calendar-select-panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selectedMonth\"\n (selectionChange)=\"onMonthSelected($event.value)\"\n >\n <button\n kbq-button\n kbq-select-matcher\n class=\"layout-padding-right-xs\"\n [class.kbq-active]=\"monthSelect.panelOpen\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n >\n {{ monthNames[selectedMonth].nameShort | titlecase }}\n\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"layout-padding-left-3xs\" [color]=\"'contrast'\"></i>\n </button>\n\n @for (month of monthNames; track month.nameShort) {\n <kbq-option [disabled]=\"month.disabled\" [kbqTooltipDisabled]=\"true\" [value]=\"month.value\">\n {{ month.name }}\n </kbq-option>\n }\n </kbq-select>\n\n <kbq-select\n #yearSelect=\"kbqSelect\"\n [panelClass]=\"'kbq-calendar-select-panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selectedYear\"\n (selectionChange)=\"onYearSelected($event.value)\"\n >\n <button\n kbq-button\n kbq-select-matcher\n class=\"layout-padding-right-xs\"\n [class.kbq-active]=\"yearSelect.panelOpen\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n >\n {{ selectedYear }}\n\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"layout-padding-left-3xs\"></i>\n </button>\n\n @for (year of years; track year) {\n <kbq-option [kbqTooltipDisabled]=\"true\" [value]=\"year\">\n {{ year }}\n </kbq-option>\n }\n </kbq-select>\n</div>\n\n<div class=\"kbq-calendar-header__button-group\">\n <button\n kbq-button\n class=\"kbq-calendar-header__previous-button\"\n [color]=\"'contrast'\"\n [disabled]=\"previousDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectPreviousMonth()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n </button>\n\n <button\n kbq-button\n [color]=\"'contrast'\"\n [disabled]=\"currentDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectCurrentDate()\"\n >\n <i kbq-icon=\"kbq-circle-xs_16\"></i>\n </button>\n\n <button\n kbq-button\n class=\"kbq-calendar-header__next-button\"\n [color]=\"'contrast'\"\n [disabled]=\"nextDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectNextMonth()\"\n >\n <i kbq-icon=\"kbq-chevron-right_16\"></i>\n </button>\n</div>\n", styles: [".kbq-calendar-header{display:flex;flex-direction:row;justify-content:space-between;padding-right:var(--kbq-datepicker-size-header-padding-horizontal);padding-left:var(--kbq-datepicker-size-header-padding-horizontal);margin-bottom:var(--kbq-datepicker-size-header-margin-bottom)}.kbq-calendar-header__select{width:auto!important}.kbq-calendar-header__button-group,.kbq-calendar-header__select-group{display:flex;flex-direction:row}.kbq-calendar-select-panel{margin-top:2px;min-width:98%!important}.kbq-calendar-select-panel .kbq-select__content{max-height:384px;overflow-x:hidden;scrollbar-gutter:auto}.kbq-calendar-select-panel .kbq-select__content .kbq-option{min-width:65px}\n"] }]
|
|
261
|
-
}], ctorParameters: () => [
|
|
255
|
+
}, exportAs: 'kbqCalendarHeader', template: "<div class=\"kbq-calendar-header__select-group\">\n <kbq-select\n #monthSelect=\"kbqSelect\"\n class=\"kbq-calendar-header__select\"\n [panelClass]=\"'kbq-calendar-select-panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selectedMonth\"\n (selectionChange)=\"onMonthSelected($event.value)\"\n >\n <button\n kbq-button\n kbq-select-matcher\n class=\"layout-padding-right-xs\"\n [class.kbq-active]=\"monthSelect.panelOpen\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n >\n {{ monthNames[selectedMonth].nameShort | titlecase }}\n\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"layout-padding-left-3xs\" [color]=\"'contrast'\"></i>\n </button>\n\n @for (month of monthNames; track month.nameShort) {\n <kbq-option [disabled]=\"month.disabled\" [kbqTooltipDisabled]=\"true\" [value]=\"month.value\">\n {{ month.name }}\n </kbq-option>\n }\n </kbq-select>\n\n <kbq-select\n #yearSelect=\"kbqSelect\"\n [panelClass]=\"'kbq-calendar-select-panel'\"\n [tabIndex]=\"-1\"\n [value]=\"selectedYear\"\n (selectionChange)=\"onYearSelected($event.value)\"\n >\n <button\n kbq-button\n kbq-select-matcher\n class=\"layout-padding-right-xs\"\n [class.kbq-active]=\"yearSelect.panelOpen\"\n [color]=\"'contrast'\"\n [kbqStyle]=\"'transparent'\"\n >\n {{ selectedYear }}\n\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"layout-padding-left-3xs\"></i>\n </button>\n\n @for (year of years; track year) {\n <kbq-option [kbqTooltipDisabled]=\"true\" [value]=\"year\">\n {{ year }}\n </kbq-option>\n }\n </kbq-select>\n</div>\n\n<div class=\"kbq-calendar-header__button-group\">\n <button\n kbq-button\n class=\"kbq-calendar-header__previous-button\"\n [color]=\"'contrast'\"\n [disabled]=\"previousDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectPreviousMonth()\"\n >\n <i kbq-icon=\"kbq-chevron-left_16\"></i>\n </button>\n\n <button\n kbq-button\n [color]=\"'contrast'\"\n [disabled]=\"currentDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectCurrentDate()\"\n >\n <i kbq-icon=\"kbq-circle-xs_16\"></i>\n </button>\n\n <button\n kbq-button\n class=\"kbq-calendar-header__next-button\"\n [color]=\"'contrast'\"\n [disabled]=\"nextDisabled\"\n [kbqStyle]=\"'transparent'\"\n [tabindex]=\"-1\"\n (click)=\"selectNextMonth()\"\n >\n <i kbq-icon=\"kbq-chevron-right_16\"></i>\n </button>\n</div>\n", styles: [".kbq-calendar-header{display:flex;flex-direction:row;justify-content:space-between;padding-right:var(--kbq-datepicker-size-header-padding-horizontal);padding-left:var(--kbq-datepicker-size-header-padding-horizontal);margin-bottom:var(--kbq-datepicker-size-header-margin-bottom)}.kbq-calendar-header__select{width:auto!important}.kbq-calendar-header__button-group,.kbq-calendar-header__select-group{display:flex;flex-direction:row}.kbq-calendar-select-panel{margin-top:2px;min-width:98%!important}.kbq-calendar-select-panel .kbq-select__content{max-height:384px;overflow-x:hidden;scrollbar-gutter:auto}.kbq-calendar-select-panel .kbq-select__content .kbq-option{min-width:65px}\n"] }]
|
|
256
|
+
}], ctorParameters: () => [], propDecorators: { activeDate: [{
|
|
262
257
|
type: Input
|
|
263
258
|
}], maxDate: [{
|
|
264
259
|
type: Input
|
|
265
260
|
}], minDate: [{
|
|
266
261
|
type: Input
|
|
267
|
-
}], activeDateChange: [{
|
|
268
|
-
type: Output
|
|
269
|
-
}], monthSelected: [{
|
|
270
|
-
type: Output
|
|
271
|
-
}], yearSelected: [{
|
|
272
|
-
type: Output
|
|
273
|
-
}] } });
|
|
262
|
+
}], activeDateChange: [{ type: i0.Output, args: ["activeDateChange"] }], monthSelected: [{ type: i0.Output, args: ["monthSelected"] }], yearSelected: [{ type: i0.Output, args: ["yearSelected"] }] } });
|
|
274
263
|
|
|
275
264
|
/** @docs-private */
|
|
276
265
|
function createMissingDateImplError(provider) {
|
|
@@ -307,10 +296,10 @@ class KbqDatepickerIntl {
|
|
|
307
296
|
/** A label for the 'switch to year view' button (used by screen readers). */
|
|
308
297
|
this.switchToMultiYearViewLabel = 'Choose month and year';
|
|
309
298
|
}
|
|
310
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
311
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
299
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
300
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerIntl, providedIn: 'root' }); }
|
|
312
301
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerIntl, decorators: [{
|
|
314
303
|
type: Injectable,
|
|
315
304
|
args: [{ providedIn: 'root' }]
|
|
316
305
|
}] });
|
|
@@ -324,6 +313,8 @@ class KbqMonthView {
|
|
|
324
313
|
/**
|
|
325
314
|
* The date to display in this month view (everything other than the month and year is ignored).
|
|
326
315
|
*/
|
|
316
|
+
// TODO: Skipped for migration because:
|
|
317
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
327
318
|
get activeDate() {
|
|
328
319
|
return this._activeDate;
|
|
329
320
|
}
|
|
@@ -335,6 +326,8 @@ class KbqMonthView {
|
|
|
335
326
|
}
|
|
336
327
|
}
|
|
337
328
|
/** The currently selected date. */
|
|
329
|
+
// TODO: Skipped for migration because:
|
|
330
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
338
331
|
get selected() {
|
|
339
332
|
return this._selected;
|
|
340
333
|
}
|
|
@@ -342,15 +335,25 @@ class KbqMonthView {
|
|
|
342
335
|
this._selected = value;
|
|
343
336
|
this.selectedDate = this.getDateInCurrentMonth(this._selected);
|
|
344
337
|
}
|
|
345
|
-
constructor(
|
|
346
|
-
this.changeDetectorRef =
|
|
347
|
-
this.adapter =
|
|
338
|
+
constructor() {
|
|
339
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
340
|
+
this.adapter = inject(DateAdapter, { optional: true });
|
|
341
|
+
/** The minimum selectable date. */
|
|
342
|
+
this.minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
343
|
+
/** The maximum selectable date. */
|
|
344
|
+
this.maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
345
|
+
/** Function used to filter which dates are selectable. */
|
|
346
|
+
this.dateFilter = input(undefined, ...(ngDevMode ? [{ debugName: "dateFilter" }] : []));
|
|
347
|
+
/** Function that can be used to add custom CSS classes to dates. */
|
|
348
|
+
this.dateClass = input(undefined, ...(ngDevMode ? [{ debugName: "dateClass" }] : []));
|
|
348
349
|
/** Emits when a new date is selected. */
|
|
349
|
-
this.selectedChange =
|
|
350
|
+
this.selectedChange = output();
|
|
350
351
|
/** Emits when any date is selected. */
|
|
351
|
-
this.userSelection =
|
|
352
|
+
this.userSelection = output();
|
|
352
353
|
/** Emits when any date is activated. */
|
|
353
|
-
this.activeDateChange =
|
|
354
|
+
this.activeDateChange = output();
|
|
355
|
+
/** The body of calendar table */
|
|
356
|
+
this.kbqCalendarBody = viewChild.required(KbqCalendarBody);
|
|
354
357
|
if (!this.adapter) {
|
|
355
358
|
throw createMissingDateImplError('DateAdapter');
|
|
356
359
|
}
|
|
@@ -375,6 +378,7 @@ class KbqMonthView {
|
|
|
375
378
|
const selectedDate = this.adapter.createDate(selectedYear, selectedMonth, date);
|
|
376
379
|
this.selectedChange.emit(selectedDate);
|
|
377
380
|
}
|
|
381
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
378
382
|
this.userSelection.emit();
|
|
379
383
|
}
|
|
380
384
|
/** Initializes this month view. */
|
|
@@ -400,16 +404,20 @@ class KbqMonthView {
|
|
|
400
404
|
}
|
|
401
405
|
const date = this.adapter.createDate(this.adapter.getYear(this.activeDate), this.adapter.getMonth(this.activeDate), i + 1);
|
|
402
406
|
const enabled = this.shouldEnableDate(date);
|
|
403
|
-
const
|
|
407
|
+
const dateClass = this.dateClass();
|
|
408
|
+
const cellClasses = dateClass ? dateClass(date) : undefined;
|
|
404
409
|
this.weeks[this.weeks.length - 1].push(new KbqCalendarCell(i + 1, dateNames[i], enabled, cellClasses));
|
|
405
410
|
}
|
|
406
411
|
}
|
|
407
412
|
/** Date filter for the month */
|
|
408
413
|
shouldEnableDate(date) {
|
|
414
|
+
const dateFilter = this.dateFilter();
|
|
415
|
+
const minDate = this.minDate();
|
|
416
|
+
const maxDate = this.maxDate();
|
|
409
417
|
return (!!date &&
|
|
410
|
-
(!
|
|
411
|
-
(!
|
|
412
|
-
(!
|
|
418
|
+
(!dateFilter || dateFilter(date)) &&
|
|
419
|
+
(!minDate || this.adapter.compareDate(date, minDate) >= 0) &&
|
|
420
|
+
(!maxDate || this.adapter.compareDate(date, maxDate) <= 0));
|
|
413
421
|
}
|
|
414
422
|
/**
|
|
415
423
|
* Gets the date in this month that the given Date falls on.
|
|
@@ -425,38 +433,19 @@ class KbqMonthView {
|
|
|
425
433
|
this.adapter.getMonth(d1) === this.adapter.getMonth(d2) &&
|
|
426
434
|
this.adapter.getYear(d1) === this.adapter.getYear(d2));
|
|
427
435
|
}
|
|
428
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
429
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
436
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMonthView, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
437
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqMonthView, isStandalone: true, selector: "kbq-month-view", inputs: { activeDate: { classPropertyName: "activeDate", publicName: "activeDate", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange", userSelection: "userSelection", activeDateChange: "activeDateChange" }, viewQueries: [{ propertyName: "kbqCalendarBody", first: true, predicate: KbqCalendarBody, descendants: true, isSignal: true }], exportAs: ["kbqMonthView"], ngImport: i0, template: "<table class=\"kbq-calendar__table\">\n <thead class=\"kbq-calendar__table-header\">\n <tr>\n @for (day of weekdays; track day) {\n <th [attr.aria-label]=\"day.long\">\n {{ day.narrow }}\n </th>\n }\n </tr>\n <tr>\n <th colspan=\"7\" class=\"kbq-calendar__table-header-divider\"></th>\n </tr>\n </thead>\n <tbody\n kbq-calendar-body\n [activeCell]=\"adapter.getDate(activeDate) - 1\"\n [labelMinRequiredCells]=\"3\"\n [rows]=\"weeks\"\n [selectedValue]=\"selectedDate!\"\n [todayValue]=\"todayDate!\"\n (selectedValueChange)=\"dateSelected($event)\"\n ></tbody>\n</table>\n", dependencies: [{ kind: "component", type: KbqCalendarBody, selector: "[kbq-calendar-body]", inputs: ["rows", "todayValue", "selectedValue", "labelMinRequiredCells", "numCols", "activeCell", "cellAspectRatio"], outputs: ["selectedValueChange"], exportAs: ["kbqCalendarBody"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
430
438
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqMonthView, decorators: [{
|
|
432
440
|
type: Component,
|
|
433
441
|
args: [{ selector: 'kbq-month-view', imports: [
|
|
434
442
|
KbqCalendarBody
|
|
435
|
-
],
|
|
436
|
-
}], ctorParameters: () => [
|
|
437
|
-
type: Optional
|
|
438
|
-
}] }], propDecorators: { activeDate: [{
|
|
443
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'kbqMonthView', template: "<table class=\"kbq-calendar__table\">\n <thead class=\"kbq-calendar__table-header\">\n <tr>\n @for (day of weekdays; track day) {\n <th [attr.aria-label]=\"day.long\">\n {{ day.narrow }}\n </th>\n }\n </tr>\n <tr>\n <th colspan=\"7\" class=\"kbq-calendar__table-header-divider\"></th>\n </tr>\n </thead>\n <tbody\n kbq-calendar-body\n [activeCell]=\"adapter.getDate(activeDate) - 1\"\n [labelMinRequiredCells]=\"3\"\n [rows]=\"weeks\"\n [selectedValue]=\"selectedDate!\"\n [todayValue]=\"todayDate!\"\n (selectedValueChange)=\"dateSelected($event)\"\n ></tbody>\n</table>\n" }]
|
|
444
|
+
}], ctorParameters: () => [], propDecorators: { activeDate: [{
|
|
439
445
|
type: Input
|
|
440
446
|
}], selected: [{
|
|
441
447
|
type: Input
|
|
442
|
-
}], minDate: [{
|
|
443
|
-
type: Input
|
|
444
|
-
}], maxDate: [{
|
|
445
|
-
type: Input
|
|
446
|
-
}], dateFilter: [{
|
|
447
|
-
type: Input
|
|
448
|
-
}], dateClass: [{
|
|
449
|
-
type: Input
|
|
450
|
-
}], selectedChange: [{
|
|
451
|
-
type: Output
|
|
452
|
-
}], userSelection: [{
|
|
453
|
-
type: Output
|
|
454
|
-
}], activeDateChange: [{
|
|
455
|
-
type: Output
|
|
456
|
-
}], kbqCalendarBody: [{
|
|
457
|
-
type: ViewChild,
|
|
458
|
-
args: [KbqCalendarBody, { static: false }]
|
|
459
|
-
}] } });
|
|
448
|
+
}], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], dateClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateClass", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }], userSelection: [{ type: i0.Output, args: ["userSelection"] }], activeDateChange: [{ type: i0.Output, args: ["activeDateChange"] }], kbqCalendarBody: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqCalendarBody), { isSignal: true }] }] } });
|
|
460
449
|
|
|
461
450
|
/**
|
|
462
451
|
* A calendar that is used as part of the datepicker.
|
|
@@ -464,6 +453,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
464
453
|
*/
|
|
465
454
|
class KbqCalendar {
|
|
466
455
|
/** A date representing the period (month or year) to start the calendar in. */
|
|
456
|
+
// TODO: Skipped for migration because:
|
|
457
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
467
458
|
get startAt() {
|
|
468
459
|
return this._startAt;
|
|
469
460
|
}
|
|
@@ -473,6 +464,8 @@ class KbqCalendar {
|
|
|
473
464
|
deserializedValue !== null ? this.adapter.clampDate(deserializedValue, this.minDate, this.maxDate) : null;
|
|
474
465
|
}
|
|
475
466
|
/** The currently selected date. */
|
|
467
|
+
// TODO: Skipped for migration because:
|
|
468
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
476
469
|
get selected() {
|
|
477
470
|
return this._selected;
|
|
478
471
|
}
|
|
@@ -480,6 +473,8 @@ class KbqCalendar {
|
|
|
480
473
|
this._selected = this.adapter.deserialize(value);
|
|
481
474
|
}
|
|
482
475
|
/** The minimum selectable date. */
|
|
476
|
+
// TODO: Skipped for migration because:
|
|
477
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
483
478
|
get minDate() {
|
|
484
479
|
return this._minDate;
|
|
485
480
|
}
|
|
@@ -488,6 +483,8 @@ class KbqCalendar {
|
|
|
488
483
|
this.startAt = this._startAt;
|
|
489
484
|
}
|
|
490
485
|
/** The maximum selectable date. */
|
|
486
|
+
// TODO: Skipped for migration because:
|
|
487
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
491
488
|
get maxDate() {
|
|
492
489
|
return this._maxDate;
|
|
493
490
|
}
|
|
@@ -506,29 +503,37 @@ class KbqCalendar {
|
|
|
506
503
|
this._activeDate = this.adapter.clampDate(value || this.getActiveDateDefault(), this.minDate, this.maxDate);
|
|
507
504
|
this.stateChanges.next();
|
|
508
505
|
}
|
|
509
|
-
constructor(
|
|
510
|
-
this.adapter =
|
|
511
|
-
this.changeDetectorRef =
|
|
506
|
+
constructor() {
|
|
507
|
+
this.adapter = inject(DateAdapter, { optional: true });
|
|
508
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
509
|
+
/** Function used to filter which dates are selectable. */
|
|
510
|
+
this.dateFilter = input(undefined, ...(ngDevMode ? [{ debugName: "dateFilter" }] : []));
|
|
511
|
+
/** Function that can be used to add custom CSS classes to dates. */
|
|
512
|
+
this.dateClass = input(undefined, ...(ngDevMode ? [{ debugName: "dateClass" }] : []));
|
|
512
513
|
/** Emits when the currently selected date changes. */
|
|
513
|
-
this.selectedChange =
|
|
514
|
+
this.selectedChange = output();
|
|
514
515
|
/**
|
|
515
516
|
* Emits the year chosen in multiyear view.
|
|
516
517
|
* This doesn't imply a change on the selected date.
|
|
517
518
|
*/
|
|
518
|
-
this.yearSelected =
|
|
519
|
+
this.yearSelected = output();
|
|
519
520
|
/**
|
|
520
521
|
* Emits the month chosen in year view.
|
|
521
522
|
* This doesn't imply a change on the selected date.
|
|
522
523
|
*/
|
|
523
|
-
this.monthSelected =
|
|
524
|
+
this.monthSelected = output();
|
|
524
525
|
/** Emits when any date is selected. */
|
|
525
|
-
this.userSelection =
|
|
526
|
+
this.userSelection = output();
|
|
527
|
+
/** Reference to the current month view component. */
|
|
528
|
+
this.monthView = viewChild.required(KbqMonthView);
|
|
526
529
|
/**
|
|
527
530
|
* Emits whenever there is a state change that the header may need to respond to.
|
|
528
531
|
*/
|
|
529
532
|
this.stateChanges = new Subject();
|
|
530
533
|
/** Subscription to value changes in the associated input element. */
|
|
531
534
|
this.inputSubscription = Subscription.EMPTY;
|
|
535
|
+
const intl = inject(KbqDatepickerIntl);
|
|
536
|
+
const changeDetectorRef = this.changeDetectorRef;
|
|
532
537
|
if (!this.adapter) {
|
|
533
538
|
throw createMissingDateImplError('DateAdapter');
|
|
534
539
|
}
|
|
@@ -540,11 +545,12 @@ class KbqCalendar {
|
|
|
540
545
|
ngOnChanges(changes) {
|
|
541
546
|
const change = changes.minDate || changes.maxDate || changes.dateFilter;
|
|
542
547
|
if (change && !change.firstChange) {
|
|
543
|
-
|
|
548
|
+
const monthView = this.monthView();
|
|
549
|
+
if (monthView) {
|
|
544
550
|
// We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are
|
|
545
551
|
// passed down to the view via data bindings which won't be up-to-date when we call `init`.
|
|
546
552
|
this.changeDetectorRef.detectChanges();
|
|
547
|
-
|
|
553
|
+
monthView.init();
|
|
548
554
|
}
|
|
549
555
|
}
|
|
550
556
|
this.stateChanges.next();
|
|
@@ -568,14 +574,14 @@ class KbqCalendar {
|
|
|
568
574
|
this.datepickerInput = input;
|
|
569
575
|
this.inputSubscription = this.datepickerInput.valueChange.subscribe((value) => {
|
|
570
576
|
this.selected = value;
|
|
571
|
-
this.monthView?.init();
|
|
577
|
+
this.monthView()?.init();
|
|
572
578
|
this.activeDate = value;
|
|
573
579
|
});
|
|
574
580
|
}
|
|
575
581
|
/** Updates today's date after an update of the active date */
|
|
576
582
|
updateTodaysDate() {
|
|
577
583
|
// eslint-disable-next-line @angular-eslint/no-lifecycle-call
|
|
578
|
-
this.monthView.ngAfterContentInit();
|
|
584
|
+
this.monthView().ngAfterContentInit();
|
|
579
585
|
}
|
|
580
586
|
/** Handles date selection in the month view. */
|
|
581
587
|
dateSelected(date) {
|
|
@@ -584,6 +590,7 @@ class KbqCalendar {
|
|
|
584
590
|
}
|
|
585
591
|
}
|
|
586
592
|
userSelected() {
|
|
593
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
587
594
|
this.userSelection.emit();
|
|
588
595
|
}
|
|
589
596
|
/**
|
|
@@ -597,20 +604,18 @@ class KbqCalendar {
|
|
|
597
604
|
getActiveDateDefault() {
|
|
598
605
|
return this.startAt || this.adapter.today();
|
|
599
606
|
}
|
|
600
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
601
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
607
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
608
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: KbqCalendar, isStandalone: true, selector: "kbq-calendar", inputs: { startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange", yearSelected: "yearSelected", monthSelected: "monthSelected", userSelection: "userSelection" }, host: { classAttribute: "kbq-calendar" }, viewQueries: [{ propertyName: "monthView", first: true, predicate: KbqMonthView, descendants: true, isSignal: true }], exportAs: ["kbqCalendar"], usesOnChanges: true, ngImport: i0, template: "<kbq-calendar-header\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [(activeDate)]=\"activeDate\"\n (monthSelected)=\"monthSelected.emit(activeDate)\"\n (yearSelected)=\"yearSelected.emit(activeDate)\"\n/>\n\n<div class=\"kbq-calendar__content\">\n <kbq-month-view\n [dateClass]=\"dateClass()\"\n [dateFilter]=\"dateFilter()\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [selected]=\"selected\"\n [(activeDate)]=\"activeDate\"\n (selectedChange)=\"dateSelected($event!)\"\n (userSelection)=\"userSelected()\"\n />\n</div>\n", styles: [".kbq-calendar{display:block;box-sizing:initial}.kbq-calendar__content{padding-right:var(--kbq-datepicker-size-grid-padding-horizontal);padding-left:var(--kbq-datepicker-size-grid-padding-horizontal);outline:none}.kbq-calendar__table{border-spacing:0;border-collapse:collapse;width:100%}.kbq-calendar__table-header th{text-align:center;height:30px}.kbq-calendar__table-header th.kbq-calendar__table-header-divider{position:relative;box-sizing:border-box;height:var(--kbq-datepicker-size-grid-content-gap-vertical)}.kbq-calendar__table-header th.kbq-calendar__table-header-divider:after{content:\"\";position:absolute;top:0;left:calc(-1 * var(--kbq-datepicker-size-grid-padding-horizontal));right:calc(-1 * var(--kbq-datepicker-size-grid-padding-horizontal));height:var(--kbq-datepicker-size-grid-divider-height)}\n"], dependencies: [{ kind: "component", type: KbqCalendarHeader, selector: "kbq-calendar-header", inputs: ["activeDate", "maxDate", "minDate"], outputs: ["activeDateChange", "monthSelected", "yearSelected"], exportAs: ["kbqCalendarHeader"] }, { kind: "component", type: KbqMonthView, selector: "kbq-month-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "userSelection", "activeDateChange"], exportAs: ["kbqMonthView"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
602
609
|
}
|
|
603
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqCalendar, decorators: [{
|
|
604
611
|
type: Component,
|
|
605
612
|
args: [{ selector: 'kbq-calendar', imports: [
|
|
606
613
|
KbqCalendarHeader,
|
|
607
614
|
KbqMonthView
|
|
608
|
-
],
|
|
615
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
609
616
|
class: 'kbq-calendar'
|
|
610
|
-
}, template: "<kbq-calendar-header\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [(activeDate)]=\"activeDate\"\n (monthSelected)=\"monthSelected.emit(activeDate)\"\n (yearSelected)=\"yearSelected.emit(activeDate)\"\n/>\n\n<div class=\"kbq-calendar__content\">\n <kbq-month-view\n [dateClass]=\"dateClass\"\n [dateFilter]=\"dateFilter\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [selected]=\"selected\"\n [(activeDate)]=\"activeDate\"\n (selectedChange)=\"dateSelected($event!)\"\n (userSelection)=\"userSelected()\"\n />\n</div>\n", styles: [".kbq-calendar{display:block;box-sizing:initial}.kbq-calendar__content{padding-right:var(--kbq-datepicker-size-grid-padding-horizontal);padding-left:var(--kbq-datepicker-size-grid-padding-horizontal);outline:none}.kbq-calendar__table{border-spacing:0;border-collapse:collapse;width:100%}.kbq-calendar__table-header th{text-align:center;height:30px}.kbq-calendar__table-header th.kbq-calendar__table-header-divider{position:relative;box-sizing:border-box;height:var(--kbq-datepicker-size-grid-content-gap-vertical)}.kbq-calendar__table-header th.kbq-calendar__table-header-divider:after{content:\"\";position:absolute;top:0;left:calc(-1 * var(--kbq-datepicker-size-grid-padding-horizontal));right:calc(-1 * var(--kbq-datepicker-size-grid-padding-horizontal));height:var(--kbq-datepicker-size-grid-divider-height)}\n"] }]
|
|
611
|
-
}], ctorParameters: () => [
|
|
612
|
-
type: Optional
|
|
613
|
-
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { startAt: [{
|
|
617
|
+
}, exportAs: 'kbqCalendar', template: "<kbq-calendar-header\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [(activeDate)]=\"activeDate\"\n (monthSelected)=\"monthSelected.emit(activeDate)\"\n (yearSelected)=\"yearSelected.emit(activeDate)\"\n/>\n\n<div class=\"kbq-calendar__content\">\n <kbq-month-view\n [dateClass]=\"dateClass()\"\n [dateFilter]=\"dateFilter()\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [selected]=\"selected\"\n [(activeDate)]=\"activeDate\"\n (selectedChange)=\"dateSelected($event!)\"\n (userSelection)=\"userSelected()\"\n />\n</div>\n", styles: [".kbq-calendar{display:block;box-sizing:initial}.kbq-calendar__content{padding-right:var(--kbq-datepicker-size-grid-padding-horizontal);padding-left:var(--kbq-datepicker-size-grid-padding-horizontal);outline:none}.kbq-calendar__table{border-spacing:0;border-collapse:collapse;width:100%}.kbq-calendar__table-header th{text-align:center;height:30px}.kbq-calendar__table-header th.kbq-calendar__table-header-divider{position:relative;box-sizing:border-box;height:var(--kbq-datepicker-size-grid-content-gap-vertical)}.kbq-calendar__table-header th.kbq-calendar__table-header-divider:after{content:\"\";position:absolute;top:0;left:calc(-1 * var(--kbq-datepicker-size-grid-padding-horizontal));right:calc(-1 * var(--kbq-datepicker-size-grid-padding-horizontal));height:var(--kbq-datepicker-size-grid-divider-height)}\n"] }]
|
|
618
|
+
}], ctorParameters: () => [], propDecorators: { startAt: [{
|
|
614
619
|
type: Input
|
|
615
620
|
}], selected: [{
|
|
616
621
|
type: Input
|
|
@@ -618,22 +623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
618
623
|
type: Input
|
|
619
624
|
}], maxDate: [{
|
|
620
625
|
type: Input
|
|
621
|
-
}], dateFilter: [{
|
|
622
|
-
type: Input
|
|
623
|
-
}], dateClass: [{
|
|
624
|
-
type: Input
|
|
625
|
-
}], selectedChange: [{
|
|
626
|
-
type: Output
|
|
627
|
-
}], yearSelected: [{
|
|
628
|
-
type: Output
|
|
629
|
-
}], monthSelected: [{
|
|
630
|
-
type: Output
|
|
631
|
-
}], userSelection: [{
|
|
632
|
-
type: Output
|
|
633
|
-
}], monthView: [{
|
|
634
|
-
type: ViewChild,
|
|
635
|
-
args: [KbqMonthView, { static: false }]
|
|
636
|
-
}] } });
|
|
626
|
+
}], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], dateClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateClass", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }], yearSelected: [{ type: i0.Output, args: ["yearSelected"] }], monthSelected: [{ type: i0.Output, args: ["monthSelected"] }], userSelection: [{ type: i0.Output, args: ["userSelection"] }], monthView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqMonthView), { isSignal: true }] }] } });
|
|
637
627
|
|
|
638
628
|
/**
|
|
639
629
|
* Animations used by the Koobiq datepicker.
|
|
@@ -683,10 +673,12 @@ const KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
|
683
673
|
* @docs-private
|
|
684
674
|
*/
|
|
685
675
|
class KbqDatepickerContent {
|
|
686
|
-
constructor(
|
|
687
|
-
this.changeDetectorRef =
|
|
676
|
+
constructor() {
|
|
677
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
688
678
|
/** Emits when an animation has finished. */
|
|
689
679
|
this.animationDone = new Subject();
|
|
680
|
+
/** Reference to the internal calendar component. */
|
|
681
|
+
this.calendar = viewChild.required(KbqCalendar);
|
|
690
682
|
this.subscriptions = new Subscription();
|
|
691
683
|
}
|
|
692
684
|
ngAfterViewInit() {
|
|
@@ -702,34 +694,32 @@ class KbqDatepickerContent {
|
|
|
702
694
|
this.animationState = 'void';
|
|
703
695
|
this.changeDetectorRef.markForCheck();
|
|
704
696
|
}
|
|
705
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
706
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
697
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
698
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: KbqDatepickerContent, isStandalone: true, selector: "kbq-datepicker__content", host: { listeners: { "@transformPanel.done": "animationDone.next()" }, properties: { "@transformPanel": "animationState" }, classAttribute: "kbq-datepicker__content" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: KbqCalendar, descendants: true, isSignal: true }], exportAs: ["kbqDatepickerContent"], ngImport: i0, template: "<kbq-calendar\n [dateClass]=\"datepicker.dateClass()\"\n [dateFilter]=\"datepicker.dateFilter\"\n [id]=\"datepicker.id\"\n [maxDate]=\"datepicker.maxDate()\"\n [minDate]=\"datepicker.minDate()\"\n [class]=\"datepicker.panelClass()\"\n [selected]=\"datepicker.selected\"\n [startAt]=\"datepicker.startAt\"\n [@fadeInCalendar]=\"'enter'\"\n (monthSelected)=\"datepicker.selectMonth($event)\"\n (selectedChange)=\"datepicker.select($event)\"\n (userSelection)=\"datepicker.close()\"\n (yearSelected)=\"datepicker.selectYear($event)\"\n/>\n", styles: [".kbq-datepicker__content{display:block;border-radius:var(--kbq-datepicker-size-container-border-radius)}.kbq-datepicker__content .kbq-calendar{width:calc(280px + var(--kbq-datepicker-size-grid-padding-horizontal) * 2);height:270px;padding-top:var(--kbq-datepicker-size-container-padding-vertical);padding-bottom:var(--kbq-datepicker-size-container-padding-vertical)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}\n"], dependencies: [{ kind: "component", type: KbqCalendar, selector: "kbq-calendar", inputs: ["startAt", "selected", "minDate", "maxDate", "dateFilter", "dateClass"], outputs: ["selectedChange", "yearSelected", "monthSelected", "userSelection"], exportAs: ["kbqCalendar"] }], animations: [
|
|
707
699
|
kbqDatepickerAnimations.transformPanel,
|
|
708
700
|
kbqDatepickerAnimations.fadeInCalendar
|
|
709
701
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
710
702
|
}
|
|
711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerContent, decorators: [{
|
|
712
704
|
type: Component,
|
|
713
705
|
args: [{ selector: 'kbq-datepicker__content', imports: [
|
|
714
|
-
KbqCalendar
|
|
715
|
-
|
|
716
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'kbqDatepickerContent', host: {
|
|
706
|
+
KbqCalendar
|
|
707
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
717
708
|
class: 'kbq-datepicker__content',
|
|
718
709
|
'[@transformPanel]': 'animationState',
|
|
719
710
|
'(@transformPanel.done)': 'animationDone.next()'
|
|
720
711
|
}, animations: [
|
|
721
712
|
kbqDatepickerAnimations.transformPanel,
|
|
722
713
|
kbqDatepickerAnimations.fadeInCalendar
|
|
723
|
-
], template: "<kbq-calendar\n [dateClass]=\"datepicker.dateClass\"\n [dateFilter]=\"datepicker.dateFilter\"\n [id]=\"datepicker.id\"\n [maxDate]=\"datepicker.maxDate\"\n [minDate]=\"datepicker.minDate\"\n [
|
|
724
|
-
}],
|
|
725
|
-
type: ViewChild,
|
|
726
|
-
args: [KbqCalendar]
|
|
727
|
-
}] } });
|
|
714
|
+
], exportAs: 'kbqDatepickerContent', template: "<kbq-calendar\n [dateClass]=\"datepicker.dateClass()\"\n [dateFilter]=\"datepicker.dateFilter\"\n [id]=\"datepicker.id\"\n [maxDate]=\"datepicker.maxDate()\"\n [minDate]=\"datepicker.minDate()\"\n [class]=\"datepicker.panelClass()\"\n [selected]=\"datepicker.selected\"\n [startAt]=\"datepicker.startAt\"\n [@fadeInCalendar]=\"'enter'\"\n (monthSelected)=\"datepicker.selectMonth($event)\"\n (selectedChange)=\"datepicker.select($event)\"\n (userSelection)=\"datepicker.close()\"\n (yearSelected)=\"datepicker.selectYear($event)\"\n/>\n", styles: [".kbq-datepicker__content{display:block;border-radius:var(--kbq-datepicker-size-container-border-radius)}.kbq-datepicker__content .kbq-calendar{width:calc(280px + var(--kbq-datepicker-size-grid-padding-horizontal) * 2);height:270px;padding-top:var(--kbq-datepicker-size-container-padding-vertical);padding-bottom:var(--kbq-datepicker-size-container-padding-vertical)}.kbq-datepicker__content{background:var(--kbq-datepicker-container-background);box-shadow:var(--kbq-datepicker-container-shadow)}.kbq-calendar__table-header{color:var(--kbq-datepicker-header-text)}.kbq-calendar__table-header-divider:after{background:var(--kbq-datepicker-header-divider)}.kbq-calendar__body-cell-content{background:var(--kbq-datepicker-grid-cell-default-background);color:var(--kbq-datepicker-grid-cell-default-text)}.kbq-calendar__body-cell-content.kbq-calendar__body-today{background:var(--kbq-datepicker-grid-cell-today-background);color:var(--kbq-datepicker-grid-cell-today-text)}.kbq-calendar__body-cell-content:hover:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-hover-background)}.kbq-calendar__body-cell-content:active:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-active-background)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled){background:var(--kbq-datepicker-grid-cell-states-selected-background);color:var(--kbq-datepicker-grid-cell-states-selected-text)}.kbq-calendar__body-cell-content.kbq-selected:not(.kbq-disabled):hover{background:var(--kbq-datepicker-grid-cell-states-selected-hover-background)}.kbq-calendar__body-cell-content.kbq-disabled{color:var(--kbq-states-foreground-disabled);background:var(--kbq-datepicker-grid-cell-states-disabled-background)}.kbq-calendar,.kbq-calendar__table-header th{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-datepicker__content{--kbq-datepicker-size-container-padding-vertical: var(--kbq-size-m);--kbq-datepicker-size-container-border-radius: var(--kbq-size-s);--kbq-datepicker-size-header-padding-horizontal: var(--kbq-size-xxs);--kbq-datepicker-size-header-margin-bottom: var(--kbq-size-3xs);--kbq-datepicker-size-grid-padding-horizontal: var(--kbq-size-m);--kbq-datepicker-size-grid-content-gap-vertical: var(--kbq-size-3xs);--kbq-datepicker-size-grid-divider-height: 1px;--kbq-datepicker-size-grid-cell-padding-horizontal: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-padding-vertical: var(--kbq-size-s);--kbq-datepicker-size-grid-cell-border-radius: var(--kbq-size-s);--kbq-datepicker-container-background: var(--kbq-background-card);--kbq-datepicker-container-shadow: var(--kbq-shadow-popup);--kbq-datepicker-header-text: var(--kbq-foreground-contrast-tertiary);--kbq-datepicker-header-divider: var(--kbq-line-contrast-less);--kbq-datepicker-grid-cell-default-background: transparent;--kbq-datepicker-grid-cell-default-text: var(--kbq-foreground-contrast);--kbq-datepicker-grid-cell-today-background: transparent;--kbq-datepicker-grid-cell-today-text: var(--kbq-foreground-theme);--kbq-datepicker-grid-cell-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-datepicker-grid-cell-states-active-background: var(--kbq-states-background-transparent-active);--kbq-datepicker-grid-cell-states-selected-background: var(--kbq-background-contrast);--kbq-datepicker-grid-cell-states-selected-text: var(--kbq-foreground-on-contrast);--kbq-datepicker-grid-cell-states-selected-hover-background: var(--kbq-states-background-contrast-active);--kbq-datepicker-grid-cell-states-disabled-background: transparent;--kbq-datepicker-grid-cell-states-disabled-text: var(--kbq-states-foreground-disabled)}\n"] }]
|
|
715
|
+
}], propDecorators: { calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqCalendar), { isSignal: true }] }] } });
|
|
728
716
|
// TODO: We use a component instead of a directive here so the user can use implicit
|
|
729
717
|
// template reference variables (e.g. #d vs #d="kbqDatepicker"). We can change this to a directive
|
|
730
718
|
// if angular adds support for `exportAs: '$implicit'` on directives.
|
|
731
719
|
/** Component responsible for managing the datepicker popup/dialog. */
|
|
732
720
|
class KbqDatepicker {
|
|
721
|
+
// TODO: Skipped for migration because:
|
|
722
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
733
723
|
get hasBackdrop() {
|
|
734
724
|
return this._hasBackdrop;
|
|
735
725
|
}
|
|
@@ -737,6 +727,8 @@ class KbqDatepicker {
|
|
|
737
727
|
this._hasBackdrop = coerceBooleanProperty(value);
|
|
738
728
|
}
|
|
739
729
|
/** The date to open the calendar to initially. */
|
|
730
|
+
// TODO: Skipped for migration because:
|
|
731
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
740
732
|
get startAt() {
|
|
741
733
|
// If an explicit startAt is set we start there, otherwise we start at whatever the currently
|
|
742
734
|
// selected value is.
|
|
@@ -746,10 +738,12 @@ class KbqDatepicker {
|
|
|
746
738
|
const deserializedValue = this.dateAdapter.deserialize(value);
|
|
747
739
|
this._startAt =
|
|
748
740
|
deserializedValue !== null
|
|
749
|
-
? this.dateAdapter.clampDate(deserializedValue, this.minDate, this.maxDate)
|
|
741
|
+
? this.dateAdapter.clampDate(deserializedValue, this.minDate(), this.maxDate())
|
|
750
742
|
: null;
|
|
751
743
|
}
|
|
752
744
|
/** Whether the datepicker pop-up should be disabled. */
|
|
745
|
+
// TODO: Skipped for migration because:
|
|
746
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
753
747
|
get disabled() {
|
|
754
748
|
return this._disabled === undefined && this.datepickerInput ? this.datepickerInput.disabled : this._disabled;
|
|
755
749
|
}
|
|
@@ -761,11 +755,18 @@ class KbqDatepicker {
|
|
|
761
755
|
}
|
|
762
756
|
}
|
|
763
757
|
/** Whether the calendar is open. */
|
|
758
|
+
// TODO: Skipped for migration because:
|
|
759
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
764
760
|
get opened() {
|
|
765
761
|
return this._opened;
|
|
766
762
|
}
|
|
767
763
|
set opened(value) {
|
|
768
|
-
coerceBooleanProperty(value)
|
|
764
|
+
if (coerceBooleanProperty(value)) {
|
|
765
|
+
this.open();
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
this.close();
|
|
769
|
+
}
|
|
769
770
|
}
|
|
770
771
|
/** The currently selected date. */
|
|
771
772
|
get selected() {
|
|
@@ -780,30 +781,38 @@ class KbqDatepicker {
|
|
|
780
781
|
get value() {
|
|
781
782
|
return this.selected;
|
|
782
783
|
}
|
|
783
|
-
constructor(
|
|
784
|
-
this.overlay =
|
|
785
|
-
this.ngZone =
|
|
786
|
-
this.viewContainerRef =
|
|
787
|
-
this.dateAdapter =
|
|
788
|
-
this.dir =
|
|
784
|
+
constructor() {
|
|
785
|
+
this.overlay = inject(Overlay);
|
|
786
|
+
this.ngZone = inject(NgZone);
|
|
787
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
788
|
+
this.dateAdapter = inject(DateAdapter, { optional: true });
|
|
789
|
+
this.dir = inject(Directionality, { optional: true });
|
|
789
790
|
this.document = inject(DOCUMENT);
|
|
790
791
|
this._hasBackdrop = false;
|
|
791
792
|
this._opened = false;
|
|
793
|
+
/** The minimum selectable date. */
|
|
794
|
+
this.minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
795
|
+
/** The maximum selectable date. */
|
|
796
|
+
this.maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
792
797
|
/**
|
|
793
798
|
* Emits selected year in multiyear view.
|
|
794
799
|
* This doesn't imply a change on the selected date.
|
|
795
800
|
*/
|
|
796
|
-
this.yearSelected =
|
|
801
|
+
this.yearSelected = output();
|
|
797
802
|
/**
|
|
798
803
|
* Emits selected month in year view.
|
|
799
804
|
* This doesn't imply a change on the selected date.
|
|
800
805
|
*/
|
|
801
|
-
this.monthSelected =
|
|
802
|
-
|
|
806
|
+
this.monthSelected = output();
|
|
807
|
+
/** Classes to be passed to the date picker panel. Supports the same syntax as the `[class]` binding. */
|
|
808
|
+
this.panelClass = input(undefined, ...(ngDevMode ? [{ debugName: "panelClass" }] : []));
|
|
809
|
+
/** Function that can be used to add custom CSS classes to dates. */
|
|
810
|
+
this.dateClass = input(undefined, ...(ngDevMode ? [{ debugName: "dateClass" }] : []));
|
|
811
|
+
this.backdropClass = input('cdk-overlay-transparent-backdrop', ...(ngDevMode ? [{ debugName: "backdropClass" }] : []));
|
|
803
812
|
/** Emits when the datepicker has been opened. */
|
|
804
|
-
this.openedStream =
|
|
813
|
+
this.openedStream = output({ alias: 'opened' });
|
|
805
814
|
/** Emits when the datepicker has been closed. */
|
|
806
|
-
this.closedStream =
|
|
815
|
+
this.closedStream = output({ alias: 'closed' });
|
|
807
816
|
this.stateChanges = new Subject();
|
|
808
817
|
/** Emits when the datepicker is disabled. */
|
|
809
818
|
this.disabledChange = new Subject();
|
|
@@ -817,6 +826,7 @@ class KbqDatepicker {
|
|
|
817
826
|
/** Subscription to value changes in the associated input element. */
|
|
818
827
|
this.inputSubscription = Subscription.EMPTY;
|
|
819
828
|
this.closeSubscription = Subscription.EMPTY;
|
|
829
|
+
const scrollStrategy = inject(KBQ_DATEPICKER_SCROLL_STRATEGY);
|
|
820
830
|
if (!this.dateAdapter) {
|
|
821
831
|
throw createMissingDateImplError('DateAdapter');
|
|
822
832
|
}
|
|
@@ -857,8 +867,9 @@ class KbqDatepicker {
|
|
|
857
867
|
this.inputSubscription = this.datepickerInput.valueChange.subscribe((value) => {
|
|
858
868
|
this.selected = value;
|
|
859
869
|
if (this.popupComponentRef) {
|
|
860
|
-
this.popupComponentRef.instance.calendar
|
|
861
|
-
|
|
870
|
+
const calendar = this.popupComponentRef.instance.calendar();
|
|
871
|
+
calendar.monthView()?.init();
|
|
872
|
+
calendar.activeDate = value;
|
|
862
873
|
}
|
|
863
874
|
});
|
|
864
875
|
}
|
|
@@ -875,6 +886,7 @@ class KbqDatepicker {
|
|
|
875
886
|
}
|
|
876
887
|
this.openAsPopup();
|
|
877
888
|
this._opened = true;
|
|
889
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
878
890
|
this.openedStream.emit();
|
|
879
891
|
}
|
|
880
892
|
/** Close the calendar. */
|
|
@@ -891,6 +903,7 @@ class KbqDatepicker {
|
|
|
891
903
|
this.focusedElementBeforeOpen.focus();
|
|
892
904
|
}
|
|
893
905
|
this._opened = false;
|
|
906
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
894
907
|
this.closedStream.emit();
|
|
895
908
|
this.focusedElementBeforeOpen = null;
|
|
896
909
|
}
|
|
@@ -898,7 +911,12 @@ class KbqDatepicker {
|
|
|
898
911
|
if (this.datepickerInput.isReadOnly) {
|
|
899
912
|
return;
|
|
900
913
|
}
|
|
901
|
-
this._opened
|
|
914
|
+
if (this._opened) {
|
|
915
|
+
this.close();
|
|
916
|
+
}
|
|
917
|
+
else {
|
|
918
|
+
this.open();
|
|
919
|
+
}
|
|
902
920
|
}
|
|
903
921
|
/** Destroys the current overlay. */
|
|
904
922
|
destroyOverlay() {
|
|
@@ -930,7 +948,7 @@ class KbqDatepicker {
|
|
|
930
948
|
const overlayConfig = new OverlayConfig({
|
|
931
949
|
positionStrategy: this.createPopupPositionStrategy(),
|
|
932
950
|
hasBackdrop: this.hasBackdrop,
|
|
933
|
-
backdropClass: this.backdropClass,
|
|
951
|
+
backdropClass: this.backdropClass(),
|
|
934
952
|
direction: this.dir,
|
|
935
953
|
scrollStrategy: this.scrollStrategy(),
|
|
936
954
|
panelClass: 'kbq-datepicker__popup'
|
|
@@ -982,27 +1000,20 @@ class KbqDatepicker {
|
|
|
982
1000
|
}
|
|
983
1001
|
]);
|
|
984
1002
|
}
|
|
985
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
986
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1003
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1004
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: KbqDatepicker, isStandalone: true, selector: "kbq-datepicker", inputs: { hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: false, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null }, backdropClass: { classPropertyName: "backdropClass", publicName: "backdropClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { yearSelected: "yearSelected", monthSelected: "monthSelected", openedStream: "opened", closedStream: "closed" }, providers: [{ provide: KbqFormFieldControl, useExisting: KbqDatepicker }], exportAs: ["kbqDatepicker"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
987
1005
|
}
|
|
988
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1006
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepicker, decorators: [{
|
|
989
1007
|
type: Component,
|
|
990
1008
|
args: [{
|
|
991
1009
|
selector: 'kbq-datepicker',
|
|
992
1010
|
template: '',
|
|
993
|
-
|
|
1011
|
+
providers: [{ provide: KbqFormFieldControl, useExisting: KbqDatepicker }],
|
|
994
1012
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
995
|
-
|
|
996
|
-
|
|
1013
|
+
encapsulation: ViewEncapsulation.None,
|
|
1014
|
+
exportAs: 'kbqDatepicker'
|
|
997
1015
|
}]
|
|
998
|
-
}], ctorParameters: () => [
|
|
999
|
-
type: Inject,
|
|
1000
|
-
args: [KBQ_DATEPICKER_SCROLL_STRATEGY]
|
|
1001
|
-
}] }, { type: i1.DateAdapter, decorators: [{
|
|
1002
|
-
type: Optional
|
|
1003
|
-
}] }, { type: i3$1.Directionality, decorators: [{
|
|
1004
|
-
type: Optional
|
|
1005
|
-
}] }], propDecorators: { hasBackdrop: [{
|
|
1016
|
+
}], ctorParameters: () => [], propDecorators: { hasBackdrop: [{
|
|
1006
1017
|
type: Input
|
|
1007
1018
|
}], startAt: [{
|
|
1008
1019
|
type: Input
|
|
@@ -1010,27 +1021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1010
1021
|
type: Input
|
|
1011
1022
|
}], opened: [{
|
|
1012
1023
|
type: Input
|
|
1013
|
-
}], minDate: [{
|
|
1014
|
-
type: Input
|
|
1015
|
-
}], maxDate: [{
|
|
1016
|
-
type: Input
|
|
1017
|
-
}], yearSelected: [{
|
|
1018
|
-
type: Output
|
|
1019
|
-
}], monthSelected: [{
|
|
1020
|
-
type: Output
|
|
1021
|
-
}], panelClass: [{
|
|
1022
|
-
type: Input
|
|
1023
|
-
}], dateClass: [{
|
|
1024
|
-
type: Input
|
|
1025
|
-
}], backdropClass: [{
|
|
1026
|
-
type: Input
|
|
1027
|
-
}], openedStream: [{
|
|
1028
|
-
type: Output,
|
|
1029
|
-
args: ['opened']
|
|
1030
|
-
}], closedStream: [{
|
|
1031
|
-
type: Output,
|
|
1032
|
-
args: ['closed']
|
|
1033
|
-
}] } });
|
|
1024
|
+
}], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], yearSelected: [{ type: i0.Output, args: ["yearSelected"] }], monthSelected: [{ type: i0.Output, args: ["monthSelected"] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], dateClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateClass", required: false }] }], backdropClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClass", required: false }] }], openedStream: [{ type: i0.Output, args: ["opened"] }], closedStream: [{ type: i0.Output, args: ["closed"] }] } });
|
|
1034
1025
|
|
|
1035
1026
|
var DateParts;
|
|
1036
1027
|
(function (DateParts) {
|
|
@@ -1150,18 +1141,24 @@ let uniqueComponentIdSuffix = 0;
|
|
|
1150
1141
|
/** Directive used to connect an input to a KbqDatepicker. */
|
|
1151
1142
|
class KbqDatepickerInput {
|
|
1152
1143
|
/** Object used to control when error messages are shown. */
|
|
1144
|
+
// TODO: Skipped for migration because:
|
|
1145
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1153
1146
|
get errorStateMatcher() {
|
|
1154
1147
|
return this.errorStateTracker.errorStateMatcher;
|
|
1155
1148
|
}
|
|
1156
1149
|
set errorStateMatcher(value) {
|
|
1157
1150
|
this.errorStateTracker.errorStateMatcher = value;
|
|
1158
1151
|
}
|
|
1152
|
+
// TODO: Skipped for migration because:
|
|
1153
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1159
1154
|
get placeholder() {
|
|
1160
1155
|
return this._placeholder || this.configuration.placeholder;
|
|
1161
1156
|
}
|
|
1162
1157
|
set placeholder(value) {
|
|
1163
1158
|
this._placeholder = value;
|
|
1164
1159
|
}
|
|
1160
|
+
// TODO: Skipped for migration because:
|
|
1161
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1165
1162
|
get required() {
|
|
1166
1163
|
return this._required;
|
|
1167
1164
|
}
|
|
@@ -1169,6 +1166,8 @@ class KbqDatepickerInput {
|
|
|
1169
1166
|
this._required = coerceBooleanProperty(value);
|
|
1170
1167
|
}
|
|
1171
1168
|
/** The datepicker that this input is associated with. */
|
|
1169
|
+
// TODO: Skipped for migration because:
|
|
1170
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1172
1171
|
set kbqDatepicker(value) {
|
|
1173
1172
|
if (!value) {
|
|
1174
1173
|
return;
|
|
@@ -1185,6 +1184,8 @@ class KbqDatepickerInput {
|
|
|
1185
1184
|
});
|
|
1186
1185
|
}
|
|
1187
1186
|
/** The calendar that this input is associated with. */
|
|
1187
|
+
// TODO: Skipped for migration because:
|
|
1188
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1188
1189
|
set kbqCalendar(value) {
|
|
1189
1190
|
if (!value) {
|
|
1190
1191
|
return;
|
|
@@ -1193,11 +1194,15 @@ class KbqDatepickerInput {
|
|
|
1193
1194
|
this.calendar.registerInput(this);
|
|
1194
1195
|
}
|
|
1195
1196
|
/** Function that can be used to filter out dates within the datepicker. */
|
|
1197
|
+
// TODO: Skipped for migration because:
|
|
1198
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1196
1199
|
set kbqDatepickerFilter(value) {
|
|
1197
1200
|
this.dateFilter = value;
|
|
1198
1201
|
this.validatorOnChange();
|
|
1199
1202
|
}
|
|
1200
1203
|
/** The value of the input. */
|
|
1204
|
+
// TODO: Skipped for migration because:
|
|
1205
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1201
1206
|
get value() {
|
|
1202
1207
|
return this._value;
|
|
1203
1208
|
}
|
|
@@ -1213,6 +1218,8 @@ class KbqDatepickerInput {
|
|
|
1213
1218
|
}
|
|
1214
1219
|
}
|
|
1215
1220
|
/** The minimum valid date. */
|
|
1221
|
+
// TODO: Skipped for migration because:
|
|
1222
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1216
1223
|
get min() {
|
|
1217
1224
|
return this._min;
|
|
1218
1225
|
}
|
|
@@ -1221,6 +1228,8 @@ class KbqDatepickerInput {
|
|
|
1221
1228
|
this.validatorOnChange();
|
|
1222
1229
|
}
|
|
1223
1230
|
/** The maximum valid date. */
|
|
1231
|
+
// TODO: Skipped for migration because:
|
|
1232
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1224
1233
|
get max() {
|
|
1225
1234
|
return this._max;
|
|
1226
1235
|
}
|
|
@@ -1229,6 +1238,8 @@ class KbqDatepickerInput {
|
|
|
1229
1238
|
this.validatorOnChange();
|
|
1230
1239
|
}
|
|
1231
1240
|
/** Whether the datepicker-input is disabled. */
|
|
1241
|
+
// TODO: Skipped for migration because:
|
|
1242
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1232
1243
|
get disabled() {
|
|
1233
1244
|
return this._disabled;
|
|
1234
1245
|
}
|
|
@@ -1247,12 +1258,16 @@ class KbqDatepickerInput {
|
|
|
1247
1258
|
element.blur();
|
|
1248
1259
|
}
|
|
1249
1260
|
}
|
|
1261
|
+
// TODO: Skipped for migration because:
|
|
1262
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1250
1263
|
get id() {
|
|
1251
1264
|
return this._id;
|
|
1252
1265
|
}
|
|
1253
1266
|
set id(value) {
|
|
1254
1267
|
this._id = value || this.uid;
|
|
1255
1268
|
}
|
|
1269
|
+
// TODO: Skipped for migration because:
|
|
1270
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
1256
1271
|
set kbqValidationTooltip(tooltip) {
|
|
1257
1272
|
if (!tooltip) {
|
|
1258
1273
|
return;
|
|
@@ -1304,16 +1319,15 @@ class KbqDatepickerInput {
|
|
|
1304
1319
|
set selectionEnd(value) {
|
|
1305
1320
|
this.elementRef.nativeElement.selectionEnd = value;
|
|
1306
1321
|
}
|
|
1307
|
-
constructor(
|
|
1308
|
-
this.elementRef =
|
|
1309
|
-
this.renderer =
|
|
1310
|
-
this.adapter =
|
|
1311
|
-
this.dateFormats =
|
|
1322
|
+
constructor() {
|
|
1323
|
+
this.elementRef = inject(ElementRef);
|
|
1324
|
+
this.renderer = inject(Renderer2);
|
|
1325
|
+
this.adapter = inject(DateAdapter, { optional: true });
|
|
1326
|
+
this.dateFormats = inject(KBQ_DATE_FORMATS, { optional: true });
|
|
1312
1327
|
/** @docs-private */
|
|
1313
1328
|
this.formField = inject(KbqFormField, { optional: true, host: true });
|
|
1314
1329
|
/** @docs-private */
|
|
1315
1330
|
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
1316
|
-
this.useLegacyValidation = inject(KBQ_VALIDATION, { optional: true })?.useValidation ?? false;
|
|
1317
1331
|
/** @docs-private */
|
|
1318
1332
|
this.externalConfiguration = inject(KBQ_DATEPICKER_CONFIGURATION, { optional: true });
|
|
1319
1333
|
this.stateChanges = new Subject();
|
|
@@ -1324,11 +1338,11 @@ class KbqDatepickerInput {
|
|
|
1324
1338
|
/** Emits when the disabled state has changed */
|
|
1325
1339
|
this.disabledChange = new EventEmitter();
|
|
1326
1340
|
this._disabled = false;
|
|
1327
|
-
this.incorrectInput =
|
|
1341
|
+
this.incorrectInput = output();
|
|
1328
1342
|
/** Emits when a `change` event is fired on this `<input>`. */
|
|
1329
|
-
this.dateChange =
|
|
1343
|
+
this.dateChange = output();
|
|
1330
1344
|
/** Emits when an `input` event is fired on this `<input>`. */
|
|
1331
|
-
this.dateInput =
|
|
1345
|
+
this.dateInput = output();
|
|
1332
1346
|
this.uid = `kbq-datepicker-${uniqueComponentIdSuffix++}`;
|
|
1333
1347
|
this.datepickerSubscription = Subscription.EMPTY;
|
|
1334
1348
|
/** Whether the last value set on the input was valid. */
|
|
@@ -1511,6 +1525,7 @@ class KbqDatepickerInput {
|
|
|
1511
1525
|
const keyCode = event.keyCode;
|
|
1512
1526
|
if (this.isLetterKey(event)) {
|
|
1513
1527
|
event.preventDefault();
|
|
1528
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
1514
1529
|
this.incorrectInput.emit();
|
|
1515
1530
|
}
|
|
1516
1531
|
else if (this.isKeyForOpen(event)) {
|
|
@@ -1547,6 +1562,7 @@ class KbqDatepickerInput {
|
|
|
1547
1562
|
setTimeout(this.onInput);
|
|
1548
1563
|
}
|
|
1549
1564
|
else {
|
|
1565
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
1550
1566
|
this.incorrectInput.emit();
|
|
1551
1567
|
}
|
|
1552
1568
|
}
|
|
@@ -1565,10 +1581,6 @@ class KbqDatepickerInput {
|
|
|
1565
1581
|
this.parseOnBlur();
|
|
1566
1582
|
this.focusChanged(false);
|
|
1567
1583
|
this.onInput();
|
|
1568
|
-
if (this.useLegacyValidation && this.control) {
|
|
1569
|
-
this.control.updateValueAndValidity({ emitEvent: false });
|
|
1570
|
-
this.control.statusChanges.emit(this.control.status);
|
|
1571
|
-
}
|
|
1572
1584
|
}
|
|
1573
1585
|
onPaste($event) {
|
|
1574
1586
|
$event.preventDefault();
|
|
@@ -1578,6 +1590,7 @@ class KbqDatepickerInput {
|
|
|
1578
1590
|
}
|
|
1579
1591
|
rawValue.replace(/[^A-Za-z0-9]+/g, this.separator);
|
|
1580
1592
|
if (/[a-z]/gi.test(rawValue)) {
|
|
1593
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
1581
1594
|
this.incorrectInput.emit();
|
|
1582
1595
|
}
|
|
1583
1596
|
const match = rawValue.match(/^(?<first>\d+)\W(?<second>\d+)\W(?<third>\d+)$/);
|
|
@@ -1771,38 +1784,44 @@ class KbqDatepickerInput {
|
|
|
1771
1784
|
return this.adapter.getYear(date) === this.getMinYear();
|
|
1772
1785
|
}
|
|
1773
1786
|
getMaxDate(date) {
|
|
1774
|
-
|
|
1775
|
-
|
|
1787
|
+
const maxDate = this.datepicker?.maxDate();
|
|
1788
|
+
if (maxDate && this.isMaxYear(date) && this.isMaxMonth(date)) {
|
|
1789
|
+
return this.adapter.getDate(maxDate);
|
|
1776
1790
|
}
|
|
1777
1791
|
return this.adapter.getNumDaysInMonth(date);
|
|
1778
1792
|
}
|
|
1779
1793
|
getMinDate(date) {
|
|
1780
|
-
|
|
1781
|
-
|
|
1794
|
+
const minDate = this.datepicker?.minDate();
|
|
1795
|
+
if (minDate && this.isMinYear(date) && this.isMinMonth(date)) {
|
|
1796
|
+
return this.adapter.getDate(minDate);
|
|
1782
1797
|
}
|
|
1783
1798
|
return 1;
|
|
1784
1799
|
}
|
|
1785
1800
|
getMaxMonth(date) {
|
|
1786
|
-
|
|
1787
|
-
|
|
1801
|
+
const maxDate = this.datepicker?.maxDate();
|
|
1802
|
+
if (maxDate && this.isMaxYear(date)) {
|
|
1803
|
+
return this.adapter.getMonth(maxDate);
|
|
1788
1804
|
}
|
|
1789
1805
|
return 11;
|
|
1790
1806
|
}
|
|
1791
1807
|
getMinMonth(date) {
|
|
1792
|
-
|
|
1793
|
-
|
|
1808
|
+
const minDate = this.datepicker?.minDate();
|
|
1809
|
+
if (minDate && this.isMinYear(date)) {
|
|
1810
|
+
return this.adapter.getMonth(minDate);
|
|
1794
1811
|
}
|
|
1795
1812
|
return 0;
|
|
1796
1813
|
}
|
|
1797
1814
|
getMaxYear() {
|
|
1798
|
-
|
|
1799
|
-
|
|
1815
|
+
const maxDate = this.datepicker?.maxDate();
|
|
1816
|
+
if (maxDate) {
|
|
1817
|
+
return this.adapter.getYear(maxDate);
|
|
1800
1818
|
}
|
|
1801
1819
|
return MAX_YEAR;
|
|
1802
1820
|
}
|
|
1803
1821
|
getMinYear() {
|
|
1804
|
-
|
|
1805
|
-
|
|
1822
|
+
const minDate = this.datepicker?.minDate();
|
|
1823
|
+
if (minDate) {
|
|
1824
|
+
return this.adapter.getYear(minDate);
|
|
1806
1825
|
}
|
|
1807
1826
|
return 1;
|
|
1808
1827
|
}
|
|
@@ -2049,18 +2068,17 @@ class KbqDatepickerInput {
|
|
|
2049
2068
|
this.selectionStart = this.selectionStart - 1;
|
|
2050
2069
|
}
|
|
2051
2070
|
}
|
|
2052
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2053
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2071
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2072
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqDatepickerInput, isStandalone: true, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: { errorStateMatcher: "errorStateMatcher", placeholder: "placeholder", required: "required", kbqDatepicker: "kbqDatepicker", kbqCalendar: "kbqCalendar", kbqDatepickerFilter: "kbqDatepickerFilter", value: "value", min: "min", max: "max", disabled: "disabled", id: "id", kbqValidationTooltip: "kbqValidationTooltip" }, outputs: { incorrectInput: "incorrectInput", dateChange: "dateChange", dateInput: "dateInput" }, host: { listeners: { "paste": "onPaste($event)", "change": "onChange()", "focus": "focusChanged(true)", "blur": "onBlur()", "keydown": "onKeyDown($event)" }, properties: { "attr.placeholder": "placeholder", "attr.required": "required", "attr.disabled": "disabled || null", "attr.min": "min ? toISO8601(min) : null", "attr.max": "max ? toISO8601(max) : null", "attr.autocomplete": "\"off\"" }, classAttribute: "kbq-input kbq-datepicker" }, providers: [
|
|
2054
2073
|
KBQ_DATEPICKER_VALUE_ACCESSOR,
|
|
2055
2074
|
KBQ_DATEPICKER_VALIDATORS,
|
|
2056
2075
|
{ provide: KbqFormFieldControl, useExisting: KbqDatepickerInput }
|
|
2057
2076
|
], exportAs: ["kbqDatepickerInput"], ngImport: i0 }); }
|
|
2058
2077
|
}
|
|
2059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerInput, decorators: [{
|
|
2060
2079
|
type: Directive,
|
|
2061
2080
|
args: [{
|
|
2062
2081
|
selector: 'input[kbqDatepicker], input[kbqCalendar]',
|
|
2063
|
-
exportAs: 'kbqDatepickerInput',
|
|
2064
2082
|
providers: [
|
|
2065
2083
|
KBQ_DATEPICKER_VALUE_ACCESSOR,
|
|
2066
2084
|
KBQ_DATEPICKER_VALIDATORS,
|
|
@@ -2079,16 +2097,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2079
2097
|
'(focus)': 'focusChanged(true)',
|
|
2080
2098
|
'(blur)': 'onBlur()',
|
|
2081
2099
|
'(keydown)': 'onKeyDown($event)'
|
|
2082
|
-
}
|
|
2100
|
+
},
|
|
2101
|
+
exportAs: 'kbqDatepickerInput'
|
|
2083
2102
|
}]
|
|
2084
|
-
}], ctorParameters: () => [
|
|
2085
|
-
type: Optional
|
|
2086
|
-
}] }, { type: undefined, decorators: [{
|
|
2087
|
-
type: Optional
|
|
2088
|
-
}, {
|
|
2089
|
-
type: Inject,
|
|
2090
|
-
args: [KBQ_DATE_FORMATS]
|
|
2091
|
-
}] }], propDecorators: { errorStateMatcher: [{
|
|
2103
|
+
}], ctorParameters: () => [], propDecorators: { errorStateMatcher: [{
|
|
2092
2104
|
type: Input
|
|
2093
2105
|
}], placeholder: [{
|
|
2094
2106
|
type: Input
|
|
@@ -2112,20 +2124,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2112
2124
|
type: Input
|
|
2113
2125
|
}], kbqValidationTooltip: [{
|
|
2114
2126
|
type: Input
|
|
2115
|
-
}], incorrectInput: [{
|
|
2116
|
-
type: Output
|
|
2117
|
-
}], dateChange: [{
|
|
2118
|
-
type: Output
|
|
2119
|
-
}], dateInput: [{
|
|
2120
|
-
type: Output
|
|
2121
|
-
}] } });
|
|
2127
|
+
}], incorrectInput: [{ type: i0.Output, args: ["incorrectInput"] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }], dateInput: [{ type: i0.Output, args: ["dateInput"] }] } });
|
|
2122
2128
|
|
|
2123
2129
|
/** Can be used to override the icon of a `kbqDatepickerToggle`. */
|
|
2124
2130
|
class KbqDatepickerToggleIcon {
|
|
2125
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2126
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2131
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2132
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqDatepickerToggleIcon, isStandalone: true, selector: "[kbqDatepickerToggleIcon]", ngImport: i0 }); }
|
|
2127
2133
|
}
|
|
2128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerToggleIcon, decorators: [{
|
|
2129
2135
|
type: Directive,
|
|
2130
2136
|
args: [{
|
|
2131
2137
|
selector: '[kbqDatepickerToggleIcon]'
|
|
@@ -2134,13 +2140,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2134
2140
|
class KbqDatepickerToggleIconComponent {
|
|
2135
2141
|
constructor() {
|
|
2136
2142
|
this._disabled = false;
|
|
2143
|
+
/** Datepicker instance that the button will toggle. */
|
|
2144
|
+
this.datepicker = input(undefined, ...(ngDevMode ? [{ debugName: "datepicker", alias: 'for' }] : [{ alias: 'for' }]));
|
|
2137
2145
|
this.destroyRef = inject(DestroyRef);
|
|
2138
2146
|
this.cdr = inject(ChangeDetectorRef);
|
|
2139
2147
|
this.stateChangesSubscription = Subscription.EMPTY;
|
|
2140
2148
|
}
|
|
2141
2149
|
/** Whether the toggle button is disabled. */
|
|
2150
|
+
// TODO: Skipped for migration because:
|
|
2151
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
2142
2152
|
get disabled() {
|
|
2143
|
-
return this.datepicker.disabled || this._disabled;
|
|
2153
|
+
return this.datepicker().disabled || this._disabled;
|
|
2144
2154
|
}
|
|
2145
2155
|
set disabled(value) {
|
|
2146
2156
|
this._disabled = coerceBooleanProperty(value);
|
|
@@ -2158,34 +2168,36 @@ class KbqDatepickerToggleIconComponent {
|
|
|
2158
2168
|
}
|
|
2159
2169
|
/** Open datepicker */
|
|
2160
2170
|
open($event) {
|
|
2161
|
-
|
|
2162
|
-
|
|
2171
|
+
const datepicker = this.datepicker();
|
|
2172
|
+
if (datepicker && !this.disabled) {
|
|
2173
|
+
datepicker.open();
|
|
2163
2174
|
$event.stopPropagation();
|
|
2164
2175
|
}
|
|
2165
2176
|
}
|
|
2166
2177
|
watchStateChanges() {
|
|
2167
2178
|
this.stateChangesSubscription.unsubscribe();
|
|
2168
|
-
|
|
2179
|
+
const datepicker = this.datepicker();
|
|
2180
|
+
if (!datepicker)
|
|
2169
2181
|
return;
|
|
2170
|
-
this.stateChangesSubscription = merge(
|
|
2182
|
+
this.stateChangesSubscription = merge(datepicker.disabledChange, datepicker.datepickerInput.disabledChange, outputToObservable(datepicker.openedStream), outputToObservable(datepicker.closedStream))
|
|
2171
2183
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2172
2184
|
.subscribe(() => this.cdr.markForCheck());
|
|
2173
2185
|
}
|
|
2174
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2175
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2186
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerToggleIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2187
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: KbqDatepickerToggleIconComponent, isStandalone: true, selector: "kbq-datepicker-toggle-icon", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, datepicker: { classPropertyName: "datepicker", publicName: "for", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "open($event)" }, properties: { "attr.aria-expanded": "datepicker().opened", "attr.aria-disabled": "disabled" }, classAttribute: "kbq-datepicker-toggle-icon" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2176
2188
|
<ng-content select="[kbqDatepickerToggleIcon]">
|
|
2177
2189
|
<i
|
|
2178
2190
|
color="contrast-fade"
|
|
2179
2191
|
kbq-icon-button="kbq-calendar-o_16"
|
|
2180
2192
|
[tabindex]="-1"
|
|
2181
|
-
[class.kbq-active]="datepicker && datepicker.opened"
|
|
2193
|
+
[class.kbq-active]="datepicker() && datepicker().opened"
|
|
2182
2194
|
[disabled]="disabled"
|
|
2183
2195
|
[autoColor]="true"
|
|
2184
2196
|
></i>
|
|
2185
2197
|
</ng-content>
|
|
2186
|
-
`, isInline: true, styles: [".kbq-datepicker-toggle-icon{display:inline-flex;justify-content:center;align-items:center}.kbq-datepicker-toggle:focus{outline:0}.kbq-datepicker-toggle__button.kbq-button-icon{width:var(--kbq-datepicker-toggle-size-width);height:var(--kbq-datepicker-toggle-size-height);margin-left:2px}.kbq-form-field-appearance-legacy .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field-appearance-legacy .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{width:1em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-button-icon .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-button-icon .kbq-datepicker-toggle__default-icon{margin:auto}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type:
|
|
2198
|
+
`, isInline: true, styles: [".kbq-datepicker-toggle-icon{display:inline-flex;justify-content:center;align-items:center}.kbq-datepicker-toggle:focus{outline:0}.kbq-datepicker-toggle__button.kbq-button-icon{width:var(--kbq-datepicker-toggle-size-width);height:var(--kbq-datepicker-toggle-size-height);margin-left:2px}.kbq-form-field-appearance-legacy .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field-appearance-legacy .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{width:1em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-button-icon .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-button-icon .kbq-datepicker-toggle__default-icon{margin:auto}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["small", "kbq-icon-button", "tabindex", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2187
2199
|
}
|
|
2188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerToggleIconComponent, decorators: [{
|
|
2189
2201
|
type: Component,
|
|
2190
2202
|
args: [{ selector: 'kbq-datepicker-toggle-icon', imports: [KbqIconModule], template: `
|
|
2191
2203
|
<ng-content select="[kbqDatepickerToggleIcon]">
|
|
@@ -2193,108 +2205,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2193
2205
|
color="contrast-fade"
|
|
2194
2206
|
kbq-icon-button="kbq-calendar-o_16"
|
|
2195
2207
|
[tabindex]="-1"
|
|
2196
|
-
[class.kbq-active]="datepicker && datepicker.opened"
|
|
2208
|
+
[class.kbq-active]="datepicker() && datepicker().opened"
|
|
2197
2209
|
[disabled]="disabled"
|
|
2198
2210
|
[autoColor]="true"
|
|
2199
2211
|
></i>
|
|
2200
2212
|
</ng-content>
|
|
2201
|
-
`, host: {
|
|
2213
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2202
2214
|
class: 'kbq-datepicker-toggle-icon',
|
|
2203
|
-
'[attr.aria-expanded]': 'datepicker.opened',
|
|
2215
|
+
'[attr.aria-expanded]': 'datepicker().opened',
|
|
2204
2216
|
'[attr.aria-disabled]': 'disabled',
|
|
2205
2217
|
'(click)': 'open($event)'
|
|
2206
|
-
},
|
|
2218
|
+
}, styles: [".kbq-datepicker-toggle-icon{display:inline-flex;justify-content:center;align-items:center}.kbq-datepicker-toggle:focus{outline:0}.kbq-datepicker-toggle__button.kbq-button-icon{width:var(--kbq-datepicker-toggle-size-width);height:var(--kbq-datepicker-toggle-size-height);margin-left:2px}.kbq-form-field-appearance-legacy .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field-appearance-legacy .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{width:1em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-button-icon .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-button-icon .kbq-datepicker-toggle__default-icon{margin:auto}\n"] }]
|
|
2207
2219
|
}], propDecorators: { disabled: [{
|
|
2208
2220
|
type: Input
|
|
2209
|
-
}], datepicker: [{
|
|
2210
|
-
type: Input,
|
|
2211
|
-
args: ['for']
|
|
2212
|
-
}] } });
|
|
2213
|
-
/**
|
|
2214
|
-
* @deprecated Use `KbqDatepickerToggleIconComponent` instead
|
|
2215
|
-
*/
|
|
2216
|
-
class KbqDatepickerToggle {
|
|
2217
|
-
/** Whether the toggle button is disabled. */
|
|
2218
|
-
get disabled() {
|
|
2219
|
-
return this._disabled === undefined ? this.datepicker.disabled : this._disabled;
|
|
2220
|
-
}
|
|
2221
|
-
set disabled(value) {
|
|
2222
|
-
this._disabled = coerceBooleanProperty(value);
|
|
2223
|
-
}
|
|
2224
|
-
constructor(intl, changeDetectorRef) {
|
|
2225
|
-
this.intl = intl;
|
|
2226
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
2227
|
-
this.stateChanges = Subscription.EMPTY;
|
|
2228
|
-
}
|
|
2229
|
-
ngOnChanges(changes) {
|
|
2230
|
-
if (changes.datepicker) {
|
|
2231
|
-
this.watchStateChanges();
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
ngAfterContentInit() {
|
|
2235
|
-
this.watchStateChanges();
|
|
2236
|
-
}
|
|
2237
|
-
ngOnDestroy() {
|
|
2238
|
-
this.stateChanges.unsubscribe();
|
|
2239
|
-
}
|
|
2240
|
-
open(event) {
|
|
2241
|
-
if (this.datepicker && !this.disabled) {
|
|
2242
|
-
this.datepicker.open();
|
|
2243
|
-
event.stopPropagation();
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
watchStateChanges() {
|
|
2247
|
-
const datepickerDisabled = this.datepicker ? this.datepicker.disabledChange : of();
|
|
2248
|
-
const inputDisabled = this.datepicker && this.datepicker.datepickerInput
|
|
2249
|
-
? this.datepicker.datepickerInput.disabledChange
|
|
2250
|
-
: of();
|
|
2251
|
-
const datepickerToggled = this.datepicker
|
|
2252
|
-
? merge(this.datepicker.openedStream, this.datepicker.closedStream)
|
|
2253
|
-
: of();
|
|
2254
|
-
this.stateChanges.unsubscribe();
|
|
2255
|
-
this.stateChanges = merge(this.intl.changes, datepickerDisabled, inputDisabled, datepickerToggled).subscribe(() => this.changeDetectorRef.markForCheck());
|
|
2256
|
-
}
|
|
2257
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqDatepickerToggle, deps: [{ token: KbqDatepickerIntl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2258
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: KbqDatepickerToggle, isStandalone: true, selector: "kbq-datepicker-toggle", inputs: { disabled: "disabled", datepicker: ["for", "datepicker"], tabIndex: "tabIndex" }, host: { properties: { "class.kbq-active": "datepicker && datepicker.opened" }, classAttribute: "kbq-datepicker-toggle" }, queries: [{ propertyName: "customIcon", first: true, predicate: KbqDatepickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: "button", first: true, predicate: ["button"], descendants: true }], exportAs: ["kbqDatepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<!--todo need simplify this-->\n<button\n #button\n aria-haspopup=\"true\"\n kbq-button\n type=\"button\"\n class=\"kbq-datepicker-toggle__button\"\n [attr.aria-label]=\"intl.openCalendarLabel\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n (click)=\"open($event)\"\n>\n @if (!customIcon) {\n <i\n color=\"contrast-fade\"\n kbq-icon-button=\"kbq-calendar-o_16\"\n class=\"kbq-datepicker-toggle__default-icon\"\n [tabindex]=\"-1\"\n ></i>\n }\n\n <ng-content select=\"[kbqDatepickerToggleIcon]\" />\n</button>\n", styles: [".kbq-datepicker-toggle-icon{display:inline-flex;justify-content:center;align-items:center}.kbq-datepicker-toggle:focus{outline:0}.kbq-datepicker-toggle__button.kbq-button-icon{width:var(--kbq-datepicker-toggle-size-width);height:var(--kbq-datepicker-toggle-size-height);margin-left:2px}.kbq-form-field-appearance-legacy .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field-appearance-legacy .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{width:1em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-button-icon .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-button-icon .kbq-datepicker-toggle__default-icon{margin:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2259
|
-
}
|
|
2260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: KbqDatepickerToggle, decorators: [{
|
|
2261
|
-
type: Component,
|
|
2262
|
-
args: [{ selector: 'kbq-datepicker-toggle', host: {
|
|
2263
|
-
class: 'kbq-datepicker-toggle',
|
|
2264
|
-
'[class.kbq-active]': 'datepicker && datepicker.opened'
|
|
2265
|
-
}, exportAs: 'kbqDatepickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--todo need simplify this-->\n<button\n #button\n aria-haspopup=\"true\"\n kbq-button\n type=\"button\"\n class=\"kbq-datepicker-toggle__button\"\n [attr.aria-label]=\"intl.openCalendarLabel\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n (click)=\"open($event)\"\n>\n @if (!customIcon) {\n <i\n color=\"contrast-fade\"\n kbq-icon-button=\"kbq-calendar-o_16\"\n class=\"kbq-datepicker-toggle__default-icon\"\n [tabindex]=\"-1\"\n ></i>\n }\n\n <ng-content select=\"[kbqDatepickerToggleIcon]\" />\n</button>\n", styles: [".kbq-datepicker-toggle-icon{display:inline-flex;justify-content:center;align-items:center}.kbq-datepicker-toggle:focus{outline:0}.kbq-datepicker-toggle__button.kbq-button-icon{width:var(--kbq-datepicker-toggle-size-width);height:var(--kbq-datepicker-toggle-size-height);margin-left:2px}.kbq-form-field-appearance-legacy .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field-appearance-legacy .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{width:1em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-datepicker-toggle__default-icon{display:block;width:1.5em;height:1.5em}.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-prefix .kbq-button-icon .kbq-datepicker-toggle__default-icon,.kbq-form-field:not(.kbq-form-field-appearance-legacy) .kbq-form-field-suffix .kbq-button-icon .kbq-datepicker-toggle__default-icon{margin:auto}\n"] }]
|
|
2266
|
-
}], ctorParameters: () => [{ type: KbqDatepickerIntl }, { type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
|
|
2267
|
-
type: Input
|
|
2268
|
-
}], datepicker: [{
|
|
2269
|
-
type: Input,
|
|
2270
|
-
args: ['for']
|
|
2271
|
-
}], tabIndex: [{
|
|
2272
|
-
type: Input
|
|
2273
|
-
}], customIcon: [{
|
|
2274
|
-
type: ContentChild,
|
|
2275
|
-
args: [KbqDatepickerToggleIcon, { static: false }]
|
|
2276
|
-
}], button: [{
|
|
2277
|
-
type: ViewChild,
|
|
2278
|
-
args: ['button', { static: false }]
|
|
2279
|
-
}] } });
|
|
2221
|
+
}], datepicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }] } });
|
|
2280
2222
|
|
|
2281
2223
|
class KbqDatepickerModule {
|
|
2282
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2283
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2224
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2225
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerModule, imports: [KbqButtonModule,
|
|
2284
2226
|
OverlayModule,
|
|
2285
2227
|
A11yModule,
|
|
2286
2228
|
PortalModule,
|
|
2287
2229
|
KbqSelectModule,
|
|
2288
2230
|
KbqIconModule,
|
|
2289
2231
|
KbqDatepickerToggleIconComponent,
|
|
2290
|
-
NgClass,
|
|
2291
2232
|
TitleCasePipe,
|
|
2292
2233
|
KbqCalendar,
|
|
2293
2234
|
KbqCalendarBody,
|
|
2294
2235
|
KbqDatepicker,
|
|
2295
2236
|
KbqDatepickerContent,
|
|
2296
2237
|
KbqDatepickerInput,
|
|
2297
|
-
KbqDatepickerToggle,
|
|
2298
2238
|
KbqDatepickerToggleIcon,
|
|
2299
2239
|
KbqMonthView,
|
|
2300
2240
|
KbqCalendarHeader], exports: [KbqCalendar,
|
|
@@ -2302,13 +2242,12 @@ class KbqDatepickerModule {
|
|
|
2302
2242
|
KbqDatepicker,
|
|
2303
2243
|
KbqDatepickerContent,
|
|
2304
2244
|
KbqDatepickerInput,
|
|
2305
|
-
KbqDatepickerToggle,
|
|
2306
2245
|
KbqDatepickerToggleIcon,
|
|
2307
2246
|
KbqDatepickerToggleIconComponent,
|
|
2308
2247
|
KbqMonthView,
|
|
2309
2248
|
KbqCalendarHeader,
|
|
2310
2249
|
KbqFormFieldModule] }); }
|
|
2311
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2250
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerModule, providers: [
|
|
2312
2251
|
KbqDatepickerIntl,
|
|
2313
2252
|
KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
|
|
2314
2253
|
], imports: [KbqButtonModule,
|
|
@@ -2322,7 +2261,7 @@ class KbqDatepickerModule {
|
|
|
2322
2261
|
KbqDatepickerContent,
|
|
2323
2262
|
KbqCalendarHeader, KbqFormFieldModule] }); }
|
|
2324
2263
|
}
|
|
2325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDatepickerModule, decorators: [{
|
|
2326
2265
|
type: NgModule,
|
|
2327
2266
|
args: [{
|
|
2328
2267
|
imports: [
|
|
@@ -2333,34 +2272,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2333
2272
|
KbqSelectModule,
|
|
2334
2273
|
KbqIconModule,
|
|
2335
2274
|
KbqDatepickerToggleIconComponent,
|
|
2336
|
-
NgClass,
|
|
2337
2275
|
TitleCasePipe,
|
|
2338
2276
|
KbqCalendar,
|
|
2339
2277
|
KbqCalendarBody,
|
|
2340
2278
|
KbqDatepicker,
|
|
2341
2279
|
KbqDatepickerContent,
|
|
2342
2280
|
KbqDatepickerInput,
|
|
2343
|
-
KbqDatepickerToggle,
|
|
2344
2281
|
KbqDatepickerToggleIcon,
|
|
2345
2282
|
KbqMonthView,
|
|
2346
2283
|
KbqCalendarHeader
|
|
2347
2284
|
],
|
|
2285
|
+
providers: [
|
|
2286
|
+
KbqDatepickerIntl,
|
|
2287
|
+
KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
|
|
2288
|
+
],
|
|
2348
2289
|
exports: [
|
|
2349
2290
|
KbqCalendar,
|
|
2350
2291
|
KbqCalendarBody,
|
|
2351
2292
|
KbqDatepicker,
|
|
2352
2293
|
KbqDatepickerContent,
|
|
2353
2294
|
KbqDatepickerInput,
|
|
2354
|
-
KbqDatepickerToggle,
|
|
2355
2295
|
KbqDatepickerToggleIcon,
|
|
2356
2296
|
KbqDatepickerToggleIconComponent,
|
|
2357
2297
|
KbqMonthView,
|
|
2358
2298
|
KbqCalendarHeader,
|
|
2359
2299
|
KbqFormFieldModule
|
|
2360
|
-
],
|
|
2361
|
-
providers: [
|
|
2362
|
-
KbqDatepickerIntl,
|
|
2363
|
-
KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
|
|
2364
2300
|
]
|
|
2365
2301
|
}]
|
|
2366
2302
|
}] });
|
|
@@ -2369,5 +2305,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2369
2305
|
* Generated bundle index. Do not edit.
|
|
2370
2306
|
*/
|
|
2371
2307
|
|
|
2372
|
-
export { KBQ_DATEPICKER_CONFIGURATION, KBQ_DATEPICKER_DEFAULT_CONFIGURATION, KBQ_DATEPICKER_SCROLL_STRATEGY, KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY, KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, KBQ_DATEPICKER_VALIDATORS, KBQ_DATEPICKER_VALUE_ACCESSOR, KbqCalendar, KbqCalendarBody, KbqCalendarCell, KbqCalendarHeader, KbqDatepicker, KbqDatepickerContent, KbqDatepickerInput, KbqDatepickerInputEvent, KbqDatepickerIntl, KbqDatepickerModule,
|
|
2308
|
+
export { KBQ_DATEPICKER_CONFIGURATION, KBQ_DATEPICKER_DEFAULT_CONFIGURATION, KBQ_DATEPICKER_SCROLL_STRATEGY, KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY, KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, KBQ_DATEPICKER_VALIDATORS, KBQ_DATEPICKER_VALUE_ACCESSOR, KbqCalendar, KbqCalendarBody, KbqCalendarCell, KbqCalendarHeader, KbqDatepicker, KbqDatepickerContent, KbqDatepickerInput, KbqDatepickerInputEvent, KbqDatepickerIntl, KbqDatepickerModule, KbqDatepickerToggleIcon, KbqDatepickerToggleIconComponent, KbqMonthView, MAX_YEAR, kbqDatepickerAnimations };
|
|
2373
2309
|
//# sourceMappingURL=koobiq-components-datepicker.mjs.map
|