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

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
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.271",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",