@koobiq/components 20.1.0 → 20.3.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/_accordion-theme.scss +6 -2
- package/accordion/accordion-tokens.scss +3 -0
- package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
- package/accordion/accordion.scss +71 -0
- package/accordion/index.d.ts +264 -121
- package/actions-panel/index.d.ts +25 -13
- package/alert/_alert-theme.scss +14 -0
- package/alert/alert.component.scss +24 -13
- package/alert/index.d.ts +63 -29
- package/app-switcher/app-switcher-dropdown-app.scss +7 -5
- package/app-switcher/app-switcher-dropdown-site.scss +6 -4
- package/app-switcher/index.d.ts +41 -4
- package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
- package/autocomplete/autocomplete.scss +2 -1
- package/autocomplete/index.d.ts +58 -37
- package/badge/index.d.ts +2 -3
- package/breadcrumbs/index.d.ts +1 -1
- package/button/index.d.ts +2 -2
- package/button-toggle/button-toggle-tokens.scss +2 -0
- package/button-toggle/button-toggle.scss +9 -0
- package/button-toggle/index.d.ts +5 -0
- package/checkbox/index.d.ts +33 -29
- package/clamped-text/index.d.ts +3 -2
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1217 -186
- package/core/option/_action-container-mixins.scss +28 -0
- package/core/option/_option-theme.scss +24 -0
- package/core/option/action.scss +7 -0
- package/core/styles/_core.scss +2 -0
- package/core/styles/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_animation.scss +31 -24
- package/core/styles/common/_connected-overlay.scss +39 -0
- package/core/styles/common/_select.scss +19 -2
- package/core/styles/common/_tokens.scss +0 -9
- package/core/styles/theming/_index.scss +0 -1
- package/core/styles/theming/_theming.scss +34 -5
- package/datepicker/index.d.ts +46 -15
- package/dl/dl.scss +26 -0
- package/dl/index.d.ts +8 -1
- package/dropdown/_dropdown-theme.scss +28 -2
- package/dropdown/dropdown-item.scss +29 -0
- package/dropdown/dropdown-tokens.scss +2 -1
- package/dropdown/dropdown.scss +16 -1
- package/dropdown/index.d.ts +331 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +480 -317
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +98 -58
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +18 -17
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +25 -25
- package/fesm2022/koobiq-components-checkbox.mjs +69 -92
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +56 -69
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +29 -29
- package/fesm2022/koobiq-components-core.mjs +2485 -735
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +168 -126
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +23 -15
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +814 -136
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +74 -42
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +7 -7
- package/fesm2022/koobiq-components-form-field.mjs +350 -162
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +52 -25
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +41 -24
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +8 -8
- package/fesm2022/koobiq-components-list.mjs +657 -143
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-markdown.mjs +14 -11
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +59 -35
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +177 -67
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +40 -24
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +31 -21
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +33 -14
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
- package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +450 -146
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +14 -14
- package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
- package/fesm2022/koobiq-components-skeleton.mjs +10 -10
- package/fesm2022/koobiq-components-split-button.mjs +10 -17
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +17 -17
- package/fesm2022/koobiq-components-table.mjs +15 -13
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +80 -68
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +283 -122
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +13 -8
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +29 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +61 -30
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +77 -42
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +51 -26
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +72 -64
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +219 -28
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +13 -13
- package/fesm2022/koobiq-components-tree-select.mjs +222 -80
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +302 -81
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +27 -27
- package/file-upload/index.d.ts +25 -6
- package/file-upload/multiple-file-upload.component.scss +14 -0
- package/filter-bar/_filter-bar-theme.scss +0 -10
- package/filter-bar/filter-bar-tokens.scss +3 -0
- package/filter-bar/filters.scss +3 -2
- package/filter-bar/index.d.ts +281 -9
- package/filter-bar/pipes/base-pipe.scss +0 -11
- package/filter-bar/pipes/pipe-input.scss +10 -0
- package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
- package/filter-bar/pipes/pipe-multiselect.scss +0 -6
- package/filter-bar/pipes/pipe-tree-select.scss +0 -6
- package/form-field/_form-field-theme.scss +76 -20
- package/form-field/fieldset.scss +10 -0
- package/form-field/form-field-tokens.scss +15 -1
- package/form-field/form-field.scss +15 -19
- package/form-field/index.d.ts +147 -65
- package/icon/icon-button.scss +3 -1
- package/icon/index.d.ts +45 -7
- package/inline-edit/index.d.ts +57 -4
- package/inline-edit/inline-edit.scss +10 -0
- package/input/index.d.ts +17 -2
- package/list/_list-theme.scss +42 -10
- package/list/index.d.ts +326 -79
- package/list/list-tokens.scss +43 -8
- package/list/list.scss +186 -12
- package/markdown/index.d.ts +1 -1
- package/modal/index.d.ts +21 -4
- package/modal/modal-tokens.scss +1 -1
- package/navbar/_navbar-item_vertical.scss +7 -5
- package/navbar/index.d.ts +54 -5
- package/navbar/navbar-brand.scss +23 -7
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/index.d.ts +2 -1
- package/notification-center/notification-item.scss +6 -0
- package/package.json +3 -6
- package/popover/index.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/resizer/index.d.ts +12 -0
- package/schematics/collection.json +10 -0
- package/schematics/migrations/alert-signals/README.md +64 -0
- package/schematics/migrations/alert-signals/data.js +70 -0
- package/schematics/migrations/alert-signals/index.js +350 -0
- package/schematics/migrations/alert-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
- package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
- package/schematics/migrations/deprecated-icons/README.md +29 -4
- package/schematics/migrations/deprecated-icons/data.js +7 -0
- package/schematics/migrations/deprecated-icons/index.js +62 -35
- package/schematics/migrations/filter-bar-signals/README.md +1 -1
- package/schematics/migrations/new-icons-pack/README.md +37 -2
- package/schematics/migrations/new-icons-pack/data.js +8 -0
- package/schematics/migrations/new-icons-pack/index.js +144 -53
- package/schematics/migrations.json +11 -1
- package/schematics/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +41 -14
- package/schematics/utils/ast.js +31 -0
- package/schematics/utils/icon-migration.js +530 -0
- package/schematics/utils/typescript.js +44 -0
- package/scrollbar/index.d.ts +1 -1
- package/search-expandable/index.d.ts +3 -0
- package/select/index.d.ts +212 -40
- package/select/select-tokens.scss +0 -1
- package/select/select.scss +0 -2
- package/splitter/index.d.ts +1 -1
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +2 -1
- package/table/table.scss +8 -0
- package/tabs/_tabs-common.scss +60 -31
- package/tabs/_tabs-theme.scss +12 -0
- package/tabs/index.d.ts +2 -2
- package/tabs/tab-header.scss +14 -0
- package/tabs/tab-nav-bar.scss +4 -0
- package/tabs/tabs-tokens.scss +1 -0
- package/tags/index.d.ts +128 -29
- package/textarea/index.d.ts +5 -0
- package/time-range/index.d.ts +1 -1
- package/timepicker/index.d.ts +4 -0
- package/timezone/index.d.ts +10 -8
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +119 -7
- package/tree/_tree-theme.scss +25 -5
- package/tree/index.d.ts +71 -3
- package/tree/tree-option.scss +2 -8
- package/tree-select/_tree-select-theme.scss +22 -0
- package/tree-select/index.d.ts +127 -36
- package/accordion/accordion.component.scss +0 -50
- package/core/styles/_tokens.kbq.import.scss +0 -4
- package/core/styles/theming/_components-theming.scss +0 -1927
- package/filter-bar/pipes/pipe-select.scss +0 -5
- package/overflow-items/overflow-items.scss +0 -20
|
@@ -4,22 +4,22 @@ import { TitleCasePipe, DOCUMENT } from '@angular/common';
|
|
|
4
4
|
import * as i1 from '@koobiq/components/button';
|
|
5
5
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
6
6
|
import * as i4 from '@koobiq/components/core';
|
|
7
|
-
import { DateAdapter, KbqOptionModule,
|
|
7
|
+
import { DateAdapter, KbqOptionModule, KbqDateTimezoneService, KBQ_CONNECTED_OVERLAY_BELOW_CLASS, KBQ_CONNECTED_OVERLAY_ABOVE_CLASS, 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, kbqRevealSelection, kbqSetSelectionRange, kbqSiblingPopupProvider } from '@koobiq/components/core';
|
|
8
8
|
import * as i2 from '@koobiq/components/icon';
|
|
9
9
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
10
10
|
import * as i3 from '@koobiq/components/select';
|
|
11
11
|
import { KbqSelectModule } from '@koobiq/components/select';
|
|
12
12
|
import { Subject, Subscription, merge } from 'rxjs';
|
|
13
|
-
import {
|
|
13
|
+
import { takeUntilDestroyed, toObservable, outputToObservable } from '@angular/core/rxjs-interop';
|
|
14
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
14
15
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
15
|
-
import { takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
|
|
16
16
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, FormGroupDirective, NgForm } from '@angular/forms';
|
|
17
|
-
import { KbqFormFieldControl,
|
|
17
|
+
import { KbqFormFieldControl, KBQ_FORM_FIELD, KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
18
18
|
import { Directionality } from '@angular/cdk/bidi';
|
|
19
19
|
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
20
20
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
21
21
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
22
|
-
import { take } from 'rxjs/operators';
|
|
22
|
+
import { take, filter, switchMap, map } from 'rxjs/operators';
|
|
23
23
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -90,16 +90,30 @@ class KbqCalendarBody {
|
|
|
90
90
|
}
|
|
91
91
|
return cellNumber === this.activeCell();
|
|
92
92
|
}
|
|
93
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
94
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
93
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCalendarBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", 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 }); }
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCalendarBody, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
98
|
args: [{ selector: '[kbq-calendar-body]', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
99
99
|
class: 'kbq-calendar__body'
|
|
100
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
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"] }] } });
|
|
102
102
|
|
|
103
|
+
/** @docs-private */
|
|
104
|
+
function createMissingDateImplError(provider) {
|
|
105
|
+
return Error(`KbqDatepicker: No provider found for ${provider}. You must import one of the existing ` +
|
|
106
|
+
`modules at your application root or provide a custom implementation or use exists ones.`);
|
|
107
|
+
}
|
|
108
|
+
/** Injects `DateAdapter`, naming the missing provider instead of letting DI throw a bare `NullInjectorError`. */
|
|
109
|
+
function injectRequiredDateAdapter() {
|
|
110
|
+
const adapter = inject(DateAdapter, { optional: true });
|
|
111
|
+
if (!adapter) {
|
|
112
|
+
throw createMissingDateImplError('DateAdapter');
|
|
113
|
+
}
|
|
114
|
+
return adapter;
|
|
115
|
+
}
|
|
116
|
+
|
|
103
117
|
const defaultMinYear = 1900;
|
|
104
118
|
const defaultMaxYear = 2099;
|
|
105
119
|
/** Default header for KbqCalendar */
|
|
@@ -149,7 +163,7 @@ class KbqCalendarHeader {
|
|
|
149
163
|
return this.compareDate(this.activeDate, this.maxDate) >= 0;
|
|
150
164
|
}
|
|
151
165
|
constructor() {
|
|
152
|
-
this.adapter =
|
|
166
|
+
this.adapter = injectRequiredDateAdapter();
|
|
153
167
|
this.years = [];
|
|
154
168
|
this._maxDate = this.adapter.createDate(defaultMaxYear, 11);
|
|
155
169
|
this._minDate = this.adapter.createDate(defaultMinYear, 1);
|
|
@@ -239,10 +253,10 @@ class KbqCalendarHeader {
|
|
|
239
253
|
this.monthNames.forEach((month) => (month.disabled = false));
|
|
240
254
|
}
|
|
241
255
|
}
|
|
242
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
243
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
256
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCalendarHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
257
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", 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", "selectAllToggle", "selectAll", "selectAllHandler", "panelWidth", "panelMinWidth", "panelMaxWidth", "panelMaxHeight", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "beforeOpened", "opened", "closed", "selectionChange", "onSelectAll", "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 }); }
|
|
244
258
|
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCalendarHeader, decorators: [{
|
|
246
260
|
type: Component,
|
|
247
261
|
args: [{ selector: 'kbq-calendar-header', imports: [
|
|
248
262
|
TitleCasePipe,
|
|
@@ -261,12 +275,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
261
275
|
type: Input
|
|
262
276
|
}], activeDateChange: [{ type: i0.Output, args: ["activeDateChange"] }], monthSelected: [{ type: i0.Output, args: ["monthSelected"] }], yearSelected: [{ type: i0.Output, args: ["yearSelected"] }] } });
|
|
263
277
|
|
|
264
|
-
/** @docs-private */
|
|
265
|
-
function createMissingDateImplError(provider) {
|
|
266
|
-
return Error(`KbqDatepicker: No provider found for ${provider}. You must import one of the existing ` +
|
|
267
|
-
`modules at your application root or provide a custom implementation or use exists ones.`);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
278
|
/** Datepicker data that requires internationalization. */
|
|
271
279
|
class KbqDatepickerIntl {
|
|
272
280
|
constructor() {
|
|
@@ -296,10 +304,10 @@ class KbqDatepickerIntl {
|
|
|
296
304
|
/** A label for the 'switch to year view' button (used by screen readers). */
|
|
297
305
|
this.switchToMultiYearViewLabel = 'Choose month and year';
|
|
298
306
|
}
|
|
299
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
300
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
307
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
308
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerIntl, providedIn: 'root' }); }
|
|
301
309
|
}
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerIntl, decorators: [{
|
|
303
311
|
type: Injectable,
|
|
304
312
|
args: [{ providedIn: 'root' }]
|
|
305
313
|
}] });
|
|
@@ -337,7 +345,8 @@ class KbqMonthView {
|
|
|
337
345
|
}
|
|
338
346
|
constructor() {
|
|
339
347
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
340
|
-
this.
|
|
348
|
+
this.timezoneService = inject(KbqDateTimezoneService);
|
|
349
|
+
this.adapter = injectRequiredDateAdapter();
|
|
341
350
|
/** The minimum selectable date. */
|
|
342
351
|
this.minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
343
352
|
/** The maximum selectable date. */
|
|
@@ -354,9 +363,6 @@ class KbqMonthView {
|
|
|
354
363
|
this.activeDateChange = output();
|
|
355
364
|
/** The body of calendar table */
|
|
356
365
|
this.kbqCalendarBody = viewChild.required(KbqCalendarBody);
|
|
357
|
-
if (!this.adapter) {
|
|
358
|
-
throw createMissingDateImplError('DateAdapter');
|
|
359
|
-
}
|
|
360
366
|
const firstDayOfWeek = this.adapter.getFirstDayOfWeek();
|
|
361
367
|
const narrowWeekdays = this.adapter.getDayOfWeekNames('short');
|
|
362
368
|
const longWeekdays = this.adapter.getDayOfWeekNames('long');
|
|
@@ -366,6 +372,12 @@ class KbqMonthView {
|
|
|
366
372
|
});
|
|
367
373
|
this.weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
|
|
368
374
|
this._activeDate = this.adapter.today();
|
|
375
|
+
this.timezoneService.changes.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
376
|
+
// `todayDate` and the cell dates are resolved once, in `init()`, against the zone that was
|
|
377
|
+
// active then; a new one can move which cell is today.
|
|
378
|
+
this.init();
|
|
379
|
+
this.changeDetectorRef.markForCheck();
|
|
380
|
+
});
|
|
369
381
|
}
|
|
370
382
|
ngAfterContentInit() {
|
|
371
383
|
this.init();
|
|
@@ -433,10 +445,10 @@ class KbqMonthView {
|
|
|
433
445
|
this.adapter.getMonth(d1) === this.adapter.getMonth(d2) &&
|
|
434
446
|
this.adapter.getYear(d1) === this.adapter.getYear(d2));
|
|
435
447
|
}
|
|
436
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
437
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
448
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMonthView, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
449
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", 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 }); }
|
|
438
450
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMonthView, decorators: [{
|
|
440
452
|
type: Component,
|
|
441
453
|
args: [{ selector: 'kbq-month-view', imports: [
|
|
442
454
|
KbqCalendarBody
|
|
@@ -504,7 +516,7 @@ class KbqCalendar {
|
|
|
504
516
|
this.stateChanges.next();
|
|
505
517
|
}
|
|
506
518
|
constructor() {
|
|
507
|
-
this.adapter =
|
|
519
|
+
this.adapter = injectRequiredDateAdapter();
|
|
508
520
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
509
521
|
/** Function used to filter which dates are selectable. */
|
|
510
522
|
this.dateFilter = input(undefined, ...(ngDevMode ? [{ debugName: "dateFilter" }] : []));
|
|
@@ -534,9 +546,6 @@ class KbqCalendar {
|
|
|
534
546
|
this.inputSubscription = Subscription.EMPTY;
|
|
535
547
|
const intl = inject(KbqDatepickerIntl);
|
|
536
548
|
const changeDetectorRef = this.changeDetectorRef;
|
|
537
|
-
if (!this.adapter) {
|
|
538
|
-
throw createMissingDateImplError('DateAdapter');
|
|
539
|
-
}
|
|
540
549
|
this.intlChanges = intl.changes.subscribe(() => {
|
|
541
550
|
changeDetectorRef.markForCheck();
|
|
542
551
|
this.stateChanges.next();
|
|
@@ -604,10 +613,10 @@ class KbqCalendar {
|
|
|
604
613
|
getActiveDateDefault() {
|
|
605
614
|
return this.startAt || this.adapter.today();
|
|
606
615
|
}
|
|
607
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
608
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.
|
|
616
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
617
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.30", 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 }); }
|
|
609
618
|
}
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCalendar, decorators: [{
|
|
611
620
|
type: Component,
|
|
612
621
|
args: [{ selector: 'kbq-calendar', imports: [
|
|
613
622
|
KbqCalendarHeader,
|
|
@@ -653,8 +662,14 @@ const kbqDatepickerAnimations = {
|
|
|
653
662
|
|
|
654
663
|
/** Used to generate a unique ID for each datepicker instance. */
|
|
655
664
|
let datepickerUid = 0;
|
|
656
|
-
/**
|
|
657
|
-
|
|
665
|
+
/**
|
|
666
|
+
* Injection token that determines the scroll handling while the calendar is open. The root default keeps the
|
|
667
|
+
* datepicker usable outside `KbqDatepickerModule`'s injector; providing the token anywhere still wins over it.
|
|
668
|
+
*/
|
|
669
|
+
const KBQ_DATEPICKER_SCROLL_STRATEGY = new InjectionToken('kbq-datepicker-scroll-strategy', {
|
|
670
|
+
providedIn: 'root',
|
|
671
|
+
factory: () => KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY(inject(Overlay))
|
|
672
|
+
});
|
|
658
673
|
/** @docs-private */
|
|
659
674
|
function KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {
|
|
660
675
|
return () => overlay.scrollStrategies.reposition();
|
|
@@ -694,13 +709,13 @@ class KbqDatepickerContent {
|
|
|
694
709
|
this.animationState = 'void';
|
|
695
710
|
this.changeDetectorRef.markForCheck();
|
|
696
711
|
}
|
|
697
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
698
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.
|
|
712
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
713
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.30", 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-datepicker-grid-cell-states-disabled-text);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: [
|
|
699
714
|
kbqDatepickerAnimations.transformPanel,
|
|
700
715
|
kbqDatepickerAnimations.fadeInCalendar
|
|
701
716
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
702
717
|
}
|
|
703
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerContent, decorators: [{
|
|
704
719
|
type: Component,
|
|
705
720
|
args: [{ selector: 'kbq-datepicker__content', imports: [
|
|
706
721
|
KbqCalendar
|
|
@@ -785,7 +800,7 @@ class KbqDatepicker {
|
|
|
785
800
|
this.overlay = inject(Overlay);
|
|
786
801
|
this.ngZone = inject(NgZone);
|
|
787
802
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
788
|
-
this.dateAdapter =
|
|
803
|
+
this.dateAdapter = injectRequiredDateAdapter();
|
|
789
804
|
this.dir = inject(Directionality, { optional: true });
|
|
790
805
|
this.document = inject(DOCUMENT);
|
|
791
806
|
this._hasBackdrop = false;
|
|
@@ -826,11 +841,7 @@ class KbqDatepicker {
|
|
|
826
841
|
/** Subscription to value changes in the associated input element. */
|
|
827
842
|
this.inputSubscription = Subscription.EMPTY;
|
|
828
843
|
this.closeSubscription = Subscription.EMPTY;
|
|
829
|
-
|
|
830
|
-
if (!this.dateAdapter) {
|
|
831
|
-
throw createMissingDateImplError('DateAdapter');
|
|
832
|
-
}
|
|
833
|
-
this.scrollStrategy = scrollStrategy;
|
|
844
|
+
this.scrollStrategy = inject(KBQ_DATEPICKER_SCROLL_STRATEGY);
|
|
834
845
|
}
|
|
835
846
|
ngOnDestroy() {
|
|
836
847
|
this.close();
|
|
@@ -964,11 +975,14 @@ class KbqDatepicker {
|
|
|
964
975
|
}
|
|
965
976
|
/** Create the popup PositionStrategy. */
|
|
966
977
|
createPopupPositionStrategy() {
|
|
967
|
-
return this.overlay
|
|
978
|
+
return (this.overlay
|
|
968
979
|
.position()
|
|
969
980
|
.flexibleConnectedTo(this.datepickerInput.getOrigin())
|
|
970
981
|
.withTransformOriginOn('.kbq-datepicker__content')
|
|
971
982
|
.withFlexibleDimensions(false)
|
|
983
|
+
// Also large enough to absorb the trigger↔panel gap padding (kbq-connected-overlay-gap,
|
|
984
|
+
// defaultOffsetY = 4) that CDK's viewport-fit check can't see, since that padding is applied
|
|
985
|
+
// via panelClass after the fit decision is made.
|
|
972
986
|
.withViewportMargin(8)
|
|
973
987
|
.withLockedPosition()
|
|
974
988
|
.withPositions([
|
|
@@ -977,14 +991,14 @@ class KbqDatepicker {
|
|
|
977
991
|
originY: 'bottom',
|
|
978
992
|
overlayX: 'start',
|
|
979
993
|
overlayY: 'top',
|
|
980
|
-
|
|
994
|
+
panelClass: KBQ_CONNECTED_OVERLAY_BELOW_CLASS
|
|
981
995
|
},
|
|
982
996
|
{
|
|
983
997
|
originX: 'start',
|
|
984
998
|
originY: 'top',
|
|
985
999
|
overlayX: 'start',
|
|
986
1000
|
overlayY: 'bottom',
|
|
987
|
-
|
|
1001
|
+
panelClass: KBQ_CONNECTED_OVERLAY_ABOVE_CLASS
|
|
988
1002
|
},
|
|
989
1003
|
{
|
|
990
1004
|
originX: 'end',
|
|
@@ -998,12 +1012,12 @@ class KbqDatepicker {
|
|
|
998
1012
|
overlayX: 'end',
|
|
999
1013
|
overlayY: 'bottom'
|
|
1000
1014
|
}
|
|
1001
|
-
]);
|
|
1015
|
+
]));
|
|
1002
1016
|
}
|
|
1003
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1004
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
1017
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepicker, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1018
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.30", 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 }); }
|
|
1005
1019
|
}
|
|
1006
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1020
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepicker, decorators: [{
|
|
1007
1021
|
type: Component,
|
|
1008
1022
|
args: [{
|
|
1009
1023
|
selector: 'kbq-datepicker',
|
|
@@ -1217,24 +1231,40 @@ class KbqDatepickerInput {
|
|
|
1217
1231
|
this.valueChange.emit(newValue);
|
|
1218
1232
|
}
|
|
1219
1233
|
}
|
|
1220
|
-
/**
|
|
1234
|
+
/**
|
|
1235
|
+
* The minimum valid date. Drives validation only — including dates typed or pasted into the
|
|
1236
|
+
* input — and reports `kbqDatepickerMin`. The calendar is restricted separately, by `minDate`
|
|
1237
|
+
* on the associated `<kbq-datepicker>`.
|
|
1238
|
+
*
|
|
1239
|
+
* Compared down to the millisecond, not by calendar day: the input keeps the time part of the
|
|
1240
|
+
* value it parses, and the comparison is made on wall-clock components rather than on absolute
|
|
1241
|
+
* time.
|
|
1242
|
+
*/
|
|
1221
1243
|
// TODO: Skipped for migration because:
|
|
1222
1244
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
1223
1245
|
get min() {
|
|
1224
1246
|
return this._min;
|
|
1225
1247
|
}
|
|
1226
1248
|
set min(value) {
|
|
1227
|
-
this._min = this.adapter.deserialize(value);
|
|
1249
|
+
this._min = this.getValidDateOrNull(this.adapter.deserialize(value));
|
|
1228
1250
|
this.validatorOnChange();
|
|
1229
1251
|
}
|
|
1230
|
-
/**
|
|
1252
|
+
/**
|
|
1253
|
+
* The maximum valid date. Drives validation only — including dates typed or pasted into the
|
|
1254
|
+
* input — and reports `kbqDatepickerMax`. The calendar is restricted separately, by `maxDate`
|
|
1255
|
+
* on the associated `<kbq-datepicker>`.
|
|
1256
|
+
*
|
|
1257
|
+
* Compared down to the millisecond, not by calendar day: the input keeps the time part of the
|
|
1258
|
+
* value it parses, so an upper bound meant to include its whole day has to be the end of that
|
|
1259
|
+
* day.
|
|
1260
|
+
*/
|
|
1231
1261
|
// TODO: Skipped for migration because:
|
|
1232
1262
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
1233
1263
|
get max() {
|
|
1234
1264
|
return this._max;
|
|
1235
1265
|
}
|
|
1236
1266
|
set max(value) {
|
|
1237
|
-
this._max = this.adapter.deserialize(value);
|
|
1267
|
+
this._max = this.getValidDateOrNull(this.adapter.deserialize(value));
|
|
1238
1268
|
this.validatorOnChange();
|
|
1239
1269
|
}
|
|
1240
1270
|
/** Whether the datepicker-input is disabled. */
|
|
@@ -1310,22 +1340,17 @@ class KbqDatepickerInput {
|
|
|
1310
1340
|
get selectionStart() {
|
|
1311
1341
|
return this.elementRef.nativeElement.selectionStart;
|
|
1312
1342
|
}
|
|
1313
|
-
set selectionStart(value) {
|
|
1314
|
-
this.elementRef.nativeElement.selectionStart = value;
|
|
1315
|
-
}
|
|
1316
1343
|
get selectionEnd() {
|
|
1317
1344
|
return this.elementRef.nativeElement.selectionEnd;
|
|
1318
1345
|
}
|
|
1319
|
-
set selectionEnd(value) {
|
|
1320
|
-
this.elementRef.nativeElement.selectionEnd = value;
|
|
1321
|
-
}
|
|
1322
1346
|
constructor() {
|
|
1323
1347
|
this.elementRef = inject(ElementRef);
|
|
1324
1348
|
this.renderer = inject(Renderer2);
|
|
1325
|
-
this.adapter =
|
|
1349
|
+
this.adapter = injectRequiredDateAdapter();
|
|
1350
|
+
this.timezoneService = inject(KbqDateTimezoneService);
|
|
1326
1351
|
this.dateFormats = inject(KBQ_DATE_FORMATS, { optional: true });
|
|
1327
1352
|
/** @docs-private */
|
|
1328
|
-
this.formField = inject(
|
|
1353
|
+
this.formField = inject(KBQ_FORM_FIELD, { optional: true, host: true });
|
|
1329
1354
|
/** @docs-private */
|
|
1330
1355
|
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
1331
1356
|
/** @docs-private */
|
|
@@ -1352,7 +1377,7 @@ class KbqDatepickerInput {
|
|
|
1352
1377
|
this.thirdDigit = null;
|
|
1353
1378
|
this.onTouched = () => { };
|
|
1354
1379
|
this.onInput = () => {
|
|
1355
|
-
this.
|
|
1380
|
+
const cursorPosition = this.correctedCursorPosition();
|
|
1356
1381
|
const formattedValue = this.replaceSymbols(this.viewValue);
|
|
1357
1382
|
const newTimeObj = this.getDateFromString(formattedValue);
|
|
1358
1383
|
this.lastValueValid = !!newTimeObj;
|
|
@@ -1362,12 +1387,12 @@ class KbqDatepickerInput {
|
|
|
1362
1387
|
this.updateValue(newTimeObj);
|
|
1363
1388
|
}
|
|
1364
1389
|
else {
|
|
1365
|
-
this.control
|
|
1390
|
+
this.control?.updateValueAndValidity();
|
|
1366
1391
|
}
|
|
1367
1392
|
return;
|
|
1368
1393
|
}
|
|
1369
1394
|
this.setViewValue(this.getTimeStringFromDate(newTimeObj, this.dateInputFormat), true);
|
|
1370
|
-
this.selectNextDigitByCursor(
|
|
1395
|
+
this.selectNextDigitByCursor(cursorPosition);
|
|
1371
1396
|
this.updateValue(newTimeObj);
|
|
1372
1397
|
};
|
|
1373
1398
|
this.parseOnBlur = () => {
|
|
@@ -1383,7 +1408,7 @@ class KbqDatepickerInput {
|
|
|
1383
1408
|
if (viewDigits.length !== 3) {
|
|
1384
1409
|
this.lastValueValid = false;
|
|
1385
1410
|
this._value = null;
|
|
1386
|
-
return setTimeout(() => this.control
|
|
1411
|
+
return setTimeout(() => this.control?.updateValueAndValidity());
|
|
1387
1412
|
}
|
|
1388
1413
|
date[this.firstDigit.fullName] = this.firstDigit.parse(firsViewDigit);
|
|
1389
1414
|
date[this.secondDigit.fullName] = this.secondDigit.parse(secondViewDigit);
|
|
@@ -1395,14 +1420,14 @@ class KbqDatepickerInput {
|
|
|
1395
1420
|
else if (viewDigitWithYear.length < digitWithYear.length) {
|
|
1396
1421
|
this.lastValueValid = false;
|
|
1397
1422
|
this._value = null;
|
|
1398
|
-
return setTimeout(() => this.control
|
|
1423
|
+
return setTimeout(() => this.control?.updateValueAndValidity());
|
|
1399
1424
|
}
|
|
1400
1425
|
const newTimeObj = this.createDateTime(date);
|
|
1401
1426
|
if (!newTimeObj) {
|
|
1402
1427
|
this.lastValueValid = false;
|
|
1403
1428
|
this._value = null;
|
|
1404
1429
|
this.cvaOnChange(null);
|
|
1405
|
-
return setTimeout(() => this.control
|
|
1430
|
+
return setTimeout(() => this.control?.updateValueAndValidity());
|
|
1406
1431
|
}
|
|
1407
1432
|
/* Check if the number of days entered does not match the entered month */
|
|
1408
1433
|
if (!this.getValidDateOrNull(newTimeObj)) {
|
|
@@ -1427,14 +1452,16 @@ class KbqDatepickerInput {
|
|
|
1427
1452
|
};
|
|
1428
1453
|
/** The form control validator for the min date. */
|
|
1429
1454
|
this.minValidator = (control) => {
|
|
1430
|
-
|
|
1455
|
+
// An unparseable value compares as NaN against any bound, which fails both `<= 0` and
|
|
1456
|
+
// `>= 0` and would report the value as simultaneously too early and too late.
|
|
1457
|
+
const controlValue = this.getValidDateOrNull(this.adapter.deserialize(control.value));
|
|
1431
1458
|
return !this.min || !controlValue || this.adapter.compareDateTime(this.min, controlValue) <= 0
|
|
1432
1459
|
? null
|
|
1433
1460
|
: { kbqDatepickerMin: { min: this.min, actual: controlValue } };
|
|
1434
1461
|
};
|
|
1435
1462
|
/** The form control validator for the max date. */
|
|
1436
1463
|
this.maxValidator = (control) => {
|
|
1437
|
-
const controlValue = this.adapter.deserialize(control.value);
|
|
1464
|
+
const controlValue = this.getValidDateOrNull(this.adapter.deserialize(control.value));
|
|
1438
1465
|
return !this.max || !controlValue || this.adapter.compareDateTime(this.max, controlValue) >= 0
|
|
1439
1466
|
? null
|
|
1440
1467
|
: { kbqDatepickerMax: { max: this.max, actual: controlValue } };
|
|
@@ -1452,9 +1479,6 @@ class KbqDatepickerInput {
|
|
|
1452
1479
|
this.maxValidator,
|
|
1453
1480
|
this.filterValidator
|
|
1454
1481
|
]);
|
|
1455
|
-
if (!this.adapter) {
|
|
1456
|
-
throw createMissingDateImplError('DateAdapter');
|
|
1457
|
-
}
|
|
1458
1482
|
this.errorStateTracker = new KbqErrorStateTracker(inject(ErrorStateMatcher),
|
|
1459
1483
|
// update ngControl later, so it will be initialized
|
|
1460
1484
|
null, inject(FormGroupDirective, { optional: true }), inject(NgForm, { optional: true }), this.stateChanges);
|
|
@@ -1463,6 +1487,11 @@ class KbqDatepickerInput {
|
|
|
1463
1487
|
if (!this.localeService) {
|
|
1464
1488
|
this.initDefaultParams();
|
|
1465
1489
|
}
|
|
1490
|
+
this.timezoneService.changes.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
1491
|
+
// The rendered text names a wall clock in the zone it was formatted in. Left as it is, the
|
|
1492
|
+
// next keystroke re-parses it against the new zone and emits a different instant.
|
|
1493
|
+
this.value = this.value;
|
|
1494
|
+
});
|
|
1466
1495
|
}
|
|
1467
1496
|
ngDoCheck() {
|
|
1468
1497
|
if (this.ngControl) {
|
|
@@ -1635,9 +1664,11 @@ class KbqDatepickerInput {
|
|
|
1635
1664
|
this.configuration = this.externalConfiguration || KBQ_DATEPICKER_DEFAULT_CONFIGURATION;
|
|
1636
1665
|
}
|
|
1637
1666
|
setFormat(format) {
|
|
1638
|
-
//
|
|
1639
|
-
//
|
|
1640
|
-
|
|
1667
|
+
// `[a-zA-Z]`, not `[aA-zZ]`: the latter reads as `a`, the range `A-z` and `Z`, and that range
|
|
1668
|
+
// takes in the six characters ASCII puts between the two alphabets — opening bracket,
|
|
1669
|
+
// backslash, closing bracket, caret, underscore and backtick. A format escaping a literal in
|
|
1670
|
+
// brackets could therefore have had that bracket counted as part of a placeholder.
|
|
1671
|
+
this.separator = format.match(/[a-zA-Z]+(?<separator>\W|\D)[a-zA-Z]+/).groups.separator;
|
|
1641
1672
|
this.separatorPositions = format
|
|
1642
1673
|
.split('')
|
|
1643
1674
|
.reduce((acc, item, index) => (this.separator === item ? [...acc, index + 1] : acc), []);
|
|
@@ -1669,30 +1700,36 @@ class KbqDatepickerInput {
|
|
|
1669
1700
|
}
|
|
1670
1701
|
spaceKeyHandler(event) {
|
|
1671
1702
|
event.preventDefault();
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
this.selectNextDigit(this.selectionStart, true);
|
|
1703
|
+
const position = this.selectionStart;
|
|
1704
|
+
// Right after a separator the digit group is empty, so a space cannot stand in for one:
|
|
1705
|
+
// advance instead of inserting a character the value can never be parsed with.
|
|
1706
|
+
if (this.selectionStart !== this.selectionEnd || this.separatorPositions.includes(position)) {
|
|
1707
|
+
this.selectNextDigit(position, true);
|
|
1708
|
+
return;
|
|
1679
1709
|
}
|
|
1710
|
+
this.setViewValue(this.getNewValue(event.key, position));
|
|
1711
|
+
setTimeout(this.onInput);
|
|
1680
1712
|
}
|
|
1681
1713
|
getNewValue(key, position) {
|
|
1682
1714
|
return [this.viewValue.slice(0, position), key, this.viewValue.slice(position)].join('');
|
|
1683
1715
|
}
|
|
1684
1716
|
setViewValue(value, savePosition = false) {
|
|
1717
|
+
const element = this.elementRef.nativeElement;
|
|
1718
|
+
const selectionStart = this.selectionStart ?? 0;
|
|
1719
|
+
const selectionEnd = this.selectionEnd ?? 0;
|
|
1720
|
+
this.renderer.setProperty(element, 'value', value);
|
|
1685
1721
|
if (savePosition) {
|
|
1686
|
-
|
|
1687
|
-
const selectionEnd = this.selectionEnd;
|
|
1688
|
-
this.renderer.setProperty(this.elementRef.nativeElement, 'value', value);
|
|
1689
|
-
this.selectionStart = selectionStart;
|
|
1690
|
-
this.selectionEnd = selectionEnd;
|
|
1722
|
+
this.setSelection(selectionStart, selectionEnd);
|
|
1691
1723
|
}
|
|
1692
1724
|
else {
|
|
1693
|
-
|
|
1725
|
+
// A paste, a model write or a calendar pick replaces the whole value, and the offset the
|
|
1726
|
+
// previous one was left at has to go with it.
|
|
1727
|
+
kbqRevealSelection(element);
|
|
1694
1728
|
}
|
|
1695
1729
|
}
|
|
1730
|
+
setSelection(start, end) {
|
|
1731
|
+
kbqSetSelectionRange(this.elementRef.nativeElement, start, end);
|
|
1732
|
+
}
|
|
1696
1733
|
replaceSymbols(value) {
|
|
1697
1734
|
return value
|
|
1698
1735
|
.split(this.separator)
|
|
@@ -1937,8 +1974,7 @@ class KbqDatepickerInput {
|
|
|
1937
1974
|
changedTime = this.decrementDate(this.value, modifiedTimePart);
|
|
1938
1975
|
}
|
|
1939
1976
|
this.value = changedTime;
|
|
1940
|
-
this.selectionStart
|
|
1941
|
-
this.selectionEnd = selectionEnd;
|
|
1977
|
+
this.setSelection(selectionStart, selectionEnd);
|
|
1942
1978
|
this.cvaOnChange(changedTime);
|
|
1943
1979
|
this.onChange();
|
|
1944
1980
|
this.stateChanges.next();
|
|
@@ -1980,16 +2016,14 @@ class KbqDatepickerInput {
|
|
|
1980
2016
|
selectDigitByCursor(cursorPos) {
|
|
1981
2017
|
setTimeout(() => {
|
|
1982
2018
|
const [, selectionStart, selectionEnd] = this.getDateEditMetrics(cursorPos);
|
|
1983
|
-
this.selectionStart
|
|
1984
|
-
this.selectionEnd = selectionEnd;
|
|
2019
|
+
this.setSelection(selectionStart, selectionEnd);
|
|
1985
2020
|
});
|
|
1986
2021
|
}
|
|
1987
2022
|
selectNextDigitByCursor(cursorPos) {
|
|
1988
2023
|
setTimeout(() => {
|
|
1989
2024
|
const [, , endPositionOfCurrentDigit] = this.getDateEditMetrics(cursorPos);
|
|
1990
2025
|
const [, selectionStart, selectionEnd] = this.getDateEditMetrics(endPositionOfCurrentDigit + 1);
|
|
1991
|
-
this.selectionStart
|
|
1992
|
-
this.selectionEnd = selectionEnd;
|
|
2026
|
+
this.setSelection(selectionStart, selectionEnd);
|
|
1993
2027
|
});
|
|
1994
2028
|
}
|
|
1995
2029
|
selectNextDigit(cursorPos, cycle = false) {
|
|
@@ -1998,8 +2032,7 @@ class KbqDatepickerInput {
|
|
|
1998
2032
|
const nextSeparatorPos = this.viewValue.indexOf(this.separator, cursorPos);
|
|
1999
2033
|
const newCursorPos = nextSeparatorPos > 0 ? nextSeparatorPos + 1 : lastValue;
|
|
2000
2034
|
const [, selectionStart, selectionEnd] = this.getDateEditMetrics(newCursorPos);
|
|
2001
|
-
this.selectionStart
|
|
2002
|
-
this.selectionEnd = selectionEnd;
|
|
2035
|
+
this.setSelection(selectionStart, selectionEnd);
|
|
2003
2036
|
});
|
|
2004
2037
|
}
|
|
2005
2038
|
/** Checks whether the input is invalid based on the native validation. */
|
|
@@ -2063,19 +2096,21 @@ class KbqDatepickerInput {
|
|
|
2063
2096
|
}
|
|
2064
2097
|
return this.adapter.createDateTime(value.year, value.month - 1, value.date, value.hours, value.minutes, value.seconds, value.milliseconds);
|
|
2065
2098
|
}
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2099
|
+
// The position to advance from, with a caret that landed just past a separator pulled back onto
|
|
2100
|
+
// the digit before it. Returned rather than applied to the field: on the paths where the value
|
|
2101
|
+
// cannot be parsed, a moved caret would survive into the next keystroke and change what it does.
|
|
2102
|
+
correctedCursorPosition() {
|
|
2103
|
+
const position = this.selectionStart ?? 0;
|
|
2104
|
+
return this.separatorPositions.includes(position) ? position - 1 : position;
|
|
2070
2105
|
}
|
|
2071
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2072
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
2106
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2107
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", 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: [
|
|
2073
2108
|
KBQ_DATEPICKER_VALUE_ACCESSOR,
|
|
2074
2109
|
KBQ_DATEPICKER_VALIDATORS,
|
|
2075
2110
|
{ provide: KbqFormFieldControl, useExisting: KbqDatepickerInput }
|
|
2076
2111
|
], exportAs: ["kbqDatepickerInput"], ngImport: i0 }); }
|
|
2077
2112
|
}
|
|
2078
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerInput, decorators: [{
|
|
2079
2114
|
type: Directive,
|
|
2080
2115
|
args: [{
|
|
2081
2116
|
selector: 'input[kbqDatepicker], input[kbqCalendar]',
|
|
@@ -2128,10 +2163,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2128
2163
|
|
|
2129
2164
|
/** Can be used to override the icon of a `kbqDatepickerToggle`. */
|
|
2130
2165
|
class KbqDatepickerToggleIcon {
|
|
2131
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2132
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
2166
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2167
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqDatepickerToggleIcon, isStandalone: true, selector: "[kbqDatepickerToggleIcon]", ngImport: i0 }); }
|
|
2133
2168
|
}
|
|
2134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerToggleIcon, decorators: [{
|
|
2135
2170
|
type: Directive,
|
|
2136
2171
|
args: [{
|
|
2137
2172
|
selector: '[kbqDatepickerToggleIcon]'
|
|
@@ -2142,6 +2177,15 @@ class KbqDatepickerToggleIconComponent {
|
|
|
2142
2177
|
this._disabled = false;
|
|
2143
2178
|
/** Datepicker instance that the button will toggle. */
|
|
2144
2179
|
this.datepicker = input(undefined, ...(ngDevMode ? [{ debugName: "datepicker", alias: 'for' }] : [{ alias: 'for' }]));
|
|
2180
|
+
/**
|
|
2181
|
+
* Emits `true` when the calendar opens and `false` when it closes. Part of the `KbqSiblingPopup`
|
|
2182
|
+
* contract.
|
|
2183
|
+
*
|
|
2184
|
+
* Built on top of the `datepicker` signal rather than read once, because the instance is bound after the
|
|
2185
|
+
* consumers of this stream (a tooltip on the same element subscribes in its constructor) and may be
|
|
2186
|
+
* swapped later — the same reason `watchStateChanges` is re-run from `ngOnChanges`.
|
|
2187
|
+
*/
|
|
2188
|
+
this.openedChange = toObservable(this.datepicker).pipe(filter(Boolean), switchMap((datepicker) => merge(outputToObservable(datepicker.openedStream).pipe(map(() => true)), outputToObservable(datepicker.closedStream).pipe(map(() => false)))));
|
|
2145
2189
|
this.destroyRef = inject(DestroyRef);
|
|
2146
2190
|
this.cdr = inject(ChangeDetectorRef);
|
|
2147
2191
|
this.stateChangesSubscription = Subscription.EMPTY;
|
|
@@ -2155,6 +2199,10 @@ class KbqDatepickerToggleIconComponent {
|
|
|
2155
2199
|
set disabled(value) {
|
|
2156
2200
|
this._disabled = coerceBooleanProperty(value);
|
|
2157
2201
|
}
|
|
2202
|
+
/** Whether the calendar is currently on screen. Part of the `KbqSiblingPopup` contract. */
|
|
2203
|
+
get isAttached() {
|
|
2204
|
+
return !!this.datepicker()?.opened;
|
|
2205
|
+
}
|
|
2158
2206
|
ngOnChanges(changes) {
|
|
2159
2207
|
if (changes.datepicker && !changes.datepicker.firstChange) {
|
|
2160
2208
|
this.watchStateChanges();
|
|
@@ -2183,8 +2231,8 @@ class KbqDatepickerToggleIconComponent {
|
|
|
2183
2231
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2184
2232
|
.subscribe(() => this.cdr.markForCheck());
|
|
2185
2233
|
}
|
|
2186
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2187
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
2234
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerToggleIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2235
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.30", 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" }, providers: [kbqSiblingPopupProvider(KbqDatepickerToggleIconComponent)], usesOnChanges: true, ngImport: i0, template: `
|
|
2188
2236
|
<ng-content select="[kbqDatepickerToggleIcon]">
|
|
2189
2237
|
<i
|
|
2190
2238
|
color="contrast-fade"
|
|
@@ -2195,9 +2243,9 @@ class KbqDatepickerToggleIconComponent {
|
|
|
2195
2243
|
[autoColor]="true"
|
|
2196
2244
|
></i>
|
|
2197
2245
|
</ng-content>
|
|
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, var(--kbq-size-3xl));height:var(--kbq-datepicker-toggle-size-height, var(--kbq-size-3xl));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 }); }
|
|
2246
|
+
`, 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, var(--kbq-size-3xl));height:var(--kbq-datepicker-toggle-size-height, var(--kbq-size-3xl));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: ["size", "small", "kbq-icon-button", "tabindex", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2199
2247
|
}
|
|
2200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerToggleIconComponent, decorators: [{
|
|
2201
2249
|
type: Component,
|
|
2202
2250
|
args: [{ selector: 'kbq-datepicker-toggle-icon', imports: [KbqIconModule], template: `
|
|
2203
2251
|
<ng-content select="[kbqDatepickerToggleIcon]">
|
|
@@ -2210,7 +2258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2210
2258
|
[autoColor]="true"
|
|
2211
2259
|
></i>
|
|
2212
2260
|
</ng-content>
|
|
2213
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2261
|
+
`, providers: [kbqSiblingPopupProvider(KbqDatepickerToggleIconComponent)], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2214
2262
|
class: 'kbq-datepicker-toggle-icon',
|
|
2215
2263
|
'[attr.aria-expanded]': 'datepicker().opened',
|
|
2216
2264
|
'[attr.aria-disabled]': 'disabled',
|
|
@@ -2221,8 +2269,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2221
2269
|
}], datepicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }] } });
|
|
2222
2270
|
|
|
2223
2271
|
class KbqDatepickerModule {
|
|
2224
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2225
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2272
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2273
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerModule, imports: [KbqButtonModule,
|
|
2226
2274
|
OverlayModule,
|
|
2227
2275
|
A11yModule,
|
|
2228
2276
|
PortalModule,
|
|
@@ -2247,10 +2295,7 @@ class KbqDatepickerModule {
|
|
|
2247
2295
|
KbqMonthView,
|
|
2248
2296
|
KbqCalendarHeader,
|
|
2249
2297
|
KbqFormFieldModule] }); }
|
|
2250
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2251
|
-
KbqDatepickerIntl,
|
|
2252
|
-
KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
|
|
2253
|
-
], imports: [KbqButtonModule,
|
|
2298
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerModule, providers: [KbqDatepickerIntl], imports: [KbqButtonModule,
|
|
2254
2299
|
OverlayModule,
|
|
2255
2300
|
A11yModule,
|
|
2256
2301
|
PortalModule,
|
|
@@ -2261,7 +2306,7 @@ class KbqDatepickerModule {
|
|
|
2261
2306
|
KbqDatepickerContent,
|
|
2262
2307
|
KbqCalendarHeader, KbqFormFieldModule] }); }
|
|
2263
2308
|
}
|
|
2264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDatepickerModule, decorators: [{
|
|
2265
2310
|
type: NgModule,
|
|
2266
2311
|
args: [{
|
|
2267
2312
|
imports: [
|
|
@@ -2282,10 +2327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2282
2327
|
KbqMonthView,
|
|
2283
2328
|
KbqCalendarHeader
|
|
2284
2329
|
],
|
|
2285
|
-
providers: [
|
|
2286
|
-
KbqDatepickerIntl,
|
|
2287
|
-
KBQ_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER
|
|
2288
|
-
],
|
|
2330
|
+
providers: [KbqDatepickerIntl],
|
|
2289
2331
|
exports: [
|
|
2290
2332
|
KbqCalendar,
|
|
2291
2333
|
KbqCalendarBody,
|