@coolon/angular-ui-powerups 12.4.0-alpha.6 → 12.4.0-alpha.61

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 (439) 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 +10 -2
  6. package/assets/forms/mixins.scss +6 -0
  7. package/assets/interaction/editor/inline-string-editor.scss +54 -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 +748 -329
  12. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  13. package/bundles/coolon-angular-ui-powerups.umd.js +966 -270
  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/busy-overlay/busy-overlay.component.js +1 -1
  156. package/esm2015/lib/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
  157. package/esm2015/lib/components/cards/abstract-card-container.component.js +29 -0
  158. package/esm2015/lib/components/cards/abstract-card-container.component.js.map +1 -0
  159. package/esm2015/lib/components/cards/abstract-card-container.component.metadata.json +1 -0
  160. package/esm2015/lib/components/cards/abstract-card-container.component.ngfactory.js.map +1 -0
  161. package/esm2015/lib/components/cards/card-container/card-container.component.js +123 -0
  162. package/esm2015/lib/components/cards/card-container/card-container.component.js.map +1 -0
  163. package/esm2015/lib/components/cards/card-container/card-container.component.metadata.json +1 -0
  164. package/esm2015/lib/components/cards/card-container/card-container.component.ngfactory.js.map +1 -0
  165. package/esm2015/lib/components/cards/card-container/card-container.component.scss.shim.ngstyle.js.map +1 -0
  166. package/esm2015/lib/components/cards/card-stack/card-stack.component.js +78 -0
  167. package/esm2015/lib/components/cards/card-stack/card-stack.component.js.map +1 -0
  168. package/esm2015/lib/components/cards/card-stack/card-stack.component.metadata.json +1 -0
  169. package/esm2015/lib/components/cards/card-stack/card-stack.component.ngfactory.js.map +1 -0
  170. package/esm2015/lib/components/cards/card-stack/card-stack.component.scss.shim.ngstyle.js.map +1 -0
  171. package/esm2015/lib/components/commands/command/command.component.js +1 -1
  172. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  173. package/esm2015/lib/components/commands/command-face/command-face.component.js +1 -1
  174. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  175. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +1 -1
  176. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
  177. package/esm2015/lib/components/components.module.js +37 -24
  178. package/esm2015/lib/components/components.module.js.map +1 -1
  179. package/esm2015/lib/components/components.module.metadata.json +1 -1
  180. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  181. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  182. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  183. package/esm2015/lib/components/exports.js +5 -3
  184. package/esm2015/lib/components/exports.js.map +1 -1
  185. package/esm2015/lib/components/exports.metadata.json +1 -1
  186. package/esm2015/lib/components/focus-container/focus-container.component.js +1 -1
  187. package/esm2015/lib/components/focus-container/focus-container.component.metadata.json +1 -1
  188. package/esm2015/lib/components/forms/abstract-input.component.js +1 -0
  189. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  190. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.js +1 -1
  191. package/esm2015/lib/components/forms/autocomplete-input/autocomplete-input.component.metadata.json +1 -1
  192. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  193. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  194. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.js +1 -1
  195. package/esm2015/lib/components/forms/multiple-select-input/multiple-select-input.component.metadata.json +1 -1
  196. package/esm2015/lib/components/forms/select-input/select-input.component.js +1 -1
  197. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  198. package/esm2015/lib/components/forms/string-input/string-input.component.js +1 -1
  199. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  200. package/esm2015/lib/components/forms/text-input/text-input.component.js +1 -1
  201. package/esm2015/lib/components/forms/text-input/text-input.component.metadata.json +1 -1
  202. package/esm2015/lib/components/icon/icon.component.js +1 -1
  203. package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
  204. package/esm2015/lib/components/labelled-value/labelled-value.component.js +22 -0
  205. package/esm2015/lib/components/labelled-value/labelled-value.component.js.map +1 -0
  206. package/esm2015/lib/components/labelled-value/labelled-value.component.metadata.json +1 -0
  207. package/esm2015/lib/components/labelled-value/labelled-value.component.ngfactory.js.map +1 -0
  208. 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
  209. package/esm2015/lib/components/loading-container/loading-container.component.js +45 -0
  210. package/esm2015/lib/components/loading-container/loading-container.component.js.map +1 -0
  211. package/esm2015/lib/components/loading-container/loading-container.component.metadata.json +1 -0
  212. package/esm2015/lib/components/loading-container/loading-container.component.ngfactory.js.map +1 -0
  213. package/esm2015/lib/components/loading-container/loading-container.component.scss.shim.ngstyle.js.map +1 -0
  214. package/esm2015/lib/components/noop/noop.component.js +1 -1
  215. package/esm2015/lib/components/noop/noop.component.metadata.json +1 -1
  216. package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
  217. package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
  218. package/esm2015/lib/components/section-header/section-header.component.js +12 -5
  219. package/esm2015/lib/components/section-header/section-header.component.js.map +1 -1
  220. package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
  221. package/esm2015/lib/components/switch-case/switch-case.component.js +1 -1
  222. package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -1
  223. package/esm2015/lib/components/tables/abstract-table-model.js +6 -2
  224. package/esm2015/lib/components/tables/abstract-table-model.js.map +1 -1
  225. package/esm2015/lib/components/tables/abstract-table-model.metadata.json +1 -1
  226. package/esm2015/lib/components/tables/table/column-model.js.map +1 -1
  227. package/esm2015/lib/components/tables/table/column-model.metadata.json +1 -1
  228. package/esm2015/lib/components/tables/table/edit-row-controls/edit-row-controls.component.js +1 -1
  229. package/esm2015/lib/components/tables/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -1
  230. package/esm2015/lib/components/tables/table/paginator/paginator.component.js +1 -1
  231. package/esm2015/lib/components/tables/table/paginator/paginator.component.metadata.json +1 -1
  232. package/esm2015/lib/components/tables/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
  233. package/esm2015/lib/components/tables/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
  234. package/esm2015/lib/components/tables/table/table.component.js +1 -1
  235. package/esm2015/lib/components/tables/table/table.component.metadata.json +1 -1
  236. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  237. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  238. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  239. package/esm2015/lib/components/tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.js +1 -1
  240. package/esm2015/lib/components/tables/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.metadata.json +1 -1
  241. package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js +13 -4
  242. package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js.map +1 -1
  243. package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.metadata.json +1 -1
  244. package/esm2015/lib/components/tables/tree-table/tree-table-component.js +1 -1
  245. package/esm2015/lib/components/tables/tree-table/tree-table-component.js.map +1 -1
  246. package/esm2015/lib/components/tables/tree-table/tree-table-component.metadata.json +1 -1
  247. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
  248. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  249. package/esm2015/lib/components/track-by.js +12 -0
  250. package/esm2015/lib/components/track-by.js.map +1 -1
  251. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.js +1 -1
  252. package/esm2015/lib/components/vertical-focus-container/vertical-focus-container.component.metadata.json +1 -1
  253. package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
  254. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +17 -11
  255. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  256. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  257. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +2 -2
  258. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  259. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  260. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +1 -1
  261. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.metadata.json +1 -1
  262. package/esm2015/lib/interaction/components/activity-title/activity-title.component.js +1 -1
  263. package/esm2015/lib/interaction/components/activity-title/activity-title.component.metadata.json +1 -1
  264. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js +4 -0
  265. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js.map +1 -1
  266. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.metadata.json +1 -1
  267. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js +5 -2
  268. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js.map +1 -1
  269. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.metadata.json +1 -1
  270. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js +5 -2
  271. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js.map +1 -1
  272. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.metadata.json +1 -1
  273. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js +5 -2
  274. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js.map +1 -1
  275. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.metadata.json +1 -1
  276. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js +77 -0
  277. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js.map +1 -0
  278. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.metadata.json +1 -0
  279. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.ngfactory.js.map +1 -0
  280. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.scss.shim.ngstyle.js.map +1 -0
  281. package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +1 -1
  282. package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -1
  283. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +1 -1
  284. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  285. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +1 -1
  286. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  287. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
  288. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  289. package/esm2015/lib/interaction/components/editors/edit-context.js +2 -0
  290. package/esm2015/lib/interaction/components/editors/edit-context.js.map +1 -0
  291. package/esm2015/lib/interaction/components/editors/edit-context.metadata.json +1 -0
  292. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js +50 -0
  293. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map +1 -0
  294. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.metadata.json +1 -0
  295. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +161 -0
  296. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js.map +1 -0
  297. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.metadata.json +1 -0
  298. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.js.map +1 -0
  299. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +7 -3
  300. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  301. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
  302. package/esm2015/lib/interaction/components/input-activities/input-activity.js +95 -0
  303. package/esm2015/lib/interaction/components/input-activities/input-activity.js.map +1 -0
  304. package/esm2015/lib/interaction/components/input-activities/input-activity.metadata.json +1 -0
  305. package/esm2015/lib/interaction/components/input-activities/input-activity.ngfactory.js.map +1 -0
  306. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +5 -3
  307. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
  308. package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
  309. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +6 -4
  310. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
  311. package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
  312. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -1
  313. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  314. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
  315. package/esm2015/lib/interaction/exports.js +5 -3
  316. package/esm2015/lib/interaction/exports.js.map +1 -1
  317. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  318. package/esm2015/lib/interaction/interaction.module.js +19 -5
  319. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  320. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  321. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  322. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  323. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  324. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +1 -1
  325. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +1 -1
  326. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +1 -1
  327. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  328. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
  329. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  330. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  331. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  332. package/esm2015/lib/place/guards/consolidated-param-map.js +2 -1
  333. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  334. package/esm2015/lib/place/guards/consolidated-param-map.metadata.json +1 -1
  335. package/esm2015/lib/place/guards/place.guard.js +2 -1
  336. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  337. package/esm2015/lib/place/place-component.js +31 -4
  338. package/esm2015/lib/place/place-component.js.map +1 -1
  339. package/esm2015/lib/place/place-component.metadata.json +1 -1
  340. package/esm2015/lib/place/place-router.js +10 -13
  341. package/esm2015/lib/place/place-router.js.map +1 -1
  342. package/esm2015/lib/place/place-router.metadata.json +1 -1
  343. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  344. package/esm2015/lib/place/url-snapshot.js +1 -7
  345. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  346. package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
  347. package/esm2015/lib/place/visit.js +5 -1
  348. package/esm2015/lib/place/visit.js.map +1 -1
  349. package/esm2015/lib/place/visit.metadata.json +1 -1
  350. package/fesm2015/coolon-angular-ui-powerups-cypress.js +550 -237
  351. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  352. package/fesm2015/coolon-angular-ui-powerups.js +773 -178
  353. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  354. package/lib/components/cards/abstract-card-container.component.d.ts +11 -0
  355. package/lib/components/{card-container → cards/card-container}/card-container.component.d.ts +30 -9
  356. package/lib/components/cards/card-stack/card-stack.component.d.ts +65 -0
  357. package/lib/components/exports.d.ts +5 -3
  358. package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
  359. package/lib/components/loading-container/loading-container.component.d.ts +11 -0
  360. package/lib/components/section-header/section-header.component.d.ts +5 -2
  361. package/lib/components/tables/abstract-table-model.d.ts +4 -3
  362. package/lib/components/tables/table/column-model.d.ts +1 -1
  363. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
  364. package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +1 -1
  365. package/lib/components/tables/tree-table/tree-table-component.d.ts +1 -1
  366. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  367. package/lib/components/track-by.d.ts +9 -0
  368. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +14 -3
  369. package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +1 -1
  370. package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +2 -1
  371. package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +2 -1
  372. package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +2 -1
  373. package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +39 -0
  374. package/lib/interaction/components/editors/edit-context.d.ts +3 -0
  375. package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +24 -0
  376. package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +57 -0
  377. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -0
  378. package/lib/interaction/components/input-activities/input-activity.d.ts +41 -0
  379. package/lib/interaction/components/input-activities/select-input-activity.d.ts +11 -3
  380. package/lib/interaction/components/input-activities/string-input-activity.d.ts +6 -2
  381. package/lib/interaction/exports.d.ts +5 -3
  382. package/lib/place/place-component.d.ts +6 -1
  383. package/lib/place/place-router.d.ts +2 -2
  384. package/package.json +16 -16
  385. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +1 -1
  386. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +5 -3
  387. package/schematics/component/index.js +1 -1
  388. package/schematics/component/index.js.map +1 -1
  389. package/schematics/component/templates/component/__name@dasherize__.component.ts.template +1 -1
  390. package/schematics/place-routes/place-class-scanner.js +3 -1
  391. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  392. package/schematics/utils/build-context.d.ts +6 -3
  393. package/schematics/utils/build-context.js +3 -3
  394. package/schematics/utils/build-context.js.map +1 -1
  395. package/schematics/utils/workspace.d.ts +1 -0
  396. package/schematics/utils/workspace.js +11 -3
  397. package/schematics/utils/workspace.js.map +1 -1
  398. package/assets/activities.scss +0 -70
  399. package/cypress/components/aup-more-menu.d.ts +0 -4
  400. package/cypress/components/aup-popup-menu.d.ts +0 -7
  401. package/cypress/components/button-mixin.d.ts +0 -19
  402. package/cypress/section.d.ts +0 -52
  403. package/esm2015/cypress/components/aup-more-menu.js +0 -7
  404. package/esm2015/cypress/components/aup-more-menu.js.map +0 -1
  405. package/esm2015/cypress/components/aup-more-menu.metadata.json +0 -1
  406. package/esm2015/cypress/components/aup-popup-menu.js +0 -19
  407. package/esm2015/cypress/components/aup-popup-menu.js.map +0 -1
  408. package/esm2015/cypress/components/aup-popup-menu.metadata.json +0 -1
  409. package/esm2015/cypress/components/button-mixin.js +0 -15
  410. package/esm2015/cypress/components/button-mixin.js.map +0 -1
  411. package/esm2015/cypress/components/button-mixin.metadata.json +0 -1
  412. package/esm2015/cypress/section.js +0 -72
  413. package/esm2015/cypress/section.js.map +0 -1
  414. package/esm2015/cypress/section.metadata.json +0 -1
  415. package/esm2015/lib/components/card-container/card-container.component.js +0 -84
  416. package/esm2015/lib/components/card-container/card-container.component.js.map +0 -1
  417. package/esm2015/lib/components/card-container/card-container.component.metadata.json +0 -1
  418. package/esm2015/lib/components/card-container/card-container.component.ngfactory.js.map +0 -1
  419. package/esm2015/lib/components/tables/tree-table/tree-node.js +0 -2
  420. package/esm2015/lib/components/tables/tree-table/tree-node.js.map +0 -1
  421. package/esm2015/lib/components/tables/tree-table/tree-node.metadata.json +0 -1
  422. package/esm2015/lib/components/tables/tree-table/visitable.class.js +0 -26
  423. package/esm2015/lib/components/tables/tree-table/visitable.class.js.map +0 -1
  424. package/esm2015/lib/components/tables/tree-table/visitable.class.metadata.json +0 -1
  425. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +0 -43
  426. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +0 -1
  427. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +0 -1
  428. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.ngfactory.js.map +0 -1
  429. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js +0 -2
  430. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +0 -1
  431. package/esm2015/lib/interaction/components/input-activities/input-activity-data.metadata.json +0 -1
  432. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js +0 -2
  433. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js.map +0 -1
  434. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.metadata.json +0 -1
  435. package/lib/components/tables/tree-table/tree-node.d.ts +0 -3
  436. package/lib/components/tables/tree-table/visitable.class.d.ts +0 -22
  437. package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +0 -12
  438. package/lib/interaction/components/input-activities/input-activity-data.d.ts +0 -11
  439. package/lib/interaction/components/input-activities/select-input-activity-data.d.ts +0 -8
