@rxap/schematic-angular 16.2.0-dev.6 → 16.2.0-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +1 -1
  3. package/package.json +4 -2
  4. package/src/lib/accordion-header.d.ts +5 -0
  5. package/src/lib/accordion-header.js +8 -2
  6. package/src/lib/accordion-header.js.map +1 -1
  7. package/src/lib/accordion-item.d.ts +17 -16
  8. package/src/lib/accordion-item.js +44 -32
  9. package/src/lib/accordion-item.js.map +1 -1
  10. package/src/lib/accordion-itme-kinds.d.ts +8 -0
  11. package/src/lib/accordion-itme-kinds.js +16 -0
  12. package/src/lib/accordion-itme-kinds.js.map +1 -0
  13. package/src/lib/coerce-accordion-component.js +2 -2
  14. package/src/lib/coerce-accordion-component.js.map +1 -1
  15. package/src/lib/coerce-form-component.js +5 -2
  16. package/src/lib/coerce-form-component.js.map +1 -1
  17. package/src/lib/coerce-minimum-table-component.js +6 -3
  18. package/src/lib/coerce-minimum-table-component.js.map +1 -1
  19. package/src/lib/coerce-tree-table-component.js +2 -0
  20. package/src/lib/coerce-tree-table-component.js.map +1 -1
  21. package/src/lib/data-grid-item.d.ts +4 -7
  22. package/src/lib/data-grid-item.js.map +1 -1
  23. package/src/lib/data-grid-options.d.ts +2 -0
  24. package/src/lib/data-grid-options.js +7 -3
  25. package/src/lib/data-grid-options.js.map +1 -1
  26. package/src/lib/form/generate-form-template.d.ts +5 -0
  27. package/src/lib/form/generate-form-template.js +12 -0
  28. package/src/lib/form/generate-form-template.js.map +1 -0
  29. package/src/lib/form-component-control.d.ts +2 -6
  30. package/src/lib/form-component-control.js.map +1 -1
  31. package/src/lib/form-control.d.ts +125 -0
  32. package/src/lib/form-control.js +303 -0
  33. package/src/lib/form-control.js.map +1 -0
  34. package/src/lib/form-definition-control.d.ts +3 -57
  35. package/src/lib/form-definition-control.js +18 -144
  36. package/src/lib/form-definition-control.js.map +1 -1
  37. package/src/lib/load-handlebars-template.d.ts +3 -0
  38. package/src/lib/load-handlebars-template.js +24 -0
  39. package/src/lib/load-handlebars-template.js.map +1 -0
  40. package/src/lib/minimum-table-component-options.d.ts +1 -1
  41. package/src/lib/minimum-table-component-options.js +3 -3
  42. package/src/lib/minimum-table-component-options.js.map +1 -1
  43. package/src/lib/table-column.d.ts +8 -2
  44. package/src/lib/table-column.js +32 -15
  45. package/src/lib/table-column.js.map +1 -1
  46. package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.hbs +25 -0
  47. package/src/schematics/accordion/accordion-component/index.js +6 -98
  48. package/src/schematics/accordion/accordion-component/index.js.map +1 -1
  49. package/src/schematics/accordion/accordion-component/template.schema.json +102 -0
  50. package/src/schematics/accordion/accordion-item-component/index.d.ts +2 -2
  51. package/src/schematics/accordion/accordion-item-component/index.js +42 -42
  52. package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
  53. package/src/schematics/accordion/accordion-item-component/schema.d.ts +2 -2
  54. package/src/schematics/accordion/accordion-item-component/template.schema.json +33 -0
  55. package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +1 -1
  56. package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +17 -29
  57. package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
  58. package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +1 -1
  59. package/src/schematics/accordion/item/accordion-item-data-grid-component/template.schema.json +31 -0
  60. package/src/schematics/accordion/item/accordion-item-switch-component/index.d.ts +1 -1
  61. package/src/schematics/accordion/item/accordion-item-switch-component/index.js +4 -4
  62. package/src/schematics/accordion/item/accordion-item-switch-component/index.js.map +1 -1
  63. package/src/schematics/accordion/item/accordion-item-switch-component/schema.d.ts +1 -1
  64. package/src/schematics/accordion/item/accordion-item-switch-component/template.schema.json +84 -0
  65. package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +1 -1
  66. package/src/schematics/accordion/item/accordion-item-table-component/index.js +8 -8
  67. package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
  68. package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +1 -1
  69. package/src/schematics/accordion/item/accordion-item-table-component/template.schema.json +46 -0
  70. package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +1 -1
  71. package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +10 -10
  72. package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
  73. package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +1 -1
  74. package/src/schematics/accordion/item/accordion-item-tree-table-component/template.schema.json +46 -0
  75. package/src/schematics/accordion/templates/accordion-header.hbs +6 -0
  76. package/src/schematics/accordion/templates/data-grid-accordion-item.hbs +15 -0
  77. package/src/schematics/accordion/templates/default-accordion-item.hbs +15 -0
  78. package/src/schematics/accordion/templates/switch-accordion-item.hbs +21 -0
  79. package/src/schematics/accordion/templates/table-accordion-item.hbs +15 -0
  80. package/src/schematics/accordion/templates/tree-table-accordion-item.hbs +15 -0
  81. package/src/schematics/accordion-item.schema.json +35 -0
  82. package/src/schematics/angular.schema.json +2 -10
  83. package/src/schematics/backend.schema.json +13 -0
  84. package/src/schematics/button.schema.json +30 -0
  85. package/src/schematics/data-grid-component/files/component/__componentName__.component.html.hbs +34 -0
  86. package/src/schematics/data-grid-component/index.d.ts +0 -1
  87. package/src/schematics/data-grid-component/index.js +21 -7
  88. package/src/schematics/data-grid-component/index.js.map +1 -1
  89. package/src/schematics/data-grid-component/template.schema.json +23 -0
  90. package/src/schematics/data-grid-item.schema.json +23 -0
  91. package/src/schematics/data-grid.schema.json +44 -0
  92. package/src/schematics/dialog-component/template.schema.json +65 -0
  93. package/src/schematics/form/control/input-form-control/index.d.ts +2 -2
  94. package/src/schematics/form/control/input-form-control/index.js +4 -27
  95. package/src/schematics/form/control/input-form-control/index.js.map +1 -1
  96. package/src/schematics/form/control/input-form-control/schema.d.ts +2 -3
  97. package/src/schematics/form/control/input-form-control/template.schema.json +23 -0
  98. package/src/schematics/form/control/select-form-control/index.d.ts +4 -2
  99. package/src/schematics/form/control/select-form-control/index.js +132 -96
  100. package/src/schematics/form/control/select-form-control/index.js.map +1 -1
  101. package/src/schematics/form/control/select-form-control/schema.d.ts +2 -3
  102. package/src/schematics/form/control/select-form-control/template.schema.json +23 -0
  103. package/src/schematics/form/control/table-select-form-control/index.d.ts +4 -6
  104. package/src/schematics/form/control/table-select-form-control/index.js +80 -68
  105. package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
  106. package/src/schematics/form/control/table-select-form-control/schema.d.ts +2 -4
  107. package/src/schematics/form/control/table-select-form-control/template.schema.json +78 -0
  108. package/src/schematics/form/form-component/files/component/{__componentName__.component.html.template → __componentName__.component.html.hbs} +3 -3
  109. package/src/schematics/form/form-component/index.js +4 -1
  110. package/src/schematics/form/form-component/index.js.map +1 -1
  111. package/src/schematics/form/form-component/template.schema.json +23 -0
  112. package/src/schematics/form/form-control/index.d.ts +3 -1
  113. package/src/schematics/form/form-control/index.js +19 -8
  114. package/src/schematics/form/form-control/index.js.map +1 -1
  115. package/src/schematics/form/form-control/template.schema.json +37 -0
  116. package/src/schematics/form/form-definition/index.js +14 -1
  117. package/src/schematics/form/form-definition/index.js.map +1 -1
  118. package/src/schematics/form/form-definition/template.schema.json +33 -0
  119. package/src/schematics/form/templates/checkbox-form-control.hbs +9 -0
  120. package/src/schematics/form/templates/default-form-control.hbs +2 -0
  121. package/src/schematics/form/templates/input-form-control.hbs +9 -0
  122. package/src/schematics/form/templates/mat-form-field.hbs +31 -0
  123. package/src/schematics/form/templates/slide-toggle-form-control.hbs +8 -0
  124. package/src/schematics/form/templates/table-select-form-control.hbs +18 -0
  125. package/src/schematics/form-component.schema.json +39 -0
  126. package/src/schematics/form-control.schema.json +68 -0
  127. package/src/schematics/form-definition.schema.json +22 -0
  128. package/src/schematics/form-field.schema.json +24 -0
  129. package/src/schematics/header-button.schema.json +42 -0
  130. package/src/schematics/input-form-control.schema.json +47 -0
  131. package/src/schematics/minimum-table.schema.json +54 -0
  132. package/src/schematics/property.schema.json +28 -0
  133. package/src/schematics/select-form-control.schema.json +53 -0
  134. package/src/schematics/table/action/dialog-table-action/template.schema.json +61 -0
  135. package/src/schematics/table/action/form-table-action/template.schema.json +75 -0
  136. package/src/schematics/table/action/navigation-table-action/template.schema.json +31 -0
  137. package/src/schematics/table/action/open-api-table-action/template.schema.json +59 -0
  138. package/src/schematics/table/action/operation-table-action/template.schema.json +17 -0
  139. package/src/schematics/table/header-button/form-table-header-button/template.schema.json +51 -0
  140. package/src/schematics/table/header-button/navigation-table-header-button/template.schema.json +31 -0
  141. package/src/schematics/table/table-action/template.schema.json +30 -0
  142. package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +241 -0
  143. package/src/schematics/table/table-component/index.d.ts +1 -1
  144. package/src/schematics/table/table-component/index.js +2 -2
  145. package/src/schematics/table/table-component/index.js.map +1 -1
  146. package/src/schematics/table/table-component/template.schema.json +26 -0
  147. package/src/schematics/table/table-header-button/template.schema.json +30 -0
  148. package/src/schematics/table/templates/boolean-table-column.hbs +10 -0
  149. package/src/schematics/table/templates/component-table-column.hbs +12 -0
  150. package/src/schematics/table/templates/copy-to-clipboard-table-column.hbs +10 -0
  151. package/src/schematics/table/templates/date-table-column.hbs +11 -0
  152. package/src/schematics/table/templates/default-table-column.hbs +8 -0
  153. package/src/schematics/table/templates/icon-table-column.hbs +10 -0
  154. package/src/schematics/table/templates/link-table-column.hbs +10 -0
  155. package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +249 -0
  156. package/src/schematics/table/tree-table-component/template.schema.json +26 -0
  157. package/src/schematics/table-action.schema.json +61 -0
  158. package/src/schematics/table-column.schema.json +69 -0
  159. package/src/schematics/table.schema.json +54 -0
  160. package/src/schematics/tree-component/template.schema.json +31 -0
  161. package/src/schematics/tree-table.schema.json +40 -0
  162. package/src/schematics/type.schema.json +35 -0
  163. package/src/schematics/upstream.schema.json +56 -0
  164. package/src/lib/accordion-itme-types.d.ts +0 -8
  165. package/src/lib/accordion-itme-types.js +0 -16
  166. package/src/lib/accordion-itme-types.js.map +0 -1
  167. package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +0 -94
  168. package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +0 -10
  169. package/src/schematics/accordion/accordion-component/schema.json +0 -191
  170. package/src/schematics/accordion/accordion-item-component/schema.json +0 -92
  171. package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +0 -133
  172. package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +0 -226
  173. package/src/schematics/accordion/item/accordion-item-table-component/schema.json +0 -334
  174. package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +0 -334
  175. package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +0 -42
  176. package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template +0 -25
  177. package/src/schematics/data-grid-component/schema.json +0 -176
  178. package/src/schematics/dialog-component/schema.json +0 -81
  179. package/src/schematics/form/control/input-form-control/schema.json +0 -116
  180. package/src/schematics/form/control/select-form-control/schema.json +0 -102
  181. package/src/schematics/form/control/table-select-form-control/schema.json +0 -106
  182. package/src/schematics/form/form-component/schema.json +0 -173
  183. package/src/schematics/form/form-control/schema.json +0 -92
  184. package/src/schematics/form/form-definition/schema.json +0 -148
  185. package/src/schematics/table/action/dialog-table-action/schema.json +0 -148
  186. package/src/schematics/table/action/form-table-action/schema.json +0 -202
  187. package/src/schematics/table/action/navigation-table-action/schema.json +0 -95
  188. package/src/schematics/table/action/open-api-table-action/schema.json +0 -121
  189. package/src/schematics/table/action/operation-table-action/schema.json +0 -98
  190. package/src/schematics/table/header-button/form-table-header-button/schema.json +0 -139
  191. package/src/schematics/table/header-button/navigation-table-header-button/schema.json +0 -87
  192. package/src/schematics/table/table-action/schema.json +0 -94
  193. package/src/schematics/table/table-component/files/component/__componentName__.component.html.template +0 -299
  194. package/src/schematics/table/table-component/schema.json +0 -340
  195. package/src/schematics/table/table-header-button/schema.json +0 -80
  196. package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.template +0 -259
  197. package/src/schematics/table/tree-table-component/schema.json +0 -316
  198. package/src/schematics/tree-component/schema.json +0 -86
