@acorex/platform 20.3.0-next.1 → 20.3.0-next.3

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.
Files changed (113) hide show
  1. package/common/index.d.ts +120 -5
  2. package/core/index.d.ts +102 -61
  3. package/fesm2022/acorex-platform-auth.mjs +20 -20
  4. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-common.mjs +136 -112
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +287 -198
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-domain.mjs +16 -16
  10. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-builder.mjs +1226 -687
  12. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-components.mjs +1525 -129
  14. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-designer.mjs +159 -204
  16. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-entity.mjs +3674 -1154
  18. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-views.mjs +387 -86
  20. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-native.mjs +7 -7
  22. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-runtime.mjs +40 -40
  24. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs → acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs} +6 -6
  26. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs.map} +1 -1
  27. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs +708 -0
  28. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs → acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs} +6 -13
  30. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs +244 -0
  32. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs.map +1 -0
  33. package/fesm2022/{acorex-platform-themes-default-error-401.component-D4glpFvU.mjs → acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs} +4 -4
  34. package/fesm2022/{acorex-platform-themes-default-error-401.component-D4glpFvU.mjs.map → acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs.map} +1 -1
  35. package/fesm2022/{acorex-platform-themes-default-error-404.component-BvGeDMjo.mjs → acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs} +4 -4
  36. package/fesm2022/{acorex-platform-themes-default-error-404.component-BvGeDMjo.mjs.map → acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-themes-default-error-offline.component-BINy-Zo3.mjs → acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs} +4 -4
  38. package/fesm2022/{acorex-platform-themes-default-error-offline.component-BINy-Zo3.mjs.map → acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs.map} +1 -1
  39. package/fesm2022/acorex-platform-themes-default.mjs +64 -509
  40. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  41. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-C833prGO.mjs → acorex-platform-themes-shared-icon-chooser-view.component-KpZWpnOJ.mjs} +4 -4
  42. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-C833prGO.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-KpZWpnOJ.mjs.map} +1 -1
  43. package/fesm2022/acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs.map +1 -1
  44. package/fesm2022/{acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-BvOiVCgt.mjs} +4 -4
  45. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BvOiVCgt.mjs.map +1 -0
  46. package/fesm2022/{acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BW0rfkjk.mjs} +4 -4
  47. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BW0rfkjk.mjs.map +1 -0
  48. package/fesm2022/acorex-platform-themes-shared.mjs +50 -52
  49. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  50. package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-lNF95FJv.mjs → acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs} +6 -6
  51. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs.map +1 -0
  52. package/fesm2022/{acorex-platform-widgets-checkbox-widget-column.component-BNBOATPB.mjs → acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs} +4 -5
  53. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs.map +1 -0
  54. package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs → acorex-platform-widgets-checkbox-widget-designer.component-JC_nYunG.mjs} +5 -5
  55. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-JC_nYunG.mjs.map +1 -0
  56. package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-C6-QPsnb.mjs → acorex-platform-widgets-checkbox-widget-view.component-C-4bWr9G.mjs} +4 -4
  57. package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-C6-QPsnb.mjs.map → acorex-platform-widgets-checkbox-widget-view.component-C-4bWr9G.mjs.map} +1 -1
  58. package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-pYOQv5g8.mjs → acorex-platform-widgets-color-box-widget-designer.component-CxgKO2VI.mjs} +5 -5
  59. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CxgKO2VI.mjs.map +1 -0
  60. package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs +50 -0
  61. package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs.map +1 -0
  62. package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs +42 -0
  63. package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs.map +1 -0
  64. package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs +55 -0
  65. package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs.map +1 -0
  66. package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs +50 -0
  67. package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs.map +1 -0
  68. package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs +48 -0
  69. package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs.map +1 -0
  70. package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs +42 -0
  71. package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs.map +1 -0
  72. package/fesm2022/{acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs → acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs} +71 -6
  73. package/fesm2022/acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs.map +1 -0
  74. package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DRsLkulH.mjs → acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs} +77 -67
  75. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs.map +1 -0
  76. package/fesm2022/{acorex-platform-widgets-rich-text-popup.component-CM_v-cL4.mjs → acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs} +4 -4
  77. package/fesm2022/{acorex-platform-widgets-rich-text-popup.component-CM_v-cL4.mjs.map → acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs.map} +1 -1
  78. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs} +8 -8
  79. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs.map} +1 -1
  80. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs → acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs} +6 -6
  81. package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs.map} +1 -1
  82. package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-CCMQtH3e.mjs → acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs} +10 -14
  83. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs.map +1 -0
  84. package/fesm2022/acorex-platform-widgets.mjs +3953 -2138
  85. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  86. package/fesm2022/acorex-platform-workflow.mjs +28 -25
  87. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  88. package/layout/builder/index.d.ts +361 -181
  89. package/layout/components/index.d.ts +372 -25
  90. package/layout/designer/index.d.ts +16 -47
  91. package/layout/entity/index.d.ts +255 -336
  92. package/layout/views/index.d.ts +129 -22
  93. package/package.json +23 -37
  94. package/widgets/index.d.ts +372 -230
  95. package/workflow/index.d.ts +4 -1
  96. package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs +0 -22
  97. package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs +0 -665
  99. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs +0 -236
  102. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs.map +0 -1
  105. package/fesm2022/acorex-platform-widgets-button-widget-designer.component-lNF95FJv.mjs.map +0 -1
  106. package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-BNBOATPB.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs.map +0 -1
  108. package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-pYOQv5g8.mjs.map +0 -1
  109. package/fesm2022/acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs.map +0 -1
  110. package/fesm2022/acorex-platform-widgets-file-rename-popup.component-DA_CgIvm.mjs +0 -211
  111. package/fesm2022/acorex-platform-widgets-file-rename-popup.component-DA_CgIvm.mjs.map +0 -1
  112. package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DRsLkulH.mjs.map +0 -1
  113. package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-CCMQtH3e.mjs.map +0 -1
