@rxap/schematic-angular 18.0.3-dev.1 → 18.1.0-dev.1

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 (216) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +12 -11
  3. package/src/lib/accordion/accordion-header-kind.d.ts +6 -0
  4. package/src/lib/accordion/accordion-header-kind.js +11 -0
  5. package/src/lib/accordion/accordion-header-kind.js.map +1 -0
  6. package/src/lib/accordion/accordion-header.d.ts +6 -0
  7. package/src/lib/accordion/accordion-header.js +22 -0
  8. package/src/lib/accordion/accordion-header.js.map +1 -0
  9. package/src/lib/{accordion-itme-kinds.js → accordion/accordion-item-kind.js} +1 -1
  10. package/src/lib/accordion/accordion-item-kind.js.map +1 -0
  11. package/src/lib/accordion/accordion-item.d.ts +9 -0
  12. package/src/lib/accordion/accordion-item.js +29 -0
  13. package/src/lib/accordion/accordion-item.js.map +1 -0
  14. package/src/lib/accordion/header/base-accordion-header.d.ts +18 -0
  15. package/src/lib/accordion/header/base-accordion-header.js +35 -0
  16. package/src/lib/accordion/header/base-accordion-header.js.map +1 -0
  17. package/src/lib/accordion/header/property-accordion-header.d.ts +14 -0
  18. package/src/lib/accordion/header/property-accordion-header.js +23 -0
  19. package/src/lib/accordion/header/property-accordion-header.js.map +1 -0
  20. package/src/lib/accordion/header/static-accordion-header.d.ts +11 -0
  21. package/src/lib/accordion/header/static-accordion-header.js +13 -0
  22. package/src/lib/accordion/header/static-accordion-header.js.map +1 -0
  23. package/src/lib/accordion/item/base-accordion-item.d.ts +31 -0
  24. package/src/lib/accordion/item/base-accordion-item.js +59 -0
  25. package/src/lib/accordion/item/base-accordion-item.js.map +1 -0
  26. package/src/lib/accordion/item/data-grid-accordion-item.d.ts +14 -0
  27. package/src/lib/accordion/item/data-grid-accordion-item.js +29 -0
  28. package/src/lib/accordion/item/data-grid-accordion-item.js.map +1 -0
  29. package/src/lib/accordion/item/switch-accordion-item.d.ts +32 -0
  30. package/src/lib/accordion/item/switch-accordion-item.js +89 -0
  31. package/src/lib/accordion/item/switch-accordion-item.js.map +1 -0
  32. package/src/lib/accordion/item/table-accordion-item.d.ts +14 -0
  33. package/src/lib/accordion/item/table-accordion-item.js +21 -0
  34. package/src/lib/accordion/item/table-accordion-item.js.map +1 -0
  35. package/src/lib/accordion/item/tree-table-accordion-item.d.ts +14 -0
  36. package/src/lib/accordion/item/tree-table-accordion-item.js +21 -0
  37. package/src/lib/accordion/item/tree-table-accordion-item.js.map +1 -0
  38. package/src/lib/coerce-accordion-component.js +9 -6
  39. package/src/lib/coerce-accordion-component.js.map +1 -1
  40. package/src/lib/coerce-minimum-table-component.js +9 -2
  41. package/src/lib/coerce-minimum-table-component.js.map +1 -1
  42. package/src/lib/form/control/form-control.d.ts +1 -0
  43. package/src/lib/form/control/form-control.js +6 -1
  44. package/src/lib/form/control/form-control.js.map +1 -1
  45. package/src/lib/form/form-component.d.ts +15 -0
  46. package/src/lib/form/form-component.js +12 -0
  47. package/src/lib/form/form-component.js.map +1 -0
  48. package/src/lib/form/form-definition.d.ts +8 -0
  49. package/src/lib/form/form-definition.js +11 -0
  50. package/src/lib/form/form-definition.js.map +1 -0
  51. package/src/lib/load-handlebars-template.js +3 -0
  52. package/src/lib/load-handlebars-template.js.map +1 -1
  53. package/src/lib/mat-form-field-default-options.d.ts +8 -2
  54. package/src/lib/mat-form-field-default-options.js +8 -1
  55. package/src/lib/mat-form-field-default-options.js.map +1 -1
  56. package/src/lib/minimum-table-component-options.js +28 -35
  57. package/src/lib/minimum-table-component-options.js.map +1 -1
  58. package/src/lib/minimum-table-options.d.ts +6 -3
  59. package/src/lib/minimum-table-options.js +4 -1
  60. package/src/lib/minimum-table-options.js.map +1 -1
  61. package/src/lib/table/action/base-table-action.d.ts +25 -0
  62. package/src/lib/table/action/base-table-action.js +32 -0
  63. package/src/lib/table/action/base-table-action.js.map +1 -0
  64. package/src/lib/table/action/dialog-table-action.d.ts +15 -0
  65. package/src/lib/table/action/dialog-table-action.js +23 -0
  66. package/src/lib/table/action/dialog-table-action.js.map +1 -0
  67. package/src/lib/table/action/form-table-action.d.ts +19 -0
  68. package/src/lib/table/action/form-table-action.js +26 -0
  69. package/src/lib/table/action/form-table-action.js.map +1 -0
  70. package/src/lib/table/action/navigation-table-action.d.ts +12 -0
  71. package/src/lib/table/action/navigation-table-action.js +14 -0
  72. package/src/lib/table/action/navigation-table-action.js.map +1 -0
  73. package/src/lib/table/action/open-api-table-action.d.ts +16 -0
  74. package/src/lib/table/action/open-api-table-action.js +14 -0
  75. package/src/lib/table/action/open-api-table-action.js.map +1 -0
  76. package/src/lib/table/action/operation-table-action.d.ts +8 -0
  77. package/src/lib/table/action/operation-table-action.js +10 -0
  78. package/src/lib/table/action/operation-table-action.js.map +1 -0
  79. package/src/lib/table/table-action-kind.d.ts +9 -0
  80. package/src/lib/table/table-action-kind.js +17 -0
  81. package/src/lib/table/table-action-kind.js.map +1 -0
  82. package/src/lib/table/table-action.d.ts +11 -0
  83. package/src/lib/table/table-action.js +35 -0
  84. package/src/lib/table/table-action.js.map +1 -0
  85. package/src/lib/table/table-filter-column-rule.js +9 -5
  86. package/src/lib/table/table-filter-column-rule.js.map +1 -1
  87. package/src/lib/table-options.d.ts +5 -9
  88. package/src/lib/table-options.js.map +1 -1
  89. package/src/lib/tree-table-options.d.ts +5 -10
  90. package/src/lib/tree-table-options.js.map +1 -1
  91. package/src/lib/use-pick-from-table-interface-as-form-type.d.ts +3 -1
  92. package/src/lib/use-pick-from-table-interface-as-form-type.js +19 -5
  93. package/src/lib/use-pick-from-table-interface-as-form-type.js.map +1 -1
  94. package/src/lib/utilities/if-truthy.d.ts +8 -0
  95. package/src/lib/utilities/if-truthy.js +14 -0
  96. package/src/lib/utilities/if-truthy.js.map +1 -0
  97. package/src/schema.json +309 -86
  98. package/src/schematics/accordion/accordion-component/files/component/__componentName__.component.html.hbs +6 -0
  99. package/src/schematics/accordion/accordion-component/index.d.ts +5 -4
  100. package/src/schematics/accordion/accordion-component/index.js +29 -12
  101. package/src/schematics/accordion/accordion-component/index.js.map +1 -1
  102. package/src/schematics/accordion/accordion-component/schema.d.ts +5 -3
  103. package/src/schematics/accordion/accordion-component/schema.json +488 -72
  104. package/src/schematics/accordion/accordion-component/template.schema.json +4 -20
  105. package/src/schematics/accordion/accordion-item-component/index.d.ts +2 -2
  106. package/src/schematics/accordion/accordion-item-component/index.js +17 -14
  107. package/src/schematics/accordion/accordion-item-component/index.js.map +1 -1
  108. package/src/schematics/accordion/accordion-item-component/schema.d.ts +1 -1
  109. package/src/schematics/accordion/accordion-item-component/schema.json +388 -48
  110. package/src/schematics/accordion/item/accordion-item-data-grid-component/index.d.ts +1 -1
  111. package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js +5 -4
  112. package/src/schematics/accordion/item/accordion-item-data-grid-component/index.js.map +1 -1
  113. package/src/schematics/accordion/item/accordion-item-data-grid-component/schema.d.ts +1 -1
  114. package/src/schematics/accordion/item/accordion-item-switch-component/index.d.ts +1 -1
  115. package/src/schematics/accordion/item/accordion-item-switch-component/index.js +3 -3
  116. package/src/schematics/accordion/item/accordion-item-switch-component/index.js.map +1 -1
  117. package/src/schematics/accordion/item/accordion-item-switch-component/schema.d.ts +1 -1
  118. package/src/schematics/accordion/item/accordion-item-switch-component/schema.json +388 -48
  119. package/src/schematics/accordion/item/accordion-item-table-component/index.d.ts +1 -1
  120. package/src/schematics/accordion/item/accordion-item-table-component/index.js +3 -3
  121. package/src/schematics/accordion/item/accordion-item-table-component/index.js.map +1 -1
  122. package/src/schematics/accordion/item/accordion-item-table-component/schema.d.ts +1 -1
  123. package/src/schematics/accordion/item/accordion-item-table-component/schema.json +542 -48
  124. package/src/schematics/accordion/item/accordion-item-tree-table-component/index.d.ts +1 -1
  125. package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js +6 -4
  126. package/src/schematics/accordion/item/accordion-item-tree-table-component/index.js.map +1 -1
  127. package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.d.ts +1 -1
  128. package/src/schematics/accordion/item/accordion-item-tree-table-component/schema.json +542 -48
  129. package/src/schematics/accordion/templates/default-accordion-header.hbs +2 -0
  130. package/src/schematics/accordion/templates/{accordion-header.hbs → property-accordion-header.hbs} +0 -5
  131. package/src/schematics/accordion/templates/static-accordion-header.hbs +3 -0
  132. package/src/schematics/accordion/templates/switch-accordion-item.hbs +12 -0
  133. package/src/schematics/accordion-header.schema.json +40 -0
  134. package/src/schematics/base-accordion-header.schema.json +35 -0
  135. package/src/schematics/base-table-action.schema.json +62 -0
  136. package/src/schematics/data-grid-component/index.js +4 -2
  137. package/src/schematics/data-grid-component/index.js.map +1 -1
  138. package/src/schematics/dialog-table-action.schema.json +65 -0
  139. package/src/schematics/form/control/autocomplete-table-select-form-control/index.js +7 -4
  140. package/src/schematics/form/control/autocomplete-table-select-form-control/index.js.map +1 -1
  141. package/src/schematics/form/control/select-form-control/index.js +2 -1
  142. package/src/schematics/form/control/select-form-control/index.js.map +1 -1
  143. package/src/schematics/form/control/table-select-form-control/index.js +5 -3
  144. package/src/schematics/form/control/table-select-form-control/index.js.map +1 -1
  145. package/src/schematics/form/form-component/index.d.ts +2 -7
  146. package/src/schematics/form/form-component/index.js +7 -6
  147. package/src/schematics/form/form-component/index.js.map +1 -1
  148. package/src/schematics/form/form-component/schema.d.ts +2 -9
  149. package/src/schematics/form-table-action.schema.json +92 -0
  150. package/src/schematics/minimum-table.schema.json +11 -0
  151. package/src/schematics/navigation-table-action.schema.json +35 -0
  152. package/src/schematics/open-api-table-action.schema.json +60 -0
  153. package/src/schematics/operation-table-action.schema.json +26 -0
  154. package/src/schematics/property-accordion-header.schema.json +31 -0
  155. package/src/schematics/static-accordion-header.schema.json +29 -0
  156. package/src/schematics/table/action/dialog-table-action/index.d.ts +5 -9
  157. package/src/schematics/table/action/dialog-table-action/index.js +13 -21
  158. package/src/schematics/table/action/dialog-table-action/index.js.map +1 -1
  159. package/src/schematics/table/action/dialog-table-action/schema.d.ts +4 -6
  160. package/src/schematics/table/action/dialog-table-action/schema.json +1293 -100
  161. package/src/schematics/table/action/dialog-table-action/template.schema.json +4 -42
  162. package/src/schematics/table/action/form-table-action/index.d.ts +3 -11
  163. package/src/schematics/table/action/form-table-action/index.js +20 -18
  164. package/src/schematics/table/action/form-table-action/index.js.map +1 -1
  165. package/src/schematics/table/action/form-table-action/schema.d.ts +4 -14
  166. package/src/schematics/table/action/form-table-action/schema.json +331 -104
  167. package/src/schematics/table/action/form-table-action/template.schema.json +4 -59
  168. package/src/schematics/table/action/navigation-table-action/index.d.ts +3 -3
  169. package/src/schematics/table/action/navigation-table-action/index.js +2 -3
  170. package/src/schematics/table/action/navigation-table-action/index.js.map +1 -1
  171. package/src/schematics/table/action/navigation-table-action/schema.d.ts +4 -4
  172. package/src/schematics/table/action/navigation-table-action/schema.json +1293 -70
  173. package/src/schematics/table/action/navigation-table-action/template.schema.json +4 -12
  174. package/src/schematics/table/action/open-api-table-action/index.d.ts +2 -4
  175. package/src/schematics/table/action/open-api-table-action/index.js +2 -4
  176. package/src/schematics/table/action/open-api-table-action/index.js.map +1 -1
  177. package/src/schematics/table/action/open-api-table-action/schema.d.ts +4 -6
  178. package/src/schematics/table/action/open-api-table-action/schema.json +1286 -91
  179. package/src/schematics/table/action/open-api-table-action/template.schema.json +4 -40
  180. package/src/schematics/table/action/operation-table-action/index.d.ts +2 -1
  181. package/src/schematics/table/action/operation-table-action/index.js +8 -6
  182. package/src/schematics/table/action/operation-table-action/index.js.map +1 -1
  183. package/src/schematics/table/action/operation-table-action/schema.d.ts +5 -3
  184. package/src/schematics/table/action/operation-table-action/schema.json +1296 -59
  185. package/src/schematics/table/action/operation-table-action/template.schema.json +6 -0
  186. package/src/schematics/table/table-action/index.d.ts +2 -1
  187. package/src/schematics/table/table-action/index.js +3 -2
  188. package/src/schematics/table/table-action/index.js.map +1 -1
  189. package/src/schematics/table/table-action/schema.d.ts +2 -2
  190. package/src/schematics/table/table-action/schema.json +1286 -52
  191. package/src/schematics/table/table-component/files/component/__componentName__.component.html.hbs +19 -1
  192. package/src/schematics/table/table-component/index.js +6 -5
  193. package/src/schematics/table/table-component/index.js.map +1 -1
  194. package/src/schematics/table/table-component/schema.json +542 -48
  195. package/src/schematics/table/tree-table-component/files/component/__componentName__.component.html.hbs +19 -1
  196. package/src/schematics/table/tree-table-component/index.js +5 -3
  197. package/src/schematics/table/tree-table-component/index.js.map +1 -1
  198. package/src/schematics/table/tree-table-component/schema.json +542 -48
  199. package/src/schematics/table-action.schema.json +47 -53
  200. package/src/schematics/tree-component/index.js +2 -1
  201. package/src/schematics/tree-component/index.js.map +1 -1
  202. package/src/template.schema.json +30 -0
  203. package/src/lib/accordion-header.d.ts +0 -32
  204. package/src/lib/accordion-header.js +0 -57
  205. package/src/lib/accordion-header.js.map +0 -1
  206. package/src/lib/accordion-item.d.ts +0 -91
  207. package/src/lib/accordion-item.js +0 -206
  208. package/src/lib/accordion-item.js.map +0 -1
  209. package/src/lib/accordion-itme-kinds.js.map +0 -1
  210. package/src/lib/table-action.d.ts +0 -13
  211. package/src/lib/table-action.js +0 -102
  212. package/src/lib/table-action.js.map +0 -1
  213. package/src/lib/table-row-action.d.ts +0 -21
  214. package/src/lib/table-row-action.js +0 -25
  215. package/src/lib/table-row-action.js.map +0 -1
  216. /package/src/lib/{accordion-itme-kinds.d.ts → accordion/accordion-item-kind.d.ts} +0 -0
