@coolon/angular-ui-powerups 16.1.0-alpha.270 → 16.1.0-alpha.272

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.
@@ -69,6 +69,8 @@ export declare class SubFormListComponent<T extends object = any, B extends SubF
69
69
  * Each value is a named preset over the row's public CSS variables
70
70
  * (`--aup-sub-form-row-areas` / `-columns` / `-rows`), which a consumer can set from its own
71
71
  * stylesheet to override any of them — the variable wins over the preset, deliberately.
72
+ * {@link RowLayout.SUBGRID} is the exception that reaches wider than the row: it makes the rows
73
+ * container the grid, and takes the content tracks from `--aup-sub-form-list-columns`.
72
74
  *
73
75
  * Bind this once. It selects a class on each row, and {@link RowLayout.CUSTOM} additionally
74
76
  * changes what the row renders, so flipping it at runtime rebuilds the very bindings the row
@@ -115,6 +117,11 @@ export declare class SubFormListComponent<T extends object = any, B extends SubF
115
117
  get inlineLayout(): boolean;
116
118
  get railLayout(): boolean;
117
119
  get customLayout(): boolean;
120
+ /**
121
+ * Also drives a class on the rows container, which is the grid the rows subgrid — the only layout
122
+ * that needs one, since the others are laid out entirely within a row.
123
+ */
124
+ get subgridLayout(): boolean;
118
125
  /**
119
126
  * The three standard buttons, as flat grid items. Excludes the case where a template replaces
120
127
  * them, so the two branches are siblings rather than an `if/else` — which is what lets the
@@ -145,6 +152,13 @@ export declare class SubFormListComponent<T extends object = any, B extends SubF
145
152
  * itself, which the component cannot detect.
146
153
  */
147
154
  private warnAboutIgnoredCustomLayoutInputs;
155
+ /**
156
+ * `fill` is the one input `subgrid` silently drops: the content's width is the sum of the tracks
157
+ * the list was given, so there is no remaining width left to hand it. Worth a warning rather than
158
+ * a doc line, because the two read as complementary and the result of setting both is simply the
159
+ * layout the caller asked `fill` to change.
160
+ */
161
+ private warnAboutIgnoredSubgridInputs;
148
162
  private warnAboutUnsupportedReordering;
149
163
  static ɵfac: i0.ɵɵFactoryDeclaration<SubFormListComponent<any, any>, never>;
