@rxap/schematic-angular 16.1.0-dev.7 → 16.1.0-dev.9
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 +12 -0
- package/README.md +1 -1
- package/package.json +14 -13
- package/src/lib/accordion-item.js +19 -17
- package/src/lib/accordion-item.js.map +1 -1
- package/src/lib/accordion-itme-types.js +7 -3
- package/src/lib/accordion-itme-types.js.map +1 -1
- package/src/lib/adapter-options.js +6 -2
- package/src/lib/adapter-options.js.map +1 -1
- package/src/lib/angular-options.js +22 -31
- package/src/lib/angular-options.js.map +1 -1
- package/src/lib/assert-table-component-exists.js +9 -5
- package/src/lib/assert-table-component-exists.js.map +1 -1
- package/src/lib/backend-types.js +5 -2
- package/src/lib/backend-types.js.map +1 -1
- package/src/lib/data-grid-item.js +12 -5
- package/src/lib/data-grid-item.js.map +1 -1
- package/src/lib/data-grid-options.js +13 -8
- package/src/lib/data-grid-options.js.map +1 -1
- package/src/lib/dialog-action.js +14 -7
- package/src/lib/dialog-action.js.map +1 -1
- package/src/lib/existing-method.js +5 -1
- package/src/lib/existing-method.js.map +1 -1
- package/src/lib/form-component-control.js +16 -9
- package/src/lib/form-component-control.js.map +1 -1
- package/src/lib/form-definition-control.js +17 -9
- package/src/lib/form-definition-control.js.map +1 -1
- package/src/lib/minimum-table-component-options.js +92 -121
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.js +17 -12
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/table-action.js +37 -33
- package/src/lib/table-action.js.map +1 -1
- package/src/lib/table-column.js +27 -20
- package/src/lib/table-column.js.map +1 -1
- package/src/lib/table-header-button.js +20 -15
- package/src/lib/table-header-button.js.map +1 -1
- package/src/lib/table-open-api-options.js +8 -4
- package/src/lib/table-open-api-options.js.map +1 -1
- package/src/lib/table-options.js +15 -13
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/table-row-action.js +18 -13
- package/src/lib/table-row-action.js.map +1 -1
- package/src/lib/to-title.js +8 -4
- package/src/lib/to-title.js.map +1 -1
- package/src/lib/tree-table-options.js +13 -11
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/schematics/accordion/accordion-component/index.js +105 -125
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/index.js +107 -119
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +54 -55
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-table-component/index.js +36 -38
- package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +52 -54
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
- package/src/schematics/data-grid-component/index.js +81 -87
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/dialog-component/index.js +20 -21
- package/src/schematics/dialog-component/index.js.map +1 -1
- package/src/schematics/form/control/input-form-control/index.js +18 -15
- package/src/schematics/form/control/input-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/index.js +43 -41
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/index.js +58 -56
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.js +54 -62
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-control/index.js +23 -22
- package/src/schematics/form/form-control/index.js.map +1 -1
- package/src/schematics/form/form-definition/index.js +18 -16
- package/src/schematics/form/form-definition/index.js.map +1 -1
- package/src/schematics/table/action/dialog-table-action/index.js +30 -30
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/index.js +56 -67
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/navigation-table-action/index.js +20 -17
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/operation-table-action/index.js +31 -30
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
- package/src/schematics/table/header-button/form-table-header-button/index.js +29 -36
- package/src/schematics/table/header-button/form-table-header-button/index.js.map +1 -1
- package/src/schematics/table/header-button/navigation-table-header-button/index.js +23 -21
- package/src/schematics/table/header-button/navigation-table-header-button/index.js.map +1 -1
- package/src/schematics/table/table-action/index.js +23 -22
- package/src/schematics/table/table-action/index.js.map +1 -1
- package/src/schematics/table/table-component/index.js +93 -92
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-header-button/index.js +21 -20
- package/src/schematics/table/table-header-button/index.js.map +1 -1
- package/src/schematics/table/tree-table-component/index.js +63 -66
- package/src/schematics/table/tree-table-component/index.js.map +1 -1
- package/src/schematics/tree-component/index.js +18 -18
- package/src/schematics/tree-component/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [16.1.0-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.8...@rxap/schematic-angular@16.1.0-dev.9) (2023-08-31)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- ensure the project name is not included in the project tag list ([b131ac3](https://gitlab.com/rxap/packages/commit/b131ac3bd92b3b8799d62f15bbd30a1997d7c753))
|
|
11
|
+
|
|
12
|
+
# [16.1.0-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.7...@rxap/schematic-angular@16.1.0-dev.8) (2023-08-17)
|
|
13
|
+
|
|
14
|
+
### Reverts
|
|
15
|
+
|
|
16
|
+
- change from commonjs to es2022 ([747a381](https://gitlab.com/rxap/packages/commit/747a381a090f0a276cf363da61bb19ed0c9cb5b7))
|
|
17
|
+
|
|
6
18
|
# [16.1.0-dev.7](https://gitlab.com/rxap/packages/compare/@rxap/schematic-angular@16.1.0-dev.6...@rxap/schematic-angular@16.1.0-dev.7) (2023-08-16)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/schematic-angular
|
|
|
17
17
|
```
|
|
18
18
|
**Install peer dependencies:**
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0-dev.
|
|
20
|
+
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0-dev.13 @rxap/schematics-utilities@^16.0.0-dev.10 @rxap/utilities@^16.0.0-dev.13 ts-morph@^18.0.0
|
|
21
21
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/schematic-angular",
|
|
3
|
-
"version": "16.1.0-dev.
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "16.1.0-dev.9",
|
|
4
|
+
"type": "commonjs",
|
|
5
5
|
"schematics": "./collection.json",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"rxap",
|
|
12
12
|
"packages",
|
|
13
13
|
"schematic",
|
|
14
|
-
"angular"
|
|
14
|
+
"angular",
|
|
15
|
+
"schematic-angular"
|
|
15
16
|
],
|
|
16
17
|
"homepage": "https:/gitlab.com/rxap/packages/packages/schematic/angular",
|
|
17
18
|
"bugs": {
|
|
@@ -37,27 +38,27 @@
|
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"@angular-devkit/core": "^16.1.4",
|
|
39
40
|
"@angular-devkit/schematics": "^16.1.4",
|
|
40
|
-
"@rxap/schematics-ts-morph": "^16.0.0-dev.
|
|
41
|
-
"@rxap/schematics-utilities": "^16.0.0-dev.
|
|
42
|
-
"@rxap/utilities": "^16.0.0-dev.
|
|
41
|
+
"@rxap/schematics-ts-morph": "^16.0.0-dev.13",
|
|
42
|
+
"@rxap/schematics-utilities": "^16.0.0-dev.10",
|
|
43
|
+
"@rxap/utilities": "^16.0.0-dev.13",
|
|
43
44
|
"ts-morph": "^18.0.0",
|
|
44
|
-
"@rxap/node-utilities": "1.1.0-dev.
|
|
45
|
-
"@rxap/workspace-ts-morph": "0.1.0-dev.
|
|
46
|
-
"@rxap/workspace-utilities": "0.1.0-dev.
|
|
45
|
+
"@rxap/node-utilities": "1.1.0-dev.4",
|
|
46
|
+
"@rxap/workspace-ts-morph": "0.1.0-dev.3",
|
|
47
|
+
"@rxap/workspace-utilities": "0.1.0-dev.6"
|
|
47
48
|
},
|
|
48
49
|
"nx-migrations": {
|
|
49
50
|
"packageGroup": [
|
|
50
51
|
{
|
|
51
52
|
"package": "@rxap/schematics-ts-morph",
|
|
52
|
-
"version": "16.0.0-dev.
|
|
53
|
+
"version": "16.0.0-dev.13"
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
"package": "@rxap/schematics-utilities",
|
|
56
|
-
"version": "16.0.0-dev.
|
|
57
|
+
"version": "16.0.0-dev.10"
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
"package": "@rxap/utilities",
|
|
60
|
-
"version": "16.0.0-dev.
|
|
61
|
+
"version": "16.0.0-dev.13"
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
"package": "@rxap/workspace-utilities",
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
}
|
|
66
67
|
]
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "3d49d0a2548a0c403ad55c564108b54ba734a677",
|
|
69
70
|
"main": "./src/index.js",
|
|
70
71
|
"types": "./src/index.d.ts"
|
|
71
72
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeAccordionItemList = exports.NormalizeAccordionItem = void 0;
|
|
4
|
+
const accordion_itme_types_1 = require("./accordion-itme-types");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
function NormalizeAccordionItem(item) {
|
|
8
|
+
var _a, _b, _c;
|
|
5
9
|
let name;
|
|
6
10
|
let type = 'panel';
|
|
7
11
|
let modifiers = [];
|
|
@@ -9,26 +13,24 @@ export function NormalizeAccordionItem(item) {
|
|
|
9
13
|
if (typeof item === 'string') {
|
|
10
14
|
const fragments = item.split(':');
|
|
11
15
|
name = fragments[0];
|
|
12
|
-
type = fragments[1]
|
|
16
|
+
type = (_a = fragments[1]) !== null && _a !== void 0 ? _a : type;
|
|
13
17
|
modifiers = fragments[2] ? fragments[2].split(/,(?![^(]*\))/g) : modifiers;
|
|
14
18
|
}
|
|
15
19
|
else {
|
|
16
20
|
name = item.name;
|
|
17
|
-
type = item.type
|
|
18
|
-
modifiers = item.modifiers
|
|
21
|
+
type = (_b = item.type) !== null && _b !== void 0 ? _b : type;
|
|
22
|
+
modifiers = (_c = item.modifiers) !== null && _c !== void 0 ? _c : modifiers;
|
|
19
23
|
additional = item;
|
|
20
24
|
}
|
|
21
|
-
if (!IsAccordionItemType(type)) {
|
|
22
|
-
throw new SchematicsException(`The item type '${type}' for item '${name}' is not supported`);
|
|
25
|
+
if (!(0, accordion_itme_types_1.IsAccordionItemType)(type)) {
|
|
26
|
+
throw new schematics_1.SchematicsException(`The item type '${type}' for item '${name}' is not supported`);
|
|
23
27
|
}
|
|
24
|
-
return Object.seal({
|
|
25
|
-
|
|
26
|
-
name: dasherize(name),
|
|
27
|
-
type,
|
|
28
|
-
modifiers,
|
|
29
|
-
});
|
|
28
|
+
return Object.seal(Object.assign(Object.assign({}, additional), { name: (0, utilities_1.dasherize)(name), type,
|
|
29
|
+
modifiers }));
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
exports.NormalizeAccordionItem = NormalizeAccordionItem;
|
|
32
|
+
function NormalizeAccordionItemList(itemList) {
|
|
33
|
+
return Object.seal((itemList !== null && itemList !== void 0 ? itemList : []).map(NormalizeAccordionItem));
|
|
33
34
|
}
|
|
35
|
+
exports.NormalizeAccordionItemList = NormalizeAccordionItemList;
|
|
34
36
|
//# sourceMappingURL=accordion-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/accordion-item.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"accordion-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/accordion-item.ts"],"names":[],"mappings":";;;AAAA,iEAGgC;AAChC,+CAIyB;AACzB,2DAAiE;AAUjE,SAAgB,sBAAsB,CAAC,IAA4B;;IACjE,IAAI,IAAY,CAAC;IACjB,IAAI,IAAI,GAAG,OAAO,CAAC;IACnB,IAAI,SAAS,GAAa,EAAE,CAAC;IAC7B,IAAI,UAAU,GAAwB,EAAE,CAAC;IACzC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,MAAA,SAAS,CAAC,CAAC,CAAC,mCAAI,IAAI,CAAC;QAC5B,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAC5E;SAAM;QACL,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACjB,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,mCAAI,IAAI,CAAC;QACzB,SAAS,GAAG,MAAA,IAAI,CAAC,SAAS,mCAAI,SAAS,CAAC;QACxC,UAAU,GAAG,IAAI,CAAC;KACnB;IACD,IAAI,CAAC,IAAA,0CAAmB,EAAC,IAAI,CAAC,EAAE;QAC9B,MAAM,IAAI,gCAAmB,CAC3B,kBAAmB,IAAK,eAAgB,IAAK,oBAAoB,CAClE,CAAC;KACH;IACD,OAAO,MAAM,CAAC,IAAI,iCACb,UAAU,KACb,IAAI,EAAE,IAAA,qBAAS,EAAC,IAAI,CAAC,EACrB,IAAI;QACJ,SAAS,IACT,CAAC;AACL,CAAC;AA3BD,wDA2BC;AAED,SAAgB,0BAA0B,CAAC,QAAwC;IACjF,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,gEAEC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IsAccordionItemType = exports.AccordionItemTypes = void 0;
|
|
4
|
+
var AccordionItemTypes;
|
|
2
5
|
(function (AccordionItemTypes) {
|
|
3
6
|
AccordionItemTypes["Panel"] = "panel";
|
|
4
7
|
AccordionItemTypes["Table"] = "table";
|
|
5
8
|
AccordionItemTypes["DataGrid"] = "data-grid";
|
|
6
9
|
AccordionItemTypes["TreeTable"] = "tree-table";
|
|
7
|
-
})(AccordionItemTypes || (AccordionItemTypes = {}));
|
|
8
|
-
|
|
10
|
+
})(AccordionItemTypes || (exports.AccordionItemTypes = AccordionItemTypes = {}));
|
|
11
|
+
function IsAccordionItemType(type) {
|
|
9
12
|
return Object.values(AccordionItemTypes).includes(type);
|
|
10
13
|
}
|
|
14
|
+
exports.IsAccordionItemType = IsAccordionItemType;
|
|
11
15
|
//# sourceMappingURL=accordion-itme-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-itme-types.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/accordion-itme-types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"accordion-itme-types.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/accordion-itme-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,qCAAe,CAAA;IACf,4CAAsB,CAAA;IACtB,8CAAwB,CAAA;AAC1B,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAQ,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAFD,kDAEC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeAdapterOptions = void 0;
|
|
4
|
+
function NormalizeAdapterOptions(options) {
|
|
2
5
|
// check if the className and importPath is set. The schematic options parse will build an object with all property set to undefined
|
|
3
6
|
// if the user does not set the object properties. If the className or importPath is not set the adapter options should be null
|
|
4
|
-
if (!options
|
|
7
|
+
if (!(options === null || options === void 0 ? void 0 : options.className) || !(options === null || options === void 0 ? void 0 : options.importPath)) {
|
|
5
8
|
return null;
|
|
6
9
|
}
|
|
7
10
|
return Object.seal({
|
|
@@ -9,4 +12,5 @@ export function NormalizeAdapterOptions(options) {
|
|
|
9
12
|
importPath: options.importPath,
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
exports.NormalizeAdapterOptions = NormalizeAdapterOptions;
|
|
12
16
|
//# sourceMappingURL=adapter-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/adapter-options.ts"],"names":[],"mappings":"AAUA,
|
|
1
|
+
{"version":3,"file":"adapter-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/adapter-options.ts"],"names":[],"mappings":";;;AAUA,SAAgB,uBAAuB,CAAC,OAAkC;IACxE,oIAAoI;IACpI,+HAA+H;IAC/H,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAA,EAAE;QAC/C,OAAO,IAAI,CAAC;KACb;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;QACjB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;AACL,CAAC;AAVD,0DAUC"}
|
|
@@ -1,39 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrintAngularOptions = exports.AssertAngularOptionsNameProperty = exports.NormalizeAngularOptions = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const utilities_1 = require("@rxap/utilities");
|
|
6
|
+
const backend_types_1 = require("./backend-types");
|
|
7
|
+
function NormalizeAngularOptions(options) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
9
|
+
let shared = (_a = options.shared) !== null && _a !== void 0 ? _a : false;
|
|
10
|
+
const project = (0, utilities_1.dasherize)((_b = options.project) !== null && _b !== void 0 ? _b : 'shared');
|
|
7
11
|
if (project === 'shared') {
|
|
8
12
|
shared = true;
|
|
9
13
|
}
|
|
10
|
-
const normalizedOptions = NormalizeGlobalOptions({
|
|
11
|
-
|
|
12
|
-
project,
|
|
13
|
-
});
|
|
14
|
-
return Object.seal({
|
|
15
|
-
...normalizedOptions,
|
|
16
|
-
componentName: options.componentName ? dasherize(options.componentName) : null,
|
|
17
|
-
name: options.name ? dasherize(options.name) : null,
|
|
18
|
-
context: options.context ? dasherize(options.context) : null,
|
|
19
|
-
nestModule: options.nestModule ? dasherize(options.nestModule) : null,
|
|
20
|
-
controllerName: options.controllerName ? dasherize(options.controllerName) : null,
|
|
21
|
-
backend: options.backend ?? BackendTypes.NONE,
|
|
22
|
-
directory: options.directory ?? null,
|
|
23
|
-
shared,
|
|
24
|
-
prefix: options.prefix ?? null,
|
|
25
|
-
scope: options.scope ?? null,
|
|
26
|
-
openApi: options.openApi ?? null,
|
|
27
|
-
});
|
|
14
|
+
const normalizedOptions = (0, schematics_utilities_1.NormalizeGlobalOptions)(Object.assign(Object.assign({}, options), { project }));
|
|
15
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedOptions), { componentName: options.componentName ? (0, utilities_1.dasherize)(options.componentName) : null, name: options.name ? (0, utilities_1.dasherize)(options.name) : null, context: options.context ? (0, utilities_1.dasherize)(options.context) : null, nestModule: options.nestModule ? (0, utilities_1.dasherize)(options.nestModule) : null, controllerName: options.controllerName ? (0, utilities_1.dasherize)(options.controllerName) : null, backend: (_c = options.backend) !== null && _c !== void 0 ? _c : backend_types_1.BackendTypes.NONE, directory: (_d = options.directory) !== null && _d !== void 0 ? _d : null, shared, prefix: (_e = options.prefix) !== null && _e !== void 0 ? _e : null, scope: (_f = options.scope) !== null && _f !== void 0 ? _f : null, openApi: (_g = options.openApi) !== null && _g !== void 0 ? _g : null }));
|
|
28
16
|
}
|
|
29
|
-
|
|
17
|
+
exports.NormalizeAngularOptions = NormalizeAngularOptions;
|
|
18
|
+
function AssertAngularOptionsNameProperty(options) {
|
|
30
19
|
if (!options.name) {
|
|
31
20
|
throw new Error('The name option is required');
|
|
32
21
|
}
|
|
33
22
|
}
|
|
34
|
-
|
|
23
|
+
exports.AssertAngularOptionsNameProperty = AssertAngularOptionsNameProperty;
|
|
24
|
+
function PrintAngularOptions(schematicName, options) {
|
|
35
25
|
console.log(JSON.stringify(options));
|
|
36
|
-
PrintGeneralOptions(schematicName, options);
|
|
26
|
+
(0, schematics_utilities_1.PrintGeneralOptions)(schematicName, options);
|
|
37
27
|
const { name, context, nestModule, controllerName, backend, directory, componentName, } = options;
|
|
38
28
|
if (name) {
|
|
39
29
|
console.log(`\x1b[33m===== Name: ${name}\x1b[0m`);
|
|
@@ -51,7 +41,7 @@ export function PrintAngularOptions(schematicName, options) {
|
|
|
51
41
|
console.log(`\x1b[34m===== Context: \x1b[31mNONE\x1b[0m`);
|
|
52
42
|
}
|
|
53
43
|
switch (backend) {
|
|
54
|
-
case BackendTypes.NESTJS:
|
|
44
|
+
case backend_types_1.BackendTypes.NESTJS:
|
|
55
45
|
console.log(`\x1b[31m===== Backend: NESTJS\x1b[0m`);
|
|
56
46
|
if (nestModule) {
|
|
57
47
|
console.log(`\x1b[36m===== Nest Module: ${nestModule}\x1b[0m`);
|
|
@@ -66,17 +56,18 @@ export function PrintAngularOptions(schematicName, options) {
|
|
|
66
56
|
console.log(`\x1b[36m===== Controller Name: \x1b[31mNONE\x1b[0m`);
|
|
67
57
|
}
|
|
68
58
|
break;
|
|
69
|
-
case BackendTypes.OPEN_API:
|
|
59
|
+
case backend_types_1.BackendTypes.OPEN_API:
|
|
70
60
|
console.log(`\x1b[31m===== Backend: OPENAPI\x1b[0m`);
|
|
71
61
|
break;
|
|
72
|
-
case BackendTypes.LOCAL:
|
|
62
|
+
case backend_types_1.BackendTypes.LOCAL:
|
|
73
63
|
console.log(`\x1b[31m===== Backend: LOCAL\x1b[0m`);
|
|
74
64
|
break;
|
|
75
|
-
case BackendTypes.NONE:
|
|
65
|
+
case backend_types_1.BackendTypes.NONE:
|
|
76
66
|
console.log(`\x1b[31m===== Backend: NONE\x1b[0m`);
|
|
77
67
|
break;
|
|
78
68
|
default:
|
|
79
69
|
throw new Error(`Unknown backend type: ${backend}`);
|
|
80
70
|
}
|
|
81
71
|
}
|
|
72
|
+
exports.PrintAngularOptions = PrintAngularOptions;
|
|
82
73
|
//# sourceMappingURL=angular-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/angular-options.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"angular-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/angular-options.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssertTableComponentExists = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
6
|
+
function AssertTableComponentExists(host, options) {
|
|
4
7
|
const { tableName, project, feature, directory, } = options;
|
|
5
|
-
if (!HasTableComponent(host, {
|
|
8
|
+
if (!(0, schematics_ts_morph_1.HasTableComponent)(host, {
|
|
6
9
|
project,
|
|
7
10
|
feature,
|
|
8
11
|
directory,
|
|
9
12
|
name: tableName,
|
|
10
13
|
})) {
|
|
11
|
-
throw new SchematicsException(`Could not find the table component '${tableName}' in the project '${project}' and feature '${feature}' and directory '${directory}'.`);
|
|
14
|
+
throw new schematics_1.SchematicsException(`Could not find the table component '${tableName}' in the project '${project}' and feature '${feature}' and directory '${directory}'.`);
|
|
12
15
|
}
|
|
13
16
|
}
|
|
17
|
+
exports.AssertTableComponentExists = AssertTableComponentExists;
|
|
14
18
|
//# sourceMappingURL=assert-table-component-exists.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-table-component-exists.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/assert-table-component-exists.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"assert-table-component-exists.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/assert-table-component-exists.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAA8D;AAS9D,SAAgB,0BAA0B,CAAC,IAAU,EAAE,OAA0C;IAC/F,MAAM,EACJ,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,GACV,GAAG,OAAO,CAAC;IACZ,IACE,CAAC,IAAA,uCAAiB,EAAC,IAAI,EAAE;QACvB,OAAO;QACP,OAAO;QACP,SAAS;QACT,IAAI,EAAE,SAAS;KAChB,CAAC,EACF;QACA,MAAM,IAAI,gCAAmB,CAC3B,uCAAwC,SAAU,qBAAsB,OAAQ,kBAAmB,OAAQ,oBAAqB,SAAU,IAAI,CAC/I,CAAC;KACH;AACH,CAAC;AAnBD,gEAmBC"}
|
package/src/lib/backend-types.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BackendTypes = void 0;
|
|
4
|
+
var BackendTypes;
|
|
2
5
|
(function (BackendTypes) {
|
|
3
6
|
BackendTypes["NONE"] = "none";
|
|
4
7
|
BackendTypes["NESTJS"] = "nestjs";
|
|
5
8
|
BackendTypes["OPEN_API"] = "open-api";
|
|
6
9
|
BackendTypes["LOCAL"] = "local";
|
|
7
|
-
})(BackendTypes || (BackendTypes = {}));
|
|
10
|
+
})(BackendTypes || (exports.BackendTypes = BackendTypes = {}));
|
|
8
11
|
//# sourceMappingURL=backend-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-types.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/backend-types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"backend-types.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/backend-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;AACjB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeDataGridItemList = exports.NormalizeDataGridItem = void 0;
|
|
4
|
+
function NormalizeDataGridItem(item) {
|
|
5
|
+
var _a, _b;
|
|
2
6
|
let name;
|
|
3
7
|
let type;
|
|
4
8
|
let header = null;
|
|
@@ -9,8 +13,8 @@ export function NormalizeDataGridItem(item) {
|
|
|
9
13
|
}
|
|
10
14
|
else {
|
|
11
15
|
name = item.name;
|
|
12
|
-
type = item.type
|
|
13
|
-
header = item.header
|
|
16
|
+
type = (_a = item.type) !== null && _a !== void 0 ? _a : 'unknown';
|
|
17
|
+
header = (_b = item.header) !== null && _b !== void 0 ? _b : null;
|
|
14
18
|
}
|
|
15
19
|
return Object.seal({
|
|
16
20
|
name,
|
|
@@ -18,7 +22,10 @@ export function NormalizeDataGridItem(item) {
|
|
|
18
22
|
header,
|
|
19
23
|
});
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
exports.NormalizeDataGridItem = NormalizeDataGridItem;
|
|
26
|
+
function NormalizeDataGridItemList(itemList) {
|
|
27
|
+
var _a;
|
|
28
|
+
return Object.seal((_a = itemList === null || itemList === void 0 ? void 0 : itemList.map(NormalizeDataGridItem)) !== null && _a !== void 0 ? _a : []);
|
|
23
29
|
}
|
|
30
|
+
exports.NormalizeDataGridItemList = NormalizeDataGridItemList;
|
|
24
31
|
//# sourceMappingURL=data-grid-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-item.ts"],"names":[],"mappings":"AAaA,
|
|
1
|
+
{"version":3,"file":"data-grid-item.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-item.ts"],"names":[],"mappings":";;;AAaA,SAAgB,qBAAqB,CAAC,IAAqC;;IACzE,IAAI,IAAY,CAAC;IACjB,IAAI,IAAY,CAAC;IACjB,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;KAClC;SAAM;QACL,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACjB,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,mCAAI,SAAS,CAAC;QAC9B,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,CAAC;KAC9B;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;QACjB,IAAI;QACJ,IAAI;QACJ,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAlBD,sDAkBC;AAED,SAAgB,yBAAyB,CACvC,QAAiD;;IAEjD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,CAAC,qBAAqB,CAAC,mCAAI,EAAE,CAAC,CAAC;AACjE,CAAC;AAJD,8DAIC"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeDataGridOptions = exports.DataGridMode = void 0;
|
|
4
|
+
const data_grid_item_1 = require("./data-grid-item");
|
|
5
|
+
var DataGridMode;
|
|
3
6
|
(function (DataGridMode) {
|
|
4
7
|
DataGridMode["Form"] = "form";
|
|
5
8
|
DataGridMode["Plain"] = "plain";
|
|
6
|
-
})(DataGridMode || (DataGridMode = {}));
|
|
9
|
+
})(DataGridMode || (exports.DataGridMode = DataGridMode = {}));
|
|
7
10
|
function IsDataGridMode(value) {
|
|
8
11
|
return Object.values(DataGridMode).includes(value);
|
|
9
12
|
}
|
|
10
|
-
|
|
13
|
+
function NormalizeDataGridOptions(options) {
|
|
14
|
+
var _a, _b;
|
|
11
15
|
const { itemList, mode, collection, } = options;
|
|
12
16
|
return Object.seal({
|
|
13
|
-
itemList: NormalizeDataGridItemList(itemList),
|
|
17
|
+
itemList: (0, data_grid_item_1.NormalizeDataGridItemList)(itemList),
|
|
14
18
|
mode: IsDataGridMode(mode) ? mode : DataGridMode.Plain,
|
|
15
|
-
collection: collection
|
|
16
|
-
title: options.title
|
|
17
|
-
subtitle: options.subtitle
|
|
19
|
+
collection: collection !== null && collection !== void 0 ? collection : false,
|
|
20
|
+
title: (_a = options.title) !== null && _a !== void 0 ? _a : null,
|
|
21
|
+
subtitle: (_b = options.subtitle) !== null && _b !== void 0 ? _b : null,
|
|
18
22
|
});
|
|
19
23
|
}
|
|
24
|
+
exports.NormalizeDataGridOptions = NormalizeDataGridOptions;
|
|
20
25
|
//# sourceMappingURL=data-grid-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-options.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"data-grid-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/data-grid-options.ts"],"names":[],"mappings":";;;AAAA,qDAI0B;AAG1B,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,SAAS,cAAc,CAAC,KAAU;IAChC,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAeD,SAAgB,wBAAwB,CAAC,OAAkC;;IACzE,MAAM,EACJ,QAAQ,EACR,IAAI,EACJ,UAAU,GACX,GAAG,OAAO,CAAC;IACZ,OAAO,MAAM,CAAC,IAAI,CAAC;QACjB,QAAQ,EAAE,IAAA,0CAAyB,EAAC,QAAQ,CAAC;QAC7C,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK;QACtD,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK;QAC/B,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI;QAC5B,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI;KACnC,CAAC,CAAC;AACL,CAAC;AAbD,4DAaC"}
|
package/src/lib/dialog-action.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeDialogActionList = exports.NormalizeDialogAction = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
function NormalizeDialogAction(action) {
|
|
6
|
+
var _a, _b;
|
|
3
7
|
let role;
|
|
4
8
|
let label = null;
|
|
5
9
|
let color = null;
|
|
@@ -10,17 +14,20 @@ export function NormalizeDialogAction(action) {
|
|
|
10
14
|
}
|
|
11
15
|
else {
|
|
12
16
|
role = action.role;
|
|
13
|
-
label = action.label
|
|
14
|
-
color = action.color
|
|
17
|
+
label = (_a = action.label) !== null && _a !== void 0 ? _a : label;
|
|
18
|
+
color = (_b = action.color) !== null && _b !== void 0 ? _b : color;
|
|
15
19
|
}
|
|
16
|
-
label
|
|
20
|
+
label !== null && label !== void 0 ? label : (label = (0, schematics_utilities_1.capitalize)(role));
|
|
17
21
|
return Object.seal({
|
|
18
22
|
role,
|
|
19
23
|
label,
|
|
20
24
|
color,
|
|
21
25
|
});
|
|
22
26
|
}
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
exports.NormalizeDialogAction = NormalizeDialogAction;
|
|
28
|
+
function NormalizeDialogActionList(actionList) {
|
|
29
|
+
var _a;
|
|
30
|
+
return Object.seal((_a = actionList === null || actionList === void 0 ? void 0 : actionList.map(NormalizeDialogAction)) !== null && _a !== void 0 ? _a : []);
|
|
25
31
|
}
|
|
32
|
+
exports.NormalizeDialogActionList = NormalizeDialogActionList;
|
|
26
33
|
//# sourceMappingURL=dialog-action.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-action.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/dialog-action.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"dialog-action.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/dialog-action.ts"],"names":[],"mappings":";;;AAIA,qEAAwD;AAUxD,SAAgB,qBAAqB,CACnC,MAA6B;;IAE7B,IAAI,IAAY,CAAC;IACjB,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;KAC9B;SAAM;QACL,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACnB,KAAK,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,KAAK,CAAC;QAC9B,KAAK,GAAG,MAAA,MAAM,CAAC,KAAK,mCAAI,KAAK,CAAC;KAC/B;IACD,KAAK,aAAL,KAAK,cAAL,KAAK,IAAL,KAAK,GAAK,IAAA,iCAAU,EAAC,IAAI,CAAC,EAAC;IAC3B,OAAO,MAAM,CAAC,IAAI,CAAC;QACjB,IAAI;QACJ,KAAK;QACL,KAAK;KACN,CAAC,CAAC;AACL,CAAC;AArBD,sDAqBC;AAED,SAAgB,yBAAyB,CACvC,UAAyC;;IAEzC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,qBAAqB,CAAC,mCAAI,EAAE,CAAC,CAAC;AACnE,CAAC;AAJD,8DAIC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeExistingMethod = void 0;
|
|
4
|
+
function NormalizeExistingMethod(existingMethod) {
|
|
2
5
|
if (!existingMethod || !existingMethod.className || !existingMethod.importPath) {
|
|
3
6
|
return null;
|
|
4
7
|
}
|
|
5
8
|
return existingMethod;
|
|
6
9
|
}
|
|
10
|
+
exports.NormalizeExistingMethod = NormalizeExistingMethod;
|
|
7
11
|
//# 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":"AAKA,
|
|
1
|
+
{"version":3,"file":"existing-method.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/existing-method.ts"],"names":[],"mappings":";;;AAKA,SAAgB,uBAAuB,CAAC,cAA+B;IACrE,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,SAAS,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;QAC9E,OAAO,IAAI,CAAC;KACb;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AALD,0DAKC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeFormComponentControlList = exports.NormalizeFormComponentControl = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
function NormalizeFormComponentControl(control) {
|
|
6
|
+
var _a, _b, _c, _d;
|
|
3
7
|
let name;
|
|
4
8
|
let type = 'unknown';
|
|
5
9
|
let isRequired = false;
|
|
@@ -20,20 +24,23 @@ export function NormalizeFormComponentControl(control) {
|
|
|
20
24
|
}
|
|
21
25
|
else {
|
|
22
26
|
name = control.name;
|
|
23
|
-
type = control.type
|
|
24
|
-
isRequired = control.isRequired
|
|
25
|
-
state = control.state
|
|
26
|
-
validatorList = control.validatorList
|
|
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;
|
|
27
31
|
}
|
|
28
32
|
return Object.seal({
|
|
29
|
-
name: camelize(name),
|
|
33
|
+
name: (0, schematics_utilities_1.camelize)(name),
|
|
30
34
|
type,
|
|
31
35
|
isRequired,
|
|
32
36
|
state,
|
|
33
37
|
validatorList,
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
exports.NormalizeFormComponentControl = NormalizeFormComponentControl;
|
|
41
|
+
function NormalizeFormComponentControlList(controlList) {
|
|
42
|
+
var _a;
|
|
43
|
+
return Object.seal((_a = controlList === null || controlList === void 0 ? void 0 : controlList.map(NormalizeFormComponentControl)) !== null && _a !== void 0 ? _a : []);
|
|
38
44
|
}
|
|
45
|
+
exports.NormalizeFormComponentControlList = NormalizeFormComponentControlList;
|
|
39
46
|
//# sourceMappingURL=form-component-control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-component-control.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/form-component-control.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"form-component-control.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/form-component-control.ts"],"names":[],"mappings":";;;AACA,qEAAsD;AActD,SAAgB,6BAA6B,CAC3C,OAAsC;;IAEtC,IAAI,IAAY,CAAC;IACjB,IAAI,IAAI,GAAG,SAAS,CAAC;IACrB,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAI,aAAa,GAAa,EAAE,CAAC;IACjC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,wCAAwC;QACxC,sEAAsE;QACtE,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;QAC5B,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;QACrC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;QAC9B,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YAChB,+CAA+C;YAC/C,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;SACrD;KACF;SAAM;QACL,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACpB,IAAI,GAAG,MAAA,OAAO,CAAC,IAAI,mCAAI,IAAI,CAAC;QAC5B,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,KAAK,CAAC;QACzC,KAAK,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,KAAK,CAAC;QAC/B,aAAa,GAAG,MAAA,OAAO,CAAC,aAAa,mCAAI,aAAa,CAAC;KACxD;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;QACjB,IAAI,EAAE,IAAA,+BAAQ,EAAC,IAAI,CAAC;QACpB,IAAI;QACJ,UAAU;QACV,KAAK;QACL,aAAa;KACd,CAAC,CAAC;AACL,CAAC;AAlCD,sEAkCC;AAED,SAAgB,iCAAiC,CAC/C,WAAkD;;IAElD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,CAAC,6BAA6B,CAAC,mCAAI,EAAE,CAAC,CAAC;AAC5E,CAAC;AAJD,8EAIC"}
|