@coolon/angular-ui-powerups 1.9.0 → 1.11.0

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 +19 -0
  2. package/assets/styles.scss +7 -67
  3. package/bundles/coolon-angular-ui-powerups.umd.js +2623 -1581
  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 +57 -44
  8. package/coolon-angular-ui-powerups.metadata.json +1 -1
  9. package/esm2015/coolon-angular-ui-powerups.js +55 -42
  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/components.module.js +37 -6
  16. package/esm2015/lib/components/components.module.js.map +1 -1
  17. package/esm2015/lib/components/components.module.metadata.json +1 -1
  18. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  19. package/esm2015/lib/components/forms/abstract-input-activity.js +47 -0
  20. package/esm2015/lib/components/forms/abstract-input-activity.js.map +1 -0
  21. package/esm2015/lib/components/forms/abstract-input-activity.metadata.json +1 -0
  22. package/esm2015/lib/components/forms/abstract-input-activity.ngfactory.js.map +1 -0
  23. package/esm2015/lib/components/forms/abstract-input.component.js +6 -1
  24. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  25. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  26. package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
  27. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
  29. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  30. package/esm2015/lib/components/forms/string-input/string-input-activity.js +22 -0
  31. package/esm2015/lib/components/forms/string-input/string-input-activity.js.map +1 -0
  32. package/esm2015/lib/components/forms/string-input/string-input-activity.metadata.json +1 -0
  33. package/esm2015/lib/components/forms/string-input/string-input-activity.ngfactory.js.map +1 -0
  34. package/esm2015/lib/components/forms/string-input/string-input.component.js +1 -1
  35. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  36. package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
  37. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  38. package/esm2015/lib/components/index.js +13 -0
  39. package/esm2015/lib/components/index.js.map +1 -1
  40. package/esm2015/lib/components/index.metadata.json +1 -1
  41. package/esm2015/lib/components/table/cell-editor.component.js +1 -0
  42. package/esm2015/lib/components/table/cell-editor.component.js.map +1 -0
  43. package/esm2015/lib/components/table/cell-editor.component.metadata.json +1 -0
  44. package/esm2015/lib/components/table/cell-renderer.js +1 -0
  45. package/esm2015/lib/components/table/cell-renderer.js.map +1 -0
  46. package/esm2015/lib/components/table/cell-renderer.metadata.json +1 -0
  47. package/esm2015/lib/components/table/column-model.js +160 -0
  48. package/esm2015/lib/components/table/column-model.js.map +1 -0
  49. package/esm2015/lib/components/table/column-model.metadata.json +1 -0
  50. package/esm2015/lib/components/table/column-template/column-template.directive.js +24 -0
  51. package/esm2015/lib/components/table/column-template/column-template.directive.js.map +1 -0
  52. package/esm2015/lib/components/table/column-template/column-template.directive.metadata.json +1 -0
  53. package/esm2015/lib/components/table/column-template/column-template.directive.ngfactory.js.map +1 -0
  54. package/esm2015/lib/components/table/column-text-properties.js +1 -0
  55. package/esm2015/lib/components/table/column-text-properties.js.map +1 -0
  56. package/esm2015/lib/components/table/column-text-properties.metadata.json +1 -0
  57. package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +27 -0
  58. package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -0
  59. package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.metadata.json +1 -0
  60. package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.ngfactory.js.map +1 -0
  61. package/esm2015/lib/components/table/default-cell-renderer/default-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  62. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +21 -0
  63. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -0
  64. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -0
  65. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ngfactory.js.map +1 -0
  66. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  67. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +50 -0
  68. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -0
  69. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -0
  70. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.ngfactory.js.map +1 -0
  71. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.scss.shim.ngstyle.js.map +1 -0
  72. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +40 -0
  73. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -0
  74. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.metadata.json +1 -0
  75. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.ngfactory.js.map +1 -0
  76. package/esm2015/lib/components/table/select-cell-renderer/select-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  77. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +32 -0
  78. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -0
  79. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.metadata.json +1 -0
  80. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.ngfactory.js.map +1 -0
  81. package/esm2015/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  82. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +64 -0
  83. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -0
  84. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -0
  85. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.ngfactory.js.map +1 -0
  86. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  87. package/esm2015/lib/components/table/table-def.js +1 -0
  88. package/esm2015/lib/components/table/table-def.js.map +1 -0
  89. package/esm2015/lib/components/table/table-def.metadata.json +1 -0
  90. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +32 -0
  91. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -0
  92. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -0
  93. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.ngfactory.js.map +1 -0
  94. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  95. package/esm2015/lib/components/table/table-model.js +197 -0
  96. package/esm2015/lib/components/table/table-model.js.map +1 -0
  97. package/esm2015/lib/components/table/table-model.metadata.json +1 -0
  98. package/esm2015/lib/components/table/table.component.js +60 -0
  99. package/esm2015/lib/components/table/table.component.js.map +1 -0
  100. package/esm2015/lib/components/table/table.component.metadata.json +1 -0
  101. package/esm2015/lib/components/table/table.component.ngfactory.js.map +1 -0
  102. package/esm2015/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
  103. package/esm2015/lib/interaction/activity.js +7 -1
  104. package/esm2015/lib/interaction/activity.js.map +1 -1
  105. package/esm2015/lib/interaction/activity.metadata.json +1 -1
  106. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +2 -2
  107. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  108. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  109. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +22 -9
  110. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  111. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  112. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  113. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +87 -0
  114. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -0
  115. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -0
  116. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.js.map +1 -0
  117. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
  118. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js +86 -0
  119. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -0
  120. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.metadata.json +1 -0
  121. package/esm2015/lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.js.map +1 -0
  122. package/esm2015/lib/interaction/index.js +2 -0
  123. package/esm2015/lib/interaction/index.js.map +1 -1
  124. package/esm2015/lib/interaction/index.metadata.json +1 -1
  125. package/esm2015/lib/interaction/interaction.module.js +16 -4
  126. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  127. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  128. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  129. package/esm5/coolon-angular-ui-powerups.js +55 -42
  130. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  131. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  132. package/esm5/lib/components/card-container/card-container.component.js +1 -1
  133. package/esm5/lib/components/components.module.js +37 -6
  134. package/esm5/lib/components/components.module.js.map +1 -1
  135. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  136. package/esm5/lib/components/forms/abstract-input-activity.js +50 -0
  137. package/esm5/lib/components/forms/abstract-input-activity.js.map +1 -0
  138. package/esm5/lib/components/forms/abstract-input-activity.ngfactory.js.map +1 -0
  139. package/esm5/lib/components/forms/abstract-input.component.js +6 -1
  140. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  141. package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
  142. package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
  143. package/esm5/lib/components/forms/string-input/string-input-activity.js +18 -0
  144. package/esm5/lib/components/forms/string-input/string-input-activity.js.map +1 -0
  145. package/esm5/lib/components/forms/string-input/string-input-activity.ngfactory.js.map +1 -0
  146. package/esm5/lib/components/forms/string-input/string-input.component.js +1 -1
  147. package/esm5/lib/components/forms/text-input/text-input.component.js +1 -1
  148. package/esm5/lib/components/index.js +13 -0
  149. package/esm5/lib/components/index.js.map +1 -1
  150. package/esm5/lib/components/table/cell-editor.component.js +1 -0
  151. package/esm5/lib/components/table/cell-editor.component.js.map +1 -0
  152. package/esm5/lib/components/table/cell-renderer.js +1 -0
  153. package/esm5/lib/components/table/cell-renderer.js.map +1 -0
  154. package/esm5/lib/components/table/column-model.js +196 -0
  155. package/esm5/lib/components/table/column-model.js.map +1 -0
  156. package/esm5/lib/components/table/column-template/column-template.directive.js +25 -0
  157. package/esm5/lib/components/table/column-template/column-template.directive.js.map +1 -0
  158. package/esm5/lib/components/table/column-template/column-template.directive.ngfactory.js.map +1 -0
  159. package/esm5/lib/components/table/column-text-properties.js +1 -0
  160. package/esm5/lib/components/table/column-text-properties.js.map +1 -0
  161. package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.js +32 -0
  162. package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.js.map +1 -0
  163. package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.ngfactory.js.map +1 -0
  164. package/esm5/lib/components/table/default-cell-renderer/default-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  165. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +22 -0
  166. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -0
  167. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.ngfactory.js.map +1 -0
  168. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  169. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +57 -0
  170. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -0
  171. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.ngfactory.js.map +1 -0
  172. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.scss.shim.ngstyle.js.map +1 -0
  173. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js +47 -0
  174. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.js.map +1 -0
  175. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.ngfactory.js.map +1 -0
  176. package/esm5/lib/components/table/select-cell-renderer/select-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  177. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js +35 -0
  178. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.js.map +1 -0
  179. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.ngfactory.js.map +1 -0
  180. package/esm5/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  181. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +66 -0
  182. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -0
  183. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.ngfactory.js.map +1 -0
  184. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  185. package/esm5/lib/components/table/table-def.js +1 -0
  186. package/esm5/lib/components/table/table-def.js.map +1 -0
  187. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +33 -0
  188. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js.map +1 -0
  189. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.ngfactory.js.map +1 -0
  190. package/esm5/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.scss.shim.ngstyle.js.map +1 -0
  191. package/esm5/lib/components/table/table-model.js +213 -0
  192. package/esm5/lib/components/table/table-model.js.map +1 -0
  193. package/esm5/lib/components/table/table.component.js +62 -0
  194. package/esm5/lib/components/table/table.component.js.map +1 -0
  195. package/esm5/lib/components/table/table.component.ngfactory.js.map +1 -0
  196. package/esm5/lib/components/table/table.component.scss.shim.ngstyle.js.map +1 -0
  197. package/esm5/lib/interaction/activity.js +7 -2
  198. package/esm5/lib/interaction/activity.js.map +1 -1
  199. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +2 -2
  200. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  201. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +23 -9
  202. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  203. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  204. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +95 -0
  205. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -0
  206. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.js.map +1 -0
  207. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.js.map +1 -0
  208. package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js +90 -0
  209. package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.js.map +1 -0
  210. package/esm5/lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.js.map +1 -0
  211. package/esm5/lib/interaction/index.js +2 -0
  212. package/esm5/lib/interaction/index.js.map +1 -1
  213. package/esm5/lib/interaction/interaction.module.js +16 -4
  214. package/esm5/lib/interaction/interaction.module.js.map +1 -1
  215. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  216. package/fesm2015/coolon-angular-ui-powerups.js +2291 -1368
  217. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  218. package/fesm5/coolon-angular-ui-powerups.js +2536 -1526
  219. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  220. package/lib/components/forms/abstract-input-activity.d.ts +18 -0
  221. package/lib/components/forms/abstract-input.component.d.ts +1 -0
  222. package/lib/components/forms/string-input/string-input-activity.d.ts +3 -0
  223. package/lib/components/index.d.ts +17 -0
  224. package/lib/components/table/cell-editor.component.d.ts +5 -0
  225. package/lib/components/table/cell-renderer.d.ts +3 -0
  226. package/lib/components/table/column-model.d.ts +84 -0
  227. package/lib/components/table/column-template/column-template.directive.d.ts +7 -0
  228. package/lib/components/table/column-text-properties.d.ts +3 -0
  229. package/lib/components/table/default-cell-renderer/default-cell-renderer.component.d.ts +6 -0
  230. package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +5 -0
  231. package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +14 -0
  232. package/lib/components/table/select-cell-renderer/select-cell-renderer.component.d.ts +11 -0
  233. package/lib/components/table/select-header-cell-renderer/select-header-cell-renderer.component.d.ts +9 -0
  234. package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +18 -0
  235. package/lib/components/table/table-def.d.ts +7 -0
  236. package/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.d.ts +8 -0
  237. package/lib/components/table/table-model.d.ts +114 -0
  238. package/lib/components/table/table.component.d.ts +40 -0
  239. package/lib/interaction/activity.d.ts +1 -0
  240. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -1
  241. package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +21 -0
  242. package/lib/interaction/directives/interaction-context-trigger-for.directive.d.ts +17 -0
  243. package/lib/interaction/index.d.ts +2 -0
  244. package/package.json +5 -4
