@rxap/schematic-angular 16.2.0 → 16.3.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -1
  3. package/package.json +6 -6
  4. package/src/lib/angular-options.js +2 -1
  5. package/src/lib/angular-options.js.map +1 -1
  6. package/src/lib/backend-types.d.ts +2 -1
  7. package/src/lib/backend-types.js +1 -0
  8. package/src/lib/backend-types.js.map +1 -1
  9. package/src/lib/coerce-minimum-table-component.d.ts +4 -1
  10. package/src/lib/coerce-minimum-table-component.js +5 -0
  11. package/src/lib/coerce-minimum-table-component.js.map +1 -1
  12. package/src/lib/table/column/options-table-column.d.ts +11 -0
  13. package/src/lib/table/column/options-table-column.js +23 -0
  14. package/src/lib/table/column/options-table-column.js.map +1 -0
  15. package/src/lib/table/table-column-kind.d.ts +2 -1
  16. package/src/lib/table/table-column-kind.js +1 -0
  17. package/src/lib/table/table-column-kind.js.map +1 -1
  18. package/src/lib/table/table-column.js +3 -0
  19. package/src/lib/table/table-column.js.map +1 -1
  20. package/src/schema.json +57 -24
  21. package/src/schematics/accordion/accordion-component/schema.json +57 -24
  22. package/src/schematics/accordion/accordion-item-component/schema.json +57 -24
  23. package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.json +28 -24
  24. package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +57 -24
  25. package/src/schematics/accordion/item/accordion-item-table-component/schema.json +57 -24
  26. package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +57 -24
  27. package/src/schematics/accordion/templates/switch-accordion-item.hbs +1 -1
  28. package/src/schematics/backend.schema.json +2 -1
  29. package/src/schematics/data-grid-component/schema.json +28 -24
  30. package/src/schematics/dialog-component/schema.json +2 -1
  31. package/src/schematics/form/control/autocomplete-table-select-form-control/schema.json +2 -1
  32. package/src/schematics/form/control/input-form-control/schema.json +2 -1
  33. package/src/schematics/form/control/select-form-control/schema.json +28 -24
  34. package/src/schematics/form/control/table-select-form-control/schema.json +2 -1
  35. package/src/schematics/form/form-array/schema.json +28 -24
  36. package/src/schematics/form/form-component/schema.json +28 -24
  37. package/src/schematics/form/form-control/schema.json +28 -24
  38. package/src/schematics/form/form-definition/schema.json +28 -24
  39. package/src/schematics/form/form-group/schema.json +28 -24
  40. package/src/schematics/option.schema.json +27 -0
  41. package/src/schematics/options-table-column.schema.json +33 -0
  42. package/src/schematics/route-component/schema.json +2 -1
  43. package/src/schematics/select-form-control.schema.json +4 -23
  44. package/src/schematics/table/action/dialog-table-action/schema.json +2 -1
  45. package/src/schematics/table/action/form-table-action/schema.json +28 -24
  46. package/src/schematics/table/action/navigation-table-action/schema.json +2 -1
  47. package/src/schematics/table/action/open-api-table-action/schema.json +2 -1
  48. package/src/schematics/table/action/operation-table-action/schema.json +2 -1
  49. package/src/schematics/table/header-button/form-table-header-button/schema.json +28 -24
  50. package/src/schematics/table/header-button/navigation-table-header-button/schema.json +2 -1
  51. package/src/schematics/table/table-action/schema.json +2 -1
  52. package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +3 -0
  53. package/src/schematics/table/table-component/schema.json +57 -24
  54. package/src/schematics/table/table-header-button/schema.json +2 -1
  55. package/src/schematics/table/templates/options-table-column.hbs +26 -0
  56. package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +3 -0
  57. package/src/schematics/table/tree-table-component/schema.json +57 -24
  58. package/src/schematics/table-column.schema.json +6 -0
  59. package/src/schematics/tree-component/schema.json +2 -1
  60. package/src/template.schema.json +6 -0
@@ -240,7 +240,8 @@
240
240
  "none",
241
241
  "nestjs",
242
242
  "open-api",
243
- "local"
243
+ "local",
244
+ "data-source"
244
245
  ],