@@ -6,62 +6,7 @@
6
6
  "$ref": "#/definitions/tableActionSchematic"
7
7
  },
8
8
  {
9
- "type": "object",
10
- "properties": {
11
- "formInitial": {
12
- "type": "object",
13
- "description": "The mapping from the row object to the form initial object"
14
- },
15
- "formComponent": {
16
- "type": "string"
17
- },
18
- "customComponent": {
19
- "type": "boolean",
20
- "default": false,
21
- "description": "If true the schematic will not coerce the form component"
22
- },
23
- "loadFrom": {
24
- "type": "object",
25
- "properties": {
26
- "operationId": {
27
- "type": "string"
28
- },
29
- "scope": {
30
- "type": "string",
31
- "description": "The scope of package for the openapi classes"
32
- },
33
- "body": {
34
- "oneOf": [
35
- {
36
- "type": "boolean",
37
- "description": "Pass the full row as body for the operation request"
38
- },
39
- {
40
- "type": "object",
41
- "description": "Mapping of table columns to body properties - [request property]: [table column]",
42
- "additionalProperties": true
43
- }
44
- ]
45
- },
46
- "parameters": {
47
- "oneOf": [
48
- {
49
- "type": "boolean",
50
- "description": "Pass the full row as parameters for the operation request"
51
- },
52
- {
53
- "type": "object",
54
- "description": "Mapping of table columns to parameters properties - [request property]: [table column]",
55
- "additionalProperties": true
56
- }
57
- ]
58
- }
59
- }
60
- },
61
- "formOptions": {
62
- "$ref": "#/definitions/formComponent"
63
- }
64
- }
9
+ "$ref": "#/definitions/formTableAction"
65
10
  }
