@coolon/angular-ui-powerups 16.1.0-alpha.254 → 16.1.0-alpha.256

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.
@@ -23,6 +23,7 @@ export * from "./commands/group/popup-container";
23
23
  export * from "./commands/group/popup-menu/abstract-popup-menu.component";
24
24
  export * from "./commands/group/popup-menu/more-menu.component";
25
25
  export * from "./commands/group/popup-menu/popup-menu.component";
26
+ export * from "./commands/group/popup-menu/popup-menu-renderer/collapse-orphan-separators";
26
27
  export * from "./commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component";
27
28
  export * from "./commands/group/tool-bar/tool-bar.component";
28
29
  export * from "./empty-state/empty-state.component";
@@ -60,7 +61,6 @@ export * from "./tables/column/list-propery-column-model";
60
61
  export * from "./tables/column/property-column-model";
61
62
  export * from "./tables/column/selection-column-model";
62
63
  export * from "./tables/column/column-template/column-template.directive";
63
- export * from "./tables/renderer/editable-cell-renderer";
64
64
  export * from "./tables/filter/column-text-search-formatter";
65
65
  export * from "./tables/filter/enable-cell-text-search.decorator";
66
66
  export * from "./tables/filter/table-filter-model";
@@ -70,6 +70,7 @@ export * from "./tables/paginator/paginator.component";
70
70
  export * from "./tables/renderer/abstract-cell-renderer";
71
71
  export * from "./tables/renderer/cell-portal-ref";
72
72
  export * from "./tables/renderer/cell-renderer";
73
+ export * from "./tables/renderer/editable-cell-renderer";
73
74
  export * from "./tables/renderer/default-cell-renderer/default-cell-renderer.component";
74
75
  export * from "./tables/renderer/default-header-cell-renderer/default-header-cell-renderer.component";
75
76
  export * from "./tables/renderer/select-header-cell/selection-header-cell.component";
@@ -13,11 +13,37 @@ export declare class TableCellComponent<Row extends object> extends DisposableCo
13
13
  defaultClassNames: string;
14
14
  fillCell: boolean;
15
15
  padChild: boolean;
16
+ private readonly detachedParentCdr;
16
17
  constructor();
17
18
  initialiseRenderer(ref: CdkPortalOutletAttachedRef): void;
18
19
  ngOnChanges(changes: SimpleChanges): void;
19
20
  getRendererPortal(): Portal<any>;
20
21
  getRowData(): RowData<Row>;
22
+ /**
23
+ * A CDK overlay attached through a `ComponentPortal` carrying a `ViewContainerRef` — MatTooltip is
24
+ * the common case — creates its component in the TRIGGER's view container: `attachComponentPortal`
25
+ * takes the `portal.viewContainerRef` branch and skips `ApplicationRef.attachView`, so only the DOM
26
+ * node is relocated to the overlay container. The component stays a change-detection child of THIS
27
+ * cell's view, which `aup-table-body` has detached. MatTooltip only calls `markForCheck()` on it,
28
+ * and nothing sweeps a detached subtree, so the tooltip paints EMPTY. `mouseleave` tears the
29
+ * overlay down, so every RE-hover rebuilds a component that needs a fresh check — which is why the
30
+ * first hover of a cell can look fine and later ones don't.
31
+ *
32
+ * The deferral is the whole trick, and it must be a MACROTASK. `mouseenter` is dispatched as a
33
+ * separate event per entered element, outermost first, so this cell's listener runs in an earlier
34
+ * task than the trigger's — a `queueMicrotask` check drains before MatTooltip has even created the
35
+ * overlay and is measurably a no-op (that is also why `markForCheck()`, which schedules a
36
+ * microtask parent sweep, does not fix this).
37
+ *
38
+ * Scoped to this cell rather than routed through `DisposableComponent.scheduleParentSweep`: both
39
+ * are correct once the timing is right, but the sweep only coalesces within a single microtask, and
40
+ * each `mouseenter` is its own task — so it degenerates into one whole-table-body check per cell
41
+ * entered, where this is one check of a single cell's view.
42
+ *
43
+ * `mouseenter` does not bubble, so this is one event per cell entered; it no-ops entirely for
44
+ * tables that never detached.
45
+ */
46
+ protected refreshOverlaysOnHover(): void;
21
47
  static ɵfac: i0.ɵɵFactoryDeclaration<TableCellComponent<any>, never>;