150
164
  static ɵcmp: i0.ɵɵComponentDeclaration<SubFormListComponent<any, any>, "aup-sub-form-list", never, { "list": { "alias": "list"; "required": false; }; "reorder": { "alias": "reorder"; "required": false; }; "removable$": { "alias": "removable$"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "removeFace": { "alias": "removeFace"; "required": false; }; "moveUpFace": { "alias": "moveUpFace"; "required": false; }; "moveDownFace": { "alias": "moveDownFace"; "required": false; }; "dragHandleIcon": { "alias": "dragHandleIcon"; "required": false; }; "addCommand": { "alias": "addCommand"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "rowLayout": { "alias": "rowLayout"; "required": false; }; }, {}, ["rowTemplate", "actionsTemplate", "emptyTemplate"], never, false, never>;
@@ -165,11 +179,40 @@ export declare namespace SubFormListComponent {
165
179
  INLINE: "inline";
166
180
  /** `up` / `handle` / `down` stacked in a leading rail, content beside it, actions trailing. */
167
181
  RAIL: "rail";
182
+ /**
183
+ * One line like {@link INLINE}, but the whole list is a single grid and every row subgrids it,
184
+ * so a column is sized against its own content in *every* row rather than against the widest
185
+ * cell in each row independently. Cells hug and still line up, which no per-row layout can do:
186
+ * separate grids can only be aligned by giving each the same tracks, and equal tracks are as
187
+ * wide as the widest cell in the row.
188
+ *
189
+ * The consumer supplies the content tracks as `--aup-sub-form-list-columns` — one per top-level
190
+ * element of the row template, in source order, since the cells are auto-placed. The library
191
+ * composes its own tracks around them and places the handle and the action cluster into those,
192
+ * so this layout renders everything {@link INLINE} does: the move buttons, remove, an
193
+ * `aupSubFormRowActions` template, and their faces. Nothing becomes the caller's obligation.
194
+ *
195
+ * Two things differ from the row layouts:
196
+ *
197
+ * - The gutter between cells is `--aup-sub-form-list-column-gap`, on the list, because the
198
+ * tracks are the list's — and because the two ways a browser can read a subgrid's own gap
199
+ * disagree (the spec says the parent's is used, Chrome honours the subgrid's), so one variable
200
+ * feeding both is the only value that means the same thing either way. `fill` does nothing here
201
+ * — the track list decides the widths, and a trailing `1fr` track in it is how a row pins its
202
+ * action cluster to the far edge instead of letting it sit against the content.
203
+ * - The drag preview cannot subgrid: CDK clones the row into `<body>`, where there is no parent
204
+ * grid, so `subgrid` computes to `none`. The preview falls back to flowing its cells in one
205
+ * line sized to themselves — it reads as the row being dragged, but its columns do not line
206
+ * up with the list underneath it.
207
+ */
208
+ SUBGRID: "subgrid";
168
209
  /**
169
210
  * The caller lays the row out. No preset area map, no library-rendered buttons, and the content
170
211
  * wrapper is given `display: contents` so the row template's own top-level elements become the
171
212
  * grid items it writes `grid-area` on.
172
213
  *
214
+ * For columns that line up across rows, reach for {@link SUBGRID} first — it keeps the buttons.
215
+ *
173
216
  * The drag handle is still rendered whenever `reorder` enables drag — it has to be, since a
174
217
  * `cdkDragHandle` in a caller's template silently fails to attach — so drag survives a custom
175
218
  * layout. Two obligations come with that: include a `handle` area in the map (an unknown named
@@ -18,6 +18,16 @@ export declare class PlaceGuard {
18
18
  constructor(router: Router, urlService: UrlService, placeRouter: PlaceRouter, placeHistory: PlaceHistory, interactionService: InteractionService, injector: Injector);
19
19
  get authService(): PlaceAuthService;
20
20
  canActivate(activatedRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean | UrlTree>;
21
+ /**
22
+ * Whether this guard pass should append a child segment to the url.
23
+ *
24
+ * For a route-id place the redirect must wait until the id is RESOLVED: an empty id followed by
25
+ * a child is unrepresentable in the url (it serialises as `//`, which Angular's parser silently
26
+ * truncates at). The check reads the SANITISED visit — the post-remember/default/sanitiser
27
+ * truth — so a sanitiser-supplied id redirects on the corrected-url pass, and an id supplied
28
+ * later (e.g. a selection model's auto-selection) redirects on that navigation's guard run.
29
+ */
30
+ private shouldRedirectToChild;
21
31
  /**
22
32
  * Chooses the child to redirect to when {@link PlaceDefinition.redirectToFirstChild} is set. When
23
33
  * `rememberLastChild` is enabled (the default) and we have a record of the last active child that is
@@ -24,9 +24,9 @@ export declare abstract class NavigationSession extends GarbageCollector {
24
24
  get isInteractionSync(): boolean;
25
25
  /**
26
26
  * Interruptible sessions are internal housekeeping navigations (e.g. interaction-id
27
- * synchronisation) that a real user- or model-driven navigation is allowed to queue behind
28
- * and supersede, rather than being rejected. Real navigations (Navigating, PopState) are not
29
- * interruptible.
27
+ * synchronisation). Historically only these queued an overlapping navigation while real
28
+ * navigations dropped it; ALL overlapping navigations now queue (see
29
+ * PlaceRouter.handleOverlappingNavigation), so this flag is diagnostic only.
30
30
  */
31
31
  get isInterruptible(): boolean;
32
32
  get name(): string;
@@ -61,15 +61,18 @@ export declare class PlaceRouter extends GarbageCollector {
61
61
  navigate(placeComponent: Constructable<PlaceComponent>, params?: Record<string, unknown>): any;
62
62
  doNavigation(visit: Visit, runNavigationCommands: (router: Router) => unknown): Promise<void>;
63
63
  /**
64
- * Handles a navigation triggered while another is already in flight.
64
+ * Handles a navigation triggered while another is already in flight: queue it (coalescing to the
65
+ * latest) and run it once the in-flight session finishes.
65
66
  *
66
- * This used to throw `illegalState('Navigation already in progress')`, which killed the
67
- * triggering action - occasionally seen in production when a user click collided with an
68
- * in-flight interaction-id sync. Instead we warn with diagnostic context and decide based on the
69
- * in-progress session:
70
- * - interruptible session in progress (internal housekeeping, e.g. interaction-id sync) -> queue
71
- * the incoming navigation and run it once the current session finishes (coalescing to latest).
72
- * - real navigation in progress -> keep it and drop the incoming one (logging full context).
67
+ * History: this used to throw `illegalState('Navigation already in progress')` (killed the
68
+ * triggering action), then dropped real-vs-real collisions as an interim policy pending
69
+ * production evidence. The evidence arrived: a `navigate()` issued from `onPlaceReady` or a
70
+ * route-parameter subscription can land while the activating navigation's session is still
71
+ * settling — dropping it leaves a place that never finishes navigating (e.g. a
72
+ * redirectToFirstChild-style child that never appears), and the caller can't tell because the
73
+ * dropped promise resolved normally. Popstate never enters doNavigation (it arrives via router
74
+ * events -> onPopState), so queueing programmatic navigations behind an in-flight session
75
+ * preserves user-intent ordering.
73
76
  */
74
77
  private handleOverlappingNavigation;
75
78
  private queueNavigation;
@@ -81,6 +84,11 @@ export declare class PlaceRouter extends GarbageCollector {
81
84
  private createNavigationSession;
82
85
  protected transitionTo(next: NavigationSession): void;
83
86
  private routingSessionFinished;
87
+ /**
88
+ * Runs `func` when the NEXT navigation session finishes — which may be a session that hasn't
89
+ * started yet (the interaction-id sync registers its completion job before starting the sync
90
+ * session, and jobs registered while a drain is running belong to the following session).
91
+ */
84
92
  private runAfterRoutingSessionFinishes;
85
93
  /**
86
94
  * Sync's the current interaction state with the URL. We need to push something in the URL in order
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-alpha.270",
3
+ "version": "16.1.0-alpha.272",
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.137",
15
+ "@coolon/pectin": "^5.0.0-alpha.139",
16
16
  "fast-typescript-memoize": "^1.1.1",
17
17
  "lodash-es": "^4.17.21",
18
18
  "marked": "4.0.10",