@masterteam/components 0.0.140 → 0.0.142
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/assets/common.css +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs +1 -1
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-client-page-menu.mjs +2 -2
- package/fesm2022/masterteam-components-client-page-menu.mjs.map +1 -1
- package/fesm2022/masterteam-components-client-page.mjs +2 -2
- package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +44 -7
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-paginator.mjs +2 -3
- package/fesm2022/masterteam-components-paginator.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +2 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-statistic-card.mjs +2 -2
- package/fesm2022/masterteam-components-statistic-card.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +69 -27
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-tooltip.mjs +9 -5
- package/fesm2022/masterteam-components-tooltip.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +84 -70
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +11 -10
- package/types/masterteam-components-entities.d.ts +30 -5
- package/types/masterteam-components-table.d.ts +10 -18
|
@@ -5,7 +5,7 @@ import { HttpContext } from '@angular/common/http';
|
|
|
5
5
|
import { MTIcon } from '@masterteam/icons';
|
|
6
6
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
7
7
|
|
|
8
|
-
type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment' | 'LookupMatrix';
|
|
8
|
+
type EntityViewType = 'Text' | 'LongText' | 'Date' | 'DateTime' | 'Percentage' | 'Status' | 'Currency' | 'Checkbox' | 'User' | 'Lookup' | 'Attachment' | 'LookupMatrix' | 'LeafDetails';
|
|
9
9
|
type EntityLabelPosition = 'top' | 'bottom';
|
|
10
10
|
/** Entity size – controls column span (1-24) inside a 24-column grid */
|
|
11
11
|
type EntitySize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
|
|
@@ -55,6 +55,19 @@ interface EntityUserValue {
|
|
|
55
55
|
phoneNumber?: string;
|
|
56
56
|
email?: string;
|
|
57
57
|
}
|
|
58
|
+
interface LeafDetailsStatusSummary {
|
|
59
|
+
key: string;
|
|
60
|
+
display: string;
|
|
61
|
+
color: string | null;
|
|
62
|
+
/** Always 0 in preview/configuration context; populated from runtime fetch */
|
|
63
|
+
count: number;
|
|
64
|
+
}
|
|
65
|
+
interface LeafDetailsEntityValue {
|
|
66
|
+
levelId: number;
|
|
67
|
+
levelName: string;
|
|
68
|
+
levelIcon: string;
|
|
69
|
+
statuses: LeafDetailsStatusSummary[];
|
|
70
|
+
}
|
|
58
71
|
interface EntityAttachmentItemValue {
|
|
59
72
|
id?: string;
|
|
60
73
|
name?: string;
|
|
@@ -72,7 +85,7 @@ interface EntityData {
|
|
|
72
85
|
name?: string;
|
|
73
86
|
rawValue?: string;
|
|
74
87
|
order?: number;
|
|
75
|
-
value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityAttachmentValue;
|
|
88
|
+
value: string | EntityStatusValue | EntityUserValue | EntityLookupValue | EntityAttachmentValue | LeafDetailsEntityValue;
|
|
76
89
|
viewType: EntityViewType;
|
|
77
90
|
type?: string;
|
|
78
91
|
configuration?: EntityConfiguration;
|
|
@@ -278,11 +291,23 @@ declare class EntityAttachment {
|
|
|
278
291
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityAttachment, "mt-entity-attachment", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "endPoint": { "alias": "endPoint"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
279
292
|
}
|
|
280
293
|
|
|
294
|
+
declare class EntityLeafDetails {
|
|
295
|
+
readonly data: _angular_core.InputSignal<EntityData>;
|
|
296
|
+
readonly leafValue: _angular_core.Signal<LeafDetailsEntityValue | null>;
|
|
297
|
+
/** Label shown below the badges: "Level Name (total)" */
|
|
298
|
+
readonly labelWithTotal: _angular_core.Signal<string>;
|
|
299
|
+
/** Always force label to top position, merged with any saved config */
|
|
300
|
+
readonly labelTopConfig: _angular_core.Signal<EntityBaseConfig>;
|
|
301
|
+
statusColor(color: string | null): string;
|
|
302
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityLeafDetails, never>;
|
|
303
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityLeafDetails, "mt-entity-leaf-details", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
304
|
+
}
|
|
305
|
+
|
|
281
306
|
declare class EntityPreview {
|
|
282
307
|
/** Single entity data to display */
|
|
283
308
|
readonly data: _angular_core.InputSignal<EntityData>;
|
|
284
309
|
readonly attachmentShape: _angular_core.InputSignal<"compact" | "default">;
|
|
285
|
-
readonly previewType: _angular_core.Signal<"Text" | "LongText" | "Date" | "DateTime" | "Percentage" | "Status" | "Currency" | "Checkbox" | "User" | "Lookup" | "Attachment">;
|
|
310
|
+
readonly previewType: _angular_core.Signal<"Text" | "LongText" | "Date" | "DateTime" | "Percentage" | "Status" | "Currency" | "Checkbox" | "User" | "Lookup" | "Attachment" | "LeafDetails">;
|
|
286
311
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EntityPreview, never>;
|
|
287
312
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityPreview, "mt-entity-preview", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "attachmentShape": { "alias": "attachmentShape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
288
313
|
}
|
|
@@ -367,5 +392,5 @@ declare class EntitiesManage extends EntitiesResizeBase {
|
|
|
367
392
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntitiesManage, "mt-entities-manage", never, { "entities": { "alias": "entities"; "required": true; "isSignal": true; }; }, { "entities": "entitiesChange"; "entitiesReordered": "entitiesReordered"; "entityClicked": "entityClicked"; }, never, never, true, never>;
|
|
368
393
|
}
|
|
369
394
|
|
|
370
|
-
export { EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityCurrency, EntityDate, EntityField, EntityLongText, EntityLookup, EntityPercentage, EntityPreview, EntityStatus, EntityText, EntityUser };
|
|
371
|
-
export type { EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityConfiguration, EntityData, EntityLabelPosition, EntityLookupValue, EntityPercentageConfig, EntityResizeEvent, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType };
|
|
395
|
+
export { EntitiesManage, EntitiesPreview, EntitiesResizeBase, EntityAttachment, EntityCheckbox, EntityCurrency, EntityDate, EntityField, EntityLeafDetails, EntityLongText, EntityLookup, EntityPercentage, EntityPreview, EntityStatus, EntityText, EntityUser };
|
|
396
|
+
export type { EntityAttachmentItemValue, EntityAttachmentValue, EntityBaseConfig, EntityConfiguration, EntityData, EntityLabelPosition, EntityLookupValue, EntityPercentageConfig, EntityResizeEvent, EntitySize, EntityStatusValue, EntityUserConfig, EntityUserValue, EntityViewType, LeafDetailsEntityValue, LeafDetailsStatusSummary };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as _masterteam_components_table from '@masterteam/components/table';
|
|
2
1
|
import * as _angular_core from '@angular/core';
|
|
3
2
|
import { TemplateRef } from '@angular/core';
|
|
4
3
|
import { MTIcon } from '@masterteam/icons';
|
|
5
4
|
import { ConfirmationConfig, ConfirmationService } from '@masterteam/components/confirmation';
|
|
6
|
-
import {
|
|
5
|
+
import { TablePageEvent } from 'primeng/table';
|
|
7
6
|
import { EntityData } from '@masterteam/components/entities';
|
|
7
|
+
import * as _masterteam_components_table from '@masterteam/components/table';
|
|
8
8
|
import { ControlValueAccessor } from '@angular/forms';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -117,6 +117,7 @@ declare class Table {
|
|
|
117
117
|
exportable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
118
118
|
exportFilename: _angular_core.InputSignal<string>;
|
|
119
119
|
actionShape: _angular_core.InputSignal<TableActionShape>;
|
|
120
|
+
tableLayout: _angular_core.InputSignal<"fixed" | "auto">;
|
|
120
121
|
tabs: _angular_core.InputSignal<any[] | undefined>;
|
|
121
122
|
tabsOptionLabel: _angular_core.InputSignal<string | undefined>;
|
|
122
123
|
tabsOptionValue: _angular_core.InputSignal<string | undefined>;
|
|
@@ -126,8 +127,8 @@ declare class Table {
|
|
|
126
127
|
captionStartContent: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
127
128
|
captionEndContent: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
128
129
|
emptyContent: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
129
|
-
protected tableRef: _angular_core.Signal<Table$1<any> | undefined>;
|
|
130
130
|
paginatorPosition: _angular_core.InputSignal<"end" | "start" | "center">;
|
|
131
|
+
alwaysShowPaginator: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
131
132
|
rowsPerPageOptions: _angular_core.InputSignal<number[]>;
|
|
132
133
|
pageSize: _angular_core.ModelSignal<number>;
|
|
133
134
|
currentPage: _angular_core.ModelSignal<number>;
|
|
@@ -140,19 +141,6 @@ declare class Table {
|
|
|
140
141
|
protected transientSelectedRows: _angular_core.WritableSignal<Set<any>>;
|
|
141
142
|
private readonly hydratedStorageKey;
|
|
142
143
|
private readonly storageHydrated;
|
|
143
|
-
protected exportColumns: _angular_core.Signal<{
|
|
144
|
-
field: string;
|
|
145
|
-
header: string;
|
|
146
|
-
key: string;
|
|
147
|
-
label: string;
|
|
148
|
-
type?: _masterteam_components_table.ColumnType;
|
|
149
|
-
customCellTpl?: TemplateRef<any>;
|
|
150
|
-
filterConfig?: _masterteam_components_table.FilterConfig;
|
|
151
|
-
statusMap?: Record<string, _masterteam_components_table.TableStatusMapValue>;
|
|
152
|
-
sortable?: boolean;
|
|
153
|
-
readonly?: boolean;
|
|
154
|
-
width?: string;
|
|
155
|
-
}[]>;
|
|
156
144
|
protected activeFilterCount: _angular_core.Signal<number>;
|
|
157
145
|
protected filteredData: _angular_core.Signal<any[]>;
|
|
158
146
|
protected displayData: _angular_core.Signal<any[]>;
|
|
@@ -183,7 +171,7 @@ declare class Table {
|
|
|
183
171
|
onRowClick(event: MouseEvent, row: any): void;
|
|
184
172
|
protected updatePagingFromEvent(event: any): void;
|
|
185
173
|
protected emitLazyLoad(event: any): void;
|
|
186
|
-
|
|
174
|
+
exportExcel(): void;
|
|
187
175
|
rowAction(event: Event, action: TableAction, row: any): void;
|
|
188
176
|
private buildUserEntityData;
|
|
189
177
|
private buildStatusEntityData;
|
|
@@ -210,11 +198,14 @@ declare class Table {
|
|
|
210
198
|
private getSortValue;
|
|
211
199
|
private getColumnResolvedValue;
|
|
212
200
|
private buildExportRows;
|
|
201
|
+
private buildExcelRows;
|
|
213
202
|
protected isRowSelected(row: Record<string, unknown>): boolean;
|
|
203
|
+
protected getColumnMinWidth(column: ColumnDef): string | null;
|
|
214
204
|
private emitSelectionChange;
|
|
215
205
|
private getSelectedRows;
|
|
216
206
|
private getRowSelectionKey;
|
|
217
207
|
private getNormalizedStorageKey;
|
|
208
|
+
private normalizeExportFilename;
|
|
218
209
|
private getStorage;
|
|
219
210
|
private buildPersistedState;
|
|
220
211
|
private applyPersistedState;
|
|
@@ -222,9 +213,10 @@ declare class Table {
|
|
|
222
213
|
private readPersistedState;
|
|
223
214
|
private writePersistedState;
|
|
224
215
|
private toPositiveInteger;
|
|
216
|
+
private normalizePersistedPageSize;
|
|
225
217
|
private toNonNegativeInteger;
|
|
226
218
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Table, never>;
|
|
227
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Table, "mt-table", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; "isSignal": true; }; "selectableRows": { "alias": "selectableRows"; "required": false; "isSignal": true; }; "clickableRows": { "alias": "clickableRows"; "required": false; "isSignal": true; }; "generalSearch": { "alias": "generalSearch"; "required": false; "isSignal": true; }; "lazyLocalSearch": { "alias": "lazyLocalSearch"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "updating": { "alias": "updating"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "lazyLocalSort": { "alias": "lazyLocalSort"; "required": false; "isSignal": true; }; "lazyTotalRecords": { "alias": "lazyTotalRecords"; "required": false; "isSignal": true; }; "reorderableColumns": { "alias": "reorderableColumns"; "required": false; "isSignal": true; }; "reorderableRows": { "alias": "reorderableRows"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "storageKey": { "alias": "storageKey"; "required": false; "isSignal": true; }; "storageMode": { "alias": "storageMode"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "actionShape": { "alias": "actionShape"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "tabsOptionLabel": { "alias": "tabsOptionLabel"; "required": false; "isSignal": true; }; "tabsOptionValue": { "alias": "tabsOptionValue"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "paginatorPosition": { "alias": "paginatorPosition"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "cellChange": "cellChange"; "lazyLoad": "lazyLoad"; "columnReorder": "columnReorder"; "rowReorder": "rowReorder"; "rowClick": "rowClick"; "filters": "filtersChange"; "activeTab": "activeTabChange"; "onTabChange": "onTabChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "first": "firstChange"; "filterTerm": "filterTermChange"; }, ["captionStartContent", "captionEndContent", "emptyContent"], never, true, never>;
|
|
219
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Table, "mt-table", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "rowActions": { "alias": "rowActions"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; "isSignal": true; }; "selectableRows": { "alias": "selectableRows"; "required": false; "isSignal": true; }; "clickableRows": { "alias": "clickableRows"; "required": false; "isSignal": true; }; "generalSearch": { "alias": "generalSearch"; "required": false; "isSignal": true; }; "lazyLocalSearch": { "alias": "lazyLocalSearch"; "required": false; "isSignal": true; }; "showFilters": { "alias": "showFilters"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "updating": { "alias": "updating"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; "lazyLocalSort": { "alias": "lazyLocalSort"; "required": false; "isSignal": true; }; "lazyTotalRecords": { "alias": "lazyTotalRecords"; "required": false; "isSignal": true; }; "reorderableColumns": { "alias": "reorderableColumns"; "required": false; "isSignal": true; }; "reorderableRows": { "alias": "reorderableRows"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "storageKey": { "alias": "storageKey"; "required": false; "isSignal": true; }; "storageMode": { "alias": "storageMode"; "required": false; "isSignal": true; }; "exportable": { "alias": "exportable"; "required": false; "isSignal": true; }; "exportFilename": { "alias": "exportFilename"; "required": false; "isSignal": true; }; "actionShape": { "alias": "actionShape"; "required": false; "isSignal": true; }; "tableLayout": { "alias": "tableLayout"; "required": false; "isSignal": true; }; "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; "tabsOptionLabel": { "alias": "tabsOptionLabel"; "required": false; "isSignal": true; }; "tabsOptionValue": { "alias": "tabsOptionValue"; "required": false; "isSignal": true; }; "activeTab": { "alias": "activeTab"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "paginatorPosition": { "alias": "paginatorPosition"; "required": false; "isSignal": true; }; "alwaysShowPaginator": { "alias": "alwaysShowPaginator"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "cellChange": "cellChange"; "lazyLoad": "lazyLoad"; "columnReorder": "columnReorder"; "rowReorder": "rowReorder"; "rowClick": "rowClick"; "filters": "filtersChange"; "activeTab": "activeTabChange"; "onTabChange": "onTabChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "first": "firstChange"; "filterTerm": "filterTermChange"; }, ["captionStartContent", "captionEndContent", "emptyContent"], never, true, never>;
|
|
228
220
|
}
|
|
229
221
|
|
|
230
222
|
declare class TableFilter implements ControlValueAccessor {
|