@coolon/angular-ui-powerups 12.4.0-alpha.5 → 12.4.0-alpha.51

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 (342) hide show
  1. package/assets/activities/activities.scss +77 -0
  2. package/assets/activities/input-activities.scss +36 -0
  3. package/assets/cards.scss +17 -0
  4. package/assets/empty-state.scss +11 -0
  5. package/assets/form.scss +5 -2
  6. package/assets/forms/mixins.scss +6 -0
  7. package/assets/interaction/editor/inline-string-editor.scss +100 -0
  8. package/assets/interaction.scss +10 -7
  9. package/assets/mixins.scss +5 -7
  10. package/assets/styles.scss +8 -15
  11. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +735 -320
  12. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  13. package/bundles/coolon-angular-ui-powerups.umd.js +854 -144
  14. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  15. package/coolon-angular-ui-powerups.metadata.json +1 -1
  16. package/cypress/component-builder.d.ts +71 -0
  17. package/cypress/components/aup-abstract-activity.d.ts +31 -0
  18. package/cypress/components/aup-abstract-table.d.ts +18 -0
  19. package/cypress/components/aup-activity.d.ts +9 -0
  20. package/cypress/components/aup-alert-dialog.d.ts +27 -0
  21. package/cypress/components/aup-alert.d.ts +9 -0
  22. package/cypress/components/aup-command-face.d.ts +2 -8
  23. package/cypress/components/aup-command.d.ts +2 -1
  24. package/cypress/components/aup-confirm-dialog.d.ts +27 -0
  25. package/cypress/components/aup-confirm.d.ts +11 -0
  26. package/cypress/components/aup-empty-state.d.ts +4 -0
  27. package/cypress/components/aup-input.d.ts +11 -5
  28. package/cypress/components/aup-modal-activity.d.ts +24 -0
  29. package/cypress/components/aup-modal-mixin.d.ts +23 -0
  30. package/cypress/components/aup-table.d.ts +5 -18
  31. package/cypress/components/aup-tree-table.d.ts +16 -0
  32. package/cypress/components/button.d.ts +11 -7
  33. package/cypress/components/form-element-mixin.d.ts +22 -0
  34. package/cypress/components/mat-checkbox.d.ts +31 -0
  35. package/cypress/components/popup/aup-abstract-popup-menu.d.ts +15 -0
  36. package/cypress/components/popup/aup-more-menu.d.ts +5 -0
  37. package/cypress/components/popup/aup-popup-menu-panel.d.ts +3 -0
  38. package/cypress/components/popup/aup-popup-menu.d.ts +7 -0
  39. package/cypress/components/table/aup-table-cell.d.ts +9 -0
  40. package/cypress/components/table/aup-table-column.d.ts +10 -0
  41. package/cypress/components/table/aup-table-row.d.ts +17 -0
  42. package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
  43. package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
  44. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  45. package/cypress/element-locator.d.ts +8 -0
  46. package/cypress/exports.d.ts +25 -4
  47. package/cypress/package.json +1 -1
  48. package/cypress/page-builder.d.ts +9 -0
  49. package/cypress/page-element.d.ts +12 -12
  50. package/cypress/page.d.ts +8 -33
  51. package/esm2015/cypress/component-builder.js +92 -0
  52. package/esm2015/cypress/component-builder.js.map +1 -0
  53. package/esm2015/cypress/component-builder.metadata.json +1 -0
  54. package/esm2015/cypress/components/aup-abstract-activity.js +12 -0
  55. package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -0
  56. package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -0
  57. package/esm2015/cypress/components/aup-abstract-table.js +50 -0
  58. package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
  59. package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
  60. package/esm2015/cypress/components/aup-activity.js +13 -0
  61. package/esm2015/cypress/components/aup-activity.js.map +1 -0
  62. package/esm2015/cypress/components/aup-activity.metadata.json +1 -0
  63. package/esm2015/cypress/components/aup-alert-dialog.js +8 -0
  64. package/esm2015/cypress/components/aup-alert-dialog.js.map +1 -0
  65. package/esm2015/cypress/components/aup-alert-dialog.metadata.json +1 -0
  66. package/esm2015/cypress/components/aup-alert.js +13 -0
  67. package/esm2015/cypress/components/aup-alert.js.map +1 -0
  68. package/esm2015/cypress/components/aup-alert.metadata.json +1 -0
  69. package/esm2015/cypress/components/aup-command-face.js +11 -22
  70. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  71. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  72. package/esm2015/cypress/components/aup-command.js +12 -6
  73. package/esm2015/cypress/components/aup-command.js.map +1 -1
  74. package/esm2015/cypress/components/aup-command.metadata.json +1 -1
  75. package/esm2015/cypress/components/aup-confirm-dialog.js +8 -0
  76. package/esm2015/cypress/components/aup-confirm-dialog.js.map +1 -0
  77. package/esm2015/cypress/components/aup-confirm-dialog.metadata.json +1 -0
  78. package/esm2015/cypress/components/aup-confirm.js +19 -0
  79. package/esm2015/cypress/components/aup-confirm.js.map +1 -0
  80. package/esm2015/cypress/components/aup-confirm.metadata.json +1 -0
  81. package/esm2015/cypress/components/aup-empty-state.js +7 -0
  82. package/esm2015/cypress/components/aup-empty-state.js.map +1 -0
  83. package/esm2015/cypress/components/aup-empty-state.metadata.json +1 -0
  84. package/esm2015/cypress/components/aup-input.js +17 -5
  85. package/esm2015/cypress/components/aup-input.js.map +1 -1
  86. package/esm2015/cypress/components/aup-input.metadata.json +1 -1
  87. package/esm2015/cypress/components/aup-modal-activity.js +5 -0
  88. package/esm2015/cypress/components/aup-modal-activity.js.map +1 -0
  89. package/esm2015/cypress/components/aup-modal-activity.metadata.json +1 -0
  90. package/esm2015/cypress/components/aup-modal-mixin.js +18 -0
  91. package/esm2015/cypress/components/aup-modal-mixin.js.map +1 -0
  92. package/esm2015/cypress/components/aup-modal-mixin.metadata.json +1 -0
  93. package/esm2015/cypress/components/aup-navigation.js +1 -1
  94. package/esm2015/cypress/components/aup-navigation.js.map +1 -1
  95. package/esm2015/cypress/components/aup-table.js +5 -33
  96. package/esm2015/cypress/components/aup-table.js.map +1 -1
  97. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  98. package/esm2015/cypress/components/aup-tree-table.js +34 -0
  99. package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
  100. package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
  101. package/esm2015/cypress/components/button.js +4 -10
  102. package/esm2015/cypress/components/button.js.map +1 -1
  103. package/esm2015/cypress/components/button.metadata.json +1 -1
  104. package/esm2015/cypress/components/form-element-mixin.js +11 -0
  105. package/esm2015/cypress/components/form-element-mixin.js.map +1 -0
  106. package/esm2015/cypress/components/form-element-mixin.metadata.json +1 -0
  107. package/esm2015/cypress/components/mat-checkbox.js +34 -0
  108. package/esm2015/cypress/components/mat-checkbox.js.map +1 -0
  109. package/esm2015/cypress/components/mat-checkbox.metadata.json +1 -0
  110. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js +33 -0
  111. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js.map +1 -0
  112. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.metadata.json +1 -0
  113. package/esm2015/cypress/components/popup/aup-more-menu.js +8 -0
  114. package/esm2015/cypress/components/popup/aup-more-menu.js.map +1 -0
  115. package/esm2015/cypress/components/popup/aup-more-menu.metadata.json +1 -0
  116. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js +4 -0
  117. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js.map +1 -0
  118. package/esm2015/cypress/components/popup/aup-popup-menu-panel.metadata.json +1 -0
  119. package/esm2015/cypress/components/popup/aup-popup-menu.js +12 -0
  120. package/esm2015/cypress/components/popup/aup-popup-menu.js.map +1 -0
  121. package/esm2015/cypress/components/popup/aup-popup-menu.metadata.json +1 -0
  122. package/esm2015/cypress/components/table/aup-table-cell.js +14 -0
  123. package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
  124. package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
  125. package/esm2015/cypress/components/table/aup-table-column.js +19 -0
  126. package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
  127. package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
  128. package/esm2015/cypress/components/table/aup-table-row.js +28 -0
  129. package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
  130. package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
  131. package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
  132. package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
  133. package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
  134. package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
  135. package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
  136. package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
  137. package/esm2015/cypress/element-locator.js +16 -0
  138. package/esm2015/cypress/element-locator.js.map +1 -0
  139. package/esm2015/cypress/element-locator.metadata.json +1 -0
  140. package/esm2015/cypress/exports.js +25 -4
  141. package/esm2015/cypress/exports.js.map +1 -1
  142. package/esm2015/cypress/exports.metadata.json +1 -1
  143. package/esm2015/cypress/page-builder.js +16 -0
  144. package/esm2015/cypress/page-builder.js.map +1 -0
  145. package/esm2015/cypress/page-builder.metadata.json +1 -0
  146. package/esm2015/cypress/page-element.js +26 -19
  147. package/esm2015/cypress/page-element.js.map +1 -1
  148. package/esm2015/cypress/page-element.metadata.json +1 -1
  149. package/esm2015/cypress/page.js +31 -19
  150. package/esm2015/cypress/page.js.map +1 -1
  151. package/esm2015/cypress/page.metadata.json +1 -1
  152. package/esm2015/cypress/path.js +3 -1
  153. package/esm2015/cypress/path.js.map +1 -1
  154. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  155. package/esm2015/lib/components/cards/abstract-card-container.component.js +29 -0
  156. package/esm2015/lib/components/cards/abstract-card-container.component.js.map +1 -0
  157. package/esm2015/lib/components/cards/abstract-card-container.component.metadata.json +1 -0
  158. package/esm2015/lib/components/cards/abstract-card-container.component.ngfactory.js.map +1 -0
  159. package/esm2015/lib/components/cards/card-container/card-container.component.js +123 -0
  160. package/esm2015/lib/components/cards/card-container/card-container.component.js.map +1 -0
  161. package/esm2015/lib/components/cards/card-container/card-container.component.metadata.json +1 -0
  162. package/esm2015/lib/components/cards/card-container/card-container.component.ngfactory.js.map +1 -0
  163. package/esm2015/lib/components/cards/card-container/card-container.component.scss.shim.ngstyle.js.map +1 -0
  164. package/esm2015/lib/components/cards/card-stack/card-stack.component.js +78 -0
  165. package/esm2015/lib/components/cards/card-stack/card-stack.component.js.map +1 -0
  166. package/esm2015/lib/components/cards/card-stack/card-stack.component.metadata.json +1 -0
  167. package/esm2015/lib/components/cards/card-stack/card-stack.component.ngfactory.js.map +1 -0
  168. package/esm2015/lib/components/cards/card-stack/card-stack.component.scss.shim.ngstyle.js.map +1 -0
  169. package/esm2015/lib/components/components.module.js +37 -24
  170. package/esm2015/lib/components/components.module.js.map +1 -1
  171. package/esm2015/lib/components/components.module.metadata.json +1 -1
  172. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  173. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  174. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  175. package/esm2015/lib/components/exports.js +5 -1
  176. package/esm2015/lib/components/exports.js.map +1 -1
  177. package/esm2015/lib/components/exports.metadata.json +1 -1
  178. package/esm2015/lib/components/forms/abstract-input.component.js +1 -0
  179. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  180. package/esm2015/lib/components/labelled-value/labelled-value.component.js +22 -0
  181. package/esm2015/lib/components/labelled-value/labelled-value.component.js.map +1 -0
  182. package/esm2015/lib/components/labelled-value/labelled-value.component.metadata.json +1 -0
  183. package/esm2015/lib/components/labelled-value/labelled-value.component.ngfactory.js.map +1 -0
  184. package/esm2015/lib/components/{card-container/card-container.component.scss.shim.ngstyle.js.map → labelled-value/labelled-value.component.scss.shim.ngstyle.js.map} +1 -1
  185. package/esm2015/lib/components/loading-container/loading-container.component.js +45 -0
  186. package/esm2015/lib/components/loading-container/loading-container.component.js.map +1 -0
  187. package/esm2015/lib/components/loading-container/loading-container.component.metadata.json +1 -0
  188. package/esm2015/lib/components/loading-container/loading-container.component.ngfactory.js.map +1 -0
  189. package/esm2015/lib/components/loading-container/loading-container.component.scss.shim.ngstyle.js.map +1 -0
  190. package/esm2015/lib/components/section-header/section-header.component.js +12 -5
  191. package/esm2015/lib/components/section-header/section-header.component.js.map +1 -1
  192. package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
  193. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  194. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  195. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  196. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
  197. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  198. package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
  199. package/esm2015/lib/components/track-by.js +12 -0
  200. package/esm2015/lib/components/track-by.js.map +1 -1
  201. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +17 -11
  202. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  203. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  204. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +1 -1
  205. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  206. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  207. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js +4 -0
  208. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js.map +1 -1
  209. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.metadata.json +1 -1
  210. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js +4 -1
  211. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js.map +1 -1
  212. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.metadata.json +1 -1
  213. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js +4 -1
  214. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js.map +1 -1
  215. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.metadata.json +1 -1
  216. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js +4 -1
  217. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js.map +1 -1
  218. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.metadata.json +1 -1
  219. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js +77 -0
  220. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js.map +1 -0
  221. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.metadata.json +1 -0
  222. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.ngfactory.js.map +1 -0
  223. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.scss.shim.ngstyle.js.map +1 -0
  224. package/esm2015/lib/interaction/components/editors/edit-context.js +2 -0
  225. package/esm2015/lib/interaction/components/editors/edit-context.js.map +1 -0
  226. package/esm2015/lib/interaction/components/editors/edit-context.metadata.json +1 -0
  227. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js +50 -0
  228. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map +1 -0
  229. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.metadata.json +1 -0
  230. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +161 -0
  231. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js.map +1 -0
  232. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.metadata.json +1 -0
  233. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.js.map +1 -0
  234. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +6 -2
  235. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  236. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
  237. package/esm2015/lib/interaction/components/input-activities/input-activity.js +95 -0
  238. package/esm2015/lib/interaction/components/input-activities/input-activity.js.map +1 -0
  239. package/esm2015/lib/interaction/components/input-activities/input-activity.metadata.json +1 -0
  240. package/esm2015/lib/interaction/components/input-activities/input-activity.ngfactory.js.map +1 -0
  241. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +5 -3
  242. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
  243. package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
  244. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +6 -4
  245. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
  246. package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
  247. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +1 -0
  248. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  249. package/esm2015/lib/interaction/exports.js +5 -3
  250. package/esm2015/lib/interaction/exports.js.map +1 -1
  251. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  252. package/esm2015/lib/interaction/interaction.module.js +19 -5
  253. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  254. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  255. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  256. package/esm2015/lib/place/guards/consolidated-param-map.js +2 -1
  257. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  258. package/esm2015/lib/place/guards/consolidated-param-map.metadata.json +1 -1
  259. package/esm2015/lib/place/guards/place.guard.js +2 -1
  260. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  261. package/esm2015/lib/place/place-component.js +31 -4
  262. package/esm2015/lib/place/place-component.js.map +1 -1
  263. package/esm2015/lib/place/place-component.metadata.json +1 -1
  264. package/esm2015/lib/place/place-router.js +10 -13
  265. package/esm2015/lib/place/place-router.js.map +1 -1
  266. package/esm2015/lib/place/place-router.metadata.json +1 -1
  267. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  268. package/esm2015/lib/place/url-snapshot.js +1 -7
  269. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  270. package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
  271. package/esm2015/lib/place/visit.js +5 -1
  272. package/esm2015/lib/place/visit.js.map +1 -1
  273. package/esm2015/lib/place/visit.metadata.json +1 -1
  274. package/fesm2015/coolon-angular-ui-powerups-cypress.js +550 -237
  275. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  276. package/fesm2015/coolon-angular-ui-powerups.js +715 -107
  277. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  278. package/lib/components/cards/abstract-card-container.component.d.ts +11 -0
  279. package/lib/components/{card-container → cards/card-container}/card-container.component.d.ts +30 -9
  280. package/lib/components/cards/card-stack/card-stack.component.d.ts +65 -0
  281. package/lib/components/exports.d.ts +5 -1
  282. package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
  283. package/lib/components/loading-container/loading-container.component.d.ts +11 -0
  284. package/lib/components/section-header/section-header.component.d.ts +5 -2
  285. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
  286. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  287. package/lib/components/track-by.d.ts +9 -0
  288. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +14 -3
  289. package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +1 -1
  290. package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +2 -1
  291. package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +2 -1
  292. package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +2 -1
  293. package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +39 -0
  294. package/lib/interaction/components/editors/edit-context.d.ts +3 -0
  295. package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +24 -0
  296. package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +57 -0
  297. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -0
  298. package/lib/interaction/components/input-activities/input-activity.d.ts +41 -0
  299. package/lib/interaction/components/input-activities/select-input-activity.d.ts +11 -3
  300. package/lib/interaction/components/input-activities/string-input-activity.d.ts +6 -2
  301. package/lib/interaction/exports.d.ts +5 -3
  302. package/lib/place/place-component.d.ts +6 -1
  303. package/lib/place/place-router.d.ts +2 -2
  304. package/package.json +1 -1
  305. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +1 -1
  306. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +5 -3
  307. package/schematics/place-routes/place-class-scanner.js +3 -1
  308. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  309. package/assets/activities.scss +0 -70
  310. package/cypress/components/aup-more-menu.d.ts +0 -4
  311. package/cypress/components/aup-popup-menu.d.ts +0 -7
  312. package/cypress/components/button-mixin.d.ts +0 -19
  313. package/cypress/section.d.ts +0 -52
  314. package/esm2015/cypress/components/aup-more-menu.js +0 -7
  315. package/esm2015/cypress/components/aup-more-menu.js.map +0 -1
  316. package/esm2015/cypress/components/aup-more-menu.metadata.json +0 -1
  317. package/esm2015/cypress/components/aup-popup-menu.js +0 -19
  318. package/esm2015/cypress/components/aup-popup-menu.js.map +0 -1
  319. package/esm2015/cypress/components/aup-popup-menu.metadata.json +0 -1
  320. package/esm2015/cypress/components/button-mixin.js +0 -15
  321. package/esm2015/cypress/components/button-mixin.js.map +0 -1
  322. package/esm2015/cypress/components/button-mixin.metadata.json +0 -1
  323. package/esm2015/cypress/section.js +0 -72
  324. package/esm2015/cypress/section.js.map +0 -1
  325. package/esm2015/cypress/section.metadata.json +0 -1
  326. package/esm2015/lib/components/card-container/card-container.component.js +0 -84
  327. package/esm2015/lib/components/card-container/card-container.component.js.map +0 -1
  328. package/esm2015/lib/components/card-container/card-container.component.metadata.json +0 -1
  329. package/esm2015/lib/components/card-container/card-container.component.ngfactory.js.map +0 -1
  330. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +0 -43
  331. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +0 -1
  332. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +0 -1
  333. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.ngfactory.js.map +0 -1
  334. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js +0 -2
  335. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +0 -1
  336. package/esm2015/lib/interaction/components/input-activities/input-activity-data.metadata.json +0 -1
  337. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js +0 -2
  338. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js.map +0 -1
  339. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.metadata.json +0 -1
  340. package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +0 -12
  341. package/lib/interaction/components/input-activities/input-activity-data.d.ts +0 -11
  342. package/lib/interaction/components/input-activities/select-input-activity-data.d.ts +0 -8
