@coolon/angular-ui-powerups 2.0.0-alpha.34 → 2.0.0-alpha.36

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 (244) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/assets/commands.scss +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.js +808 -313
  4. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  6. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  7. package/coolon-angular-ui-powerups.d.ts +45 -42
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/coolon-angular-ui-powerups.js +43 -40
  10. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  11. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  12. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  13. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  14. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  15. package/esm2015/lib/components/commands/command/command.component.js +48 -0
  16. package/esm2015/lib/components/commands/command/command.component.js.map +1 -0
  17. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -0
  18. package/esm2015/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  19. package/esm2015/lib/components/commands/command-face/command-face.component.js +21 -20
  20. package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -1
  21. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  22. package/esm2015/lib/components/commands/command-face.js +39 -5
  23. package/esm2015/lib/components/commands/command-face.js.map +1 -1
  24. package/esm2015/lib/components/commands/flex.component.js +30 -0
  25. package/esm2015/lib/components/commands/flex.component.js.map +1 -0
  26. package/esm2015/lib/components/commands/flex.component.metadata.json +1 -0
  27. package/esm2015/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  28. package/esm2015/lib/components/commands/group/command-group/command-group.component.js +47 -0
  29. package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  30. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -0
  31. package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  32. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +55 -0
  33. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  34. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -0
  35. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  36. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +39 -0
  37. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  38. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -0
  39. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  40. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  41. package/esm2015/lib/components/commands/group/command-group.js +112 -0
  42. package/esm2015/lib/components/commands/group/command-group.js.map +1 -0
  43. package/esm2015/lib/components/commands/group/command-group.metadata.json +1 -0
  44. package/esm2015/lib/components/commands/group/more-menu.component.js +55 -0
  45. package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -0
  46. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -0
  47. package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  48. package/esm2015/lib/components/commands/group/popup-menu.component.js +65 -0
  49. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -0
  50. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -0
  51. package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  52. package/esm2015/lib/components/commands/group/registration.js +58 -0
  53. package/esm2015/lib/components/commands/group/registration.js.map +1 -0
  54. package/esm2015/lib/components/commands/group/registration.metadata.json +1 -0
  55. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +55 -0
  56. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  57. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -0
  58. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  59. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  60. package/esm2015/lib/components/commands/group/view-data.js +104 -0
  61. package/esm2015/lib/components/commands/group/view-data.js.map +1 -0
  62. package/esm2015/lib/components/commands/group/view-data.metadata.json +1 -0
  63. package/esm2015/lib/components/commands/separator.component.js +35 -0
  64. package/esm2015/lib/components/commands/separator.component.js.map +1 -0
  65. package/esm2015/lib/components/commands/separator.component.metadata.json +1 -0
  66. package/esm2015/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  67. package/esm2015/lib/components/components.module.js +25 -29
  68. package/esm2015/lib/components/components.module.js.map +1 -1
  69. package/esm2015/lib/components/components.module.metadata.json +1 -1
  70. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  71. package/esm2015/lib/components/index.js +13 -7
  72. package/esm2015/lib/components/index.js.map +1 -1
  73. package/esm2015/lib/components/index.metadata.json +1 -1
  74. package/esm2015/lib/components/table/table-model.js +4 -2
  75. package/esm2015/lib/components/table/table-model.js.map +1 -1
  76. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +12 -21
  77. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -1
  78. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
  79. package/esm2015/lib/components/track-by.js +5 -0
  80. package/esm2015/lib/components/track-by.js.map +1 -0
  81. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  82. package/esm2015/lib/place/components/abstract-place-navigation.component.js +4 -3
  83. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  84. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  85. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  86. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  87. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  88. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  89. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  90. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  91. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  92. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  93. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  94. package/esm2015/lib/place/place.module.js +3 -3
  95. package/esm2015/lib/place/place.module.js.map +1 -1
  96. package/esm2015/lib/place/place.module.metadata.json +1 -1
  97. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  98. package/esm5/coolon-angular-ui-powerups.js +43 -40
  99. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  100. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  101. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  102. package/esm5/lib/components/commands/command/command.component.js +51 -0
  103. package/esm5/lib/components/commands/command/command.component.js.map +1 -0
  104. package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  105. package/esm5/lib/components/commands/command-face/command-face.component.js +21 -20
  106. package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -1
  107. package/esm5/lib/components/commands/command-face.js +43 -5
  108. package/esm5/lib/components/commands/command-face.js.map +1 -1
  109. package/esm5/lib/components/commands/flex.component.js +33 -0
  110. package/esm5/lib/components/commands/flex.component.js.map +1 -0
  111. package/esm5/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  112. package/esm5/lib/components/commands/group/command-group/command-group.component.js +51 -0
  113. package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  114. package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  115. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +59 -0
  116. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  117. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  118. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +42 -0
  119. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  120. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  121. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  122. package/esm5/lib/components/commands/group/command-group.js +134 -0
  123. package/esm5/lib/components/commands/group/command-group.js.map +1 -0
  124. package/esm5/lib/components/commands/group/more-menu.component.js +58 -0
  125. package/esm5/lib/components/commands/group/more-menu.component.js.map +1 -0
  126. package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  127. package/esm5/lib/components/commands/group/popup-menu.component.js +68 -0
  128. package/esm5/lib/components/commands/group/popup-menu.component.js.map +1 -0
  129. package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  130. package/esm5/lib/components/commands/group/registration.js +80 -0
  131. package/esm5/lib/components/commands/group/registration.js.map +1 -0
  132. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +58 -0
  133. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  134. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  135. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  136. package/esm5/lib/components/commands/group/view-data.js +131 -0
  137. package/esm5/lib/components/commands/group/view-data.js.map +1 -0
  138. package/esm5/lib/components/commands/separator.component.js +37 -0
  139. package/esm5/lib/components/commands/separator.component.js.map +1 -0
  140. package/esm5/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  141. package/esm5/lib/components/components.module.js +25 -29
  142. package/esm5/lib/components/components.module.js.map +1 -1
  143. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  144. package/esm5/lib/components/index.js +13 -7
  145. package/esm5/lib/components/index.js.map +1 -1
  146. package/esm5/lib/components/table/table-model.js +4 -2
  147. package/esm5/lib/components/table/table-model.js.map +1 -1
  148. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +5 -8
  149. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -1
  150. package/esm5/lib/components/track-by.js +5 -0
  151. package/esm5/lib/components/track-by.js.map +1 -0
  152. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  153. package/esm5/lib/place/components/abstract-place-navigation.component.js +4 -3
  154. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  155. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  156. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  157. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  158. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  159. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  160. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  161. package/esm5/lib/place/place.module.js +3 -3
  162. package/esm5/lib/place/place.module.js.map +1 -1
  163. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  164. package/fesm2015/coolon-angular-ui-powerups.js +660 -281
  165. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  166. package/fesm5/coolon-angular-ui-powerups.js +748 -257
  167. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  168. package/lib/components/commands/command/command.component.d.ts +18 -0
  169. package/lib/components/commands/command-face/command-face.component.d.ts +11 -6
  170. package/lib/components/commands/command-face.d.ts +17 -2
  171. package/lib/components/commands/flex.component.d.ts +11 -0
  172. package/lib/components/commands/group/command-group/command-group.component.d.ts +11 -0
  173. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +21 -0
  174. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +13 -0
  175. package/lib/components/commands/group/command-group.d.ts +44 -0
  176. package/lib/components/commands/group/more-menu.component.d.ts +14 -0
  177. package/lib/components/commands/group/popup-menu.component.d.ts +17 -0
  178. package/lib/components/commands/group/registration.d.ts +32 -0
  179. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +13 -0
  180. package/lib/components/commands/group/view-data.d.ts +40 -0
  181. package/lib/components/commands/separator.component.d.ts +12 -0
  182. package/lib/components/index.d.ts +13 -7
  183. package/lib/components/table/table-model.d.ts +1 -1
  184. package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +2 -1
  185. package/lib/components/track-by.d.ts +3 -0
  186. package/lib/place/components/abstract-place-navigation.component.d.ts +2 -2
  187. package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
  188. package/package.json +1 -1
  189. package/esm2015/lib/components/commands/command-bar.component.js +0 -51
  190. package/esm2015/lib/components/commands/command-bar.component.js.map +0 -1
  191. package/esm2015/lib/components/commands/command-bar.component.metadata.json +0 -1
  192. package/esm2015/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
  193. package/esm2015/lib/components/commands/command-container.js +0 -20
  194. package/esm2015/lib/components/commands/command-container.js.map +0 -1
  195. package/esm2015/lib/components/commands/command-container.metadata.json +0 -1
  196. package/esm2015/lib/components/commands/command.component.js +0 -38
  197. package/esm2015/lib/components/commands/command.component.js.map +0 -1
  198. package/esm2015/lib/components/commands/command.component.metadata.json +0 -1
  199. package/esm2015/lib/components/commands/command.component.ngfactory.js.map +0 -1
  200. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -57
  201. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
  202. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +0 -1
  203. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
  204. package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +0 -40
  205. package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
  206. package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +0 -1
  207. package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
  208. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +0 -49
  209. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
  210. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +0 -1
  211. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
  212. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -62
  213. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
  214. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +0 -1
  215. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
  216. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
  217. package/esm5/lib/components/commands/command-bar.component.js +0 -31
  218. package/esm5/lib/components/commands/command-bar.component.js.map +0 -1
  219. package/esm5/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
  220. package/esm5/lib/components/commands/command-container.js +0 -30
  221. package/esm5/lib/components/commands/command-container.js.map +0 -1
  222. package/esm5/lib/components/commands/command.component.js +0 -41
  223. package/esm5/lib/components/commands/command.component.js.map +0 -1
  224. package/esm5/lib/components/commands/command.component.ngfactory.js.map +0 -1
  225. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -64
  226. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
  227. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
  228. package/esm5/lib/components/commands/popup-menu/more-menu.component.js +0 -35
  229. package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
  230. package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
  231. package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +0 -45
  232. package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
  233. package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
  234. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -66
  235. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
  236. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
  237. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
  238. package/lib/components/commands/command-bar.component.d.ts +0 -10
  239. package/lib/components/commands/command-container.d.ts +0 -15
  240. package/lib/components/commands/command.component.d.ts +0 -15
  241. package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +0 -18
  242. package/lib/components/commands/popup-menu/more-menu.component.d.ts +0 -9
  243. package/lib/components/commands/popup-menu/popup-menu.component.d.ts +0 -14
  244. package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +0 -21