@@ -0,0 +1,50 @@
1
+ import { DelegatingValueModel, Dsl, GarbageCollector, MutableListModel, MutableValueModel, TrackExternal, assert } from '@coolon/pectin';
2
+ export class InlineEditorModel extends GarbageCollector {
3
+ constructor(valueModel, saveCallback) {
4
+ super();
5
+ this.valueModel = valueModel;
6
+ this.saveCallback = saveCallback;
7
+ this.editing = new MutableValueModel(false);
8
+ this._validators = new MutableListModel();
9
+ this._editingEnabled = this.registerDisposable(new DelegatingValueModel().withDefault(true));
10
+ assert.notNil(valueModel);
11
+ const { when } = Dsl.disposeWith(this);
12
+ when(this.editingEnabled).becomesFalsey(() => this.cancelEdit());
13
+ }
14
+ get editingEnabled() {
15
+ return this._editingEnabled.readonly;
16
+ }
17
+ disableWhile(condition) {
18
+ const { chain } = Dsl.disposeWith(this);
19
+ this.enableWhile(chain(condition).isFalsey());
20
+ return this;
21
+ }
22
+ enableWhile(condition) {
23
+ this._editingEnabled.setDelegate(condition);
24
+ return this;
25
+ }
26
+ get validators() {
27
+ return this._validators.readonly;
28
+ }
29
+ validateUsing(validator) {
30
+ this._validators.push(validator);
31
+ return this;
32
+ }
33
+ isEditing() {
34
+ return this.editing.value;
35
+ }
36
+ cancelEdit() {
37
+ this.editing.value = false;
38
+ }
39
+ startEditing() {
40
+ this.editing.value = true;
41
+ }
42
+ }
43
+ (function (InlineEditorModel) {
44
+ function create(valueModel, options) {
45
+ return new InlineEditorModel(valueModel, options.save);
46
+ }
47
+ InlineEditorModel.create = create;
48
+ })(InlineEditorModel || (InlineEditorModel = {}));
49
+ TrackExternal.oneTimeBinding(InlineEditorModel);
50
+ //# sourceMappingURL=inline-editor-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-editor-model.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-editor-model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,GAAG,EACH,gBAAgB,EAEhB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EAGb,MAAM,EACP,MAAM,gBAAgB,CAAC;AAIxB,MAAM,OAAO,iBAAqB,SAAQ,gBAAgB;IAMxD,YAAqB,UAAyB,EAAW,YAA+C;QACtG,KAAK,EAAE,CAAC;QADW,eAAU,GAAV,UAAU,CAAe;QAAW,iBAAY,GAAZ,YAAY,CAAmC;QAJ/F,YAAO,GAAG,IAAI,iBAAiB,CAAU,KAAK,CAAC,CAAC;QACxC,gBAAW,GAAmC,IAAI,gBAAgB,EAAgB,CAAC;QAC5F,oBAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,oBAAoB,EAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAIvG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC1B,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CA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C,cAAc,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import {\n DelegatingValueModel,\n Dsl,\n GarbageCollector,\n ListModel,\n MutableListModel,\n MutableValueModel,\n TrackExternal,\n Validator,\n ValueModel,\n assert\n} from '@coolon/pectin';\nimport { EditContext } from '../edit-context';\n\n\nexport class InlineEditorModel<T> extends GarbageCollector {\n\n readonly editing = new MutableValueModel<boolean>(false);\n private readonly _validators: MutableListModel<Validator<T>> = new MutableListModel<Validator<T>>();\n private _editingEnabled = this.registerDisposable(new DelegatingValueModel<boolean>().withDefault(true));\n\n constructor(readonly valueModel: ValueModel<T>, readonly saveCallback: InlineEditorModel.SaveCallback<T>) {\n super();\n assert.notNil(valueModel);\n const { when } = Dsl.disposeWith(this);\n when(this.editingEnabled).becomesFalsey(() => this.cancelEdit());\n }\n\n get editingEnabled(): ValueModel<boolean> {\n return this._editingEnabled.readonly;\n }\n\n disableWhile(condition: ValueModel<boolean>): this {\n const { chain } = Dsl.disposeWith(this);\n this.enableWhile(chain(condition).isFalsey());\n return this;\n }\n\n enableWhile(condition: ValueModel<boolean>): this {\n this._editingEnabled.setDelegate(condition);\n return this;\n }\n\n get validators(): ListModel<Validator<T>> {\n return this._validators.readonly;\n }\n\n validateUsing(validator: Validator<T>): this { //}, options?: HasValidators.Options): this {\n this._validators.push(validator);\n return this;\n }\n\n\n isEditing(): boolean {\n return this.editing.value;\n }\n\n cancelEdit() {\n this.editing.value = false;\n }\n\n startEditing() {\n this.editing.value = true;\n }\n\n}\n\nexport namespace InlineEditorModel {\n\n export type SaveCallback<T> = (value: T, context: EditContext<T>) => void | Promise<void>;\n\n export function create<T>(valueModel: ValueModel<T>, options: { save: SaveCallback<T> }): InlineEditorModel<T> {\n return new InlineEditorModel<T>(valueModel, options.save);\n }\n\n}\n\nTrackExternal.oneTimeBinding(InlineEditorModel);\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"InlineEditorModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@coolon/pectin","name":"GarbageCollector","line":15,"character":42},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@coolon/pectin","name":"ValueModel","line":21,"character":35,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":21,"character":46,"context":{"typeName":"T"}}]},{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InlineEditorModel"},"member":"SaveCallback","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":21,"character":104,"context":{"typeName":"T"}}]}]}],"disableWhile":[{"__symbolic":"method"}],"enableWhile":[{"__symbolic":"method"}],"validateUsing":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}],"cancelEdit":[{"__symbolic":"method"}],"startEditing":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,161 @@
1
+ import { __awaiter, __decorate, __metadata } from "tslib";
2
+ import { Component, Input, ViewChild } from '@angular/core';
3
+ import { Command, DelegatingValueModel, Dsl, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
4
+ import { lang } from '@coolon/typescript-utilities';
5
+ import * as _ from 'lodash';
6
+ import { DisposableComponent } from '../../../../components/disposable-component';
7
+ import { InteractionService } from '../../../services/interaction.service';
8
+ import { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';
9
+ import { InputActivity } from '../../input-activities/input-activity';
10
+ import { StringInputActivity } from '../../input-activities/string-input-activity';
11
+ import { InlineEditorModel } from './inline-editor-model';
12
+ /**
13
+ * @example
14
+ * const source: ValueModel<string> = ...;
15
+ * const model = InlineEditorModel.create(source, {
16
+ * save(updated:string, context: EditContext) => {
17
+ * try {
18
+ * try and save the thing...
19
+ * } catch(error) {
20
+ * context.injectError(error)
21
+ * }
22
+ * }).validateUsing(Validator.present("We'll need a value");
23
+ *
24
+ * # in the view
25
+ * <aup-inline-string-editor
26
+ * label="My field"
27
+ * placeHolder="I'm ready for a string..."
28
+ * [editorModel]="model"></aup-inline-string-editor>
29
+ */
30
+ export class InlineStringEditorComponent extends DisposableComponent {
31
+ constructor(interactionService) {
32
+ super();
33
+ this.editingEnabled = this.registerDisposable(new DelegatingValueModel());
34
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
35
+ const modalIC = interactionService.createModalInteractionContextDisposedWith(this);
36
+ const resolvedFacesModel = chain(this.facesModel).map(userFaces => {
37
+ return Object.assign(Object.assign({}, InlineStringEditorComponent.DEFAULT_FACES), userFaces);
38
+ }, { allowNil: true });
39
+ this.editFaceModel = resolvedFacesModel.pluck('edit');
40
+ this.saveFace = resolvedFacesModel.pluck('save');
41
+ this.cancelFace = resolvedFacesModel.pluck('cancel');
42
+ const self = this;
43
+ this.editCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
44
+ this.editorModel.editing.value = true;
45
+ try {
46
+ yield this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());
47
+ }
48
+ catch (e) {
49
+ // don't care if they cancelled, just hiding the console errors
50
+ }
51
+ finally {
52
+ this.editorModel.editing.value = false;
53
+ }
54
+ })).enableWhile(this.editingEnabled);
55
+ this.onDispose(() => this.cancelEdit());
56
+ }
57
+ ngOnInit() {
58
+ // our editor model is a one time binding without delegates so we can only
59
+ // use it once we've been initialised
60
+ const { chain, when, valueOf } = Dsl.disposeWith(this);
61
+ if (!this.editorModel) {
62
+ lang.illegalState('editorModel is required');
63
+ }
64
+ this.editingEnabled.setDelegate(this.editorModel.editingEnabled);
65
+ when(this.editorModel.editing).becomesTruthy(() => {
66
+ this.editCommand.execute();
67
+ }, { asLongAs: this.editCommand.enabled });
68
+ when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());
69
+ this.empty = valueOf.any(chain.stringValue(this.editorModel.valueModel).isBlank()
70
+ // deviceDescription.isNil()
71
+ ).areTruthy();
72
+ this.displayValue = chain(this.editorModel.valueModel).map(v => {
73
+ return _.isEmpty(v) ? this.placeHolderModel.value : v;
74
+ }, { dependsOn: this.placeHolderModel, allowNil: true });
75
+ }
76
+ createInputActivityData() {
77
+ const self = this;
78
+ return {
79
+ initialValue: self.editorModel.valueModel.value,
80
+ confirmFace: self.saveFace.value,
81
+ cancelFace: self.cancelFace.value,
82
+ placeholder: self.placeHolderModel.value,
83
+ label: self.label,
84
+ layout: InputActivity.Layout.INLINE,
85
+ validators: self.editorModel.validators.value,
86
+ save(value, inputContext) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ yield self.editorModel.saveCallback(value, inputContext);
89
+ });
90
+ }
91
+ };
92
+ }
93
+ cancelEdit() {
94
+ if (this.isEditing()) {
95
+ this.interactionContext.cancelActiveActivity();
96
+ }
97
+ }
98
+ startEdit() {
99
+ if (!this.isEditing() && this.editCommand.enabled.value) {
100
+ this.editCommand.execute();
101
+ }
102
+ }
103
+ isEditing() {
104
+ return this.interactionContext.isActive();
105
+ }
106
+ isEmpty() {
107
+ return this.empty.value;
108
+ }
109
+ }
110
+ InlineStringEditorComponent.decorators = [
111
+ { type: Component, args: [{
112
+ selector: 'aup-inline-string-editor',
113
+ 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"
114
+ },] }
115
+ ];
116
+ InlineStringEditorComponent.ctorParameters = () => [
117
+ { type: InteractionService }
118
+ ];
119
+ InlineStringEditorComponent.propDecorators = {
120
+ editorModel: [{ type: Input }],
121
+ facesModel: [{ type: Input }],
122
+ faces: [{ type: Input }],
123
+ interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent,] }],
124
+ label: [{ type: Input }],
125
+ placeHolder: [{ type: Input }],
126
+ placeHolderModel: [{ type: Input }]
127
+ };
128
+ __decorate([
129
+ TrackExternal(),
130
+ __metadata("design:type", InlineEditorModel)
131
+ ], InlineStringEditorComponent.prototype, "editorModel", void 0);
132
+ __decorate([
133
+ TrackExternal(),
134
+ __metadata("design:type", ValueModel)
135
+ ], InlineStringEditorComponent.prototype, "facesModel", void 0);
136
+ __decorate([
137
+ StoreInValueModel('facesModel'),
138
+ __metadata("design:type", Object)
139
+ ], InlineStringEditorComponent.prototype, "faces", void 0);
140
+ __decorate([
141
+ StoreInValueModel('placeHolderModel'),
142
+ __metadata("design:type", String)
143
+ ], InlineStringEditorComponent.prototype, "placeHolder", void 0);
144
+ __decorate([
145
+ TrackExternal(),
146
+ __metadata("design:type", ValueModel)
147
+ ], InlineStringEditorComponent.prototype, "placeHolderModel", void 0);
148
+ (function (InlineStringEditorComponent) {
149
+ InlineStringEditorComponent.DEFAULT_FACES = {
150
+ edit: {
151
+ icon: () => 'mat:edit'
152
+ },
153
+ save: {
154
+ icon: () => 'mat:check'
155
+ },
156
+ cancel: {
157
+ icon: () => 'mat:clear'
158
+ }
159
+ };
160
+ })(InlineStringEditorComponent || (InlineStringEditorComponent = {}));
161
+ //# sourceMappingURL=inline-string-editor.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-string-editor.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,KAAK,EAAU,SAAS,EAAE,MAAM,eAAe,CAAC;AACjF,O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ViewChild } from '@angular/core';\nimport {\n BooleanValueModelChain,\n Command, DelegatingValueModel,\n Dsl,\n StoreInValueModel,\n TrackExternal,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { lang } from '@coolon/typescript-utilities';\nimport * as _ from 'lodash';\nimport { CommandFace } from '../../../../components/commands/command-face';\nimport { DisposableComponent } from '../../../../components/disposable-component';\nimport { InteractionService } from '../../../services/interaction.service';\nimport { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';\nimport { InputActivity } from '../../input-activities/input-activity';\nimport { StringInputActivity } from '../../input-activities/string-input-activity';\nimport { InlineEditorModel } from './inline-editor-model';\n\n/**\n * @example\n * const source: ValueModel<string> = ...;\n * const model = InlineEditorModel.create(source, {\n * save(updated:string, context: EditContext) => {\n * try {\n * try and save the thing...\n * } catch(error) {\n * context.injectError(error)\n * }\n * }).validateUsing(Validator.present(\"We'll need a value\");\n *\n * # in the view\n * <aup-inline-string-editor\n * label=\"My field\"\n * placeHolder=\"I'm ready for a string...\"\n * [editorModel]=\"model\"></aup-inline-string-editor>\n */\n@Component({\n selector: 'aup-inline-string-editor',\n templateUrl: './inline-string-editor.component.html',\n styleUrls: [] // See assets/interaction/editor/inline-string-editor.scss\n})\nexport class InlineStringEditorComponent extends DisposableComponent implements OnInit {\n\n @Input()\n @TrackExternal()\n editorModel: InlineEditorModel<string>;\n\n @Input()\n @TrackExternal()\n facesModel: ValueModel<InlineStringEditorComponent.Faces>;\n\n @Input()\n @StoreInValueModel('facesModel')\n faces: InlineStringEditorComponent.Faces;\n\n @ViewChild(InPlaceInteractionContextComponent)\n interactionContext: InPlaceInteractionContextComponent<any, any, any>;\n\n @Input()\n label: string;\n\n @Input()\n @StoreInValueModel('placeHolderModel')\n placeHolder: string;\n\n @Input()\n @TrackExternal()\n placeHolderModel: ValueModel<string>;\n\n readonly description: ValueModelChain<string>;\n empty: BooleanValueModelChain;\n readonly editCommand: Command<void>;\n\n displayValue: ValueModelChain<string>;\n readonly editFaceModel: ValueModelChain<CommandFace>;\n readonly saveFace: ValueModelChain<CommandFace>;\n readonly cancelFace: ValueModelChain<CommandFace>;\n\n readonly editingEnabled = this.registerDisposable(new DelegatingValueModel<boolean>());\n\n constructor(interactionService: InteractionService) {\n super();\n const { chain, when, valueOf } = Dsl.disposeWith(this);\n const modalIC = interactionService.createModalInteractionContextDisposedWith(this);\n\n const resolvedFacesModel = chain(this.facesModel).map(userFaces => {\n return {\n ...InlineStringEditorComponent.DEFAULT_FACES, // todo: should really inject app wide defaults as well\n ...userFaces\n };\n }, { allowNil: true });\n\n this.editFaceModel = resolvedFacesModel.pluck('edit');\n this.saveFace = resolvedFacesModel.pluck('save');\n this.cancelFace = resolvedFacesModel.pluck('cancel');\n\n const self = this;\n this.editCommand = Command.create(async () => {\n this.editorModel.editing.value = true;\n try {\n await this.interactionContext.startActivity(StringInputActivity, this.createInputActivityData());\n } catch (e) {\n // don't care if they cancelled, just hiding the console errors\n } finally {\n this.editorModel.editing.value = false;\n }\n }).enableWhile(this.editingEnabled);\n\n this.onDispose(() => this.cancelEdit());\n\n }\n\n\n ngOnInit(): void {\n // our editor model is a one time binding without delegates so we can only\n // use it once we've been initialised\n const { chain, when, valueOf } = Dsl.disposeWith(this);\n\n if (!this.editorModel) {\n lang.illegalState('editorModel is required');\n }\n\n this.editingEnabled.setDelegate(this.editorModel.editingEnabled);\n\n when(this.editorModel.editing).becomesTruthy(() => {\n this.editCommand.execute();\n }, { asLongAs: this.editCommand.enabled });\n\n when(this.editorModel.editing).becomesFalsey(() => this.cancelEdit());\n\n this.empty = valueOf.any(\n chain.stringValue(this.editorModel.valueModel).isBlank()\n // deviceDescription.isNil()\n ).areTruthy();\n\n this.displayValue = chain(this.editorModel.valueModel).map(v => {\n return _.isEmpty(v) ? this.placeHolderModel.value : v;\n }, { dependsOn: this.placeHolderModel, allowNil: true });\n\n }\n\n\n private createInputActivityData(): InputActivity.Data<string> {\n const self = this;\n return {\n initialValue: self.editorModel.valueModel.value,\n confirmFace: self.saveFace.value,\n cancelFace: self.cancelFace.value,\n placeholder: self.placeHolderModel.value,\n label: self.label,\n layout: InputActivity.Layout.INLINE,\n validators: self.editorModel.validators.value,\n async save(value: string, inputContext: InputActivity.Context): Promise<void> {\n await self.editorModel.saveCallback(value, inputContext);\n }\n };\n }\n\n cancelEdit() {\n if (this.isEditing()) {\n this.interactionContext.cancelActiveActivity();\n }\n }\n\n startEdit() {\n if (!this.isEditing() && this.editCommand.enabled.value) {\n this.editCommand.execute();\n }\n }\n\n private isEditing() {\n return this.interactionContext.isActive();\n }\n\n isEmpty(): boolean {\n return this.empty.value;\n }\n\n\n}\n\nexport namespace InlineStringEditorComponent {\n\n export interface Faces {\n edit?: CommandFace;\n save?: CommandFace;\n cancel?: CommandFace;\n }\n\n export const DEFAULT_FACES: Faces = {\n edit: {\n icon: () => 'mat:edit'\n },\n save: {\n icon: () => 'mat:check'\n },\n cancel: {\n icon: () => 'mat:clear'\n }\n };\n\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"InlineStringEditorComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../../components/disposable-component","name":"DisposableComponent","line":43,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":38,"character":1},"arguments":[{"selector":"aup-inline-string-editor","styleUrls":[],"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"}]}],"members":{"editorModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":46,"character":3}}]}],"facesModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":50,"character":3}}]}],"faces":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":54,"character":3},"arguments":["facesModel"]}]}],"interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":57,"character":3},"arguments":[{"__symbolic":"reference","module":"../../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":57,"character":13}]}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"placeHolder":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":64,"character":3},"arguments":["placeHolderModel"]}]}],"placeHolderModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":67,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":68,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../../services/interaction.service","name":"InteractionService","line":82,"character":34}]}],"ngOnInit":[{"__symbolic":"method"}],"createInputActivityData":[{"__symbolic":"method"}],"cancelEdit":[{"__symbolic":"method"}],"startEdit":[{"__symbolic":"method"}],"isEditing":[{"__symbolic":"method"}],"isEmpty":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-string-editor.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,4 +1,4 @@
1
- import { Component, Inject, Input, Optional, ViewChild } from '@angular/core';
1
+ import { Component, HostBinding, Inject, Input, Optional, ViewChild } from '@angular/core';
2
2
  import { MAT_TABS_CONFIG } from '@angular/material/tabs';
