@koobiq/components 19.8.7 → 19.8.9

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.
@@ -107,7 +107,8 @@ export declare class KbqOverflowItems {
107
107
  */
108
108
  readonly additionalResizeObserverTargets: import("@angular/core").InputSignal<Element | Element[]>;
109
109
  /**
110
- * Emits when the set of hidden items changes.
110
+ * Emits the set of hidden items after every recalculation, also when it has not changed: a recalculation shows every
111
+ * item before it hides the overflown ones again, so a consumer that hides items itself re-applies that here.
111
112
  */
112
113
  readonly changes: import("@angular/core").OutputEmitterRef<ReadonlySet<unknown>>;
113
114
  /**
@@ -126,6 +127,7 @@ export declare class KbqOverflowItems {
126
127
  * @default 'nowrap'
127
128
  */
128
129
  readonly wrap: import("@angular/core").InputSignal<KbqFlexWrap>;
130
+ /** The main axis of each orientation, as the `DOMRect` and `CSSStyleDeclaration` members to read. */
129
131
  private readonly orientationConfig;
130
132
  constructor();
131
133
  private setupObservers;
@@ -145,9 +147,16 @@ export declare class KbqOverflowItems {
145
147
  private setStyles;
146
148
  private hasOverflown;
147
149
  /**
148
- * @TODO Should be removed when `Array.prototype.findLast` is supported.
150
+ * Measures how far the children of the container that take part in its layout exceed its content box along the
151
+ * main axis, and the space each of them takes, its margins and one gap included.
149
152
  */
150
- private findLast;
153
+ private measure;
154
+ /**
155
+ * Children of the element that take part in its flex layout: neither `display: none` nor taken out of flow, as
156
+ * hidden items are, with the children of a `display: contents` child in its place.
157
+ */
158
+ private getLaidOutChildren;
159
+ private px;
151
160
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqOverflowItems, never>;
152
161
  static ɵdir: i0.ɵɵDirectiveDeclaration<KbqOverflowItems, "[kbqOverflowItems]", ["kbqOverflowItems"], { "reverseOverflowOrder": { "alias": "reverseOverflowOrder"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; "additionalResizeObserverTargets": { "alias": "additionalResizeObserverTargets"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, { "changes": "changes"; }, ["items", "result"], never, true, never>;
153
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/components",
3
- "version": "19.8.7",
3
+ "version": "19.8.9",
4
4
  "description": "koobiq",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,11 +25,11 @@
25
25
  "@angular/cdk": ">=19.0.0",
26
26
  "@angular/core": ">=19.0.0",
27
27
  "@angular/forms": ">=19.0.0",
28
- "@koobiq/cdk": "19.8.7",
29
- "@koobiq/angular-moment-adapter": "19.8.7",
30
- "@koobiq/angular-luxon-adapter": "19.8.7",
28
+ "@koobiq/cdk": "19.8.9",
29
+ "@koobiq/angular-moment-adapter": "19.8.9",
30
+ "@koobiq/angular-luxon-adapter": "19.8.9",
31
31
  "@koobiq/date-formatter": "^3.2.3",
32
- "@koobiq/icons": "^11.1.3",
32
+ "@koobiq/icons": "^11.1.3 || ^12.0.0",
33
33
  "@koobiq/design-tokens": "^3.14.0"
34
34
  },
35
35
  "dependencies": {
@@ -81,14 +81,14 @@
81
81
  "types": "./autocomplete/index.d.ts",
82
82
  "default": "./fesm2022/koobiq-components-autocomplete.mjs"
83
83
  },
84
- "./breadcrumbs": {
85
- "types": "./breadcrumbs/index.d.ts",
86
- "default": "./fesm2022/koobiq-components-breadcrumbs.mjs"
87
- },
88
84
  "./badge": {
89
85
  "types": "./badge/index.d.ts",
90
86
  "default": "./fesm2022/koobiq-components-badge.mjs"
91
87
  },
88
+ "./breadcrumbs": {
89
+ "types": "./breadcrumbs/index.d.ts",
90
+ "default": "./fesm2022/koobiq-components-breadcrumbs.mjs"
91
+ },
92
92
  "./button": {
93
93
  "types": "./button/index.d.ts",
94
94
  "default": "./fesm2022/koobiq-components-button.mjs"
@@ -27,8 +27,8 @@ function ngAdd(options) {
27
27
  }
28
28
  // Installing dependencies
29
29
  utils_packageConfig.addPackageToPackageJson(tree, '@angular/cdk', "^19.2.19");
30
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.7");
31
- utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.7");
30
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.9");
31
+ utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.9");
32
32
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-formatter', "^3.5.1");
33
33
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-adapter', "^3.5.1");
34
34
  utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/icons', "^11.5.0");
@@ -1,6 +1,5 @@
1
1
  import { CdkScrollable, ScrollDispatcher } from '@angular/cdk/overlay';
2
2
  import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, Injector, NgZone, TemplateRef, ViewContainerRef, ViewRef } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
3
  import { KbqToastService } from './toast.service';
5
4
  import { KbqToastData } from './toast.type';
6
5
  import * as i0 from "@angular/core";
@@ -9,34 +8,24 @@ export declare class KbqToastContainerComponent extends CdkScrollable {
9
8
  private changeDetectorRef;
10
9
  readonly service: KbqToastService;
11
10
  viewContainer: ViewContainerRef;
12
- /**
13
- * Emits while the stack re-lays-out. Toasts are ordinary flow children, so removing one slides the
14
- * rest for as long as its height animates — and an overlay opened from inside a toast is anchored to
15
- * a trigger that is moving. CDK only re-measures the origin on a scroll or a viewport resize, so the
16
- * stack has to say when it moved.
17
- *
18
- * The container's own box tracks the reflow exactly: continuously while a leaving toast animates its
19
- * height away, and once for a removal that is not animated at all, such as a template toast.
20
- */
21
- private readonly reflowed;
11
+ private readonly overlayKeyboardDispatcher;
22
12
  constructor(injector: Injector, changeDetectorRef: ChangeDetectorRef, service: KbqToastService, elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, ngZone: NgZone);
23
- /**
24
- * `ScrollDispatcher` subscribes to this method when the container registers itself, so merging the
25
- * reflow signal in re-broadcasts it to every overlay that repositions on scroll — which is what
26
- * `kbq-select` and the dropdown trigger do by default.
27
- */
28
- elementScrolled(): Observable<Event>;
29
13
  createToast<C>(data: KbqToastData, componentType: any, onTop: boolean): ComponentRef<C>;
30
14
  createTemplate<C>(data: KbqToastData, template: TemplateRef<any>, onTop: boolean): EmbeddedViewRef<C>;
31
15
  remove(viewRef: ViewRef): void;
32
16
  getInjector(data: KbqToastData): Injector;
17
+ /**
18
+ * Re-applies the position of every overlay anchored to an element; one whose origin has not moved stays where it
19
+ * is. CDK keeps no public registry of attached overlays, but its keyboard dispatcher tracks each of them.
20
+ */
21
+ private repositionConnectedOverlays;
33
22
  /**
34
23
  * Fakes a scroll on the container so that overlays anchored inside a toast are repositioned by their
35
24
  * `RepositionScrollStrategy` when the stack shifts.
36
25
  *
37
- * @deprecated The container reports its own reflow through `elementScrolled()`, so nothing calls this.
26
+ * @deprecated The container repositions the overlays anchored inside it on its own, so nothing calls this.
38
27
  * It is kept only for callers that already hold a container reference — the instance created by
39
- * `KbqToastService` is not exposed.
28
+ * `KbqToastService` is not exposed. The fake scroll also closes every close-on-scroll overlay of the app.
40
29
  */
41
30
  dispatchScrollEvent: () => void;
42
31
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqToastContainerComponent, never>;
@@ -86,6 +86,8 @@ export declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements
86
86
  markForCheck(): void;
87
87
  /** @docs-private */
88
88
  protected onMouseenter(): void;
89
+ /** Recomputes the option's own checkbox state, leaving its ancestors as they are. */
90
+ private syncCheckboxState;
89
91
  static ɵfac: i0.ɵɵFactoryDeclaration<KbqTreeOption, never>;
90
92
  static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeOption, "kbq-tree-option", ["kbqTreeOption"], { "checkboxThirdState": { "alias": "checkboxThirdState"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, ["toggleElementDirective", "toggleElementComponent", "pseudoCheckbox", "actionButton", "tooltipTrigger", "dropdownTrigger"], ["kbq-tree-node-toggle, [kbq-tree-node-toggle], [kbqTreeNodeToggle]", "kbq-pseudo-checkbox", "kbq-checkbox", "[kbq-icon]", "kbq-progress-spinner", "*", "kbq-option-action"], true, never>;
91
93
  static ngAcceptInputType_selectable: unknown;
@@ -65,6 +65,9 @@ export declare class KbqTreeSelection extends KbqTreeBase<any> implements Contro
65
65
  nodeOutlet: KbqTreeNodeOutlet;
66
66
  unorderedOptions: QueryList<KbqTreeOption>;
67
67
  treeControl: FlatTreeControl<any>;
68
+ /** `treeControl.dataNodes` the options' checkbox states were last recomputed against. */
69
+ private checkboxSyncedDataNodes;
70
+ private isDestroyed;
68
71
  readonly navigationChange: EventEmitter<KbqTreeNavigationChange<KbqTreeOption>>;
69
72
  readonly selectionChange: EventEmitter<KbqTreeSelectionChange<KbqTreeOption>>;
70
73
  readonly onSelectAll: EventEmitter<KbqTreeSelectAllEvent<KbqTreeOption>>;
@@ -105,6 +108,12 @@ export declare class KbqTreeSelection extends KbqTreeBase<any> implements Contro
105
108
  setFocusedOption(option: KbqTreeOption): void;
106
109
  toggleFocusedOption(): void;
107
110
  renderNodeChanges(data: KbqTreeOption[], dataDiffer?: IterableDiffer<KbqTreeOption>, viewContainer?: ViewContainerRef, parentData?: KbqTreeOption): void;
111
+ /**
112
+ * Recomputes every option's checkbox state after `dataNodes` is replaced, which moves the descendants a branch
113
+ * counts: no selection change follows to do it. A microtask later, as a flat data source assigns `dataNodes` only
114
+ * after it emits.
115
+ */
116
+ private scheduleCheckboxSync;
108
117
  emitNavigationEvent(option: KbqTreeOption): void;
109
118
  emitChangeEvent(option: KbqTreeOption): void;
110
119
  selectAllOptions(): void;