@@ -0,0 +1,18 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Command, ValueModel, ValueModelChain } from '@coolon/pectin';
3
+ import { DisposableComponent } from '../../disposable-component';
4
+ import { CommandFace } from '../command-face';
5
+ import { CommandGroup } from '../group/command-group';
6
+ /**
7
+ *
8
+ */
9
+ export declare class CommandComponent extends DisposableComponent implements OnInit {
10
+ readonly parent?: CommandGroup;
11
+ command: Command<unknown>;
12
+ faceModel: ValueModel<CommandFace>;
13
+ face: CommandFace;
14
+ CommandFace: typeof CommandFace;
15
+ readonly buttonStyle: ValueModelChain<string>;
16
+ constructor(parent?: CommandGroup);
17
+ ngOnInit(): void;
18
+ }
@@ -1,13 +1,18 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { ValueModelChain } from '@coolon/pectin';
3
3
  import { DisposableComponent } from '../../disposable-component';
4
- import { CommandContainer } from '../command-container';
5
4
  import { CommandFace } from '../command-face';
6
5
  /**
7
- *
6
+ * Custom CSS:
7
+ * @example
8
+ * root: { // globally
9
+ * --aup-command-face-icon-gap: 8px;
10
+ * }
11
+ * aup-command-face { // per instance
12
+ * --icon-gap: 4px;
13
+ * }
8
14
  */