66
11
  ],
67
12
  "definitions": {
@@ -412,6 +357,61 @@
412
357
  }
413
358
  ]
414
359
  },
360
+ "baseTableAction": {
361
+ "type": "object",
362
+ "properties": {
363
+ "type": {
364
+ "type": "string"
365
+ },
366
+ "refresh": {
367
+ "type": "boolean"
368
+ },
369
+ "confirm": {
370
+ "type": "boolean"
371
+ },
372
+ "tooltip": {
373
+ "type": "string"
374
+ },
375
+ "errorMessage": {
376
+ "type": "string"
377
+ },
378
+ "successMessage": {
379
+ "type": "string"
380
+ },
381
+ "priority": {
382
+ "type": "number"
383
+ },
384
+ "checkFunction": {
385
+ "type": "string"
386
+ },
387
+ "inHeader": {
388
+ "type": "boolean"
389
+ },
390
+ "kind": {
391
+ "alias": "role",
392
+ "type": "string"
393
+ },
394
+ "icon": {
395
+ "type": "string"
396
+ },
397
+ "svgIcon": {
398
+ "type": "string"
399
+ },
400
+ "permission": {
401
+ "type": "string"
402
+ },
403
+ "color": {
404
+ "type": "string",
405
+ "description": "Value for the color input of the mat-button / mat-icon component"
406
+ },
407
+ "cssClass": {
408
+ "$ref": "#/definitions/cssClass"
409
+ }
410
+ },
411
+ "required": [
412
+ "type"
413
+ ]
414
+ },
415
415
  "button": {
416
416
  "type": "object",
417
417
  "properties": {
@@ -506,6 +506,66 @@
506
506
  }
507
507
  ]
