@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,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTableActionList = exports.NormalizeTableAction = void 0;
|
|
4
|
+
const table_row_action_1 = require("./table-row-action");
|
|
5
|
+
function NormalizeTableAction(tableAction) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7
|
+
let type;
|
|
8
|
+
let checkFunction = undefined;
|
|
9
|
+
let tooltip = undefined;
|
|
10
|
+
let errorMessage = undefined;
|
|
11
|
+
let successMessage = undefined;
|
|
12
|
+
let refresh = false;
|
|
13
|
+
let confirm = false;
|
|
14
|
+
let priority = undefined;
|
|
15
|
+
let role;
|
|
16
|
+
let icon = null;
|
|
17
|
+
let svgIcon = null;
|
|
18
|
+
let permission = null;
|
|
19
|
+
let inHeader = false;
|
|
20
|
+
if (typeof tableAction === 'string') {
|
|
21
|
+
// type:role:modifier1,modifier2
|
|
22
|
+
// edit:form:refresh,confirm
|
|
23
|
+
const fragments = tableAction.split(':');
|
|
24
|
+
type = fragments[0];
|
|
25
|
+
role = fragments[1];
|
|
26
|
+
if (fragments[2]) {
|
|
27
|
+
const modifiers = fragments[2].split(/,(?![^(]*\))/g);
|
|
28
|
+
refresh = modifiers.includes('refresh');
|
|
29
|
+
confirm = modifiers.includes('confirm');
|
|
30
|
+
inHeader = modifiers.includes('header');
|
|
31
|
+
if (modifiers.some((m) => m.match(/icon\(.+\)/))) {
|
|
32
|
+
icon = modifiers
|
|
33
|
+
.find((m) => m.match(/icon\(.+\)/))
|
|
34
|
+
.replace(/^icon\(/, '')
|
|
35
|
+
.replace(/\)$/, '');
|
|
36
|
+
}
|
|
37
|
+
if (modifiers.some((m) => m.match(/svgIcon\(.+\)/))) {
|
|
38
|
+
svgIcon = modifiers
|
|
39
|
+
.find((m) => m.match(/svgIcon\(.+\)/))
|
|
40
|
+
.replace(/^svgIcon\(/, '')
|
|
41
|
+
.replace(/\)$/, '');
|
|
42
|
+
}
|
|
43
|
+
if (modifiers.some((m) => m.match(/permission\(.+\)/))) {
|
|
44
|
+
permission = modifiers
|
|
45
|
+
.find((m) => m.match(/permission\(.+\)/))
|
|
46
|
+
.replace(/^permission\(/, '')
|
|
47
|
+
.replace(/\)$/, '');
|
|
48
|
+
}
|
|
49
|
+
if (modifiers.some((m) => m.match(/checkFunction\(.+\)/))) {
|
|
50
|
+
checkFunction = modifiers
|
|
51
|
+
.find((m) => m.match(/checkFunction\(.+\)/))
|
|
52
|
+
.replace(/^checkFunction\(/, '')
|
|
53
|
+
.replace(/\)$/, '');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
type = tableAction.type;
|
|
59
|
+
checkFunction = (_a = tableAction.checkFunction) !== null && _a !== void 0 ? _a : checkFunction;
|
|
60
|
+
tooltip = (_b = tableAction.tooltip) !== null && _b !== void 0 ? _b : tooltip;
|
|
61
|
+
errorMessage = (_c = tableAction.errorMessage) !== null && _c !== void 0 ? _c : errorMessage;
|
|
62
|
+
successMessage = (_d = tableAction.successMessage) !== null && _d !== void 0 ? _d : successMessage;
|
|
63
|
+
refresh = (_e = tableAction.refresh) !== null && _e !== void 0 ? _e : refresh;
|
|
64
|
+
confirm = (_f = tableAction.confirm) !== null && _f !== void 0 ? _f : confirm;
|
|
65
|
+
priority = (_g = tableAction.priority) !== null && _g !== void 0 ? _g : priority;
|
|
66
|
+
role = tableAction.role;
|
|
67
|
+
inHeader = (_h = tableAction.inHeader) !== null && _h !== void 0 ? _h : inHeader;
|
|
68
|
+
icon = (_j = tableAction.icon) !== null && _j !== void 0 ? _j : icon;
|
|
69
|
+
svgIcon = (_k = tableAction.svgIcon) !== null && _k !== void 0 ? _k : svgIcon;
|
|
70
|
+
permission = (_l = tableAction.permission) !== null && _l !== void 0 ? _l : permission;
|
|
71
|
+
}
|
|
72
|
+
return Object.seal(Object.assign(Object.assign({}, (0, table_row_action_1.NormalizeTableRowAction)({
|
|
73
|
+
type,
|
|
74
|
+
checkFunction,
|
|
75
|
+
tooltip,
|
|
76
|
+
errorMessage,
|
|
77
|
+
successMessage,
|
|
78
|
+
refresh,
|
|
79
|
+
confirm,
|
|
80
|
+
priority,
|
|
81
|
+
inHeader,
|
|
82
|
+
})), { role,
|
|
83
|
+
icon,
|
|
84
|
+
svgIcon,
|
|
85
|
+
permission }));
|
|
86
|
+
}
|
|
87
|
+
exports.NormalizeTableAction = NormalizeTableAction;
|
|
88
|
+
function NormalizeTableActionList(tableActionList) {
|
|
89
|
+
var _a;
|
|
90
|
+
return Object.seal((_a = tableActionList === null || tableActionList === void 0 ? void 0 : tableActionList.map(NormalizeTableAction)) !== null && _a !== void 0 ? _a : []);
|
|
91
|
+
}
|
|
92
|
+
exports.NormalizeTableActionList = NormalizeTableActionList;
|
|
93
|
+
//# sourceMappingURL=table-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-action.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-action.ts"],"names":[],"mappings":";;;AACA,yDAG4B;AAW5B,SAAgB,oBAAoB,CAClC,WAA2C;;IAE3C,IAAI,IAAY,CAAC;IACjB,IAAI,aAAa,GAAuB,SAAS,CAAC;IAClD,IAAI,OAAO,GAAuB,SAAS,CAAC;IAC5C,IAAI,YAAY,GAAuB,SAAS,CAAC;IACjD,IAAI,cAAc,GAAuB,SAAS,CAAC;IACnD,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,QAAQ,GAAuB,SAAS,CAAC;IAC7C,IAAI,IAAY,CAAC;IACjB,IAAI,IAAI,GAAkB,IAAI,CAAC;IAC/B,IAAI,OAAO,GAAkB,IAAI,CAAC;IAClC,IAAI,UAAU,GAAkB,IAAI,CAAC;IACrC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,gCAAgC;QAChC,4BAA4B;QAC5B,MAAM,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;YAChB,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;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;KACT,CAAC,KACF,IAAI;QACJ,IAAI;QACJ,OAAO;QACP,UAAU,IACV,CAAC;AACL,CAAC;AApFD,oDAoFC;AAED,SAAgB,wBAAwB,CACtC,eAAuD;;IAEvD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,GAAG,CAAC,oBAAoB,CAAC,mCAAI,EAAE,CAAC,CAAC;AACvE,CAAC;AAJD,4DAIC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Normalized } from '@rxap/utilities';
|
|
2
|
+
export interface TableColumn {
|
|
3
|
+
name: string;
|
|
4
|
+
type?: string;
|
|
5
|
+
modifiers?: string[];
|
|
6
|
+
hasFilter?: boolean;
|
|
7
|
+
title?: string;
|
|
8
|
+
propertyPath?: string;
|
|
9
|
+
hidden?: boolean;
|
|
10
|
+
active?: boolean;
|
|
11
|
+
inactive?: boolean;
|
|
12
|
+
show?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface NormalizedTableColumn extends Readonly<Normalized<TableColumn>> {
|
|
15
|
+
type: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function NormalizeTableColumn(column: Readonly<TableColumn> | string): NormalizedTableColumn;
|
|
18
|
+
export declare function NormalizeTableColumnList(columnList?: ReadonlyArray<string | Readonly<TableColumn>>): Array<NormalizedTableColumn>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTableColumnList = exports.NormalizeTableColumn = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
function NormalizeTableColumn(column) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
7
|
+
let name;
|
|
8
|
+
let type = 'unknown';
|
|
9
|
+
let modifiers = [];
|
|
10
|
+
let hasFilter = false;
|
|
11
|
+
let title = null;
|
|
12
|
+
let propertyPath = null;
|
|
13
|
+
let hidden = false;
|
|
14
|
+
let active = false;
|
|
15
|
+
let inactive = false;
|
|
16
|
+
let show = false;
|
|
17
|
+
if (typeof column === 'string') {
|
|
18
|
+
// name:type:modifier1,modifier2
|
|
19
|
+
// username:string:filter,active
|
|
20
|
+
const fragments = column.split(':');
|
|
21
|
+
name = fragments[0];
|
|
22
|
+
type = fragments[1] || type; // convert an empty string to undefined
|
|
23
|
+
if (fragments[2]) {
|
|
24
|
+
modifiers = fragments[2].split(/,(?![^(]*\))/g);
|
|
25
|
+
}
|
|
26
|
+
propertyPath = fragments[3] || propertyPath;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
name = column.name;
|
|
30
|
+
type = (_a = column.type) !== null && _a !== void 0 ? _a : type;
|
|
31
|
+
modifiers = (_b = column.modifiers) !== null && _b !== void 0 ? _b : [];
|
|
32
|
+
hasFilter = (_c = column.hasFilter) !== null && _c !== void 0 ? _c : false;
|
|
33
|
+
title = (_d = column.title) !== null && _d !== void 0 ? _d : title;
|
|
34
|
+
propertyPath = (_e = column.propertyPath) !== null && _e !== void 0 ? _e : propertyPath;
|
|
35
|
+
hidden = (_f = column.hidden) !== null && _f !== void 0 ? _f : false;
|
|
36
|
+
active = (_g = column.active) !== null && _g !== void 0 ? _g : false;
|
|
37
|
+
inactive = (_h = column.inactive) !== null && _h !== void 0 ? _h : false;
|
|
38
|
+
show = (_j = column.show) !== null && _j !== void 0 ? _j : false;
|
|
39
|
+
}
|
|
40
|
+
propertyPath !== null && propertyPath !== void 0 ? propertyPath : (propertyPath = name
|
|
41
|
+
.split('.')
|
|
42
|
+
.map((part) => (0, schematics_utilities_1.camelize)(part))
|
|
43
|
+
.join('.'));
|
|
44
|
+
title !== null && title !== void 0 ? title : (title = (0, schematics_utilities_1.dasherize)(name)
|
|
45
|
+
.split('-')
|
|
46
|
+
.map((part) => (0, schematics_utilities_1.capitalize)(part))
|
|
47
|
+
.join(' '));
|
|
48
|
+
hasFilter = modifiers.includes('filter') || hasFilter;
|
|
49
|
+
active = modifiers.includes('active') || active;
|
|
50
|
+
inactive = modifiers.includes('inactive') || inactive;
|
|
51
|
+
show = modifiers.includes('show') || show;
|
|
52
|
+
hidden = modifiers.includes('hidden') || hidden;
|
|
53
|
+
type !== null && type !== void 0 ? type : (type = 'unknown');
|
|
54
|
+
return Object.seal({
|
|
55
|
+
name,
|
|
56
|
+
type,
|
|
57
|
+
modifiers,
|
|
58
|
+
hasFilter,
|
|
59
|
+
title,
|
|
60
|
+
propertyPath,
|
|
61
|
+
hidden,
|
|
62
|
+
active,
|
|
63
|
+
inactive,
|
|
64
|
+
show,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
exports.NormalizeTableColumn = NormalizeTableColumn;
|
|
68
|
+
function NormalizeTableColumnList(columnList) {
|
|
69
|
+
var _a;
|
|
70
|
+
return Object.seal((_a = columnList === null || columnList === void 0 ? void 0 : columnList.map(NormalizeTableColumn)) !== null && _a !== void 0 ? _a : []);
|
|
71
|
+
}
|
|
72
|
+
exports.NormalizeTableColumnList = NormalizeTableColumnList;
|
|
73
|
+
//# sourceMappingURL=table-column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-column.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-column.ts"],"names":[],"mappings":";;;AACA,qEAIoC;AAmBpC,SAAgB,oBAAoB,CAClC,MAAsC;;IAEtC,IAAI,IAAY,CAAC;IACjB,IAAI,IAAI,GAAG,SAAS,CAAC;IACrB,IAAI,SAAS,GAAa,EAAE,CAAC;IAC7B,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAI,YAAY,GAAkB,IAAI,CAAC;IACvC,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,IAAI,GAAG,K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string;
|
|
4
|
+
permission?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
svgIcon?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function NormalizeTableHeaderButton(tableHeaderButton: Readonly<TableHeaderButton> | string | undefined, name: string): Readonly<Normalized<TableHeaderButton>> | null;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTableHeaderButton = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
function NormalizeTableHeaderButton(tableHeaderButton, name) {
|
|
6
|
+
var _a, _b, _c, _d, _e;
|
|
7
|
+
if (!tableHeaderButton) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
let role = null;
|
|
11
|
+
let icon = null;
|
|
12
|
+
let svgIcon = null;
|
|
13
|
+
let permission = null;
|
|
14
|
+
let label = null;
|
|
15
|
+
if (typeof tableHeaderButton === 'string') {
|
|
16
|
+
// role:modifier1,modifier2
|
|
17
|
+
// create:icon(add),permission(create)
|
|
18
|
+
const fragments = tableHeaderButton.split(':');
|
|
19
|
+
role = fragments[0];
|
|
20
|
+
if (fragments[1]) {
|
|
21
|
+
const modifiers = fragments[1].split(/,(?![^(]*\))/g);
|
|
22
|
+
if (modifiers.some((m) => m.match(/icon\(.+\)/))) {
|
|
23
|
+
icon = modifiers
|
|
24
|
+
.find((m) => m.match(/icon\(.+\)/))
|
|
25
|
+
.replace(/^icon\(/, '')
|
|
26
|
+
.replace(/\)$/, '');
|
|
27
|
+
}
|
|
28
|
+
if (modifiers.some((m) => m.match(/svgIcon\(.+\)/))) {
|
|
29
|
+
svgIcon = modifiers
|
|
30
|
+
.find((m) => m.match(/svgIcon\(.+\)/))
|
|
31
|
+
.replace(/^svgIcon\(/, '')
|
|
32
|
+
.replace(/\)$/, '');
|
|
33
|
+
}
|
|
34
|
+
if (modifiers.some((m) => m.match(/permission\(.+\)/))) {
|
|
35
|
+
permission = modifiers
|
|
36
|
+
.find((m) => m.match(/permission\(.+\)/))
|
|
37
|
+
.replace(/^permission\(/, '')
|
|
38
|
+
.replace(/\)$/, '');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (tableHeaderButton) {
|
|
43
|
+
role = (_a = tableHeaderButton.role) !== null && _a !== void 0 ? _a : role;
|
|
44
|
+
icon = (_b = tableHeaderButton.icon) !== null && _b !== void 0 ? _b : icon;
|
|
45
|
+
svgIcon = (_c = tableHeaderButton.svgIcon) !== null && _c !== void 0 ? _c : svgIcon;
|
|
46
|
+
permission = (_d = tableHeaderButton.permission) !== null && _d !== void 0 ? _d : permission;
|
|
47
|
+
label = (_e = tableHeaderButton.label) !== null && _e !== void 0 ? _e : label;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
role,
|
|
51
|
+
icon,
|
|
52
|
+
svgIcon,
|
|
53
|
+
permission,
|
|
54
|
+
label: label || ((role === 'form' ? 'Create ' : '') + (0, schematics_utilities_1.capitalize)(name)),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
exports.NormalizeTableHeaderButton = NormalizeTableHeaderButton;
|
|
58
|
+
//# sourceMappingURL=table-header-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-header-button.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-header-button.ts"],"names":[],"mappings":";;;AACA,qEAAwD;AAUxD,SAAgB,0BAA0B,CACxC,iBAAmE,EACnE,IAAY;;IAEZ,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,IAAI,GAAkB,IAAI,CAAC;IAC/B,IAAI,IAAI,GAAkB,IAAI,CAAC;IAC/B,IAAI,OAAO,GAAkB,IAAI,CAAC;IAClC,IAAI,UAAU,GAAkB,IAAI,CAAC;IACrC,IAAI,KAAK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qBACzC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;qBAC5B,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;aACvB;SACF;KACF;SAAM,IAAI,iBAAiB,EAAE;QAC5B,IAAI,GAAG,MAAA,iBAAiB,CAAC,IAAI,mCAAI,IAAI,CAAC;QACtC,IAAI,GAAG,MAAA,iBAAiB,CAAC,IAAI,mCAAI,IAAI,CAAC;QACtC,OAAO,GAAG,MAAA,iBAAiB,CAAC,OAAO,mCAAI,OAAO,CAAC;QAC/C,UAAU,GAAG,MAAA,iBAAiB,CAAC,UAAU,mCAAI,UAAU,CAAC;QACxD,KAAK,GAAG,MAAA,iBAAiB,CAAC,KAAK,mCAAI,KAAK,CAAC;KAC1C;IACD,OAAO;QACL,IAAI;QACJ,IAAI;QACJ,OAAO;QACP,UAAU;QACV,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAA,iCAAU,EAAC,IAAI,CAAC,CAAC;KACxE,CAAC;AACJ,CAAC;AApDD,gEAoDC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NormalizedTableColumn } from './table-column';
|
|
2
|
+
import { NormalizedTableAction } from './table-action';
|
|
3
|
+
import { Normalized } from '@rxap/utilities';
|
|
4
|
+
import { MinimumTableOptions, NormalizedMinimumTableOptions } from './minimum-table-options';
|
|
5
|
+
import { ExistingMethod } from './existing-method';
|
|
6
|
+
export interface TableOptions extends MinimumTableOptions {
|
|
7
|
+
selectColumn?: boolean;
|
|
8
|
+
tableMethod?: ExistingMethod;
|
|
9
|
+
}
|
|
10
|
+
export interface NormalizedTableOptions extends Readonly<Normalized<TableOptions>>, NormalizedMinimumTableOptions {
|
|
11
|
+
componentName: string;
|
|
12
|
+
columnList: NormalizedTableColumn[];
|
|
13
|
+
actionList: NormalizedTableAction[];
|
|
14
|
+
}
|
|
15
|
+
export declare function NormalizeTableOptions(options: Readonly<TableOptions>, name: string): NormalizedTableOptions;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTableOptions = void 0;
|
|
4
|
+
const minimum_table_options_1 = require("./minimum-table-options");
|
|
5
|
+
const existing_method_1 = require("./existing-method");
|
|
6
|
+
function NormalizeTableOptions(options, name) {
|
|
7
|
+
var _a;
|
|
8
|
+
const normalizedOptions = (0, minimum_table_options_1.NormalizeMinimumTableOptions)(options, name);
|
|
9
|
+
const { actionList } = normalizedOptions;
|
|
10
|
+
const selectColumn = ((_a = options.selectColumn) !== null && _a !== void 0 ? _a : false) || actionList.some(action => action.inHeader);
|
|
11
|
+
const tableMethod = (0, existing_method_1.NormalizeExistingMethod)(options.tableMethod);
|
|
12
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedOptions), { selectColumn,
|
|
13
|
+
tableMethod }));
|
|
14
|
+
}
|
|
15
|
+
exports.NormalizeTableOptions = NormalizeTableOptions;
|
|
16
|
+
//# sourceMappingURL=table-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-options.ts"],"names":[],"mappings":";;;AAGA,mEAIiC;AACjC,uDAG2B;AAa3B,SAAgB,qBAAqB,CAAC,OAA+B,EAAE,IAAY;;IACjF,MAAM,iBAAiB,GAAG,IAAA,oDAA4B,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACtE,MAAM,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC;IACzC,MAAM,YAAY,GAAG,CAAC,MAAA,OAAO,CAAC,YAAY,mCAAI,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnG,MAAM,WAAW,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACjE,OAAO,MAAM,CAAC,IAAI,iCACb,iBAAiB,KACpB,YAAY;QACZ,WAAW,IACX,CAAC;AACL,CAAC;AAVD,sDAUC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Normalized } from '@rxap/utilities';
|
|
2
|
+
export interface TableRowAction {
|
|
3
|
+
type: string;
|
|
4
|
+
refresh?: boolean;
|
|
5
|
+
confirm?: boolean;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
errorMessage?: string;
|
|
8
|
+
successMessage?: string;
|
|
9
|
+
priority?: number;
|
|
10
|
+
checkFunction?: string;
|
|
11
|
+
inHeader?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type NormalizedTableRowAction = Readonly<Normalized<TableRowAction>>;
|
|
14
|
+
export declare function NormalizeTableRowAction(tableAction: Readonly<TableRowAction>): NormalizedTableRowAction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTableRowAction = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const to_title_1 = require("./to-title");
|
|
6
|
+
function NormalizeTableRowAction(tableAction) {
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
8
|
+
return Object.seal({
|
|
9
|
+
type: (0, schematics_utilities_1.dasherize)(tableAction.type),
|
|
10
|
+
tooltip: (_a = tableAction.tooltip) !== null && _a !== void 0 ? _a : (0, to_title_1.ToTitle)(tableAction.type),
|
|
11
|
+
errorMessage: (_b = tableAction.errorMessage) !== null && _b !== void 0 ? _b : null,
|
|
12
|
+
successMessage: (_c = tableAction.successMessage) !== null && _c !== void 0 ? _c : null,
|
|
13
|
+
checkFunction: (_d = tableAction.checkFunction) !== null && _d !== void 0 ? _d : null,
|
|
14
|
+
refresh: (_e = tableAction.refresh) !== null && _e !== void 0 ? _e : false,
|
|
15
|
+
confirm: (_f = tableAction.confirm) !== null && _f !== void 0 ? _f : false,
|
|
16
|
+
priority: (_g = tableAction.priority) !== null && _g !== void 0 ? _g : 0,
|
|
17
|
+
inHeader: (_h = tableAction.inHeader) !== null && _h !== void 0 ? _h : false,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.NormalizeTableRowAction = NormalizeTableRowAction;
|
|
21
|
+
//# sourceMappingURL=table-row-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-row-action.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-row-action.ts"],"names":[],"mappings":";;;AAAA,qEAAuD;AACvD,yCAAqC;AAiBrC,SAAgB,uBAAuB,CACrC,WAAqC;;IAErC,OAAO,MAAM,CAAC,IAAI,CAAC;QACjB,IAAI,EAAE,IAAA,gCAAS,EAAC,WAAW,CAAC,IAAI,CAAC;QACjC,OAAO,EAAE,MAAA,WAAW,CAAC,OAAO,mCAAI,IAAA,kBAAO,EAAC,WAAW,CAAC,IAAI,CAAC;QACzD,YAAY,EAAE,MAAA,WAAW,CAAC,YAAY,mCAAI,IAAI;QAC9C,cAAc,EAAE,MAAA,WAAW,CAAC,cAAc,mCAAI,IAAI;QAClD,aAAa,EAAE,MAAA,WAAW,CAAC,aAAa,mCAAI,IAAI;QAChD,OAAO,EAAE,MAAA,WAAW,CAAC,OAAO,mCAAI,KAAK;QACrC,OAAO,EAAE,MAAA,WAAW,CAAC,OAAO,mCAAI,KAAK;QACrC,QAAQ,EAAE,MAAA,WAAW,CAAC,QAAQ,mCAAI,CAAC;QACnC,QAAQ,EAAE,MAAA,WAAW,CAAC,QAAQ,mCAAI,KAAK;KACxC,CAAC,CAAC;AACL,CAAC;AAdD,0DAcC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ToTitle(str: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToTitle = void 0;
|
|
4
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
function ToTitle(str) {
|
|
6
|
+
return (0, schematics_utilities_1.dasherize)(str)
|
|
7
|
+
.split('-')
|
|
8
|
+
.map((part) => (0, schematics_utilities_1.capitalize)(part))
|
|
9
|
+
.join(' ');
|
|
10
|
+
}
|
|
11
|
+
exports.ToTitle = ToTitle;
|
|
12
|
+
//# sourceMappingURL=to-title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-title.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/to-title.ts"],"names":[],"mappings":";;;AAAA,qEAGoC;AAEpC,SAAgB,OAAO,CAAC,GAAW;IACjC,OAAO,IAAA,gCAAS,EAAC,GAAG,CAAC;SAClB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,iCAAU,EAAC,IAAI,CAAC,CAAC;SAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;AALD,0BAKC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NormalizedTableColumn } from './table-column';
|
|
2
|
+
import { NormalizedTableAction } from './table-action';
|
|
3
|
+
import { Normalized } from '@rxap/utilities';
|
|
4
|
+
import { MinimumTableOptions, NormalizedMinimumTableOptions } from './minimum-table-options';
|
|
5
|
+
import { ExistingMethod } from './existing-method';
|
|
6
|
+
export interface TreeTableOptions extends MinimumTableOptions {
|
|
7
|
+
tableRootMethod?: ExistingMethod;
|
|
8
|
+
tableChildMethod?: ExistingMethod;
|
|
9
|
+
}
|
|
10
|
+
export interface NormalizedTreeTableOptions extends Readonly<Normalized<TreeTableOptions>>, NormalizedMinimumTableOptions {
|
|
11
|
+
componentName: string;
|
|
12
|
+
columnList: NormalizedTableColumn[];
|
|
13
|
+
actionList: NormalizedTableAction[];
|
|
14
|
+
}
|
|
15
|
+
export declare function NormalizeTreeTableOptions(options: Readonly<TreeTableOptions>, name: string): NormalizedTreeTableOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NormalizeTreeTableOptions = void 0;
|
|
4
|
+
const minimum_table_options_1 = require("./minimum-table-options");
|
|
5
|
+
const existing_method_1 = require("./existing-method");
|
|
6
|
+
function NormalizeTreeTableOptions(options, name) {
|
|
7
|
+
var _a;
|
|
8
|
+
const normalizedOptions = (0, minimum_table_options_1.NormalizeMinimumTableOptions)(options, name);
|
|
9
|
+
const tableRootMethod = (0, existing_method_1.NormalizeExistingMethod)(options.tableRootMethod);
|
|
10
|
+
const tableChildMethod = (_a = (0, existing_method_1.NormalizeExistingMethod)(options.tableRootMethod)) !== null && _a !== void 0 ? _a : tableRootMethod;
|
|
11
|
+
return Object.seal(Object.assign(Object.assign({}, normalizedOptions), { tableRootMethod,
|
|
12
|
+
tableChildMethod }));
|
|
13
|
+
}
|
|
14
|
+
exports.NormalizeTreeTableOptions = NormalizeTreeTableOptions;
|
|
15
|
+
//# sourceMappingURL=tree-table-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-table-options.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/tree-table-options.ts"],"names":[],"mappings":";;;AAGA,mEAIiC;AACjC,uDAG2B;AAc3B,SAAgB,yBAAyB,CACvC,OAAmC,EACnC,IAAY;;IAEZ,MAAM,iBAAiB,GAAG,IAAA,oDAA4B,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACtE,MAAM,eAAe,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACzE,MAAM,gBAAgB,GAAG,MAAA,IAAA,yCAAuB,EAAC,OAAO,CAAC,eAAe,CAAC,mCAAI,eAAe,CAAC;IAC7F,OAAO,MAAM,CAAC,IAAI,iCACb,iBAAiB,KACpB,eAAe;QACf,gBAAgB,IAChB,CAAC;AACL,CAAC;AAZD,8DAYC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<ng-template #errorTemplate let-error let-refresh="refresh">
|
|
2
|
+
<rxap-data-source-error [error]="error" [refresh]="refresh"></rxap-data-source-error>
|
|
3
|
+
</ng-template>
|
|
4
|
+
<div *rxapDataSource="let accordion from accordionDataSource; errorTemplate: errorTemplate" class="flex flex-col gap-y-6">
|
|
5
|
+
<<%= prefix %>-accordion-header [data]="accordion"></<%= prefix %>-accordion-header>
|
|
6
|
+
<ng-template #divider>
|
|
7
|
+
<mat-divider></mat-divider>
|
|
8
|
+
</ng-template>
|
|
9
|
+
<mat-progress-bar *ngIf="accordionDataSource.loading$ | async; else divider" mode="indeterminate"></mat-progress-bar>
|
|
10
|
+
<mat-accordion [rxapPersistentAccordion]="accordionDataSource.lastUuid" <% if (multiple) { %>multi<% } %>>
|
|
11
|
+
<% for (let index = 0; index < itemList.length; index++) { %>
|
|
12
|
+
<% item = itemList[index] %>
|
|
13
|
+
<mat-expansion-panel>
|
|
14
|
+
|
|
15
|
+
<mat-expansion-panel-header>
|
|
16
|
+
<mat-panel-title i18n><%= classify(item.name) %></mat-panel-title>
|
|
17
|
+
<% if (item.description) { %>
|
|
18
|
+
<mat-panel-description i18n><%= item.description %></mat-panel-description>
|
|
19
|
+
<% } %>
|
|
20
|
+
</mat-expansion-panel-header>
|
|
21
|
+
|
|
22
|
+
<ng-template matExpansionPanelContent>
|
|
23
|
+
<<%= prefix %>-<%= item.name %>-panel></<%= prefix %>-<%= item.name %>-panel>
|
|
24
|
+
</ng-template>
|
|
25
|
+
|
|
26
|
+
</mat-expansion-panel>
|
|
27
|
+
<% } %>
|
|
28
|
+
<!-- NEXT_INDEX[<%= itemList.length %>] -->
|
|
29
|
+
</mat-accordion>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { <%= classify(name) %>DataSource } from './<%= name %>.data-source';
|
|
3
|
+
import { ACCORDION_DATA_SOURCE } from '@rxap/data-source/accordion';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
<% for (const item of itemList) { %>
|
|
6
|
+
import { <%= classify(item.name) %>PanelComponent } from './<%= item.name %>-panel/<%= item.name %>-panel.component';
|
|
7
|
+
<% } %>
|
|
8
|
+
import { DataSourceDirective } from '@rxap/data-source/directive';
|
|
9
|
+
import { NavigateBackButtonComponent } from '@rxap/components';
|
|
10
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
11
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
12
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
13
|
+
import { PersistentAccordionDirective } from '@rxap/material-directives/expansion';
|
|
14
|
+
import { DataSourceErrorComponent } from '@rxap/data-source';
|
|
15
|
+
import { AccordionHeaderComponent } from './accordion-header/accordion-header.component';
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: '<%= prefix %>-<%= componentName %>',
|
|
20
|
+
templateUrl: './<%= componentName %>.component.html',
|
|
21
|
+
styleUrls: [ './<%= componentName %>.component.scss' ],
|
|
22
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [
|
|
25
|
+
<% for (const item of itemList) { %>
|
|
26
|
+
<%= classify(item.name) %>PanelComponent,
|
|
27
|
+
<% } %>
|
|
28
|
+
DataSourceErrorComponent,
|
|
29
|
+
DataSourceDirective,
|
|
30
|
+
NavigateBackButtonComponent,
|
|
31
|
+
MatProgressBarModule,
|
|
32
|
+
MatDividerModule,
|
|
33
|
+
MatExpansionModule,
|
|
34
|
+
PersistentAccordionDirective,
|
|
35
|
+
CommonModule,
|
|
36
|
+
AccordionHeaderComponent,
|
|
37
|
+
],
|
|
38
|
+
providers: [
|
|
39
|
+
<%= classify(name) %>DataSource,
|
|
40
|
+
{
|
|
41
|
+
provide: ACCORDION_DATA_SOURCE,
|
|
42
|
+
useExisting: <%= classify(name) %>DataSource
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
})
|
|
46
|
+
export class <%= classify(componentName) %>Component {
|
|
47
|
+
|
|
48
|
+
constructor(
|
|
49
|
+
public readonly accordionDataSource: <%= classify(name) %>DataSource,
|
|
50
|
+
) {}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default <%= classify(componentName) %>Component
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import { NavigateBackButtonComponent } from '@rxap/components';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: '<%= prefix %>-accordion-header',
|
|
6
|
+
templateUrl: './accordion-header.component.html',
|
|
7
|
+
styleUrls: [ './accordion-header.component.scss' ],
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [
|
|
11
|
+
NavigateBackButtonComponent,
|
|
12
|
+
],
|
|
13
|
+
})
|
|
14
|
+
export class AccordionHeaderComponent {}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { Normalized } from '@rxap/utilities';
|
|
3
|
+
import { NormalizedAngularOptions } from '../../../lib/angular-options';
|
|
4
|
+
import { AccordionComponentOptions } from './schema';
|
|
5
|
+
export interface NormalizedAccordionComponentOptions extends Readonly<Normalized<AccordionComponentOptions> & NormalizedAngularOptions> {
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export default function (options: AccordionComponentOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
|