@@ -1,7 +1,7 @@
1
1
  import * as i2 from '@angular/common';
2
2
  import { DOCUMENT, CommonModule, Location } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, ViewEncapsulation, HostBinding, InjectionToken, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, Injector, ComponentFactoryResolver } from '@angular/core';
4
+ import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, Injectable, Pipe, NgModule, Component, ContentChild, HostBinding, ViewEncapsulation, InjectionToken, ViewChildren, SkipSelf, EventEmitter, ViewChild, Output, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, Injector, ComponentFactoryResolver } from '@angular/core';
5
5
  import { FormsModule } from '@angular/forms';
6
6
  import { MatFormFieldModule } from '@angular/material/form-field';
7
7
  import { MatInputModule } from '@angular/material/input';
@@ -16,21 +16,23 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
16
16
  import { MatDividerModule } from '@angular/material/divider';
17
17
  import { MatIconModule } from '@angular/material/icon';
18
18
  import { MatMenuItem, MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
19
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
19
20
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
20
21
  import { MatTableModule } from '@angular/material/table';
21
22
  import { MatTooltipModule } from '@angular/material/tooltip';
22
23
  import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
23
24
  import { fas } from '@fortawesome/free-solid-svg-icons';
24
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Trace, Functions } from '@coolon/pectin';
25
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Functions } from '@coolon/pectin';
25
26
  import { __decorate, __metadata, __awaiter } from 'tslib';
26
27
  import { DomSanitizer } from '@angular/platform-browser';
