@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,201 @@
|
|
|
1
|
+
<div class="flex flex-col gap-y-4 m-4">
|
|
2
|
+
<% if (hasNavigationBackHeader) { %>
|
|
3
|
+
<rxap-navigate-back-button>
|
|
4
|
+
<h1 i18n><%= name %></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><%= name %></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
|
+
<rxap-table-column-option hidden name="tree"></rxap-table-column-option>
|
|
36
|
+
<% for (const column of columnList) { %>
|
|
37
|
+
<rxap-table-column-option name="<%= column.name %>">
|
|
38
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
39
|
+
</rxap-table-column-option>
|
|
40
|
+
<% } %>
|
|
41
|
+
<% if (actionList.length) { %>
|
|
42
|
+
<rxap-table-column-option hidden name="actions">
|
|
43
|
+
<ng-container i18n>Actions</ng-container>
|
|
44
|
+
</rxap-table-column-option>
|
|
45
|
+
<% } %>
|
|
46
|
+
<mat-divider></mat-divider>
|
|
47
|
+
<span mat-menu-item>
|
|
48
|
+
<rxap-table-show-archived-slide></rxap-table-show-archived-slide>
|
|
49
|
+
</span>
|
|
50
|
+
</rxap-table-column-menu>
|
|
51
|
+
</mat-card-header>
|
|
52
|
+
|
|
53
|
+
<mat-card-content>
|
|
54
|
+
<rxap-data-source-error
|
|
55
|
+
[loading]="tableDataSourceDirective.loading$"
|
|
56
|
+
[error]="tableDataSourceDirective.dataSource?.error$"
|
|
57
|
+
*ngIf="tableDataSourceDirective.hasError$ | async"
|
|
58
|
+
[refresh]="tableDataSourceDirective.retry">
|
|
59
|
+
</rxap-data-source-error>
|
|
60
|
+
<div class="table-scroll-container mt-4 overflow-x-auto overscroll-contain">
|
|
61
|
+
<table
|
|
62
|
+
[ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
|
|
63
|
+
matSort
|
|
64
|
+
mat-table
|
|
65
|
+
#tableDataSourceDirective="rxapTableDataSource"
|
|
66
|
+
rxapTableDataSource
|
|
67
|
+
[parameters]="parameters"
|
|
68
|
+
id="<%= name %>"
|
|
69
|
+
>
|
|
70
|
+
<!-- region columns -->
|
|
71
|
+
|
|
72
|
+
<ng-container matColumnDef="uuid">
|
|
73
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
74
|
+
<ng-container i18n>UUID</ng-container>
|
|
75
|
+
</th>
|
|
76
|
+
|
|
77
|
+
<td mat-cell *matCellDef="let element">{{ element?.uuid }}</td>
|
|
78
|
+
</ng-container>
|
|
79
|
+
|
|
80
|
+
<ng-container matColumnDef="tree" sticky>
|
|
81
|
+
<th *matHeaderCellDef mat-header-cell></th>
|
|
82
|
+
<td
|
|
83
|
+
*matCellDef="let element"
|
|
84
|
+
[rxap-tree-control-cell]="element"
|
|
85
|
+
mat-cell
|
|
86
|
+
></td>
|
|
87
|
+
</ng-container>
|
|
88
|
+
|
|
89
|
+
<% for (const column of columnList) { %>
|
|
90
|
+
<% if (column.type === 'copy-to-clipboard') { %>
|
|
91
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
92
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
93
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
94
|
+
</th>
|
|
95
|
+
|
|
96
|
+
<td mat-cell *matCellDef="let element">{{ element?.<%= column.propertyPath %> }}</td>
|
|
97
|
+
</ng-container>
|
|
98
|
+
<% } else if (column.type === 'link') { %>
|
|
99
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
100
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
101
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
102
|
+
</th>
|
|
103
|
+
|
|
104
|
+
<td *matCellDef="let element" [rxap-link-cell]="element?.<%= column.propertyPath %>"></td>
|
|
105
|
+
</ng-container>
|
|
106
|
+
<% } else if (column.type === 'date') { %>
|
|
107
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
108
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
109
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
110
|
+
</th>
|
|
111
|
+
|
|
112
|
+
<td *matCellDef="let element" [rxap-date-cell]="element?.<%= column.propertyPath %>"></td>
|
|
113
|
+
</ng-container>
|
|
114
|
+
<% } else if (column.type === 'boolean') { %>
|
|
115
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
116
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
117
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
118
|
+
</th>
|
|
119
|
+
|
|
120
|
+
<td *matCellDef="let element" [rxap-boolean-cell]="element?.<%= column.propertyPath %>"></td>
|
|
121
|
+
</ng-container>
|
|
122
|
+
<% } else if (column.type === 'icon') { %>
|
|
123
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
124
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
125
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
126
|
+
</th>
|
|
127
|
+
|
|
128
|
+
<td *matCellDef="let element" [rxap-icon-cell]="element?.<%= column.propertyPath %>"></td>
|
|
129
|
+
</ng-container>
|
|
130
|
+
<% } else if (column.type === 'component') { %>
|
|
131
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
132
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
133
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
134
|
+
</th>
|
|
135
|
+
|
|
136
|
+
<td *matCellDef="let element" rxap-<%= column.name %>-cell [element]="element" [value]="element?.<%= column.propertyPath %>"></td>
|
|
137
|
+
</ng-container>
|
|
138
|
+
<% } else { %>
|
|
139
|
+
<ng-container matColumnDef="<%= column.name %>">
|
|
140
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
141
|
+
<ng-container i18n><%= column.title %></ng-container>
|
|
142
|
+
</th>
|
|
143
|
+
|
|
144
|
+
<td mat-cell *matCellDef="let element">{{ element?.<%= column.propertyPath %> }}</td>
|
|
145
|
+
</ng-container>
|
|
146
|
+
<% } %>
|
|
147
|
+
<% } %>
|
|
148
|
+
|
|
149
|
+
<% if (actionList.length) { %>
|
|
150
|
+
<ng-container matColumnDef="actions" stickyEnd>
|
|
151
|
+
<th mat-header-cell *matHeaderCellDef></th>
|
|
152
|
+
|
|
153
|
+
<td mat-cell *matCellDef="let element">
|
|
154
|
+
<div class="flex flex-row">
|
|
155
|
+
<% for (const action of actionList) { %>
|
|
156
|
+
<button
|
|
157
|
+
rxapTableRowAction="<%= action.type %>"
|
|
158
|
+
[element]="element"
|
|
159
|
+
mat-icon-button
|
|
160
|
+
*ngIf="element | rxapRowActionCheck:'<%= action.type %>'"
|
|
161
|
+
<% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
|
|
162
|
+
matTooltip="<%= action.type %>"
|
|
163
|
+
i18n-matTooltip
|
|
164
|
+
>
|
|
165
|
+
<% 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><% } %>
|
|
166
|
+
<mat-progress-bar
|
|
167
|
+
*rxapTableRowActionExecuting
|
|
168
|
+
mode="indeterminate"
|
|
169
|
+
></mat-progress-bar>
|
|
170
|
+
</button>
|
|
171
|
+
<% } %>
|
|
172
|
+
</div>
|
|
173
|
+
</td>
|
|
174
|
+
</ng-container>
|
|
175
|
+
<% } %>
|
|
176
|
+
|
|
177
|
+
<!-- endregion -->
|
|
178
|
+
|
|
179
|
+
<tr
|
|
180
|
+
mat-header-row
|
|
181
|
+
*matHeaderRowDef="rxapTableColumns.displayColumns"
|
|
182
|
+
></tr>
|
|
183
|
+
|
|
184
|
+
<tr
|
|
185
|
+
[@rowsAnimation]
|
|
186
|
+
mat-row
|
|
187
|
+
[ngClass]="{ 'rxap-row-odd !bg-neutral-200 dark:!bg-neutral-600': odd, 'rxap-row-even': even }"
|
|
188
|
+
class="hover:!bg-neutral-400 dark:hover:!bg-neutral-800"
|
|
189
|
+
*matRowDef="
|
|
190
|
+
let element;
|
|
191
|
+
columns: rxapTableColumns.displayColumns;
|
|
192
|
+
let odd = odd;
|
|
193
|
+
let even = even
|
|
194
|
+
"
|
|
195
|
+
></tr>
|
|
196
|
+
</table>
|
|
197
|
+
</div>
|
|
198
|
+
</mat-card-content>
|
|
199
|
+
</mat-card>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
|
2
|
+
import { Observable, from } from 'rxjs';
|
|
3
|
+
import { RowAnimation,
|
|
4
|
+
TableShowArchivedSlideComponent,
|
|
5
|
+
TreeControlCellComponent,
|
|
6
|
+
TABLE_DATA_SOURCE,
|
|
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
|
+
|
|
45
|
+
@Component({
|
|
46
|
+
selector: '<%= prefix %>-<%= name %>-table',
|
|
47
|
+
templateUrl: './<%= name %>-table.component.html',
|
|
48
|
+
styleUrls: [ './<%= name %>-table.component.scss' ],
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
animations: [ RowAnimation ],
|
|
51
|
+
standalone: true,
|
|
52
|
+
imports: [
|
|
53
|
+
CommonModule,
|
|
54
|
+
MatCardModule,
|
|
55
|
+
MatProgressBarModule,
|
|
56
|
+
CardProgressBarDirective,
|
|
57
|
+
MatTableModule,
|
|
58
|
+
FlexLayoutModule,
|
|
59
|
+
TableDataSourceDirective,
|
|
60
|
+
TableFilterModule,
|
|
61
|
+
RxapFormsModule,
|
|
62
|
+
MatCheckboxModule,
|
|
63
|
+
ReactiveFormsModule,
|
|
64
|
+
RouterModule,
|
|
65
|
+
MatDividerModule,
|
|
66
|
+
<% if (hasNavigationBackHeader) { %>
|
|
67
|
+
NavigateBackButtonComponent,
|
|
68
|
+
<% } %>
|
|
69
|
+
TableRowControlsModule,
|
|
70
|
+
TableColumnMenuModule,
|
|
71
|
+
DateCellComponent,
|
|
72
|
+
|
|
73
|
+
MatPaginatorModule,
|
|
74
|
+
MatSortModule,
|
|
75
|
+
MatIconModule,
|
|
76
|
+
MatInputModule,
|
|
77
|
+
MatButtonModule,
|
|
78
|
+
InputClearButtonDirective,
|
|
79
|
+
TableCreateButtonDirective,
|
|
80
|
+
TableShowArchivedSlideComponent,
|
|
81
|
+
PersistentPaginatorDirective,
|
|
82
|
+
ConfirmModule,
|
|
83
|
+
HasPermissionModule,
|
|
84
|
+
TableRowActionsModule,
|
|
85
|
+
GetFromObjectPipe,
|
|
86
|
+
CopyToClipboardCellComponent,
|
|
87
|
+
LinkCellComponent,
|
|
88
|
+
IconCellComponent,
|
|
89
|
+
BooleanCellComponent,
|
|
90
|
+
DataSourceErrorComponent,
|
|
91
|
+
MatSnackBarModule,
|
|
92
|
+
TreeControlCellComponent,
|
|
93
|
+
],
|
|
94
|
+
})
|
|
95
|
+
export class <%= classify(componentName) %>Component {
|
|
96
|
+
|
|
97
|
+
@Input()
|
|
98
|
+
public parameters?: Observable<Record<string, unknown>>;
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default <%= classify(componentName) %>Component;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Normalized } from '@rxap/utilities';
|
|
2
|
+
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
3
|
+
import { NormalizedTreeTableOptions } from '../../../lib/tree-table-options';
|
|
4
|
+
import { TreeTableComponentOptions } from './schema';
|
|
5
|
+
export interface NormalizedTreeTableComponentOptions extends Readonly<Normalized<TreeTableComponentOptions> & NormalizedTreeTableOptions & NormalizedAngularOptions> {
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function NormalizedTreeTableComponentOptions(options: Readonly<TreeTableComponentOptions>): Readonly<NormalizedTreeTableComponentOptions>;
|
|
9
|
+
export default function (options: TreeTableComponentOptions): () => import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizedTreeTableComponentOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const angular_options_1 = require("../../../lib/angular-options");
|
|
8
|
+
const backend_types_1 = require("../../../lib/backend-types");
|
|
9
|
+
const minimum_table_component_options_1 = require("../../../lib/minimum-table-component-options");
|
|
10
|
+
const tree_table_options_1 = require("../../../lib/tree-table-options");
|
|
11
|
+
function NormalizedTreeTableComponentOptions(options) {
|
|
12
|
+
const normalizedMinimumTableComponentOptions = (0, minimum_table_component_options_1.NormalizeMinimumTableComponentOptions)(options);
|
|
13
|
+
(0, angular_options_1.AssertAngularOptionsNameProperty)(normalizedMinimumTableComponentOptions);
|
|
14
|
+
const { name } = normalizedMinimumTableComponentOptions;
|
|
15
|
+
const normalizedTreeTableOptions = (0, tree_table_options_1.NormalizeTreeTableOptions)(options, name);
|
|
16
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedMinimumTableComponentOptions), normalizedTreeTableOptions));
|
|
17
|
+
}
|
|
18
|
+
exports.NormalizedTreeTableComponentOptions = NormalizedTreeTableComponentOptions;
|
|
19
|
+
function printOptions(options) {
|
|
20
|
+
(0, angular_options_1.PrintAngularOptions)('tree-table-component', options);
|
|
21
|
+
if (options.columnList.length) {
|
|
22
|
+
console.log(`=== columns: \x1b[34m${options.columnList.map((item) => item.name).join(', ')}\x1b[0m`);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.log('=== columns: \x1b[31mempty\x1b[0m');
|
|
26
|
+
}
|
|
27
|
+
if (options.actionList.length > 0) {
|
|
28
|
+
console.log(`=== actions: \x1b[34m${options.actionList.map((c) => c.type).join(', ')}\x1b[0m`);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
console.log('=== actions: \x1b[31mempty\x1b[0m');
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function componentRule(normalizedOptions) {
|
|
35
|
+
const { project, feature, shared, componentName, directory, overwrite, modifiers, columnList, } = normalizedOptions;
|
|
36
|
+
const templateOptions = Object.assign(Object.assign({}, normalizedOptions), { hasNavigationBackHeader: modifiers.includes('navigation-back-header'), hasWithoutTitle: modifiers.includes('without-title'), hasColumnWithFilter: columnList.some((c) => c.hasFilter) });
|
|
37
|
+
return (0, schematics_1.chain)([
|
|
38
|
+
() => console.log(`Coerce the table component ${componentName}`),
|
|
39
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
40
|
+
project,
|
|
41
|
+
feature,
|
|
42
|
+
shared,
|
|
43
|
+
name: componentName,
|
|
44
|
+
directory,
|
|
45
|
+
overwrite,
|
|
46
|
+
template: {
|
|
47
|
+
options: templateOptions,
|
|
48
|
+
},
|
|
49
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
50
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
51
|
+
provide: 'TABLE_DATA_SOURCE',
|
|
52
|
+
useClass: 'TreeTableDataSource',
|
|
53
|
+
}, [
|
|
54
|
+
{
|
|
55
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
56
|
+
namedImports: ['TreeTableDataSource'],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
60
|
+
namedImports: ['TABLE_DATA_SOURCE'],
|
|
61
|
+
},
|
|
62
|
+
]);
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
function nestjsBackendRule(normalizedOptions) {
|
|
68
|
+
const { nestModule, project, feature, shared, componentName, directory, overwrite, scope, } = normalizedOptions;
|
|
69
|
+
const controllerName = (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
70
|
+
controllerName: componentName,
|
|
71
|
+
nestModule,
|
|
72
|
+
});
|
|
73
|
+
const getRootOperationId = (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, 'get-root', controllerName);
|
|
74
|
+
const getChildrenOperationId = (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, 'get-children', controllerName);
|
|
75
|
+
return (0, schematics_1.chain)([
|
|
76
|
+
() => console.log(`Coerce the get root operation ${getRootOperationId}`),
|
|
77
|
+
(0, schematics_ts_morph_1.CoerceGetRootOperation)({
|
|
78
|
+
controllerName: componentName,
|
|
79
|
+
nestModule,
|
|
80
|
+
project,
|
|
81
|
+
feature,
|
|
82
|
+
shared,
|
|
83
|
+
}),
|
|
84
|
+
() => console.log(`Coerce the get children operation ${getChildrenOperationId}`),
|
|
85
|
+
(0, schematics_ts_morph_1.CoerceGetChildrenOperation)({
|
|
86
|
+
controllerName: componentName,
|
|
87
|
+
nestModule,
|
|
88
|
+
project,
|
|
89
|
+
feature,
|
|
90
|
+
shared,
|
|
91
|
+
skipCoerce: true,
|
|
92
|
+
}),
|
|
93
|
+
() => console.log(`Coerce the tree table root proxy remote method class`),
|
|
94
|
+
(0, schematics_ts_morph_1.CoerceTreeTableRootProxyRemoteMethodClass)({
|
|
95
|
+
scope,
|
|
96
|
+
project,
|
|
97
|
+
feature,
|
|
98
|
+
shared,
|
|
99
|
+
directory,
|
|
100
|
+
getRootOperationId,
|
|
101
|
+
}),
|
|
102
|
+
() => console.log(`Coerce the tree table children proxy remote method class`),
|
|
103
|
+
(0, schematics_ts_morph_1.CoerceTreeTableChildrenProxyRemoteMethodClass)({
|
|
104
|
+
scope,
|
|
105
|
+
project,
|
|
106
|
+
feature,
|
|
107
|
+
shared,
|
|
108
|
+
directory,
|
|
109
|
+
getChildrenOperationId,
|
|
110
|
+
}),
|
|
111
|
+
() => console.log(`Coerce the tree table providers`),
|
|
112
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
113
|
+
project,
|
|
114
|
+
feature,
|
|
115
|
+
shared,
|
|
116
|
+
name: componentName,
|
|
117
|
+
directory,
|
|
118
|
+
overwrite,
|
|
119
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
120
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
121
|
+
provide: 'RXAP_TREE_TABLE_DATA_SOURCE_ROOT_REMOTE_METHOD',
|
|
122
|
+
useClass: 'TreeTableRootProxyMethod',
|
|
123
|
+
}, [
|
|
124
|
+
{
|
|
125
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
126
|
+
namedImports: ['RXAP_TREE_TABLE_DATA_SOURCE_ROOT_REMOTE_METHOD'],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
moduleSpecifier: './tree-table-root-proxy.method',
|
|
130
|
+
namedImports: ['TreeTableRootProxyMethod'],
|
|
131
|
+
},
|
|
132
|
+
]);
|
|
133
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
134
|
+
provide: 'RXAP_TREE_TABLE_DATA_SOURCE_CHILDREN_REMOTE_METHOD',
|
|
135
|
+
useClass: 'TreeTableChildrenProxyMethod',
|
|
136
|
+
}, [
|
|
137
|
+
{
|
|
138
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
139
|
+
namedImports: ['RXAP_TREE_TABLE_DATA_SOURCE_CHILDREN_REMOTE_METHOD'],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
moduleSpecifier: './tree-table-children-proxy.method',
|
|
143
|
+
namedImports: ['TreeTableChildrenProxyMethod'],
|
|
144
|
+
},
|
|
145
|
+
]);
|
|
146
|
+
},
|
|
147
|
+
}),
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
function localBackendRule(normalizedOptions) {
|
|
151
|
+
const { project, feature, shared, componentName, directory, overwrite, name, } = normalizedOptions;
|
|
152
|
+
return (0, schematics_1.chain)([
|
|
153
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
154
|
+
project,
|
|
155
|
+
feature,
|
|
156
|
+
shared,
|
|
157
|
+
name: componentName,
|
|
158
|
+
directory,
|
|
159
|
+
overwrite,
|
|
160
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
161
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
162
|
+
provide: 'RXAP_TREE_TABLE_DATA_SOURCE_ROOT_REMOTE_METHOD',
|
|
163
|
+
useClass: `${(0, utilities_1.classify)(name)}RootTableMethod`,
|
|
164
|
+
}, [
|
|
165
|
+
{
|
|
166
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
167
|
+
namedImports: ['RXAP_TREE_TABLE_DATA_SOURCE_ROOT_REMOTE_METHOD'],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
moduleSpecifier: `./${name}-root-table.method`,
|
|
171
|
+
namedImports: [`${(0, utilities_1.classify)(name)}RootTableMethod`],
|
|
172
|
+
},
|
|
173
|
+
]);
|
|
174
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
175
|
+
provide: 'RXAP_TREE_TABLE_DATA_SOURCE_CHILDREN_REMOTE_METHOD',
|
|
176
|
+
useClass: `${(0, utilities_1.classify)(name)}ChildTableMethod`,
|
|
177
|
+
}, [
|
|
178
|
+
{
|
|
179
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
180
|
+
namedImports: ['RXAP_TREE_TABLE_DATA_SOURCE_CHILDREN_REMOTE_METHOD'],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
moduleSpecifier: `./${name}-child-table.method`,
|
|
184
|
+
namedImports: [`${(0, utilities_1.classify)(name)}ChildTableMethod`],
|
|
185
|
+
},
|
|
186
|
+
]);
|
|
187
|
+
},
|
|
188
|
+
}),
|
|
189
|
+
() => console.log(`Coerce local backend root method`),
|
|
190
|
+
(0, schematics_ts_morph_1.CoerceMethodClass)({
|
|
191
|
+
name: `${name}-root-table`,
|
|
192
|
+
project,
|
|
193
|
+
feature,
|
|
194
|
+
shared,
|
|
195
|
+
directory,
|
|
196
|
+
overwrite,
|
|
197
|
+
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
198
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
199
|
+
{
|
|
200
|
+
moduleSpecifier: `./${name}-table`,
|
|
201
|
+
namedImports: [`I${(0, utilities_1.classify)(name)}Table`],
|
|
202
|
+
},
|
|
203
|
+
]);
|
|
204
|
+
return {
|
|
205
|
+
parameters: [],
|
|
206
|
+
statements: ['return [];'],
|
|
207
|
+
returnType: `I${(0, utilities_1.classify)(name)}Table[]`,
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
}),
|
|
211
|
+
() => console.log(`Coerce local backend child method`),
|
|
212
|
+
(0, schematics_ts_morph_1.CoerceMethodClass)({
|
|
213
|
+
name: `${name}-child-table`,
|
|
214
|
+
project,
|
|
215
|
+
feature,
|
|
216
|
+
shared,
|
|
217
|
+
directory,
|
|
218
|
+
overwrite,
|
|
219
|
+
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
220
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
221
|
+
{
|
|
222
|
+
moduleSpecifier: '@rxap/data-structure-tree',
|
|
223
|
+
namedImports: ['Node'],
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
moduleSpecifier: `./${name}-table`,
|
|
227
|
+
namedImports: [`I${(0, utilities_1.classify)(name)}Table`],
|
|
228
|
+
},
|
|
229
|
+
]);
|
|
230
|
+
return {
|
|
231
|
+
parameters: [
|
|
232
|
+
{
|
|
233
|
+
name: 'node',
|
|
234
|
+
type: `Node<I${(0, utilities_1.classify)(name)}Table>`,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
statements: ['return [];'],
|
|
238
|
+
returnType: `I${(0, utilities_1.classify)(name)}Table[]`,
|
|
239
|
+
};
|
|
240
|
+
},
|
|
241
|
+
}),
|
|
242
|
+
]);
|
|
243
|
+
}
|
|
244
|
+
function backendRule(normalizedOptions) {
|
|
245
|
+
const { backend, } = normalizedOptions;
|
|
246
|
+
switch (backend) {
|
|
247
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
248
|
+
return nestjsBackendRule(normalizedOptions);
|
|
249
|
+
case backend_types_1.BackendTypes.LOCAL:
|
|
250
|
+
return localBackendRule(normalizedOptions);
|
|
251
|
+
}
|
|
252
|
+
return (0, schematics_1.noop)();
|
|
253
|
+
}
|
|
254
|
+
function treeTableMethodRule(normalizedOptions) {
|
|
255
|
+
const { project, feature, shared, componentName, directory, overwrite, tableRootMethod, tableChildMethod, } = normalizedOptions;
|
|
256
|
+
if (tableRootMethod && tableChildMethod) {
|
|
257
|
+
return (0, schematics_1.chain)([
|
|
258
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
259
|
+
project,
|
|
260
|
+
feature,
|
|
261
|
+
shared,
|
|
262
|
+
name: componentName,
|
|
263
|
+
directory,
|
|
264
|
+
overwrite,
|
|
265
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
266
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
267
|
+
provide: 'RXAP_TREE_TABLE_DATA_SOURCE_ROOT_REMOTE_METHOD',
|
|
268
|
+
useClass: tableRootMethod.className,
|
|
269
|
+
}, [
|
|
270
|
+
{
|
|
271
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
272
|
+
namedImports: ['RXAP_TREE_TABLE_DATA_SOURCE_ROOT_REMOTE_METHOD'],
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
moduleSpecifier: tableRootMethod.importPath,
|
|
276
|
+
namedImports: [tableRootMethod.className],
|
|
277
|
+
},
|
|
278
|
+
]);
|
|
279
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
280
|
+
provide: 'RXAP_TREE_TABLE_DATA_SOURCE_CHILDREN_REMOTE_METHOD',
|
|
281
|
+
useClass: tableChildMethod.className,
|
|
282
|
+
}, [
|
|
283
|
+
{
|
|
284
|
+
moduleSpecifier: '@rxap/data-source/table/tree',
|
|
285
|
+
namedImports: ['RXAP_TREE_TABLE_DATA_SOURCE_CHILDREN_REMOTE_METHOD'],
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
moduleSpecifier: tableChildMethod.importPath,
|
|
289
|
+
namedImports: [tableChildMethod.className],
|
|
290
|
+
},
|
|
291
|
+
]);
|
|
292
|
+
},
|
|
293
|
+
}),
|
|
294
|
+
]);
|
|
295
|
+
}
|
|
296
|
+
return (0, schematics_1.noop)();
|
|
297
|
+
}
|
|
298
|
+
function default_1(options) {
|
|
299
|
+
const normalizedOptions = NormalizedTreeTableComponentOptions(options);
|
|
300
|
+
printOptions(normalizedOptions);
|
|
301
|
+
return () => {
|
|
302
|
+
return (0, schematics_1.chain)([
|
|
303
|
+
(0, minimum_table_component_options_1.tableInterfaceRule)(normalizedOptions),
|
|
304
|
+
componentRule(normalizedOptions),
|
|
305
|
+
(0, minimum_table_component_options_1.actionListRule)(normalizedOptions),
|
|
306
|
+
(0, minimum_table_component_options_1.cellComponentRule)(normalizedOptions),
|
|
307
|
+
(0, minimum_table_component_options_1.headerButtonRule)(normalizedOptions),
|
|
308
|
+
backendRule(normalizedOptions),
|
|
309
|
+
treeTableMethodRule(normalizedOptions),
|
|
310
|
+
]);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
exports.default = default_1;
|
|
314
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/tree-table-component/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAWmC;AACnC,+CAGyB;AAKzB,kEAIsC;AACtC,8DAA0D;AAC1D,kGAMsD;AACtD,wEAGyC;AAQzC,SAAgB,mCAAmC,CACjD,OAA4C;IAE5C,MAAM,sCAAsC,GAAG,IAAA,uEAAqC,EAAC,OAAO,CAAC,CAAC;IAC9F,IAAA,kDAAgC,EAAC,sCAAsC,CAAC,CAAC;IACzE,MAAM,EAAE,IAAI,EAAE,GAAG,sCAAsC,CAAC;IACxD,MAAM,0BAA0B,GAAG,IAAA,8CAAyB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC,IAAI,iCACb,sCAAsC,GACtC,0BAA0B,EAC7B,CAAC;AACL,CAAC;AAXD,kFAWC;AAED,SAAS,YAAY,CAAC,OAA4C;IAChE,IAAA,qCAAmB,EAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACrD,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE;QAC7B,OAAO,CAAC,GAAG,CAAC,wB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