@coolon/angular-ui-powerups 0.0.26 → 0.0.28

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 (287) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +3930 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -0
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -0
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -0
  5. package/coolon-angular-ui-powerups.d.ts +30 -0
  6. package/coolon-angular-ui-powerups.metadata.json +1 -0
  7. package/esm2015/coolon-angular-ui-powerups.js +33 -0
  8. package/esm2015/index.js +6 -0
  9. package/esm2015/lib/angular-ui-powerups.module.js +54 -0
  10. package/esm2015/lib/animations/index.js +9 -0
  11. package/esm2015/lib/animations/slideDownAndUpAnimation.js +30 -0
  12. package/esm2015/lib/components/disposable-component.js +14 -0
  13. package/esm2015/lib/components/forms/abstract-input.component.js +183 -0
  14. package/esm2015/lib/components/forms/number-input/number-input.component.js +26 -0
  15. package/esm2015/lib/components/forms/password-input/password-input.component.js +26 -0
  16. package/esm2015/lib/components/forms/select-input/select-input.component.js +60 -0
  17. package/esm2015/lib/components/forms/string-input/string-input.component.js +26 -0
  18. package/esm2015/lib/components/index.js +18 -0
  19. package/esm2015/lib/components/resize-aware.component.js +96 -0
  20. package/esm2015/lib/components/types/bounds.class.js +56 -0
  21. package/esm2015/lib/components/types/dimension.class.js +21 -0
  22. package/esm2015/lib/components/types/point.class.js +36 -0
  23. package/esm2015/lib/directives/command.directive.js +135 -0
  24. package/esm2015/lib/directives/focus-binding.directive.js +179 -0
  25. package/esm2015/lib/directives/index.js +10 -0
  26. package/esm2015/lib/interaction/abstract-activity.js +129 -0
  27. package/esm2015/lib/interaction/activity.js +27 -0
  28. package/esm2015/lib/interaction/alert.js +23 -0
  29. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +144 -0
  30. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js +22 -0
  31. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +169 -0
  32. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +37 -0
  33. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +46 -0
  34. package/esm2015/lib/interaction/confirm.js +17 -0
  35. package/esm2015/lib/interaction/index.js +21 -0
  36. package/esm2015/lib/interaction/interaction-context.js +35 -0
  37. package/esm2015/lib/interaction/interaction.module.js +41 -0
  38. package/esm2015/lib/interaction/result.js +24 -0
  39. package/esm2015/lib/interaction/services/dialog-interaction.service.js +114 -0
  40. package/esm2015/lib/place/abstract-place-component.js +59 -0
  41. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +44 -0
  42. package/esm2015/lib/place/components/empty-state/empty-state.component.js +28 -0
  43. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +67 -0
  44. package/esm2015/lib/place/components/place-outlet/route-animations.js +35 -0
  45. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +50 -0
  46. package/esm2015/lib/place/guards/leave-place.guard.js +52 -0
  47. package/esm2015/lib/place/guards/place-route.guard.js +74 -0
  48. package/esm2015/lib/place/index.js +27 -0
  49. package/esm2015/lib/place/place-component.js +17 -0
  50. package/esm2015/lib/place/place.decorator.js +72 -0
  51. package/esm2015/lib/place/place.module.js +49 -0
  52. package/esm2015/lib/place/place.service.js +61 -0
  53. package/esm2015/lib/place/route/json-types.js +13 -0
  54. package/esm2015/lib/place/route/parameter-decorators.js +182 -0
  55. package/esm2015/lib/place/route/parameter-definition.class.js +24 -0
  56. package/esm2015/lib/place/route/parameter-sanitiser.js +17 -0
  57. package/esm2015/lib/place/route/parameter-type.js +43 -0
  58. package/esm2015/lib/place/route/route-parameter-bindings.js +294 -0
  59. package/esm2015/lib/place/route/route-parameter-sanitiser.js +280 -0
  60. package/esm2015/public_api.js +11 -0
  61. package/esm5/coolon-angular-ui-powerups.js +33 -0
  62. package/esm5/index.js +6 -0
  63. package/esm5/lib/angular-ui-powerups.module.js +58 -0
  64. package/esm5/lib/animations/index.js +9 -0
  65. package/esm5/lib/animations/slideDownAndUpAnimation.js +30 -0
  66. package/esm5/lib/components/disposable-component.js +24 -0
  67. package/esm5/lib/components/forms/abstract-input.component.js +232 -0
  68. package/esm5/lib/components/forms/number-input/number-input.component.js +33 -0
  69. package/esm5/lib/components/forms/password-input/password-input.component.js +33 -0
  70. package/esm5/lib/components/forms/select-input/select-input.component.js +67 -0
  71. package/esm5/lib/components/forms/string-input/string-input.component.js +33 -0
  72. package/esm5/lib/components/index.js +18 -0
  73. package/esm5/lib/components/resize-aware.component.js +124 -0
  74. package/esm5/lib/components/types/bounds.class.js +59 -0
  75. package/esm5/lib/components/types/dimension.class.js +19 -0
  76. package/esm5/lib/components/types/point.class.js +43 -0
  77. package/esm5/lib/directives/command.directive.js +155 -0
  78. package/esm5/lib/directives/focus-binding.directive.js +231 -0
  79. package/esm5/lib/directives/index.js +10 -0
  80. package/esm5/lib/interaction/abstract-activity.js +173 -0
  81. package/esm5/lib/interaction/activity.js +27 -0
  82. package/esm5/lib/interaction/alert.js +23 -0
  83. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +181 -0
  84. package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js +22 -0
  85. package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +206 -0
  86. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +42 -0
  87. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +54 -0
  88. package/esm5/lib/interaction/confirm.js +17 -0
  89. package/esm5/lib/interaction/index.js +21 -0
  90. package/esm5/lib/interaction/interaction-context.js +45 -0
  91. package/esm5/lib/interaction/interaction.module.js +45 -0
  92. package/esm5/lib/interaction/result.js +24 -0
  93. package/esm5/lib/interaction/services/dialog-interaction.service.js +140 -0
  94. package/esm5/lib/place/abstract-place-component.js +66 -0
  95. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +49 -0
  96. package/esm5/lib/place/components/empty-state/empty-state.component.js +29 -0
  97. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +81 -0
  98. package/esm5/lib/place/components/place-outlet/route-animations.js +35 -0
  99. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +57 -0
  100. package/esm5/lib/place/guards/leave-place.guard.js +57 -0
  101. package/esm5/lib/place/guards/place-route.guard.js +78 -0
  102. package/esm5/lib/place/index.js +27 -0
  103. package/esm5/lib/place/place-component.js +17 -0
  104. package/esm5/lib/place/place.decorator.js +69 -0
  105. package/esm5/lib/place/place.module.js +53 -0
  106. package/esm5/lib/place/place.service.js +75 -0
  107. package/esm5/lib/place/route/json-types.js +13 -0
  108. package/esm5/lib/place/route/parameter-decorators.js +182 -0
  109. package/esm5/lib/place/route/parameter-definition.class.js +24 -0
  110. package/esm5/lib/place/route/parameter-sanitiser.js +17 -0
  111. package/esm5/lib/place/route/parameter-type.js +65 -0
  112. package/esm5/lib/place/route/route-parameter-bindings.js +339 -0
  113. package/esm5/lib/place/route/route-parameter-sanitiser.js +395 -0
  114. package/esm5/public_api.js +11 -0
  115. package/fesm2015/coolon-angular-ui-powerups.js +3149 -0
  116. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -0
  117. package/fesm5/coolon-angular-ui-powerups.js +3703 -0
  118. package/fesm5/coolon-angular-ui-powerups.js.map +1 -0
  119. package/lib/angular-ui-powerups.module.d.ts +2 -0
  120. package/{src/lib/animations/index.ts → lib/animations/index.d.ts} +0 -1
  121. package/lib/animations/slideDownAndUpAnimation.d.ts +5 -0
  122. package/lib/components/disposable-component.d.ts +5 -0
  123. package/lib/components/forms/abstract-input.component.d.ts +35 -0
  124. package/lib/components/forms/number-input/number-input.component.d.ts +6 -0
  125. package/lib/components/forms/password-input/password-input.component.d.ts +6 -0
  126. package/lib/components/forms/select-input/select-input.component.d.ts +11 -0
  127. package/lib/components/forms/string-input/string-input.component.d.ts +6 -0
  128. package/{src/lib/components/index.ts → lib/components/index.d.ts} +0 -1
  129. package/lib/components/resize-aware.component.d.ts +22 -0
  130. package/lib/components/types/bounds.class.d.ts +16 -0
  131. package/lib/components/types/dimension.class.d.ts +5 -0
  132. package/lib/components/types/point.class.d.ts +10 -0
  133. package/lib/directives/command.directive.d.ts +14 -0
  134. package/lib/directives/focus-binding.directive.d.ts +22 -0
  135. package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +0 -1
  136. package/lib/interaction/abstract-activity.d.ts +17 -0
  137. package/lib/interaction/activity.d.ts +11 -0
  138. package/lib/interaction/alert.d.ts +5 -0
  139. package/lib/interaction/components/activity-container/activity-container.component.d.ts +32 -0
  140. package/{src/lib/interaction/components/activity-outlet/activity-outlet-context.ts → lib/interaction/components/activity-outlet/activity-outlet-context.d.ts} +5 -7
  141. package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +30 -0
  142. package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +8 -0
  143. package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +9 -0
  144. package/{src/lib/interaction/confirm.ts → lib/interaction/confirm.d.ts} +2 -3
  145. package/{src/lib/interaction/index.ts → lib/interaction/index.d.ts} +0 -1
  146. package/lib/interaction/interaction-context.d.ts +11 -0
  147. package/lib/interaction/interaction.module.d.ts +2 -0
  148. package/lib/interaction/result.d.ts +8 -0
  149. package/lib/interaction/services/dialog-interaction.service.d.ts +14 -0
  150. package/lib/place/abstract-place-component.d.ts +13 -0
  151. package/lib/place/components/busy-overlay/busy-overlay.component.d.ts +8 -0
  152. package/lib/place/components/empty-state/empty-state.component.d.ts +5 -0
  153. package/lib/place/components/place-outlet/place-outlet.component.d.ts +13 -0
  154. package/lib/place/components/place-outlet/route-animations.d.ts +1 -0
  155. package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +11 -0
  156. package/lib/place/guards/leave-place.guard.d.ts +10 -0
  157. package/lib/place/guards/place-route.guard.d.ts +9 -0
  158. package/{src/lib/place/index.ts → lib/place/index.d.ts} +0 -1
  159. package/lib/place/place-component.d.ts +5 -0
  160. package/lib/place/place.decorator.d.ts +20 -0
  161. package/lib/place/place.module.d.ts +2 -0
  162. package/lib/place/place.service.d.ts +8 -0
  163. package/lib/place/route/json-types.d.ts +7 -0
  164. package/lib/place/route/parameter-decorators.d.ts +28 -0
  165. package/lib/place/route/parameter-definition.class.d.ts +11 -0
  166. package/{src/lib/place/route/parameter-sanitiser.ts → lib/place/route/parameter-sanitiser.d.ts} +1 -1
  167. package/lib/place/route/parameter-type.d.ts +16 -0
  168. package/lib/place/route/route-parameter-bindings.d.ts +18 -0
  169. package/lib/place/route/route-parameter-sanitiser.d.ts +42 -0
  170. package/package.json +14 -12
  171. package/schematics/ng-add/index.d.ts +2 -0
  172. package/schematics/ng-add/index.js +12 -0
  173. package/schematics/ng-add/index.js.map +1 -0
  174. package/schematics/place-routes/index.d.ts +3 -0
  175. package/schematics/place-routes/index.js +114 -0
  176. package/schematics/place-routes/index.js.map +1 -0
  177. package/schematics/place-routes/place-def.d.ts +37 -0
  178. package/schematics/place-routes/place-def.js +108 -0
  179. package/schematics/place-routes/place-def.js.map +1 -0
  180. package/schematics/place-routes/scanner.d.ts +38 -0
  181. package/schematics/place-routes/scanner.js +169 -0
  182. package/schematics/place-routes/scanner.js.map +1 -0
  183. package/schematics/place-routes/schema.d.ts +7 -0
  184. package/schematics/place-routes/schema.js +3 -0
  185. package/schematics/place-routes/schema.js.map +1 -0
  186. package/schematics/place-routes/templates/{services/place-router.service.ts.template → place-router.ts.template} +13 -18
  187. package/CHANGELOG.md +0 -7
  188. package/jest.config.js +0 -9
  189. package/ng-package.json +0 -13
  190. package/schematics/ng-add/index.ts +0 -10
  191. package/schematics/place-routes/index.ts +0 -152
  192. package/schematics/place-routes/place-def.ts +0 -93
  193. package/schematics/place-routes/scanner.ts +0 -145
  194. package/schematics/place-routes/schema.ts +0 -7
  195. package/src/lib/angular-ui-powerups.module.spec.ts +0 -14
  196. package/src/lib/angular-ui-powerups.module.ts +0 -49
  197. package/src/lib/animations/slideDownAndUpAnimation.ts +0 -39
  198. package/src/lib/components/disposable-component.ts +0 -9
  199. package/src/lib/components/forms/abstract-input.component.ts +0 -108
  200. package/src/lib/components/forms/number-input/number-input.component.html +0 -15
  201. package/src/lib/components/forms/number-input/number-input.component.scss +0 -3
  202. package/src/lib/components/forms/number-input/number-input.component.spec.ts +0 -25
  203. package/src/lib/components/forms/number-input/number-input.component.ts +0 -19
  204. package/src/lib/components/forms/password-input/password-input.component.html +0 -16
  205. package/src/lib/components/forms/password-input/password-input.component.scss +0 -3
  206. package/src/lib/components/forms/password-input/password-input.component.spec.ts +0 -25
  207. package/src/lib/components/forms/password-input/password-input.component.ts +0 -18
  208. package/src/lib/components/forms/scss/mixins.scss +0 -16
  209. package/src/lib/components/forms/select-input/select-input.component.html +0 -16
  210. package/src/lib/components/forms/select-input/select-input.component.scss +0 -7
  211. package/src/lib/components/forms/select-input/select-input.component.spec.ts +0 -25
  212. package/src/lib/components/forms/select-input/select-input.component.ts +0 -31
  213. package/src/lib/components/forms/string-input/string-input.component.html +0 -15
  214. package/src/lib/components/forms/string-input/string-input.component.scss +0 -3
  215. package/src/lib/components/forms/string-input/string-input.component.spec.ts +0 -25
  216. package/src/lib/components/forms/string-input/string-input.component.ts +0 -18
  217. package/src/lib/components/resize-aware.component.ts +0 -52
  218. package/src/lib/components/types/bounds.class.ts +0 -25
  219. package/src/lib/components/types/dimension.class.ts +0 -3
  220. package/src/lib/components/types/point.class.ts +0 -13
  221. package/src/lib/directives/command.directive.spec.ts +0 -73
  222. package/src/lib/directives/command.directive.ts +0 -81
  223. package/src/lib/directives/focus-binding.directive.spec.ts +0 -8
  224. package/src/lib/directives/focus-binding.directive.ts +0 -108
  225. package/src/lib/interaction/abstract-activity.ts +0 -57
  226. package/src/lib/interaction/activity.ts +0 -17
  227. package/src/lib/interaction/alert.ts +0 -6
  228. package/src/lib/interaction/components/activity-container/activity-container.component.html +0 -8
  229. package/src/lib/interaction/components/activity-container/activity-container.component.scss +0 -3
  230. package/src/lib/interaction/components/activity-container/activity-container.component.spec.ts +0 -25
  231. package/src/lib/interaction/components/activity-container/activity-container.component.ts +0 -93
  232. package/src/lib/interaction/components/activity-outlet/activity-outlet.component.scss +0 -3
  233. package/src/lib/interaction/components/activity-outlet/activity-outlet.component.spec.ts +0 -25
  234. package/src/lib/interaction/components/activity-outlet/activity-outlet.component.ts +0 -96
  235. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.html +0 -7
  236. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.scss +0 -7
  237. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.spec.ts +0 -25
  238. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.ts +0 -20
  239. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.html +0 -9
  240. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.scss +0 -8
  241. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -25
  242. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.ts +0 -26
  243. package/src/lib/interaction/interaction-context.ts +0 -16
  244. package/src/lib/interaction/interaction.module.ts +0 -35
  245. package/src/lib/interaction/result.ts +0 -16
  246. package/src/lib/interaction/services/dialog-interaction.service.scss +0 -11
  247. package/src/lib/interaction/services/dialog-interaction.service.spec.ts +0 -12
  248. package/src/lib/interaction/services/dialog-interaction.service.ts +0 -63
  249. package/src/lib/place/abstract-place-component.ts +0 -33
  250. package/src/lib/place/components/busy-overlay/busy-overlay.component.html +0 -4
  251. package/src/lib/place/components/busy-overlay/busy-overlay.component.scss +0 -27
  252. package/src/lib/place/components/busy-overlay/busy-overlay.component.spec.ts +0 -25
  253. package/src/lib/place/components/busy-overlay/busy-overlay.component.ts +0 -23
  254. package/src/lib/place/components/empty-state/empty-state.component.scss +0 -15
  255. package/src/lib/place/components/empty-state/empty-state.component.spec.ts +0 -25
  256. package/src/lib/place/components/empty-state/empty-state.component.ts +0 -19
  257. package/src/lib/place/components/place-outlet/place-outlet.component.html +0 -7
  258. package/src/lib/place/components/place-outlet/place-outlet.component.scss +0 -12
  259. package/src/lib/place/components/place-outlet/place-outlet.component.spec.ts +0 -25
  260. package/src/lib/place/components/place-outlet/place-outlet.component.ts +0 -37
  261. package/src/lib/place/components/place-outlet/route-animations.ts +0 -30
  262. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.html +0 -7
  263. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.scss +0 -100
  264. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.spec.ts +0 -25
  265. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts +0 -30
  266. package/src/lib/place/guards/leave-place.guard.spec.ts +0 -15
  267. package/src/lib/place/guards/leave-place.guard.ts +0 -18
  268. package/src/lib/place/guards/place-route.guard.ts +0 -37
  269. package/src/lib/place/place-component.ts +0 -6
  270. package/src/lib/place/place.decorator.ts +0 -40
  271. package/src/lib/place/place.module.ts +0 -44
  272. package/src/lib/place/place.service.spec.ts +0 -12
  273. package/src/lib/place/place.service.ts +0 -29
  274. package/src/lib/place/route/json-types.ts +0 -5
  275. package/src/lib/place/route/parameter-decorators.ts +0 -99
  276. package/src/lib/place/route/parameter-definition.class.ts +0 -12
  277. package/src/lib/place/route/parameter-type.ts +0 -31
  278. package/src/lib/place/route/route-parameter-bindings.ts +0 -140
  279. package/src/lib/place/route/route-parameter-sanitiser.ts +0 -135
  280. package/src/test-setup.ts +0 -1
  281. package/tsconfig.json +0 -7
  282. package/tsconfig.lib.json +0 -20
  283. package/tsconfig.schematics.json +0 -35
  284. package/tsconfig.spec.json +0 -10
  285. package/tslint.json +0 -7
  286. /package/{src/index.ts → index.d.ts} +0 -0
  287. /package/{src/public_api.ts → public_api.d.ts} +0 -0
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
-
5
4
  export * from "./abstract-activity";
