@coolon/angular-ui-powerups 2.0.0-alpha.35 → 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 (218) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +774 -286
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.d.ts +45 -42
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +43 -40
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  12. package/esm2015/lib/components/commands/command/command.component.js +48 -0
  13. package/esm2015/lib/components/commands/command/command.component.js.map +1 -0
  14. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -0
  15. package/esm2015/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  16. package/esm2015/lib/components/commands/command-face/command-face.component.js +12 -18
  17. package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -1
  18. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  19. package/esm2015/lib/components/commands/command-face.js +39 -5
  20. package/esm2015/lib/components/commands/command-face.js.map +1 -1
  21. package/esm2015/lib/components/commands/flex.component.js +30 -0
  22. package/esm2015/lib/components/commands/flex.component.js.map +1 -0
  23. package/esm2015/lib/components/commands/flex.component.metadata.json +1 -0
  24. package/esm2015/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  25. package/esm2015/lib/components/commands/group/command-group/command-group.component.js +47 -0
  26. package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  27. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -0
  28. package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  29. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +55 -0
  30. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  31. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -0
  32. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  33. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +39 -0
  34. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  35. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -0
  36. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  37. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  38. package/esm2015/lib/components/commands/group/command-group.js +112 -0
  39. package/esm2015/lib/components/commands/group/command-group.js.map +1 -0
  40. package/esm2015/lib/components/commands/group/command-group.metadata.json +1 -0
  41. package/esm2015/lib/components/commands/group/more-menu.component.js +55 -0
  42. package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -0
  43. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -0
  44. package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  45. package/esm2015/lib/components/commands/group/popup-menu.component.js +65 -0
  46. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -0
  47. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -0
  48. package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  49. package/esm2015/lib/components/commands/group/registration.js +58 -0
  50. package/esm2015/lib/components/commands/group/registration.js.map +1 -0
  51. package/esm2015/lib/components/commands/group/registration.metadata.json +1 -0
  52. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +55 -0
  53. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  54. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -0
  55. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  56. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  57. package/esm2015/lib/components/commands/group/view-data.js +104 -0
  58. package/esm2015/lib/components/commands/group/view-data.js.map +1 -0
  59. package/esm2015/lib/components/commands/group/view-data.metadata.json +1 -0
  60. package/esm2015/lib/components/commands/separator.component.js +35 -0
  61. package/esm2015/lib/components/commands/separator.component.js.map +1 -0
  62. package/esm2015/lib/components/commands/separator.component.metadata.json +1 -0
  63. package/esm2015/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  64. package/esm2015/lib/components/components.module.js +25 -29
  65. package/esm2015/lib/components/components.module.js.map +1 -1
  66. package/esm2015/lib/components/components.module.metadata.json +1 -1
  67. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  68. package/esm2015/lib/components/index.js +13 -7
  69. package/esm2015/lib/components/index.js.map +1 -1
  70. package/esm2015/lib/components/index.metadata.json +1 -1
  71. package/esm2015/lib/components/table/table-model.js +4 -2
  72. package/esm2015/lib/components/table/table-model.js.map +1 -1
  73. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js +12 -21
  74. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -1
  75. package/esm2015/lib/components/table/table-row-menu/table-row-menu.component.metadata.json +1 -1
  76. package/esm2015/lib/components/track-by.js +5 -0
  77. package/esm2015/lib/components/track-by.js.map +1 -0
  78. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  79. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
  80. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  81. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  82. package/esm5/coolon-angular-ui-powerups.js +43 -40
  83. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  84. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  85. package/esm5/lib/components/commands/command/command.component.js +51 -0
  86. package/esm5/lib/components/commands/command/command.component.js.map +1 -0
  87. package/esm5/lib/components/commands/command/command.component.ngfactory.js.map +1 -0
  88. package/esm5/lib/components/commands/command-face/command-face.component.js +12 -18
  89. package/esm5/lib/components/commands/command-face/command-face.component.js.map +1 -1
  90. package/esm5/lib/components/commands/command-face.js +43 -5
  91. package/esm5/lib/components/commands/command-face.js.map +1 -1
  92. package/esm5/lib/components/commands/flex.component.js +33 -0
  93. package/esm5/lib/components/commands/flex.component.js.map +1 -0
  94. package/esm5/lib/components/commands/flex.component.ngfactory.js.map +1 -0
  95. package/esm5/lib/components/commands/group/command-group/command-group.component.js +51 -0
  96. package/esm5/lib/components/commands/group/command-group/command-group.component.js.map +1 -0
  97. package/esm5/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +1 -0
  98. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +59 -0
  99. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -0
  100. package/esm5/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +1 -0
  101. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +42 -0
  102. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -0
  103. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +1 -0
  104. package/esm5/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +1 -0
  105. package/esm5/lib/components/commands/group/command-group.js +134 -0
  106. package/esm5/lib/components/commands/group/command-group.js.map +1 -0
  107. package/esm5/lib/components/commands/group/more-menu.component.js +58 -0
  108. package/esm5/lib/components/commands/group/more-menu.component.js.map +1 -0
  109. package/esm5/lib/components/commands/group/more-menu.component.ngfactory.js.map +1 -0
  110. package/esm5/lib/components/commands/group/popup-menu.component.js +68 -0
  111. package/esm5/lib/components/commands/group/popup-menu.component.js.map +1 -0
  112. package/esm5/lib/components/commands/group/popup-menu.component.ngfactory.js.map +1 -0
  113. package/esm5/lib/components/commands/group/registration.js +80 -0
  114. package/esm5/lib/components/commands/group/registration.js.map +1 -0
  115. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js +58 -0
  116. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -0
  117. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.ngfactory.js.map +1 -0
  118. package/esm5/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +1 -0
  119. package/esm5/lib/components/commands/group/view-data.js +131 -0
  120. package/esm5/lib/components/commands/group/view-data.js.map +1 -0
  121. package/esm5/lib/components/commands/separator.component.js +37 -0
  122. package/esm5/lib/components/commands/separator.component.js.map +1 -0
  123. package/esm5/lib/components/commands/separator.component.ngfactory.js.map +1 -0
  124. package/esm5/lib/components/components.module.js +25 -29
  125. package/esm5/lib/components/components.module.js.map +1 -1
  126. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  127. package/esm5/lib/components/index.js +13 -7
  128. package/esm5/lib/components/index.js.map +1 -1
  129. package/esm5/lib/components/table/table-model.js +4 -2
  130. package/esm5/lib/components/table/table-model.js.map +1 -1
  131. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js +5 -8
  132. package/esm5/lib/components/table/table-row-menu/table-row-menu.component.js.map +1 -1
  133. package/esm5/lib/components/track-by.js +5 -0
  134. package/esm5/lib/components/track-by.js.map +1 -0
  135. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  136. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
  137. package/esm5/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  138. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  139. package/fesm2015/coolon-angular-ui-powerups.js +627 -255
  140. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  141. package/fesm5/coolon-angular-ui-powerups.js +713 -229
  142. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  143. package/lib/components/commands/command/command.component.d.ts +18 -0
  144. package/lib/components/commands/command-face/command-face.component.d.ts +3 -5
  145. package/lib/components/commands/command-face.d.ts +17 -2
  146. package/lib/components/commands/flex.component.d.ts +11 -0
  147. package/lib/components/commands/group/command-group/command-group.component.d.ts +11 -0
  148. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +21 -0
  149. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +13 -0
  150. package/lib/components/commands/group/command-group.d.ts +44 -0
  151. package/lib/components/commands/group/more-menu.component.d.ts +14 -0
  152. package/lib/components/commands/group/popup-menu.component.d.ts +17 -0
  153. package/lib/components/commands/group/registration.d.ts +32 -0
  154. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +13 -0
  155. package/lib/components/commands/group/view-data.d.ts +40 -0
  156. package/lib/components/commands/separator.component.d.ts +12 -0
  157. package/lib/components/index.d.ts +13 -7
  158. package/lib/components/table/table-model.d.ts +1 -1
  159. package/lib/components/table/table-row-menu/table-row-menu.component.d.ts +2 -1
  160. package/lib/components/track-by.d.ts +3 -0
  161. package/lib/place/components/side-place-navigation/side-place-navigation.component.d.ts +1 -1
  162. package/package.json +1 -1
  163. package/esm2015/lib/components/commands/command-bar.component.js +0 -51
  164. package/esm2015/lib/components/commands/command-bar.component.js.map +0 -1
  165. package/esm2015/lib/components/commands/command-bar.component.metadata.json +0 -1
  166. package/esm2015/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
  167. package/esm2015/lib/components/commands/command-container.js +0 -20
  168. package/esm2015/lib/components/commands/command-container.js.map +0 -1
  169. package/esm2015/lib/components/commands/command-container.metadata.json +0 -1
  170. package/esm2015/lib/components/commands/command.component.js +0 -38
  171. package/esm2015/lib/components/commands/command.component.js.map +0 -1
  172. package/esm2015/lib/components/commands/command.component.metadata.json +0 -1
  173. package/esm2015/lib/components/commands/command.component.ngfactory.js.map +0 -1
  174. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -57
  175. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
  176. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +0 -1
  177. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
  178. package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +0 -40
  179. package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
  180. package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +0 -1
  181. package/esm2015/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
  182. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +0 -49
  183. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
  184. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +0 -1
  185. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
  186. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -62
  187. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
  188. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.metadata.json +0 -1
  189. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
  190. package/esm2015/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
  191. package/esm5/lib/components/commands/command-bar.component.js +0 -31
  192. package/esm5/lib/components/commands/command-bar.component.js.map +0 -1
  193. package/esm5/lib/components/commands/command-bar.component.ngfactory.js.map +0 -1
  194. package/esm5/lib/components/commands/command-container.js +0 -30
  195. package/esm5/lib/components/commands/command-container.js.map +0 -1
  196. package/esm5/lib/components/commands/command.component.js +0 -41
  197. package/esm5/lib/components/commands/command.component.js.map +0 -1
  198. package/esm5/lib/components/commands/command.component.ngfactory.js.map +0 -1
  199. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +0 -64
  200. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +0 -1
  201. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.ngfactory.js.map +0 -1
  202. package/esm5/lib/components/commands/popup-menu/more-menu.component.js +0 -35
  203. package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +0 -1
  204. package/esm5/lib/components/commands/popup-menu/more-menu.component.ngfactory.js.map +0 -1
  205. package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +0 -45
  206. package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +0 -1
  207. package/esm5/lib/components/commands/popup-menu/popup-menu.component.ngfactory.js.map +0 -1
  208. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js +0 -66
  209. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.js.map +0 -1
  210. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +0 -1
  211. package/esm5/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.scss.shim.ngstyle.js.map +0 -1
  212. package/lib/components/commands/command-bar.component.d.ts +0 -10
  213. package/lib/components/commands/command-container.d.ts +0 -15
  214. package/lib/components/commands/command.component.d.ts +0 -15
  215. package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +0 -18
  216. package/lib/components/commands/popup-menu/more-menu.component.d.ts +0 -9
  217. package/lib/components/commands/popup-menu/popup-menu.component.d.ts +0 -14
  218. package/lib/components/commands/popup-menu-renderer/popup-menu-renderer.component.d.ts +0 -21
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata, __param, __awaiter } from 'tslib';
2
2
  import { DOCUMENT, CommonModule, Location } from '@angular/common';
