@coolon/angular-ui-powerups 16.0.2 → 16.1.0-alpha.190

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 (537) hide show
  1. package/assets/activities/activities.scss +8 -6
  2. package/assets/activities/input-activities.scss +14 -6
  3. package/assets/draw.scss +20 -0
  4. package/assets/form.scss +77 -23
  5. package/assets/icons.scss +2 -1
  6. package/assets/interaction/editor/inline-string-editor.scss +4 -0
  7. package/assets/interaction.scss +1 -1
  8. package/assets/layout.scss +3 -0
  9. package/assets/place.scss +31 -0
  10. package/assets/styles.scss +4 -0
  11. package/assets/table.scss +60 -18
  12. package/assets/tabs.scss +15 -2
  13. package/esm2022/lib/angular-ui-powerups.module.mjs +9 -9
  14. package/esm2022/lib/animations/slide-animations.mjs +15 -10
  15. package/esm2022/lib/components/alignment.mjs +1 -1
  16. package/esm2022/lib/components/busy-overlay/busy-overlay.component.mjs +19 -20
  17. package/esm2022/lib/components/cards/abstract-card-container.component.mjs +36 -13
  18. package/esm2022/lib/components/cards/card-container/card-container.component.mjs +7 -10
  19. package/esm2022/lib/components/commands/button-renderer/button-renderer.component.mjs +115 -0
  20. package/esm2022/lib/components/commands/command/command.component.mjs +66 -56
  21. package/esm2022/lib/components/commands/command-face/command-face.component.mjs +21 -13
  22. package/esm2022/lib/components/commands/command-face.mjs +12 -11
  23. package/esm2022/lib/components/commands/flex.component.mjs +4 -6
  24. package/esm2022/lib/components/commands/group/command-container.mjs +1 -1
  25. package/esm2022/lib/components/commands/group/popup-aware.component.mjs +31 -8
  26. package/esm2022/lib/components/commands/group/popup-container.mjs +1 -1
  27. package/esm2022/lib/components/commands/group/popup-menu/abstract-popup-menu.component.mjs +37 -31
  28. package/esm2022/lib/components/commands/group/popup-menu/more-menu.component.mjs +20 -27
  29. package/esm2022/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.mjs +19 -14
  30. package/esm2022/lib/components/commands/group/popup-menu/popup-menu.component.mjs +24 -29
  31. package/esm2022/lib/components/commands/group/tool-bar/tool-bar.component.mjs +12 -19
  32. package/esm2022/lib/components/commands/separator.component.mjs +8 -16
  33. package/esm2022/lib/components/components.module.mjs +83 -53
  34. package/esm2022/lib/components/disposable-component.mjs +54 -7
  35. package/esm2022/lib/components/empty-state/empty-state.component.mjs +7 -11
  36. package/esm2022/lib/components/exports.mjs +16 -5
  37. package/esm2022/lib/components/file/file-download/file-download.component.mjs +89 -0
  38. package/esm2022/lib/components/focus-container/focus-container.component.mjs +4 -6
  39. package/esm2022/lib/components/focusable.component.mjs +5 -5
  40. package/esm2022/lib/components/forms/abstract-input.component.mjs +70 -24
  41. package/esm2022/lib/components/forms/abstract-list-input.component.mjs +11 -19
  42. package/esm2022/lib/components/forms/abstract-value-input.component.mjs +11 -19
  43. package/esm2022/lib/components/forms/autocomplete-input/autocomplete-input.component.mjs +29 -37
  44. package/esm2022/lib/components/forms/checkbox-input/checkbox-input.component.mjs +10 -10
  45. package/esm2022/lib/components/forms/form-field.mjs +2 -0
  46. package/esm2022/lib/components/forms/multiple-select-input/multiple-select-input.component.mjs +22 -28
  47. package/esm2022/lib/components/forms/number-input/number-input.component.mjs +89 -14
  48. package/esm2022/lib/components/forms/password-input/password-input.component.mjs +43 -8
  49. package/esm2022/lib/components/forms/search-input/search-input.component.mjs +33 -0
  50. package/esm2022/lib/components/forms/select-input/select-input.component.mjs +44 -45
  51. package/esm2022/lib/components/forms/string-input/string-input.component.mjs +46 -25
  52. package/esm2022/lib/components/forms/text-input/text-input.component.mjs +12 -10
  53. package/esm2022/lib/components/icon/icon.component.mjs +10 -7
  54. package/esm2022/lib/components/labelled-value/labelled-value.component.mjs +4 -6
  55. package/esm2022/lib/components/loadable-component.mjs +69 -0
  56. package/esm2022/lib/components/loading-container/loading-container.component.mjs +32 -29
  57. package/esm2022/lib/components/noop/noop.component.mjs +5 -7
  58. package/esm2022/lib/components/resize-aware.component.mjs +64 -27
  59. package/esm2022/lib/components/scroll-container/scroll-container.component.mjs +17 -15
  60. package/esm2022/lib/components/section-header/section-header.component.mjs +4 -6
  61. package/esm2022/lib/components/switch-case/switch-case.component.mjs +28 -28
  62. package/esm2022/lib/components/tables/abstract-table-model.mjs +123 -64
  63. package/esm2022/lib/components/tables/abstract-table.component.mjs +34 -15
  64. package/esm2022/lib/components/tables/column/column-manager.mjs +81 -0
  65. package/esm2022/lib/components/tables/column/column-model.mjs +23 -12
  66. package/esm2022/lib/components/tables/column/column-order-manager.mjs +19 -0
  67. package/esm2022/lib/components/tables/column/column-template/column-template.directive.mjs +4 -4
  68. package/esm2022/lib/components/tables/column/custom-template-column-model.mjs +3 -3
  69. package/esm2022/lib/components/tables/column/custom-value-column-model.mjs +5 -5
  70. package/esm2022/lib/components/tables/column/editor-controls-column-model.mjs +5 -5
  71. package/esm2022/lib/components/tables/column/list-propery-column-model.mjs +7 -6
  72. package/esm2022/lib/components/tables/column/property-column-model.mjs +6 -6
  73. package/esm2022/lib/components/tables/column/selection-column-model.mjs +35 -13
  74. package/esm2022/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.mjs +13 -13
  75. package/esm2022/lib/components/tables/editor/edit-session.mjs +5 -3
  76. package/esm2022/lib/components/tables/editor/editable-cell-renderer.mjs +1 -1
  77. package/esm2022/lib/components/tables/filter/column-text-search-formatter.mjs +1 -1
  78. package/esm2022/lib/components/tables/filter/enable-cell-text-search.decorator.mjs +3 -2
  79. package/esm2022/lib/components/tables/filter/table-filter-model.mjs +16 -11
  80. package/esm2022/lib/components/tables/filter/text-search-predicate.mjs +16 -2
  81. package/esm2022/lib/components/tables/footer/footer-row-model.mjs +38 -0
  82. package/esm2022/lib/components/tables/paginator/paginator.component.mjs +12 -12
  83. package/esm2022/lib/components/tables/renderer/abstract-cell-renderer.mjs +7 -0
  84. package/esm2022/lib/components/tables/renderer/cell-editors.mjs +1 -1
  85. package/esm2022/lib/components/tables/renderer/cell-portal-ref.mjs +23 -7
  86. package/esm2022/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.mjs +6 -8
  87. package/esm2022/lib/components/tables/renderer/default-header-cell-renderer/default-header-cell-renderer.component.mjs +5 -7
  88. package/esm2022/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.mjs +26 -14
  89. package/esm2022/lib/components/tables/renderer/selection-cell/selection-cell.component.mjs +11 -8
  90. package/esm2022/lib/components/tables/renderer/table-action-column/menu-builder.mjs +2 -0
  91. package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +153 -0
  92. package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +180 -63
  93. package/esm2022/lib/components/tables/renderer/table-cell/table-cell.component.mjs +12 -12
  94. package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.mjs +45 -0
  95. package/esm2022/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu.component.mjs +71 -0
  96. package/esm2022/lib/components/tables/renderer/table-footer-row/table-footer-row.component.mjs +30 -0
  97. package/esm2022/lib/components/tables/renderer/table-header-cell/table-header-cell.component.mjs +5 -7
  98. package/esm2022/lib/components/tables/table/table-model.mjs +12 -3
  99. package/esm2022/lib/components/tables/table/table.component.mjs +54 -68
  100. package/esm2022/lib/components/tables/tree-table/decorated-tree-node.mjs +5 -4
  101. package/esm2022/lib/components/tables/tree-table/flattened-tree-list-model.mjs +1 -1
  102. package/esm2022/lib/components/tables/tree-table/tree-expansion-model.mjs +5 -5
  103. package/esm2022/lib/components/tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.mjs +5 -7
  104. package/esm2022/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.mjs +16 -13
  105. package/esm2022/lib/components/tables/tree-table/tree-label-column-model.mjs +4 -7
  106. package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +27 -16
  107. package/esm2022/lib/components/tables/tree-table/tree-table-model.mjs +5 -8
  108. package/esm2022/lib/components/text/markdown/markdown.component.mjs +25 -22
  109. package/esm2022/lib/components/track.mjs +24 -0
  110. package/esm2022/lib/components/types/bounds.class.mjs +1 -5
  111. package/esm2022/lib/components/vertical-focus-container/vertical-focus-container.component.mjs +17 -17
  112. package/esm2022/lib/directives/command.directive.mjs +25 -14
  113. package/esm2022/lib/directives/directives.module.mjs +10 -10
  114. package/esm2022/lib/directives/exports.mjs +2 -1
  115. package/esm2022/lib/directives/focus-binding-factory.mjs +4 -4
  116. package/esm2022/lib/directives/focus-binding.directive.mjs +6 -8
  117. package/esm2022/lib/directives/focus-binding.mjs +4 -5
  118. package/esm2022/lib/directives/garbage-collector.directive.mjs +5 -4
  119. package/esm2022/lib/directives/highlight-text-model.directive.mjs +11 -9
  120. package/esm2022/lib/directives/highlight.pipe.mjs +12 -11
  121. package/esm2022/lib/directives/resize-observer.directive.mjs +40 -0
  122. package/esm2022/lib/interaction/abstract-interaction-context.mjs +6 -7
  123. package/esm2022/lib/interaction/activity-context.mjs +4 -0
  124. package/esm2022/lib/interaction/activity-ref.mjs +4 -4
  125. package/esm2022/lib/interaction/activity.mjs +39 -35
  126. package/esm2022/lib/interaction/alert.mjs +2 -2
  127. package/esm2022/lib/interaction/components/abstract-confirm-dialog.component.mjs +13 -10
  128. package/esm2022/lib/interaction/components/abstract-dialog.component.mjs +4 -45
  129. package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +42 -28
  130. package/esm2022/lib/interaction/components/activity-body/activity-body.component.mjs +10 -6
  131. package/esm2022/lib/interaction/components/activity-container/activity-container.component.mjs +53 -22
  132. package/esm2022/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.mjs +55 -19
  133. package/esm2022/lib/interaction/components/activity-title/activity-title.component.mjs +6 -8
  134. package/esm2022/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.mjs +41 -31
  135. package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +5 -5
  136. package/esm2022/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.mjs +5 -5
  137. package/esm2022/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.mjs +5 -5
  138. package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +6 -8
  139. package/esm2022/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +11 -11
  140. package/esm2022/lib/interaction/components/alert-dialog/alert-dialog.component.mjs +12 -12
  141. package/esm2022/lib/interaction/components/alert-renderer/alert-renderer.component.mjs +55 -0
  142. package/esm2022/lib/interaction/components/confirm-renderer/confirm-renderer.component.mjs +54 -0
  143. package/esm2022/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.mjs +6 -10
  144. package/esm2022/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.mjs +6 -10
  145. package/esm2022/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.mjs +9 -11
  146. package/esm2022/lib/interaction/components/editors/edit-context.mjs +1 -1
  147. package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-editor-model.mjs +5 -5
  148. package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +55 -48
  149. package/esm2022/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.mjs +32 -25
  150. package/esm2022/lib/interaction/components/input-activities/input-activity.mjs +21 -16
  151. package/esm2022/lib/interaction/components/input-activities/select-input-activity.mjs +49 -33
  152. package/esm2022/lib/interaction/components/input-activities/string-input-activity.mjs +30 -28
  153. package/esm2022/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.mjs +18 -15
  154. package/esm2022/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.mjs +134 -0
  155. package/esm2022/lib/interaction/confirm.mjs +26 -2
  156. package/esm2022/lib/interaction/directives/interaction-context-trigger-for.directive.mjs +6 -6
  157. package/esm2022/lib/interaction/exports.mjs +6 -1
  158. package/esm2022/lib/interaction/in-place-interaction-context.mjs +1 -1
  159. package/esm2022/lib/interaction/interaction-context-provider.mjs +17 -0
  160. package/esm2022/lib/interaction/interaction-context.mjs +3 -2
  161. package/esm2022/lib/interaction/interaction.module.mjs +44 -29
  162. package/esm2022/lib/interaction/route-synchronisation-adapter.mjs +1 -1
  163. package/esm2022/lib/interaction/services/interaction-service-routing-adapter.mjs +4 -4
  164. package/esm2022/lib/interaction/services/interaction.service.mjs +23 -11
  165. package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.mjs +9 -10
  166. package/esm2022/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.mjs +23 -5
  167. package/esm2022/lib/interaction/services/modal-interaction-context.factory.mjs +1 -1
  168. package/esm2022/lib/place/components/abstract-place-navigation.component.mjs +39 -31
  169. package/esm2022/lib/place/components/list-place-nav/list-place-nav.component.mjs +7 -7
  170. package/esm2022/lib/place/components/not-authorised-notice/not-authorised-notice.component.mjs +5 -7
  171. package/esm2022/lib/place/components/place-outlet/place-outlet.component.mjs +49 -44
  172. package/esm2022/lib/place/components/place-outlet/route-animations.mjs +1 -1
  173. package/esm2022/lib/place/components/side-place-navigation/side-place-navigation.component.mjs +25 -16
  174. package/esm2022/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.mjs +7 -7
  175. package/esm2022/lib/place/exports.mjs +2 -1
  176. package/esm2022/lib/place/guards/consolidated-param-map.mjs +4 -4
  177. package/esm2022/lib/place/guards/noop-auth-guard.service.mjs +5 -7
  178. package/esm2022/lib/place/guards/place.guard.mjs +19 -16
  179. package/esm2022/lib/place/navigation/place-component-deactivation-handler.mjs +2 -2
  180. package/esm2022/lib/place/navigation/session/abstract-pop-state-navigation.mjs +1 -1
  181. package/esm2022/lib/place/navigation/session/event-cleanup/event-clean-up-session.mjs +1 -1
  182. package/esm2022/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.mjs +1 -1
  183. package/esm2022/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined.mjs +1 -1
  184. package/esm2022/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.mjs +1 -1
  185. package/esm2022/lib/place/navigation/session/interactions/navigating-during-interaction.mjs +2 -2
  186. package/esm2022/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.mjs +1 -1
  187. package/esm2022/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.mjs +3 -3
  188. package/esm2022/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.mjs +3 -6
  189. package/esm2022/lib/place/navigation/session/navigating.mjs +2 -2
  190. package/esm2022/lib/place/navigation/session/navigation-context.mjs +1 -1
  191. package/esm2022/lib/place/navigation/session/navigation-session.mjs +2 -2
  192. package/esm2022/lib/place/navigation/session/pop-state-navigation.mjs +1 -1
  193. package/esm2022/lib/place/place-access-guard.mjs +1 -1
  194. package/esm2022/lib/place/place-auth-service.mjs +152 -0
  195. package/esm2022/lib/place/place-component.mjs +62 -48
  196. package/esm2022/lib/place/place-config.mjs +1 -1
  197. package/esm2022/lib/place/place-definition.mjs +15 -4
  198. package/esm2022/lib/place/place-history.mjs +6 -8
  199. package/esm2022/lib/place/place-router.mjs +87 -94
  200. package/esm2022/lib/place/place.decorator.mjs +2 -2
  201. package/esm2022/lib/place/place.module.mjs +16 -12
  202. package/esm2022/lib/place/route/formatter.mjs +2 -2
  203. package/esm2022/lib/place/route/json-types.mjs +1 -1
  204. package/esm2022/lib/place/route/parameter-decorators.mjs +54 -50
  205. package/esm2022/lib/place/route/parameter-definition.mjs +6 -2
  206. package/esm2022/lib/place/route/parameter-sanitiser.mjs +7 -2
  207. package/esm2022/lib/place/route/parameter-snapshot.mjs +1 -1
  208. package/esm2022/lib/place/route/visit-segment-sanitiser.mjs +1 -1
  209. package/esm2022/lib/place/url-service.mjs +4 -4
  210. package/esm2022/lib/place/url-snapshot.mjs +3 -3
  211. package/esm2022/lib/place/visit-segment.mjs +2 -2
  212. package/esm2022/lib/place/visit.mjs +2 -2
  213. package/esm2022/lib/services/markdown/markdown.service.mjs +5 -7
  214. package/esm2022/lib/services/markdown/pill-plugin.mjs +1 -3
  215. package/esm2022/lib/services/visibility-service.mjs +9 -9
  216. package/fesm2022/coolon-angular-ui-powerups.mjs +4720 -3041
  217. package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
  218. package/lib/angular-ui-powerups.module.d.ts +5 -5
  219. package/lib/animations/slide-animations.d.ts +1 -0
  220. package/lib/components/busy-overlay/busy-overlay.component.d.ts +4 -7
  221. package/lib/components/cards/abstract-card-container.component.d.ts +9 -7
  222. package/lib/components/cards/card-container/card-container.component.d.ts +3 -4
  223. package/lib/components/commands/button-renderer/button-renderer.component.d.ts +30 -0
  224. package/lib/components/commands/command/command.component.d.ts +15 -17
  225. package/lib/components/commands/command-face/command-face.component.d.ts +5 -5
  226. package/lib/components/commands/command-face.d.ts +8 -9
  227. package/lib/components/commands/flex.component.d.ts +1 -3
  228. package/lib/components/commands/group/popup-aware.component.d.ts +9 -4
  229. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +7 -7
  230. package/lib/components/commands/group/popup-menu/more-menu.component.d.ts +4 -6
  231. package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +7 -5
  232. package/lib/components/commands/group/popup-menu/popup-menu.component.d.ts +5 -7
  233. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +3 -7
  234. package/lib/components/commands/separator.component.d.ts +3 -6
  235. package/lib/components/components.module.d.ts +57 -51
  236. package/lib/components/disposable-component.d.ts +21 -3
  237. package/lib/components/empty-state/empty-state.component.d.ts +1 -4
  238. package/lib/components/exports.d.ts +15 -4
  239. package/lib/components/file/file-download/file-download.component.d.ts +45 -0
  240. package/lib/components/focus-container/focus-container.component.d.ts +1 -3
  241. package/lib/components/forms/abstract-input.component.d.ts +21 -13
  242. package/lib/components/forms/abstract-list-input.component.d.ts +4 -8
  243. package/lib/components/forms/abstract-value-input.component.d.ts +3 -7
  244. package/lib/components/forms/autocomplete-input/autocomplete-input.component.d.ts +8 -14
  245. package/lib/components/forms/checkbox-input/checkbox-input.component.d.ts +3 -3
  246. package/lib/components/forms/form-field.d.ts +5 -0
  247. package/lib/components/forms/multiple-select-input/multiple-select-input.component.d.ts +3 -8
  248. package/lib/components/forms/number-input/number-input.component.d.ts +17 -7
  249. package/lib/components/forms/password-input/password-input.component.d.ts +8 -4
  250. package/lib/components/forms/search-input/search-input.component.d.ts +10 -0
  251. package/lib/components/forms/select-input/select-input.component.d.ts +7 -10
  252. package/lib/components/forms/string-input/string-input.component.d.ts +10 -6
  253. package/lib/components/forms/text-input/text-input.component.d.ts +4 -3
  254. package/lib/components/labelled-value/labelled-value.component.d.ts +1 -3
  255. package/lib/components/loadable-component.d.ts +20 -0
  256. package/lib/components/loading-container/loading-container.component.d.ts +6 -9
  257. package/lib/components/noop/noop.component.d.ts +0 -1
  258. package/lib/components/resize-aware.component.d.ts +25 -6
  259. package/lib/components/scroll-container/scroll-container.component.d.ts +2 -3
  260. package/lib/components/section-header/section-header.component.d.ts +1 -3
  261. package/lib/components/switch-case/switch-case.component.d.ts +10 -12
  262. package/lib/components/tables/abstract-table-model.d.ts +50 -23
  263. package/lib/components/tables/abstract-table.component.d.ts +8 -7
  264. package/lib/components/tables/column/column-manager.d.ts +19 -0
  265. package/lib/components/tables/column/column-model.d.ts +8 -4
  266. package/lib/components/tables/column/column-order-manager.d.ts +20 -0
  267. package/lib/components/tables/column/custom-template-column-model.d.ts +3 -2
  268. package/lib/components/tables/column/custom-value-column-model.d.ts +3 -2
  269. package/lib/components/tables/column/editor-controls-column-model.d.ts +3 -2
  270. package/lib/components/tables/column/list-propery-column-model.d.ts +3 -2
  271. package/lib/components/tables/column/property-column-model.d.ts +3 -2
  272. package/lib/components/tables/column/selection-column-model.d.ts +10 -4
  273. package/lib/components/tables/editor/edit-row-controls/edit-row-controls.component.d.ts +4 -6
  274. package/lib/components/tables/editor/edit-session.d.ts +1 -1
  275. package/lib/components/tables/editor/editable-cell-renderer.d.ts +1 -1
  276. package/lib/components/tables/filter/enable-cell-text-search.decorator.d.ts +1 -1
  277. package/lib/components/tables/filter/text-search-predicate.d.ts +9 -0
  278. package/lib/components/tables/footer/footer-row-model.d.ts +22 -0
  279. package/lib/components/tables/paginator/paginator.component.d.ts +2 -4
  280. package/lib/components/tables/renderer/abstract-cell-renderer.d.ts +6 -0
  281. package/lib/components/tables/renderer/cell-editors.d.ts +5 -5
  282. package/lib/components/tables/renderer/cell-portal-ref.d.ts +21 -14
  283. package/lib/components/tables/renderer/default-cell-renderer/default-cell-renderer.component.d.ts +0 -1
  284. package/lib/components/tables/renderer/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +0 -1
  285. package/lib/components/tables/renderer/select-header-cell/selection-header-cell.component.d.ts +3 -2
  286. package/lib/components/tables/renderer/table-action-column/menu-builder.d.ts +7 -0
  287. package/lib/components/tables/renderer/table-action-column/table-action-column.component.d.ts +42 -0
  288. package/lib/components/tables/renderer/table-body/table-body.component.d.ts +47 -24
  289. package/lib/components/tables/renderer/table-cell/table-cell.component.d.ts +3 -5
  290. package/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu-popup.component.d.ts +19 -0
  291. package/lib/components/tables/renderer/table-custom-more-menu/table-custom-more-menu.component.d.ts +24 -0
  292. package/lib/components/tables/renderer/table-footer-row/table-footer-row.component.d.ts +11 -0
  293. package/lib/components/tables/renderer/table-header-cell/table-header-cell.component.d.ts +0 -1
  294. package/lib/components/tables/table/table-model.d.ts +4 -4
  295. package/lib/components/tables/table/table.component.d.ts +18 -14
  296. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +1 -1
  297. package/lib/components/tables/tree-table/tree-expansion-model.d.ts +2 -2
  298. package/lib/components/tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.d.ts +0 -1
  299. package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +3 -3
  300. package/lib/components/tables/tree-table/tree-label-column-model.d.ts +3 -3
  301. package/lib/components/tables/tree-table/tree-table-component.d.ts +7 -4
  302. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  303. package/lib/components/text/markdown/markdown.component.d.ts +3 -4
  304. package/lib/components/{track-by.d.ts → track.d.ts} +4 -7
  305. package/lib/components/types/bounds.class.d.ts +0 -2
  306. package/lib/components/vertical-focus-container/vertical-focus-container.component.d.ts +3 -6
  307. package/lib/directives/command.directive.d.ts +7 -5
  308. package/lib/directives/directives.module.d.ts +5 -5
  309. package/lib/directives/exports.d.ts +1 -0
  310. package/lib/directives/focus-binding.directive.d.ts +2 -3
  311. package/lib/directives/highlight-text-model.directive.d.ts +1 -1
  312. package/lib/directives/resize-observer.directive.d.ts +16 -0
  313. package/lib/interaction/abstract-interaction-context.d.ts +1 -1
  314. package/lib/interaction/activity-context.d.ts +9 -0
  315. package/lib/interaction/activity-ref.d.ts +2 -2
  316. package/lib/interaction/activity.d.ts +9 -9
  317. package/lib/interaction/components/abstract-confirm-dialog.component.d.ts +2 -1
  318. package/lib/interaction/components/abstract-dialog.component.d.ts +5 -14
  319. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +15 -13
  320. package/lib/interaction/components/activity-body/activity-body.component.d.ts +3 -4
  321. package/lib/interaction/components/activity-container/activity-container.component.d.ts +11 -5
  322. package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +4 -5
  323. package/lib/interaction/components/activity-title/activity-title.component.d.ts +2 -4
  324. package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +7 -8
  325. package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +1 -3
  326. package/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.d.ts +2 -4
  327. package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +6 -1
  328. package/lib/interaction/components/alert-renderer/alert-renderer.component.d.ts +17 -0
  329. package/lib/interaction/components/confirm-renderer/confirm-renderer.component.d.ts +15 -0
  330. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
  331. package/lib/interaction/components/editors/edit-context.d.ts +1 -1
  332. package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +7 -9
  333. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +9 -7
  334. package/lib/interaction/components/input-activities/input-activity.d.ts +5 -3
  335. package/lib/interaction/components/input-activities/select-input-activity.d.ts +4 -2
  336. package/lib/interaction/components/input-activities/string-input-activity.d.ts +1 -1
  337. package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +4 -5
  338. package/lib/interaction/components/slide-down-interaction-context/slide-down-interaction-context.component.d.ts +53 -0
  339. package/lib/interaction/confirm.d.ts +4 -0
  340. package/lib/interaction/directives/interaction-context-trigger-for.directive.d.ts +3 -3
  341. package/lib/interaction/exports.d.ts +5 -0
  342. package/lib/interaction/interaction-context-provider.d.ts +11 -0
  343. package/lib/interaction/interaction-context.d.ts +7 -1
  344. package/lib/interaction/interaction.module.d.ts +35 -32
  345. package/lib/interaction/services/interaction-service-routing-adapter.d.ts +3 -3
  346. package/lib/interaction/services/interaction.service.d.ts +2 -1
  347. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +2 -3
  348. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +4 -3
  349. package/lib/place/components/abstract-place-navigation.component.d.ts +8 -8
  350. package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +0 -1
  351. package/lib/place/components/place-outlet/place-outlet.component.d.ts +9 -11
  352. package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +4 -3
  353. package/lib/place/exports.d.ts +1 -0
  354. package/lib/place/guards/noop-auth-guard.service.d.ts +0 -1
  355. package/lib/place/guards/place.guard.d.ts +2 -2
  356. package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +0 -1
  357. package/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.d.ts +2 -2
  358. package/lib/place/place-access-guard.d.ts +2 -2
  359. package/lib/place/place-auth-service.d.ts +49 -0
  360. package/lib/place/place-component.d.ts +11 -12
  361. package/lib/place/place-definition.d.ts +2 -0
  362. package/lib/place/place-history.d.ts +0 -1
  363. package/lib/place/place-router.d.ts +11 -13
  364. package/lib/place/place.decorator.d.ts +1 -1
  365. package/lib/place/place.module.d.ts +6 -5
  366. package/lib/place/route/json-types.d.ts +1 -3
  367. package/lib/place/route/parameter-decorators.d.ts +3 -4
  368. package/lib/place/route/parameter-definition.d.ts +3 -3
  369. package/lib/place/route/parameter-sanitiser.d.ts +7 -0
  370. package/lib/place/url-snapshot.d.ts +3 -3
  371. package/lib/place/visit-segment.d.ts +4 -4
  372. package/lib/place/visit.d.ts +2 -2
  373. package/lib/services/markdown/markdown.service.d.ts +0 -1
  374. package/lib/services/visibility-service.d.ts +1 -1
  375. package/package.json +20 -19
  376. package/esm2022/lib/components/cards/card-stack/card-stack.component.mjs +0 -81
  377. package/esm2022/lib/components/tables/column/column-list-model.mjs +0 -44
  378. package/esm2022/lib/components/tables/table-row-menu/table-row-menu.component.mjs +0 -84
  379. package/esm2022/lib/components/track-by.mjs +0 -24
  380. package/lib/components/cards/card-stack/card-stack.component.d.ts +0 -68
  381. package/lib/components/tables/column/column-list-model.d.ts +0 -13
  382. package/lib/components/tables/table-row-menu/table-row-menu.component.d.ts +0 -28
  383. package/schematics/activity/index.d.ts +0 -3
  384. package/schematics/activity/index.js +0 -32
  385. package/schematics/activity/index.js.map +0 -1
  386. package/schematics/activity/index.spec.d.ts +0 -1
  387. package/schematics/activity/index.spec.js +0 -364
  388. package/schematics/activity/index.spec.js.map +0 -1
  389. package/schematics/activity/schema.d.ts +0 -4
  390. package/schematics/activity/schema.js +0 -3
  391. package/schematics/activity/schema.js.map +0 -1
  392. package/schematics/activity/schema.json +0 -27
  393. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +0 -5
  394. package/schematics/activity/templates/component/__name@dasherize__.component.scss.template +0 -4
  395. package/schematics/activity/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
  396. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +0 -40
  397. package/schematics/activity/templates/component/__name@dasherize__.i18n.yml.template +0 -9
  398. package/schematics/aup-i18n/index.d.ts +0 -4
  399. package/schematics/aup-i18n/index.js +0 -86
  400. package/schematics/aup-i18n/index.js.map +0 -1
  401. package/schematics/aup-i18n/schema.d.ts +0 -3
  402. package/schematics/aup-i18n/schema.js +0 -3
  403. package/schematics/aup-i18n/schema.js.map +0 -1
  404. package/schematics/aup-i18n/schema.json +0 -18
  405. package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +0 -80
  406. package/schematics/bootstrap-app/index.d.ts +0 -4
  407. package/schematics/bootstrap-app/index.js +0 -109
  408. package/schematics/bootstrap-app/index.js.map +0 -1
  409. package/schematics/bootstrap-app/schema.d.ts +0 -3
  410. package/schematics/bootstrap-app/schema.js +0 -3
  411. package/schematics/bootstrap-app/schema.js.map +0 -1
  412. package/schematics/bootstrap-app/schema.json +0 -18
  413. package/schematics/bootstrap-app/templates/i18n.config.json.template +0 -11
  414. package/schematics/bootstrap-app/templates/src/app/app-routing.module.ts.template +0 -23
  415. package/schematics/bootstrap-app/templates/src/app/app.component.html.template +0 -7
  416. package/schematics/bootstrap-app/templates/src/app/app.component.scss.template +0 -12
  417. package/schematics/bootstrap-app/templates/src/app/app.component.ts.template +0 -19
  418. package/schematics/bootstrap-app/templates/src/app/app.module.ts.template +0 -74
  419. package/schematics/bootstrap-app/templates/src/app/components/components.module.ts.template +0 -16
  420. package/schematics/bootstrap-app/templates/src/app/i18n.ts.template +0 -9
  421. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
  422. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -1
  423. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -2373
  424. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
  425. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
  426. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
  427. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/README.md +0 -9
  428. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/codepoints +0 -932
  429. package/schematics/bootstrap-app/templates/src/assets/fonts/material-design-icons/material-icons.css +0 -36
  430. package/schematics/bootstrap-app/templates/src/index.html.template +0 -13
  431. package/schematics/bootstrap-app/templates/src/styles/global-variables.scss.template +0 -13
  432. package/schematics/bootstrap-app/templates/src/styles.scss.template +0 -85
  433. package/schematics/collection.json +0 -48
  434. package/schematics/component/index.d.ts +0 -3
  435. package/schematics/component/index.js +0 -36
  436. package/schematics/component/index.js.map +0 -1
  437. package/schematics/component/index.spec.d.ts +0 -1
  438. package/schematics/component/index.spec.js +0 -364
  439. package/schematics/component/index.spec.js.map +0 -1
  440. package/schematics/component/schema.d.ts +0 -5
  441. package/schematics/component/schema.js +0 -3
  442. package/schematics/component/schema.js.map +0 -1
  443. package/schematics/component/schema.json +0 -39
  444. package/schematics/component/templates/component/__name@dasherize__.component.html.template +0 -1
  445. package/schematics/component/templates/component/__name@dasherize__.component.scss.template +0 -4
  446. package/schematics/component/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
  447. package/schematics/component/templates/component/__name@dasherize__.component.ts.template +0 -24
  448. package/schematics/component/templates/component/__name@dasherize__.i18n.yml.template +0 -1
  449. package/schematics/ng-add/index.d.ts +0 -3
  450. package/schematics/ng-add/index.js +0 -37
  451. package/schematics/ng-add/index.js.map +0 -1
  452. package/schematics/package-util.d.ts +0 -13
  453. package/schematics/package-util.js +0 -61
  454. package/schematics/package-util.js.map +0 -1
  455. package/schematics/place-add/index.d.ts +0 -3
  456. package/schematics/place-add/index.js +0 -45
  457. package/schematics/place-add/index.js.map +0 -1
  458. package/schematics/place-add/index.spec.d.ts +0 -1
  459. package/schematics/place-add/index.spec.js +0 -364
  460. package/schematics/place-add/index.spec.js.map +0 -1
  461. package/schematics/place-add/schema.d.ts +0 -4
  462. package/schematics/place-add/schema.js +0 -3
  463. package/schematics/place-add/schema.js.map +0 -1
  464. package/schematics/place-add/schema.json +0 -27
  465. package/schematics/place-add/templates/component/__name@dasherize__.component.html.template +0 -1
  466. package/schematics/place-add/templates/component/__name@dasherize__.component.scss.template +0 -4
  467. package/schematics/place-add/templates/component/__name@dasherize__.component.spec.ts.template +0 -25
  468. package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +0 -35
  469. package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +0 -5
  470. package/schematics/place-bootstrap/index.d.ts +0 -3
  471. package/schematics/place-bootstrap/index.js +0 -21
  472. package/schematics/place-bootstrap/index.js.map +0 -1
  473. package/schematics/place-bootstrap/schema.d.ts +0 -4
  474. package/schematics/place-bootstrap/schema.js +0 -3
  475. package/schematics/place-bootstrap/schema.js.map +0 -1
  476. package/schematics/place-bootstrap/schema.json +0 -28
  477. package/schematics/place-bootstrap/templates/__name@dasherize__/place-routes.ts.template +0 -3
  478. package/schematics/place-bootstrap/templates/__name@dasherize__/places.module.ts.template +0 -16
  479. package/schematics/place-routes/index.d.ts +0 -3
  480. package/schematics/place-routes/index.js +0 -24
  481. package/schematics/place-routes/index.js.map +0 -1
  482. package/schematics/place-routes/place-builder.d.ts +0 -18
  483. package/schematics/place-routes/place-builder.js +0 -123
  484. package/schematics/place-routes/place-builder.js.map +0 -1
  485. package/schematics/place-routes/place-class-scanner.d.ts +0 -47
  486. package/schematics/place-routes/place-class-scanner.js +0 -223
  487. package/schematics/place-routes/place-class-scanner.js.map +0 -1
  488. package/schematics/place-routes/place-def.d.ts +0 -62
  489. package/schematics/place-routes/place-def.js +0 -195
  490. package/schematics/place-routes/place-def.js.map +0 -1
  491. package/schematics/place-routes/schema.d.ts +0 -4
  492. package/schematics/place-routes/schema.js +0 -3
  493. package/schematics/place-routes/schema.js.map +0 -1
  494. package/schematics/place-routes/schema.json +0 -26
  495. package/schematics/place-routes/templates/place-routes.ts.template +0 -15
  496. package/schematics/utils/build-context.d.ts +0 -74
  497. package/schematics/utils/build-context.js +0 -189
  498. package/schematics/utils/build-context.js.map +0 -1
  499. package/schematics/utils/decorators/decorated-class.d.ts +0 -13
  500. package/schematics/utils/decorators/decorated-class.js +0 -28
  501. package/schematics/utils/decorators/decorated-class.js.map +0 -1
  502. package/schematics/utils/decorators/decorated-source-file.d.ts +0 -15
  503. package/schematics/utils/decorators/decorated-source-file.js +0 -27
  504. package/schematics/utils/decorators/decorated-source-file.js.map +0 -1
  505. package/schematics/utils/import-def.d.ts +0 -30
  506. package/schematics/utils/import-def.js +0 -97
  507. package/schematics/utils/import-def.js.map +0 -1
  508. package/schematics/utils/method-scanner.d.ts +0 -16
  509. package/schematics/utils/method-scanner.js +0 -70
  510. package/schematics/utils/method-scanner.js.map +0 -1
  511. package/schematics/utils/mixin.d.ts +0 -11
  512. package/schematics/utils/mixin.js +0 -27
  513. package/schematics/utils/mixin.js.map +0 -1
  514. package/schematics/utils/parameter-def.d.ts +0 -5
  515. package/schematics/utils/parameter-def.js +0 -3
  516. package/schematics/utils/parameter-def.js.map +0 -1
  517. package/schematics/utils/path-helper.d.ts +0 -14
  518. package/schematics/utils/path-helper.js +0 -30
  519. package/schematics/utils/path-helper.js.map +0 -1
  520. package/schematics/utils/schematic-tree-file-system.d.ts +0 -30
  521. package/schematics/utils/schematic-tree-file-system.js +0 -113
  522. package/schematics/utils/schematic-tree-file-system.js.map +0 -1
  523. package/schematics/utils/source-file-scanner.d.ts +0 -14
  524. package/schematics/utils/source-file-scanner.js +0 -89
  525. package/schematics/utils/source-file-scanner.js.map +0 -1
  526. package/schematics/utils/source-file-utilities.d.ts +0 -6
  527. package/schematics/utils/source-file-utilities.js +0 -36
  528. package/schematics/utils/source-file-utilities.js.map +0 -1
  529. package/schematics/utils/stringy.d.ts +0 -15
  530. package/schematics/utils/stringy.js +0 -50
  531. package/schematics/utils/stringy.js.map +0 -1
  532. package/schematics/utils/template-utilities.d.ts +0 -2
  533. package/schematics/utils/template-utilities.js +0 -24
  534. package/schematics/utils/template-utilities.js.map +0 -1
  535. package/schematics/utils/workspace.d.ts +0 -15
  536. package/schematics/utils/workspace.js +0 -59
  537. package/schematics/utils/workspace.js.map +0 -1
