@elasticias/ui 1.0.15 → 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 +166 -40
- package/fesm2022/elasticias-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/elasticias-ui.d.ts +113 -23
package/package.json
CHANGED
package/types/elasticias-ui.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import * as _elasticias_core from '@elasticias/core';
|
|
|
5
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';
|
|
@@ -1764,41 +1764,67 @@ declare class EfFabComponent {
|
|
|
1764
1764
|
}
|
|
1765
1765
|
|
|
1766
1766
|
interface EfPillItem<T = string> {
|
|
1767
|
+
/** Value emitted when the pill is picked. */
|
|
1767
1768
|
value: T;
|
|
1768
|
-
/**
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
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;
|
|
1772
1779
|
/** Optional count rendered after a thin separator. */
|
|
1773
1780
|
count?: number;
|
|
1774
1781
|
}
|
|
1775
1782
|
/**
|
|
1776
|
-
* Segmented pill filter
|
|
1777
|
-
* set of options — "Toutes · 87 / À approuver · 14 / En retard · 3".
|
|
1783
|
+
* Segmented pill filter — "Toutes · 87 / À approuver · 14 / En retard · 3".
|
|
1778
1784
|
*
|
|
1779
1785
|
* ```html
|
|
1780
1786
|
* <ef-pill-group
|
|
1781
|
-
* [items]="
|
|
1782
|
-
* [(value)]="
|
|
1783
|
-
*
|
|
1787
|
+
* [items]="statusBuckets()"
|
|
1788
|
+
* [(value)]="statusFilter"
|
|
1789
|
+
* ariaLabelKey="sales_orders_status_aria"
|
|
1784
1790
|
* />
|
|
1785
1791
|
* ```
|
|
1786
1792
|
*
|
|
1787
|
-
* The active pill
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
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.
|
|
1790
1803
|
*/
|
|
1791
1804
|
declare class EfPillGroupComponent<T = string> {
|
|
1792
|
-
items:
|
|
1793
|
-
|
|
1794
|
-
|
|
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>;
|
|
1795
1810
|
/** Hide counts even when items provide them. */
|
|
1796
|
-
hideCounts: boolean
|
|
1797
|
-
readonly
|
|
1798
|
-
|
|
1799
|
-
|
|
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;
|
|
1800
1826
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfPillGroupComponent<any>, never>;
|
|
1801
|
-
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>;
|
|
1802
1828
|
}
|
|
1803
1829
|
|
|
1804
1830
|
/** Visual treatment of the tabset. `'pill'` is the default. */
|
|
@@ -3906,7 +3932,13 @@ interface EfDatatableConfig {
|
|
|
3906
3932
|
styleClass?: string;
|
|
3907
3933
|
/** Inline table styles */
|
|
3908
3934
|
tableStyle?: Record<string, string>;
|
|
3909
|
-
/**
|
|
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`. */
|
|
3910
3942
|
emptyMessage?: string;
|
|
3911
3943
|
/** Pagination report template */
|
|
3912
3944
|
currentPageReportTemplate?: string;
|
|
@@ -4354,6 +4386,39 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4354
4386
|
readonly showDensityControl: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
4355
4387
|
/** Render the Columns picker in the head row. */
|
|
4356
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>;
|
|
4357
4422
|
/**
|
|
4358
4423
|
* Stable key used to remember density and hidden columns for this
|
|
4359
4424
|
* table. Preferences are a per-viewer convenience, so they live in
|
|
@@ -4370,6 +4435,13 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4370
4435
|
action: EfDataCardRowAction;
|
|
4371
4436
|
row: TRow;
|
|
4372
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>;
|
|
4373
4445
|
private readonly bodyTemplates;
|
|
4374
4446
|
private readonly headerTemplates;
|
|
4375
4447
|
private readonly bodyTemplateMap;
|
|
@@ -4422,6 +4494,24 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4422
4494
|
* the bulk bar and the per-row menu with no way back. */
|
|
4423
4495
|
readonly hideableColumns: _angular_core.Signal<EfDataCardColumn[]>;
|
|
4424
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;
|
|
4425
4515
|
setDensity(value: EfTableDensity): void;
|
|
4426
4516
|
isColumnHidden(id: string): boolean;
|
|
4427
4517
|
toggleColumn(id: string): void;
|
|
@@ -4444,7 +4534,7 @@ declare class EfDataCardComponent<TRow = any> implements AfterContentInit {
|
|
|
4444
4534
|
trackByRow: (_: number, row: TRow) => unknown;
|
|
4445
4535
|
trackByColumn: (_: number, col: EfDataCardColumn) => string;
|
|
4446
4536
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EfDataCardComponent<any>, never>;
|
|
4447
|
-
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>;
|
|
4448
4538
|
}
|
|
4449
4539
|
|
|
4450
4540
|
/**
|