@rxap/schematic-angular 16.0.1-dev.0
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/CHANGELOG.md +8 -0
- package/GETSTARTED.md +0 -0
- package/GUIDES.md +0 -0
- package/README.md +21 -0
- package/collection.json +109 -0
- package/package.json +70 -0
- package/src/index.d.ts +0 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -0
- package/src/lib/accordion-item.d.ts +10 -0
- package/src/lib/accordion-item.js +36 -0
- package/src/lib/accordion-item.js.map +1 -0
- package/src/lib/accordion-itme-types.d.ts +7 -0
- package/src/lib/accordion-itme-types.js +15 -0
- package/src/lib/accordion-itme-types.js.map +1 -0
- package/src/lib/angular-options.d.ts +20 -0
- package/src/lib/angular-options.js +57 -0
- package/src/lib/angular-options.js.map +1 -0
- package/src/lib/assert-table-component-exists.d.ts +8 -0
- package/src/lib/assert-table-component-exists.js +18 -0
- package/src/lib/assert-table-component-exists.js.map +1 -0
- package/src/lib/backend-types.d.ts +5 -0
- package/src/lib/backend-types.js +10 -0
- package/src/lib/backend-types.js.map +1 -0
- package/src/lib/data-grid-item.d.ts +9 -0
- package/src/lib/data-grid-item.js +31 -0
- package/src/lib/data-grid-item.js.map +1 -0
- package/src/lib/data-grid-options.d.ts +18 -0
- package/src/lib/data-grid-options.js +25 -0
- package/src/lib/data-grid-options.js.map +1 -0
- package/src/lib/dialog-action.d.ts +9 -0
- package/src/lib/dialog-action.js +33 -0
- package/src/lib/dialog-action.js.map +1 -0
- package/src/lib/existing-method.d.ts +5 -0
- package/src/lib/existing-method.js +11 -0
- package/src/lib/existing-method.js.map +1 -0
- package/src/lib/form-component-control.d.ts +13 -0
- package/src/lib/form-component-control.js +46 -0
- package/src/lib/form-component-control.js.map +1 -0
- package/src/lib/form-definition-control.d.ts +15 -0
- package/src/lib/form-definition-control.js +59 -0
- package/src/lib/form-definition-control.js.map +1 -0
- package/src/lib/minimum-table-component-options.d.ts +17 -0
- package/src/lib/minimum-table-component-options.js +343 -0
- package/src/lib/minimum-table-component-options.js.map +1 -0
- package/src/lib/minimum-table-options.d.ts +18 -0
- package/src/lib/minimum-table-options.js +27 -0
- package/src/lib/minimum-table-options.js.map +1 -0
- package/src/lib/table-action.d.ts +11 -0
- package/src/lib/table-action.js +93 -0
- package/src/lib/table-action.js.map +1 -0
- package/src/lib/table-column.d.ts +18 -0
- package/src/lib/table-column.js +73 -0
- package/src/lib/table-column.js.map +1 -0
- package/src/lib/table-header-button.d.ts +9 -0
- package/src/lib/table-header-button.js +58 -0
- package/src/lib/table-header-button.js.map +1 -0
- package/src/lib/table-options.d.ts +15 -0
- package/src/lib/table-options.js +16 -0
- package/src/lib/table-options.js.map +1 -0
- package/src/lib/table-row-action.d.ts +14 -0
- package/src/lib/table-row-action.js +21 -0
- package/src/lib/table-row-action.js.map +1 -0
- package/src/lib/to-title.d.ts +1 -0
- package/src/lib/to-title.js +12 -0
- package/src/lib/to-title.js.map +1 -0
- package/src/lib/tree-table-options.d.ts +15 -0
- package/src/lib/tree-table-options.js +15 -0
- package/src/lib/tree-table-options.js.map +1 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +30 -0
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +54 -0
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +5 -0
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.ts.template +14 -0
- package/src/schematics/accordion/accordion-component/index.d.ts +8 -0
- package/src/schematics/accordion/accordion-component/index.js +350 -0
- package/src/schematics/accordion/accordion-component/index.js.map +1 -0
- package/src/schematics/accordion/accordion-component/schema.d.ts +7 -0
- package/src/schematics/accordion/accordion-component/schema.json +90 -0
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.html.template +7 -0
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.ts.template +32 -0
- package/src/schematics/accordion/accordion-item-component/index.d.ts +21 -0
- package/src/schematics/accordion/accordion-item-component/index.js +319 -0
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -0
- package/src/schematics/accordion/accordion-item-component/schema.d.ts +9 -0
- package/src/schematics/accordion/accordion-item-component/schema.json +73 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid/__componentName__.component.html.template +1 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid/__componentName__.component.ts.template +14 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.html.template +10 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.ts.template +32 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +10 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +211 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +122 -0
- package/src/schematics/accordion/item/accordion-item-table-component/files/component/__componentName__.component.html.template +1 -0
- package/src/schematics/accordion/item/accordion-item-table-component/files/component/__componentName__.component.ts.template +35 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +108 -0
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -0
- package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +248 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/files/component/__componentName__.component.html.template +1 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/files/component/__componentName__.component.ts.template +34 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +182 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +7 -0
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +257 -0
- package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +42 -0
- package/src/schematics/data-grid-component/files/form/__componentName__.component.ts.template +43 -0
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template +25 -0
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.ts.template +36 -0
- package/src/schematics/data-grid-component/index.d.ts +16 -0
- package/src/schematics/data-grid-component/index.js +320 -0
- package/src/schematics/data-grid-component/index.js.map +1 -0
- package/src/schematics/data-grid-component/schema.d.ts +4 -0
- package/src/schematics/data-grid-component/schema.json +112 -0
- package/src/schematics/dialog-component/files/component/__componentName__.component.html.template +23 -0
- package/src/schematics/dialog-component/index.d.ts +2 -0
- package/src/schematics/dialog-component/index.js +43 -0
- package/src/schematics/dialog-component/index.js.map +1 -0
- package/src/schematics/dialog-component/schema.d.ts +9 -0
- package/src/schematics/dialog-component/schema.json +71 -0
- package/src/schematics/form/control/input-form-control/index.d.ts +7 -0
- package/src/schematics/form/control/input-form-control/index.js +40 -0
- package/src/schematics/form/control/input-form-control/index.js.map +1 -0
- package/src/schematics/form/control/input-form-control/schema.d.ts +5 -0
- package/src/schematics/form/control/input-form-control/schema.json +115 -0
- package/src/schematics/form/control/select-form-control/index.d.ts +6 -0
- package/src/schematics/form/control/select-form-control/index.js +124 -0
- package/src/schematics/form/control/select-form-control/index.js.map +1 -0
- package/src/schematics/form/control/select-form-control/schema.d.ts +6 -0
- package/src/schematics/form/control/select-form-control/schema.json +101 -0
- package/src/schematics/form/control/table-select-form-control/index.d.ts +12 -0
- package/src/schematics/form/control/table-select-form-control/index.js +183 -0
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -0
- package/src/schematics/form/control/table-select-form-control/schema.d.ts +7 -0
- package/src/schematics/form/control/table-select-form-control/schema.json +105 -0
- package/src/schematics/form/form-component/files/component/__componentName__.component.html.template +12 -0
- package/src/schematics/form/form-component/files/component/__componentName__.component.ts.template +52 -0
- package/src/schematics/form/form-component/files/window/open-__name__-form-window.method.ts.template +29 -0
- package/src/schematics/form/form-component/index.d.ts +16 -0
- package/src/schematics/form/form-component/index.js +149 -0
- package/src/schematics/form/form-component/index.js.map +1 -0
- package/src/schematics/form/form-component/schema.d.ts +8 -0
- package/src/schematics/form/form-component/schema.json +107 -0
- package/src/schematics/form/form-control/index.d.ts +9 -0
- package/src/schematics/form/form-control/index.js +54 -0
- package/src/schematics/form/form-control/index.js.map +1 -0
- package/src/schematics/form/form-control/schema.d.ts +6 -0
- package/src/schematics/form/form-control/schema.json +91 -0
- package/src/schematics/form/form-definition/index.d.ts +10 -0
- package/src/schematics/form/form-definition/index.js +43 -0
- package/src/schematics/form/form-definition/index.js.map +1 -0
- package/src/schematics/form/form-definition/schema.d.ts +6 -0
- package/src/schematics/form/form-definition/schema.json +97 -0
- package/src/schematics/table/action/dialog-table-action/index.d.ts +8 -0
- package/src/schematics/table/action/dialog-table-action/index.js +99 -0
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -0
- package/src/schematics/table/action/dialog-table-action/schema.d.ts +8 -0
- package/src/schematics/table/action/dialog-table-action/schema.json +133 -0
- package/src/schematics/table/action/form-table-action/index.d.ts +9 -0
- package/src/schematics/table/action/form-table-action/index.js +146 -0
- package/src/schematics/table/action/form-table-action/index.js.map +1 -0
- package/src/schematics/table/action/form-table-action/schema.d.ts +4 -0
- package/src/schematics/table/action/form-table-action/schema.json +94 -0
- package/src/schematics/table/action/navigation-table-action/index.d.ts +7 -0
- package/src/schematics/table/action/navigation-table-action/index.js +46 -0
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -0
- package/src/schematics/table/action/navigation-table-action/schema.d.ts +5 -0
- package/src/schematics/table/action/navigation-table-action/schema.json +85 -0
- package/src/schematics/table/action/operation-table-action/index.d.ts +11 -0
- package/src/schematics/table/action/operation-table-action/index.js +87 -0
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -0
- package/src/schematics/table/action/operation-table-action/schema.d.ts +4 -0
- package/src/schematics/table/action/operation-table-action/schema.json +93 -0
- package/src/schematics/table/table-action/index.d.ts +7 -0
- package/src/schematics/table/table-action/index.js +46 -0
- package/src/schematics/table/table-action/index.js.map +1 -0
- package/src/schematics/table/table-action/schema.d.ts +7 -0
- package/src/schematics/table/table-action/schema.json +81 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +311 -0
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +100 -0
- package/src/schematics/table/table-component/index.d.ts +17 -0
- package/src/schematics/table/table-component/index.js +329 -0
- package/src/schematics/table/table-component/index.js.map +1 -0
- package/src/schematics/table/table-component/schema.d.ts +4 -0
- package/src/schematics/table/table-component/schema.json +230 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +201 -0
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +102 -0
- package/src/schematics/table/tree-table-component/index.d.ts +9 -0
- package/src/schematics/table/tree-table-component/index.js +314 -0
- package/src/schematics/table/tree-table-component/index.js.map +1 -0
- package/src/schematics/table/tree-table-component/schema.d.ts +4 -0
- package/src/schematics/table/tree-table-component/schema.json +239 -0
- package/src/schematics/tree-component/index.d.ts +10 -0
- package/src/schematics/tree-component/index.js +33 -0
- package/src/schematics/tree-component/index.js.map +1 -0
- package/src/schematics/tree-component/schema.d.ts +6 -0
- package/src/schematics/tree-component/schema.json +75 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<div class="flex flex-col gap-y-4 m-4">
|
|
2
|
+
<% if (hasNavigationBackHeader) { %>
|
|
3
|
+
<rxap-navigate-back-button>
|
|
4
|
+
<h1 i18n><%= title %></h1>
|
|
5
|
+
</rxap-navigate-back-button>
|
|
6
|
+
<mat-divider></mat-divider>
|
|
7
|
+
<% } %>
|
|
8
|
+
|
|
9
|
+
<div class="table-card-container flex flex-col">
|
|
10
|
+
<mat-card>
|
|
11
|
+
<mat-progress-bar
|
|
12
|
+
rxapCardProgressBar
|
|
13
|
+
[loading$]="tableDataSourceDirective.loading$"
|
|
14
|
+
></mat-progress-bar>
|
|
15
|
+
<mat-card-header class="min-h-full h-12">
|
|
16
|
+
<% if (!hasNavigationBackHeader && !hasWithoutTitle) { %>
|
|
17
|
+
<mat-card-title i18n><%= title %></mat-card-title>
|
|
18
|
+
<% } %>
|
|
19
|
+
<% if (headerButton) { %>
|
|
20
|
+
<button
|
|
21
|
+
mat-card-avatar
|
|
22
|
+
mat-mini-fab
|
|
23
|
+
color="primary"
|
|
24
|
+
matTooltip="<%= headerButton.label %>"
|
|
25
|
+
i18n-matTooltip
|
|
26
|
+
[disabled]="tableDataSourceDirective.hasError$ | async"
|
|
27
|
+
<% if (headerButton.role === 'form') { %>[rxapTableCreate]="tableDataSourceDirective"<% } %>
|
|
28
|
+
<% if (headerButton.permission) { %>rxapHasEnablePermission="<%= headerButton.permission %>"<% } %>
|
|
29
|
+
>
|
|
30
|
+
<% if (headerButton.icon) { %><mat-icon><%= headerButton.icon %></mat-icon><% } else if (headerButton.svgIcon) { %><mat-icon svgIcon="<%= headerButton.svgIcon %>"></mat-icon><% } else { %><mat-icon>add</mat-icon><% } %>
|
|
31
|
+
</button>
|
|
32
|
+
<mat-card-subtitle i18n><%= headerButton.label %></mat-card-subtitle>
|
|
33
|
+
<% } %>
|
|
34
|
+
<rxap-table-column-menu matCard #rxapTableColumns="rxapTableColumns" [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }">
|
|
35
|
+
<% if (selectColumn) { %>
|
|
36
|
+
<rxap-table-column-option hidden name="select">
|
|
37
|
+
<ng-container i18n>Select</ng-container>
|
|
38
|
+
</rxap-table-column-option>
|
|
39
|
+
<% } %>
|
|
40
|
+
<% for (const column of columnList) { %>
|
|
41
|
+
<rxap-table-column-option
|
|
42
|
+
name="<%= column.name %>"<% if (column.active) { %><%= ' active' %><% } %><% if (column.hidden) { %><%= ' hidden' %><% } %><% if (column.inactive) { %><%= ' inactive' %><% } %><% if (column.show) { %><%= ' show' %><% } %>>
|
|
43
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
44
|
+
</rxap-table-column-option>
|
|
45
|
+
<% } %>
|
|
46
|
+
<% if (actionList.length) { %>
|
|
47
|
+
<rxap-table-column-option hidden name="actions">
|
|
48
|
+
<ng-container i18n>Actions</ng-container>
|
|
49
|
+
</rxap-table-column-option>
|
|
50
|
+
<% } %>
|
|
51
|
+
<mat-divider></mat-divider>
|
|
52
|
+
<span mat-menu-item>
|
|
53
|
+
<rxap-table-show-archived-slide
|
|
54
|
+
[paginator]="paginator"
|
|
55
|
+
></rxap-table-show-archived-slide>
|
|
56
|
+
</span>
|
|
57
|
+
</rxap-table-column-menu>
|
|
58
|
+
</mat-card-header>
|
|
59
|
+
|
|
60
|
+
<mat-card-content>
|
|
61
|
+
<rxap-data-source-error
|
|
62
|
+
[loading]="tableDataSourceDirective.loading$"
|
|
63
|
+
[error]="tableDataSourceDirective.dataSource?.error$"
|
|
64
|
+
*ngIf="tableDataSourceDirective.hasError$ | async"
|
|
65
|
+
[refresh]="tableDataSourceDirective.retry">
|
|
66
|
+
</rxap-data-source-error>
|
|
67
|
+
<div class="table-scroll-container mt-4 overflow-x-auto overscroll-contain">
|
|
68
|
+
<table
|
|
69
|
+
[ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
|
|
70
|
+
[paginator]="paginator"
|
|
71
|
+
matSort
|
|
72
|
+
mat-table
|
|
73
|
+
#tableDataSourceDirective="rxapTableDataSource"
|
|
74
|
+
rxapTableDataSource
|
|
75
|
+
[parameters]="parameters"
|
|
76
|
+
id="<%= name %>"
|
|
77
|
+
<% if (hasColumnWithFilter) { %>rxap-filter-header-row<% } %>
|
|
78
|
+
>
|
|
79
|
+
<!-- region columns -->
|
|
80
|
+
|
|
81
|
+
<% if (selectColumn) { %>
|
|
82
|
+
<ng-container matColumnDef="select" sticky>
|
|
83
|
+
<th mat-header-cell rxap-checkbox-header-cell *matHeaderCellDef></th>
|
|
84
|
+
<td
|
|
85
|
+
mat-cell
|
|
86
|
+
rxap-checkbox-cell
|
|
87
|
+
[element]="element"
|
|
88
|
+
*matCellDef="let element"
|
|
89
|
+
></td>
|
|
90
|
+
</ng-container>
|
|
91
|
+
<% } %>
|
|
92
|
+
<ng-container matColumnDef="removedAt">
|
|
93
|
+
<th mat-header-cell *matHeaderCellDef>
|
|
94
|
+
<ng-container i18n>Removed at</ng-container>
|
|
95
|
+
</th>
|
|
96
|
+
<td
|
|
97
|
+
mat-cell
|
|
98
|
+
[rxap-date-cell]="element.__removedAt"
|
|
99
|
+
*matCellDef="let element"
|
|
100
|
+
></td>
|
|
101
|
+
</ng-container>
|
|
102
|
+
<ng-container matColumnDef="uuid">
|
|
103
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
104
|
+
<ng-container i18n>UUID</ng-container>
|
|
105
|
+
</th>
|
|
106
|
+
|
|
107
|
+
<td mat-cell *matCellDef="let element">{{ element?.uuid }}</td>
|
|
108
|
+
</ng-container>
|
|
109
|
+
<% if (actionList.length) { %>
|
|
110
|
+
<ng-container matColumnDef="actions" stickyEnd>
|
|
111
|
+
<th mat-header-cell *matHeaderCellDef>
|
|
112
|
+
<% if (selectColumn) { %>
|
|
113
|
+
<div class="flex flex-row" *rxapSelectedRows="let selected">
|
|
114
|
+
<% for (const action of actionList) { %>
|
|
115
|
+
<% if (action.inHeader) { %>
|
|
116
|
+
<button
|
|
117
|
+
rxapTableRowHeaderAction="<%= action.type %>"
|
|
118
|
+
mat-icon-button
|
|
119
|
+
*ngIf="selected | rxapRowActionCheck:'<%= action.type %>'"
|
|
120
|
+
<% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
|
|
121
|
+
matTooltip="<%= action.type %>"
|
|
122
|
+
i18n-matTooltip
|
|
123
|
+
>
|
|
124
|
+
<% if (action.icon) { %><mat-icon><%= action.icon %></mat-icon><% } else if (action.svgIcon) { %><mat-icon svgIcon="<%= action.svgIcon %>"></mat-icon><% } else { %><mat-icon><%= action.type %></mat-icon><% } %>
|
|
125
|
+
<mat-progress-bar
|
|
126
|
+
*rxapTableRowActionExecuting
|
|
127
|
+
mode="indeterminate"
|
|
128
|
+
></mat-progress-bar>
|
|
129
|
+
</button>
|
|
130
|
+
<% } %>
|
|
131
|
+
<% } %>
|
|
132
|
+
</div>
|
|
133
|
+
<% } %>
|
|
134
|
+
</th>
|
|
135
|
+
|
|
136
|
+
<td mat-cell *matCellDef="let element">
|
|
137
|
+
<div class="flex flex-row">
|
|
138
|
+
<% for (const action of actionList) { %>
|
|
139
|
+
<button
|
|
140
|
+
rxapTableRowAction="<%= action.type %>"
|
|
141
|
+
[element]="element"
|
|
142
|
+
mat-icon-button
|
|
143
|
+
*ngIf="element | rxapRowActionCheck:'<%= action.type %>'"
|
|
144
|
+
<% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
|
|
145
|
+
matTooltip="<%= action.type %>"
|
|
146
|
+
i18n-matTooltip
|
|
147
|
+
>
|
|
148
|
+
<% if (action.icon) { %><mat-icon><%= action.icon %></mat-icon><% } else if (action.svgIcon) { %><mat-icon svgIcon="<%= action.svgIcon %>"></mat-icon><% } else { %><mat-icon><%= action.type %></mat-icon><% } %>
|
|
149
|
+
<mat-progress-bar
|
|
150
|
+
*rxapTableRowActionExecuting
|
|
151
|
+
mode="indeterminate"
|
|
152
|
+
></mat-progress-bar>
|
|
153
|
+
</button>
|
|
154
|
+
<% } %>
|
|
155
|
+
</div>
|
|
156
|
+
</td>
|
|
157
|
+
</ng-container>
|
|
158
|
+
<% } %>
|
|
159
|
+
<% for (const column of columnList) { %>
|
|
160
|
+
<% if (column.type === 'copy-to-clipboard') { %>
|
|
161
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
162
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
163
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
164
|
+
</th>
|
|
165
|
+
<td *matCellDef="let element" mat-cell [rxap-copy-to-clipboard-cell]="element?.<%= column.propertyPath %>"></td>
|
|
166
|
+
</ng-container>
|
|
167
|
+
<% } else if (column.type === 'link') { %>
|
|
168
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
169
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
170
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
171
|
+
</th>
|
|
172
|
+
<td *matCellDef="let element" mat-cell [rxap-link-cell]="element?.<%= column.propertyPath %>"></td>
|
|
173
|
+
</ng-container>
|
|
174
|
+
<% } else if (column.type === 'date') { %>
|
|
175
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
176
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
177
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
178
|
+
</th>
|
|
179
|
+
|
|
180
|
+
<td *matCellDef="let element" mat-cell [rxap-date-cell]="element?.<%= column.propertyPath %>" format="dd.MM.yyyy HH:mm:ss"></td>
|
|
181
|
+
</ng-container>
|
|
182
|
+
<% } else if (column.type === 'boolean') { %>
|
|
183
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
184
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
185
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
186
|
+
</th>
|
|
187
|
+
|
|
188
|
+
<td *matCellDef="let element" mat-cell [rxap-boolean-cell]="element?.<%= column.propertyPath %>"></td>
|
|
189
|
+
</ng-container>
|
|
190
|
+
<% } else if (column.type === 'icon') { %>
|
|
191
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
192
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
193
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
194
|
+
</th>
|
|
195
|
+
|
|
196
|
+
<td *matCellDef="let element" mat-cell [rxap-icon-cell]="element?.<%= column.propertyPath %>"></td>
|
|
197
|
+
</ng-container>
|
|
198
|
+
<% } else if (column.type === 'component') { %>
|
|
199
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
200
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
201
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
202
|
+
</th>
|
|
203
|
+
|
|
204
|
+
<td *matCellDef="let element" mat-cell rxap-<%= column.name %>-cell [element]="element" [value]="element?.<%= column.propertyPath %>"></td>
|
|
205
|
+
</ng-container>
|
|
206
|
+
<% } else { %>
|
|
207
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
208
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
209
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
210
|
+
</th>
|
|
211
|
+
|
|
212
|
+
<td mat-cell *matCellDef="let element">{{ element?.<%= column.propertyPath %> }}</td>
|
|
213
|
+
</ng-container>
|
|
214
|
+
<% } %>
|
|
215
|
+
<% } %>
|
|
216
|
+
|
|
217
|
+
<!-- endregion -->
|
|
218
|
+
<% if (hasColumnWithFilter) { %>
|
|
219
|
+
<!-- region filter columns -->
|
|
220
|
+
<% if (selectColumn) { %>
|
|
221
|
+
<ng-container matColumnDef="filter_select" sticky>
|
|
222
|
+
<th mat-header-cell *matHeaderCellDef></th>
|
|
223
|
+
</ng-container>
|
|
224
|
+
<% } %>
|
|
225
|
+
<ng-container matColumnDef="filter_removedAt">
|
|
226
|
+
<th mat-header-cell *matHeaderCellDef></th>
|
|
227
|
+
</ng-container>
|
|
228
|
+
<ng-container matColumnDef="filter_uuid">
|
|
229
|
+
<th mat-header-cell *matHeaderCellDef></th>
|
|
230
|
+
</ng-container>
|
|
231
|
+
<% if (actionList.length) { %>
|
|
232
|
+
<ng-container matColumnDef="filter_actions" stickyEnd>
|
|
233
|
+
<th mat-header-cell *matHeaderCellDef></th>
|
|
234
|
+
</ng-container>
|
|
235
|
+
<% } %>
|
|
236
|
+
|
|
237
|
+
<% for (const column of columnList) { %>
|
|
238
|
+
<ng-container matColumnDef="filter_<%= column.name %>">
|
|
239
|
+
<th mat-header-cell *matHeaderCellDef>
|
|
240
|
+
<% if (column.hasFilter) { %>
|
|
241
|
+
<% if (column.type === 'boolean') { %>
|
|
242
|
+
<mat-checkbox
|
|
243
|
+
indeterminate
|
|
244
|
+
parentControlContainer
|
|
245
|
+
formControlName="<%= camelize(column.name) %>"
|
|
246
|
+
>
|
|
247
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
248
|
+
</mat-checkbox>
|
|
249
|
+
<% } else { %>
|
|
250
|
+
<mat-form-field class="w-100 pt-3">
|
|
251
|
+
<mat-label i18n><%= column.title %></mat-label>
|
|
252
|
+
<input
|
|
253
|
+
matInput
|
|
254
|
+
i18n-placeholder
|
|
255
|
+
placeholder="Enter Filter"
|
|
256
|
+
parentControlContainer
|
|
257
|
+
formControlName="<%= camelize(column.name) %>"
|
|
258
|
+
/>
|
|
259
|
+
<button matSuffix rxapInputClearButton mat-icon-button>
|
|
260
|
+
<mat-icon>clear</mat-icon>
|
|
261
|
+
</button>
|
|
262
|
+
</mat-form-field>
|
|
263
|
+
<% } %>
|
|
264
|
+
<% } %>
|
|
265
|
+
</th>
|
|
266
|
+
</ng-container>
|
|
267
|
+
<% } %>
|
|
268
|
+
|
|
269
|
+
<!-- endregion -->
|
|
270
|
+
<tr
|
|
271
|
+
class="rxap-filter-header"
|
|
272
|
+
mat-header-row
|
|
273
|
+
*matHeaderRowDef="
|
|
274
|
+
rxapTableColumns.displayColumns | toFilterColumnNames
|
|
275
|
+
"
|
|
276
|
+
></tr>
|
|
277
|
+
<% } %>
|
|
278
|
+
|
|
279
|
+
<tr
|
|
280
|
+
mat-header-row
|
|
281
|
+
*matHeaderRowDef="rxapTableColumns.displayColumns"
|
|
282
|
+
></tr>
|
|
283
|
+
|
|
284
|
+
<tr
|
|
285
|
+
[@rowsAnimation]=""
|
|
286
|
+
mat-row
|
|
287
|
+
[ngClass]="{ 'rxap-row-odd !bg-neutral-200 dark:!bg-neutral-600': odd, 'rxap-row-even': even }"
|
|
288
|
+
class="hover:!bg-neutral-400 dark:hover:!bg-neutral-800"
|
|
289
|
+
*matRowDef="
|
|
290
|
+
let element;
|
|
291
|
+
columns: rxapTableColumns.displayColumns;
|
|
292
|
+
let odd = odd;
|
|
293
|
+
let even = even
|
|
294
|
+
"
|
|
295
|
+
></tr>
|
|
296
|
+
</table>
|
|
297
|
+
</div>
|
|
298
|
+
</mat-card-content>
|
|
299
|
+
|
|
300
|
+
<mat-card-footer
|
|
301
|
+
><mat-paginator
|
|
302
|
+
[ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
|
|
303
|
+
rxapPersistent
|
|
304
|
+
[pageSizeOptions]="[5,10,25,50,100]"
|
|
305
|
+
[pageSize]="10"
|
|
306
|
+
#paginator="matPaginator"
|
|
307
|
+
></mat-paginator
|
|
308
|
+
></mat-card-footer>
|
|
309
|
+
</mat-card>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, OnInit, INJECTOR, Injector, Inject } from '@angular/core';
|
|
2
|
+
import { Observable, from } from 'rxjs';
|
|
3
|
+
import {
|
|
4
|
+
RowAnimation,
|
|
5
|
+
TableShowArchivedSlideComponent,
|
|
6
|
+
RXAP_TABLE_METHOD,
|
|
7
|
+
} from '@rxap/material-table-system';
|
|
8
|
+
import { GetFromObjectPipe } from '@rxap/pipes';
|
|
9
|
+
import {
|
|
10
|
+
BooleanCellComponent,
|
|
11
|
+
CopyToClipboardCellComponent, DateCellComponent,
|
|
12
|
+
IconCellComponent,
|
|
13
|
+
LinkCellComponent, PersistentPaginatorDirective,
|
|
14
|
+
TableColumnMenuModule, TableCreateButtonDirective,
|
|
15
|
+
TableDataSourceDirective,
|
|
16
|
+
TableFilterModule, TableRowActionsModule,
|
|
17
|
+
TableRowControlsModule,
|
|
18
|
+
} from '@rxap/material-table-system';
|
|
19
|
+
import { MatCardModule } from '@angular/material/card';
|
|
20
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
21
|
+
import { CardProgressBarDirective } from '@rxap/material-directives/card';
|
|
22
|
+
import { MatTableModule } from '@angular/material/table';
|
|
23
|
+
import { FlexLayoutModule } from '@angular/flex-layout';
|
|
24
|
+
import { RxapFormsModule } from '@rxap/forms';
|
|
25
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
26
|
+
import { RouterModule } from '@angular/router';
|
|
27
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
28
|
+
<% if (hasNavigationBackHeader) { %>
|
|
29
|
+
import { NavigateBackButtonComponent } from '@rxap/components';
|
|
30
|
+
<% } %>
|
|
31
|
+
import { ConfirmModule } from '@rxap/components';
|
|
32
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
33
|
+
import { MatSortModule } from '@angular/material/sort';
|
|
34
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
35
|
+
import { MatInputModule } from '@angular/material/input';
|
|
36
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
37
|
+
import { InputClearButtonDirective } from '@rxap/material-form-system';
|
|
38
|
+
import { HasPermissionModule } from '@rxap/authorization';
|
|
39
|
+
import { CommonModule } from '@angular/common';
|
|
40
|
+
import { DataSourceErrorComponent } from '@rxap/data-source';
|
|
41
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
42
|
+
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
43
|
+
|
|
44
|
+
@Component({
|
|
45
|
+
selector: '<%= prefix %>-<%= name %>-table',
|
|
46
|
+
templateUrl: './<%= name %>-table.component.html',
|
|
47
|
+
styleUrls: [ './<%= name %>-table.component.scss' ],
|
|
48
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49
|
+
animations: [ RowAnimation ],
|
|
50
|
+
standalone: true,
|
|
51
|
+
imports: [
|
|
52
|
+
CommonModule,
|
|
53
|
+
MatCardModule,
|
|
54
|
+
MatProgressBarModule,
|
|
55
|
+
CardProgressBarDirective,
|
|
56
|
+
MatTableModule,
|
|
57
|
+
FlexLayoutModule,
|
|
58
|
+
TableDataSourceDirective,
|
|
59
|
+
TableFilterModule,
|
|
60
|
+
RxapFormsModule,
|
|
61
|
+
MatCheckboxModule,
|
|
62
|
+
ReactiveFormsModule,
|
|
63
|
+
RouterModule,
|
|
64
|
+
MatDividerModule,
|
|
65
|
+
<% if (hasNavigationBackHeader) { %>
|
|
66
|
+
NavigateBackButtonComponent,
|
|
67
|
+
<% } %>
|
|
68
|
+
TableRowControlsModule,
|
|
69
|
+
TableColumnMenuModule,
|
|
70
|
+
DateCellComponent,
|
|
71
|
+
|
|
72
|
+
MatPaginatorModule,
|
|
73
|
+
MatSortModule,
|
|
74
|
+
MatIconModule,
|
|
75
|
+
MatInputModule,
|
|
76
|
+
MatButtonModule,
|
|
77
|
+
InputClearButtonDirective,
|
|
78
|
+
TableCreateButtonDirective,
|
|
79
|
+
TableShowArchivedSlideComponent,
|
|
80
|
+
PersistentPaginatorDirective,
|
|
81
|
+
ConfirmModule,
|
|
82
|
+
HasPermissionModule,
|
|
83
|
+
TableRowActionsModule,
|
|
84
|
+
GetFromObjectPipe,
|
|
85
|
+
CopyToClipboardCellComponent,
|
|
86
|
+
LinkCellComponent,
|
|
87
|
+
IconCellComponent,
|
|
88
|
+
BooleanCellComponent,
|
|
89
|
+
DataSourceErrorComponent,
|
|
90
|
+
MatSnackBarModule,
|
|
91
|
+
],
|
|
92
|
+
})
|
|
93
|
+
export class <%= classify(componentName) %>Component {
|
|
94
|
+
|
|
95
|
+
@Input()
|
|
96
|
+
public parameters?: Observable<Record<string, unknown>>;
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export default <%= classify(name) %>TableComponent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { FormDefinitionControl, GetPageOperationColumn } from '@rxap/schematics-ts-morph';
|
|
3
|
+
import { Normalized } from '@rxap/utilities';
|
|
4
|
+
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
5
|
+
import { NormalizedTableAction } from '../../../lib/table-action';
|
|
6
|
+
import { NormalizedTableColumn } from '../../../lib/table-column';
|
|
7
|
+
import { NormalizedTableOptions } from '../../../lib/table-options';
|
|
8
|
+
import { TableComponentOptions } from './schema';
|
|
9
|
+
export interface NormalizedTableComponentOptions extends Readonly<Normalized<TableComponentOptions> & NormalizedTableOptions & NormalizedAngularOptions> {
|
|
10
|
+
name: string;
|
|
11
|
+
columnList: NormalizedTableColumn[];
|
|
12
|
+
actionList: NormalizedTableAction[];
|
|
13
|
+
}
|
|
14
|
+
export declare function NormalizeTableComponentOptions(options: Readonly<TableComponentOptions>): NormalizedTableComponentOptions;
|
|
15
|
+
export declare function TableColumnToGetPageOperationColumn(column: NormalizedTableColumn): GetPageOperationColumn;
|
|
16
|
+
export declare function TableColumnToFormControl(column: NormalizedTableColumn): FormDefinitionControl;
|
|
17
|
+
export default function (options: TableComponentOptions): () => Rule;
|