@rxap/schematic-angular 16.2.0-dev.0 → 16.2.0-dev.2
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 +44 -0
- package/README.md +1 -1
- package/package.json +12 -11
- package/src/lib/accordion-header.d.ts +27 -0
- package/src/lib/accordion-header.js +48 -0
- package/src/lib/accordion-header.js.map +1 -0
- package/src/lib/accordion-identifier.d.ts +10 -0
- package/src/lib/accordion-identifier.js +15 -0
- package/src/lib/accordion-identifier.js.map +1 -0
- package/src/lib/accordion-item.d.ts +77 -4
- package/src/lib/accordion-item.js +151 -20
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/adapter-options.d.ts +1 -1
- package/src/lib/adapter-options.js +2 -2
- package/src/lib/adapter-options.js.map +1 -1
- package/src/lib/coerce-accordion-component.d.ts +6 -0
- package/src/lib/coerce-accordion-component.js +65 -0
- package/src/lib/coerce-accordion-component.js.map +1 -0
- package/src/lib/coerce-accordion-item-table-component.d.ts +7 -0
- package/src/lib/coerce-accordion-item-table-component.js +41 -0
- package/src/lib/coerce-accordion-item-table-component.js.map +1 -0
- package/src/lib/coerce-form-component.d.ts +6 -0
- package/src/lib/coerce-form-component.js +68 -0
- package/src/lib/coerce-form-component.js.map +1 -0
- package/src/lib/coerce-minimum-table-component.d.ts +6 -0
- package/src/lib/coerce-minimum-table-component.js +95 -0
- package/src/lib/coerce-minimum-table-component.js.map +1 -0
- package/src/lib/coerce-tree-table-component.d.ts +6 -0
- package/src/lib/coerce-tree-table-component.js +12 -0
- package/src/lib/coerce-tree-table-component.js.map +1 -0
- package/src/lib/data-grid-item.d.ts +11 -5
- package/src/lib/data-grid-item.js +4 -18
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-options.d.ts +1 -1
- package/src/lib/existing-method.d.ts +1 -1
- package/src/lib/existing-method.js +2 -2
- package/src/lib/existing-method.js.map +1 -1
- package/src/lib/form-component-control.d.ts +9 -10
- package/src/lib/form-component-control.js +3 -34
- package/src/lib/form-component-control.js.map +1 -1
- package/src/lib/form-definition-control.d.ts +50 -6
- package/src/lib/form-definition-control.js +133 -38
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/mat-form-field-default-options.d.ts +7 -0
- package/src/lib/mat-form-field-default-options.js +10 -0
- package/src/lib/mat-form-field-default-options.js.map +1 -0
- package/src/lib/merge-with-column-list.d.ts +3 -0
- package/src/lib/merge-with-column-list.js +18 -0
- package/src/lib/merge-with-column-list.js.map +1 -0
- package/src/lib/minimum-table-component-options.d.ts +3 -3
- package/src/lib/minimum-table-component-options.js +4 -3
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.d.ts +11 -6
- package/src/lib/minimum-table-options.js +17 -5
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/persistent.d.ts +30 -0
- package/src/lib/persistent.js +39 -0
- package/src/lib/persistent.js.map +1 -0
- package/src/lib/table-action.d.ts +3 -1
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.d.ts +32 -6
- package/src/lib/table-column.js +131 -45
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-options.d.ts +10 -3
- package/src/lib/table-options.js +13 -2
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/tree-table-options.d.ts +9 -3
- package/src/lib/tree-table-options.js +12 -2
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.template +25 -10
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.html.template +6 -1
- package/src/schematics/accordion/accordion-component/index.d.ts +10 -3
- package/src/schematics/accordion/accordion-component/index.js +125 -54
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.d.ts +8 -2
- package/src/schematics/accordion/accordion-component/schema.json +118 -29
- package/src/schematics/accordion/accordion-item-component/index.d.ts +2 -1
- package/src/schematics/accordion/accordion-item-component/index.js +46 -68
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.d.ts +2 -4
- package/src/schematics/accordion/accordion-item-component/schema.json +6 -0
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +2 -3
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +32 -28
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +2 -5
- package/src/schematics/accordion/item/accordion-item-switch-component/index.d.ts +2 -15
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js +2 -25
- package/src/schematics/accordion/item/accordion-item-switch-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.d.ts +2 -17
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +14 -2
- package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +2 -3
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +7 -4
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +2 -5
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +37 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +2 -3
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +8 -4
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +2 -5
- package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +92 -69
- package/src/schematics/data-grid-component/files/form/__componentName__.component.html.template +1 -1
- package/src/schematics/data-grid-component/index.js +54 -24
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/schema.json +82 -29
- package/src/schematics/form/control/input-form-control/index.js +7 -2
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.d.ts +4 -2
- package/src/schematics/form/form-component/index.js +5 -2
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.d.ts +3 -1
- package/src/schematics/form/form-component/schema.json +92 -24
- package/src/schematics/form/form-definition/schema.d.ts +1 -1
- package/src/schematics/form/form-definition/schema.json +84 -39
- package/src/schematics/table/table-component/index.d.ts +2 -2
- package/src/schematics/table/table-component/index.js +5 -3
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/index.js +5 -3
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/schema.json +88 -95
- package/src/lib/table-property.d.ts +0 -14
- package/src/lib/table-property.js +0 -46
- package/src/lib/table-property.js.map +0 -1
- package/src/lib/type-import.d.ts +0 -4
- package/src/lib/type-import.js +0 -38
- package/src/lib/type-import.js.map +0 -1
- package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.ts.template +0 -54
- package/src/schematics/accordion/accordion-component/files/header-component/accordion-header.component.ts.template +0 -14
- package/src/schematics/accordion/accordion-item-component/files/component/__componentName__.component.ts.template +0 -30
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid/__componentName__.component.ts.template +0 -14
- package/src/schematics/accordion/item/accordion-item-data-grid-component/files/data-grid-collection/__componentName__.component.ts.template +0 -32
- package/src/schematics/accordion/item/accordion-item-table-component/files/component/__componentName__.component.ts.template +0 -35
- package/src/schematics/accordion/item/accordion-item-tree-table-component/files/component/__componentName__.component.ts.template +0 -34
- package/src/schematics/data-grid-component/files/form/__componentName__.component.ts.template +0 -43
- package/src/schematics/data-grid-component/files/plain/__componentName__.component.ts.template +0 -36
- package/src/schematics/form/form-component/files/component/__componentName__.component.ts.template +0 -50
- package/src/schematics/table/table-component/files/component/__componentName__.component.ts.template +0 -112
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.ts.template +0 -113
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceAccordionComponentRule = void 0;
|
|
4
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const ts_morph_2 = require("ts-morph");
|
|
8
|
+
function CoerceAccordionComponentRule(options) {
|
|
9
|
+
const { accordion: { componentName, itemList, persistent, withPermission, header, }, tsMorphTransform = utilities_1.noop, } = options;
|
|
10
|
+
return (0, schematics_ts_morph_1.CoerceComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile], [classDeclaration]) => {
|
|
11
|
+
// region angular imports
|
|
12
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'DataSourceErrorComponent', moduleSpecifier: '@rxap/data-source' });
|
|
13
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'DataSourceDirective', moduleSpecifier: '@rxap/data-source/directive' });
|
|
14
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatProgressBarModule', moduleSpecifier: '@angular/material/progress-bar' });
|
|
15
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatExpansionModule', moduleSpecifier: '@angular/material/expansion' });
|
|
16
|
+
if (header) {
|
|
17
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatDividerModule', moduleSpecifier: '@angular/material/divider' });
|
|
18
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatDividerModule', moduleSpecifier: '@angular/material/divider' });
|
|
19
|
+
for (const angularImport of header.importList) {
|
|
20
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, angularImport);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (withPermission) {
|
|
24
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'IfHasPermissionDirective', moduleSpecifier: '@rxap/authorization' });
|
|
25
|
+
}
|
|
26
|
+
if (persistent) {
|
|
27
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'PersistentAccordionDirective', moduleSpecifier: '@rxap/material-directives/expansion' });
|
|
28
|
+
}
|
|
29
|
+
for (const item of itemList) {
|
|
30
|
+
for (const angularImport of item.importList) {
|
|
31
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, angularImport);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// endregion
|
|
35
|
+
const accordionDataSourceName = `${(0, utilities_1.classify)(componentName)}DataSource`;
|
|
36
|
+
// region angular providers
|
|
37
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
38
|
+
namedImports: ['ACCORDION_DATA_SOURCE'],
|
|
39
|
+
moduleSpecifier: '@rxap/data-source/accordion'
|
|
40
|
+
});
|
|
41
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, accordionDataSourceName);
|
|
42
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
43
|
+
provide: 'ACCORDION_DATA_SOURCE',
|
|
44
|
+
useExisting: accordionDataSourceName
|
|
45
|
+
});
|
|
46
|
+
// endregion
|
|
47
|
+
(0, schematics_ts_morph_1.CoercePropertyDeclaration)(classDeclaration, 'accordionDataSource', {
|
|
48
|
+
initializer: `inject(${accordionDataSourceName})`,
|
|
49
|
+
isReadonly: true,
|
|
50
|
+
scope: ts_morph_2.Scope.Public,
|
|
51
|
+
});
|
|
52
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
53
|
+
namedImports: ['inject'],
|
|
54
|
+
moduleSpecifier: '@angular/core'
|
|
55
|
+
});
|
|
56
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
57
|
+
namedImports: [accordionDataSourceName],
|
|
58
|
+
moduleSpecifier: `./${(0, utilities_1.dasherize)(componentName)}.data-source`
|
|
59
|
+
});
|
|
60
|
+
(0, ts_morph_1.CoerceDefaultClassExport)(classDeclaration, true);
|
|
61
|
+
tsMorphTransform(project, [sourceFile], [classDeclaration], options);
|
|
62
|
+
} }));
|
|
63
|
+
}
|
|
64
|
+
exports.CoerceAccordionComponentRule = CoerceAccordionComponentRule;
|
|
65
|
+
//# sourceMappingURL=coerce-accordion-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-accordion-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-accordion-component.ts"],"names":[],"mappings":";;;AAAA,mEAKmC;AACnC,6CAIwB;AACxB,+CAIyB;AACzB,uCAAiC;AAOjC,SAAgB,4BAA4B,CAAC,OAAwC;IAEnF,MAAM,EACJ,SAAS,EAAE,EACT,aAAa,EACb,QAAQ,EACR,UAAU,EACV,cAAc,EACd,MAAM,GACP,EACD,gBAAgB,GAAG,gBAAI,GACxB,GAAG,OAAO,CAAC;IAEZ,OAAO,IAAA,yCAAmB,kCACrB,OAAO,KACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,CAAE,gBAAgB,CAAE,EAAE,EAAE;YAElE,yBAAyB;YACzB,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC,CAAC;YACpH,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC,CAAC;YACzH,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,eAAe,EAAE,gCAAgC,EAAE,CAAC,CAAC;YAC7H,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC,CAAC;YAExH,IAAI,MAAM,EAAE;gBACV,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAA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W,EAAE,UAAU,uBAAuB,GAAG;gBACjD,UAAU,EAAE,IAAI;gBAChB,KAAK,EAAE,gBAAK,CAAC,MAAM;aACpB,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAC,QAAQ,CAAC;gBACxB,eAAe,EAAE,eAAe;aACjC,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAC,uBAAuB,CAAC;gBACvC,eAAe,EAAE,KAAK,IAAA,qBAAS,EAAC,aAAc,CAAC,cAAc;aAC9D,CAAC,CAAC;YAEH,IAAA,mCAAwB,EAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;YAEjD,gBAAgB,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,CAAE,gBAAgB,CAAE,EAAE,OAAO,CAAC,CAAC;QAC3E,CAAC,IACD,CAAC;AAEL,CAAC;AA7ED,oEA6EC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CoerceComponentOptions } from '@rxap/schematics-ts-morph';
|
|
2
|
+
import { NormalizedAngularOptions } from './angular-options';
|
|
3
|
+
export interface CoerceAccordionItemTableComponentOptions extends CoerceComponentOptions {
|
|
4
|
+
accordionItem: NormalizedAngularOptions;
|
|
5
|
+
tableComponentSuffix?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function CoerceAccordionItemTableComponentRule(options: CoerceAccordionItemTableComponentOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceAccordionItemTableComponentRule = void 0;
|
|
4
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const ts_morph_2 = require("ts-morph");
|
|
8
|
+
function CoerceAccordionItemTableComponentRule(options) {
|
|
9
|
+
const { accordionItem: { name }, tsMorphTransform = utilities_1.noop, tableComponentSuffix = 'table', } = options;
|
|
10
|
+
return (0, schematics_ts_morph_1.CoerceComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile], [classDeclaration]) => {
|
|
11
|
+
const tableComponentName = `${(0, utilities_1.classify)(name)}${(0, utilities_1.classify)(tableComponentSuffix)}Component`;
|
|
12
|
+
const tableComponentImportPath = `./${(0, utilities_1.dasherize)(name)}-${(0, utilities_1.dasherize)(tableComponentSuffix)}/${(0, utilities_1.dasherize)(name)}-${(0, utilities_1.dasherize)(tableComponentSuffix)}.component`;
|
|
13
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: tableComponentName, moduleSpecifier: tableComponentImportPath });
|
|
14
|
+
(0, schematics_ts_morph_1.CoercePropertyDeclaration)(classDeclaration, 'parameters$', {
|
|
15
|
+
scope: ts_morph_2.Scope.Public,
|
|
16
|
+
isReadonly: true,
|
|
17
|
+
initializer: `inject(ActivatedRoute).params.pipe(map(({ uuid }) => uuid), throwIfEmpty('Could not extract the uuid from route'), map((uuid) => ({ uuid })))`
|
|
18
|
+
});
|
|
19
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, [
|
|
20
|
+
{
|
|
21
|
+
namedImports: ['inject'],
|
|
22
|
+
moduleSpecifier: '@angular/core'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
namedImports: ['ActivatedRoute'],
|
|
26
|
+
moduleSpecifier: '@angular/router'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
namedImports: ['map'],
|
|
30
|
+
moduleSpecifier: 'rxjs/operators'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
namedImports: ['throwIfEmpty'],
|
|
34
|
+
moduleSpecifier: '@rxap/rxjs'
|
|
35
|
+
}
|
|
36
|
+
]);
|
|
37
|
+
tsMorphTransform(project, [sourceFile], [classDeclaration], options);
|
|
38
|
+
} }));
|
|
39
|
+
}
|
|
40
|
+
exports.CoerceAccordionItemTableComponentRule = CoerceAccordionItemTableComponentRule;
|
|
41
|
+
//# sourceMappingURL=coerce-accordion-item-table-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-accordion-item-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-accordion-item-table-component.ts"],"names":[],"mappings":";;;AAAA,mEAImC;AACnC,6CAGwB;AACxB,+CAIyB;AACzB,uCAAiC;AAQjC,SAAgB,qCAAqC,CAAC,OAAiD;IAErG,MAAM,EACJ,aAAa,EAAE,EAAE,IAAI,EAAE,EACvB,gBAAgB,GAAG,gBAAI,EACvB,oBAAoB,GAAG,OAAO,GAC/B,GAAG,OAAO,CAAC;IAEZ,OAAO,IAAA,yCAAmB,kCACrB,OAAO,KACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,CAAE,gBAAgB,CAAE,EAAE,EAAE;YAElE,MAAM,kBAAkB,GAAG,GAAG,IAAA,oBAAQ,EAAC,IAAK,CAAC,GAAG,IAAA,oBAAQ,EAAC,oBAAoB,CAAC,WAAW,CAAC;YAC1F,MAAM,wBAAwB,GAAG,KAAK,IAAA,qBAAS,EAAC,IAAK,CAAC,IAAI,IAAA,qBAAS,EAAC,oBAAoB,CAAC,IAAI,IAAA,qBAAS,EAAC,IAAK,CAAC,IAAI,IAAA,qBAAS,EAAC,oBAAoB,CAAC,YAAY,CAAC;YAE7J,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,eAAe,EAAE,wBAAwB,EAAE,CAAC,CAAC;YAEjH,IAAA,+CAAyB,EAAC,gBAAgB,EAAE,aAAa,EAAE;gBACzD,KAAK,EAAE,gBAAK,CAAC,MAAM;gBACnB,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,+IAA+I;aAC7J,CAAC,CAAC;YACH,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB;oBACE,YAAY,EAAE,CAAE,QAAQ,CAAE;oBAC1B,eAAe,EAAE,eAAe;iBACjC;gBACD;oBACE,YAAY,EAAE,CAAE,gBAAgB,CAAE;oBAClC,eAAe,EAAE,iBAAiB;iBACnC;gBACD;oBACE,YAAY,EAAE,CAAE,KAAK,CAAE;oBACvB,eAAe,EAAE,gBAAgB;iBAClC;gBACD;oBACE,YAAY,EAAE,CAAE,cAAc,CAAE;oBAChC,eAAe,EAAE,YAAY;iBAC9B;aACF,CAAC,CAAC;YAEH,gBAAgB,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,CAAE,gBAAgB,CAAE,EAAE,OAAO,CAAC,CAAC;QAC3E,CAAC,IACD,CAAC;AAEL,CAAC;AA7CD,sFA6CC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CoerceComponentOptions } from '@rxap/schematics-ts-morph';
|
|
2
|
+
import { NormalizedFormComponentOptions } from '../schematics/form/form-component';
|
|
3
|
+
export interface CoerceFormComponentOptions extends CoerceComponentOptions {
|
|
4
|
+
form: NormalizedFormComponentOptions;
|
|
5
|
+
}
|
|
6
|
+
export declare function CoerceFormComponentRule(options: CoerceFormComponentOptions): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceFormComponentRule = void 0;
|
|
4
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const ts_morph_2 = require("ts-morph");
|
|
8
|
+
function CoerceFormComponentRule(options) {
|
|
9
|
+
const { tsMorphTransform = utilities_1.noop, form: { window, name, matFormFieldDefaultOptions, }, } = options;
|
|
10
|
+
return (0, schematics_ts_morph_1.CoerceComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile], [classDeclaration]) => {
|
|
11
|
+
// region angular imports
|
|
12
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
13
|
+
name: 'ReactiveFormsModule',
|
|
14
|
+
moduleSpecifier: '@angular/forms',
|
|
15
|
+
});
|
|
16
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
17
|
+
name: 'FormControlsComponent',
|
|
18
|
+
moduleSpecifier: '@rxap/material-form-system',
|
|
19
|
+
});
|
|
20
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
21
|
+
name: 'RxapFormsModule',
|
|
22
|
+
moduleSpecifier: '@rxap/forms',
|
|
23
|
+
});
|
|
24
|
+
if (window) {
|
|
25
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
26
|
+
name: 'FormWindowFooterDirective',
|
|
27
|
+
moduleSpecifier: '@rxap/form-window-system',
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
// endregion
|
|
31
|
+
// region angular providers
|
|
32
|
+
if (window) {
|
|
33
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
34
|
+
provide: 'RXAP_WINDOW_SETTINGS',
|
|
35
|
+
useValue: ts_morph_2.Writers.object({
|
|
36
|
+
title: `$localize\`${(0, utilities_1.classify)(name)}\``,
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
40
|
+
namedImports: ['RXAP_WINDOW_SETTINGS'],
|
|
41
|
+
moduleSpecifier: '@rxap/window-system',
|
|
42
|
+
});
|
|
43
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
44
|
+
name: 'FormWindowFooterDirective',
|
|
45
|
+
moduleSpecifier: '@rxap/form-window-system',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
if (matFormFieldDefaultOptions) {
|
|
49
|
+
const matOptions = {};
|
|
50
|
+
const { appearance } = matFormFieldDefaultOptions;
|
|
51
|
+
if (appearance) {
|
|
52
|
+
matOptions['appearance'] = w => w.quote(appearance);
|
|
53
|
+
}
|
|
54
|
+
(0, schematics_ts_morph_1.AddComponentProvider)(sourceFile, {
|
|
55
|
+
provide: 'MAT_FORM_FIELD_DEFAULT_OPTIONS',
|
|
56
|
+
useValue: ts_morph_2.Writers.object(matOptions),
|
|
57
|
+
});
|
|
58
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
59
|
+
namedImports: ['MAT_FORM_FIELD_DEFAULT_OPTIONS'],
|
|
60
|
+
moduleSpecifier: '@angular/material/form-field',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// endregion
|
|
64
|
+
tsMorphTransform(project, [sourceFile], [classDeclaration], options);
|
|
65
|
+
} }));
|
|
66
|
+
}
|
|
67
|
+
exports.CoerceFormComponentRule = CoerceFormComponentRule;
|
|
68
|
+
//# sourceMappingURL=coerce-form-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-form-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-form-component.ts"],"names":[],"mappings":";;;AAAA,mEAImC;AACnC,6CAGwB;AACxB,+CAGyB;AACzB,uCAGkB;AAOlB,SAAgB,uBAAuB,CAAC,OAAmC;IAEzE,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,IAAI,EAAE,EACJ,MAAM,EACN,IAAI,EACJ,0BAA0B,GAC3B,GACF,GAAG,OAAO,CAAC;IAGZ,OAAO,IAAA,yCAAmB,kCACrB,OAAO,KACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,CAAE,gBAAgB,CAAE,EAAE,EAAE;YAElE,yBAAyB;YACzB,IAAA,gCAAqB,EACnB,gBAAgB,EAAE;gBAChB,IAAI,EAAE,qBAAqB;gBAC3B,eAAe,EAAE,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,EAAE,kBAAO,CAAC,MAAM,CAAC,UAAU,CAAC;iBACrC,CAAC,CAAC;gBACH,IAAA,wBAAa,EACX,UAAU,EACV;oBACE,YAAY,EAAE,CAAE,gCAAgC,CAAE;oBAClD,eAAe,EAAE,8BAA8B;iBAChD,CACF,CAAC;aACH;YACD,YAAY;YAEZ,gBAAgB,CAAC,OAAO,EAAE,CAAE,UAAU,CAAE,EAAE,CAAE,gBAAgB,CAAE,EAAE,OAAO,CAAC,CAAC;QAC3E,CAAC,IACD,CAAC;AAEL,CAAC;AAxFD,0DAwFC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CoerceComponentOptions } from '@rxap/schematics-ts-morph';
|
|
2
|
+
import { NormalizedMinimumTableOptions } from './minimum-table-options';
|
|
3
|
+
export interface CoerceMinimumTableComponentOptions extends CoerceComponentOptions {
|
|
4
|
+
table: NormalizedMinimumTableOptions;
|
|
5
|
+
}
|
|
6
|
+
export declare function CoerceMinimumTableComponentRule(options: Readonly<CoerceMinimumTableComponentOptions>): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceMinimumTableComponentRule = void 0;
|
|
4
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
5
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const table_options_1 = require("./table-options");
|
|
8
|
+
function CoerceMinimumTableComponentRule(options) {
|
|
9
|
+
const { tsMorphTransform = utilities_1.noop, table: { columnList, actionList, headerButton, modifiers, } } = options;
|
|
10
|
+
return (0, schematics_ts_morph_1.CoerceComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile], [classDeclaration]) => {
|
|
11
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, [
|
|
12
|
+
{
|
|
13
|
+
moduleSpecifier: '@rxap/material-table-system',
|
|
14
|
+
namedImports: ['RowAnimation'],
|
|
15
|
+
}
|
|
16
|
+
]);
|
|
17
|
+
// region inputs
|
|
18
|
+
(0, ts_morph_1.CoerceComponentInput)(classDeclaration, 'parameters', 'Observable<Record<string, unknown>>');
|
|
19
|
+
(0, ts_morph_1.CoerceImports)(sourceFile, {
|
|
20
|
+
moduleSpecifier: 'rxjs',
|
|
21
|
+
namedImports: ['Observable'],
|
|
22
|
+
});
|
|
23
|
+
// endregion
|
|
24
|
+
// region angular component imports
|
|
25
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableColumnMenuModule', moduleSpecifier: '@rxap/material-table-system' });
|
|
26
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatPaginatorModule', moduleSpecifier: '@angular/material/paginator' });
|
|
27
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatSortModule', moduleSpecifier: '@angular/material/sort' });
|
|
28
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'PersistentPaginatorDirective', moduleSpecifier: '@rxap/material-table-system' });
|
|
29
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'DataSourceErrorComponent', moduleSpecifier: '@rxap/data-source' });
|
|
30
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatDividerModule', moduleSpecifier: '@angular/material/divider' });
|
|
31
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableDataSourceDirective', moduleSpecifier: '@rxap/material-table-system' });
|
|
32
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatTableModule', moduleSpecifier: '@angular/material/table' });
|
|
33
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'CardProgressBarDirective', moduleSpecifier: '@rxap/material-directives/card' });
|
|
34
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatProgressBarModule', moduleSpecifier: '@angular/material/progress-bar' });
|
|
35
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatCardModule', moduleSpecifier: '@angular/material/card' });
|
|
36
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'AsyncPipe', moduleSpecifier: '@angular/common' });
|
|
37
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'NgClass', moduleSpecifier: '@angular/common' });
|
|
38
|
+
// region from column
|
|
39
|
+
for (const column of columnList) {
|
|
40
|
+
for (const componentImport of column.importList) {
|
|
41
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, componentImport);
|
|
42
|
+
}
|
|
43
|
+
for (const pipe of column.pipeList) {
|
|
44
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, pipe);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (columnList.some(column => column.hasFilter)) {
|
|
48
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableFilterModule', moduleSpecifier: '@rxap/material-table-system' });
|
|
49
|
+
}
|
|
50
|
+
if (columnList.some(column => column.propertyPath.includes('.'))) {
|
|
51
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'GetFromObjectPipe', moduleSpecifier: '@rxap/pipes' });
|
|
52
|
+
}
|
|
53
|
+
// endregion
|
|
54
|
+
// region from action
|
|
55
|
+
if (actionList && actionList.length) {
|
|
56
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatButtonModule', moduleSpecifier: '@angular/material/button' });
|
|
57
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatIconModule', moduleSpecifier: '@angular/material/icon' });
|
|
58
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableRowActionsModule', moduleSpecifier: '@rxap/material-table-system' });
|
|
59
|
+
if (actionList.some(action => action.confirm)) {
|
|
60
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
61
|
+
name: 'ConfirmModule',
|
|
62
|
+
moduleSpecifier: '@rxap/components'
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (actionList.some(action => action.permission)) {
|
|
66
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
67
|
+
name: 'HasPermissionModule',
|
|
68
|
+
moduleSpecifier: '@rxap/authorization'
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (actionList.some(action => action.errorMessage || action.successMessage)) {
|
|
72
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, {
|
|
73
|
+
name: 'MatSnackBarModule',
|
|
74
|
+
moduleSpecifier: '@angular/material/snack-bar'
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// endregion
|
|
79
|
+
if (headerButton) {
|
|
80
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'MatButtonModule', moduleSpecifier: '@angular/material/button' });
|
|
81
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableHeaderButtonDirective', moduleSpecifier: '@rxap/material-table-system' });
|
|
82
|
+
}
|
|
83
|
+
if (modifiers.includes(table_options_1.TableModifiers.SHOW_ARCHIVED_SLIDE)) {
|
|
84
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TableShowArchivedSlideComponent', moduleSpecifier: '@rxap/material-table-system' });
|
|
85
|
+
}
|
|
86
|
+
if (modifiers.includes(table_options_1.TableModifiers.NAVIGATION_BACK_HEADER)) {
|
|
87
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'NavigateBackButtonComponent', moduleSpecifier: '@rxap/components' });
|
|
88
|
+
}
|
|
89
|
+
// endregion
|
|
90
|
+
(0, ts_morph_1.CoerceDefaultClassExport)(classDeclaration, true);
|
|
91
|
+
tsMorphTransform(project, [sourceFile], [classDeclaration], options);
|
|
92
|
+
} }));
|
|
93
|
+
}
|
|
94
|
+
exports.CoerceMinimumTableComponentRule = CoerceMinimumTableComponentRule;
|
|
95
|
+
//# sourceMappingURL=coerce-minimum-table-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-minimum-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-minimum-table-component.ts"],"names":[],"mappings":";;;AAAA,mEAGmC;AACnC,6CAKwB;AACxB,+CAAuC;AAEvC,mDAAiD;AAMjD,SAAgB,+BAA+B,CAAC,OAAqD;IAEnG,MAAM,EACJ,gBAAgB,GAAG,gBAAI,EACvB,KAAK,EAAE,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,GACV,EACF,GAAG,OAAO,CAAC;IAEZ,OAAO,IAAA,yCAAmB,kCACrB,OAAO,KACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE;YAE9D,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB;oBACE,eAAe,EAAE,6BAA6B;oBAC9C,YAAY,EAAE,CAAC,cAAc,CAAC;iBAC/B;aACF,CAAC,CAAC;YAEH,gBAAgB;YAChB,IAAA,+BAAoB,EAAC,gBAAgB,EAAE,YAAY,EAAE,qCAAqC,CAAC,CAAC;YAC5F,IAAA,wBAAa,EAAC,UAAU,EAAE;gBACxB,eAAe,EAAE,MAAM;gBACvB,YAAY,EAAE,CAAC,YAAY,CAAC;aAC7B,CAAC,CAAC;YACH,YAAY;YAEZ,mCAAmC;YACnC,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC,CAAC;YAC3H,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC,CAAC;YACxH,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,I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CAAwB,EAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;YAEjD,gBAAgB,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,CAAC;QACvE,CAAC,IACD,CAAC;AAEL,CAAC;AAxGD,0EAwGC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CoerceComponentOptions } from '@rxap/schematics-ts-morph';
|
|
2
|
+
import { NormalizedTreeTableOptions } from './tree-table-options';
|
|
3
|
+
export interface CoerceTreeTableComponentOptions extends CoerceComponentOptions {
|
|
4
|
+
table: NormalizedTreeTableOptions;
|
|
5
|
+
}
|
|
6
|
+
export declare function CoerceTreeTableComponentRule(options: Readonly<CoerceTreeTableComponentOptions>): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CoerceTreeTableComponentRule = void 0;
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
|
+
const coerce_minimum_table_component_1 = require("./coerce-minimum-table-component");
|
|
6
|
+
function CoerceTreeTableComponentRule(options) {
|
|
7
|
+
return (0, coerce_minimum_table_component_1.CoerceMinimumTableComponentRule)(Object.assign(Object.assign({}, options), { tsMorphTransform: (project, [sourceFile], [classDeclaration]) => {
|
|
8
|
+
(0, ts_morph_1.CoerceComponentImport)(classDeclaration, { name: 'TreeControlCellComponent', moduleSpecifier: '@rxap/material-table-system' });
|
|
9
|
+
} }));
|
|
10
|
+
}
|
|
11
|
+
exports.CoerceTreeTableComponentRule = CoerceTreeTableComponentRule;
|
|
12
|
+
//# sourceMappingURL=coerce-tree-table-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coerce-tree-table-component.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/coerce-tree-table-component.ts"],"names":[],"mappings":";;;AACA,6CAAuD;AACvD,qFAAmF;AAOnF,SAAgB,4BAA4B,CAAC,OAAkD;IAE7F,OAAO,IAAA,gEAA+B,kCACjC,OAAO,KACV,gBAAgB,EAAE,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,EAAE;YAC9D,IAAA,gCAAqB,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC,CAAC;QAChI,CAAC,IACD,CAAC;AAEL,CAAC;AATD,oEASC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import { NormalizedTypeImport, TypeImport } from '@rxap/ts-morph';
|
|
1
2
|
import { NonNullableSelected, Normalized } from '@rxap/utilities';
|
|
2
|
-
|
|
3
|
+
import { BaseFormControlTemplate, FormDefinitionControl, NormalizedFormDefinitionControl } from './form-definition-control';
|
|
4
|
+
export interface DataGridItem extends FormDefinitionControl {
|
|
3
5
|
name: string;
|
|
4
|
-
type?: string;
|
|
6
|
+
type?: string | TypeImport;
|
|
5
7
|
header?: string;
|
|
6
8
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
export interface NormalizedDataGridItem extends Readonly<NonNullableSelected<Normalized<DataGridItem>, 'type'>>, Omit<NormalizedFormDefinitionControl, 'type'> {
|
|
10
|
+
type: NormalizedTypeImport;
|
|
11
|
+
template: BaseFormControlTemplate;
|
|
12
|
+
importList: NormalizedTypeImport[];
|
|
13
|
+
}
|
|
14
|
+
export declare function NormalizeDataGridItem(item: Readonly<DataGridItem>): NormalizedDataGridItem;
|
|
15
|
+
export declare function NormalizeDataGridItemList(itemList?: Array<Readonly<DataGridItem>>): ReadonlyArray<NormalizedDataGridItem>;
|
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NormalizeDataGridItemList = exports.NormalizeDataGridItem = void 0;
|
|
4
|
+
const form_definition_control_1 = require("./form-definition-control");
|
|
4
5
|
function NormalizeDataGridItem(item) {
|
|
5
|
-
var _a
|
|
6
|
-
let name;
|
|
7
|
-
let type;
|
|
6
|
+
var _a;
|
|
8
7
|
let header = null;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name = fragments[0];
|
|
12
|
-
type = fragments[1] || 'unknown';
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
name = item.name;
|
|
16
|
-
type = (_a = item.type) !== null && _a !== void 0 ? _a : 'unknown';
|
|
17
|
-
header = (_b = item.header) !== null && _b !== void 0 ? _b : null;
|
|
18
|
-
}
|
|
19
|
-
return Object.freeze({
|
|
20
|
-
name,
|
|
21
|
-
type,
|
|
22
|
-
header,
|
|
23
|
-
});
|
|
8
|
+
header = (_a = item.header) !== null && _a !== void 0 ? _a : null;
|
|
9
|
+
return Object.freeze(Object.assign(Object.assign({}, (0, form_definition_control_1.NormalizeFormDefinitionControl)(item)), { header }));
|
|
24
10
|
}
|
|
25
11
|
exports.NormalizeDataGridItem = NormalizeDataGridItem;
|
|
26
12
|
function NormalizeDataGridItemList(itemList) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-item.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"data-grid-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-item.ts"],"names":[],"mappings":";;;AAQA,uEAKmC;AAcnC,SAAgB,qBAAqB,CAAC,IAA4B;;IAChE,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,CAAC;IAC7B,OAAO,MAAM,CAAC,MAAM,iCACf,IAAA,wDAA8B,EAAC,IAAI,CAAC,KACvC,MAAM,IACN,CAAC;AACL,CAAC;AAPD,sDAOC;AAED,SAAgB,yBAAyB,CACvC,QAAwC;;IAExC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,CAAC,qBAAqB,CAAC,mCAAI,EAAE,CAAC,CAAC;AACnE,CAAC;AAJD,8DAIC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NormalizeExistingMethod = void 0;
|
|
4
|
-
const
|
|
4
|
+
const ts_morph_1 = require("@rxap/ts-morph");
|
|
5
5
|
function NormalizeExistingMethod(existingMethod) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
if (existingMethod) {
|
|
@@ -11,7 +11,7 @@ function NormalizeExistingMethod(existingMethod) {
|
|
|
11
11
|
if (!existingMethod || !existingMethod.name) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
|
-
return (0,
|
|
14
|
+
return (0, ts_morph_1.NormalizeTypeImport)(existingMethod);
|
|
15
15
|
}
|
|
16
16
|
exports.NormalizeExistingMethod = NormalizeExistingMethod;
|
|
17
17
|
//# sourceMappingURL=existing-method.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"existing-method.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/existing-method.ts"],"names":[],"mappings":";;;AACA
|
|
1
|
+
{"version":3,"file":"existing-method.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/existing-method.ts"],"names":[],"mappings":";;;AACA,6CAGwB;AAexB,SAAgB,uBAAuB,CAAC,cAA+B;;IACrE,IAAI,cAAc,EAAE;QAClB,MAAA,cAAc,CAAC,IAAI,oCAAnB,cAAc,CAAC,IAAI,GAAK,cAAc,CAAC,SAAS,EAAC;QACjD,MAAA,cAAc,CAAC,eAAe,oCAA9B,cAAc,CAAC,eAAe,GAAK,cAAc,CAAC,UAAU,EAAC;KAC9D;IACD,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IACD,OAAO,IAAA,8BAAmB,EAAC,cAAc,CAAC,CAAC;AAC7C,CAAC;AATD,0DASC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Normalized } from '@rxap/utilities';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
isRequired?: boolean;
|
|
6
|
-
state?: string;
|
|
7
|
-
validatorList?: string[];
|
|
2
|
+
import { BaseFormControlTemplate, FormDefinitionControl, NormalizedFormDefinitionControl } from './form-definition-control';
|
|
3
|
+
import { NormalizedTypeImport } from '@rxap/ts-morph';
|
|
4
|
+
export interface FormComponentControl extends FormDefinitionControl {
|
|
8
5
|
}
|
|
9
|
-
export interface NormalizedFormComponentControl extends Readonly<Normalized<FormComponentControl
|
|
10
|
-
type:
|
|
6
|
+
export interface NormalizedFormComponentControl extends Readonly<Normalized<FormComponentControl>>, NormalizedFormDefinitionControl {
|
|
7
|
+
type: NormalizedTypeImport;
|
|
8
|
+
template: BaseFormControlTemplate;
|
|
9
|
+
importList: NormalizedTypeImport[];
|
|
11
10
|
}
|
|
12
|
-
export declare function NormalizeFormComponentControl(control:
|
|
13
|
-
export declare function NormalizeFormComponentControlList(controlList?: Array<
|
|
11
|
+
export declare function NormalizeFormComponentControl(control: FormComponentControl): NormalizedFormComponentControl;
|
|
12
|
+
export declare function NormalizeFormComponentControlList(controlList?: Array<FormComponentControl>): ReadonlyArray<NormalizedFormComponentControl>;
|
|
@@ -1,41 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NormalizeFormComponentControlList = exports.NormalizeFormComponentControl = void 0;
|
|
4
|
-
const
|
|
4
|
+
const form_definition_control_1 = require("./form-definition-control");
|
|
5
5
|
function NormalizeFormComponentControl(control) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let type = 'unknown';
|
|
9
|
-
let isRequired = false;
|
|
10
|
-
let state = null;
|
|
11
|
-
let validatorList = [];
|
|
12
|
-
if (typeof control === 'string') {
|
|
13
|
-
// name:type:isRequired:state:validators
|
|
14
|
-
// username:string:true:my-default-username:minLength(3),maxLength(20)
|
|
15
|
-
const fragments = control.split(':');
|
|
16
|
-
name = fragments[0];
|
|
17
|
-
type = fragments[1] || type;
|
|
18
|
-
isRequired = fragments[2] === 'true';
|
|
19
|
-
state = fragments[3] || state;
|
|
20
|
-
if (fragments[4]) {
|
|
21
|
-
// ensure that the value is not an empty string
|
|
22
|
-
validatorList = fragments[4].split(/,(?![^(]*\))/g);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
name = control.name;
|
|
27
|
-
type = (_a = control.type) !== null && _a !== void 0 ? _a : type;
|
|
28
|
-
isRequired = (_b = control.isRequired) !== null && _b !== void 0 ? _b : false;
|
|
29
|
-
state = (_c = control.state) !== null && _c !== void 0 ? _c : state;
|
|
30
|
-
validatorList = (_d = control.validatorList) !== null && _d !== void 0 ? _d : validatorList;
|
|
31
|
-
}
|
|
32
|
-
return Object.freeze({
|
|
33
|
-
name: (0, schematics_utilities_1.camelize)(name),
|
|
34
|
-
type,
|
|
35
|
-
isRequired,
|
|
36
|
-
state,
|
|
37
|
-
validatorList,
|
|
38
|
-
});
|
|
6
|
+
const normalizedControl = (0, form_definition_control_1.NormalizeFormDefinitionControl)(control);
|
|
7
|
+
return Object.freeze(Object.assign({}, normalizedControl));
|
|
39
8
|
}
|
|
40
9
|
exports.NormalizeFormComponentControl = NormalizeFormComponentControl;
|
|
41
10
|
function NormalizeFormComponentControlList(controlList) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-component-control.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/form-component-control.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"form-component-control.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/form-component-control.ts"],"names":[],"mappings":";;;AACA,uEAKmC;AAgBnC,SAAgB,6BAA6B,CAC3C,OAA6B;IAE7B,MAAM,iBAAiB,GAAG,IAAA,wDAA8B,EAAC,OAAO,CAAC,CAAC;IAClE,OAAO,MAAM,CAAC,MAAM,mBACf,iBAAiB,EACpB,CAAC;AACL,CAAC;AAPD,sEAOC;AAED,SAAgB,iCAAiC,CAC/C,WAAyC;;IAEzC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,CAAC,6BAA6B,CAAC,mCAAI,EAAE,CAAC,CAAC;AAC9E,CAAC;AAJD,8EAIC"}
|
|
@@ -1,15 +1,59 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TypeImport } from '@rxap/ts-morph';
|
|
2
|
+
import { ControlOption, Normalized } from '@rxap/utilities';
|
|
3
|
+
import { BackendTypes } from './backend-types';
|
|
4
|
+
import { NormalizedTypeImport } from '@rxap/ts-morph';
|
|
5
|
+
export declare enum FormControlTemplateType {
|
|
6
|
+
DEFAULT = "default",
|
|
7
|
+
INPUT = "input",
|
|
8
|
+
SELECT = "select"
|
|
9
|
+
}
|
|
10
|
+
export interface BaseFormControlTemplate {
|
|
11
|
+
name: FormControlTemplateType;
|
|
12
|
+
}
|
|
13
|
+
export interface MinimalNormalizedFormDefinitionControl {
|
|
14
|
+
type: TypeImport;
|
|
15
|
+
validatorList: string[];
|
|
16
|
+
importList: TypeImport[];
|
|
17
|
+
}
|
|
18
|
+
export interface InputFormControlTemplate extends BaseFormControlTemplate {
|
|
19
|
+
type?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface NormalizedInputFormControlTemplate extends Readonly<Normalized<InputFormControlTemplate>>, BaseFormControlTemplate {
|
|
24
|
+
name: FormControlTemplateType.INPUT;
|
|
25
|
+
}
|
|
26
|
+
export declare function IsNormalizedInputFormControlTemplate(template: BaseFormControlTemplate): template is NormalizedInputFormControlTemplate;
|
|
27
|
+
export declare function NormalizeInputFormControlTemplate(template: InputFormControlTemplate, normalizedControl: MinimalNormalizedFormDefinitionControl): NormalizedInputFormControlTemplate;
|
|
28
|
+
export interface SelectFormControlTemplate extends BaseFormControlTemplate {
|
|
29
|
+
label?: string;
|
|
30
|
+
options?: ControlOption[];
|
|
31
|
+
backend?: BackendTypes;
|
|
32
|
+
}
|
|
33
|
+
export interface NormalizedSelectFormControlTemplate extends Readonly<Normalized<Omit<SelectFormControlTemplate, 'options'>>>, BaseFormControlTemplate {
|
|
34
|
+
name: FormControlTemplateType.SELECT;
|
|
35
|
+
options: ReadonlyArray<ControlOption> | null;
|
|
36
|
+
backend: BackendTypes;
|
|
37
|
+
}
|
|
38
|
+
export declare function IsNormalizedSelectFormControlTemplate(template: BaseFormControlTemplate): template is NormalizedSelectFormControlTemplate;
|
|
39
|
+
export declare function NormalizeSelectFormControlTemplate(template: SelectFormControlTemplate, normalizedControl: MinimalNormalizedFormDefinitionControl): NormalizedSelectFormControlTemplate;
|
|
2
40
|
export interface FormDefinitionControl {
|
|
3
41
|
name: string;
|
|
4
|
-
type?: string;
|
|
42
|
+
type?: string | TypeImport;
|
|
5
43
|
isArray?: boolean;
|
|
6
44
|
state?: string;
|
|
7
45
|
isRequired?: boolean;
|
|
46
|
+
isReadonly?: boolean;
|
|
47
|
+
isDisabled?: boolean;
|
|
8
48
|
validatorList?: string[];
|
|
49
|
+
importList?: TypeImport[];
|
|
50
|
+
template?: BaseFormControlTemplate;
|
|
9
51
|
}
|
|
10
52
|
export interface NormalizedFormDefinitionControl extends Readonly<Normalized<FormDefinitionControl>> {
|
|
11
|
-
type:
|
|
53
|
+
type: NormalizedTypeImport;
|
|
54
|
+
template: BaseFormControlTemplate;
|
|
55
|
+
importList: NormalizedTypeImport[];
|
|
12
56
|
}
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function NormalizeFormDefinitionControl(control:
|
|
15
|
-
export declare function NormalizeFormDefinitionControlList(controlList?: Array<
|
|
57
|
+
export declare function NormalizeFormControlTemplate(minimalNormalizedControl: MinimalNormalizedFormDefinitionControl, template?: BaseFormControlTemplate): BaseFormControlTemplate;
|
|
58
|
+
export declare function NormalizeFormDefinitionControl(control: FormDefinitionControl): NormalizedFormDefinitionControl;
|
|
59
|
+
export declare function NormalizeFormDefinitionControlList(controlList?: Array<FormDefinitionControl>): ReadonlyArray<NormalizedFormDefinitionControl>;
|