@@ -18,6 +18,8 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
18
18
  }
19
19
  ngAfterViewInit() {
20
20
  const { chain, observe } = Dsl.disposeWith(this);
21
+ // using the component directly rather than (animationDone)=.. allows us
22
+ // to keep our callback private.
21
23
  observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());
22
24
  }
23
25
  initialise(identifier, api) {
@@ -112,6 +114,12 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
112
114
  // @Trace()
113
115
  finishAndStartCleanup() {
114
116
  if (!this._deferredCleanUp) {
117
+ // Important:
118
+ // Clear our tabs so the next activity triggers a tab change.
119
+ // Without this our animation done wasn't called when a single
120
+ // new activity followed a single tab activity (since we're tracking
121
+ // by activity index)
122
+ this.activityTabs = [];
115
123
  const promise = this.interactionServiceApi.notifyFinished(this);
116
124
  this._deferredCleanUp = promise
117
125
  .finally(() => {
@@ -123,26 +131,31 @@ let ActivityContainerComponent = class ActivityContainerComponent extends Abstra
123
131
  launchActivity(activityRef) {
124
132
  const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());
125
133
  this.activityTabs = cleanedTabs.concat(activityRef);
126
- this.tabs.selectedIndex = this.activityTabs.length;
134
+ this.synchroniseSelectedTabIndex();
127
135
  }
128
136
  activityIndex(index, activityRef) {
129
137
  return index;
130
138
  }
131
139
  ;
132
- // @Trace()
133
140
  onAnimationFinished() {
134
- this.getSelectedOutlet().component.onActivityReady();
135
- this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());
141
+ if (this.onAnimationFinishedJob) {
142
+ this.onAnimationFinishedJob();
143
+ this.onAnimationFinishedJob = undefined;
144
+ }
136
145
  }
137
146
  /**
138
- * Synchronises the selected tab index. Returns true if there was no change to the selected index.
147
+ * Synchronises the selected tab index.
139
148
  */
140
- // @Trace()
141
149
  synchroniseSelectedTabIndex() {
142
150
  const previousIndex = this.tabs.selectedIndex;
143
151
  const newIndex = this.getActiveActivityCount() - 1;
144
- this.tabs.selectedIndex = newIndex;
145
- return previousIndex === newIndex;
152
+ if (previousIndex !== newIndex) {
153
+ this.tabs.selectedIndex = newIndex;
154
+ this.onAnimationFinishedJob = () => {
155
+ this.getSelectedOutlet().component.onActivityReady();
156
+ this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());
157
+ };
158
+ }
146
159
  }
147
160
  getSelectedOutlet() {
148
161
  return this.activityOutlets.toArray()[this.tabs.selectedIndex];
@@ -179,7 +192,7 @@ __decorate([
179
192
  ActivityContainerComponent = __decorate([
180
193
  Component({
181
194
  selector: 'aup-activity-container',
182
- template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"dynamicHeight\" [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
195
+ template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
183
196
  styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
184
197
  }),
185
198
  __metadata("design:paramtypes", [])
@@ -1 +1 @@
1
- {"version":3,"file":"activity-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAA6B,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAc,MAAM,gBAAgB,CAAC;AAC7G,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAOtF,IAAa,0BAA0B,GAAvC,MAAa,0BAAoC,SAAQ,0BAA0B;IAqBjF;QACE,KAAK,EAAE,CAAC;QAnBV,kBAAa,GAAG,KAAK,CAAC;QAQtB,iBAAY,GAAiC,EAAE,CAAC;QAOxC,YAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;IAKzC,CAAC;IAED,QAAQ;IACR,CAAC;IAED,eAAe;QACb,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,UAAU,CAA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vB,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;IAED,WAAW;IACH,yBAAyB;QAC/B,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAC/B,YAAY,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,sBAAsB,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5C,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;CACF,CAAA;AApLC;IADC,KAAK,EAAE;;iEACc;AAGtB;IADC,SAAS,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;8BAC9B,WAAW;wDAAC;AAGlB;IADC,YAAY,CAAC,uBAAuB,CAAC;8BACrB,SAAS;mEAAyC;AAoDnE;IADC,KAAK,EAAE;;;;yDAMP;AAlEU,0BAA0B;IALtC,SAAS,CAAC;QACT,QAAQ,EAAE,wBAAwB;QAClC,mVAAkD;;KAEnD,CAAC;;GACW,0BAA0B,CAuLtC;SAvLY,0BAA0B","sourcesContent":["import { AfterViewInit, Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatTabGroup } from '@angular/material/tabs';\nimport { assert, Constructable, Disposable, Dsl, GarbageCollector, Trace, ValueModel } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';\n\n@Component({\n selector: 'aup-activity-container',\n templateUrl: './activity-container.component.html',\n styleUrls: ['./activity-container.component.scss']\n})\nexport class ActivityContainerComponent<D, R, E> extends AbstractInteractionContext implements OnInit, AfterViewInit {\n\n @Input()\n dynamicHeight = false;\n\n @ViewChild('tabs', { static: true })\n tabs: MatTabGroup;\n\n @ViewChildren(ActivityOutletComponent)\n activityOutlets: QueryList<ActivityOutletComponent<any, any, any>>;\n\n activityTabs: ActivityRef<any, any, any>[] = [];\n\n private _identifier: string;\n private _deferredCleanUp: Promise<any>;\n\n private interactionServiceApi: InteractionService.Api;\n\n private garbage = new GarbageCollector();\n private syncSelectedTabTimeout: any;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n ngAfterViewInit(): void {\n const { chain, observe } = Dsl.disposeWith(this);\n observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());\n }\n\n initialise(identifier: string, api: InteractionService.Api) {\n assert.isFalsey(this.isInitialised());\n assert.notNil(identifier);\n assert.notNil(api);\n this._identifier = identifier;\n this.interactionServiceApi = api;\n }\n\n get identifier() {\n return this._identifier;\n }\n\n isInitialised() {\n return !!this.identifier;\n }\n\n /**\n * Returns true if an activity is currently running.\n */\n isActive(): boolean {\n return this.getActiveActivityCount() > 0;\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n @Trace()\n dispose(): void {\n // TODO: think about auto cancelling any outstanding activity on dispose.\n // See NavigationState.Navigating for a use-case.\n assert.isFalsey(this.isActive());\n this.garbage.dispose();\n }\n\n getActiveActivityRef(): ActivityRef<any, any, any> {\n if (!this.isActive()) {\n lang.illegalState('no activity in progress');\n }\n return _.findLast(this.activityTabs, tab => !tab.isComplete());\n }\n\n /**\n * Cancels the current activity and returns true the context is no longer active, false if\n * there is still another activity running.\n */\n // @Trace()\n async cancelActiveActivity(): Promise<boolean> {\n const activity = this.getActiveActivityRef();\n activity.cancel();\n if (this.isCleaningUp()) {\n return this.waitForInteractionContextCleanupToFinish();\n } else {\n return !this.isActive();\n }\n }\n\n // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.\n // @Trace()\n protected createAndLaunchActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data: D1, disableClose: boolean): Promise<R1> {\n assert.isTruthy(this.isInitialised()); // make sure we've been initialised\n const activityRef = new ActivityRef<D1, R1, E1>(activityType, data, () => {\n const activeActivityCount = this.getActiveActivityCount() > 0;\n if (activeActivityCount) {\n this.triggerTabSynchronisation();\n } else {\n this.finishAndStartCleanup();\n }\n });\n this.launchActivity(activityRef);\n // if this is the first activity let the interaction service know.\n if (this.activityTabs.length === 1) {\n // console.log('Now active!!!');\n this.interactionServiceApi.notifyActive(this);\n }\n return activityRef.activityResult;\n }\n\n private getActiveActivityCount(): number {\n return this.activityTabs.filter(ref => !ref.isComplete()).length;\n }\n\n /**\n * Checks if this interaction context has finished an is in the process of waiting\n * for all the infrastructure (including route updates) to be completed.\n */\n isCleaningUp(): boolean {\n return !!this._deferredCleanUp;\n }\n\n async waitForInteractionContextCleanupToFinish(): Promise<any> {\n return this._deferredCleanUp ?\n this._deferredCleanUp :\n true;\n }\n\n // @Trace()\n private finishAndStartCleanup(): void {\n if (!this._deferredCleanUp) {\n const promise = this.interactionServiceApi.notifyFinished(this);\n this._deferredCleanUp = promise\n .finally(() => {\n this._deferredCleanUp = null;\n });\n }\n }\n\n// @Trace()\n launchActivity<D1, R1, E1>(activityRef: ActivityRef<D1, R1, E1>) {\n const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());\n this.activityTabs = cleanedTabs.concat(activityRef);\n this.tabs.selectedIndex = this.activityTabs.length;\n }\n\n activityIndex(index: number, activityRef: ActivityRef<any, any, any>) {\n return index;\n };\n\n\n // @Trace()\n private onAnimationFinished() {\n this.getSelectedOutlet().component.onActivityReady();\n this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());\n }\n\n /**\n * Synchronises the selected tab index. Returns true if there was no change to the selected index.\n */\n // @Trace()\n private synchroniseSelectedTabIndex(): boolean {\n const previousIndex = this.tabs.selectedIndex;\n const newIndex = this.getActiveActivityCount() - 1;\n this.tabs.selectedIndex = newIndex;\n return previousIndex === newIndex;\n }\n\n private getSelectedOutlet() {\n return this.activityOutlets.toArray()[this.tabs.selectedIndex];\n }\n\n // @Trace()\n private triggerTabSynchronisation() {\n if (this.syncSelectedTabTimeout) {\n clearTimeout(this.syncSelectedTabTimeout);\n }\n this.syncSelectedTabTimeout = setTimeout(() => {\n this.syncSelectedTabTimeout = null;\n this.synchroniseSelectedTabIndex();\n }, 75);\n }\n}\n"]}
1
+ {"version":3,"file":"activity-container.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-container.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAU,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,MAAM,EAA6B,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAOtF,IAAa,0BAA0B,GAAvC,MAAa,0BAAoC,SAAQ,0BAA0B;IAsBjF;QACE,KAAK,EAAE,CAAC;QApBV,kBAAa,GAAG,KAAK,CAAC;QAQtB,iBAAY,GAAiC,EAAE,CAAC;QAOxC,YAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;IAMzC,CAAC;IAED,QAAQ;IACR,CAAC;IAED,eAAe;QACb,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACjD,w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it, Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatTabGroup } from '@angular/material/tabs';\nimport { assert, Constructable, Disposable, Dsl, GarbageCollector, Trace } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport _ from 'lodash';\nimport { AbstractInteractionContext } from '../../abstract-interaction-context';\nimport { Activity } from '../../activity';\nimport { ActivityRef } from '../../activity-ref';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityOutletComponent } from './activity-outlet/activity-outlet.component';\n\n@Component({\n selector: 'aup-activity-container',\n templateUrl: './activity-container.component.html',\n styleUrls: ['./activity-container.component.scss']\n})\nexport class ActivityContainerComponent<D, R, E> extends AbstractInteractionContext implements OnInit, AfterViewInit {\n\n @Input()\n dynamicHeight = false;\n\n @ViewChild('tabs', { static: true })\n tabs: MatTabGroup;\n\n @ViewChildren(ActivityOutletComponent)\n activityOutlets: QueryList<ActivityOutletComponent<any, any, any>>;\n\n activityTabs: ActivityRef<any, any, any>[] = [];\n\n private _identifier: string;\n private _deferredCleanUp: Promise<any>;\n\n private interactionServiceApi: InteractionService.Api;\n\n private garbage = new GarbageCollector();\n private syncSelectedTabTimeout: any;\n private onAnimationFinishedJob: () => void;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n }\n\n ngAfterViewInit(): void {\n const { chain, observe } = Dsl.disposeWith(this);\n // using the component directly rather than (animationDone)=.. allows us\n // to keep our callback private.\n observe.valuesFrom(this.tabs.animationDone).subscribe(() => this.onAnimationFinished());\n }\n\n initialise(identifier: string, api: InteractionService.Api) {\n assert.isFalsey(this.isInitialised());\n assert.notNil(identifier);\n assert.notNil(api);\n this._identifier = identifier;\n this.interactionServiceApi = api;\n }\n\n get identifier() {\n return this._identifier;\n }\n\n isInitialised() {\n return !!this.identifier;\n }\n\n /**\n * Returns true if an activity is currently running.\n */\n isActive(): boolean {\n return this.getActiveActivityCount() > 0;\n }\n\n registerDisposable<T extends Disposable>(disposable: T): T {\n return this.garbage.registerDisposable(disposable);\n }\n\n @Trace()\n dispose(): void {\n // TODO: think about auto cancelling any outstanding activity on dispose.\n // See NavigationState.Navigating for a use-case.\n assert.isFalsey(this.isActive());\n this.garbage.dispose();\n }\n\n getActiveActivityRef(): ActivityRef<any, any, any> {\n if (!this.isActive()) {\n lang.illegalState('no activity in progress');\n }\n return _.findLast(this.activityTabs, tab => !tab.isComplete());\n }\n\n /**\n * Cancels the current activity and returns true the context is no longer active, false if\n * there is still another activity running.\n */\n // @Trace()\n async cancelActiveActivity(): Promise<boolean> {\n const activity = this.getActiveActivityRef();\n activity.cancel();\n if (this.isCleaningUp()) {\n return this.waitForInteractionContextCleanupToFinish();\n } else {\n return !this.isActive();\n }\n }\n\n // TODO: this handling of multiple nested activities is only used by the activity component and is not a general case.\n // @Trace()\n protected createAndLaunchActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data: D1, disableClose: boolean): Promise<R1> {\n assert.isTruthy(this.isInitialised()); // make sure we've been initialised\n const activityRef = new ActivityRef<D1, R1, E1>(activityType, data, () => {\n const activeActivityCount = this.getActiveActivityCount() > 0;\n if (activeActivityCount) {\n this.triggerTabSynchronisation();\n } else {\n this.finishAndStartCleanup();\n }\n });\n this.launchActivity(activityRef);\n // if this is the first activity let the interaction service know.\n if (this.activityTabs.length === 1) {\n // console.log('Now active!!!');\n this.interactionServiceApi.notifyActive(this);\n }\n return activityRef.activityResult;\n }\n\n private getActiveActivityCount(): number {\n return this.activityTabs.filter(ref => !ref.isComplete()).length;\n }\n\n /**\n * Checks if this interaction context has finished an is in the process of waiting\n * for all the infrastructure (including route updates) to be completed.\n */\n isCleaningUp(): boolean {\n return !!this._deferredCleanUp;\n }\n\n async waitForInteractionContextCleanupToFinish(): Promise<any> {\n return this._deferredCleanUp ?\n this._deferredCleanUp :\n true;\n }\n\n // @Trace()\n private finishAndStartCleanup(): void {\n if (!this._deferredCleanUp) {\n // Important:\n // Clear our tabs so the next activity triggers a tab change.\n // Without this our animation done wasn't called when a single\n // new activity followed a single tab activity (since we're tracking\n // by activity index)\n this.activityTabs = [];\n const promise = this.interactionServiceApi.notifyFinished(this);\n this._deferredCleanUp = promise\n .finally(() => {\n this._deferredCleanUp = null;\n });\n }\n }\n\n// @Trace()\n launchActivity<D1, R1, E1>(activityRef: ActivityRef<D1, R1, E1>) {\n const cleanedTabs = this.activityTabs.filter(tab => !tab.isComplete());\n this.activityTabs = cleanedTabs.concat(activityRef);\n this.synchroniseSelectedTabIndex();\n }\n\n activityIndex(index: number, activityRef: ActivityRef<any, any, any>) {\n return index;\n };\n\n private onAnimationFinished() {\n if (this.onAnimationFinishedJob) {\n this.onAnimationFinishedJob();\n this.onAnimationFinishedJob = undefined;\n }\n }\n\n /**\n * Synchronises the selected tab index.\n */\n private synchroniseSelectedTabIndex(): void {\n const previousIndex = this.tabs.selectedIndex;\n const newIndex = this.getActiveActivityCount() - 1;\n if (previousIndex !== newIndex) {\n this.tabs.selectedIndex = newIndex;\n this.onAnimationFinishedJob = () => {\n this.getSelectedOutlet().component.onActivityReady();\n this.activityTabs = this.activityTabs.filter(tab => !tab.isComplete());\n }\n }\n }\n\n private getSelectedOutlet() {\n return this.activityOutlets.toArray()[this.tabs.selectedIndex];\n }\n\n // @Trace()\n private triggerTabSynchronisation() {\n if (this.syncSelectedTabTimeout) {\n clearTimeout(this.syncSelectedTabTimeout);\n }\n this.syncSelectedTabTimeout = setTimeout(() => {\n this.syncSelectedTabTimeout = null;\n this.synchroniseSelectedTabIndex();\n }, 75);\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ActivityContainerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../abstract-interaction-context","name":"AbstractInteractionContext","line":16,"character":57},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-activity-container","template":"<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"dynamicHeight\" [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],"members":{"dynamicHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"tabs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":["tabs",{"static":true}]}]}],"activityOutlets":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":24,"character":3},"arguments":[{"__symbolic":"reference","module":"./activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":24,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"isInitialised":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"registerDisposable":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"Trace","line":76,"character":3}}]}],"getActiveActivityRef":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"createAndLaunchActivity":[{"__symbolic":"method"}],"getActiveActivityCount":[{"__symbolic":"method"}],"isCleaningUp":[{"__symbolic":"method"}],"waitForInteractionContextCleanupToFinish":[{"__symbolic":"method"}],"finishAndStartCleanup":[{"__symbolic":"method"}],"launchActivity":[{"__symbolic":"method"}],"activityIndex":[{"__symbolic":"method"}],"onAnimationFinished":[{"__symbolic":"method"}],"synchroniseSelectedTabIndex":[{"__symbolic":"method"}],"getSelectedOutlet":[{"__symbolic":"method"}],"triggerTabSynchronisation":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ActivityContainerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../abstract-interaction-context","name":"AbstractInteractionContext","line":16,"character":57},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"aup-activity-container","template":"<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let tab of activityTabs; trackBy: activityIndex\" >\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],"members":{"dynamicHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}}]}],"tabs":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":21,"character":3},"arguments":["tabs",{"static":true}]}]}],"activityOutlets":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChildren","line":24,"character":3},"arguments":[{"__symbolic":"reference","module":"./activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":24,"character":16}]}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"isInitialised":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"registerDisposable":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"Trace","line":79,"character":3}}]}],"getActiveActivityRef":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"createAndLaunchActivity":[{"__symbolic":"method"}],"getActiveActivityCount":[{"__symbolic":"method"}],"isCleaningUp":[{"__symbolic":"method"}],"waitForInteractionContextCleanupToFinish":[{"__symbolic":"method"}],"finishAndStartCleanup":[{"__symbolic":"method"}],"launchActivity":[{"__symbolic":"method"}],"activityIndex":[{"__symbolic":"method"}],"onAnimationFinished":[{"__symbolic":"method"}],"synchroniseSelectedTabIndex":[{"__symbolic":"method"}],"getSelectedOutlet":[{"__symbolic":"method"}],"triggerTabSynchronisation":[{"__symbolic":"method"}]}}}}]
@@ -1 +1 @@
1
- {"version":3,"file":"activity-outlet.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,wBAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,KAAK,EACL,MAAM,EACN,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAY,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD;;;GAGG;AAMH,IAAa,uBAAuB,GAApC,MAAa,uBAAuB;IAsBlC,YACU,wBAAkD,EAClD,gBAAkC,EAClC,QAAkB;QAFlB,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,aAAQ,GAAR,QAAQ,CAAU;IAE5B,CAAC;IAjBD,IAAI,WAAW,CAAC,WAAiC;QAC/C,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE;YACtD,IAAI,CAAC,YAAY,CAAC,qDAAqD,CAAC,CAAA;SACzE;QACD,IAAI,CAAC,YAAY,GAAG,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sourcesContent":["import {\n Component,\n ComponentFactoryResolver,\n ComponentRef,\n Injector,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { assert } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport { Activity, ACTIVITY_DATA } from '../../../activity';\nimport { ActivityRef } from '../../../activity-ref';\nimport { InteractionContext } from '../../../interaction-context';\n\n/**\n * ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an\n * external service.\n */\n@Component({\n selector: 'aup-activity-outlet',\n template: '',\n styleUrls: ['./activity-outlet.component.scss']\n})\nexport class ActivityOutletComponent<D, R, E> implements OnInit {\n\n private activityComponentRef: ComponentRef<Activity<D, R, E>>;\n\n @Input()\n nestedInteractionContext: InteractionContext;\n\n private _activityRef: ActivityRef<D, R, E>;\n\n @Input()\n set activityRef(activityRef: ActivityRef<D, R, E>) {\n if (this.activityRef && !this.activityRef.isComplete()) {\n lang.illegalState(\"changing activity before previous one has completed\")\n }\n this._activityRef = activityRef;\n this.loadActivity(activityRef);\n };\n\n get activityRef(): ActivityRef<D, R, E> {\n return this._activityRef;\n }\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private viewContainerRef: ViewContainerRef,\n private injector: Injector\n ) {\n }\n\n ngOnInit() {\n }\n\n loadActivity(activityRef: ActivityRef<D, R, E>) {\n const injector = Injector.create({\n providers: [\n { provide: ACTIVITY_DATA, useValue: activityRef.activityData }\n ],\n parent: this.injector\n });\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityRef.activityClass);\n this.viewContainerRef.clear();\n // console.log(`creating component -> ${activityRef.activityClass.name}`);\n this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);\n this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);\n }\n\n get component(): Activity<D, R, E> {\n return this.activityComponentRef.instance;\n }\n\n}\n"]}
1
+ {"version":3,"file":"activity-outlet.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","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,WAAW,CAAC,aAAa,CAAC,CAAC;QAC1G,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9B,0EAA0E;QAC1E,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,gBAAgB,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;QACjG,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAC5G,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC;IAC5C,CAAC;CAEF,CAAA;;YA3BqC,wBAAwB;YAChC,gBAAgB;YACxB,QAAQ;;AApB5B;IADC,KAAK,EAAE;;yEACqC;AAK7C;IADC,KAAK,EAAE;8BACqB,WAAW;qCAAX,WAAW;0DAMvC;AAhBU,uBAAuB;IALnC,SAAS,CAAC;QACT,QAAQ,EAAE,qBAAqB;QAC/B,QAAQ,EAAE,EAAE;;KAEb,CAAC;qCAwBoC,wBAAwB;QAChC,gBAAgB;QACxB,QAAQ;GAzBjB,uBAAuB,CAkDnC;SAlDY,uBAAuB","sourcesContent":["import {\n Component,\n ComponentFactoryResolver,\n ComponentRef,\n Injector,\n Input,\n OnInit,\n ViewContainerRef\n} from '@angular/core';\nimport { assert, Trace } from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport { Activity, ACTIVITY_DATA } from '../../../activity';\nimport { ActivityRef } from '../../../activity-ref';\nimport { InteractionContext } from '../../../interaction-context';\n\n/**\n * ActivityOutletComponent creates and displays an activity and delegates the interaction context functionality to an\n * external service.\n */\n@Component({\n selector: 'aup-activity-outlet',\n template: '',\n styleUrls: ['./activity-outlet.component.scss']\n})\nexport class ActivityOutletComponent<D, R, E> implements OnInit {\n\n private activityComponentRef: ComponentRef<Activity<D, R, E>>;\n\n @Input()\n nestedInteractionContext: InteractionContext;\n\n private _activityRef: ActivityRef<D, R, E>;\n\n @Input()\n set activityRef(activityRef: ActivityRef<D, R, E>) {\n if (this.activityRef && !this.activityRef.isComplete()) {\n lang.illegalState(\"changing activity before previous one has completed\")\n }\n this._activityRef = activityRef;\n this.loadActivity(activityRef);\n };\n\n get activityRef(): ActivityRef<D, R, E> {\n return this._activityRef;\n }\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private viewContainerRef: ViewContainerRef,\n private injector: Injector\n ) {\n }\n\n ngOnInit() {\n }\n\n loadActivity(activityRef: ActivityRef<D, R, E>) {\n const injector = Injector.create({\n providers: [\n { provide: ACTIVITY_DATA, useValue: activityRef.activityData }\n ],\n parent: this.injector\n });\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityRef.activityClass);\n this.viewContainerRef.clear();\n // console.log(`creating component -> ${activityRef.activityClass.name}`);\n this.activityComponentRef = this.viewContainerRef.createComponent(componentFactory, 0, injector);\n this.activityRef.notifyActivityCreated(this.activityComponentRef.instance, this.nestedInteractionContext);\n }\n\n get component(): Activity<D, R, E> {\n return this.activityComponentRef.instance;\n }\n\n}\n"]}
@@ -0,0 +1,87 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';
3
+ import { ComponentPortal } from '@angular/cdk/portal';
4
+ import { Component, ElementRef, HostBinding, Input, OnInit } from '@angular/core';
5
+ import { InPlaceInteractionContextComponent } from '../..';
6
+ import { DisposableComponent } from '../../../components';
7
+ let PopupInteractionContextComponent = class PopupInteractionContextComponent extends DisposableComponent {
8
+ constructor(_element, _overlay) {
9
+ super();
10
+ this._element = _element;
11
+ this._overlay = _overlay;
12
+ this.outputPortal = new ComponentPortal(InPlaceInteractionContextComponent);
13
+ this.anchorX = 'start';
14
+ this.anchorY = 'bottom';
15
+ }
16
+ get active() {
17
+ return this.isActive();
18
+ }
19
+ startActivity(activityType, data) {
20
+ const overlayRef = this._overlay.create({
21
+ hasBackdrop: false,
22
+ panelClass: 'aup-popup-interaction-panel',
23
+ positionStrategy: this._overlay.position()
24
+ .flexibleConnectedTo(this._element)
25
+ .withPositions(this.computePositions())
26
+ .withGrowAfterOpen(true)
27
+ });
28
+ const componentRef = overlayRef.attach(this.outputPortal);
29
+ this.interactionContext = componentRef.instance;
30
+ return new Promise((resolve, reject) => {
31
+ // HACK: afterViewInit won't have been called yet. Need to add when.valueOf(interactionContext.ready).becomesTruthy(...)
32
+ setTimeout(() => {
33
+ this.interactionContext.startActivity(activityType, data)
34
+ .then(resolve)
35
+ .catch(reject)
36
+ .finally(() => overlayRef.dispose());
37
+ });
38
+ });
39
+ }
40
+ computePositions() {
41
+ const overlayX = this.anchorX === 'start' ? 'start' : 'end';
42
+ const overlayY = this.anchorY === 'top' ? 'bottom' : 'top';
43
+ return [
44
+ { originX: this.anchorX, originY: this.anchorY, overlayX: overlayX, overlayY: overlayY }
45
+ // TODO: compute some meaningful alternatives.
46
+ // { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
47
+ // { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },
48
+ // { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },
49
+ // { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }
50
+ ];
51
+ }
52
+ cancelActiveActivity() {
53
+ return this.interactionContext.cancelActiveActivity();
54
+ }
55
+ isActive() {
56
+ return this.interactionContext && this.interactionContext.isActive();
57
+ }
58
+ ngOnInit() {
59
+ }
60
+ };
61
+ PopupInteractionContextComponent.ctorParameters = () => [
62
+ { type: ElementRef },
63
+ { type: Overlay }
64
+ ];
65
+ __decorate([
66
+ HostBinding('class.interaction-active'),
67
+ __metadata("design:type", Boolean),
68
+ __metadata("design:paramtypes", [])
69
+ ], PopupInteractionContextComponent.prototype, "active", null);
70
+ __decorate([
71
+ Input(),
72
+ __metadata("design:type", String)
73
+ ], PopupInteractionContextComponent.prototype, "anchorX", void 0);
74
+ __decorate([
75
+ Input(),
76
+ __metadata("design:type", String)
77
+ ], PopupInteractionContextComponent.prototype, "anchorY", void 0);
78
+ PopupInteractionContextComponent = __decorate([
79
+ Component({
80
+ selector: 'aup-popup-interaction-context',
81
+ template: "<ng-content></ng-content>\n",
82
+ styles: [":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]
83
+ }),
84
+ __metadata("design:paramtypes", [ElementRef, Overlay])
85
+ ], PopupInteractionContextComponent);
86
+ export { PopupInteractionContextComponent };
87
+ //# sourceMappingURL=popup-interaction-context.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup-interaction-context.component.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAY,kCAAkC,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAO1D,IAAa,gCAAgC,GAA7C,MAAa,gCAAiC,SAAQ,mBAAmB;IAiBvE,YAAoB,QAAoB,EAAU,QAAiB;QACjE,KAAK,EAAE,CAAC;QADU,aAAQ,GAAR,QAAQ,CAAY;QAAU,aAAQ,GAAR,QAAQ,CAAS;QAR1D,iBAAY,GAAG,IAAI,eAAe,CAAoD,kCAAkC,CAAC,CAAC;QAGnI,YAAO,GAAoB,OAAO,CAAC;QAGnC,YAAO,GAAqB,QAAQ,CAAC;IAIrC,CAAC;IAdD,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAcD,aAAa,CAAU,YAA8C,EAAE,IAAQ;QA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C,+EAA+E;YAC/E,2EAA2E;YAC3E,+EAA+E;YAC/E,0EAA0E;SAC3E,CAAC;IACJ,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;IACxD,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IACvE,CAAC;IAED,QAAQ;IACR,CAAC;CAGF,CAAA;;YAtD+B,UAAU;YAAoB,OAAO;;AAZnE;IADC,WAAW,CAAC,0BAA0B,CAAC;;;8DAGvC;AAKD;IADC,KAAK,EAAE;;iEAC2B;AAGnC;IADC,KAAK,EAAE;;iEAC6B;AAf1B,gCAAgC;IAL5C,SAAS,CAAC;QACT,QAAQ,EAAE,+BAA+B;QACzC,uCAAyD;;KAE1D,CAAC;qCAkB8B,UAAU,EAAoB,OAAO;GAjBxD,gCAAgC,CAuE5C;SAvEY,gCAAgC","sourcesContent":["import { ConnectedPosition, Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Component, ElementRef, HostBinding, Input, OnInit } from '@angular/core';\nimport { Constructable } from '@coolon/pectin';\nimport { Activity, InPlaceInteractionContextComponent } from '../..';\nimport { DisposableComponent } from '../../../components';\n\n@Component({\n selector: 'aup-popup-interaction-context',\n templateUrl: './popup-interaction-context.component.html',\n styleUrls: ['./popup-interaction-context.component.scss']\n})\nexport class PopupInteractionContextComponent extends DisposableComponent implements OnInit {\n\n private interactionContext: InPlaceInteractionContextComponent<any, any, any>;\n\n @HostBinding('class.interaction-active')\n public get active(): boolean {\n return this.isActive();\n }\n\n readonly outputPortal = new ComponentPortal<InPlaceInteractionContextComponent<any, any, any>>(InPlaceInteractionContextComponent);\n\n @Input()\n anchorX: 'start' | 'end' = 'start';\n\n @Input()\n anchorY: 'top' | 'bottom' = 'bottom';\n\n constructor(private _element: ElementRef, private _overlay: Overlay) {\n super();\n }\n\n startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n\n const overlayRef = this._overlay.create({\n hasBackdrop: false,\n panelClass: 'aup-popup-interaction-panel',\n positionStrategy: this._overlay.position()\n .flexibleConnectedTo(this._element)\n .withPositions(this.computePositions())\n .withGrowAfterOpen(true)\n });\n\n const componentRef = overlayRef.attach(this.outputPortal);\n this.interactionContext = componentRef.instance;\n\n return new Promise((resolve, reject) => {\n // HACK: afterViewInit won't have been called yet. Need to add when.valueOf(interactionContext.ready).becomesTruthy(...)\n setTimeout(() => {\n this.interactionContext.startActivity(activityType, data)\n .then(resolve)\n .catch(reject)\n .finally(() => overlayRef.dispose());\n });\n });\n }\n\n computePositions(): ConnectedPosition[] {\n const overlayX = this.anchorX === 'start' ? 'start' : 'end';\n const overlayY = this.anchorY === 'top' ? 'bottom' : 'top';\n return [\n { originX: this.anchorX, originY: this.anchorY, overlayX: overlayX, overlayY: overlayY }\n // TODO: compute some meaningful alternatives.\n // { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n // { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n // { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n // { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ];\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.interactionContext.cancelActiveActivity();\n }\n\n isActive(): boolean {\n return this.interactionContext && this.interactionContext.isActive();\n }\n\n ngOnInit() {\n }\n\n\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"PopupInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components","name":"DisposableComponent","line":12,"character":54},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"aup-popup-interaction-context","template":"<ng-content></ng-content>\n","styles":[":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]}]}],"members":{"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":16,"character":3},"arguments":["class.interaction-active"]}]}],"anchorX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":23,"character":3}}]}],"anchorY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":29,"character":32},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":29,"character":62}]}],"startActivity":[{"__symbolic":"method"}],"computePositions":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup-interaction-context.component.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup-interaction-context.component.scss.shim.ngstyle.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/components/popup-interaction-context/popup-interaction-context.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -0,0 +1,86 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core';
3
+ import { assert, GarbageCollector } from '@coolon/pectin';
4
+ import _ from 'lodash';
5
+ let InteractionContextTriggerFor = class InteractionContextTriggerFor extends GarbageCollector {
6
+ constructor() {
7
+ super();
8
+ this.activityDone = new EventEmitter();
9
+ this.activityCancelled = new EventEmitter();
10
+ }
11
+ onEnter(event) {
12
+ if (!this.aupInteractionContextTriggerFor.isActive()) {
13
+ this.startActivity();
14
+ }
15
+ else {
16
+ this.aupInteractionContextTriggerFor.cancelActiveActivity();
17
+ }
18
+ }
19
+ onClick(event) {
20
+ if (!this.aupInteractionContextTriggerFor.isActive()) {
21
+ this.startActivity();
22
+ }
23
+ else {
24
+ this.aupInteractionContextTriggerFor.cancelActiveActivity();
25
+ }
26
+ }
27
+ startActivity() {
28
+ assert.isTruthy(this.aupInteractionContextTriggerFor);
29
+ assert.isFalsey(this.aupInteractionContextTriggerFor.isActive());
30
+ assert.isTruthy(this.activityClass);
31
+ this.aupInteractionContextTriggerFor.startActivity(this.activityClass, this.activityData)
32
+ .then(result => {
33
+ this.activityDone.emit(result);
34
+ })
35
+ .catch(error => {
36
+ this.activityCancelled.emit(error);
37
+ });
38
+ }
39
+ prepareActivityData() {
40
+ return _.isFunction(this.activityDataFactory()) ? this.activityDataFactory() : this.activityData;
41
+ }
42
+ };
43
+ __decorate([
44
+ Input(),
45
+ __metadata("design:type", Object)
46
+ ], InteractionContextTriggerFor.prototype, "aupInteractionContextTriggerFor", void 0);
47
+ __decorate([
48
+ Input(),
49
+ __metadata("design:type", Object)
50
+ ], InteractionContextTriggerFor.prototype, "activityClass", void 0);
51
+ __decorate([
52
+ Input(),
53
+ __metadata("design:type", Object)
54
+ ], InteractionContextTriggerFor.prototype, "activityData", void 0);
55
+ __decorate([
56
+ Input(),
57
+ __metadata("design:type", Function)
58
+ ], InteractionContextTriggerFor.prototype, "activityDataFactory", void 0);
59
+ __decorate([
60
+ Output(),
61
+ __metadata("design:type", Object)
62
+ ], InteractionContextTriggerFor.prototype, "activityDone", void 0);
63
+ __decorate([
64
+ Output(),
65
+ __metadata("design:type", Object)
66
+ ], InteractionContextTriggerFor.prototype, "activityCancelled", void 0);
67
+ __decorate([
68
+ HostListener('keyup.enter'),
69
+ __metadata("design:type", Function),
70
+ __metadata("design:paramtypes", [KeyboardEvent]),
71
+ __metadata("design:returntype", void 0)
72
+ ], InteractionContextTriggerFor.prototype, "onEnter", null);
73
+ __decorate([
74
+ HostListener('click'),
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", [MouseEvent]),
77
+ __metadata("design:returntype", void 0)
78
+ ], InteractionContextTriggerFor.prototype, "onClick", null);
79
+ InteractionContextTriggerFor = __decorate([
80
+ Directive({
81
+ selector: '[aupInteractionContextTriggerFor]'
82
+ }),
83
+ __metadata("design:paramtypes", [])
84
+ ], InteractionContextTriggerFor);
85
+ export { InteractionContextTriggerFor };
86
+ //# sourceMappingURL=interaction-context-trigger-for.directive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-context-trigger-for.directive.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/directives/interaction-context-trigger-for.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,MAAM,EAAiB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,CAAC,MAAM,QAAQ,CAAC;AAOvB,IAAa,4BAA4B,GAAzC,MAAa,4BAAsC,SAAQ,gBAAgB;IAoBzE;QACE,KAAK,EAAE,CAAC;QANV,iBAAY,GAAG,IAAI,YAAY,EAAK,CAAC;QAGrC,sBAAiB,GAAG,IAAI,YAAY,EAAK,CAAC;IAI1C,CAAC;IAGD,OAAO,CAAC,KAAoB;QAC1B,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,QAAQ,EAAE,EAAE;YACpD,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;aAAM;YACL,IAAI,CAAC,+BAA+B,CAAC,oBAAoB,EAAE,CAAA;SAC5D;IACH,CAAC;IAGD,OAAO,CAAC,KAAiB;QACvB,IAAI,CAAC,IAAI,CAA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HxC,SAAS,CAAC;QACT,QAAQ,EAAE,mCAAmC;KAC9C,CAAC;;GACW,4BAA4B,CA2DxC;SA3DY,4BAA4B","sourcesContent":["import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core';\nimport { assert, Constructable, GarbageCollector } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { Activity } from '../activity';\nimport { InteractionContext } from '../interaction-context';\n\n@Directive({\n selector: '[aupInteractionContextTriggerFor]'\n})\nexport class InteractionContextTriggerFor<D, R, E> extends GarbageCollector {\n\n @Input()\n aupInteractionContextTriggerFor: Pick<InteractionContext, 'startActivity' | 'isActive' | 'cancelActiveActivity'>;\n\n @Input()\n activityClass: Constructable<Activity<D, R, E>>;\n\n @Input()\n activityData?: D;\n\n @Input()\n activityDataFactory?: () => D;\n\n @Output()\n activityDone = new EventEmitter<R>();\n\n @Output()\n activityCancelled = new EventEmitter<E>();\n\n constructor() {\n super();\n }\n\n @HostListener('keyup.enter')\n onEnter(event: KeyboardEvent): void {\n if (!this.aupInteractionContextTriggerFor.isActive()) {\n this.startActivity();\n } else {\n this.aupInteractionContextTriggerFor.cancelActiveActivity()\n }\n }\n\n @HostListener('click')\n onClick(event: MouseEvent): void {\n if (!this.aupInteractionContextTriggerFor.isActive()) {\n this.startActivity();\n } else {\n this.aupInteractionContextTriggerFor.cancelActiveActivity()\n }\n }\n\n protected startActivity() {\n assert.isTruthy(this.aupInteractionContextTriggerFor);\n assert.isFalsey(this.aupInteractionContextTriggerFor.isActive());\n assert.isTruthy(this.activityClass);\n this.aupInteractionContextTriggerFor.startActivity(this.activityClass, this.activityData)\n .then(result => {\n this.activityDone.emit(result);\n })\n .catch(error => {\n this.activityCancelled.emit(error);\n });\n }\n\n prepareActivityData(): D {\n return _.isFunction(this.activityDataFactory()) ? this.activityDataFactory() : this.activityData;\n }\n\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"InteractionContextTriggerFor":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":9,"character":59},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[aupInteractionContextTriggerFor]"}]}],"members":{"aupInteractionContextTriggerFor":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"activityClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"activityData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"activityDataFactory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}}]}],"activityDone":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":3}}]}],"activityCancelled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":26,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"onEnter":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":33,"character":3},"arguments":["keyup.enter"]}]}],"onClick":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":42,"character":3},"arguments":["click"]}]}],"startActivity":[{"__symbolic":"method"}],"prepareActivityData":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-context-trigger-for.directive.ngfactory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/directives/interaction-context-trigger-for.directive.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -13,6 +13,8 @@ export * from "./components/alert-dialog/alert-dialog.component";
13
13
  export * from "./components/confirm-then-dialog/confirm-then-dialog.component";
14
14
  export * from "./components/confirmation-dialog/confirmation-dialog.component";
15
15
  export * from "./components/inplace-interaction-context/in-place-interaction-context.component";
16
+ export * from "./components/popup-interaction-context/popup-interaction-context.component";
17
+ export * from "./directives/interaction-context-trigger-for.directive";
16
18
  export * from "./services/interaction-service-routing-adapter";
17
19
  export * from "./services/interaction.service";
18
20
  export * from "./services/modal-interaction-context.factory";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAI3B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,0DAA0D,CAAC;AACzE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,kFAAkF,CAAC;AACjG,cAAc,kDAAkD,CAAC;AACjE,cAAc,gEAAgE,CAAC;AAC/E,cAAc,gEAAgE,CAAC;AAC/E,cAAc,iFAAiF,CAAC;AAChG,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sEAAsE,CAAC;AACrF,cAAc,8DAA8D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./abstract-interaction-context\";\nexport * from \"./activity-ref\";\nexport * from \"./activity\";\nexport * from \"./alert\";\nexport * from \"./confirm\";\nexport * from \"./interaction-context\";\nexport * from \"./interaction.module\";\nexport * from \"./result\";\nexport * from \"./route-synchronisation-adapter\";\nexport * from \"./components/activity-actions/activity-actions.component\";\nexport * from \"./components/activity-container/activity-container.component\";\nexport * from \"./components/activity-container/activity-outlet/activity-outlet.component\";\nexport * from \"./components/add-item-interaction-context/add-item-interaction-context.component\";\nexport * from \"./components/alert-dialog/alert-dialog.component\";\nexport * from \"./components/confirm-then-dialog/confirm-then-dialog.component\";\nexport * from \"./components/confirmation-dialog/confirmation-dialog.component\";\nexport * from \"./components/inplace-interaction-context/in-place-interaction-context.component\";\nexport * from \"./services/interaction-service-routing-adapter\";\nexport * from \"./services/interaction.service\";\nexport * from \"./services/modal-interaction-context.factory\";\nexport * from \"./services/mat-dialog-interaction/dialog-interaction-context-factory\";\nexport * from \"./services/mat-dialog-interaction/dialog-interaction-context\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAI3B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,0DAA0D,CAAC;AACzE,cAAc,8DAA8D,CAAC;AAC7E,cAAc,2EAA2E,CAAC;AAC1F,cAAc,kFAAkF,CAAC;AACjG,cAAc,kDAAkD,CAAC;AACjE,cAAc,gEAAgE,CAAC;AAC/E,cAAc,gEAAgE,CAAC;AAC/E,cAAc,iFAAiF,CAAC;AAChG,cAAc,4EAA4E,CAAC;AAC3F,cAAc,wDAAwD,CAAC;AACvE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sEAAsE,CAAC;AACrF,cAAc,8DAA8D,CAAC","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./abstract-interaction-context\";\nexport * from \"./activity-ref\";\nexport * from \"./activity\";\nexport * from \"./alert\";\nexport * from \"./confirm\";\nexport * from \"./interaction-context\";\nexport * from \"./interaction.module\";\nexport * from \"./result\";\nexport * from \"./route-synchronisation-adapter\";\nexport * from \"./components/activity-actions/activity-actions.component\";\nexport * from \"./components/activity-container/activity-container.component\";\nexport * from \"./components/activity-container/activity-outlet/activity-outlet.component\";\nexport * from \"./components/add-item-interaction-context/add-item-interaction-context.component\";\nexport * from \"./components/alert-dialog/alert-dialog.component\";\nexport * from \"./components/confirm-then-dialog/confirm-then-dialog.component\";\nexport * from \"./components/confirmation-dialog/confirmation-dialog.component\";\nexport * from \"./components/inplace-interaction-context/in-place-interaction-context.component\";\nexport * from \"./components/popup-interaction-context/popup-interaction-context.component\";\nexport * from \"./directives/interaction-context-trigger-for.directive\";\nexport * from \"./services/interaction-service-routing-adapter\";\nexport * from \"./services/interaction.service\";\nexport * from \"./services/modal-interaction-context.factory\";\nexport * from \"./services/mat-dialog-interaction/dialog-interaction-context-factory\";\nexport * from \"./services/mat-dialog-interaction/dialog-interaction-context\";\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./abstract-interaction-context"},{"from":"./activity-ref"},{"from":"./activity"},{"from":"./alert"},{"from":"./confirm"},{"from":"./interaction-context"},{"from":"./interaction.module"},{"from":"./result"},{"from":"./route-synchronisation-adapter"},{"from":"./components/activity-actions/activity-actions.component"},{"from":"./components/activity-container/activity-container.component"},{"from":"./components/activity-container/activity-outlet/activity-outlet.component"},{"from":"./components/add-item-interaction-context/add-item-interaction-context.component"},{"from":"./components/alert-dialog/alert-dialog.component"},{"from":"./components/confirm-then-dialog/confirm-then-dialog.component"},{"from":"./components/confirmation-dialog/confirmation-dialog.component"},{"from":"./components/inplace-interaction-context/in-place-interaction-context.component"},{"from":"./services/interaction-service-routing-adapter"},{"from":"./services/interaction.service"},{"from":"./services/modal-interaction-context.factory"},{"from":"./services/mat-dialog-interaction/dialog-interaction-context-factory"},{"from":"./services/mat-dialog-interaction/dialog-interaction-context"}]}]
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./abstract-interaction-context"},{"from":"./activity-ref"},{"from":"./activity"},{"from":"./alert"},{"from":"./confirm"},{"from":"./interaction-context"},{"from":"./interaction.module"},{"from":"./result"},{"from":"./route-synchronisation-adapter"},{"from":"./components/activity-actions/activity-actions.component"},{"from":"./components/activity-container/activity-container.component"},{"from":"./components/activity-container/activity-outlet/activity-outlet.component"},{"from":"./components/add-item-interaction-context/add-item-interaction-context.component"},{"from":"./components/alert-dialog/alert-dialog.component"},{"from":"./components/confirm-then-dialog/confirm-then-dialog.component"},{"from":"./components/confirmation-dialog/confirmation-dialog.component"},{"from":"./components/inplace-interaction-context/in-place-interaction-context.component"},{"from":"./components/popup-interaction-context/popup-interaction-context.component"},{"from":"./directives/interaction-context-trigger-for.directive"},{"from":"./services/interaction-service-routing-adapter"},{"from":"./services/interaction.service"},{"from":"./services/modal-interaction-context.factory"},{"from":"./services/mat-dialog-interaction/dialog-interaction-context-factory"},{"from":"./services/mat-dialog-interaction/dialog-interaction-context"}]}]
@@ -2,6 +2,7 @@ import { __decorate } from "tslib";
2
2
  import { PortalModule } from '@angular/cdk/portal';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import { NgModule } from '@angular/core';