3
3
  import { DisposableComponent } from '../../../components/disposable-component';
4
4
  import { InteractionService } from '../../services/interaction.service';
@@ -29,6 +29,9 @@ export class InPlaceInteractionContextComponent extends DisposableComponent {
29
29
  var _a;
30
30
  return this.animateFirstActivity ? (((_a = this.tabConfig) === null || _a === void 0 ? void 0 : _a.animationDuration) || '500ms') : '0ms';
31
31
  }
32
+ get active() {
33
+ return this.isActive();
34
+ }
32
35
  ngAfterViewInit() {
33
36
  this.interactionService.registerInplaceInteractionContext(this);
34
37
  }
@@ -64,7 +67,7 @@ InPlaceInteractionContextComponent.decorators = [
64
67
  { type: Component, args: [{
65
68
  selector: 'aup-in-place-interaction-context',
66
69
  template: "<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n",
67
- styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]
70
+ styles: [":host{display:flex;flex-direction:column}mat-tab-group{flex:1}\n"]
68
71
  },] }
69
72
  ];
70
73
  InPlaceInteractionContextComponent.ctorParameters = () => [
@@ -73,6 +76,7 @@ InPlaceInteractionContextComponent.ctorParameters = () => [
73
76
  ];
74
77
  InPlaceInteractionContextComponent.propDecorators = {
75
78
  activityContainerComponent: [{ type: ViewChild, args: ['activityContainer', { static: true },] }],
76
- animateFirstActivity: [{ type: Input }]
79
+ animateFirstActivity: [{ type: Input }],
80
+ active: [{ type: HostBinding, args: ["class.active",] }]
77
81
  };
78
82
  //# sourceMappingURL=in-place-interaction-context.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"in-place-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,kCAA4C,SAAQ,mBAAmB;IAgBlF,YAAqB,kBAAsC,EAAwD,SAAwB;QACzI,KAAK,EAAE,CAAC;QADW,uBAAkB,GAAlB,kBAAkB,CAAoB;QAAwD,cAAS,GAAT,SAAS,CAAe;QAX3I;;;WAGG;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,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;;;YA/DF,SAAS,SAAC;gBACT,QAAQ,EAAE,kCAAkC;gBAC5C,oXAA4D;;aAE7D;;;YAlBQ,kBAAkB;4CAmCqC,MAAM,SAAC,eAAe,cAAG,QAAQ;;;yCAd9F,SAAS,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;mCAO/C,KAAK","sourcesContent":["import { AfterViewInit, Component, Inject, Input, Optional, ViewChild } from '@angular/core';\nimport { MAT_TABS_CONFIG, MatTabsConfig } from '@angular/material/tabs';\nimport { Constructable } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { Alert } from '../../alert';\nimport { Confirm } from '../../confirm';\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityContainerComponent } from '../activity-container/activity-container.component';\n\n/**\n * @example\n * <aup-in-place-interaction-context #inPlaceInteractionContext>\n * </aup-in-place-interaction-context>\n *\n * in your component\n * @ViewChild('inPlaceInteractionContext', { static: true })\n * interactionContext: InteractionContext;\n *\n *\n */\n@Component({\n selector: 'aup-in-place-interaction-context',\n templateUrl: './in-place-interaction-context.component.html',\n styleUrls: ['./in-place-interaction-context.component.scss']\n})\nexport class InPlaceInteractionContextComponent<D, R, E> extends DisposableComponent implements InteractionContext, AfterViewInit {\n\n @ViewChild('activityContainer', { static: true })\n activityContainerComponent: ActivityContainerComponent<any, any, any>;\n\n /**\n * If true then the first startActivity call will slide the activity into view. If false\n * the activity will replace the existing content immediately.\n */\n @Input()\n animateFirstActivity = true;\n\n get animationDuration(): string {\n return this.animateFirstActivity ? (this.tabConfig?.animationDuration || '500ms') : '0ms';\n }\n\n constructor(readonly interactionService: InteractionService, @Inject(MAT_TABS_CONFIG) @Optional() private readonly tabConfig: MatTabsConfig) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.interactionService.registerInplaceInteractionContext(this);\n }\n\n initialise(id: string, api: InteractionService.Api) {\n this.activityContainerComponent.initialise(id, api);\n }\n\n get identifier() {\n return this.activityContainerComponent.identifier;\n }\n\n alert(alert: Alert): Promise<void> {\n return this.activityContainerComponent.alert(alert);\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.activityContainerComponent.cancelActiveActivity();\n }\n\n confirm(confirm: Confirm): Promise<boolean> {\n return this.activityContainerComponent.confirm(confirm);\n }\n\n confirmOrReject(confirm: Confirm): Promise<void> {\n return this.activityContainerComponent.confirmOrReject(confirm);\n }\n\n confirmThen<D1, R1, E1>(confirm: Confirm, activityType: Constructable<Activity<D1, R1, E1>>, data?: D1): Promise<R1> {\n return this.activityContainerComponent.confirmThen(confirm, activityType);\n }\n\n isActive(): boolean {\n return this.activityContainerComponent.isActive();\n }\n\n startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1> {\n return this.activityContainerComponent.startActivity(activityType, data, options);\n }\n\n}\n"]}
1
+ {"version":3,"file":"in-place-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,kCAA4C,SAAQ,mBAAmB;IAqBlF,YAAqB,kBAAsC,EAAwD,SAAwB;QACzI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AAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,0BAA0B,CAAC,QAAQ,EAAE,CAAC;IACpD,CAAC;IAED,aAAa,CAAa,YAAiD,EAAE,IAAS,EAAE,OAAoC;QAC1H,OAAO,IAAI,CAAC,0BAA0B,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;;;YApEF,SAAS,SAAC;gBACT,QAAQ,EAAE,kCAAkC;gBAC5C,oXAA4D;;aAE7D;;;YAlBQ,kBAAkB;4CAwCqC,MAAM,SAAC,eAAe,cAAG,QAAQ;;;yCAnB9F,SAAS,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;mCAO/C,KAAK;qBAOL,WAAW,SAAC,cAAc","sourcesContent":["import { AfterViewInit, Component, HostBinding, Inject, Input, Optional, ViewChild } from '@angular/core';\nimport { MAT_TABS_CONFIG, MatTabsConfig } from '@angular/material/tabs';\nimport { Constructable } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { Alert } from '../../alert';\nimport { Confirm } from '../../confirm';\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityContainerComponent } from '../activity-container/activity-container.component';\n\n/**\n * @example\n * <aup-in-place-interaction-context #inPlaceInteractionContext>\n * </aup-in-place-interaction-context>\n *\n * in your component\n * @ViewChild('inPlaceInteractionContext', { static: true })\n * interactionContext: InteractionContext;\n *\n *\n */\n@Component({\n selector: 'aup-in-place-interaction-context',\n templateUrl: './in-place-interaction-context.component.html',\n styleUrls: ['./in-place-interaction-context.component.scss']\n})\nexport class InPlaceInteractionContextComponent<D, R, E> extends DisposableComponent implements InteractionContext, AfterViewInit {\n\n @ViewChild('activityContainer', { static: true })\n activityContainerComponent: ActivityContainerComponent<any, any, any>;\n\n /**\n * If true then the first startActivity call will slide the activity into view. If false\n * the activity will replace the existing content immediately.\n */\n @Input()\n animateFirstActivity = true;\n\n get animationDuration(): string {\n return this.animateFirstActivity ? (this.tabConfig?.animationDuration || '500ms') : '0ms';\n }\n\n @HostBinding(\"class.active\")\n get active() {\n return this.isActive();\n }\n\n constructor(readonly interactionService: InteractionService, @Inject(MAT_TABS_CONFIG) @Optional() private readonly tabConfig: MatTabsConfig) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.interactionService.registerInplaceInteractionContext(this);\n }\n\n initialise(id: string, api: InteractionService.Api) {\n this.activityContainerComponent.initialise(id, api);\n }\n\n get identifier() {\n return this.activityContainerComponent.identifier;\n }\n\n alert(alert: Alert): Promise<void> {\n return this.activityContainerComponent.alert(alert);\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.activityContainerComponent.cancelActiveActivity();\n }\n\n confirm(confirm: Confirm): Promise<boolean> {\n return this.activityContainerComponent.confirm(confirm);\n }\n\n confirmOrReject(confirm: Confirm): Promise<void> {\n return this.activityContainerComponent.confirmOrReject(confirm);\n }\n\n confirmThen<D1, R1, E1>(confirm: Confirm, activityType: Constructable<Activity<D1, R1, E1>>, data?: D1): Promise<R1> {\n return this.activityContainerComponent.confirmThen(confirm, activityType);\n }\n\n isActive(): boolean {\n return this.activityContainerComponent.isActive();\n }\n\n startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1> {\n return this.activityContainerComponent.startActivity(activityType, data, options);\n }\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":44,"character":64},"arguments":[{"__symbolic":"reference","module":"@angular/material/tabs","name":"MAT_TABS_CONFIG","line":44,"character":71}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":44,"character":89}}]],"parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":44,"character":43},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsConfig","line":44,"character":128}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"alert":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"confirm":[{"__symbolic":"method"}],"confirmOrReject":[{"__symbolic":"method"}],"confirmThen":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"startActivity":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}\n"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":44,"character":3},"arguments":["class.active"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":49,"character":64},"arguments":[{"__symbolic":"reference","module":"@angular/material/tabs","name":"MAT_TABS_CONFIG","line":49,"character":71}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":49,"character":89}}]],"parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":49,"character":43},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsConfig","line":49,"character":128}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"alert":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"confirm":[{"__symbolic":"method"}],"confirmOrReject":[{"__symbolic":"method"}],"confirmThen":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"startActivity":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,95 @@
1
+ import { __awaiter } from "tslib";
2
+ import { Component, HostBinding, HostListener, Inject, Input } from '@angular/core';
3
+ import { Command, DirtyTrackingForm } from '@coolon/pectin';
4
+ import * as _ from 'lodash';
5
+ import { Enum } from 'typescript-string-enums';
6
+ import { Activity, ACTIVITY_DATA } from '../../activity';
7
+ // @see https://github.com/ng-packagr/ng-packagr/issues/641 and https://github.com/angular/angular/issues/21123
8
+ // we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)
9
+ // @dynamic
10
+ export class InputActivity extends Activity {
11
+ constructor(data) {
12
+ var _a, _b;
13
+ super();
14
+ this.data = data;
15
+ this.class = 'aup-input-activity';
16
+ const form = new DirtyTrackingForm();
17
+ this.valueModel = form.valueModel(this.data.initialValue);
18
+ this.valueModel.validateUsing(data.validators || []);
19
+ // TODO: move to global configuration
20
+ this.confirmFace = (_a = data.confirmFace) !== null && _a !== void 0 ? _a : {
21
+ icon: () => 'mat:check'
22
+ };
23
+ this.cancelFace = (_b = data.cancelFace) !== null && _b !== void 0 ? _b : {
24
+ icon: () => 'mat:clear'
25
+ };
26
+ this.confirmCommand = Command.create(() => __awaiter(this, void 0, void 0, function* () {
27
+ if (this.valueModel.validate()) {
28
+ if (data.save) {
29
+ const self = this;
30
+ try {
31
+ let allGood = true;
32
+ const result = yield data.save(this.valueModel.value, {
33
+ injectError(error) {
34
+ allGood = false;
35
+ self.valueModel.injectErrors([error]);
36
+ }
37
+ });
38
+ if (allGood) {
39
+ this.done(this.valueModel.value);
40
+ }
41
+ }
42
+ catch (e) {
43
+ console.error(e);
44
+ }
45
+ }
46
+ else {
47
+ this.done(this.valueModel.value);
48
+ }
49
+ }
50
+ }));
51
+ this.cancelCommand = Command.create(() => {
52
+ this.cancel();
53
+ });
54
+ this.busyWhile(this.confirmCommand.busy);
55
+ }
56
+ get layout() {
57
+ var _a, _b;
58
+ return (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.layout) !== null && _b !== void 0 ? _b : InputActivity.Layout.BLOCK;
59
+ }
60
+ onActivityReady() {
61
+ this.valueModel.focusContext.requestFocus();
62
+ }
63
+ get additionalCssClassName() {
64
+ var _a;
65
+ return (_a = this.data.cssClassName) !== null && _a !== void 0 ? _a : '';
66
+ }
67
+ onEscape() {
68
+ if (this.shouldCancelOnEscape() && this.cancelCommand.enabled.value) {
69
+ this.cancelCommand.execute();
70
+ }
71
+ }
72
+ shouldCancelOnEscape() {
73
+ return _.isNil(this.data.cancelOnEscape) // we default to true..
74
+ || this.data.cancelOnEscape;
75
+ }
76
+ }
77
+ InputActivity.decorators = [
78
+ { type: Component, args: [{ template: `` },] }
79
+ ];
80
+ InputActivity.ctorParameters = () => [
81
+ { type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
82
+ ];
83
+ InputActivity.propDecorators = {
84
+ class: [{ type: HostBinding, args: ['class',] }],
85
+ layout: [{ type: Input }, { type: HostBinding, args: ['attr.layout',] }],
86
+ additionalCssClassName: [{ type: HostBinding, args: ["class",] }],
87
+ onEscape: [{ type: HostListener, args: ['keydown.escape',] }]
88
+ };
89
+ (function (InputActivity) {
90
+ InputActivity.Layout = Enum({
91
+ INLINE: 'inline',
92
+ BLOCK: 'block'
93
+ });
94
+ })(InputActivity || (InputActivity = {}));
95
+ //# sourceMappingURL=input-activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-activity.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/input-activities/input-activity.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAmB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gB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AKnB,KAAK,YACL,WAAW,SAAC,aAAa;qCAuDzB,WAAW,SAAC,OAAO;uBAKnB,YAAY,SAAC,gBAAgB;;AAchC,WAAiB,aAAa;IAEf,oBAAM,GAAG,IAAI,CAAC;QACzB,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;KACf,CAAC,CAAC;AAmBL,CAAC,EAxBgB,aAAa,KAAb,aAAa,QAwB7B","sourcesContent":["import { Component, HostBinding, HostListener, Inject, Input } from '@angular/core';\nimport { Command, DirtyTrackingForm, Form, Validator } from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { Enum } from 'typescript-string-enums';\nimport { CommandFace } from '../../../components/commands/command-face';\nimport { Activity, ACTIVITY_DATA } from '../../activity';\n\n// @see https://github.com/ng-packagr/ng-packagr/issues/641 and https://github.com/angular/angular/issues/21123\n// we're getting a metadata error for D for no reason that I can find and only during the build (ng serve works fine)\n// @dynamic\n@Component({ template: `` })\nexport class InputActivity<T, D extends InputActivity.Data<T> = InputActivity.Data<T>> extends Activity<D, T> {\n\n readonly confirmCommand: Command<void>;\n readonly cancelCommand: Command<void>;\n readonly valueModel: Form.ValueModelBase<T>;\n\n @HostBinding('class') class = 'aup-input-activity';\n\n readonly confirmFace: CommandFace;\n readonly cancelFace: CommandFace;\n\n @Input()\n @HostBinding('attr.layout')\n get layout(): InputActivity.Layout {\n return this.data?.layout ?? InputActivity.Layout.BLOCK;\n }\n\n constructor(@Inject(ACTIVITY_DATA) readonly data: D) {\n super();\n\n const form = new DirtyTrackingForm();\n this.valueModel = form.valueModel<T>(this.data.initialValue);\n this.valueModel.validateUsing(data.validators || []);\n\n // TODO: move to global configuration\n this.confirmFace = data.confirmFace ?? {\n icon: () => 'mat:check'\n };\n this.cancelFace = data.cancelFace ?? {\n icon: () => 'mat:clear'\n };\n\n this.confirmCommand = Command.create(async () => {\n if (this.valueModel.validate()) {\n if (data.save) {\n const self = this;\n try {\n let allGood = true;\n const result = await data.save(this.valueModel.value, {\n injectError(error: string) {\n allGood = false;\n self.valueModel.injectErrors([error]);\n }\n });\n if (allGood) {\n this.done(this.valueModel.value);\n }\n } catch (e) {\n console.error(e);\n }\n } else {\n this.done(this.valueModel.value);\n }\n\n }\n });\n this.cancelCommand = Command.create(() => {\n this.cancel();\n });\n\n this.busyWhile(this.confirmCommand.busy);\n }\n\n onActivityReady() {\n this.valueModel.focusContext.requestFocus();\n }\n\n @HostBinding(\"class\")\n get additionalCssClassName():string {\n return this.data.cssClassName ?? ''\n }\n\n @HostListener('keydown.escape')\n onEscape() {\n if (this.shouldCancelOnEscape() && this.cancelCommand.enabled.value) {\n this.cancelCommand.execute();\n }\n }\n\n shouldCancelOnEscape(): boolean {\n return _.isNil(this.data.cancelOnEscape) // we default to true..\n || this.data.cancelOnEscape;\n }\n\n}\n\nexport namespace InputActivity {\n\n export const Layout = Enum({\n INLINE: 'inline',\n BLOCK: 'block'\n });\n export type Layout = Enum<typeof Layout>;\n\n export interface Context {\n injectError(error: string);\n }\n\n export interface Data<T> {\n initialValue: T;\n label?: string;\n placeholder?: string;\n layout?: InputActivity.Layout\n confirmFace?: CommandFace,\n cancelFace?: CommandFace,\n validators?: Validator<T>[],\n cancelOnEscape?: boolean,\n cssClassName?: string,\n save?(valueModel: T, interactionContext?: Context): void | Promise<void>\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"InputActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../activity","name":"Activity","line":11,"character":95},"arity":2,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":10,"character":1},"arguments":[{"template":""}]}],"members":{"class":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":17,"character":3},"arguments":["class"]}]}],"layout":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":23,"character":3},"arguments":["attr.layout"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":28,"character":15},"arguments":[{"__symbolic":"reference","module":"../../activity","name":"ACTIVITY_DATA","line":28,"character":22}]}]],"parameters":[{"__symbolic":"error","message":"Could not resolve type","line":28,"character":52,"context":{"typeName":"D"}}]}],"onActivityReady":[{"__symbolic":"method"}],"additionalCssClassName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":78,"character":3},"arguments":["class"]}]}],"onEscape":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":83,"character":3},"arguments":["keydown.escape"]}]}],"shouldCancelOnEscape":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-activity.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/input-activities/input-activity.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { Component } from '@angular/core';
2
- import { AbstractInputActivity } from './abstract-input-activity';
3
- export class SelectInputActivity extends AbstractInputActivity {
2
+ import { InputActivity } from './input-activity';
3
+ export class SelectInputActivity extends InputActivity {
4
4
  constructor() {
5
5
  super(...arguments);
6
6
  this.defaultOptionLabelFormat = (option) => {
@@ -28,7 +28,9 @@ SelectInputActivity.decorators = [
28
28
  [options]="options"
29
29
  [optionLabelFormat]="optionLabelFormat"
30
30
  ></aup-select-input>
31
- <aup-activity-actions align="end" [faces]="data.buttonStyle"
31
+ <aup-activity-actions [layout]="layout" align="end"
32
+ [confirmFace]="confirmFace"
33
+ [cancelFace]="cancelFace"
32
34
  ></aup-activity-actions>
33
35
  `
34
36
  },] }
@@ -1 +1 @@
1
- {"version":3,"file":"select-input-activity.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/input-activities/select-input-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAmBlE,MAAM,OAAO,mBAAuB,SAAQ,qBAAoD;IAfhG;;QAiBW,6BAAwB,GAAG,CAAC,MAAQ,EAAE,EAAE;YAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACxE,CAAC,CAAA;IASH,CAAC;IAPC,IAAI,iBAAiB;;QACnB,OAAO,MAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,mCAAI,IAAI,CAAC,wBAAwB,CAAC;IACtE,CAAC;IAED,IAAI,OAAO;;QACT,OAAO,CAAA,MAAA,IAAI,CAAC,IAAI,CAAC,YAAY,0CAAE,KAAK,KAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;IAC5D,CAAC;;;YA3BF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,QAAQ,EAAE;;;;;;;;;;;GAWT;aACF","sourcesContent":["import { Component } from '@angular/core';\nimport { AbstractInputActivity } from './abstract-input-activity';\nimport { SelectInputActivityData } from './select-input-activity-data';\n\n\n@Component({\n selector: 'aup-select-input-activity',\n template: `\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions align=\"end\" [faces]=\"data.buttonStyle\"\n ></aup-activity-actions>\n `\n})\nexport class SelectInputActivity<T> extends AbstractInputActivity<T, SelectInputActivityData<T>> {\n\n readonly defaultOptionLabelFormat = (option:T) => {\n return this.data.optionLabel ? option[this.data.optionLabel] : option;\n }\n\n get optionLabelFormat() {\n return this.data.optionLabelFormat ?? this.defaultOptionLabelFormat;\n }\n\n get options():T[] {\n return this.data.optionsModel?.value || this.data.options;\n }\n}\n"]}
1
+ {"version":3,"file":"select-input-activity.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/input-activities/select-input-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmBjD,MAAM,OAAO,mBAAuB,SAAQ,aAA6C;IAjBzF;;QAmBW,6BAAwB,GAAG,CAAC,MAAS,EAAE,EAAE;YAChD,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACxE,CAAC,CAAC;IASJ,CAAC;IAPC,IAAI,iBAAiB;;QACnB,OAAO,MAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,mCAAI,IAAI,CAAC,wBAAwB,CAAC;IACtE,CAAC;IAED,IAAI,OAAO;;QACT,OAAO,CAAA,MAAA,IAAI,CAAC,IAAI,CAAC,YAAY,0CAAE,KAAK,KAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;IAC5D,CAAC;;;YA7BF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,QAAQ,EAAE;;;;;;;;;;;;;GAaT;aACF","sourcesContent":["import { Component } from '@angular/core';\nimport { ListModel } from '@coolon/pectin';\nimport { InputActivity } from './input-activity';\n\n@Component({\n selector: 'aup-select-input-activity',\n template: `\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions [layout]=\"layout\" align=\"end\"\n [confirmFace]=\"confirmFace\"\n [cancelFace]=\"cancelFace\"\n ></aup-activity-actions>\n `\n})\nexport class SelectInputActivity<T> extends InputActivity<T, SelectInputActivity.Data<T>> {\n\n readonly defaultOptionLabelFormat = (option: T) => {\n return this.data.optionLabel ? option[this.data.optionLabel] : option;\n };\n\n get optionLabelFormat() {\n return this.data.optionLabelFormat ?? this.defaultOptionLabelFormat;\n }\n\n get options(): T[] {\n return this.data.optionsModel?.value || this.data.options;\n }\n}\n\nexport namespace SelectInputActivity {\n export interface Data<T> extends InputActivity.Data<T> {\n options?: T[];\n optionsModel?: ListModel<T>;\n optionLabel?: keyof T;\n optionLabelFormat?: (option: T) => any;\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SelectInputActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-input-activity","name":"AbstractInputActivity","line":20,"character":44},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-select-input-activity","template":"\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions align=\"end\" [faces]=\"data.buttonStyle\"\n ></aup-activity-actions>\n "}]}]}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SelectInputActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./input-activity","name":"InputActivity","line":21,"character":44},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-select-input-activity","template":"\n <aup-select-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"\n [options]=\"options\"\n [optionLabelFormat]=\"optionLabelFormat\"\n ></aup-select-input>\n <aup-activity-actions [layout]=\"layout\" align=\"end\"\n [confirmFace]=\"confirmFace\"\n [cancelFace]=\"cancelFace\"\n ></aup-activity-actions>\n "}]}]}}}]
@@ -1,6 +1,6 @@
1
1
  import { Component } from '@angular/core';
