@coolon/angular-ui-powerups 16.1.0-alpha.277 → 16.1.0-alpha.279
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/esm2022/lib/components/exports.mjs +3 -1
- package/esm2022/lib/components/forms/checkbox-input/checkbox-input.component.mjs +3 -3
- package/esm2022/lib/components/forms/sub-form-list/sub-form-list-column.mjs +87 -0
- package/esm2022/lib/components/forms/sub-form-list/sub-form-list-columns.mjs +87 -0
- package/esm2022/lib/components/forms/sub-form-list/sub-form-list.component.mjs +146 -5
- package/fesm2022/coolon-angular-ui-powerups.mjs +317 -6
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/exports.d.ts +2 -0
- package/lib/components/forms/sub-form-list/sub-form-list-column.d.ts +63 -0
- package/lib/components/forms/sub-form-list/sub-form-list-columns.d.ts +70 -0
- package/lib/components/forms/sub-form-list/sub-form-list.component.d.ts +96 -3
- package/package.json +1 -1
|
@@ -2735,11 +2735,11 @@ class CheckboxInputComponent extends AbstractValueInputComponent {
|
|
|
2735
2735
|
this.componentValue$.value = $event.checked;
|
|
2736
2736
|
}
|
|
2737
2737
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CheckboxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2738
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CheckboxInputComponent, selector: "aup-checkbox-input", inputs: { color: "color", labelPosition: "labelPosition" }, usesInheritance: true, ngImport: i0, template: "<!-- TODO: add focus binding -->\n<!-- NOTE: using [(ngModel)] affects how material renders the component and makes it harder to test
|
|
2738
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: CheckboxInputComponent, selector: "aup-checkbox-input", inputs: { color: "color", labelPosition: "labelPosition" }, usesInheritance: true, ngImport: i0, template: "<!-- TODO: add focus binding -->\n<!-- NOTE: using [(ngModel)] affects how material renders the component and makes it harder to test\n so we're using [checked] and (change).\n The `?? false` is part of that: an optional boolean model holds undefined until something sets\n it, and a nil bound value renders the same but makes Angular drop the binding's dev-mode\n ng-reflect attribute entirely, which is what several test harnesses read. Coerced here for the\n view only \u2014 the model keeps whatever it holds. -->\n<mat-checkbox\n [checked]=\"componentValue$.value ?? false\"\n (change)=\"select($event)\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{ label }}<!--\n The icon lives inside the label rather than as a sibling: :host is a column flex, so a sibling\n would stack underneath and add the very height dense mode exists to avoid.\n--><span class=\"aup-validation-icon\" *ngIf=\"popupMessage\"><aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon></span>\n</mat-checkbox>\n<!--\n The wrapper has to persist for the grid collapse to have something to animate \u2014 the messages\n themselves come and go with *ngIf. inlineHintText/inlineError are already null when dense, so\n no !dense guard is needed.\n-->\n<div class=\"aup-subscript\">\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n</div>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:10px 0 0}:host.dense{padding:4px 0 2px}.aup-subscript{display:grid;grid-template-rows:0fr}.aup-subscript>*{overflow:hidden}:host(.aup-has-subscript) .aup-subscript{grid-template-rows:1fr;transition:grid-template-rows .15s ease-out}@media (prefers-reduced-motion: reduce){:host(.aup-has-subscript) .aup-subscript{transition:none}}mat-hint,mat-error{animation:aup-subscript-message-in .15s ease-out;padding-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}@media (prefers-reduced-motion: reduce){mat-hint,mat-error{animation:none}}aup-icon.aup-error,aup-icon.aup-warning,aup-icon.aup-info{--aup-icon-size: 16px;vertical-align:text-bottom}span.aup-validation-icon{display:inline-block;overflow:hidden;vertical-align:text-bottom;animation:aup-validation-icon-in .15s ease-out}span.aup-validation-icon aup-icon{margin-left:4px}@media (prefers-reduced-motion: reduce){span.aup-validation-icon{animation:none}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: AupTooltipDirective, selector: "[aupTooltip]", inputs: ["aupTooltip", "aupTooltipPosition", "aupTooltipPositionAtOrigin", "aupTooltipDisabled", "aupTooltipShowDelay", "aupTooltipHideDelay", "aupTooltipTouchGestures", "aupTooltipClass"], exportAs: ["aupTooltip"] }, { kind: "component", type: i2$6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }] });
|
|
2739
2739
|
}
|
|
2740
2740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: CheckboxInputComponent, decorators: [{
|
|
2741
2741
|
type: Component,
|
|
2742
|
-
args: [{ selector: 'aup-checkbox-input', template: "<!-- TODO: add focus binding -->\n<!-- NOTE: using [(ngModel)] affects how material renders the component and makes it harder to test
|
|
2742
|
+
args: [{ selector: 'aup-checkbox-input', template: "<!-- TODO: add focus binding -->\n<!-- NOTE: using [(ngModel)] affects how material renders the component and makes it harder to test\n so we're using [checked] and (change).\n The `?? false` is part of that: an optional boolean model holds undefined until something sets\n it, and a nil bound value renders the same but makes Angular drop the binding's dev-mode\n ng-reflect attribute entirely, which is what several test harnesses read. Coerced here for the\n view only \u2014 the model keeps whatever it holds. -->\n<mat-checkbox\n [checked]=\"componentValue$.value ?? false\"\n (change)=\"select($event)\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{ label }}<!--\n The icon lives inside the label rather than as a sibling: :host is a column flex, so a sibling\n would stack underneath and add the very height dense mode exists to avoid.\n--><span class=\"aup-validation-icon\" *ngIf=\"popupMessage\"><aup-icon data-cy=\"validation-icon\"\n [icon]=\"popupIcon\" [ngClass]=\"popupSeverityClass\"\n [aupTooltip]=\"popupMessage\" aupTooltipPosition=\"above\"></aup-icon></span>\n</mat-checkbox>\n<!--\n The wrapper has to persist for the grid collapse to have something to animate \u2014 the messages\n themselves come and go with *ngIf. inlineHintText/inlineError are already null when dense, so\n no !dense guard is needed.\n-->\n<div class=\"aup-subscript\">\n <mat-hint *ngIf=\"inlineHintText\" [ngClass]=\"inlineHintClass\">{{inlineHintText}}</mat-hint>\n <mat-error *ngIf=\"inlineError\">{{inlineError}}</mat-error>\n</div>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:10px 0 0}:host.dense{padding:4px 0 2px}.aup-subscript{display:grid;grid-template-rows:0fr}.aup-subscript>*{overflow:hidden}:host(.aup-has-subscript) .aup-subscript{grid-template-rows:1fr;transition:grid-template-rows .15s ease-out}@media (prefers-reduced-motion: reduce){:host(.aup-has-subscript) .aup-subscript{transition:none}}mat-hint,mat-error{animation:aup-subscript-message-in .15s ease-out;padding-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}@media (prefers-reduced-motion: reduce){mat-hint,mat-error{animation:none}}aup-icon.aup-error,aup-icon.aup-warning,aup-icon.aup-info{--aup-icon-size: 16px;vertical-align:text-bottom}span.aup-validation-icon{display:inline-block;overflow:hidden;vertical-align:text-bottom;animation:aup-validation-icon-in .15s ease-out}span.aup-validation-icon aup-icon{margin-left:4px}@media (prefers-reduced-motion: reduce){span.aup-validation-icon{animation:none}}\n"] }]
|
|
2743
2743
|
}], ctorParameters: function () { return []; }, propDecorators: { color: [{
|
|
2744
2744
|
type: Input
|
|
2745
2745
|
}], labelPosition: [{
|
|
@@ -3351,6 +3351,177 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3351
3351
|
type: Input
|
|
3352
3352
|
}] } });
|
|
3353
3353
|
|
|
3354
|
+
/**
|
|
3355
|
+
* One column of an `aup-sub-form-list` — the same `columnId` + {@link ColumnTextProperties} idiom a
|
|
3356
|
+
* table column carries, minus everything a table column carries *because* it renders its own cell.
|
|
3357
|
+
*
|
|
3358
|
+
* A sub-form-list cell is whatever element the row template put in this position, so this declares
|
|
3359
|
+
* only what the list itself can know: the column's identity, the grid track it occupies, and the
|
|
3360
|
+
* text that titles it. There is no cell renderer, no visibility chain and no text-search formatter,
|
|
3361
|
+
* because none of them have anything to act on here.
|
|
3362
|
+
*
|
|
3363
|
+
* Built by {@link SubFormListColumns#addColumn} rather than directly.
|
|
3364
|
+
*/
|
|
3365
|
+
class SubFormListColumn {
|
|
3366
|
+
columnId;
|
|
3367
|
+
textPropertiesProvider;
|
|
3368
|
+
_columnTextProperties;
|
|
3369
|
+
_track = "auto";
|
|
3370
|
+
constructor(columnId, textPropertiesProvider) {
|
|
3371
|
+
this.columnId = columnId;
|
|
3372
|
+
this.textPropertiesProvider = textPropertiesProvider;
|
|
3373
|
+
}
|
|
3374
|
+
/**
|
|
3375
|
+
* Titles this column on its own, winning over the bulk map passed to
|
|
3376
|
+
* {@link SubFormListColumns#columnTextProperties} — the same precedence `ColumnModel` gives it.
|
|
3377
|
+
*/
|
|
3378
|
+
columnTextProperties(columnTextProperties) {
|
|
3379
|
+
this._columnTextProperties = columnTextProperties;
|
|
3380
|
+
return this;
|
|
3381
|
+
}
|
|
3382
|
+
/** Memoised as `ColumnModel`'s is, so the bulk map is looked up once rather than per pass. */
|
|
3383
|
+
getColumnTextProperties() {
|
|
3384
|
+
return this._columnTextProperties ?? this.textPropertiesProvider();
|
|
3385
|
+
}
|
|
3386
|
+
/**
|
|
3387
|
+
* Deliberately *not* memoised, unlike `ColumnModel#getHeaderText`: a table renders its header once
|
|
3388
|
+
* into a portal, whereas this is a template expression re-evaluated every pass, so caching the
|
|
3389
|
+
* string would pin the locale for the life of the list.
|
|
3390
|
+
*
|
|
3391
|
+
* Also guards `headerText` itself. It is optional on {@link ColumnTextProperties}, and
|
|
3392
|
+
* `ColumnModel#getHeaderText` throws on a properties object that omits it.
|
|
3393
|
+
*/
|
|
3394
|
+
getHeaderText() {
|
|
3395
|
+
return this.getColumnTextProperties()?.headerText?.() ?? this.getDefaultHeaderText();
|
|
3396
|
+
}
|
|
3397
|
+
/**
|
|
3398
|
+
* Empty, where `ColumnModel`'s is the column id.
|
|
3399
|
+
*
|
|
3400
|
+
* A table always draws a header band, so falling back to the id there is a harmless "you forgot
|
|
3401
|
+
* the yml" tell. This band is optional, and an id fallback would conjure a header reading
|
|
3402
|
+
* `priority color description` out of a `[columns]` binding the consumer supplied only to size
|
|
3403
|
+
* the tracks. {@link SubFormListColumns#hasDeclaredHeader} decides whether a band is drawn at
|
|
3404
|
+
* all, so an untitled column inside a titled list still renders its (empty) cell.
|
|
3405
|
+
*/
|
|
3406
|
+
getDefaultHeaderText() {
|
|
3407
|
+
return "";
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* Gives this column the leftover width — a `1fr` track. Named for `ColumnModel#flex`, and means
|
|
3411
|
+
* the same thing.
|
|
3412
|
+
*/
|
|
3413
|
+
flex(flex = true) {
|
|
3414
|
+
this._track = flex ? "1fr" : "auto";
|
|
3415
|
+
return this;
|
|
3416
|
+
}
|
|
3417
|
+
/**
|
|
3418
|
+
* Any `grid-template-columns` track value — `var(--indicator-width)`, `minmax(0, 20ch)`, `120px`.
|
|
3419
|
+
*
|
|
3420
|
+
* Not part of {@link ColumnTextProperties} deliberately: a track width is not translatable, so it
|
|
3421
|
+
* has no business in a locale bundle. It is declared here, beside the title it belongs to, which
|
|
3422
|
+
* is the point — a column cannot gain a header without gaining a track.
|
|
3423
|
+
*/
|
|
3424
|
+
width(track) {
|
|
3425
|
+
this._track = track;
|
|
3426
|
+
return this;
|
|
3427
|
+
}
|
|
3428
|
+
getTrack() {
|
|
3429
|
+
return this._track;
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
__decorate([
|
|
3433
|
+
Memoize(),
|
|
3434
|
+
__metadata("design:type", Function),
|
|
3435
|
+
__metadata("design:paramtypes", []),
|
|
3436
|
+
__metadata("design:returntype", Object)
|
|
3437
|
+
], SubFormListColumn.prototype, "getColumnTextProperties", null);
|
|
3438
|
+
|
|
3439
|
+
/**
|
|
3440
|
+
* The columns of an `aup-sub-form-list` under `rowLayout="subgrid"`: their order, their grid tracks,
|
|
3441
|
+
* and — through {@link columnTextProperties} — their titles.
|
|
3442
|
+
*
|
|
3443
|
+
* It exists because a subgrid column was otherwise declared in three places that nothing tied
|
|
3444
|
+
* together: a cell in the `aupSubFormListHeader` template, a track in the consumer's
|
|
3445
|
+
* `--aup-sub-form-list-columns`, and a cell position in the row template. Cells are auto-placed in
|
|
3446
|
+
* source order, so the three drift silently — adding a cell without a track walks every later cell
|
|
3447
|
+
* one column left, and nothing complains.
|
|
3448
|
+
*
|
|
3449
|
+
* The builder is the one `TableModel` takes, and the last line of it is the same line, against a
|
|
3450
|
+
* `columns(ColumnTextProperties[])` i18n block of the same shape:
|
|
3451
|
+
*
|
|
3452
|
+
* @example
|
|
3453
|
+
* ```ts
|
|
3454
|
+
* readonly levelColumns = new SubFormListColumns(c => {
|
|
3455
|
+
* c.addColumn('priority');
|
|
3456
|
+
* c.addColumn('color').width('var(--indicator-width)');
|
|
3457
|
+
* c.addColumn('description').flex();
|
|
3458
|
+
* c.addColumn('edit'); // untitled: a heading over a button names a
|
|
3459
|
+
* // control, not a column
|
|
3460
|
+
* c.columnTextProperties(this.i18n.columns); // titles every column, from one yml block
|
|
3461
|
+
* });
|
|
3462
|
+
* ```
|
|
3463
|
+
*
|
|
3464
|
+
* Not a `GarbageCollector`, unlike `AbstractTableModel`: this holds no pectin models and subscribes
|
|
3465
|
+
* to nothing, so it carries no disposal obligation. It also does not own the rows — a
|
|
3466
|
+
* sub-form-list's data is the `SubFormList` bound to `[list]`.
|
|
3467
|
+
*/
|
|
3468
|
+
class SubFormListColumns {
|
|
3469
|
+
_columns = [];
|
|
3470
|
+
bulkTextProperties = {};
|
|
3471
|
+
constructor(builder) {
|
|
3472
|
+
builder?.(this);
|
|
3473
|
+
}
|
|
3474
|
+
/**
|
|
3475
|
+
* Declares a column. Declaration order is column order, matching the order the row template's
|
|
3476
|
+
* top-level cells are written in.
|
|
3477
|
+
*
|
|
3478
|
+
* The analogue of `AbstractTableModel#addTemplateColumn`: the cell is the caller's, so this names
|
|
3479
|
+
* the column it lands in and nothing more.
|
|
3480
|
+
*/
|
|
3481
|
+
addColumn(columnId) {
|
|
3482
|
+
const column = new SubFormListColumn(columnId, () => this.bulkTextProperties[columnId]);
|
|
3483
|
+
this._columns.push(column);
|
|
3484
|
+
return column;
|
|
3485
|
+
}
|
|
3486
|
+
/**
|
|
3487
|
+
* Titles every declared column from one map keyed by column id — identical in shape and effect to
|
|
3488
|
+
* `AbstractTableModel#columnTextProperties`, so a generated `columns(ColumnTextProperties[])`
|
|
3489
|
+
* block passes straight through.
|
|
3490
|
+
*
|
|
3491
|
+
* A column with no entry stays untitled; a per-column {@link SubFormListColumn#columnTextProperties}
|
|
3492
|
+
* wins over this.
|
|
3493
|
+
*/
|
|
3494
|
+
columnTextProperties(columnTextProperties) {
|
|
3495
|
+
this.bulkTextProperties = columnTextProperties ?? {};
|
|
3496
|
+
return this;
|
|
3497
|
+
}
|
|
3498
|
+
getColumnTextProperties(columnId) {
|
|
3499
|
+
return this.bulkTextProperties[columnId];
|
|
3500
|
+
}
|
|
3501
|
+
get columns() {
|
|
3502
|
+
return this._columns;
|
|
3503
|
+
}
|
|
3504
|
+
/**
|
|
3505
|
+
* The content track list for `--aup-sub-form-list-columns`, in declaration order. Undefined while
|
|
3506
|
+
* no column is declared, so the component knows to leave the variable alone entirely.
|
|
3507
|
+
*/
|
|
3508
|
+
get tracks() {
|
|
3509
|
+
return this._columns.length
|
|
3510
|
+
? this._columns.map(column => column.getTrack()).join(" ")
|
|
3511
|
+
: undefined;
|
|
3512
|
+
}
|
|
3513
|
+
/**
|
|
3514
|
+
* Whether any column resolved text properties — what decides if a header band is drawn at all.
|
|
3515
|
+
*
|
|
3516
|
+
* Keyed on the properties resolving rather than on the text being non-empty, so a table's
|
|
3517
|
+
* `headerText: ''` blank-column convention still counts as "this list has a header", while a
|
|
3518
|
+
* declaration made purely to size the tracks draws nothing.
|
|
3519
|
+
*/
|
|
3520
|
+
get hasDeclaredHeader() {
|
|
3521
|
+
return this._columns.some(column => !!column.getColumnTextProperties());
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3354
3525
|
/* eslint-disable @typescript-eslint/no-explicit-any -- the row type is the caller's ItemSubForm, which these directives cannot name */
|
|
3355
3526
|
/**
|
|
3356
3527
|
* Marks the template rendered as the body of each sub-form row.
|
|
@@ -3577,6 +3748,37 @@ class SubFormListComponent extends DisposableComponent {
|
|
|
3577
3748
|
* context memoisation exists to keep stable.
|
|
3578
3749
|
*/
|
|
3579
3750
|
rowLayout = SubFormListComponent.RowLayout.INLINE;
|
|
3751
|
+
/**
|
|
3752
|
+
* Declares the list's columns — their order, their grid tracks, and their titles — as an
|
|
3753
|
+
* alternative to naming them in an `aupSubFormListHeader` template and sizing them in a
|
|
3754
|
+
* stylesheet. See {@link SubFormListColumns} for why the two-places-plus-an-implicit-third
|
|
3755
|
+
* arrangement is worth replacing.
|
|
3756
|
+
*
|
|
3757
|
+
* `rowLayout="subgrid"` only, for the same reason the header template is: every other layout lays
|
|
3758
|
+
* a row out within itself, so there are no shared columns to declare.
|
|
3759
|
+
*
|
|
3760
|
+
* Opt-in, and the older template slot outranks it: supplying both leaves the rendered header
|
|
3761
|
+
* exactly as it was and warns, so adding this input to a list that already has a header template
|
|
3762
|
+
* can never silently rewrite it. The declared *tracks* still apply in that case — declaring
|
|
3763
|
+
* columns purely to size them is a legitimate reason to bind both.
|
|
3764
|
+
*
|
|
3765
|
+
* Bind a stable object, built once in the consumer's constructor or as a field initialiser.
|
|
3766
|
+
*/
|
|
3767
|
+
columns;
|
|
3768
|
+
/**
|
|
3769
|
+
* Whether the list wears the library's table chrome: a bordered, rounded box around the rows with
|
|
3770
|
+
* each row ruled off from the next rather than floated apart, and — under `subgrid`, the only
|
|
3771
|
+
* layout with a header — a shaded band over the column titles.
|
|
3772
|
+
*
|
|
3773
|
+
* {@link Appearance.PLAIN} is the default and leaves the list exactly as it has always looked.
|
|
3774
|
+
*
|
|
3775
|
+
* It exists because the alternative was every consumer reaching through `::ng-deep` for `.rows`,
|
|
3776
|
+
* `.row + .row` and `.header-row` — and losing a specificity fight with the library's own
|
|
3777
|
+
* `.rows.layout-subgrid` row-gap on the way. Retune it with the `--aup-sub-form-list-border`,
|
|
3778
|
+
* `-radius`, `-cell-padding`, `-header-background` and `-header-color` variables rather than by
|
|
3779
|
+
* overriding the rules.
|
|
3780
|
+
*/
|
|
3781
|
+
appearance = SubFormListComponent.Appearance.PLAIN;
|
|
3580
3782
|
rowTemplate;
|
|
3581
3783
|
actionsTemplate;
|
|
3582
3784
|
emptyTemplate;
|
|
@@ -3584,9 +3786,14 @@ class SubFormListComponent extends DisposableComponent {
|
|
|
3584
3786
|
headerTemplate;
|
|
3585
3787
|
/** One row per template, in template order — see the directive for why it repeats. */
|
|
3586
3788
|
footerTemplates;
|
|
3789
|
+
/** The rows' content wrappers, whose element children are the caller's cells — see {@link verifyRowCellCount}. */
|
|
3790
|
+
rowContents;
|
|
3791
|
+
elementRef = this.inject(ElementRef);
|
|
3587
3792
|
/** The array `rows` was last built from — see the comment there. */
|
|
3588
3793
|
renderedSource;
|
|
3589
3794
|
renderedRows = [];
|
|
3795
|
+
/** The shape {@link verifyRowCellCount} last ran against, so it costs one compare per pass. */
|
|
3796
|
+
cellCountCheckedFor;
|
|
3590
3797
|
constructor() {
|
|
3591
3798
|
super();
|
|
3592
3799
|
this.onInit(() => {
|
|
@@ -3693,9 +3900,17 @@ class SubFormListComponent extends DisposableComponent {
|
|
|
3693
3900
|
/**
|
|
3694
3901
|
* Only under `subgrid`. Every other layout lays a row out within itself, so there are no shared
|
|
3695
3902
|
* tracks for a header to sit above and its cells would line up with nothing.
|
|
3903
|
+
*
|
|
3904
|
+
* Either source will draw the band: an `aupSubFormListHeader` template, or a {@link columns}
|
|
3905
|
+
* declaration in which at least one column resolved text properties. A declaration made only to
|
|
3906
|
+
* size the tracks draws nothing — see {@link SubFormListColumns#hasDeclaredHeader}.
|
|
3696
3907
|
*/
|
|
3697
3908
|
get headerVisible() {
|
|
3698
|
-
return this.subgridLayout && !!this.headerTemplate;
|
|
3909
|
+
return this.subgridLayout && (!!this.headerTemplate || !!this.columns?.hasDeclaredHeader);
|
|
3910
|
+
}
|
|
3911
|
+
/** The declared columns, or empty when none were bound. Empty is the "nothing changes" path. */
|
|
3912
|
+
get headerColumns() {
|
|
3913
|
+
return this.columns?.columns ?? [];
|
|
3699
3914
|
}
|
|
3700
3915
|
/** Whether anything trails the content — drives the content cell's trailing spacing. */
|
|
3701
3916
|
get hasActions() {
|
|
@@ -3709,10 +3924,61 @@ class SubFormListComponent extends DisposableComponent {
|
|
|
3709
3924
|
this.warnAboutIgnoredCustomLayoutInputs();
|
|
3710
3925
|
this.warnAboutIgnoredSubgridInputs();
|
|
3711
3926
|
this.warnAboutIgnoredHeader();
|
|
3927
|
+
this.warnAboutIgnoredColumns();
|
|
3928
|
+
this.applyColumnTracks();
|
|
3929
|
+
}
|
|
3930
|
+
ngAfterViewChecked() {
|
|
3931
|
+
this.verifyRowCellCount();
|
|
3712
3932
|
}
|
|
3713
3933
|
trackByRow(index, context) {
|
|
3714
3934
|
return context.row;
|
|
3715
3935
|
}
|
|
3936
|
+
/**
|
|
3937
|
+
* Writes the declared tracks to the *private* half of the pair the stylesheet reads, so a
|
|
3938
|
+
* consumer's own `--aup-sub-form-list-columns` still wins — the escape hatch survives, and a
|
|
3939
|
+
* stylesheet that has not been migrated keeps working. Same two-tier idiom the row already uses
|
|
3940
|
+
* for `--aup-sub-form-row-areas`.
|
|
3941
|
+
*
|
|
3942
|
+
* Set imperatively rather than through a host binding: it is a bind-once value, and one
|
|
3943
|
+
* `setProperty` on init is cheaper and more predictable than a getter evaluated every pass.
|
|
3944
|
+
*/
|
|
3945
|
+
applyColumnTracks() {
|
|
3946
|
+
const tracks = this.subgridLayout ? this.columns?.tracks : undefined;
|
|
3947
|
+
if (tracks) {
|
|
3948
|
+
this.elementRef.nativeElement.style.setProperty('--resolved-sub-form-list-columns', tracks);
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
/**
|
|
3952
|
+
* Warns when the row template's cell count disagrees with the declared column count.
|
|
3953
|
+
*
|
|
3954
|
+
* The subgrid layout already requires one top-level element per track — cells are auto-placed, so
|
|
3955
|
+
* a missing one silently walks every later cell a column left. This asserts that invariant rather
|
|
3956
|
+
* than adding one; declaring the columns is simply the first time the component knows what the
|
|
3957
|
+
* count should be.
|
|
3958
|
+
*
|
|
3959
|
+
* Two things it cannot see, both pre-existing hazards of auto-placement rather than new ones: a
|
|
3960
|
+
* *reordering* (the count still matches), and a top-level cell behind an `*ngIf` (absent when the
|
|
3961
|
+
* condition is false, which reads here as a miscount). Hence a warning rather than an assert.
|
|
3962
|
+
*/
|
|
3963
|
+
verifyRowCellCount() {
|
|
3964
|
+
if (!this.columns || !this.subgridLayout) {
|
|
3965
|
+
return;
|
|
3966
|
+
}
|
|
3967
|
+
const declared = this.headerColumns.length;
|
|
3968
|
+
if (!declared || this.renderedSource === this.cellCountCheckedFor) {
|
|
3969
|
+
return;
|
|
3970
|
+
}
|
|
3971
|
+
const first = this.rowContents?.first?.nativeElement;
|
|
3972
|
+
if (!first) {
|
|
3973
|
+
return;
|
|
3974
|
+
}
|
|
3975
|
+
this.cellCountCheckedFor = this.renderedSource;
|
|
3976
|
+
const rendered = first.children.length;
|
|
3977
|
+
if (rendered !== declared) {
|
|
3978
|
+
const ids = this.headerColumns.map(column => column.columnId).join(', ');
|
|
3979
|
+
console.warn(`aup-sub-form-list: [columns] declares ${declared} columns (${ids}) but the aupSubFormRow template rendered ${rendered} top-level cells. Cells are auto-placed one per track in source order, so a mismatch shifts every later cell into the wrong column. If a cell is conditional at the top level this warning is expected — the row is genuinely misaligned while it is absent.`);
|
|
3980
|
+
}
|
|
3981
|
+
}
|
|
3716
3982
|
/**
|
|
3717
3983
|
* CDK reports `currentIndex` after the dragged row has been taken out of the list, which is the
|
|
3718
3984
|
* same convention {@link SubFormList#move} splices with — so the index passes straight through,
|
|
@@ -3762,6 +4028,24 @@ class SubFormListComponent extends DisposableComponent {
|
|
|
3762
4028
|
console.warn(`aup-sub-form-list: the aupSubFormListHeader template was ignored — a header names the list's columns, and only rowLayout="subgrid" gives the rows shared columns to name.`);
|
|
3763
4029
|
}
|
|
3764
4030
|
}
|
|
4031
|
+
/**
|
|
4032
|
+
* The template slot wins over `[columns]` deliberately: it is the older contract, so a list that
|
|
4033
|
+
* has both is a migration half-done, and leaving the rendered header untouched is the debuggable
|
|
4034
|
+
* outcome. Only the *titles* are dropped — the declared tracks still apply, since sizing the
|
|
4035
|
+
* columns while a template names them is a legitimate pairing.
|
|
4036
|
+
*/
|
|
4037
|
+
warnAboutIgnoredColumns() {
|
|
4038
|
+
if (!this.headerColumns.length) {
|
|
4039
|
+
return;
|
|
4040
|
+
}
|
|
4041
|
+
if (!this.subgridLayout) {
|
|
4042
|
+
console.warn(`aup-sub-form-list: [columns] was ignored — columns are the list's, and only rowLayout="subgrid" gives the rows shared tracks to declare.`);
|
|
4043
|
+
return;
|
|
4044
|
+
}
|
|
4045
|
+
if (this.headerTemplate) {
|
|
4046
|
+
console.warn(`aup-sub-form-list: the header text on [columns] was ignored — an aupSubFormListHeader template is also supplied, and it replaces the whole header row. Delete the template to move the header to [columns], or drop [columns] to keep it.`);
|
|
4047
|
+
}
|
|
4048
|
+
}
|
|
3765
4049
|
warnAboutUnsupportedReordering() {
|
|
3766
4050
|
const asked = this.reorder;
|
|
3767
4051
|
if (asked !== SubFormListComponent.Reorder.AUTO
|
|
@@ -3771,7 +4055,7 @@ class SubFormListComponent extends DisposableComponent {
|
|
|
3771
4055
|
}
|
|
3772
4056
|
}
|
|
3773
4057
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SubFormListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3774
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SubFormListComponent, selector: "aup-sub-form-list", inputs: { list: "list", reorder: "reorder", removable$: "removable$", removable: "removable", removeFace: "removeFace", moveUpFace: "moveUpFace", moveDownFace: "moveDownFace", dragHandleIcon: "dragHandleIcon", addCommand: "addCommand", emptyText: "emptyText", dense: "dense", fill: "fill", rowLayout: "rowLayout" }, host: { properties: { "class.dense": "this.dense", "class.fill": "this.fill", "class.buttons-on-demand": "this.buttonsOnDemand", "attr.data-row-layout": "this.rowLayoutAttribute" } }, queries: [{ propertyName: "rowTemplate", first: true, predicate: SubFormRowDirective, descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: SubFormRowActionsDirective, descendants: true }, { propertyName: "emptyTemplate", first: true, predicate: SubFormListEmptyDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: SubFormListHeaderDirective, descendants: true }, { propertyName: "footerTemplates", predicate: SubFormListFooterDirective }], usesInheritance: true, ngImport: i0, template: "<!-- The rows container carries a layout class only for `subgrid`, the one layout that is not laid\n out entirely within a row: this element is the grid whose tracks the rows subgrid. It is safe\n to anchor rules here \u2014 unlike .row, this element is never cloned. -->\n<div class=\"rows\"\n role=\"list\"\n [class.layout-subgrid]=\"subgridLayout\"\n cdkDropList\n [cdkDropListDisabled]=\"!dragEnabled\"\n (cdkDropListDropped)=\"onDropped($event)\"\n data-cy=\"sub-form-rows\">\n\n <!-- Inside .rows and ahead of them, because only a child of the grid can adopt its tracks \u2014 the\n same reason the footer rows sit inside it. A caller aligning column titles from outside would\n have to restate `--aup-sub-form-list-columns`, which drifts the moment a row's cells change.\n\n Hidden from assistive tech and given no listitem role: it names the columns rather than\n standing for an item, and a screen reader reaching the rows through the list should not have\n to step over it. Offered under `subgrid` alone \u2014 it is the only layout with columns to name. -->\n <div class=\"header-row layout-subgrid\"\n *ngIf=\"headerVisible\"\n aria-hidden=\"true\"\n data-cy=\"sub-form-header-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate.templateRef\"></ng-container>\n </div>\n </div>\n\n <!-- The layout classes go on .row, not the host: CDK's drag preview is a deep clone of .row\n appended to <body>, and a rule anchored on the host cannot reach it. Written as discrete\n [class.x] bindings rather than one [ngClass] object literal, which would allocate a fresh\n object on every change-detection pass. -->\n <div class=\"row\"\n role=\"listitem\"\n *ngFor=\"let context of rows; trackBy: trackByRow\"\n [class.layout-inline]=\"inlineLayout\"\n [class.layout-rail]=\"railLayout\"\n [class.layout-custom]=\"customLayout\"\n [class.layout-subgrid]=\"subgridLayout\"\n [class.fill]=\"fill\"\n [class.buttons-on-demand]=\"buttonsOnDemand\"\n [class.has-actions]=\"hasActions\"\n cdkDrag\n [cdkDragDisabled]=\"!dragEnabled\"\n data-cy=\"sub-form-row\">\n\n <!-- Deliberately not focusable and hidden from assistive tech: CDK drag is pointer-only, so a\n focusable handle would take a tab stop and then do nothing. The move buttons are the\n keyboard path, which is why they survive even in reorder=\"drag\" \u2014 and why rowLayout=\"custom\",\n which renders none of them, makes that path the caller's to provide.\n\n It stays library-rendered in every layout because it has to: CdkDragHandle finds its drag\n through the node injector and CdkDrag collects handles with a content query, both scoped to\n the template cdkDrag is written in. A cdkDragHandle in a caller's row template resolves no\n parent and, because that injection is optional, silently does nothing. -->\n <span class=\"drag-handle\" *ngIf=\"dragEnabled\" cdkDragHandle aria-hidden=\"true\"\n data-cy=\"sub-form-drag-handle\">\n <aup-icon [icon]=\"dragHandleIcon\"></aup-icon>\n </span>\n\n <!-- Given `display: contents` under rowLayout=\"custom\", so the projected template's own\n top-level elements become the row's grid items. Never *ngIf'd away for that: recreating it\n would tear down and rebuild the caller's row bindings, which is exactly what the row\n context memoisation exists to prevent. -->\n <div class=\"content\">\n <ng-container *ngIf=\"rowTemplate\"\n [ngTemplateOutlet]=\"rowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n\n <!-- The default cluster is three flat grid items, one per named cell, so a layout can place\n them independently \u2014 the rail stacks the moves away from remove. -->\n <ng-container *ngIf=\"defaultActionsVisible\">\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-up\"\n [command]=\"context.row.moveUpCommand\"\n [face]=\"moveUpFace\" data-cy=\"sub-form-move-up\"></aup-command>\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-down\"\n [command]=\"context.row.moveDownCommand\"\n [face]=\"moveDownFace\" data-cy=\"sub-form-move-down\"></aup-command>\n <aup-command *ngIf=\"removable\" class=\"remove\" [command]=\"context.row.removeItemCommand\"\n [face]=\"removeFace\" data-cy=\"sub-form-remove\"></aup-command>\n </ng-container>\n\n <!-- The replacing cluster keeps its wrapper: it is one grid item in the `actions` cell, and an\n ng-container outlet generates no element to place. -->\n <div class=\"actions\" *ngIf=\"customActionsVisible\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n </div>\n\n <!-- Inside .rows deliberately: that element is the grid under `subgrid`, so only a child of it can\n adopt the tracks and line the footer's cells up with the rows'. Placed after the rows and given\n no listitem role \u2014 it is a trailing statement about the list, not another item in it. -->\n <div class=\"footer-row\"\n *ngFor=\"let footer of footerTemplates\"\n [class.layout-subgrid]=\"subgridLayout\"\n data-cy=\"sub-form-footer-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"empty\">\n <ng-container *ngIf=\"emptyTemplate; else defaultEmpty\"\n [ngTemplateOutlet]=\"emptyTemplate.templateRef\"></ng-container>\n <ng-template #defaultEmpty>\n <aup-empty-state *ngIf=\"emptyText\" data-cy=\"sub-form-list-empty\">{{emptyText}}</aup-empty-state>\n </ng-template>\n</ng-container>\n\n<ul class=\"list-errors\" *ngIf=\"listErrors.length\" data-cy=\"sub-form-list-errors\">\n <li *ngFor=\"let error of listErrors\">{{error}}</li>\n</ul>\n\n<div class=\"footer\" *ngIf=\"hasAddCommand\">\n <aup-command [command]=\"addCommand\" data-cy=\"sub-form-list-add\"></aup-command>\n</div>\n", styles: [":host{display:block}.rows{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row{display:grid;grid-template-areas:var(--aup-sub-form-row-areas, var(--resolved-sub-form-row-areas, \"handle content up down actions\"));grid-template-columns:var(--aup-sub-form-row-columns, var(--resolved-sub-form-row-columns, auto auto auto auto auto));grid-template-rows:var(--aup-sub-form-row-rows, var(--resolved-sub-form-row-rows, auto));justify-content:start;align-items:center;gap:0;background:var(--aup-sub-form-row-background, transparent)}.drag-handle{grid-area:handle}.content{grid-area:content}.move-up{grid-area:up}.move-down{grid-area:down}.remove,.actions{grid-area:actions}.drag-handle,.row.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.drag-handle{display:flex;align-items:center;cursor:grab;color:#00000061}.drag-handle:active{cursor:grabbing}.content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px);min-width:0}.move-up,.move-down,.remove{white-space:nowrap}.actions{display:flex;align-items:center;gap:0;white-space:nowrap}.row.layout-rail{--resolved-sub-form-row-areas: \"up content actions\" \"handle content actions\" \"down content actions\";--resolved-sub-form-row-columns: auto auto auto;--resolved-sub-form-row-rows: auto auto auto}.row.layout-rail .move-up{align-self:start}.row.layout-rail .move-down{align-self:end}.row.layout-rail .drag-handle,.row.layout-rail .move-up,.row.layout-rail .move-down{justify-self:center}.row.layout-rail .move-up,.row.layout-rail .move-down{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-custom{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: none;--resolved-sub-form-row-rows: none}.row.layout-custom .content{display:contents}.rows.layout-subgrid{display:grid;grid-template-columns:[handle-start] auto [handle-end content-start] var(--aup-sub-form-list-columns, 1fr) [content-end up-start] auto [up-end down-start] auto [down-end actions-start] auto [actions-end];row-gap:var(--aup-sub-form-row-gap, 8px);column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px));justify-content:start}.row.layout-subgrid{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: subgrid;--resolved-sub-form-row-rows: none;grid-column:1/-1}.row.layout-subgrid .drag-handle{grid-column:handle-start/handle-end;margin-inline-end:0}.row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}.row.layout-subgrid.has-actions .content{margin-inline-end:0}.row.layout-subgrid .move-up{grid-column:up-start/up-end}.row.layout-subgrid .move-down{grid-column:down-start/down-end}.row.layout-subgrid .remove,.row.layout-subgrid .actions{grid-column:actions-start/actions-end}.header-row.layout-subgrid,.footer-row.layout-subgrid{display:grid;grid-template-columns:subgrid;grid-column:1/-1;gap:0}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}@supports not (grid-template-columns: subgrid){.rows.layout-subgrid{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid{--resolved-sub-form-row-areas: \"handle content up down actions\";--resolved-sub-form-row-columns: auto auto auto auto auto}.row.layout-subgrid .drag-handle{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:center;gap:var(--aup-sub-form-row-gap, 8px)}}.row.layout-inline.fill{--resolved-sub-form-row-columns: auto 1fr auto auto auto}.row.layout-rail.fill{--resolved-sub-form-row-columns: auto 1fr auto}.row.buttons-on-demand .move-command{opacity:0;transition:opacity .15s ease-in-out}.row.buttons-on-demand:hover .move-command,.row.buttons-on-demand:focus-within .move-command{opacity:1}.list-errors{margin:var(--aup-sub-form-row-gap, 8px) 0 0;padding-left:1.2em;color:var(--aup-error-color, #f44336);font-size:12px}.footer{display:flex;margin-top:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview{box-sizing:border-box;border-radius:4px;background:var(--aup-sub-form-row-background, #fff);box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.row.cdk-drag-preview.layout-subgrid{grid-template-columns:none;grid-auto-flow:column;justify-content:start;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview.layout-subgrid .drag-handle,.row.cdk-drag-preview.layout-subgrid .content,.row.cdk-drag-preview.layout-subgrid .move-up,.row.cdk-drag-preview.layout-subgrid .move-down,.row.cdk-drag-preview.layout-subgrid .remove,.row.cdk-drag-preview.layout-subgrid .actions{grid-area:auto}.row.cdk-drag-preview.layout-subgrid .content{grid-template-columns:none;grid-auto-flow:column;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.rows.cdk-drop-list-dragging .row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }, { kind: "component", type: EmptyStateComponent, selector: "aup-empty-state" }] });
|
|
4058
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.9", type: SubFormListComponent, selector: "aup-sub-form-list", inputs: { list: "list", reorder: "reorder", removable$: "removable$", removable: "removable", removeFace: "removeFace", moveUpFace: "moveUpFace", moveDownFace: "moveDownFace", dragHandleIcon: "dragHandleIcon", addCommand: "addCommand", emptyText: "emptyText", dense: "dense", fill: "fill", rowLayout: "rowLayout", columns: "columns", appearance: "appearance" }, host: { properties: { "class.dense": "this.dense", "class.fill": "this.fill", "attr.data-appearance": "this.appearance", "class.buttons-on-demand": "this.buttonsOnDemand", "attr.data-row-layout": "this.rowLayoutAttribute" } }, queries: [{ propertyName: "rowTemplate", first: true, predicate: SubFormRowDirective, descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: SubFormRowActionsDirective, descendants: true }, { propertyName: "emptyTemplate", first: true, predicate: SubFormListEmptyDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: SubFormListHeaderDirective, descendants: true }, { propertyName: "footerTemplates", predicate: SubFormListFooterDirective }], viewQueries: [{ propertyName: "rowContents", predicate: ["rowContent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- The rows container carries a layout class only for `subgrid`, the one layout that is not laid\n out entirely within a row: this element is the grid whose tracks the rows subgrid. It is safe\n to anchor rules here \u2014 unlike .row, this element is never cloned. -->\n<div class=\"rows\"\n role=\"list\"\n [class.layout-subgrid]=\"subgridLayout\"\n cdkDropList\n [cdkDropListDisabled]=\"!dragEnabled\"\n (cdkDropListDropped)=\"onDropped($event)\"\n data-cy=\"sub-form-rows\">\n\n <!-- Inside .rows and ahead of them, because only a child of the grid can adopt its tracks \u2014 the\n same reason the footer rows sit inside it. A caller aligning column titles from outside would\n have to restate `--aup-sub-form-list-columns`, which drifts the moment a row's cells change.\n\n Hidden from assistive tech and given no listitem role: it names the columns rather than\n standing for an item, and a screen reader reaching the rows through the list should not have\n to step over it. Offered under `subgrid` alone \u2014 it is the only layout with columns to name. -->\n <div class=\"header-row layout-subgrid\"\n *ngIf=\"headerVisible\"\n aria-hidden=\"true\"\n data-cy=\"sub-form-header-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container *ngIf=\"headerTemplate; else declaredHeader\"\n [ngTemplateOutlet]=\"headerTemplate.templateRef\"></ng-container>\n <!-- Plain spans carrying no library styling: a declared header has to render identically to a\n template one, or moving from one to the other silently restyles a consumer's band. The\n ngIf/ngFor anchors are comment nodes, so these stay the direct element children of\n .content and auto-place one per track exactly as a template's cells do.\n\n A column with no title still renders its cell \u2014 its track exists either way, and skipping\n it would shift every column after it one track left. -->\n <ng-template #declaredHeader>\n <span *ngFor=\"let column of headerColumns\"\n [attr.data-column-id]=\"column.columnId\"\n data-cy=\"sub-form-header-cell\">{{ column.getHeaderText() }}</span>\n </ng-template>\n </div>\n </div>\n\n <!-- The layout classes go on .row, not the host: CDK's drag preview is a deep clone of .row\n appended to <body>, and a rule anchored on the host cannot reach it. Written as discrete\n [class.x] bindings rather than one [ngClass] object literal, which would allocate a fresh\n object on every change-detection pass. -->\n <div class=\"row\"\n role=\"listitem\"\n *ngFor=\"let context of rows; trackBy: trackByRow\"\n [class.layout-inline]=\"inlineLayout\"\n [class.layout-rail]=\"railLayout\"\n [class.layout-custom]=\"customLayout\"\n [class.layout-subgrid]=\"subgridLayout\"\n [class.fill]=\"fill\"\n [class.buttons-on-demand]=\"buttonsOnDemand\"\n [class.has-actions]=\"hasActions\"\n cdkDrag\n [cdkDragDisabled]=\"!dragEnabled\"\n data-cy=\"sub-form-row\">\n\n <!-- Deliberately not focusable and hidden from assistive tech: CDK drag is pointer-only, so a\n focusable handle would take a tab stop and then do nothing. The move buttons are the\n keyboard path, which is why they survive even in reorder=\"drag\" \u2014 and why rowLayout=\"custom\",\n which renders none of them, makes that path the caller's to provide.\n\n It stays library-rendered in every layout because it has to: CdkDragHandle finds its drag\n through the node injector and CdkDrag collects handles with a content query, both scoped to\n the template cdkDrag is written in. A cdkDragHandle in a caller's row template resolves no\n parent and, because that injection is optional, silently does nothing. -->\n <span class=\"drag-handle\" *ngIf=\"dragEnabled\" cdkDragHandle aria-hidden=\"true\"\n data-cy=\"sub-form-drag-handle\">\n <aup-icon [icon]=\"dragHandleIcon\"></aup-icon>\n </span>\n\n <!-- Given `display: contents` under rowLayout=\"custom\", so the projected template's own\n top-level elements become the row's grid items. Never *ngIf'd away for that: recreating it\n would tear down and rebuild the caller's row bindings, which is exactly what the row\n context memoisation exists to prevent. -->\n <div class=\"content\" #rowContent>\n <ng-container *ngIf=\"rowTemplate\"\n [ngTemplateOutlet]=\"rowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n\n <!-- The default cluster is three flat grid items, one per named cell, so a layout can place\n them independently \u2014 the rail stacks the moves away from remove. -->\n <ng-container *ngIf=\"defaultActionsVisible\">\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-up\"\n [command]=\"context.row.moveUpCommand\"\n [face]=\"moveUpFace\" data-cy=\"sub-form-move-up\"></aup-command>\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-down\"\n [command]=\"context.row.moveDownCommand\"\n [face]=\"moveDownFace\" data-cy=\"sub-form-move-down\"></aup-command>\n <aup-command *ngIf=\"removable\" class=\"remove\" [command]=\"context.row.removeItemCommand\"\n [face]=\"removeFace\" data-cy=\"sub-form-remove\"></aup-command>\n </ng-container>\n\n <!-- The replacing cluster keeps its wrapper: it is one grid item in the `actions` cell, and an\n ng-container outlet generates no element to place. -->\n <div class=\"actions\" *ngIf=\"customActionsVisible\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n </div>\n\n <!-- Inside .rows deliberately: that element is the grid under `subgrid`, so only a child of it can\n adopt the tracks and line the footer's cells up with the rows'. Placed after the rows and given\n no listitem role \u2014 it is a trailing statement about the list, not another item in it. -->\n <div class=\"footer-row\"\n *ngFor=\"let footer of footerTemplates\"\n [class.layout-subgrid]=\"subgridLayout\"\n data-cy=\"sub-form-footer-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"empty\">\n <ng-container *ngIf=\"emptyTemplate; else defaultEmpty\"\n [ngTemplateOutlet]=\"emptyTemplate.templateRef\"></ng-container>\n <ng-template #defaultEmpty>\n <aup-empty-state *ngIf=\"emptyText\" data-cy=\"sub-form-list-empty\">{{emptyText}}</aup-empty-state>\n </ng-template>\n</ng-container>\n\n<ul class=\"list-errors\" *ngIf=\"listErrors.length\" data-cy=\"sub-form-list-errors\">\n <li *ngFor=\"let error of listErrors\">{{error}}</li>\n</ul>\n\n<div class=\"footer\" *ngIf=\"hasAddCommand\">\n <aup-command [command]=\"addCommand\" data-cy=\"sub-form-list-add\"></aup-command>\n</div>\n", styles: [":host{display:block}.rows{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row{display:grid;grid-template-areas:var(--aup-sub-form-row-areas, var(--resolved-sub-form-row-areas, \"handle content up down actions\"));grid-template-columns:var(--aup-sub-form-row-columns, var(--resolved-sub-form-row-columns, auto auto auto auto auto));grid-template-rows:var(--aup-sub-form-row-rows, var(--resolved-sub-form-row-rows, auto));justify-content:start;align-items:center;gap:0;background:var(--aup-sub-form-row-background, transparent)}.drag-handle{grid-area:handle}.content{grid-area:content}.move-up{grid-area:up}.move-down{grid-area:down}.remove,.actions{grid-area:actions}.drag-handle,.row.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.drag-handle{display:flex;align-items:center;cursor:grab;color:#00000061}.drag-handle:active{cursor:grabbing}.content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px);min-width:0}.move-up,.move-down,.remove{white-space:nowrap}.actions{display:flex;align-items:center;gap:0;white-space:nowrap}.row.layout-rail{--resolved-sub-form-row-areas: \"up content actions\" \"handle content actions\" \"down content actions\";--resolved-sub-form-row-columns: auto auto auto;--resolved-sub-form-row-rows: auto auto auto}.row.layout-rail .move-up{align-self:start}.row.layout-rail .move-down{align-self:end}.row.layout-rail .drag-handle,.row.layout-rail .move-up,.row.layout-rail .move-down{justify-self:center}.row.layout-rail .move-up,.row.layout-rail .move-down{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-custom{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: none;--resolved-sub-form-row-rows: none}.row.layout-custom .content{display:contents}.rows.layout-subgrid{display:grid;grid-template-columns:[handle-start] auto [handle-end content-start] var(--aup-sub-form-list-columns, var(--resolved-sub-form-list-columns, 1fr)) [content-end up-start] auto [up-end down-start] auto [down-end actions-start] auto [actions-end];row-gap:var(--aup-sub-form-row-gap, 8px);column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px));justify-content:start}.row.layout-subgrid{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: subgrid;--resolved-sub-form-row-rows: none;grid-column:1/-1}.row.layout-subgrid .drag-handle{grid-column:handle-start/handle-end;margin-inline-end:0}.row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}.row.layout-subgrid.has-actions .content{margin-inline-end:0}.row.layout-subgrid .move-up{grid-column:up-start/up-end}.row.layout-subgrid .move-down{grid-column:down-start/down-end}.row.layout-subgrid .remove,.row.layout-subgrid .actions{grid-column:actions-start/actions-end}.header-row.layout-subgrid,.footer-row.layout-subgrid{display:grid;grid-template-columns:subgrid;grid-column:1/-1;gap:0}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}@supports not (grid-template-columns: subgrid){.rows.layout-subgrid{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid{--resolved-sub-form-row-areas: \"handle content up down actions\";--resolved-sub-form-row-columns: auto auto auto auto auto}.row.layout-subgrid .drag-handle{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:center;gap:var(--aup-sub-form-row-gap, 8px)}}.row.layout-inline.fill{--resolved-sub-form-row-columns: auto 1fr auto auto auto}.row.layout-rail.fill{--resolved-sub-form-row-columns: auto 1fr auto}.row.buttons-on-demand .move-command{opacity:0;transition:opacity .15s ease-in-out}.row.buttons-on-demand:hover .move-command,.row.buttons-on-demand:focus-within .move-command{opacity:1}.list-errors{margin:var(--aup-sub-form-row-gap, 8px) 0 0;padding-left:1.2em;color:var(--aup-error-color, #f44336);font-size:12px}.footer{display:flex;margin-top:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview{box-sizing:border-box;border-radius:4px;background:var(--aup-sub-form-row-background, #fff);box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.row.cdk-drag-preview.layout-subgrid{grid-template-columns:none;grid-auto-flow:column;justify-content:start;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview.layout-subgrid .drag-handle,.row.cdk-drag-preview.layout-subgrid .content,.row.cdk-drag-preview.layout-subgrid .move-up,.row.cdk-drag-preview.layout-subgrid .move-down,.row.cdk-drag-preview.layout-subgrid .remove,.row.cdk-drag-preview.layout-subgrid .actions{grid-area:auto}.row.cdk-drag-preview.layout-subgrid .content{grid-template-columns:none;grid-auto-flow:column;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.rows.cdk-drop-list-dragging .row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host([data-appearance=table]) .rows{border:var(--aup-sub-form-list-border, 1px solid rgba(0, 0, 0, .12));border-radius:var(--aup-sub-form-list-radius, 6px);overflow:hidden}:host([data-appearance=table]) .rows,:host([data-appearance=table]) .rows.layout-subgrid{row-gap:0}:host([data-appearance=table]) .row{padding:var(--aup-sub-form-list-cell-padding, 8px)}:host([data-appearance=table]) .row+.row{border-block-start:var(--aup-sub-form-list-border, 1px solid rgba(0, 0, 0, .12))}:host([data-appearance=table]) .header-row{padding:var(--aup-sub-form-list-cell-padding, 8px);background:var(--aup-sub-form-list-header-background, rgba(0, 0, 0, .02));border-block-end:var(--aup-sub-form-list-border, 1px solid rgba(0, 0, 0, .12))}:host([data-appearance=table]) .header-row .content>*{font-size:var(--aup-sub-form-list-header-font-size, 11px);font-weight:var(--aup-sub-form-list-header-font-weight, 500);letter-spacing:var(--aup-sub-form-list-header-letter-spacing, .05em);text-transform:var(--aup-sub-form-list-header-text-transform, uppercase);color:var(--aup-sub-form-list-header-color, rgba(0, 0, 0, .6))}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: IconComponent, selector: "aup-icon", inputs: ["icon"] }, { kind: "component", type: CommandComponent, selector: "aup-command", inputs: ["command", "face$", "face", "busyFace$", "busyFace", "alignFace"] }, { kind: "component", type: EmptyStateComponent, selector: "aup-empty-state" }] });
|
|
3775
4059
|
}
|
|
3776
4060
|
__decorate([
|
|
3777
4061
|
Proxify(),
|
|
@@ -3787,7 +4071,7 @@ __decorate([
|
|
|
3787
4071
|
], SubFormListComponent.prototype, "addCommand", null);
|
|
3788
4072
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: SubFormListComponent, decorators: [{
|
|
3789
4073
|
type: Component,
|
|
3790
|
-
args: [{ selector: 'aup-sub-form-list', template: "<!-- The rows container carries a layout class only for `subgrid`, the one layout that is not laid\n out entirely within a row: this element is the grid whose tracks the rows subgrid. It is safe\n to anchor rules here \u2014 unlike .row, this element is never cloned. -->\n<div class=\"rows\"\n role=\"list\"\n [class.layout-subgrid]=\"subgridLayout\"\n cdkDropList\n [cdkDropListDisabled]=\"!dragEnabled\"\n (cdkDropListDropped)=\"onDropped($event)\"\n data-cy=\"sub-form-rows\">\n\n <!-- Inside .rows and ahead of them, because only a child of the grid can adopt its tracks \u2014 the\n same reason the footer rows sit inside it. A caller aligning column titles from outside would\n have to restate `--aup-sub-form-list-columns`, which drifts the moment a row's cells change.\n\n Hidden from assistive tech and given no listitem role: it names the columns rather than\n standing for an item, and a screen reader reaching the rows through the list should not have\n to step over it. Offered under `subgrid` alone \u2014 it is the only layout with columns to name. -->\n <div class=\"header-row layout-subgrid\"\n *ngIf=\"headerVisible\"\n aria-hidden=\"true\"\n data-cy=\"sub-form-header-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"headerTemplate.templateRef\"></ng-container>\n </div>\n </div>\n\n <!-- The layout classes go on .row, not the host: CDK's drag preview is a deep clone of .row\n appended to <body>, and a rule anchored on the host cannot reach it. Written as discrete\n [class.x] bindings rather than one [ngClass] object literal, which would allocate a fresh\n object on every change-detection pass. -->\n <div class=\"row\"\n role=\"listitem\"\n *ngFor=\"let context of rows; trackBy: trackByRow\"\n [class.layout-inline]=\"inlineLayout\"\n [class.layout-rail]=\"railLayout\"\n [class.layout-custom]=\"customLayout\"\n [class.layout-subgrid]=\"subgridLayout\"\n [class.fill]=\"fill\"\n [class.buttons-on-demand]=\"buttonsOnDemand\"\n [class.has-actions]=\"hasActions\"\n cdkDrag\n [cdkDragDisabled]=\"!dragEnabled\"\n data-cy=\"sub-form-row\">\n\n <!-- Deliberately not focusable and hidden from assistive tech: CDK drag is pointer-only, so a\n focusable handle would take a tab stop and then do nothing. The move buttons are the\n keyboard path, which is why they survive even in reorder=\"drag\" \u2014 and why rowLayout=\"custom\",\n which renders none of them, makes that path the caller's to provide.\n\n It stays library-rendered in every layout because it has to: CdkDragHandle finds its drag\n through the node injector and CdkDrag collects handles with a content query, both scoped to\n the template cdkDrag is written in. A cdkDragHandle in a caller's row template resolves no\n parent and, because that injection is optional, silently does nothing. -->\n <span class=\"drag-handle\" *ngIf=\"dragEnabled\" cdkDragHandle aria-hidden=\"true\"\n data-cy=\"sub-form-drag-handle\">\n <aup-icon [icon]=\"dragHandleIcon\"></aup-icon>\n </span>\n\n <!-- Given `display: contents` under rowLayout=\"custom\", so the projected template's own\n top-level elements become the row's grid items. Never *ngIf'd away for that: recreating it\n would tear down and rebuild the caller's row bindings, which is exactly what the row\n context memoisation exists to prevent. -->\n <div class=\"content\">\n <ng-container *ngIf=\"rowTemplate\"\n [ngTemplateOutlet]=\"rowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n\n <!-- The default cluster is three flat grid items, one per named cell, so a layout can place\n them independently \u2014 the rail stacks the moves away from remove. -->\n <ng-container *ngIf=\"defaultActionsVisible\">\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-up\"\n [command]=\"context.row.moveUpCommand\"\n [face]=\"moveUpFace\" data-cy=\"sub-form-move-up\"></aup-command>\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-down\"\n [command]=\"context.row.moveDownCommand\"\n [face]=\"moveDownFace\" data-cy=\"sub-form-move-down\"></aup-command>\n <aup-command *ngIf=\"removable\" class=\"remove\" [command]=\"context.row.removeItemCommand\"\n [face]=\"removeFace\" data-cy=\"sub-form-remove\"></aup-command>\n </ng-container>\n\n <!-- The replacing cluster keeps its wrapper: it is one grid item in the `actions` cell, and an\n ng-container outlet generates no element to place. -->\n <div class=\"actions\" *ngIf=\"customActionsVisible\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n </div>\n\n <!-- Inside .rows deliberately: that element is the grid under `subgrid`, so only a child of it can\n adopt the tracks and line the footer's cells up with the rows'. Placed after the rows and given\n no listitem role \u2014 it is a trailing statement about the list, not another item in it. -->\n <div class=\"footer-row\"\n *ngFor=\"let footer of footerTemplates\"\n [class.layout-subgrid]=\"subgridLayout\"\n data-cy=\"sub-form-footer-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"empty\">\n <ng-container *ngIf=\"emptyTemplate; else defaultEmpty\"\n [ngTemplateOutlet]=\"emptyTemplate.templateRef\"></ng-container>\n <ng-template #defaultEmpty>\n <aup-empty-state *ngIf=\"emptyText\" data-cy=\"sub-form-list-empty\">{{emptyText}}</aup-empty-state>\n </ng-template>\n</ng-container>\n\n<ul class=\"list-errors\" *ngIf=\"listErrors.length\" data-cy=\"sub-form-list-errors\">\n <li *ngFor=\"let error of listErrors\">{{error}}</li>\n</ul>\n\n<div class=\"footer\" *ngIf=\"hasAddCommand\">\n <aup-command [command]=\"addCommand\" data-cy=\"sub-form-list-add\"></aup-command>\n</div>\n", styles: [":host{display:block}.rows{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row{display:grid;grid-template-areas:var(--aup-sub-form-row-areas, var(--resolved-sub-form-row-areas, \"handle content up down actions\"));grid-template-columns:var(--aup-sub-form-row-columns, var(--resolved-sub-form-row-columns, auto auto auto auto auto));grid-template-rows:var(--aup-sub-form-row-rows, var(--resolved-sub-form-row-rows, auto));justify-content:start;align-items:center;gap:0;background:var(--aup-sub-form-row-background, transparent)}.drag-handle{grid-area:handle}.content{grid-area:content}.move-up{grid-area:up}.move-down{grid-area:down}.remove,.actions{grid-area:actions}.drag-handle,.row.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.drag-handle{display:flex;align-items:center;cursor:grab;color:#00000061}.drag-handle:active{cursor:grabbing}.content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px);min-width:0}.move-up,.move-down,.remove{white-space:nowrap}.actions{display:flex;align-items:center;gap:0;white-space:nowrap}.row.layout-rail{--resolved-sub-form-row-areas: \"up content actions\" \"handle content actions\" \"down content actions\";--resolved-sub-form-row-columns: auto auto auto;--resolved-sub-form-row-rows: auto auto auto}.row.layout-rail .move-up{align-self:start}.row.layout-rail .move-down{align-self:end}.row.layout-rail .drag-handle,.row.layout-rail .move-up,.row.layout-rail .move-down{justify-self:center}.row.layout-rail .move-up,.row.layout-rail .move-down{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-custom{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: none;--resolved-sub-form-row-rows: none}.row.layout-custom .content{display:contents}.rows.layout-subgrid{display:grid;grid-template-columns:[handle-start] auto [handle-end content-start] var(--aup-sub-form-list-columns, 1fr) [content-end up-start] auto [up-end down-start] auto [down-end actions-start] auto [actions-end];row-gap:var(--aup-sub-form-row-gap, 8px);column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px));justify-content:start}.row.layout-subgrid{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: subgrid;--resolved-sub-form-row-rows: none;grid-column:1/-1}.row.layout-subgrid .drag-handle{grid-column:handle-start/handle-end;margin-inline-end:0}.row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}.row.layout-subgrid.has-actions .content{margin-inline-end:0}.row.layout-subgrid .move-up{grid-column:up-start/up-end}.row.layout-subgrid .move-down{grid-column:down-start/down-end}.row.layout-subgrid .remove,.row.layout-subgrid .actions{grid-column:actions-start/actions-end}.header-row.layout-subgrid,.footer-row.layout-subgrid{display:grid;grid-template-columns:subgrid;grid-column:1/-1;gap:0}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}@supports not (grid-template-columns: subgrid){.rows.layout-subgrid{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid{--resolved-sub-form-row-areas: \"handle content up down actions\";--resolved-sub-form-row-columns: auto auto auto auto auto}.row.layout-subgrid .drag-handle{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:center;gap:var(--aup-sub-form-row-gap, 8px)}}.row.layout-inline.fill{--resolved-sub-form-row-columns: auto 1fr auto auto auto}.row.layout-rail.fill{--resolved-sub-form-row-columns: auto 1fr auto}.row.buttons-on-demand .move-command{opacity:0;transition:opacity .15s ease-in-out}.row.buttons-on-demand:hover .move-command,.row.buttons-on-demand:focus-within .move-command{opacity:1}.list-errors{margin:var(--aup-sub-form-row-gap, 8px) 0 0;padding-left:1.2em;color:var(--aup-error-color, #f44336);font-size:12px}.footer{display:flex;margin-top:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview{box-sizing:border-box;border-radius:4px;background:var(--aup-sub-form-row-background, #fff);box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.row.cdk-drag-preview.layout-subgrid{grid-template-columns:none;grid-auto-flow:column;justify-content:start;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview.layout-subgrid .drag-handle,.row.cdk-drag-preview.layout-subgrid .content,.row.cdk-drag-preview.layout-subgrid .move-up,.row.cdk-drag-preview.layout-subgrid .move-down,.row.cdk-drag-preview.layout-subgrid .remove,.row.cdk-drag-preview.layout-subgrid .actions{grid-area:auto}.row.cdk-drag-preview.layout-subgrid .content{grid-template-columns:none;grid-auto-flow:column;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.rows.cdk-drop-list-dragging .row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
4074
|
+
args: [{ selector: 'aup-sub-form-list', template: "<!-- The rows container carries a layout class only for `subgrid`, the one layout that is not laid\n out entirely within a row: this element is the grid whose tracks the rows subgrid. It is safe\n to anchor rules here \u2014 unlike .row, this element is never cloned. -->\n<div class=\"rows\"\n role=\"list\"\n [class.layout-subgrid]=\"subgridLayout\"\n cdkDropList\n [cdkDropListDisabled]=\"!dragEnabled\"\n (cdkDropListDropped)=\"onDropped($event)\"\n data-cy=\"sub-form-rows\">\n\n <!-- Inside .rows and ahead of them, because only a child of the grid can adopt its tracks \u2014 the\n same reason the footer rows sit inside it. A caller aligning column titles from outside would\n have to restate `--aup-sub-form-list-columns`, which drifts the moment a row's cells change.\n\n Hidden from assistive tech and given no listitem role: it names the columns rather than\n standing for an item, and a screen reader reaching the rows through the list should not have\n to step over it. Offered under `subgrid` alone \u2014 it is the only layout with columns to name. -->\n <div class=\"header-row layout-subgrid\"\n *ngIf=\"headerVisible\"\n aria-hidden=\"true\"\n data-cy=\"sub-form-header-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container *ngIf=\"headerTemplate; else declaredHeader\"\n [ngTemplateOutlet]=\"headerTemplate.templateRef\"></ng-container>\n <!-- Plain spans carrying no library styling: a declared header has to render identically to a\n template one, or moving from one to the other silently restyles a consumer's band. The\n ngIf/ngFor anchors are comment nodes, so these stay the direct element children of\n .content and auto-place one per track exactly as a template's cells do.\n\n A column with no title still renders its cell \u2014 its track exists either way, and skipping\n it would shift every column after it one track left. -->\n <ng-template #declaredHeader>\n <span *ngFor=\"let column of headerColumns\"\n [attr.data-column-id]=\"column.columnId\"\n data-cy=\"sub-form-header-cell\">{{ column.getHeaderText() }}</span>\n </ng-template>\n </div>\n </div>\n\n <!-- The layout classes go on .row, not the host: CDK's drag preview is a deep clone of .row\n appended to <body>, and a rule anchored on the host cannot reach it. Written as discrete\n [class.x] bindings rather than one [ngClass] object literal, which would allocate a fresh\n object on every change-detection pass. -->\n <div class=\"row\"\n role=\"listitem\"\n *ngFor=\"let context of rows; trackBy: trackByRow\"\n [class.layout-inline]=\"inlineLayout\"\n [class.layout-rail]=\"railLayout\"\n [class.layout-custom]=\"customLayout\"\n [class.layout-subgrid]=\"subgridLayout\"\n [class.fill]=\"fill\"\n [class.buttons-on-demand]=\"buttonsOnDemand\"\n [class.has-actions]=\"hasActions\"\n cdkDrag\n [cdkDragDisabled]=\"!dragEnabled\"\n data-cy=\"sub-form-row\">\n\n <!-- Deliberately not focusable and hidden from assistive tech: CDK drag is pointer-only, so a\n focusable handle would take a tab stop and then do nothing. The move buttons are the\n keyboard path, which is why they survive even in reorder=\"drag\" \u2014 and why rowLayout=\"custom\",\n which renders none of them, makes that path the caller's to provide.\n\n It stays library-rendered in every layout because it has to: CdkDragHandle finds its drag\n through the node injector and CdkDrag collects handles with a content query, both scoped to\n the template cdkDrag is written in. A cdkDragHandle in a caller's row template resolves no\n parent and, because that injection is optional, silently does nothing. -->\n <span class=\"drag-handle\" *ngIf=\"dragEnabled\" cdkDragHandle aria-hidden=\"true\"\n data-cy=\"sub-form-drag-handle\">\n <aup-icon [icon]=\"dragHandleIcon\"></aup-icon>\n </span>\n\n <!-- Given `display: contents` under rowLayout=\"custom\", so the projected template's own\n top-level elements become the row's grid items. Never *ngIf'd away for that: recreating it\n would tear down and rebuild the caller's row bindings, which is exactly what the row\n context memoisation exists to prevent. -->\n <div class=\"content\" #rowContent>\n <ng-container *ngIf=\"rowTemplate\"\n [ngTemplateOutlet]=\"rowTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n\n <!-- The default cluster is three flat grid items, one per named cell, so a layout can place\n them independently \u2014 the rail stacks the moves away from remove. -->\n <ng-container *ngIf=\"defaultActionsVisible\">\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-up\"\n [command]=\"context.row.moveUpCommand\"\n [face]=\"moveUpFace\" data-cy=\"sub-form-move-up\"></aup-command>\n <aup-command *ngIf=\"moveButtonsVisible\" class=\"move-command move-down\"\n [command]=\"context.row.moveDownCommand\"\n [face]=\"moveDownFace\" data-cy=\"sub-form-move-down\"></aup-command>\n <aup-command *ngIf=\"removable\" class=\"remove\" [command]=\"context.row.removeItemCommand\"\n [face]=\"removeFace\" data-cy=\"sub-form-remove\"></aup-command>\n </ng-container>\n\n <!-- The replacing cluster keeps its wrapper: it is one grid item in the `actions` cell, and an\n ng-container outlet generates no element to place. -->\n <div class=\"actions\" *ngIf=\"customActionsVisible\">\n <ng-container [ngTemplateOutlet]=\"actionsTemplate.templateRef\"\n [ngTemplateOutletContext]=\"context\"></ng-container>\n </div>\n </div>\n\n <!-- Inside .rows deliberately: that element is the grid under `subgrid`, so only a child of it can\n adopt the tracks and line the footer's cells up with the rows'. Placed after the rows and given\n no listitem role \u2014 it is a trailing statement about the list, not another item in it. -->\n <div class=\"footer-row\"\n *ngFor=\"let footer of footerTemplates\"\n [class.layout-subgrid]=\"subgridLayout\"\n data-cy=\"sub-form-footer-row\">\n <!-- Mirrors .content so the caller's top-level elements get the same tracks a row's cells do. -->\n <div class=\"content\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\"></ng-container>\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"empty\">\n <ng-container *ngIf=\"emptyTemplate; else defaultEmpty\"\n [ngTemplateOutlet]=\"emptyTemplate.templateRef\"></ng-container>\n <ng-template #defaultEmpty>\n <aup-empty-state *ngIf=\"emptyText\" data-cy=\"sub-form-list-empty\">{{emptyText}}</aup-empty-state>\n </ng-template>\n</ng-container>\n\n<ul class=\"list-errors\" *ngIf=\"listErrors.length\" data-cy=\"sub-form-list-errors\">\n <li *ngFor=\"let error of listErrors\">{{error}}</li>\n</ul>\n\n<div class=\"footer\" *ngIf=\"hasAddCommand\">\n <aup-command [command]=\"addCommand\" data-cy=\"sub-form-list-add\"></aup-command>\n</div>\n", styles: [":host{display:block}.rows{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row{display:grid;grid-template-areas:var(--aup-sub-form-row-areas, var(--resolved-sub-form-row-areas, \"handle content up down actions\"));grid-template-columns:var(--aup-sub-form-row-columns, var(--resolved-sub-form-row-columns, auto auto auto auto auto));grid-template-rows:var(--aup-sub-form-row-rows, var(--resolved-sub-form-row-rows, auto));justify-content:start;align-items:center;gap:0;background:var(--aup-sub-form-row-background, transparent)}.drag-handle{grid-area:handle}.content{grid-area:content}.move-up{grid-area:up}.move-down{grid-area:down}.remove,.actions{grid-area:actions}.drag-handle,.row.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.drag-handle{display:flex;align-items:center;cursor:grab;color:#00000061}.drag-handle:active{cursor:grabbing}.content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px);min-width:0}.move-up,.move-down,.remove{white-space:nowrap}.actions{display:flex;align-items:center;gap:0;white-space:nowrap}.row.layout-rail{--resolved-sub-form-row-areas: \"up content actions\" \"handle content actions\" \"down content actions\";--resolved-sub-form-row-columns: auto auto auto;--resolved-sub-form-row-rows: auto auto auto}.row.layout-rail .move-up{align-self:start}.row.layout-rail .move-down{align-self:end}.row.layout-rail .drag-handle,.row.layout-rail .move-up,.row.layout-rail .move-down{justify-self:center}.row.layout-rail .move-up,.row.layout-rail .move-down{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-custom{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: none;--resolved-sub-form-row-rows: none}.row.layout-custom .content{display:contents}.rows.layout-subgrid{display:grid;grid-template-columns:[handle-start] auto [handle-end content-start] var(--aup-sub-form-list-columns, var(--resolved-sub-form-list-columns, 1fr)) [content-end up-start] auto [up-end down-start] auto [down-end actions-start] auto [actions-end];row-gap:var(--aup-sub-form-row-gap, 8px);column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px));justify-content:start}.row.layout-subgrid{--resolved-sub-form-row-areas: none;--resolved-sub-form-row-columns: subgrid;--resolved-sub-form-row-rows: none;grid-column:1/-1}.row.layout-subgrid .drag-handle{grid-column:handle-start/handle-end;margin-inline-end:0}.row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}.row.layout-subgrid.has-actions .content{margin-inline-end:0}.row.layout-subgrid .move-up{grid-column:up-start/up-end}.row.layout-subgrid .move-down{grid-column:down-start/down-end}.row.layout-subgrid .remove,.row.layout-subgrid .actions{grid-column:actions-start/actions-end}.header-row.layout-subgrid,.footer-row.layout-subgrid{display:grid;grid-template-columns:subgrid;grid-column:1/-1;gap:0}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{grid-column:content-start/content-end;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--aup-sub-form-list-column-gap, var(--aup-sub-form-row-gap, 8px))}@supports not (grid-template-columns: subgrid){.rows.layout-subgrid{display:flex;flex-direction:column;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid{--resolved-sub-form-row-areas: \"handle content up down actions\";--resolved-sub-form-row-columns: auto auto auto auto auto}.row.layout-subgrid .drag-handle{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--aup-sub-form-row-gap, 8px)}.row.layout-subgrid.has-actions .content{margin-inline-end:var(--aup-sub-form-row-gap, 8px)}.header-row.layout-subgrid .content,.footer-row.layout-subgrid .content{display:flex;flex-wrap:wrap;align-items:center;gap:var(--aup-sub-form-row-gap, 8px)}}.row.layout-inline.fill{--resolved-sub-form-row-columns: auto 1fr auto auto auto}.row.layout-rail.fill{--resolved-sub-form-row-columns: auto 1fr auto}.row.buttons-on-demand .move-command{opacity:0;transition:opacity .15s ease-in-out}.row.buttons-on-demand:hover .move-command,.row.buttons-on-demand:focus-within .move-command{opacity:1}.list-errors{margin:var(--aup-sub-form-row-gap, 8px) 0 0;padding-left:1.2em;color:var(--aup-error-color, #f44336);font-size:12px}.footer{display:flex;margin-top:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview{box-sizing:border-box;border-radius:4px;background:var(--aup-sub-form-row-background, #fff);box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.row.cdk-drag-preview.layout-subgrid{grid-template-columns:none;grid-auto-flow:column;justify-content:start;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-preview.layout-subgrid .drag-handle,.row.cdk-drag-preview.layout-subgrid .content,.row.cdk-drag-preview.layout-subgrid .move-up,.row.cdk-drag-preview.layout-subgrid .move-down,.row.cdk-drag-preview.layout-subgrid .remove,.row.cdk-drag-preview.layout-subgrid .actions{grid-area:auto}.row.cdk-drag-preview.layout-subgrid .content{grid-template-columns:none;grid-auto-flow:column;column-gap:var(--aup-sub-form-row-gap, 8px)}.row.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.rows.cdk-drop-list-dragging .row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host([data-appearance=table]) .rows{border:var(--aup-sub-form-list-border, 1px solid rgba(0, 0, 0, .12));border-radius:var(--aup-sub-form-list-radius, 6px);overflow:hidden}:host([data-appearance=table]) .rows,:host([data-appearance=table]) .rows.layout-subgrid{row-gap:0}:host([data-appearance=table]) .row{padding:var(--aup-sub-form-list-cell-padding, 8px)}:host([data-appearance=table]) .row+.row{border-block-start:var(--aup-sub-form-list-border, 1px solid rgba(0, 0, 0, .12))}:host([data-appearance=table]) .header-row{padding:var(--aup-sub-form-list-cell-padding, 8px);background:var(--aup-sub-form-list-header-background, rgba(0, 0, 0, .02));border-block-end:var(--aup-sub-form-list-border, 1px solid rgba(0, 0, 0, .12))}:host([data-appearance=table]) .header-row .content>*{font-size:var(--aup-sub-form-list-header-font-size, 11px);font-weight:var(--aup-sub-form-list-header-font-weight, 500);letter-spacing:var(--aup-sub-form-list-header-letter-spacing, .05em);text-transform:var(--aup-sub-form-list-header-text-transform, uppercase);color:var(--aup-sub-form-list-header-color, rgba(0, 0, 0, .6))}\n"] }]
|
|
3791
4075
|
}], ctorParameters: function () { return []; }, propDecorators: { list: [{
|
|
3792
4076
|
type: Input
|
|
3793
4077
|
}], reorder: [{
|
|
@@ -3820,6 +4104,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3820
4104
|
type: Input
|
|
3821
4105
|
}], rowLayout: [{
|
|
3822
4106
|
type: Input
|
|
4107
|
+
}], columns: [{
|
|
4108
|
+
type: Input
|
|
4109
|
+
}], appearance: [{
|
|
4110
|
+
type: HostBinding,
|
|
4111
|
+
args: ['attr.data-appearance']
|
|
4112
|
+
}, {
|
|
4113
|
+
type: Input
|
|
3823
4114
|
}], rowTemplate: [{
|
|
3824
4115
|
type: ContentChild,
|
|
3825
4116
|
args: [SubFormRowDirective]
|
|
@@ -3835,6 +4126,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3835
4126
|
}], footerTemplates: [{
|
|
3836
4127
|
type: ContentChildren,
|
|
3837
4128
|
args: [SubFormListFooterDirective]
|
|
4129
|
+
}], rowContents: [{
|
|
4130
|
+
type: ViewChildren,
|
|
4131
|
+
args: ['rowContent']
|
|
3838
4132
|
}], buttonsOnDemand: [{
|
|
3839
4133
|
type: HostBinding,
|
|
3840
4134
|
args: ['class.buttons-on-demand']
|
|
@@ -3852,6 +4146,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3852
4146
|
DRAG: 'drag',
|
|
3853
4147
|
BOTH: 'both',
|
|
3854
4148
|
});
|
|
4149
|
+
SubFormListComponent.Appearance = Enum({
|
|
4150
|
+
/** No chrome of the library's own — rows float apart on the row gap. The default. */
|
|
4151
|
+
PLAIN: 'plain',
|
|
4152
|
+
/**
|
|
4153
|
+
* One bordered, rounded box holding every row, rows ruled off from one another rather than
|
|
4154
|
+
* separated, and the header band shaded and ruled so it reads as a table head rather than as a
|
|
4155
|
+
* first row.
|
|
4156
|
+
*
|
|
4157
|
+
* Reach for it when the rows are read *against each other* — ranked, compared, or titled by
|
|
4158
|
+
* columns — which is also when a titled column means anything: a heading only holds if the box
|
|
4159
|
+
* it heads holds every row.
|
|
4160
|
+
*
|
|
4161
|
+
* The header band needs {@link RowLayout.SUBGRID}, since that is the only layout with a header
|
|
4162
|
+
* at all; the box and the rules apply in any layout.
|
|
4163
|
+
*/
|
|
4164
|
+
TABLE: 'table',
|
|
4165
|
+
});
|
|
3855
4166
|
SubFormListComponent.RowLayout = Enum({
|
|
3856
4167
|
/** One line: `handle · content · up · down · actions`. The default. */
|
|
3857
4168
|
INLINE: 'inline',
|
|
@@ -14913,5 +15224,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
14913
15224
|
* Generated bundle index. Do not edit.
|
|
14914
15225
|
*/
|
|
14915
15226
|
|
|
14916
|
-
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_DETACHED_PARENT_CDR, AUP_PLACE_CONFIG, AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AupTooltipDirective, AutocompleteInputComponent, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_RENDERER_PORTAL, CardContainerComponent, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowCellsBuilder, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, INTERACTION_CONTEXT, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextProvider, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, ParameterSanitiser, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SubFormListComponent, SubFormListEmptyDirective, SubFormListFooterDirective, SubFormListHeaderDirective, SubFormRowActionsDirective, SubFormRowDirective, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableActionColumnComponent, TableBodyComponent, TableCellComponent, TableComponent, TableCustomMoreMenuComponent, TableCustomMoreMenuPopupComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableRowAttributesDirective, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, collapseOrphanSeparators, getPlaceDefinition, leftRightPlaceAnimation, markdownPillExtension, setPlaceDefinition, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
15227
|
+
export { ACTIVITY_DATA, ALERT_CONFIG, AUP_DETACHED_PARENT_CDR, AUP_PLACE_CONFIG, AUP_TABLE_OPTIMIZED_CHANGE_DETECTION, AUP_TABLE_VIRTUAL_SCROLL_BUFFER_MULTIPLIER, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractCellRenderer, AbstractConfirmDialogComponent, AbstractDialogComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityContext, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, Alert, AlertDialogComponent, AlertRendererComponent, AngularUiPowerupsModule, AupTooltipDirective, AutocompleteInputComponent, Bounds, BusyOverlayComponent, ButtonRendererComponent, CELL_RENDERER_PORTAL, CardContainerComponent, CellFooterPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnManager, ColumnModel, ColumnOrderManager, ColumnTemplateDirective, ColumnTextSearchFormatter, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, Confirm, ConfirmRendererComponent, ConfirmThenDialogComponent, ConfirmThenExecuteDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EmptyStateComponent, EnableCellTextSearch, EventCleanUpSession, FOOTER_CELL_RENDERER_PORTAL, FileDownloadComponent, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, FooterRowCellsBuilder, FooterRowModel, Formatter, GarbageCollectorDirective, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, INTERACTION_CONTEXT, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextProvider, InteractionContextTriggerForDirective, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, Keys, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadableComponent, LoadingContainerComponent, MarkdownComponent, MarkdownService, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, ParameterSanitiser, PasswordInputComponent, Place, PlaceAccessGuard, PlaceAuthService, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, ResizeObserverDirective, RouteId, ScrollContainerComponent, SearchInputComponent, SectionHeaderComponent, SelectInputActivity, SelectInputComponent, SelectionCellComponent, SelectionColumnModel, SelectionHeaderCellComponent, SeparatorComponent, SidePlaceNavigationComponent, SlideDownInteractionContextComponent, StringInputActivity, StringInputComponent, SubFormListColumn, SubFormListColumns, SubFormListComponent, SubFormListEmptyDirective, SubFormListFooterDirective, SubFormListHeaderDirective, SubFormRowActionsDirective, SubFormRowDirective, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableActionColumnComponent, TableBodyComponent, TableCellComponent, TableComponent, TableCustomMoreMenuComponent, TableCustomMoreMenuPopupComponent, TableFilterModel, TableFooterRow, TableHeaderCellComponent, TableModel, TableRowAttributesDirective, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, Track, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSegment, VisitSegmentSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, collapseOrphanSeparators, getPlaceDefinition, leftRightPlaceAnimation, markdownPillExtension, setPlaceDefinition, slideDownAndRightOnEnterAnimation, slideDownOnEnterAnimation, slideDownWhenOpenAnimation, slideRightOnEnterAnimation, treeNodeDecorator };
|
|
14917
15228
|
//# sourceMappingURL=coolon-angular-ui-powerups.mjs.map
|