@@ -1,195 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PlaceDef = void 0;
13
- const fast_memoize_decorator_1 = require("@typescript-plus/fast-memoize-decorator");
14
- const _ = require("lodash");
15
- const place_class_scanner_1 = require("./place-class-scanner");
16
- class PlaceDef {
17
- constructor(sourceFilePath, importPath, componentClass, properties, routeDef, routeParameters, childRefs, defaultChildComponentClass, redirectToFirstChild) {
18
- this.sourceFilePath = sourceFilePath;
19
- this.importPath = importPath;
20
- this.componentClass = componentClass;
21
- this.properties = properties;
22
- this.routeDef = routeDef;
23
- this.routeParameters = routeParameters;
24
- this.childRefs = childRefs;
25
- this.defaultChildComponentClass = defaultChildComponentClass;
26
- this.redirectToFirstChild = redirectToFirstChild;
27
- }
28
- get path() {
29
- return PlaceDef.stripEnclosingQuotes(this.properties.path);
30
- }
31
- get routeIdentifier() {
32
- return this.routeDef;
33
- }
34
- get fullPath() {
35
- return !!this.routeIdentifier ?
36
- `${this.path}/:${this.routeIdentifier.parameterName}` :
37
- this.path;
38
- }
39
- getVisitParameterImports() {
40
- return _.uniq([this.routeIdentifier, ...this.routeParameters].filter(p => !!p && !_.isEmpty(p.importDef))).map(p => p.importDef);
41
- }
42
- getPlaceDestinationParameterArg(name) {
43
- const bits = [];
44
- if (this.routeIdentifier) {
45
- const optional = this.routeIdentifier.optional ? "?" : "";
46
- bits.push(`${this.routeIdentifier.parameterName}${optional}:${this.routeIdentifier.parameterType}${this.routeIdentifier.array ? '[]' : ''}`);
47
- }
48
- if (this.routeParameters && this.routeParameters.length > 0) {
49
- const properties = this.routeParameters.map(p => `${p.parameterName}?: ${p.parameterType}${p.array ? '[]' : ''}`);
50
- bits.push(`${name}?: { ${properties.join(', ')} }`);
51
- }
52
- return bits.join(', ');
53
- }
54
- getPlaceDestinationCreateVisitMethod() {
55
- const parameterNames = [];
56
- if (this.routeIdentifier) {
57
- parameterNames.push(this.routeIdentifier.parameterName);
58
- }
59
- if (this.routeParameters && this.routeParameters.length > 0) {
60
- parameterNames.push('visitParams');
61
- }
62
- return `createVisit(${this.getPlaceDestinationParameterArg('visitParams')}): Visit {
63
- return new ${this.componentClass}Visit(${parameterNames.join(', ')});
64
- }`;
65
- }
66
- getPlaceDestinationVisitConstructor() {
67
- const parameterNames = [];
68
- if (this.routeIdentifier) {
69
- parameterNames.push(this.routeIdentifier.parameterName);
70
- }
71
- if (this.routeParameters && this.routeParameters.length > 0) {
72
- parameterNames.push('...visitParams');
73
- }
74
- return `constructor(${this.getPlaceDestinationParameterArg('visitParams')}) {
75
- super(PlaceComponent.getDefinition(${this.componentClass}), {${parameterNames.join(', ')}});
76
- }`;
77
- }
78
- get placeName() {
79
- const s = this.componentClass.replace(/Component$/, '');
80
- return s.charAt(0).toLowerCase() + s.slice(1);
81
- }
82
- setParent(placeDef) {
83
- this.parent = placeDef;
84
- }
85
- isChild() {
86
- return !!this.parent;
87
- }
88
- requiresRouteGuard() {
89
- return this.routeIdentifier || this.routeParameters.length > 0;
90
- }
91
- get routeModelName() {
92
- return this.routeDef ? this.routeDef.modelName : null;
93
- }
94
- get authenticate() {
95
- return this.properties.authenticate === 'true';
96
- }
97
- get children() {
98
- return this.childRefs.map(cr => cr.placeDef);
99
- }
100
- getRouteTemplate() {
101
- const bits = [];
102
- if (this.routeIdentifier) {
103
- bits.push(`{path: "${this.path}", redirectTo: "${this.path}/"},`);
104
- }
105
- bits.push(`{
106
- path: "${this.fullPath}",
107
- component: ${this.componentClass},
108
- canActivate: [PlaceGuard],
109
- canDeactivate: [PlaceGuard],
110
- runGuardsAndResolvers: ${this.redirectToFirstChild ? `"always", // if we don't do this the guards don't get called when navigating from a child to the parent` : `"paramsOrQueryParamsChange",`}
111
- children:[
112
- ${this.getChildRouteTemplates().join(', ')}
113
- ]
114
- }`);
115
- return bits.join('\n');
116
- }
117
- getChildRouteTemplates() {
118
- if (this.defaultChildRef) {
119
- const redirectTo = this.defaultChildRef.routeIdentifier ? `${this.defaultChildRef.path}/` : this.defaultChildRef.path;
120
- return [
121
- `{path:"", redirectTo:"${redirectTo}", pathMatch:"full"}`,
122
- ...this.children.map(c => c.getRouteTemplate())
123
- ];
124
- }
125
- else {
126
- return this.children.map(c => c.getRouteTemplate());
127
- }
128
- }
129
- get defaultChildRef() {
130
- if (this.defaultChildComponentClass) {
131
- const placeDef = this.children.find(c => c.componentClass === this.defaultChildComponentClass);
132
- if (!placeDef) {
133
- throw new Error(`defaultChild is not a known child of this place, should be one of ${this.children.map(c => c.componentClass)}, got ${this.defaultChildComponentClass}`);
134
- }
135
- return placeDef;
136
- }
137
- return null;
138
- }
139
- }
140
- __decorate([
141
- (0, fast_memoize_decorator_1.Memoize)()
142
- // @ts-ignore keeps compaining about experimental decorators not being enabled... but they are.
143
- ,
144
- __metadata("design:type", Object),
145
- __metadata("design:paramtypes", [])
146
- ], PlaceDef.prototype, "path", null);
147
- __decorate([
148
- (0, fast_memoize_decorator_1.Memoize)()
149
- // @ts-ignore keeps compaining about experimental decorators not being enabled... but they are.
150
- ,
151
- __metadata("design:type", Object),
152
- __metadata("design:paramtypes", [])
153
- ], PlaceDef.prototype, "placeName", null);
154
- __decorate([
155
- (0, fast_memoize_decorator_1.Memoize)()
156
- // @ts-ignore keeps compaining about experimental decorators not being enabled... but they are.
157
- ,
158
- __metadata("design:type", Object),
159
- __metadata("design:paramtypes", [])
160
- ], PlaceDef.prototype, "routeModelName", null);
161
- __decorate([
162
- (0, fast_memoize_decorator_1.Memoize)()
163
- // @ts-ignore keeps compaining about experimental decorators not being enabled... but they are.
164
- ,
165
- __metadata("design:type", PlaceDef),
166
- __metadata("design:paramtypes", [])
167
- ], PlaceDef.prototype, "defaultChildRef", null);
168
- exports.PlaceDef = PlaceDef;
169
- (function (PlaceDef) {
170
- function scan(sourceFile, classDecl, context) {
171
- return new place_class_scanner_1.PlaceClassScanner(sourceFile, classDecl, context);
172
- }
173
- PlaceDef.scan = scan;
174
- function stripEnclosingQuotes(value) {
175
- const cooked = value.replace(/(^["'])|(["']$)/g, '');
176
- // console.log({ raw: value, cooked: cooked });
177
- return cooked;
178
- }
179
- PlaceDef.stripEnclosingQuotes = stripEnclosingQuotes;
180
- class ChildRef {
181
- constructor(filePath, componentClass) {
182
- this.filePath = filePath;
183
- this.componentClass = componentClass;
184
- }
185
- get placeDef() {
186
- return this._placeDef;
187
- }
188
- resolve(placeDefs) {
189
- this._placeDef = placeDefs.find(d => d.sourceFilePath === this.filePath && d.componentClass === this.componentClass);
190
- return this._placeDef;
191
- }
192
- }
193
- PlaceDef.ChildRef = ChildRef;
194
- })(PlaceDef = exports.PlaceDef || (exports.PlaceDef = {}));
195
- //# sourceMappingURL=place-def.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"place-def.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-routes/place-def.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,oFAAgE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OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;QAED,OAAO,CAAC,SAAqB;YAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,KAAK,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC;YACrH,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;KACF;IAdY,iBAAQ,WAcpB,CAAA;AAGH,CAAC,EA/CgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA+CxB"}
@@ -1,4 +0,0 @@
1
- export interface Schema {
2
- project: string;
3
- dir: string;
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-routes/schema.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/schema",
3
- "$id": "place-routes",
4
- "type": "object",
5
- "properties": {
6
- "project": {
7
- "type": "string",
8
- "description": "The name of the project.",
9
- "$default": {
10
- "$source": "projectName"
11
- }
12
- },
13
- "dir": {
14
- "type": "string",
15
- "description": "The directory to scan for place components",
16
- "$default": {
17
- "$source": "argv",
18
- "index": 0
19
- }
20
- }
21
- },
22
- "required": [
23
- "project",
24
- "dir"
25
- ]
26
- }
@@ -1,15 +0,0 @@
1
- // DO NOT EDIT!!!
2
- // This file is automatically generated using:
3
- // ng generate @coolon/angular-ui-powerups:place-routes --project=powerup-demo --dir=app/places
4
-
5
- import { inject } from '@angular/core';
6
- import {ActivatedRouteSnapshot, RouterStateSnapshot, Routes} from '@angular/router';
7
- import {PlaceComponent, PlaceGuard} from '@coolon/angular-ui-powerups';
8
-
9
- <% placeDefs.forEach(def => { %>import {<%= def.componentClass %>} from "<%= def.importPath %>";
10
- <% }); %>
11
-
12
- export const placeRoutes:Routes = [<% placeDefs.filter(def=> !def.isChild()).forEach(def => { %>
13
- <%= def.getRouteTemplate() %>,
14
- <% }) %>
15
- ];
@@ -1,74 +0,0 @@
1
- import { SchematicContext, Tree } from '@angular-devkit/schematics';
2
- import { ClassDeclaration, SourceFile } from 'ts-morph';
3
- import { DecoratedSourceFile } from './decorators/decorated-source-file';
4
- export declare abstract class BuildContext {
5
- readonly tree: Tree;
6
- readonly projectName: string;
7
- protected readonly settings: BuildContext.Settings;
8
- readonly context: SchematicContext;
9
- private typescriptProject;
10
- readonly sourceCodeRootDir: BuildContext.RootDir;
11
- readonly appCodeRootDir: BuildContext.RootDir;
12
- constructor(tree: Tree, projectName: string, settings: BuildContext.Settings, context: SchematicContext);
13
- get logger(): {
14
- info(message: string): void;
15
- error(message: string): void;
16
- fatal(message: string): void;
17
- };
18
- get tsConfigPath(): string;
19
- get sourceCodeRoot(): string;
20
- get sourceRoot(): any;
21
- get rootDir(): any;
22
- get selectorPrefix(): any;
23
- private loadTypeScriptProject;
24
- getI18nClasName(): string;
25
- scanClassesInTree(tree: Tree, scanRootDirectory: string, scanClass: (sourceFile: SourceFile, classDeclaration: ClassDeclaration, path: string) => void): void;
26
- findFileInAncestorPath(pathToSourceRoot: string[], fileName: string): string;
27
- getSourceFile(pathFromSrcRoot: string): DecoratedSourceFile;
28
- }
29
- export declare namespace BuildContext {
30
- interface Settings {
31
- readonly workspaceProject: any;
32
- readonly projectType: string;
33
- readonly tsConfigPath: string;
34
- }
35
- class App extends BuildContext {
36
- }
37
- class Lib extends BuildContext {
38
- }
39
- abstract class Dir {
40
- private readonly pathToRoot;
41
- protected abstract getPath(): string;
42
- protected abstract getAbsPath(): string;
43
- protected abstract getTreePath(): string;
44
- abstract getRoot(): BuildContext.Dir;
45
- constructor();
46
- get path(): string;
47
- get treePath(): string;
48
- get absPath(): string;
49
- relativeDir(path: string): Dir;
50
- getDotPathToRoot(): string;
51
- private clean;
52
- getRelativePathTo(path: string): string;
53
- private resolveAgainstRoot;
54
- }
55
- class RootDir extends Dir {
56
- private readonly treeAbsRoot;
57
- readonly _treePath: string;
58
- constructor(treeAbsRoot: string, _treePath: string);
59
- protected getTreePath(): string;
60
- protected getPath(): string;
61
- getRoot(): BuildContext.Dir;
62
- protected getAbsPath(): string;
63
- relativeDir(path: string): BuildContext.Dir;
64
- }
65
- class RelativeDir extends Dir {
66
- private readonly parent;
67
- private readonly _relativePath;
68
- constructor(parent: Dir, _relativePath: string);
69
- getRoot(): BuildContext.Dir;
70
- protected getPath(): string;
71
- protected getTreePath(): string;
72
- protected getAbsPath(): string;
73
- }
74
- }
@@ -1,189 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuildContext = void 0;
4
- const _ = require("lodash");
5
- const ts_morph_1 = require("ts-morph");
6
- const decorated_source_file_1 = require("./decorators/decorated-source-file");
7
- class BuildContext {
8
- constructor(tree, projectName, settings, context) {
9
- this.tree = tree;
10
- this.projectName = projectName;
11
- this.settings = settings;
12
- this.context = context;
13
- this.typescriptProject = this.loadTypeScriptProject();
14
- const projectAbsRootDir = this.typescriptProject.getModuleResolutionHost().realpath(".");
15
- this.sourceCodeRootDir = new BuildContext.RootDir(`${projectAbsRootDir}`, `${this.settings.workspaceProject.sourceRoot}/${this.settings.projectType}`);
16
- }
17
- get logger() {
18
- return this.context.logger;
19
- }
20
- get tsConfigPath() {
21
- return this.settings.tsConfigPath;
22
- }
23
- get sourceCodeRoot() {
24
- return this.sourceCodeRootDir.treePath;
25
- }
26
- get sourceRoot() {
27
- return this.settings.workspaceProject.sourceRoot;
28
- }
29
- get rootDir() {
30
- return this.settings.workspaceProject.root;
31
- }
32
- get selectorPrefix() {
33
- return this.settings.workspaceProject['prefix'];
34
- }
35
- loadTypeScriptProject() {
36
- // TODO: this barfs if you're not running it from teh project root directory
37
- this.logger.info(`loading tsConfig from -> ${this.tsConfigPath}`);
38
- try {
39
- return new ts_morph_1.Project({
40
- tsConfigFilePath: this.tsConfigPath
41
- // this isn't finding things during the place-routes schematic... and I can't remember why I needed it....
42
- // fileSystem: new SchematicTreeFileSystem(this.tree, this.context)
43
- });
44
- }
45
- catch (error) {
46
- this.logger.error(error.toString());
47
- this.logger.fatal(`Failed to load typescript project from: ${this.tsConfigPath} You probably need to specify the --project option?`);
48
- throw error;
49
- }
50
- }
51
- getI18nClasName() {
52
- var _a, _b;
53
- const i18nConfig = this.tree.readJson(`${this.rootDir}/i18n.config.json`);
54
- return (_b = (typeof i18nConfig == 'object' && !Array.isArray(i18nConfig) ? (_a = i18nConfig["class"]) === null || _a === void 0 ? void 0 : _a.toString() : undefined)) !== null && _b !== void 0 ? _b : "I18n";
55
- }
56
- scanClassesInTree(tree, scanRootDirectory, scanClass) {
57
- const importPrefix = `./${scanRootDirectory}`;
58
- this.context.logger.info(`Scanning sources in -> ${scanRootDirectory}`);
59
- tree.getDir(scanRootDirectory).visit(filePath => {
60
- if (!filePath.endsWith('.ts') || filePath.endsWith('.spec.ts')) {
61
- return;
62
- }
63
- const content = tree.read(filePath);
64
- if (!content) {
65
- return;
66
- }
67
- const sourceFile = this.typescriptProject.getSourceFileOrThrow(`./${filePath}`);
68
- const imports = sourceFile.getImportDeclarations();
69
- sourceFile.getClasses().forEach((classDecl) => {
70
- scanClass(sourceFile, classDecl, filePath);
71
- });
72
- });
73
- }
74
- findFileInAncestorPath(pathToSourceRoot, fileName) {
75
- for (let i = pathToSourceRoot.length; i > 0; i--) {
76
- const possibleModulePath = pathToSourceRoot.slice(0, i).join('/') + `/${fileName}`;
77
- if (this.tree.exists(possibleModulePath)) {
78
- return possibleModulePath;
79
- }
80
- }
81
- return undefined;
82
- }
83
- getSourceFile(pathFromSrcRoot) {
84
- // Weirdness with out tree based file system, `getSourceFile(..)` returns undefined.
85
- // const f = this.typescriptProject.getSourceFile(path);
86
- // to work around it we
87
- const fileEntry = this.tree.get(pathFromSrcRoot);
88
- const sourceFile = this.typescriptProject.createSourceFile(pathFromSrcRoot, fileEntry.content.toString('utf8'), {
89
- overwrite: true
90
- });
91
- return decorated_source_file_1.DecoratedSourceFile.create(sourceFile, pathFromSrcRoot);
92
- }
93
- }
94
- exports.BuildContext = BuildContext;
95
- (function (BuildContext) {
96
- class App extends BuildContext {
97
- }
98
- BuildContext.App = App;
99
- class Lib extends BuildContext {
100
- }
101
- BuildContext.Lib = Lib;
102
- class Dir {
103
- constructor() {
104
- // const sourcePrefix = 1 + this.sourceRoot.length;
105
- // const resourcePath = filePath.substr(1 + sourcePrefix, filePath.length - 1 - sourcePrefix - '.ts'.length);
106
- // const relativePath = this.outDir.substr(sourcePrefix).split('/').map(v => '..').join('/');
107
- // const absolutResourceClassPath = `${relativePath}/${resourcePath}`;
108
- }
109
- get path() {
110
- return this.clean(this.getPath());
111
- }
112
- get treePath() {
113
- return this.clean(this.getTreePath());
114
- }
115
- get absPath() {
116
- return this.clean(this.getAbsPath());
117
- }
118
- relativeDir(path) {
119
- return new BuildContext.RelativeDir(this, path);
120
- }
121
- getDotPathToRoot() {
122
- const result = `${this.path.split('/')
123
- .filter(p => !_.isEmpty(p))
124
- .map(d => '..').join('/')}/`;
125
- return result;
126
- }
127
- clean(path) {
128
- return path.replace(/\/\/+/, "/");
129
- }
130
- getRelativePathTo(path) {
131
- const other = this.resolveAgainstRoot(path);
132
- return this.clean(`${this.getDotPathToRoot()}/${other.path}`);
133
- }
134
- resolveAgainstRoot(path) {
135
- if (path.startsWith(this.getRoot().absPath)) {
136
- return this.getRoot().relativeDir(path.substring(this.getRoot().absPath.length));
137
- }
138
- if (path.startsWith(this.getRoot().treePath)) {
139
- return this.getRoot().relativeDir(path.substring(this.getRoot().treePath.length));
140
- }
141
- return this.getRoot().relativeDir(path);
142
- }
143
- }
144
- BuildContext.Dir = Dir;
145
- class RootDir extends Dir {
146
- constructor(treeAbsRoot, _treePath) {
147
- super();
148
- this.treeAbsRoot = treeAbsRoot;
149
- this._treePath = _treePath;
150
- }
151
- getTreePath() {
152
- return this._treePath;
153
- }
154
- getPath() {
155
- return "";
156
- }
157
- getRoot() {
158
- return this;
159
- }
160
- getAbsPath() {
161
- return `${this.treeAbsRoot}/${this.treePath}`;
162
- }
163
- relativeDir(path) {
164
- return new RelativeDir(this, path);
165
- }
166
- }
167
- BuildContext.RootDir = RootDir;
168
- class RelativeDir extends Dir {
169
- constructor(parent, _relativePath) {
170
- super();
171
- this.parent = parent;
172
- this._relativePath = _relativePath;
173
- }
174
- getRoot() {
175
- return this.parent.getRoot();
176
- }
177
- getPath() {
178
- return `${this.parent.path}/${this._relativePath}`;
179
- }
180
- getTreePath() {
181
- return `${this.parent.treePath}/${this._relativePath}`;
182
- }
183
- getAbsPath() {
184
- return `${this.parent.absPath}/${this.getRelativePathTo}`;
185
- }
186
- }
187
- BuildContext.RelativeDir = RelativeDir;
188
- })(BuildContext = exports.BuildContext || (exports.BuildContext = {}));
189
- //# sourceMappingURL=build-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-context.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/utils/build-context.ts"],"names":[],"mappings":";;;AACA,4BAA4B;AAC5B,uCAA+D;AAC/D,8EAAuE;AAEvE,MAAsB,YAAY;IAKhC,YAAqB,IAAU,EAAW,WAAmB,EAAqB,QAA+B,EAAW,OAAyB;QAAhI,SAAI,GAAJ,IAAI,CAAM;QAAW,gBAAW,GAAX,WAAW,CAAQ;QAAqB,aAAQ,GAAR,QAAQ,CAAuB;QAAW,YAAO,GAAP,OAAO,CAAkB;QACnJ,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACtD,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACzF,IAAI,CAAC,iBAAiB,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,GAAG,iBAAiB,EAA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AAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC5D,CAAC;KAEF;IArBY,wBAAW,cAqBvB,CAAA;AAEH,CAAC,EA9HgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA8H5B"}
@@ -1,13 +0,0 @@
1
- import { ClassDeclaration, Decorator } from 'ts-morph';
2
- import { Mixin } from "../mixin";
3
- export interface DecoratedClass extends ClassDeclaration, ClassDecoratorMixin {
4
- }
5
- export declare class ClassDecoratorMixin extends Mixin<ClassDeclaration> {
6
- private readonly target;
7
- constructor(target: ClassDeclaration);
8
- hasClassDecorator(name: string): boolean;
9
- getClassDecoratorNode(name: string): Decorator;
10
- }
11
- export declare namespace DecoratedClass {
12
- function create(classDeclaration: ClassDeclaration): DecoratedClass;
13
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DecoratedClass = exports.ClassDecoratorMixin = void 0;
4
- const mixin_1 = require("../mixin");
5
- const source_file_utilities_1 = require("../source-file-utilities");
6
- class ClassDecoratorMixin extends mixin_1.Mixin {
7
- constructor(target) {
8
- super();
9
- this.target = target;
10
- }
11
- hasClassDecorator(name) {
12
- return !!this.getClassDecoratorNode(name);
13
- }
14
- getClassDecoratorNode(name) {
15
- return this.target.forEachChildAsArray().find((node) => {
16
- return (0, source_file_utilities_1.isDecoratorNode)(node, name);
17
- });
18
- }
19
- }
20
- exports.ClassDecoratorMixin = ClassDecoratorMixin;
21
- var DecoratedClass;
22
- (function (DecoratedClass) {
23
- function create(classDeclaration) {
24
- return mixin_1.Mixin.createProxy(classDeclaration, new ClassDecoratorMixin(classDeclaration));
25
- }
26
- DecoratedClass.create = create;
27
- })(DecoratedClass = exports.DecoratedClass || (exports.DecoratedClass = {}));
28
- //# sourceMappingURL=decorated-class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decorated-class.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/schematics/utils/decorators/decorated-class.ts"],"names":[],"mappings":";;;AACA,oCAAiC;AACjC,oEAA2D;AAM3D,MAAa,mBAAoB,SAAQ,aAAuB;IAC9D,YAA6B,MAAwB;QACnD,KAAK,EAAE,CAAC;QADmB,WAAM,GAAN,MAAM,CAAkB;IAErD,CAAC;IAED,iBAAiB,CAAC,IAAW;QAC3B,OAAO,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,qBAAqB,CAAC,IAAY;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACrD,OAAO,IAAA,uCAAe,EAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACpC,CAAC,CAAc,CAAC;IAClB,CAAC;CACF;AAdD,kDAcC;AAED,IAAiB,cAAc,CAI9B;AAJD,WAAiB,cAAc;IAC7B,SAAgB,MAAM,CAAC,gBAAkC;QACvD,OAAO,aAAK,CAAC,WAAW,CAAC,gBAAgB,EAAE,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxF,CAAC;IAFe,qBAAM,SAErB,CAAA;AACH,CAAC,EAJgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAI9B"}
@@ -1,15 +0,0 @@
1
- import { SourceFile } from 'ts-morph';
2
- import { Mixin } from "../mixin";
3
- import { DecoratedClass } from './decorated-class';
4
- export interface DecoratedSourceFile extends Omit<SourceFile, 'getClasses'>, SourceFileDecoratorMixin {
5
- }
6
- export declare class SourceFileDecoratorMixin extends Mixin<SourceFile> {
7
- private readonly target;
8
- readonly path: string;
9
- constructor(target: SourceFile, path: string);
10
- findClassWithDecorator(name: string): DecoratedClass;
11
- getClasses(): DecoratedClass[];
12
- }
13
- export declare namespace DecoratedSourceFile {
14
- function create(sourceFile: SourceFile, path: string): DecoratedSourceFile;
15
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DecoratedSourceFile = exports.SourceFileDecoratorMixin = void 0;
4
- const mixin_1 = require("../mixin");
5
- const decorated_class_1 = require("./decorated-class");
6
- class SourceFileDecoratorMixin extends mixin_1.Mixin {
7
- constructor(target, path) {
8
- super();
9
- this.target = target;
10
- this.path = path;
11
- }
12
- findClassWithDecorator(name) {
13
- return this.getClasses().find(c => c.hasClassDecorator(name));
14
- }
15
- getClasses() {
16
- return this.target.getClasses().map(c => decorated_class_1.DecoratedClass.create(c));
17
- }
18
- }
19
- exports.SourceFileDecoratorMixin = SourceFileDecoratorMixin;
20
- var DecoratedSourceFile;
21
- (function (DecoratedSourceFile) {
22
- function create(sourceFile, path) {
23
- return mixin_1.Mixin.createProxy(sourceFile, new SourceFileDecoratorMixin(sourceFile, path));
24
- }
25
- DecoratedSourceFile.create = create;
26
- })(DecoratedSourceFile = exports.DecoratedSourceFile || (exports.DecoratedSourceFile = {}));
27
- //# sourceMappingURL=decorated-source-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decorated-source-file.js","sourceRoot":"","sources":["../../../../../../libs/angular-ui-powerups/schematics/utils/decorators/decorated-source-file.ts"],"names":[],"mappings":";;;AAEA,oCAAiC;AACjC,uDAAmD;AAKnD,MAAa,wBAAyB,SAAQ,aAAiB;IAC7D,YAA6B,MAAkB,EAAW,IAAY;QACpE,KAAK,EAAE,CAAC;QADmB,WAAM,GAAN,MAAM,CAAY;QAAW,SAAI,GAAJ,IAAI,CAAQ;IAEtE,CAAC;IAED,sBAAsB,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,gCAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;CACF;AAZD,4DAYC;AAED,IAAiB,mBAAmB,CAInC;AAJD,WAAiB,mBAAmB;IAClC,SAAgB,MAAM,CAAC,UAAsB,EAAE,IAAY;QACzD,OAAO,aAAK,CAAC,WAAW,CAAC,UAAU,EAAE,IAAI,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IACvF,CAAC;IAFe,0BAAM,SAErB,CAAA;AACH,CAAC,EAJgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAInC"}