508
508
  },
509
+ "dialogTableAction": {
510
+ "allOf": [
511
+ {
512
+ "$ref": "#/definitions/baseTableAction"
513
+ },
514
+ {
515
+ "type": "object",
516
+ "properties": {
517
+ "kind": {
518
+ "type": "string",
519
+ "const": "dialog",
520
+ "default": "dialog"
521
+ },
522
+ "withoutBody": {
523
+ "type": "boolean",
524
+ "description": "Whether the table action operation should be without body",
525
+ "default": false
526
+ },
527
+ "actionList": {
528
+ "alias": "action",
529
+ "type": "array",
530
+ "description": "The list of actions to be added to the dialog",
531
+ "items": {
532
+ "oneOf": [
533
+ {
534
+ "type": "string"
535
+ },
536
+ {
537
+ "type": "object",
538
+ "properties": {
539
+ "label": {
540
+ "type": "string"
541
+ },
542
+ "color": {
543
+ "type": "string"
544
+ },
545
+ "role": {
546
+ "type": "string",
547
+ "enum": [
548
+ "submit",
549
+ "close"
550
+ ]
551
+ }
552
+ }
553
+ }
554
+ ]
555
+ }
556
+ },
557
+ "title": {
558
+ "type": "string",
559
+ "description": "The title for the dialog"
560
+ }
561
+ },
562
+ "required": [
563
+ "kind",
564
+ "title"
565
+ ]
566
+ }
567
+ ]
568
+ },
509
569
  "formArray": {
510
570
  "allOf": [
511
571
  {
@@ -706,6 +766,89 @@
706
766
  }
707
767
  ]
708
768
  },
