@messaia/cdk 20.0.0-RC.6 → 20.0.0-RC.7
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/messaia-cdk.mjs +30 -7
- package/fesm2022/messaia-cdk.mjs.map +1 -1
- package/index.d.ts +12 -1
- package/package.json +1 -1
package/fesm2022/messaia-cdk.mjs
CHANGED
|
@@ -11353,9 +11353,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImpor
|
|
|
11353
11353
|
args: [{ providedIn: 'root' }]
|
|
11354
11354
|
}], ctorParameters: () => [{ type: i0.Compiler }] });
|
|
11355
11355
|
|
|
11356
|
+
/**
|
|
11357
|
+
* Represents a user-defined action that can be performed on an entity.
|
|
11358
|
+
* @template TEntity The type of the entity the action operates on.
|
|
11359
|
+
* @template TContext The type of the context in which the action is executed.
|
|
11360
|
+
*/
|
|
11356
11361
|
class ActionItem {
|
|
11357
11362
|
/**
|
|
11358
|
-
*
|
|
11363
|
+
* Unique identifier for the action item.
|
|
11364
|
+
* @type {string}
|
|
11365
|
+
*/
|
|
11366
|
+
id = '';
|
|
11367
|
+
/**
|
|
11368
|
+
* The display title of the action item.
|
|
11369
|
+
* Used in UI components like buttons or menus.
|
|
11359
11370
|
* @type {string}
|
|
11360
11371
|
*/
|
|
11361
11372
|
title;
|
|
@@ -17347,7 +17358,7 @@ class VdDynamicTableComponent {
|
|
|
17347
17358
|
var actionColmun = this._columns?.find(x => x.name == 'action');
|
|
17348
17359
|
/* If so, just add the menu items to it */
|
|
17349
17360
|
if (actionColmun != null) {
|
|
17350
|
-
actionColmun.menu ||= { icon: 'more_vert' };
|
|
17361
|
+
actionColmun.menu ||= { id: 'more', icon: 'more_vert' };
|
|
17351
17362
|
this.rowMenuItems.forEach(y => actionColmun.menu.items?.unshift(y));
|
|
17352
17363
|
}
|
|
17353
17364
|
/* Otherwise add a new one */
|
|
@@ -17358,7 +17369,7 @@ class VdDynamicTableComponent {
|
|
|
17358
17369
|
columnSets: ['action', 'common'],
|
|
17359
17370
|
type: TableColumnType.Action,
|
|
17360
17371
|
disabled: true,
|
|
17361
|
-
menu: { icon: 'more_vert', items: this.rowMenuItems },
|
|
17372
|
+
menu: { id: 'more', icon: 'more_vert', items: this.rowMenuItems },
|
|
17362
17373
|
configurable: false,
|
|
17363
17374
|
stickyEnd: true
|
|
17364
17375
|
}));
|
|
@@ -18351,6 +18362,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18351
18362
|
* @type {ActionItem[]}
|
|
18352
18363
|
*/
|
|
18353
18364
|
toolbarActions = [{
|
|
18365
|
+
id: 'refresh',
|
|
18354
18366
|
icon: 'refresh',
|
|
18355
18367
|
tooltip: $localize `:@@refreshList:Refresh the list`,
|
|
18356
18368
|
event: () => this.loadList()
|
|
@@ -18860,6 +18872,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18860
18872
|
/* Add 'Delete selected' menu item */
|
|
18861
18873
|
if (this.deletable) {
|
|
18862
18874
|
this.toolbarMenuItems.push({
|
|
18875
|
+
id: 'delete-selected',
|
|
18863
18876
|
title: $localize `:@@deleteSelected:Delete selected`,
|
|
18864
18877
|
icon: 'delete_forever',
|
|
18865
18878
|
iconClass: 'tc-orange-800',
|
|
@@ -18871,6 +18884,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18871
18884
|
/* Opens config dialog */
|
|
18872
18885
|
if (this.configurable) {
|
|
18873
18886
|
this.toolbarMenuItems.push({
|
|
18887
|
+
id: 'configure-table',
|
|
18874
18888
|
title: $localize `:@@configureTable:Configure table`,
|
|
18875
18889
|
icon: 'settings',
|
|
18876
18890
|
event: () => this.openConfigDialog()
|
|
@@ -18879,6 +18893,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18879
18893
|
/* Opens export dialog */
|
|
18880
18894
|
if (this.exportable) {
|
|
18881
18895
|
this.toolbarMenuItems.push({
|
|
18896
|
+
id: 'export-data',
|
|
18882
18897
|
title: $localize `:@@exportData:Export data`,
|
|
18883
18898
|
icon: 'download',
|
|
18884
18899
|
iconClass: 'tc-blue-500',
|
|
@@ -18889,7 +18904,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18889
18904
|
/* Sort the menu items by index */
|
|
18890
18905
|
Utils.sortArray(this.toolbarMenuItems, 'index');
|
|
18891
18906
|
/* Add the toolbar menu items to the the toolbar actions */
|
|
18892
|
-
this.toolbarActions.push({ icon: 'more_vert', items: this.toolbarMenuItems });
|
|
18907
|
+
this.toolbarActions.push({ id: 'more', icon: 'more_vert', items: this.toolbarMenuItems });
|
|
18893
18908
|
}
|
|
18894
18909
|
}
|
|
18895
18910
|
/**
|
|
@@ -18911,6 +18926,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18911
18926
|
/* Add duplicate menu */
|
|
18912
18927
|
if (this.duplicable) {
|
|
18913
18928
|
this.rowMenuItems.unshift({
|
|
18929
|
+
id: 'duplicate',
|
|
18914
18930
|
title: $localize `:@@duplicate:Duplicate`,
|
|
18915
18931
|
icon: 'file_copy',
|
|
18916
18932
|
event: (row) => this.duplicate(row),
|
|
@@ -18920,6 +18936,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18920
18936
|
/* Add download menu */
|
|
18921
18937
|
if (this.downloadable) {
|
|
18922
18938
|
this.rowMenuItems.unshift({
|
|
18939
|
+
id: 'download',
|
|
18923
18940
|
title: $localize `:@@download:Download`,
|
|
18924
18941
|
icon: 'file_download',
|
|
18925
18942
|
event: (row) => this.download(row),
|
|
@@ -18929,6 +18946,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18929
18946
|
/* Add delete menu */
|
|
18930
18947
|
if (this.deletable && this.canDelete) {
|
|
18931
18948
|
this.rowMenuItems.unshift({
|
|
18949
|
+
id: 'delete',
|
|
18932
18950
|
title: $localize `:@@delete:Delete`,
|
|
18933
18951
|
icon: 'delete_forever',
|
|
18934
18952
|
iconClass: 'tc-orange-800',
|
|
@@ -18939,6 +18957,7 @@ class GenericListComponent extends BaseComponent {
|
|
|
18939
18957
|
/* Add edit menu */
|
|
18940
18958
|
if (this.editable && this.canUpdate) {
|
|
18941
18959
|
this.rowMenuItems.unshift({
|
|
18960
|
+
id: 'edit',
|
|
18942
18961
|
title: $localize `:@@edit:Edit`,
|
|
18943
18962
|
icon: 'edit_note',
|
|
18944
18963
|
iconClass: 'tc-blue-400',
|
|
@@ -19172,14 +19191,16 @@ class GenericEmbeddedListComponent extends GenericListComponent {
|
|
|
19172
19191
|
* Menu options for managing a list of items, including delete and more options.
|
|
19173
19192
|
*/
|
|
19174
19193
|
itemListMenu = [
|
|
19194
|
+
/* Option to remove the selected item from the list */
|
|
19175
19195
|
{
|
|
19176
|
-
|
|
19196
|
+
id: 'delete',
|
|
19177
19197
|
icon: 'delete_forever',
|
|
19178
19198
|
event: (_, __, i) => this.removeItem(i),
|
|
19179
19199
|
hide: (item) => (item?.id ?? 0) > 0
|
|
19180
19200
|
},
|
|
19201
|
+
/* Action to show additional options for the item */
|
|
19181
19202
|
{
|
|
19182
|
-
|
|
19203
|
+
id: 'more',
|
|
19183
19204
|
icon: 'more_vert',
|
|
19184
19205
|
hide: (item) => (item?.id ?? 0) <= 0,
|
|
19185
19206
|
items: this.rowMenuItems
|
|
@@ -19649,6 +19670,7 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
19649
19670
|
* Toolbar action buttons.
|
|
19650
19671
|
*/
|
|
19651
19672
|
toolbarActions = [{
|
|
19673
|
+
id: 'refresh',
|
|
19652
19674
|
icon: 'refresh',
|
|
19653
19675
|
tooltip: $localize `:@@refreshPage:Refresh the page`,
|
|
19654
19676
|
event: () => this.reloadPage(),
|
|
@@ -20069,6 +20091,7 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20069
20091
|
/* Add 'Delete' menu item */
|
|
20070
20092
|
if (this.deletable) {
|
|
20071
20093
|
this.toolbarMenuItems.push({
|
|
20094
|
+
id: 'delete',
|
|
20072
20095
|
title: $localize `:@@delete:Delete`,
|
|
20073
20096
|
icon: 'delete_forever',
|
|
20074
20097
|
iconClass: 'tc-orange-800',
|
|
@@ -20082,7 +20105,7 @@ class GenericFormBaseComponent extends BaseComponent {
|
|
|
20082
20105
|
/* Sort the menu items by index */
|
|
20083
20106
|
Utils.sortArray(this.toolbarMenuItems, 'index');
|
|
20084
20107
|
/* Add the toolbar menu items to the the toolbar actions */
|
|
20085
|
-
this.toolbarActions.push({ icon: 'more_vert', items: this.toolbarMenuItems });
|
|
20108
|
+
this.toolbarActions.push({ id: 'more', icon: 'more_vert', items: this.toolbarMenuItems });
|
|
20086
20109
|
}
|
|
20087
20110
|
}
|
|
20088
20111
|
/**
|