@koobiq/components 20.2.0 → 20.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/_accordion-theme.scss +5 -1
- package/accordion/accordion-tokens.scss +2 -0
- package/accordion/accordion-trigger.scss +6 -0
- package/accordion/accordion.scss +21 -0
- package/accordion/index.d.ts +55 -8
- package/actions-panel/index.d.ts +25 -13
- package/app-switcher/app-switcher-dropdown-app.scss +7 -5
- package/app-switcher/app-switcher-dropdown-site.scss +6 -4
- package/app-switcher/index.d.ts +41 -4
- package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
- package/autocomplete/index.d.ts +24 -9
- package/breadcrumbs/index.d.ts +1 -1
- package/button/index.d.ts +2 -2
- package/button-toggle/button-toggle-tokens.scss +2 -0
- package/button-toggle/button-toggle.scss +9 -0
- package/button-toggle/index.d.ts +5 -0
- package/checkbox/index.d.ts +33 -29
- package/clamped-text/index.d.ts +1 -1
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1125 -199
- package/core/option/_action-container-mixins.scss +28 -0
- package/core/option/_option-theme.scss +24 -0
- package/core/option/action.scss +7 -0
- package/core/styles/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_connected-overlay.scss +6 -3
- package/core/styles/common/_select.scss +12 -0
- package/core/styles/common/_tokens.scss +0 -9
- package/core/styles/theming/_index.scss +0 -1
- package/core/styles/theming/_theming.scss +34 -5
- package/datepicker/index.d.ts +46 -15
- package/dl/dl.scss +26 -0
- package/dl/index.d.ts +8 -1
- package/dropdown/_dropdown-theme.scss +28 -2
- package/dropdown/dropdown-item.scss +13 -0
- package/dropdown/dropdown.scss +7 -1
- package/dropdown/index.d.ts +264 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +106 -46
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +54 -31
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +13 -13
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +25 -25
- package/fesm2022/koobiq-components-checkbox.mjs +69 -92
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +13 -13
- package/fesm2022/koobiq-components-code-block.mjs +56 -69
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +29 -29
- package/fesm2022/koobiq-components-core.mjs +2454 -795
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +160 -121
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +23 -15
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +754 -155
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +74 -42
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +605 -192
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +7 -7
- package/fesm2022/koobiq-components-form-field.mjs +359 -165
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +39 -21
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +172 -27
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +41 -24
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +8 -8
- package/fesm2022/koobiq-components-list.mjs +657 -143
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-markdown.mjs +14 -11
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +70 -38
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +69 -54
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +23 -22
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +26 -21
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +33 -14
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
- package/fesm2022/koobiq-components-search-expandable.mjs +7 -7
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +420 -107
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +14 -14
- package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
- package/fesm2022/koobiq-components-skeleton.mjs +10 -10
- package/fesm2022/koobiq-components-split-button.mjs +7 -7
- package/fesm2022/koobiq-components-splitter.mjs +17 -17
- package/fesm2022/koobiq-components-table.mjs +15 -13
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +56 -58
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +283 -122
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +13 -8
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +29 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +58 -26
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +76 -39
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +51 -26
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +72 -64
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +115 -36
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +13 -13
- package/fesm2022/koobiq-components-tree-select.mjs +190 -56
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +302 -81
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +27 -27
- package/file-upload/index.d.ts +25 -6
- package/file-upload/multiple-file-upload.component.scss +14 -0
- package/filter-bar/_filter-bar-theme.scss +0 -6
- package/filter-bar/index.d.ts +222 -9
- package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
- package/filter-bar/pipes/pipe-multiselect.scss +0 -6
- package/filter-bar/pipes/pipe-tree-select.scss +0 -6
- package/form-field/_form-field-theme.scss +76 -20
- package/form-field/fieldset.scss +10 -0
- package/form-field/form-field-tokens.scss +15 -1
- package/form-field/form-field.scss +15 -19
- package/form-field/index.d.ts +148 -68
- package/icon/index.d.ts +31 -6
- package/inline-edit/index.d.ts +57 -4
- package/inline-edit/inline-edit.scss +10 -0
- package/input/index.d.ts +17 -2
- package/list/_list-theme.scss +42 -10
- package/list/index.d.ts +326 -79
- package/list/list-tokens.scss +43 -8
- package/list/list.scss +186 -12
- package/markdown/index.d.ts +1 -1
- package/modal/index.d.ts +22 -5
- package/modal/modal-tokens.scss +1 -1
- package/navbar/index.d.ts +16 -1
- package/navbar/navbar-brand.scss +6 -0
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/notification-item.scss +6 -0
- package/package.json +3 -6
- package/popover/index.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/resizer/index.d.ts +12 -0
- package/schematics/migrations/deprecated-icons/README.md +29 -4
- package/schematics/migrations/deprecated-icons/data.js +7 -0
- package/schematics/migrations/deprecated-icons/index.js +62 -35
- package/schematics/migrations/new-icons-pack/README.md +37 -2
- package/schematics/migrations/new-icons-pack/data.js +8 -0
- package/schematics/migrations/new-icons-pack/index.js +144 -53
- package/schematics/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +30 -12
- package/schematics/utils/ast.js +31 -0
- package/schematics/utils/icon-migration.js +530 -0
- package/schematics/utils/typescript.js +44 -0
- package/scrollbar/index.d.ts +1 -1
- package/select/index.d.ts +163 -18
- package/select/select-tokens.scss +0 -1
- package/select/select.scss +0 -2
- package/splitter/index.d.ts +1 -1
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +2 -1
- package/table/table.scss +8 -0
- package/tabs/index.d.ts +0 -1
- package/tags/index.d.ts +128 -29
- package/textarea/index.d.ts +5 -0
- package/time-range/index.d.ts +1 -1
- package/timepicker/index.d.ts +4 -0
- package/timezone/index.d.ts +9 -5
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +54 -11
- package/tree/_tree-theme.scss +25 -5
- package/tree/index.d.ts +71 -3
- package/tree/tree-option.scss +2 -8
- package/tree-select/_tree-select-theme.scss +22 -0
- package/tree-select/index.d.ts +83 -16
- package/core/styles/_tokens.kbq.import.scss +0 -4
- package/core/styles/theming/_components-theming.scss +0 -1927
- package/filter-bar/pipes/pipe-select.scss +0 -5
- package/overflow-items/overflow-items.scss +0 -20
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { QueryList, inject, ElementRef, Directive, isDevMode, Input, ChangeDetectorRef,
|
|
3
|
-
import { Subject, Subscription, merge, fromEvent, map as map$1, BehaviorSubject, interval, pairwise } from 'rxjs';
|
|
2
|
+
import { QueryList, inject, ElementRef, DestroyRef, signal, forwardRef, InjectionToken, model, computed, Directive, isDevMode, Input, ChangeDetectorRef, LOCALE_ID, Injectable, Type, Renderer2, afterNextRender, NgModule, effect, Pipe, contentChildren, booleanAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, input, EventEmitter, Output, ViewChild, numberAttribute, ApplicationRef, TemplateRef, NgZone, ViewContainerRef, viewChild, RendererFactory2, Version } from '@angular/core';
|
|
3
|
+
import { Subject, Subscription, merge, fromEvent, map as map$1, BehaviorSubject, of, interval, pairwise } from 'rxjs';
|
|
4
4
|
import { tap, debounceTime, filter, map, distinctUntilChanged, delay } from 'rxjs/operators';
|
|
5
|
-
import { _getEventTarget, Platform } from '@angular/cdk/platform';
|
|
6
|
-
import { trigger, state,
|
|
5
|
+
import { _getEventTarget, _getFocusedElementPierceShadowDom, Platform } from '@angular/cdk/platform';
|
|
6
|
+
import { trigger, state, style, transition, animate, group } from '@angular/animations';
|
|
7
|
+
import { AutofillMonitor } from '@angular/cdk/text-field';
|
|
8
|
+
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
9
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
10
|
import { coerceBooleanProperty, coerceNumberProperty, coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
8
|
-
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
9
11
|
import { DateAdapter as DateAdapter$1 } from '@koobiq/date-adapter';
|
|
10
12
|
import { DOCUMENT } from '@angular/common';
|
|
11
13
|
import { DateFormatter as DateFormatter$1 } from '@koobiq/date-formatter';
|
|
12
14
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
13
15
|
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
14
|
-
import { Overlay, CdkOverlayOrigin, OverlayContainer, ScrollDispatcher, CdkScrollable } from '@angular/cdk/overlay';
|
|
16
|
+
import { FlexibleConnectedPositionStrategy, Overlay, CdkOverlayOrigin, OverlayContainer, ScrollDispatcher, CdkScrollable } from '@angular/cdk/overlay';
|
|
15
17
|
import { TooltipSizeArrowSize } from '@koobiq/design-tokens';
|
|
16
18
|
import { Directionality } from '@angular/cdk/bidi';
|
|
17
19
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
@@ -667,6 +669,158 @@ const kbqSelectAnimations = {
|
|
|
667
669
|
const transformPanel = kbqSelectAnimations.transformPanel;
|
|
668
670
|
const fadeInContent = kbqSelectAnimations.fadeInContent;
|
|
669
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Tracks whether the current control's value was filled in by the browser, as a signal.
|
|
674
|
+
*
|
|
675
|
+
* Call it from an injection context on a directive whose host is the element the browser actually
|
|
676
|
+
* fills — a text `<input>` or a `<textarea>`. Every `KbqFormFieldControl` that can be autofilled
|
|
677
|
+
* exposes the result as its `autofilled` member.
|
|
678
|
+
*
|
|
679
|
+
* This is a hook for application code, not the mechanism behind the autofill styling. The styling
|
|
680
|
+
* keys on `:autofill` in CSS, which matches in the same style pass the browser fills the field;
|
|
681
|
+
* detection here goes through a zero-length keyframe animation and an `animationstart` listener, so
|
|
682
|
+
* it lands a frame or two later — too late to paint with, and early enough for anything a component
|
|
683
|
+
* wants to do about it.
|
|
684
|
+
*
|
|
685
|
+
* `monitor()` returns EMPTY off the browser platform, so this needs no `Platform` guard.
|
|
686
|
+
*/
|
|
687
|
+
const kbqInjectAutofilled = () => {
|
|
688
|
+
const elementRef = inject(ElementRef);
|
|
689
|
+
const autofillMonitor = inject(AutofillMonitor);
|
|
690
|
+
const destroyRef = inject(DestroyRef);
|
|
691
|
+
const autofilled = signal(false, ...(ngDevMode ? [{ debugName: "autofilled" }] : []));
|
|
692
|
+
autofillMonitor
|
|
693
|
+
.monitor(elementRef)
|
|
694
|
+
.pipe(takeUntilDestroyed(destroyRef))
|
|
695
|
+
.subscribe(({ isAutofilled }) => autofilled.set(isAutofilled));
|
|
696
|
+
// `stopMonitoring()` is the load-bearing teardown, not a duplicate of `takeUntilDestroyed()`
|
|
697
|
+
// above: `AutofillMonitor` is `providedIn: 'root'`, so dropping only the subscription would
|
|
698
|
+
// leave the element registered with the app-lifetime service and its marker classes on the DOM
|
|
699
|
+
// node.
|
|
700
|
+
destroyRef.onDestroy(() => autofillMonitor.stopMonitoring(elementRef));
|
|
701
|
+
return autofilled.asReadonly();
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Provider Expression that allows `KbqCheckable` to register as a `ControlValueAccessor`, so any host
|
|
706
|
+
* applying it via `hostDirectives` gets `[(ngModel)]`/`formControl` support without wiring up its own.
|
|
707
|
+
* @docs-private
|
|
708
|
+
*/
|
|
709
|
+
const KBQ_CHECKABLE_CONTROL_VALUE_ACCESSOR = {
|
|
710
|
+
provide: NG_VALUE_ACCESSOR,
|
|
711
|
+
useExisting: forwardRef(() => KbqCheckable),
|
|
712
|
+
multi: true
|
|
713
|
+
};
|
|
714
|
+
/** Injection token that can be used to specify the default click behavior for checkable controls. */
|
|
715
|
+
const KBQ_CHECKABLE_CLICK_ACTION = new InjectionToken('kbq-checkable-click-action');
|
|
716
|
+
/**
|
|
717
|
+
* Represents the different states that require custom transitions between them.
|
|
718
|
+
* @docs-private
|
|
719
|
+
*/
|
|
720
|
+
var TransitionCheckState;
|
|
721
|
+
(function (TransitionCheckState) {
|
|
722
|
+
/** The initial state of the component before any user interaction. */
|
|
723
|
+
TransitionCheckState["Init"] = "init";
|
|
724
|
+
/** The state representing the component when it's becoming checked. */
|
|
725
|
+
TransitionCheckState["Checked"] = "checked";
|
|
726
|
+
/** The state representing the component when it's becoming unchecked. */
|
|
727
|
+
TransitionCheckState["Unchecked"] = "unchecked";
|
|
728
|
+
/** The state representing the component when it's becoming indeterminate. */
|
|
729
|
+
TransitionCheckState["Indeterminate"] = "indeterminate";
|
|
730
|
+
})(TransitionCheckState || (TransitionCheckState = {}));
|
|
731
|
+
/**
|
|
732
|
+
* Shared behavior for checkbox-like controls: checked/disabled/indeterminate/tabIndex state, the click-to-toggle
|
|
733
|
+
* algorithm, ARIA-checked computation, and `ControlValueAccessor` change plumbing.
|
|
734
|
+
*
|
|
735
|
+
* Meant to be applied via `hostDirectives` by components that render their own native `<input type="checkbox">`
|
|
736
|
+
* and markup (e.g. `KbqCheckbox`, `KbqToggleComponent`, or custom checkbox-like primitives). Hosts stay
|
|
737
|
+
* responsible for their own public inputs/outputs, `FocusMonitor` wiring, and emitting their own typed
|
|
738
|
+
* `change` event - this directive only centralizes the state and decisions behind them.
|
|
739
|
+
*/
|
|
740
|
+
class KbqCheckable {
|
|
741
|
+
constructor() {
|
|
742
|
+
this.controlValueAccessorChangeFn = () => { };
|
|
743
|
+
/**
|
|
744
|
+
* Called when the control is blurred. Needed to properly implement `ControlValueAccessor`.
|
|
745
|
+
* @docs-private
|
|
746
|
+
*/
|
|
747
|
+
this.onTouched = () => { };
|
|
748
|
+
/** @docs-private */
|
|
749
|
+
this.currentCheckState = signal(TransitionCheckState.Init, ...(ngDevMode ? [{ debugName: "currentCheckState" }] : []));
|
|
750
|
+
this.checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : []));
|
|
751
|
+
this.disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
752
|
+
this.indeterminate = model(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
|
|
753
|
+
/** Raw tab index as set by the caller, ignoring `disabled`. Use `effectiveTabIndex` to read the applied value. */
|
|
754
|
+
this.tabIndex = model(0, ...(ngDevMode ? [{ debugName: "tabIndex" }] : []));
|
|
755
|
+
/** The tab index actually applied to the native input: forced to `-1` while disabled. */
|
|
756
|
+
this.effectiveTabIndex = computed(() => (this.disabled() ? -1 : this.tabIndex()), ...(ngDevMode ? [{ debugName: "effectiveTabIndex" }] : []));
|
|
757
|
+
}
|
|
758
|
+
/** Returns the ARIA-checked value: `'true'`, `'false'`, or `'mixed'` when indeterminate. */
|
|
759
|
+
getAriaChecked() {
|
|
760
|
+
return this.checked() ? 'true' : this.indeterminate() ? 'mixed' : 'false';
|
|
761
|
+
}
|
|
762
|
+
/** Toggles the `checked` state and notifies the registered `ControlValueAccessor` change handler. */
|
|
763
|
+
toggle() {
|
|
764
|
+
this.checked.update((value) => !value);
|
|
765
|
+
this.notifyFormValueChange(this.checked());
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Resolves what a click on the native input should do, based on the current state and `clickAction`.
|
|
769
|
+
* Pure - does not mutate state. Callers apply `checked`/`indeterminate` themselves and own emitting
|
|
770
|
+
* their own change events, so timing/order stays identical to a hand-written click handler.
|
|
771
|
+
*/
|
|
772
|
+
resolveClick(clickAction) {
|
|
773
|
+
if (this.disabled() || clickAction === 'noop') {
|
|
774
|
+
return { shouldToggle: false, shouldClearIndeterminate: false };
|
|
775
|
+
}
|
|
776
|
+
return {
|
|
777
|
+
shouldToggle: true,
|
|
778
|
+
shouldClearIndeterminate: this.indeterminate() && clickAction !== 'check'
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
/** Resets the native input to match the current `checked`/`indeterminate` state (used for the `noop` click action). */
|
|
782
|
+
resetNativeInput(nativeInput) {
|
|
783
|
+
nativeInput.checked = this.checked();
|
|
784
|
+
nativeInput.indeterminate = this.indeterminate();
|
|
785
|
+
}
|
|
786
|
+
/** Transitions the animation state, ignoring no-op transitions. @docs-private */
|
|
787
|
+
transitionCheckState(newState) {
|
|
788
|
+
if (this.currentCheckState() === newState)
|
|
789
|
+
return;
|
|
790
|
+
this.currentCheckState.set(newState);
|
|
791
|
+
}
|
|
792
|
+
// Implemented as part of ControlValueAccessor.
|
|
793
|
+
writeValue(value) {
|
|
794
|
+
this.checked.set(!!value);
|
|
795
|
+
}
|
|
796
|
+
/** Stores the `ControlValueAccessor` change handler to be notified by `notifyFormValueChange`. */
|
|
797
|
+
registerOnChange(fn) {
|
|
798
|
+
this.controlValueAccessorChangeFn = fn;
|
|
799
|
+
}
|
|
800
|
+
// Implemented as part of ControlValueAccessor.
|
|
801
|
+
registerOnTouched(fn) {
|
|
802
|
+
this.onTouched = fn;
|
|
803
|
+
}
|
|
804
|
+
// Implemented as part of ControlValueAccessor.
|
|
805
|
+
setDisabledState(isDisabled) {
|
|
806
|
+
this.disabled.set(isDisabled);
|
|
807
|
+
}
|
|
808
|
+
/** Notifies the registered `ControlValueAccessor` change handler. */
|
|
809
|
+
notifyFormValueChange(value) {
|
|
810
|
+
this.controlValueAccessorChangeFn(value);
|
|
811
|
+
}
|
|
812
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
813
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqCheckable, isStandalone: true, selector: "[kbqCheckable]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", disabled: "disabledChange", indeterminate: "indeterminateChange", tabIndex: "tabIndexChange" }, providers: [KBQ_CHECKABLE_CONTROL_VALUE_ACCESSOR], exportAs: ["kbqCheckable"], ngImport: i0 }); }
|
|
814
|
+
}
|
|
815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckable, decorators: [{
|
|
816
|
+
type: Directive,
|
|
817
|
+
args: [{
|
|
818
|
+
selector: '[kbqCheckable]',
|
|
819
|
+
providers: [KBQ_CHECKABLE_CONTROL_VALUE_ACCESSOR],
|
|
820
|
+
exportAs: 'kbqCheckable'
|
|
821
|
+
}]
|
|
822
|
+
}], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }, { type: i0.Output, args: ["tabIndexChange"] }] } });
|
|
823
|
+
|
|
670
824
|
class KbqNormalizeWhitespace {
|
|
671
825
|
constructor() {
|
|
672
826
|
/** @docs-private */
|
|
@@ -682,10 +836,10 @@ class KbqNormalizeWhitespace {
|
|
|
682
836
|
$event.clipboardData?.setData('text', value?.replace(/\u2009/g, ' '));
|
|
683
837
|
}
|
|
684
838
|
}
|
|
685
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
686
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
839
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqNormalizeWhitespace, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
840
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqNormalizeWhitespace, isStandalone: true, selector: "[kbqNormalizeWhitespace]", host: { listeners: { "copy": "onCopy($event)" } }, ngImport: i0 }); }
|
|
687
841
|
}
|
|
688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqNormalizeWhitespace, decorators: [{
|
|
689
843
|
type: Directive,
|
|
690
844
|
args: [{
|
|
691
845
|
selector: '[kbqNormalizeWhitespace]',
|
|
@@ -776,10 +930,10 @@ class KbqColorDirective {
|
|
|
776
930
|
setDefaultColor(color) {
|
|
777
931
|
this.defaultColor = color;
|
|
778
932
|
}
|
|
779
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
780
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
933
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
934
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqColorDirective, isStandalone: true, inputs: { color: "color" }, ngImport: i0 }); }
|
|
781
935
|
}
|
|
782
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqColorDirective, decorators: [{
|
|
783
937
|
type: Directive
|
|
784
938
|
}], ctorParameters: () => [], propDecorators: { color: [{
|
|
785
939
|
type: Input
|
|
@@ -863,6 +1017,28 @@ class KbqErrorStateTracker {
|
|
|
863
1017
|
const kbqInjectNativeElement = () => {
|
|
864
1018
|
return inject((ElementRef)).nativeElement;
|
|
865
1019
|
};
|
|
1020
|
+
/**
|
|
1021
|
+
* Focuses `element` and scrolls it into view by the shortest distance, leaving a visible one alone.
|
|
1022
|
+
*
|
|
1023
|
+
* The reveal is explicit because the one `focus()` performs implicitly is not portable: WebKit defers it
|
|
1024
|
+
* to a later rendering update, where it lands after — and undoes — any scrolling the reader did in the
|
|
1025
|
+
* meantime. Letting the element reveal itself keeps every consumer working, whatever it uses as a scroll
|
|
1026
|
+
* container, and the browser resolves that container rather than the caller guessing at it.
|
|
1027
|
+
*
|
|
1028
|
+
* Pass `skipReveal` when the pointer caused the focus: the element is already under the cursor, so
|
|
1029
|
+
* revealing it would shift the list out from under it.
|
|
1030
|
+
*/
|
|
1031
|
+
const kbqFocusAndReveal = (element, skipReveal = false) => {
|
|
1032
|
+
if (typeof element.focus !== 'function')
|
|
1033
|
+
return;
|
|
1034
|
+
// A focus listener calling back into `focus` must not scroll a second time. Read through shadow
|
|
1035
|
+
// roots, where `document.activeElement` reports the host instead of the element that holds focus.
|
|
1036
|
+
const wasFocused = _getFocusedElementPierceShadowDom() === element;
|
|
1037
|
+
element.focus({ preventScroll: true });
|
|
1038
|
+
if (skipReveal || wasFocused)
|
|
1039
|
+
return;
|
|
1040
|
+
element.scrollIntoView?.({ block: 'nearest', inline: 'nearest' });
|
|
1041
|
+
};
|
|
866
1042
|
|
|
867
1043
|
function isBoolean(value) {
|
|
868
1044
|
return typeof value === 'boolean';
|
|
@@ -910,10 +1086,10 @@ class KbqHover {
|
|
|
910
1086
|
*/
|
|
911
1087
|
this.hovered = toSignal(merge(fromEvent(this.element, 'mouseenter'), fromEvent(this.element, 'mouseleave')).pipe(map$1(({ type }) => type === 'mouseenter')), { initialValue: false });
|
|
912
1088
|
}
|
|
913
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
914
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
1089
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1090
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqHover, isStandalone: true, selector: "[kbqHover]", host: { properties: { "class.kbq-hovered": "hovered()" }, classAttribute: "kbq-hover" }, exportAs: ["kbqHover"], ngImport: i0 }); }
|
|
915
1091
|
}
|
|
916
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHover, decorators: [{
|
|
917
1093
|
type: Directive,
|
|
918
1094
|
args: [{
|
|
919
1095
|
selector: '[kbqHover]',
|
|
@@ -940,10 +1116,10 @@ class KbqReadStateDirective {
|
|
|
940
1116
|
}
|
|
941
1117
|
this.changeDetectorRef.markForCheck();
|
|
942
1118
|
}
|
|
943
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
944
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
1119
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqReadStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1120
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqReadStateDirective, isStandalone: true, host: { listeners: { "mouseenter": "mouseenterHandler()", "mouseleave": "mouseleaveHandler()", "click": "read.next(true)" } }, ngImport: i0 }); }
|
|
945
1121
|
}
|
|
946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqReadStateDirective, decorators: [{
|
|
947
1123
|
type: Directive,
|
|
948
1124
|
args: [{
|
|
949
1125
|
host: {
|
|
@@ -991,6 +1167,145 @@ class DateAdapter extends DateAdapter$1 {
|
|
|
991
1167
|
|
|
992
1168
|
const KBQ_DATE_FORMATS = new InjectionToken('kbq-date-formats');
|
|
993
1169
|
|
|
1170
|
+
/**
|
|
1171
|
+
* InjectionToken for the time zone every date the library formats is rendered in.
|
|
1172
|
+
*
|
|
1173
|
+
* Read once, by the {@link KbqDateTimezoneService} constructor, out of the injector that created the
|
|
1174
|
+
* service — call {@link KbqDateTimezoneService.setTimezone} to change the zone afterwards. Defaults to
|
|
1175
|
+
* `'system'`, the zone of the host the code runs on.
|
|
1176
|
+
*/
|
|
1177
|
+
const KBQ_DATE_TIMEZONE = new InjectionToken('KBQ_DATE_TIMEZONE');
|
|
1178
|
+
const MINUTES_PER_HOUR = 60;
|
|
1179
|
+
const SECONDS_PER_MINUTE = 60;
|
|
1180
|
+
/** The largest offset any zone has ever had; anything beyond it is a typo, not a zone. */
|
|
1181
|
+
const MAX_OFFSET_HOURS = 14;
|
|
1182
|
+
const MAX_OFFSET_MINUTES = MAX_OFFSET_HOURS * MINUTES_PER_HOUR;
|
|
1183
|
+
/** `UTC`/`GMT` with no offset — a valid input on its own, and what `Intl` reports for zero-offset zones. */
|
|
1184
|
+
const UTC_ALIAS_PATTERN = /^(?:utc|gmt)$/i;
|
|
1185
|
+
/**
|
|
1186
|
+
* A fixed offset written with separators, with or without a `UTC`/`GMT` prefix and with or without a
|
|
1187
|
+
* sign: `+03:00`, `UTC+3`, `GMT+05:30`, `03:00:00`. The seconds group matches both the `timeZoneName`
|
|
1188
|
+
* `Intl` reports in the `longOffset` style for pre-standard-time instants (`GMT-00:44:30`) and the form
|
|
1189
|
+
* `KbqTimezoneZone.offset` is written in.
|
|
1190
|
+
*/
|
|
1191
|
+
const FIXED_OFFSET_PATTERN = /^(?:utc|gmt)?([+-])?(\d{1,2})(?::([0-5]\d)(?::([0-5]\d))?)?$/i;
|
|
1192
|
+
/** The same offset written without separators: `-0530`. Kept apart so `+123` fails instead of backtracking. */
|
|
1193
|
+
const COMPACT_OFFSET_PATTERN = /^(?:utc|gmt)?([+-])?(\d{2})([0-5]\d)$/i;
|
|
1194
|
+
/** Offset in minutes east of UTC of a fixed-offset specifier, or `null` when the value is not one. */
|
|
1195
|
+
const parseFixedOffset = (value) => {
|
|
1196
|
+
if (UTC_ALIAS_PATTERN.test(value))
|
|
1197
|
+
return 0;
|
|
1198
|
+
const match = COMPACT_OFFSET_PATTERN.exec(value) ?? FIXED_OFFSET_PATTERN.exec(value);
|
|
1199
|
+
if (!match)
|
|
1200
|
+
return null;
|
|
1201
|
+
const [, sign, hours, minutes = '0', seconds = '0'] = match;
|
|
1202
|
+
if (Number(hours) > MAX_OFFSET_HOURS)
|
|
1203
|
+
return null;
|
|
1204
|
+
const magnitude = Number(hours) * MINUTES_PER_HOUR + Number(minutes) + Number(seconds) / SECONDS_PER_MINUTE;
|
|
1205
|
+
// Rounded because both date libraries expect whole minutes; only pre-1900 zones have a seconds part.
|
|
1206
|
+
return (sign === '-' ? -1 : 1) * Math.round(magnitude);
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* One `Intl.DateTimeFormat` per IANA zone: building it is the expensive part of resolving an offset, and
|
|
1210
|
+
* an application uses a handful of zones at most. A `null` entry marks a name `Intl` rejected, so an
|
|
1211
|
+
* invalid zone is reported once instead of throwing on every date.
|
|
1212
|
+
*
|
|
1213
|
+
* Bounded because the zone can come from unvalidated input — a cookie on the server, a picker in the
|
|
1214
|
+
* browser — and this map outlives every request in the process.
|
|
1215
|
+
*/
|
|
1216
|
+
const MAX_CACHED_FORMATTERS = 32;
|
|
1217
|
+
const offsetFormatters = new Map();
|
|
1218
|
+
const getOffsetFormatter = (timeZone) => {
|
|
1219
|
+
if (!offsetFormatters.has(timeZone)) {
|
|
1220
|
+
if (offsetFormatters.size >= MAX_CACHED_FORMATTERS) {
|
|
1221
|
+
offsetFormatters.delete(offsetFormatters.keys().next().value);
|
|
1222
|
+
}
|
|
1223
|
+
try {
|
|
1224
|
+
offsetFormatters.set(timeZone, new Intl.DateTimeFormat('en-US', { timeZone, timeZoneName: 'longOffset' }));
|
|
1225
|
+
}
|
|
1226
|
+
catch {
|
|
1227
|
+
if (isDevMode()) {
|
|
1228
|
+
// eslint-disable-next-line no-console
|
|
1229
|
+
console.warn(`Unknown time zone "${timeZone}", dates are left in the host time zone.`);
|
|
1230
|
+
}
|
|
1231
|
+
offsetFormatters.set(timeZone, null);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
return offsetFormatters.get(timeZone);
|
|
1235
|
+
};
|
|
1236
|
+
/**
|
|
1237
|
+
* Offset of `timezone` at `timestamp`, in minutes east of UTC. `null` means "leave the date in the host
|
|
1238
|
+
* zone" — either because `timezone` is `'system'`, or because it is a name no `Intl` implementation knows.
|
|
1239
|
+
*
|
|
1240
|
+
* Takes the instant because an IANA zone has no single offset: `'Europe/Berlin'` is +60 in January and
|
|
1241
|
+
* +120 in July, and one list of dates can span the change.
|
|
1242
|
+
*/
|
|
1243
|
+
const kbqResolveTimezoneOffset = (timezone, timestamp) => {
|
|
1244
|
+
if (timezone === 'system')
|
|
1245
|
+
return null;
|
|
1246
|
+
// Bounded and rounded like the string form: a numeric offset comes from the same unvalidated places,
|
|
1247
|
+
// and neither date library reads a fractional minute or a 99-hour offset as anything sensible.
|
|
1248
|
+
if (typeof timezone === 'number') {
|
|
1249
|
+
return Number.isFinite(timezone) && Math.abs(timezone) <= MAX_OFFSET_MINUTES ? Math.round(timezone) : null;
|
|
1250
|
+
}
|
|
1251
|
+
const fixedOffset = parseFixedOffset(timezone);
|
|
1252
|
+
if (fixedOffset !== null)
|
|
1253
|
+
return fixedOffset;
|
|
1254
|
+
// An invalid date has no offset to resolve, and `Intl` throws rather than saying so.
|
|
1255
|
+
if (!Number.isFinite(timestamp))
|
|
1256
|
+
return null;
|
|
1257
|
+
const timeZoneName = getOffsetFormatter(timezone)
|
|
1258
|
+
?.formatToParts(new Date(timestamp))
|
|
1259
|
+
.find(({ type }) => type === 'timeZoneName')?.value;
|
|
1260
|
+
return timeZoneName ? parseFixedOffset(timeZoneName) : null;
|
|
1261
|
+
};
|
|
1262
|
+
/**
|
|
1263
|
+
* Holds the time zone every date the library creates, parses and formats is rendered in.
|
|
1264
|
+
*
|
|
1265
|
+
* Provided in root, so {@link KBQ_DATE_TIMEZONE} in the application providers configures the whole
|
|
1266
|
+
* application. To scope a zone to one subtree, list {@link kbqDateTimezoneProvider} in that component's
|
|
1267
|
+
* `providers` together with the date adapter and the `DateFormatter`: the adapter captures the service of
|
|
1268
|
+
* the injector that created it, and keeps using it.
|
|
1269
|
+
*/
|
|
1270
|
+
class KbqDateTimezoneService {
|
|
1271
|
+
constructor() {
|
|
1272
|
+
this._timezone = signal(inject(KBQ_DATE_TIMEZONE, { optional: true }) ?? 'system', ...(ngDevMode ? [{ debugName: "_timezone" }] : []));
|
|
1273
|
+
this._changes = new Subject();
|
|
1274
|
+
this.timezone = this._timezone.asReadonly();
|
|
1275
|
+
this.changes = this._changes.asObservable();
|
|
1276
|
+
}
|
|
1277
|
+
/** Activates a time zone. */
|
|
1278
|
+
setTimezone(timezone) {
|
|
1279
|
+
this._timezone.set(timezone);
|
|
1280
|
+
this._changes.next(timezone);
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* Offset of the active zone at `timestamp`, in minutes east of UTC, or `null` when dates are left in
|
|
1284
|
+
* the host zone.
|
|
1285
|
+
*/
|
|
1286
|
+
offsetAt(timestamp) {
|
|
1287
|
+
return kbqResolveTimezoneOffset(this._timezone(), timestamp);
|
|
1288
|
+
}
|
|
1289
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDateTimezoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1290
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDateTimezoneService, providedIn: 'root' }); }
|
|
1291
|
+
}
|
|
1292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDateTimezoneService, decorators: [{
|
|
1293
|
+
type: Injectable,
|
|
1294
|
+
args: [{ providedIn: 'root' }]
|
|
1295
|
+
}], ctorParameters: () => [] });
|
|
1296
|
+
/**
|
|
1297
|
+
* Utility provider for the time zone dates are rendered in.
|
|
1298
|
+
*
|
|
1299
|
+
* Provides {@link KbqDateTimezoneService} alongside the token, so listing it in a component's `providers`
|
|
1300
|
+
* scopes the zone to that subtree instead of resolving the root service and silently doing nothing.
|
|
1301
|
+
*
|
|
1302
|
+
* @see KBQ_DATE_TIMEZONE
|
|
1303
|
+
*/
|
|
1304
|
+
const kbqDateTimezoneProvider = (timezone) => [
|
|
1305
|
+
KbqDateTimezoneService,
|
|
1306
|
+
{ provide: KBQ_DATE_TIMEZONE, useValue: timezone }
|
|
1307
|
+
];
|
|
1308
|
+
|
|
994
1309
|
/** Utility provider for `ErrorStateMatcher`. */
|
|
995
1310
|
const kbqErrorStateMatcherProvider = (errorStateMatcher) => {
|
|
996
1311
|
if (errorStateMatcher instanceof Type) {
|
|
@@ -1012,10 +1327,10 @@ class ShowOnFormSubmitErrorStateMatcher {
|
|
|
1012
1327
|
isErrorState(control, form) {
|
|
1013
1328
|
return !!(control?.invalid && form?.submitted);
|
|
1014
1329
|
}
|
|
1015
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1016
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1330
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowOnFormSubmitErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1331
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowOnFormSubmitErrorStateMatcher }); }
|
|
1017
1332
|
}
|
|
1018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowOnFormSubmitErrorStateMatcher, decorators: [{
|
|
1019
1334
|
type: Injectable
|
|
1020
1335
|
}] });
|
|
1021
1336
|
/**
|
|
@@ -1029,10 +1344,10 @@ class ShowRequiredOnSubmitErrorStateMatcher {
|
|
|
1029
1344
|
? !!(control?.invalid && form?.submitted)
|
|
1030
1345
|
: !!(control?.invalid && control.touched);
|
|
1031
1346
|
}
|
|
1032
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1033
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1347
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowRequiredOnSubmitErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1348
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowRequiredOnSubmitErrorStateMatcher }); }
|
|
1034
1349
|
}
|
|
1035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowRequiredOnSubmitErrorStateMatcher, decorators: [{
|
|
1036
1351
|
type: Injectable
|
|
1037
1352
|
}] });
|
|
1038
1353
|
/** Error state matcher that matches when a control is invalid and dirty or form is submitted. */
|
|
@@ -1040,10 +1355,10 @@ class ShowOnControlDirtyErrorStateMatcher {
|
|
|
1040
1355
|
isErrorState(control, form) {
|
|
1041
1356
|
return !!(control?.invalid && (control.dirty || form?.submitted));
|
|
1042
1357
|
}
|
|
1043
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1044
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1358
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowOnControlDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1359
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowOnControlDirtyErrorStateMatcher }); }
|
|
1045
1360
|
}
|
|
1046
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ShowOnControlDirtyErrorStateMatcher, decorators: [{
|
|
1047
1362
|
type: Injectable
|
|
1048
1363
|
}] });
|
|
1049
1364
|
/**
|
|
@@ -1054,10 +1369,10 @@ class ErrorStateMatcher {
|
|
|
1054
1369
|
isErrorState(control, form) {
|
|
1055
1370
|
return !!(control?.invalid && (control.touched || form?.submitted));
|
|
1056
1371
|
}
|
|
1057
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1058
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1372
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1373
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' }); }
|
|
1059
1374
|
}
|
|
1060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ErrorStateMatcher, decorators: [{
|
|
1061
1376
|
type: Injectable,
|
|
1062
1377
|
args: [{ providedIn: 'root' }]
|
|
1063
1378
|
}] });
|
|
@@ -1079,39 +1394,72 @@ const KBQ_WINDOW = new InjectionToken('[KBQ_WINDOW]', {
|
|
|
1079
1394
|
}
|
|
1080
1395
|
});
|
|
1081
1396
|
|
|
1082
|
-
const INITIAL_PROPERTIES = {
|
|
1083
|
-
all: 'initial',
|
|
1084
|
-
position: 'absolute',
|
|
1085
|
-
top: coerceCssPixelValue(0),
|
|
1086
|
-
left: coerceCssPixelValue(0),
|
|
1087
|
-
width: coerceCssPixelValue(0),
|
|
1088
|
-
height: coerceCssPixelValue(0),
|
|
1089
|
-
visibility: 'hidden',
|
|
1090
|
-
overflow: 'scroll',
|
|
1091
|
-
whiteSpace: 'pre',
|
|
1092
|
-
pointerEvents: 'none'
|
|
1093
|
-
};
|
|
1094
1397
|
/**
|
|
1095
|
-
* Properties that
|
|
1398
|
+
* Properties that affect the rendered width of the text and have to be mirrored onto the ruler.
|
|
1399
|
+
*
|
|
1400
|
+
* `font-variant` is deliberately absent: the shorthand does not round-trip through the computed style
|
|
1401
|
+
* once a field sets more than one of its longhands, so the longhands are copied instead.
|
|
1096
1402
|
*/
|
|
1097
|
-
const
|
|
1403
|
+
const RULER_INHERITED_PROPERTIES = [
|
|
1098
1404
|
'font',
|
|
1099
1405
|
'fontFamily',
|
|
1100
1406
|
'fontFeatureSettings',
|
|
1101
1407
|
'fontKerning',
|
|
1102
1408
|
'fontOpticalSizing',
|
|
1103
|
-
'fontSizeAdjust',
|
|
1104
1409
|
'fontSize',
|
|
1410
|
+
'fontSizeAdjust',
|
|
1105
1411
|
'fontStretch',
|
|
1412
|
+
'fontStyle',
|
|
1106
1413
|
'fontSynthesis',
|
|
1107
|
-
'
|
|
1414
|
+
'fontVariantCaps',
|
|
1415
|
+
'fontVariantEastAsian',
|
|
1108
1416
|
'fontVariantLigatures',
|
|
1417
|
+
'fontVariantNumeric',
|
|
1109
1418
|
'fontVariationSettings',
|
|
1110
1419
|
'fontWeight',
|
|
1111
1420
|
'letterSpacing',
|
|
1112
1421
|
'textIndent',
|
|
1113
1422
|
'textTransform'
|
|
1114
1423
|
];
|
|
1424
|
+
const RULER_PROPERTIES = {
|
|
1425
|
+
all: 'initial',
|
|
1426
|
+
position: 'absolute',
|
|
1427
|
+
top: '0px',
|
|
1428
|
+
left: '0px',
|
|
1429
|
+
width: '0px',
|
|
1430
|
+
height: '0px',
|
|
1431
|
+
visibility: 'hidden',
|
|
1432
|
+
overflow: 'scroll',
|
|
1433
|
+
whiteSpace: 'pre',
|
|
1434
|
+
pointerEvents: 'none'
|
|
1435
|
+
};
|
|
1436
|
+
/**
|
|
1437
|
+
* Builds a hidden element that renders text with the typography of the element `computedStyle` was taken
|
|
1438
|
+
* from. Append it to the document, measure through {@link kbqMeasureRulerText}, and remove it.
|
|
1439
|
+
*
|
|
1440
|
+
* @docs-private
|
|
1441
|
+
*/
|
|
1442
|
+
const kbqCreateTextRuler = (document, computedStyle) => {
|
|
1443
|
+
const ruler = document.createElement('span');
|
|
1444
|
+
Object.assign(ruler.style, RULER_PROPERTIES);
|
|
1445
|
+
RULER_INHERITED_PROPERTIES.forEach((property) => {
|
|
1446
|
+
ruler.style[property] = computedStyle[property];
|
|
1447
|
+
});
|
|
1448
|
+
return ruler;
|
|
1449
|
+
};
|
|
1450
|
+
/**
|
|
1451
|
+
* Width of `text` in pixels, in the same coordinate space as `clientWidth` and `scrollLeft`.
|
|
1452
|
+
*
|
|
1453
|
+
* `scrollWidth`, not `getBoundingClientRect()`: the latter reports the transformed box, which disagrees
|
|
1454
|
+
* with the untransformed layout metrics it would be compared against under a scaled ancestor.
|
|
1455
|
+
*
|
|
1456
|
+
* @docs-private
|
|
1457
|
+
*/
|
|
1458
|
+
const kbqMeasureRulerText = (ruler, text) => {
|
|
1459
|
+
ruler.textContent = text;
|
|
1460
|
+
return ruler.scrollWidth;
|
|
1461
|
+
};
|
|
1462
|
+
|
|
1115
1463
|
/**
|
|
1116
1464
|
* Properties that should be added to the width when `box-sizing: border-box` is applied.
|
|
1117
1465
|
*/
|
|
@@ -1149,34 +1497,24 @@ class KbqFieldSizingContent {
|
|
|
1149
1497
|
}
|
|
1150
1498
|
setupWidth() {
|
|
1151
1499
|
const computedStyle = this.window.getComputedStyle(this.element);
|
|
1152
|
-
const ruler = this.
|
|
1153
|
-
|
|
1154
|
-
// We should add space to prevent text truncation in Safari/Firefox
|
|
1155
|
-
if (ruler.textContent)
|
|
1156
|
-
ruler.textContent += ' ';
|
|
1500
|
+
const ruler = kbqCreateTextRuler(this.document, computedStyle);
|
|
1501
|
+
const text = this.element.value || this.element.placeholder || '';
|
|
1157
1502
|
this.renderer.appendChild(this.document.body, ruler);
|
|
1158
|
-
|
|
1503
|
+
// We should add space to prevent text truncation in Safari/Firefox
|
|
1504
|
+
const width = this.calculateWidth(kbqMeasureRulerText(ruler, text && `${text} `), computedStyle);
|
|
1159
1505
|
this.renderer.setStyle(this.element, 'width', coerceCssPixelValue(width));
|
|
1160
1506
|
this.renderer.removeChild(this.document.body, ruler);
|
|
1161
1507
|
}
|
|
1162
|
-
|
|
1163
|
-
const ruler = this.renderer.createElement('span');
|
|
1164
|
-
Object.assign(ruler.style, INITIAL_PROPERTIES);
|
|
1165
|
-
WIDTH_INHERITED_PROPERTIES.forEach((property) => {
|
|
1166
|
-
ruler.style[property] = computedStyle[property];
|
|
1167
|
-
});
|
|
1168
|
-
return ruler;
|
|
1169
|
-
}
|
|
1170
|
-
calculateWidth(ruler, computedStyle) {
|
|
1508
|
+
calculateWidth(textWidth, computedStyle) {
|
|
1171
1509
|
if (computedStyle.boxSizing === 'border-box') {
|
|
1172
|
-
return BOX_SIZING_BORDER_BOX_WIDTH_PROPERTIES.reduce((width, property) => width + (parseFloat(computedStyle[property]) || 0),
|
|
1510
|
+
return BOX_SIZING_BORDER_BOX_WIDTH_PROPERTIES.reduce((width, property) => width + (parseFloat(computedStyle[property]) || 0), textWidth);
|
|
1173
1511
|
}
|
|
1174
|
-
return
|
|
1512
|
+
return textWidth;
|
|
1175
1513
|
}
|
|
1176
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1177
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
1514
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFieldSizingContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1515
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqFieldSizingContent, isStandalone: true, selector: "[kbqFieldSizingContent]", host: { classAttribute: "kbq-field-sizing-content" }, exportAs: ["kbqFieldSizingContent"], ngImport: i0 }); }
|
|
1178
1516
|
}
|
|
1179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFieldSizingContent, decorators: [{
|
|
1180
1518
|
type: Directive,
|
|
1181
1519
|
args: [{
|
|
1182
1520
|
selector: '[kbqFieldSizingContent]',
|
|
@@ -1192,12 +1530,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1192
1530
|
* as alternative token to the actual `KbqFormField` class which would cause unnecessary
|
|
1193
1531
|
* retention of the `KbqFormField` class and its component metadata.
|
|
1194
1532
|
*
|
|
1195
|
-
* @
|
|
1533
|
+
* @deprecated Use `KBQ_FORM_FIELD` from `@koobiq/components/form-field`.
|
|
1534
|
+
*
|
|
1535
|
+
* @docs-private
|
|
1196
1536
|
*/
|
|
1197
1537
|
const KBQ_FORM_FIELD_REF = new InjectionToken('KbqFormFieldRef');
|
|
1538
|
+
/**
|
|
1539
|
+
* Injection token for `KbqConnectedOverlayOriginProvider`. Provide it on an ancestor
|
|
1540
|
+
* component to redirect where a nested `KbqFormField`'s control positions its overlay.
|
|
1541
|
+
*/
|
|
1542
|
+
const KBQ_CONNECTED_OVERLAY_ORIGIN = new InjectionToken('KbqConnectedOverlayOrigin');
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Scrolls a text field horizontally so that its current selection is visible.
|
|
1546
|
+
*
|
|
1547
|
+
* Browsers scroll a field to the caret only for edits the user makes: a selection set from script leaves
|
|
1548
|
+
* the field at whatever offset the last keystroke produced. A masked field re-renders its value and moves
|
|
1549
|
+
* the caret between value parts on every keystroke, so without this the field keeps the offset of the part
|
|
1550
|
+
* that was edited before and clips the one being edited now.
|
|
1551
|
+
*
|
|
1552
|
+
* Leaves the field alone when it is not focused, when it renders something other than its value, and in
|
|
1553
|
+
* right-to-left text, where the browser's own caret following is already correct.
|
|
1554
|
+
*/
|
|
1555
|
+
const kbqRevealSelection = (element) => {
|
|
1556
|
+
const document = element.ownerDocument;
|
|
1557
|
+
const window = document.defaultView;
|
|
1558
|
+
// A field the user has left is the browser's to scroll: it resets the offset on blur, and a write
|
|
1559
|
+
// landing after that would park the field mid-value until it is focused again.
|
|
1560
|
+
if (!window || document.activeElement !== element) {
|
|
1561
|
+
return;
|
|
1562
|
+
}
|
|
1563
|
+
// A password field renders bullets, which are not the widths of the characters behind them.
|
|
1564
|
+
if (element.type === 'password') {
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
const maxScrollLeft = element.scrollWidth - element.clientWidth;
|
|
1568
|
+
// The value fits, so any offset the field is left at is an artifact of an earlier, longer value.
|
|
1569
|
+
if (maxScrollLeft <= 0) {
|
|
1570
|
+
element.scrollLeft = 0;
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
const computedStyle = window.getComputedStyle(element);
|
|
1574
|
+
// Every offset below is measured from the left edge, while an RTL field scrolls into negative
|
|
1575
|
+
// `scrollLeft`. Mirroring that needs the visual order of a bidi line rather than a prefix of the
|
|
1576
|
+
// value, so the browser's own caret following is left in place instead of being overwritten.
|
|
1577
|
+
if (computedStyle.direction === 'rtl') {
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
const { value, selectionStart, selectionEnd, clientWidth } = element;
|
|
1581
|
+
const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
|
|
1582
|
+
const paddingRight = parseFloat(computedStyle.paddingRight) || 0;
|
|
1583
|
+
const ruler = kbqCreateTextRuler(document, computedStyle);
|
|
1584
|
+
document.body.appendChild(ruler);
|
|
1585
|
+
// `scrollLeft` is measured from the start of the padding box, the text starts one `padding-left` in.
|
|
1586
|
+
const start = paddingLeft + kbqMeasureRulerText(ruler, value.slice(0, selectionStart ?? 0));
|
|
1587
|
+
// A caret is the common case on the typing path, and measuring it twice costs a second layout.
|
|
1588
|
+
const end = selectionEnd === selectionStart
|
|
1589
|
+
? start
|
|
1590
|
+
: paddingLeft + kbqMeasureRulerText(ruler, value.slice(0, selectionEnd ?? 0));
|
|
1591
|
+
ruler.remove();
|
|
1592
|
+
// The smallest offset that still shows the selection, so that as much as possible of what precedes it
|
|
1593
|
+
// stays on screen. Deriving the offset from the selection alone, instead of nudging the current one,
|
|
1594
|
+
// keeps the result independent of where the last keystroke happened to leave the field.
|
|
1595
|
+
const minimumRevealingEnd = Math.max(end + paddingRight - clientWidth, 0);
|
|
1596
|
+
// A selection wider than the field cannot be shown whole; its start is the half worth keeping.
|
|
1597
|
+
const maximumKeepingStart = Math.max(start - paddingLeft, 0);
|
|
1598
|
+
element.scrollLeft = Math.min(minimumRevealingEnd, maximumKeepingStart, maxScrollLeft);
|
|
1599
|
+
};
|
|
1600
|
+
/**
|
|
1601
|
+
* Selects the `[start, end]` range of a text field and keeps it visible.
|
|
1602
|
+
*
|
|
1603
|
+
* @see {@link kbqRevealSelection}
|
|
1604
|
+
*/
|
|
1605
|
+
const kbqSetSelectionRange = (element, start, end) => {
|
|
1606
|
+
element.setSelectionRange(start, end);
|
|
1607
|
+
kbqRevealSelection(element);
|
|
1608
|
+
};
|
|
1198
1609
|
|
|
1199
1610
|
const enUSLocaleData = {
|
|
1200
|
-
|
|
1611
|
+
a11y: {
|
|
1612
|
+
close: 'Close',
|
|
1613
|
+
save: 'Save',
|
|
1614
|
+
cancel: 'Cancel',
|
|
1615
|
+
removeAll: 'Remove all',
|
|
1616
|
+
expandBreadcrumbs: 'Show hidden breadcrumbs',
|
|
1617
|
+
previousMonth: 'Previous month',
|
|
1618
|
+
currentDate: 'Current date',
|
|
1619
|
+
nextMonth: 'Next month',
|
|
1620
|
+
clear: 'Clear',
|
|
1621
|
+
showPassword: 'Show password',
|
|
1622
|
+
hidePassword: 'Hide password',
|
|
1623
|
+
resizeColumns: 'Resize columns'
|
|
1624
|
+
},
|
|
1625
|
+
select: { hiddenItemsText: '+{{ number }}', selectAll: 'Select all' },
|
|
1201
1626
|
datepicker: {
|
|
1202
1627
|
placeholder: 'yyyy-mm-dd',
|
|
1203
1628
|
dateInput: 'yyyy-MM-dd'
|
|
@@ -1291,6 +1716,8 @@ const enUSLocaleData = {
|
|
|
1291
1716
|
customPeriodFrom: 'from',
|
|
1292
1717
|
customPeriodTo: 'to',
|
|
1293
1718
|
customPeriodErrorHint: 'The period cannot start later than it ends',
|
|
1719
|
+
customPeriodMinIntervalErrorHint: 'The period cannot be shorter than {{ value }}',
|
|
1720
|
+
customPeriodMaxIntervalErrorHint: 'The period cannot be longer than {{ value }}',
|
|
1294
1721
|
backToPeriodSelection: 'Back'
|
|
1295
1722
|
}
|
|
1296
1723
|
},
|
|
@@ -1423,7 +1850,24 @@ const enUSLocaleData = {
|
|
|
1423
1850
|
};
|
|
1424
1851
|
|
|
1425
1852
|
const esLALocaleData = {
|
|
1426
|
-
|
|
1853
|
+
a11y: {
|
|
1854
|
+
close: 'Cerrar',
|
|
1855
|
+
save: 'Guardar',
|
|
1856
|
+
cancel: 'Cancelar',
|
|
1857
|
+
removeAll: 'Eliminar todo',
|
|
1858
|
+
expandBreadcrumbs: 'Mostrar elementos ocultos',
|
|
1859
|
+
previousMonth: 'Mes anterior',
|
|
1860
|
+
currentDate: 'Fecha actual',
|
|
1861
|
+
nextMonth: 'Mes siguiente',
|
|
1862
|
+
clear: 'Borrar',
|
|
1863
|
+
showPassword: 'Mostrar la contraseña',
|
|
1864
|
+
hidePassword: 'Ocultar la contraseña',
|
|
1865
|
+
resizeColumns: 'Redimensionar columnas'
|
|
1866
|
+
},
|
|
1867
|
+
select: {
|
|
1868
|
+
hiddenItemsText: '+{{ number }}',
|
|
1869
|
+
selectAll: 'Seleccionar todo'
|
|
1870
|
+
},
|
|
1427
1871
|
datepicker: {
|
|
1428
1872
|
placeholder: 'dd/mm/aaaa'
|
|
1429
1873
|
},
|
|
@@ -1516,6 +1960,8 @@ const esLALocaleData = {
|
|
|
1516
1960
|
customPeriodFrom: 'desde',
|
|
1517
1961
|
customPeriodTo: 'hasta',
|
|
1518
1962
|
customPeriodErrorHint: 'El inicio del período no puede estar después del fin',
|
|
1963
|
+
customPeriodMinIntervalErrorHint: 'El período no puede ser más corto que {{ value }}',
|
|
1964
|
+
customPeriodMaxIntervalErrorHint: 'El período no puede ser más largo que {{ value }}',
|
|
1519
1965
|
backToPeriodSelection: 'Atrás'
|
|
1520
1966
|
}
|
|
1521
1967
|
},
|
|
@@ -1647,73 +2093,284 @@ const esLALocaleData = {
|
|
|
1647
2093
|
}
|
|
1648
2094
|
};
|
|
1649
2095
|
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
2096
|
+
const enUSFormattersData = {
|
|
2097
|
+
formatters: {
|
|
2098
|
+
number: {
|
|
2099
|
+
rounding: {
|
|
2100
|
+
separator: '',
|
|
2101
|
+
groupSeparator: '.',
|
|
2102
|
+
thousand: 'K',
|
|
2103
|
+
million: 'M',
|
|
2104
|
+
billion: 'B',
|
|
2105
|
+
trillion: 'T'
|
|
2106
|
+
}
|
|
1659
2107
|
}
|
|
1660
2108
|
},
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
captionTextWithFolder: 'Arrastar o arquivo aqui ou {{ browseLink }} ou {{ browseLinkFolderMixed }}',
|
|
1666
|
-
browseLink: 'escolher',
|
|
1667
|
-
browseLinkFolder: 'pasta',
|
|
1668
|
-
browseLinkFolderMixed: 'pasta'
|
|
1669
|
-
},
|
|
1670
|
-
multiple: {
|
|
1671
|
-
captionText: 'Arrastar aqui ou {{ browseLink }}',
|
|
1672
|
-
captionTextOnlyFolder: 'Arrastar aqui ou {{ browseLinkFolder }}',
|
|
1673
|
-
captionTextWithFolder: 'Arrastar aqui ou {{ browseLink }} ou {{ browseLinkFolderMixed }}',
|
|
1674
|
-
captionTextWhenSelected: 'Arrastar mais arquivos aqui ou {{ browseLink }}',
|
|
1675
|
-
captionTextForCompactSize: 'Arrastar arquivos ou {{ browseLink }}',
|
|
1676
|
-
browseLink: 'escolher',
|
|
1677
|
-
browseLinkFolder: 'pasta',
|
|
1678
|
-
browseLinkFolderMixed: 'pasta',
|
|
1679
|
-
title: 'Carregar arquivos'
|
|
2109
|
+
input: {
|
|
2110
|
+
number: {
|
|
2111
|
+
groupSeparator: [','],
|
|
2112
|
+
fractionSeparator: '.'
|
|
1680
2113
|
}
|
|
1681
2114
|
},
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
2115
|
+
sizeUnits: {
|
|
2116
|
+
defaultUnitSystem: 'SI',
|
|
2117
|
+
defaultPrecision: 2,
|
|
2118
|
+
unitSystems: {
|
|
2119
|
+
SI: {
|
|
2120
|
+
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2121
|
+
base: 10,
|
|
2122
|
+
power: 3
|
|
2123
|
+
},
|
|
2124
|
+
IEC: {
|
|
2125
|
+
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2126
|
+
base: 2,
|
|
2127
|
+
power: 10
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
};
|
|
2132
|
+
const esLAFormattersData = {
|
|
2133
|
+
formatters: {
|
|
2134
|
+
number: {
|
|
2135
|
+
rounding: {
|
|
2136
|
+
separator: '',
|
|
2137
|
+
groupSeparator: ',',
|
|
2138
|
+
thousand: 'K',
|
|
2139
|
+
million: 'M',
|
|
2140
|
+
billion: 'MRD',
|
|
2141
|
+
trillion: 'B'
|
|
2142
|
+
},
|
|
2143
|
+
decimal: {
|
|
2144
|
+
viewGroupSeparator: '\u2009'
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
1694
2147
|
},
|
|
1695
|
-
|
|
1696
|
-
|
|
2148
|
+
input: {
|
|
2149
|
+
number: {
|
|
2150
|
+
// nbsp is generated automatically and used by default in spec
|
|
2151
|
+
groupSeparator: [' ', ' ', '\u2009'],
|
|
2152
|
+
fractionSeparator: ',',
|
|
2153
|
+
viewGroupSeparator: '\u2009'
|
|
2154
|
+
}
|
|
1697
2155
|
},
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
2156
|
+
sizeUnits: {
|
|
2157
|
+
defaultUnitSystem: 'SI',
|
|
2158
|
+
defaultPrecision: 2,
|
|
2159
|
+
unitSystems: {
|
|
2160
|
+
SI: {
|
|
2161
|
+
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2162
|
+
base: 10,
|
|
2163
|
+
power: 3
|
|
2164
|
+
},
|
|
2165
|
+
IEC: {
|
|
2166
|
+
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2167
|
+
base: 2,
|
|
2168
|
+
power: 10
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
};
|
|
2173
|
+
const ptBRFormattersData = {
|
|
2174
|
+
formatters: {
|
|
2175
|
+
number: {
|
|
2176
|
+
rounding: {
|
|
2177
|
+
separator: ' ',
|
|
2178
|
+
groupSeparator: ',',
|
|
2179
|
+
thousand: 'mil',
|
|
2180
|
+
million: 'mi',
|
|
2181
|
+
billion: 'bi',
|
|
2182
|
+
trillion: 'tri'
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
},
|
|
2186
|
+
input: {
|
|
2187
|
+
number: {
|
|
2188
|
+
groupSeparator: ['.'],
|
|
2189
|
+
fractionSeparator: ','
|
|
2190
|
+
}
|
|
2191
|
+
},
|
|
2192
|
+
sizeUnits: {
|
|
2193
|
+
defaultUnitSystem: 'SI',
|
|
2194
|
+
defaultPrecision: 2,
|
|
2195
|
+
unitSystems: {
|
|
2196
|
+
SI: {
|
|
2197
|
+
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2198
|
+
base: 10,
|
|
2199
|
+
power: 3
|
|
2200
|
+
},
|
|
2201
|
+
IEC: {
|
|
2202
|
+
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2203
|
+
base: 2,
|
|
2204
|
+
power: 10
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
};
|
|
2209
|
+
const ruRUFormattersData = {
|
|
2210
|
+
formatters: {
|
|
2211
|
+
number: {
|
|
2212
|
+
rounding: {
|
|
2213
|
+
separator: ' ',
|
|
2214
|
+
groupSeparator: ',',
|
|
2215
|
+
thousand: 'К',
|
|
2216
|
+
million: 'М',
|
|
2217
|
+
// Latin `B` (U+0042) according to UX Guidelines.
|
|
2218
|
+
billion: 'B',
|
|
2219
|
+
trillion: 'Т'
|
|
2220
|
+
},
|
|
2221
|
+
decimal: {
|
|
2222
|
+
viewGroupSeparator: '\u2009'
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
},
|
|
2226
|
+
input: {
|
|
2227
|
+
number: {
|
|
2228
|
+
// nbsp is generated automatically and used by default in spec
|
|
2229
|
+
groupSeparator: [' ', ' ', '\u2009'],
|
|
2230
|
+
fractionSeparator: ',',
|
|
2231
|
+
startFormattingFrom: 4,
|
|
2232
|
+
viewGroupSeparator: '\u2009'
|
|
2233
|
+
}
|
|
2234
|
+
},
|
|
2235
|
+
sizeUnits: {
|
|
2236
|
+
defaultUnitSystem: 'SI',
|
|
2237
|
+
defaultPrecision: 2,
|
|
2238
|
+
unitSystems: {
|
|
2239
|
+
SI: {
|
|
2240
|
+
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
2241
|
+
base: 10,
|
|
2242
|
+
power: 3
|
|
2243
|
+
},
|
|
2244
|
+
IEC: {
|
|
2245
|
+
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
2246
|
+
base: 2,
|
|
2247
|
+
power: 10
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
};
|
|
2252
|
+
const tkTMFormattersData = {
|
|
2253
|
+
formatters: {
|
|
2254
|
+
number: {
|
|
2255
|
+
rounding: {
|
|
2256
|
+
separator: ' ',
|
|
2257
|
+
groupSeparator: '',
|
|
2258
|
+
thousand: 'M',
|
|
2259
|
+
million: 'Mn',
|
|
2260
|
+
billion: 'Mr',
|
|
2261
|
+
trillion: 'Tn'
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
},
|
|
2265
|
+
input: {
|
|
2266
|
+
number: {
|
|
2267
|
+
groupSeparator: [' ', ' ', '\u2009'],
|
|
2268
|
+
fractionSeparator: ',',
|
|
2269
|
+
viewGroupSeparator: '\u2009'
|
|
2270
|
+
}
|
|
2271
|
+
},
|
|
2272
|
+
sizeUnits: {
|
|
2273
|
+
defaultUnitSystem: 'SI',
|
|
2274
|
+
defaultPrecision: 2,
|
|
2275
|
+
unitSystems: {
|
|
2276
|
+
SI: {
|
|
2277
|
+
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2278
|
+
base: 10,
|
|
2279
|
+
power: 3
|
|
2280
|
+
},
|
|
2281
|
+
IEC: {
|
|
2282
|
+
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2283
|
+
base: 2,
|
|
2284
|
+
power: 10
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
|
|
2290
|
+
const ptBRLocaleData = {
|
|
2291
|
+
a11y: {
|
|
2292
|
+
close: 'Fechar',
|
|
2293
|
+
save: 'Salvar',
|
|
2294
|
+
cancel: 'Cancelar',
|
|
2295
|
+
removeAll: 'Remover tudo',
|
|
2296
|
+
expandBreadcrumbs: 'Mostrar itens ocultos',
|
|
2297
|
+
previousMonth: 'Mês anterior',
|
|
2298
|
+
currentDate: 'Data atual',
|
|
2299
|
+
nextMonth: 'Próximo mês',
|
|
2300
|
+
clear: 'Apagar',
|
|
2301
|
+
showPassword: 'Mostrar a senha',
|
|
2302
|
+
hidePassword: 'Ocultar a senha',
|
|
2303
|
+
resizeColumns: 'Redimensionar colunas'
|
|
2304
|
+
},
|
|
2305
|
+
select: {
|
|
2306
|
+
hiddenItemsText: '+{{ number }}',
|
|
2307
|
+
selectAll: 'Selecionar tudo'
|
|
2308
|
+
},
|
|
2309
|
+
datepicker: {
|
|
2310
|
+
placeholder: 'dd/mm/yyyy'
|
|
2311
|
+
},
|
|
2312
|
+
timepicker: {
|
|
2313
|
+
placeholder: {
|
|
2314
|
+
full: 'hh:mm:ss',
|
|
2315
|
+
short: 'hh:mm'
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
fileUpload: {
|
|
2319
|
+
single: {
|
|
2320
|
+
captionText: 'Arrastar o arquivo aqui ou {{ browseLink }}',
|
|
2321
|
+
captionTextOnlyFolder: 'Arrastar o arquivo aqui ou {{ browseLinkFolder }}',
|
|
2322
|
+
captionTextWithFolder: 'Arrastar o arquivo aqui ou {{ browseLink }} ou {{ browseLinkFolderMixed }}',
|
|
2323
|
+
browseLink: 'escolher',
|
|
2324
|
+
browseLinkFolder: 'pasta',
|
|
2325
|
+
browseLinkFolderMixed: 'pasta'
|
|
2326
|
+
},
|
|
2327
|
+
multiple: {
|
|
2328
|
+
captionText: 'Arrastar aqui ou {{ browseLink }}',
|
|
2329
|
+
captionTextOnlyFolder: 'Arrastar aqui ou {{ browseLinkFolder }}',
|
|
2330
|
+
captionTextWithFolder: 'Arrastar aqui ou {{ browseLink }} ou {{ browseLinkFolderMixed }}',
|
|
2331
|
+
captionTextWhenSelected: 'Arrastar mais arquivos aqui ou {{ browseLink }}',
|
|
2332
|
+
captionTextForCompactSize: 'Arrastar arquivos ou {{ browseLink }}',
|
|
2333
|
+
browseLink: 'escolher',
|
|
2334
|
+
browseLinkFolder: 'pasta',
|
|
2335
|
+
browseLinkFolderMixed: 'pasta',
|
|
2336
|
+
title: 'Carregar arquivos'
|
|
2337
|
+
}
|
|
2338
|
+
},
|
|
2339
|
+
codeBlock: {
|
|
2340
|
+
softWrapOnTooltip: 'Ativar quebra de linha',
|
|
2341
|
+
softWrapOffTooltip: 'Desativar quebra de linha',
|
|
2342
|
+
downloadTooltip: 'Baixar',
|
|
2343
|
+
copiedTooltip: '✓ Copiado',
|
|
2344
|
+
copyTooltip: 'Copiar',
|
|
2345
|
+
viewAllText: 'Mostrar todos',
|
|
2346
|
+
viewLessText: 'Mostrar menos',
|
|
2347
|
+
openExternalSystemTooltip: 'Abrir em sistema externo'
|
|
2348
|
+
},
|
|
2349
|
+
timezone: {
|
|
2350
|
+
searchPlaceholder: 'Cidade ou fuso horário'
|
|
2351
|
+
},
|
|
2352
|
+
actionsPanel: {
|
|
2353
|
+
closeTooltip: 'Desmarcar'
|
|
2354
|
+
},
|
|
2355
|
+
filterBar: {
|
|
2356
|
+
reset: {
|
|
2357
|
+
buttonName: 'Reconfigurar'
|
|
2358
|
+
},
|
|
2359
|
+
search: {
|
|
2360
|
+
tooltip: 'Buscar',
|
|
2361
|
+
placeholder: 'Buscar'
|
|
2362
|
+
},
|
|
2363
|
+
filters: {
|
|
2364
|
+
defaultName: 'Filtros',
|
|
2365
|
+
saveNewFilterTooltip: 'Salve o filtro novo',
|
|
2366
|
+
searchPlaceholder: 'Buscar',
|
|
2367
|
+
searchEmptyResult: 'Nada encontrado',
|
|
2368
|
+
saveAsNewFilter: 'Salve o filtro novo',
|
|
2369
|
+
saveChanges: 'Salve as mudanças',
|
|
2370
|
+
saveAsNew: 'Salve como novo',
|
|
2371
|
+
change: 'Editar',
|
|
2372
|
+
resetChanges: 'Reconfigurar',
|
|
2373
|
+
remove: 'Deletar',
|
|
1717
2374
|
name: 'Nome',
|
|
1718
2375
|
error: 'A busca com esse nome já existe',
|
|
1719
2376
|
errorHint: 'O filtro não pôde ser salvo. Tente de novo ou entre em contato com o administrador.',
|
|
@@ -1741,6 +2398,8 @@ const ptBRLocaleData = {
|
|
|
1741
2398
|
customPeriodFrom: 'de',
|
|
1742
2399
|
customPeriodTo: 'até',
|
|
1743
2400
|
customPeriodErrorHint: 'O período não pode começar depois de quando acaba',
|
|
2401
|
+
customPeriodMinIntervalErrorHint: 'O período não pode ser menor que {{ value }}',
|
|
2402
|
+
customPeriodMaxIntervalErrorHint: 'O período não pode ser maior que {{ value }}',
|
|
1744
2403
|
backToPeriodSelection: 'Voltar'
|
|
1745
2404
|
}
|
|
1746
2405
|
},
|
|
@@ -1873,7 +2532,21 @@ const ptBRLocaleData = {
|
|
|
1873
2532
|
};
|
|
1874
2533
|
|
|
1875
2534
|
const ruRULocaleData = {
|
|
1876
|
-
|
|
2535
|
+
a11y: {
|
|
2536
|
+
close: 'Закрыть',
|
|
2537
|
+
save: 'Сохранить',
|
|
2538
|
+
cancel: 'Отменить',
|
|
2539
|
+
removeAll: 'Удалить все',
|
|
2540
|
+
expandBreadcrumbs: 'Показать скрытые элементы',
|
|
2541
|
+
previousMonth: 'Предыдущий месяц',
|
|
2542
|
+
currentDate: 'Текущая дата',
|
|
2543
|
+
nextMonth: 'Следующий месяц',
|
|
2544
|
+
clear: 'Очистить',
|
|
2545
|
+
showPassword: 'Показать пароль',
|
|
2546
|
+
hidePassword: 'Скрыть пароль',
|
|
2547
|
+
resizeColumns: 'Изменить ширину колонок'
|
|
2548
|
+
},
|
|
2549
|
+
select: { hiddenItemsText: '+{{ number }}', selectAll: 'Выбрать все' },
|
|
1877
2550
|
datepicker: {
|
|
1878
2551
|
placeholder: 'дд.мм.гггг',
|
|
1879
2552
|
dateInput: 'dd.MM.yyyy'
|
|
@@ -1967,6 +2640,8 @@ const ruRULocaleData = {
|
|
|
1967
2640
|
customPeriodFrom: 'с',
|
|
1968
2641
|
customPeriodTo: 'по',
|
|
1969
2642
|
customPeriodErrorHint: 'Начало периода не может быть позже окончания',
|
|
2643
|
+
customPeriodMinIntervalErrorHint: 'Период не может быть короче {{ value }}',
|
|
2644
|
+
customPeriodMaxIntervalErrorHint: 'Период не может быть длиннее {{ value }}',
|
|
1970
2645
|
backToPeriodSelection: 'Назад'
|
|
1971
2646
|
}
|
|
1972
2647
|
},
|
|
@@ -2113,7 +2788,24 @@ const ruRULocaleData = {
|
|
|
2113
2788
|
};
|
|
2114
2789
|
|
|
2115
2790
|
const tkTMLocaleData = {
|
|
2116
|
-
|
|
2791
|
+
a11y: {
|
|
2792
|
+
close: 'Ýap',
|
|
2793
|
+
save: 'Ýazdyr',
|
|
2794
|
+
cancel: 'Ýatyr',
|
|
2795
|
+
removeAll: 'Ählisini aýyr',
|
|
2796
|
+
expandBreadcrumbs: 'Gizlenen elementleri görkez',
|
|
2797
|
+
previousMonth: 'Öňki aý',
|
|
2798
|
+
currentDate: 'Şu günki sene',
|
|
2799
|
+
nextMonth: 'Indiki aý',
|
|
2800
|
+
clear: 'Arassala',
|
|
2801
|
+
showPassword: 'Paroly görkez',
|
|
2802
|
+
hidePassword: 'Paroly gizle',
|
|
2803
|
+
resizeColumns: 'Sütünleriň giňligini üýtget'
|
|
2804
|
+
},
|
|
2805
|
+
select: {
|
|
2806
|
+
hiddenItemsText: '+{{ number }}',
|
|
2807
|
+
selectAll: 'Ählisini saýla'
|
|
2808
|
+
},
|
|
2117
2809
|
datepicker: {
|
|
2118
2810
|
placeholder: 'gg.aa.ýý.',
|
|
2119
2811
|
dateInput: 'gg.aa.ýý.'
|
|
@@ -2207,6 +2899,8 @@ const tkTMLocaleData = {
|
|
|
2207
2899
|
customPeriodFrom: 'başy',
|
|
2208
2900
|
customPeriodTo: 'soňy',
|
|
2209
2901
|
customPeriodErrorHint: 'Döwür gutarýan wagtyndan soň başlap bilmeýär',
|
|
2902
|
+
customPeriodMinIntervalErrorHint: 'Döwür azyndan {{ value }} bolmaly',
|
|
2903
|
+
customPeriodMaxIntervalErrorHint: 'Döwür köpi bilen {{ value }} bolmaly',
|
|
2210
2904
|
backToPeriodSelection: 'Yzyna'
|
|
2211
2905
|
}
|
|
2212
2906
|
},
|
|
@@ -2229,306 +2923,112 @@ const tkTMLocaleData = {
|
|
|
2229
2923
|
}
|
|
2230
2924
|
},
|
|
2231
2925
|
searchExpandable: {
|
|
2232
|
-
tooltip: 'Gözleg',
|
|
2233
|
-
placeholder: 'Gözleg'
|
|
2234
|
-
},
|
|
2235
|
-
appSwitcher: {
|
|
2236
|
-
searchPlaceholder: 'Gözleg',
|
|
2237
|
-
searchEmptyResult: 'Hiç zat tapylmady',
|
|
2238
|
-
sitesHeader: 'Beýleki saýtlar'
|
|
2239
|
-
},
|
|
2240
|
-
timeRange: {
|
|
2241
|
-
title: {
|
|
2242
|
-
for: 'soňky',
|
|
2243
|
-
placeholder: 'Möhleti saýla'
|
|
2244
|
-
},
|
|
2245
|
-
editor: {
|
|
2246
|
-
from: 'şundan',
|
|
2247
|
-
to: 'şuňa',
|
|
2248
|
-
apply: 'Ulanmak',
|
|
2249
|
-
cancel: 'Ýatyrmak',
|
|
2250
|
-
rangeLabel: 'Döwür',
|
|
2251
|
-
allTime: 'hemme döwür üçin',
|
|
2252
|
-
currentQuarter: 'şu çärýek üçin',
|
|
2253
|
-
currentYear: 'şu ýyl üçin',
|
|
2254
|
-
allTimeOption: 'Hemme döwür',
|
|
2255
|
-
currentQuarterOption: 'Şu çärýek',
|
|
2256
|
-
currentYearOption: 'Şu ýyl'
|
|
2257
|
-
},
|
|
2258
|
-
durationTemplate: {
|
|
2259
|
-
title: {
|
|
2260
|
-
SEPARATOR: ' ',
|
|
2261
|
-
LAST_PART_SEPARATOR: '',
|
|
2262
|
-
YEARS: `{years, plural,
|
|
2263
|
-
one {# ýyl}
|
|
2264
|
-
other {# ýyl}
|
|
2265
|
-
}`,
|
|
2266
|
-
MONTHS: `{months, plural,
|
|
2267
|
-
one {aý}
|
|
2268
|
-
other {# aý}
|
|
2269
|
-
}`,
|
|
2270
|
-
WEEKS: `{weeks, plural,
|
|
2271
|
-
one {hepde}
|
|
2272
|
-
other {# hepde}
|
|
2273
|
-
}`,
|
|
2274
|
-
DAYS: `{days, plural,
|
|
2275
|
-
one {gün}
|
|
2276
|
-
other {# gün}
|
|
2277
|
-
}`,
|
|
2278
|
-
HOURS: `{hours, plural,
|
|
2279
|
-
one {sagat}
|
|
2280
|
-
other {# sagat}
|
|
2281
|
-
}`,
|
|
2282
|
-
MINUTES: `{minutes, plural,
|
|
2283
|
-
one {minut}
|
|
2284
|
-
other {# minut}
|
|
2285
|
-
}`,
|
|
2286
|
-
SECONDS: `{seconds, plural,
|
|
2287
|
-
one {sekunt}
|
|
2288
|
-
other {# sekunt}
|
|
2289
|
-
}`,
|
|
2290
|
-
YEARS_FRACTION: `{years} ýyl`,
|
|
2291
|
-
MONTHS_FRACTION: `{months} aý`
|
|
2292
|
-
},
|
|
2293
|
-
option: {
|
|
2294
|
-
SEPARATOR: ' ',
|
|
2295
|
-
LAST_PART_SEPARATOR: '',
|
|
2296
|
-
YEARS: `{years, plural,
|
|
2297
|
-
one {# ýyl}
|
|
2298
|
-
other {# ýyl}
|
|
2299
|
-
}`,
|
|
2300
|
-
MONTHS: `{months, plural,
|
|
2301
|
-
one {Aý}
|
|
2302
|
-
other {# aý}
|
|
2303
|
-
}`,
|
|
2304
|
-
WEEKS: `{weeks, plural,
|
|
2305
|
-
one {Hepde}
|
|
2306
|
-
other {# hepde}
|
|
2307
|
-
}`,
|
|
2308
|
-
DAYS: `{days, plural,
|
|
2309
|
-
one {Gün}
|
|
2310
|
-
other {# gün}
|
|
2311
|
-
}`,
|
|
2312
|
-
HOURS: `{hours, plural,
|
|
2313
|
-
one {Sagat}
|
|
2314
|
-
other {# sagat}
|
|
2315
|
-
}`,
|
|
2316
|
-
MINUTES: `{minutes, plural,
|
|
2317
|
-
one {Minut}
|
|
2318
|
-
other {# minut}
|
|
2319
|
-
}`,
|
|
2320
|
-
SECONDS: `{seconds, plural,
|
|
2321
|
-
one {Sekunt}
|
|
2322
|
-
other {# sekunt}
|
|
2323
|
-
}`,
|
|
2324
|
-
YEARS_FRACTION: `{years} ýyl`,
|
|
2325
|
-
MONTHS_FRACTION: `{months} aý`
|
|
2326
|
-
}
|
|
2327
|
-
}
|
|
2328
|
-
},
|
|
2329
|
-
notificationCenter: {
|
|
2330
|
-
notifications: 'Duýduryşlar',
|
|
2331
|
-
remove: 'Aýyr',
|
|
2332
|
-
doNotDisturb: 'Alada etme',
|
|
2333
|
-
showPopUpNotifications: 'Açylýan bildirişleri görkeziň',
|
|
2334
|
-
noNotifications: 'Duýduryş ýok',
|
|
2335
|
-
failedToLoadNotifications: 'Duýduryşlary ýükläp bilmedi',
|
|
2336
|
-
repeat: 'Gaýtalama',
|
|
2337
|
-
loadingMore: 'Duýduryşlar ýüklenýär'
|
|
2338
|
-
}
|
|
2339
|
-
};
|
|
2340
|
-
|
|
2341
|
-
const enUSFormattersData = {
|
|
2342
|
-
formatters: {
|
|
2343
|
-
number: {
|
|
2344
|
-
rounding: {
|
|
2345
|
-
separator: '',
|
|
2346
|
-
groupSeparator: '.',
|
|
2347
|
-
thousand: 'K',
|
|
2348
|
-
million: 'M',
|
|
2349
|
-
billion: 'B',
|
|
2350
|
-
trillion: 'T'
|
|
2351
|
-
}
|
|
2352
|
-
}
|
|
2353
|
-
},
|
|
2354
|
-
input: {
|
|
2355
|
-
number: {
|
|
2356
|
-
groupSeparator: [','],
|
|
2357
|
-
fractionSeparator: '.'
|
|
2358
|
-
}
|
|
2359
|
-
},
|
|
2360
|
-
sizeUnits: {
|
|
2361
|
-
defaultUnitSystem: 'SI',
|
|
2362
|
-
defaultPrecision: 2,
|
|
2363
|
-
unitSystems: {
|
|
2364
|
-
SI: {
|
|
2365
|
-
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2366
|
-
base: 10,
|
|
2367
|
-
power: 3
|
|
2368
|
-
},
|
|
2369
|
-
IEC: {
|
|
2370
|
-
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2371
|
-
base: 2,
|
|
2372
|
-
power: 10
|
|
2373
|
-
}
|
|
2374
|
-
}
|
|
2375
|
-
}
|
|
2376
|
-
};
|
|
2377
|
-
const esLAFormattersData = {
|
|
2378
|
-
formatters: {
|
|
2379
|
-
number: {
|
|
2380
|
-
rounding: {
|
|
2381
|
-
separator: '',
|
|
2382
|
-
groupSeparator: ',',
|
|
2383
|
-
thousand: 'K',
|
|
2384
|
-
million: 'M',
|
|
2385
|
-
billion: 'MRD',
|
|
2386
|
-
trillion: 'B'
|
|
2387
|
-
},
|
|
2388
|
-
decimal: {
|
|
2389
|
-
viewGroupSeparator: '\u2009'
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
},
|
|
2393
|
-
input: {
|
|
2394
|
-
number: {
|
|
2395
|
-
// nbsp is generated automatically and used by default in spec
|
|
2396
|
-
groupSeparator: [' ', ' ', '\u2009'],
|
|
2397
|
-
fractionSeparator: ',',
|
|
2398
|
-
viewGroupSeparator: '\u2009'
|
|
2399
|
-
}
|
|
2400
|
-
},
|
|
2401
|
-
sizeUnits: {
|
|
2402
|
-
defaultUnitSystem: 'SI',
|
|
2403
|
-
defaultPrecision: 2,
|
|
2404
|
-
unitSystems: {
|
|
2405
|
-
SI: {
|
|
2406
|
-
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2407
|
-
base: 10,
|
|
2408
|
-
power: 3
|
|
2409
|
-
},
|
|
2410
|
-
IEC: {
|
|
2411
|
-
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2412
|
-
base: 2,
|
|
2413
|
-
power: 10
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
};
|
|
2418
|
-
const ptBRFormattersData = {
|
|
2419
|
-
formatters: {
|
|
2420
|
-
number: {
|
|
2421
|
-
rounding: {
|
|
2422
|
-
separator: ' ',
|
|
2423
|
-
groupSeparator: ',',
|
|
2424
|
-
thousand: 'mil',
|
|
2425
|
-
million: 'mi',
|
|
2426
|
-
billion: 'bi',
|
|
2427
|
-
trillion: 'tri'
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
},
|
|
2431
|
-
input: {
|
|
2432
|
-
number: {
|
|
2433
|
-
groupSeparator: ['.'],
|
|
2434
|
-
fractionSeparator: ','
|
|
2435
|
-
}
|
|
2436
|
-
},
|
|
2437
|
-
sizeUnits: {
|
|
2438
|
-
defaultUnitSystem: 'SI',
|
|
2439
|
-
defaultPrecision: 2,
|
|
2440
|
-
unitSystems: {
|
|
2441
|
-
SI: {
|
|
2442
|
-
abbreviations: ['B', 'KB', 'MB', 'GB', 'TB'],
|
|
2443
|
-
base: 10,
|
|
2444
|
-
power: 3
|
|
2445
|
-
},
|
|
2446
|
-
IEC: {
|
|
2447
|
-
abbreviations: ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
|
|
2448
|
-
base: 2,
|
|
2449
|
-
power: 10
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
2452
|
-
}
|
|
2453
|
-
};
|
|
2454
|
-
const ruRUFormattersData = {
|
|
2455
|
-
formatters: {
|
|
2456
|
-
number: {
|
|
2457
|
-
rounding: {
|
|
2458
|
-
separator: ' ',
|
|
2459
|
-
groupSeparator: ',',
|
|
2460
|
-
thousand: 'К',
|
|
2461
|
-
million: 'М',
|
|
2462
|
-
// Latin `B` (U+0042) according to UX Guidelines.
|
|
2463
|
-
billion: 'B',
|
|
2464
|
-
trillion: 'Т'
|
|
2465
|
-
},
|
|
2466
|
-
decimal: {
|
|
2467
|
-
viewGroupSeparator: '\u2009'
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
},
|
|
2471
|
-
input: {
|
|
2472
|
-
number: {
|
|
2473
|
-
// nbsp is generated automatically and used by default in spec
|
|
2474
|
-
groupSeparator: [' ', ' ', '\u2009'],
|
|
2475
|
-
fractionSeparator: ',',
|
|
2476
|
-
startFormattingFrom: 4,
|
|
2477
|
-
viewGroupSeparator: '\u2009'
|
|
2478
|
-
}
|
|
2479
|
-
},
|
|
2480
|
-
sizeUnits: {
|
|
2481
|
-
defaultUnitSystem: 'SI',
|
|
2482
|
-
defaultPrecision: 2,
|
|
2483
|
-
unitSystems: {
|
|
2484
|
-
SI: {
|
|
2485
|
-
abbreviations: ['Б', 'КБ', 'МБ', 'ГБ', 'ТБ'],
|
|
2486
|
-
base: 10,
|
|
2487
|
-
power: 3
|
|
2488
|
-
},
|
|
2489
|
-
IEC: {
|
|
2490
|
-
abbreviations: ['Б', 'КиБ', 'МиБ', 'ГиБ', 'ТиБ'],
|
|
2491
|
-
base: 2,
|
|
2492
|
-
power: 10
|
|
2493
|
-
}
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
};
|
|
2497
|
-
const tkTMFormattersData = {
|
|
2498
|
-
formatters: {
|
|
2499
|
-
number: {
|
|
2500
|
-
rounding: {
|
|
2501
|
-
separator: ' ',
|
|
2502
|
-
groupSeparator: '',
|
|
2503
|
-
thousand: 'M',
|
|
2504
|
-
million: 'Mn',
|
|
2505
|
-
billion: 'Mr',
|
|
2506
|
-
trillion: 'Tn'
|
|
2507
|
-
}
|
|
2508
|
-
}
|
|
2509
|
-
},
|
|
2510
|
-
input: {
|
|
2511
|
-
number: {
|
|
2512
|
-
groupSeparator: [' ', ' ', '\u2009'],
|
|
2513
|
-
fractionSeparator: ',',
|
|
2514
|
-
viewGroupSeparator: '\u2009'
|
|
2515
|
-
}
|
|
2926
|
+
tooltip: 'Gözleg',
|
|
2927
|
+
placeholder: 'Gözleg'
|
|
2516
2928
|
},
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2929
|
+
appSwitcher: {
|
|
2930
|
+
searchPlaceholder: 'Gözleg',
|
|
2931
|
+
searchEmptyResult: 'Hiç zat tapylmady',
|
|
2932
|
+
sitesHeader: 'Beýleki saýtlar'
|
|
2933
|
+
},
|
|
2934
|
+
timeRange: {
|
|
2935
|
+
title: {
|
|
2936
|
+
for: 'soňky',
|
|
2937
|
+
placeholder: 'Möhleti saýla'
|
|
2938
|
+
},
|
|
2939
|
+
editor: {
|
|
2940
|
+
from: 'şundan',
|
|
2941
|
+
to: 'şuňa',
|
|
2942
|
+
apply: 'Ulanmak',
|
|
2943
|
+
cancel: 'Ýatyrmak',
|
|
2944
|
+
rangeLabel: 'Döwür',
|
|
2945
|
+
allTime: 'hemme döwür üçin',
|
|
2946
|
+
currentQuarter: 'şu çärýek üçin',
|
|
2947
|
+
currentYear: 'şu ýyl üçin',
|
|
2948
|
+
allTimeOption: 'Hemme döwür',
|
|
2949
|
+
currentQuarterOption: 'Şu çärýek',
|
|
2950
|
+
currentYearOption: 'Şu ýyl'
|
|
2951
|
+
},
|
|
2952
|
+
durationTemplate: {
|
|
2953
|
+
title: {
|
|
2954
|
+
SEPARATOR: ' ',
|
|
2955
|
+
LAST_PART_SEPARATOR: '',
|
|
2956
|
+
YEARS: `{years, plural,
|
|
2957
|
+
one {# ýyl}
|
|
2958
|
+
other {# ýyl}
|
|
2959
|
+
}`,
|
|
2960
|
+
MONTHS: `{months, plural,
|
|
2961
|
+
one {aý}
|
|
2962
|
+
other {# aý}
|
|
2963
|
+
}`,
|
|
2964
|
+
WEEKS: `{weeks, plural,
|
|
2965
|
+
one {hepde}
|
|
2966
|
+
other {# hepde}
|
|
2967
|
+
}`,
|
|
2968
|
+
DAYS: `{days, plural,
|
|
2969
|
+
one {gün}
|
|
2970
|
+
other {# gün}
|
|
2971
|
+
}`,
|
|
2972
|
+
HOURS: `{hours, plural,
|
|
2973
|
+
one {sagat}
|
|
2974
|
+
other {# sagat}
|
|
2975
|
+
}`,
|
|
2976
|
+
MINUTES: `{minutes, plural,
|
|
2977
|
+
one {minut}
|
|
2978
|
+
other {# minut}
|
|
2979
|
+
}`,
|
|
2980
|
+
SECONDS: `{seconds, plural,
|
|
2981
|
+
one {sekunt}
|
|
2982
|
+
other {# sekunt}
|
|
2983
|
+
}`,
|
|
2984
|
+
YEARS_FRACTION: `{years} ýyl`,
|
|
2985
|
+
MONTHS_FRACTION: `{months} aý`
|
|
2525
2986
|
},
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2987
|
+
option: {
|
|
2988
|
+
SEPARATOR: ' ',
|
|
2989
|
+
LAST_PART_SEPARATOR: '',
|
|
2990
|
+
YEARS: `{years, plural,
|
|
2991
|
+
one {# ýyl}
|
|
2992
|
+
other {# ýyl}
|
|
2993
|
+
}`,
|
|
2994
|
+
MONTHS: `{months, plural,
|
|
2995
|
+
one {Aý}
|
|
2996
|
+
other {# aý}
|
|
2997
|
+
}`,
|
|
2998
|
+
WEEKS: `{weeks, plural,
|
|
2999
|
+
one {Hepde}
|
|
3000
|
+
other {# hepde}
|
|
3001
|
+
}`,
|
|
3002
|
+
DAYS: `{days, plural,
|
|
3003
|
+
one {Gün}
|
|
3004
|
+
other {# gün}
|
|
3005
|
+
}`,
|
|
3006
|
+
HOURS: `{hours, plural,
|
|
3007
|
+
one {Sagat}
|
|
3008
|
+
other {# sagat}
|
|
3009
|
+
}`,
|
|
3010
|
+
MINUTES: `{minutes, plural,
|
|
3011
|
+
one {Minut}
|
|
3012
|
+
other {# minut}
|
|
3013
|
+
}`,
|
|
3014
|
+
SECONDS: `{seconds, plural,
|
|
3015
|
+
one {Sekunt}
|
|
3016
|
+
other {# sekunt}
|
|
3017
|
+
}`,
|
|
3018
|
+
YEARS_FRACTION: `{years} ýyl`,
|
|
3019
|
+
MONTHS_FRACTION: `{months} aý`
|
|
2530
3020
|
}
|
|
2531
3021
|
}
|
|
3022
|
+
},
|
|
3023
|
+
notificationCenter: {
|
|
3024
|
+
notifications: 'Duýduryşlar',
|
|
3025
|
+
remove: 'Aýyr',
|
|
3026
|
+
doNotDisturb: 'Alada etme',
|
|
3027
|
+
showPopUpNotifications: 'Açylýan bildirişleri görkeziň',
|
|
3028
|
+
noNotifications: 'Duýduryş ýok',
|
|
3029
|
+
failedToLoadNotifications: 'Duýduryşlary ýükläp bilmedi',
|
|
3030
|
+
repeat: 'Gaýtalama',
|
|
3031
|
+
loadingMore: 'Duýduryşlar ýüklenýär'
|
|
2532
3032
|
}
|
|
2533
3033
|
};
|
|
2534
3034
|
|
|
@@ -2602,10 +3102,10 @@ class KbqLocaleService {
|
|
|
2602
3102
|
getParams(componentName) {
|
|
2603
3103
|
return this.current[componentName];
|
|
2604
3104
|
}
|
|
2605
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2606
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3105
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3106
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleService, providedIn: 'root' }); }
|
|
2607
3107
|
}
|
|
2608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleService, decorators: [{
|
|
2609
3109
|
type: Injectable,
|
|
2610
3110
|
args: [{ providedIn: 'root' }]
|
|
2611
3111
|
}], ctorParameters: () => [] });
|
|
@@ -2687,14 +3187,38 @@ function checkAndNormalizeLocalizedNumber(num, locale) {
|
|
|
2687
3187
|
return numberOutput;
|
|
2688
3188
|
}
|
|
2689
3189
|
|
|
3190
|
+
/** Localization configuration for the accessible names of the icon-only buttons the library renders itself. */
|
|
3191
|
+
const KBQ_A11Y_LOCALE_CONFIGURATION = new InjectionToken('KBQ_A11Y_LOCALE_CONFIGURATION', { factory: () => ruRULocaleData.a11y });
|
|
3192
|
+
/** Utility provider for `KBQ_A11Y_LOCALE_CONFIGURATION`. */
|
|
3193
|
+
const kbqA11yLocaleConfigurationProvider = (configuration) => ({
|
|
3194
|
+
provide: KBQ_A11Y_LOCALE_CONFIGURATION,
|
|
3195
|
+
useValue: configuration
|
|
3196
|
+
});
|
|
3197
|
+
/**
|
|
3198
|
+
* Reactive accessible names for the icon-only buttons the library renders itself.
|
|
3199
|
+
*
|
|
3200
|
+
* Follows `KbqLocaleService` when one is provided, and otherwise stays on whatever
|
|
3201
|
+
* `KBQ_A11Y_LOCALE_CONFIGURATION` resolves to.
|
|
3202
|
+
*
|
|
3203
|
+
* @docs-private
|
|
3204
|
+
*/
|
|
3205
|
+
function kbqInjectA11yLocaleConfiguration() {
|
|
3206
|
+
const localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
3207
|
+
const initialValue = inject(KBQ_A11Y_LOCALE_CONFIGURATION);
|
|
3208
|
+
const configuration = localeService
|
|
3209
|
+
? localeService.changes.pipe(map$1(() => localeService.getParams('a11y')))
|
|
3210
|
+
: of(initialValue);
|
|
3211
|
+
return toSignal(configuration, { initialValue });
|
|
3212
|
+
}
|
|
3213
|
+
|
|
2690
3214
|
class KbqLocaleServiceModule {
|
|
2691
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2692
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
2693
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
3215
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleServiceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3216
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleServiceModule }); }
|
|
3217
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleServiceModule, providers: [
|
|
2694
3218
|
{ provide: KBQ_LOCALE_SERVICE, useClass: KbqLocaleService }
|
|
2695
3219
|
] }); }
|
|
2696
3220
|
}
|
|
2697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLocaleServiceModule, decorators: [{
|
|
2698
3222
|
type: NgModule,
|
|
2699
3223
|
args: [{
|
|
2700
3224
|
providers: [
|
|
@@ -2712,13 +3236,74 @@ class DateFormatter extends DateFormatter$1 {
|
|
|
2712
3236
|
this.adapter = adapter;
|
|
2713
3237
|
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe((locale) => this.setLocale(locale));
|
|
2714
3238
|
}
|
|
2715
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2716
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3239
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DateFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3240
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DateFormatter }); }
|
|
2717
3241
|
}
|
|
2718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DateFormatter, decorators: [{
|
|
2719
3243
|
type: Injectable
|
|
2720
3244
|
}], ctorParameters: () => [] });
|
|
2721
3245
|
|
|
3246
|
+
/**
|
|
3247
|
+
* Identity comparison with a one-level element-wise fallback for arrays, so an input rebuilt on every
|
|
3248
|
+
* change detection cycle — a `[from, to]` tuple returned from a getter or a `computed()`, a `units`
|
|
3249
|
+
* array built in a method — still hits the cache of the impure pipes below. Array literals written
|
|
3250
|
+
* directly in a template are already memoized by Angular (`ɵɵpureFunction`); this covers the rest.
|
|
3251
|
+
*
|
|
3252
|
+
* Compares array elements by reference, like the `a === b` fallback it wraps — it has no notion of two
|
|
3253
|
+
* dates being "equal". Mutating a date already passed to a pipe in place (`Date#setHours`, a Moment
|
|
3254
|
+
* instance updated without cloning, …) keeps the same reference, so a `[from, to]` tuple rebuilt around
|
|
3255
|
+
* that mutated instance still reads as unchanged and the cached, now-stale string is returned. Replace
|
|
3256
|
+
* pipe inputs instead of mutating them — the same requirement Angular's OnPush change detection already
|
|
3257
|
+
* places on any object bound to an OnPush view.
|
|
3258
|
+
*/
|
|
3259
|
+
const shallowEqual = (a, b) => {
|
|
3260
|
+
if (a === b)
|
|
3261
|
+
return true;
|
|
3262
|
+
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length)
|
|
3263
|
+
return false;
|
|
3264
|
+
return a.every((item, index) => item === b[index]);
|
|
3265
|
+
};
|
|
3266
|
+
/**
|
|
3267
|
+
* Deserializes a pipe input into a date, treating a missing value and an unparseable one alike as
|
|
3268
|
+
* "no date" — `DateAdapter.deserialize()` returns `null` for the former but a truthy *invalid* date
|
|
3269
|
+
* for the latter, so a plain truthiness check is not enough.
|
|
3270
|
+
*/
|
|
3271
|
+
const toValidDate = (adapter, value) => {
|
|
3272
|
+
const date = adapter.deserialize(value);
|
|
3273
|
+
return date != null && adapter.isValid(date) ? date : null;
|
|
3274
|
+
};
|
|
3275
|
+
/**
|
|
3276
|
+
* A `[from, to]` tuple with both bounds required; `null` when either is missing or invalid.
|
|
3277
|
+
*
|
|
3278
|
+
* Takes the tuple itself as possibly missing, not just its bounds: a pipe input that has not been
|
|
3279
|
+
* populated yet is `null`/`undefined` rather than `[null, null]`, and destructuring that throws.
|
|
3280
|
+
*/
|
|
3281
|
+
const toClosedRange = (adapter, value) => {
|
|
3282
|
+
const [from, to] = value ?? [];
|
|
3283
|
+
const startDate = toValidDate(adapter, from);
|
|
3284
|
+
const endDate = toValidDate(adapter, to);
|
|
3285
|
+
return startDate && endDate ? [startDate, endDate] : null;
|
|
3286
|
+
};
|
|
3287
|
+
/**
|
|
3288
|
+
* A `[from, to]` tuple where one bound may be open; `null` only when neither bound is a valid date.
|
|
3289
|
+
*
|
|
3290
|
+
* The range formatters switch to the opened-range template on their own when a bound is missing, but
|
|
3291
|
+
* throw when both are — and a throwing pipe aborts the rendering of the whole view.
|
|
3292
|
+
*/
|
|
3293
|
+
const toOpenedRange = (adapter, value) => {
|
|
3294
|
+
const [from, to] = value ?? [];
|
|
3295
|
+
const startDate = toValidDate(adapter, from);
|
|
3296
|
+
const endDate = toValidDate(adapter, to);
|
|
3297
|
+
return startDate || endDate ? [startDate, endDate] : null;
|
|
3298
|
+
};
|
|
3299
|
+
/**
|
|
3300
|
+
* A `[from, to]` tuple the duration formatters accept: both bounds required and chronologically
|
|
3301
|
+
* ordered. `DateFormatter.duration*` throws on anything else.
|
|
3302
|
+
*/
|
|
3303
|
+
const toDurationRange = (adapter, value) => {
|
|
3304
|
+
const range = toClosedRange(adapter, value);
|
|
3305
|
+
return range && adapter.compareDateTime(range[0], range[1]) <= 0 ? range : null;
|
|
3306
|
+
};
|
|
2722
3307
|
class BaseFormatterPipe {
|
|
2723
3308
|
constructor() {
|
|
2724
3309
|
this.adapter = inject((DateAdapter));
|
|
@@ -2726,14 +3311,15 @@ class BaseFormatterPipe {
|
|
|
2726
3311
|
}
|
|
2727
3312
|
}
|
|
2728
3313
|
/**
|
|
2729
|
-
* Base class for impure date-formatter pipes that recompute their result
|
|
2730
|
-
*
|
|
3314
|
+
* Base class for impure date-formatter pipes that recompute their result whenever the active locale
|
|
3315
|
+
* changes via `KbqLocaleService`, or the active time zone via `KbqDateTimezoneService`.
|
|
2731
3316
|
*
|
|
2732
3317
|
* The base class owns:
|
|
2733
|
-
* - a subscription to `KbqLocaleService.changes`
|
|
2734
|
-
* marks the host for check (the same approach the built-in `AsyncPipe` uses);
|
|
2735
|
-
* - caching by `(value, args, localeId)`, so the impure `transform()` only does
|
|
2736
|
-
* real work when an input or the active
|
|
3318
|
+
* - a subscription to `KbqLocaleService.changes` and an `effect` on the active time zone, each of which
|
|
3319
|
+
* invalidates the cache and marks the host for check (the same approach the built-in `AsyncPipe` uses);
|
|
3320
|
+
* - caching by `(value, args, localeId, timezone)`, so the impure `transform()` only does
|
|
3321
|
+
* real work when an input, the active locale or the active time zone actually changed — see
|
|
3322
|
+
* `shallowEqual` for how the comparison works and its limits.
|
|
2737
3323
|
*
|
|
2738
3324
|
* Subclasses implement `format()`, which receives the raw pipe input(s) — a
|
|
2739
3325
|
* single value for absolute/relative pipes, or a `[from, to]` tuple for range
|
|
@@ -2747,21 +3333,31 @@ class BaseLocaleAwareFormatterPipe extends BaseFormatterPipe {
|
|
|
2747
3333
|
super();
|
|
2748
3334
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
2749
3335
|
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
3336
|
+
this.timezoneService = inject(KbqDateTimezoneService);
|
|
2750
3337
|
this.cachedValue = null;
|
|
2751
3338
|
this.cachedArgs = [];
|
|
2752
3339
|
this.cachedLocaleId = null;
|
|
3340
|
+
this.cachedTimezone = null;
|
|
2753
3341
|
this.cachedResult = '';
|
|
2754
3342
|
this.hasCache = false;
|
|
2755
3343
|
this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(() => {
|
|
2756
3344
|
this.hasCache = false;
|
|
2757
3345
|
this.changeDetectorRef.markForCheck();
|
|
2758
3346
|
});
|
|
3347
|
+
// Only wakes an OnPush host up; the cache is invalidated by comparing the zone in `transform()`,
|
|
3348
|
+
// so the run this effect makes on creation costs nothing.
|
|
3349
|
+
effect(() => {
|
|
3350
|
+
this.timezoneService.timezone();
|
|
3351
|
+
this.changeDetectorRef.markForCheck();
|
|
3352
|
+
});
|
|
2759
3353
|
}
|
|
2760
3354
|
transform(value, ...args) {
|
|
2761
3355
|
const currentLocaleId = this.localeService?.id ?? null;
|
|
3356
|
+
const currentTimezone = this.timezoneService.timezone();
|
|
2762
3357
|
if (this.hasCache &&
|
|
2763
|
-
value
|
|
3358
|
+
shallowEqual(value, this.cachedValue) &&
|
|
2764
3359
|
currentLocaleId === this.cachedLocaleId &&
|
|
3360
|
+
currentTimezone === this.cachedTimezone &&
|
|
2765
3361
|
this.argsEqual(args)) {
|
|
2766
3362
|
return this.cachedResult;
|
|
2767
3363
|
}
|
|
@@ -2769,6 +3365,7 @@ class BaseLocaleAwareFormatterPipe extends BaseFormatterPipe {
|
|
|
2769
3365
|
this.cachedValue = value;
|
|
2770
3366
|
this.cachedArgs = args;
|
|
2771
3367
|
this.cachedLocaleId = currentLocaleId;
|
|
3368
|
+
this.cachedTimezone = currentTimezone;
|
|
2772
3369
|
this.hasCache = true;
|
|
2773
3370
|
return this.cachedResult;
|
|
2774
3371
|
}
|
|
@@ -2776,7 +3373,7 @@ class BaseLocaleAwareFormatterPipe extends BaseFormatterPipe {
|
|
|
2776
3373
|
if (args.length !== this.cachedArgs.length)
|
|
2777
3374
|
return false;
|
|
2778
3375
|
for (let i = 0; i < args.length; i++) {
|
|
2779
|
-
if (args[i]
|
|
3376
|
+
if (!shallowEqual(args[i], this.cachedArgs[i]))
|
|
2780
3377
|
return false;
|
|
2781
3378
|
}
|
|
2782
3379
|
return true;
|
|
@@ -2784,13 +3381,13 @@ class BaseLocaleAwareFormatterPipe extends BaseFormatterPipe {
|
|
|
2784
3381
|
}
|
|
2785
3382
|
class AbsoluteDateFormatterPipe extends BaseFormatterPipe {
|
|
2786
3383
|
transform(value, currYear) {
|
|
2787
|
-
const date = this.adapter
|
|
3384
|
+
const date = toValidDate(this.adapter, value);
|
|
2788
3385
|
return date ? this.formatter.absoluteLongDate(date, currYear) : '';
|
|
2789
3386
|
}
|
|
2790
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2791
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3387
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3388
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateFormatterPipe, isStandalone: true, name: "absoluteLongDate" }); }
|
|
2792
3389
|
}
|
|
2793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateFormatterPipe, decorators: [{
|
|
2794
3391
|
type: Pipe,
|
|
2795
3392
|
args: [{
|
|
2796
3393
|
name: 'absoluteLongDate'
|
|
@@ -2801,10 +3398,10 @@ class AbsoluteDateFormatterImpurePipe extends AbsoluteDateFormatterPipe {
|
|
|
2801
3398
|
transform(value, currYear) {
|
|
2802
3399
|
return super.transform(value, currYear);
|
|
2803
3400
|
}
|
|
2804
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2805
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3401
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3402
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateFormatterImpurePipe, isStandalone: true, name: "absoluteLongDateImpurePipe", pure: false }); }
|
|
2806
3403
|
}
|
|
2807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateFormatterImpurePipe, decorators: [{
|
|
2808
3405
|
type: Pipe,
|
|
2809
3406
|
args: [{
|
|
2810
3407
|
name: 'absoluteLongDateImpurePipe',
|
|
@@ -2813,13 +3410,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2813
3410
|
}] });
|
|
2814
3411
|
class AbsoluteDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
2815
3412
|
transform(value, options) {
|
|
2816
|
-
const date = this.adapter
|
|
3413
|
+
const date = toValidDate(this.adapter, value);
|
|
2817
3414
|
return date ? this.formatter.absoluteLongDateTime(date, options) : '';
|
|
2818
3415
|
}
|
|
2819
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2820
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3416
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3417
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, isStandalone: true, name: "absoluteLongDateTime" }); }
|
|
2821
3418
|
}
|
|
2822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateTimeFormatterPipe, decorators: [{
|
|
2823
3420
|
type: Pipe,
|
|
2824
3421
|
args: [{
|
|
2825
3422
|
name: 'absoluteLongDateTime'
|
|
@@ -2830,10 +3427,10 @@ class AbsoluteDateTimeFormatterImpurePipe extends AbsoluteDateTimeFormatterPipe
|
|
|
2830
3427
|
transform(value, options) {
|
|
2831
3428
|
return super.transform(value, options);
|
|
2832
3429
|
}
|
|
2833
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2834
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3430
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3431
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateTimeFormatterImpurePipe, isStandalone: true, name: "absoluteLongDateTimeImpurePipe", pure: false }); }
|
|
2835
3432
|
}
|
|
2836
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateTimeFormatterImpurePipe, decorators: [{
|
|
2837
3434
|
type: Pipe,
|
|
2838
3435
|
args: [{
|
|
2839
3436
|
name: 'absoluteLongDateTimeImpurePipe',
|
|
@@ -2842,13 +3439,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2842
3439
|
}] });
|
|
2843
3440
|
class AbsoluteDateShortFormatterPipe extends BaseFormatterPipe {
|
|
2844
3441
|
transform(value, currYear) {
|
|
2845
|
-
const date = this.adapter
|
|
3442
|
+
const date = toValidDate(this.adapter, value);
|
|
2846
3443
|
return date ? this.formatter.absoluteShortDate(date, currYear) : '';
|
|
2847
3444
|
}
|
|
2848
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2849
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3445
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateShortFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3446
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateShortFormatterPipe, isStandalone: true, name: "absoluteShortDate" }); }
|
|
2850
3447
|
}
|
|
2851
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateShortFormatterPipe, decorators: [{
|
|
2852
3449
|
type: Pipe,
|
|
2853
3450
|
args: [{
|
|
2854
3451
|
name: 'absoluteShortDate'
|
|
@@ -2859,10 +3456,10 @@ class AbsoluteDateShortFormatterImpurePipe extends AbsoluteDateShortFormatterPip
|
|
|
2859
3456
|
transform(value, currYear) {
|
|
2860
3457
|
return super.transform(value, currYear);
|
|
2861
3458
|
}
|
|
2862
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2863
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3459
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateShortFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3460
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateShortFormatterImpurePipe, isStandalone: true, name: "absoluteShortDateImpurePipe", pure: false }); }
|
|
2864
3461
|
}
|
|
2865
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteDateShortFormatterImpurePipe, decorators: [{
|
|
2866
3463
|
type: Pipe,
|
|
2867
3464
|
args: [{
|
|
2868
3465
|
name: 'absoluteShortDateImpurePipe',
|
|
@@ -2871,13 +3468,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2871
3468
|
}] });
|
|
2872
3469
|
class AbsoluteShortDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
2873
3470
|
transform(value, options) {
|
|
2874
|
-
const date = this.adapter
|
|
3471
|
+
const date = toValidDate(this.adapter, value);
|
|
2875
3472
|
return date ? this.formatter.absoluteShortDateTime(date, options) : '';
|
|
2876
3473
|
}
|
|
2877
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2878
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3474
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3475
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, isStandalone: true, name: "absoluteShortDateTime" }); }
|
|
2879
3476
|
}
|
|
2880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteShortDateTimeFormatterPipe, decorators: [{
|
|
2881
3478
|
type: Pipe,
|
|
2882
3479
|
args: [{
|
|
2883
3480
|
name: 'absoluteShortDateTime'
|
|
@@ -2888,10 +3485,10 @@ class AbsoluteShortDateTimeFormatterImpurePipe extends AbsoluteShortDateTimeForm
|
|
|
2888
3485
|
transform(value, options) {
|
|
2889
3486
|
return super.transform(value, options);
|
|
2890
3487
|
}
|
|
2891
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2892
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3488
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteShortDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3489
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteShortDateTimeFormatterImpurePipe, isStandalone: true, name: "absoluteShortDateTimeImpurePipe", pure: false }); }
|
|
2893
3490
|
}
|
|
2894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: AbsoluteShortDateTimeFormatterImpurePipe, decorators: [{
|
|
2895
3492
|
type: Pipe,
|
|
2896
3493
|
args: [{
|
|
2897
3494
|
name: 'absoluteShortDateTimeImpurePipe',
|
|
@@ -2900,13 +3497,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2900
3497
|
}] });
|
|
2901
3498
|
class RelativeDateFormatterPipe extends BaseFormatterPipe {
|
|
2902
3499
|
transform(value) {
|
|
2903
|
-
const date = this.adapter
|
|
3500
|
+
const date = toValidDate(this.adapter, value);
|
|
2904
3501
|
return date ? this.formatter.relativeLongDate(date) : '';
|
|
2905
3502
|
}
|
|
2906
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2907
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3503
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3504
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateFormatterPipe, isStandalone: true, name: "relativeLongDate" }); }
|
|
2908
3505
|
}
|
|
2909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateFormatterPipe, decorators: [{
|
|
2910
3507
|
type: Pipe,
|
|
2911
3508
|
args: [{
|
|
2912
3509
|
name: 'relativeLongDate'
|
|
@@ -2917,10 +3514,10 @@ class RelativeDateFormatterImpurePipe extends RelativeDateFormatterPipe {
|
|
|
2917
3514
|
transform(value) {
|
|
2918
3515
|
return super.transform(value);
|
|
2919
3516
|
}
|
|
2920
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2921
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3517
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3518
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateFormatterImpurePipe, isStandalone: true, name: "relativeLongDateImpurePipe", pure: false }); }
|
|
2922
3519
|
}
|
|
2923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateFormatterImpurePipe, decorators: [{
|
|
2924
3521
|
type: Pipe,
|
|
2925
3522
|
args: [{
|
|
2926
3523
|
name: 'relativeLongDateImpurePipe',
|
|
@@ -2929,13 +3526,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2929
3526
|
}] });
|
|
2930
3527
|
class RelativeDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
2931
3528
|
transform(value, options) {
|
|
2932
|
-
const date = this.adapter
|
|
3529
|
+
const date = toValidDate(this.adapter, value);
|
|
2933
3530
|
return date ? this.formatter.relativeLongDateTime(date, options) : '';
|
|
2934
3531
|
}
|
|
2935
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2936
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3532
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3533
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateTimeFormatterPipe, isStandalone: true, name: "relativeLongDateTime" }); }
|
|
2937
3534
|
}
|
|
2938
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateTimeFormatterPipe, decorators: [{
|
|
2939
3536
|
type: Pipe,
|
|
2940
3537
|
args: [{
|
|
2941
3538
|
name: 'relativeLongDateTime'
|
|
@@ -2946,10 +3543,10 @@ class RelativeDateTimeFormatterImpurePipe extends RelativeDateTimeFormatterPipe
|
|
|
2946
3543
|
transform(value, options) {
|
|
2947
3544
|
return super.transform(value, options);
|
|
2948
3545
|
}
|
|
2949
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2950
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3546
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3547
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateTimeFormatterImpurePipe, isStandalone: true, name: "relativeLongDateTimeImpurePipe", pure: false }); }
|
|
2951
3548
|
}
|
|
2952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeDateTimeFormatterImpurePipe, decorators: [{
|
|
2953
3550
|
type: Pipe,
|
|
2954
3551
|
args: [{
|
|
2955
3552
|
name: 'relativeLongDateTimeImpurePipe',
|
|
@@ -2958,13 +3555,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2958
3555
|
}] });
|
|
2959
3556
|
class RelativeShortDateFormatterPipe extends BaseFormatterPipe {
|
|
2960
3557
|
transform(value) {
|
|
2961
|
-
const date = this.adapter
|
|
3558
|
+
const date = toValidDate(this.adapter, value);
|
|
2962
3559
|
return date ? this.formatter.relativeShortDate(date) : '';
|
|
2963
3560
|
}
|
|
2964
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2965
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3561
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3562
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateFormatterPipe, isStandalone: true, name: "relativeShortDate" }); }
|
|
2966
3563
|
}
|
|
2967
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateFormatterPipe, decorators: [{
|
|
2968
3565
|
type: Pipe,
|
|
2969
3566
|
args: [{
|
|
2970
3567
|
name: 'relativeShortDate'
|
|
@@ -2975,10 +3572,10 @@ class RelativeShortDateFormatterImpurePipe extends RelativeShortDateFormatterPip
|
|
|
2975
3572
|
transform(value) {
|
|
2976
3573
|
return super.transform(value);
|
|
2977
3574
|
}
|
|
2978
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2979
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3575
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3576
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateFormatterImpurePipe, isStandalone: true, name: "relativeShortDateImpurePipe", pure: false }); }
|
|
2980
3577
|
}
|
|
2981
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateFormatterImpurePipe, decorators: [{
|
|
2982
3579
|
type: Pipe,
|
|
2983
3580
|
args: [{
|
|
2984
3581
|
name: 'relativeShortDateImpurePipe',
|
|
@@ -2987,13 +3584,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
2987
3584
|
}] });
|
|
2988
3585
|
class RelativeShortDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
2989
3586
|
transform(value, options) {
|
|
2990
|
-
const date = this.adapter
|
|
3587
|
+
const date = toValidDate(this.adapter, value);
|
|
2991
3588
|
return date ? this.formatter.relativeShortDateTime(date, options) : '';
|
|
2992
3589
|
}
|
|
2993
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2994
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3590
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3591
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, isStandalone: true, name: "relativeShortDateTime" }); }
|
|
2995
3592
|
}
|
|
2996
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateTimeFormatterPipe, decorators: [{
|
|
2997
3594
|
type: Pipe,
|
|
2998
3595
|
args: [{
|
|
2999
3596
|
name: 'relativeShortDateTime'
|
|
@@ -3004,10 +3601,10 @@ class RelativeShortDateTimeFormatterImpurePipe extends RelativeShortDateTimeForm
|
|
|
3004
3601
|
transform(value, options) {
|
|
3005
3602
|
return super.transform(value, options);
|
|
3006
3603
|
}
|
|
3007
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3008
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3604
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3605
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateTimeFormatterImpurePipe, isStandalone: true, name: "relativeShortDateTimeImpurePipe", pure: false }); }
|
|
3009
3606
|
}
|
|
3010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RelativeShortDateTimeFormatterImpurePipe, decorators: [{
|
|
3011
3608
|
type: Pipe,
|
|
3012
3609
|
args: [{
|
|
3013
3610
|
name: 'relativeShortDateTimeImpurePipe',
|
|
@@ -3015,15 +3612,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3015
3612
|
}]
|
|
3016
3613
|
}] });
|
|
3017
3614
|
class RangeDateFormatterPipe extends BaseFormatterPipe {
|
|
3018
|
-
transform(
|
|
3019
|
-
const
|
|
3020
|
-
|
|
3021
|
-
|
|
3615
|
+
transform(value) {
|
|
3616
|
+
const range = toOpenedRange(this.adapter, value);
|
|
3617
|
+
if (!range)
|
|
3618
|
+
return '';
|
|
3619
|
+
return this.formatter.rangeLongDate(range[0], range[1]);
|
|
3022
3620
|
}
|
|
3023
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3024
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3621
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3622
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeDateFormatterPipe, isStandalone: true, name: "rangeLongDate" }); }
|
|
3025
3623
|
}
|
|
3026
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateFormatterPipe, decorators: [{
|
|
3027
3625
|
type: Pipe,
|
|
3028
3626
|
args: [{
|
|
3029
3627
|
name: 'rangeLongDate'
|
|
@@ -3031,13 +3629,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3031
3629
|
}] });
|
|
3032
3630
|
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3033
3631
|
class RangeDateFormatterImpurePipe extends RangeDateFormatterPipe {
|
|
3034
|
-
transform(
|
|
3035
|
-
return super.transform(
|
|
3632
|
+
transform(value) {
|
|
3633
|
+
return super.transform(value);
|
|
3036
3634
|
}
|
|
3037
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3038
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3635
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3636
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeDateFormatterImpurePipe, isStandalone: true, name: "rangeLongDateImpurePipe", pure: false }); }
|
|
3039
3637
|
}
|
|
3040
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateFormatterImpurePipe, decorators: [{
|
|
3041
3639
|
type: Pipe,
|
|
3042
3640
|
args: [{
|
|
3043
3641
|
name: 'rangeLongDateImpurePipe',
|
|
@@ -3045,15 +3643,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3045
3643
|
}]
|
|
3046
3644
|
}] });
|
|
3047
3645
|
class RangeShortDateFormatterPipe extends BaseFormatterPipe {
|
|
3048
|
-
transform(
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3051
|
-
|
|
3646
|
+
transform(value) {
|
|
3647
|
+
const range = toOpenedRange(this.adapter, value);
|
|
3648
|
+
if (!range)
|
|
3649
|
+
return '';
|
|
3650
|
+
return this.formatter.rangeShortDate(range[0], range[1] ?? undefined);
|
|
3052
3651
|
}
|
|
3053
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3054
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3652
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3653
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateFormatterPipe, isStandalone: true, name: "rangeShortDate" }); }
|
|
3055
3654
|
}
|
|
3056
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateFormatterPipe, decorators: [{
|
|
3057
3656
|
type: Pipe,
|
|
3058
3657
|
args: [{
|
|
3059
3658
|
name: 'rangeShortDate'
|
|
@@ -3061,13 +3660,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3061
3660
|
}] });
|
|
3062
3661
|
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3063
3662
|
class RangeShortDateFormatterImpurePipe extends RangeShortDateFormatterPipe {
|
|
3064
|
-
transform(
|
|
3065
|
-
return super.transform(
|
|
3663
|
+
transform(value) {
|
|
3664
|
+
return super.transform(value);
|
|
3066
3665
|
}
|
|
3067
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3068
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3666
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3667
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateFormatterImpurePipe, isStandalone: true, name: "rangeShortDateImpurePipe", pure: false }); }
|
|
3069
3668
|
}
|
|
3070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateFormatterImpurePipe, decorators: [{
|
|
3071
3670
|
type: Pipe,
|
|
3072
3671
|
args: [{
|
|
3073
3672
|
name: 'rangeShortDateImpurePipe',
|
|
@@ -3075,15 +3674,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3075
3674
|
}]
|
|
3076
3675
|
}] });
|
|
3077
3676
|
class RangeDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
3078
|
-
transform(
|
|
3079
|
-
const
|
|
3080
|
-
|
|
3081
|
-
|
|
3677
|
+
transform(value, options) {
|
|
3678
|
+
const range = toOpenedRange(this.adapter, value);
|
|
3679
|
+
if (!range)
|
|
3680
|
+
return '';
|
|
3681
|
+
return this.formatter.rangeLongDateTime(range[0], range[1] ?? undefined, options);
|
|
3082
3682
|
}
|
|
3083
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3084
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3683
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3684
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeDateTimeFormatterPipe, isStandalone: true, name: "rangeLongDateTime" }); }
|
|
3085
3685
|
}
|
|
3086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateTimeFormatterPipe, decorators: [{
|
|
3087
3687
|
type: Pipe,
|
|
3088
3688
|
args: [{
|
|
3089
3689
|
name: 'rangeLongDateTime'
|
|
@@ -3091,13 +3691,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3091
3691
|
}] });
|
|
3092
3692
|
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3093
3693
|
class RangeDateTimeFormatterImpurePipe extends RangeDateTimeFormatterPipe {
|
|
3094
|
-
transform(
|
|
3095
|
-
return super.transform(
|
|
3694
|
+
transform(value, options) {
|
|
3695
|
+
return super.transform(value, options);
|
|
3096
3696
|
}
|
|
3097
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3098
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3697
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3698
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeDateTimeFormatterImpurePipe, isStandalone: true, name: "rangeLongDateTimeImpurePipe", pure: false }); }
|
|
3099
3699
|
}
|
|
3100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeDateTimeFormatterImpurePipe, decorators: [{
|
|
3101
3701
|
type: Pipe,
|
|
3102
3702
|
args: [{
|
|
3103
3703
|
name: 'rangeLongDateTimeImpurePipe',
|
|
@@ -3105,15 +3705,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3105
3705
|
}]
|
|
3106
3706
|
}] });
|
|
3107
3707
|
class RangeMiddleDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
3108
|
-
transform(
|
|
3109
|
-
|
|
3110
|
-
const
|
|
3111
|
-
|
|
3708
|
+
transform(value, options) {
|
|
3709
|
+
// Unlike the other range formats, the middle one has no opened-range template — both bounds required.
|
|
3710
|
+
const range = toClosedRange(this.adapter, value);
|
|
3711
|
+
if (!range)
|
|
3712
|
+
return '';
|
|
3713
|
+
return this.formatter.rangeMiddleDateTime(range[0], range[1], options);
|
|
3112
3714
|
}
|
|
3113
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3114
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3715
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3716
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, isStandalone: true, name: "rangeMiddleDateTime" }); }
|
|
3115
3717
|
}
|
|
3116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeMiddleDateTimeFormatterPipe, decorators: [{
|
|
3117
3719
|
type: Pipe,
|
|
3118
3720
|
args: [{
|
|
3119
3721
|
name: 'rangeMiddleDateTime'
|
|
@@ -3121,13 +3723,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3121
3723
|
}] });
|
|
3122
3724
|
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3123
3725
|
class RangeMiddleDateTimeFormatterImpurePipe extends RangeMiddleDateTimeFormatterPipe {
|
|
3124
|
-
transform(
|
|
3125
|
-
return super.transform(
|
|
3726
|
+
transform(value, options) {
|
|
3727
|
+
return super.transform(value, options);
|
|
3126
3728
|
}
|
|
3127
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3128
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3729
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeMiddleDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3730
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeMiddleDateTimeFormatterImpurePipe, isStandalone: true, name: "rangeMiddleDateTimeImpurePipe", pure: false }); }
|
|
3129
3731
|
}
|
|
3130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeMiddleDateTimeFormatterImpurePipe, decorators: [{
|
|
3131
3733
|
type: Pipe,
|
|
3132
3734
|
args: [{
|
|
3133
3735
|
name: 'rangeMiddleDateTimeImpurePipe',
|
|
@@ -3135,15 +3737,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3135
3737
|
}]
|
|
3136
3738
|
}] });
|
|
3137
3739
|
class RangeShortDateTimeFormatterPipe extends BaseFormatterPipe {
|
|
3138
|
-
transform(
|
|
3139
|
-
const
|
|
3140
|
-
|
|
3141
|
-
|
|
3740
|
+
transform(value, options) {
|
|
3741
|
+
const range = toOpenedRange(this.adapter, value);
|
|
3742
|
+
if (!range)
|
|
3743
|
+
return '';
|
|
3744
|
+
return this.formatter.rangeShortDateTime(range[0], range[1], options);
|
|
3142
3745
|
}
|
|
3143
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3144
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3746
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateTimeFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3747
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateTimeFormatterPipe, isStandalone: true, name: "rangeShortDateTime" }); }
|
|
3145
3748
|
}
|
|
3146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateTimeFormatterPipe, decorators: [{
|
|
3147
3750
|
type: Pipe,
|
|
3148
3751
|
args: [{
|
|
3149
3752
|
name: 'rangeShortDateTime'
|
|
@@ -3151,34 +3754,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3151
3754
|
}] });
|
|
3152
3755
|
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3153
3756
|
class RangeShortDateTimeFormatterImpurePipe extends RangeShortDateTimeFormatterPipe {
|
|
3154
|
-
transform(
|
|
3155
|
-
return super.transform(
|
|
3757
|
+
transform(value, options) {
|
|
3758
|
+
return super.transform(value, options);
|
|
3156
3759
|
}
|
|
3157
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3158
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3760
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateTimeFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3761
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateTimeFormatterImpurePipe, isStandalone: true, name: "rangeShortDateTimeImpurePipe", pure: false }); }
|
|
3159
3762
|
}
|
|
3160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: RangeShortDateTimeFormatterImpurePipe, decorators: [{
|
|
3161
3764
|
type: Pipe,
|
|
3162
3765
|
args: [{
|
|
3163
3766
|
name: 'rangeShortDateTimeImpurePipe',
|
|
3164
3767
|
pure: false
|
|
3165
3768
|
}]
|
|
3166
3769
|
}] });
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3770
|
+
class DurationShortestFormatterPipe extends BaseFormatterPipe {
|
|
3771
|
+
transform(value, options) {
|
|
3772
|
+
const range = toDurationRange(this.adapter, value);
|
|
3773
|
+
if (!range)
|
|
3774
|
+
return '';
|
|
3775
|
+
return this.formatter.durationShortest(range[0], range[1], options?.seconds, options?.milliseconds);
|
|
3776
|
+
}
|
|
3777
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortestFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3778
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: DurationShortestFormatterPipe, isStandalone: true, name: "durationShortest" }); }
|
|
3779
|
+
}
|
|
3780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortestFormatterPipe, decorators: [{
|
|
3781
|
+
type: Pipe,
|
|
3782
|
+
args: [{
|
|
3783
|
+
name: 'durationShortest'
|
|
3784
|
+
}]
|
|
3785
|
+
}] });
|
|
3786
|
+
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3787
|
+
class DurationShortestFormatterImpurePipe extends DurationShortestFormatterPipe {
|
|
3788
|
+
transform(value, options) {
|
|
3789
|
+
return super.transform(value, options);
|
|
3790
|
+
}
|
|
3791
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortestFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3792
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: DurationShortestFormatterImpurePipe, isStandalone: true, name: "durationShortestImpurePipe", pure: false }); }
|
|
3793
|
+
}
|
|
3794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortestFormatterImpurePipe, decorators: [{
|
|
3795
|
+
type: Pipe,
|
|
3796
|
+
args: [{
|
|
3797
|
+
name: 'durationShortestImpurePipe',
|
|
3798
|
+
pure: false
|
|
3799
|
+
}]
|
|
3800
|
+
}] });
|
|
3801
|
+
class DurationLongFormatterPipe extends BaseFormatterPipe {
|
|
3802
|
+
transform(value, units, fraction) {
|
|
3803
|
+
const range = toDurationRange(this.adapter, value);
|
|
3804
|
+
if (!range)
|
|
3805
|
+
return '';
|
|
3806
|
+
return this.formatter.durationLong(range[0], range[1], units, fraction);
|
|
3807
|
+
}
|
|
3808
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationLongFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3809
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: DurationLongFormatterPipe, isStandalone: true, name: "durationLong" }); }
|
|
3810
|
+
}
|
|
3811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationLongFormatterPipe, decorators: [{
|
|
3812
|
+
type: Pipe,
|
|
3813
|
+
args: [{
|
|
3814
|
+
name: 'durationLong'
|
|
3815
|
+
}]
|
|
3816
|
+
}] });
|
|
3817
|
+
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3818
|
+
class DurationLongFormatterImpurePipe extends DurationLongFormatterPipe {
|
|
3819
|
+
transform(value, units, fraction) {
|
|
3820
|
+
return super.transform(value, units, fraction);
|
|
3821
|
+
}
|
|
3822
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationLongFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3823
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: DurationLongFormatterImpurePipe, isStandalone: true, name: "durationLongImpurePipe", pure: false }); }
|
|
3824
|
+
}
|
|
3825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationLongFormatterImpurePipe, decorators: [{
|
|
3826
|
+
type: Pipe,
|
|
3827
|
+
args: [{
|
|
3828
|
+
name: 'durationLongImpurePipe',
|
|
3829
|
+
pure: false
|
|
3830
|
+
}]
|
|
3831
|
+
}] });
|
|
3832
|
+
class DurationShortFormatterPipe extends BaseFormatterPipe {
|
|
3833
|
+
transform(value, units, fraction) {
|
|
3834
|
+
const range = toDurationRange(this.adapter, value);
|
|
3835
|
+
if (!range)
|
|
3836
|
+
return '';
|
|
3837
|
+
return this.formatter.durationShort(range[0], range[1], units, fraction);
|
|
3838
|
+
}
|
|
3839
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortFormatterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3840
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: DurationShortFormatterPipe, isStandalone: true, name: "durationShort" }); }
|
|
3841
|
+
}
|
|
3842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortFormatterPipe, decorators: [{
|
|
3843
|
+
type: Pipe,
|
|
3844
|
+
args: [{
|
|
3845
|
+
name: 'durationShort'
|
|
3846
|
+
}]
|
|
3847
|
+
}] });
|
|
3848
|
+
// eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
|
|
3849
|
+
class DurationShortFormatterImpurePipe extends DurationShortFormatterPipe {
|
|
3850
|
+
transform(value, units, fraction) {
|
|
3851
|
+
return super.transform(value, units, fraction);
|
|
3852
|
+
}
|
|
3853
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortFormatterImpurePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3854
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: DurationShortFormatterImpurePipe, isStandalone: true, name: "durationShortImpurePipe", pure: false }); }
|
|
3855
|
+
}
|
|
3856
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: DurationShortFormatterImpurePipe, decorators: [{
|
|
3857
|
+
type: Pipe,
|
|
3858
|
+
args: [{
|
|
3859
|
+
name: 'durationShortImpurePipe',
|
|
3860
|
+
pure: false
|
|
3861
|
+
}]
|
|
3862
|
+
}] });
|
|
3863
|
+
// Impure pipes that recompute on `KbqLocaleService` locale changes and on `KbqDateTimezoneService` time
|
|
3864
|
+
// zone changes (see `BaseLocaleAwareFormatterPipe`). Prefer these `kbq`-prefixed pipes when either can
|
|
3865
|
+
// change at runtime; the pure pipes above are kept for static usages and backward compatibility.
|
|
3170
3866
|
class KbqAbsoluteLongDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
3171
3867
|
transform(value, currYear) {
|
|
3172
3868
|
return super.transform(value, currYear);
|
|
3173
3869
|
}
|
|
3174
3870
|
format(value, currYear) {
|
|
3175
|
-
const date = this.adapter
|
|
3871
|
+
const date = toValidDate(this.adapter, value);
|
|
3176
3872
|
return date ? this.formatter.absoluteLongDate(date, currYear) : '';
|
|
3177
3873
|
}
|
|
3178
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3179
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3874
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteLongDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3875
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteLongDatePipe, isStandalone: true, name: "kbqAbsoluteLongDate", pure: false }); }
|
|
3180
3876
|
}
|
|
3181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteLongDatePipe, decorators: [{
|
|
3182
3878
|
type: Pipe,
|
|
3183
3879
|
args: [{
|
|
3184
3880
|
name: 'kbqAbsoluteLongDate',
|
|
@@ -3190,13 +3886,13 @@ class KbqAbsoluteShortDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3190
3886
|
return super.transform(value, currYear);
|
|
3191
3887
|
}
|
|
3192
3888
|
format(value, currYear) {
|
|
3193
|
-
const date = this.adapter
|
|
3889
|
+
const date = toValidDate(this.adapter, value);
|
|
3194
3890
|
return date ? this.formatter.absoluteShortDate(date, currYear) : '';
|
|
3195
3891
|
}
|
|
3196
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3197
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3892
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteShortDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3893
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteShortDatePipe, isStandalone: true, name: "kbqAbsoluteShortDate", pure: false }); }
|
|
3198
3894
|
}
|
|
3199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteShortDatePipe, decorators: [{
|
|
3200
3896
|
type: Pipe,
|
|
3201
3897
|
args: [{
|
|
3202
3898
|
name: 'kbqAbsoluteShortDate',
|
|
@@ -3208,13 +3904,13 @@ class KbqAbsoluteLongDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3208
3904
|
return super.transform(value, options);
|
|
3209
3905
|
}
|
|
3210
3906
|
format(value, options) {
|
|
3211
|
-
const date = this.adapter
|
|
3907
|
+
const date = toValidDate(this.adapter, value);
|
|
3212
3908
|
return date ? this.formatter.absoluteLongDateTime(date, options) : '';
|
|
3213
3909
|
}
|
|
3214
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3215
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3910
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteLongDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3911
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteLongDateTimePipe, isStandalone: true, name: "kbqAbsoluteLongDateTime", pure: false }); }
|
|
3216
3912
|
}
|
|
3217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteLongDateTimePipe, decorators: [{
|
|
3218
3914
|
type: Pipe,
|
|
3219
3915
|
args: [{
|
|
3220
3916
|
name: 'kbqAbsoluteLongDateTime',
|
|
@@ -3226,13 +3922,13 @@ class KbqAbsoluteShortDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3226
3922
|
return super.transform(value, options);
|
|
3227
3923
|
}
|
|
3228
3924
|
format(value, options) {
|
|
3229
|
-
const date = this.adapter
|
|
3925
|
+
const date = toValidDate(this.adapter, value);
|
|
3230
3926
|
return date ? this.formatter.absoluteShortDateTime(date, options) : '';
|
|
3231
3927
|
}
|
|
3232
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3233
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3928
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteShortDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3929
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteShortDateTimePipe, isStandalone: true, name: "kbqAbsoluteShortDateTime", pure: false }); }
|
|
3234
3930
|
}
|
|
3235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbsoluteShortDateTimePipe, decorators: [{
|
|
3236
3932
|
type: Pipe,
|
|
3237
3933
|
args: [{
|
|
3238
3934
|
name: 'kbqAbsoluteShortDateTime',
|
|
@@ -3244,13 +3940,13 @@ class KbqRelativeLongDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3244
3940
|
return super.transform(value);
|
|
3245
3941
|
}
|
|
3246
3942
|
format(value) {
|
|
3247
|
-
const date = this.adapter
|
|
3943
|
+
const date = toValidDate(this.adapter, value);
|
|
3248
3944
|
return date ? this.formatter.relativeLongDate(date) : '';
|
|
3249
3945
|
}
|
|
3250
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3251
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3946
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeLongDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3947
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeLongDatePipe, isStandalone: true, name: "kbqRelativeLongDate", pure: false }); }
|
|
3252
3948
|
}
|
|
3253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeLongDatePipe, decorators: [{
|
|
3254
3950
|
type: Pipe,
|
|
3255
3951
|
args: [{
|
|
3256
3952
|
name: 'kbqRelativeLongDate',
|
|
@@ -3262,13 +3958,13 @@ class KbqRelativeShortDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3262
3958
|
return super.transform(value);
|
|
3263
3959
|
}
|
|
3264
3960
|
format(value) {
|
|
3265
|
-
const date = this.adapter
|
|
3961
|
+
const date = toValidDate(this.adapter, value);
|
|
3266
3962
|
return date ? this.formatter.relativeShortDate(date) : '';
|
|
3267
3963
|
}
|
|
3268
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3269
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3964
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeShortDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3965
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeShortDatePipe, isStandalone: true, name: "kbqRelativeShortDate", pure: false }); }
|
|
3270
3966
|
}
|
|
3271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeShortDatePipe, decorators: [{
|
|
3272
3968
|
type: Pipe,
|
|
3273
3969
|
args: [{
|
|
3274
3970
|
name: 'kbqRelativeShortDate',
|
|
@@ -3280,13 +3976,13 @@ class KbqRelativeLongDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3280
3976
|
return super.transform(value, options);
|
|
3281
3977
|
}
|
|
3282
3978
|
format(value, options) {
|
|
3283
|
-
const date = this.adapter
|
|
3979
|
+
const date = toValidDate(this.adapter, value);
|
|
3284
3980
|
return date ? this.formatter.relativeLongDateTime(date, options) : '';
|
|
3285
3981
|
}
|
|
3286
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3287
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3982
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeLongDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3983
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeLongDateTimePipe, isStandalone: true, name: "kbqRelativeLongDateTime", pure: false }); }
|
|
3288
3984
|
}
|
|
3289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeLongDateTimePipe, decorators: [{
|
|
3290
3986
|
type: Pipe,
|
|
3291
3987
|
args: [{
|
|
3292
3988
|
name: 'kbqRelativeLongDateTime',
|
|
@@ -3298,13 +3994,13 @@ class KbqRelativeShortDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3298
3994
|
return super.transform(value, options);
|
|
3299
3995
|
}
|
|
3300
3996
|
format(value, options) {
|
|
3301
|
-
const date = this.adapter
|
|
3997
|
+
const date = toValidDate(this.adapter, value);
|
|
3302
3998
|
return date ? this.formatter.relativeShortDateTime(date, options) : '';
|
|
3303
3999
|
}
|
|
3304
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3305
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4000
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeShortDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4001
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeShortDateTimePipe, isStandalone: true, name: "kbqRelativeShortDateTime", pure: false }); }
|
|
3306
4002
|
}
|
|
3307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4003
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRelativeShortDateTimePipe, decorators: [{
|
|
3308
4004
|
type: Pipe,
|
|
3309
4005
|
args: [{
|
|
3310
4006
|
name: 'kbqRelativeShortDateTime',
|
|
@@ -3315,15 +4011,16 @@ class KbqRangeLongDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3315
4011
|
transform(value) {
|
|
3316
4012
|
return super.transform(value);
|
|
3317
4013
|
}
|
|
3318
|
-
format(
|
|
3319
|
-
const
|
|
3320
|
-
|
|
3321
|
-
|
|
4014
|
+
format(value) {
|
|
4015
|
+
const range = toOpenedRange(this.adapter, value);
|
|
4016
|
+
if (!range)
|
|
4017
|
+
return '';
|
|
4018
|
+
return this.formatter.rangeLongDate(range[0], range[1]);
|
|
3322
4019
|
}
|
|
3323
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3324
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4020
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeLongDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4021
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeLongDatePipe, isStandalone: true, name: "kbqRangeLongDate", pure: false }); }
|
|
3325
4022
|
}
|
|
3326
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeLongDatePipe, decorators: [{
|
|
3327
4024
|
type: Pipe,
|
|
3328
4025
|
args: [{
|
|
3329
4026
|
name: 'kbqRangeLongDate',
|
|
@@ -3334,15 +4031,16 @@ class KbqRangeShortDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3334
4031
|
transform(value) {
|
|
3335
4032
|
return super.transform(value);
|
|
3336
4033
|
}
|
|
3337
|
-
format(
|
|
3338
|
-
const
|
|
3339
|
-
|
|
3340
|
-
|
|
4034
|
+
format(value) {
|
|
4035
|
+
const range = toOpenedRange(this.adapter, value);
|
|
4036
|
+
if (!range)
|
|
4037
|
+
return '';
|
|
4038
|
+
return this.formatter.rangeShortDate(range[0], range[1] ?? undefined);
|
|
3341
4039
|
}
|
|
3342
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3343
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4040
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeShortDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4041
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeShortDatePipe, isStandalone: true, name: "kbqRangeShortDate", pure: false }); }
|
|
3344
4042
|
}
|
|
3345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeShortDatePipe, decorators: [{
|
|
3346
4044
|
type: Pipe,
|
|
3347
4045
|
args: [{
|
|
3348
4046
|
name: 'kbqRangeShortDate',
|
|
@@ -3353,15 +4051,16 @@ class KbqRangeLongDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3353
4051
|
transform(value, options) {
|
|
3354
4052
|
return super.transform(value, options);
|
|
3355
4053
|
}
|
|
3356
|
-
format(
|
|
3357
|
-
const
|
|
3358
|
-
|
|
3359
|
-
|
|
4054
|
+
format(value, options) {
|
|
4055
|
+
const range = toOpenedRange(this.adapter, value);
|
|
4056
|
+
if (!range)
|
|
4057
|
+
return '';
|
|
4058
|
+
return this.formatter.rangeLongDateTime(range[0], range[1] ?? undefined, options);
|
|
3360
4059
|
}
|
|
3361
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3362
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4060
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeLongDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4061
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeLongDateTimePipe, isStandalone: true, name: "kbqRangeLongDateTime", pure: false }); }
|
|
3363
4062
|
}
|
|
3364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeLongDateTimePipe, decorators: [{
|
|
3365
4064
|
type: Pipe,
|
|
3366
4065
|
args: [{
|
|
3367
4066
|
name: 'kbqRangeLongDateTime',
|
|
@@ -3372,15 +4071,17 @@ class KbqRangeMiddleDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3372
4071
|
transform(value, options) {
|
|
3373
4072
|
return super.transform(value, options);
|
|
3374
4073
|
}
|
|
3375
|
-
format(
|
|
3376
|
-
|
|
3377
|
-
const
|
|
3378
|
-
|
|
4074
|
+
format(value, options) {
|
|
4075
|
+
// Unlike the other range formats, the middle one has no opened-range template — both bounds required.
|
|
4076
|
+
const range = toClosedRange(this.adapter, value);
|
|
4077
|
+
if (!range)
|
|
4078
|
+
return '';
|
|
4079
|
+
return this.formatter.rangeMiddleDateTime(range[0], range[1], options);
|
|
3379
4080
|
}
|
|
3380
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3381
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4081
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeMiddleDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4082
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeMiddleDateTimePipe, isStandalone: true, name: "kbqRangeMiddleDateTime", pure: false }); }
|
|
3382
4083
|
}
|
|
3383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeMiddleDateTimePipe, decorators: [{
|
|
3384
4085
|
type: Pipe,
|
|
3385
4086
|
args: [{
|
|
3386
4087
|
name: 'kbqRangeMiddleDateTime',
|
|
@@ -3391,18 +4092,127 @@ class KbqRangeShortDateTimePipe extends BaseLocaleAwareFormatterPipe {
|
|
|
3391
4092
|
transform(value, options) {
|
|
3392
4093
|
return super.transform(value, options);
|
|
3393
4094
|
}
|
|
3394
|
-
format(
|
|
3395
|
-
const
|
|
3396
|
-
|
|
3397
|
-
|
|
4095
|
+
format(value, options) {
|
|
4096
|
+
const range = toOpenedRange(this.adapter, value);
|
|
4097
|
+
if (!range)
|
|
4098
|
+
return '';
|
|
4099
|
+
return this.formatter.rangeShortDateTime(range[0], range[1], options);
|
|
4100
|
+
}
|
|
4101
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeShortDateTimePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4102
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeShortDateTimePipe, isStandalone: true, name: "kbqRangeShortDateTime", pure: false }); }
|
|
4103
|
+
}
|
|
4104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRangeShortDateTimePipe, decorators: [{
|
|
4105
|
+
type: Pipe,
|
|
4106
|
+
args: [{
|
|
4107
|
+
name: 'kbqRangeShortDateTime',
|
|
4108
|
+
pure: false
|
|
4109
|
+
}]
|
|
4110
|
+
}] });
|
|
4111
|
+
/**
|
|
4112
|
+
* Formats the duration between two dates as a digital-clock value, e.g. `48:02:25`.
|
|
4113
|
+
*
|
|
4114
|
+
* Takes a `[from, to]` tuple, like the range pipes. `options.seconds` defaults to `true` and
|
|
4115
|
+
* `options.milliseconds` to `false`; `options.currYear` is not used by this format.
|
|
4116
|
+
*
|
|
4117
|
+
* Renders an empty string when the tuple itself or one of its bounds is missing or invalid, or when
|
|
4118
|
+
* `from` is later than `to`.
|
|
4119
|
+
*
|
|
4120
|
+
* @example
|
|
4121
|
+
* ```html
|
|
4122
|
+
* {{ [startedAt, finishedAt] | kbqDurationShortest }}
|
|
4123
|
+
* {{ [startedAt, finishedAt] | kbqDurationShortest: { seconds: false } }}
|
|
4124
|
+
* ```
|
|
4125
|
+
*/
|
|
4126
|
+
class KbqDurationShortestPipe extends BaseLocaleAwareFormatterPipe {
|
|
4127
|
+
transform(value, options) {
|
|
4128
|
+
return super.transform(value, options);
|
|
4129
|
+
}
|
|
4130
|
+
format(value, options) {
|
|
4131
|
+
const range = toDurationRange(this.adapter, value);
|
|
4132
|
+
if (!range)
|
|
4133
|
+
return '';
|
|
4134
|
+
return this.formatter.durationShortest(range[0], range[1], options?.seconds, options?.milliseconds);
|
|
4135
|
+
}
|
|
4136
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationShortestPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4137
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationShortestPipe, isStandalone: true, name: "kbqDurationShortest", pure: false }); }
|
|
4138
|
+
}
|
|
4139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationShortestPipe, decorators: [{
|
|
4140
|
+
type: Pipe,
|
|
4141
|
+
args: [{
|
|
4142
|
+
name: 'kbqDurationShortest',
|
|
4143
|
+
pure: false
|
|
4144
|
+
}]
|
|
4145
|
+
}] });
|
|
4146
|
+
/**
|
|
4147
|
+
* Formats the duration between two dates in the long text format, e.g. `2 дня и 4 часа`.
|
|
4148
|
+
*
|
|
4149
|
+
* Takes a `[from, to]` tuple, like the range pipes. `units` restricts the units to show (the
|
|
4150
|
+
* formatter picks them automatically when omitted), `fraction` adds a fractional part for years
|
|
4151
|
+
* and months.
|
|
4152
|
+
*
|
|
4153
|
+
* Renders an empty string when the tuple itself or one of its bounds is missing or invalid, or when
|
|
4154
|
+
* `from` is later than `to`.
|
|
4155
|
+
*
|
|
4156
|
+
* @example
|
|
4157
|
+
* ```html
|
|
4158
|
+
* {{ [startedAt, finishedAt] | kbqDurationLong }}
|
|
4159
|
+
* {{ [startedAt, finishedAt] | kbqDurationLong: ['hours', 'minutes'] }}
|
|
4160
|
+
* {{ [startedAt, finishedAt] | kbqDurationLong: ['years'] : true }}
|
|
4161
|
+
* ```
|
|
4162
|
+
*/
|
|
4163
|
+
class KbqDurationLongPipe extends BaseLocaleAwareFormatterPipe {
|
|
4164
|
+
transform(value, units, fraction) {
|
|
4165
|
+
return super.transform(value, units, fraction);
|
|
4166
|
+
}
|
|
4167
|
+
format(value, units, fraction) {
|
|
4168
|
+
const range = toDurationRange(this.adapter, value);
|
|
4169
|
+
if (!range)
|
|
4170
|
+
return '';
|
|
4171
|
+
return this.formatter.durationLong(range[0], range[1], units, fraction);
|
|
4172
|
+
}
|
|
4173
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationLongPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4174
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationLongPipe, isStandalone: true, name: "kbqDurationLong", pure: false }); }
|
|
4175
|
+
}
|
|
4176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationLongPipe, decorators: [{
|
|
4177
|
+
type: Pipe,
|
|
4178
|
+
args: [{
|
|
4179
|
+
name: 'kbqDurationLong',
|
|
4180
|
+
pure: false
|
|
4181
|
+
}]
|
|
4182
|
+
}] });
|
|
4183
|
+
/**
|
|
4184
|
+
* Formats the duration between two dates in the short text format, e.g. `2 д 4 ч`.
|
|
4185
|
+
*
|
|
4186
|
+
* Takes a `[from, to]` tuple, like the range pipes. `units` restricts the units to show (the
|
|
4187
|
+
* formatter picks them automatically when omitted), `fraction` adds a fractional part for years
|
|
4188
|
+
* and months.
|
|
4189
|
+
*
|
|
4190
|
+
* Renders an empty string when the tuple itself or one of its bounds is missing or invalid, or when
|
|
4191
|
+
* `from` is later than `to`.
|
|
4192
|
+
*
|
|
4193
|
+
* @example
|
|
4194
|
+
* ```html
|
|
4195
|
+
* {{ [startedAt, finishedAt] | kbqDurationShort }}
|
|
4196
|
+
* {{ [startedAt, finishedAt] | kbqDurationShort: ['seconds', 'milliseconds'] }}
|
|
4197
|
+
* ```
|
|
4198
|
+
*/
|
|
4199
|
+
class KbqDurationShortPipe extends BaseLocaleAwareFormatterPipe {
|
|
4200
|
+
transform(value, units, fraction) {
|
|
4201
|
+
return super.transform(value, units, fraction);
|
|
4202
|
+
}
|
|
4203
|
+
format(value, units, fraction) {
|
|
4204
|
+
const range = toDurationRange(this.adapter, value);
|
|
4205
|
+
if (!range)
|
|
4206
|
+
return '';
|
|
4207
|
+
return this.formatter.durationShort(range[0], range[1], units, fraction);
|
|
3398
4208
|
}
|
|
3399
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3400
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4209
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationShortPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4210
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationShortPipe, isStandalone: true, name: "kbqDurationShort", pure: false }); }
|
|
3401
4211
|
}
|
|
3402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDurationShortPipe, decorators: [{
|
|
3403
4213
|
type: Pipe,
|
|
3404
4214
|
args: [{
|
|
3405
|
-
name: '
|
|
4215
|
+
name: 'kbqDurationShort',
|
|
3406
4216
|
pure: false
|
|
3407
4217
|
}]
|
|
3408
4218
|
}] });
|
|
@@ -3562,11 +4372,11 @@ class KbqDecimalPipe {
|
|
|
3562
4372
|
grouping === undefined &&
|
|
3563
4373
|
Math.abs(value) < defaultValueForGroupingInRULocale);
|
|
3564
4374
|
}
|
|
3565
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3566
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3567
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
4375
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDecimalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4376
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqDecimalPipe, isStandalone: true, name: "kbqNumber", pure: false }); }
|
|
4377
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDecimalPipe, providedIn: 'root' }); }
|
|
3568
4378
|
}
|
|
3569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDecimalPipe, decorators: [{
|
|
3570
4380
|
type: Injectable,
|
|
3571
4381
|
args: [{ providedIn: 'root' }]
|
|
3572
4382
|
}, {
|
|
@@ -3619,11 +4429,11 @@ class KbqTableNumberPipe {
|
|
|
3619
4429
|
throw Error(`InvalidPipeArgument: KbqTableNumberPipe for pipe '${JSON.stringify(error.message)}'`);
|
|
3620
4430
|
}
|
|
3621
4431
|
}
|
|
3622
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3623
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3624
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
4432
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTableNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4433
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqTableNumberPipe, isStandalone: true, name: "kbqTableNumber", pure: false }); }
|
|
4434
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTableNumberPipe, providedIn: 'root' }); }
|
|
3625
4435
|
}
|
|
3626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTableNumberPipe, decorators: [{
|
|
3627
4437
|
type: Injectable,
|
|
3628
4438
|
args: [{ providedIn: 'root' }]
|
|
3629
4439
|
}, {
|
|
@@ -3725,11 +4535,11 @@ class KbqRoundDecimalPipe {
|
|
|
3725
4535
|
});
|
|
3726
4536
|
return currentUnit;
|
|
3727
4537
|
}
|
|
3728
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3729
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
3730
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
4538
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRoundDecimalPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4539
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqRoundDecimalPipe, isStandalone: true, name: "kbqRoundNumber", pure: false }); }
|
|
4540
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRoundDecimalPipe, providedIn: 'root' }); }
|
|
3731
4541
|
}
|
|
3732
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRoundDecimalPipe, decorators: [{
|
|
3733
4543
|
type: Injectable,
|
|
3734
4544
|
args: [{ providedIn: 'root' }]
|
|
3735
4545
|
}, {
|
|
@@ -3811,10 +4621,10 @@ class KbqDataSizePipe {
|
|
|
3811
4621
|
const formattedValue = this.numberPipe?.transform(value, `1.0-${precision}`, locale) || value;
|
|
3812
4622
|
return formattedValue ? `${formattedValue}${this.nonBreakingSpace}${unit}` : '';
|
|
3813
4623
|
}
|
|
3814
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3815
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
4624
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDataSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4625
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqDataSizePipe, isStandalone: true, name: "kbqDataSize", pure: false }); }
|
|
3816
4626
|
}
|
|
3817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqDataSizePipe, decorators: [{
|
|
3818
4628
|
type: Pipe,
|
|
3819
4629
|
args: [{
|
|
3820
4630
|
name: 'kbqDataSize',
|
|
@@ -3823,8 +4633,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3823
4633
|
}], ctorParameters: () => [] });
|
|
3824
4634
|
|
|
3825
4635
|
class KbqFormattersModule {
|
|
3826
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3827
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4636
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormattersModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4637
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqFormattersModule, imports: [AbsoluteDateFormatterPipe,
|
|
3828
4638
|
AbsoluteDateTimeFormatterPipe,
|
|
3829
4639
|
AbsoluteDateShortFormatterPipe,
|
|
3830
4640
|
AbsoluteShortDateTimeFormatterPipe,
|
|
@@ -3837,6 +4647,9 @@ class KbqFormattersModule {
|
|
|
3837
4647
|
RangeDateTimeFormatterPipe,
|
|
3838
4648
|
RangeShortDateTimeFormatterPipe,
|
|
3839
4649
|
RangeMiddleDateTimeFormatterPipe,
|
|
4650
|
+
DurationShortestFormatterPipe,
|
|
4651
|
+
DurationLongFormatterPipe,
|
|
4652
|
+
DurationShortFormatterPipe,
|
|
3840
4653
|
AbsoluteDateFormatterImpurePipe,
|
|
3841
4654
|
AbsoluteDateTimeFormatterImpurePipe,
|
|
3842
4655
|
AbsoluteDateShortFormatterImpurePipe,
|
|
@@ -3850,6 +4663,9 @@ class KbqFormattersModule {
|
|
|
3850
4663
|
RangeDateTimeFormatterImpurePipe,
|
|
3851
4664
|
RangeShortDateTimeFormatterImpurePipe,
|
|
3852
4665
|
RangeMiddleDateTimeFormatterImpurePipe,
|
|
4666
|
+
DurationShortestFormatterImpurePipe,
|
|
4667
|
+
DurationLongFormatterImpurePipe,
|
|
4668
|
+
DurationShortFormatterImpurePipe,
|
|
3853
4669
|
KbqAbsoluteLongDatePipe,
|
|
3854
4670
|
KbqAbsoluteLongDateTimePipe,
|
|
3855
4671
|
KbqAbsoluteShortDatePipe,
|
|
@@ -3863,6 +4679,9 @@ class KbqFormattersModule {
|
|
|
3863
4679
|
KbqRangeMiddleDateTimePipe,
|
|
3864
4680
|
KbqRangeShortDatePipe,
|
|
3865
4681
|
KbqRangeShortDateTimePipe,
|
|
4682
|
+
KbqDurationShortestPipe,
|
|
4683
|
+
KbqDurationLongPipe,
|
|
4684
|
+
KbqDurationShortPipe,
|
|
3866
4685
|
KbqDataSizePipe,
|
|
3867
4686
|
KbqDecimalPipe,
|
|
3868
4687
|
KbqRoundDecimalPipe,
|
|
@@ -3882,6 +4701,9 @@ class KbqFormattersModule {
|
|
|
3882
4701
|
RangeDateTimeFormatterPipe,
|
|
3883
4702
|
RangeShortDateTimeFormatterPipe,
|
|
3884
4703
|
RangeMiddleDateTimeFormatterPipe,
|
|
4704
|
+
DurationShortestFormatterPipe,
|
|
4705
|
+
DurationLongFormatterPipe,
|
|
4706
|
+
DurationShortFormatterPipe,
|
|
3885
4707
|
AbsoluteDateFormatterImpurePipe,
|
|
3886
4708
|
AbsoluteDateTimeFormatterImpurePipe,
|
|
3887
4709
|
AbsoluteDateShortFormatterImpurePipe,
|
|
@@ -3895,6 +4717,9 @@ class KbqFormattersModule {
|
|
|
3895
4717
|
RangeDateTimeFormatterImpurePipe,
|
|
3896
4718
|
RangeShortDateTimeFormatterImpurePipe,
|
|
3897
4719
|
RangeMiddleDateTimeFormatterImpurePipe,
|
|
4720
|
+
DurationShortestFormatterImpurePipe,
|
|
4721
|
+
DurationLongFormatterImpurePipe,
|
|
4722
|
+
DurationShortFormatterImpurePipe,
|
|
3898
4723
|
KbqAbsoluteLongDatePipe,
|
|
3899
4724
|
KbqAbsoluteLongDateTimePipe,
|
|
3900
4725
|
KbqAbsoluteShortDatePipe,
|
|
@@ -3908,10 +4733,13 @@ class KbqFormattersModule {
|
|
|
3908
4733
|
KbqRangeMiddleDateTimePipe,
|
|
3909
4734
|
KbqRangeShortDatePipe,
|
|
3910
4735
|
KbqRangeShortDateTimePipe,
|
|
4736
|
+
KbqDurationShortestPipe,
|
|
4737
|
+
KbqDurationLongPipe,
|
|
4738
|
+
KbqDurationShortPipe,
|
|
3911
4739
|
KbqDataSizePipe] }); }
|
|
3912
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
4740
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormattersModule, providers: [DateFormatter] }); }
|
|
3913
4741
|
}
|
|
3914
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormattersModule, decorators: [{
|
|
3915
4743
|
type: NgModule,
|
|
3916
4744
|
args: [{
|
|
3917
4745
|
imports: [
|
|
@@ -3928,6 +4756,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3928
4756
|
RangeDateTimeFormatterPipe,
|
|
3929
4757
|
RangeShortDateTimeFormatterPipe,
|
|
3930
4758
|
RangeMiddleDateTimeFormatterPipe,
|
|
4759
|
+
DurationShortestFormatterPipe,
|
|
4760
|
+
DurationLongFormatterPipe,
|
|
4761
|
+
DurationShortFormatterPipe,
|
|
3931
4762
|
AbsoluteDateFormatterImpurePipe,
|
|
3932
4763
|
AbsoluteDateTimeFormatterImpurePipe,
|
|
3933
4764
|
AbsoluteDateShortFormatterImpurePipe,
|
|
@@ -3941,6 +4772,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3941
4772
|
RangeDateTimeFormatterImpurePipe,
|
|
3942
4773
|
RangeShortDateTimeFormatterImpurePipe,
|
|
3943
4774
|
RangeMiddleDateTimeFormatterImpurePipe,
|
|
4775
|
+
DurationShortestFormatterImpurePipe,
|
|
4776
|
+
DurationLongFormatterImpurePipe,
|
|
4777
|
+
DurationShortFormatterImpurePipe,
|
|
3944
4778
|
KbqAbsoluteLongDatePipe,
|
|
3945
4779
|
KbqAbsoluteLongDateTimePipe,
|
|
3946
4780
|
KbqAbsoluteShortDatePipe,
|
|
@@ -3954,6 +4788,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3954
4788
|
KbqRangeMiddleDateTimePipe,
|
|
3955
4789
|
KbqRangeShortDatePipe,
|
|
3956
4790
|
KbqRangeShortDateTimePipe,
|
|
4791
|
+
KbqDurationShortestPipe,
|
|
4792
|
+
KbqDurationLongPipe,
|
|
4793
|
+
KbqDurationShortPipe,
|
|
3957
4794
|
KbqDataSizePipe,
|
|
3958
4795
|
KbqDecimalPipe,
|
|
3959
4796
|
KbqRoundDecimalPipe,
|
|
@@ -3977,6 +4814,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3977
4814
|
RangeDateTimeFormatterPipe,
|
|
3978
4815
|
RangeShortDateTimeFormatterPipe,
|
|
3979
4816
|
RangeMiddleDateTimeFormatterPipe,
|
|
4817
|
+
DurationShortestFormatterPipe,
|
|
4818
|
+
DurationLongFormatterPipe,
|
|
4819
|
+
DurationShortFormatterPipe,
|
|
3980
4820
|
AbsoluteDateFormatterImpurePipe,
|
|
3981
4821
|
AbsoluteDateTimeFormatterImpurePipe,
|
|
3982
4822
|
AbsoluteDateShortFormatterImpurePipe,
|
|
@@ -3990,6 +4830,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
3990
4830
|
RangeDateTimeFormatterImpurePipe,
|
|
3991
4831
|
RangeShortDateTimeFormatterImpurePipe,
|
|
3992
4832
|
RangeMiddleDateTimeFormatterImpurePipe,
|
|
4833
|
+
DurationShortestFormatterImpurePipe,
|
|
4834
|
+
DurationLongFormatterImpurePipe,
|
|
4835
|
+
DurationShortFormatterImpurePipe,
|
|
3993
4836
|
KbqAbsoluteLongDatePipe,
|
|
3994
4837
|
KbqAbsoluteLongDateTimePipe,
|
|
3995
4838
|
KbqAbsoluteShortDatePipe,
|
|
@@ -4003,6 +4846,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4003
4846
|
KbqRangeMiddleDateTimePipe,
|
|
4004
4847
|
KbqRangeShortDatePipe,
|
|
4005
4848
|
KbqRangeShortDateTimePipe,
|
|
4849
|
+
KbqDurationShortestPipe,
|
|
4850
|
+
KbqDurationLongPipe,
|
|
4851
|
+
KbqDurationShortPipe,
|
|
4006
4852
|
KbqDataSizePipe
|
|
4007
4853
|
]
|
|
4008
4854
|
}]
|
|
@@ -4027,10 +4873,10 @@ class KbqFormElement {
|
|
|
4027
4873
|
this.hasLegend = this.element.nativeElement.firstElementChild.classList.contains('kbq-form__legend');
|
|
4028
4874
|
}
|
|
4029
4875
|
}
|
|
4030
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4031
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.
|
|
4876
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormElement, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4877
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.30", type: KbqFormElement, isStandalone: true, selector: ".kbq-form__row, .kbq-form__fieldset, .kbq-form__legend", host: { properties: { "class.kbq-form-row_margin": "margin" } }, queries: [{ propertyName: "elements", predicate: KbqFormElement, isSignal: true }], exportAs: ["kbqFormElement"], ngImport: i0 }); }
|
|
4032
4878
|
}
|
|
4033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormElement, decorators: [{
|
|
4034
4880
|
type: Directive,
|
|
4035
4881
|
args: [{
|
|
4036
4882
|
selector: '.kbq-form__row, .kbq-form__fieldset, .kbq-form__legend',
|
|
@@ -4056,10 +4902,10 @@ class KbqForm {
|
|
|
4056
4902
|
element.margin = !!(nextElement && !nextElement.hasLegend);
|
|
4057
4903
|
});
|
|
4058
4904
|
}
|
|
4059
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4060
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.
|
|
4905
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqForm, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4906
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.30", type: KbqForm, isStandalone: true, selector: ".kbq-form-vertical, .kbq-form-horizontal", host: { classAttribute: "kbq-form" }, queries: [{ propertyName: "elements", predicate: KbqFormElement, isSignal: true }], exportAs: ["kbqForm"], ngImport: i0 }); }
|
|
4061
4907
|
}
|
|
4062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqForm, decorators: [{
|
|
4063
4909
|
type: Directive,
|
|
4064
4910
|
args: [{
|
|
4065
4911
|
selector: '.kbq-form-vertical, .kbq-form-horizontal',
|
|
@@ -4071,13 +4917,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4071
4917
|
}], propDecorators: { elements: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqFormElement), { isSignal: true }] }] } });
|
|
4072
4918
|
|
|
4073
4919
|
class KbqFormsModule {
|
|
4074
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4075
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4920
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4921
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqFormsModule, imports: [KbqForm,
|
|
4076
4922
|
KbqFormElement], exports: [KbqForm,
|
|
4077
4923
|
KbqFormElement] }); }
|
|
4078
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
4924
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormsModule }); }
|
|
4079
4925
|
}
|
|
4080
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4926
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqFormsModule, decorators: [{
|
|
4081
4927
|
type: NgModule,
|
|
4082
4928
|
args: [{
|
|
4083
4929
|
imports: [
|
|
@@ -4273,6 +5119,119 @@ class FileValidators {
|
|
|
4273
5119
|
}
|
|
4274
5120
|
}
|
|
4275
5121
|
|
|
5122
|
+
/** Unicode combining marks left behind by NFKD decomposition of accented characters, e.g. `é` → `e` + U+0301. */
|
|
5123
|
+
const COMBINING_MARKS = /[̀-ͯ]/g;
|
|
5124
|
+
/**
|
|
5125
|
+
* `й`/`Й` decompose under NFKD into `и`/`И` + a combining breve, same as any other diacritic. Unlike
|
|
5126
|
+
* Latin diacritics, that breve marks a distinct Cyrillic letter rather than an accented variant, so it's
|
|
5127
|
+
* re-composed after the generic strip instead of being folded away with the rest.
|
|
5128
|
+
*/
|
|
5129
|
+
const CYRILLIC_I_BREVE = /[иИ]̆/g;
|
|
5130
|
+
/** The transformation behind {@link normalizeSearchValue}, minus the end-trimming — see {@link findSearchMatchRanges}. */
|
|
5131
|
+
function foldDiacritics(value) {
|
|
5132
|
+
return value
|
|
5133
|
+
.normalize('NFKD')
|
|
5134
|
+
.replace(CYRILLIC_I_BREVE, (match) => (match[0] === 'И' ? 'Й' : 'й'))
|
|
5135
|
+
.replace(COMBINING_MARKS, '')
|
|
5136
|
+
.toLocaleLowerCase();
|
|
5137
|
+
}
|
|
5138
|
+
/**
|
|
5139
|
+
* Normalizes a string for case- and diacritic-insensitive search comparison: trims the ends,
|
|
5140
|
+
* decomposes accented characters (NFKD), strips the resulting combining marks (while preserving
|
|
5141
|
+
* `й`/`Й` as distinct letters), and lowercases using the current locale. Internal whitespace and
|
|
5142
|
+
* punctuation are left untouched.
|
|
5143
|
+
*/
|
|
5144
|
+
function normalizeSearchValue(value) {
|
|
5145
|
+
if (typeof value !== 'string' || !value)
|
|
5146
|
+
return '';
|
|
5147
|
+
return foldDiacritics(value.trim());
|
|
5148
|
+
}
|
|
5149
|
+
/**
|
|
5150
|
+
* Locates every case- and diacritic-insensitive match of `tokens` in `value`, returning `[start, end)`
|
|
5151
|
+
* ranges in `value`'s own (unfolded) coordinates — overlapping or adjacent ranges are merged. This is
|
|
5152
|
+
* what a highlighter needs to stay in sync with {@link createSearchPredicate}: matching a folded value
|
|
5153
|
+
* like `cafe` against `Café` only tells you *that* it matched, not *where* in the original string to
|
|
5154
|
+
* mark, since folding can change which letters look alike without changing the string's length.
|
|
5155
|
+
*/
|
|
5156
|
+
function findSearchMatchRanges(value, tokens) {
|
|
5157
|
+
const normalizedTokens = tokens.map(normalizeSearchValue).filter((token) => token.length > 0);
|
|
5158
|
+
if (typeof value !== 'string' || !normalizedTokens.length)
|
|
5159
|
+
return [];
|
|
5160
|
+
// Folding is applied one UTF-16 code unit at a time so every character of the normalized value can be
|
|
5161
|
+
// traced back to the original index it came from — this is what makes mapping a match's position back
|
|
5162
|
+
// onto `value` possible. Surrogate pairs are folded as two independent units; neither combining-mark
|
|
5163
|
+
// stripping nor case-folding depends on cross-surrogate context, so this doesn't affect correctness.
|
|
5164
|
+
let normalizedValue = '';
|
|
5165
|
+
const originalIndexOf = [];
|
|
5166
|
+
for (let index = 0; index < value.length; index++) {
|
|
5167
|
+
const folded = foldDiacritics(value[index]);
|
|
5168
|
+
normalizedValue += folded;
|
|
5169
|
+
for (let i = 0; i < folded.length; i++)
|
|
5170
|
+
originalIndexOf.push(index);
|
|
5171
|
+
}
|
|
5172
|
+
const ranges = [];
|
|
5173
|
+
for (const token of normalizedTokens) {
|
|
5174
|
+
let fromIndex = 0;
|
|
5175
|
+
let matchIndex;
|
|
5176
|
+
while ((matchIndex = normalizedValue.indexOf(token, fromIndex)) !== -1) {
|
|
5177
|
+
ranges.push([originalIndexOf[matchIndex], originalIndexOf[matchIndex + token.length - 1] + 1]);
|
|
5178
|
+
fromIndex = matchIndex + token.length;
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5181
|
+
return mergeRanges(ranges);
|
|
5182
|
+
}
|
|
5183
|
+
function mergeRanges(ranges) {
|
|
5184
|
+
if (ranges.length < 2)
|
|
5185
|
+
return ranges;
|
|
5186
|
+
const sorted = [...ranges].sort(([aStart, aEnd], [bStart, bEnd]) => aStart - bStart || aEnd - bEnd);
|
|
5187
|
+
const merged = [sorted[0]];
|
|
5188
|
+
for (const [start, end] of sorted.slice(1)) {
|
|
5189
|
+
const last = merged[merged.length - 1];
|
|
5190
|
+
if (start <= last[1]) {
|
|
5191
|
+
last[1] = Math.max(last[1], end);
|
|
5192
|
+
}
|
|
5193
|
+
else {
|
|
5194
|
+
merged.push([start, end]);
|
|
5195
|
+
}
|
|
5196
|
+
}
|
|
5197
|
+
return merged;
|
|
5198
|
+
}
|
|
5199
|
+
const SEARCH_QUERY_TOKEN = /"([^"]*)"|(\S+)/g;
|
|
5200
|
+
/**
|
|
5201
|
+
* Splits a raw query into tokens, treating whitespace as a separator and `"quoted phrases"` as
|
|
5202
|
+
* a single token (spaces inside the quotes are preserved). A `"` with no matching closing quote
|
|
5203
|
+
* stays part of its token instead of being dropped, so a half-open quote yields a token no
|
|
5204
|
+
* realistic haystack contains — and therefore no results — until the quote is closed.
|
|
5205
|
+
*/
|
|
5206
|
+
function tokenizeSearchQuery(query) {
|
|
5207
|
+
if (typeof query !== 'string' || !query.trim())
|
|
5208
|
+
return [];
|
|
5209
|
+
const tokens = [];
|
|
5210
|
+
for (const match of query.matchAll(SEARCH_QUERY_TOKEN)) {
|
|
5211
|
+
const token = match[1] ?? match[2];
|
|
5212
|
+
if (token)
|
|
5213
|
+
tokens.push(token);
|
|
5214
|
+
}
|
|
5215
|
+
return tokens;
|
|
5216
|
+
}
|
|
5217
|
+
/**
|
|
5218
|
+
* Builds a case- and diacritic-insensitive substring predicate for the given query. The query is
|
|
5219
|
+
* tokenized (bare words + `"quoted phrases"`) and every token must match (AND) against at least
|
|
5220
|
+
* one of the supplied haystacks (OR across fields) — pass a single string for a single-field
|
|
5221
|
+
* search, or an array for multi-field rows. An empty/whitespace-only query matches everything.
|
|
5222
|
+
*/
|
|
5223
|
+
function createSearchPredicate(query) {
|
|
5224
|
+
const tokens = tokenizeSearchQuery(query)
|
|
5225
|
+
.map(normalizeSearchValue)
|
|
5226
|
+
.filter((token) => token.length > 0);
|
|
5227
|
+
if (!tokens.length)
|
|
5228
|
+
return () => true;
|
|
5229
|
+
return (value) => {
|
|
5230
|
+
const haystacks = (Array.isArray(value) ? value : [value]).map(normalizeSearchValue);
|
|
5231
|
+
return tokens.every((token) => haystacks.some((haystack) => haystack.includes(token)));
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
|
|
4276
5235
|
const HTML_ESCAPES = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' };
|
|
4277
5236
|
const HTML_SPECIAL_CHARS = /[&<>"']/;
|
|
4278
5237
|
const HTML_SPECIAL_CHARS_GLOBAL = new RegExp(HTML_SPECIAL_CHARS.source, 'g');
|
|
@@ -4288,32 +5247,63 @@ function escapeHtml(value) {
|
|
|
4288
5247
|
return value;
|
|
4289
5248
|
return value.replace(HTML_SPECIAL_CHARS_GLOBAL, (chr) => HTML_ESCAPES[chr] ?? chr);
|
|
4290
5249
|
}
|
|
4291
|
-
|
|
4292
|
-
|
|
5250
|
+
function normalizeKeywords(keyword) {
|
|
5251
|
+
const list = Array.isArray(keyword) ? keyword : [keyword];
|
|
5252
|
+
// Longest first, so a shorter keyword (e.g. "a") can't shadow a longer one that starts
|
|
5253
|
+
// with it (e.g. "all") within the same regex alternation.
|
|
5254
|
+
return list
|
|
5255
|
+
.filter((item) => typeof item === 'string' && item.length > 0)
|
|
5256
|
+
.sort((a, b) => b.length - a.length);
|
|
5257
|
+
}
|
|
5258
|
+
function findLiteralMatchRanges(value, keywords) {
|
|
5259
|
+
const pattern = new RegExp(keywords.map(escapeRegExp).join('|'), 'gi');
|
|
5260
|
+
const ranges = [];
|
|
5261
|
+
let match = pattern.exec(value);
|
|
5262
|
+
while (match !== null) {
|
|
5263
|
+
ranges.push([match.index, match.index + match[0].length]);
|
|
5264
|
+
match = pattern.exec(value);
|
|
5265
|
+
}
|
|
5266
|
+
return ranges;
|
|
5267
|
+
}
|
|
5268
|
+
/**
|
|
5269
|
+
* @docs-private
|
|
5270
|
+
* `keyword` accepts either a single string or an array of strings — every keyword is
|
|
5271
|
+
* highlighted independently, which is what multi-token search queries need.
|
|
5272
|
+
*
|
|
5273
|
+
* By default, matching is literal (case-insensitive substring), same as a plain `.includes`. Pass
|
|
5274
|
+
* `foldDiacritics: true` when the keywords were matched with diacritic folding (e.g. via
|
|
5275
|
+
* {@link createSearchPredicate} from `@koobiq/components/core`) — otherwise a folded match like
|
|
5276
|
+
* `cafe` finding `Café` has nothing in the value for a literal highlighter to mark.
|
|
5277
|
+
*/
|
|
5278
|
+
function highlight(value, keyword, mark, foldDiacritics = false) {
|
|
4293
5279
|
if (typeof value !== 'string')
|
|
4294
5280
|
return '';
|
|
4295
|
-
|
|
5281
|
+
const keywords = normalizeKeywords(keyword);
|
|
5282
|
+
if (!keywords.length)
|
|
5283
|
+
return escapeHtml(value);
|
|
5284
|
+
const ranges = foldDiacritics ? findSearchMatchRanges(value, keywords) : findLiteralMatchRanges(value, keywords);
|
|
5285
|
+
if (!ranges.length)
|
|
4296
5286
|
return escapeHtml(value);
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
}
|
|
4304
|
-
|
|
5287
|
+
let result = '';
|
|
5288
|
+
let cursor = 0;
|
|
5289
|
+
for (const [start, end] of ranges) {
|
|
5290
|
+
result += escapeHtml(value.slice(cursor, start));
|
|
5291
|
+
result += mark(escapeHtml(value.slice(start, end)));
|
|
5292
|
+
cursor = end;
|
|
5293
|
+
}
|
|
5294
|
+
return result + escapeHtml(value.slice(cursor));
|
|
4305
5295
|
}
|
|
4306
5296
|
|
|
4307
5297
|
/** @docs-private */
|
|
4308
5298
|
const kbqHighlightBackgroundMark = (text) => `<mark class="kbq-highlight-background">${text}</mark>`;
|
|
4309
5299
|
class KbqHighlightBackgroundPipe {
|
|
4310
|
-
transform(value, keyword) {
|
|
4311
|
-
return highlight(value, keyword, kbqHighlightBackgroundMark);
|
|
5300
|
+
transform(value, keyword, foldDiacritics = false) {
|
|
5301
|
+
return highlight(value, keyword, kbqHighlightBackgroundMark, foldDiacritics);
|
|
4312
5302
|
}
|
|
4313
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4314
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
5303
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightBackgroundPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5304
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightBackgroundPipe, isStandalone: true, name: "kbqHighlightBackground" }); }
|
|
4315
5305
|
}
|
|
4316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightBackgroundPipe, decorators: [{
|
|
4317
5307
|
type: Pipe,
|
|
4318
5308
|
args: [{ name: 'kbqHighlightBackground' }]
|
|
4319
5309
|
}] });
|
|
@@ -4321,23 +5311,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4321
5311
|
/** @docs-private */
|
|
4322
5312
|
const kbqHighlightMark = (text) => `<mark class="kbq-highlight">${text}</mark>`;
|
|
4323
5313
|
class KbqHighlightPipe {
|
|
4324
|
-
transform(value, keyword) {
|
|
4325
|
-
return highlight(value, keyword, kbqHighlightMark);
|
|
5314
|
+
transform(value, keyword, foldDiacritics = false) {
|
|
5315
|
+
return highlight(value, keyword, kbqHighlightMark, foldDiacritics);
|
|
4326
5316
|
}
|
|
4327
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4328
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
5317
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5318
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightPipe, isStandalone: true, name: "mcHighlight" }); }
|
|
4329
5319
|
}
|
|
4330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightPipe, decorators: [{
|
|
4331
5321
|
type: Pipe,
|
|
4332
5322
|
args: [{ name: 'mcHighlight' }]
|
|
4333
5323
|
}] });
|
|
4334
5324
|
|
|
4335
5325
|
class KbqHighlightModule {
|
|
4336
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4337
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4338
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
5326
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5327
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightModule, imports: [KbqHighlightPipe, KbqHighlightBackgroundPipe], exports: [KbqHighlightPipe, KbqHighlightBackgroundPipe] }); }
|
|
5328
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightModule }); }
|
|
4339
5329
|
}
|
|
4340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqHighlightModule, decorators: [{
|
|
4341
5331
|
type: NgModule,
|
|
4342
5332
|
args: [{
|
|
4343
5333
|
imports: [KbqHighlightPipe, KbqHighlightBackgroundPipe],
|
|
@@ -4351,10 +5341,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4351
5341
|
* counted by checking the query list's length.
|
|
4352
5342
|
*/
|
|
4353
5343
|
class KbqLine {
|
|
4354
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4355
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5344
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLine, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5345
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqLine, isStandalone: true, selector: "[kbq-line], [mcLine]", host: { classAttribute: "kbq-line" }, ngImport: i0 }); }
|
|
4356
5346
|
}
|
|
4357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLine, decorators: [{
|
|
4358
5348
|
type: Directive,
|
|
4359
5349
|
args: [{
|
|
4360
5350
|
selector: '[kbq-line], [mcLine]',
|
|
@@ -4414,16 +5404,24 @@ class KbqRectangleItem {
|
|
|
4414
5404
|
this._collapsed = value;
|
|
4415
5405
|
this.state.next();
|
|
4416
5406
|
}
|
|
5407
|
+
/**
|
|
5408
|
+
* Outer width of the item: its border box plus horizontal margins.
|
|
5409
|
+
*
|
|
5410
|
+
* `getComputedStyle().width` resolves to the used content-box width whatever `box-sizing` says,
|
|
5411
|
+
* so it silently drops padding and borders on the `border-box` elements this measures, and the
|
|
5412
|
+
* result would change again under a consuming application's global reset.
|
|
5413
|
+
* `getBoundingClientRect()` is always the border box, which makes it host-independent.
|
|
5414
|
+
*/
|
|
4417
5415
|
getOuterElementWidth() {
|
|
4418
5416
|
if (!this.isBrowser)
|
|
4419
5417
|
return 0;
|
|
4420
|
-
const {
|
|
4421
|
-
return [
|
|
5418
|
+
const { marginLeft, marginRight } = this.window.getComputedStyle(this.nativeElement);
|
|
5419
|
+
return [marginLeft, marginRight].reduce((acc, item) => acc + (parseFloat(item) || 0), this.nativeElement.getBoundingClientRect().width);
|
|
4422
5420
|
}
|
|
4423
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4424
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
5421
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRectangleItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5422
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqRectangleItem, isStandalone: true, host: { properties: { "class.kbq-expanded": "!collapsed", "class.kbq-collapsed": "collapsed" } }, ngImport: i0 }); }
|
|
4425
5423
|
}
|
|
4426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqRectangleItem, decorators: [{
|
|
4427
5425
|
type: Directive,
|
|
4428
5426
|
args: [{
|
|
4429
5427
|
host: {
|
|
@@ -4482,7 +5480,11 @@ class KbqOptionActionComponent {
|
|
|
4482
5480
|
else {
|
|
4483
5481
|
this.nativeElement.focus();
|
|
4484
5482
|
}
|
|
4485
|
-
|
|
5483
|
+
// The action lives inside `.kbq-action-container`, which is `display: none` until the option
|
|
5484
|
+
// is hovered or keyboard-focused. Focusing a hidden element is a no-op, so `hasFocus` has to
|
|
5485
|
+
// reflect what actually happened: assuming success would latch `kbq-action-button-focused`
|
|
5486
|
+
// on the option forever, since `FocusMonitor` never emits for an element that never got focus.
|
|
5487
|
+
this.hasFocus = this.nativeElement.ownerDocument.activeElement === this.nativeElement;
|
|
4486
5488
|
}
|
|
4487
5489
|
onClick($event) {
|
|
4488
5490
|
$event.stopPropagation();
|
|
@@ -4508,14 +5510,14 @@ class KbqOptionActionComponent {
|
|
|
4508
5510
|
this.option.tooltipTrigger.disabled = true;
|
|
4509
5511
|
setTimeout(() => (this.option.tooltipTrigger.disabled = false));
|
|
4510
5512
|
}
|
|
4511
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4512
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.
|
|
5513
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptionActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5514
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.3.30", type: KbqOptionActionComponent, isStandalone: true, selector: "kbq-option-action", inputs: { disabled: ["disabled", "disabled", booleanAttribute] }, host: { listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)" }, properties: { "class.kbq-expanded": "false", "class.kbq-disabled": "disabled", "attr.disabled": "disabled || null", "attr.tabIndex": "-1" }, classAttribute: "kbq-option-action" }, exportAs: ["kbqOptionAction"], ngImport: i0, template: `
|
|
4513
5515
|
<ng-content select="[kbq-icon]">
|
|
4514
5516
|
<i class="kbq kbq-icon kbq-contrast-fade kbq-ellipsis-vertical_16"></i>
|
|
4515
5517
|
</ng-content>
|
|
4516
|
-
`, isInline: true, styles: [".kbq-option-action{display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;border:var(--kbq-size-3xs) solid transparent;border-radius:var(--kbq-size-xs);width:var(--kbq-size-xl);height:var(--kbq-size-xl)}.kbq-option-action:not(.kbq-disabled):hover .kbq-icon,.kbq-option-action:not(.kbq-disabled):focus .kbq-icon{color:var(--kbq-icon-button-fade-contrast-states-hover)}.kbq-option-action.kbq-disabled{cursor:default}.kbq-option-action.cdk-keyboard-focused{z-index:1;border-color:var(--kbq-states-line-focus-theme)}.kbq-option-action:active .kbq-icon.kbq-empty,.kbq-option-action.kbq-pressed .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-active)}.kbq-option-action:active,.kbq-option-action.kbq-pressed{background-color:var(--kbq-background-transparent)}.kbq-option-action:hover .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-hover)}.kbq-option-action.kbq-disabled .kbq-icon.kbq-empty{color:var(--kbq-states-icon-disabled)}.kbq-option-action.kbq-disabled{background-color:var(--kbq-background-transparent)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5518
|
+
`, isInline: true, styles: [".kbq-option-action{display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;box-sizing:content-box;border:var(--kbq-size-3xs) solid transparent;border-radius:var(--kbq-size-xs);width:var(--kbq-size-xl);height:var(--kbq-size-xl)}.kbq-option-action:not(.kbq-disabled):hover .kbq-icon,.kbq-option-action:not(.kbq-disabled):focus .kbq-icon{color:var(--kbq-icon-button-fade-contrast-states-hover)}.kbq-option-action.kbq-disabled{cursor:default}.kbq-option-action.cdk-keyboard-focused{z-index:1;border-color:var(--kbq-states-line-focus-theme)}.kbq-option-action:active .kbq-icon.kbq-empty,.kbq-option-action.kbq-pressed .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-active)}.kbq-option-action:active,.kbq-option-action.kbq-pressed{background-color:var(--kbq-background-transparent)}.kbq-option-action:hover .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-hover)}.kbq-option-action.kbq-disabled .kbq-icon.kbq-empty{color:var(--kbq-states-icon-disabled)}.kbq-option-action.kbq-disabled{background-color:var(--kbq-background-transparent)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4517
5519
|
}
|
|
4518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptionActionComponent, decorators: [{
|
|
4519
5521
|
type: Component,
|
|
4520
5522
|
args: [{ selector: 'kbq-option-action', template: `
|
|
4521
5523
|
<ng-content select="[kbq-icon]">
|
|
@@ -4529,22 +5531,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4529
5531
|
'[attr.tabIndex]': '-1',
|
|
4530
5532
|
'(click)': 'onClick($event)',
|
|
4531
5533
|
'(keydown)': 'onKeyDown($event)'
|
|
4532
|
-
}, exportAs: 'kbqOptionAction', styles: [".kbq-option-action{display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;border:var(--kbq-size-3xs) solid transparent;border-radius:var(--kbq-size-xs);width:var(--kbq-size-xl);height:var(--kbq-size-xl)}.kbq-option-action:not(.kbq-disabled):hover .kbq-icon,.kbq-option-action:not(.kbq-disabled):focus .kbq-icon{color:var(--kbq-icon-button-fade-contrast-states-hover)}.kbq-option-action.kbq-disabled{cursor:default}.kbq-option-action.cdk-keyboard-focused{z-index:1;border-color:var(--kbq-states-line-focus-theme)}.kbq-option-action:active .kbq-icon.kbq-empty,.kbq-option-action.kbq-pressed .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-active)}.kbq-option-action:active,.kbq-option-action.kbq-pressed{background-color:var(--kbq-background-transparent)}.kbq-option-action:hover .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-hover)}.kbq-option-action.kbq-disabled .kbq-icon.kbq-empty{color:var(--kbq-states-icon-disabled)}.kbq-option-action.kbq-disabled{background-color:var(--kbq-background-transparent)}\n"] }]
|
|
5534
|
+
}, exportAs: 'kbqOptionAction', styles: [".kbq-option-action{display:flex;align-items:center;justify-content:center;cursor:pointer;outline:none;box-sizing:content-box;border:var(--kbq-size-3xs) solid transparent;border-radius:var(--kbq-size-xs);width:var(--kbq-size-xl);height:var(--kbq-size-xl)}.kbq-option-action:not(.kbq-disabled):hover .kbq-icon,.kbq-option-action:not(.kbq-disabled):focus .kbq-icon{color:var(--kbq-icon-button-fade-contrast-states-hover)}.kbq-option-action.kbq-disabled{cursor:default}.kbq-option-action.cdk-keyboard-focused{z-index:1;border-color:var(--kbq-states-line-focus-theme)}.kbq-option-action:active .kbq-icon.kbq-empty,.kbq-option-action.kbq-pressed .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-active)}.kbq-option-action:active,.kbq-option-action.kbq-pressed{background-color:var(--kbq-background-transparent)}.kbq-option-action:hover .kbq-icon.kbq-empty{color:var(--kbq-states-icon-contrast-fade-hover)}.kbq-option-action.kbq-disabled .kbq-icon.kbq-empty{color:var(--kbq-states-icon-disabled)}.kbq-option-action.kbq-disabled{background-color:var(--kbq-background-transparent)}\n"] }]
|
|
4533
5535
|
}], propDecorators: { disabled: [{
|
|
4534
5536
|
type: Input,
|
|
4535
5537
|
args: [{ transform: booleanAttribute }]
|
|
4536
5538
|
}] } });
|
|
5539
|
+
/**
|
|
5540
|
+
* Moves focus from an option to its trailing action button on Tab.
|
|
5541
|
+
*
|
|
5542
|
+
* Shared by `KbqListOption` and `KbqTreeOption` so the two cannot drift apart. Tab is swallowed only
|
|
5543
|
+
* when focus actually landed: the action lives in a `display: none` container until the option is
|
|
5544
|
+
* hovered or keyboard-focused, and focusing a hidden element is a no-op, so suppressing Tab there
|
|
5545
|
+
* would trap focus on the option.
|
|
5546
|
+
*/
|
|
5547
|
+
function kbqFocusOptionActionOnTab($event, actionButton) {
|
|
5548
|
+
if (!actionButton || $event.keyCode !== TAB || $event.shiftKey || actionButton.hasFocus) {
|
|
5549
|
+
return;
|
|
5550
|
+
}
|
|
5551
|
+
actionButton.focus();
|
|
5552
|
+
if (actionButton.hasFocus) {
|
|
5553
|
+
$event.preventDefault();
|
|
5554
|
+
}
|
|
5555
|
+
}
|
|
4537
5556
|
|
|
4538
5557
|
class KbqActionContainer {
|
|
4539
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4540
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5558
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqActionContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5559
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.30", type: KbqActionContainer, isStandalone: true, selector: "kbq-action-container", host: { classAttribute: "kbq-action-container" }, exportAs: ["kbqActionContainer"], ngImport: i0, template: `
|
|
4541
5560
|
<div class="kbq-action-container__gradient"></div>
|
|
4542
5561
|
<div class="kbq-action-container__box">
|
|
4543
5562
|
<ng-content />
|
|
4544
5563
|
</div>
|
|
4545
5564
|
`, isInline: true, styles: [".kbq-action-container{box-sizing:border-box;position:absolute;right:0;top:0;bottom:0;display:none;align-items:center;overflow:hidden;border:1px solid transparent;border-top-right-radius:var(--kbq-size-xs);border-bottom-right-radius:var(--kbq-size-xs)}.kbq-action-container__gradient{display:flex;margin-right:calc(var(--kbq-size-xs) * -1);width:var(--kbq-size-3xl);height:100%;background:linear-gradient(var(--kbq-option-background),var(--kbq-option-background)),var(--kbq-background-bg);-webkit-mask-image:linear-gradient(to right,transparent 0%,black var(--kbq-size-xxl));mask-image:linear-gradient(to right,transparent 0%,black var(--kbq-size-xxl))}.kbq-action-container__box{height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(var(--kbq-option-background),var(--kbq-option-background)),var(--kbq-background-bg)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4546
5565
|
}
|
|
4547
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqActionContainer, decorators: [{
|
|
4548
5567
|
type: Component,
|
|
4549
5568
|
args: [{ selector: 'kbq-action-container', template: `
|
|
4550
5569
|
<div class="kbq-action-container__gradient"></div>
|
|
@@ -4578,13 +5597,15 @@ class KbqOptgroup {
|
|
|
4578
5597
|
this._disabled = value;
|
|
4579
5598
|
}
|
|
4580
5599
|
}
|
|
4581
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4582
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
5600
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptgroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5601
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.30", type: KbqOptgroup, isStandalone: true, selector: "kbq-optgroup", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-labelledby": "labelId", "class.kbq-disabled": "disabled" }, classAttribute: "kbq-optgroup" }, exportAs: ["kbqOptgroup"], ngImport: i0, template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">\n {{ label() }}\n</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\" />\n", styles: [".kbq-optgroup-label{display:flex;align-items:center;box-sizing:border-box;padding:var(--kbq-size-s) var(--kbq-size-l) var(--kbq-size-s) var(--kbq-size-m);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-foreground-contrast-secondary);color:var(--kbq-optgroup-label-color)}.kbq-disabled .kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-states-foreground-disabled)}.kbq-optgroup-label{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4583
5602
|
}
|
|
4584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptgroup, decorators: [{
|
|
4585
5604
|
type: Component,
|
|
4586
5605
|
args: [{ selector: 'kbq-optgroup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
4587
5606
|
class: 'kbq-optgroup',
|
|
5607
|
+
role: 'group',
|
|
5608
|
+
'[attr.aria-labelledby]': 'labelId',
|
|
4588
5609
|
'[class.kbq-disabled]': 'disabled'
|
|
4589
5610
|
}, exportAs: 'kbqOptgroup', template: "<label class=\"kbq-optgroup-label\" [id]=\"labelId\">\n {{ label() }}\n</label>\n<ng-content select=\"kbq-option, kbq-list-option, kbq-timezone-option, ng-container\" />\n", styles: [".kbq-optgroup-label{display:flex;align-items:center;box-sizing:border-box;padding:var(--kbq-size-s) var(--kbq-size-l) var(--kbq-size-s) var(--kbq-size-m);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-foreground-contrast-secondary);color:var(--kbq-optgroup-label-color)}.kbq-disabled .kbq-optgroup-label{--kbq-optgroup-label-color: var(--kbq-states-foreground-disabled)}.kbq-optgroup-label{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n"] }]
|
|
4590
5611
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{
|
|
@@ -4618,10 +5639,10 @@ class KbqPseudoCheckbox extends KbqColorDirective {
|
|
|
4618
5639
|
this.state = input('unchecked', ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
4619
5640
|
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
4620
5641
|
}
|
|
4621
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4622
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
5642
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPseudoCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5643
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.30", type: KbqPseudoCheckbox, isStandalone: true, selector: "kbq-pseudo-checkbox", inputs: { big: { classPropertyName: "big", publicName: "big", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-checkbox_big": "big()", "class.kbq-indeterminate": "state() === \"indeterminate\"", "class.kbq-checked": "state() === true || state() === \"checked\"", "class.kbq-disabled": "disabled()" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n<i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;width:var(--kbq-checkbox-size-normal-width);height:var(--kbq-checkbox-size-normal-width);border-radius:var(--kbq-checkbox-size-normal-border-radius);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-pseudo-checkbox.kbq-pseudo-checkbox-checked,.kbq-pseudo-checkbox.kbq-pseudo-checkbox-indeterminate{border-color:transparent}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width);height:var(--kbq-checkbox-size-big-width);border-radius:var(--kbq-checkbox-size-big-border-radius);border-width:var(--kbq-checkbox-size-big-border-width)}.kbq-pseudo-checkbox{border-color:var(--kbq-checkbox-theme-default-border);background:var(--kbq-checkbox-theme-default-background)}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-pseudo-checkbox.kbq-checked,.kbq-pseudo-checkbox.kbq-indeterminate{border-color:var(--kbq-checkbox-theme-states-checked-border);background:var(--kbq-checkbox-theme-states-checked-background)}.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-pseudo-checkbox.kbq-disabled{border-color:var(--kbq-checkbox-theme-states-disabled-border);background:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-pseudo-checkbox.kbq-error{border-color:var(--kbq-checkbox-error-default-border);background:var(--kbq-checkbox-error-default-background)}.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-pseudo-checkbox.kbq-error.kbq-checked,.kbq-pseudo-checkbox.kbq-error.kbq-indeterminate{border-color:var(--kbq-checkbox-error-states-checked-border);background:var(--kbq-checkbox-error-states-checked-background)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled{border-color:var(--kbq-checkbox-error-states-disabled-border);background:var(--kbq-checkbox-error-states-disabled-background)}\n", ".kbq-pseudo-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4623
5644
|
}
|
|
4624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPseudoCheckbox, decorators: [{
|
|
4625
5646
|
type: Component,
|
|
4626
5647
|
args: [{ selector: 'kbq-pseudo-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
4627
5648
|
class: 'kbq-pseudo-checkbox',
|
|
@@ -4633,11 +5654,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4633
5654
|
}], propDecorators: { big: [{ type: i0.Input, args: [{ isSignal: true, alias: "big", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
4634
5655
|
|
|
4635
5656
|
class KbqPseudoCheckboxModule {
|
|
4636
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4637
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
4638
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
5657
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5658
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqPseudoCheckboxModule, imports: [KbqPseudoCheckbox], exports: [KbqPseudoCheckbox] }); }
|
|
5659
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPseudoCheckboxModule }); }
|
|
4639
5660
|
}
|
|
4640
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPseudoCheckboxModule, decorators: [{
|
|
4641
5662
|
type: NgModule,
|
|
4642
5663
|
args: [{
|
|
4643
5664
|
imports: [KbqPseudoCheckbox],
|
|
@@ -4664,6 +5685,24 @@ function toggleSelectAll(adapter, options) {
|
|
|
4664
5685
|
selectable.forEach((item) => adapter.setSelected(item, shouldSelect));
|
|
4665
5686
|
return changed;
|
|
4666
5687
|
}
|
|
5688
|
+
/**
|
|
5689
|
+
* State of a "select all" master checkbox over the same items {@link toggleSelectAll} would act on.
|
|
5690
|
+
*
|
|
5691
|
+
* Considers only selectable items, so items the toggle cannot reach (disabled, non-selectable) never
|
|
5692
|
+
* pin the checkbox to `indeterminate`. An empty selectable set reads as `unchecked`: there is nothing
|
|
5693
|
+
* to select, and `[].every()` being `true` would otherwise report a full selection.
|
|
5694
|
+
*/
|
|
5695
|
+
function getSelectAllState(adapter) {
|
|
5696
|
+
const selectable = adapter.items.filter((item) => adapter.isSelectable(item));
|
|
5697
|
+
if (selectable.length === 0) {
|
|
5698
|
+
return 'unchecked';
|
|
5699
|
+
}
|
|
5700
|
+
const selected = selectable.filter((item) => adapter.isSelected(item)).length;
|
|
5701
|
+
if (selected === 0) {
|
|
5702
|
+
return 'unchecked';
|
|
5703
|
+
}
|
|
5704
|
+
return selected === selectable.length ? 'checked' : 'indeterminate';
|
|
5705
|
+
}
|
|
4667
5706
|
/** Event emitted by the `onSelectAll` outputs when the select-all toggle runs. */
|
|
4668
5707
|
class KbqSelectAllEvent {
|
|
4669
5708
|
constructor(
|
|
@@ -4778,13 +5817,11 @@ class KbqOption extends KbqOptionBase {
|
|
|
4778
5817
|
this._active = false;
|
|
4779
5818
|
this.mostRecentViewValue = '';
|
|
4780
5819
|
/**
|
|
4781
|
-
*
|
|
4782
|
-
*
|
|
4783
|
-
*
|
|
4784
|
-
* other pointer event. It is automatically cleared when the component loses
|
|
4785
|
-
* focus or if focus is obtained through keyboard navigation or programmatic means.
|
|
5820
|
+
* Whether the pointer is currently over this option. Cleared on `mouseleave` rather than when the
|
|
5821
|
+
* option is focused: hovering the option that is already active does not move the key manager's
|
|
5822
|
+
* index, so no focus follows and a flag cleared only there would stay armed indefinitely.
|
|
4786
5823
|
*/
|
|
4787
|
-
this.
|
|
5824
|
+
this.hoveredByPointer = false;
|
|
4788
5825
|
}
|
|
4789
5826
|
// TODO: Skipped for migration because:
|
|
4790
5827
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
@@ -4870,12 +5907,9 @@ class KbqOption extends KbqOptionBase {
|
|
|
4870
5907
|
this.emitSelectionChangeEvent();
|
|
4871
5908
|
}
|
|
4872
5909
|
}
|
|
5910
|
+
/** Moves keyboard focus to this option and reveals it — see {@link kbqFocusAndReveal}. */
|
|
4873
5911
|
focus() {
|
|
4874
|
-
|
|
4875
|
-
if (typeof element.focus === 'function') {
|
|
4876
|
-
element.focus({ preventScroll: this.isFocusedByMouse });
|
|
4877
|
-
this.isFocusedByMouse = false;
|
|
4878
|
-
}
|
|
5912
|
+
kbqFocusAndReveal(this.getHostElement(), this.hoveredByPointer);
|
|
4879
5913
|
}
|
|
4880
5914
|
/**
|
|
4881
5915
|
* This method sets display styles on the option to make it appear
|
|
@@ -4914,7 +5948,11 @@ class KbqOption extends KbqOptionBase {
|
|
|
4914
5948
|
}
|
|
4915
5949
|
/** Ensures the option is selected when activated from the keyboard. */
|
|
4916
5950
|
handleKeydown(event) {
|
|
4917
|
-
|
|
5951
|
+
// Only claim the event when the option is actually going to react to it: a non-selectable
|
|
5952
|
+
// or disabled option has nothing to do with ENTER/SPACE, and swallowing the event anyway
|
|
5953
|
+
// would stop it from reaching an ancestor that might (e.g. a custom row built on top of a
|
|
5954
|
+
// non-selectable option, like a "select all" master checkbox).
|
|
5955
|
+
if ((event.keyCode === ENTER || event.keyCode === SPACE) && !this.disabled && this.selectable()) {
|
|
4918
5956
|
this.selectViaInteraction();
|
|
4919
5957
|
// Prevent the page from scrolling down and form submits.
|
|
4920
5958
|
event.preventDefault();
|
|
@@ -4944,18 +5982,22 @@ class KbqOption extends KbqOptionBase {
|
|
|
4944
5982
|
onMouseenter() {
|
|
4945
5983
|
if (this.disabled)
|
|
4946
5984
|
return;
|
|
4947
|
-
this.
|
|
5985
|
+
this.hoveredByPointer = true;
|
|
4948
5986
|
this.parent?.keyManager?.setActiveItem(this);
|
|
4949
5987
|
}
|
|
4950
|
-
/** @
|
|
4951
|
-
|
|
5988
|
+
/** @docs-private */
|
|
5989
|
+
onMouseleave() {
|
|
5990
|
+
this.hoveredByPointer = false;
|
|
5991
|
+
}
|
|
5992
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOption, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5993
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqOption, isStandalone: true, selector: "kbq-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, userSelect: { classPropertyName: "userSelect", publicName: "userSelect", isSignal: true, isRequired: false, transformFunction: null }, showCheckbox: { classPropertyName: "showCheckbox", publicName: "showCheckbox", isSignal: false, isRequired: false, transformFunction: null }, viewValue: { classPropertyName: "viewValue", publicName: "viewValue", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onSelectionChange: "onSelectionChange" }, host: { listeners: { "click": "handleClick($event)", "mouseenter": "onMouseenter()", "mouseleave": "onMouseleave()", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "getTabIndex()", "class.kbq-selected": "selected", "class.kbq-option-multiple": "multiple", "class.kbq-active": "active", "class.kbq-disabled": "disabled", "id": "id" }, classAttribute: "kbq-option" }, providers: [
|
|
4952
5994
|
{
|
|
4953
5995
|
provide: KBQ_TITLE_TEXT_REF,
|
|
4954
5996
|
useExisting: KbqOption
|
|
4955
5997
|
}
|
|
4956
|
-
], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqOption"], usesInheritance: true, ngImport: i0, template: "@if (showCheckbox) {\n <ng-content select=\"kbq-pseudo-checkbox\">\n <kbq-pseudo-checkbox [disabled]=\"disabled\" [state]=\"selected ? 'checked' : 'unchecked'\" />\n </ng-content>\n}\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content />\n</span>\n", styles: [".kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-option{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option>.kbq-pseudo-checkbox{margin-top:var(--kbq-size-3xs);align-self:baseline}.kbq-option{border-radius:var(--kbq-option-border-radius)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option-text:empty{display:none}.kbq-option-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option{background:var(--kbq-list-default-container-background)}.kbq-option .kbq-option-text{color:var(--kbq-list-default-text-color)}.kbq-option .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-default-icon-button-color)}.kbq-option .kbq-option-caption{color:var(--kbq-list-default-caption-color)}.kbq-option.kbq-active:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-hover-text-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-hover-icon-button-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-hover-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-states-selected-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-selected-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-selected-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-states-selected-hover-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-states-selected-hover-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-hover-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-states-selected-hover-caption-color)}.kbq-option.kbq-disabled{background:var(--kbq-list-states-disabled-container-background)}.kbq-option.kbq-disabled .kbq-option-text{color:var(--kbq-list-states-disabled-text-color)}.kbq-option.kbq-disabled .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-disabled-icon-button-color)}.kbq-option.kbq-disabled .kbq-option-caption{color:var(--kbq-list-states-disabled-caption-color)}.kbq-option:is(.kbq-selected,.kbq-active):has(+:is(.kbq-selected,.kbq-active)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-option:is(.kbq-selected,.kbq-active)+:is(.kbq-selected,.kbq-active){border-top-left-radius:0;border-top-right-radius:0}.kbq-option-multiple.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-multiple-states-selected-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-multiple-states-selected-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-caption-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-multiple-states-selected-hover-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-multiple-states-selected-hover-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-hover-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-hover-caption-color)}.kbq-option{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-list-option-caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n", ".kbq-list,.kbq-list-selection{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-size-header-padding-top: var(--kbq-size-s);--kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-header-padding-horizontal: var(--kbq-size-m);--kbq-list-size-subheading-padding-top: var(--kbq-size-m);--kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}.kbq-option{--kbq-option-size-horizontal-padding: var(--kbq-size-m);--kbq-option-size-height: var(--kbq-size-3xl);--kbq-option-size-border-width: 2px;--kbq-option-border-radius: var(--kbq-size-xs)}.kbq-option{--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}\n"], dependencies: [{ kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5998
|
+
], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqOption"], usesInheritance: true, ngImport: i0, template: "@if (showCheckbox) {\n <ng-content select=\"kbq-pseudo-checkbox\">\n <kbq-pseudo-checkbox [disabled]=\"disabled\" [state]=\"selected ? 'checked' : 'unchecked'\" />\n </ng-content>\n}\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content />\n</span>\n", styles: [".kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-option{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option>.kbq-pseudo-checkbox{margin-top:var(--kbq-size-3xs);align-self:baseline}.kbq-option{border-radius:var(--kbq-option-border-radius)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option-text:empty{display:none}.kbq-option-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option{background:var(--kbq-list-default-container-background)}.kbq-option .kbq-option-text{color:var(--kbq-list-default-text-color)}.kbq-option .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-default-icon-button-color)}.kbq-option .kbq-option-caption{color:var(--kbq-list-default-caption-color)}.kbq-option.kbq-active:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-hover-text-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-hover-icon-button-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-hover-caption-color)}.kbq-option:active:not(.kbq-disabled),.kbq-option.kbq-pressed:not(.kbq-disabled){background:var(--kbq-list-states-active-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-states-selected-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-selected-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-selected-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-states-selected-hover-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-states-selected-hover-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-hover-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-states-selected-hover-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled):active,.kbq-option.kbq-selected:not(.kbq-disabled).kbq-pressed{background:var(--kbq-list-states-selected-active-container-background)}.kbq-option.kbq-disabled{background:var(--kbq-list-states-disabled-container-background)}.kbq-option.kbq-disabled .kbq-option-text{color:var(--kbq-list-states-disabled-text-color)}.kbq-option.kbq-disabled .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-disabled-icon-button-color)}.kbq-option.kbq-disabled .kbq-option-caption{color:var(--kbq-list-states-disabled-caption-color)}.kbq-option.kbq-selected.kbq-disabled{background:var(--kbq-list-states-selected-container-background)}.kbq-option:is(.kbq-selected,.kbq-active):has(+:is(.kbq-selected,.kbq-active)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-option:is(.kbq-selected,.kbq-active)+:is(.kbq-selected,.kbq-active){border-top-left-radius:0;border-top-right-radius:0}.kbq-option-multiple.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-multiple-states-selected-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-multiple-states-selected-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-caption-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-multiple-states-selected-hover-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-multiple-states-selected-hover-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-hover-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-hover-caption-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled):active,.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-pressed{background:var(--kbq-list-multiple-states-selected-active-container-background)}.kbq-option-multiple.kbq-selected.kbq-disabled{background:var(--kbq-list-multiple-states-selected-container-background)}.kbq-option{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-list-option-caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n", "@charset \"UTF-8\";.kbq-list,.kbq-list-selection,.kbq-list-option.cdk-drag-preview,.kbq-list-drag-preview_text{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xxs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled);--kbq-list-states-dragged-container-background: var(--kbq-background-card);--kbq-list-states-dragged-container-shadow: var(--kbq-shadow-popup)}.kbq-list-selection{--kbq-list-size-dragged-indicator-thickness: var(--kbq-size-3xs);--kbq-list-states-dragged-indicator-color: var(--kbq-line-theme)}.kbq-list-drag-preview_text{--kbq-list-size-drag-preview-max-width: 480px;--kbq-list-states-drag-preview-background: color-mix( in srgb, var(--kbq-background-card) calc(var(--kbq-opacity-overlay) * 100%), transparent )}.kbq-option{--kbq-option-size-horizontal-padding: var(--kbq-size-m);--kbq-option-size-height: var(--kbq-size-3xl);--kbq-option-size-border-width: 2px;--kbq-option-border-radius: var(--kbq-size-xs)}.kbq-option{--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled);--kbq-list-states-dragged-container-background: var(--kbq-background-card);--kbq-list-states-dragged-container-shadow: var(--kbq-shadow-popup)}\n"], dependencies: [{ kind: "ngmodule", type: KbqPseudoCheckboxModule }, { kind: "component", type: KbqPseudoCheckbox, selector: "kbq-pseudo-checkbox", inputs: ["big", "state", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4957
5999
|
}
|
|
4958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOption, decorators: [{
|
|
4959
6001
|
type: Component,
|
|
4960
6002
|
args: [{ selector: 'kbq-option', imports: [
|
|
4961
6003
|
KbqPseudoCheckboxModule
|
|
@@ -4974,8 +6016,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4974
6016
|
'[id]': 'id',
|
|
4975
6017
|
'(click)': 'handleClick($event)',
|
|
4976
6018
|
'(mouseenter)': 'onMouseenter()',
|
|
6019
|
+
'(mouseleave)': 'onMouseleave()',
|
|
4977
6020
|
'(keydown)': 'handleKeydown($event)'
|
|
4978
|
-
}, exportAs: 'kbqOption', template: "@if (showCheckbox) {\n <ng-content select=\"kbq-pseudo-checkbox\">\n <kbq-pseudo-checkbox [disabled]=\"disabled\" [state]=\"selected ? 'checked' : 'unchecked'\" />\n </ng-content>\n}\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content />\n</span>\n", styles: [".kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-option{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option>.kbq-pseudo-checkbox{margin-top:var(--kbq-size-3xs);align-self:baseline}.kbq-option{border-radius:var(--kbq-option-border-radius)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option-text:empty{display:none}.kbq-option-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option{background:var(--kbq-list-default-container-background)}.kbq-option .kbq-option-text{color:var(--kbq-list-default-text-color)}.kbq-option .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-default-icon-button-color)}.kbq-option .kbq-option-caption{color:var(--kbq-list-default-caption-color)}.kbq-option.kbq-active:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-hover-text-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-hover-icon-button-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-hover-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-states-selected-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-selected-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-selected-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-states-selected-hover-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-states-selected-hover-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-hover-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-states-selected-hover-caption-color)}.kbq-option.kbq-disabled{background:var(--kbq-list-states-disabled-container-background)}.kbq-option.kbq-disabled .kbq-option-text{color:var(--kbq-list-states-disabled-text-color)}.kbq-option.kbq-disabled .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-disabled-icon-button-color)}.kbq-option.kbq-disabled .kbq-option-caption{color:var(--kbq-list-states-disabled-caption-color)}.kbq-option:is(.kbq-selected,.kbq-active):has(+:is(.kbq-selected,.kbq-active)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-option:is(.kbq-selected,.kbq-active)+:is(.kbq-selected,.kbq-active){border-top-left-radius:0;border-top-right-radius:0}.kbq-option-multiple.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-multiple-states-selected-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-multiple-states-selected-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-caption-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-multiple-states-selected-hover-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-multiple-states-selected-hover-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-hover-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-hover-caption-color)}.kbq-option{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-list-option-caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n", ".kbq-list,.kbq-list-selection{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-size-header-padding-top: var(--kbq-size-s);--kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-header-padding-horizontal: var(--kbq-size-m);--kbq-list-size-subheading-padding-top: var(--kbq-size-m);--kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}.kbq-option{--kbq-option-size-horizontal-padding: var(--kbq-size-m);--kbq-option-size-height: var(--kbq-size-3xl);--kbq-option-size-border-width: 2px;--kbq-option-border-radius: var(--kbq-size-xs)}.kbq-option{--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}\n"] }]
|
|
6021
|
+
}, exportAs: 'kbqOption', template: "@if (showCheckbox) {\n <ng-content select=\"kbq-pseudo-checkbox\">\n <kbq-pseudo-checkbox [disabled]=\"disabled\" [state]=\"selected ? 'checked' : 'unchecked'\" />\n </ng-content>\n}\n\n<span #kbqTitleText class=\"kbq-option-text\">\n <ng-content />\n</span>\n", styles: [".kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option{position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-option .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option .kbq-list-text:empty{display:none}.kbq-option .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-option{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-option>.kbq-pseudo-checkbox{margin-top:var(--kbq-size-3xs);align-self:baseline}.kbq-option{border-radius:var(--kbq-option-border-radius)}.kbq-option:not(.kbq-disabled){cursor:pointer}.kbq-option-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-option-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-option-text:empty{display:none}.kbq-option-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-option{background:var(--kbq-list-default-container-background)}.kbq-option .kbq-option-text{color:var(--kbq-list-default-text-color)}.kbq-option .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-default-icon-button-color)}.kbq-option .kbq-option-caption{color:var(--kbq-list-default-caption-color)}.kbq-option.kbq-active:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-hover-text-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-hover-icon-button-color)}.kbq-option.kbq-active:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-hover-caption-color)}.kbq-option:active:not(.kbq-disabled),.kbq-option.kbq-pressed:not(.kbq-disabled){background:var(--kbq-list-states-active-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-states-selected-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-states-selected-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-states-selected-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-states-selected-hover-container-background)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-states-selected-hover-text-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-selected-hover-icon-button-color)}.kbq-option.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-states-selected-hover-caption-color)}.kbq-option.kbq-selected:not(.kbq-disabled):active,.kbq-option.kbq-selected:not(.kbq-disabled).kbq-pressed{background:var(--kbq-list-states-selected-active-container-background)}.kbq-option.kbq-disabled{background:var(--kbq-list-states-disabled-container-background)}.kbq-option.kbq-disabled .kbq-option-text{color:var(--kbq-list-states-disabled-text-color)}.kbq-option.kbq-disabled .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-states-disabled-icon-button-color)}.kbq-option.kbq-disabled .kbq-option-caption{color:var(--kbq-list-states-disabled-caption-color)}.kbq-option.kbq-selected.kbq-disabled{background:var(--kbq-list-states-selected-container-background)}.kbq-option:is(.kbq-selected,.kbq-active):has(+:is(.kbq-selected,.kbq-active)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-option:is(.kbq-selected,.kbq-active)+:is(.kbq-selected,.kbq-active){border-top-left-radius:0;border-top-right-radius:0}.kbq-option-multiple.kbq-selected:not(.kbq-disabled){background:var(--kbq-list-multiple-states-selected-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-text{color:var(--kbq-list-multiple-states-selected-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled) .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-caption-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active{background:var(--kbq-list-multiple-states-selected-hover-container-background)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-text{color:var(--kbq-list-multiple-states-selected-hover-text-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-action .kbq-icon.kbq-empty{color:var(--kbq-list-multiple-states-selected-hover-icon-button-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-active .kbq-option-caption{color:var(--kbq-list-multiple-states-selected-hover-caption-color)}.kbq-option-multiple.kbq-selected:not(.kbq-disabled):active,.kbq-option-multiple.kbq-selected:not(.kbq-disabled).kbq-pressed{background:var(--kbq-list-multiple-states-selected-active-container-background)}.kbq-option-multiple.kbq-selected.kbq-disabled{background:var(--kbq-list-multiple-states-selected-container-background)}.kbq-option{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-list-option-caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n", "@charset \"UTF-8\";.kbq-list,.kbq-list-selection,.kbq-list-option.cdk-drag-preview,.kbq-list-drag-preview_text{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xxs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled);--kbq-list-states-dragged-container-background: var(--kbq-background-card);--kbq-list-states-dragged-container-shadow: var(--kbq-shadow-popup)}.kbq-list-selection{--kbq-list-size-dragged-indicator-thickness: var(--kbq-size-3xs);--kbq-list-states-dragged-indicator-color: var(--kbq-line-theme)}.kbq-list-drag-preview_text{--kbq-list-size-drag-preview-max-width: 480px;--kbq-list-states-drag-preview-background: color-mix( in srgb, var(--kbq-background-card) calc(var(--kbq-opacity-overlay) * 100%), transparent )}.kbq-option{--kbq-option-size-horizontal-padding: var(--kbq-size-m);--kbq-option-size-height: var(--kbq-size-3xl);--kbq-option-size-border-width: 2px;--kbq-option-border-radius: var(--kbq-size-xs)}.kbq-option{--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-multiple-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-multiple-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-multiple-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-multiple-states-selected-hover-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled);--kbq-list-states-dragged-container-background: var(--kbq-background-card);--kbq-list-states-dragged-container-shadow: var(--kbq-shadow-popup)}\n"] }]
|
|
4979
6022
|
}], propDecorators: { textElement: [{
|
|
4980
6023
|
type: ViewChild,
|
|
4981
6024
|
args: ['kbqTitleText', { static: false }]
|
|
@@ -5018,6 +6061,9 @@ function countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {
|
|
|
5018
6061
|
* @param currentScrollPosition Current scroll position of the panel.
|
|
5019
6062
|
* @param panelHeight Height of the panel.
|
|
5020
6063
|
* @docs-private
|
|
6064
|
+
* @deprecated Unused — an option reveals itself on focus through `KbqOption.focus`, which lets the
|
|
6065
|
+
* browser resolve the scroll container instead of computing an offset from a uniform row height. Will be
|
|
6066
|
+
* removed in the next major release.
|
|
5021
6067
|
*/
|
|
5022
6068
|
function getOptionScrollPosition(optionIndex, optionHeight, currentScrollPosition, panelHeight) {
|
|
5023
6069
|
const optionOffset = optionIndex * optionHeight;
|
|
@@ -5031,11 +6077,11 @@ function getOptionScrollPosition(optionIndex, optionHeight, currentScrollPositio
|
|
|
5031
6077
|
}
|
|
5032
6078
|
|
|
5033
6079
|
class KbqOptionModule {
|
|
5034
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5035
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
5036
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
6080
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6081
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqOptionModule, imports: [KbqPseudoCheckbox, KbqOption, KbqOptgroup, KbqOptionActionComponent], exports: [KbqOption, KbqOptgroup, KbqOptionActionComponent] }); }
|
|
6082
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptionModule }); }
|
|
5037
6083
|
}
|
|
5038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOptionModule, decorators: [{
|
|
5039
6085
|
type: NgModule,
|
|
5040
6086
|
args: [{
|
|
5041
6087
|
imports: [KbqPseudoCheckbox, KbqOption, KbqOptgroup, KbqOptionActionComponent],
|
|
@@ -5116,10 +6162,10 @@ class KbqOverflowShadowContainer {
|
|
|
5116
6162
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
5117
6163
|
.subscribe(() => this.checkOverflow());
|
|
5118
6164
|
}
|
|
5119
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5120
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
6165
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOverflowShadowContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6166
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqOverflowShadowContainer, isStandalone: true, selector: "[kbqOverflowShadowContainer]", inputs: { debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["kbqOverflowShadowContainer"], ngImport: i0 }); }
|
|
5121
6167
|
}
|
|
5122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOverflowShadowContainer, decorators: [{
|
|
5123
6169
|
type: Directive,
|
|
5124
6170
|
args: [{
|
|
5125
6171
|
selector: '[kbqOverflowShadowContainer]',
|
|
@@ -5146,10 +6192,10 @@ class KbqOverflowShadowTop {
|
|
|
5146
6192
|
/** Value of `box-shadow` when the shadow is active. Defaults to the standard Koobiq token. */
|
|
5147
6193
|
this.shadow = input('var(--kbq-shadow-overflow-normal-bottom)', ...(ngDevMode ? [{ debugName: "shadow" }] : []));
|
|
5148
6194
|
}
|
|
5149
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5150
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
6195
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOverflowShadowTop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6196
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqOverflowShadowTop, isStandalone: true, selector: "[kbqOverflowShadowTop]", inputs: { ref: { classPropertyName: "ref", publicName: "kbqOverflowShadowTop", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.box-shadow": "ref()?.overflow()?.top ? shadow() : null" } }, exportAs: ["kbqOverflowShadowTop"], ngImport: i0 }); }
|
|
5151
6197
|
}
|
|
5152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOverflowShadowTop, decorators: [{
|
|
5153
6199
|
type: Directive,
|
|
5154
6200
|
args: [{
|
|
5155
6201
|
selector: '[kbqOverflowShadowTop]',
|
|
@@ -5172,10 +6218,10 @@ class KbqOverflowShadowBottom {
|
|
|
5172
6218
|
/** Value of `box-shadow` when the shadow is active. Defaults to the standard Koobiq token. */
|
|
5173
6219
|
this.shadow = input('var(--kbq-shadow-overflow-normal-top)', ...(ngDevMode ? [{ debugName: "shadow" }] : []));
|
|
5174
6220
|
}
|
|
5175
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5176
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
6221
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOverflowShadowBottom, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6222
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqOverflowShadowBottom, isStandalone: true, selector: "[kbqOverflowShadowBottom]", inputs: { ref: { classPropertyName: "ref", publicName: "kbqOverflowShadowBottom", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.box-shadow": "ref()?.overflow()?.bottom ? shadow() : null" } }, exportAs: ["kbqOverflowShadowBottom"], ngImport: i0 }); }
|
|
5177
6223
|
}
|
|
5178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqOverflowShadowBottom, decorators: [{
|
|
5179
6225
|
type: Directive,
|
|
5180
6226
|
args: [{
|
|
5181
6227
|
selector: '[kbqOverflowShadowBottom]',
|
|
@@ -5186,6 +6232,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
5186
6232
|
}]
|
|
5187
6233
|
}], propDecorators: { ref: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqOverflowShadowBottom", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }] } });
|
|
5188
6234
|
|
|
6235
|
+
/**
|
|
6236
|
+
* Scroll strategy that repositions the overlay on scroll and reports when the tracked element
|
|
6237
|
+
* moves outside its boundary:
|
|
6238
|
+
*
|
|
6239
|
+
* - With `originElement`: tracks the origin against each ancestor `CdkScrollable` container.
|
|
6240
|
+
* - Without `originElement`: tracks the overlay panel against the viewport.
|
|
6241
|
+
*
|
|
6242
|
+
* Two ways to react to the out-of-bounds event, usable independently or together:
|
|
6243
|
+
* - Subscribe to `hide` — a handle for callers that don't control how this strategy is
|
|
6244
|
+
* constructed (e.g. reaching into an existing component's `overlayRef.getConfig().scrollStrategy`
|
|
6245
|
+
* from the outside).
|
|
6246
|
+
* - Pass `onHide` via the factory returned by `kbqAutoHideScrollStrategyFactory` — for callers
|
|
6247
|
+
* that construct the strategy themselves.
|
|
6248
|
+
*/
|
|
6249
|
+
class KbqAutoHideScrollStrategy {
|
|
6250
|
+
constructor(scrollDispatcher, viewportRuler, ngZone, config = {}, hooks) {
|
|
6251
|
+
this.scrollDispatcher = scrollDispatcher;
|
|
6252
|
+
this.viewportRuler = viewportRuler;
|
|
6253
|
+
this.ngZone = ngZone;
|
|
6254
|
+
this.config = config;
|
|
6255
|
+
this.hooks = hooks;
|
|
6256
|
+
this.hideSubject = new Subject();
|
|
6257
|
+
/** Emits once when the tracked element scrolls outside its boundary. */
|
|
6258
|
+
this.hide = this.hideSubject.asObservable();
|
|
6259
|
+
this.overlayRef = null;
|
|
6260
|
+
this.scrollSubscription = null;
|
|
6261
|
+
this.originElement = null;
|
|
6262
|
+
this.ancestorScrollContainers = null;
|
|
6263
|
+
}
|
|
6264
|
+
/** @docs-private */
|
|
6265
|
+
attach(overlayRef) {
|
|
6266
|
+
if (this.overlayRef && isDevMode()) {
|
|
6267
|
+
throw new Error('KbqAutoHideScrollStrategy: attach() has already been called for this instance.');
|
|
6268
|
+
}
|
|
6269
|
+
this.overlayRef = overlayRef;
|
|
6270
|
+
}
|
|
6271
|
+
/** Subscribes to scroll events and starts repositioning / out-of-bounds detection. */
|
|
6272
|
+
enable() {
|
|
6273
|
+
if (this.scrollSubscription)
|
|
6274
|
+
return;
|
|
6275
|
+
if (!this.overlayRef) {
|
|
6276
|
+
throw new Error('KbqAutoHideScrollStrategy: enable() was called before attach(). Call attach() first.');
|
|
6277
|
+
}
|
|
6278
|
+
const overlayRef = this.overlayRef;
|
|
6279
|
+
const { scrollThrottle = 20 } = this.config;
|
|
6280
|
+
this.originElement = this.config.originElement ?? this.resolveOriginElement(overlayRef);
|
|
6281
|
+
this.ancestorScrollContainers = this.originElement
|
|
6282
|
+
? this.scrollDispatcher.getAncestorScrollContainers(this.originElement)
|
|
6283
|
+
: null;
|
|
6284
|
+
this.scrollSubscription = this.scrollDispatcher
|
|
6285
|
+
.scrolled(scrollThrottle)
|
|
6286
|
+
.pipe(filter((scrollable) => !scrollable || !overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement)))
|
|
6287
|
+
.subscribe(() => {
|
|
6288
|
+
const isOutside = this.originElement
|
|
6289
|
+
? this.isOriginOutsideAncestors(this.originElement)
|
|
6290
|
+
: this.isOverlayOutsideViewport(overlayRef);
|
|
6291
|
+
if (isOutside) {
|
|
6292
|
+
this.disable();
|
|
6293
|
+
this.ngZone.run(() => {
|
|
6294
|
+
this.hideSubject.next();
|
|
6295
|
+
this.hooks?.onHide?.();
|
|
6296
|
+
});
|
|
6297
|
+
return;
|
|
6298
|
+
}
|
|
6299
|
+
overlayRef.updatePosition();
|
|
6300
|
+
});
|
|
6301
|
+
}
|
|
6302
|
+
/** Unsubscribes from scroll events. */
|
|
6303
|
+
disable() {
|
|
6304
|
+
this.scrollSubscription?.unsubscribe();
|
|
6305
|
+
this.scrollSubscription = null;
|
|
6306
|
+
}
|
|
6307
|
+
/** Disables the strategy and completes `hide`. */
|
|
6308
|
+
detach() {
|
|
6309
|
+
this.disable();
|
|
6310
|
+
this.hideSubject.complete();
|
|
6311
|
+
this.hooks = undefined;
|
|
6312
|
+
this.overlayRef = null;
|
|
6313
|
+
this.originElement = null;
|
|
6314
|
+
this.ancestorScrollContainers = null;
|
|
6315
|
+
}
|
|
6316
|
+
resolveOriginElement(overlayRef) {
|
|
6317
|
+
const positionStrategy = overlayRef.getConfig().positionStrategy;
|
|
6318
|
+
if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
|
|
6319
|
+
return this.coerceOriginElement(positionStrategy._origin);
|
|
6320
|
+
}
|
|
6321
|
+
return null;
|
|
6322
|
+
}
|
|
6323
|
+
isOriginOutsideAncestors(originElement) {
|
|
6324
|
+
const originRect = originElement.getBoundingClientRect();
|
|
6325
|
+
return (this.ancestorScrollContainers ?? []).some((scrollable) => this.isOutsideBounds(originRect, scrollable.getElementRef().nativeElement.getBoundingClientRect()));
|
|
6326
|
+
}
|
|
6327
|
+
isOverlayOutsideViewport(overlayRef) {
|
|
6328
|
+
const overlayRect = overlayRef.overlayElement.getBoundingClientRect();
|
|
6329
|
+
const { width, height } = this.viewportRuler.getViewportSize();
|
|
6330
|
+
return this.isOutsideBounds(overlayRect, { top: 0, left: 0, bottom: height, right: width });
|
|
6331
|
+
}
|
|
6332
|
+
isOutsideBounds(rect, containerRect) {
|
|
6333
|
+
return (rect.bottom < containerRect.top ||
|
|
6334
|
+
rect.top > containerRect.bottom ||
|
|
6335
|
+
rect.right < containerRect.left ||
|
|
6336
|
+
rect.left > containerRect.right);
|
|
6337
|
+
}
|
|
6338
|
+
coerceOriginElement(raw) {
|
|
6339
|
+
if (raw instanceof HTMLElement) {
|
|
6340
|
+
return raw;
|
|
6341
|
+
}
|
|
6342
|
+
else if (raw instanceof ElementRef && raw.nativeElement instanceof HTMLElement) {
|
|
6343
|
+
return raw.nativeElement;
|
|
6344
|
+
}
|
|
6345
|
+
return null;
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
/**
|
|
6349
|
+
* Factory function for `KbqAutoHideScrollStrategy`. Use it directly as a `useFactory` value
|
|
6350
|
+
* when providing a component-level scroll strategy token (e.g. `KBQ_POPOVER_SCROLL_STRATEGY`).
|
|
6351
|
+
*
|
|
6352
|
+
* The returned function accepts an optional `hooks` object (see `KbqAutoHideScrollStrategyHooks`)
|
|
6353
|
+
* and an optional `config` (see `KbqAutoHideScrollStrategyConfig`).
|
|
6354
|
+
*
|
|
6355
|
+
* @example
|
|
6356
|
+
* ```ts
|
|
6357
|
+
* const createScrollStrategy = kbqAutoHideScrollStrategyFactory(scrollDispatcher, viewportRuler, ngZone);
|
|
6358
|
+
* const strategy = createScrollStrategy({ onHide: () => this.hide() }, { originElement });
|
|
6359
|
+
* ```
|
|
6360
|
+
*/
|
|
6361
|
+
function kbqAutoHideScrollStrategyFactory(scrollDispatcher, viewportRuler, ngZone) {
|
|
6362
|
+
return (hooks, config) => new KbqAutoHideScrollStrategy(scrollDispatcher, viewportRuler, ngZone, config ?? {}, hooks);
|
|
6363
|
+
}
|
|
6364
|
+
|
|
5189
6365
|
const POSITION_MAP = {
|
|
5190
6366
|
top: {
|
|
5191
6367
|
originX: 'center',
|
|
@@ -5436,6 +6612,112 @@ function objectValues(object) {
|
|
|
5436
6612
|
return object === null ? [] : baseValues(object, Object.keys(object));
|
|
5437
6613
|
}
|
|
5438
6614
|
|
|
6615
|
+
/**
|
|
6616
|
+
* Renders `panelMaxHeight` as a CSS length for the `--kbq-select-panel-size-max-height` token.
|
|
6617
|
+
*
|
|
6618
|
+
* A non-finite value yields `null` so that Angular removes the inline custom property and the stylesheet
|
|
6619
|
+
* default applies again. A negative value is clamped to `0` because `max-height` rejects negative lengths
|
|
6620
|
+
* at computed-value time, which would drop the declaration and leave the list unbounded rather than at
|
|
6621
|
+
* its default height.
|
|
6622
|
+
* @docs-private
|
|
6623
|
+
*/
|
|
6624
|
+
function kbqResolvePanelMaxHeightToken(panelMaxHeight) {
|
|
6625
|
+
// `numberAttribute` coerces `null` and other invalid bindings to `NaN`, so guard on finiteness
|
|
6626
|
+
// rather than on `null`, which never reaches us from a template binding.
|
|
6627
|
+
return Number.isFinite(panelMaxHeight) ? coerceCssPixelValue(Math.max(panelMaxHeight, 0)) : null;
|
|
6628
|
+
}
|
|
6629
|
+
/**
|
|
6630
|
+
* Default cap of an overlay panel's scrollable content, in pixels. Mirrors the stylesheet default of
|
|
6631
|
+
* `--kbq-select-panel-size-max-height` so that the two cannot drift apart.
|
|
6632
|
+
* @docs-private
|
|
6633
|
+
*/
|
|
6634
|
+
const KBQ_PANEL_DEFAULT_MAX_HEIGHT = 256;
|
|
6635
|
+
/**
|
|
6636
|
+
* Measures how much room the panel's scrollable list has on either side of the trigger.
|
|
6637
|
+
*
|
|
6638
|
+
* Returns `null` for geometry that cannot be trusted — a collapsed trigger rect or a zero-height viewport, which
|
|
6639
|
+
* is what a DOM without layout reports, on the server and under jsdom.
|
|
6640
|
+
* @docs-private
|
|
6641
|
+
*/
|
|
6642
|
+
function kbqResolvePanelSideSpace(context) {
|
|
6643
|
+
const { triggerTop, triggerBottom, viewportHeight, viewportMargin, chromeHeight } = context;
|
|
6644
|
+
if (![triggerTop, triggerBottom, viewportHeight, viewportMargin, chromeHeight].every(Number.isFinite)) {
|
|
6645
|
+
return null;
|
|
6646
|
+
}
|
|
6647
|
+
if (viewportHeight <= 0 || triggerBottom <= triggerTop)
|
|
6648
|
+
return null;
|
|
6649
|
+
return {
|
|
6650
|
+
above: triggerTop - viewportMargin - chromeHeight,
|
|
6651
|
+
below: viewportHeight - triggerBottom - viewportMargin - chromeHeight
|
|
6652
|
+
};
|
|
6653
|
+
}
|
|
6654
|
+
/**
|
|
6655
|
+
* Distance from the trigger's top edge down to where a panel would start if the trigger had a single row —
|
|
6656
|
+
* equivalently, the trigger's height with rows 2..N removed.
|
|
6657
|
+
*
|
|
6658
|
+
* Returns `null` for geometry that cannot be trusted: a collapsed rect (the server, a DOM without layout), or
|
|
6659
|
+
* a row container that is not what drives the trigger's height, which a result reaching past the trigger's own
|
|
6660
|
+
* bottom edge gives away.
|
|
6661
|
+
* @docs-private
|
|
6662
|
+
*/
|
|
6663
|
+
function kbqResolveTriggerFirstRowOffset(measurements) {
|
|
6664
|
+
const { originTop, originBottom, listTop, listBottom, firstRowBottom, listScrollTop } = measurements;
|
|
6665
|
+
if (![originTop, originBottom, listTop, listBottom, firstRowBottom, listScrollTop].every(Number.isFinite)) {
|
|
6666
|
+
return null;
|
|
6667
|
+
}
|
|
6668
|
+
const originHeight = originBottom - originTop;
|
|
6669
|
+
if (originHeight <= 0)
|
|
6670
|
+
return null;
|
|
6671
|
+
// The first row measured in the container's own, unscrolled coordinates, plus the chrome the trigger keeps
|
|
6672
|
+
// above and below its rows — the matcher's padding and the field's border.
|
|
6673
|
+
const firstRowHeight = firstRowBottom + listScrollTop - listTop;
|
|
6674
|
+
const offset = listTop - originTop + firstRowHeight + (originBottom - listBottom);
|
|
6675
|
+
return offset > 0 && offset <= originHeight ? offset : null;
|
|
6676
|
+
}
|
|
6677
|
+
/**
|
|
6678
|
+
* Room the panel's scrollable list has when it is anchored to the trigger's first row instead of to the
|
|
6679
|
+
* trigger's bottom edge. The same arithmetic as {@link kbqResolvePanelSideSpace}, on a trigger cut to one row.
|
|
6680
|
+
* @docs-private
|
|
6681
|
+
*/
|
|
6682
|
+
function kbqResolveOverlapPanelSpace(context, firstRowOffset) {
|
|
6683
|
+
const space = kbqResolvePanelSideSpace({ ...context, triggerBottom: context.triggerTop + firstRowOffset });
|
|
6684
|
+
return space && space.below;
|
|
6685
|
+
}
|
|
6686
|
+
/**
|
|
6687
|
+
* Whether the panel should be anchored below the trigger's first row and rendered over the rest of it.
|
|
6688
|
+
*
|
|
6689
|
+
* Three things have to hold. The trigger must have more than one row, or there is nothing to overlap. It must
|
|
6690
|
+
* be taller than the panel, or the room beside it is the better trade and the panel belongs on a side. And
|
|
6691
|
+
* the panel must fit there at its full height — the caller adds this as a THIRD `ConnectedPosition`,
|
|
6692
|
+
* and when no position fits the overlay falls back to whichever goes off-screen the least, so an anchor that
|
|
6693
|
+
* does not fit would outrank `above`/`below` on that fallback and move panels that have no business moving.
|
|
6694
|
+
* Gating on the fit keeps the fallback ranking exactly as it is without this anchor.
|
|
6695
|
+
*
|
|
6696
|
+
* `anchored` widens the height test by one row, so that deselecting a single option cannot bounce a panel
|
|
6697
|
+
* sitting right on the boundary across several hundred pixels.
|
|
6698
|
+
* @docs-private
|
|
6699
|
+
*/
|
|
6700
|
+
function kbqShouldAnchorPanelToFirstRow(context, { firstRowOffset, naturalListHeight, anchored = false }) {
|
|
6701
|
+
if (firstRowOffset === null)
|
|
6702
|
+
return false;
|
|
6703
|
+
if (!Number.isFinite(naturalListHeight))
|
|
6704
|
+
return false;
|
|
6705
|
+
// Read off the same rect the space calculation uses, so the two can never disagree.
|
|
6706
|
+
const triggerHeight = context.triggerBottom - context.triggerTop;
|
|
6707
|
+
// A single-row trigger has nothing to overlap.
|
|
6708
|
+
if (triggerHeight - firstRowOffset <= 1)
|
|
6709
|
+
return false;
|
|
6710
|
+
const hysteresis = anchored ? firstRowOffset : 0;
|
|
6711
|
+
if (triggerHeight + hysteresis <= context.chromeHeight + naturalListHeight)
|
|
6712
|
+
return false;
|
|
6713
|
+
// The overlay rejects a position whose top edge is off the top of the viewport, which a trigger scrolled
|
|
6714
|
+
// past the fold produces.
|
|
6715
|
+
if (context.triggerTop + firstRowOffset < 0)
|
|
6716
|
+
return false;
|
|
6717
|
+
const space = kbqResolveOverlapPanelSpace(context, firstRowOffset);
|
|
6718
|
+
return space !== null && space >= naturalListHeight;
|
|
6719
|
+
}
|
|
6720
|
+
|
|
5439
6721
|
/**
|
|
5440
6722
|
* Default minimum width of an overlay panel, in pixels.
|
|
5441
6723
|
*
|
|
@@ -5472,9 +6754,11 @@ function kbqResolvePanelWidth(panelWidth, panelMinWidth, triggerWidth) {
|
|
|
5472
6754
|
const floor = Math.max(min, Number.isFinite(triggerWidth) ? triggerWidth : 0);
|
|
5473
6755
|
// Trigger-sized. The floor is resolved here rather than emitted as `minWidth` because
|
|
5474
6756
|
// `KbqAbstractSelect.setOverlayPosition()` clears `minWidth` on viewport overflow, after having
|
|
5475
|
-
// derived the panel offset from the pre-clear width.
|
|
6757
|
+
// derived the panel offset from the pre-clear width. A floor of `0` means the trigger could not
|
|
6758
|
+
// be measured, not that a zero-width panel was asked for, so the width stays unset and the panel
|
|
6759
|
+
// sizes to its content.
|
|
5476
6760
|
if (panelWidth === 'auto') {
|
|
5477
|
-
return { width: floor, minWidth: '' };
|
|
6761
|
+
return { width: floor > 0 ? coerceCssPixelValue(floor) : '', minWidth: '' };
|
|
5478
6762
|
}
|
|
5479
6763
|
// Content-sized. Only `null`/`undefined`/`''` opt in — `0` is an explicit width. A non-finite
|
|
5480
6764
|
// `panelWidth` (e.g. `NaN` from an upstream computation) is treated the same way rather than
|
|
@@ -5482,8 +6766,47 @@ function kbqResolvePanelWidth(panelWidth, panelMinWidth, triggerWidth) {
|
|
|
5482
6766
|
if (panelWidth == null || panelWidth === '' || (typeof panelWidth === 'number' && !Number.isFinite(panelWidth))) {
|
|
5483
6767
|
return { width: '', minWidth: floor };
|
|
5484
6768
|
}
|
|
5485
|
-
// Explicit width. `panelMinWidth` is not applied.
|
|
5486
|
-
|
|
6769
|
+
// Explicit width. `panelMinWidth` is not applied. Rendered as CSS so that a zero survives the
|
|
6770
|
+
// truthy check `CdkConnectedOverlay._getWidth()` applies to the width it was given (CDK 22+).
|
|
6771
|
+
return { width: coerceCssPixelValue(panelWidth), minWidth: '' };
|
|
6772
|
+
}
|
|
6773
|
+
|
|
6774
|
+
/**
|
|
6775
|
+
* Whether `point` lies within (or on the edge of) `rect`.
|
|
6776
|
+
* @docs-private
|
|
6777
|
+
*/
|
|
6778
|
+
function isPointInRect(point, rect) {
|
|
6779
|
+
return point.x >= rect.left && point.x <= rect.right && point.y >= rect.top && point.y <= rect.bottom;
|
|
6780
|
+
}
|
|
6781
|
+
/**
|
|
6782
|
+
* Whether `point` lies within (or on the edge of) `triangle`.
|
|
6783
|
+
*
|
|
6784
|
+
* Uses the sign of the cross product of each triangle edge with the point: the point is inside
|
|
6785
|
+
* only if it's consistently on the same side of all three edges.
|
|
6786
|
+
* @docs-private
|
|
6787
|
+
*/
|
|
6788
|
+
function isPointInTriangle(point, triangle) {
|
|
6789
|
+
const { a, b, c } = triangle;
|
|
6790
|
+
const sign = (p1, p2, p3) => (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y);
|
|
6791
|
+
const d1 = sign(point, a, b);
|
|
6792
|
+
const d2 = sign(point, b, c);
|
|
6793
|
+
const d3 = sign(point, c, a);
|
|
6794
|
+
const hasNegative = d1 < 0 || d2 < 0 || d3 < 0;
|
|
6795
|
+
const hasPositive = d1 > 0 || d2 > 0 || d3 > 0;
|
|
6796
|
+
return !(hasNegative && hasPositive);
|
|
6797
|
+
}
|
|
6798
|
+
/**
|
|
6799
|
+
* Builds the "safe triangle" connecting `origin` (typically the pointer position where it left a
|
|
6800
|
+
* trigger) to the top and bottom corners of `targetRect` (typically a submenu panel) that are nearest
|
|
6801
|
+
* to `origin` — the submenu can open on either side of its trigger, so the nearest edge is picked by
|
|
6802
|
+
* comparing distances rather than assuming a fixed side.
|
|
6803
|
+
* @docs-private
|
|
6804
|
+
*/
|
|
6805
|
+
function getSafeTriangleVertices(origin, targetRect) {
|
|
6806
|
+
const nearX = Math.abs(targetRect.left - origin.x) <= Math.abs(targetRect.right - origin.x)
|
|
6807
|
+
? targetRect.left
|
|
6808
|
+
: targetRect.right;
|
|
6809
|
+
return { a: origin, b: { x: nearX, y: targetRect.top }, c: { x: nearX, y: targetRect.bottom } };
|
|
5487
6810
|
}
|
|
5488
6811
|
|
|
5489
6812
|
/**
|
|
@@ -5591,10 +6914,10 @@ class KbqShadowDomOverlayContainer extends OverlayContainer {
|
|
|
5591
6914
|
// No explicit host provided — fall back to the application root component element.
|
|
5592
6915
|
return this.applicationRef.components[0]?.location.nativeElement ?? null;
|
|
5593
6916
|
}
|
|
5594
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5595
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
6917
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqShadowDomOverlayContainer, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6918
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqShadowDomOverlayContainer }); }
|
|
5596
6919
|
}
|
|
5597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqShadowDomOverlayContainer, decorators: [{
|
|
5598
6921
|
type: Injectable
|
|
5599
6922
|
}] });
|
|
5600
6923
|
/**
|
|
@@ -5627,6 +6950,24 @@ const kbqShadowDomOverlayProvider = (host) => {
|
|
|
5627
6950
|
* InjectionToken for providing component with popup. Used in select and tree-select for tooltip.
|
|
5628
6951
|
*/
|
|
5629
6952
|
const KBQ_PARENT_POPUP = new InjectionToken('kbq-parent-popup');
|
|
6953
|
+
/**
|
|
6954
|
+
* Element-level token for pop-ups sharing their trigger element with a tooltip. Multi-provided, so a single
|
|
6955
|
+
* element can carry several pop-ups at once — for example the filter-bar button with both a popover and a
|
|
6956
|
+
* dropdown attached to it.
|
|
6957
|
+
*/
|
|
6958
|
+
const KBQ_SIBLING_POPUP = new InjectionToken('kbq-sibling-popup');
|
|
6959
|
+
/**
|
|
6960
|
+
* Builds the multi-provider entry a pop-up trigger adds to its own `providers` to announce itself to a
|
|
6961
|
+
* tooltip on the same element.
|
|
6962
|
+
*
|
|
6963
|
+
* Every concrete trigger has to add it on its own: Angular copies `providers` to a subclass only when that
|
|
6964
|
+
* subclass has no decorator of its own, so inheriting from an already-announced trigger is not enough.
|
|
6965
|
+
*/
|
|
6966
|
+
const kbqSiblingPopupProvider = (popup) => ({
|
|
6967
|
+
provide: KBQ_SIBLING_POPUP,
|
|
6968
|
+
useExisting: popup,
|
|
6969
|
+
multi: true
|
|
6970
|
+
});
|
|
5630
6971
|
var PopUpPlacements;
|
|
5631
6972
|
(function (PopUpPlacements) {
|
|
5632
6973
|
PopUpPlacements["Top"] = "top";
|
|
@@ -5683,6 +7024,17 @@ const KBQ_CONNECTED_OVERLAY_BELOW_CLASS = 'kbq-connected-overlay_below';
|
|
|
5683
7024
|
* `padding-bottom` inside the pane so the flipped gap is not click/hover-through.
|
|
5684
7025
|
*/
|
|
5685
7026
|
const KBQ_CONNECTED_OVERLAY_ABOVE_CLASS = 'kbq-connected-overlay_above';
|
|
7027
|
+
/**
|
|
7028
|
+
* Pane class applied to a connected overlay whose panel is anchored to the FIRST ROW of a trigger it
|
|
7029
|
+
* OVERLAPS — a multiline select whose tag rows have made it taller than the panel itself, with too little
|
|
7030
|
+
* room to open on either side of it.
|
|
7031
|
+
*
|
|
7032
|
+
* The panel ends up where it would for a single-row trigger, so the gap is the same transparent
|
|
7033
|
+
* `padding-top` as {@link KBQ_CONNECTED_OVERLAY_BELOW_CLASS}. It is a separate class because the room left
|
|
7034
|
+
* for the panel has to be measured from the first row rather than from the trigger's bottom edge, and the
|
|
7035
|
+
* class is how the component tells the two apart.
|
|
7036
|
+
*/
|
|
7037
|
+
const KBQ_CONNECTED_OVERLAY_OVERLAP_CLASS = 'kbq-connected-overlay_overlap';
|
|
5686
7038
|
/**
|
|
5687
7039
|
* Variable used for offsetY(X) calculations when applying Angular Overlay
|
|
5688
7040
|
*
|
|
@@ -5837,10 +7189,10 @@ class KbqPopUp {
|
|
|
5837
7189
|
this.renderer.setStyle(this.trigger.overlayRef?.overlayElement, oppositeSide, 'unset');
|
|
5838
7190
|
}
|
|
5839
7191
|
}
|
|
5840
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5841
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
7192
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPopUp, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7193
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqPopUp, isStandalone: true, host: { listeners: { "mouseenter": "hovered.next(true)", "mouseleave": "hovered.next(false)" } }, ngImport: i0 }); }
|
|
5842
7194
|
}
|
|
5843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPopUp, decorators: [{
|
|
5844
7196
|
type: Directive,
|
|
5845
7197
|
args: [{
|
|
5846
7198
|
host: {
|
|
@@ -6022,6 +7374,20 @@ class KbqPopUpTrigger {
|
|
|
6022
7374
|
this._isOpen = value;
|
|
6023
7375
|
this.popUpChangeDetectorRef.markForCheck();
|
|
6024
7376
|
}
|
|
7377
|
+
/**
|
|
7378
|
+
* Whether the pop-up overlay is currently attached.
|
|
7379
|
+
*
|
|
7380
|
+
* Unlike `isOpen`, which follows the visibility of the pop-up component and therefore lags a task behind
|
|
7381
|
+
* `show()`/`hide()`, this flips synchronously — it is the window during which the overlay (and its
|
|
7382
|
+
* backdrop) is present in the DOM. Part of the {@link KbqSiblingPopup} contract.
|
|
7383
|
+
*/
|
|
7384
|
+
get isAttached() {
|
|
7385
|
+
return !!this.instance;
|
|
7386
|
+
}
|
|
7387
|
+
/** Emits `true` when the pop-up opens and `false` when it closes. Part of the {@link KbqSiblingPopup} contract. */
|
|
7388
|
+
get openedChange() {
|
|
7389
|
+
return this.visibleChange;
|
|
7390
|
+
}
|
|
6025
7391
|
/** Binds the DOM event listeners for the configured triggers. */
|
|
6026
7392
|
ngOnInit() {
|
|
6027
7393
|
this.initListeners();
|
|
@@ -6303,10 +7669,10 @@ class KbqPopUpTrigger {
|
|
|
6303
7669
|
this.hide();
|
|
6304
7670
|
});
|
|
6305
7671
|
}
|
|
6306
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6307
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
7672
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPopUpTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7673
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqPopUpTrigger, isStandalone: true, host: { listeners: { "mouseenter": "hovered.next(true)", "mouseleave": "hovered.next(false)" } }, ngImport: i0 }); }
|
|
6308
7674
|
}
|
|
6309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7675
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqPopUpTrigger, decorators: [{
|
|
6310
7676
|
type: Directive,
|
|
6311
7677
|
args: [{
|
|
6312
7678
|
host: {
|
|
@@ -6326,8 +7692,18 @@ const KBQ_SELECT_SEARCH_MIN_OPTIONS_THRESHOLD = 10;
|
|
|
6326
7692
|
* this value or more away from the viewport boundary.
|
|
6327
7693
|
*/
|
|
6328
7694
|
const SELECT_PANEL_VIEWPORT_PADDING = 8;
|
|
6329
|
-
/**
|
|
6330
|
-
|
|
7695
|
+
/**
|
|
7696
|
+
* Injection token that determines the scroll handling while a select is open.
|
|
7697
|
+
*
|
|
7698
|
+
* The root default keeps the select usable when it is reached outside `KbqSelectModule`'s injector - imported
|
|
7699
|
+
* as a bare standalone component, pulled in through another standalone component (`KbqTimezoneSelect`,
|
|
7700
|
+
* `KbqCalendarHeader`), or rendered in a component built from the root injector, as `KbqModalService` does.
|
|
7701
|
+
* Providing the token anywhere still wins over this default.
|
|
7702
|
+
*/
|
|
7703
|
+
const KBQ_SELECT_SCROLL_STRATEGY = new InjectionToken('kbq-select-scroll-strategy', {
|
|
7704
|
+
providedIn: 'root',
|
|
7705
|
+
factory: () => kbqSelectScrollStrategyProviderFactory(inject(Overlay))
|
|
7706
|
+
});
|
|
6331
7707
|
/** @docs-private */
|
|
6332
7708
|
function kbqSelectScrollStrategyProviderFactory(overlay) {
|
|
6333
7709
|
return () => overlay.scrollStrategies.reposition();
|
|
@@ -6340,10 +7716,10 @@ const KBQ_SELECT_SCROLL_STRATEGY_PROVIDER = {
|
|
|
6340
7716
|
};
|
|
6341
7717
|
|
|
6342
7718
|
class KbqSelectTrigger {
|
|
6343
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6344
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
7719
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7720
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSelectTrigger, isStandalone: true, selector: "kbq-select-trigger, [kbq-select-trigger]", ngImport: i0 }); }
|
|
6345
7721
|
}
|
|
6346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectTrigger, decorators: [{
|
|
6347
7723
|
type: Directive,
|
|
6348
7724
|
args: [{
|
|
6349
7725
|
selector: 'kbq-select-trigger, [kbq-select-trigger]'
|
|
@@ -6353,20 +7729,20 @@ class KbqSelectMatcher {
|
|
|
6353
7729
|
constructor() {
|
|
6354
7730
|
this.useDefaultHandlers = input(true, ...(ngDevMode ? [{ debugName: "useDefaultHandlers", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
6355
7731
|
}
|
|
6356
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6357
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
7732
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectMatcher, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7733
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqSelectMatcher, isStandalone: true, selector: "kbq-select-matcher, [kbq-select-matcher]", inputs: { useDefaultHandlers: { classPropertyName: "useDefaultHandlers", publicName: "useDefaultHandlers", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
6358
7734
|
}
|
|
6359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectMatcher, decorators: [{
|
|
6360
7736
|
type: Directive,
|
|
6361
7737
|
args: [{
|
|
6362
7738
|
selector: 'kbq-select-matcher, [kbq-select-matcher]'
|
|
6363
7739
|
}]
|
|
6364
7740
|
}], propDecorators: { useDefaultHandlers: [{ type: i0.Input, args: [{ isSignal: true, alias: "useDefaultHandlers", required: false }] }] } });
|
|
6365
7741
|
class KbqSelectSearchEmptyResult {
|
|
6366
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6367
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
7742
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectSearchEmptyResult, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7743
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSelectSearchEmptyResult, isStandalone: true, selector: "[kbq-select-search-empty-result]", host: { classAttribute: "kbq-select-search-empty-result kbq-select__no-options-message" }, exportAs: ["kbqSelectSearchEmptyResult"], ngImport: i0 }); }
|
|
6368
7744
|
}
|
|
6369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectSearchEmptyResult, decorators: [{
|
|
6370
7746
|
type: Directive,
|
|
6371
7747
|
args: [{
|
|
6372
7748
|
selector: '[kbq-select-search-empty-result]',
|
|
@@ -6377,10 +7753,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6377
7753
|
}]
|
|
6378
7754
|
}] });
|
|
6379
7755
|
class KbqSelectFooter {
|
|
6380
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6381
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
7756
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7757
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSelectFooter, isStandalone: true, selector: "kbq-select-footer, [kbq-select-footer]", host: { classAttribute: "kbq-select__footer" }, ngImport: i0 }); }
|
|
6382
7758
|
}
|
|
6383
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectFooter, decorators: [{
|
|
6384
7760
|
type: Directive,
|
|
6385
7761
|
args: [{
|
|
6386
7762
|
selector: 'kbq-select-footer, [kbq-select-footer]',
|
|
@@ -6442,10 +7818,10 @@ class KbqSelectSearch {
|
|
|
6442
7818
|
event.stopPropagation();
|
|
6443
7819
|
}
|
|
6444
7820
|
}
|
|
6445
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6446
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
7821
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7822
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqSelectSearch, isStandalone: true, selector: "[kbqSelectSearch]", host: { listeners: { "keydown": "handleKeydown($event)" } }, exportAs: ["kbqSelectSearch"], ngImport: i0 }); }
|
|
6447
7823
|
}
|
|
6448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSelectSearch, decorators: [{
|
|
6449
7825
|
type: Directive,
|
|
6450
7826
|
args: [{
|
|
6451
7827
|
selector: '[kbqSelectSearch]',
|
|
@@ -6463,12 +7839,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6463
7839
|
*/
|
|
6464
7840
|
class KbqAbstractSelect {
|
|
6465
7841
|
constructor() {
|
|
7842
|
+
/**
|
|
7843
|
+
* Row container of a multi-selection trigger. Absent for a single value, an empty trigger and a custom
|
|
7844
|
+
* matcher or trigger — all of which have no rows for the panel to anchor to.
|
|
7845
|
+
*/
|
|
7846
|
+
this.multilineMatchList = viewChild('multilineMatchList', ...(ngDevMode ? [{ debugName: "multilineMatchList" }] : []));
|
|
7847
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
7848
|
+
this.window = inject(KBQ_WINDOW);
|
|
6466
7849
|
/** Overlay panel class. */
|
|
6467
7850
|
this.overlayPanelClass = 'kbq-select-overlay';
|
|
6468
7851
|
/** Width of the overlay panel. */
|
|
6469
7852
|
this.overlayWidth = '';
|
|
6470
7853
|
/** Minimum width of the overlay panel. */
|
|
6471
7854
|
this.overlayMinWidth = '';
|
|
7855
|
+
/**
|
|
7856
|
+
* Height of everything in the panel that is not the option list — the trigger gap the pane pads itself
|
|
7857
|
+
* with, the list padding, a search field and a footer.
|
|
7858
|
+
*
|
|
7859
|
+
* The same for every anchor: the below and overlap panes pad the top, the above pane pads the bottom, and
|
|
7860
|
+
* all three pad by the same gap — which is what keeps the anchor decision from feeding back into itself.
|
|
7861
|
+
*/
|
|
7862
|
+
this.panelChromeHeight = 0;
|
|
7863
|
+
/** Transparent gap the pane pads itself with, which the anchor has to be raised by. */
|
|
7864
|
+
this.panelGapHeight = 0;
|
|
7865
|
+
/**
|
|
7866
|
+
* Cap the option list is rendered with, in pixels. Measured off the panel rather than derived from
|
|
7867
|
+
* `panelMaxHeight`, because `--kbq-select-panel-size-max-height` is what the list actually obeys and a
|
|
7868
|
+
* consumer can override it. Seeded with the stylesheet's own default, which is what a DOM that computes
|
|
7869
|
+
* no layout — the server, jsdom — leaves in force.
|
|
7870
|
+
*/
|
|
7871
|
+
this.panelMaxHeightCap = KBQ_PANEL_DEFAULT_MAX_HEIGHT;
|
|
7872
|
+
this.resizeSubscription = Subscription.EMPTY;
|
|
6472
7873
|
}
|
|
6473
7874
|
/**
|
|
6474
7875
|
* Resolves the overlay panel size for the current trigger geometry and stores it for the
|
|
@@ -6484,8 +7885,8 @@ class KbqAbstractSelect {
|
|
|
6484
7885
|
* Does nothing when the width is already pinned.
|
|
6485
7886
|
*/
|
|
6486
7887
|
lockOverlayWidthForSearch(panel) {
|
|
6487
|
-
// Compare against the unset sentinel rather than a truthy check —
|
|
6488
|
-
//
|
|
7888
|
+
// Compare against the unset sentinel rather than a truthy check — an explicit zero-width panel
|
|
7889
|
+
// resolves to `'0px'`, and a measured width below can be `0`; both mean "already pinned".
|
|
6489
7890
|
if (this.overlayWidth !== '')
|
|
6490
7891
|
return;
|
|
6491
7892
|
const measuredPanelWidth = panel?.nativeElement.getBoundingClientRect().width;
|
|
@@ -6544,15 +7945,273 @@ class KbqAbstractSelect {
|
|
|
6544
7945
|
this.overlayDir.overlayRef.overlayElement.style.maxWidth = 'unset';
|
|
6545
7946
|
this.overlayDir.overlayRef.updatePosition();
|
|
6546
7947
|
}
|
|
7948
|
+
/**
|
|
7949
|
+
* Returns `positions` with the first-row anchor added, updated or removed, or `null` when the array
|
|
7950
|
+
* already says what it should — so that the caller can skip the change detection an edit would need.
|
|
7951
|
+
*
|
|
7952
|
+
* The anchor goes LAST. The overlay returns on the first position that fits completely, so an entry at the
|
|
7953
|
+
* end is reached exactly when neither the below nor the above position works, which is the rule this
|
|
7954
|
+
* implements. Pass `null` to drop it again.
|
|
7955
|
+
*
|
|
7956
|
+
* The result is meant to be assigned to the field the `cdkConnectedOverlayPositions` input reads, NOT
|
|
7957
|
+
* handed to `withPositions()` on the strategy: `CdkConnectedOverlay.ngOnChanges` rebuilds the strategy
|
|
7958
|
+
* from that field on ANY input change — the width `lockOverlayWidthForSearch` pins is one — so a list
|
|
7959
|
+
* applied only to the strategy would be dropped again without a trace.
|
|
7960
|
+
*/
|
|
7961
|
+
withOverlapPosition(positions, offsetY) {
|
|
7962
|
+
// `panelClass` is `string | string[]`, and `positions` is public, so an anchor can come back in a
|
|
7963
|
+
// shape a strict comparison would miss — which would append a second anchor on every recompute and
|
|
7964
|
+
// leave every one of them behind on close.
|
|
7965
|
+
const isOverlap = ({ panelClass }) => Array.isArray(panelClass)
|
|
7966
|
+
? panelClass.includes(KBQ_CONNECTED_OVERLAY_OVERLAP_CLASS)
|
|
7967
|
+
: panelClass === KBQ_CONNECTED_OVERLAY_OVERLAP_CLASS;
|
|
7968
|
+
const current = positions.find(isOverlap);
|
|
7969
|
+
const withoutOverlap = () => positions.filter((position) => !isOverlap(position));
|
|
7970
|
+
if (offsetY === null)
|
|
7971
|
+
return current ? withoutOverlap() : null;
|
|
7972
|
+
// Rounded so that sub-pixel layout jitter cannot rebuild the array on every selection change.
|
|
7973
|
+
const roundedOffsetY = Math.round(offsetY);
|
|
7974
|
+
if (current?.offsetY === roundedOffsetY)
|
|
7975
|
+
return null;
|
|
7976
|
+
return [
|
|
7977
|
+
...withoutOverlap(),
|
|
7978
|
+
{
|
|
7979
|
+
originX: 'start',
|
|
7980
|
+
originY: 'top',
|
|
7981
|
+
overlayX: 'start',
|
|
7982
|
+
overlayY: 'top',
|
|
7983
|
+
offsetY: roundedOffsetY,
|
|
7984
|
+
panelClass: KBQ_CONNECTED_OVERLAY_OVERLAP_CLASS
|
|
7985
|
+
}
|
|
7986
|
+
];
|
|
7987
|
+
}
|
|
7988
|
+
/**
|
|
7989
|
+
* Re-resolves the panel position with the first-row anchor brought up to date.
|
|
7990
|
+
*
|
|
7991
|
+
* Never call this from a `positionChange` subscriber: CDK records the position it applied AFTER the
|
|
7992
|
+
* subscriber returns, so an anchor resolved from inside that frame is overwritten by the pre-anchor
|
|
7993
|
+
* position, and `cdkConnectedOverlayLockPosition` then replays that stale one on the next scroll.
|
|
7994
|
+
*/
|
|
7995
|
+
reanchorPanel() {
|
|
7996
|
+
// `hostElement` is nulled by `OverlayRef.dispose()`, which is what a queued call landing after the
|
|
7997
|
+
// component was destroyed has to be told apart by — `overlayRef` itself outlives disposal.
|
|
7998
|
+
if (!this.overlayDir?.overlayRef?.hostElement)
|
|
7999
|
+
return;
|
|
8000
|
+
// Only when the anchor actually moved. `setOverlayPosition()` is a one-shot: it clears the pane's
|
|
8001
|
+
// `minWidth` and derives the panel offset from the width it had before that, so a second run over
|
|
8002
|
+
// the same open measures a narrower pane. In RTL the pane's x is `documentWidth - (x + paneWidth)`,
|
|
8003
|
+
// so that narrower measurement moves the panel; in LTR only `left` is written and nothing moves.
|
|
8004
|
+
if (this.updatePanelAnchor()) {
|
|
8005
|
+
this.setOverlayPosition();
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
/**
|
|
8009
|
+
* Re-resolves the anchor while the panel is open. A resize rewraps the trigger's rows and changes the
|
|
8010
|
+
* room beside it at once, and CDK re-applies the position on its own, so without this the anchor it
|
|
8011
|
+
* resolves against is the one measured for the old viewport.
|
|
8012
|
+
*/
|
|
8013
|
+
subscribeToPanelResize() {
|
|
8014
|
+
this.resizeSubscription.unsubscribe();
|
|
8015
|
+
if (!this.multiline())
|
|
8016
|
+
return;
|
|
8017
|
+
this.resizeSubscription = fromEvent(this.window, 'resize')
|
|
8018
|
+
.pipe(debounceTime(50))
|
|
8019
|
+
.subscribe(() => this.reanchorPanel());
|
|
8020
|
+
}
|
|
8021
|
+
/** Drops the resize subscription the open set up. */
|
|
8022
|
+
unsubscribeFromPanelResize() {
|
|
8023
|
+
this.resizeSubscription.unsubscribe();
|
|
8024
|
+
}
|
|
8025
|
+
/**
|
|
8026
|
+
* Keeps the first-row anchor in `positions`: a third position that puts the panel just below the
|
|
8027
|
+
* trigger's first row and over the rest of it, for a multiline trigger that has grown taller than the
|
|
8028
|
+
* panel and fits on neither side of it.
|
|
8029
|
+
*
|
|
8030
|
+
* The anchor goes last, and the overlay stops at the first position that fits completely, so it is
|
|
8031
|
+
* reached exactly when neither `below` nor `above` works. `kbqShouldAnchorPanelToFirstRow` holds the
|
|
8032
|
+
* rest of the rule.
|
|
8033
|
+
*
|
|
8034
|
+
* Returns whether the array changed, so that a caller can skip the reposition an unchanged anchor does
|
|
8035
|
+
* not need. Updating the array is all there is to do here — `setOverlayPosition()` rebuilds the strategy
|
|
8036
|
+
* and resolves the position again.
|
|
8037
|
+
*/
|
|
8038
|
+
updatePanelAnchor() {
|
|
8039
|
+
if (!this.multiline() || !this.isPanelOpen() || !this.overlayDir?.overlayRef)
|
|
8040
|
+
return false;
|
|
8041
|
+
// A measurement that cannot be trusted would leave the seeds in force, and a zero chrome height
|
|
8042
|
+
// overstates the room beside the trigger by the whole of a search field and a footer.
|
|
8043
|
+
if (!this.measurePanelChrome())
|
|
8044
|
+
return false;
|
|
8045
|
+
const context = this.resolvePanelSpaceContext();
|
|
8046
|
+
if (!context)
|
|
8047
|
+
return false;
|
|
8048
|
+
const firstRowOffset = this.resolveFirstRowOffset();
|
|
8049
|
+
const anchorToFirstRow = kbqShouldAnchorPanelToFirstRow(context, {
|
|
8050
|
+
firstRowOffset,
|
|
8051
|
+
naturalListHeight: this.measureNaturalListHeight(),
|
|
8052
|
+
anchored: this.isPanelAnchoredToFirstRow()
|
|
8053
|
+
});
|
|
8054
|
+
// The pane pads the gap inside itself, so the anchor is raised by it: the painted panel then starts
|
|
8055
|
+
// where the second row does, instead of leaving the top of that row's tags showing through the band.
|
|
8056
|
+
const offsetY = anchorToFirstRow && firstRowOffset !== null ? firstRowOffset - this.panelGapHeight : null;
|
|
8057
|
+
const positions = this.withOverlapPosition(this.positions, offsetY);
|
|
8058
|
+
if (!positions)
|
|
8059
|
+
return false;
|
|
8060
|
+
this.positions = positions;
|
|
8061
|
+
// Pushes the new array into `CdkConnectedOverlay`: the strategy is rebuilt from the directive's
|
|
8062
|
+
// input, not from this field, so without this the reposition would resolve against the old list.
|
|
8063
|
+
this.changeDetectorRef.detectChanges();
|
|
8064
|
+
return true;
|
|
8065
|
+
}
|
|
8066
|
+
/**
|
|
8067
|
+
* Distance from the origin's top edge to just below the trigger's first row, or `null` when there is no
|
|
8068
|
+
* row to anchor to.
|
|
8069
|
+
*/
|
|
8070
|
+
resolveFirstRowOffset() {
|
|
8071
|
+
const origin = this.getOverlayOriginElement();
|
|
8072
|
+
const list = this.multilineMatchList()?.nativeElement;
|
|
8073
|
+
if (!origin || !list)
|
|
8074
|
+
return null;
|
|
8075
|
+
// The rows follow document order, so the scan stops at the first child that starts lower. Collapsed
|
|
8076
|
+
// children are skipped: a custom tag template can render a hidden node, and its all-zero rect would
|
|
8077
|
+
// otherwise be taken for the topmost row and push every real tag out of it.
|
|
8078
|
+
let firstRowTop = null;
|
|
8079
|
+
let firstRowBottom = Number.NEGATIVE_INFINITY;
|
|
8080
|
+
for (const child of Array.from(list.children)) {
|
|
8081
|
+
const { top, bottom, width, height } = child.getBoundingClientRect();
|
|
8082
|
+
// A collapsed child occupies no row and adds nothing to one, so it is skipped whichever way it
|
|
8083
|
+
// collapsed — its rect would otherwise be read as a row of its own.
|
|
8084
|
+
if (width === 0 || height === 0)
|
|
8085
|
+
continue;
|
|
8086
|
+
if (firstRowTop === null) {
|
|
8087
|
+
firstRowTop = top;
|
|
8088
|
+
// Sub-pixel layout only makes the tops of one row equal to within a pixel, and a custom tag
|
|
8089
|
+
// template can put several elements on the same row.
|
|
8090
|
+
}
|
|
8091
|
+
else if (top - firstRowTop >= 1) {
|
|
8092
|
+
break;
|
|
8093
|
+
}
|
|
8094
|
+
firstRowBottom = Math.max(firstRowBottom, bottom);
|
|
8095
|
+
}
|
|
8096
|
+
if (firstRowTop === null)
|
|
8097
|
+
return null;
|
|
8098
|
+
const originRect = origin.getBoundingClientRect();
|
|
8099
|
+
const listRect = list.getBoundingClientRect();
|
|
8100
|
+
return kbqResolveTriggerFirstRowOffset({
|
|
8101
|
+
originTop: originRect.top,
|
|
8102
|
+
originBottom: originRect.bottom,
|
|
8103
|
+
listTop: listRect.top,
|
|
8104
|
+
listBottom: listRect.bottom,
|
|
8105
|
+
firstRowBottom,
|
|
8106
|
+
// The rows keep their laid-out position while their container scrolls, so the scroll offset is
|
|
8107
|
+
// what converts them back into the list's own coordinates.
|
|
8108
|
+
listScrollTop: list.scrollTop
|
|
8109
|
+
});
|
|
8110
|
+
}
|
|
8111
|
+
/**
|
|
8112
|
+
* Height the option list takes with no viewport clamp in force.
|
|
8113
|
+
*
|
|
8114
|
+
* Read from `scrollHeight`, which reports the whole content rather than what the pane happens to show
|
|
8115
|
+
* right now — the anchor decision runs on a pane the overlay may be about to move.
|
|
8116
|
+
*/
|
|
8117
|
+
measureNaturalListHeight() {
|
|
8118
|
+
if (this.isListHeightPinnedToCap())
|
|
8119
|
+
return this.panelMaxHeightCap;
|
|
8120
|
+
const content = this.optionsContainer()?.nativeElement;
|
|
8121
|
+
if (!content)
|
|
8122
|
+
return this.panelMaxHeightCap;
|
|
8123
|
+
// `clientHeight` less the computed content box is the list's own vertical padding, which
|
|
8124
|
+
// `scrollHeight` counts and the cap does not.
|
|
8125
|
+
const padding = content.clientHeight - parseFloat(this.window.getComputedStyle(content).height);
|
|
8126
|
+
return Math.min(this.panelMaxHeightCap, content.scrollHeight - (Number.isFinite(padding) ? padding : 0));
|
|
8127
|
+
}
|
|
8128
|
+
/**
|
|
8129
|
+
* Whether the option list renders at the cap whatever its content is, which a
|
|
8130
|
+
* `cdk-virtual-scroll-viewport` does by pinning both its `min-height` and its `max-height` to the token.
|
|
8131
|
+
*/
|
|
8132
|
+
isListHeightPinnedToCap() {
|
|
8133
|
+
return false;
|
|
8134
|
+
}
|
|
8135
|
+
/** Geometry the panel height calculation needs, or `null` when there is nothing to measure against. */
|
|
8136
|
+
resolvePanelSpaceContext() {
|
|
8137
|
+
const origin = this.getOverlayOriginElement();
|
|
8138
|
+
if (!origin)
|
|
8139
|
+
return null;
|
|
8140
|
+
const { top, bottom } = origin.getBoundingClientRect();
|
|
8141
|
+
return {
|
|
8142
|
+
triggerTop: top,
|
|
8143
|
+
triggerBottom: bottom,
|
|
8144
|
+
// `clientHeight`, not `innerHeight`: the overlay narrows the viewport the same way, and the two
|
|
8145
|
+
// differ by the horizontal scrollbar — enough for a position we think fits to be rejected.
|
|
8146
|
+
viewportHeight: this.window.document.documentElement.clientHeight,
|
|
8147
|
+
viewportMargin: this.viewportMargin,
|
|
8148
|
+
chromeHeight: this.panelChromeHeight
|
|
8149
|
+
};
|
|
8150
|
+
}
|
|
8151
|
+
/** Whether the panel is currently drawn over the trigger, read from the class the overlay applies. */
|
|
8152
|
+
isPanelAnchoredToFirstRow() {
|
|
8153
|
+
return this.overlayDir.overlayRef.overlayElement.classList.contains(KBQ_CONNECTED_OVERLAY_OVERLAP_CLASS);
|
|
8154
|
+
}
|
|
8155
|
+
/**
|
|
8156
|
+
* Records the part of the panel that is not the option list, the gap the pane pads itself with, and the
|
|
8157
|
+
* cap the list is rendered with. Returns `false` when the panel cannot be measured, which is the caller's
|
|
8158
|
+
* signal to leave the anchor alone rather than decide against a stale value.
|
|
8159
|
+
*/
|
|
8160
|
+
measurePanelChrome() {
|
|
8161
|
+
const pane = this.overlayDir.overlayRef.overlayElement;
|
|
8162
|
+
const content = this.optionsContainer()?.nativeElement;
|
|
8163
|
+
if (!content)
|
|
8164
|
+
return false;
|
|
8165
|
+
// `--kbq-select-panel-size-max-height` caps the list's *content box* — the scroller is `box-sizing:
|
|
8166
|
+
// initial` — so its own padding counts as chrome. The computed `height` is that content box, which is
|
|
8167
|
+
// exactly what the cap has to be measured against.
|
|
8168
|
+
const { height, maxHeight } = this.window.getComputedStyle(content);
|
|
8169
|
+
const { paddingTop, paddingBottom } = this.window.getComputedStyle(pane);
|
|
8170
|
+
const chromeHeight = pane.getBoundingClientRect().height - parseFloat(height);
|
|
8171
|
+
const cap = parseFloat(maxHeight);
|
|
8172
|
+
if (!Number.isFinite(chromeHeight) || chromeHeight < 0)
|
|
8173
|
+
return false;
|
|
8174
|
+
this.panelChromeHeight = chromeHeight;
|
|
8175
|
+
// Whichever side the current position pads, the gap is the same one the anchored pane will pad.
|
|
8176
|
+
this.panelGapHeight = Math.max(parseFloat(paddingTop) || 0, parseFloat(paddingBottom) || 0);
|
|
8177
|
+
// `none`, `''` and a DOM without layout all yield NaN, which leaves the seed in force.
|
|
8178
|
+
if (Number.isFinite(cap) && cap > 0) {
|
|
8179
|
+
this.panelMaxHeightCap = cap;
|
|
8180
|
+
}
|
|
8181
|
+
return true;
|
|
8182
|
+
}
|
|
6547
8183
|
resolveSearchMinOptionsThreshold(value) {
|
|
6548
8184
|
return value === 'auto' ? KBQ_SELECT_SEARCH_MIN_OPTIONS_THRESHOLD : value;
|
|
6549
8185
|
}
|
|
6550
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6551
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
8186
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbstractSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
8187
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.30", type: KbqAbstractSelect, isStandalone: true, viewQueries: [{ propertyName: "multilineMatchList", first: true, predicate: ["multilineMatchList"], descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
6552
8188
|
}
|
|
6553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAbstractSelect, decorators: [{
|
|
6554
8190
|
type: Directive
|
|
6555
|
-
}] });
|
|
8191
|
+
}], propDecorators: { multilineMatchList: [{ type: i0.ViewChild, args: ['multilineMatchList', { isSignal: true }] }] } });
|
|
8192
|
+
|
|
8193
|
+
/**
|
|
8194
|
+
* Runs a consumer-supplied `compareWith` defensively: a comparator that throws is reported in dev mode
|
|
8195
|
+
* and treated as "no match", so one bad comparison cannot take a whole selection down with it.
|
|
8196
|
+
*
|
|
8197
|
+
* Callers own the `null` policy — `KbqSelect` refuses to match a `null` option value, `KbqListSelection`
|
|
8198
|
+
* lets the comparator decide — so nothing is filtered here.
|
|
8199
|
+
*
|
|
8200
|
+
* @docs-private
|
|
8201
|
+
*/
|
|
8202
|
+
function runCompareWith(compareWith, first, second) {
|
|
8203
|
+
try {
|
|
8204
|
+
return compareWith(first, second);
|
|
8205
|
+
}
|
|
8206
|
+
catch (error) {
|
|
8207
|
+
if (isDevMode()) {
|
|
8208
|
+
// Notify developers of errors in their comparator.
|
|
8209
|
+
// eslint-disable-next-line no-console
|
|
8210
|
+
console.warn(error);
|
|
8211
|
+
}
|
|
8212
|
+
return false;
|
|
8213
|
+
}
|
|
8214
|
+
}
|
|
6556
8215
|
|
|
6557
8216
|
/**
|
|
6558
8217
|
* Returns an exception to be thrown when attempting to change a select's `multiple` option
|
|
@@ -6618,10 +8277,10 @@ class KbqMeasureScrollbarService {
|
|
|
6618
8277
|
this.document.body.removeChild(scrollDiv);
|
|
6619
8278
|
this._scrollBarWidth = width;
|
|
6620
8279
|
}
|
|
6621
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6622
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
8280
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMeasureScrollbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8281
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMeasureScrollbarService, providedIn: 'root' }); }
|
|
6623
8282
|
}
|
|
6624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqMeasureScrollbarService, decorators: [{
|
|
6625
8284
|
type: Injectable,
|
|
6626
8285
|
args: [{ providedIn: 'root' }]
|
|
6627
8286
|
}], ctorParameters: () => [] });
|
|
@@ -6694,10 +8353,10 @@ class ThemeService {
|
|
|
6694
8353
|
getTheme() {
|
|
6695
8354
|
return this.current.value;
|
|
6696
8355
|
}
|
|
6697
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6698
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
8356
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8357
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
|
|
6699
8358
|
}
|
|
6700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: ThemeService, decorators: [{
|
|
6701
8360
|
type: Injectable,
|
|
6702
8361
|
args: [{ providedIn: 'root' }]
|
|
6703
8362
|
}], ctorParameters: () => [] });
|
|
@@ -6761,9 +8420,9 @@ function dispatchEvent(node, event) {
|
|
|
6761
8420
|
function dispatchFakeEvent(node, type, canBubble) {
|
|
6762
8421
|
return dispatchEvent(node, createFakeEvent(type, canBubble));
|
|
6763
8422
|
}
|
|
6764
|
-
/** Shorthand to dispatch a keyboard event with a specified key code. */
|
|
6765
|
-
function dispatchKeyboardEvent(node, type, keyCode, target) {
|
|
6766
|
-
return dispatchEvent(node, createKeyboardEvent(type, keyCode, target));
|
|
8423
|
+
/** Shorthand to dispatch a keyboard event with a specified key code and, optionally, a `KeyboardEvent.key`. */
|
|
8424
|
+
function dispatchKeyboardEvent(node, type, keyCode, target, key) {
|
|
8425
|
+
return dispatchEvent(node, createKeyboardEvent(type, keyCode, target, key));
|
|
6767
8426
|
}
|
|
6768
8427
|
/** Shorthand to dispatch a mouse event on the specified coordinates. */
|
|
6769
8428
|
function dispatchMouseEvent(node, type, x = 0, y = 0, event = createMouseEvent(type, x, y)) {
|
|
@@ -6805,10 +8464,10 @@ class MockNgZone extends NgZone {
|
|
|
6805
8464
|
simulateZoneExit() {
|
|
6806
8465
|
this.onStable.emit(null);
|
|
6807
8466
|
}
|
|
6808
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6809
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
8467
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MockNgZone, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8468
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MockNgZone }); }
|
|
6810
8469
|
}
|
|
6811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: MockNgZone, decorators: [{
|
|
6812
8471
|
type: Injectable
|
|
6813
8472
|
}], ctorParameters: () => [] });
|
|
6814
8473
|
|
|
@@ -6838,11 +8497,11 @@ const validationTooltipShowDelay = 10;
|
|
|
6838
8497
|
*/
|
|
6839
8498
|
const validationTooltipHideDelay = 3000;
|
|
6840
8499
|
|
|
6841
|
-
const VERSION = new Version('20.
|
|
8500
|
+
const VERSION = new Version('20.3.1+sha-d6cc191');
|
|
6842
8501
|
|
|
6843
8502
|
/**
|
|
6844
8503
|
* Generated bundle index. Do not edit.
|
|
6845
8504
|
*/
|
|
6846
8505
|
|
|
6847
|
-
export { A, ALT, APOSTROPHE, ARROW_BOTTOM_MARGIN_AND_HALF_HEIGHT, AT_SIGN, AbsoluteDateFormatterImpurePipe, AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterImpurePipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterImpurePipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterImpurePipe, AbsoluteShortDateTimeFormatterPipe, ActiveDescendantKeyManager, B, BACKSLASH, BACKSPACE, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, BaseFormatterPipe, BaseLocaleAwareFormatterPipe, C, CAPS_LOCK, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, D, DASH, DELETE, DOWN_ARROW, DateAdapter, DateFormatter, E, EIGHT, END, ENTER, EQUALS, ESCAPE, EXTENDED_OVERLAY_POSITIONS, EmptyFocusTrapStrategy, ErrorStateMatcher, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FOUR, FileValidators, FocusKeyManager, G, H, HOME, I, INSERT, J, K, KBQ_CONNECTED_OVERLAY_ABOVE_CLASS, KBQ_CONNECTED_OVERLAY_BELOW_CLASS, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_DEFAULT_PRECISION_SEPARATOR, KBQ_FORM_FIELD_REF, KBQ_INVALID_VALUE_ERROR, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_LOCALE_SERVICE_LANG_ATTR_NAME, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_OVERFLOW_SHADOW_SOURCE, KBQ_PANEL_DEFAULT_MIN_WIDTH, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_PARENT_POPUP, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_SELECT_SEARCH_MIN_OPTIONS_THRESHOLD, KBQ_SHADOW_DOM_OVERLAY_HOST, KBQ_SIZE_UNITS_CONFIG, KBQ_SIZE_UNITS_DEFAULT_CONFIG, KBQ_TITLE_TEXT_REF, KBQ_WINDOW, KbqAbsoluteLongDatePipe, KbqAbsoluteLongDateTimePipe, KbqAbsoluteShortDatePipe, KbqAbsoluteShortDateTimePipe, KbqAbstractSelect, KbqActionContainer, KbqAnimationCurves, KbqAnimationDurations, KbqColorDirective, KbqComponentColors, KbqDataSizePipe, KbqDecimalPipe, KbqDefaultThemes, KbqErrorStateTracker, KbqFieldSizingContent, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightBackgroundPipe, KbqHighlightModule, KbqHighlightPipe, KbqHover, KbqLine, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqMeasurementSystem, KbqNormalizeWhitespace, KbqOptgroup, KbqOption, KbqOptionActionComponent, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqOverflowShadowBottom, KbqOverflowShadowContainer, KbqOverflowShadowTop, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxModule, KbqRangeLongDatePipe, KbqRangeLongDateTimePipe, KbqRangeMiddleDateTimePipe, KbqRangeShortDatePipe, KbqRangeShortDateTimePipe, KbqReadStateDirective, KbqRectangleItem, KbqRelativeLongDatePipe, KbqRelativeLongDateTimePipe, KbqRelativeShortDatePipe, KbqRelativeShortDateTimePipe, KbqRoundDecimalPipe, KbqSelectAllEvent, KbqSelectFooter, KbqSelectMatcher, KbqSelectSearch, KbqSelectSearchEmptyResult, KbqSelectTrigger, KbqShadowDomOverlayContainer, KbqTableNumberPipe, KbqThemeSelector, KbqVirtualOption, L, LAST_MEDIA, LEFT_ARROW, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, ListKeyManager, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, META, MUTE, MockNgZone, MultipleMode, N, NINE, NUMBER_FORMAT_REGEXP, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PAUSE, PERIOD, PLUS_SIGN, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PRINT_SCREEN, PasswordValidators, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, Q, QUESTION_MARK, R, RIGHT_ARROW, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterImpurePipe, RangeDateFormatterPipe, RangeDateTimeFormatterImpurePipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterImpurePipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterImpurePipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterImpurePipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterImpurePipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterImpurePipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterImpurePipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterImpurePipe, RelativeShortDateTimeFormatterPipe, S, SCROLL_LOCK, SELECT_PANEL_VIEWPORT_PADDING, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, ShowOnControlDirtyErrorStateMatcher, ShowOnFormSubmitErrorStateMatcher, ShowRequiredOnSubmitErrorStateMatcher, T, TAB, THREE, TILDE, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, TWO, ThemePalette, ThemeService, U, UP_ARROW, V, VERSION, VOLUME_DOWN, VOLUME_UP, W, X, Y, Z, ZERO, applyPopupMargins, checkAndNormalizeLocalizedNumber, countGroupLabelsBeforeOption, createFakeEvent, createKeyboardEvent, createMouseEvent, createTouchEvent, defaultOffsetY, dispatchEvent, dispatchFakeEvent, dispatchKeyboardEvent, dispatchMouseEvent, dispatchTouchEvent, enUSFormattersData, enUSLocaleData, esLAFormattersData, esLALocaleData, escapeRegExp, fadeAnimation, formatNumberWithLocale, getFormattedSizeParts, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getNodesWithoutComments, getOptionScrollPosition, hasModifierKey, isBoolean, isControl, isCopy, isDigit, isElement, isFunctionKey, isHorizontalMovement, isHtmlElement, isHtmlElementOrNull, isInput, isLeftBracket, isLetterKey, isMac, isNull, isNumberKey, isNumpadKey, isRightBracket, isSelectAll, isUndefined, isVerticalMovement, isWithin, kbqErrorStateMatcherProvider, kbqFilesizeFormatterConfigurationProvider, kbqGetPanelWidthOrigin, kbqHighlightBackgroundMark, kbqHighlightMark, kbqInjectNativeElement, kbqLocaleServiceLangAttrNameProvider, kbqResolvePanelWidth, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, kbqShadowDomOverlayProvider, leftIconClassName, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, normalizeNumber, numberByParts, patchElementFocus, ptBRFormattersData, ptBRLocaleData, rightIconClassName, ruRUFormattersData, ruRULocaleData, selectEvents, shouldSelectSearchText, tkTMFormattersData, tkTMLocaleData, toggleSelectAll, typeInElement, validationTooltipHideDelay, validationTooltipShowDelay, wrappedErrorMessage };
|
|
8506
|
+
export { A, ALT, APOSTROPHE, ARROW_BOTTOM_MARGIN_AND_HALF_HEIGHT, AT_SIGN, AbsoluteDateFormatterImpurePipe, AbsoluteDateFormatterPipe, AbsoluteDateShortFormatterImpurePipe, AbsoluteDateShortFormatterPipe, AbsoluteDateTimeFormatterImpurePipe, AbsoluteDateTimeFormatterPipe, AbsoluteShortDateTimeFormatterImpurePipe, AbsoluteShortDateTimeFormatterPipe, ActiveDescendantKeyManager, B, BACKSLASH, BACKSPACE, BOTTOM_LEFT_POSITION_PRIORITY, BOTTOM_POSITION_PRIORITY, BOTTOM_RIGHT_POSITION_PRIORITY, BaseFormatterPipe, BaseLocaleAwareFormatterPipe, C, CAPS_LOCK, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, D, DASH, DELETE, DOWN_ARROW, DateAdapter, DateFormatter, DurationLongFormatterImpurePipe, DurationLongFormatterPipe, DurationShortFormatterImpurePipe, DurationShortFormatterPipe, DurationShortestFormatterImpurePipe, DurationShortestFormatterPipe, E, EIGHT, END, ENTER, EQUALS, ESCAPE, EXTENDED_OVERLAY_POSITIONS, EmptyFocusTrapStrategy, ErrorStateMatcher, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FOUR, FileValidators, FocusKeyManager, G, H, HOME, I, INSERT, J, K, KBQ_A11Y_LOCALE_CONFIGURATION, KBQ_CHECKABLE_CLICK_ACTION, KBQ_CHECKABLE_CONTROL_VALUE_ACCESSOR, KBQ_CONNECTED_OVERLAY_ABOVE_CLASS, KBQ_CONNECTED_OVERLAY_BELOW_CLASS, KBQ_CONNECTED_OVERLAY_ORIGIN, KBQ_CONNECTED_OVERLAY_OVERLAP_CLASS, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KBQ_DATE_FORMATS, KBQ_DATE_LOCALE, KBQ_DATE_LOCALE_FACTORY, KBQ_DATE_TIMEZONE, KBQ_DEFAULT_LOCALE_DATA_FACTORY, KBQ_DEFAULT_LOCALE_ID, KBQ_DEFAULT_PRECISION_SEPARATOR, KBQ_FORM_FIELD_REF, KBQ_INVALID_VALUE_ERROR, KBQ_LOCALE_DATA, KBQ_LOCALE_ID, KBQ_LOCALE_SERVICE, KBQ_LOCALE_SERVICE_LANG_ATTR_NAME, KBQ_NUMBER_FORMATTER_DEFAULT_OPTIONS, KBQ_NUMBER_FORMATTER_OPTIONS, KBQ_OPTION_ACTION_PARENT, KBQ_OPTION_PARENT_COMPONENT, KBQ_OVERFLOW_SHADOW_SOURCE, KBQ_PANEL_DEFAULT_MIN_WIDTH, KBQ_PARENT_ANIMATION_COMPONENT, KBQ_PARENT_POPUP, KBQ_SELECT_SCROLL_STRATEGY, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER, KBQ_SELECT_SEARCH_MIN_OPTIONS_THRESHOLD, KBQ_SHADOW_DOM_OVERLAY_HOST, KBQ_SIBLING_POPUP, KBQ_SIZE_UNITS_CONFIG, KBQ_SIZE_UNITS_DEFAULT_CONFIG, KBQ_TITLE_TEXT_REF, KBQ_WINDOW, KbqAbsoluteLongDatePipe, KbqAbsoluteLongDateTimePipe, KbqAbsoluteShortDatePipe, KbqAbsoluteShortDateTimePipe, KbqAbstractSelect, KbqActionContainer, KbqAnimationCurves, KbqAnimationDurations, KbqAutoHideScrollStrategy, KbqCheckable, KbqColorDirective, KbqComponentColors, KbqDataSizePipe, KbqDateTimezoneService, KbqDecimalPipe, KbqDefaultThemes, KbqDurationLongPipe, KbqDurationShortPipe, KbqDurationShortestPipe, KbqErrorStateTracker, KbqFieldSizingContent, KbqForm, KbqFormElement, KbqFormattersModule, KbqFormsModule, KbqHighlightBackgroundPipe, KbqHighlightModule, KbqHighlightPipe, KbqHover, KbqLine, KbqLineSetter, KbqLocaleService, KbqLocaleServiceModule, KbqMeasureScrollbarService, KbqMeasurementSystem, KbqNormalizeWhitespace, KbqOptgroup, KbqOption, KbqOptionActionComponent, KbqOptionBase, KbqOptionModule, KbqOptionSelectionChange, KbqOverflowShadowBottom, KbqOverflowShadowContainer, KbqOverflowShadowTop, KbqPopUp, KbqPopUpTrigger, KbqPseudoCheckbox, KbqPseudoCheckboxModule, KbqRangeLongDatePipe, KbqRangeLongDateTimePipe, KbqRangeMiddleDateTimePipe, KbqRangeShortDatePipe, KbqRangeShortDateTimePipe, KbqReadStateDirective, KbqRectangleItem, KbqRelativeLongDatePipe, KbqRelativeLongDateTimePipe, KbqRelativeShortDatePipe, KbqRelativeShortDateTimePipe, KbqRoundDecimalPipe, KbqSelectAllEvent, KbqSelectFooter, KbqSelectMatcher, KbqSelectSearch, KbqSelectSearchEmptyResult, KbqSelectTrigger, KbqShadowDomOverlayContainer, KbqTableNumberPipe, KbqThemeSelector, KbqVirtualOption, L, LAST_MEDIA, LEFT_ARROW, LEFT_BOTTOM_POSITION_PRIORITY, LEFT_POSITION_PRIORITY, LEFT_TOP_POSITION_PRIORITY, ListKeyManager, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, META, MUTE, MockNgZone, MultipleMode, N, NINE, NUMBER_FORMAT_REGEXP, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PAUSE, PERIOD, PLUS_SIGN, POSITION_MAP, POSITION_PRIORITY_STRATEGY, POSITION_TO_CSS_MAP, PRINT_SCREEN, PasswordValidators, PopUpPlacements, PopUpSizes, PopUpTriggers, PopUpVisibility, Q, QUESTION_MARK, R, RIGHT_ARROW, RIGHT_BOTTOM_POSITION_PRIORITY, RIGHT_POSITION_PRIORITY, RIGHT_TOP_POSITION_PRIORITY, RangeDateFormatterImpurePipe, RangeDateFormatterPipe, RangeDateTimeFormatterImpurePipe, RangeDateTimeFormatterPipe, RangeMiddleDateTimeFormatterImpurePipe, RangeMiddleDateTimeFormatterPipe, RangeShortDateFormatterImpurePipe, RangeShortDateFormatterPipe, RangeShortDateTimeFormatterImpurePipe, RangeShortDateTimeFormatterPipe, RelativeDateFormatterImpurePipe, RelativeDateFormatterPipe, RelativeDateTimeFormatterImpurePipe, RelativeDateTimeFormatterPipe, RelativeShortDateFormatterImpurePipe, RelativeShortDateFormatterPipe, RelativeShortDateTimeFormatterImpurePipe, RelativeShortDateTimeFormatterPipe, S, SCROLL_LOCK, SELECT_PANEL_VIEWPORT_PADDING, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, ShowOnControlDirtyErrorStateMatcher, ShowOnFormSubmitErrorStateMatcher, ShowRequiredOnSubmitErrorStateMatcher, T, TAB, THREE, TILDE, TOP_LEFT_POSITION_PRIORITY, TOP_POSITION_PRIORITY, TOP_RIGHT_POSITION_PRIORITY, TWO, ThemePalette, ThemeService, TransitionCheckState, U, UP_ARROW, V, VERSION, VOLUME_DOWN, VOLUME_UP, W, X, Y, Z, ZERO, applyPopupMargins, checkAndNormalizeLocalizedNumber, countGroupLabelsBeforeOption, createFakeEvent, createKeyboardEvent, createMouseEvent, createSearchPredicate, createTouchEvent, defaultOffsetY, dispatchEvent, dispatchFakeEvent, dispatchKeyboardEvent, dispatchMouseEvent, dispatchTouchEvent, enUSFormattersData, enUSLocaleData, esLAFormattersData, esLALocaleData, escapeRegExp, fadeAnimation, findSearchMatchRanges, formatNumberWithLocale, getFormattedSizeParts, getHumanizedBytes, getKbqSelectDynamicMultipleError, getKbqSelectNonArrayValueError, getKbqSelectNonFunctionValueError, getNodesWithoutComments, getOptionScrollPosition, getSafeTriangleVertices, getSelectAllState, hasModifierKey, isBoolean, isControl, isCopy, isDigit, isElement, isFunctionKey, isHorizontalMovement, isHtmlElement, isHtmlElementOrNull, isInput, isLeftBracket, isLetterKey, isMac, isNull, isNumberKey, isNumpadKey, isPointInRect, isPointInTriangle, isRightBracket, isSelectAll, isUndefined, isVerticalMovement, isWithin, kbqA11yLocaleConfigurationProvider, kbqAutoHideScrollStrategyFactory, kbqDateTimezoneProvider, kbqErrorStateMatcherProvider, kbqFilesizeFormatterConfigurationProvider, kbqFocusAndReveal, kbqFocusOptionActionOnTab, kbqGetPanelWidthOrigin, kbqHighlightBackgroundMark, kbqHighlightMark, kbqInjectA11yLocaleConfiguration, kbqInjectAutofilled, kbqInjectNativeElement, kbqLocaleServiceLangAttrNameProvider, kbqResolvePanelMaxHeightToken, kbqResolvePanelWidth, kbqResolveTimezoneOffset, kbqRevealSelection, kbqSelectAnimations, kbqSelectScrollStrategyProviderFactory, kbqSetSelectionRange, kbqShadowDomOverlayProvider, kbqSiblingPopupProvider, leftIconClassName, mixinColor, mixinDisabled, mixinErrorState, mixinTabIndex, normalizeNumber, normalizeSearchValue, numberByParts, patchElementFocus, ptBRFormattersData, ptBRLocaleData, rightIconClassName, ruRUFormattersData, ruRULocaleData, runCompareWith, selectEvents, shouldSelectSearchText, tkTMFormattersData, tkTMLocaleData, toggleSelectAll, tokenizeSearchQuery, typeInElement, validationTooltipHideDelay, validationTooltipShowDelay, wrappedErrorMessage };
|
|
6848
8507
|
//# sourceMappingURL=koobiq-components-core.mjs.map
|