3
- import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, forwardRef, Optional, HostBinding, ViewEncapsulation, EventEmitter, Output, ViewChild, ChangeDetectorRef, Self, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChildren, SkipSelf } from '@angular/core';
3
+ import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, EventEmitter, Optional, SkipSelf, ViewChild, Output, ViewChildren, QueryList, HostBinding, ViewEncapsulation, Self, ChangeDetectorRef, ContentChildren, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver } from '@angular/core';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import { MatFormFieldModule } from '@angular/material/form-field';
6
6
  import { MatInputModule } from '@angular/material/input';
@@ -12,13 +12,14 @@ import { CdkScrollableModule } from '@angular/cdk/scrolling';
12
12
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
13
13
  import { MatButtonModule } from '@angular/material/button';
14
14
  import { MatCheckboxModule } from '@angular/material/checkbox';
15
+ import { MatDividerModule } from '@angular/material/divider';
15
16
  import { MatIconModule } from '@angular/material/icon';
16
- import { MatMenu, MatMenuTrigger, _MatMenuDirectivesModule, MatMenuModule } from '@angular/material/menu';
17
+ import { MatMenu, MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
17
18
  import { MatTableModule } from '@angular/material/table';
18
19
  import { MatTooltipModule } from '@angular/material/tooltip';
19
20
  import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
20
21
  import { fas } from '@fortawesome/free-solid-svg-icons';
21
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableListModel, Disposable, MutableValueModel, StoreInValueModel, ListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, StoreInListModel, ValueModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Functions } from '@coolon/pectin';
22
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableValueModel, StoreInValueModel, ValueModel, MutableListModel, Trace, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, StoreInListModel, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Functions } from '@coolon/pectin';
22
23
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
23
24
  import ___default, { isEqual, isNil } from 'lodash';
24
25
  import { Enum } from 'typescript-string-enums';
@@ -377,6 +378,11 @@ CardContainerComponent = __decorate([
377
378
  __metadata("design:paramtypes", [])
378
379
  ], CardContainerComponent);
379
380
 
381
+ var TrackBy;
382
+ (function (TrackBy) {
383
+ TrackBy.byIndex = (data, index) => index;
384
+ })(TrackBy || (TrackBy = {}));
385
+
380
386
  var CommandFace;
381
387
  (function (CommandFace) {
382
388
  let Position;
@@ -384,6 +390,31 @@ var CommandFace;
384
390
  Position["START"] = "start";
385
391
  Position["END"] = "end";
386
392
  })(Position = CommandFace.Position || (CommandFace.Position = {}));
393
+ CommandFace.Style = Enum({
394
+ FLAT: 'flat',
395
+ STROKED: 'stroked',
396
+ RAISED: 'raised'
397
+ });
398
+ function getColorOf(face) {
399
+ return ___default.isFunction(face === null || face === void 0 ? void 0 : face.color) ? face.color() : undefined;
400
+ }
401
+ CommandFace.getColorOf = getColorOf;
402
+ function getStyleOf(face) {
403
+ return ___default.isFunction(face === null || face === void 0 ? void 0 : face.style) ? face.style() : undefined;
404
+ }
405
+ CommandFace.getStyleOf = getStyleOf;
406
+ function getIconOf(face) {
407
+ return ___default.isFunction(face === null || face === void 0 ? void 0 : face.icon) ? face.icon() : undefined;
408
+ }
409
+ CommandFace.getIconOf = getIconOf;
410
+ function getTooltipOf(face) {
411
+ return ___default.isFunction(face === null || face === void 0 ? void 0 : face.tooltip) ? face.tooltip() : undefined;
412
+ }
413
+ CommandFace.getTooltipOf = getTooltipOf;
414
+ function getTextOf(face) {
415
+ return ___default.isFunction(face === null || face === void 0 ? void 0 : face.text) ? face.text() : undefined;
416
+ }
417
+ CommandFace.getTextOf = getTextOf;
387
418
  class Adapter {
388
419
  constructor(face) {
389
420
  this.face = face;
@@ -392,7 +423,7 @@ var CommandFace;
392
423
  return ___default.isFunction(this.face.text) ? this.face.text() : undefined;
393
424
  }
394
425
  get icon() {
395
- return ___default.isFunction(this.face.icon) ? this.face.icon() : undefined;
426
+ return CommandFace.getIconOf(this.face);
396
427
  }
397
428
  get iconPosition() {
398
429
  return ___default.isFunction(this.face.iconPosition) ? this.face.iconPosition() : undefined;
@@ -406,8 +437,11 @@ var CommandFace;
406
437
  get iconPositionEnd() {
407
438
  return this.iconPosition === CommandFace.Position.END;
408
439
  }
409
- get destructive() {
410
- return ___default.isFunction(this.face.destructive) ? this.face.destructive() : false;
440
+ get color() {
441
+ return CommandFace.getColorOf(this.face);
442
+ }
443
+ get style() {
444
+ return CommandFace.getStyleOf(this.face);
411
445
  }
412
446
  }
413
447
  __decorate([
@@ -442,76 +476,399 @@ var CommandFace;
442
476
  ], Adapter.prototype, "iconPositionEnd", null);
443
477
  __decorate([
444
478
  Memoize(),
445
- __metadata("design:type", Boolean),
479
+ __metadata("design:type", String),
446
480
  __metadata("design:paramtypes", [])
447
- ], Adapter.prototype, "destructive", null);
481
+ ], Adapter.prototype, "color", null);
482
+ __decorate([
483
+ Memoize(),
484
+ __metadata("design:type", String),
485
+ __metadata("design:paramtypes", [])
486
+ ], Adapter.prototype, "style", null);
448
487
  CommandFace.Adapter = Adapter;
449
488
  })(CommandFace || (CommandFace = {}));
450
489
 