22
48
  static ɵcmp: i0.ɵɵComponentDeclaration<TableCellComponent<any>, "aup-table-cell", never, { "row": { "alias": "row"; "required": false; }; "column": { "alias": "column"; "required": false; }; "tableModel": { "alias": "tableModel"; "required": false; }; }, {}, never, never, false, never>;
23
49
  }
@@ -0,0 +1,53 @@
1
+ import { MatTooltip } from '@angular/material/tooltip';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * `matTooltip` that also renders inside a detached change-detection subtree — i.e. inside an
5
+ * `aup-table` body with `AUP_TABLE_OPTIMIZED_CHANGE_DETECTION`.
6
+ *
7
+ * MatTooltip creates its overlay component with `new ComponentPortal(component, this._viewContainerRef)`,
8
+ * so the CDK takes the `portal.viewContainerRef` branch of `attachComponentPortal` and skips
9
+ * `ApplicationRef.attachView`: only the DOM node is relocated to the overlay container, while the
10
+ * component itself stays a change-detection child of the view that hosts the trigger. MatTooltip then
11
+ * merely calls `markForCheck()` on it, twice:
12
+ *
13
+ * - in `_updateTooltipMessage()`, right after attaching — the message;
14
+ * - in `TooltipComponent._onShow()`, `showDelay` later — `_isMultiline`, which drives
15
+ * `mdc-tooltip--multiline` and therefore `text-align: left`.
16
+ *
17
+ * Neither reaches a detached subtree, so the tooltip opens EMPTY and, once text does appear, is
18
+ * centred until some unrelated check runs — a visible layout shift, or no text at all if the pointer
19
+ * is held still. Both were measured in a device table before this existed.
20
+ *
21
+ * `_viewContainerRef` and `_portal` are private in `_MatTooltipBase`, so the cause cannot be fixed
22
+ * from a subclass; the honest fix belongs upstream. What a subclass CAN do is force the checks that
23
+ * MatTooltip only requests. Hooking `show()` — rather than a hover event — is what makes this
24
+ * reliable: `super.show()` has attached the overlay and set the message by the time it returns, so
25
+ * there is no ordering to race. (A listener on an ancestor element loses that race unpredictably: the
26
+ * trigger's own `mouseenter` is a separate event dispatch.)
27
+ *
28
+ * Inherited options keep their Material names, e.g.
29
+ * `<span [aupTooltip]="text" matTooltipPosition="above">`.
30
+ */
31
+ export declare class AupTooltipDirective extends MatTooltip {
32
+ /**
33
+ * The very container MatTooltip inserts its overlay component into, so the inserted ViewRefs ARE the
34
+ * tooltip's views. Measured in a browser: after `super.show()` this holds exactly 1 view, and
35
+ * checking it turns the overlay's text from "" into the message. Preferred over the injected
36
+ * `ChangeDetectorRef` (which also works) because it targets the tooltip's own view rather than
37
+ * whichever enclosing view the node injector happens to resolve to.
38
+ */
39
+ private readonly container;
40
+ set text(value: string);
41
+ get text(): string;
42
+ show(delay?: number, origin?: {
43
+ x: number;
44
+ y: number;
45
+ }): void;
46
+ private check;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<AupTooltipDirective, never>;
48
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AupTooltipDirective, "[aupTooltip]", ["aupTooltip"], { "text": { "alias": "aupTooltip"; "required": false; }; }, {}, never, never, false, never>;
49
+ }
50
+ export declare namespace AupTooltipDirective {
51
+ /** Enough to land after `_onShow()` has set `_isMultiline`, small enough to be imperceptible. */
52
+ const LAYOUT_CHECK_GRACE_MS = 20;
53
+ }
@@ -1,18 +1,20 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./command.directive";
3
- import * as i2 from "./focus-binding.directive";
4
- import * as i3 from "./highlight.pipe";
5
- import * as i4 from "./highlight-text-model.directive";
6
- import * as i5 from "./garbage-collector.directive";
7
- import * as i6 from "@angular/common";
8
- import * as i7 from "@angular/platform-browser/animations";
9
- import * as i8 from "@angular/forms";
10
- import * as i9 from "@angular/material/input";
11
- import * as i10 from "@angular/material/form-field";
12
- import * as i11 from "@angular/material/select";
13
- import * as i12 from "@angular/material/tabs";
2
+ import * as i1 from "./aup-tooltip.directive";
3
+ import * as i2 from "./command.directive";
4
+ import * as i3 from "./focus-binding.directive";
5
+ import * as i4 from "./highlight.pipe";
6
+ import * as i5 from "./highlight-text-model.directive";
7
+ import * as i6 from "./garbage-collector.directive";
8
+ import * as i7 from "@angular/common";
9
+ import * as i8 from "@angular/platform-browser/animations";
10
+ import * as i9 from "@angular/forms";
11
+ import * as i10 from "@angular/material/input";
12
+ import * as i11 from "@angular/material/form-field";
13
+ import * as i12 from "@angular/material/select";
14
+ import * as i13 from "@angular/material/tabs";
15
+ import * as i14 from "@angular/material/tooltip";
14
16
  export declare class DirectivesModule {
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DirectivesModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<DirectivesModule, [typeof i1.CommandDirective, typeof i2.FocusBindingDirective, typeof i3.HighlightPipe, typeof i4.HighlightTextModelDirective, typeof i5.GarbageCollectorDirective], [typeof i6.CommonModule, typeof i7.BrowserAnimationsModule, typeof i8.FormsModule, typeof i9.MatInputModule, typeof i10.MatFormFieldModule, typeof i11.MatSelectModule, typeof i12.MatTabsModule], [typeof i1.CommandDirective, typeof i2.FocusBindingDirective, typeof i3.HighlightPipe, typeof i4.HighlightTextModelDirective, typeof i5.GarbageCollectorDirective]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DirectivesModule, [typeof i1.AupTooltipDirective, typeof i2.CommandDirective, typeof i3.FocusBindingDirective, typeof i4.HighlightPipe, typeof i5.HighlightTextModelDirective, typeof i6.GarbageCollectorDirective], [typeof i7.CommonModule, typeof i8.BrowserAnimationsModule, typeof i9.FormsModule, typeof i10.MatInputModule, typeof i11.MatFormFieldModule, typeof i12.MatSelectModule, typeof i13.MatTabsModule, typeof i14.MatTooltipModule], [typeof i1.AupTooltipDirective, typeof i2.CommandDirective, typeof i3.FocusBindingDirective, typeof i4.HighlightPipe, typeof i5.HighlightTextModelDirective, typeof i6.GarbageCollectorDirective]>;
17
19
  static ɵinj: i0.ɵɵInjectorDeclaration<DirectivesModule>;
18
20
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
+ export * from "./aup-tooltip.directive";
4
5
  export * from "./command.directive";
5
6
  export * from "./directives.module";
6
7
  export * from "./focus-binding-factory";
@@ -8,6 +8,7 @@ export * from "./place-component";
8
8
  export * from "./place-config";
9
9
  export * from "./place-definition";
10
10
  export * from "./place-history";
11
+ export * from "./place-metadata";
11
12
  export * from "./place-router";
12
13
  export * from "./place.decorator";
13
14
  export * from "./place.module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-alpha.254",
3
+ "version": "16.1.0-alpha.256",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",
@@ -12,7 +12,7 @@
12
12
  "@angular/platform-browser-dynamic": "^16.2.9",
13
13
  "@angular/material-moment-adapter": "^16.2.10",
14
14
  "@angular/router": "^16.2.9",
15
- "@coolon/pectin": "^5.0.0-alpha.127",
15
+ "@coolon/pectin": "^5.0.0-alpha.128",
16
16
  "fast-typescript-memoize": "^1.1.1",
17
17
  "lodash-es": "^4.17.21",
18
18
  "marked": "4.0.10",