2
- import { AbstractInputActivity } from './abstract-input-activity';
3
- export class StringInputActivity extends AbstractInputActivity {
2
+ import { InputActivity } from './input-activity';
3
+ export class StringInputActivity extends InputActivity {
4
4
  }
5
5
  StringInputActivity.decorators = [
6
6
  { type: Component, args: [{
@@ -11,8 +11,10 @@ StringInputActivity.decorators = [
11
11
  [placeholder]="data.placeholder"
12
12
  [command.enter]="confirmCommand"
13
13
  [command.escape]="cancelCommand"></aup-string-input>
14
- <aup-activity-actions align="end"
15
- [faces]="data.buttonStyle"></aup-activity-actions>
14
+ <aup-activity-actions [layout]="layout" align="end"
15
+ [confirmFace]="confirmFace"
16
+ [cancelFace]="cancelFace"
17
+ ></aup-activity-actions>
16
18
  `
17
19
  },] }
18
20
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"string-input-activity.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/input-activities/string-input-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAelE,MAAM,OAAO,mBAAoB,SAAQ,qBAA6B;;;YAZrE,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,QAAQ,EAAE;;;;;;;;GAQT;aACF","sourcesContent":["import { Component } from '@angular/core';\nimport { AbstractInputActivity } from './abstract-input-activity';\n\n\n@Component({\n selector: 'aup-string-input-activity',\n template: `\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions align=\"end\"\n [faces]=\"data.buttonStyle\"></aup-activity-actions>\n `\n})\nexport class StringInputActivity extends AbstractInputActivity<string> {\n}\n"]}
1
+ {"version":3,"file":"string-input-activity.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/input-activities/string-input-activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiBjD,MAAM,OAAO,mBAAoB,SAAQ,aAAqB;;;YAd7D,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,QAAQ,EAAE;;;;;;;;;;GAUT;aACF","sourcesContent":["import { Component } from '@angular/core';\nimport { InputActivity } from './input-activity';\n\n\n@Component({\n selector: 'aup-string-input-activity',\n template: `\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions [layout]=\"layout\" align=\"end\"\n [confirmFace]=\"confirmFace\"\n [cancelFace]=\"cancelFace\"\n ></aup-activity-actions>\n `\n})\nexport class StringInputActivity extends InputActivity<string> {\n}\n\nexport namespace StringInputActivity {\n export interface Data extends InputActivity.Data<String> {\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"StringInputActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-input-activity","name":"AbstractInputActivity","line":16,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-string-input-activity","template":"\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions align=\"end\"\n [faces]=\"data.buttonStyle\"></aup-activity-actions>\n "}]}]}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"StringInputActivity":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./input-activity","name":"InputActivity","line":18,"character":41},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-string-input-activity","template":"\n <aup-string-input [valueModel]=\"valueModel\"\n [label]=\"data.label\"\n [placeholder]=\"data.placeholder\"\n [command.enter]=\"confirmCommand\"\n [command.escape]=\"cancelCommand\"></aup-string-input>\n <aup-activity-actions [layout]=\"layout\" align=\"end\"\n [confirmFace]=\"confirmFace\"\n [cancelFace]=\"cancelFace\"\n ></aup-activity-actions>\n "}]}]}}}]
@@ -31,6 +31,7 @@ export class PopupInteractionContextComponent extends DisposableComponent {
31
31
  const self = this;
32
32
  const overlayRef = this._overlay.create({
33
33
  hasBackdrop: false,
34
+ disposeOnNavigation: true,
34
35
  panelClass: 'aup-popup-interaction-panel',
35
36
  positionStrategy: this._overlay.position()
36
37
  .flexibleConnectedTo(this._element)
@@ -85,7 +86,7 @@ PopupInteractionContextComponent.decorators = [
85
86
  { type: Component, args: [{
86
87
  selector: 'aup-popup-interaction-context',
87
88
  template: "<ng-content></ng-content>\n",
88
- styles: [":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}"]
89
+ styles: [":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}\n"]
89
90
  },] }
90
91
  ];
91
92
  PopupInteractionContextComponent.ctorParameters = () => [