27
28
  import * as _ from 'lodash';
28
29
  import ___default from 'lodash';
29
30
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
30
31
  import { Enum } from 'typescript-string-enums';
31
- import { assert as assert$1, Stringy, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
32
+ import { lang as lang$1, assert as assert$1, Stringy, Opts, Klass } from '@coolon/typescript-utilities';
32
33
  import ResizeObserver from 'resize-observer-polyfill';
33
34
  import produce from 'immer';
35
+ import { A11yModule } from '@angular/cdk/a11y';
34
36
  import { FlexModule, GridModule } from '@angular/flex-layout';
35
37
  import * as i1$1 from '@angular/material/dialog';
36
38
  import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
@@ -526,6 +528,30 @@ var CommandFace;
526
528
  CommandFace.Adapter = Adapter;
527
529
  })(CommandFace || (CommandFace = {}));
528
530
 
531
+ class AbstractCardContainerComponent extends DisposableComponent {
532
+ constructor() {
533
+ super();
534
+ }
535
+ ngOnInit() {
536
+ }
537
+ }
538
+ AbstractCardContainerComponent.decorators = [
539
+ { type: Component, args: [{
540
+ selector: 'aup-abstract-card-container',
541
+ template: ''
542
+ },] }
543
+ ];
544
+ AbstractCardContainerComponent.ctorParameters = () => [];
545
+ AbstractCardContainerComponent.propDecorators = {
546
+ addCardCommand: [{ type: Input }],
547
+ addCardFace: [{ type: Input }],
548
+ addCardTemplate: [{ type: ContentChild, args: ['addCardTemplate',] }]
549
+ };
550
+ __decorate([
551
+ TrackExternal(),
552
+ __metadata("design:type", Command)
553
+ ], AbstractCardContainerComponent.prototype, "addCardCommand", void 0);
554
+
529
555
  /**
530
556
  * @example
531
557
  * // basic usage
@@ -543,6 +569,13 @@ var CommandFace;
543
569
  * <my-card *ngFor="..."></my-card>
544
570
  * </aup-card-container>
545
571
  *
572
+ * // use the aup-add-card-activity to display as the new card place holder and to run
573
+ * // the activity inside teh card
574
+ * <aup-card-container [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
575
+ * <my-card *ngFor="..."></my-card>
576
+ * <aup-add-card-activity type="inline" renderAs="card" [face]="i18n.commands.addModal" [activityClass]="AddCardActivity"></aup-add-card-activity>
577
+ * </aup-card-container>
578
+ *
546
579
  * // adds an add card component using the specified template. The template
547
580
  * // will fill it's container in the grid.
548
581
  * <aup-card-container>
@@ -575,35 +608,144 @@ var CommandFace;
575
608
  * aup-card-container {
576
609
  * --card-gap: var(--card-gap, 16px);
577
610
  * --card-width: var(--card-width, 300px);
611
+ * --card-max-width: auto;
578
612
  * --card-height: var(--card-height, auto);
579
613
  * --card-min-height: var(--card-min-height, auto);
580
614
  * --card-background: var(--card-background, #fcfcfb);
581
615
  * }
582
616
  */