451
- class CommandContainer extends GarbageCollector {
490
+ class ViewData {
491
+ }
492
+ (function (ViewData) {
493
+ class FaceData extends ViewData {
494
+ constructor(face) {
495
+ super();
496
+ this.faceAdapter = new CommandFace.Adapter(face);
497
+ }
498
+ }
499
+ ViewData.FaceData = FaceData;
500
+ class GroupData extends FaceData {
501
+ constructor(face, xPosition, yPosition, children) {
502
+ super(face);
503
+ this.xPosition = xPosition;
504
+ this.yPosition = yPosition;
505
+ this.children = children;
506
+ }
507
+ get hasMixedIcons() {
508
+ const hasFaces = this.children.filter(c => ViewData.hasFace(c));
509
+ const iconCount = hasFaces.filter(c => !!c.faceAdapter.icon).length;
510
+ return iconCount > 0 && hasFaces.length !== iconCount;
511
+ }
512
+ }
513
+ __decorate([
514
+ Memoize(),
515
+ __metadata("design:type", Boolean),
516
+ __metadata("design:paramtypes", [])
517
+ ], GroupData.prototype, "hasMixedIcons", null);
518
+ ViewData.GroupData = GroupData;
519
+ class CommandData extends FaceData {
520
+ constructor(face, command) {
521
+ super(face);
522
+ this.command = command;
523
+ }
524
+ }
525
+ ViewData.CommandData = CommandData;
526
+ class SeparatorData extends ViewData {
527
+ }
528
+ ViewData.SeparatorData = SeparatorData;
529
+ class FlexData extends ViewData {
530
+ }
531
+ ViewData.FlexData = FlexData;
532
+ function as(type, viewData) {
533
+ return viewData instanceof type ? viewData : lang.illegalState(`expected instance of ${type.name}, got ${viewData.constructor.name}`);
534
+ }
535
+ ViewData.as = as;
536
+ function getCommand(data) {
537
+ return as(CommandData, data).command;
538
+ }
539
+ ViewData.getCommand = getCommand;
540
+ function getTooltip(data) {
541
+ return as(FaceData, data).faceAdapter.tooltip;
542
+ }
543
+ ViewData.getTooltip = getTooltip;
544
+ function getStyle(data) {
545
+ return as(FaceData, data).faceAdapter.style;
546
+ }
547
+ ViewData.getStyle = getStyle;
548
+ function getColor(data) {
549
+ return as(FaceData, data).faceAdapter.color;
550
+ }
551
+ ViewData.getColor = getColor;
552
+ function hasText(data) {
553
+ return !!as(FaceData, data).faceAdapter.text;
554
+ }
555
+ ViewData.hasText = hasText;
556
+ function getFace(data) {
557
+ return as(FaceData, data).faceAdapter.face;
558
+ }
559
+ ViewData.getFace = getFace;
560
+ function asGroup(viewData) {
561
+ return as(GroupData, viewData);
562
+ }
563
+ ViewData.asGroup = asGroup;
564
+ function hasMixedIcons(data) {
565
+ return as(GroupData, data).hasMixedIcons;
566
+ }
567
+ ViewData.hasMixedIcons = hasMixedIcons;
568
+ function isGroup(data) {
569
+ return data instanceof GroupData;
570
+ }
571
+ ViewData.isGroup = isGroup;
572
+ function hasFace(data) {
573
+ return data instanceof FaceData;
574
+ }
575
+ ViewData.hasFace = hasFace;
576
+ function isCommand(data) {
577
+ return data instanceof CommandData;
578
+ }
579
+ ViewData.isCommand = isCommand;
580
+ function isSeparator(data) {
581
+ return data instanceof SeparatorData;
582
+ }
583
+ ViewData.isSeparator = isSeparator;
584
+ function isFlex(data) {
585
+ return data instanceof FlexData;
586
+ }
587
+ ViewData.isFlex = isFlex;
588
+ })(ViewData || (ViewData = {}));
589
+
590
+ let CommandGroupMenuRendererComponent = class CommandGroupMenuRendererComponent extends DisposableComponent {
591
+ constructor(parent) {
592
+ super();
593
+ this.parent = parent;
594
+ this.groupViewDataModel = new MutableValueModel();
595
+ this.commandFired = new EventEmitter();
596
+ this.ViewData = ViewData;
597
+ this.TrackBy = TrackBy;
598
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
599
+ this.children = chain(this.groupViewDataModel).pluckList('children');
600
+ this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
601
+ }
602
+ getCommand(data) {
603
+ const command = ViewData.getCommand(data);
604
+ const { when } = Dsl.disposeWith(this);
605
+ when(command.busy).becomesFalsey(() => this.commandFired.emit());
606
+ return command;
607
+ }
608
+ };
609
+ CommandGroupMenuRendererComponent.ctorParameters = () => [
610
+ { type: CommandGroupMenuRendererComponent, decorators: [{ type: Optional }, { type: SkipSelf }] }
611
+ ];
612
+ __decorate([
613
+ ViewChild('menu', { static: true }),
614
+ __metadata("design:type", MatMenu)
615
+ ], CommandGroupMenuRendererComponent.prototype, "menuComponent", void 0);
616
+ __decorate([
617
+ Input(), StoreInValueModel('groupViewDataModel'),
618
+ __metadata("design:type", ViewData.GroupData)
619
+ ], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
620
+ __decorate([
621
+ Output(),
622
+ __metadata("design:type", Object)
623
+ ], CommandGroupMenuRendererComponent.prototype, "commandFired", void 0);
624
+ __decorate([
625
+ ViewChildren(MatMenuTrigger),
626
+ __metadata("design:type", QueryList)
627
+ ], CommandGroupMenuRendererComponent.prototype, "triggers", void 0);
628
+ CommandGroupMenuRendererComponent = __decorate([
629
+ Component({
630
+ selector: 'aup-command-group-menu',
631
+ template: "<mat-menu #menu [xPosition]=\"groupViewData.xPosition\" [yPosition]=\"groupViewData.yPosition\">\n <ng-container *ngFor=\"let data of children.value; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"ViewData.isCommand(data)\"\n [pectinCommand]=\"getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n mat-menu-item>\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n\n <ng-container *ngIf=\"ViewData.isGroup(data)\">\n <button mat-menu-item\n #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"innerPanel.menuComponent\"\n >\n <aup-command-face [face]=\"ViewData.getFace(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n <aup-command-group-menu #innerPanel\n [groupViewData]=\"ViewData.asGroup(data)\"\n (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\"></mat-divider>\n\n </ng-container>\n</mat-menu>\n"
632
+ }),
633
+ __param(0, Optional()), __param(0, SkipSelf()),
634
+ __metadata("design:paramtypes", [CommandGroupMenuRendererComponent])
635
+ ], CommandGroupMenuRendererComponent);
636
+
637
+ let CommandGroupRendererComponent = class CommandGroupRendererComponent extends DisposableComponent {
452
638
  constructor() {
453
639
  super();
454
- this._commandRegistrations = new MutableListModel();
640
+ this.renderRootNode = true;
641
+ this.ViewData = ViewData;
642
+ this.TrackBy = TrackBy;
643
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
644
+ this.childViewDataModels = chain(this.groupViewDataModel).pluckList('children');
645
+ }
646
+ };
647
+ __decorate([
648
+ Input(), TrackExternal(),
649
+ __metadata("design:type", ValueModel)
650
+ ], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
651
+ __decorate([
652
+ Input(), StoreInValueModel('groupViewDataModel'),
653
+ __metadata("design:type", ViewData.GroupData)
654
+ ], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
655
+ __decorate([
656
+ Input(),
657
+ HostBinding('class.render-root'),
658
+ __metadata("design:type", Object)
659
+ ], CommandGroupRendererComponent.prototype, "renderRootNode", void 0);
660
+ CommandGroupRendererComponent = __decorate([
661
+ Component({
662
+ selector: 'aup-command-group-renderer',
663
+ template: "<ng-template #groupTemplate let-group>\n\n <ng-container *ngIf=\"ViewData.hasText(group)\" [ngSwitch]=\"ViewData.getStyle(group)\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-stroked-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-raised-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-button>\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!ViewData.hasText(group)\">\n <button #trigger=\"matMenuTrigger\"\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n >\n <aup-command-face [face]=\"ViewData.getFace(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #commandTemplate let-data>\n\n <ng-container *ngIf=\"ViewData.hasText(data)\" [ngSwitch]=\"ViewData.getStyle(data)\">\n <button *ngSwitchCase=\"'raised'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-raised-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"'stroked'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-stroked-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n <button *ngSwitchDefault\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n </ng-container>\n\n <button *ngIf=\"!ViewData.hasText(data)\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-icon-button>\n <aup-command-face [face]=\"ViewData.getFace(data)\"></aup-command-face>\n </button>\n\n</ng-template>\n\n\n<ng-template *ngIf=\"renderRootNode\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: groupViewDataModel.value }\">\n</ng-template>\n\n<ng-container *ngIf=\"!renderRootNode\">\n <ng-container *ngFor=\"let data of this.childViewDataModels.value; trackBy: TrackBy.byIndex\">\n <ng-template *ngIf=\"ViewData.isGroup(data)\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n <ng-template *ngIf=\"ViewData.isCommand(data)\"\n [ngTemplateOutlet]=\"commandTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\" [vertical]=\"true\"></mat-divider>\n </ng-container>\n\n</ng-container>\n",
664
+ styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host:not(.render-root) mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host:not(.render-root)>*+*{margin-left:8px}:host span.flex{flex:1}"]
665
+ }),
666
+ __metadata("design:paramtypes", [])
667
+ ], CommandGroupRendererComponent);
668
+
669
+ class Registration extends GarbageCollector {
670
+ }
671
+ (function (Registration) {
672
+ class FaceRegistration extends Registration {
673
+ constructor(faceModel) {
674
+ super();
675
+ this.faceModel = faceModel;
676
+ }
455
677
  }
456
- get commandRegistrations() {
457
- return this._commandRegistrations.readonly;
678
+ Registration.FaceRegistration = FaceRegistration;
679
+ class CommandRegistration extends FaceRegistration {
680
+ constructor(faceModel, command) {
681
+ super(faceModel);
682
+ this.command = command;
683
+ }
684
+ toTemplate() {
685
+ return new ViewData.CommandData(this.faceModel.value, this.command);
686
+ }
458
687
  }
459
- registerCommand(command, face) {
460
- const registration = { command, faceAdapter: new CommandFace.Adapter(face) };
461
- this._commandRegistrations.push(registration);
462
- return Disposable.disposableThatRuns(() => this._commandRegistrations.remove(registration));
688
+ Registration.CommandRegistration = CommandRegistration;
689
+ class GroupRegistration extends FaceRegistration {
690
+ constructor(faceModel, group) {
691
+ super(faceModel);
692
+ this.group = group;
693
+ }
694
+ toTemplate() {
695
+ return new ViewData.GroupData(this.faceModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(r => r.toTemplate()));
696
+ }
463
697
  }
464
- getDefaultIconPosition() {
465
- return CommandFace.Position.START;
698
+ Registration.GroupRegistration = GroupRegistration;
699
+ class SeparatorRegistration extends Registration {
700
+ constructor() {
701
+ super(...arguments);
702
+ this.template = new ViewData.SeparatorData();
703
+ }
704
+ toTemplate() {
705
+ return this.template;
706
+ }
466
707
  }
467
- }
708
+ Registration.SeparatorRegistration = SeparatorRegistration;
709
+ class FlexRegistration extends Registration {
710
+ constructor() {
711
+ super(...arguments);
712
+ this.template = new ViewData.FlexData();
713
+ }
714
+ toTemplate() {
715
+ return this.template;
716
+ }
717
+ }
718
+ Registration.FlexRegistration = FlexRegistration;
719
+ function hasFace(entry) {
720
+ return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
721
+ }
722
+ Registration.hasFace = hasFace;
723
+ })(Registration || (Registration = {}));
468
724
 
469
- var CommandBarComponent_1;
470
- /**
471
- *
472
- */
473
- let CommandBarComponent = CommandBarComponent_1 = class CommandBarComponent extends CommandContainer {
474
- constructor() {
725
+ class CommandGroup extends GarbageCollector {
726
+ constructor(parent) {
475
727
  super();
728
+ this.parent = parent;
729
+ this._rootTemplate = new MutableValueModel();
730
+ this._registrations = new MutableListModel();
731
+ this._childFaceModels = new MutableListModel();
732
+ this._faceChangeCount = new MutableValueModel(0);
733
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
734
+ const childFaces = chain(this._childFaceModels)
735
+ .map(m => m.value, { dependsOn: this._faceChangeCount })
736
+ .rejectNil();
737
+ const iconCount = childFaces
738
+ .select(face => !!CommandFace.getIconOf(face))
739
+ .count();
740
+ this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(childFaces.length)).areTruthy();
741
+ this.childTemplates = chain(this._rootTemplate).pluckList('children');
742
+ this.initialised = chain(this._rootTemplate).isNotNil();
743
+ }
744
+ initialise() {
745
+ this.rebuildTemplates();
746
+ }
747
+ get rootTemplate() {
748
+ return this._rootTemplate.readonly;
749
+ }
750
+ get registrations() {
751
+ return this._registrations.readonly;
752
+ }
753
+ notifyChanged() {
754
+ if (this.parent) {
755
+ this.parent.notifyChanged();
756
+ }
757
+ else {
758
+ this.rebuildTemplates();
759
+ }
476
760
  }
477
- ngOnInit() {
761
+ notifyChildFaceChanged(is, was) {
762
+ this.notifyChanged();
763
+ }
764
+ rebuildTemplates() {
765
+ this._rootTemplate.value = new ViewData.GroupData(this.faceModel.value, this.xPosition, this.yPosition, this.registrations.value.map(r => r.toTemplate()));
766
+ }
767
+ get depth() {
768
+ return this.isRoot() ? 0 : this.parent.depth + 1;
769
+ }
770
+ isRoot() {
771
+ return false;
772
+ }
773
+ registerCommand(command, faceModel) {
774
+ return this.register(new Registration.CommandRegistration(faceModel, command));
775
+ }
776
+ registerGroup(group, faceModel) {
777
+ return this.register(new Registration.GroupRegistration(faceModel, group));
778
+ }
779
+ registerFlex(component) {
780
+ return this.register(new Registration.FlexRegistration());
781
+ }
782
+ registerSeparator(component) {
783
+ return this.register(new Registration.SeparatorRegistration());
784
+ }
785
+ register(registration) {
786
+ this._registrations.push(registration);
787
+ if (registration instanceof Registration.FaceRegistration) {
788
+ this._childFaceModels.push(registration.faceModel);
789
+ const { when } = Dsl.disposeWith(registration);
790
+ when(registration.faceModel).changes((is, was) => {
791
+ this.notifyChildFaceChanged(new CommandFace.Adapter(is), new CommandFace.Adapter(was));
792
+ }, { asLongAs: this.initialised });
793
+ registration.onDispose(() => this._childFaceModels.remove(registration.faceModel));
794
+ }
795
+ registration.onDispose(() => this._registrations.remove(registration));
796
+ return registration;
797
+ }
798
+ }
799
+ (function (CommandGroup) {
800
+ class Root extends CommandGroup {
801
+ isRoot() {
802
+ return true;
803
+ }
478
804
  }
479
- getButtonColor(registration) {
480
- return registration.faceAdapter.destructive ? 'warn' : undefined;
805
+ __decorate([
806
+ TrackExternal(),
807
+ __metadata("design:type", ValueModel)
808
+ ], Root.prototype, "faceModel", void 0);
809
+ __decorate([
810
+ TrackExternal({ defaultValue: 'after' }),
811
+ __metadata("design:type", ValueModel)
812
+ ], Root.prototype, "xPositionModel", void 0);
813
+ __decorate([
814
+ StoreInValueModel('xPositionModel'),
815
+ __metadata("design:type", String)
816
+ ], Root.prototype, "xPosition", void 0);
817
+ __decorate([
818
+ TrackExternal({ defaultValue: 'below' }),
819
+ __metadata("design:type", ValueModel)
820
+ ], Root.prototype, "yPositionModel", void 0);
821
+ __decorate([
822
+ StoreInValueModel('yPositionModel'),
823
+ __metadata("design:type", String)
824
+ ], Root.prototype, "yPosition", void 0);
825
+ CommandGroup.Root = Root;
826
+ function factory() {
827
+ return new Root();
828
+ }
829
+ CommandGroup.factory = factory;
830
+ })(CommandGroup || (CommandGroup = {}));
831
+
832
+ var CommandGroupComponent_1;
833
+ let CommandGroupComponent = CommandGroupComponent_1 = class CommandGroupComponent extends CommandGroup {
834
+ constructor(parent) {
835
+ super(parent);
836
+ this.parent = parent;
837
+ this.xPosition = 'after';
838
+ this.yPosition = 'below';
839
+ this.parent.registerGroup(this, this.faceModel);
481
840
  }
482
841
  };
483
- CommandBarComponent = CommandBarComponent_1 = __decorate([
842
+ CommandGroupComponent.ctorParameters = () => [
843
+ { type: CommandGroup, decorators: [{ type: SkipSelf }] }
844
+ ];
845
+ __decorate([
846
+ Input(), TrackExternal(),
847
+ __metadata("design:type", ValueModel)
848
+ ], CommandGroupComponent.prototype, "faceModel", void 0);
849
+ __decorate([
850
+ Input(), StoreInValueModel('faceModel'),
851
+ __metadata("design:type", Object)
852
+ ], CommandGroupComponent.prototype, "face", void 0);
853
+ __decorate([
854
+ Input(),
855
+ __metadata("design:type", String)
856
+ ], CommandGroupComponent.prototype, "xPosition", void 0);
857
+ __decorate([
858
+ Input(),
859
+ __metadata("design:type", String)
860
+ ], CommandGroupComponent.prototype, "yPosition", void 0);
861
+ CommandGroupComponent = CommandGroupComponent_1 = __decorate([
484
862
  Component({
485
- selector: 'aup-command-bar',
486
- template: `
487
- <ng-container *ngFor="let registration of commandRegistrations.value">
488
- <button *ngIf="registration.faceAdapter.icon && !registration.faceAdapter.text"
489
- mat-icon-button
490
- [color]="getButtonColor(registration)"
491
- [pectinCommand]="registration.command"
492
- [matTooltip]="registration.faceAdapter.tooltip"
493
- >
494
- <aup-command-face [face]="registration.faceAdapter.face"></aup-command-face>
495
- </button>
496
- <button *ngIf="registration.faceAdapter.text"
497
- [color]="getButtonColor(registration)"
498
- mat-button
499
- [pectinCommand]="registration.command"
500
- [matTooltip]="registration.tooltip"
501
- >
502
- <aup-command-face [face]="registration.faceAdapter.face"></aup-command-face>
503
- </button>
504
- </ng-container>
505
- `,
506
- providers: [{ provide: CommandContainer, useExisting: forwardRef(() => CommandBarComponent_1) }],
507
- styles: [`:host {
508
- display: inline-flex;
509
- flex-direction: row;
510
- align-items: center;
511
- }`]
863
+ selector: 'aup-command-group',
864
+ template: '',
865
+ providers: [
866
+ { provide: CommandGroup, useExisting: CommandGroupComponent_1 }
867
+ ]
512
868
  }),
513
- __metadata("design:paramtypes", [])
514
- ], CommandBarComponent);
869
+ __param(0, SkipSelf()),
870
+ __metadata("design:paramtypes", [CommandGroup])
871
+ ], CommandGroupComponent);
515
872
 
516
873
  /**
517
874
  * Custom CSS:
@@ -524,9 +881,8 @@ CommandBarComponent = CommandBarComponent_1 = __decorate([
524
881
  * }
525
882
  */
526
883
  let CommandFaceComponent = class CommandFaceComponent extends DisposableComponent {
527
- constructor(commandContainer) {
884
+ constructor() {
528
885
  super();
529
- this.commandContainer = commandContainer;
530
886
  this.faceModel = new MutableValueModel();
531
887
  this.ignoreIcon = false;
532
888
  this.ignoreText = false;
@@ -537,7 +893,7 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
537
893
  this.iconModel = faceAdapter.pluck('icon');
538
894
  this.textModel = faceAdapter.pluck('text');
539
895
  this.positionModel = faceAdapter.pluck('iconPosition');
540
- this.destructiveModel = faceAdapter.pluck('destructive');
896
+ this.colorModel = faceAdapter.pluck('color');
541
897
  }
542
898
  get requiresMissingIconInLayout() {
543
899
  return this.includeMissingIconInLayout && !this.iconModel.value;
@@ -545,8 +901,8 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
545
901
  ngOnInit() {
546
902
  }
547
903
  get iconPosition() {
548
- var _a, _b, _c;
549
- return (_c = (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : (_b = this.commandContainer) === null || _b === void 0 ? void 0 : _b.getDefaultIconPosition()) !== null && _c !== void 0 ? _c : CommandFace.Position.START;
904
+ var _a;
905
+ return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : CommandFace.Position.START;
550
906
  }
551
907
  get shouldIncludeIcon() {
552
908
  return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
@@ -560,13 +916,10 @@ let CommandFaceComponent = class CommandFaceComponent extends DisposableComponen
560
916
  get text() {
561
917
  return this.ignoreText ? undefined : this.textModel.value;
562
918
  }
563
- get destructive() {
564
- return this.destructiveModel.value;
919
+ get color() {
920
+ return this.colorModel.value;
565
921
  }
566
922
  };
567
- CommandFaceComponent.ctorParameters = () => [
568
- { type: CommandContainer, decorators: [{ type: Optional }] }
569
- ];
570
923
  __decorate([
571
924
  Input('face'), StoreInValueModel('faceModel'),
572
925
  __metadata("design:type", Object)
@@ -589,10 +942,10 @@ __decorate([
589
942
  __metadata("design:paramtypes", [])
590
943
  ], CommandFaceComponent.prototype, "requiresMissingIconInLayout", null);
591
944
  __decorate([
592
- HostBinding('class.destructive'),
593
- __metadata("design:type", Boolean),
945
+ HostBinding('attr.color'),
946
+ __metadata("design:type", String),
594
947
  __metadata("design:paramtypes", [])
595
- ], CommandFaceComponent.prototype, "destructive", null);
948
+ ], CommandFaceComponent.prototype, "color", null);
596
949
  CommandFaceComponent = __decorate([
597
950
  Component({
598
951
  selector: 'aup-command-face',
@@ -600,224 +953,257 @@ CommandFaceComponent = __decorate([
600
953
  encapsulation: ViewEncapsulation.None,
601
954
  styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:inline-flex;flex-direction:row;align-items:center}aup-command-face *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}"]
602
955
  }),
603
- __param(0, Optional()),
604
- __metadata("design:paramtypes", [CommandContainer])
956
+ __metadata("design:paramtypes", [])
605
957
  ], CommandFaceComponent);
606
958
 
607
959
  /**
608
960
  *
609
961
  */
610
962
  let CommandComponent = class CommandComponent extends DisposableComponent {
611
- constructor(commandContainer) {
963
+ constructor(parent) {
612
964
  super();
613
- this.commandContainer = commandContainer;
965
+ this.parent = parent;
966
+ this.CommandFace = CommandFace;
967
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
968
+ this.buttonStyle = chain(this.faceModel).map(f => CommandFace.getStyleOf(f));
969
+ if (parent) {
970
+ this.registerDisposable(this.parent.registerCommand(this.command, this.faceModel));
971
+ }
614
972
  }
615
973
  ngOnInit() {
616
- this.registerDisposable(this.commandContainer.registerCommand(this.command, this.face));
617
974
  }
618
975
  };
619
976
  CommandComponent.ctorParameters = () => [
620
- { type: CommandContainer }
977
+ { type: CommandGroup, decorators: [{ type: Optional }] }
621
978
  ];
622
979
  __decorate([
623
980
  Input(), TrackExternal(),
624
981
  __metadata("design:type", Command)
625
982
  ], CommandComponent.prototype, "command", void 0);
626
983
  __decorate([
627
- Input(),
984
+ Input(), TrackExternal(),
985
+ __metadata("design:type", ValueModel)
986
+ ], CommandComponent.prototype, "faceModel", void 0);
987
+ __decorate([
988
+ Input(), StoreInValueModel('faceModel'),
628
989
  __metadata("design:type", Object)
629
990
  ], CommandComponent.prototype, "face", void 0);
630
991
  CommandComponent = __decorate([
631
992
  Component({
632
993
  selector: 'aup-command',
633
- template: ``
994
+ template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <button *ngSwitchCase=\"CommandFace.Style.STROKED\" mat-stroked-button [pectinCommand]=\"command\" [color]=\"CommandFace.getColorOf(face)\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"CommandFace.Style.RAISED\" mat-raised-button [pectinCommand]=\"command\" [color]=\"CommandFace.getColorOf(face)\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <button *ngSwitchDefault mat-button [pectinCommand]=\"command\" [color]=\"CommandFace.getColorOf(face)\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n"
634
995
  }),
635
- __metadata("design:paramtypes", [CommandContainer])
996
+ __param(0, Optional()),
997
+ __metadata("design:paramtypes", [CommandGroup])
636
998
  ], CommandComponent);
637
999
 
638
1000
  /**
639
1001
  *
640
1002
  */
641
- let PopupMenuRendererComponent = class PopupMenuRendererComponent extends DisposableComponent {
642
- constructor() {
1003
+ let FlexComponent = class FlexComponent extends DisposableComponent {
1004
+ constructor(parent) {
643
1005
  super();
644
- this.xPosition = 'after';
645
- this.yPosition = 'below';
646
- this.commandExecuted = new EventEmitter();
647
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
648
- const registrations = chain(this.commandRegistrations);
649
- const iconCount = registrations.select(r => !!r.faceAdapter.icon).count();
650
- this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), iconCount.doesNotEqual(registrations.length)).areTruthy();
1006
+ this.parent = parent;
1007
+ if (parent) {
1008
+ parent.registerFlex(this);
1009
+ }
651
1010
  }
652
1011
  ngOnInit() {
653
1012
  }
654
- getPopupMenuCommandFor(item) {
655
- const { when } = Dsl.disposeWith(this);
656
- when(item.command.busy).becomesFalsey(() => {
657
- this.commandExecuted.emit();
658
- });
659
- return item.command;
1013
+ };
1014
+ FlexComponent.ctorParameters = () => [
1015
+ { type: CommandGroup }
1016
+ ];
1017
+ FlexComponent = __decorate([
1018
+ Component({
1019
+ selector: 'aup-flex',
1020
+ template: ``
1021
+ }),
1022
+ __metadata("design:paramtypes", [CommandGroup])
1023
+ ], FlexComponent);
1024
+
1025
+ const ɵ0 = CommandGroup.factory;
1026
+ /**
1027
+ *
1028
+ */
1029
+ let MoreMenuComponent = class MoreMenuComponent extends DisposableComponent {
1030
+ constructor(group) {
1031
+ super();
1032
+ this.group = group;
1033
+ this.tooltipModel = new MutableValueModel();
1034
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
1035
+ group.xPosition = 'before'; // this should be the default unless overridden by the user.
1036
+ group.faceModel = chain(this.tooltipModel).map(tooltip => {
1037
+ return {
1038
+ icon: () => 'mat:more_vert',
1039
+ tooltip() {
1040
+ return tooltip;
1041
+ }
1042
+ };
1043
+ }, { allowNil: true });
660
1044
  }
661
- getButtonColor(registration) {
662
- return registration.faceAdapter.destructive ? 'warn' : undefined;
1045
+ ngOnInit() {
1046
+ }
1047
+ ngAfterContentInit() {
1048
+ this.group.initialise();
663
1049
  }
664
1050
  };
1051
+ MoreMenuComponent.ctorParameters = () => [
1052
+ { type: CommandGroup }
1053
+ ];
665
1054
  __decorate([
666
- Input(), TrackExternal(),
667
- __metadata("design:type", ListModel)
668
- ], PopupMenuRendererComponent.prototype, "commandRegistrations", void 0);
669
- __decorate([
670
- Input(),
671
- __metadata("design:type", String)
672
- ], PopupMenuRendererComponent.prototype, "xPosition", void 0);
673
- __decorate([
674
- Input(),
1055
+ Input(), StoreInValueModel('tooltipModel'),
675
1056
  __metadata("design:type", String)
676
- ], PopupMenuRendererComponent.prototype, "yPosition", void 0);
677
- __decorate([
678
- Output(),
679
- __metadata("design:type", Object)
680
- ], PopupMenuRendererComponent.prototype, "commandExecuted", void 0);
1057
+ ], MoreMenuComponent.prototype, "tooltip", void 0);
681
1058
  __decorate([
682
- ViewChild(MatMenu),
683
- __metadata("design:type", MatMenu)
684
- ], PopupMenuRendererComponent.prototype, "matMenu", void 0);
685
- PopupMenuRendererComponent = __decorate([
1059
+ Trace(),
1060
+ __metadata("design:type", Function),
1061
+ __metadata("design:paramtypes", []),
1062
+ __metadata("design:returntype", void 0)
1063
+ ], MoreMenuComponent.prototype, "ngAfterContentInit", null);
1064
+ MoreMenuComponent = __decorate([
686
1065
  Component({
687
- selector: 'aup-popup-menu-renderer',
688
- template: "<mat-menu [xPosition]=\"xPosition\" [yPosition]=\"yPosition\" >\n <button *ngFor=\"let registration of commandRegistrations.value\"\n mat-menu-item\n [pectinCommand]=\"getPopupMenuCommandFor(registration)\"\n >\n <aup-command-face [face]=\"registration.faceAdapter.face\" [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n</mat-menu>\n",
689
- styles: [":host{display:inline-flex;flex-direction:row;align-items:center}"]
1066
+ selector: 'aup-more-menu',
1067
+ template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1068
+ providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
690
1069
  }),
691
- __metadata("design:paramtypes", [])
692
- ], PopupMenuRendererComponent);
1070
+ __metadata("design:paramtypes", [CommandGroup])
1071
+ ], MoreMenuComponent);
693
1072
 
1073
+ const ɵ0$1 = CommandGroup.factory;
694
1074
  /**
695
1075
  *
696
1076
  */
697
- let AbstractPopupMenuComponent = class AbstractPopupMenuComponent extends CommandContainer {
698
- constructor(cdr) {
1077
+ let PopupMenuComponent = class PopupMenuComponent extends DisposableComponent {
1078
+ constructor(group) {
699
1079
  super();
700
- this.cdr = cdr;
701
- this.xPosition = 'after';
702
- this.yPosition = 'below';
703
- }
704
- ngAfterViewInit() {
705
- this.cdr.detectChanges();
1080
+ this.group = group;
1081
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
1082
+ group.faceModel = this.faceModel;
706
1083
  }
707
- get matMenuComponent() {
708
- var _a;
709
- return (_a = this.popupMenu) === null || _a === void 0 ? void 0 : _a.matMenu;
1084
+ ngOnInit() {
710
1085
  }
711
- closeMenu() {
712
- this.menuTrigger.closeMenu();
1086
+ ngAfterContentInit() {
1087
+ this.group.initialise();
713
1088
  }
714
- getButtonColor(registration) {
715
- return registration.faceAdapter.destructive ? 'warn' : undefined;
1089
+ ngAfterViewInit() {
716
1090
  }
717
1091
  };
718
- AbstractPopupMenuComponent.ctorParameters = () => [
719
- { type: ChangeDetectorRef }
1092
+ PopupMenuComponent.ctorParameters = () => [
1093
+ { type: CommandGroup }
720
1094
  ];
721
1095
  __decorate([
722
- Input(),
723
- __metadata("design:type", String)
724
- ], AbstractPopupMenuComponent.prototype, "xPosition", void 0);
1096
+ Input(), TrackExternal(),
1097
+ __metadata("design:type", ValueModel)
1098
+ ], PopupMenuComponent.prototype, "faceModel", void 0);
725
1099
  __decorate([
726
- Input(),
727
- __metadata("design:type", String)
728
- ], AbstractPopupMenuComponent.prototype, "yPosition", void 0);
1100
+ Input(), StoreInValueModel('faceModel'),
1101
+ __metadata("design:type", Object)
1102
+ ], PopupMenuComponent.prototype, "face", void 0);
729
1103
  __decorate([
730
- ViewChild(PopupMenuRendererComponent),
731
- __metadata("design:type", PopupMenuRendererComponent)
732
- ], AbstractPopupMenuComponent.prototype, "popupMenu", void 0);
1104
+ Trace(),
1105
+ __metadata("design:type", Function),
1106
+ __metadata("design:paramtypes", []),
1107
+ __metadata("design:returntype", void 0)
1108
+ ], PopupMenuComponent.prototype, "ngOnInit", null);
733
1109
  __decorate([
734
- ViewChild(MatMenuTrigger),
735
- __metadata("design:type", MatMenuTrigger)
736
- ], AbstractPopupMenuComponent.prototype, "menuTrigger", void 0);
737
- AbstractPopupMenuComponent = __decorate([
1110
+ Trace(),
1111
+ __metadata("design:type", Function),
1112
+ __metadata("design:paramtypes", []),
1113
+ __metadata("design:returntype", void 0)
1114
+ ], PopupMenuComponent.prototype, "ngAfterContentInit", null);
1115
+ __decorate([
1116
+ Trace(),
1117
+ __metadata("design:type", Function),
1118
+ __metadata("design:paramtypes", []),
1119
+ __metadata("design:returntype", void 0)
1120
+ ], PopupMenuComponent.prototype, "ngAfterViewInit", null);
1121
+ PopupMenuComponent = __decorate([
738
1122
  Component({
739
- selector: 'aup-abstract-popup-menu',
740
- template: ''
1123
+ selector: 'aup-popup-menu',
1124
+ template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1125
+ providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
741
1126
  }),
742
- __metadata("design:paramtypes", [ChangeDetectorRef])
743
- ], AbstractPopupMenuComponent);
1127
+ __metadata("design:paramtypes", [CommandGroup])
1128
+ ], PopupMenuComponent);
744
1129
 
745
- var PopupMenuComponent_1;
746
1130
  /**
747
1131
  *
748
1132
  */
749
- let PopupMenuComponent = PopupMenuComponent_1 = class PopupMenuComponent extends AbstractPopupMenuComponent {
750
- constructor(cdr) {
751
- super(cdr);
752
- this.faceModel = new MutableValueModel();
753
- const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
754
- const faceAdapterModel = chain(this.faceModel).map(face => new CommandFace.Adapter(face));
755
- this.faceTooltipModel = faceAdapterModel.pluck('tooltip');
1133
+ let SeparatorComponent = class SeparatorComponent extends DisposableComponent {
1134
+ constructor(parent) {
1135
+ super();
1136
+ this.parent = parent;
1137
+ if (parent) {
1138
+ parent.registerSeparator(this);
1139
+ }
756
1140
  }
757
- getTooltip() {
758
- return this.faceTooltipModel.value;
1141
+ isVertical() {
1142
+ return this === null || this === void 0 ? void 0 : this.parent.isRoot();
759
1143
  }
760
1144
  ngOnInit() {
761
1145
  }
762
1146
  };
763
- PopupMenuComponent.ctorParameters = () => [
764
- { type: ChangeDetectorRef }
1147
+ SeparatorComponent.ctorParameters = () => [
1148
+ { type: CommandGroup, decorators: [{ type: Optional }] }
765
1149
  ];
766
- __decorate([
767
- Input(), StoreInValueModel('faceModel'),
768
- __metadata("design:type", Object)
769
- ], PopupMenuComponent.prototype, "face", void 0);
770
- PopupMenuComponent = PopupMenuComponent_1 = __decorate([
1150
+ SeparatorComponent = __decorate([
771
1151
  Component({
772
- selector: 'aup-popup-menu',
1152
+ selector: 'aup-separator',
773
1153
  template: `
774
- <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->
775
- <button *ngIf="matMenuComponent" mat-icon-button [matMenuTriggerFor]="matMenuComponent" [matTooltip]="getTooltip()">
776
- <aup-command-face [face]="face"></aup-command-face>
777
- </button>
778
- <aup-popup-menu-renderer [commandRegistrations]="commandRegistrations" [yPosition]="yPosition"
779
- [xPosition]="xPosition"
780
- (commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
781
- `,
782
- providers: [{ provide: CommandContainer, useExisting: forwardRef(() => PopupMenuComponent_1) }]
1154
+ <mat-divider [vertical]="isVertical()"></mat-divider>`
783
1155
  }),
784
- __metadata("design:paramtypes", [ChangeDetectorRef])
785
- ], PopupMenuComponent);
1156
+ __param(0, Optional()),
1157
+ __metadata("design:paramtypes", [CommandGroup])
1158
+ ], SeparatorComponent);
786
1159
 
787
- var MoreMenuComponent_1;
1160
+ const ɵ0$2 = CommandGroup.factory;
788
1161
  /**
789
1162
  *
790
1163
  */
791
- let MoreMenuComponent = MoreMenuComponent_1 = class MoreMenuComponent extends AbstractPopupMenuComponent {
792
- constructor(cdr) {
793
- super(cdr);
794
- this.xPosition = "before"; // this should be the default unless overriden by the user.
1164
+ let ToolBarComponent = class ToolBarComponent extends DisposableComponent {
1165
+ constructor(group) {
1166
+ super();
1167
+ this.group = group;
1168
+ }
1169
+ ngOnInit() {
1170
+ }
1171
+ ngAfterContentInit() {
1172
+ this.group.initialise();
1173
+ }
1174
+ ngAfterViewInit() {
795
1175
  }
796
1176
  };
797
- MoreMenuComponent.ctorParameters = () => [
798
- { type: ChangeDetectorRef }
1177
+ ToolBarComponent.ctorParameters = () => [
1178
+ { type: CommandGroup }
799
1179
  ];
800
1180
  __decorate([
801
- Input(),
802
- __metadata("design:type", String)
803
- ], MoreMenuComponent.prototype, "tooltip", void 0);
804
- MoreMenuComponent = MoreMenuComponent_1 = __decorate([
1181
+ Trace(),
1182
+ __metadata("design:type", Function),
1183
+ __metadata("design:paramtypes", []),
1184
+ __metadata("design:returntype", void 0)
1185
+ ], ToolBarComponent.prototype, "ngOnInit", null);
1186
+ __decorate([
1187
+ Trace(),
1188
+ __metadata("design:type", Function),
1189
+ __metadata("design:paramtypes", []),
1190
+ __metadata("design:returntype", void 0)
1191
+ ], ToolBarComponent.prototype, "ngAfterContentInit", null);
1192
+ __decorate([
1193
+ Trace(),
1194
+ __metadata("design:type", Function),
1195
+ __metadata("design:paramtypes", []),
1196
+ __metadata("design:returntype", void 0)
1197
+ ], ToolBarComponent.prototype, "ngAfterViewInit", null);
1198
+ ToolBarComponent = __decorate([
805
1199
  Component({
806
- selector: 'aup-more-menu',
807
- template: `
808
- <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->
809
- <button *ngIf="matMenuComponent" mat-icon-button [matMenuTriggerFor]="matMenuComponent" [matTooltip]="tooltip">
810
- <mat-icon>more_vert</mat-icon>
811
- </button>
812
- <aup-popup-menu-renderer [commandRegistrations]="commandRegistrations"
813
- [xPosition]="xPosition"
814
- [yPosition]="yPosition"
815
- (commandExecuted)="closeMenu()"></aup-popup-menu-renderer>
816
- `,
817
- providers: [{ provide: CommandContainer, useExisting: forwardRef(() => MoreMenuComponent_1) }]
1200
+ selector: 'aup-tool-bar',
1201
+ template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1202
+ providers: [{ provide: CommandGroup, useFactory: ɵ0$2 }],
1203
+ styles: [":host{display:inline-flex;flex-direction:row;align-items:center}:host mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host span.flex{flex:1}:host>*+*{margin-left:8px}"]
818
1204
  }),
819
- __metadata("design:paramtypes", [ChangeDetectorRef])
820
- ], MoreMenuComponent);
1205
+ __metadata("design:paramtypes", [CommandGroup])
1206
+ ], ToolBarComponent);
821
1207
 
822
1208
  let FocusContainerComponent = class FocusContainerComponent extends DisposableComponent {
823
1209
  constructor(focusManager) {
@@ -1956,7 +2342,7 @@ SelectHeaderCellRendererComponent = __decorate([
1956
2342
 
1957
2343
  const noop = () => {
1958
2344
  };
1959
- const ɵ0 = noop;
2345
+ const ɵ0$3 = noop;
1960
2346
  const CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
1961
2347
  class ColumnModel {
1962
2348
  constructor(columnId, defaults) {
@@ -2419,12 +2805,14 @@ let TableModel = TableModel_1 = class TableModel {
2419
2805
  }
2420
2806
  return column;
2421
2807
  }
2808
+ // removeColumn(column: ColumnModel<Row>) {
2809
+ //
2810
+ // }
2422
2811
  columnTextProperties(columnTextProperties) {
2423
2812
  this._columnTextPropertiesLookup = columnTextProperties;
2424
2813
  }
2425
2814
  getColumnTextProperties(column) {
2426
- const factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
2427
- return factory ? factory() : undefined;
2815
+ return this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
2428
2816
  }
2429
2817
  startEditSession(row) {
2430
2818
  const rowId = this.identityOf(row);
@@ -2713,10 +3101,10 @@ TableHeaderCellRendererComponent = __decorate([
2713
3101
  __metadata("design:paramtypes", [])
2714
3102
  ], TableHeaderCellRendererComponent);
2715
3103
 
2716
- class MenuItemData extends CommandFace.Adapter {
3104
+ class MenuItemData {
2717
3105
  constructor(factory, face) {
2718
- super(face);
2719
3106
  this.factory = factory;
3107
+ this.face = face;
2720
3108
  }
2721
3109
  }
2722
3110
  /**
@@ -2760,24 +3148,16 @@ TableRowMenuComponent = __decorate([
2760
3148
  Component({
2761
3149
  selector: 'aup-table-row-menu',
2762
3150
  template: `
2763
- <button mat-icon-button *ngFor="let action of actions" [pectinCommand]="action.factory.create(value)">
2764
- <aup-icon [icon]="action.icon"></aup-icon>
2765
- </button>
2766
- <ng-container *ngIf="moreActions.length > 0">
2767
- <button #trigger mat-icon-button [matMenuTriggerFor]="menu">
2768
- <aup-icon icon="mat:more_vert"></aup-icon>
2769
- </button>
2770
- <mat-menu #menu="matMenu" xPosition="before" matTooltip="More options...">
2771
- <button *ngFor="let action of moreActions"
2772
- mat-menu-item
2773
- [pectinCommand]="createMoreMenuCommand(action, value)"
2774
- >
2775
- <aup-icon *ngIf="action.icon && action.iconPositionStart" [icon]="action.icon"></aup-icon>
2776
- {{action.text}}
2777
- <aup-icon *ngIf="action.icon && action.iconPositionEnd" [icon]="action.icon"></aup-icon>
2778
- </button>
2779
- </mat-menu>
2780
- </ng-container>
3151
+ <aup-tool-bar>
3152
+ <aup-command *ngFor="let action of actions" [command]="action.factory.create(value)"
3153
+ [face]="action.faceModel"></aup-command>
3154
+ </aup-tool-bar>
3155
+ <ng-container *ngIf="moreActions.length > 0">
3156
+ <aup-more-menu>
3157
+ <aup-command *ngFor="let action of moreActions" [command]="action.factory.create(value)"
3158
+ [face]="action.faceModel"></aup-command>
3159
+ </aup-more-menu>
3160
+ </ng-container>
2781
3161
  `,
2782
3162
  styles: [`:host {
2783
3163
  display: inline-flex;
@@ -2913,13 +3293,16 @@ ComponentsModule = __decorate([
2913
3293
  IconComponent,
2914
3294
  SectionHeaderComponent,
2915
3295
  TableRowMenuComponent,
2916
- CommandBarComponent,
3296
+ ToolBarComponent,
2917
3297
  CommandComponent,
2918
3298
  PopupMenuComponent,
3299
+ CommandGroupComponent,
2919
3300
  CommandFaceComponent,
2920
- AbstractPopupMenuComponent,
2921
- PopupMenuRendererComponent,
2922
- MoreMenuComponent
3301
+ MoreMenuComponent,
3302
+ SeparatorComponent,
3303
+ FlexComponent,
3304
+ CommandGroupMenuRendererComponent,
3305
+ CommandGroupRendererComponent
2923
3306
  ],
2924
3307
  imports: [
2925
3308
  CommonModule,
@@ -2939,8 +3322,8 @@ ComponentsModule = __decorate([
2939
3322
  FontAwesomeModule,
2940
3323
  MatTooltipModule,
2941
3324
  MatAutocompleteModule,
2942
- _MatMenuDirectivesModule,
2943
- MatMenuModule
3325
+ MatMenuModule,
3326
+ MatDividerModule
2944
3327
  ],
2945
3328
  exports: [
2946
3329
  NumberInputComponent,
@@ -2966,28 +3349,17 @@ ComponentsModule = __decorate([
2966
3349
  IconComponent,
2967
3350
  SectionHeaderComponent,
2968
3351
  TableRowMenuComponent,
2969
- CommandBarComponent,
3352
+ CommandGroupComponent,
3353
+ ToolBarComponent,
2970
3354
  CommandComponent,
2971
- AbstractPopupMenuComponent,
2972
3355
  PopupMenuComponent,
2973
3356
  CommandFaceComponent,
2974
- PopupMenuRendererComponent,
2975
- MoreMenuComponent
3357
+ MoreMenuComponent,
3358
+ SeparatorComponent,
3359
+ FlexComponent
2976
3360
  ],
2977
3361
  providers: [
2978
3362
  FocusBindingFactory
2979
- // {
2980
- // provide: CELL_EDITOR_REGISTRATION, useValue: {
2981
- // type: 'string',
2982
- // editorClass: StringInputComponent
2983
- // }, multi: true
2984
- // },
2985
- // {
2986
- // provide: CELL_EDITOR_REGISTRATION, useValue: {
2987
- // type: 'number',
2988
- // editorClass: NumberInputComponent
2989
- // }, multi: true
2990
- // }
2991
3363
  ]
2992
3364
  }),
2993
3365
  __metadata("design:paramtypes", [FaIconLibrary])
@@ -6328,7 +6700,7 @@ ListPlaceNavComponent = __decorate([
6328
6700
  * (at)Place({
6329
6701
  * path: 'myPlace',
6330
6702
  * data: {
6331
- * nav: I18n.places.myPlace.nav()
6703
+ * nav: I18n.places.myPlace.nav
6332
6704
  * }
6333
6705
  * })
6334
6706
  */
@@ -6894,5 +7266,5 @@ function VisitParameterList(options) {
6894
7266
  * Generated bundle index. Do not edit.
6895
7267
  */
6896
7268
 
6897
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandBarComponent, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, IconComponent as ɵbk, SectionHeaderComponent as ɵbl, TableRowMenuComponent as ɵbm, CommandBarComponent as ɵbn, CommandContainer as ɵbo, CommandComponent as ɵbp, PopupMenuComponent as ɵbq, AbstractPopupMenuComponent as ɵbr, PopupMenuRendererComponent as ɵbs, CommandFaceComponent as ɵbt, MoreMenuComponent as ɵbu, PlaceModule as ɵbv, ComponentsModule as ɵbw, EmptyStateComponent as ɵbx, BusyOverlayComponent as ɵby, PlaceOutletComponent as ɵbz, FocusBindingDirective as ɵc, leftRightPlaceAnimation as ɵca, LEFT_RIGHT_PLACE_ANIMATION as ɵcb, AUP_PLACE_CONFIG as ɵcc, PlaceRouter as ɵce, InteractionService as ɵcf, ModalInteractionContextFactory as ɵcg, UrlService as ɵch, PlaceHistory as ɵci, TabbedPlaceNavigationComponent as ɵcj, AbstractPlaceNavigationComponent as ɵck, ListPlaceNavComponent as ɵcl, SidePlaceNavigationComponent as ɵcm, InteractionModule as ɵcn, ActivityContainerComponent as ɵco, AbstractInteractionContext as ɵcp, ActivityOutletComponent as ɵcq, ConfirmationDialogComponent as ɵcr, ACTIVITY_DATA as ɵcs, Activity as ɵct, ConfirmThenDialogComponent as ɵcv, AlertDialogComponent as ɵcw, InPlaceInteractionContextComponent as ɵcy, AddItemInteractionContextComponent as ɵcz, DisposableComponent as ɵd, ActivityActionsComponent as ɵda, PopupInteractionContextComponent as ɵdb, StringInputActivity as ɵdc, AbstractInputActivity as ɵdd, SelectInputActivity as ɵde, InteractionContextTriggerFor as ɵdf, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, NumberInputComponent as ɵj, StringInputComponent as ɵk, TextInputComponent as ɵl, PasswordInputComponent as ɵm, SelectInputComponent as ɵn, MultipleSelectInputComponent as ɵo, AutocompleteInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
7269
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandDirective, CommandFace, CommandFaceComponent, CommandGroup, CommandGroupComponent, CommandGroupMenuRendererComponent, CommandGroupRendererComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PopupMenuComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, Registration, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, UrlService, UrlSnapshot, VerticalFocusContainerComponent, ViewData, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, IconComponent as ɵbk, SectionHeaderComponent as ɵbl, TableRowMenuComponent as ɵbm, ToolBarComponent as ɵbn, CommandGroup as ɵbo, CommandComponent as ɵbp, PopupMenuComponent as ɵbq, CommandGroupComponent as ɵbr, CommandFaceComponent as ɵbs, MoreMenuComponent as ɵbt, SeparatorComponent as ɵbu, FlexComponent as ɵbv, CommandGroupMenuRendererComponent as ɵbw, CommandGroupRendererComponent as ɵbx, PlaceModule as ɵby, ComponentsModule as ɵbz, FocusBindingDirective as ɵc, EmptyStateComponent as ɵca, BusyOverlayComponent as ɵcb, PlaceOutletComponent as ɵcc, leftRightPlaceAnimation as ɵcd, LEFT_RIGHT_PLACE_ANIMATION as ɵce, AUP_PLACE_CONFIG as ɵcf, PlaceRouter as ɵch, InteractionService as ɵci, ModalInteractionContextFactory as ɵcj, UrlService as ɵck, PlaceHistory as ɵcl, TabbedPlaceNavigationComponent as ɵcm, AbstractPlaceNavigationComponent as ɵcn, ListPlaceNavComponent as ɵco, SidePlaceNavigationComponent as ɵcp, InteractionModule as ɵcq, ActivityContainerComponent as ɵcr, AbstractInteractionContext as ɵcs, ActivityOutletComponent as ɵct, ConfirmationDialogComponent as ɵcu, ACTIVITY_DATA as ɵcv, Activity as ɵcw, ConfirmThenDialogComponent as ɵcy, AlertDialogComponent as ɵcz, DisposableComponent as ɵd, InPlaceInteractionContextComponent as ɵdb, AddItemInteractionContextComponent as ɵdc, ActivityActionsComponent as ɵdd, PopupInteractionContextComponent as ɵde, StringInputActivity as ɵdf, AbstractInputActivity as ɵdg, SelectInputActivity as ɵdh, InteractionContextTriggerFor as ɵdi, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractValueInputComponent as ɵh, AbstractListInputComponent as ɵi, NumberInputComponent as ɵj, StringInputComponent as ɵk, TextInputComponent as ɵl, PasswordInputComponent as ɵm, SelectInputComponent as ɵn, MultipleSelectInputComponent as ɵo, AutocompleteInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
6898
7270
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map