769
+ "formTableAction": {
770
+ "allOf": [
771
+ {
772
+ "$ref": "#/definitions/baseTableAction"
773
+ },
774
+ {
775
+ "type": "object",
776
+ "properties": {
777
+ "kind": {
778
+ "type": "string",
779
+ "const": "form",
780
+ "default": "form"
781
+ },
782
+ "formInitial": {
783
+ "oneOf": [
784
+ {
785
+ "type": "object",
786
+ "description": "The mapping from the row object to the form initial object"
787
+ },
788
+ {
789
+ "type": "boolean",
790
+ "description": "If true the row object will be used as form initial object. If false the form initial object will be empty. Default is false.",
791
+ "default": false
792
+ }
793
+ ]
794
+ },
795
+ "formComponent": {
796
+ "type": "string"
797
+ },
798
+ "customComponent": {
799
+ "type": "boolean",
800
+ "default": false,
801
+ "description": "If true the schematic will not coerce the form component"
802
+ },
803
+ "loadFrom": {
804
+ "type": "object",
805
+ "properties": {
806
+ "operationId": {
807
+ "type": "string"
808
+ },
809
+ "scope": {
810
+ "type": "string",
811
+ "description": "The scope of package for the openapi classes"
812
+ },
813
+ "body": {
814
+ "oneOf": [
815
+ {
816
+ "type": "boolean",
817
+ "description": "Pass the full row as body for the operation request"
818
+ },
819
+ {
820
+ "type": "object",
821
+ "description": "Mapping of table columns to body properties - [request property]: [table column]",
822
+ "additionalProperties": true
823
+ }
824
+ ]
825
+ },
826
+ "parameters": {
827
+ "oneOf": [
828
+ {
829
+ "type": "boolean",
830
+ "description": "Pass the full row as parameters for the operation request"
831
+ },
832
+ {
833
+ "type": "object",
834
+ "description": "Mapping of table columns to parameters properties - [request property]: [table column]",
835
+ "additionalProperties": true
836
+ }
837
+ ]
838
+ }
839
+ }
840
+ },
841
+ "form": {
842
+ "alias": "formOptions",
843
+ "$ref": "#/definitions/formComponent"
844
+ }
845
+ },
846
+ "required": [
847
+ "kind"
848
+ ]
849
+ }
850
+ ]
851
+ },
709
852
  "general": {
710
853
  "type": "object",
711
854
  "properties": {
@@ -794,6 +937,111 @@
794
937
  }
795
938
  ]
