@koobiq/components 20.0.0 → 20.1.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-trigger.component.scss +0 -18
- package/accordion/accordion.component.scss +9 -2
- package/actions-panel/index.d.ts +1 -0
- package/alert/_alert-theme.scss +0 -4
- package/alert/alert-tokens.scss +4 -4
- package/app-switcher/app-switcher-dropdown-app.scss +2 -0
- package/breadcrumbs/breadcrumbs.scss +4 -0
- package/breadcrumbs/index.d.ts +2 -1
- package/button/button-group.scss +42 -2
- package/button-toggle/button-toggle.scss +23 -0
- package/button-toggle/index.d.ts +3 -1
- package/checkbox/checkbox.scss +5 -4
- package/clamped-text/index.d.ts +1 -0
- package/core/index.d.ts +402 -13
- package/core/styles/common/_animation.scss +4 -0
- package/core/styles/theming/_components-theming.scss +1 -1
- package/core/styles/theming/_scrollbar-theme.scss +4 -0
- package/datepicker/_datepicker-theme.scss +1 -1
- package/datepicker/datepicker-toggle.scss +3 -3
- package/dl/index.d.ts +1 -0
- package/dropdown/dropdown.scss +2 -2
- package/fesm2022/koobiq-components-accordion.mjs +4 -4
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +14 -5
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +6 -6
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +6 -4
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +9 -6
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +4 -4
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +4 -0
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +4 -0
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +449 -112
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +5 -5
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +3 -2
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +8 -13
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +33 -22
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +974 -758
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +66 -0
- package/fesm2022/koobiq-components-flag.mjs.map +1 -0
- package/fesm2022/koobiq-components-form-field.mjs +2 -2
- package/fesm2022/koobiq-components-form-field.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-inline-edit.mjs +27 -6
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +39 -20
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +2 -2
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +9 -5
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +10 -9
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +178 -19
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +12 -4
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +2 -2
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +2 -2
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +3 -7
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +38 -16
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +4 -0
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +3 -3
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +2 -2
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +2 -2
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +6 -2
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +8 -6
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +19 -7
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +7 -0
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -14
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +4 -4
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +6 -0
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +132 -14
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +1 -1
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +50 -2
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +44 -11
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +67 -41
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +16 -3
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/file-upload-tokens.scss +1 -0
- package/file-upload/index.d.ts +10 -7
- package/filter-bar/_filter-bar-theme.scss +86 -0
- package/filter-bar/filter-bar-tokens.scss +6 -0
- package/filter-bar/filter-bar.scss +10 -4
- package/filter-bar/filter-refresher.scss +1 -1
- package/filter-bar/filters.scss +23 -19
- package/filter-bar/index.d.ts +707 -338
- package/filter-bar/pipes/base-pipe.scss +14 -35
- package/filter-bar/pipes/pipe-date.scss +20 -14
- package/filter-bar/pipes/pipe-multi-tree-select.scss +5 -3
- package/filter-bar/pipes/pipe-multiselect.scss +5 -3
- package/filter-bar/pipes/pipe-readonly.scss +4 -13
- package/filter-bar/pipes/pipe-select.scss +3 -1
- package/filter-bar/pipes/pipe-tree-select.scss +3 -1
- package/flag/flag.scss +53 -0
- package/flag/index.d.ts +44 -0
- package/icon/icon-item-tokens.scss +1 -1
- package/inline-edit/index.d.ts +5 -0
- package/inline-edit/inline-edit.scss +7 -7
- package/link/link-tokens.scss +2 -2
- package/list/index.d.ts +11 -2
- package/loader-overlay/loader-overlay-tokens.scss +1 -1
- package/modal/_modal-animation.scss +6 -6
- package/modal/_modal-theme.scss +5 -0
- package/modal/index.d.ts +3 -1
- package/modal/modal.scss +15 -0
- package/navbar/index.d.ts +1 -0
- package/navbar/navbar-item.scss +9 -0
- package/notification-center/_notification-center-theme.scss +2 -1
- package/notification-center/index.d.ts +88 -3
- package/notification-center/notification-center.scss +42 -4
- package/notification-center/notification-item.scss +3 -2
- package/overflow-items/index.d.ts +1 -0
- package/package.json +7 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/progress-bar.scss +4 -0
- package/progress-spinner/progress-spinner.scss +5 -1
- package/radio/index.d.ts +1 -5
- package/radio/radio.scss +18 -4
- package/schematics/collection.json +5 -0
- package/schematics/migrations/filter-bar-signals/README.md +66 -0
- package/schematics/migrations/filter-bar-signals/data.js +72 -0
- package/schematics/migrations/filter-bar-signals/index.js +316 -0
- package/schematics/migrations/filter-bar-signals/schema.json +20 -0
- package/schematics/migrations.json +5 -0
- package/schematics/ng-add/index.js +1 -1
- package/select/index.d.ts +10 -2
- package/sidebar/index.d.ts +1 -0
- package/skeleton/skeleton.scss +4 -0
- package/split-button/_split-button-theme.scss +2 -2
- package/splitter/_splitter-theme.scss +2 -2
- package/splitter/index.d.ts +1 -0
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +3 -2
- package/tabs/index.d.ts +2 -0
- package/tabs/tab-header.scss +1 -0
- package/tabs/tabs-tokens.scss +1 -1
- package/textarea/index.d.ts +0 -1
- package/time-range/time-range.scss +0 -8
- package/timepicker/timepicker.scss +2 -2
- package/timezone/index.d.ts +1 -0
- package/title/index.d.ts +92 -2
- package/tooltip/index.d.ts +51 -3
- package/tree/_tree-theme.scss +2 -7
- package/tree/index.d.ts +19 -4
- package/tree/toggle.scss +5 -0
- package/tree/tree-option.scss +0 -4
- package/tree-select/_tree-select-theme.scss +1 -1
- package/tree-select/index.d.ts +9 -2
- package/username/index.d.ts +20 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
1
|
+
import { coerceBooleanProperty, coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
2
2
|
import { Platform } from '@angular/cdk/platform';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, inject, ElementRef, NgZone, Renderer2, input, numberAttribute, booleanAttribute, Input, Directive, NgModule } from '@angular/core';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
6
|
import { NgControl, NgForm, FormGroupDirective, FormsModule } from '@angular/forms';
|
|
6
7
|
import { ErrorStateMatcher, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_WINDOW } from '@koobiq/components/core';
|
|
7
8
|
import { KbqFormFieldControl, KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
import { delay } from 'rxjs/operators';
|
|
9
|
+
import { Subject, observeOn, asapScheduler } from 'rxjs';
|
|
10
10
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
11
11
|
|
|
12
12
|
const KBQ_TEXTAREA_VALUE_ACCESSOR = new InjectionToken('KBQ_TEXTAREA_VALUE_ACCESSOR');
|
|
@@ -135,13 +135,7 @@ class KbqTextarea {
|
|
|
135
135
|
const height = Math.max(this.minHeight, +clone.scrollHeight + diff + this.freeRowsHeight);
|
|
136
136
|
clone.remove();
|
|
137
137
|
this.rowsCount = Math.floor(height / this.lineHeight);
|
|
138
|
-
|
|
139
|
-
textarea.style.minHeight = `${height}px`;
|
|
140
|
-
}
|
|
141
|
-
else if (!textarea.style.minHeight && this.lineHeight) {
|
|
142
|
-
// need for first initialization when value above maxRows
|
|
143
|
-
textarea.style.minHeight = `${this.maxRows() * this.lineHeight}px`;
|
|
144
|
-
}
|
|
138
|
+
textarea.style.minHeight = coerceCssPixelValue(this.maxRowLimitReached ? this.maxRows() * this.lineHeight : height);
|
|
145
139
|
});
|
|
146
140
|
};
|
|
147
141
|
const inputValueAccessor = inject(KBQ_TEXTAREA_VALUE_ACCESSOR, { optional: true, self: true });
|
|
@@ -153,7 +147,7 @@ class KbqTextarea {
|
|
|
153
147
|
this.id = this.id;
|
|
154
148
|
// eslint-disable-next-line @angular-eslint/no-lifecycle-call
|
|
155
149
|
this.parent?.animationDone.subscribe(() => this.ngOnInit());
|
|
156
|
-
this.
|
|
150
|
+
this.stateChanges.pipe(observeOn(asapScheduler), takeUntilDestroyed()).subscribe(() => this.grow());
|
|
157
151
|
}
|
|
158
152
|
ngOnInit() {
|
|
159
153
|
if (!this.isBrowser)
|
|
@@ -172,7 +166,6 @@ class KbqTextarea {
|
|
|
172
166
|
}
|
|
173
167
|
ngOnDestroy() {
|
|
174
168
|
this.stateChanges.complete();
|
|
175
|
-
this.growSubscription.unsubscribe();
|
|
176
169
|
}
|
|
177
170
|
ngDoCheck() {
|
|
178
171
|
if (this.ngControl) {
|
|
@@ -240,7 +233,7 @@ class KbqTextarea {
|
|
|
240
233
|
return validity && validity.badInput;
|
|
241
234
|
}
|
|
242
235
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqTextarea, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
243
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.25", type: KbqTextarea, isStandalone: true, selector: "textarea[kbqTextarea]", inputs: { canGrow: { classPropertyName: "canGrow", publicName: "canGrow", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, freeRowsHeight: { classPropertyName: "freeRowsHeight", publicName: "freeRowsHeight", isSignal: false, isRequired: false, transformFunction: numberAttribute }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "
|
|
236
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.25", type: KbqTextarea, isStandalone: true, selector: "textarea[kbqTextarea]", inputs: { canGrow: { classPropertyName: "canGrow", publicName: "canGrow", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, maxRows: { classPropertyName: "maxRows", publicName: "maxRows", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, freeRowsHeight: { classPropertyName: "freeRowsHeight", publicName: "freeRowsHeight", isSignal: false, isRequired: false, transformFunction: numberAttribute }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()", "focus": "focusChanged(true)", "input": "dirtyCheckNativeValue()" }, properties: { "class.kbq-textarea-resizable": "!canGrow", "class.kbq-textarea_max-row-limit-reached": "maxRowLimitReached", "attr.id": "id", "attr.placeholder": "placeholder", "attr.aria-invalid": "errorState", "disabled": "disabled", "required": "required" }, classAttribute: "kbq-textarea kbq-scrollbar" }, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTextarea }], exportAs: ["kbqTextarea"], usesOnChanges: true, ngImport: i0 }); }
|
|
244
237
|
}
|
|
245
238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqTextarea, decorators: [{
|
|
246
239
|
type: Directive,
|
|
@@ -258,7 +251,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
258
251
|
'[required]': 'required',
|
|
259
252
|
'(blur)': 'onBlur()',
|
|
260
253
|
'(focus)': 'focusChanged(true)',
|
|
261
|
-
'(
|
|
254
|
+
'(input)': 'dirtyCheckNativeValue()'
|
|
262
255
|
},
|
|
263
256
|
exportAs: 'kbqTextarea'
|
|
264
257
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-textarea.mjs","sources":["../../../packages/components/textarea/textarea.component.ts","../../../packages/components/textarea/textarea.module.ts","../../../packages/components/textarea/koobiq-components-textarea.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Platform } from '@angular/cdk/platform';\nimport {\n booleanAttribute,\n Directive,\n DoCheck,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n input,\n NgZone,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2\n} from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms';\nimport {\n CanUpdateErrorState,\n ErrorStateMatcher,\n KBQ_PARENT_ANIMATION_COMPONENT,\n KBQ_WINDOW\n} from '@koobiq/components/core';\nimport { KbqFormFieldControl } from '@koobiq/components/form-field';\nimport { Subject, Subscription } from 'rxjs';\nimport { delay } from 'rxjs/operators';\n\nexport const KBQ_TEXTAREA_VALUE_ACCESSOR = new InjectionToken<{ value: any }>('KBQ_TEXTAREA_VALUE_ACCESSOR');\n\nlet nextUniqueId = 0;\n\n@Directive({\n selector: 'textarea[kbqTextarea]',\n providers: [{ provide: KbqFormFieldControl, useExisting: KbqTextarea }],\n host: {\n class: 'kbq-textarea kbq-scrollbar',\n '[class.kbq-textarea-resizable]': '!canGrow',\n '[class.kbq-textarea_max-row-limit-reached]': 'maxRowLimitReached',\n '[attr.id]': 'id',\n '[attr.placeholder]': 'placeholder',\n '[attr.aria-invalid]': 'errorState',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '(blur)': 'onBlur()',\n '(focus)': 'focusChanged(true)',\n '(paste)': 'stateChanges.next()'\n },\n exportAs: 'kbqTextarea'\n})\nexport class KbqTextarea\n implements KbqFormFieldControl<any>, OnInit, OnChanges, OnDestroy, DoCheck, CanUpdateErrorState\n{\n protected elementRef = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n ngControl = inject(NgControl, { optional: true, self: true });\n parentForm = inject(NgForm, { optional: true });\n parentFormGroup = inject(FormGroupDirective, { optional: true });\n defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private parent = inject(KBQ_PARENT_ANIMATION_COMPONENT, { optional: true, host: true });\n private ngZone = inject(NgZone);\n\n /** Whether the component is in an error state. */\n errorState: boolean = false;\n\n /** Parameter enables or disables the ability to automatically increase the height.\n * If set to false, the textarea becomes vertically resizable. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get canGrow(): boolean {\n return !this.maxRowLimitReached && this._canGrow;\n }\n\n set canGrow(value: boolean) {\n this._canGrow = value;\n }\n\n protected readonly isBrowser = inject(Platform).isBrowser;\n protected readonly renderer = inject(Renderer2);\n private readonly window = inject(KBQ_WINDOW);\n\n private _canGrow: boolean = true;\n\n /** Maximum number of lines to which the textarea will grow. Default unlimited */\n readonly maxRows = input<number>(undefined!);\n\n /** An object used to control when error messages are shown. */\n // TODO: Skipped for migration because:\n // This input overrides a field from a superclass, while the superclass field\n // is not migrated.\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n controlType: string = 'textarea';\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n\n return this._disabled;\n }\n\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get id(): string {\n return this._id;\n }\n\n set id(value: string) {\n this._id = value || this.uid;\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // This input overrides a field from a superclass, while the superclass field\n // is not migrated.\n @Input() placeholder: string;\n\n /** Distance from the last line to the bottom border */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ transform: numberAttribute }) freeRowsHeight: number;\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get required(): boolean {\n return this._required;\n }\n\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get value(): string {\n return this.valueAccessor.value;\n }\n\n set value(value: string) {\n if (value !== this.value) {\n this.valueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Flag that will be set to true when the maximum number of lines is reached.\n * Maximum number of rows can be set using the maxRows input. */\n get maxRowLimitReached(): boolean {\n return this.rowsCount > this.maxRows();\n }\n\n protected uid = `kbq-textarea-${nextUniqueId++}`;\n protected previousNativeValue: any;\n private _disabled = false;\n private _id: string;\n private _required = false;\n\n private valueAccessor: { value: any };\n private growSubscription: Subscription;\n\n private lineHeight: number = 0;\n private minHeight: number = 0;\n private rowsCount: number;\n\n constructor() {\n const inputValueAccessor = inject(KBQ_TEXTAREA_VALUE_ACCESSOR, { optional: true, self: true });\n\n // If no input value accessor was explicitly specified, use the element as the textarea value\n // accessor.\n this.valueAccessor = inputValueAccessor || this.elementRef.nativeElement;\n\n this.previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // eslint-disable-next-line @angular-eslint/no-lifecycle-call\n this.parent?.animationDone.subscribe(() => this.ngOnInit());\n\n this.growSubscription = this.stateChanges.pipe(delay(0)).subscribe(this.grow);\n }\n\n ngOnInit() {\n if (!this.isBrowser) return;\n\n Promise.resolve().then(() => {\n this.lineHeight = parseInt(this.window.getComputedStyle(this.elementRef.nativeElement).lineHeight!, 10);\n\n const paddingTop = parseInt(this.window.getComputedStyle(this.elementRef.nativeElement).paddingTop!, 10);\n const paddingBottom = parseInt(\n this.window.getComputedStyle(this.elementRef.nativeElement).paddingBottom!,\n 10\n );\n\n this.minHeight = this.lineHeight + paddingTop + paddingBottom;\n this.freeRowsHeight = this.freeRowsHeight ?? this.lineHeight;\n });\n\n setTimeout(this.grow, 0);\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this.growSubscription.unsubscribe();\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this.dirtyCheckNativeValue();\n }\n\n updateErrorState() {\n const oldState = this.errorState;\n const parent = this.parentFormGroup || this.parentForm;\n const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;\n const control = this.ngControl ? (this.ngControl.control as UntypedFormControl) : null;\n const newState = matcher.isErrorState(control, parent);\n\n if (newState !== oldState) {\n this.errorState = newState;\n this.stateChanges.next();\n }\n }\n\n onBlur(): void {\n this.focusChanged(false);\n }\n\n /** Grow textarea height to avoid vertical scroll */\n grow = () => {\n if (!this.isBrowser || !this._canGrow) return;\n\n this.ngZone.runOutsideAngular(() => {\n const textarea = this.elementRef.nativeElement;\n\n const clone = textarea.cloneNode(false) as HTMLTextAreaElement;\n\n this.renderer.appendChild(this.renderer.parentNode(textarea), clone);\n\n const outerHeight = parseInt(this.window.getComputedStyle(textarea).height!, 10);\n const diff = outerHeight - +textarea.clientHeight;\n\n clone.style.minHeight = '0'; // this line is important to height recalculation\n\n const height = Math.max(this.minHeight, +clone.scrollHeight + diff + this.freeRowsHeight);\n\n clone.remove();\n\n this.rowsCount = Math.floor(height / this.lineHeight);\n\n if (!this.maxRowLimitReached) {\n textarea.style.minHeight = `${height}px`;\n } else if (!textarea.style.minHeight && this.lineHeight) {\n // need for first initialization when value above maxRows\n textarea.style.minHeight = `${this.maxRows() * this.lineHeight}px`;\n }\n });\n };\n\n /** Focuses the textarea. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** Callback for the cases where the focused state of the textarea changes. */\n focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this.elementRef.nativeElement.value && !this.isBadInput();\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n this.focus();\n }\n\n /** Does some manual dirty checking on the native textarea `value` property. */\n protected dirtyCheckNativeValue() {\n const newValue = this.value;\n\n if (this.previousNativeValue !== newValue) {\n this.previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Checks whether the textarea is invalid based on the native validation. */\n protected isBadInput(): boolean {\n // The `validity` property won't be present on platform-server.\n const validity = (this.elementRef.nativeElement as HTMLTextAreaElement).validity;\n\n return validity && validity.badInput;\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { KbqFormFieldModule } from '@koobiq/components/form-field';\nimport { KbqTextarea } from './textarea.component';\n\n@NgModule({\n imports: [A11yModule, FormsModule, KbqTextarea],\n exports: [KbqTextarea, KbqFormFieldModule]\n})\nexport class KbqTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MA6Ba,2BAA2B,GAAG,IAAI,cAAc,CAAiB,6BAA6B;AAE3G,IAAI,YAAY,GAAG,CAAC;MAoBP,WAAW,CAAA;AAcpB;AACiE;;;AAGjE,IAAA,IACI,OAAO,GAAA;QACP,OAAO,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,QAAQ;IACpD;IAEA,IAAI,OAAO,CAAC,KAAc,EAAA;AACtB,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;IACzB;AAmCA;;;AAGG;;;AAGH,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,KAAK,IAAI,EAAE;AACpD,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ;QAClC;QAEA,OAAO,IAAI,CAAC,SAAS;IACzB;IAEA,IAAI,QAAQ,CAAC,KAAc,EAAA;AACvB,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAE7C,QAAA,IAAI,IAAI,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kB;AAC5C,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-textarea.mjs","sources":["../../../packages/components/textarea/textarea.component.ts","../../../packages/components/textarea/textarea.module.ts","../../../packages/components/textarea/koobiq-components-textarea.ts"],"sourcesContent":["import { coerceBooleanProperty, coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { Platform } from '@angular/cdk/platform';\nimport {\n booleanAttribute,\n Directive,\n DoCheck,\n ElementRef,\n inject,\n InjectionToken,\n Input,\n input,\n NgZone,\n numberAttribute,\n OnChanges,\n OnDestroy,\n OnInit,\n Renderer2\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormGroupDirective, NgControl, NgForm, UntypedFormControl } from '@angular/forms';\nimport {\n CanUpdateErrorState,\n ErrorStateMatcher,\n KBQ_PARENT_ANIMATION_COMPONENT,\n KBQ_WINDOW\n} from '@koobiq/components/core';\nimport { KbqFormFieldControl } from '@koobiq/components/form-field';\nimport { asapScheduler, observeOn, Subject } from 'rxjs';\n\nexport const KBQ_TEXTAREA_VALUE_ACCESSOR = new InjectionToken<{ value: any }>('KBQ_TEXTAREA_VALUE_ACCESSOR');\n\nlet nextUniqueId = 0;\n\n@Directive({\n selector: 'textarea[kbqTextarea]',\n providers: [{ provide: KbqFormFieldControl, useExisting: KbqTextarea }],\n host: {\n class: 'kbq-textarea kbq-scrollbar',\n '[class.kbq-textarea-resizable]': '!canGrow',\n '[class.kbq-textarea_max-row-limit-reached]': 'maxRowLimitReached',\n '[attr.id]': 'id',\n '[attr.placeholder]': 'placeholder',\n '[attr.aria-invalid]': 'errorState',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '(blur)': 'onBlur()',\n '(focus)': 'focusChanged(true)',\n '(input)': 'dirtyCheckNativeValue()'\n },\n exportAs: 'kbqTextarea'\n})\nexport class KbqTextarea\n implements KbqFormFieldControl<any>, OnInit, OnChanges, OnDestroy, DoCheck, CanUpdateErrorState\n{\n protected elementRef = inject<ElementRef<HTMLTextAreaElement>>(ElementRef);\n ngControl = inject(NgControl, { optional: true, self: true });\n parentForm = inject(NgForm, { optional: true });\n parentFormGroup = inject(FormGroupDirective, { optional: true });\n defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private parent = inject(KBQ_PARENT_ANIMATION_COMPONENT, { optional: true, host: true });\n private ngZone = inject(NgZone);\n\n /** Whether the component is in an error state. */\n errorState: boolean = false;\n\n /** Parameter enables or disables the ability to automatically increase the height.\n * If set to false, the textarea becomes vertically resizable. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get canGrow(): boolean {\n return !this.maxRowLimitReached && this._canGrow;\n }\n\n set canGrow(value: boolean) {\n this._canGrow = value;\n }\n\n protected readonly isBrowser = inject(Platform).isBrowser;\n protected readonly renderer = inject(Renderer2);\n private readonly window = inject(KBQ_WINDOW);\n\n private _canGrow: boolean = true;\n\n /** Maximum number of lines to which the textarea will grow. Default unlimited */\n readonly maxRows = input<number>(undefined!);\n\n /** An object used to control when error messages are shown. */\n // TODO: Skipped for migration because:\n // This input overrides a field from a superclass, while the superclass field\n // is not migrated.\n @Input() errorStateMatcher: ErrorStateMatcher;\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n focused: boolean = false;\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n controlType: string = 'textarea';\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get disabled(): boolean {\n if (this.ngControl && this.ngControl.disabled !== null) {\n return this.ngControl.disabled;\n }\n\n return this._disabled;\n }\n\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get id(): string {\n return this._id;\n }\n\n set id(value: string) {\n this._id = value || this.uid;\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // This input overrides a field from a superclass, while the superclass field\n // is not migrated.\n @Input() placeholder: string;\n\n /** Distance from the last line to the bottom border */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input({ transform: numberAttribute }) freeRowsHeight: number;\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get required(): boolean {\n return this._required;\n }\n\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get value(): string {\n return this.valueAccessor.value;\n }\n\n set value(value: string) {\n if (value !== this.value) {\n this.valueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n\n /** Flag that will be set to true when the maximum number of lines is reached.\n * Maximum number of rows can be set using the maxRows input. */\n get maxRowLimitReached(): boolean {\n return this.rowsCount > this.maxRows();\n }\n\n protected uid = `kbq-textarea-${nextUniqueId++}`;\n protected previousNativeValue: any;\n private _disabled = false;\n private _id: string;\n private _required = false;\n\n private valueAccessor: { value: any };\n\n private lineHeight: number = 0;\n private minHeight: number = 0;\n private rowsCount: number;\n\n constructor() {\n const inputValueAccessor = inject(KBQ_TEXTAREA_VALUE_ACCESSOR, { optional: true, self: true });\n\n // If no input value accessor was explicitly specified, use the element as the textarea value\n // accessor.\n this.valueAccessor = inputValueAccessor || this.elementRef.nativeElement;\n\n this.previousNativeValue = this.value;\n\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n\n // eslint-disable-next-line @angular-eslint/no-lifecycle-call\n this.parent?.animationDone.subscribe(() => this.ngOnInit());\n\n this.stateChanges.pipe(observeOn(asapScheduler), takeUntilDestroyed()).subscribe(() => this.grow());\n }\n\n ngOnInit() {\n if (!this.isBrowser) return;\n\n Promise.resolve().then(() => {\n this.lineHeight = parseInt(this.window.getComputedStyle(this.elementRef.nativeElement).lineHeight!, 10);\n\n const paddingTop = parseInt(this.window.getComputedStyle(this.elementRef.nativeElement).paddingTop!, 10);\n const paddingBottom = parseInt(\n this.window.getComputedStyle(this.elementRef.nativeElement).paddingBottom!,\n 10\n );\n\n this.minHeight = this.lineHeight + paddingTop + paddingBottom;\n this.freeRowsHeight = this.freeRowsHeight ?? this.lineHeight;\n });\n\n setTimeout(this.grow, 0);\n }\n\n ngOnChanges() {\n this.stateChanges.next();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n }\n\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n }\n\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this.dirtyCheckNativeValue();\n }\n\n updateErrorState() {\n const oldState = this.errorState;\n const parent = this.parentFormGroup || this.parentForm;\n const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;\n const control = this.ngControl ? (this.ngControl.control as UntypedFormControl) : null;\n const newState = matcher.isErrorState(control, parent);\n\n if (newState !== oldState) {\n this.errorState = newState;\n this.stateChanges.next();\n }\n }\n\n onBlur(): void {\n this.focusChanged(false);\n }\n\n /** Grow textarea height to avoid vertical scroll */\n grow = () => {\n if (!this.isBrowser || !this._canGrow) return;\n\n this.ngZone.runOutsideAngular(() => {\n const textarea = this.elementRef.nativeElement;\n\n const clone = textarea.cloneNode(false) as HTMLTextAreaElement;\n\n this.renderer.appendChild(this.renderer.parentNode(textarea), clone);\n\n const outerHeight = parseInt(this.window.getComputedStyle(textarea).height!, 10);\n const diff = outerHeight - +textarea.clientHeight;\n\n clone.style.minHeight = '0'; // this line is important to height recalculation\n\n const height = Math.max(this.minHeight, +clone.scrollHeight + diff + this.freeRowsHeight);\n\n clone.remove();\n\n this.rowsCount = Math.floor(height / this.lineHeight);\n\n textarea.style.minHeight = coerceCssPixelValue(\n this.maxRowLimitReached ? this.maxRows() * this.lineHeight : height\n );\n });\n };\n\n /** Focuses the textarea. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** Callback for the cases where the focused state of the textarea changes. */\n focusChanged(isFocused: boolean) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n get empty(): boolean {\n return !this.elementRef.nativeElement.value && !this.isBadInput();\n }\n\n /**\n * Implemented as part of KbqFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n this.focus();\n }\n\n /** Does some manual dirty checking on the native textarea `value` property. */\n protected dirtyCheckNativeValue() {\n const newValue = this.value;\n\n if (this.previousNativeValue !== newValue) {\n this.previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n\n /** Checks whether the textarea is invalid based on the native validation. */\n protected isBadInput(): boolean {\n // The `validity` property won't be present on platform-server.\n const validity = (this.elementRef.nativeElement as HTMLTextAreaElement).validity;\n\n return validity && validity.badInput;\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { KbqFormFieldModule } from '@koobiq/components/form-field';\nimport { KbqTextarea } from './textarea.component';\n\n@NgModule({\n imports: [A11yModule, FormsModule, KbqTextarea],\n exports: [KbqTextarea, KbqFormFieldModule]\n})\nexport class KbqTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;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A,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,OAAA,EAAA,CAHhB,UAAU,EAAE,WAAW,EACV,kBAAkB,CAAA,EAAA,CAAA,CAAA;;4FAEhC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC;AAC/C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,kBAAkB;AAC5C,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -362,7 +362,7 @@ class KbqTimeRangeEditor {
|
|
|
362
362
|
provide: NG_VALIDATORS,
|
|
363
363
|
useExisting: KbqTimeRangeEditor
|
|
364
364
|
}
|
|
365
|
-
], viewQueries: [{ propertyName: "timepickerList", predicate: KbqTimepicker, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\">\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">{{ localeConfig.editor.rangeLabel }}</kbq-radio-button>\n }\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.fromTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.toTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: KbqFieldset, selector: "kbq-fieldset" }, { kind: "directive", type: KbqFieldsetItem, selector: "[kbqFieldsetItem]" }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i2.KbqDatepicker, selector: "kbq-datepicker", inputs: ["hasBackdrop", "startAt", "disabled", "opened", "minDate", "maxDate", "panelClass", "dateClass", "backdropClass"], outputs: ["yearSelected", "monthSelected", "opened", "closed"], exportAs: ["kbqDatepicker"] }, { kind: "directive", type: i2.KbqDatepickerInput, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: ["errorStateMatcher", "placeholder", "required", "kbqDatepicker", "kbqCalendar", "kbqDatepickerFilter", "value", "min", "max", "disabled", "id", "kbqValidationTooltip"], outputs: ["incorrectInput", "dateChange", "dateInput"], exportAs: ["kbqDatepickerInput"] }, { kind: "component", type: i2.KbqDatepickerToggleIconComponent, selector: "kbq-datepicker-toggle-icon", inputs: ["disabled", "for"] }, { kind: "component", type: i3.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i3.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i3.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i4.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "ngmodule", type: KbqRadioModule }, { kind: "directive", type: i5.KbqRadioGroup, selector: "kbq-radio-group", inputs: ["big", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["kbqRadioGroup"] }, { kind: "component", type: i5.KbqRadioButton, selector: "kbq-radio-button", inputs: ["checked", "value", "disabled", "tabIndex", "required", "labelPosition", "name", "isFocused", "id"], outputs: ["change"], exportAs: ["kbqRadioButton"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
365
|
+
], viewQueries: [{ propertyName: "timepickerList", predicate: KbqTimepicker, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\">\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">{{ localeConfig.editor.rangeLabel }}</kbq-radio-button>\n }\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.fromTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.toTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTimeOption ?? localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarterOption ?? localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYearOption ?? localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: KbqFieldset, selector: "kbq-fieldset" }, { kind: "directive", type: KbqFieldsetItem, selector: "[kbqFieldsetItem]" }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i2.KbqDatepicker, selector: "kbq-datepicker", inputs: ["hasBackdrop", "startAt", "disabled", "opened", "minDate", "maxDate", "panelClass", "dateClass", "backdropClass"], outputs: ["yearSelected", "monthSelected", "opened", "closed"], exportAs: ["kbqDatepicker"] }, { kind: "directive", type: i2.KbqDatepickerInput, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: ["errorStateMatcher", "placeholder", "required", "kbqDatepicker", "kbqCalendar", "kbqDatepickerFilter", "value", "min", "max", "disabled", "id", "kbqValidationTooltip"], outputs: ["incorrectInput", "dateChange", "dateInput"], exportAs: ["kbqDatepickerInput"] }, { kind: "component", type: i2.KbqDatepickerToggleIconComponent, selector: "kbq-datepicker-toggle-icon", inputs: ["disabled", "for"] }, { kind: "component", type: i3.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders", "inOverlay", "horizontal", "labelClass", "contentClass"], outputs: ["inOverlayChange"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i3.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i3.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i4.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["errorStateMatcher", "placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "ngmodule", type: KbqRadioModule }, { kind: "directive", type: i5.KbqRadioGroup, selector: "kbq-radio-group", inputs: ["big", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["kbqRadioGroup"] }, { kind: "component", type: i5.KbqRadioButton, selector: "kbq-radio-button", inputs: ["checked", "value", "disabled", "tabIndex", "required", "labelPosition", "name", "isFocused", "id"], outputs: ["change"], exportAs: ["kbqRadioButton"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
366
366
|
}
|
|
367
367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqTimeRangeEditor, decorators: [{
|
|
368
368
|
type: Component,
|
|
@@ -388,7 +388,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
388
388
|
}
|
|
389
389
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
390
390
|
class: 'kbq-time-range__editor'
|
|
391
|
-
}, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\">\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">{{ localeConfig.editor.rangeLabel }}</kbq-radio-button>\n }\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.fromTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.toTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n" }]
|
|
391
|
+
}, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\">\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">{{ localeConfig.editor.rangeLabel }}</kbq-radio-button>\n }\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.fromTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.toTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTimeOption ?? localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarterOption ?? localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYearOption ?? localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n" }]
|
|
392
392
|
}], ctorParameters: () => [], propDecorators: { maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], availableTimeRangeTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableTimeRangeTypes", required: false }] }], rangeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeValue", required: false }] }], showRangeAsDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRangeAsDefault", required: true }] }], localeConfiguration: [{ type: i0.Input, args: [{ isSignal: true, alias: "localeConfiguration", required: true }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], timepickerList: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KbqTimepicker), { isSignal: true }] }] } });
|
|
393
393
|
|
|
394
394
|
/** @docs-private */
|
|
@@ -654,7 +654,7 @@ class KbqTimeRange {
|
|
|
654
654
|
<button kbq-button (click)="onCancel(popover)">{{ localeConfig.editor.cancel }}</button>
|
|
655
655
|
</div>
|
|
656
656
|
</ng-template>
|
|
657
|
-
`, isInline: true, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-
|
|
657
|
+
`, isInline: true, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{align-self:center;width:57px}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i2$2.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["hideIfNotInViewPort", "kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "kbqPopoverStickToWindow", "container", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i3$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i3$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: KbqTimeRangeEditor, selector: "kbq-time-range-editor", inputs: ["maxDate", "minDate", "availableTimeRangeTypes", "rangeValue", "showRangeAsDefault", "localeConfiguration", "optionTemplate"] }, { kind: "component", type: KbqTimeRangeTitle, selector: "kbq-time-range-title", inputs: ["timeRange", "localeConfiguration", "titleTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
658
658
|
}
|
|
659
659
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqTimeRange, decorators: [{
|
|
660
660
|
type: Component,
|
|
@@ -711,7 +711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
711
711
|
</ng-template>
|
|
712
712
|
`, providers: [KbqTimeRangeService], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
713
713
|
class: 'kbq-time-range'
|
|
714
|
-
}, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-
|
|
714
|
+
}, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{align-self:center;width:57px}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"] }]
|
|
715
715
|
}], ctorParameters: () => [], propDecorators: { minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], defaultRangeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultRangeValue", required: false }] }], availableTimeRangeTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableTimeRangeTypes", required: false }] }], titleTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleTemplate", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], arrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "arrow", required: false }] }], showRangeAsDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRangeAsDefault", required: false }] }], nonNullable: [{ type: i0.Input, args: [{ isSignal: true, alias: "nonNullable", required: false }] }], valueCorrected: [{ type: i0.Output, args: ["valueCorrected"] }] } });
|
|
716
716
|
|
|
717
717
|
/** Directive for easy using styles of time-range placeholder publicly. */
|