9
15
  export declare class CommandFaceComponent<T> extends DisposableComponent implements OnInit {
10
- readonly commandContainer: CommandContainer;
11
16
  private readonly faceModel;
12
17
  _rawFace: CommandFace;
13
18
  ignoreIcon: boolean;
@@ -17,13 +22,13 @@ export declare class CommandFaceComponent<T> extends DisposableComponent impleme
17
22
  readonly iconModel: ValueModelChain<string>;
18
23
  private textModel;
19
24
  readonly positionModel: ValueModelChain<string>;
20
- private destructiveModel;
21
- constructor(commandContainer: CommandContainer);
25
+ private colorModel;
26
+ constructor();
22
27
  ngOnInit(): void;
23
28
  get iconPosition(): string;
24
29
  get shouldIncludeIcon(): string | boolean;
25
30
  get iconStart(): boolean;
26
31
  get iconEnd(): boolean;
27
32
  get text(): string;
28
- get destructive(): boolean;
33
+ get color(): string;
29
34
  }
@@ -1,15 +1,29 @@
1
+ import { ThemePalette } from '@angular/material/core';
2
+ import { Enum } from 'typescript-string-enums';
1
3
  export interface CommandFace {
2
4
  text?(): string;
3
5
  icon?(): string;
4
6
  iconPosition?(): string;
5
7
  tooltip?(): string;
6
- destructive?(): boolean;
8
+ color?(): string;
9
+ style?(): string;
7
10
  }