@@ -1,80 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "table-action",
4
- "type": "object",
5
- "properties": {
6
- "tableName": {
7
- "alias": "table",
8
- "type": "string",
9
- "description": "The name of the table action"
10
- },
11
- "project": {
12
- "type": "string",
13
- "description": "The target project where the table action should be added."
14
- },
15
- "feature": {
16
- "type": "string",
17
- "description": "The feature name where the table action should be added.",
18
- "x-prompt": "To which feature should the table action be added?"
19
- },
20
- "backend": {
21
- "type": "string",
22
- "description": "The backend that should be used to handel data",
23
- "enum": [
24
- "none",
25
- "local",
26
- "nestjs",
27
- "open-api"
28
- ],
29
- "default": "none"
30
- },
31
- "shared": {
32
- "type": "boolean",
33
- "description": "Whether the table action is shared across applications",
34
- "default": false
35
- },
36
- "refresh": {
37
- "type": "boolean",
38
- "description": "Whether the table action should refresh the table after execution",
39
- "default": false
40
- },
41
- "confirm": {
42
- "type": "boolean",
43
- "description": "Whether the table action should confirm before execution",
44
- "default": false
45
- },
46
- "tooltip": {
47
- "type": "string",
48
- "description": "The tooltip for the table action"
49
- },
50
- "errorMessage": {
51
- "type": "string",
52
- "description": "The error message for the table action"
53
- },
54
- "successMessage": {
55
- "type": "string",
56
- "description": "The success message for the table action"
57
- },
58
- "directory": {
59
- "type": "string",
60
- "description": "A directory name or absolute path for the table action. relative to the feature base path"
61
- },
62
- "permission": {
63
- "type": "string"
64
- },
65
- "icon": {
66
- "type": "string"
67
- },
68
- "svgIcon": {
69
- "type": "string"
70
- },
71
- "options": {
72
- "type": "object",
73
- "additionalProperties": true
74
- }
75
- },
76
- "required": [
77
- "project",
78
- "feature"
79
- ]
80
- }
@@ -1,259 +0,0 @@
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<% if (!headerButton && hasWithoutTitle) { %> justify-end<% } %>">
16
- <% if (!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
25
- [disabled]="tableDataSourceDirective.hasError$ | async"
26
- [rxapTableHeaderButton]="tableDataSourceDirective"
27
- <% if (headerButton.permission) { %>rxapHasEnablePermission="<%= headerButton.permission %>"<% } %>
28
- >
29
- <% 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><% } %>
30
- </button>
31
- <mat-card-subtitle i18n><%= headerButton.label %></mat-card-subtitle>
32
- <% } %>
33
- <rxap-table-column-menu matCard #rxapTableColumns="rxapTableColumns" <% if (!headerButton && hasWithoutTitle) { %>inline<% } %>>
34
- <% for (const column of columnList) { %>
35
- <rxap-table-column-option
36
- name="<%= column.name %>"<% if (column.active) { %><%= ' active' %><% } %><% if (column.hidden) { %><%= ' hidden' %><% } %><% if (column.inactive) { %><%= ' inactive' %><% } %><% if (column.show) { %><%= ' show' %><% } %>>
37
- <ng-container i18n><%= column.title %></ng-container>
38
- </rxap-table-column-option>
39
- <% } %>
40
- <% if (actionList.length) { %>
41
- <rxap-table-column-option hidden name="actions">
42
- <ng-container i18n>Actions</ng-container>
43
- </rxap-table-column-option>
44
- <% } %>
45
- </rxap-table-column-menu>
46
- </mat-card-header>
47
-
48
- <mat-card-content>
49
- <rxap-data-source-error
50
- [loading]="tableDataSourceDirective.loading$"
51
- [error]="tableDataSourceDirective.dataSource?.error$"
52
- *ngIf="tableDataSourceDirective.hasError$ | async"
53
- [refresh]="tableDataSourceDirective.retry">
54
- </rxap-data-source-error>
55
- <div class="table-scroll-container mt-4 overflow-x-auto overscroll-auto">
56
- <table
57
- [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
58
- matSort
59
- mat-table
60
- #tableDataSourceDirective="rxapTableDataSource"
61
- rxapTableDataSource
62
- [parameters]="parameters"
63
- id="<%= name %>"
64
- <% if (hasColumnWithFilter) { %>rxap-filter-header-row<% } %>
65
- >
66
- <!-- region columns -->
67
-
68
- <% if (actionList.length) { %>
69
- <ng-container matColumnDef="actions" stickyEnd>
70
- <th mat-header-cell *matHeaderCellDef>
71
- <% if (selectColumn) { %>
72
- <div class="flex flex-row" *rxapSelectedRows="let selected">
73
- <% for (const action of actionList) { %>
74
- <% if (action.inHeader) { %>
75
- <button
76
- rxapTableRowHeaderAction="<%= action.type %>"
77
- mat-icon-button
78
- <% if (action.color) { %>color="<%= action.color %>"<% } %>
79
- <% if (action.cssClass) { %>class="<%= action.cssClass %>"<% } %>
80
- *ngIf="selected | rxapRowActionCheck:'<%= action.type %>'"
81
- <% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
82
- matTooltip
83
- >
84
- <% 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><% } %>
85
- <mat-progress-bar
86
- *rxapTableRowActionExecuting
87
- mode="indeterminate"
88
- ></mat-progress-bar>
89
- </button>
90
- <% } %>
91
- <% } %>
92
- </div>
93
- <% } %>
94
- </th>
95
-
96
- <td mat-cell *matCellDef="let element">
97
- <div class="flex flex-row">
98
- <% for (const action of actionList) { %>
99
- <button
100
- rxapTableRowAction="<%= action.type %>"
101
- [element]="element"
102
- <% if (action.color) { %>color="<%= action.color %>"<% } %>
103
- <% if (action.cssClass) { %>class="<%= action.cssClass %>"<% } %>
104
- mat-icon-button
105
- *ngIf="element | rxapRowActionCheck:'<%= action.type %>'"
106
- <% if (action.permission) { %>rxapHasEnablePermission="<%= action.permission %>"<% } %>
107
- matTooltip
108
- >
109
- <% 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><% } %>
110
- <mat-progress-bar
111
- *rxapTableRowActionExecuting
112
- mode="indeterminate"
113
- ></mat-progress-bar>
114
- </button>
115
- <% } %>
116
- </div>
117
- </td>
118
- </ng-container>
119
- <% } %>
120
- <% for (const column of columnList) { %>
121
- <% if (column.role === 'copy-to-clipboard') { %>
122
- <ng-container matColumnDef="<%= column.name %>">
123
- <th mat-header-cell *matHeaderCellDef mat-sort-header>
124
- <ng-container i18n><%= column.title %></ng-container>
125
- </th>
126
- <td *matCellDef="let element" mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> [rxap-copy-to-clipboard-cell]="element?.<%= column.propertyPath %>"></td>
127
- </ng-container>
128
- <% } else if (column.role === 'link') { %>
129
- <ng-container matColumnDef="<%= column.name %>">
130
- <th mat-header-cell *matHeaderCellDef mat-sort-header>
131
- <ng-container i18n><%= column.title %></ng-container>
132
- </th>
133
- <td *matCellDef="let element" mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> [rxap-link-cell]="element?.<%= column.propertyPath %>"></td>
134
- </ng-container>
135
- <% } else if (column.role === 'date') { %>
136
- <ng-container matColumnDef="<%= column.name %>">
137
- <th mat-header-cell *matHeaderCellDef mat-sort-header>
138
- <ng-container i18n><%= column.title %></ng-container>
139
- </th>
140
-
141
- <td *matCellDef="let element" mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> [rxap-date-cell]="element?.<%= column.propertyPath %>" format="dd.MM.yyyy HH:mm:ss"></td>
142
- </ng-container>
143
- <% } else if (column.role === 'boolean') { %>
144
- <ng-container matColumnDef="<%= column.name %>">
145
- <th mat-header-cell *matHeaderCellDef mat-sort-header>
146
- <ng-container i18n><%= column.title %></ng-container>
147
- </th>
148
-
149
- <td *matCellDef="let element" mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> [rxap-boolean-cell]="element?.<%= column.propertyPath %>"></td>
150
- </ng-container>
151
- <% } else if (column.role === 'icon') { %>
152
- <ng-container matColumnDef="<%= column.name %>">
153
- <th mat-header-cell *matHeaderCellDef mat-sort-header>
154
- <ng-container i18n><%= column.title %></ng-container>
155
- </th>
156
-
157
- <td *matCellDef="let element" mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> [rxap-icon-cell]="element?.<%= column.propertyPath %>"></td>
158
- </ng-container>
159
- <% } else if (column.role === 'component') { %>
160
- <ng-container matColumnDef="<%= column.name %>">
161
- <th mat-header-cell *matHeaderCellDef mat-sort-header>
162
- <ng-container i18n><%= column.title %></ng-container>
163
- </th>
164
-
165
- <td *matCellDef="let element" mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> <%= prefix %>-<%= column.name %>-cell [element]="element" [value]="element?.<%= column.propertyPath %>"></td>
166
- </ng-container>
167
- <% } else { %>
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
-
173
- <td mat-cell <% if (column.cssClass) { %>class="<%= column.cssClass %>"<% } %> *matCellDef="let element">
174
- <% if (column.template) { %>
175
- <%= column.template %>
176
- <% } else if (column.pipeList.length) { %>
177
- {{ element?.<%= column.propertyPath %><% for (const pipe of column.pipeList) { %> | <%= pipe.name %><% } %> }}
178
- <% } else { %>
179
- {{ element?.<%= column.propertyPath %> }}
180
- <% } %>
181
- </td>
182
- </ng-container>
183
- <% } %>
184
- <% } %>
185
-
186
- <!-- endregion -->
187
- <% if (hasColumnWithFilter) { %>
188
- <!-- region filter columns -->
189
- <% if (actionList.length) { %>
190
- <ng-container matColumnDef="filter_actions" stickyEnd>
191
- <th mat-header-cell *matHeaderCellDef></th>
192
- </ng-container>
193
- <% } %>
194
-
195
- <% for (const column of columnList) { %>
196
- <ng-container matColumnDef="filter_<%= column.name %>">
197
- <th mat-header-cell *matHeaderCellDef>
198
- <% if (column.hasFilter) { %>
199
- <% if (column.type === 'boolean') { %>
200
- <mat-checkbox
201
- indeterminate
202
- parentControlContainer
203
- formControlName="<%= camelize(column.name) %>"
204
- >
205
- <ng-container i18n><%= column.title %></ng-container>
206
- </mat-checkbox>
207
- <% } else { %>
208
- <mat-form-field class="w-full pt-3">
209
- <mat-label i18n><%= column.title %></mat-label>
210
- <input
211
- matInput
212
- i18n-placeholder
213
- placeholder="Enter Filter"
214
- parentControlContainer
215
- formControlName="<%= camelize(column.name) %>"
216
- />
217
- <button matSuffix rxapInputClearButton mat-icon-button>
218
- <mat-icon>clear</mat-icon>
219
- </button>
220
- </mat-form-field>
221
- <% } %>
222
- <% } %>
223
- </th>
224
- </ng-container>
225
- <% } %>
226
-
227
- <!-- endregion -->
228
- <tr
229
- class="rxap-filter-header"
230
- mat-header-row
231
- *matHeaderRowDef="
232
- rxapTableColumns.displayColumns | toFilterColumnNames
233
- "
234
- ></tr>
235
- <% } %>
236
-
237
- <tr
238
- mat-header-row
239
- *matHeaderRowDef="rxapTableColumns.displayColumns"
240
- ></tr>
241
-
242
- <tr
243
- [@rowsAnimation]=""
244
- mat-row
245
- [ngClass]="{ 'rxap-row-odd !bg-neutral-200 dark:!bg-neutral-600': odd, 'rxap-row-even': even }"
246
- class="hover:!bg-neutral-400 dark:hover:!bg-neutral-800"
247
- *matRowDef="
248
- let element;
249
- columns: rxapTableColumns.displayColumns;
250
- let odd = odd;
251
- let even = even
252
- "
253
- ></tr>
254
- </table>
255
- </div>
256
- </mat-card-content>
257
- </mat-card>
258
- </div>
259
- </div>
@@ -1,316 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "tree-table-component",
4
- "type": "object",
5
- "properties": {
6
- "name": {
7
- "type": "string",
8
- "description": "The name of the table",
9
- "x-prompt": "Which name should the table module have?"
10
- },
11
- "project": {
12
- "type": "string",
13
- "description": "The target project where the table module should be added."
14
- },
15
- "feature": {
16
- "type": "string",
17
- "description": "The feature name where the table module should be added.",
18
- "x-prompt": "To which feature should the table module be added?"
19
- },
20
- "shared": {
21
- "type": "boolean",
22
- "description": "Whether the table is shared across applications",
23
- "default": false
24
- },
25
- "backend": {
26
- "type": "string",
27
- "description": "The backend that should be used to handel data",
28
- "enum": [
29
- "none",
30
- "local",
31
- "nestjs",
32
- "open-api"
33
- ],
34
- "default": "none"
35
- },
36
- "directory": {
37
- "type": "string",
38
- "description": "A directory name or absolute path for the table module. relative to the feature base path"
39
- },
40
- "nestModule": {
41
- "type": "string",
42
- "description": "The module name for the table nest operations"
43
- },
44
- "modifiers": {
45
- "alias": "modifier",
46
- "type": "array",
47
- "items": {
48
- "type": "string",
49
- "enum": [
50
- "navigation-back-header",
51
- "without-title"
52
- ]
53
- },
54
- "description": "The table modifiers"
55
- },
56
- "headerButton": {
57
- "oneOf": [
58
- {
59
- "type": "string"
60
- },
61
- {
62
- "type": "object",
63
- "properties": {
64
- "role": {
65
- "type": "string"
66
- },
67
- "permission": {
68
- "type": "string"
69
- },
70
- "icon": {
71
- "type": "string"
72
- },
73
- "svgIcon": {
74
- "type": "string"
75
- }
76
- }
77
- }
78
- ],
79
- "description": "The header button configuration"
80
- },
81
- "columnList": {
82
- "alias": "column",
83
- "type": "array",
84
- "items": {
85
- "type": "object",
86
- "properties": {
87
- "name": {
88
- "type": "string"
89
- },
90
- "type": {
91
- "oneOf": [
92
- {
93
- "type": "string"
94
- },
95
- {
96
- "type": "object",
97
- "properties": {
98
- "name": {
99
- "type": "string"
100
- },
101
- "isTypeOnly": {
102
- "type": "boolean"
103
- },
104
- "moduleSpecifier": {
105
- "type": "string"
106
- },
107
- "namedImport": {
108
- "type": "string"
109
- },
110
- "namespaceImport": {
111
- "type": "string"
112
- },
113
- "defaultImport": {
114
- "type": "string"
115
- }
116
- },
117
- "required": [
118
- "name"
119
- ]
120
- }
121
- ]
122
- },
123
- "role": {
124
- "type": "string"
125
- },
126
- "modifiers": {
127
- "type": "array",
128
- "items": {
129
- "type": "string"
130
- }
131
- },
132
- "template": {
133
- "type": "string"
134
- },
135
- "pipeList": {
136
- "type": "array",
137
- "items": {
138
- "oneOf": [
139
- {
140
- "type": "string"
141
- },
142
- {
143
- "type": "object",
144
- "properties": {
145
- "name": {
146
- "type": "string"
147
- },
148
- "namedImport": {
149
- "type": "string"
150
- },
151
- "moduleSpecifier": {
152
- "type": "string"
153
- }
154
- },
155
- "required": [
156
- "name",
157
- "namedImport",
158
- "moduleSpecifier"
159
- ]
160
- }
161
- ]
162
- }
163
- },
164
- "hasFilter": {
165
- "type": "boolean"
166
- },
167
- "title": {
168
- "type": "string"
169
- },
170
- "propertyPath": {
171
- "type": "string"
172
- },
173
- "hidden": {
174
- "type": "boolean"
175
- },
176
- "active": {
177
- "type": "boolean"
178
- },
179
- "inactive": {
180
- "type": "boolean"
181
- },
182
- "show": {
183
- "type": "boolean"
184
- }
185
- },
186
- "required": [
187
- "name"
188
- ],
189
- "description": "table column name"
190
- },
191
- "description": "List of table column names"
192
- },
193
- "actionList": {
194
- "alias": "action",
195
- "type": "array",
196
- "items": {
197
- "oneOf": [
198
- {
199
- "type": "string"
200
- },
201
- {
202
- "type": "object",
203
- "properties": {
204
- "type": {
205
- "type": "string"
206
- },
207
- "refresh": {
208
- "type": "boolean"
209
- },
210
- "confirm": {
211
- "type": "boolean"
212
- },
213
- "tooltip": {
214
- "type": "string"
215
- },
216
- "errorMessage": {
217
- "type": "string"
218
- },
219
- "successMessage": {
220
- "type": "string"
221
- },
222
- "priority": {
223
- "type": "number"
224
- },
225
- "checkFunction": {
226
- "type": "string"
227
- },
228
- "inHeader": {
229
- "type": "boolean"
230
- },
231
- "role": {
232
- "type": "string",
233
- "enum": [
234
- "form",
235
- "link",
236
- "method",
237
- "custom"
238
- ]
239
- },
240
- "icon": {
241
- "type": "string"
242
- },
243
- "svgIcon": {
244
- "type": "string"
245
- },
246
- "permission": {
247
- "type": "string"
248
- }
249
- },
250
- "required": [
251
- "type",
252
- "role"
253
- ]
254
- }
255
- ]
256
- }
257
- },
258
- "overwrite": {
259
- "anyOf": [
260
- {
261
- "type": "boolean"
262
- },
263
- {
264
- "type": "array",
265
- "items": {
266
- "type": "string"
267
- }
268
- }
269
- ],
270
- "description": "Overwrite existing files",
271
- "default": false
272
- },
273
- "context": {
274
- "type": "string",
275
- "description": "The context use to generate proper names for class, files, etc"
276
- },
277
- "tableRootMethod": {
278
- "type": "object",
279
- "properties": {
280
- "name": {
281
- "type": "string",
282
- "description": "The name of the table method class"
283
- },
284
- "moduleSpecifier": {
285
- "type": "string",
286
- "description": "The import path for the table method class"
287
- }
288
- },
289
- "required": [
290
- "name",
291
- "moduleSpecifier"
292
- ]
293
- },
294
- "tableChildMethod": {
295
- "type": "object",
296
- "properties": {
297
- "name": {
298
- "type": "string",
299
- "description": "The name of the table method class"
300
- },
301
- "moduleSpecifier": {
302
- "type": "string",
303
- "description": "The import path for the table method class"
304
- }
305
- },
306
- "required": [
307
- "name",
308
- "moduleSpecifier"
309
- ]
310
- }
311
- },
312
- "required": [
313
- "name",
314
- "feature"
315
- ]
316
- }