796
939
  },
940
+ "navigationTableAction": {
941
+ "allOf": [
942
+ {
943
+ "$ref": "#/definitions/baseTableAction"
944
+ },
945
+ {
946
+ "type": "object",
947
+ "properties": {
948
+ "kind": {
949
+ "type": "string",
950
+ "const": "navigation",
951
+ "default": "navigation"
952
+ },
953
+ "route": {
954
+ "type": "string",
955
+ "description": "The route for the table action"
956
+ },
957
+ "relativeTo": {
958
+ "type": "boolean",
959
+ "description": "Use the current ActivatedRoute to resolve the route or not",
960
+ "default": false
961
+ }
962
+ },
963
+ "required": [
964
+ "kind",
965
+ "route"
966
+ ]
967
+ }
968
+ ]
969
+ },
970
+ "openApiTableAction": {
971
+ "allOf": [
972
+ {
973
+ "$ref": "#/definitions/baseTableAction"
974
+ },
975
+ {
976
+ "type": "object",
977
+ "properties": {
978
+ "kind": {
979
+ "type": "string",
980
+ "const": "open-api",
981
+ "default": "open-api"
982
+ },
983
+ "operationId": {
984
+ "type": "string",
985
+ "description": "The open api operationId for the table action"
986
+ },
987
+ "scope": {
988
+ "type": "string",
989
+ "description": "The scope of package for the openapi classes"
990
+ },
991
+ "body": {
992
+ "oneOf": [
993
+ {
994
+ "type": "boolean",
995
+ "description": "Pass the full row as body for the operation request"
996
+ },
997
+ {
998
+ "type": "object",
999
+ "description": "Mapping of table columns to body properties - [request property]: [table column]",
1000
+ "additionalProperties": true
1001
+ }
1002
+ ]
1003
+ },
1004
+ "parameters": {
1005
+ "oneOf": [
1006
+ {
1007
+ "type": "boolean",
1008
+ "description": "Pass the full row as parameters for the operation request"
1009
+ },
1010
+ {
1011
+ "type": "object",
1012
+ "description": "Mapping of table columns to parameters properties - [request property]: [table column]",
1013
+ "additionalProperties": true
1014
+ }
1015
+ ]
1016
+ }
1017
+ },
1018
+ "required": [
1019
+ "kind",
1020
+ "operationId"
1021
+ ]
1022
+ }
1023
+ ]
1024
+ },
1025
+ "operationTableAction": {
1026
+ "allOf": [
1027
+ {
1028
+ "$ref": "#/definitions/baseTableAction"
1029
+ },
1030
+ {
1031
+ "type": "object",
1032
+ "properties": {
1033
+ "kind": {
1034
+ "type": "string",
1035
+ "const": "operation",
1036
+ "default": "operation"
1037
+ }
1038
+ },
1039
+ "required": [
1040
+ "kind"
1041
+ ]
1042
+ }
1043
+ ]
1044
+ },
797
1045
  "option": {
798
1046
  "type": "object",
799
1047
  "properties": {
@@ -919,60 +1167,39 @@
919
1167
  },
920
1168
  "tableAction": {
921
1169
  "type": "object",
922
- "properties": {
923
- "type": {
924
- "type": "string"
925
- },
926
- "refresh": {
927
- "type": "boolean"
928
- },
929
- "confirm": {
930
- "type": "boolean"
931
- },
932
- "tooltip": {
933
- "type": "string"
934
- },
935
- "errorMessage": {
936
- "type": "string"
937
- },
938
- "successMessage": {
939
- "type": "string"
940
- },
941
- "priority": {
942
- "type": "number"
943
- },
944
- "checkFunction": {
945
- "type": "string"
946
- },
947
- "inHeader": {
948
- "type": "boolean"
949
- },
950
- "role": {
951
- "type": "string"
952
- },
953
- "icon": {
954
- "type": "string"
1170
+ "oneOf": [
1171
+ {
1172
+ "allOf": [
1173
+ {
1174
+ "$ref": "#/definitions/baseTableAction"
1175
+ },
1176
+ {
1177
+ "type": "object",
1178
+ "properties": {
1179
+ "kind": {
1180
+ "type": "string",
1181
+ "const": "default",
1182
+ "default": "default"
1183
+ }
1184
+ }
1185
+ }
1186
+ ]
955
1187
  },
956
- "svgIcon": {
957
- "type": "string"
1188
+ {
1189
+ "$ref": "#/definitions/dialogTableAction"
958
1190
  },
959
- "permission": {
960
- "type": "string"
1191
+ {
1192
+ "$ref": "#/definitions/formTableAction"
961
1193
  },
962
- "color": {
963
- "type": "string",
964
- "description": "Value for the color input of the mat-button / mat-icon component"
1194
+ {
1195
+ "$ref": "#/definitions/navigationTableAction"
965
1196
  },
966
- "cssClass": {
967
- "$ref": "#/definitions/cssClass"
1197
+ {
1198
+ "$ref": "#/definitions/openApiTableAction"
968
1199
  },
969
- "options": {
970
- "type": "object",
971
- "additionalProperties": true
1200
+ {
1201
+ "$ref": "#/definitions/operationTableAction"
972
1202
  }
973
- },
974
- "required": [
975
- "type"
976
1203
  ]
977
1204
  },
978
1205
  "tableActionSchematic": {
@@ -6,70 +6,15 @@
6
6
  "$ref": "#/definitions/tableActionSchematic"
7
7
  },
8
8
  {
9
- "type": "object",
10
- "properties": {
11
- "formInitial": {
12
- "type": "object",
13
- "description": "The mapping from the row object to the form initial object"
14
- },
15
- "formComponent": {
16
- "type": "string"
17
- },
18
- "customComponent": {
19
- "type": "boolean",
20
- "default": false,
21
- "description": "If true the schematic will not coerce the form component"
22
- },
23
- "loadFrom": {
24
- "type": "object",
25
- "properties": {
26
- "operationId": {
27
- "type": "string"
28
- },
29
- "scope": {
30
- "type": "string",
31
- "description": "The scope of package for the openapi classes"
32
- },
33
- "body": {
34
- "oneOf": [
35
- {
36
- "type": "boolean",
37
- "description": "Pass the full row as body for the operation request"
38
- },
39
- {
40
- "type": "object",
41
- "description": "Mapping of table columns to body properties - [request property]: [table column]",
42
- "additionalProperties": true
43
- }
44
- ]
45
- },
46
- "parameters": {
47
- "oneOf": [
48
- {
49
- "type": "boolean",
50
- "description": "Pass the full row as parameters for the operation request"
51
- },
52
- {
53
- "type": "object",
54
- "description": "Mapping of table columns to parameters properties - [request property]: [table column]",
55
- "additionalProperties": true
56
- }
57
- ]
58
- }
59
- }
60
- },
61
- "formOptions": {
62
- "$ref": "#/definitions/formComponent"
63
- }
64
- }
9
+ "$ref": "#/definitions/formTableAction"
65
10
  }
66
11
  ],
67
12
  "definitions": {
68
- "formComponent": {
69
- "$ref": "../../../form-component.schema.json"
70
- },
71
13
  "tableActionSchematic": {
72
14
  "$ref": "../../table-action/template.schema.json"
15
+ },
16
+ "formTableAction": {
17
+ "$ref": "../../../form-table-action.schema.json"
73
18
  }
74
19
  }
75
20
  }
@@ -1,8 +1,8 @@
1
1
  import { Tree } from '@angular-devkit/schematics';
2
2
  import { Normalized } from '@rxap/utilities';
3
- import { NormalizedOperationTableActionOptions } from '../operation-table-action';
4
- import { OperationTableActionOptions } from '../operation-table-action/schema';
3
+ import { AngularOptions, NormalizedAngularOptions } from '../../../../lib/angular-options';
4
+ import { NavigationTableAction, NormalizedNavigationTableAction } from '../../../../lib/table/action/navigation-table-action';
5
5
  import { NavigationTableActionOptions } from './schema';
6
- export type NormalizedNavigationTableActionOptions = Readonly<Normalized<Omit<NavigationTableActionOptions, keyof OperationTableActionOptions>>> & NormalizedOperationTableActionOptions;
6
+ export type NormalizedNavigationTableActionOptions = Readonly<Normalized<Omit<NavigationTableActionOptions, keyof NavigationTableAction | keyof AngularOptions>> & NormalizedNavigationTableAction & NormalizedAngularOptions>;
7
7
  export declare function NormalizeNavigationTableActionOptions(options: NavigationTableActionOptions): NormalizedNavigationTableActionOptions;
8
8
  export default function (options: NavigationTableActionOptions): (host: Tree) => import("@angular-devkit/schematics").Rule;
@@ -6,10 +6,9 @@ const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
6
6
  const path_1 = require("path");
7
7
  const angular_options_1 = require("../../../../lib/angular-options");
8
8
  const assert_table_component_exists_1 = require("../../../../lib/assert-table-component-exists");
9
- const operation_table_action_1 = require("../operation-table-action");
9
+ const navigation_table_action_1 = require("../../../../lib/table/action/navigation-table-action");
10
10
  function NormalizeNavigationTableActionOptions(options) {
11
- var _a, _b;
12
- return Object.assign(Object.assign({}, (0, operation_table_action_1.NormalizeOperationTableActionOptions)(options)), { route: (_a = options.route) !== null && _a !== void 0 ? _a : null, relativeTo: (_b = options.relativeTo) !== null && _b !== void 0 ? _b : false });
11
+ return Object.assign(Object.assign(Object.assign({}, (0, angular_options_1.NormalizeAngularOptions)(options)), (0, navigation_table_action_1.NormalizeNavigationTableAction)(options)), { tableName: options.tableName });
13
12
  }
14
13
  exports.NormalizeNavigationTableActionOptions = NormalizeNavigationTableActionOptions;
15
14
  function printOptions(options) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/navigation-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAA4E;AAE5E,+BAA4B;AAC5B,qEAAsE;AACtE,iGAA2F;AAC3F,sEAGmC;AAOnC,SAAgB,qCAAqC,CACnD,OAAqC;;IAErC,uCACK,IAAA,6DAAoC,EAAC,OAAO,CAAC,KAChD,KAAK,EAAE,MAAA,OAAO,CAAC,KAAK,mCAAI,IAAI,EAC5B,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,KAAK,IACvC;AACJ,CAAC;AARD,sFAQC;AAED,SAAS,YAAY,CAAC,OAA+C;IACnE,IAAA,qCAAmB,EAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,mBAAyB,OAAqC;IAC5D,MAAM,iBAAiB,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IACzE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EACb,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,IAAI,EACJ,KAAK,EACL,UAAU,GACX,GAAG,iBAAiB,CAAC;IACtB,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChC,OAAO,CAAC,IAAU,EAAE,EAAE;QAEpB,IAAA,0DAA0B,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAEpD,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,mEAAmE,CAAC;YACxF,IAAA,qDAA+B,EAAC;gBAC9B,SAAS,EAAE,IAAA,WAAI,EAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;gBACrD,IAAI;gBACJ,SAAS;gBACT,OAAO;gBACP,OAAO;gBACP,OAAO;gBACP,YAAY;gBACZ,cAAc;gBACd,QAAQ;gBACR,aAAa;gBACb,OAAO;gBACP,OAAO;gBACP,KAAK;gBACL,UAAU;aACX,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA7CD,4BA6CC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/schematic/angular/src/schematics/table/action/navigation-table-action/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,mEAA4E;AAE5E,+BAA4B;AAC5B,qEAKyC;AACzC,iGAA2F;AAC3F,kGAI8D;AAK9D,SAAgB,qCAAqC,CACnD,OAAqC;IAErC,qDACK,IAAA,yCAAuB,EAAC,OAAO,CAAC,GAChC,IAAA,wDAA8B,EAAC,OAAO,CAAC,KAC1C,SAAS,EAAE,OAAO,CAAC,SAAS,IAC5B;AACJ,CAAC;AARD,sFAQC;AAED,SAAS,YAAY,CAAC,OAA+C;IACnE,IAAA,qCAAmB,EAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,mBAAyB,OAAqC;IAC5D,MAAM,iBAAiB,GAAG,qCAAqC,CAAC,OAAO,CAAC,CAAC;IACzE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,OAAO,EACP,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,aAAa,EACb,SAAS,EACT,OAAO,EACP,OAAO,EACP,MAAM,EACN,SAAS,EACT,IAAI,EACJ,KAAK,EACL,UAAU,GACX,GAAG,iBAAiB,CAAC;IACtB,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAChC,OAAO,CAAC,IAAU,EAAE,EAAE;QAEpB,IAAA,0DAA0B,EAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAEpD,OAAO,IAAA,kBAAK,EAAC;YACX,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,mEAAmE,CAAC;YACxF,IAAA,qDAA+B,EAAC;gBAC9B,SAAS,EAAE,IAAA,WAAI,EAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;gBACrD,IAAI;gBACJ,SAAS;gBACT,OAAO;gBACP,OAAO;gBACP,OAAO;gBACP,YAAY;gBACZ,cAAc;gBACd,QAAQ;gBACR,aAAa;gBACb,OAAO;gBACP,OAAO;gBACP,KAAK;gBACL,UAAU;aACX,CAAC;YACF,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA7CD,4BA6CC"}
@@ -1,6 +1,6 @@
1
- import { OperationTableActionOptions } from '../operation-table-action/schema';
1
+ import { AngularOptions } from '../../../../lib/angular-options';
2
+ import { NavigationTableAction } from '../../../../lib/table/action/navigation-table-action';
2
3
 
3
- export interface NavigationTableActionOptions extends OperationTableActionOptions {
4
- route?: string;
5
- relativeTo: boolean;
4
+ export interface NavigationTableActionOptions extends NavigationTableAction, AngularOptions {
5
+ tableName: string;
6
6
  }