@rxap/schematic-angular 18.0.3-dev.1 → 18.1.0-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 +16 -0
- package/package.json +10 -9
- package/src/lib/coerce-minimum-table-component.js +9 -2
- package/src/lib/coerce-minimum-table-component.js.map +1 -1
- package/src/lib/form/control/form-control.d.ts +1 -0
- package/src/lib/form/control/form-control.js +6 -1
- package/src/lib/form/control/form-control.js.map +1 -1
- package/src/lib/form/form-component.d.ts +15 -0
- package/src/lib/form/form-component.js +12 -0
- package/src/lib/form/form-component.js.map +1 -0
- package/src/lib/form/form-definition.d.ts +8 -0
- package/src/lib/form/form-definition.js +11 -0
- package/src/lib/form/form-definition.js.map +1 -0
- package/src/lib/mat-form-field-default-options.d.ts +8 -2
- package/src/lib/mat-form-field-default-options.js +8 -1
- package/src/lib/mat-form-field-default-options.js.map +1 -1
- package/src/lib/minimum-table-component-options.js +28 -35
- package/src/lib/minimum-table-component-options.js.map +1 -1
- package/src/lib/minimum-table-options.d.ts +6 -3
- package/src/lib/minimum-table-options.js +4 -1
- package/src/lib/minimum-table-options.js.map +1 -1
- package/src/lib/table/action/base-table-action.d.ts +25 -0
- package/src/lib/table/action/base-table-action.js +32 -0
- package/src/lib/table/action/base-table-action.js.map +1 -0
- package/src/lib/table/action/dialog-table-action.d.ts +15 -0
- package/src/lib/table/action/dialog-table-action.js +23 -0
- package/src/lib/table/action/dialog-table-action.js.map +1 -0
- package/src/lib/table/action/form-table-action.d.ts +19 -0
- package/src/lib/table/action/form-table-action.js +26 -0
- package/src/lib/table/action/form-table-action.js.map +1 -0
- package/src/lib/table/action/navigation-table-action.d.ts +12 -0
- package/src/lib/table/action/navigation-table-action.js +14 -0
- package/src/lib/table/action/navigation-table-action.js.map +1 -0
- package/src/lib/table/action/open-api-table-action.d.ts +16 -0
- package/src/lib/table/action/open-api-table-action.js +14 -0
- package/src/lib/table/action/open-api-table-action.js.map +1 -0
- package/src/lib/table/action/operation-table-action.d.ts +8 -0
- package/src/lib/table/action/operation-table-action.js +10 -0
- package/src/lib/table/action/operation-table-action.js.map +1 -0
- package/src/lib/table/table-action-kind.d.ts +9 -0
- package/src/lib/table/table-action-kind.js +17 -0
- package/src/lib/table/table-action-kind.js.map +1 -0
- package/src/lib/table/table-action.d.ts +11 -0
- package/src/lib/table/table-action.js +35 -0
- package/src/lib/table/table-action.js.map +1 -0
- package/src/lib/table/table-filter-column-rule.js +9 -5
- package/src/lib/table/table-filter-column-rule.js.map +1 -1
- package/src/lib/table-options.d.ts +5 -9
- package/src/lib/table-options.js.map +1 -1
- package/src/lib/tree-table-options.d.ts +5 -10
- package/src/lib/tree-table-options.js.map +1 -1
- package/src/lib/use-pick-from-table-interface-as-form-type.d.ts +3 -1
- package/src/lib/use-pick-from-table-interface-as-form-type.js +19 -5
- package/src/lib/use-pick-from-table-interface-as-form-type.js.map +1 -1
- package/src/schema.json +201 -62
- package/src/schematics/accordion/accordion-component/index.js +5 -2
- package/src/schematics/accordion/accordion-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-component/schema.json +380 -48
- package/src/schematics/accordion/accordion-item-component/index.js +7 -4
- package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
- package/src/schematics/accordion/accordion-item-component/schema.json +380 -48
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +2 -1
- package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
- package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +380 -48
- package/src/schematics/accordion/item/accordion-item-table-component/schema.json +534 -48
- package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +3 -1
- 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.json +534 -48
- package/src/schematics/base-table-action.schema.json +62 -0
- package/src/schematics/data-grid-component/index.js +4 -2
- package/src/schematics/data-grid-component/index.js.map +1 -1
- package/src/schematics/dialog-table-action.schema.json +65 -0
- package/src/schematics/form/control/autocomplete-table-select-form-control/index.js +7 -4
- package/src/schematics/form/control/autocomplete-table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/select-form-control/index.js +2 -1
- package/src/schematics/form/control/select-form-control/index.js.map +1 -1
- package/src/schematics/form/control/table-select-form-control/index.js +5 -3
- package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
- package/src/schematics/form/form-component/index.d.ts +2 -7
- package/src/schematics/form/form-component/index.js +7 -6
- package/src/schematics/form/form-component/index.js.map +1 -1
- package/src/schematics/form/form-component/schema.d.ts +2 -9
- package/src/schematics/form-table-action.schema.json +92 -0
- package/src/schematics/minimum-table.schema.json +11 -0
- package/src/schematics/navigation-table-action.schema.json +35 -0
- package/src/schematics/open-api-table-action.schema.json +60 -0
- package/src/schematics/operation-table-action.schema.json +26 -0
- package/src/schematics/table/action/dialog-table-action/index.d.ts +5 -9
- package/src/schematics/table/action/dialog-table-action/index.js +13 -21
- package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
- package/src/schematics/table/action/dialog-table-action/schema.d.ts +4 -6
- package/src/schematics/table/action/dialog-table-action/schema.json +1293 -100
- package/src/schematics/table/action/dialog-table-action/template.schema.json +4 -42
- package/src/schematics/table/action/form-table-action/index.d.ts +3 -11
- package/src/schematics/table/action/form-table-action/index.js +20 -18
- package/src/schematics/table/action/form-table-action/index.js.map +1 -1
- package/src/schematics/table/action/form-table-action/schema.d.ts +4 -14
- package/src/schematics/table/action/form-table-action/schema.json +331 -104
- package/src/schematics/table/action/form-table-action/template.schema.json +4 -59
- package/src/schematics/table/action/navigation-table-action/index.d.ts +3 -3
- package/src/schematics/table/action/navigation-table-action/index.js +2 -3
- package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/navigation-table-action/schema.d.ts +4 -4
- package/src/schematics/table/action/navigation-table-action/schema.json +1293 -70
- package/src/schematics/table/action/navigation-table-action/template.schema.json +4 -12
- package/src/schematics/table/action/open-api-table-action/index.d.ts +2 -4
- package/src/schematics/table/action/open-api-table-action/index.js +2 -4
- package/src/schematics/table/action/open-api-table-action/index.js.map +1 -1
- package/src/schematics/table/action/open-api-table-action/schema.d.ts +4 -6
- package/src/schematics/table/action/open-api-table-action/schema.json +1286 -91
- package/src/schematics/table/action/open-api-table-action/template.schema.json +4 -40
- package/src/schematics/table/action/operation-table-action/index.d.ts +2 -1
- package/src/schematics/table/action/operation-table-action/index.js +8 -6
- package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
- package/src/schematics/table/action/operation-table-action/schema.d.ts +5 -3
- package/src/schematics/table/action/operation-table-action/schema.json +1296 -59
- package/src/schematics/table/action/operation-table-action/template.schema.json +6 -0
- package/src/schematics/table/table-action/index.d.ts +2 -1
- package/src/schematics/table/table-action/index.js +3 -2
- package/src/schematics/table/table-action/index.js.map +1 -1
- package/src/schematics/table/table-action/schema.d.ts +2 -2
- package/src/schematics/table/table-action/schema.json +1286 -52
- package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +19 -1
- package/src/schematics/table/table-component/index.js +6 -5
- package/src/schematics/table/table-component/index.js.map +1 -1
- package/src/schematics/table/table-component/schema.json +534 -48
- package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +19 -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 +534 -48
- package/src/schematics/table-action.schema.json +47 -53
- package/src/schematics/tree-component/index.js +2 -1
- package/src/schematics/tree-component/index.js.map +1 -1
- package/src/template.schema.json +18 -0
- package/src/lib/table-action.d.ts +0 -13
- package/src/lib/table-action.js +0 -102
- package/src/lib/table-action.js.map +0 -1
- package/src/lib/table-row-action.d.ts +0 -21
- package/src/lib/table-row-action.js +0 -25
- package/src/lib/table-row-action.js.map +0 -1
|
@@ -2,64 +2,58 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"$id": "table-action",
|
|
4
4
|
"type": "object",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "#/definitions/baseTableAction"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"kind": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "default",
|
|
17
|
+
"default": "default"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"$ref": "#/definitions/dialogTableAction"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"$ref": "#/definitions/formTableAction"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"$ref": "#/definitions/navigationTableAction"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"$ref": "#/definitions/openApiTableAction"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"$ref": "#/definitions/operationTableAction"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"definitions": {
|
|
40
|
+
"baseTableAction": {
|
|
41
|
+
"$ref": "./base-table-column.schema.json"
|
|
38
42
|
},
|
|
39
|
-
"
|
|
40
|
-
"
|
|
43
|
+
"dialogTableAction": {
|
|
44
|
+
"$ref": "./dialog-table-action.schema.json"
|
|
41
45
|
},
|
|
42
|
-
"
|
|
43
|
-
"
|
|
46
|
+
"formTableAction": {
|
|
47
|
+
"$ref": "./form-table-action.schema.json"
|
|
44
48
|
},
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"description": "Value for the color input of the mat-button / mat-icon component"
|
|
49
|
+
"navigationTableAction": {
|
|
50
|
+
"$ref": "./navigation-table-action.schema.json"
|
|
48
51
|
},
|
|
49
|
-
"
|
|
50
|
-
"$ref": "
|
|
52
|
+
"openApiTableAction": {
|
|
53
|
+
"$ref": "./open-api-table-action.schema.json"
|
|
51
54
|
},
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"additionalProperties": true
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"required": [
|
|
58
|
-
"type"
|
|
59
|
-
],
|
|
60
|
-
"definitions": {
|
|
61
|
-
"cssClass": {
|
|
62
|
-
"$ref": "./css-class.schema.json"
|
|
55
|
+
"operationTableAction": {
|
|
56
|
+
"$ref": "./operation-table-action.schema.json"
|
|
63
57
|
}
|
|
64
58
|
}
|
|
65
59
|
}
|
|
@@ -16,13 +16,14 @@ function NormalizeTreeComponentOptions(options) {
|
|
|
16
16
|
exports.NormalizeTreeComponentOptions = NormalizeTreeComponentOptions;
|
|
17
17
|
function default_1(options) {
|
|
18
18
|
const normalizedOptions = NormalizeTreeComponentOptions(options);
|
|
19
|
-
const { fullTree, project, feature, shared, controllerName, overwrite, } = normalizedOptions;
|
|
19
|
+
const { fullTree, project, feature, shared, controllerName, overwrite, backend, } = normalizedOptions;
|
|
20
20
|
return () => {
|
|
21
21
|
return (0, schematics_1.chain)([
|
|
22
22
|
(0, schematics_ts_morph_1.CoerceTreeOperationRule)({
|
|
23
23
|
project,
|
|
24
24
|
feature,
|
|
25
25
|
shared,
|
|
26
|
+
backend,
|
|
26
27
|
controllerName,
|
|
27
28
|
fullTree,
|
|
28
29
|
overwrite,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/angular/src/schematics/tree-component/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,mEAAoE;AACpE,qEAGoC;AAEpC,+DAKmC;AAUnC,SAAgB,6BAA6B,CAC3C,OAA6B;;IAE7B,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,IAAA,kDAAgC,EAAC,wBAAwB,CAAC,CAAC;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;IAC1C,MAAM,aAAa,GAAG,IAAA,mCAAY,EAAC,IAAA,gCAAS,EAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,MAAM,iCACf,wBAAwB,KAC3B,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,EAAE,EAClC,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,aAAa,EACvD,aAAa,EACb,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,IAClC,CAAC;AACL,CAAC;AAdD,sEAcC;AAED,mBAAyB,OAA6B;IACpD,MAAM,iBAAiB,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACjE,MAAM,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,cAAc,EACd,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/angular/src/schematics/tree-component/index.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,mEAAoE;AACpE,qEAGoC;AAEpC,+DAKmC;AAUnC,SAAgB,6BAA6B,CAC3C,OAA6B;;IAE7B,MAAM,wBAAwB,GAAG,IAAA,yCAAuB,EAAC,OAAO,CAAC,CAAC;IAClE,IAAA,kDAAgC,EAAC,wBAAwB,CAAC,CAAC;IAC3D,MAAM,EAAE,IAAI,EAAE,GAAG,wBAAwB,CAAC;IAC1C,MAAM,aAAa,GAAG,IAAA,mCAAY,EAAC,IAAA,gCAAS,EAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,MAAM,iCACf,wBAAwB,KAC3B,SAAS,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,EAAE,EAClC,cAAc,EAAE,MAAA,OAAO,CAAC,cAAc,mCAAI,aAAa,EACvD,aAAa,EACb,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,mCAAI,IAAI,IAClC,CAAC;AACL,CAAC;AAdD,sEAcC;AAED,mBAAyB,OAA6B;IACpD,MAAM,iBAAiB,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACjE,MAAM,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,EACN,cAAc,EACd,SAAS,EACT,OAAO,GACR,GACC,iBAAiB,CAAC;IAIpB,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,6CAAuB,EAAC;gBACtB,OAAO;gBACP,OAAO;gBACP,MAAM;gBACN,OAAO;gBACP,cAAc;gBACd,QAAQ;gBACR,SAAS;aACV,CAAC;SACH,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA5BD,4BA4BC"}
|
package/src/template.schema.json
CHANGED
|
@@ -133,6 +133,9 @@
|
|
|
133
133
|
"baseFormGroup": {
|
|
134
134
|
"$ref": "schematics/base-form-group.schema.json"
|
|
135
135
|
},
|
|
136
|
+
"baseTableAction": {
|
|
137
|
+
"$ref": "schematics/base-table-action.schema.json"
|
|
138
|
+
},
|
|
136
139
|
"baseTableColumn": {
|
|
137
140
|
"$ref": "schematics/base-table-column.schema.json"
|
|
138
141
|
},
|
|
@@ -175,6 +178,9 @@
|
|
|
175
178
|
"dateTableColumn": {
|
|
176
179
|
"$ref": "schematics/date-table-column.schema.json"
|
|
177
180
|
},
|
|
181
|
+
"dialogTableAction": {
|
|
182
|
+
"$ref": "schematics/dialog-table-action.schema.json"
|
|
183
|
+
},
|
|
178
184
|
"formArray": {
|
|
179
185
|
"$ref": "schematics/form-array.schema.json"
|
|
180
186
|
},
|
|
@@ -193,6 +199,9 @@
|
|
|
193
199
|
"formGroup": {
|
|
194
200
|
"$ref": "schematics/form-group.schema.json"
|
|
195
201
|
},
|
|
202
|
+
"formTableAction": {
|
|
203
|
+
"$ref": "schematics/form-table-action.schema.json"
|
|
204
|
+
},
|
|
196
205
|
"general": {
|
|
197
206
|
"$ref": "schematics/general.schema.json"
|
|
198
207
|
},
|
|
@@ -211,6 +220,15 @@
|
|
|
211
220
|
"minimumTable": {
|
|
212
221
|
"$ref": "schematics/minimum-table.schema.json"
|
|
213
222
|
},
|
|
223
|
+
"navigationTableAction": {
|
|
224
|
+
"$ref": "schematics/navigation-table-action.schema.json"
|
|
225
|
+
},
|
|
226
|
+
"openApiTableAction": {
|
|
227
|
+
"$ref": "schematics/open-api-table-action.schema.json"
|
|
228
|
+
},
|
|
229
|
+
"operationTableAction": {
|
|
230
|
+
"$ref": "schematics/operation-table-action.schema.json"
|
|
231
|
+
},
|
|
214
232
|
"option": {
|
|
215
233
|
"$ref": "schematics/option.schema.json"
|
|
216
234
|
},
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Normalized } from '@rxap/utilities';
|
|
2
|
-
import { TableRowAction } from './table-row-action';
|
|
3
|
-
export interface TableAction extends TableRowAction {
|
|
4
|
-
role?: string;
|
|
5
|
-
icon?: string | null;
|
|
6
|
-
svgIcon?: string | null;
|
|
7
|
-
permission?: string | null;
|
|
8
|
-
}
|
|
9
|
-
export interface NormalizedTableAction extends Readonly<Normalized<TableAction>> {
|
|
10
|
-
permission: string | null;
|
|
11
|
-
}
|
|
12
|
-
export declare function NormalizeTableAction(tableAction: Readonly<TableAction> | string): NormalizedTableAction;
|
|
13
|
-
export declare function NormalizeTableActionList(tableActionList?: Array<Readonly<TableAction> | string>): ReadonlyArray<NormalizedTableAction>;
|
package/src/lib/table-action.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
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, _m, _o, _p, _q;
|
|
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 = null;
|
|
16
|
-
let icon = null;
|
|
17
|
-
let svgIcon = null;
|
|
18
|
-
let permission = null;
|
|
19
|
-
let inHeader = false;
|
|
20
|
-
let options = {};
|
|
21
|
-
let color = undefined;
|
|
22
|
-
let cssClass = undefined;
|
|
23
|
-
if (typeof tableAction === 'string') {
|
|
24
|
-
// type:role:modifier1,modifier2
|
|
25
|
-
// edit:form:refresh,confirm
|
|
26
|
-
const fragments = tableAction.split(':');
|
|
27
|
-
type = fragments[0];
|
|
28
|
-
role = fragments[1];
|
|
29
|
-
if (fragments[2]) {
|
|
30
|
-
const modifiers = fragments[2].split(/,(?![^(]*\))/g);
|
|
31
|
-
refresh = modifiers.includes('refresh');
|
|
32
|
-
confirm = modifiers.includes('confirm');
|
|
33
|
-
inHeader = modifiers.includes('header');
|
|
34
|
-
if (modifiers.some((m) => m.match(/icon\(.+\)/))) {
|
|
35
|
-
icon = modifiers
|
|
36
|
-
.find((m) => m.match(/icon\(.+\)/))
|
|
37
|
-
.replace(/^icon\(/, '')
|
|
38
|
-
.replace(/\)$/, '');
|
|
39
|
-
}
|
|
40
|
-
if (modifiers.some((m) => m.match(/svgIcon\(.+\)/))) {
|
|
41
|
-
svgIcon = modifiers
|
|
42
|
-
.find((m) => m.match(/svgIcon\(.+\)/))
|
|
43
|
-
.replace(/^svgIcon\(/, '')
|
|
44
|
-
.replace(/\)$/, '');
|
|
45
|
-
}
|
|
46
|
-
if (modifiers.some((m) => m.match(/permission\(.+\)/))) {
|
|
47
|
-
permission = modifiers
|
|
48
|
-
.find((m) => m.match(/permission\(.+\)/))
|
|
49
|
-
.replace(/^permission\(/, '')
|
|
50
|
-
.replace(/\)$/, '');
|
|
51
|
-
}
|
|
52
|
-
if (modifiers.some((m) => m.match(/checkFunction\(.+\)/))) {
|
|
53
|
-
checkFunction = modifiers
|
|
54
|
-
.find((m) => m.match(/checkFunction\(.+\)/))
|
|
55
|
-
.replace(/^checkFunction\(/, '')
|
|
56
|
-
.replace(/\)$/, '');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
type = tableAction.type;
|
|
62
|
-
checkFunction = (_a = tableAction.checkFunction) !== null && _a !== void 0 ? _a : checkFunction;
|
|
63
|
-
tooltip = (_b = tableAction.tooltip) !== null && _b !== void 0 ? _b : tooltip;
|
|
64
|
-
errorMessage = (_c = tableAction.errorMessage) !== null && _c !== void 0 ? _c : errorMessage;
|
|
65
|
-
successMessage = (_d = tableAction.successMessage) !== null && _d !== void 0 ? _d : successMessage;
|
|
66
|
-
refresh = (_e = tableAction.refresh) !== null && _e !== void 0 ? _e : refresh;
|
|
67
|
-
confirm = (_f = tableAction.confirm) !== null && _f !== void 0 ? _f : confirm;
|
|
68
|
-
priority = (_g = tableAction.priority) !== null && _g !== void 0 ? _g : priority;
|
|
69
|
-
role = (_h = tableAction.role) !== null && _h !== void 0 ? _h : role;
|
|
70
|
-
inHeader = (_j = tableAction.inHeader) !== null && _j !== void 0 ? _j : inHeader;
|
|
71
|
-
icon = (_k = tableAction.icon) !== null && _k !== void 0 ? _k : icon;
|
|
72
|
-
svgIcon = (_l = tableAction.svgIcon) !== null && _l !== void 0 ? _l : svgIcon;
|
|
73
|
-
permission = (_m = tableAction.permission) !== null && _m !== void 0 ? _m : permission;
|
|
74
|
-
options = (_o = tableAction.options) !== null && _o !== void 0 ? _o : options;
|
|
75
|
-
color = (_p = tableAction.color) !== null && _p !== void 0 ? _p : color;
|
|
76
|
-
cssClass = (_q = tableAction.cssClass) !== null && _q !== void 0 ? _q : cssClass;
|
|
77
|
-
}
|
|
78
|
-
return Object.freeze(Object.assign(Object.assign({}, (0, table_row_action_1.NormalizeTableRowAction)({
|
|
79
|
-
type,
|
|
80
|
-
checkFunction,
|
|
81
|
-
tooltip,
|
|
82
|
-
errorMessage,
|
|
83
|
-
successMessage,
|
|
84
|
-
refresh,
|
|
85
|
-
confirm,
|
|
86
|
-
priority,
|
|
87
|
-
inHeader,
|
|
88
|
-
options,
|
|
89
|
-
color,
|
|
90
|
-
cssClass,
|
|
91
|
-
})), { role,
|
|
92
|
-
icon,
|
|
93
|
-
svgIcon,
|
|
94
|
-
permission }));
|
|
95
|
-
}
|
|
96
|
-
exports.NormalizeTableAction = NormalizeTableAction;
|
|
97
|
-
function NormalizeTableActionList(tableActionList) {
|
|
98
|
-
var _a;
|
|
99
|
-
return Object.freeze((_a = tableActionList === null || tableActionList === void 0 ? void 0 : tableActionList.map(NormalizeTableAction)) !== null && _a !== void 0 ? _a : []);
|
|
100
|
-
}
|
|
101
|
-
exports.NormalizeTableActionList = NormalizeTableActionList;
|
|
102
|
-
//# sourceMappingURL=table-action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-action.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-action.ts"],"names":[],"mappings":";;;AAEA,yDAG4B;AAa5B,SAAgB,oBAAoB,CAClC,WAA2C;;IAE3C,IAAI,IAAY,CAAC;IACjB,IAAI,aAAa,GAAuB,SAAS,CAAC;IAClD,IAAI,OAAO,GAAuB,SAAS,CAAC;IA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UAAU,IACV,CAAC;AACL,CAAC;AA7FD,oDA6FC;AAED,SAAgB,wBAAwB,CACtC,eAAuD;;IAEvD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,GAAG,CAAC,oBAAoB,CAAC,mCAAI,EAAE,CAAC,CAAC;AACzE,CAAC;AAJD,4DAIC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Normalized } from '@rxap/utilities';
|
|
2
|
-
import { CssClass, NormalizedCssClass } from './css-class';
|
|
3
|
-
export interface TableRowAction {
|
|
4
|
-
type: string;
|
|
5
|
-
refresh?: boolean;
|
|
6
|
-
confirm?: boolean;
|
|
7
|
-
tooltip?: string;
|
|
8
|
-
errorMessage?: string;
|
|
9
|
-
successMessage?: string;
|
|
10
|
-
priority?: number;
|
|
11
|
-
checkFunction?: string;
|
|
12
|
-
inHeader?: boolean;
|
|
13
|
-
color?: string;
|
|
14
|
-
cssClass?: CssClass;
|
|
15
|
-
options?: Record<string, any>;
|
|
16
|
-
}
|
|
17
|
-
export interface NormalizedTableRowAction extends Readonly<Normalized<Omit<TableRowAction, 'cssClass'>>> {
|
|
18
|
-
options: Record<string, any>;
|
|
19
|
-
cssClass: NormalizedCssClass;
|
|
20
|
-
}
|
|
21
|
-
export declare function NormalizeTableRowAction(tableAction: Readonly<TableRowAction>): NormalizedTableRowAction;
|
|
@@ -1,25 +0,0 @@
|
|
|
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 css_class_1 = require("./css-class");
|
|
6
|
-
const to_title_1 = require("./to-title");
|
|
7
|
-
function NormalizeTableRowAction(tableAction) {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
9
|
-
return Object.freeze({
|
|
10
|
-
type: (0, schematics_utilities_1.dasherize)(tableAction.type),
|
|
11
|
-
tooltip: (_a = tableAction.tooltip) !== null && _a !== void 0 ? _a : (0, to_title_1.ToTitle)(tableAction.type),
|
|
12
|
-
errorMessage: (_b = tableAction.errorMessage) !== null && _b !== void 0 ? _b : null,
|
|
13
|
-
successMessage: (_c = tableAction.successMessage) !== null && _c !== void 0 ? _c : null,
|
|
14
|
-
checkFunction: (_d = tableAction.checkFunction) !== null && _d !== void 0 ? _d : null,
|
|
15
|
-
color: (_e = tableAction.color) !== null && _e !== void 0 ? _e : null,
|
|
16
|
-
cssClass: (0, css_class_1.NormalizeCssClass)(tableAction.cssClass),
|
|
17
|
-
refresh: (_f = tableAction.refresh) !== null && _f !== void 0 ? _f : false,
|
|
18
|
-
confirm: (_g = tableAction.confirm) !== null && _g !== void 0 ? _g : false,
|
|
19
|
-
priority: (_h = tableAction.priority) !== null && _h !== void 0 ? _h : 0,
|
|
20
|
-
inHeader: (_j = tableAction.inHeader) !== null && _j !== void 0 ? _j : false,
|
|
21
|
-
options: (_k = tableAction.options) !== null && _k !== void 0 ? _k : {},
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.NormalizeTableRowAction = NormalizeTableRowAction;
|
|
25
|
-
//# sourceMappingURL=table-row-action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table-row-action.js","sourceRoot":"","sources":["../../../../../../packages/schematic/angular/src/lib/table-row-action.ts"],"names":[],"mappings":";;;AAAA,qEAAuD;AAEvD,2CAIqB;AACrB,yCAAqC;AAsBrC,SAAgB,uBAAuB,CACrC,WAAqC;;IAErC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,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,KAAK,EAAE,MAAA,WAAW,CAAC,KAAK,mCAAI,IAAI;QAChC,QAAQ,EAAE,IAAA,6BAAiB,EAAC,WAAW,CAAC,QAAQ,CAAC;QACjD,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;QACvC,OAAO,EAAE,MAAA,WAAW,CAAC,OAAO,mCAAI,EAAE;KACnC,CAAC,CAAC;AACL,CAAC;AAjBD,0DAiBC"}
|