@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,329 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TableColumnToFormControl = exports.TableColumnToGetPageOperationColumn = exports.NormalizeTableComponentOptions = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
7
|
+
const utilities_1 = require("@rxap/utilities");
|
|
8
|
+
const ts_morph_1 = require("ts-morph");
|
|
9
|
+
const angular_options_1 = require("../../../lib/angular-options");
|
|
10
|
+
const backend_types_1 = require("../../../lib/backend-types");
|
|
11
|
+
const minimum_table_component_options_1 = require("../../../lib/minimum-table-component-options");
|
|
12
|
+
const table_options_1 = require("../../../lib/table-options");
|
|
13
|
+
function NormalizeTableComponentOptions(options) {
|
|
14
|
+
const normalizedMinimumTableComponentOptions = (0, minimum_table_component_options_1.NormalizeMinimumTableComponentOptions)(options);
|
|
15
|
+
(0, angular_options_1.AssertAngularOptionsNameProperty)(normalizedMinimumTableComponentOptions);
|
|
16
|
+
const { name } = normalizedMinimumTableComponentOptions;
|
|
17
|
+
const normalizedTableOptions = (0, table_options_1.NormalizeTableOptions)(options, name);
|
|
18
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedMinimumTableComponentOptions), normalizedTableOptions));
|
|
19
|
+
}
|
|
20
|
+
exports.NormalizeTableComponentOptions = NormalizeTableComponentOptions;
|
|
21
|
+
function TableColumnToGetPageOperationColumn(column) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
return {
|
|
24
|
+
name: column.name,
|
|
25
|
+
type: (_a = column.type) !== null && _a !== void 0 ? _a : undefined,
|
|
26
|
+
source: (_b = column.propertyPath) !== null && _b !== void 0 ? _b : undefined,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
exports.TableColumnToGetPageOperationColumn = TableColumnToGetPageOperationColumn;
|
|
30
|
+
function TableColumnToFormControl(column) {
|
|
31
|
+
var _a;
|
|
32
|
+
return {
|
|
33
|
+
name: column.name,
|
|
34
|
+
type: (_a = column.type) !== null && _a !== void 0 ? _a : undefined,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
exports.TableColumnToFormControl = TableColumnToFormControl;
|
|
38
|
+
function printOptions(options) {
|
|
39
|
+
(0, angular_options_1.PrintAngularOptions)('table-component', options);
|
|
40
|
+
if (options.columnList.length) {
|
|
41
|
+
console.log(`=== columns: \x1b[34m${options.columnList.map((item) => item.name).join(', ')}\x1b[0m`);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
console.log('=== columns: \x1b[31mempty\x1b[0m');
|
|
45
|
+
}
|
|
46
|
+
if (options.actionList.length > 0) {
|
|
47
|
+
console.log(`=== actions: \x1b[34m${options.actionList.map((c) => c.type).join(', ')}\x1b[0m`);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
console.log('=== actions: \x1b[31mempty\x1b[0m');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function componentRule(normalizedOptions) {
|
|
54
|
+
const { project, feature, shared, directory, overwrite, modifiers, columnList, tableMethod, componentName, } = normalizedOptions;
|
|
55
|
+
const templateOptions = Object.assign(Object.assign({}, normalizedOptions), { hasNavigationBackHeader: modifiers.includes('navigation-back-header'), hasWithoutTitle: modifiers.includes('without-title'), hasColumnWithFilter: columnList.some((c) => c.hasFilter) });
|
|
56
|
+
return (0, schematics_1.chain)([
|
|
57
|
+
() => console.log(`Coerce the table component '${componentName}'`),
|
|
58
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
59
|
+
project,
|
|
60
|
+
feature,
|
|
61
|
+
shared,
|
|
62
|
+
name: componentName,
|
|
63
|
+
directory,
|
|
64
|
+
overwrite,
|
|
65
|
+
template: {
|
|
66
|
+
options: templateOptions,
|
|
67
|
+
},
|
|
68
|
+
tsMorphTransform: (project, [componentSourceFile]) => {
|
|
69
|
+
if (tableMethod) {
|
|
70
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(componentSourceFile, {
|
|
71
|
+
provide: 'RXAP_TABLE_METHOD',
|
|
72
|
+
useClass: tableMethod.className,
|
|
73
|
+
}, [
|
|
74
|
+
{
|
|
75
|
+
namedImports: [tableMethod.className],
|
|
76
|
+
moduleSpecifier: tableMethod.importPath,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
namedImports: ['RXAP_TABLE_METHOD'],
|
|
80
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
}),
|
|
86
|
+
]);
|
|
87
|
+
}
|
|
88
|
+
function filterColumnRule(normalizedOptions) {
|
|
89
|
+
const { columnList, project, feature, shared, directory, backend, overwrite, componentName, } = normalizedOptions;
|
|
90
|
+
if (columnList.some((c) => c.hasFilter)) {
|
|
91
|
+
return (0, schematics_1.chain)([
|
|
92
|
+
() => console.log(`Coerce the filter form definition`),
|
|
93
|
+
(0, schematics_utilities_1.ExecuteSchematic)('form-definition', {
|
|
94
|
+
name: (0, schematics_utilities_1.CoerceSuffix)(componentName, '-filter'),
|
|
95
|
+
project,
|
|
96
|
+
feature,
|
|
97
|
+
shared,
|
|
98
|
+
directory,
|
|
99
|
+
backend,
|
|
100
|
+
overwrite,
|
|
101
|
+
controlList: columnList
|
|
102
|
+
.filter((column) => column.hasFilter)
|
|
103
|
+
.map(TableColumnToFormControl),
|
|
104
|
+
}),
|
|
105
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
106
|
+
project,
|
|
107
|
+
feature,
|
|
108
|
+
shared,
|
|
109
|
+
name: componentName,
|
|
110
|
+
directory,
|
|
111
|
+
overwrite,
|
|
112
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
113
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, 'FormProviders', [
|
|
114
|
+
{
|
|
115
|
+
moduleSpecifier: './form.providers',
|
|
116
|
+
namedImports: ['FormProviders'],
|
|
117
|
+
},
|
|
118
|
+
]);
|
|
119
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, 'TableFilterService', [
|
|
120
|
+
{
|
|
121
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
122
|
+
namedImports: ['TableFilterService'],
|
|
123
|
+
},
|
|
124
|
+
]);
|
|
125
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
126
|
+
provide: 'RXAP_TABLE_FILTER_FORM_DEFINITION',
|
|
127
|
+
useFactory: 'FormFactory',
|
|
128
|
+
deps: ['INJECTOR'],
|
|
129
|
+
}, [
|
|
130
|
+
{
|
|
131
|
+
moduleSpecifier: '@angular/core',
|
|
132
|
+
namedImports: ['INJECTOR'],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
moduleSpecifier: './form.providers',
|
|
136
|
+
namedImports: ['FormFactory'],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
140
|
+
namedImports: ['RXAP_TABLE_FILTER_FORM_DEFINITION'],
|
|
141
|
+
},
|
|
142
|
+
]);
|
|
143
|
+
},
|
|
144
|
+
}),
|
|
145
|
+
]);
|
|
146
|
+
}
|
|
147
|
+
return (0, schematics_1.noop)();
|
|
148
|
+
}
|
|
149
|
+
function nestjsBackendRule(normalizedOptions) {
|
|
150
|
+
const { project, feature, shared, columnList, context, nestModule, componentName, directory, overwrite, scope, } = normalizedOptions;
|
|
151
|
+
const controllerName = (0, schematics_ts_morph_1.BuildNestControllerName)({
|
|
152
|
+
controllerName: componentName,
|
|
153
|
+
nestModule,
|
|
154
|
+
});
|
|
155
|
+
const operationId = (0, schematics_ts_morph_1.buildOperationId)(normalizedOptions, 'get-page', controllerName);
|
|
156
|
+
return (0, schematics_1.chain)([
|
|
157
|
+
() => console.log(`Coerce the getPage operation for the table`),
|
|
158
|
+
(0, schematics_ts_morph_1.CoerceGetPageOperation)({
|
|
159
|
+
controllerName,
|
|
160
|
+
nestModule: shared ? undefined : nestModule,
|
|
161
|
+
project,
|
|
162
|
+
feature,
|
|
163
|
+
shared,
|
|
164
|
+
columnList: columnList.map(TableColumnToGetPageOperationColumn),
|
|
165
|
+
context,
|
|
166
|
+
}),
|
|
167
|
+
() => console.log('Add the open api methods to the table component providers'),
|
|
168
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
169
|
+
project,
|
|
170
|
+
feature,
|
|
171
|
+
shared,
|
|
172
|
+
name: componentName,
|
|
173
|
+
directory,
|
|
174
|
+
overwrite,
|
|
175
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
176
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
177
|
+
provide: 'TABLE_REMOTE_METHOD_ADAPTER_FACTORY',
|
|
178
|
+
useValue: 'GetPageAdapterFactory',
|
|
179
|
+
}, [
|
|
180
|
+
{
|
|
181
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
182
|
+
namedImports: ['TABLE_REMOTE_METHOD_ADAPTER_FACTORY'],
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
moduleSpecifier: '@rxap/table-system',
|
|
186
|
+
namedImports: ['GetPageAdapterFactory'],
|
|
187
|
+
},
|
|
188
|
+
]);
|
|
189
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
190
|
+
provide: 'RXAP_TABLE_METHOD',
|
|
191
|
+
useClass: (0, schematics_ts_morph_1.OperationIdToClassName)(operationId),
|
|
192
|
+
}, [
|
|
193
|
+
{
|
|
194
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
195
|
+
namedImports: ['RXAP_TABLE_METHOD'],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
moduleSpecifier: (0, schematics_ts_morph_1.OperationIdToClassImportPath)(operationId, scope),
|
|
199
|
+
namedImports: [(0, schematics_ts_morph_1.OperationIdToClassName)(operationId)],
|
|
200
|
+
},
|
|
201
|
+
]);
|
|
202
|
+
},
|
|
203
|
+
}),
|
|
204
|
+
]);
|
|
205
|
+
}
|
|
206
|
+
function localBackendRule(normalizedOptions) {
|
|
207
|
+
const { project, feature, shared, componentName, directory, overwrite, name, } = normalizedOptions;
|
|
208
|
+
return (0, schematics_1.chain)([
|
|
209
|
+
() => console.log(`Coerce local backend method to table component`),
|
|
210
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
211
|
+
project,
|
|
212
|
+
feature,
|
|
213
|
+
shared,
|
|
214
|
+
name: componentName,
|
|
215
|
+
directory,
|
|
216
|
+
overwrite,
|
|
217
|
+
tsMorphTransform: (project, [componentSourceFile]) => {
|
|
218
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(componentSourceFile, {
|
|
219
|
+
provide: 'RXAP_TABLE_METHOD',
|
|
220
|
+
useClass: `${(0, utilities_1.classify)(name)}TableMethod`,
|
|
221
|
+
}, [
|
|
222
|
+
{
|
|
223
|
+
namedImports: [`${(0, utilities_1.classify)(name)}TableMethod`],
|
|
224
|
+
moduleSpecifier: `./${name}-table.method`,
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
namedImports: ['RXAP_TABLE_METHOD'],
|
|
228
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
229
|
+
},
|
|
230
|
+
]);
|
|
231
|
+
},
|
|
232
|
+
}),
|
|
233
|
+
() => console.log(`Coerce local backend method`),
|
|
234
|
+
(0, schematics_ts_morph_1.CoerceMethodClass)({
|
|
235
|
+
name: `${name}-table`,
|
|
236
|
+
project,
|
|
237
|
+
feature,
|
|
238
|
+
shared,
|
|
239
|
+
directory,
|
|
240
|
+
overwrite,
|
|
241
|
+
tsMorphTransform: (project, sourceFile, classDeclaration) => {
|
|
242
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, [
|
|
243
|
+
{
|
|
244
|
+
moduleSpecifier: '@rxap/data-source/table',
|
|
245
|
+
namedImports: ['TableEvent'],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
moduleSpecifier: `./${name}-table`,
|
|
249
|
+
namedImports: [`I${(0, utilities_1.classify)(name)}Table`],
|
|
250
|
+
},
|
|
251
|
+
]);
|
|
252
|
+
return {
|
|
253
|
+
parameters: [
|
|
254
|
+
{
|
|
255
|
+
name: 'event',
|
|
256
|
+
type: 'TableEvent',
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
statements: ['return [];'],
|
|
260
|
+
returnType: `I${(0, utilities_1.classify)(name)}Table[]`,
|
|
261
|
+
};
|
|
262
|
+
},
|
|
263
|
+
}),
|
|
264
|
+
]);
|
|
265
|
+
}
|
|
266
|
+
function backendRule(normalizedOptions) {
|
|
267
|
+
const { backend, } = normalizedOptions;
|
|
268
|
+
switch (backend) {
|
|
269
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
270
|
+
return nestjsBackendRule(normalizedOptions);
|
|
271
|
+
case backend_types_1.BackendTypes.LOCAL:
|
|
272
|
+
return localBackendRule(normalizedOptions);
|
|
273
|
+
}
|
|
274
|
+
return (0, schematics_1.noop)();
|
|
275
|
+
}
|
|
276
|
+
function selectColumnRule(normalizedOptions) {
|
|
277
|
+
const { selectColumn, project, feature, shared, componentName, directory, overwrite, } = normalizedOptions;
|
|
278
|
+
if (selectColumn) {
|
|
279
|
+
return (0, schematics_1.chain)([
|
|
280
|
+
(0, schematics_ts_morph_1.CoerceComponentRule)({
|
|
281
|
+
project,
|
|
282
|
+
feature,
|
|
283
|
+
shared,
|
|
284
|
+
name: componentName,
|
|
285
|
+
directory,
|
|
286
|
+
overwrite,
|
|
287
|
+
tsMorphTransform: (project, [sourceFile]) => {
|
|
288
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, 'SelectRowService', [
|
|
289
|
+
{
|
|
290
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
291
|
+
namedImports: ['SelectRowService'],
|
|
292
|
+
},
|
|
293
|
+
]);
|
|
294
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
295
|
+
provide: 'RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS',
|
|
296
|
+
useValue: ts_morph_1.Writers.object({
|
|
297
|
+
multiple: 'true',
|
|
298
|
+
}),
|
|
299
|
+
}, [
|
|
300
|
+
{
|
|
301
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
302
|
+
namedImports: ['RXAP_MATERIAL_TABLE_SYSTEM_SELECT_ROW_OPTIONS'],
|
|
303
|
+
},
|
|
304
|
+
]);
|
|
305
|
+
(0, schematics_ts_morph_1.AddComponentImport)(sourceFile, 'SelectRowModule', '@rxap/material-table-system');
|
|
306
|
+
},
|
|
307
|
+
}),
|
|
308
|
+
]);
|
|
309
|
+
}
|
|
310
|
+
return (0, schematics_1.noop)();
|
|
311
|
+
}
|
|
312
|
+
function default_1(options) {
|
|
313
|
+
const normalizedOptions = NormalizeTableComponentOptions(options);
|
|
314
|
+
printOptions(normalizedOptions);
|
|
315
|
+
return function () {
|
|
316
|
+
return (0, schematics_1.chain)([
|
|
317
|
+
(0, minimum_table_component_options_1.tableInterfaceRule)(normalizedOptions),
|
|
318
|
+
componentRule(normalizedOptions),
|
|
319
|
+
(0, minimum_table_component_options_1.headerButtonRule)(normalizedOptions),
|
|
320
|
+
filterColumnRule(normalizedOptions),
|
|
321
|
+
backendRule(normalizedOptions),
|
|
322
|
+
(0, minimum_table_component_options_1.cellComponentRule)(normalizedOptions),
|
|
323
|
+
(0, minimum_table_component_options_1.actionListRule)(normalizedOptions),
|
|
324
|
+
selectColumnRule(normalizedOptions),
|
|
325
|
+
]);
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
exports.default = default_1;
|
|
329
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/angular/src/schematics/table/table-component/index.ts"],"names":[],"mappings":";;;AAAA,2DAIoC;AACpC,mEAamC;AACnC,qEAGoC;AACpC,+CAGyB;AACzB,uCAIkB;AAClB,kEAIsC;AACtC,8DAA0D;AAC1D,kGAMsD;AAGtD,8DAGoC;AAUpC,SAAgB,8BAA8B,CAC5C,OAAwC;IAExC,MAAM,sCAAsC,GAAG,IAAA,uEAAqC,EAAC,OAAO,CAAC,CAAC;IAC9F,IAAA,kDAAgC,EAAC,sCAAsC,CAAC,CAAC;IACzE,MAAM,EAAE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;IACrD,MAAM,iBAAiB,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAClE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEhC,OAAO;QACL,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,oDAAkB,EAAC,iBAAiB,CAAC;YACrC,aAAa,CAAC,iBAAiB,CAAC;YAChC,IAAA,kDAAgB,EAAC,iBAAiB,CAAC;YACnC,gBAAgB,CAAC,iBAAiB,CAAC;YACnC,WAAW,CAAC,iBAAiB,CAAC;YAC9B,IAAA,mDAAiB,EAAC,iBAAiB,CAAC;YACpC,IAAA,gDAAc,EAAC,iBAAiB,CAAC;YACjC,gBAAgB,CAAC,iBAAiB,CAAC;SACpC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAhBD,4BAgBC"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "template-table-module",
|
|
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
|
+
],
|
|
33
|
+
"default": "none"
|
|
34
|
+
},
|
|
35
|
+
"tableMethod": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"className": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "The name of the table method class"
|
|
41
|
+
},
|
|
42
|
+
"importPath": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "The import path for the table method class"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"modifiers": {
|
|
49
|
+
"alias": "modifier",
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": [
|
|
54
|
+
"navigation-back-header",
|
|
55
|
+
"without-title"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"description": "The table modifiers"
|
|
59
|
+
},
|
|
60
|
+
"headerButton": {
|
|
61
|
+
"oneOf": [
|
|
62
|
+
{
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"role": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"permission": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"icon": {
|
|
75
|
+
"type": "string"
|
|
76
|
+
},
|
|
77
|
+
"svgIcon": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"description": "The header button configuration"
|
|
84
|
+
},
|
|
85
|
+
"directory": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "A directory name or absolute path for the table module. relative to the feature base path"
|
|
88
|
+
},
|
|
89
|
+
"nestModule": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "The module name for the table nest operations"
|
|
92
|
+
},
|
|
93
|
+
"columnList": {
|
|
94
|
+
"alias": "column",
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{
|
|
99
|
+
"type": "string"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "object",
|
|
103
|
+
"properties": {
|
|
104
|
+
"name": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
},
|
|
107
|
+
"type": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"modifiers": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"hasFilter": {
|
|
117
|
+
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"title": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"propertyPath": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"hidden": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
128
|
+
"active": {
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"inactive": {
|
|
132
|
+
"type": "boolean"
|
|
133
|
+
},
|
|
134
|
+
"show": {
|
|
135
|
+
"type": "boolean"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"name"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"description": "table column name"
|
|
144
|
+
},
|
|
145
|
+
"description": "List of table column names"
|
|
146
|
+
},
|
|
147
|
+
"actionList": {
|
|
148
|
+
"alias": "action",
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": {
|
|
151
|
+
"oneOf": [
|
|
152
|
+
{
|
|
153
|
+
"type": "string"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"type": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"refresh": {
|
|
162
|
+
"type": "boolean"
|
|
163
|
+
},
|
|
164
|
+
"confirm": {
|
|
165
|
+
"type": "boolean"
|
|
166
|
+
},
|
|
167
|
+
"tooltip": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"errorMessage": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"successMessage": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"priority": {
|
|
177
|
+
"type": "number"
|
|
178
|
+
},
|
|
179
|
+
"checkFunction": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"inHeader": {
|
|
183
|
+
"type": "boolean"
|
|
184
|
+
},
|
|
185
|
+
"role": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"enum": [
|
|
188
|
+
"form",
|
|
189
|
+
"link",
|
|
190
|
+
"method",
|
|
191
|
+
"custom"
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"icon": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"svgIcon": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"permission": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": [
|
|
205
|
+
"type",
|
|
206
|
+
"role"
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"overwrite": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"description": "Overwrite existing files",
|
|
215
|
+
"default": false
|
|
216
|
+
},
|
|
217
|
+
"selectColumn": {
|
|
218
|
+
"type": "boolean",
|
|
219
|
+
"description": "Whether to add a select column to the table"
|
|
220
|
+
},
|
|
221
|
+
"context": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"description": "The context use to generate proper names for class, files, etc"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": [
|
|
227
|
+
"name",
|
|
228
|
+
"feature"
|
|
229
|
+
]
|
|
230
|
+
}
|