5
+ import { FlexModule, GridModule } from '@angular/flex-layout';
5
6
  import { MatButtonModule } from '@angular/material/button';
6
7
  import { MatDialogModule } from '@angular/material/dialog';
7
8
  import { MatIconModule } from '@angular/material/icon';
@@ -16,6 +17,8 @@ import { AlertDialogComponent } from './components/alert-dialog/alert-dialog.com
16
17
  import { ConfirmThenDialogComponent } from './components/confirm-then-dialog/confirm-then-dialog.component';
17
18
  import { ConfirmationDialogComponent } from './components/confirmation-dialog/confirmation-dialog.component';
18
19
  import { InPlaceInteractionContextComponent } from './components/inplace-interaction-context/in-place-interaction-context.component';
20
+ import { PopupInteractionContextComponent } from './components/popup-interaction-context/popup-interaction-context.component';
21
+ import { InteractionContextTriggerFor } from './directives/interaction-context-trigger-for.directive';
19
22
  import { InteractionService } from './services/interaction.service';
20
23
  let InteractionModule = class InteractionModule {
21
24
  };
@@ -29,7 +32,9 @@ InteractionModule = __decorate([
29
32
  PortalModule,
30
33
  RouterModule,
31
34
  MatIconModule,
32
- DirectivesModule
35
+ DirectivesModule,
36
+ FlexModule,
37
+ GridModule
33
38
  ],
34
39
  declarations: [
35
40
  ActivityContainerComponent,
@@ -39,14 +44,18 @@ InteractionModule = __decorate([
39
44
  ActivityOutletComponent,
40
45
  InPlaceInteractionContextComponent,
41
46
  AddItemInteractionContextComponent,
42
- ActivityActionsComponent
47
+ ActivityActionsComponent,
48
+ PopupInteractionContextComponent,
49
+ InteractionContextTriggerFor
43
50
  ],
44
51
  exports: [
45
52
  ActivityContainerComponent,
46
53
  ActivityOutletComponent,
47
54
  InPlaceInteractionContextComponent,
48
55
  AddItemInteractionContextComponent,
49
- ActivityActionsComponent
56
+ ActivityActionsComponent,
57
+ PopupInteractionContextComponent,
58
+ InteractionContextTriggerFor
50
59
  ],
51
60
  entryComponents: [
52
61
  ActivityContainerComponent,
@@ -55,7 +64,10 @@ InteractionModule = __decorate([
55
64
  AlertDialogComponent
56
65
  ],
57
66
  providers: [
58
- InteractionService,
67
+ InteractionService
68
+ // {
69
+ // provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
70
+ // }
59
71
  ]
60
72
  })
61
73
  ], InteractionModule);
@@ -1 +1 @@
1
- {"version":3,"file":"interaction.module.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/interaction.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACpG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAE,MAAM,2EAA2E,CAAC;AACpH,OAAO,EAAE,kCAAkC,EAAE,MAAM,kFAAkF,CAAC;AACtI,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gEAAgE,CAAC;AAC5G,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,EAAE,kCAAkC,EAAE,MAAM,iFAAiF,CAAC;AACrI,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AA2CpE,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;CAC7B,CAAA;AADY,iBAAiB;IAzC7B,QAAQ,CAAC;QACR,OAAO,EAAE;YACP,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,YAAY;YACZ,YAAY;YACZ,aAAa;YACb,gBAAgB;SACjB;QACD,YAAY,EAAE;YACZ,0BAA0B;YAC1B,2BAA2B;YAC3B,0BAA0B;YAC1B,oBAAoB;YACpB,uBAAuB;YACvB,kCAAkC;YAClC,kCAAkC;YAClC,wBAAwB;SACzB;QACD,OAAO,EAAE;YACP,0BAA0B;YAC1B,uBAAuB;YACvB,kCAAkC;YAClC,kCAAkC;YAClC,wBAAwB;SACzB;QACD,eAAe,EAAE;YACf,0BAA0B;YAC1B,2BAA2B;YAC3B,0BAA0B;YAC1B,oBAAoB;SACrB;QACD,SAAS,EAAE;YACT,kBAAkB;SAInB;KACF,CAAC;GACW,iBAAiB,CAC7B;SADY,iBAAiB","sourcesContent":["import { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MAT_TABS_CONFIG } from '@angular/material/tabs';\nimport { RouterModule } from '@angular/router';\nimport { DirectivesModule } from '../directives/directives.module';\nimport { PlaceModule } from '../place/place.module';\nimport { ActivityActionsComponent } from './components/activity-actions/activity-actions.component';\nimport { ActivityContainerComponent } from './components/activity-container/activity-container.component';\nimport { ActivityOutletComponent } from './components/activity-container/activity-outlet/activity-outlet.component';\nimport { AddItemInteractionContextComponent } from './components/add-item-interaction-context/add-item-interaction-context.component';\nimport { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component';\nimport { ConfirmThenDialogComponent } from './components/confirm-then-dialog/confirm-then-dialog.component';\nimport { ConfirmationDialogComponent } from './components/confirmation-dialog/confirmation-dialog.component';\nimport { InPlaceInteractionContextComponent } from './components/inplace-interaction-context/in-place-interaction-context.component';\nimport { InteractionService } from './services/interaction.service';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatDialogModule,\n MatTabsModule,\n PortalModule,\n RouterModule,\n MatIconModule,\n DirectivesModule\n ],\n declarations: [\n ActivityContainerComponent,\n ConfirmationDialogComponent,\n ConfirmThenDialogComponent,\n AlertDialogComponent,\n ActivityOutletComponent,\n InPlaceInteractionContextComponent,\n AddItemInteractionContextComponent,\n ActivityActionsComponent\n ],\n exports: [\n ActivityContainerComponent,\n ActivityOutletComponent,\n InPlaceInteractionContextComponent,\n AddItemInteractionContextComponent,\n ActivityActionsComponent\n ],\n entryComponents: [\n ActivityContainerComponent,\n ConfirmationDialogComponent,\n ConfirmThenDialogComponent,\n AlertDialogComponent\n ],\n providers: [\n InteractionService,\n // {\n // provide: MAT_TABS_CONFIG, useValue: { animationDuration: \"2s\" }\n // }\n ]\n})\nexport class InteractionModule {\n}\n"]}
1
+ {"version":3,"file":"interaction.module.js","sourceRoot":"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ADY,iBAAiB;IA/C7B,QAAQ,CAAC;QACR,OAAO,EAAE;YACP,YAAY;YACZ,eAAe;YACf,eAAe;YACf,aAAa;YACb,YAAY;YACZ,YAAY;YACZ,aAAa;YACb,gBAAgB;YAChB,UAAU;YACV,UAAU;SACX;QACD,YAAY,EAAE;YACZ,0BAA0B;YAC1B,2BAA2B;YAC3B,0BAA0B;YAC1B,oBAAoB;YACpB,uBAAuB;YACvB,kCAAkC;YAClC,kCAAkC;YAClC,wBAAwB;YACxB,gCAAgC;YAChC,4BAA4B;SAC7B;QACD,OAAO,EAAE;YACP,0BAA0B;YAC1B,uBAAuB;YACvB,kCAAkC;YAClC,kCAAkC;YAClC,wBAAwB;YACxB,gCAAgC;YAChC,4BAA4B;SAC7B;QACD,eAAe,EAAE;YACf,0BAA0B;YAC1B,2BAA2B;YAC3B,0BAA0B;YAC1B,oBAAoB;SACrB;QACD,SAAS,EAAE;YACT,kBAAkB;YAClB,IAAI;YACJ,oEAAoE;YACpE,IAAI;SACL;KACF,CAAC;GACW,iBAAiB,CAC7B;SADY,iBAAiB","sourcesContent":["import { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexModule, GridModule } from '@angular/flex-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { RouterModule } from '@angular/router';\nimport { DirectivesModule } from '../directives/directives.module';\nimport { ActivityActionsComponent } from './components/activity-actions/activity-actions.component';\nimport { ActivityContainerComponent } from './components/activity-container/activity-container.component';\nimport { ActivityOutletComponent } from './components/activity-container/activity-outlet/activity-outlet.component';\nimport { AddItemInteractionContextComponent } from './components/add-item-interaction-context/add-item-interaction-context.component';\nimport { AlertDialogComponent } from './components/alert-dialog/alert-dialog.component';\nimport { ConfirmThenDialogComponent } from './components/confirm-then-dialog/confirm-then-dialog.component';\nimport { ConfirmationDialogComponent } from './components/confirmation-dialog/confirmation-dialog.component';\nimport { InPlaceInteractionContextComponent } from './components/inplace-interaction-context/in-place-interaction-context.component';\nimport { PopupInteractionContextComponent } from './components/popup-interaction-context/popup-interaction-context.component';\nimport { InteractionContextTriggerFor } from './directives/interaction-context-trigger-for.directive';\nimport { InteractionService } from './services/interaction.service';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatDialogModule,\n MatTabsModule,\n PortalModule,\n RouterModule,\n MatIconModule,\n DirectivesModule,\n FlexModule,\n GridModule\n ],\n declarations: [\n ActivityContainerComponent,\n ConfirmationDialogComponent,\n ConfirmThenDialogComponent,\n AlertDialogComponent,\n ActivityOutletComponent,\n InPlaceInteractionContextComponent,\n AddItemInteractionContextComponent,\n ActivityActionsComponent,\n PopupInteractionContextComponent,\n InteractionContextTriggerFor\n ],\n exports: [\n ActivityContainerComponent,\n ActivityOutletComponent,\n InPlaceInteractionContextComponent,\n AddItemInteractionContextComponent,\n ActivityActionsComponent,\n PopupInteractionContextComponent,\n InteractionContextTriggerFor\n ],\n entryComponents: [\n ActivityContainerComponent,\n ConfirmationDialogComponent,\n ConfirmThenDialogComponent,\n AlertDialogComponent\n ],\n providers: [\n InteractionService\n // {\n // provide: MAT_TABS_CONFIG, useValue: { animationDuration: \"2s\" }\n // }\n ]\n})\nexport class InteractionModule {\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"InteractionModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":21,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":23,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsModule","line":26,"character":4},{"__symbolic":"reference","module":"@angular/cdk/portal","name":"PortalModule","line":27,"character":4},{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":28,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":29,"character":4},{"__symbolic":"reference","module":"../directives/directives.module","name":"DirectivesModule","line":30,"character":4}],"declarations":[{"__symbolic":"reference","module":"./components/activity-container/activity-container.component","name":"ActivityContainerComponent","line":33,"character":4},{"__symbolic":"reference","module":"./components/confirmation-dialog/confirmation-dialog.component","name":"ConfirmationDialogComponent","line":34,"character":4},{"__symbolic":"reference","module":"./components/confirm-then-dialog/confirm-then-dialog.component","name":"ConfirmThenDialogComponent","line":35,"character":4},{"__symbolic":"reference","module":"./components/alert-dialog/alert-dialog.component","name":"AlertDialogComponent","line":36,"character":4},{"__symbolic":"reference","module":"./components/activity-container/activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":37,"character":4},{"__symbolic":"reference","module":"./components/inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":38,"character":4},{"__symbolic":"reference","module":"./components/add-item-interaction-context/add-item-interaction-context.component","name":"AddItemInteractionContextComponent","line":39,"character":4},{"__symbolic":"reference","module":"./components/activity-actions/activity-actions.component","name":"ActivityActionsComponent","line":40,"character":4}],"exports":[{"__symbolic":"reference","module":"./components/activity-container/activity-container.component","name":"ActivityContainerComponent","line":43,"character":4},{"__symbolic":"reference","module":"./components/activity-container/activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":44,"character":4},{"__symbolic":"reference","module":"./components/inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":45,"character":4},{"__symbolic":"reference","module":"./components/add-item-interaction-context/add-item-interaction-context.component","name":"AddItemInteractionContextComponent","line":46,"character":4},{"__symbolic":"reference","module":"./components/activity-actions/activity-actions.component","name":"ActivityActionsComponent","line":47,"character":4}],"entryComponents":[{"__symbolic":"reference","module":"./components/activity-container/activity-container.component","name":"ActivityContainerComponent","line":50,"character":4},{"__symbolic":"reference","module":"./components/confirmation-dialog/confirmation-dialog.component","name":"ConfirmationDialogComponent","line":51,"character":4},{"__symbolic":"reference","module":"./components/confirm-then-dialog/confirm-then-dialog.component","name":"ConfirmThenDialogComponent","line":52,"character":4},{"__symbolic":"reference","module":"./components/alert-dialog/alert-dialog.component","name":"AlertDialogComponent","line":53,"character":4}],"providers":[{"__symbolic":"reference","module":"./services/interaction.service","name":"InteractionService","line":56,"character":4}]}]}]}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"InteractionModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/material/button","name":"MatButtonModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":26,"character":4},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsModule","line":27,"character":4},{"__symbolic":"reference","module":"@angular/cdk/portal","name":"PortalModule","line":28,"character":4},{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":29,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":30,"character":4},{"__symbolic":"reference","module":"../directives/directives.module","name":"DirectivesModule","line":31,"character":4},{"__symbolic":"reference","module":"@angular/flex-layout","name":"FlexModule","line":32,"character":4},{"__symbolic":"reference","module":"@angular/flex-layout","name":"GridModule","line":33,"character":4}],"declarations":[{"__symbolic":"reference","module":"./components/activity-container/activity-container.component","name":"ActivityContainerComponent","line":36,"character":4},{"__symbolic":"reference","module":"./components/confirmation-dialog/confirmation-dialog.component","name":"ConfirmationDialogComponent","line":37,"character":4},{"__symbolic":"reference","module":"./components/confirm-then-dialog/confirm-then-dialog.component","name":"ConfirmThenDialogComponent","line":38,"character":4},{"__symbolic":"reference","module":"./components/alert-dialog/alert-dialog.component","name":"AlertDialogComponent","line":39,"character":4},{"__symbolic":"reference","module":"./components/activity-container/activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":40,"character":4},{"__symbolic":"reference","module":"./components/inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":41,"character":4},{"__symbolic":"reference","module":"./components/add-item-interaction-context/add-item-interaction-context.component","name":"AddItemInteractionContextComponent","line":42,"character":4},{"__symbolic":"reference","module":"./components/activity-actions/activity-actions.component","name":"ActivityActionsComponent","line":43,"character":4},{"__symbolic":"reference","module":"./components/popup-interaction-context/popup-interaction-context.component","name":"PopupInteractionContextComponent","line":44,"character":4},{"__symbolic":"reference","module":"./directives/interaction-context-trigger-for.directive","name":"InteractionContextTriggerFor","line":45,"character":4}],"exports":[{"__symbolic":"reference","module":"./components/activity-container/activity-container.component","name":"ActivityContainerComponent","line":48,"character":4},{"__symbolic":"reference","module":"./components/activity-container/activity-outlet/activity-outlet.component","name":"ActivityOutletComponent","line":49,"character":4},{"__symbolic":"reference","module":"./components/inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":50,"character":4},{"__symbolic":"reference","module":"./components/add-item-interaction-context/add-item-interaction-context.component","name":"AddItemInteractionContextComponent","line":51,"character":4},{"__symbolic":"reference","module":"./components/activity-actions/activity-actions.component","name":"ActivityActionsComponent","line":52,"character":4},{"__symbolic":"reference","module":"./components/popup-interaction-context/popup-interaction-context.component","name":"PopupInteractionContextComponent","line":53,"character":4},{"__symbolic":"reference","module":"./directives/interaction-context-trigger-for.directive","name":"InteractionContextTriggerFor","line":54,"character":4}],"entryComponents":[{"__symbolic":"reference","module":"./components/activity-container/activity-container.component","name":"ActivityContainerComponent","line":57,"character":4},{"__symbolic":"reference","module":"./components/confirmation-dialog/confirmation-dialog.component","name":"ConfirmationDialogComponent","line":58,"character":4},{"__symbolic":"reference","module":"./components/confirm-then-dialog/confirm-then-dialog.component","name":"ConfirmThenDialogComponent","line":59,"character":4},{"__symbolic":"reference","module":"./components/alert-dialog/alert-dialog.component","name":"AlertDialogComponent","line":60,"character":4}],"providers":[{"__symbolic":"reference","module":"./services/interaction.service","name":"InteractionService","line":63,"character":4}]}]}]}}}]