245
246
  "default": "none"
246
247
  },
@@ -842,6 +843,57 @@
842
843
  }
843
844
  }
844
845
  },
846
+ "option": {
847
+ "type": "object",
848
+ "properties": {
849
+ "display": {
850
+ "type": "string"
851
+ },
852
+ "value": {
853
+ "oneOf": [
854
+ {
855
+ "type": "string"
856
+ },
857
+ {
858
+ "type": "number"
859
+ },
860
+ {
861
+ "type": "boolean"
862
+ },
863
+ {
864
+ "type": "object",
865
+ "additionalProperties": true
866
+ }
867
+ ]
868
+ }
869
+ }
870
+ },
871
+ "optionsTableColumn": {
872
+ "allOf": [
873
+ {
874
+ "$ref": "#/definitions/baseTableColumn"
875
+ },
876
+ {
877
+ "type": "object",
878
+ "properties": {
879
+ "kind": {
880
+ "type": "string",
881
+ "const": "options"
882
+ },
883
+ "optionList": {
884
+ "type": "array",
885
+ "items": {
886
+ "$ref": "#/definitions/option"
887
+ }
888
+ }
889
+ },
890
+ "required": [
891
+ "kind",
892
+ "optionList"
893
+ ]
894
+ }
895
+ ]
896
+ },
845
897
  "pipe": {
846
898
  "oneOf": [
847
899
  {
@@ -924,29 +976,7 @@
924
976
  "optionList": {
925
977
  "type": "array",
926
978
  "items": {
927
- "type": "object",
928
- "properties": {
929
- "display": {
930
- "type": "string"
931
- },
932
- "value": {
933
- "oneOf": [
934
- {
935
- "type": "string"
936
- },
937
- {
938
- "type": "number"
939
- },
940
- {
941
- "type": "boolean"
942
- },
943
- {
944
- "type": "object",
945
- "additionalProperties": true
946
- }
947
- ]
948
- }
949
- }
979
+ "$ref": "#/definitions/option"
950
980
  }
951
981
  },
952
982
  "backend": {
@@ -1161,6 +1191,9 @@
1161
1191
  },
1162
1192
  {
1163
1193
  "$ref": "#/definitions/spinnerTableColumn"
1194
+ },
1195
+ {
1196
+ "$ref": "#/definitions/optionsTableColumn"
1164
1197
  }
1165
1198
  ]
1166
1199
  },
@@ -78,7 +78,8 @@
78
78
  "none",
79
79
  "nestjs",
80
80
  "open-api",
81
- "local"
81
+ "local",
82
+ "data-source"
82
83
  ],
83
84
  "default": "none"
84
85
  },
