@elasticias/ui 1.0.14 → 1.0.16
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/elasticias-ui.mjs +197 -59
- package/fesm2022/elasticias-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/elasticias-ui.d.ts +142 -32
package/package.json
CHANGED
package/types/elasticias-ui.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { PipeTransform, OnInit, OnChanges, TemplateRef, EventEmitter, AfterContentInit, OnDestroy, SimpleChanges, InjectionToken, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { Menu } from 'primeng/menu';
|
|
4
4
|
import * as _elasticias_core from '@elasticias/core';
|
|
5
|
-
import { EfBuildPackage,
|
|
5
|
+
import { EfBuildPackage, EfModule, EfNavSection, EfNavItem, EfModuleId, EfToast, EfToastAction, EfThemeConfigService } from '@elasticias/core';
|
|
6
6
|
import * as i1 from 'primeng/tooltip';
|
|
7
7
|
import * as _elasticias_screens from '@elasticias/screens';
|
|
8
|
-
import { ScreenContext, EfDetailToolbarAction, EfSearchToolbarAction, EfDataCardColumn, EfDataCardSort, EfDateRange, EfDatePresetKey } from '@elasticias/screens';
|
|
8
|
+
import { ScreenContext, EfDetailToolbarAction, EfSearchToolbarAction, EfDataCardColumn, EfDataCardSort, EfDataCardExportRequest, EfDateRange, EfDatePresetKey } from '@elasticias/screens';
|
|
9
9
|
export { EfDataCardColumn, EfDataCardColumnAlign, EfDataCardColumnMobileRole, EfDataCardColumnType, EfDataCardSort, EfDataCardSortDirection, EfDatePresetKey, EfDateRange, EfDetailToolbarAction, EfSearchToolbarAction } from '@elasticias/screens';
|
|
10
10
|
import { BlockableUI } from 'primeng/api';
|
|
11
11
|
import { SafeResourceUrl } from '@angular/platform-browser';
|
|
@@ -1079,6 +1079,24 @@ declare class EfTooltipDirective {
|
|
|
1079
1079
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EfTooltipDirective, "[efTooltip]", never, {}, {}, never, never, true, [{ directive: typeof i1.Tooltip; inputs: { "pTooltip": "efTooltip"; "tooltipPosition": "efTooltipPosition"; "tooltipDisabled": "efTooltipDisabled"; "tooltipStyleClass": "efTooltipStyleClass"; "tooltipEvent": "efTooltipEvent"; "showDelay": "efTooltipShowDelay"; "hideDelay": "efTooltipHideDelay"; "appendTo": "efTooltipAppendTo"; "autoHide": "efTooltipAutoHide"; "escape": "efTooltipEscape"; "life": "efTooltipLife"; }; outputs: {}; }]>;
|
|
1080
1080
|
}
|
|
1081
1081
|
|
|
1082
|
+
/**
|
|
1083
|
+
* The three tiers a shortcut can belong to, outer to inner: a Global
|
|
1084
|
+
* shortcut works anywhere in the app, a Screen shortcut works anywhere on
|
|
1085
|
+
* the current screen, a Row shortcut only while a row's menu is open.
|
|
1086
|
+
* `list()` returns groups in registration order, which is really "whatever
|
|
1087
|
+
* happened to construct first." This fixes the section order so it
|
|
1088
|
+
* always reads outer to inner regardless of what rendered when.
|
|
1089
|
+
*/
|
|
1090
|
+
/** One action and every key bound to it, which is what a reader wants: the
|
|
1091
|
+
* action once, its bindings beside it. */
|
|
1092
|
+
interface ShortcutActionView {
|
|
1093
|
+
labelKey: string;
|
|
1094
|
+
keys: string[];
|
|
1095
|
+
}
|
|
1096
|
+
interface ShortcutGroupView {
|
|
1097
|
+
group: string;
|
|
1098
|
+
actions: ShortcutActionView[];
|
|
1099
|
+
}
|
|
1082
1100
|
/**
|
|
1083
1101
|
* The keyboard-shortcuts reference: every registration currently sitting
|
|
1084
1102
|
* in `EfShortcutService`, grouped and rendered with the same `.kbd` chip
|
|
@@ -1098,14 +1116,16 @@ declare class EfShortcutsDialogComponent {
|
|
|
1098
1116
|
private readonly shortcutService;
|
|
1099
1117
|
/** Two-way open state. */
|
|
1100
1118
|
readonly visible: _angular_core.ModelSignal<boolean>;
|
|
1101
|
-
/** `list()`, reordered Global → Screen → Row
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
*
|
|
1107
|
-
*
|
|
1108
|
-
|
|
1119
|
+
/** `list()`, reordered Global → Screen → Row, with the bindings for one
|
|
1120
|
+
* action collapsed onto a single row.
|
|
1121
|
+
*
|
|
1122
|
+
* An action can be reachable by more than one key: opening this dialog
|
|
1123
|
+
* answers to both `?` and `mod+/`. Listing registrations verbatim
|
|
1124
|
+
* printed that action's name twice, once per binding, which reads as a
|
|
1125
|
+
* duplicate rather than as a choice. An unrecognised group (a future
|
|
1126
|
+
* tier this component does not know about) sorts last rather than
|
|
1127
|
+
* being dropped. */
|
|
1128
|
+
protected readonly groups: _angular_core.Signal<ShortcutGroupView[]>;
|
|
1109
1129
|
protected readonly closeAction: EfDialogAction[];
|
|
1110
1130
|
protected formatKeys(keys: string): string;
|
|
1111
1131
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfShortcutsDialogComponent, never>;
|
|
@@ -1744,41 +1764,67 @@ declare class EfFabComponent {
|
|
|
1744
1764
|
}
|
|
1745
1765
|
|
|
1746
1766
|
interface EfPillItem<T = string> {
|
|
1767
|
+
/** Value emitted when the pill is picked. */
|
|
1747
1768
|
value: T;
|
|
1748
|
-
/**
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1769
|
+
/**
|
|
1770
|
+
* Translation key for the pill's label. Required, like every other
|
|
1771
|
+
* `ef-*` control: the component translates, the caller never does.
|
|
1772
|
+
*
|
|
1773
|
+
* A value that is not a known key falls through to itself, which is
|
|
1774
|
+
* what lets a label already resolved from reference data (a seeded
|
|
1775
|
+
* status name, say) render correctly until that data carries keys of
|
|
1776
|
+
* its own.
|
|
1777
|
+
*/
|
|
1778
|
+
labelKey: string;
|
|
1752
1779
|
/** Optional count rendered after a thin separator. */
|
|
1753
1780
|
count?: number;
|
|
1754
1781
|
}
|
|
1755
1782
|
/**
|
|
1756
|
-
* Segmented pill filter
|
|
1757
|
-
* set of options — "Toutes · 87 / À approuver · 14 / En retard · 3".
|
|
1783
|
+
* Segmented pill filter — "Toutes · 87 / À approuver · 14 / En retard · 3".
|
|
1758
1784
|
*
|
|
1759
1785
|
* ```html
|
|
1760
1786
|
* <ef-pill-group
|
|
1761
|
-
* [items]="
|
|
1762
|
-
* [(value)]="
|
|
1763
|
-
*
|
|
1787
|
+
* [items]="statusBuckets()"
|
|
1788
|
+
* [(value)]="statusFilter"
|
|
1789
|
+
* ariaLabelKey="sales_orders_status_aria"
|
|
1764
1790
|
* />
|
|
1765
1791
|
* ```
|
|
1766
1792
|
*
|
|
1767
|
-
* The active pill
|
|
1768
|
-
*
|
|
1769
|
-
*
|
|
1793
|
+
* The active pill takes a contrast fill (`--ink-active`); inactive pills
|
|
1794
|
+
* sit on transparent ground with muted text.
|
|
1795
|
+
*
|
|
1796
|
+
* **It scrolls rather than clipping.** Nine status filters with French
|
|
1797
|
+
* labels are roughly 676px wide, and the hand-rolled `.pill-group` this
|
|
1798
|
+
* replaces was `inline-flex` with no wrap and no scroller — so on a
|
|
1799
|
+
* 390px phone the last five filters could not be reached at all. The row
|
|
1800
|
+
* now scrolls inside itself, fades at whichever edge has more content,
|
|
1801
|
+
* and keeps the selected pill in view. Pills never squeeze: a pill
|
|
1802
|
+
* radius on a box that has wrapped to two lines is not a pill.
|
|
1770
1803
|
*/
|
|
1771
1804
|
declare class EfPillGroupComponent<T = string> {
|
|
1772
|
-
items:
|
|
1773
|
-
|
|
1774
|
-
|
|
1805
|
+
readonly items: _angular_core.InputSignal<readonly EfPillItem<T>[]>;
|
|
1806
|
+
/** Two-way bound selection. */
|
|
1807
|
+
readonly value: _angular_core.ModelSignal<T>;
|
|
1808
|
+
/** Translation key for the group's accessible name. */
|
|
1809
|
+
readonly ariaLabelKey: _angular_core.InputSignal<string>;
|
|
1775
1810
|
/** Hide counts even when items provide them. */
|
|
1776
|
-
hideCounts: boolean
|
|
1777
|
-
readonly
|
|
1778
|
-
|
|
1779
|
-
|
|
1811
|
+
readonly hideCounts: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1812
|
+
private readonly scroller;
|
|
1813
|
+
/** Whether content is hidden past each edge, which drives the fades. */
|
|
1814
|
+
private readonly overflowStart;
|
|
1815
|
+
private readonly overflowEnd;
|
|
1816
|
+
protected readonly fadeClass: _angular_core.Signal<{
|
|
1817
|
+
'has-fade-start': boolean;
|
|
1818
|
+
'has-fade-end': boolean;
|
|
1819
|
+
}>;
|
|
1820
|
+
constructor();
|
|
1821
|
+
protected select(item: EfPillItem<T>): void;
|
|
1822
|
+
protected onScroll(): void;
|
|
1823
|
+
protected trackValue: (_: number, item: EfPillItem<T>) => T;
|
|
1824
|
+
private measure;
|
|
1825
|
+
private scrollActiveIntoView;
|
|
1780
1826
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfPillGroupComponent<any>, never>;
|
|
1781
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfPillGroupComponent<any>, "ef-pill-group", never, { "items": { "alias": "items"; "required": true; }; "value": { "alias": "value"; "required": false; }; "
|
|
1827
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfPillGroupComponent<any>, "ef-pill-group", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabelKey": { "alias": "ariaLabelKey"; "required": false; "isSignal": true; }; "hideCounts": { "alias": "hideCounts"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
1782
1828
|
}
|
|
1783
1829
|
|
|
1784
1830
|
/** Visual treatment of the tabset. `'pill'` is the default. */
|
|
@@ -3886,7 +3932,13 @@ interface EfDatatableConfig {
|
|
|
3886
3932
|
styleClass?: string;
|
|
3887
3933
|
/** Inline table styles */
|
|
3888
3934
|
tableStyle?: Record<string, string>;
|
|
3889
|
-
/**
|
|
3935
|
+
/**
|
|
3936
|
+
* Translation key for the no-data message. Prefer this over
|
|
3937
|
+
* `emptyMessage`: the old default was a hardcoded, unaccented French
|
|
3938
|
+
* string that rendered in every language.
|
|
3939
|
+
*/
|
|
3940
|
+
emptyMessageKey?: string;
|
|
3941
|
+
/** @deprecated Untranslatable. Use `emptyMessageKey`. */
|
|
3890
3942
|
emptyMessage?: string;
|
|
3891
3943
|
/** Pagination report template */
|
|
3892
3944
|
currentPageReportTemplate?: string;
|
|
@@ -4334,6 +4386,39 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4334
4386
|
readonly showDensityControl: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4335
4387
|
/** Render the Columns picker in the head row. */
|
|
4336
4388
|
readonly showColumnPicker: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4389
|
+
/**
|
|
4390
|
+
* Render the Export control beside Density and Columns. It sits here
|
|
4391
|
+
* rather than in the page toolbar because it acts on the result set,
|
|
4392
|
+
* the way density and the column picker do -- the toolbar is for
|
|
4393
|
+
* page-level actions like creating a record.
|
|
4394
|
+
*/
|
|
4395
|
+
readonly showExportControl: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4396
|
+
/**
|
|
4397
|
+
* True while the host is assembling the file. A full export pages the
|
|
4398
|
+
* server and can run for seconds, so the control has to say it is
|
|
4399
|
+
* working rather than look idle and ignore further clicks.
|
|
4400
|
+
*/
|
|
4401
|
+
readonly exporting: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4402
|
+
/**
|
|
4403
|
+
* Screen context used to gate Export. Falls back to
|
|
4404
|
+
* `rowActionsContext`, which every list screen already supplies, so
|
|
4405
|
+
* moving Export out of `ef-search-toolbar` does not quietly drop the
|
|
4406
|
+
* permission check that lived there.
|
|
4407
|
+
*/
|
|
4408
|
+
readonly screenContext: _angular_core.InputSignal<ScreenContext>;
|
|
4409
|
+
/**
|
|
4410
|
+
* Mirrors `ef-search-toolbar`'s rule exactly: hidden unless asked for,
|
|
4411
|
+
* and with a context present it obeys `hasExportPermission`. No
|
|
4412
|
+
* context means no permission model is in play, so it renders.
|
|
4413
|
+
*/
|
|
4414
|
+
readonly canExport: _angular_core.Signal<boolean>;
|
|
4415
|
+
/**
|
|
4416
|
+
* The active free-text query, used only to word the empty state. When
|
|
4417
|
+
* this is set, zero rows means "nothing matched what you typed" and the
|
|
4418
|
+
* user is offered a way back; when it is empty, zero rows means the
|
|
4419
|
+
* collection itself is empty, which is a different message.
|
|
4420
|
+
*/
|
|
4421
|
+
readonly searchTerm: _angular_core.InputSignal<string>;
|
|
4337
4422
|
/**
|
|
4338
4423
|
* Stable key used to remember density and hidden columns for this
|
|
4339
4424
|
* table. Preferences are a per-viewer convenience, so they live in
|
|
@@ -4350,6 +4435,13 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4350
4435
|
action: EfDataCardRowAction;
|
|
4351
4436
|
row: TRow;
|
|
4352
4437
|
}>;
|
|
4438
|
+
/**
|
|
4439
|
+
* Export the current result set. The card holds the columns but not the
|
|
4440
|
+
* query, so the host screen fetches the rows and writes the file.
|
|
4441
|
+
*/
|
|
4442
|
+
readonly exportRequest: _angular_core.OutputEmitterRef<EfDataCardExportRequest>;
|
|
4443
|
+
/** Raised by the empty state's "clear search" action. */
|
|
4444
|
+
readonly clearSearch: _angular_core.OutputEmitterRef<void>;
|
|
4353
4445
|
private readonly bodyTemplates;
|
|
4354
4446
|
private readonly headerTemplates;
|
|
4355
4447
|
private readonly bodyTemplateMap;
|
|
@@ -4402,6 +4494,24 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4402
4494
|
* the bulk bar and the per-row menu with no way back. */
|
|
4403
4495
|
readonly hideableColumns: _angular_core.Signal<EfDataCardColumn[]>;
|
|
4404
4496
|
toggleTool(tool: 'density' | 'columns'): void;
|
|
4497
|
+
/**
|
|
4498
|
+
* Hand the host screen everything it needs to write the file: the
|
|
4499
|
+
* columns the viewer can actually see, in the order they see them, and
|
|
4500
|
+
* the rows already on screen as a fallback for hosts that do not fetch.
|
|
4501
|
+
* `select` and `actions` are chrome, never data, so they are dropped.
|
|
4502
|
+
*/
|
|
4503
|
+
requestExport(): void;
|
|
4504
|
+
/**
|
|
4505
|
+
* Cell value as it belongs in a file rather than on screen.
|
|
4506
|
+
*
|
|
4507
|
+
* Numbers and dates stay raw, because a spreadsheet wants a number it
|
|
4508
|
+
* can total and a date it can sort. Reference and status columns do
|
|
4509
|
+
* not: their stored value is an id or a code, and a column of
|
|
4510
|
+
* `71d4431cd16141338ffcf635` tells the reader nothing. Those resolve
|
|
4511
|
+
* through the same lookup the table renders with, so the file says
|
|
4512
|
+
* what the screen said.
|
|
4513
|
+
*/
|
|
4514
|
+
private exportCellValue;
|
|
4405
4515
|
setDensity(value: EfTableDensity): void;
|
|
4406
4516
|
isColumnHidden(id: string): boolean;
|
|
4407
4517
|
toggleColumn(id: string): void;
|
|
@@ -4424,7 +4534,7 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4424
4534
|
trackByRow: (_: number, row: TRow) => unknown;
|
|
4425
4535
|
trackByColumn: (_: number, col: EfDataCardColumn) => string;
|
|
4426
4536
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfDataCardComponent<any>, never>;
|
|
4427
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfDataCardComponent<any>, "ef-data-card", never, { "mobileLayout": { "alias": "mobileLayout"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "trackByField": { "alias": "trackByField"; "required": false; "isSignal": true; }; "pageNumber": { "alias": "pageNumber"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "totalCount": { "alias": "totalCount"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "hidePager": { "alias": "hidePager"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "errorMsg": { "alias": "errorMsg"; "required": false; "isSignal": true; }; "loadingKey": { "alias": "loadingKey"; "required": false; "isSignal": true; }; "rowDoubleClickable": { "alias": "rowDoubleClickable"; "required": false; "isSignal": true; }; "hasActionsColumn": { "alias": "hasActionsColumn"; "required": false; "isSignal": true; }; "rowActionsContext": { "alias": "rowActionsContext"; "required": false; "isSignal": true; }; "showViewAction": { "alias": "showViewAction"; "required": false; "isSignal": true; }; "showEditAction": { "alias": "showEditAction"; "required": false; "isSignal": true; }; "showDuplicateAction": { "alias": "showDuplicateAction"; "required": false; "isSignal": true; }; "showDeleteAction": { "alias": "showDeleteAction"; "required": false; "isSignal": true; }; "showDensityControl": { "alias": "showDensityControl"; "required": false; "isSignal": true; }; "showColumnPicker": { "alias": "showColumnPicker"; "required": false; "isSignal": true; }; "tableKey": { "alias": "tableKey"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; "sortChange": "sortChange"; "rowDoubleClick": "rowDoubleClick"; "rowAction": "rowAction"; }, ["bodyTemplates", "headerTemplates"], ["[tbl-head-info]", "[tbl-head-actions]", "[empty-state-mobile]", "[empty-state]"], true, never>;
|
|
4537
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EfDataCardComponent<any>, "ef-data-card", never, { "mobileLayout": { "alias": "mobileLayout"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "trackByField": { "alias": "trackByField"; "required": false; "isSignal": true; }; "pageNumber": { "alias": "pageNumber"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "totalCount": { "alias": "totalCount"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "hidePager": { "alias": "hidePager"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "errorMsg": { "alias": "errorMsg"; "required": false; "isSignal": true; }; "loadingKey": { "alias": "loadingKey"; "required": false; "isSignal": true; }; "rowDoubleClickable": { "alias": "rowDoubleClickable"; "required": false; "isSignal": true; }; "hasActionsColumn": { "alias": "hasActionsColumn"; "required": false; "isSignal": true; }; "rowActionsContext": { "alias": "rowActionsContext"; "required": false; "isSignal": true; }; "showViewAction": { "alias": "showViewAction"; "required": false; "isSignal": true; }; "showEditAction": { "alias": "showEditAction"; "required": false; "isSignal": true; }; "showDuplicateAction": { "alias": "showDuplicateAction"; "required": false; "isSignal": true; }; "showDeleteAction": { "alias": "showDeleteAction"; "required": false; "isSignal": true; }; "showDensityControl": { "alias": "showDensityControl"; "required": false; "isSignal": true; }; "showColumnPicker": { "alias": "showColumnPicker"; "required": false; "isSignal": true; }; "showExportControl": { "alias": "showExportControl"; "required": false; "isSignal": true; }; "exporting": { "alias": "exporting"; "required": false; "isSignal": true; }; "screenContext": { "alias": "screenContext"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "tableKey": { "alias": "tableKey"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; "sortChange": "sortChange"; "rowDoubleClick": "rowDoubleClick"; "rowAction": "rowAction"; "exportRequest": "exportRequest"; "clearSearch": "clearSearch"; }, ["bodyTemplates", "headerTemplates"], ["[tbl-head-info]", "[tbl-head-actions]", "[empty-state-mobile]", "[empty-state]"], true, never>;
|
|
4428
4538
|
}
|
|
4429
4539
|
|
|
4430
4540
|
/**
|