@koobiq/components 18.30.0 → 18.31.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/core/common-behaviors/error-state.d.ts +18 -0
- package/core/common-behaviors/index.d.ts +1 -1
- package/core/option/_option-theme.scss +24 -2
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +1 -1
- package/datepicker/datepicker-input.directive.d.ts +14 -5
- package/datepicker/datepicker-module.d.ts +1 -1
- package/datepicker/datepicker-toggle.component.d.ts +22 -0
- package/datepicker/datepicker-toggle.scss +6 -0
- package/esm2022/core/common-behaviors/error-state.mjs +28 -1
- package/esm2022/core/common-behaviors/index.mjs +2 -2
- package/esm2022/core/option/option.mjs +2 -2
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-header.component.mjs +1 -1
- package/esm2022/datepicker/datepicker-input.directive.mjs +66 -6
- package/esm2022/datepicker/datepicker-module.mjs +8 -3
- package/esm2022/datepicker/datepicker-toggle.component.mjs +94 -10
- package/esm2022/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/filter-bar/filter-bar.mjs +11 -3
- package/esm2022/filter-bar/filter-bar.types.mjs +1 -1
- package/esm2022/filter-bar/pipe-add.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-date.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-datetime.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +29 -9
- package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +30 -10
- package/esm2022/filter-bar/pipes/pipe-select.mjs +2 -2
- package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +2 -2
- package/esm2022/icon/icon-button.component.mjs +2 -2
- package/esm2022/list/list-selection.component.mjs +5 -4
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/select/select.component.mjs +30 -12
- package/esm2022/timezone/timezone-option.component.mjs +2 -2
- package/esm2022/timezone/timezone-select.component.mjs +2 -2
- package/esm2022/tree/toggle.mjs +2 -2
- package/esm2022/tree/tree-option.component.mjs +5 -4
- package/esm2022/tree/tree-selection.component.mjs +2 -2
- package/esm2022/tree/tree.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +32 -13
- package/fesm2022/koobiq-components-core.mjs +33 -6
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +159 -11
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +2 -2
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +71 -23
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +6 -5
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +29 -11
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +4 -4
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +31 -12
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +10 -9
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/filter-bar/filter-bar.d.ts +7 -1
- package/filter-bar/filter-bar.types.d.ts +5 -0
- package/filter-bar/pipes/pipe-multi-select.d.ts +5 -1
- package/filter-bar/pipes/pipe-multi-tree-select.d.ts +5 -1
- package/icon/_icon-button-theme.scss +67 -85
- package/list/_list-theme.scss +24 -2
- package/list/list-tokens.scss +5 -0
- package/package.json +6 -6
- package/schematics/ng-add/index.js +5 -5
- package/select/select.component.d.ts +8 -1
- package/tree/_tree-theme.scss +30 -7
- package/tree/tree-option.scss +5 -2
- package/tree/tree-tokens.scss +5 -0
- package/tree-select/tree-select.component.d.ts +8 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Injectable, Optional, ViewChild, InjectionToken, inject, Inject, forwardRef, Directive, ContentChild, NgModule } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Injectable, Optional, ViewChild, InjectionToken, inject, Inject, forwardRef, Directive, DestroyRef, ChangeDetectorRef, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, NgClass, TitleCasePipe } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@koobiq/components/core';
|
|
6
|
-
import { defaultOffsetY, validationTooltipShowDelay, validationTooltipHideDelay, KBQ_DATE_FORMATS, KBQ_LOCALE_SERVICE } from '@koobiq/components/core';
|
|
6
|
+
import { defaultOffsetY, ErrorStateMatcher, validationTooltipShowDelay, validationTooltipHideDelay, KbqErrorStateTracker, KBQ_DATE_FORMATS, KBQ_LOCALE_SERVICE } from '@koobiq/components/core';
|
|
7
7
|
import * as i2 from '@koobiq/components/button';
|
|
8
8
|
import { KbqButtonModule } from '@koobiq/components/button';
|
|
9
9
|
import * as i3 from '@koobiq/components/select';
|
|
10
10
|
import { KbqSelectModule } from '@koobiq/components/select';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i1$2 from '@koobiq/components/icon';
|
|
12
12
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
13
13
|
import { Subject, Subscription, merge, of } from 'rxjs';
|
|
14
14
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
15
15
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
16
|
-
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
16
|
+
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, FormGroupDirective, NgForm } from '@angular/forms';
|
|
17
17
|
import { 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/cdk/keycodes';
|
|
18
18
|
import { KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
19
19
|
import '@koobiq/components/tooltip';
|
|
@@ -24,6 +24,7 @@ import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
|
24
24
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
25
25
|
import { take } from 'rxjs/operators';
|
|
26
26
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
27
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* An internal class that represents the data corresponding to a single calendar cell.
|
|
@@ -240,7 +241,7 @@ class KbqCalendarHeader {
|
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
243
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqCalendarHeader, deps: [{ token: i1$1.DateAdapter }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
243
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KbqCalendarHeader, 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 [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 [tabindex]=\"-1\"\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 [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 [tabindex]=\"-1\"\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: "component", type: i2.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i2.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i3.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i1$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i1$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]" }, { kind: "component", type:
|
|
244
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KbqCalendarHeader, 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 [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 [tabindex]=\"-1\"\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 [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 [tabindex]=\"-1\"\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: "component", type: i2.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i2.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i3.KbqSelect, selector: "kbq-select", inputs: ["hiddenItemsText", "panelClass", "backdropClass", "errorStateMatcher", "sortComparator", "hasBackdrop", "placeholder", "required", "multiple", "compareWith", "selectAllHandler", "panelWidth", "panelMinWidth", "value", "id", "tabIndex", "disabled", "hiddenItemsTextFormatter"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["kbqSelect"] }, { kind: "directive", type: i3.KbqOptionTooltip, selector: "kbq-option" }, { kind: "component", type: i1$1.KbqOption, selector: "kbq-option", inputs: ["value", "selectable", "userSelect", "showCheckbox", "disabled"], outputs: ["onSelectionChange"], exportAs: ["kbqOption"] }, { kind: "directive", type: i1$1.KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]" }, { kind: "component", type: i1$2.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
244
245
|
}
|
|
245
246
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqCalendarHeader, decorators: [{
|
|
246
247
|
type: Component,
|
|
@@ -1110,6 +1111,29 @@ const KBQ_DATEPICKER_VALIDATORS = {
|
|
|
1110
1111
|
useExisting: forwardRef(() => KbqDatepickerInput),
|
|
1111
1112
|
multi: true
|
|
1112
1113
|
};
|
|
1114
|
+
/**
|
|
1115
|
+
* @TODO: Remove after kbq-form-field and kbq-form-field-experimental will be merged. (#DS-3463)
|
|
1116
|
+
* Used to sync control's errorState and icon's errorState, since now datepicker-input is validating on initial.
|
|
1117
|
+
* After merging form-fields, default error-state matcher will be used
|
|
1118
|
+
*/
|
|
1119
|
+
class KbqDatepickerErrorStateMatcher {
|
|
1120
|
+
isErrorState(control) {
|
|
1121
|
+
return !!control?.invalid;
|
|
1122
|
+
}
|
|
1123
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1124
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerErrorStateMatcher }); }
|
|
1125
|
+
}
|
|
1126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerErrorStateMatcher, decorators: [{
|
|
1127
|
+
type: Injectable
|
|
1128
|
+
}] });
|
|
1129
|
+
/**
|
|
1130
|
+
* @TODO: Remove after kbq-form-field and kbq-form-field-experimental will be merged. (#DS-3463)
|
|
1131
|
+
* After merging form-fields, default error-state matcher will be used
|
|
1132
|
+
*/
|
|
1133
|
+
const KBQ_DATEPICKER_ERROR_STATE_MATCHER = {
|
|
1134
|
+
provide: ErrorStateMatcher,
|
|
1135
|
+
useClass: KbqDatepickerErrorStateMatcher
|
|
1136
|
+
};
|
|
1113
1137
|
/**
|
|
1114
1138
|
* An event used for datepicker input and change events. We don't always have access to a native
|
|
1115
1139
|
* input or change event because the event may have been triggered by the user clicking on the
|
|
@@ -1129,6 +1153,13 @@ class KbqDatepickerInputEvent {
|
|
|
1129
1153
|
let uniqueComponentIdSuffix = 0;
|
|
1130
1154
|
/** Directive used to connect an input to a KbqDatepicker. */
|
|
1131
1155
|
class KbqDatepickerInput {
|
|
1156
|
+
/** Object used to control when error messages are shown. */
|
|
1157
|
+
get errorStateMatcher() {
|
|
1158
|
+
return this.errorStateTracker.errorStateMatcher;
|
|
1159
|
+
}
|
|
1160
|
+
set errorStateMatcher(value) {
|
|
1161
|
+
this.errorStateTracker.errorStateMatcher = value;
|
|
1162
|
+
}
|
|
1132
1163
|
get placeholder() {
|
|
1133
1164
|
return this._placeholder;
|
|
1134
1165
|
}
|
|
@@ -1257,6 +1288,12 @@ class KbqDatepickerInput {
|
|
|
1257
1288
|
get dateInputFormat() {
|
|
1258
1289
|
return this.dateFormats?.dateInput || this.adapter.config.dateInput;
|
|
1259
1290
|
}
|
|
1291
|
+
get errorState() {
|
|
1292
|
+
return this.errorStateTracker.errorState;
|
|
1293
|
+
}
|
|
1294
|
+
set errorState(value) {
|
|
1295
|
+
this.errorStateTracker.errorState = value;
|
|
1296
|
+
}
|
|
1260
1297
|
get readyForParse() {
|
|
1261
1298
|
return !!(this.firstDigit && this.secondDigit && this.thirdDigit);
|
|
1262
1299
|
}
|
|
@@ -1408,9 +1445,20 @@ class KbqDatepickerInput {
|
|
|
1408
1445
|
if (!this.adapter) {
|
|
1409
1446
|
throw createMissingDateImplError('DateAdapter');
|
|
1410
1447
|
}
|
|
1448
|
+
this.errorStateTracker = new KbqErrorStateTracker(inject(ErrorStateMatcher),
|
|
1449
|
+
// update ngControl later, so it will be initialized
|
|
1450
|
+
null, inject(FormGroupDirective, { optional: true }), inject(NgForm, { optional: true }), this.stateChanges);
|
|
1411
1451
|
this.setFormat(this.dateInputFormat);
|
|
1412
1452
|
this.localeSubscription = adapter.localeChanges.subscribe(this.updateLocaleParams);
|
|
1413
1453
|
}
|
|
1454
|
+
ngDoCheck() {
|
|
1455
|
+
if (this.ngControl) {
|
|
1456
|
+
// We need to re-evaluate this on every change detection cycle, because there are some
|
|
1457
|
+
// error triggers that we can't subscribe to (e.g. parent form submissions). This means
|
|
1458
|
+
// that whatever logic is in here has to be super lean or we risk destroying the performance.
|
|
1459
|
+
this.updateErrorState();
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1414
1462
|
onContainerClick() {
|
|
1415
1463
|
this.focus();
|
|
1416
1464
|
}
|
|
@@ -1424,6 +1472,9 @@ class KbqDatepickerInput {
|
|
|
1424
1472
|
this.stateChanges.next();
|
|
1425
1473
|
}
|
|
1426
1474
|
}
|
|
1475
|
+
ngAfterContentInit() {
|
|
1476
|
+
this.updateErrorState();
|
|
1477
|
+
}
|
|
1427
1478
|
ngOnDestroy() {
|
|
1428
1479
|
this.datepickerSubscription.unsubscribe();
|
|
1429
1480
|
this.localeSubscription.unsubscribe();
|
|
@@ -1544,6 +1595,10 @@ class KbqDatepickerInput {
|
|
|
1544
1595
|
toISO8601(value) {
|
|
1545
1596
|
return this.adapter.toIso8601(value);
|
|
1546
1597
|
}
|
|
1598
|
+
/** Refreshes the error state of the input. */
|
|
1599
|
+
updateErrorState() {
|
|
1600
|
+
this.errorStateTracker.updateErrorState();
|
|
1601
|
+
}
|
|
1547
1602
|
saveTimePart(selected) {
|
|
1548
1603
|
if (!this.value) {
|
|
1549
1604
|
return selected;
|
|
@@ -1935,6 +1990,8 @@ class KbqDatepickerInput {
|
|
|
1935
1990
|
}
|
|
1936
1991
|
this.control = control;
|
|
1937
1992
|
this.control.valueChanges.subscribe((value) => (this._value = value));
|
|
1993
|
+
// @TODO resolve types
|
|
1994
|
+
this.errorStateTracker.ngControl = { control };
|
|
1938
1995
|
}
|
|
1939
1996
|
/**
|
|
1940
1997
|
* @param obj The object to check.
|
|
@@ -1984,9 +2041,10 @@ class KbqDatepickerInput {
|
|
|
1984
2041
|
}
|
|
1985
2042
|
}
|
|
1986
2043
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerInput, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.DateAdapter, optional: true }, { token: KBQ_DATE_FORMATS, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1987
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: KbqDatepickerInput, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: { 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: [
|
|
2044
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: KbqDatepickerInput, 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: [
|
|
1988
2045
|
KBQ_DATEPICKER_VALUE_ACCESSOR,
|
|
1989
2046
|
KBQ_DATEPICKER_VALIDATORS,
|
|
2047
|
+
KBQ_DATEPICKER_ERROR_STATE_MATCHER,
|
|
1990
2048
|
{ provide: KbqFormFieldControl, useExisting: KbqDatepickerInput }
|
|
1991
2049
|
], exportAs: ["kbqDatepickerInput"], ngImport: i0 }); }
|
|
1992
2050
|
}
|
|
@@ -1998,6 +2056,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1998
2056
|
providers: [
|
|
1999
2057
|
KBQ_DATEPICKER_VALUE_ACCESSOR,
|
|
2000
2058
|
KBQ_DATEPICKER_VALIDATORS,
|
|
2059
|
+
KBQ_DATEPICKER_ERROR_STATE_MATCHER,
|
|
2001
2060
|
{ provide: KbqFormFieldControl, useExisting: KbqDatepickerInput }
|
|
2002
2061
|
],
|
|
2003
2062
|
host: {
|
|
@@ -2027,7 +2086,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2027
2086
|
}, {
|
|
2028
2087
|
type: Inject,
|
|
2029
2088
|
args: [KBQ_LOCALE_SERVICE]
|
|
2030
|
-
}] }], propDecorators: {
|
|
2089
|
+
}] }], propDecorators: { errorStateMatcher: [{
|
|
2090
|
+
type: Input
|
|
2091
|
+
}], placeholder: [{
|
|
2031
2092
|
type: Input
|
|
2032
2093
|
}], required: [{
|
|
2033
2094
|
type: Input
|
|
@@ -2068,6 +2129,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2068
2129
|
selector: '[kbqDatepickerToggleIcon]'
|
|
2069
2130
|
}]
|
|
2070
2131
|
}] });
|
|
2132
|
+
class KbqDatepickerToggleIconComponent {
|
|
2133
|
+
constructor() {
|
|
2134
|
+
this._disabled = false;
|
|
2135
|
+
this.destroyRef = inject(DestroyRef);
|
|
2136
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
2137
|
+
this.stateChangesSubscription = Subscription.EMPTY;
|
|
2138
|
+
}
|
|
2139
|
+
/** Whether the toggle button is disabled. */
|
|
2140
|
+
get disabled() {
|
|
2141
|
+
return this.datepicker.disabled || this._disabled;
|
|
2142
|
+
}
|
|
2143
|
+
set disabled(value) {
|
|
2144
|
+
this._disabled = coerceBooleanProperty(value);
|
|
2145
|
+
}
|
|
2146
|
+
ngOnChanges(changes) {
|
|
2147
|
+
if (changes.datepicker && !changes.datepicker.firstChange) {
|
|
2148
|
+
this.watchStateChanges();
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
ngAfterContentInit() {
|
|
2152
|
+
this.watchStateChanges();
|
|
2153
|
+
}
|
|
2154
|
+
ngOnDestroy() {
|
|
2155
|
+
this.stateChangesSubscription.unsubscribe();
|
|
2156
|
+
}
|
|
2157
|
+
/** Open datepicker */
|
|
2158
|
+
open($event) {
|
|
2159
|
+
if (this.datepicker && !this.disabled) {
|
|
2160
|
+
this.datepicker.open();
|
|
2161
|
+
$event.stopPropagation();
|
|
2162
|
+
}
|
|
2163
|
+
}
|
|
2164
|
+
watchStateChanges() {
|
|
2165
|
+
this.stateChangesSubscription.unsubscribe();
|
|
2166
|
+
if (!this.datepicker)
|
|
2167
|
+
return;
|
|
2168
|
+
this.stateChangesSubscription = merge(this.datepicker.disabledChange, this.datepicker.datepickerInput.disabledChange, this.datepicker.openedStream, this.datepicker.closedStream)
|
|
2169
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2170
|
+
.subscribe(() => this.cdr.markForCheck());
|
|
2171
|
+
}
|
|
2172
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerToggleIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2173
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: KbqDatepickerToggleIconComponent, isStandalone: true, selector: "kbq-datepicker-toggle-icon", inputs: { disabled: "disabled", datepicker: ["for", "datepicker"] }, 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: `
|
|
2174
|
+
<ng-content select="[kbqDatepickerToggleIcon]">
|
|
2175
|
+
<i
|
|
2176
|
+
[tabindex]="-1"
|
|
2177
|
+
[class.kbq-active]="datepicker && datepicker.opened"
|
|
2178
|
+
[disabled]="disabled"
|
|
2179
|
+
[autoColor]="true"
|
|
2180
|
+
color="contrast-fade"
|
|
2181
|
+
kbq-icon-button="kbq-calendar-o_16"
|
|
2182
|
+
></i>
|
|
2183
|
+
</ng-content>
|
|
2184
|
+
`, 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: i1$2.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["small", "kbq-icon-button", "tabindex", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2185
|
+
}
|
|
2186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerToggleIconComponent, decorators: [{
|
|
2187
|
+
type: Component,
|
|
2188
|
+
args: [{ standalone: true, selector: 'kbq-datepicker-toggle-icon', imports: [KbqIconModule], template: `
|
|
2189
|
+
<ng-content select="[kbqDatepickerToggleIcon]">
|
|
2190
|
+
<i
|
|
2191
|
+
[tabindex]="-1"
|
|
2192
|
+
[class.kbq-active]="datepicker && datepicker.opened"
|
|
2193
|
+
[disabled]="disabled"
|
|
2194
|
+
[autoColor]="true"
|
|
2195
|
+
color="contrast-fade"
|
|
2196
|
+
kbq-icon-button="kbq-calendar-o_16"
|
|
2197
|
+
></i>
|
|
2198
|
+
</ng-content>
|
|
2199
|
+
`, host: {
|
|
2200
|
+
class: 'kbq-datepicker-toggle-icon',
|
|
2201
|
+
'[attr.aria-expanded]': 'datepicker.opened',
|
|
2202
|
+
'[attr.aria-disabled]': 'disabled',
|
|
2203
|
+
'(click)': 'open($event)'
|
|
2204
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
2205
|
+
}], propDecorators: { disabled: [{
|
|
2206
|
+
type: Input
|
|
2207
|
+
}], datepicker: [{
|
|
2208
|
+
type: Input,
|
|
2209
|
+
args: ['for']
|
|
2210
|
+
}] } });
|
|
2211
|
+
/**
|
|
2212
|
+
* @deprecated Use `KbqDatepickerToggleIconComponent` instead
|
|
2213
|
+
*/
|
|
2071
2214
|
class KbqDatepickerToggle {
|
|
2072
2215
|
/** Whether the toggle button is disabled. */
|
|
2073
2216
|
get disabled() {
|
|
@@ -2110,14 +2253,14 @@ class KbqDatepickerToggle {
|
|
|
2110
2253
|
this.stateChanges = merge(this.intl.changes, datepickerDisabled, inputDisabled, datepickerToggled).subscribe(() => this.changeDetectorRef.markForCheck());
|
|
2111
2254
|
}
|
|
2112
2255
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerToggle, deps: [{ token: KbqDatepickerIntl }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2113
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KbqDatepickerToggle, 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
|
|
2256
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: KbqDatepickerToggle, 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"], dependencies: [{ kind: "component", type: i2.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i2.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i1$2.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["small", "kbq-icon-button", "tabindex", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2114
2257
|
}
|
|
2115
2258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerToggle, decorators: [{
|
|
2116
2259
|
type: Component,
|
|
2117
2260
|
args: [{ selector: 'kbq-datepicker-toggle', host: {
|
|
2118
2261
|
class: 'kbq-datepicker-toggle',
|
|
2119
2262
|
'[class.kbq-active]': 'datepicker && datepicker.opened'
|
|
2120
|
-
}, 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
|
|
2263
|
+
}, 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"] }]
|
|
2121
2264
|
}], ctorParameters: () => [{ type: KbqDatepickerIntl }, { type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
|
|
2122
2265
|
type: Input
|
|
2123
2266
|
}], datepicker: [{
|
|
@@ -2149,6 +2292,7 @@ class KbqDatepickerModule {
|
|
|
2149
2292
|
PortalModule,
|
|
2150
2293
|
KbqSelectModule,
|
|
2151
2294
|
KbqIconModule,
|
|
2295
|
+
KbqDatepickerToggleIconComponent,
|
|
2152
2296
|
NgClass,
|
|
2153
2297
|
TitleCasePipe], exports: [KbqCalendar,
|
|
2154
2298
|
KbqCalendarBody,
|
|
@@ -2157,6 +2301,7 @@ class KbqDatepickerModule {
|
|
|
2157
2301
|
KbqDatepickerInput,
|
|
2158
2302
|
KbqDatepickerToggle,
|
|
2159
2303
|
KbqDatepickerToggleIcon,
|
|
2304
|
+
KbqDatepickerToggleIconComponent,
|
|
2160
2305
|
KbqMonthView,
|
|
2161
2306
|
KbqCalendarHeader] }); }
|
|
2162
2307
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerModule, providers: [
|
|
@@ -2167,7 +2312,8 @@ class KbqDatepickerModule {
|
|
|
2167
2312
|
A11yModule,
|
|
2168
2313
|
PortalModule,
|
|
2169
2314
|
KbqSelectModule,
|
|
2170
|
-
KbqIconModule
|
|
2315
|
+
KbqIconModule,
|
|
2316
|
+
KbqDatepickerToggleIconComponent] }); }
|
|
2171
2317
|
}
|
|
2172
2318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KbqDatepickerModule, decorators: [{
|
|
2173
2319
|
type: NgModule,
|
|
@@ -2179,6 +2325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2179
2325
|
PortalModule,
|
|
2180
2326
|
KbqSelectModule,
|
|
2181
2327
|
KbqIconModule,
|
|
2328
|
+
KbqDatepickerToggleIconComponent,
|
|
2182
2329
|
NgClass,
|
|
2183
2330
|
TitleCasePipe
|
|
2184
2331
|
],
|
|
@@ -2190,6 +2337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2190
2337
|
KbqDatepickerInput,
|
|
2191
2338
|
KbqDatepickerToggle,
|
|
2192
2339
|
KbqDatepickerToggleIcon,
|
|
2340
|
+
KbqDatepickerToggleIconComponent,
|
|
2193
2341
|
KbqMonthView,
|
|
2194
2342
|
KbqCalendarHeader
|
|
2195
2343
|
],
|
|
@@ -2215,5 +2363,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2215
2363
|
* Generated bundle index. Do not edit.
|
|
2216
2364
|
*/
|
|
2217
2365
|
|
|
2218
|
-
export { 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, KbqDatepickerToggle, KbqDatepickerToggleIcon, KbqMonthView, MAX_YEAR, kbqDatepickerAnimations };
|
|
2366
|
+
export { 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, KbqDatepickerToggle, KbqDatepickerToggleIcon, KbqDatepickerToggleIconComponent, KbqMonthView, MAX_YEAR, kbqDatepickerAnimations };
|
|
2219
2367
|
//# sourceMappingURL=koobiq-components-datepicker.mjs.map
|