@@ -0,0 +1,26 @@
1
+ {{#> matColumnDef column=column}}
2
+ {{#if table.withHeader}}
3
+ <th mat-header-cell
4
+ *matHeaderCellDef
5
+ {{#if column.sortable}}
6
+ mat-sort-header
7
+ {{/if}}
8
+ {{#if column.headerCssClass}}
9
+ {{> cssClass cssClass=column.headerCssClass}}
10
+ {{/if}}
11
+ >
12
+ <ng-container i18n>{{column.title}}</ng-container>
13
+ </th>
14
+ {{/if}}
15
+ <td *matCellDef="let element"
16
+ mat-cell
17
+ [rxap-options-cell]="element?.{{column.propertyPath}}{{> pipe pipeList=column.pipeList}}"
18
+ {{#if column.cssClass}}
19
+ {{> cssClass cssClass=column.cssClass}}
20
+ {{/if}}
21
+ >
22
+ {{#each column.optionList}}
23
+ <mat-option [value]="{{propertyValue this.value}}" i18n>{{this.display}}</mat-option>
24
+ {{/each}}
25
+ </td>
26
+ {{/matColumnDef}}
@@ -90,6 +90,9 @@
90
90
  [ngClass]="{ 'hidden': tableDataSourceDirective.hasError$ | async }"
91
91
  mat-table
92
92
  #tableDataSourceDirective="rxapTableDataSource"
93
+ {{#ifeq backend "data-source"}}
94
+ [dataSource]="dataSource"
95
+ {{/ifeq}}
93
96
  rxapTableDataSource
94
97
  [parameters]="parameters"
95
98
  id="{{name}}"
@@ -240,7 +240,8 @@
240
240
  "none",
241
241
  "nestjs",
242
242
  "open-api",
243
- "local"
243
+ "local",
244
+ "data-source"
244
245
  ],
245
246
  "default": "none"
246
247
  },
@@ -842,6 +843,57 @@
842
843
  }
843
844
  }
844
845
  },
846
+ "option": {
847
+ "type": "object",
848
+ "properties": {
849
+ "display": {
850
+ "type": "string"
851
+ },
852
+ "value": {
853
+ "oneOf": [
854
+ {
855
+ "type": "string"
856
+ },
857
+ {
858
+ "type": "number"
859
+ },
860
+ {
861
+ "type": "boolean"
862
+ },
863
+ {
864
+ "type": "object",
865
+ "additionalProperties": true
866
+ }
867
+ ]
868
+ }
869
+ }
870
+ },
871
+ "optionsTableColumn": {
872
+ "allOf": [
873
+ {
874
+ "$ref": "#/definitions/baseTableColumn"
875
+ },
876
+ {
877
+ "type": "object",
878
+ "properties": {
879
+ "kind": {
880
+ "type": "string",
881
+ "const": "options"
882
+ },
883
+ "optionList": {
884
+ "type": "array",
885
+ "items": {
886
+ "$ref": "#/definitions/option"
887
+ }
888
+ }
889
+ },
890
+ "required": [
891
+ "kind",
892
+ "optionList"
893
+ ]
894
+ }
895
+ ]
896
+ },
845
897
  "pipe": {
846
898
  "oneOf": [
847
899
  {
@@ -924,29 +976,7 @@
924
976
  "optionList": {
925
977
  "type": "array",
926
978
  "items": {
927
- "type": "object",
928
- "properties": {
929
- "display": {
930
- "type": "string"
931
- },
932
- "value": {
933
- "oneOf": [
934
- {
935
- "type": "string"
936
- },
937
- {
938
- "type": "number"
939
- },
940
- {
941
- "type": "boolean"
942
- },
943
- {
944
- "type": "object",
945
- "additionalProperties": true
946
- }
947
- ]
948
- }
949
- }
979
+ "$ref": "#/definitions/option"
950
980
  }
951
981
  },
952
982
  "backend": {
@@ -1113,6 +1143,9 @@
1113
1143
  },
1114
1144
  {
1115
1145
  "$ref": "#/definitions/spinnerTableColumn"
1146
+ },
1147
+ {
1148
+ "$ref": "#/definitions/optionsTableColumn"
1116
1149
  }
1117
1150
  ]
1118
1151
  },
@@ -46,6 +46,9 @@
46
46
  },
47
47
  {
48
48
  "$ref": "#/definitions/spinnerTableColumn"
49
+ },
50
+ {
51
+ "$ref": "#/definitions/optionsTableColumn"
49
52
  }
50
53
  ],
51
54
  "definitions": {
@@ -78,6 +81,9 @@
78
81
  },
79
82
  "spinnerTableColumn": {
80
83
  "$ref": "./spinner-table-column.schema.json"
84
+ },
85
+ "optionsTableColumn": {
86
+ "$ref": "./options-table-column.schema.json"
81
87
  }
82
88
  }
83
89
  }
@@ -87,7 +87,8 @@
87
87
  "none",
88
88
  "nestjs",
89
89
  "open-api",
90
- "local"
90
+ "local",
91
+ "data-source"
91
92
  ],
92
93
  "default": "none"
93
94
  },
@@ -211,6 +211,12 @@
211
211
  "minimumTable": {
212
212
  "$ref": "schematics/minimum-table.schema.json"
213
213
  },
214
+ "option": {
215
+ "$ref": "schematics/option.schema.json"
216
+ },
217
+ "optionsTableColumn": {
218
+ "$ref": "schematics/options-table-column.schema.json"
219
+ },
214
220
  "pipe": {
215
221
  "$ref": "schematics/pipe.schema.json"
216
222
  },