8
11
  export declare namespace CommandFace {
9
12
  enum Position {
10
13
  START = "start",
11
14
  END = "end"
12
15
  }
16
+ const Style: {
17
+ FLAT: "flat";
18
+ STROKED: "stroked";
19
+ RAISED: "raised";
20
+ };
21
+ type Style = Enum<typeof Style>;
22
+ function getColorOf(face: CommandFace): ThemePalette;
23
+ function getStyleOf(face: CommandFace): Style;
24
+ function getIconOf(face: CommandFace): string;
25
+ function getTooltipOf(face: CommandFace): string;
26
+ function getTextOf(face: CommandFace): string;
13
27
  class Adapter {
14
28
  readonly face: CommandFace;
15
29
  constructor(face: CommandFace);
@@ -19,6 +33,7 @@ export declare namespace CommandFace {
19
33
  get tooltip(): string;
20
34
  get iconPositionStart(): boolean;
21
35
  get iconPositionEnd(): boolean;
22
- get destructive(): boolean;
36
+ get color(): ThemePalette;
37
+ get style(): Style;
23
38
  }
24
39
  }
@@ -0,0 +1,11 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { DisposableComponent } from '../disposable-component';
3
+ import { CommandGroup } from './group/command-group';
4
+ /**
5
+ *
6
+ */
7
+ export declare class FlexComponent extends DisposableComponent implements OnInit {
8
+ readonly parent?: CommandGroup;
9
+ constructor(parent?: CommandGroup);
10
+ ngOnInit(): void;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { ValueModel } from '@coolon/pectin';
2
+ import { CommandFace } from '../../command-face';
3
+ import { CommandGroup } from '../command-group';
4
+ export declare class CommandGroupComponent extends CommandGroup {
5
+ readonly parent: CommandGroup;
6
+ faceModel: ValueModel<CommandFace>;
7
+ face: CommandFace;
8
+ xPosition: 'before' | 'after';
9
+ yPosition: 'above' | 'below';
10
+ constructor(parent: CommandGroup);
11
+ }
@@ -0,0 +1,21 @@
1
+ import { EventEmitter, QueryList } from '@angular/core';
2
+ import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
3
+ import { ListModelChain, ValueModelChain } from '@coolon/pectin';
4
+ import { DisposableComponent } from '../../../disposable-component';
5
+ import { TrackBy } from '../../../track-by';
6
+ import { Registration } from '../registration';
7
+ import { ViewData } from '../view-data';
8
+ export declare class CommandGroupMenuRendererComponent extends DisposableComponent {
9
+ readonly parent?: CommandGroupMenuRendererComponent;
10
+ menuComponent: MatMenu;
11
+ private readonly groupViewDataModel;
12
+ groupViewData: ViewData.GroupData;
13
+ commandFired: EventEmitter<any>;
14
+ triggers: QueryList<MatMenuTrigger>;
15
+ readonly children: ListModelChain<Registration>;
16
+ readonly hasMixedIcons: ValueModelChain<boolean>;
17
+ readonly ViewData: typeof ViewData;
18
+ TrackBy: typeof TrackBy;
19
+ constructor(parent?: CommandGroupMenuRendererComponent);
20
+ getCommand(data: ViewData): import("@coolon/pectin").Command<unknown>;
21
+ }
@@ -0,0 +1,13 @@
1
+ import { ListModelChain, ValueModel } from '@coolon/pectin';
2
+ import { DisposableComponent } from '../../../disposable-component';
3
+ import { ViewData } from '../view-data';
4
+ import { TrackBy } from '../../../track-by';
5
+ export declare class CommandGroupRendererComponent extends DisposableComponent {
6
+ groupViewDataModel: ValueModel<ViewData.GroupData>;
7
+ groupViewData: ViewData.GroupData;
8
+ renderRootNode: boolean;
9
+ readonly ViewData: typeof ViewData;
10
+ readonly childViewDataModels: ListModelChain<ViewData>;
11
+ TrackBy: typeof TrackBy;
12
+ constructor();
13
+ }
@@ -0,0 +1,44 @@
1
+ import { BooleanValueModelChain, Command, Disposable, GarbageCollector, ListModel, ListModelChain, ValueModel } from '@coolon/pectin';
2
+ import { CommandFace } from '../command-face';
3
+ import { FlexComponent } from '../flex.component';
4
+ import { SeparatorComponent } from '../separator.component';
5
+ import { Registration } from './registration';
6
+ import { ViewData } from './view-data';
7
+ export declare abstract class CommandGroup extends GarbageCollector {
8
+ readonly parent?: CommandGroup;
9
+ abstract faceModel: ValueModel<CommandFace>;
10
+ abstract xPosition: 'before' | 'after';
11
+ abstract yPosition: 'above' | 'below';
12
+ private readonly _rootTemplate;
13
+ private readonly _registrations;
14
+ private readonly _childFaceModels;
15
+ readonly hasMixedIcons: BooleanValueModelChain;
16
+ private _faceChangeCount;
17
+ readonly childTemplates: ListModelChain<ViewData>;
18
+ private initialised;
19
+ constructor(parent?: CommandGroup);
20
+ initialise(): void;
21
+ get rootTemplate(): ValueModel<ViewData.GroupData>;
22
+ get registrations(): ListModel<Registration>;
23
+ notifyChanged(): void;
24
+ private notifyChildFaceChanged;
25
+ private rebuildTemplates;
26
+ get depth(): number;
27
+ isRoot(): boolean;
28
+ registerCommand(command: Command<unknown>, faceModel: ValueModel<CommandFace>): Disposable;
29
+ registerGroup(group: CommandGroup, faceModel: ValueModel<CommandFace>): Disposable;
30
+ registerFlex(component: FlexComponent): Disposable;
31
+ registerSeparator(component: SeparatorComponent): Disposable;
32
+ protected register(registration: Registration): Disposable;
33
+ }
34
+ export declare namespace CommandGroup {
35
+ class Root extends CommandGroup {
36
+ faceModel: ValueModel<CommandFace>;
37
+ xPositionModel: ValueModel<'before' | 'after'>;
38
+ xPosition: 'before' | 'after';
39
+ yPositionModel: ValueModel<'above' | 'below'>;
40
+ yPosition: 'above' | 'below';
41
+ isRoot(): boolean;
42
+ }
43
+ function factory(): Root;
44
+ }
@@ -0,0 +1,14 @@
1
+ import { AfterContentInit, OnInit } from '@angular/core';
2
+ import { DisposableComponent } from '../../disposable-component';
3
+ import { CommandGroup } from './command-group';
4
+ /**
5
+ *
6
+ */
7
+ export declare class MoreMenuComponent extends DisposableComponent implements OnInit, AfterContentInit {
8
+ readonly group: CommandGroup;
9
+ private tooltipModel;
10
+ tooltip: string;
11
+ constructor(group: CommandGroup);
12
+ ngOnInit(): void;
13
+ ngAfterContentInit(): void;
14
+ }
@@ -0,0 +1,17 @@
1
+ import { AfterContentInit, AfterViewInit, OnInit } from '@angular/core';
2
+ import { ValueModel } from '@coolon/pectin';
3
+ import { DisposableComponent } from '../../disposable-component';
4
+ import { CommandFace } from '../command-face';
5
+ import { CommandGroup } from './command-group';
6
+ /**
7
+ *
8
+ */
9
+ export declare class PopupMenuComponent extends DisposableComponent implements OnInit, AfterContentInit, AfterViewInit {
10
+ readonly group: CommandGroup;
11
+ faceModel: ValueModel<CommandFace>;
12
+ face: CommandFace;
13
+ constructor(group: CommandGroup);
14
+ ngOnInit(): void;
15
+ ngAfterContentInit(): void;
16
+ ngAfterViewInit(): void;
17
+ }
@@ -0,0 +1,32 @@
1
+ import { Command, GarbageCollector, ValueModel } from '@coolon/pectin';
2
+ import { CommandGroup } from './command-group';
3
+ import { ViewData } from './view-data';
4
+ import { CommandFace } from '../command-face';
5
+ export declare abstract class Registration extends GarbageCollector {
6
+ abstract toTemplate(): ViewData;
7
+ }
8
+ export declare namespace Registration {
9
+ abstract class FaceRegistration extends Registration {
10
+ readonly faceModel: ValueModel<CommandFace>;
11
+ protected constructor(faceModel: ValueModel<CommandFace>);
12
+ }
13
+ class CommandRegistration extends FaceRegistration {
14
+ readonly command: Command<unknown>;
15
+ constructor(faceModel: ValueModel<CommandFace>, command: Command<unknown>);
16
+ toTemplate(): ViewData.CommandData;
17
+ }
18
+ class GroupRegistration extends FaceRegistration {
19
+ readonly group: CommandGroup;
20
+ constructor(faceModel: ValueModel<CommandFace>, group: CommandGroup);
21
+ toTemplate(): ViewData.GroupData;
22
+ }
23
+ class SeparatorRegistration extends Registration {
24
+ private readonly template;
25
+ toTemplate(): ViewData.SeparatorData;
26
+ }
27
+ class FlexRegistration extends Registration {
28
+ private readonly template;
29
+ toTemplate(): ViewData.FlexData;
30
+ }
31
+ function hasFace(entry: Registration): entry is FaceRegistration;
32
+ }
@@ -0,0 +1,13 @@
1
+ import { AfterContentInit, AfterViewInit, OnInit } from '@angular/core';
2
+ import { DisposableComponent } from '../../../disposable-component';
3
+ import { CommandGroup } from '../command-group';
4
+ /**
5
+ *
6
+ */
7
+ export declare class ToolBarComponent extends DisposableComponent implements OnInit, AfterContentInit, AfterViewInit {
8
+ readonly group: CommandGroup;
9
+ constructor(group: CommandGroup);
10
+ ngOnInit(): void;
11
+ ngAfterContentInit(): void;
12
+ ngAfterViewInit(): void;
13
+ }
@@ -0,0 +1,40 @@
1
+ import { ThemePalette } from '@angular/material/core';
2
+ import { Command, Constructable } from '@coolon/pectin';
3
+ import { CommandFace } from '../command-face';
4
+ export declare class ViewData {
5
+ }
6
+ export declare namespace ViewData {
7
+ class FaceData extends ViewData {
8
+ readonly faceAdapter: CommandFace.Adapter;
9
+ constructor(face: CommandFace);
10
+ }
11
+ class GroupData extends FaceData {
12
+ readonly xPosition: any;
13
+ readonly yPosition: any;
14
+ readonly children: ViewData[];
15
+ constructor(face: CommandFace, xPosition: any, yPosition: any, children: ViewData[]);
16
+ get hasMixedIcons(): boolean;
17
+ }
18
+ class CommandData extends FaceData {
19
+ readonly command: Command<unknown>;
20
+ constructor(face: CommandFace, command: Command<unknown>);
21
+ }
22
+ class SeparatorData extends ViewData {
23
+ }
24
+ class FlexData extends ViewData {
25
+ }
26
+ function as<T extends ViewData>(type: Constructable<T>, viewData: ViewData): T;
27
+ function getCommand(data: ViewData): Command<unknown>;
28
+ function getTooltip(data: ViewData): string;
29
+ function getStyle(data: ViewData): string;
30
+ function getColor(data: ViewData): ThemePalette;
31
+ function hasText(data: ViewData): boolean;
32
+ function getFace(data: ViewData): CommandFace;
33
+ function asGroup(viewData: ViewData): ViewData.GroupData;
34
+ function hasMixedIcons(data: ViewData): boolean;
35
+ function isGroup(data: ViewData): data is GroupData;
36
+ function hasFace(data: ViewData): data is FaceData;
37
+ function isCommand(data: ViewData): data is CommandData;
38
+ function isSeparator(data: ViewData): data is SeparatorData;
39
+ function isFlex(data: ViewData): data is FlexData;
40
+ }
@@ -0,0 +1,12 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { DisposableComponent } from '../disposable-component';
3
+ import { CommandGroup } from './group/command-group';
4
+ /**
5
+ *
6
+ */
7
+ export declare class SeparatorComponent extends DisposableComponent implements OnInit {
8
+ readonly parent?: CommandGroup;
9
+ constructor(parent?: CommandGroup);
10
+ isVertical(): boolean;
11
+ ngOnInit(): void;
12
+ }
@@ -5,16 +5,22 @@ export * from "./components.module";
5
5
  export * from "./disposable-component";
6
6
  export * from "./focusable.component";
7
7
  export * from "./resize-aware.component";
8
+ export * from "./track-by";
8
9
  export * from "./card-container/card-container.component";
9
- export * from "./commands/command-bar.component";
10
- export * from "./commands/command-container";
11
10
  export * from "./commands/command-face";
12
- export * from "./commands/command.component";
11
+ export * from "./commands/flex.component";
12
+ export * from "./commands/separator.component";
13
+ export * from "./commands/command/command.component";
13
14
  export * from "./commands/command-face/command-face.component";
14
- export * from "./commands/popup-menu/abstract-popup-menu.component";
15
- export * from "./commands/popup-menu/more-menu.component";
16
- export * from "./commands/popup-menu/popup-menu.component";
17
- export * from "./commands/popup-menu-renderer/popup-menu-renderer.component";
15
+ export * from "./commands/group/command-group";
16
+ export * from "./commands/group/more-menu.component";
17
+ export * from "./commands/group/popup-menu.component";
18
+ export * from "./commands/group/registration";
19
+ export * from "./commands/group/view-data";
20
+ export * from "./commands/group/command-group/command-group.component";
21
+ export * from "./commands/group/command-group-menu-renderer/command-group-menu-renderer.component";
22
+ export * from "./commands/group/command-group-renderer/command-group-renderer.component";
23
+ export * from "./commands/group/tool-bar/tool-bar.component";
18
24
  export * from "./focus-container/focus-container.component";
19
25
  export * from "./forms/abstract-input.component";
20
26
  export * from "./forms/abstract-list-input.component";
@@ -114,7 +114,7 @@ export declare class TableModel<Row> {
114
114
  useFormFactory(factory: (row: Row) => DirtyTrackingForm<Row>): this;
115
115
  protected addColumn<C extends ColumnModel<Row>>(column: C): C;
116
116
  columnTextProperties(columnTextProperties: {
117
- [columnName: string]: () => ColumnTextProperties;
117
+ [columnName: string]: ColumnTextProperties;
118
118
  }): void;
119
119
  getColumnTextProperties(column: ColumnModel<Row>): ColumnTextProperties;
120
120
  startEditSession(row: Row): EditSession<Row>;
@@ -3,8 +3,9 @@ import { MatMenuTrigger } from '@angular/material/menu';
3
3
  import { Command } from '@coolon/pectin';
4
4
  import { CommandFace } from '../../commands/command-face';
5
5
  import { DisposableComponent } from '../../disposable-component';
6
- declare class MenuItemData<T> extends CommandFace.Adapter {
6
+ declare class MenuItemData<T> {
7
7
  readonly factory: Command.Factory<T, void>;
8
+ readonly face: CommandFace;
8
9
  constructor(factory: Command.Factory<T, void>, face: CommandFace);
9
10
  }
10
11
  /**
@@ -0,0 +1,3 @@
1
+ export declare namespace TrackBy {
2
+ const byIndex: (data: any, index: number) => number;
3
+ }
@@ -1,7 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { Command, Constructable, DelegatingValueModel, ListModel, ListModelChain, ValueModel } from '@coolon/pectin';
3
+ import { CommandFace } from '../../components/commands/command-face';
3
4
  import { DisposableComponent } from '../../components/disposable-component';
4
- import { NavItem } from '../nav-item';
5
5
  import { PlaceComponent } from '../place-component';
6
6
  import { PlaceDefinition } from '../place-definition';
7
7
  import { PlaceRouter } from '../place-router';
@@ -16,7 +16,7 @@ export declare class AbstractPlaceNavigationComponent extends DisposableComponen
16
16
  readonly _activePlaceComponent: DelegatingValueModel<PlaceComponent>;
17
17
  private activePlaceDefinition;
18
18
  constructor(placeRouter: PlaceRouter);
19
- getNav(placeDef: PlaceDefinition): NavItem;
19
+ getNavigationFace(placeDef: PlaceDefinition): CommandFace;
20
20
  isActive(place: PlaceDefinition): boolean;
21
21
  ngOnInit(): void;
22
22
  }
@@ -40,7 +40,7 @@ import { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.c
40
40
  * (at)Place({
41
41
  * path: 'myPlace',
42
42
  * data: {
43
- * nav: I18n.places.myPlace.nav()
43
+ * nav: I18n.places.myPlace.nav
44
44
  * }
45
45
  * })
46
46
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "2.0.0-alpha.34",
3
+ "version": "2.0.0-alpha.36",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "dependencies": {
6
6
  "@coolon/typescript-utilities": "^2.0.0",
@@ -1,51 +0,0 @@
1
- var CommandBarComponent_1;
2
- import { __decorate, __metadata } from "tslib";
3
- import { Component, forwardRef } from '@angular/core';
4
- import { CommandContainer } from './command-container';
5
- /**
6
- *
7
- */
8
- let CommandBarComponent = CommandBarComponent_1 = class CommandBarComponent extends CommandContainer {
9
- constructor() {
10
- super();
11
- }
12
- ngOnInit() {
13
- }
14
- getButtonColor(registration) {
15
- return registration.faceAdapter.destructive ? 'warn' : undefined;
16
- }
17
- };
18
- CommandBarComponent = CommandBarComponent_1 = __decorate([
19
- Component({
20
- selector: 'aup-command-bar',
21
- template: `
22
- <ng-container *ngFor="let registration of commandRegistrations.value">
23
- <button *ngIf="registration.faceAdapter.icon && !registration.faceAdapter.text"
24
- mat-icon-button
25
- [color]="getButtonColor(registration)"
26
- [pectinCommand]="registration.command"
27
- [matTooltip]="registration.faceAdapter.tooltip"
28
- >
29
- <aup-command-face [face]="registration.faceAdapter.face"></aup-command-face>
30
- </button>
31
- <button *ngIf="registration.faceAdapter.text"
32
- [color]="getButtonColor(registration)"
33
- mat-button
34
- [pectinCommand]="registration.command"
35
- [matTooltip]="registration.tooltip"
36
- >
37
- <aup-command-face [face]="registration.faceAdapter.face"></aup-command-face>
38
- </button>
39
- </ng-container>
40
- `,
41
- providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandBarComponent_1) }],
42
- styles: [`:host {
43
- display: inline-flex;
44
- flex-direction: row;
45
- align-items: center;
46
- }`]
47
- }),
48
- __metadata("design:paramtypes", [])
49
- ], CommandBarComponent);
50
- export { CommandBarComponent };
51
- //# sourceMappingURL=command-bar.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-bar.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-bar.component.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAU,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD;;GAEG;AA8BH,IAAa,mBAAmB,2BAAhC,MAAa,mBAAoB,SAAQ,gBAAgB;IAEvD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,QAAQ;IACR,CAAC;IAED,cAAc,CAAC,YAA2C;QACxD,OAAO,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;CAEF,CAAA;AAbY,mBAAmB;IA7B/B,SAAS,CAAC;QACT,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;GAmBT;QAMD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAmB,CAAC,EAAE,CAAC;iBALrF;;;;IAIP;KAEH,CAAC;;GACW,mBAAmB,CAa/B;SAbY,mBAAmB","sourcesContent":["import { Component, forwardRef, OnInit } from '@angular/core';\nimport { CommandContainer } from './command-container';\n\n\n/**\n *\n */\n@Component({\n selector: 'aup-command-bar',\n template: `\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.faceAdapter.icon && !registration.faceAdapter.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.faceAdapter.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.faceAdapter.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n </ng-container>\n `,\n styles: [`:host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }`],\n providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandBarComponent) }]\n})\nexport class CommandBarComponent extends CommandContainer implements OnInit {\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n getButtonColor(registration: CommandContainer.Registration) {\n return registration.faceAdapter.destructive ? 'warn' : undefined;\n }\n\n}\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"CommandBarComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./command-container","name":"CommandContainer","line":36,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"aup-command-bar","template":"\n <ng-container *ngFor=\"let registration of commandRegistrations.value\">\n <button *ngIf=\"registration.faceAdapter.icon && !registration.faceAdapter.text\"\n mat-icon-button\n [color]=\"getButtonColor(registration)\"\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.faceAdapter.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n <button *ngIf=\"registration.faceAdapter.text\"\n [color]=\"getButtonColor(registration)\"\n mat-button\n [pectinCommand]=\"registration.command\"\n [matTooltip]=\"registration.tooltip\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\"></aup-command-face>\n </button>\n </ng-container>\n ","styles":[":host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n }"],"providers":[{"provide":{"__symbolic":"reference","module":"./command-container","name":"CommandContainer","line":34,"character":25},"useExisting":{"__symbolic":"reference","name":"CommandBarComponent"}}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"getButtonColor":[{"__symbolic":"method"}]}}}}]
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-bar.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-bar.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,20 +0,0 @@
1
- import { Disposable, GarbageCollector, MutableListModel } from '@coolon/pectin';
2
- import { CommandFace } from './command-face';
3
- export class CommandContainer extends GarbageCollector {
4
- constructor() {
5
- super();
6
- this._commandRegistrations = new MutableListModel();
7
- }
8
- get commandRegistrations() {
9
- return this._commandRegistrations.readonly;
10
- }
11
- registerCommand(command, face) {
12
- const registration = { command, faceAdapter: new CommandFace.Adapter(face) };
13
- this._commandRegistrations.push(registration);
14
- return Disposable.disposableThatRuns(() => this._commandRegistrations.remove(registration));
15
- }
16
- getDefaultIconPosition() {
17
- return CommandFace.Position.START;
18
- }
19
- }
20
- //# sourceMappingURL=command-container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-container.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,gBAAgB,EAAa,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,OAAO,gBAAiB,SAAQ,gBAAgB;IAIpD;QACE,KAAK,EAAE,CAAC;QAHO,0BAAqB,GAAG,IAAI,gBAAgB,EAAiC,CAAC;IAI/F,CAAC;IAED,IAAI,oBAAoB;QACtB,OAAO,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC;IAC7C,CAAC;IAED,eAAe,CAAC,OAAyB,EAAE,IAAiB;QAC1D,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7E,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9C,OAAO,UAAU,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED,sBAAsB;QACpB,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;IACpC,CAAC;CACF","sourcesContent":["import { Command, Disposable, GarbageCollector, ListModel, MutableListModel } from '@coolon/pectin';\nimport { CommandFace } from './command-face';\n\n\nexport class CommandContainer extends GarbageCollector {\n\n private readonly _commandRegistrations = new MutableListModel<CommandContainer.Registration>();\n\n constructor() {\n super();\n }\n\n get commandRegistrations(): ListModel<CommandContainer.Registration> {\n return this._commandRegistrations.readonly;\n }\n\n registerCommand(command: Command<unknown>, face: CommandFace): Disposable {\n const registration = { command, faceAdapter: new CommandFace.Adapter(face) };\n this._commandRegistrations.push(registration);\n return Disposable.disposableThatRuns(() => this._commandRegistrations.remove(registration));\n }\n\n getDefaultIconPosition(): CommandFace.Position {\n return CommandFace.Position.START;\n }\n}\n\nexport namespace CommandContainer {\n\n export interface Registration {\n readonly command: Command<unknown>;\n readonly faceAdapter: CommandFace.Adapter;\n }\n\n}\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"CommandContainer":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":4,"character":38},"members":{"__ctor__":[{"__symbolic":"constructor"}],"registerCommand":[{"__symbolic":"method"}],"getDefaultIconPosition":[{"__symbolic":"method"}]}}}}]
@@ -1,38 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { Component, Input } from '@angular/core';
3
- import { Command, TrackExternal } from '@coolon/pectin';
4
- import { CommandContainer } from './command-container';
5
- import { CommandFace } from './command-face';
6
- import { DisposableComponent } from '../disposable-component';
7
- /**
8
- *
9
- */
10
- let CommandComponent = class CommandComponent extends DisposableComponent {
11
- constructor(commandContainer) {
12
- super();
13
- this.commandContainer = commandContainer;
14
- }
15
- ngOnInit() {
16
- this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
17
- }
18
- };
19
- CommandComponent.ctorParameters = () => [
20
- { type: CommandContainer }
21
- ];
22
- __decorate([
23
- Input(), TrackExternal(),
24
- __metadata("design:type", Command)
25
- ], CommandComponent.prototype, "command", void 0);
26
- __decorate([
27
- Input(),
28
- __metadata("design:type", Object)
29
- ], CommandComponent.prototype, "face", void 0);
30
- CommandComponent = __decorate([
31
- Component({
32
- selector: 'aup-command',
33
- template: ``
34
- }),
35
- __metadata("design:paramtypes", [CommandContainer])
36
- ], CommandComponent);
37
- export { CommandComponent };
38
- //# sourceMappingURL=command.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA+B,MAAM,eAAe,CAAC;AAG9E,OAAO,EAAE,OAAO,EAAO,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;GAEG;AAMH,IAAa,gBAAgB,GAA7B,MAAa,gBAAoB,SAAQ,mBAAmB;IAQ1D,YAAqB,gBAAkC;QACrD,KAAK,EAAE,CAAC;QADW,qBAAgB,GAAhB,gBAAgB,CAAkB;IAEvD,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACzF,CAAC;CAEF,CAAA;;YARwC,gBAAgB;;AALvD;IADC,KAAK,EAAE,EAAE,aAAa,EAAE;8BAChB,OAAO;iDAAC;AAGjB;IADC,KAAK,EAAE;;8CACU;AANP,gBAAgB;IAL5B,SAAS,CAAC;QACT,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,EAAE;KAEb,CAAC;qCASuC,gBAAgB;GAR5C,gBAAgB,CAgB5B;SAhBY,gBAAgB","sourcesContent":["import { Component, Input, OnInit, SkipSelf, ViewChild } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\nimport { Command, Dsl, TrackExternal } from '@coolon/pectin';\nimport { CommandContainer } from './command-container';\nimport { CommandFace } from './command-face';\nimport { DisposableComponent } from '../disposable-component';\n\n/**\n *\n */\n@Component({\n selector: 'aup-command',\n template: ``,\n styles: []\n})\nexport class CommandComponent<T> extends DisposableComponent implements OnInit {\n\n @Input() @TrackExternal()\n command: Command;\n\n @Input()\n face: CommandFace;\n\n constructor(readonly commandContainer: CommandContainer) {\n super();\n }\n\n ngOnInit() {\n this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face))\n }\n\n}\n"]}
@@ -1 +0,0 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"CommandComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../disposable-component","name":"DisposableComponent","line":16,"character":41},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-command","template":"","styles":[]}]}],"members":{"command":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":18,"character":12}}]}],"face":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./command-container","name":"CommandContainer","line":24,"character":41}]}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -1 +0,0 @@
1
- {"version":3,"file":"command.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/components/commands/command.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}