@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,257 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "accordion-item-table-component",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"itemName": {
|
|
7
|
+
"alias": "name",
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the accordion item",
|
|
10
|
+
"x-prompt": "Which name should the accordion item module have?"
|
|
11
|
+
},
|
|
12
|
+
"project": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The target project where the accordion item module should be added.",
|
|
15
|
+
"x-prompt": "To which project should the accordion item module be added?"
|
|
16
|
+
},
|
|
17
|
+
"feature": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The feature name where the accordion item module should be added.",
|
|
20
|
+
"x-prompt": "To which feature should the accordion item module be added?"
|
|
21
|
+
},
|
|
22
|
+
"accordionName": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The name of the accordion module where the item should be added.",
|
|
25
|
+
"x-prompt": "To which accordion module should the accordion item module be added?"
|
|
26
|
+
},
|
|
27
|
+
"shared": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false,
|
|
30
|
+
"description": "Whether the item is based of a shared component"
|
|
31
|
+
},
|
|
32
|
+
"backend": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "The backend that should be used to handel data",
|
|
35
|
+
"enum": [
|
|
36
|
+
"none",
|
|
37
|
+
"local",
|
|
38
|
+
"nestjs"
|
|
39
|
+
],
|
|
40
|
+
"default": "none"
|
|
41
|
+
},
|
|
42
|
+
"modifiers": {
|
|
43
|
+
"alias": "modifier",
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"enum": [
|
|
48
|
+
"navigation-back-header",
|
|
49
|
+
"without-title"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"description": "The table modifiers"
|
|
53
|
+
},
|
|
54
|
+
"table": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"tableRootMethod": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"className": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "The name of the table method class"
|
|
63
|
+
},
|
|
64
|
+
"importPath": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "The import path for the table method class"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"tableChildMethod": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"className": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "The name of the table method class"
|
|
76
|
+
},
|
|
77
|
+
"importPath": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "The import path for the table method class"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"modifiers": {
|
|
84
|
+
"alias": "modifier",
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": [
|
|
89
|
+
"navigation-back-header",
|
|
90
|
+
"without-title"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"description": "The table modifiers"
|
|
94
|
+
},
|
|
95
|
+
"headerButton": {
|
|
96
|
+
"oneOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"role": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"permission": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"icon": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"svgIcon": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"description": "The header button configuration"
|
|
119
|
+
},
|
|
120
|
+
"columnList": {
|
|
121
|
+
"alias": "column",
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"oneOf": [
|
|
125
|
+
{
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"name": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"type": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"modifiers": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"hasFilter": {
|
|
144
|
+
"type": "boolean"
|
|
145
|
+
},
|
|
146
|
+
"title": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"propertyPath": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"hidden": {
|
|
153
|
+
"type": "boolean"
|
|
154
|
+
},
|
|
155
|
+
"active": {
|
|
156
|
+
"type": "boolean"
|
|
157
|
+
},
|
|
158
|
+
"inactive": {
|
|
159
|
+
"type": "boolean"
|
|
160
|
+
},
|
|
161
|
+
"show": {
|
|
162
|
+
"type": "boolean"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"required": [
|
|
166
|
+
"name"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"description": "table column name"
|
|
171
|
+
},
|
|
172
|
+
"description": "List of table column names"
|
|
173
|
+
},
|
|
174
|
+
"actionList": {
|
|
175
|
+
"alias": "action",
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"oneOf": [
|
|
179
|
+
{
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"type": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"refresh": {
|
|
189
|
+
"type": "boolean"
|
|
190
|
+
},
|
|
191
|
+
"confirm": {
|
|
192
|
+
"type": "boolean"
|
|
193
|
+
},
|
|
194
|
+
"tooltip": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"errorMessage": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"successMessage": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"priority": {
|
|
204
|
+
"type": "number"
|
|
205
|
+
},
|
|
206
|
+
"checkFunction": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
},
|
|
209
|
+
"inHeader": {
|
|
210
|
+
"type": "boolean"
|
|
211
|
+
},
|
|
212
|
+
"role": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"enum": [
|
|
215
|
+
"form",
|
|
216
|
+
"link",
|
|
217
|
+
"method",
|
|
218
|
+
"custom"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"icon": {
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"svgIcon": {
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
"permission": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"type",
|
|
233
|
+
"role"
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"context": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "The context use to generate proper names for class, files, etc"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"overwrite": {
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"default": false,
|
|
248
|
+
"description": "Whether to overwrite existing files"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"required": [
|
|
252
|
+
"itemName",
|
|
253
|
+
"project",
|
|
254
|
+
"feature",
|
|
255
|
+
"accordionName"
|
|
256
|
+
]
|
|
257
|
+
}
|
package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<mat-card>
|
|
2
|
+
<% if (title) { %>
|
|
3
|
+
<mat-card-header>
|
|
4
|
+
<mat-card-title></mat-card-title>
|
|
5
|
+
<% if (subtitle) { %><mat-card-subtitle></mat-card-subtitle><% } %>
|
|
6
|
+
</mat-card-header>
|
|
7
|
+
<% } %>
|
|
8
|
+
<mat-card-content>
|
|
9
|
+
<div class="p-4">
|
|
10
|
+
<form #form="rxapForm" rxapForm>
|
|
11
|
+
<% if (collection) { %>
|
|
12
|
+
<rxap-data-grid [data]="data" mode="form">
|
|
13
|
+
<% } else { %>
|
|
14
|
+
<rxap-data-grid [dataSource]="dataGridDataSource" mode="form">
|
|
15
|
+
<% } %>
|
|
16
|
+
<% for (const item of itemList) { %>
|
|
17
|
+
<ng-container rxapDataGridRowDef="<%= item.name %>">
|
|
18
|
+
<% if (item.header) { %>
|
|
19
|
+
<th *rxapDataGridHeaderCellDef i18n><%= header %></th>
|
|
20
|
+
<% } %>
|
|
21
|
+
<ng-template rxapDataGridEditCellDef>
|
|
22
|
+
<% if (item.type === 'string') { %>
|
|
23
|
+
<mat-form-field class="w-full">
|
|
24
|
+
<input matInput formControlName="<%= item.name %>">
|
|
25
|
+
</mat-form-field>
|
|
26
|
+
<% } else if (item.type === 'number') { %>
|
|
27
|
+
<mat-form-field class="w-full">
|
|
28
|
+
<input matInput formControlName="<%= item.name %>" type="number">
|
|
29
|
+
</mat-form-field>
|
|
30
|
+
<% } else if (item.type === 'boolean') { %>
|
|
31
|
+
<mat-slide-toggle formControlName="<%= item.name %>"></mat-slide-toggle>
|
|
32
|
+
<% } else {%>
|
|
33
|
+
<!-- TODO: <%= item.name %> -->
|
|
34
|
+
<% } %>
|
|
35
|
+
</ng-template>
|
|
36
|
+
</ng-container>
|
|
37
|
+
<% } %>
|
|
38
|
+
</rxap-data-grid>
|
|
39
|
+
</form>
|
|
40
|
+
</div>
|
|
41
|
+
</mat-card-content>
|
|
42
|
+
</mat-card>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { FormProviders, FormComponentProviders } from './form.providers';
|
|
3
|
+
<% if (collection) { %>
|
|
4
|
+
import { Input } from '@angular/core';
|
|
5
|
+
<% } else { %>
|
|
6
|
+
import { <%= classify(name) %>DataGridDataSource } from './<%= name %>-data-grid.data-source';
|
|
7
|
+
<% } %>
|
|
8
|
+
import { DataGridModule } from '@rxap/data-grid';
|
|
9
|
+
import { RxapFormsModule } from '@rxap/forms';
|
|
10
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
11
|
+
import { MatCardModule } from '@angular/material/card';
|
|
12
|
+
|
|
13
|
+
@Component({
|
|
14
|
+
selector: '<%= prefix %>-<%= componentName %>',
|
|
15
|
+
templateUrl: './<%= componentName %>.component.html',
|
|
16
|
+
styleUrls: [ './<%= componentName %>.component.scss' ],
|
|
17
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [
|
|
20
|
+
DataGridModule,
|
|
21
|
+
RxapFormsModule,
|
|
22
|
+
ReactiveFormsModule,
|
|
23
|
+
MatCardModule,
|
|
24
|
+
],
|
|
25
|
+
providers: [
|
|
26
|
+
<% if (!collection) { %>
|
|
27
|
+
<%= classify(name) %>DataGridDataSource,
|
|
28
|
+
<% } %>
|
|
29
|
+
FormProviders,
|
|
30
|
+
FormComponentProviders,
|
|
31
|
+
],
|
|
32
|
+
})
|
|
33
|
+
export class <%= classify(componentName) %>Component {
|
|
34
|
+
|
|
35
|
+
<% if (collection) { %>
|
|
36
|
+
@Input() data!: any;
|
|
37
|
+
<% } else { %>
|
|
38
|
+
constructor(
|
|
39
|
+
public readonly dataGridDataSource: <%= classify(name) %>DataGridDataSource,
|
|
40
|
+
) {}
|
|
41
|
+
<% } %>
|
|
42
|
+
|
|
43
|
+
}
|
package/src/schematics/data-grid-component/files/plain/__componentName__.component.html.template
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<mat-card>
|
|
2
|
+
<% if (title) { %>
|
|
3
|
+
<mat-card-header>
|
|
4
|
+
<mat-card-title></mat-card-title>
|
|
5
|
+
<% if (subtitle) { %><mat-card-subtitle></mat-card-subtitle><% } %>
|
|
6
|
+
</mat-card-header>
|
|
7
|
+
<% } %>
|
|
8
|
+
<mat-card-content>
|
|
9
|
+
<div class="p-4">
|
|
10
|
+
<% if (collection) { %>
|
|
11
|
+
<rxap-data-grid [data]="data">
|
|
12
|
+
<% } else { %>
|
|
13
|
+
<rxap-data-grid [dataSource]="dataGridDataSource">
|
|
14
|
+
<% } %>
|
|
15
|
+
<% for (const item of itemList) { %>
|
|
16
|
+
<ng-container rxapDataGridRowDef="<%= item.name %>">
|
|
17
|
+
<% if (item.header) { %>
|
|
18
|
+
<th *rxapDataGridHeaderCellDef i18n><%= header %></th>
|
|
19
|
+
<% } %>
|
|
20
|
+
</ng-container>
|
|
21
|
+
<% } %>
|
|
22
|
+
</rxap-data-grid>
|
|
23
|
+
</div>
|
|
24
|
+
</mat-card-content>
|
|
25
|
+
</mat-card>
|
package/src/schematics/data-grid-component/files/plain/__componentName__.component.ts.template
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
<% if (collection) { %>
|
|
3
|
+
import { Input } from '@angular/core';
|
|
4
|
+
<% } else { %>
|
|
5
|
+
import { <%= classify(name) %>DataGridDataSource } from './<%= name %>-data-grid.data-source';
|
|
6
|
+
<% } %>
|
|
7
|
+
import { DataGridModule } from '@rxap/data-grid';
|
|
8
|
+
import { MatCardModule } from '@angular/material/card';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: '<%= prefix %>-<%= componentName %>',
|
|
12
|
+
templateUrl: './<%= componentName %>.component.html',
|
|
13
|
+
styleUrls: [ './<%= componentName %>.component.scss' ],
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [
|
|
17
|
+
DataGridModule,
|
|
18
|
+
MatCardModule,
|
|
19
|
+
],
|
|
20
|
+
providers: [
|
|
21
|
+
<% if (!collection) { %>
|
|
22
|
+
<%= classify(name) %>DataGridDataSource,
|
|
23
|
+
<% } %>
|
|
24
|
+
],
|
|
25
|
+
})
|
|
26
|
+
export class <%= classify(componentName) %>Component {
|
|
27
|
+
|
|
28
|
+
<% if (collection) { %>
|
|
29
|
+
@Input() data!: any;
|
|
30
|
+
<% } else { %>
|
|
31
|
+
constructor(
|
|
32
|
+
public readonly dataGridDataSource: <%= classify(name) %>DataGridDataSource,
|
|
33
|
+
) {}
|
|
34
|
+
<% } %>
|
|
35
|
+
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { NormalizedAngularOptions } from '../../lib/angular-options';
|
|
4
|
+
import { NormalizedDataGridItem } from '../../lib/data-grid-item';
|
|
5
|
+
import { NormalizedDataGridOptions } from '../../lib/data-grid-options';
|
|
6
|
+
import { DataGridComponentOptions } from './schema';
|
|
7
|
+
export interface NormalizedDataGridComponentOptions extends Omit<Readonly<Normalized<DataGridComponentOptions> & NormalizedAngularOptions & NormalizedDataGridOptions>, 'itemList'> {
|
|
8
|
+
nestController: string;
|
|
9
|
+
dataSourceClassName: string;
|
|
10
|
+
dataSourceFileName: string;
|
|
11
|
+
componentName: string;
|
|
12
|
+
name: string;
|
|
13
|
+
itemList: Array<NormalizedDataGridItem>;
|
|
14
|
+
}
|
|
15
|
+
export declare function NormalizeDataGridComponentOptions(options: Readonly<DataGridComponentOptions>): NormalizedDataGridComponentOptions;
|
|
16
|
+
export default function (options: DataGridComponentOptions): () => Rule;
|