@akcelik/strct 5.1.0 → 5.2.0
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/fesm2022/akcelik-strct.mjs +314 -61
- package/fesm2022/akcelik-strct.mjs.map +1 -1
- package/package.json +1 -1
- package/types/akcelik-strct.d.ts +61 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akcelik/strct",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
|
|
5
5
|
"author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
package/types/akcelik-strct.d.ts
CHANGED
|
@@ -3776,6 +3776,8 @@ interface StrctDatagridLabels {
|
|
|
3776
3776
|
filterPlaceholder: string;
|
|
3777
3777
|
clearFilter: string;
|
|
3778
3778
|
editCell: string;
|
|
3779
|
+
/** How an editable cell says, to assistive tech, that it can be edited. */
|
|
3780
|
+
editCellInstructions: string;
|
|
3779
3781
|
toggleChildren: string;
|
|
3780
3782
|
quickFilter: string;
|
|
3781
3783
|
/** `paging="more"`: the button that asks for the next slice. */
|
|
@@ -3982,6 +3984,14 @@ declare class StrctDatagrid {
|
|
|
3982
3984
|
* selection; the user's subsequent toggles are preserved until the next change.
|
|
3983
3985
|
*/
|
|
3984
3986
|
readonly initialSelection: _angular_core.InputSignal<readonly unknown[] | null>;
|
|
3987
|
+
/**
|
|
3988
|
+
* The selection itself, two-way, for `selectionMode="multiple"` — what
|
|
3989
|
+
* `selectedId` is for single mode. Write it and the grid checks those rows
|
|
3990
|
+
* and counts them; the user's own picks write back, in the order they were
|
|
3991
|
+
* made. `null` (the default) means the consumer does not drive the
|
|
3992
|
+
* selection, so a grid that only seeds with `initialSelection` is unchanged.
|
|
3993
|
+
*/
|
|
3994
|
+
readonly selectedIds: _angular_core.ModelSignal<readonly unknown[] | null>;
|
|
3985
3995
|
/** Override any user-visible / assistive string (partial; merged over defaults). */
|
|
3986
3996
|
readonly labels: _angular_core.InputSignal<Partial<StrctDatagridLabels>>;
|
|
3987
3997
|
/** Effective labels (defaults + overrides). */
|
|
@@ -4004,6 +4014,7 @@ declare class StrctDatagrid {
|
|
|
4004
4014
|
filterPlaceholder: string;
|
|
4005
4015
|
clearFilter: string;
|
|
4006
4016
|
editCell: string;
|
|
4017
|
+
editCellInstructions: string;
|
|
4007
4018
|
toggleChildren: string;
|
|
4008
4019
|
quickFilter: string;
|
|
4009
4020
|
loadMore: string;
|
|
@@ -4018,6 +4029,17 @@ declare class StrctDatagrid {
|
|
|
4018
4029
|
readonly virtual: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4019
4030
|
/** Scroll viewport height in px (virtual mode). */
|
|
4020
4031
|
readonly viewportHeight: _angular_core.InputSignal<number>;
|
|
4032
|
+
/**
|
|
4033
|
+
* Bound the grid's own scroll box (px), with a sticky header — what
|
|
4034
|
+
* `viewportHeight` does for `virtual`, for every other grid: a grouped
|
|
4035
|
+
* picker inside a dialog scrolls instead of growing the page.
|
|
4036
|
+
*/
|
|
4037
|
+
readonly maxHeight: _angular_core.InputSignal<number | null>;
|
|
4038
|
+
/**
|
|
4039
|
+
* Show a pencil on an editable cell when it is hovered or focused. A mouse
|
|
4040
|
+
* user finds an editable cell by double-clicking one; nothing said so.
|
|
4041
|
+
*/
|
|
4042
|
+
readonly editHint: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4021
4043
|
/** Uniform row height in px (virtual mode; tune when `compact`). */
|
|
4022
4044
|
readonly rowHeight: _angular_core.InputSignal<number>;
|
|
4023
4045
|
/**
|
|
@@ -4112,6 +4134,8 @@ declare class StrctDatagrid {
|
|
|
4112
4134
|
private readonly menu;
|
|
4113
4135
|
protected readonly detailDef: _angular_core.Signal<StrctRowDetailDef | undefined>;
|
|
4114
4136
|
protected readonly actionBarDef: _angular_core.Signal<StrctDatagridActionBar | undefined>;
|
|
4137
|
+
/** A read-only grid with a note needed an empty action bar to show it. */
|
|
4138
|
+
protected readonly actionBarCaptionDef: _angular_core.Signal<StrctDatagridActionBarCaption | undefined>;
|
|
4115
4139
|
private readonly cellDefs;
|
|
4116
4140
|
private readonly cellMap;
|
|
4117
4141
|
readonly page: _angular_core.WritableSignal<number>;
|
|
@@ -4197,6 +4221,36 @@ declare class StrctDatagrid {
|
|
|
4197
4221
|
protected isEditingCell(row: StrctRow, col: StrctDatagridColumn): boolean;
|
|
4198
4222
|
/** The value a typed editor holds while it is open (committed on Enter / blur). */
|
|
4199
4223
|
protected readonly editDraft: _angular_core.WritableSignal<unknown>;
|
|
4224
|
+
/**
|
|
4225
|
+
* Keyboard access to editable cells (FR-49-02). An editable cell opened only
|
|
4226
|
+
* on double-click, so a keyboard user could not reach one at all.
|
|
4227
|
+
*
|
|
4228
|
+
* The editable cells of a grid form one roving tab stop, as a toolbar's
|
|
4229
|
+
* buttons do: Tab reaches the grid, the arrow keys move between cells,
|
|
4230
|
+
* Enter or F2 opens the editor and Escape closes it — focus coming back to
|
|
4231
|
+
* the cell either way, so the next key press continues from where the user
|
|
4232
|
+
* was. While an editor is open, Tab commits it and opens the next cell, the
|
|
4233
|
+
* way a spreadsheet fills a row.
|
|
4234
|
+
*/
|
|
4235
|
+
protected readonly editHintId: string;
|
|
4236
|
+
/** The cell that currently holds the grid's editable-cell tab stop. */
|
|
4237
|
+
private readonly activeEditCell;
|
|
4238
|
+
private readonly editableColumns;
|
|
4239
|
+
protected readonly hasEditableColumn: _angular_core.Signal<boolean>;
|
|
4240
|
+
protected editCellTabindex(row: StrctRow, col: StrctDatagridColumn): number;
|
|
4241
|
+
protected onEditCellFocus(row: StrctRow, col: StrctDatagridColumn): void;
|
|
4242
|
+
/** Every editable cell in DOM order — the order the arrows walk. */
|
|
4243
|
+
private editCells;
|
|
4244
|
+
/**
|
|
4245
|
+
* Move focus `delta` cells along (or `delta` rows, when `byRow`). Focusing
|
|
4246
|
+
* the cell runs its own focus handler, so the roving tab stop follows.
|
|
4247
|
+
*/
|
|
4248
|
+
private moveEditFocus;
|
|
4249
|
+
/** Commit whatever the open editor holds, by the kind of editor it is. */
|
|
4250
|
+
private commitOpenEditor;
|
|
4251
|
+
protected onEditCellKeydown(row: StrctRow, col: StrctDatagridColumn, event: KeyboardEvent): void;
|
|
4252
|
+
/** Put focus back on the cell an editor just left, so the keys keep working. */
|
|
4253
|
+
private refocusCell;
|
|
4200
4254
|
protected startEdit(row: StrctRow, col: StrctDatagridColumn): void;
|
|
4201
4255
|
protected readonly captionId: string;
|
|
4202
4256
|
/** Whether a cell has nothing to show and the column says what to show then. */
|
|
@@ -4241,6 +4295,12 @@ declare class StrctDatagrid {
|
|
|
4241
4295
|
private readonly treeFlat;
|
|
4242
4296
|
protected readonly sorted: _angular_core.Signal<StrctRow[]>;
|
|
4243
4297
|
protected readonly paged: _angular_core.Signal<StrctRow[]>;
|
|
4298
|
+
/**
|
|
4299
|
+
* The footer exists for the count, the column chooser, the sync button and
|
|
4300
|
+
* whichever pager applies — `paging="more"` used to replace all of it, and a
|
|
4301
|
+
* chooser on a grid with no pager had nowhere to live.
|
|
4302
|
+
*/
|
|
4303
|
+
protected readonly showFooter: _angular_core.Signal<boolean>;
|
|
4244
4304
|
/** Full count for the pager / footer (server total in lazy mode). */
|
|
4245
4305
|
protected readonly totalCount: _angular_core.Signal<number>;
|
|
4246
4306
|
private readonly scrollTop;
|
|
@@ -4368,7 +4428,7 @@ declare class StrctDatagrid {
|
|
|
4368
4428
|
private commitSelection;
|
|
4369
4429
|
private compare;
|
|
4370
4430
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctDatagrid, never>;
|
|
4371
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDatagrid, "strct-datagrid", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "detailPane": { "alias": "detailPane"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "singleLine": { "alias": "singleLine"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "columnChooser": { "alias": "columnChooser"; "required": false; "isSignal": true; }; "sync": { "alias": "sync"; "required": false; "isSignal": true; }; "footerActionsDisabled": { "alias": "footerActionsDisabled"; "required": false; "isSignal": true; }; "rowId": { "alias": "rowId"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectedId": { "alias": "selectedId"; "required": false; "isSignal": true; }; "rowSelectable": { "alias": "rowSelectable"; "required": false; "isSignal": true; }; "flush": { "alias": "flush"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "paging": { "alias": "paging"; "required": false; "isSignal": true; }; "hasMore": { "alias": "hasMore"; "required": false; "isSignal": true; }; "loadingMore": { "alias": "loadingMore"; "required": false; "isSignal": true; }; "moreTotal": { "alias": "moreTotal"; "required": false; "isSignal": true; }; "groupSelect": { "alias": "groupSelect"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "virtual": { "alias": "virtual"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "columnState": { "alias": "columnState"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "quickFilter": { "alias": "quickFilter"; "required": false; "isSignal": true; }; "quickFilterFields": { "alias": "quickFilterFields"; "required": false; "isSignal": true; }; "quickFilterable": { "alias": "quickFilterable"; "required": false; "isSignal": true; }; "quickFilterAlign": { "alias": "quickFilterAlign"; "required": false; "isSignal": true; }; "childrenKey": { "alias": "childrenKey"; "required": false; "isSignal": true; }; }, { "selectedId": "selectedIdChange"; "loadMore": "loadMore"; "columnState": "columnStateChange"; "filters": "filtersChange"; "quickFilter": "quickFilterChange"; "selectionChange": "selectionChange"; "syncChange": "syncChange"; "rowAction": "rowAction"; "lazyLoad": "lazyLoad"; "cellEdit": "cellEdit"; }, ["detailDef", "actionBarDef", "cellDefs"], ["[strctDatagridActionBarCaption]", "[strctDatagridActionBar]"], true, never>;
|
|
4431
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctDatagrid, "strct-datagrid", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "expandable": { "alias": "expandable"; "required": false; "isSignal": true; }; "detailPane": { "alias": "detailPane"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "singleLine": { "alias": "singleLine"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "columnChooser": { "alias": "columnChooser"; "required": false; "isSignal": true; }; "sync": { "alias": "sync"; "required": false; "isSignal": true; }; "footerActionsDisabled": { "alias": "footerActionsDisabled"; "required": false; "isSignal": true; }; "rowId": { "alias": "rowId"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectedId": { "alias": "selectedId"; "required": false; "isSignal": true; }; "rowSelectable": { "alias": "rowSelectable"; "required": false; "isSignal": true; }; "flush": { "alias": "flush"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "paging": { "alias": "paging"; "required": false; "isSignal": true; }; "hasMore": { "alias": "hasMore"; "required": false; "isSignal": true; }; "loadingMore": { "alias": "loadingMore"; "required": false; "isSignal": true; }; "moreTotal": { "alias": "moreTotal"; "required": false; "isSignal": true; }; "groupSelect": { "alias": "groupSelect"; "required": false; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "virtual": { "alias": "virtual"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "editHint": { "alias": "editHint"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "stateKey": { "alias": "stateKey"; "required": false; "isSignal": true; }; "columnState": { "alias": "columnState"; "required": false; "isSignal": true; }; "reorderable": { "alias": "reorderable"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "quickFilter": { "alias": "quickFilter"; "required": false; "isSignal": true; }; "quickFilterFields": { "alias": "quickFilterFields"; "required": false; "isSignal": true; }; "quickFilterable": { "alias": "quickFilterable"; "required": false; "isSignal": true; }; "quickFilterAlign": { "alias": "quickFilterAlign"; "required": false; "isSignal": true; }; "childrenKey": { "alias": "childrenKey"; "required": false; "isSignal": true; }; }, { "selectedId": "selectedIdChange"; "loadMore": "loadMore"; "selectedIds": "selectedIdsChange"; "columnState": "columnStateChange"; "filters": "filtersChange"; "quickFilter": "quickFilterChange"; "selectionChange": "selectionChange"; "syncChange": "syncChange"; "rowAction": "rowAction"; "lazyLoad": "lazyLoad"; "cellEdit": "cellEdit"; }, ["detailDef", "actionBarDef", "actionBarCaptionDef", "cellDefs"], ["[strctDatagridActionBarCaption]", "[strctDatagridActionBar]"], true, never>;
|
|
4372
4432
|
}
|
|
4373
4433
|
|
|
4374
4434
|
/** Timeline node state colors. */
|