6
5
  export * from "./activity";
7
6
  export * from "./alert";
@@ -0,0 +1,11 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { Constructable } from '@coolon/pectin';
3
+ import { Activity } from './activity';
4
+ import { Alert } from './alert';
5
+ import { Confirm } from './confirm';
6
+ export declare const INTERACTION_CONTEXT: InjectionToken<any>;
7
+ export declare abstract class InteractionContext {
8
+ abstract startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R>;
9
+ abstract confirm(confirm: Confirm): Promise<boolean>;
10
+ abstract alert(alert: Alert): Promise<void>;
11
+ }
@@ -0,0 +1,2 @@
1
+ export declare class InteractionModule {
2
+ }
@@ -0,0 +1,8 @@
1
+ export interface Result<R, E> {
2
+ }
3
+ export declare namespace Result {
4
+ interface Callback<R, E> {
5
+ then: <T>(result: R) => T;
6
+ catch: <T>(result: E) => T;
7
+ }
8
+ }
@@ -0,0 +1,14 @@
1
+ import { MatDialog } from '@angular/material';
2
+ import { Constructable } from '@coolon/pectin';
3
+ import { Activity } from '../activity';
4
+ import { Alert } from '../alert';
5
+ import { Confirm } from '../confirm';
6
+ import { InteractionContext } from '../interaction-context';
7
+ export declare class DialogInteractionService extends InteractionContext {
8
+ private readonly dialogService;
9
+ constructor(dialogService: MatDialog);
10
+ startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R>;
11
+ private _startActivity;
12
+ alert(alert: Alert): Promise<void>;
13
+ confirm(confirm: Confirm): Promise<boolean>;
14
+ }
@@ -0,0 +1,13 @@
1
+ import { ActivatedRoute, Router } from '@angular/router';
2
+ import { MutableValueModel } from '@coolon/pectin';
3
+ import { DisposableComponent } from '../components/disposable-component';
4
+ import { PlaceComponent } from './place-component';
5
+ import { Place } from './place.decorator';
6
+ export declare class AbstractPlaceComponent extends DisposableComponent implements PlaceComponent {
7
+ protected activatedRoute: ActivatedRoute;
8
+ readonly titleModel: MutableValueModel<string>;
9
+ private routeBindingMediator;
10
+ constructor(activatedRoute: ActivatedRoute, router: Router);
11
+ readonly placeConfig: Place.Descriptor;
12
+ canDeactivate(): boolean | Promise<boolean>;
13
+ }
@@ -0,0 +1,8 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ValueModel } from '@coolon/pectin';
3
+ export declare class BusyOverlayComponent implements OnInit {
4
+ busyModel: ValueModel<boolean>;
5
+ busy: boolean;
6
+ constructor();
7
+ ngOnInit(): void;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { OnInit } from '@angular/core';
2
+ export declare class EmptyStateComponent implements OnInit {
3
+ constructor();
4
+ ngOnInit(): void;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { RouterOutlet } from '@angular/router';
3
+ import { PlaceComponent } from '../../place-component';
4
+ import { PlaceService } from '../../place.service';
5
+ export declare class PlaceOutletComponent implements OnInit {
6
+ private readonly placeService;
7
+ animate: boolean;
8
+ constructor(placeService: PlaceService);
9
+ ngOnInit(): void;
10
+ onActivate($event: PlaceComponent): void;
11
+ onDeactivate($event: PlaceComponent): void;
12
+ getPlaceOrder(outlet: RouterOutlet): any;
13
+ }
@@ -0,0 +1 @@
1
+ export declare const LEFT_RIGHT_PLACE_ANIMATION: import("@angular/animations").AnimationTriggerMetadata;
@@ -0,0 +1,11 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ListModel, ListModelChain } from '@coolon/pectin';
3
+ import { DisposableComponent } from '../../../components/disposable-component';
4
+ import { Place } from '../../place.decorator';
5
+ export declare class TabbedPlaceNavigationComponent extends DisposableComponent implements OnInit {
6
+ places: Place.Descriptor[];
7
+ placesModel: ListModel<Place.Descriptor>;
8
+ readonly orderedPlaces: ListModelChain<Place.Descriptor>;
9
+ constructor();
10
+ ngOnInit(): void;
11
+ }
@@ -0,0 +1,10 @@
1
+ import { Injector } from '@angular/core';
2
+ import { ActivatedRouteSnapshot, CanDeactivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
3
+ import { Observable } from 'rxjs';
4
+ import { PlaceComponent } from '../place-component';
5
+ export declare class LeavePlaceGuard implements CanDeactivate<PlaceComponent> {
6
+ private router;
7
+ private injector;
8
+ constructor(router: Router, injector: Injector);
9
+ canDeactivate(component: PlaceComponent, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { Injector } from '@angular/core';
2
+ import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
3
+ import { Observable } from 'rxjs';
4
+ export declare class PlaceRouteGuard implements CanActivate {
5
+ private router;
6
+ private injector;
7
+ constructor(router: Router, injector: Injector);
8
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree;
9
+ }
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * @file Automatically generated by barrelsby.
3
3
  */
4
-
5
4
  export * from "./abstract-place-component";
6
5
  export * from "./place-component";
7
6
  export * from "./place.decorator";
@@ -0,0 +1,5 @@
1
+ import { ValueModel } from '@coolon/pectin';
2
+ export interface PlaceComponent {
3
+ titleModel: ValueModel<string>;
4
+ canDeactivate(): boolean | Promise<boolean>;
5
+ }
@@ -0,0 +1,20 @@
1
+ import { Constructable } from '@coolon/pectin';
2
+ import 'reflect-metadata';
3
+ import { PlaceComponent } from './place-component';
4
+ export declare function Place(options: Place.Options): (target: Function) => void;
5
+ export declare namespace Place {
6
+ interface Options {
7
+ path: string;
8
+ title: string;
9
+ order: number;
10
+ authenticate?: boolean;
11
+ }
12
+ class Descriptor {
13
+ readonly path: string;
14
+ readonly authenticate: boolean;
15
+ readonly title: string;
16
+ readonly order: number;
17
+ constructor(placeClass: Constructable<PlaceComponent>, options: Options);
18
+ }
19
+ function getDescriptor(klass: Constructable<PlaceComponent>): Descriptor;
20
+ }
@@ -0,0 +1,2 @@
1
+ export declare class PlaceModule {
2
+ }
@@ -0,0 +1,8 @@
1
+ import { PlaceComponent } from './place-component';
2
+ export declare class PlaceService {
3
+ private _activePlaces;
4
+ constructor();
5
+ readonly activePlaces: import("@coolon/pectin").ListModel<PlaceComponent>;
6
+ onActivate(place: PlaceComponent): void;
7
+ onDeactivate(place: PlaceComponent): void;
8
+ }
@@ -0,0 +1,7 @@
1
+ export declare type JsonPrimitive = boolean | number | string;
2
+ export declare type AnyJson = JsonPrimitive | null | JsonArray | JsonMap;
3
+ export interface JsonArray extends Array<AnyJson> {
4
+ }
5
+ export interface JsonMap {
6
+ [key: string]: AnyJson;
7
+ }
@@ -0,0 +1,28 @@
1
+ import { Constructable } from '@coolon/pectin';
2
+ import { ParameterSanitiser } from './parameter-sanitiser';
3
+ import { ParameterType } from './parameter-type';
4
+ export interface ParameterOptions<T> {
5
+ as?: string;
6
+ optional?: boolean;
7
+ sanitiser?: Constructable<ParameterSanitiser<T>>;
8
+ }
9
+ export interface ListParameterOptions<T> {
10
+ as?: string;
11
+ optional?: boolean;
12
+ listSanitiser?: Constructable<ParameterSanitiser<T[]>>;
13
+ }
14
+ export declare function RouteId<T extends string | number>(type: ParameterType<T>, options?: ParameterOptions<T>): PropertyDecorator;
15
+ /**
16
+ * @deprecated use RouteParameter instead.
17
+ * @param type
18
+ * @param options
19
+ */
20
+ export declare function QueryParameter<T>(type: ParameterType<T>, options?: ParameterOptions<T>): PropertyDecorator;
21
+ export declare function RouteParameter<T>(type: ParameterType<T>, options?: ParameterOptions<T>): PropertyDecorator;
22
+ /**
23
+ * @deprecated use RouteParameterList instead
24
+ * @param elementType
25
+ * @param options
26
+ */
27
+ export declare function QueryParameterList<E>(elementType: ParameterType<E>, options?: ListParameterOptions<E>): PropertyDecorator;
28
+ export declare function RouteParameterList<E>(elementType: ParameterType<E>, options?: ListParameterOptions<E>): PropertyDecorator;
@@ -0,0 +1,11 @@
1
+ import { Constructable } from '@coolon/pectin';
2
+ import { ParameterSanitiser } from './parameter-sanitiser';
3
+ import { ParameterType } from './parameter-type';
4
+ export interface ParameterDefinition<E, S = E> {
5
+ readonly name: string;
6
+ readonly propertyName: string;
7
+ readonly type: ParameterType<E>;
8
+ readonly sanitiser: Constructable<ParameterSanitiser<S>>;
9
+ readonly isRouteId: boolean;
10
+ readonly isArray: boolean;
11
+ }
@@ -1,3 +1,3 @@
1
1
  export interface ParameterSanitiser<T> {
2
- sanitise(value: T): T | Promise<T>;
2
+ sanitise(value: T): T | Promise<T>;
3
3
  }
@@ -0,0 +1,16 @@
1
+ export interface ParameterType<T> {
2
+ format(value: T): string;
3
+ parse(value: string): T;
4
+ }
5
+ export declare namespace ParameterType {
6
+ class StringType implements ParameterType<string> {
7
+ format(value: string): string;
8
+ parse(value: string): string;
9
+ }
10
+ class NumberType implements ParameterType<number> {
11
+ format(value: number): string;
12
+ parse(value: string): number;
13
+ }
14
+ const STRING: StringType;
15
+ const NUMBER: NumberType;
16
+ }
@@ -0,0 +1,18 @@
1
+ import { ActivatedRoute, Router } from '@angular/router';
2
+ import { GarbageCollector, MutableValueModel } from '@coolon/pectin';
3
+ import { ParameterDefinition } from './parameter-definition.class';
4
+ export declare class RouteParameterBindings extends GarbageCollector {
5
+ private readonly component;
6
+ private readonly router;
7
+ private readonly activatedRoute;
8
+ readonly _incomingRouteChange: MutableValueModel<boolean>;
9
+ private txo;
10
+ private readonly resolvedParameters;
11
+ constructor(component: any, router: Router, activatedRoute: ActivatedRoute);
12
+ readonly incomingRouteChange: import("@coolon/pectin").ValueModel<boolean>;
13
+ protected installBinding<T>(parameter: ParameterDefinition<T>): void;
14
+ private getModelFor;
15
+ }
16
+ export declare namespace RouteParameterBindings {
17
+ const ROUTE_PARAMETER_LIST_KEY: unique symbol;
18
+ }
@@ -0,0 +1,42 @@
1
+ import { Injector } from '@angular/core';
2
+ import { ActivatedRouteSnapshot, Router } from '@angular/router';
3
+ import { ParameterDefinition } from './parameter-definition.class';
4
+ import { ParameterSanitiser } from './parameter-sanitiser';
5
+ export declare abstract class Sanitiser<T, S> {
6
+ readonly parameterDef: ParameterDefinition<T>;
7
+ readonly snapshot: ActivatedRouteSnapshot;
8
+ readonly sanitiser: ParameterSanitiser<S>;
9
+ private initialValue;
10
+ private _sanitisedValue;
11
+ constructor(parameterDef: ParameterDefinition<T>, snapshot: ActivatedRouteSnapshot, sanitiser: ParameterSanitiser<S>);
12
+ isRouteId(): boolean;
13
+ readonly valueChanged: boolean;
14
+ readonly sanitisedValue: S;
15
+ protected abstract readFrom(snapshot: ActivatedRouteSnapshot): S;
16
+ protected abstract hasChanged(initialValue: S, sanitisedValue: S): boolean;
17
+ abstract injectRouteParam(dest: {}): any;
18
+ sanitize(): Promise<boolean>;
19
+ }
20
+ export declare class RouteParameterSanitiser {
21
+ readonly parameterDefs: ParameterDefinition<any>[];
22
+ readonly snapshot: ActivatedRouteSnapshot;
23
+ readonly injector: Injector;
24
+ private readonly routeIdSanitiser;
25
+ private readonly parameterSanitisers;
26
+ constructor(parameterDefs: ParameterDefinition<any>[], snapshot: ActivatedRouteSnapshot, injector: Injector);
27
+ sanitise(): Promise<boolean>;
28
+ redirect(router: Router): Promise<boolean>;
29
+ private getSanitiser;
30
+ }
31
+ export declare namespace Sanitiser {
32
+ class Value<T> extends Sanitiser<T, T> {
33
+ readFrom(snapshot: ActivatedRouteSnapshot): T;
34
+ protected hasChanged(initialValue: T, sanitisedValue: T): boolean;
35
+ injectRouteParam(dest: {}): void;
36
+ }
37
+ class Array<T> extends Sanitiser<T, T[]> {
38
+ readFrom(snapshot: ActivatedRouteSnapshot): T[];
39
+ protected hasChanged(initialValue: T[], sanitisedValue: T[]): boolean;
40
+ injectRouteParam(dest: {}): void;
41
+ }
42
+ }
package/package.json CHANGED
@@ -1,21 +1,13 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "schematics": "./schematics/collection.json",
5
- "scripts": {
6
- "build": "../../node_modules/.bin/tsc -p tsconfig.schematics.json",
7
- "copy:schemas": "rsync -av -R schematics/*/schema.json ../../dist/libs/angular-ui-powerups/",
8
- "copy:files": "rsync -av -R schematics/*/templates/** ../../dist/libs/angular-ui-powerups/",
9
- "copy:collection": "shx cp schematics/collection.json ../../dist/libs/angular-ui-powerups/schematics/collection.json",
10
- "copy:styles": "rsync -av -R styles/* ../../dist/libs/angular-ui-powerups",
11
- "postbuild": "npm run copy:schemas && npm run copy:files && npm run copy:collection && npm run copy:styles",
12
- "release": "standard-version && git push --follow-tags origin master && npm publish"
13
- },
14
5
  "dependencies": {
15
6
  "ts-morph": "^3.1.3",
16
7
  "@typescript-plus/fast-memoize-decorator": "^0.1.0",
17
8
  "@coolon/typescript-utilities": "^2.0.0",
18
- "json5": "^2.1.0"
9
+ "json5": "^2.1.0",
10
+ "tslib": "^1.9.0"
19
11
  },
20
12
  "peerDependencies": {
21
13
  "@angular/common": "^8.1.1",
@@ -25,5 +17,15 @@
25
17
  "@angular/cdk": "^8.1.3",
26
18
  "@coolon/pectin": ">=1.14.22",
27
19
  "resize-observer-polyfill": "^1.5.1"
28
- }
20
+ },
21
+ "main": "bundles/coolon-angular-ui-powerups.umd.js",
22
+ "module": "fesm5/coolon-angular-ui-powerups.js",
23
+ "es2015": "fesm2015/coolon-angular-ui-powerups.js",
24
+ "esm5": "esm5/coolon-angular-ui-powerups.js",
25
+ "esm2015": "esm2015/coolon-angular-ui-powerups.js",
26
+ "fesm5": "fesm5/coolon-angular-ui-powerups.js",
27
+ "fesm2015": "fesm2015/coolon-angular-ui-powerups.js",
28
+ "typings": "coolon-angular-ui-powerups.d.ts",
29
+ "metadata": "coolon-angular-ui-powerups.metadata.json",
30
+ "sideEffects": false
29
31
  }
@@ -0,0 +1,2 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export declare function ngAdd(_options: any): Rule;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
4
+ // Just return the tree
5
+ function ngAdd(_options) {
6
+ return (tree, _context) => {
7
+ _context.addTask(new tasks_1.NodePackageInstallTask());
8
+ return tree;
9
+ };
10
+ }
11
+ exports.ngAdd = ngAdd;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,4DAA0E;AAE1E,uBAAuB;AACvB,SAAgB,KAAK,CAAC,QAAa;IACjC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,QAAQ,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AALD,sBAKC"}
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { Schema } from './schema';
3
+ export declare function generateRoutes(options: Schema): Rule;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@angular-devkit/core");
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const JSON5 = require("json5");
6
+ const ts_morph_1 = require("ts-morph");
7
+ const place_def_1 = require("./place-def");
8
+ const PLACE_ANNOTATION = /@Place\({([^})]*)}\)/m;
9
+ function generateRoutes(options) {
10
+ return (tree, context) => {
11
+ const workspaceConfig = tree.read('/angular.json');
12
+ if (!workspaceConfig) {
13
+ throw new Error('Could not find Angular workspace configuration');
14
+ }
15
+ // convert workspace to string
16
+ const workspaceContent = workspaceConfig.toString();
17
+ // parse workspace string into JSON object
18
+ const workspace = JSON.parse(workspaceContent);
19
+ if (!options.project) {
20
+ options.project = workspace.defaultProject;
21
+ }
22
+ const projectName = options.project;
23
+ const project = workspace.projects[projectName];
24
+ const config = loadConfig(project, tree, context);
25
+ const placeDefs = extractPlaces(project, options, tree, context);
26
+ const projectType = project.projectType === 'application' ? 'app' : 'lib';
27
+ const files = schematics_1.apply(schematics_1.url('./templates'), [
28
+ schematics_1.applyTemplates(Object.assign({}, options, { placeDefs,
29
+ config }, core_1.strings)),
30
+ schematics_1.move(`${project.sourceRoot}/${projectType}`),
31
+ // @see https://github.com/angular/angular-cli/issues/11337#issuecomment-448259549
32
+ schematics_1.forEach((fileEntry) => {
33
+ if (tree.exists(fileEntry.path)) {
34
+ tree.overwrite(fileEntry.path, fileEntry.content);
35
+ }
36
+ return fileEntry;
37
+ })
38
+ ]);
39
+ return schematics_1.mergeWith(files);
40
+ };
41
+ }
42
+ exports.generateRoutes = generateRoutes;
43
+ // function applyWithOverwrite(source: Source, rules: Rule[]): Rule {
44
+ // return (tree: Tree, _context: SchematicContext) => {
45
+ // const rule = mergeWith(
46
+ // apply(source, [
47
+ // ...rules,
48
+ // forEach((fileEntry) => {
49
+ // if (tree.exists(fileEntry.path)) {
50
+ // tree.overwrite(fileEntry.path, fileEntry.content);
51
+ // return null;
52
+ // }
53
+ // return fileEntry;
54
+ // })
55
+ // ])
56
+ // );
57
+ //
58
+ // return rule(tree, _context);
59
+ // };
60
+ // }
61
+ function createProject(project, context) {
62
+ const tsConfigPath = project.architect.build.options.tsConfig;
63
+ context.logger.info(`loading tsConfig from -> ${tsConfigPath}`);
64
+ try {
65
+ return new ts_morph_1.Project({
66
+ tsConfigFilePath: `./${tsConfigPath}`
67
+ });
68
+ }
69
+ catch (error) {
70
+ context.logger.fatal(`Failed to load typescript project form: ${project.root} You probably need to specify the --project option?`);
71
+ }
72
+ }
73
+ function loadConfig(project, tree, context) {
74
+ context.logger.info(`loading places config from -> ${project.root}/places.json (or places.json5)`);
75
+ const fileEntry = tree.get(`${project.root}/places.json5`) || tree.get(`${project.root}/places.json5`);
76
+ if (!fileEntry) {
77
+ throw new Error(`Unable to find config file at '${project.root}/places.json' or '${project.root}/places.json5'`);
78
+ }
79
+ const config = JSON5.parse(fileEntry.content.toString('utf-8'));
80
+ return config;
81
+ }
82
+ function extractPlaces(project, schema, tree, context) {
83
+ const projectType = project.projectType === 'application' ? 'app' : 'lib';
84
+ const projectRoot = `${project.root}`;
85
+ const sourceRoot = `${project.sourceRoot}/${projectType}`;
86
+ const importPrefix = `./${sourceRoot}`;
87
+ const tsProject = createProject(project, context);
88
+ const placeDefs = [];
89
+ context.logger.info(`Scanning sources in -> ${sourceRoot}`);
90
+ tree.getDir(sourceRoot).visit(filePath => {
91
+ if (!filePath.endsWith('.ts')) {
92
+ return;
93
+ }
94
+ const content = tree.read(filePath);
95
+ if (!content) {
96
+ return;
97
+ }
98
+ const sourceText = content.toString('utf-8');
99
+ if (sourceText.match(PLACE_ANNOTATION)) {
100
+ const sourceFile = tsProject.getSourceFileOrThrow(`./${filePath}`);
101
+ sourceFile.getClasses().forEach((classDecl) => {
102
+ place_def_1.PlaceDef.scan(classDecl, context).onMatch(result => {
103
+ // context.logger.info(`filePath=${filePath}`);
104
+ const moduleImportPath = `./${filePath.substr(importPrefix.length, filePath.length - importPrefix.length - '.ts'.length)}`;
105
+ const definition = result.createDefinition(moduleImportPath);
106
+ context.logger.info(`${moduleImportPath} -> ${classDecl.getName()}(route: /${definition.fullPath})`);
107
+ placeDefs.push(definition);
108
+ });
109
+ });
110
+ }
111
+ });
112
+ return placeDefs;
113
+ }
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/angular-ui-powerups/schematics/place-routes/index.ts"],"names":[],"mappings":";;AAAA,+CAA6D;AAC7D,2DAWoC;AAGpC,+BAA+B;AAC/B,uCAAqD;AACrD,2CAAuC;AAGvC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEjD,SAAgB,cAAc,CAAC,OAAe;IAE5C,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAE/C,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,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9D,oBAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;oBACjD,+CAA+C;oBAC/C,MAAM,gBAAgB,GAAG,KAAK,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;oBAC3H,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;oBAC7D,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,gBAAgB,OAAO,SAAS,CAAC,OAAO,EAAE,YAAY,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC;oBACrG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC7B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { SchematicContext } from '@angular-devkit/schematics';
2
+ import { ClassDeclaration } from 'ts-morph';
3
+ import { Scanner } from './scanner';
4
+ export declare class PlaceDef {
5
+ readonly importPath: string;
6
+ readonly componentClass: string;
7
+ readonly properties: PlaceDef.Options;
8
+ readonly routeDef: PlaceDef.Parameter;
9
+ readonly routeParameters: PlaceDef.Parameter[];
10
+ constructor(importPath: string, componentClass: string, properties: PlaceDef.Options, routeDef: PlaceDef.Parameter, routeParameters: PlaceDef.Parameter[]);
11
+ readonly path: string;
12
+ readonly routeIdentifier: PlaceDef.Parameter;
13
+ readonly fullPath: string;
14
+ getPlaceRouterGoArgs(): string;
15
+ getPlaceRouterGoRouteParams(): string;
16
+ readonly placeName: string;
17
+ readonly order: number;
18
+ readonly activateGuardNames: string[];
19
+ private requiresRouteGuard;
20
+ readonly routeModelName: string;
21
+ readonly authenticate: boolean;
22
+ }
23
+ export declare namespace PlaceDef {
24
+ interface Options {
25
+ title: string;
26
+ path: string;
27
+ order: number;
28
+ authenticate: string;
29
+ }
30
+ interface Parameter {
31
+ parameterName: string;
32
+ modelName: string;
33
+ typeName: string;
34
+ }
35
+ function scan(classDecl: ClassDeclaration, context: SchematicContext): Scanner;
36
+ function stripEnclosingQuotes(value: string): string;
37
+ }