583
- class CardContainerComponent extends DisposableComponent {
584
- constructor() {
617
+ class CardContainerComponent extends AbstractCardContainerComponent {
618
+ constructor(elementRef) {
585
619
  super();
620
+ this.elementRef = elementRef;
621
+ /**
622
+ * Enable scrolling. If true the container will have height==0 so you must set it's height explicitly
623
+ * or place in a layout that will stretch it such as a grid or flex layout.
624
+ */
625
+ this.enabledScroll = false;
626
+ }
627
+ set columnCount(count) {
628
+ if (!_.isNil(count) && (!_.isInteger(count) || count < 1)) {
629
+ lang$1.illegalState('columnCount must be a positive integer or nil');
630
+ }
631
+ this._columnCount = count;
632
+ this.updateColumnCountStyles();
633
+ }
634
+ get columnCount() {
635
+ return this._columnCount;
586
636
  }
587
637
  ngOnInit() {
638
+ super.ngOnInit();
639
+ this.updateColumnCountStyles();
640
+ }
641
+ get isAutoColumns() {
642
+ return _.isNil(this._columnCount);
643
+ }
644
+ get isSingleColumn() {
645
+ return this._columnCount === 1;
646
+ }
647
+ updateColumnCountStyles() {
648
+ const el = this.elementRef.nativeElement;
649
+ if (_.isNil(this._columnCount)) {
650
+ el.style.setProperty('--aup-card-container-column-count', '');
651
+ }
652
+ else {
653
+ el.style.setProperty('--aup-card-container-column-count', this._columnCount);
654
+ }
588
655
  }
589
656
  }
590
657
  CardContainerComponent.decorators = [
591
658
  { type: Component, args: [{
592
659
  selector: 'aup-card-container',
593
- template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
594
- styles: [":host{--resolved-card-gap:var(--card-gap,16px);--resolved-card-width:var(--card-width,300px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-background:var(--card-background,#fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
660
+ template: "<div class=\"header-container\">\n <ng-content select=\"[card-container-header]\"></ng-content>\n</div>\n\n<ng-template #content>\n <div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<div class=\"no-scroll-container\" *ngIf=\"!enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</div>\n\n<aup-scroll-container *ngIf=\"enabledScroll\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aup-scroll-container>\n\n<div class=\"footer-container\">\n <ng-content select=\"[card-container-footer]\"></ng-content>\n</div>\n\n",
661
+ styles: [":host{--resolved-card-gap:var(--card-gap,16px);--resolved-card-width:var(--card-width,300px);--resolved-card-max-width:var(--card-max-width,auto);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-background:var(--card-background,var(--aup-card-container-default-background-color));flex:1;display:flex;flex-direction:column;align-items:stretch;background:var(--resolved-card-background)}:host.auto-columns .card-container{grid-template-columns:repeat(auto-fit,minmax(var(--resolved-card-width),var(--resolved-card-max-width)));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap))}:host:not(.auto-columns) .card-container{grid-template-columns:repeat(var(--aup-card-container-column-count),1fr)}.card-container{display:grid;box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));max-width:100%;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap)}.no-scroll-container,aup-scroll-container{flex:1}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
595
662
  },] }
596
663
  ];
597
- CardContainerComponent.ctorParameters = () => [];
664
+ CardContainerComponent.ctorParameters = () => [
665
+ { type: ElementRef }
666
+ ];
598
667
  CardContainerComponent.propDecorators = {
599
- addCardCommand: [{ type: Input }],
600
- addCardFace: [{ type: Input }],
601
- addCardTemplate: [{ type: ContentChild, args: ["addCardTemplate",] }]
668
+ columnCount: [{ type: Input }],
669
+ enabledScroll: [{ type: Input }],
670
+ isAutoColumns: [{ type: HostBinding, args: ['class.auto-columns',] }],
671
+ isSingleColumn: [{ type: HostBinding, args: ['class.single-column',] }]
602
672
  };
603
- __decorate([
604
- TrackExternal(),
605
- __metadata("design:type", Command)
606
- ], CardContainerComponent.prototype, "addCardCommand", void 0);
673
+
674
+ /**
675
+ * @deprecated deprecated, use `aup-card-container [columnCount]="1"` instead.
676
+ * @example
677
+ * // basic usage
678
+ * <aup-card-stack>
679
+ * <my-card *ngFor="..."></my-card>
680
+ * </aup-card-stack>
681
+ *
682
+ * // adds an add button with a the '+' icon to the end of the card list.
683
+ * <aup-card-stack [addCardCommand]="addCard">
684
+ * <my-card *ngFor="..."></my-card>
685
+ * </aup-card-stack>
686
+ *
687
+ * // adds an add button with the specified face
688
+ * <aup-card-stack [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
689
+ * <my-card *ngFor="..."></my-card>
690
+ * </aup-card-stack>
691
+ *
692
+ * // use the aup-add-card-activity to display as the new card place holder and to run
693
+ * // the activity inside teh card
694
+ * <aup-card-stack [addCardCommand]="addCard" [addCardFace]="i18n.addCard" >
695
+ * <my-card *ngFor="..."></my-card>
696
+ * <aup-add-card-activity type="inline" renderAs="card" [face]="i18n.commands.addModal" [activityClass]="AddCardActivity"></aup-add-card-activity>
697
+ * </aup-card-stack>
698
+ *
699
+ * // adds an add card component using the specified template. The template
700
+ * // will fill it's container in the grid.
701
+ * <aup-card-stack>
702
+ * <my-card *ngFor="..."></my-card>
703
+ * <ng-template #addCardTemplate>
704
+ * <div>This is a new card template, it will the the size of the other cards.</div>
705
+ * </ng-template>
706
+ * </aup-card-stack>
707
+ *
708
+ * // sing the default new card styles for your template
709
+ * @import "../../../../assets/styles";
710
+ * .my-new-card {
711
+ * @include aup-card-stack-new-card-style();
712
+ * // OR
713
+ * @include aup-card-stack-new-card-style(
714
+ * $color: rgba(0,0,0,0.54),
715
+ * $background-color: rgba(255,255,255,0.8),
716
+ * $hover-color: $color,
717
+ * $background-hover-color: white
718
+ * )
719
+ * }
720
+ * <aup-card-stack>
721
+ * <my-card *ngFor="..."></my-card>
722
+ * <ng-template #addCardTemplate>
723
+ * <div class="my-new-card" >This is a new card template, it will the the size of the other cards.</div>
724
+ * </ng-template>
725
+ * </aup-card-stack>
726
+ *
727
+ * // CSS Vars
728
+ * aup-card-stack {
729
+ * --card-gap: var(--card-gap, 16px);
730
+ * --card-height: var(--card-height, auto);
731
+ * --card-min-height: var(--card-min-height, auto);
732
+ * --card-background: var(--card-background, #fcfcfb);
733
+ * }
734
+ */
735
+ class CardStackComponent extends AbstractCardContainerComponent {
736
+ constructor() {
737
+ super();
738
+ console.warn('<aup-card-stack></aup-card-stack> is deprecated. Use <aup-card-container [columnCount]="1"> instead.');
739
+ }
740
+ }
741
+ CardStackComponent.decorators = [
742
+ { type: Component, args: [{
743
+ selector: 'aup-card-stack',
744
+ template: "<div class=\"card-container\">\n <ng-content></ng-content>\n</div>\n<div class=\"footer\">\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n <ng-content select=\"[aup-card-stack-footer]\"></ng-content>\n</div>\n",
745
+ styles: [":host{--resolved-card-gap:var(--card-gap,16px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-background:var(--card-background,#fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:grid;grid-template-columns:1fr;grid-auto-rows:minmax(var(--resolved-card-min-height),var(--resolved-card-height));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);max-width:100%}.footer{align-items:stretch;padding:0 var(--resolved-card-gap) var(--resolved-card-gap)}.add-card-container,.footer{display:flex;flex-direction:column}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);align-items:center;justify-content:center;transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
746
+ },] }
747
+ ];
748
+ CardStackComponent.ctorParameters = () => [];
607
749
 
608
750
  /**
609
751
  * Custom CSS:
@@ -912,10 +1054,22 @@ __decorate([
912
1054
  var TrackBy;
913
1055
  (function (TrackBy) {
914
1056
  TrackBy.byIndex = (index, item) => index;
1057
+ /**
1058
+ * @deprecated use #track(MyType).by("property") instead.
1059
+ * @param property
1060
+ */
915
1061
  function trackByProperty(property) {
916
1062
  return (index, item) => item[property];
917
1063
  }
918
1064
  TrackBy.trackByProperty = trackByProperty;
1065
+ function track(type) {
1066
+ return {
1067
+ by(property) {
1068
+ return (index, item) => item[property];
1069
+ }
1070
+ };
1071
+ }
1072
+ TrackBy.track = track;
919
1073
  })(TrackBy || (TrackBy = {}));
920
1074
 
921
1075
  class CommandContainer extends GarbageCollector {
@@ -1138,7 +1292,7 @@ EmptyStateComponent.decorators = [
1138
1292
  <ng-content></ng-content>
1139
1293
  </div>
1140
1294
  `,
1141
- styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
1295
+ styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{display:flex;flex-direction:column;align-items:stretch;padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
1142
1296
  },] }
1143
1297
  ];
1144
1298
  EmptyStateComponent.ctorParameters = () => [];
@@ -1222,6 +1376,7 @@ class AbstractInputComponent extends DisposableComponent {
1222
1376
  constructor() {
1223
1377
  super();
1224
1378
  this.onValueEditedListeners = new EventListenerList();
1379
+ this.userFloatLabel = 'always'; // TODO: make this an injectable default
1225
1380
  this.dense = false;
1226
1381
  // TODO: fix this.
1227
1382
  // tslint:disable-next-line:no-output-native
@@ -1753,6 +1908,48 @@ IconComponent.propDecorators = {
1753
1908
  });
1754
1909
  })(IconComponent || (IconComponent = {}));
1755
1910
 
1911
+ class LoadingContainerComponent extends GarbageCollector {
1912
+ constructor() {
1913
+ super();
1914
+ }
1915
+ get state() {
1916
+ return this.loadingModel.value ? "loaded" : "loading";
1917
+ }
1918
+ ngOnInit() {
1919
+ }
1920
+ }
1921
+ LoadingContainerComponent.decorators = [
1922
+ { type: Component, args: [{
1923
+ selector: 'aup-loading-container',
1924
+ template: "<ng-content *ngIf=\"!loadingModel.value\"></ng-content>\n<section *ngIf=\"loadingModel.value\" class=\"loading-indicator-overlay\">\n <div class=\"loading-message\">\n <p>{{messageModel.value}}</p>\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n </div>\n</section>\n",
1925
+ styles: [":host{display:block;position:relative}section.loading-indicator-overlay{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading-message{display:inline-block;text-align:center;width:10em}"]
1926
+ },] }
1927
+ ];
1928
+ LoadingContainerComponent.ctorParameters = () => [];
1929
+ LoadingContainerComponent.propDecorators = {
1930
+ loadingModel: [{ type: Input }],
1931
+ loading: [{ type: Input }],
1932
+ messageModel: [{ type: Input }],
1933
+ message: [{ type: Input }],
1934
+ state: [{ type: HostBinding, args: ["class",] }]
1935
+ };
1936
+ __decorate([
1937
+ TrackExternal(),
1938
+ __metadata("design:type", ValueModel)
1939
+ ], LoadingContainerComponent.prototype, "loadingModel", void 0);
1940
+ __decorate([
1941
+ StoreInValueModel("loadingModel"),
1942
+ __metadata("design:type", Boolean)
1943
+ ], LoadingContainerComponent.prototype, "loading", void 0);
1944
+ __decorate([
1945
+ TrackExternal(),
1946
+ __metadata("design:type", ValueModel)
1947
+ ], LoadingContainerComponent.prototype, "messageModel", void 0);
1948
+ __decorate([
1949
+ StoreInValueModel("messageModel"),
1950
+ __metadata("design:type", String)
1951
+ ], LoadingContainerComponent.prototype, "message", void 0);
1952
+
1756
1953
  class NoopComponent {
1757
1954
  constructor() {
1758
1955
  }
@@ -1780,9 +1977,13 @@ ScrollContainerComponent.decorators = [
1780
1977
  ];
1781
1978
  ScrollContainerComponent.ctorParameters = () => [];
1782
1979
 
1783
- class SectionHeaderComponent {
1980
+ class SectionHeaderComponent extends DisposableComponent {
1784
1981
  constructor() {
1785
- this.underline = false;
1982
+ super();
1983
+ // readonly i18n = I18nMarsUi.components.layout.header;
1984
+ this.size = 'medium';
1985
+ this.borderTop = false;
1986
+ this.borderBottom = false;
1786
1987
  }
1787
1988
  ngOnInit() {
1788
1989
  }
@@ -1790,13 +1991,15 @@ class SectionHeaderComponent {
1790
1991
  SectionHeaderComponent.decorators = [
1791
1992
  { type: Component, args: [{
1792
1993
  selector: 'aup-section-header',
1793
- template: "<ng-content></ng-content>\n",
1794
- styles: [":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));display:block;padding:8px 16px;font-size:12px;line-height:12px;color:rgba(0,0,0,.5)}:host.underline{border-bottom:1px solid var(--def-border-bottom-color)}"]
1994
+ template: "<span class=\"container-start\"><ng-content select=\"[header-start]\"></ng-content><ng-content></ng-content></span>\n<span class=\"container-middle\"><ng-content select=\"[header-center]\"></ng-content></span>\n<span class=\"container-end\"><ng-content select=\"[header-end]\"></ng-content></span>\n",
1995
+ styles: [":host{display:flex;flex-direction:row;align-items:center;--resolved-padding:var(--padding,var(--default-padding));--resolved-padding-right:var(--padding-right,calc(var(--default-padding)/2));padding-left:var(--resolved-padding);padding-right:var(--resolved-padding-right);box-sizing:border-box}:host.has-back-button{padding-left:0}:host.toolbar{height:56px;min-height:56px}:host.toolbar span{font-weight:500;font-size:18px;color:rgba(0,0,0,.67)}:host.large{height:48px;min-height:48px}:host.large span{font-weight:500;font-size:14px;color:rgba(0,0,0,.67)}:host.medium{height:48px;min-height:48px}:host.medium span{font-weight:500;font-size:13px;color:rgba(0,0,0,.67)}:host.small{height:30px;min-height:30px}:host.small span{font-weight:300;font-size:12px;color:rgba(0,0,0,.67)}:host.border-top{border-top:var(--pinstripe-border)}:host.border-bottom{border-bottom:var(--pinstripe-border)}span{white-space:nowrap;display:inline-flex;flex-direction:row;align-items:center}span.container-start{justify-content:flex-start}span.container-middle{justify-content:center;flex:1;width:0;overflow:hidden}span.container-end{justify-content:flex-end}"]
1795
1996
  },] }
1796
1997
  ];
1797
1998
  SectionHeaderComponent.ctorParameters = () => [];
1798
1999
  SectionHeaderComponent.propDecorators = {
1799
- underline: [{ type: Input }, { type: HostBinding, args: ['class.underline',] }]
2000
+ size: [{ type: Input }, { type: HostBinding, args: ['class',] }],
2001
+ borderTop: [{ type: Input }, { type: HostBinding, args: ['class.border-top',] }],
2002
+ borderBottom: [{ type: Input }, { type: HostBinding, args: ['class.border-bottom',] }]
1800
2003
  };
1801
2004
 
1802
2005
  class SwitchCaseOption {
@@ -3514,15 +3717,15 @@ class TreeExpansionModel {
3514
3717
 
3515
3718
  class FlattenedTreeListModel extends ComputedListModel {
3516
3719
  constructor(source, childRef, expansionModel) {
3517
- super(source);
3720
+ super(source, {
3721
+ initialValue: [],
3722
+ identifiedWith: row => source.identityOf(row)
3723
+ });
3518
3724
  this.source = source;
3519
3725
  this.childRef = childRef;
3520
3726
  this.expansionModel = expansionModel;
3521
3727
  this.trackSource(expansionModel.isExpandedPredicate);
3522
3728
  }
3523
- getIdentityOf(item) {
3524
- return this.source.identityOf(item);
3525
- }
3526
3729
  compute(values) {
3527
3730
  const result = [];
3528
3731
  values.forEach(rootNode => {
@@ -3593,6 +3796,7 @@ class TreeTableModel extends AbstractTableModel {
3593
3796
  const childExtractor = _.isFunction(childAccessor) ? childAccessor : row => row[childAccessor];
3594
3797
  this.flattenedDataSource = this.registerDisposable(new FlattenedTreeListModel(source, childExtractor, this.treeExpansionModel));
3595
3798
  this.setDataSource(this.flattenedDataSource);
3799
+ this.addRowClass('aup-node-collapsed', row => this.isCollapsed(row));
3596
3800
  }
3597
3801
  treeControlColumn(builder) {
3598
3802
  const columnId = 'tree-label';
@@ -3918,6 +4122,26 @@ __decorate([
3918
4122
  __metadata("design:type", PageController)
3919
4123
  ], PaginatorComponent.prototype, "pageController", void 0);
3920
4124
 
4125
+ class LabelledValueComponent extends DisposableComponent {
4126
+ constructor() {
4127
+ super();
4128
+ // const {chain} = Dsl.disposeWith(this);
4129
+ }
4130
+ ngOnInit() {
4131
+ }
4132
+ }
4133
+ LabelledValueComponent.decorators = [
4134
+ { type: Component, args: [{
4135
+ selector: 'aup-labelled-value',
4136
+ template: "<label>{{label}}</label>\n<ng-content></ng-content>\n",
4137
+ styles: [":host{display:inline-flex;flex-direction:column;align-items:flex-start}label{font-weight:400;font-size:12px;color:rgba(0,0,0,.57);margin-bottom:6px;white-space:nowrap}"]
4138
+ },] }
4139
+ ];
4140
+ LabelledValueComponent.ctorParameters = () => [];
4141
+ LabelledValueComponent.propDecorators = {
4142
+ label: [{ type: Input }]
4143
+ };
4144
+
3921
4145
  class ComponentsModule {
3922
4146
  constructor(faIconLibrary) {
3923
4147
  faIconLibrary.addIconPacks(fas);
@@ -3925,6 +4149,29 @@ class ComponentsModule {
3925
4149
  }
3926
4150
  ComponentsModule.decorators = [
3927
4151
  { type: NgModule, args: [{
4152
+ imports: [
4153
+ CommonModule,
4154
+ BrowserAnimationsModule,
4155
+ FormsModule,
4156
+ MatInputModule,
4157
+ MatFormFieldModule,
4158
+ MatSelectModule,
4159
+ MatTabsModule,
4160
+ DirectivesModule,
4161
+ MatIconModule,
4162
+ MatButtonModule,
4163
+ MatCheckboxModule,
4164
+ MatTableModule,
4165
+ PortalModule,
4166
+ CdkScrollableModule,
4167
+ FontAwesomeModule,
4168
+ MatTooltipModule,
4169
+ MatAutocompleteModule,
4170
+ MatMenuModule,
4171
+ MatDividerModule,
4172
+ MatProgressSpinnerModule,
4173
+ MatProgressBarModule
4174
+ ],
3928
4175
  declarations: [
3929
4176
  AbstractInputComponent,
3930
4177
  AbstractValueInputComponent,
@@ -3973,29 +4220,11 @@ ComponentsModule.decorators = [
3973
4220
  BusyOverlayComponent,
3974
4221
  EmptyStateComponent,
3975
4222
  PaginatorComponent,
3976
- AbstractTableComponent
3977
- ],
3978
- imports: [
3979
- CommonModule,
3980
- BrowserAnimationsModule,
3981
- FormsModule,
3982
- MatInputModule,
3983
- MatFormFieldModule,
3984
- MatSelectModule,
3985
- MatTabsModule,
3986
- DirectivesModule,
3987
- MatIconModule,
3988
- MatButtonModule,
3989
- MatCheckboxModule,
3990
- MatTableModule,
3991
- PortalModule,
3992
- CdkScrollableModule,
3993
- FontAwesomeModule,
3994
- MatTooltipModule,
3995
- MatAutocompleteModule,
3996
- MatMenuModule,
3997
- MatDividerModule,
3998
- MatProgressSpinnerModule
4223
+ AbstractTableComponent,
4224
+ AbstractCardContainerComponent,
4225
+ CardStackComponent,
4226
+ LabelledValueComponent,
4227
+ LoadingContainerComponent
3999
4228
  ],
4000
4229
  exports: [
4001
4230
  NumberInputComponent,
@@ -4032,6 +4261,9 @@ ComponentsModule.decorators = [
4032
4261
  BusyOverlayComponent,
4033
4262
  EmptyStateComponent,
4034
4263
  PaginatorComponent,
4264
+ CardStackComponent,
4265
+ LabelledValueComponent,
4266
+ LoadingContainerComponent,
4035
4267
  ],
4036
4268
  providers: [
4037
4269
  FocusBindingFactory
@@ -4067,7 +4299,8 @@ class ActivityActionsComponent extends DisposableComponent {
4067
4299
  constructor(cdr) {
4068
4300
  super();
4069
4301
  this.cdr = cdr;
4070
- this.align = 'stretch';
4302
+ this.layout = ActivityActionsComponent.Layout.BLOCK;
4303
+ this.align = ActivityActionsComponent.Align.STRETCH;
4071
4304
  }
4072
4305
  set faces(faces) {
4073
4306
  this.confirmFace = faces.confirm;
@@ -4079,12 +4312,6 @@ class ActivityActionsComponent extends DisposableComponent {
4079
4312
  set style(style) {
4080
4313
  this.faces = style;
4081
4314
  }
4082
- get alignEnd() {
4083
- return this.align === 'end';
4084
- }
4085
- get alignStretch() {
4086
- return this.align === 'stretch';
4087
- }
4088
4315
  ngOnInit() {
4089
4316
  }
4090
4317
  hasConfirmFace() {
@@ -4103,7 +4330,7 @@ ActivityActionsComponent.decorators = [
4103
4330
  { type: Component, args: [{
4104
4331
  selector: 'aup-activity-actions',
4105
4332
  template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n",
4106
- styles: [":host{display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]
4333
+ styles: [":host{display:grid;grid-template-rows:auto;align-items:center;justify-content:end;--resolved-activity-actions-gap:var(--activity-actions-gap,8px)}:host[layout=block][align=start]{grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr}:host[layout=block][align=start] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=end]{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host[layout=block][align=end] .confirm{margin-left:var(--resolved-activity-actions-gap)}:host[layout=block][align=stretch]{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}:host[layout=inline]{grid-template-areas:\"confirm cancel content\";grid-template-columns:auto auto 1fr}:host[layout=inline] .cancel{margin-left:var(--resolved-activity-actions-gap)}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.content{grid-area:content;text-align:left}"]
4107
4334
  },] }
4108
4335
  ];
4109
4336
  ActivityActionsComponent.ctorParameters = () => [
@@ -4116,9 +4343,8 @@ ActivityActionsComponent.propDecorators = {
4116
4343
  confirmFace: [{ type: Input }],
4117
4344
  cancelFace: [{ type: Input }],
4118
4345
  style: [{ type: Input }],
4119
- align: [{ type: Input }],
4120
- alignEnd: [{ type: HostBinding, args: ['class.align-end',] }],
4121
- alignStretch: [{ type: HostBinding, args: ['class.align-stretch',] }]
4346
+ layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
4347
+ align: [{ type: Input }, { type: HostBinding, args: ['attr.align',] }]
4122
4348
  };
4123
4349
  __decorate([
4124
4350
  TrackExternal(),
@@ -4128,6 +4354,17 @@ __decorate([
4128
4354
  TrackExternal(),
4129
4355
  __metadata("design:type", Command)
4130
4356
  ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
4357
+ (function (ActivityActionsComponent) {
4358
+ ActivityActionsComponent.Layout = Enum({
4359
+ INLINE: 'inline',
4360
+ BLOCK: 'block'
4361
+ });
4362
+ ActivityActionsComponent.Align = Enum({
4363
+ START: 'start',
4364
+ END: 'end',
4365
+ STRETCH: 'stretch'
4366
+ });
4367
+ })(ActivityActionsComponent || (ActivityActionsComponent = {}));
4131
4368
 
4132
4369
  const ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
4133
4370
  class Activity extends DisposableComponent {
@@ -4646,7 +4883,7 @@ class ActivityContainerComponent extends AbstractInteractionContext {
4646
4883
  ActivityContainerComponent.decorators = [
4647
4884
  { type: Component, args: [{
4648
4885
  selector: 'aup-activity-container',
4649
- template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\">\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n",
4886
+ template: "<mat-tab-group #tabs no-tab-header\n [dynamicHeight]=\"dynamicHeight\"\n [class.full-height-tabs]=\"!dynamicHeight\">\n <mat-tab *ngFor=\"let activityRef of activityRefs; let i = index; trackBy: activityIndex\">\n <aup-busy-overlay [busyModel]=\"busy\" cdkTrapFocus cdkTrapFocusAutoCapture>\n <!--\n We have issues where angular is triggering a leave animation when an\n new activity is started, but is not running the enter animation\n when it is scrolled back into view. So we track the tab changes and\n disable all animations inside the tab while we're animating.\n -->\n <div class=\"activity-outlet-wrapper\" [@.disabled]=\"!activityRef.focused\">\n <aup-activity-outlet [nestedInteractionContext]=\"this\" [activityRef]=\"activityRef\"></aup-activity-outlet>\n </div>\n </aup-busy-overlay>\n </mat-tab>\n</mat-tab-group>\n",
4650
4887
  styles: [":host{display:flex;flex-direction:column}aup-busy-overlay,mat-tab-group{flex:1}"]
4651
4888
  },] }
4652
4889
  ];
@@ -4725,6 +4962,9 @@ class AbstractActivityTriggerComponent extends DisposableComponent {
4725
4962
  });
4726
4963
  });
4727
4964
  }
4965
+ get interactionContext() {
4966
+ return lang$1.abstractMethod(this.constructor);
4967
+ }
4728
4968
  ngOnInit() {
4729
4969
  }
4730
4970
  get isActive() {
@@ -4946,7 +5186,10 @@ InteractionService.ctorParameters = () => [
4946
5186
  class ModalActivityTriggerComponent extends AbstractActivityTriggerComponent {
4947
5187
  constructor(interactionService) {
4948
5188
  super();
4949
- this.interactionContext = interactionService.createModalInteractionContextDisposedWith(this);
5189
+ this._interactionContext = interactionService.createModalInteractionContextDisposedWith(this);
5190
+ }
5191
+ get interactionContext() {
5192
+ return this._interactionContext;
4950
5193
  }
4951
5194
  }
4952
5195
  ModalActivityTriggerComponent.decorators = [
@@ -4986,6 +5229,9 @@ class InPlaceInteractionContextComponent extends DisposableComponent {
4986
5229
  var _a;
4987
5230
  return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : '0ms';
4988
5231
  }
5232
+ get active() {
5233
+ return this.isActive();
5234
+ }
4989
5235
  ngAfterViewInit() {
4990
5236
  this.interactionService.registerInplaceInteractionContext(this);
4991
5237
  }
@@ -5030,8 +5276,80 @@ InPlaceInteractionContextComponent.ctorParameters = () => [
5030
5276
  ];
5031
5277
  InPlaceInteractionContextComponent.propDecorators = {
5032
5278
  activityContainerComponent: [{ type: ViewChild, args: ['activityContainer', { static: true },] }],
5033
- animateFirstActivity: [{ type: Input }]
5279
+ animateFirstActivity: [{ type: Input }],
5280
+ active: [{ type: HostBinding, args: ["class.active",] }]
5281
+ };
5282
+
5283
+ /**
5284
+ *
5285
+ */
5286
+ class AddCardActivityComponent extends AbstractActivityTriggerComponent {
5287
+ constructor(interactionService) {
5288
+ super();
5289
+ this.interactionStyle = AddCardActivityComponent.InteractionType.MODAL;
5290
+ this.renderAs = AddCardActivityComponent.RenderAs.CARD;
5291
+ this.notCard = true;
5292
+ const { chain } = Dsl.disposeWith(this);
5293
+ this.modalInteractionContext = interactionService.createModalInteractionContextDisposedWith(this);
5294
+ this.faceList = chain(this.faceModel).mapToList(face => [face]);
5295
+ }
5296
+ get renderAsClass() {
5297
+ return `render-as-${this.renderAs}`;
5298
+ }
5299
+ get activityTypeClass() {
5300
+ return `${this.interactionStyle}-activity`;
5301
+ }
5302
+ isRenderAsCard() {
5303
+ return this.renderAs === 'card';
5304
+ }
5305
+ isRenderAsButton() {
5306
+ return this.renderAs === 'button';
5307
+ }
5308
+ ngOnInit() {
5309
+ }
5310
+ get interactionContext() {
5311
+ switch (this.interactionStyle) {
5312
+ case 'inline':
5313
+ return this.inlineInteractionContext;
5314
+ default:
5315
+ return this.modalInteractionContext;
5316
+ }
5317
+ }
5318
+ isModal() {
5319
+ return this.interactionStyle === 'modal';
5320
+ }
5321
+ isInline() {
5322
+ return this.interactionStyle === 'inline';
5323
+ }
5324
+ }
5325
+ AddCardActivityComponent.decorators = [
5326
+ { type: Component, args: [{
5327
+ selector: 'aup-add-card-activity',
5328
+ template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\" [pectinCommand]=\"startActivityCommand\">\n <aup-command *ngIf=\"isRenderAsButton()\" [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n <section *ngIf=\"isRenderAsCard()\" class=\"face-wrapper\">\n <aup-command-face class=\"mat-button\" [faces]=\"faceList.value\"></aup-command-face>\n </section>\n</aup-in-place-interaction-context>\n",
5329
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;background-color:#fff}:host[interactionStyle=inline][renderas=card]:not(.active){transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}:host[interactionStyle=inline][renderas=card]:not(.active):hover{border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host[interactionStyle=modal][renderas=card]{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:hsla(0,0%,100%,.8)}:host[interactionStyle=modal][renderas=card]:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}:host[interactionStyle=modal][renderas=card]:hover{border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}:host-context(aup-card-container)[renderas=button]{align-self:start}section.face-wrapper{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}aup-in-place-interaction-context{flex:1}aup-in-place-interaction-context.active{border:3px solid #6273c7;border-radius:4px;overflow:hidden}"]
5330
+ },] }
5331
+ ];
5332
+ AddCardActivityComponent.ctorParameters = () => [
5333
+ { type: InteractionService }
5334
+ ];
5335
+ AddCardActivityComponent.propDecorators = {
5336
+ inlineInteractionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }],
5337
+ interactionStyle: [{ type: Input }],
5338
+ renderAs: [{ type: Input }, { type: HostBinding, args: ['class',] }],
5339
+ notCard: [{ type: HostBinding, args: ['class.not-card',] }],
5340
+ renderAsClass: [{ type: HostBinding, args: ['class',] }],
5341
+ activityTypeClass: [{ type: HostBinding, args: ['class',] }]
5034
5342
  };
5343
+ (function (AddCardActivityComponent) {
5344
+ AddCardActivityComponent.InteractionType = Enum({
5345
+ MODAL: 'modal',
5346
+ INLINE: 'inline'
5347
+ });
5348
+ AddCardActivityComponent.RenderAs = Enum({
5349
+ CARD: 'card',
5350
+ BUTTON: 'button'
5351
+ });
5352
+ })(AddCardActivityComponent || (AddCardActivityComponent = {}));
5035
5353
 
5036
5354
  /**
5037
5355
  * Css Vars.
@@ -5094,6 +5412,9 @@ class InlineActivityTriggerComponent extends AbstractActivityTriggerComponent {
5094
5412
  constructor() {
5095
5413
  super();
5096
5414
  }
5415
+ get interactionContext() {
5416
+ return this._interactionContext;
5417
+ }
5097
5418
  }
5098
5419
  InlineActivityTriggerComponent.decorators = [
5099
5420
  { type: Component, args: [{
@@ -5104,7 +5425,7 @@ InlineActivityTriggerComponent.decorators = [
5104
5425
  ];
5105
5426
  InlineActivityTriggerComponent.ctorParameters = () => [];
5106
5427
  InlineActivityTriggerComponent.propDecorators = {
5107
- interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }]
5428
+ _interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }]
5108
5429
  };
5109
5430
 
5110
5431
  /**
@@ -5135,6 +5456,7 @@ class PopupInteractionContextComponent extends DisposableComponent {
5135
5456
  const self = this;
5136
5457
  const overlayRef = this._overlay.create({
5137
5458
  hasBackdrop: false,
5459
+ disposeOnNavigation: true,
5138
5460
  panelClass: 'aup-popup-interaction-panel',
5139
5461
  positionStrategy: this._overlay.position()
5140
5462
  .flexibleConnectedTo(this._element)
@@ -5265,44 +5587,93 @@ InteractionContextTriggerFor.propDecorators = {
5265
5587
  // @see https://github.com/ng-packagr/ng-packagr/issues/641 and https://github.com/angular/angular/issues/21123
5266
5588
  // we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)
5267
5589
  // @dynamic
5268
- class AbstractInputActivity extends Activity {
5590
+ class InputActivity extends Activity {
5269
5591
  constructor(data) {
5592
+ var _a, _b;
5270
5593
  super();
5271
5594
  this.data = data;
5272
5595
  this.class = 'aup-input-activity';
5273
5596
  const form = new DirtyTrackingForm();
5274
5597
  this.valueModel = form.valueModel(this.data.initialValue);
5275
5598
  this.valueModel.validateUsing(data.validators || []);
5276
- this.confirmCommand = Command.create(() => {
5599
+ // TODO: move to global configuration
5600
+ this.confirmFace = (_a = data.confirmFace) !== null && _a !== void 0 ? _a : {
5601
+ icon: () => 'mat:check'
5602
+ };
5603
+ this.cancelFace = (_b = data.cancelFace) !== null && _b !== void 0 ? _b : {
5604
+ icon: () => 'mat:clear'
5605
+ };
5606
+ this.confirmCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
5277
5607
  if (this.valueModel.validate()) {
5278
5608
  if (data.save) {
5279
- return Promise.resolve(data.save(this.valueModel, this.interactionContext))
5280
- .then(() => this.done());
5609
+ const self = this;
5610
+ try {
5611
+ let allGood = true;
5612
+ const result = yield data.save(this.valueModel.value, {
5613
+ injectError(error) {
5614
+ allGood = false;
5615
+ self.valueModel.injectErrors([error]);
5616
+ }
5617
+ });
5618
+ if (allGood) {
5619
+ this.done(this.valueModel.value);
5620
+ }
5621
+ }
5622
+ catch (e) {
5623
+ console.error(e);
5624
+ }
5281
5625
  }
5282
5626
  else {
5283
5627
  this.done(this.valueModel.value);
5284
5628
  }
5285
5629
  }
5286
- });
5630
+ }));
5287
5631
  this.cancelCommand = Command.create(() => {
5288
5632
  this.cancel();
5289
5633
  });
5634
+ this.busyWhile(this.confirmCommand.busy);
5635
+ }
5636
+ get layout() {
5637
+ var _a, _b;
5638
+ return (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.layout) !== null && _b !== void 0 ? _b : InputActivity.Layout.BLOCK;
5290
5639
  }
5291
5640
  onActivityReady() {
5292
5641
  this.valueModel.focusContext.requestFocus();
5293
5642
  }
5643
+ get additionalCssClassName() {
5644
+ var _a;
5645
+ return (_a = this.data.cssClassName) !== null && _a !== void 0 ? _a : '';
5646
+ }
5647
+ onEscape() {
5648
+ if (this.shouldCancelOnEscape() && this.cancelCommand.enabled.value) {
5649
+ this.cancelCommand.execute();
5650
+ }
5651
+ }
5652
+ shouldCancelOnEscape() {
5653
+ return _.isNil(this.data.cancelOnEscape) // we default to true..
5654
+ || this.data.cancelOnEscape;
5655
+ }
5294
5656
  }
5295
- AbstractInputActivity.decorators = [
5657
+ InputActivity.decorators = [
5296
5658
  { type: Component, args: [{ template: `` },] }
5297
5659
  ];
5298
- AbstractInputActivity.ctorParameters = () => [
5660
+ InputActivity.ctorParameters = () => [
5299
5661
  { type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
5300
5662
  ];
5301
- AbstractInputActivity.propDecorators = {
5302
- class: [{ type: HostBinding, args: ['class',] }]
5663
+ InputActivity.propDecorators = {
5664
+ class: [{ type: HostBinding, args: ['class',] }],
5665
+ layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
5666
+ additionalCssClassName: [{ type: HostBinding, args: ["class",] }],
5667
+ onEscape: [{ type: HostListener, args: ['keydown.escape',] }]
5303
5668
  };
5669
+ (function (InputActivity) {
5670
+ InputActivity.Layout = Enum({
5671
+ INLINE: 'inline',
5672
+ BLOCK: 'block'
5673
+ });
5674
+ })(InputActivity || (InputActivity = {}));
5304
5675
 
5305
- class StringInputActivity extends AbstractInputActivity {
5676
+ class StringInputActivity extends InputActivity {
5306
5677
  }
5307
5678
  StringInputActivity.decorators = [
5308
5679
  { type: Component, args: [{
@@ -5313,13 +5684,15 @@ StringInputActivity.decorators = [
5313
5684
  [placeholder]="data.placeholder"
5314
5685
  [command.enter]="confirmCommand"
5315
5686
  [command.escape]="cancelCommand"></aup-string-input>
5316
- <aup-activity-actions align="end"
5317
- [faces]="data.buttonStyle"></aup-activity-actions>
5687
+ <aup-activity-actions [layout]="layout" align="end"
5688
+ [confirmFace]="confirmFace"
5689
+ [cancelFace]="cancelFace"
5690
+ ></aup-activity-actions>
5318
5691
  `
5319
5692
  },] }
5320
5693
  ];
5321
5694
 
5322
- class SelectInputActivity extends AbstractInputActivity {
5695
+ class SelectInputActivity extends InputActivity {
5323
5696
  constructor() {
5324
5697
  super(...arguments);
5325
5698
  this.defaultOptionLabelFormat = (option) => {
@@ -5347,7 +5720,9 @@ SelectInputActivity.decorators = [
5347
5720
  [options]="options"
5348
5721
  [optionLabelFormat]="optionLabelFormat"
5349
5722
  ></aup-select-input>
5350
- <aup-activity-actions align="end" [faces]="data.buttonStyle"
5723
+ <aup-activity-actions [layout]="layout" align="end"
5724
+ [confirmFace]="confirmFace"
5725
+ [cancelFace]="cancelFace"
5351
5726
  ></aup-activity-actions>
5352
5727
  `
5353
5728
  },] }
@@ -5489,6 +5864,9 @@ class PopupActivityTriggerComponent extends AbstractActivityTriggerComponent {
5489
5864
  this.anchorX = 'start';
5490
5865
  this.anchorY = 'bottom';
5491
5866
  }
5867
+ get interactionContext() {
5868
+ return this._interactionContext;
5869
+ }
5492
5870
  }
5493
5871
  PopupActivityTriggerComponent.decorators = [
5494
5872
  { type: Component, args: [{
@@ -5501,9 +5879,208 @@ PopupActivityTriggerComponent.ctorParameters = () => [];
5501
5879
  PopupActivityTriggerComponent.propDecorators = {
5502
5880
  anchorX: [{ type: Input }],
5503
5881
  anchorY: [{ type: Input }],
5504
- interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
5882
+ _interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
5505
5883
  };
5506
5884
 
5885
+ class InlineEditorModel extends GarbageCollector {
5886
+ constructor(valueModel, saveCallback) {
5887
+ super();
5888
+ this.valueModel = valueModel;
5889
+ this.saveCallback = saveCallback;
5890
+ this.editing = new MutableValueModel(false);
5891
+ this._validators = new MutableListModel();
5892
+ this._editingEnabled = this.registerDisposable(new DelegatingValueModel().withDefault(true));
5893
+ assert.notNil(valueModel);
5894
+ const { when } = Dsl.disposeWith(this);
5895
+ when(this.editingEnabled).becomesFalsey(() => this.cancelEdit());
5896
+ }
5897
+ get editingEnabled() {
5898
+ return this._editingEnabled.readonly;
5899
+ }
5900
+ disableWhile(condition) {
5901
+ const { chain } = Dsl.disposeWith(this);
5902
+ this.enableWhile(chain(condition).isFalsey());
5903
+ return this;
5904
+ }
5905
+ enableWhile(condition) {
5906
+ this._editingEnabled.setDelegate(condition);
5907
+ return this;
5908
+ }
5909
+ get validators() {
5910
+ return this._validators.readonly;
5911
+ }
5912
+ validateUsing(validator) {
5913
+ this._validators.push(validator);
5914
+ return this;
5915
+ }
5916
+ isEditing() {
5917
+ return this.editing.value;
5918
+ }
5919
+ cancelEdit() {
5920
+ this.editing.value = false;
5921
+ }
5922
+ startEditing() {
5923
+ this.editing.value = true;
5924
+ }
5925
+ }
5926
+ (function (InlineEditorModel) {
5927
+ function create(valueModel, options) {
5928
+ return new InlineEditorModel(valueModel, options.save);
5929
+ }
5930
+ InlineEditorModel.create = create;
5931
+ })(InlineEditorModel || (InlineEditorModel = {}));
5932
+ TrackExternal.oneTimeBinding(InlineEditorModel);
5933
+
5934
+ /**
5935
+ * @example
5936
+ * const source: ValueModel<string> = ...;
5937
+ * const model = InlineEditorModel.create(source, {
5938
+ * save(updated:string, context: EditContext) => {
5939
+ * try {
5940
+ * try and save the thing...
5941
+ * } catch(error) {
5942
+ * context.injectError(error)
5943
+ * }
5944
+ * }).validateUsing(Validator.present("We'll need a value");
5945
+ *
5946
+ * # in the view
5947
+ * <aup-inline-string-editor
5948
+ * label="My field"
5949
+ * placeHolder="I'm ready for a string..."
5950
+ * [editorModel]="model"></aup-inline-string-editor>
5951
+ */
5952
+ class InlineStringEditorComponent extends DisposableComponent {
5953
+ constructor(interactionService) {
5954
+ super();
5955
+ this.editingEnabled = this.registerDisposable(new DelegatingValueModel());
5956
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
5957
+ const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
5958
+ const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
5959
+ return Object.assign(Object.assign({}, InlineStringEditorComponent.DEFAULT_FACES), userFaces);
5960
+ }, { allowNil: true });
5961
+ this.editFaceModel = resolvedFacesModel.pluck('edit');
5962
+ this.saveFace = resolvedFacesModel.pluck('save');
5963
+ this.cancelFace = resolvedFacesModel.pluck('cancel');
5964
+ const self = this;
5965
+ this.editCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
5966
+ this.editorModel.editing.value = true;
5967
+ try {
5968
+ yield this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());
5969
+ }
5970
+ catch (e) {
5971
+ // don't care if they cancelled, just hiding the console errors
5972
+ }
5973
+ finally {
5974
+ this.editorModel.editing.value = false;
5975
+ }
5976
+ })).enableWhile(this.editingEnabled);
5977
+ this.onDispose(() => this.cancelEdit());
5978
+ }
5979
+ ngOnInit() {
5980
+ // our editor model is a one time binding without delegates so we can only
5981
+ // use it once we've been initialised
5982
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
5983
+ if (!this.editorModel) {
5984
+ lang$1.illegalState('editorModel is required');
5985
+ }
5986
+ this.editingEnabled.setDelegate(this.editorModel.editingEnabled);
5987
+ when(this.editorModel.editing).becomesTruthy(() => {
5988
+ this.editCommand.execute();
5989
+ }, { asLongAs: this.editCommand.enabled });
5990
+ when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
5991
+ this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
5992
+ // deviceDescription.isNil()
5993
+ ).areTruthy();
5994
+ this.displayValue = chain(this.editorModel.valueModel).map(v => {
5995
+ return _.isEmpty(v) ? this.placeHolderModel.value : v;
5996
+ }, { dependsOn: this.placeHolderModel, allowNil: true });
5997
+ }
5998
+ createInputActivityData() {
5999
+ const self = this;
6000
+ return {
6001
+ initialValue: self.editorModel.valueModel.value,
6002
+ confirmFace: self.saveFace.value,
6003
+ cancelFace: self.cancelFace.value,
6004
+ placeholder: self.placeHolderModel.value,
6005
+ label: self.label,
6006
+ layout: InputActivity.Layout.INLINE,
6007
+ validators: self.editorModel.validators.value,
6008
+ save(value, inputContext) {
6009
+ return __awaiter(this, void 0, void 0, function* () {
6010
+ yield self.editorModel.saveCallback(value, inputContext);
6011
+ });
6012
+ }
6013
+ };
6014
+ }
6015
+ cancelEdit() {
6016
+ if (this.isEditing()) {
6017
+ this.interactionContext.cancelActiveActivity();
6018
+ }
6019
+ }
6020
+ startEdit() {
6021
+ if (!this.isEditing() && this.editCommand.enabled.value) {
6022
+ this.editCommand.execute();
6023
+ }
6024
+ }
6025
+ isEditing() {
6026
+ return this.interactionContext.isActive();
6027
+ }
6028
+ isEmpty() {
6029
+ return this.empty.value;
6030
+ }
6031
+ }
6032
+ InlineStringEditorComponent.decorators = [
6033
+ { type: Component, args: [{
6034
+ selector: 'aup-inline-string-editor',
6035
+ template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
6036
+ },] }
6037
+ ];
6038
+ InlineStringEditorComponent.ctorParameters = () => [
6039
+ { type: InteractionService }
6040
+ ];
6041
+ InlineStringEditorComponent.propDecorators = {
6042
+ editorModel: [{ type: Input }],
6043
+ facesModel: [{ type: Input }],
6044
+ faces: [{ type: Input }],
6045
+ interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent,] }],
6046
+ label: [{ type: Input }],
6047
+ placeHolder: [{ type: Input }],
6048
+ placeHolderModel: [{ type: Input }]
6049
+ };
6050
+ __decorate([
6051
+ TrackExternal(),
6052
+ __metadata("design:type", InlineEditorModel)
6053
+ ], InlineStringEditorComponent.prototype, "editorModel", void 0);
6054
+ __decorate([
6055
+ TrackExternal(),
6056
+ __metadata("design:type", ValueModel)
6057
+ ], InlineStringEditorComponent.prototype, "facesModel", void 0);
6058
+ __decorate([
6059
+ StoreInValueModel('facesModel'),
6060
+ __metadata("design:type", Object)
6061
+ ], InlineStringEditorComponent.prototype, "faces", void 0);
6062
+ __decorate([
6063
+ StoreInValueModel('placeHolderModel'),
6064
+ __metadata("design:type", String)
6065
+ ], InlineStringEditorComponent.prototype, "placeHolder", void 0);
6066
+ __decorate([
6067
+ TrackExternal(),
6068
+ __metadata("design:type", ValueModel)
6069
+ ], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
6070
+ (function (InlineStringEditorComponent) {
6071
+ InlineStringEditorComponent.DEFAULT_FACES = {
6072
+ edit: {
6073
+ icon: () => 'mat:edit'
6074
+ },
6075
+ save: {
6076
+ icon: () => 'mat:check'
6077
+ },
6078
+ cancel: {
6079
+ icon: () => 'mat:clear'
6080
+ }
6081
+ };
6082
+ })(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
6083
+
5507
6084
  class InteractionModule {
5508
6085
  }
5509
6086
  InteractionModule.decorators = [
@@ -5519,7 +6096,11 @@ InteractionModule.decorators = [
5519
6096
  DirectivesModule,
5520
6097
  FlexModule,
5521
6098
  GridModule,
5522
- ComponentsModule
6099
+ ComponentsModule,
6100
+ FormsModule,
6101
+ MatInputModule,
6102
+ MatFormFieldModule,
6103
+ A11yModule
5523
6104
  ],
5524
6105
  declarations: [
5525
6106
  ActivityContainerComponent,
@@ -5533,7 +6114,7 @@ InteractionModule.decorators = [
5533
6114
  PopupInteractionContextComponent,
5534
6115
  StringInputActivity,
5535
6116
  SelectInputActivity,
5536
- AbstractInputActivity,
6117
+ InputActivity,
5537
6118
  InteractionContextTriggerFor,
5538
6119
  Activity,
5539
6120
  ActivityTitleComponent,
@@ -5542,7 +6123,9 @@ InteractionModule.decorators = [
5542
6123
  AbstractActivityTriggerComponent,
5543
6124
  PopupActivityTriggerComponent,
5544
6125
  InlineActivityTriggerComponent,
5545
- ModalActivityTriggerComponent
6126
+ ModalActivityTriggerComponent,
6127
+ AddCardActivityComponent,
6128
+ InlineStringEditorComponent,
5546
6129
  ],
5547
6130
  exports: [
5548
6131
  ActivityContainerComponent,
@@ -5558,7 +6141,9 @@ InteractionModule.decorators = [
5558
6141
  ActivityBodyComponent,
5559
6142
  PopupActivityTriggerComponent,
5560
6143
  InlineActivityTriggerComponent,
5561
- ModalActivityTriggerComponent
6144
+ ModalActivityTriggerComponent,
6145
+ AddCardActivityComponent,
6146
+ InlineStringEditorComponent,
5562
6147
  ],
5563
6148
  entryComponents: [
5564
6149
  ActivityContainerComponent,
@@ -5839,16 +6424,27 @@ class PlaceComponent extends DisposableComponent {
5839
6424
  when(this._active).becomesTruthy(() => this._notifyPlaceReady());
5840
6425
  this.childPlaces = this.placeDefinition.children.map(d => d.component);
5841
6426
  }
5842
- // @Trace()
5843
6427
  initialiseVisit(visit, notifyVisitChanged) {
5844
6428
  assert.isNil(this.visitModel.value);
5845
6429
  const { when } = Dsl.disposeWith(this);
5846
6430
  this.visitModel.value = visit;
5847
6431
  DebugContext.getOrCreate(this.visitModel).tag(`${this.placeDefinition.component.name}.visitModel`);
5848
- this.placeDefinition.getVisitParameterDefs().forEach(parameterDef => this.installBinding(parameterDef));
6432
+ // we track if the any of the bindings updated the route. If so we remember it and update the
6433
+ // route in one go at the end.
6434
+ this.placeDefinition
6435
+ .getVisitParameterDefs()
6436
+ .forEach(parameterDef => this.installAndInitialiseBinding(visit, parameterDef));
5849
6437
  when(this.visitModel).changes((current, previous) => {
5850
6438
  notifyVisitChanged(current, previous);
5851
6439
  }, { unless: this._inVisitUpdate });
6440
+ // TODO: this needs to do a replace url option so that the new url isn't put in the history.... for
6441
+ // now we're not doing it as it's a fair bit of effort and will only affect people if they're
6442
+ // cutting and pasting urls to each other.
6443
+ // // the binding process can update the visit (e.g. if a selection model has already selected during
6444
+ // // component construction) and there was no value specified in the route
6445
+ // if (visit.hasRoutingChangedFrom(this.visitModel.value)) {
6446
+ // notifyVisitChanged(this.visitModel.value, visit)
6447
+ // }
5852
6448
  }
5853
6449
  updateVisit(visit) {
5854
6450
  assert.isTruthy(this.isInitialised());
@@ -5861,7 +6457,12 @@ class PlaceComponent extends DisposableComponent {
5861
6457
  return !!this.visitModel.value;
5862
6458
  }
5863
6459
  // @Trace()
5864
- installBinding(parameterDef) {
6460
+ /**
6461
+ * Initialised the component bindings. If any binding has an initial model value (e.g. a selection model
6462
+ * initialised during the constructor) and the route has nothing, then the visit will be udpated and this
6463
+ * method will return ture to nofiy the the visit has changed.
6464
+ */
6465
+ installAndInitialiseBinding(initialVisit, parameterDef) {
5865
6466
  const model = this[parameterDef.propertyName];
5866
6467
  DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);
5867
6468
  const binding = this.registerDisposable(new Binding(this.visitModel, model, {
@@ -5875,7 +6476,17 @@ class PlaceComponent extends DisposableComponent {
5875
6476
  return currentVisit.replace(parameterDef, value);
5876
6477
  }
5877
6478
  }));
5878
- binding.writeRight();
6479
+ // Now we need to initialise the binding direction. If we have a value in the Url then we should always push
6480
+ // that to the view. If we don't and the view already has a value (e.g. a selection model has already initialised in the
6481
+ // component constructor) then we should push that to the route.
6482
+ const isInVisit = !_.isNil(initialVisit.getParameterValue(parameterDef));
6483
+ const isInModel = !_.isNil(model.value);
6484
+ if (!isInVisit && isInModel) {
6485
+ binding.writeLeft(); // push it to the route
6486
+ }
6487
+ else {
6488
+ binding.writeRight(); // push it to the model
6489
+ }
5879
6490
  }
5880
6491
  get placeDefinition() {
5881
6492
  const definition = PlaceComponent.getDefinition(this.constructor);
@@ -6918,7 +7529,7 @@ class ConsolidatedParameterMap {
6918
7529
  return !!this.paramMaps.find(m => m.has(name));
6919
7530
  }
6920
7531
  get keys() {
6921
- return this.paramMaps.reduce((result, params) => result.concat(params.keys), []);
7532
+ return _.uniq(this.paramMaps.reduce((result, params) => result.concat(params.keys), []));
6922
7533
  }
6923
7534
  }
6924
7535
  __decorate([
@@ -6995,9 +7606,13 @@ class Visit {
6995
7606
  });
6996
7607
  return new Visit(this.placeDefinition, params);
6997
7608
  }
7609
+ // @Trace()
6998
7610
  hasRoutingChangedFrom(other) {
6999
7611
  const samePlace = other.placeDefinition === this.placeDefinition;
7000
- const sameRouteParameters = _.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
7612
+ const currentParams = this.placeDefinition.getFormattedRouteParameters(this, true);
7613
+ const otherParams = this.placeDefinition.getFormattedRouteParameters(other, true);
7614
+ // console.log({currentParams, otherParams});
7615
+ const sameRouteParameters = _.isEqual(currentParams, otherParams);
7001
7616
  return !samePlace || !sameRouteParameters;
7002
7617
  }
7003
7618
  hasChangedFrom(other) {
@@ -7019,6 +7634,7 @@ class UrlSnapshot {
7019
7634
  this.url = url;
7020
7635
  this.urlTree = urlSerializer.parse(url);
7021
7636
  }
7637
+ // @Trace()
7022
7638
  updateVisitSegments(visit) {
7023
7639
  const newUrlTree = this.urlSerializer.parse(this.url);
7024
7640
  // Ugly, but it works for now.
@@ -7095,12 +7711,6 @@ class UrlSnapshot {
7095
7711
  return `UrlSnapshot(${this.url})`;
7096
7712
  }
7097
7713
  }
7098
- __decorate([
7099
- Trace(),
7100
- __metadata("design:type", Function),
7101
- __metadata("design:paramtypes", [Visit]),
7102
- __metadata("design:returntype", UrlSnapshot)
7103
- ], UrlSnapshot.prototype, "updateVisitSegments", null);
7104
7714
  __decorate([
7105
7715
  Memoize(),
7106
7716
  __metadata("design:type", Function),
@@ -7181,6 +7791,9 @@ UrlService.ctorParameters = () => [
7181
7791
  { type: UrlSerializer }
7182
7792
  ];
7183
7793
 
7794
+ function asArray(item) {
7795
+ return Array.isArray(item) ? item : [item];
7796
+ }
7184
7797
  class PlaceRouter extends GarbageCollector {
7185
7798
  constructor(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
7186
7799
  super();
@@ -7344,11 +7957,10 @@ class PlaceRouter extends GarbageCollector {
7344
7957
  this.currentSession.onRouterEnd(event);
7345
7958
  }
7346
7959
  navigate(visit, options) {
7960
+ const commands = asArray(visit).reduce((result, v) => {
7961
+ return [...result, v.placeDefinition.path, ...this.createRouteParameters(v)];
7962
+ }, []);
7347
7963
  return this.doNavigation(visit, (router) => __awaiter(this, void 0, void 0, function* () {
7348
- const commands = [
7349
- visit.placeDefinition.path,
7350
- ...this.createRouteParameters(visit)
7351
- ];
7352
7964
  yield this.angularRouter.navigate(commands, {
7353
7965
  relativeTo: options ? options.relativeTo : null
7354
7966
  });
@@ -7361,7 +7973,7 @@ class PlaceRouter extends GarbageCollector {
7361
7973
  lang.illegalState('Navigation already in progress');
7362
7974
  }
7363
7975
  const navigation = this.createNavigationSession(this.urlService.getCurrentRouterUrl());
7364
- navigation.storeVisit(visit);
7976
+ asArray(visit).forEach(v => navigation.storeVisit(v));
7365
7977
  this.transitionTo(navigation);
7366
7978
  try {
7367
7979
  yield runNavigationCommands(this.angularRouter);
@@ -7442,6 +8054,7 @@ class PlaceRouter extends GarbageCollector {
7442
8054
  * to be able to capture the back button on the first page. If we don't then the back click will exit
7443
8055
  * the app directly and we don't get to ask.
7444
8056
  */
8057
+ // @Trace()
7445
8058
  syncInteractionContextIdsWithRouter() {
7446
8059
  if (this.navigationSession) {
7447
8060
  // console.log(`Navigation active -> ${this.navigationSession.toString()}, sync delayed until finished.`);
@@ -7483,12 +8096,6 @@ PlaceRouter.ctorParameters = () => [
7483
8096
  { type: UrlService },
7484
8097
  { type: PlaceHistory }
7485
8098
  ];
7486
- __decorate([
7487
- Trace(),
7488
- __metadata("design:type", Function),
7489
- __metadata("design:paramtypes", []),
7490
- __metadata("design:returntype", Promise)
7491
- ], PlaceRouter.prototype, "syncInteractionContextIdsWithRouter", null);
7492
8099
  (function (PlaceRouter) {
7493
8100
  class State {
7494
8101
  constructor(activeVisits) {
@@ -8250,10 +8857,11 @@ class PlaceGuard {
8250
8857
  }
8251
8858
  }
8252
8859
  const result = yield this.cleanInteractionState(activatedRoute, state, () => __awaiter(this, void 0, void 0, function* () {
8860
+ const navigationSession = this.placeRouter.navigationSession;
8253
8861
  // Parse our route params.
8254
8862
  const params = new ConsolidatedParameterMap(activatedRoute.url, activatedRoute.paramMap);
8863
+ // console.log("RouteParams", params)
8255
8864
  const parsedParams = placeDefinition.parseRouteParams(params);
8256
- const navigationSession = this.placeRouter.navigationSession;
8257
8865
  const initialVisit = navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);
8258
8866
  const sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);
8259
8867
  const sanitisedVisit = yield sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams));
@@ -8505,5 +9113,5 @@ VisibilityService.ctorParameters = () => [
8505
9113
  * Generated bundle index. Do not edit.
8506
9114
  */
8507
9115
 
8508
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0 };
9116
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractCardContainerComponent, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddCardActivityComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CardStackComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnListModel, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenedTreeListModel, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InlineEditorModel, InlineStringEditorComponent, InputActivity, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, LabelledValueComponent, ListPlaceNavComponent, ListPropertyColumnModel, LoadingContainerComponent, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, treeNodeDecorator, ɵ0 };
8509
9117
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map