@@ -0,0 +1,708 @@
1
+ import { AXActionSheetModule } from '@acorex/components/action-sheet';
2
+ import * as i7 from '@acorex/components/data-table';
3
+ import { AXDataTableModule } from '@acorex/components/data-table';
4
+ import { AXDrawerModule } from '@acorex/components/drawer';
5
+ import * as i1$1 from '@acorex/core/platform';
6
+ import * as i0 from '@angular/core';
7
+ import { inject, input, viewChild, signal, ViewEncapsulation, Component, computed, effect, Input, ChangeDetectionStrategy } from '@angular/core';
8
+ import { ActivatedRoute, RouterModule } from '@angular/router';
9
+ import { AXBadgeModule } from '@acorex/components/badge';
10
+ import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
11
+ import * as i3$1 from '@acorex/components/button';
12
+ import { AXButtonModule } from '@acorex/components/button';
13
+ import * as i2 from '@acorex/components/decorators';
14
+ import { AXDecoratorModule } from '@acorex/components/decorators';
15
+ import { AXDialogModule } from '@acorex/components/dialog';
16
+ import * as i5 from '@acorex/components/dropdown';
17
+ import { AXDropdownModule } from '@acorex/components/dropdown';
18
+ import { AXFormModule } from '@acorex/components/form';
19
+ import { AXLoadingModule } from '@acorex/components/loading';
20
+ import * as i3$2 from '@acorex/components/popover';
21
+ import { AXPopoverModule } from '@acorex/components/popover';
22
+ import * as i6 from '@acorex/components/search-box';
23
+ import { AXSearchBoxModule } from '@acorex/components/search-box';
24
+ import { AXTabsModule } from '@acorex/components/tabs';
25
+ import { AXTooltipModule } from '@acorex/components/tooltip';
26
+ import * as i10 from '@acorex/core/translation';
27
+ import { AXTranslationService, AXTranslationModule, translateSync } from '@acorex/core/translation';
28
+ import { AXPAuthModule } from '@acorex/platform/auth';
29
+ import * as i7$1 from '@acorex/platform/layout/builder';
30
+ import { AXPLayoutBuilderModule } from '@acorex/platform/layout/builder';
31
+ import { AXPThemeLayoutBlockComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutToolbarComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryViewsComponent, AXPQueryColumnsComponent, AXPThemeLayoutStartSideComponent } from '@acorex/platform/layout/components';
32
+ import { AXPWidgetsModule } from '@acorex/platform/widgets';
33
+ import { DragDropModule } from '@angular/cdk/drag-drop';
34
+ import * as i1 from '@angular/common';
35
+ import { CommonModule } from '@angular/common';
36
+ import { FormsModule } from '@angular/forms';
37
+ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
38
+ import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
39
+ import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
40
+ import * as i3 from '@acorex/components/skeleton';
41
+ import { AXSkeletonModule } from '@acorex/components/skeleton';
42
+ import * as i2$1 from '@acorex/components/tree-view';
43
+ import { AXTreeViewModule } from '@acorex/components/tree-view';
44
+ import { AXPWorkflowService } from '@acorex/platform/workflow';
45
+ import { AXPEntityResolver, AXPEntityListViewColumnViewModel } from '@acorex/platform/layout/entity';
46
+
47
+ class AXPEntityCategoryComponent {
48
+ constructor() {
49
+ this.entityResolver = inject(AXPEntityResolver);
50
+ this.translate = inject(AXTranslationService);
51
+ this.workflow = inject(AXPWorkflowService);
52
+ this.vm = input.required(...(ngDevMode ? [{ debugName: "vm" }] : []));
53
+ this.tree = viewChild('tree', ...(ngDevMode ? [{ debugName: "tree" }] : []));
54
+ this.searchValue = input('', ...(ngDevMode ? [{ debugName: "searchValue" }] : []));
55
+ this.isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
56
+ this.basicQueryEvent = {
57
+ skip: 0,
58
+ take: 1000,
59
+ };
60
+ this.treeItems = signal([
61
+ {
62
+ expand: true,
63
+ children: [],
64
+ },
65
+ ], ...(ngDevMode ? [{ debugName: "treeItems" }] : []));
66
+ }
67
+ ngOnInit() {
68
+ this.getCategories();
69
+ }
70
+ async handleCategorySearchChange(e) {
71
+ if (this.categoryEntityDef) {
72
+ this.isLoading.set(true);
73
+ const categoryInlineFilters = this.categoryEntityDef.properties.filter((p) => p.options?.filter?.inline?.enabled);
74
+ const event = {
75
+ ...this.basicQueryEvent,
76
+ filter: {
77
+ filters: [
78
+ {
79
+ filters: categoryInlineFilters.map((cif) => ({
80
+ field: cif.name,
81
+ operator: {
82
+ type: 'contains',
83
+ },
84
+ value: e.value,
85
+ })),
86
+ logic: 'or',
87
+ },
88
+ {
89
+ value: true,
90
+ field: this.categoryEntityDef.parentKey,
91
+ operator: {
92
+ type: 'isEmpty',
93
+ },
94
+ },
95
+ ],
96
+ logic: 'and',
97
+ },
98
+ };
99
+ const res = await this.categoryEntityQueryFunc(event);
100
+ this.treeItems.update((prev) => prev.map((item) => ({ ...item, children: res.items })));
101
+ this.isLoading.set(false);
102
+ }
103
+ }
104
+ async getCategories() {
105
+ this.isLoading.set(true);
106
+ this.categoryEntityDef = await this.getCategoryEntityDef();
107
+ this.categoryEntityQueryFunc = this.categoryEntityDef?.queries.list?.execute;
108
+ const res = await this.categoryEntityQueryFunc(this.basicQueryEvent);
109
+ const textField = this.vm().entityDef.category?.textField || 'title';
110
+ const valueField = this.vm().entityDef.category?.valueField || 'id';
111
+ const updatedItems = {
112
+ expand: true,
113
+ [textField]: await this.translate.translateAsync('allItems'),
114
+ [valueField]: 'all',
115
+ children: res.items,
116
+ };
117
+ this.treeItems.update((prev) => prev.map((_) => updatedItems));
118
+ this.isLoading.set(false);
119
+ }
120
+ async handleCollapseChanged(e) {
121
+ await this.loadChildrenAtNode(e.data.id);
122
+ }
123
+ async getCategoryEntityDef() {
124
+ const [module, entity] = this.vm().entityDef.category?.entity?.split('.') || [];
125
+ return await this.entityResolver.get(module, entity);
126
+ }
127
+ handleNodeClick(event) {
128
+ const filters = this.vm()
129
+ .entityDef.category?.applyConditions?.map((f) => {
130
+ return event.data[f.value] !== 'all'
131
+ ? {
132
+ field: f.name,
133
+ value: event.data[f.value],
134
+ operator: f.operator,
135
+ }
136
+ : null;
137
+ })
138
+ .filter((item) => item != null);
139
+ const viewFilters = this.vm()
140
+ .view()
141
+ .conditions.map((i) => ({ ...i, field: i.name }));
142
+ console.log({ viewFilters });
143
+ const newFilters = [...viewFilters, ...filters];
144
+ // this.vm().filterQueries.update((prev) => [...prev, ...filters!]);
145
+ this.vm().dataSource.filter({
146
+ filters: newFilters,
147
+ logic: 'and',
148
+ });
149
+ this.vm().dataSource.refresh();
150
+ }
151
+ //#region ---- Utility Methods ----
152
+ /** Loads children for a given node id and updates the tree in place. */
153
+ async loadChildrenAtNode(targetId) {
154
+ this.tree()?.setNodeLoading(targetId, true);
155
+ const event = {
156
+ ...this.basicQueryEvent,
157
+ filter: {
158
+ field: this.categoryEntityDef?.parentKey,
159
+ value: targetId,
160
+ operator: { type: 'equal' },
161
+ },
162
+ };
163
+ const children = await this.categoryEntityQueryFunc(event);
164
+ const updateChildrenAtPath = (items, id) => {
165
+ return items.map((item) => {
166
+ if (item.id === id) {
167
+ return { ...item, children: children.items };
168
+ }
169
+ if (item.children?.length) {
170
+ return { ...item, children: updateChildrenAtPath(item.children, id) };
171
+ }
172
+ return item;
173
+ });
174
+ };
175
+ this.treeItems.update((prev) => prev.map((i) => ({ ...i, children: updateChildrenAtPath(prev[0].children, targetId) })));
176
+ this.tree()?.setNodeLoading(targetId, false);
177
+ }
178
+ /** Returns the module.entity key for the configured category entity. */
179
+ getCategoryEntityKey() {
180
+ return this.vm().entityDef.category?.entity;
181
+ }
182
+ /** Refresh tree after CRUD operations. */
183
+ async refreshAfterChange(parentId) {
184
+ if (parentId) {
185
+ await this.loadChildrenAtNode(parentId);
186
+ }
187
+ else {
188
+ await this.getCategories();
189
+ }
190
+ }
191
+ //#endregion
192
+ //#region ---- UI Handlers ----
193
+ /** Create a new root category node. */
194
+ async handleCreateRootClick(e) {
195
+ e.nativeEvent.preventDefault();
196
+ e.nativeEvent.stopPropagation();
197
+ await this.workflow.execute('create-entity', {
198
+ entity: this.getCategoryEntityKey(),
199
+ options: { process: { redirect: false } },
200
+ });
201
+ await this.refreshAfterChange();
202
+ }
203
+ /** Create a new child under the given node. */
204
+ async handleCreateChildClick(node, e) {
205
+ e.nativeEvent.preventDefault();
206
+ e.nativeEvent.stopPropagation();
207
+ const parentKey = this.categoryEntityDef?.parentKey;
208
+ const data = {};
209
+ if (parentKey) {
210
+ data[parentKey] = node.id;
211
+ }
212
+ await this.workflow.execute('create-entity', {
213
+ entity: this.getCategoryEntityKey(),
214
+ data,
215
+ options: { process: { redirect: false, canCreateNewOne: true } },
216
+ });
217
+ await this.refreshAfterChange(node.id);
218
+ }
219
+ /** Update the given node. */
220
+ async handleEditNodeClick(node, e) {
221
+ e.nativeEvent.preventDefault();
222
+ e.nativeEvent.stopPropagation();
223
+ await this.workflow.execute('quick-modify-entity', {
224
+ entity: this.getCategoryEntityKey(),
225
+ data: node,
226
+ options: { layout: { size: 'md' } },
227
+ });
228
+ await this.refreshAfterChange(node[this.categoryEntityDef?.parentKey]);
229
+ }
230
+ /** Delete the given node. */
231
+ async handleDeleteNodeClick(node, e) {
232
+ e.nativeEvent.preventDefault();
233
+ e.nativeEvent.stopPropagation();
234
+ await this.workflow.execute('delete-entity', {
235
+ entity: this.getCategoryEntityKey(),
236
+ data: node,
237
+ options: { process: { showResult: true } },
238
+ });
239
+ await this.refreshAfterChange(node[this.categoryEntityDef?.parentKey]);
240
+ }
241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
242
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPEntityCategoryComponent, isStandalone: true, selector: "axp-entity-category", inputs: { vm: { classPropertyName: "vm", publicName: "vm", isSignal: true, isRequired: true, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true, isSignal: true }], ngImport: i0, template: "<axp-layout-header>\n <axp-layout-title>{{ vm().entityDef.category?.title || 'category' | translate | async }}</axp-layout-title>\n <axp-layout-toolbar>\n <ax-search-box (onValueChanged)=\"handleCategorySearchChange($event)\" [delayTime]=\"300\"\n [placeholder]=\"'search.placeholder' | translate | async\">\n </ax-search-box>\n </axp-layout-toolbar>\n</axp-layout-header>\n<axp-layout-content>\n @if (isLoading()) {\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n } @else if (treeItems()[0].children.length) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\">\n <ax-tree-view (onNodeClick)=\"handleNodeClick($event)\" (onCollapsedChanged)=\"handleCollapseChanged($event)\"\n [showCheckbox]=\"false\" [itemTemplate]=\"itemTemplate\" #treeRef\n [textField]=\"vm().entityDef.category?.textField || 'title'\"\n [valueField]=\"vm().entityDef.category?.valueField || 'id'\" [expandedField]=\"'expand'\" [items]=\"treeItems()\" #tree>\n </ax-tree-view>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-center\">\n <span class=\"ax-text-center\"> No Record Found! </span>\n </div>\n }\n\n <ng-template #itemTemplate let-item>\n <div class=\"ax-flex ax-items-center ax-justify-between ax-w-full ax-gap-2 ax-overflow-hidden\">\n <div class=\"ax-flex ax-items-center ax-gap-2 ax-min-w-0\">\n <ax-icon class=\"fas ax-text-warning fa-folder\"></ax-icon>\n <span class=\"ax-truncate\">{{ item.title }}</span>\n </div>\n @if (item.id && item.id !== 'all') {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" color=\"default\" look=\"blank\" (onClick)=\"$event.nativeEvent.stopPropagation()\">\n <ax-icon class=\"fas fa-ellipsis-v\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleCreateChildClick(item, $event)\" look=\"blank\" color=\"default\"\n text=\"Add New Child\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleEditNodeClick(item, $event)\" look=\"blank\" text=\"Edit\">\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleDeleteNodeClick(item, $event)\" color=\"danger\" look=\"blank\" text=\"Delete\">\n <ax-icon class=\"fas fa-trash\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n } @else if (item.id === 'all') {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" (onClick)=\"handleCreateRootClick($event)\" look=\"blank\" color=\"default\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </ng-template>\n</axp-layout-content>", styles: ["ax-tree-view-item .ax-tree-view-items{width:100%;min-width:0px}ax-tree-view-item .ax-tree-view-items>div{width:100%}ax-tree-view-item .ax-state-tree-view-active{background-color:rgb(var(--ax-sys-color-light-surface))!important;color:rgb(var(--ax-sys-color-on-light-surface))!important;border-color:rgb(var(--ax-sys-color-border-light-surface))!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTreeViewModule }, { kind: "component", type: i2$1.AXTreeViewComponent, selector: "ax-tree-view", inputs: ["items", "showCheckbox", "hasCheckboxField", "selectionMode", "selectionBehavior", "selectionScope", "focusNodeEnabled", "valueField", "textField", "visibleField", "disableField", "hasChildField", "selectedField", "expandedField", "tooltipField", "childrenField", "activeField", "indeterminateField", "parentField", "iconField", "toggleIcons", "look", "showEmptyNodeMassage", "itemTemplate", "emptyTemplate", "expandOn"], outputs: ["onSelectionChanged", "onItemSelectedChanged", "onNodeClick", "onCollapsedChanged", "onNodedbClick"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i3.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutToolbarComponent, selector: "axp-layout-toolbar" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3$1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3$1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i5.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
243
+ }
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityCategoryComponent, decorators: [{
245
+ type: Component,
246
+ args: [{ selector: 'axp-entity-category', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
247
+ CommonModule,
248
+ AXDecoratorModule,
249
+ AXTreeViewModule,
250
+ AXSkeletonModule,
251
+ AXPThemeLayoutBlockComponent,
252
+ AXSearchBoxModule,
253
+ AXPThemeLayoutHeaderComponent,
254
+ AXPThemeLayoutToolbarComponent,
255
+ AXTranslationModule,
256
+ AXButtonModule,
257
+ AXDropdownModule
258
+ ], template: "<axp-layout-header>\n <axp-layout-title>{{ vm().entityDef.category?.title || 'category' | translate | async }}</axp-layout-title>\n <axp-layout-toolbar>\n <ax-search-box (onValueChanged)=\"handleCategorySearchChange($event)\" [delayTime]=\"300\"\n [placeholder]=\"'search.placeholder' | translate | async\">\n </ax-search-box>\n </axp-layout-toolbar>\n</axp-layout-header>\n<axp-layout-content>\n @if (isLoading()) {\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n } @else if (treeItems()[0].children.length) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\">\n <ax-tree-view (onNodeClick)=\"handleNodeClick($event)\" (onCollapsedChanged)=\"handleCollapseChanged($event)\"\n [showCheckbox]=\"false\" [itemTemplate]=\"itemTemplate\" #treeRef\n [textField]=\"vm().entityDef.category?.textField || 'title'\"\n [valueField]=\"vm().entityDef.category?.valueField || 'id'\" [expandedField]=\"'expand'\" [items]=\"treeItems()\" #tree>\n </ax-tree-view>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-center\">\n <span class=\"ax-text-center\"> No Record Found! </span>\n </div>\n }\n\n <ng-template #itemTemplate let-item>\n <div class=\"ax-flex ax-items-center ax-justify-between ax-w-full ax-gap-2 ax-overflow-hidden\">\n <div class=\"ax-flex ax-items-center ax-gap-2 ax-min-w-0\">\n <ax-icon class=\"fas ax-text-warning fa-folder\"></ax-icon>\n <span class=\"ax-truncate\">{{ item.title }}</span>\n </div>\n @if (item.id && item.id !== 'all') {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" color=\"default\" look=\"blank\" (onClick)=\"$event.nativeEvent.stopPropagation()\">\n <ax-icon class=\"fas fa-ellipsis-v\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleCreateChildClick(item, $event)\" look=\"blank\" color=\"default\"\n text=\"Add New Child\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleEditNodeClick(item, $event)\" look=\"blank\" text=\"Edit\">\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleDeleteNodeClick(item, $event)\" color=\"danger\" look=\"blank\" text=\"Delete\">\n <ax-icon class=\"fas fa-trash\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n } @else if (item.id === 'all') {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" (onClick)=\"handleCreateRootClick($event)\" look=\"blank\" color=\"default\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </ng-template>\n</axp-layout-content>", styles: ["ax-tree-view-item .ax-tree-view-items{width:100%;min-width:0px}ax-tree-view-item .ax-tree-view-items>div{width:100%}ax-tree-view-item .ax-state-tree-view-active{background-color:rgb(var(--ax-sys-color-light-surface))!important;color:rgb(var(--ax-sys-color-on-light-surface))!important;border-color:rgb(var(--ax-sys-color-border-light-surface))!important}\n"] }]
259
+ }] });
260
+
261
+ class AXPEntityMasterToolbarViewComponent {
262
+ constructor() {
263
+ this.layoutService = inject(AXPLayoutThemeService);
264
+ this.parent = inject(AXPEntityMasterListViewComponent);
265
+ this.isInitializing = false;
266
+ this.pendingInitialFilters = true;
267
+ this.pendingInitialSorts = true;
268
+ this.initialFilters = signal([], ...(ngDevMode ? [{ debugName: "initialFilters" }] : []));
269
+ this.filtersDefinitions = signal([], ...(ngDevMode ? [{ debugName: "filtersDefinitions" }] : []));
270
+ this.viewQueries = computed(() => this.vm.views().map((v) => ({
271
+ name: v.name,
272
+ fixed: false,
273
+ title: v.title,
274
+ columns: v.columns,
275
+ conditions: v.conditions.map((c) => ({
276
+ field: c.name,
277
+ operator: c.operator,
278
+ value: c.value,
279
+ })),
280
+ sorts: v.sorts,
281
+ })), ...(ngDevMode ? [{ debugName: "viewQueries" }] : []));
282
+ this.selectedViewQuery = computed(() => ({
283
+ name: this.vm.view().name,
284
+ fixed: false,
285
+ title: this.vm.view().title,
286
+ columns: this.vm.view().columns,
287
+ conditions: this.vm.view().conditions.map((c) => ({
288
+ field: c.name,
289
+ operator: c.operator,
290
+ value: c.value,
291
+ })),
292
+ sorts: this.vm.view().sorts,
293
+ }), ...(ngDevMode ? [{ debugName: "selectedViewQuery" }] : []));
294
+ // Debounced apply to coalesce multiple UI changes (filters/sorts/columns)
295
+ this.applyTimer = null;
296
+ this.#effect = effect(() => {
297
+ // Keep definitions up to date; initial filters are set explicitly from settings or view
298
+ this.filtersDefinitions.set(this.vm.filtersDef);
299
+ }, ...(ngDevMode ? [{ debugName: "#effect" }] : []));
300
+ this.sortQueries = computed(() => this.vm
301
+ .sortedFields()
302
+ .filter((s) => !!s.dir)
303
+ .map((s) => ({ name: s.name, dir: s.dir })), ...(ngDevMode ? [{ debugName: "sortQueries" }] : []));
304
+ this.sortDefinitions = computed(() => this.vm.sortableFields().map((s) => ({
305
+ name: s.name,
306
+ title: s.title,
307
+ dir: s.dir,
308
+ })), ...(ngDevMode ? [{ debugName: "sortDefinitions" }] : []));
309
+ }
310
+ async ngOnInit() {
311
+ // Prefer saved settings (view/columns/sorts/filters) if available, then apply
312
+ await this.vm.setView();
313
+ this.filtersDefinitions.set(this.vm.filtersDef);
314
+ this.isInitializing = true;
315
+ // this.pendingInitialFilters = true;
316
+ // this.pendingInitialSorts = true;
317
+ this.setInitialFiltersFromSettingsOrView();
318
+ // Ensure initial load even when filters/sorts are absent
319
+ setTimeout(() => {
320
+ this.isInitializing = false;
321
+ this.scheduleApply();
322
+ }, 0);
323
+ }
324
+ scheduleApply() {
325
+ clearTimeout(this.applyTimer);
326
+ this.applyTimer = setTimeout(() => {
327
+ this.vm.applyFilterAndSort();
328
+ }, 50);
329
+ }
330
+ async onViewChanged(view) {
331
+ await this.vm.setView(view.name);
332
+ this.isInitializing = true;
333
+ this.pendingInitialFilters = true;
334
+ this.pendingInitialSorts = true;
335
+ this.setInitialFiltersFromSettingsOrView();
336
+ // Ensure initial load after view change
337
+ setTimeout(() => {
338
+ this.isInitializing = false;
339
+ this.scheduleApply();
340
+ }, 0);
341
+ }
342
+ #effect;
343
+ setInitialFiltersFromSettingsOrView() {
344
+ const saved = this.vm.filterQueries();
345
+ const viewConditions = this.vm.view().conditions.map((c) => c.name);
346
+ if (saved && saved.length) {
347
+ this.initialFilters.set(saved.map((s) => ({ ...s, hidden: viewConditions.includes(s.field) })));
348
+ return;
349
+ }
350
+ this.initialFilters.set(this.vm.view().conditions.map((c) => ({
351
+ field: c.name,
352
+ operator: c.operator,
353
+ value: c.value,
354
+ hidden: true,
355
+ })));
356
+ }
357
+ onFiltersChanged(filters) {
358
+ if (this.isInitializing || this.pendingInitialFilters) {
359
+ this.pendingInitialFilters = false;
360
+ return;
361
+ }
362
+ this.vm.filterQueries.set(filters);
363
+ // Persist filters per module/entity/view
364
+ this.vm.saveSettings('filters', filters);
365
+ this.scheduleApply();
366
+ }
367
+ onSortQueriesChange(e) {
368
+ if (this.isInitializing || this.pendingInitialSorts) {
369
+ this.pendingInitialSorts = false;
370
+ return;
371
+ }
372
+ this.vm.sortedFields.set(e.map((s) => ({
373
+ name: s.name,
374
+ title: s.name,
375
+ dir: s.dir,
376
+ })));
377
+ // Persist sorts per module/entity/view
378
+ this.vm.saveSettings('sorts', e);
379
+ this.scheduleApply();
380
+ }
381
+ onColumnsChange(columns) {
382
+ this.vm.columns.update(() => {
383
+ const existingColumns = this.vm.columns();
384
+ const columnMap = new Map(existingColumns.map((c) => [
385
+ c.name,
386
+ {
387
+ property: c.property,
388
+ column: c.column,
389
+ },
390
+ ]));
391
+ return columns.map((newColumn) => {
392
+ const existing = columnMap.get(newColumn.name);
393
+ const col = new AXPEntityListViewColumnViewModel(existing.property, {
394
+ ...existing.column,
395
+ options: {
396
+ ...existing.column.options,
397
+ visible: newColumn.visible,
398
+ },
399
+ });
400
+ return col;
401
+ });
402
+ });
403
+ // Persist column order/visibility
404
+ this.vm.onColumnsChanged(this.vm.columns());
405
+ // Use debounced apply to avoid triple refresh when combined with sorts/filters
406
+ // this.scheduleApply();
407
+ }
408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
409
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPEntityMasterToolbarViewComponent, isStandalone: true, selector: "axp-entity-master-toolbar-view", inputs: { vm: ["viewModel", "vm"] }, host: { classAttribute: "ax-w-full" }, ngImport: i0, template: "<!-- <axp-entity-view-toolbar [viewModel]=\"vm\"></axp-entity-view-toolbar> -->\n<axp-query-views\n [views]=\"viewQueries()\"\n [selectedView]=\"selectedViewQuery()\"\n (selectedViewChange)=\"onViewChanged($event)\"\n></axp-query-views>\n<div class=\"ax-flex ax-items-center ax-gap-2 ax-border-b ax-border-light w-full\">\n <!-- <axp-entity-filter-toolbar [viewModel]=\"vm\"></axp-entity-filter-toolbar> -->\n <axp-query-filters\n [filtersDefinitions]=\"filtersDefinitions()\"\n [initialFilters]=\"initialFilters()\"\n (onFiltersChanged)=\"onFiltersChanged($event)\"\n ></axp-query-filters>\n\n <div class=\"ax-flex ax-items-center ax-gap-1 md:ax-gap-2\">\n <ax-button [iconOnly]=\"true\" #columnButton [color]=\"'default'\">\n <i class=\"fa-light fa-table-columns\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"30\"\n [target]=\"columnButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.columns' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-query-columns [columns]=\"vm.columns()\" (columnsChange)=\"onColumnsChange($event)\"></axp-query-columns>\n <!-- <axp-list-view-option-columns [viewModel]=\"vm\"></axp-list-view-option-columns> -->\n </div>\n </div>\n </ax-popover>\n @if (vm.canSort()) {\n <ax-button [iconOnly]=\"true\" [text]=\"'Sorts'\" #sortButton [color]=\"'default'\">\n <i class=\"fa-light fa-sort-amount-up\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"sortButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.sorts' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <!-- <axp-list-view-option-sorting [viewModel]=\"vm\"></axp-list-view-option-sorting> -->\n <axp-query-sorts\n [sortDefinitions]=\"sortDefinitions()\"\n (sortQueriesChange)=\"onSortQueriesChange($event)\"\n [initialSortQueries]=\"sortQueries()\"\n ></axp-query-sorts>\n </div>\n </div>\n </ax-popover>\n }\n @if (layoutService.isSmall()) {\n <ax-button (onClick)=\"parent.toggleCategoryDrawer()\" [iconOnly]=\"true\" [color]=\"'default'\">\n <i class=\"fa-light fa-bars\"></i>\n </ax-button>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPQueryFiltersComponent, selector: "axp-query-filters", inputs: ["filtersDefinitions", "initialFilters"], outputs: ["onFiltersChanged"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3$2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPQuerySortsComponent, selector: "axp-query-sorts", inputs: ["sortDefinitions", "initialSortQueries"], outputs: ["sortDefinitionsChange", "sortQueriesChange"] }, { kind: "component", type: AXPQueryViewsComponent, selector: "axp-query-views", inputs: ["views", "selectedView"], outputs: ["viewsChange", "selectedViewChange"] }, { kind: "component", type: AXPQueryColumnsComponent, selector: "axp-query-columns", inputs: ["columns"], outputs: ["columnsChange"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
410
+ }
411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, decorators: [{
412
+ type: Component,
413
+ args: [{ selector: 'axp-entity-master-toolbar-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
414
+ CommonModule,
415
+ AXButtonModule,
416
+ AXDecoratorModule,
417
+ AXTranslationModule,
418
+ AXPQueryFiltersComponent,
419
+ AXPopoverModule,
420
+ AXPQuerySortsComponent,
421
+ AXPQueryViewsComponent,
422
+ AXPQueryColumnsComponent,
423
+ ], host: {
424
+ class: 'ax-w-full',
425
+ }, template: "<!-- <axp-entity-view-toolbar [viewModel]=\"vm\"></axp-entity-view-toolbar> -->\n<axp-query-views\n [views]=\"viewQueries()\"\n [selectedView]=\"selectedViewQuery()\"\n (selectedViewChange)=\"onViewChanged($event)\"\n></axp-query-views>\n<div class=\"ax-flex ax-items-center ax-gap-2 ax-border-b ax-border-light w-full\">\n <!-- <axp-entity-filter-toolbar [viewModel]=\"vm\"></axp-entity-filter-toolbar> -->\n <axp-query-filters\n [filtersDefinitions]=\"filtersDefinitions()\"\n [initialFilters]=\"initialFilters()\"\n (onFiltersChanged)=\"onFiltersChanged($event)\"\n ></axp-query-filters>\n\n <div class=\"ax-flex ax-items-center ax-gap-1 md:ax-gap-2\">\n <ax-button [iconOnly]=\"true\" #columnButton [color]=\"'default'\">\n <i class=\"fa-light fa-table-columns\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"30\"\n [target]=\"columnButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.columns' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-query-columns [columns]=\"vm.columns()\" (columnsChange)=\"onColumnsChange($event)\"></axp-query-columns>\n <!-- <axp-list-view-option-columns [viewModel]=\"vm\"></axp-list-view-option-columns> -->\n </div>\n </div>\n </ax-popover>\n @if (vm.canSort()) {\n <ax-button [iconOnly]=\"true\" [text]=\"'Sorts'\" #sortButton [color]=\"'default'\">\n <i class=\"fa-light fa-sort-amount-up\"></i>\n </ax-button>\n <ax-popover\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"sortButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ 'entity.sorts' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <!-- <axp-list-view-option-sorting [viewModel]=\"vm\"></axp-list-view-option-sorting> -->\n <axp-query-sorts\n [sortDefinitions]=\"sortDefinitions()\"\n (sortQueriesChange)=\"onSortQueriesChange($event)\"\n [initialSortQueries]=\"sortQueries()\"\n ></axp-query-sorts>\n </div>\n </div>\n </ax-popover>\n }\n @if (layoutService.isSmall()) {\n <ax-button (onClick)=\"parent.toggleCategoryDrawer()\" [iconOnly]=\"true\" [color]=\"'default'\">\n <i class=\"fa-light fa-bars\"></i>\n </ax-button>\n }\n </div>\n</div>\n" }]
426
+ }], propDecorators: { vm: [{
427
+ type: Input,
428
+ args: ['viewModel']
429
+ }] } });
430
+
431
+ class AXPEntityMasterListViewComponent extends AXPPageLayoutBaseComponent {
432
+ constructor(platform) {
433
+ super();
434
+ this.platform = platform;
435
+ this.activeRoute = inject(ActivatedRoute);
436
+ this.vm = this.activeRoute.snapshot.data['vm'];
437
+ //
438
+ this.store = inject(AXPLayoutThemeService);
439
+ //
440
+ this.searchBarShown = signal(true, ...(ngDevMode ? [{ debugName: "searchBarShown" }] : []));
441
+ this.activeEndSideView = signal('column', ...(ngDevMode ? [{ debugName: "activeEndSideView" }] : []));
442
+ this.categorySearchValue = signal('', ...(ngDevMode ? [{ debugName: "categorySearchValue" }] : []));
443
+ // @ViewChild('grid', { static: true}) grid: AXDataTableComponent;
444
+ this.grid = viewChild('grid', ...(ngDevMode ? [{ debugName: "grid" }] : []));
445
+ this.commandRowItems = computed(() => {
446
+ return this.vm.primaryRowActions().map((c) => {
447
+ return {
448
+ icon: c.icon,
449
+ name: c.name,
450
+ text: translateSync(c.title),
451
+ color: c.color,
452
+ disabled: c.disabled,
453
+ default: c.default,
454
+ };
455
+ });
456
+ }, ...(ngDevMode ? [{ debugName: "commandRowItems" }] : []));
457
+ this.getDropdownRowItems = (rowData) => {
458
+ return Promise.resolve(this.dropdownRowItems(rowData));
459
+ };
460
+ this.getCommandRowItems = () => {
461
+ return this.commandRowItems();
462
+ };
463
+ effect(() => {
464
+ if (this.grid()) {
465
+ this.grid().selectedRows = this.vm.selectedItems();
466
+ }
467
+ });
468
+ //
469
+ this.vm.events$.subscribe(async (e) => {
470
+ const refreshTargetId = e.meta?.refreshTargetId;
471
+ if (e.action == 'refresh') {
472
+ if (refreshTargetId) {
473
+ this.grid()?.refreshItemChildren(refreshTargetId);
474
+ }
475
+ else {
476
+ this.grid()?.refresh({
477
+ reset: false,
478
+ });
479
+ }
480
+ }
481
+ });
482
+ }
483
+ ngAfterViewInit() {
484
+ this.vm.setView();
485
+ }
486
+ // protected closeFiltersDrawer(e: AXDrawerComponent, collapsed: boolean) {
487
+ // if (collapsed) {
488
+ // e.close();
489
+ // this.vm.discardFilters();
490
+ // }
491
+ // }
492
+ // handleChangeSearchValue(e: AXValueChangedEvent) {
493
+ // if (e.isUserInteraction) {
494
+ // this.vm.applyInlineFilter(e.value);
495
+ // }
496
+ // }
497
+ onColumnSizeChanged(e) {
498
+ if (e.isUserInteraction && e.type === 'end') {
499
+ this.vm.saveSettings('columnSizes', e.data);
500
+ }
501
+ }
502
+ onPageChanged(e) {
503
+ if (e.isUserInteraction) {
504
+ const pageSizeChanged = e.take != this.vm.dataSource.pageSize;
505
+ if (pageSizeChanged) {
506
+ this.vm.saveSettings('pageSize', e.take);
507
+ }
508
+ }
509
+ }
510
+ async dropdownRowItems(rowData) {
511
+ return (await this.vm.secondaryRowActions(rowData)).map((c) => ({
512
+ icon: c.icon,
513
+ name: c.name,
514
+ text: c.title,
515
+ color: c.color,
516
+ disabled: c.disabled,
517
+ default: c.default,
518
+ }));
519
+ }
520
+ async handleRowDbClick(e) {
521
+ const allItems = [...this.commandRowItems(), ...(await this.dropdownRowItems(e.data))];
522
+ // const defaultAction = allItems.find((c) => (c as any).default) || allItems[0];
523
+ const defaultAction = allItems.find((c) => {
524
+ const commandName = c.name.split('&')[0];
525
+ return c.default || commandName === 'open-entity';
526
+ });
527
+ if (!defaultAction) {
528
+ return;
529
+ }
530
+ const d = {
531
+ component: e.component,
532
+ name: defaultAction.name,
533
+ data: e.data,
534
+ };
535
+ this.handleRowCommandClick(d);
536
+ }
537
+ async handleRowCommandClick(e) {
538
+ this.vm.executeCommand(e.name, e.data);
539
+ }
540
+ async handleSelectedRowsChange(rows) {
541
+ this.vm.selectedItems.set(rows);
542
+ }
543
+ makeResponsive(value) {
544
+ if (this.platform.is('Mobile') || this.platform.is('SM')) {
545
+ return '';
546
+ }
547
+ else {
548
+ return value;
549
+ }
550
+ }
551
+ toggleSideBar(sideBar) {
552
+ this.toggleEndSide();
553
+ if (sideBar) {
554
+ this.activeEndSideView.set(sideBar);
555
+ }
556
+ }
557
+ toggleSearchBar() {
558
+ this.searchBarShown.update((v) => !v);
559
+ }
560
+ handleResetClick(sideBar) {
561
+ switch (sideBar) {
562
+ case 'filter': {
563
+ this.vm.resetFilters();
564
+ break;
565
+ }
566
+ case 'sort': {
567
+ this.vm.resetSorts();
568
+ break;
569
+ }
570
+ case 'column': {
571
+ this.vm.resetColumns();
572
+ break;
573
+ }
574
+ }
575
+ }
576
+ // protected handleDiscardClick(sideBar: 'filter' | 'sort' | 'column') {
577
+ // switch (sideBar) {
578
+ // case 'filter': {
579
+ // this.vm.discardFilters();
580
+ // break;
581
+ // }
582
+ // case 'sort': {
583
+ // this.vm.resetSorts();
584
+ // break;
585
+ // }
586
+ // case 'column': {
587
+ // this.vm.resetColumns();
588
+ // break;
589
+ // }
590
+ // }
591
+ // }
592
+ handleApplyClick(sideBar) {
593
+ this.vm.applyFilterAndSort();
594
+ this.toggleEndSide();
595
+ }
596
+ ngOnDestroy() {
597
+ this.vm.destroy();
598
+ }
599
+ toggleCategoryDrawer() {
600
+ this.toggleStartSide();
601
+ }
602
+ getPageTitle() {
603
+ return this.vm.title();
604
+ }
605
+ async getPageDescription() {
606
+ const description = this.vm.description();
607
+ if (description) {
608
+ return this.translateService.translateAsync(description);
609
+ }
610
+ return '';
611
+ }
612
+ getPageBreadcrumbs() {
613
+ return this.vm.beardcrumbs();
614
+ }
615
+ async getPrimaryMenuItems() {
616
+ return (await this.vm.getPrimaryActions()).map((tr) => ({
617
+ name: tr.name,
618
+ title: tr.title,
619
+ icon: tr.icon,
620
+ color: tr.color,
621
+ disabled: tr.disabled,
622
+ command: {
623
+ name: tr.name,
624
+ options: tr.options,
625
+ metadata: tr.metadata,
626
+ },
627
+ }));
628
+ }
629
+ async getSecondaryMenuItems() {
630
+ return (await this.vm.getSecondaryActions()).map((tr) => ({
631
+ name: tr.name,
632
+ title: tr.title,
633
+ icon: tr.icon,
634
+ color: tr.color,
635
+ disabled: tr.disabled,
636
+ separated: tr.separated,
637
+ command: {
638
+ name: tr.name,
639
+ options: tr.options,
640
+ metadata: tr.metadata,
641
+ },
642
+ }));
643
+ }
644
+ async execute(command) {
645
+ if (command) {
646
+ this.vm.execute(command);
647
+ }
648
+ }
649
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterListViewComponent, deps: [{ token: i1$1.AXPlatform }], target: i0.ɵɵFactoryTarget.Component }); }
650
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.8", type: AXPEntityMasterListViewComponent, isStandalone: true, selector: "axp-entity-master-list", providers: [
651
+ {
652
+ provide: AXPPageLayoutBase,
653
+ useExisting: AXPEntityMasterListViewComponent,
654
+ },
655
+ ], viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if (vm.entityDef.category) {\n <axp-layout-start-side>\n <axp-entity-category class=\"ax-w-80\" [vm]=\"vm\" [searchValue]=\"categorySearchValue()\"></axp-entity-category>\n </axp-layout-start-side>\n }\n <axp-page-toolbar>\n <axp-entity-master-toolbar-view [viewModel]=\"vm\"></axp-entity-master-toolbar-view>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [paging]=\"true\" [fetchDataMode]=\"'manual'\"\n [parentField]=\"vm.parentKey()\" [loading]=\"{ enabled: true, animation: true }\" [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\" (onRowDbClick)=\"handleRowDbClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\" (onPageChanged)=\"onPageChanged($event)\">\n @if (vm.view().indexCol === true) {\n <ax-index-column fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n }\n @if (vm.selectedScopeActionsCount()) {\n <ax-select-column fixed=\"start\" [width]=\"'60px'\"></ax-select-column>\n }\n @for (col of vm.columns(); track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\" [node]=\"col.node()\"\n [customWidth]=\"col.width\"></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column fixed=\"end\" [width]=\"getCommandRowItems().length * 60 + 'px'\" [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>", styles: ["axp-entity-master-list axp-layout-start-side{min-width:20rem!important;border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}.view-drawer{width:85vw}@media (min-width: 768px){.view-drawer{width:45vw}}@media (min-width: 1024px){.view-drawer{width:35vw}}@media (min-width: 1536px){.view-drawer{width:20vw}}.view-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));border-inline-start-width:1px;border-inline-start-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));border-top-width:1px;--tw-border-opacity: 1;border-top-color:rgba(var(--ax-sys-color-primary-600),var(--tw-border-opacity, 1))}.view-drawer ax-header{display:flex;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1));padding:.5rem 1rem}.view-drawer ax-header h2{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lighter-surface),var(--tw-text-opacity, 1))}.view-drawer ax-footer{position:absolute!important;bottom:0!important;width:100%!important;justify-content:flex-start!important;border-top-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1))!important;padding:.5rem 1rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXActionSheetModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i7.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i7.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero"] }, { kind: "component", type: i7.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i7.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i7.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i10.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type:
656
+ //
657
+ AXPLayoutBuilderModule }, { kind: "component", type: i7$1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "component", type:
658
+ //
659
+ AXPEntityMasterToolbarViewComponent, selector: "axp-entity-master-toolbar-view", inputs: ["viewModel"] }, { kind: "component", type:
660
+ //
661
+ AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutStartSideComponent, selector: "axp-layout-page-start-side, axp-layout-start-side" }, { kind: "component", type: AXPEntityCategoryComponent, selector: "axp-entity-category", inputs: ["vm", "searchValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
662
+ }
663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.8", ngImport: i0, type: AXPEntityMasterListViewComponent, decorators: [{
664
+ type: Component,
665
+ args: [{ selector: 'axp-entity-master-list', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
666
+ CommonModule,
667
+ FormsModule,
668
+ RouterModule,
669
+ AXButtonModule,
670
+ AXDecoratorModule,
671
+ AXBadgeModule,
672
+ AXDropdownModule,
673
+ AXPopoverModule,
674
+ AXFormModule,
675
+ AXActionSheetModule,
676
+ AXDrawerModule,
677
+ AXDialogModule,
678
+ AXLoadingModule,
679
+ AXTabsModule,
680
+ AXTooltipModule,
681
+ AXBreadcrumbsModule,
682
+ AXDropdownButtonModule,
683
+ AXSearchBoxModule,
684
+ AXDataTableModule,
685
+ AXTranslationModule,
686
+ DragDropModule,
687
+ //
688
+ AXPLayoutBuilderModule,
689
+ AXPWidgetsModule,
690
+ AXPAuthModule,
691
+ //
692
+ AXPEntityMasterToolbarViewComponent,
693
+ //
694
+ AXPPageLayoutComponent,
695
+ AXPThemeLayoutBlockComponent,
696
+ AXDropdownButtonModule,
697
+ AXPThemeLayoutStartSideComponent,
698
+ AXPEntityCategoryComponent,
699
+ ], providers: [
700
+ {
701
+ provide: AXPPageLayoutBase,
702
+ useExisting: AXPEntityMasterListViewComponent,
703
+ },
704
+ ], template: "<axp-page-layout *translate=\"let t\">\n @if (vm.entityDef.category) {\n <axp-layout-start-side>\n <axp-entity-category class=\"ax-w-80\" [vm]=\"vm\" [searchValue]=\"categorySearchValue()\"></axp-entity-category>\n </axp-layout-start-side>\n }\n <axp-page-toolbar>\n <axp-entity-master-toolbar-view [viewModel]=\"vm\"></axp-entity-master-toolbar-view>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [paging]=\"true\" [fetchDataMode]=\"'manual'\"\n [parentField]=\"vm.parentKey()\" [loading]=\"{ enabled: true, animation: true }\" [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\" (onRowDbClick)=\"handleRowDbClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\" (onPageChanged)=\"onPageChanged($event)\">\n @if (vm.view().indexCol === true) {\n <ax-index-column fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n }\n @if (vm.selectedScopeActionsCount()) {\n <ax-select-column fixed=\"start\" [width]=\"'60px'\"></ax-select-column>\n }\n @for (col of vm.columns(); track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\" [node]=\"col.node()\"\n [customWidth]=\"col.width\"></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column fixed=\"end\" [width]=\"getCommandRowItems().length * 60 + 'px'\" [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>", styles: ["axp-entity-master-list axp-layout-start-side{min-width:20rem!important;border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}.view-drawer{width:85vw}@media (min-width: 768px){.view-drawer{width:45vw}}@media (min-width: 1024px){.view-drawer{width:35vw}}@media (min-width: 1536px){.view-drawer{width:20vw}}.view-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));border-inline-start-width:1px;border-inline-start-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));border-top-width:1px;--tw-border-opacity: 1;border-top-color:rgba(var(--ax-sys-color-primary-600),var(--tw-border-opacity, 1))}.view-drawer ax-header{display:flex;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1));padding:.5rem 1rem}.view-drawer ax-header h2{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lighter-surface),var(--tw-text-opacity, 1))}.view-drawer ax-footer{position:absolute!important;bottom:0!important;width:100%!important;justify-content:flex-start!important;border-top-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1))!important;padding:.5rem 1rem!important}\n"] }]
705
+ }], ctorParameters: () => [{ type: i1$1.AXPlatform }] });
706
+
707
+ export { AXPEntityMasterListViewComponent };
708
+ //# sourceMappingURL=acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs.map