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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/assets/activities/activities.scss +77 -0
  2. package/assets/activities/input-activities.scss +36 -0
  3. package/assets/cards.scss +17 -0
  4. package/assets/empty-state.scss +11 -0
  5. package/assets/form.scss +5 -2
  6. package/assets/forms/mixins.scss +6 -0
  7. package/assets/interaction/editor/inline-string-editor.scss +100 -0
  8. package/assets/interaction.scss +10 -7
  9. package/assets/mixins.scss +5 -7
  10. package/assets/styles.scss +8 -15
  11. package/bundles/coolon-angular-ui-powerups-cypress.umd.js +735 -320
  12. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  13. package/bundles/coolon-angular-ui-powerups.umd.js +854 -144
  14. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  15. package/coolon-angular-ui-powerups.metadata.json +1 -1
  16. package/cypress/component-builder.d.ts +71 -0
  17. package/cypress/components/aup-abstract-activity.d.ts +31 -0
  18. package/cypress/components/aup-abstract-table.d.ts +18 -0
  19. package/cypress/components/aup-activity.d.ts +9 -0
  20. package/cypress/components/aup-alert-dialog.d.ts +27 -0
  21. package/cypress/components/aup-alert.d.ts +9 -0
  22. package/cypress/components/aup-command-face.d.ts +2 -8
  23. package/cypress/components/aup-command.d.ts +2 -1
  24. package/cypress/components/aup-confirm-dialog.d.ts +27 -0
  25. package/cypress/components/aup-confirm.d.ts +11 -0
  26. package/cypress/components/aup-empty-state.d.ts +4 -0
  27. package/cypress/components/aup-input.d.ts +11 -5
  28. package/cypress/components/aup-modal-activity.d.ts +24 -0
  29. package/cypress/components/aup-modal-mixin.d.ts +23 -0
  30. package/cypress/components/aup-table.d.ts +5 -18
  31. package/cypress/components/aup-tree-table.d.ts +16 -0
  32. package/cypress/components/button.d.ts +11 -7
  33. package/cypress/components/form-element-mixin.d.ts +22 -0
  34. package/cypress/components/mat-checkbox.d.ts +31 -0
  35. package/cypress/components/popup/aup-abstract-popup-menu.d.ts +15 -0
  36. package/cypress/components/popup/aup-more-menu.d.ts +5 -0
  37. package/cypress/components/popup/aup-popup-menu-panel.d.ts +3 -0
  38. package/cypress/components/popup/aup-popup-menu.d.ts +7 -0
  39. package/cypress/components/table/aup-table-cell.d.ts +9 -0
  40. package/cypress/components/table/aup-table-column.d.ts +10 -0
  41. package/cypress/components/table/aup-table-row.d.ts +17 -0
  42. package/cypress/components/table/aup-table-selection-cell.d.ts +5 -0
  43. package/cypress/components/table/aup-table-selection-column.d.ts +5 -0
  44. package/cypress/coolon-angular-ui-powerups-cypress.metadata.json +1 -1
  45. package/cypress/element-locator.d.ts +8 -0
  46. package/cypress/exports.d.ts +25 -4
  47. package/cypress/package.json +1 -1
  48. package/cypress/page-builder.d.ts +9 -0
  49. package/cypress/page-element.d.ts +12 -12
  50. package/cypress/page.d.ts +8 -33
  51. package/esm2015/cypress/component-builder.js +92 -0
  52. package/esm2015/cypress/component-builder.js.map +1 -0
  53. package/esm2015/cypress/component-builder.metadata.json +1 -0
  54. package/esm2015/cypress/components/aup-abstract-activity.js +12 -0
  55. package/esm2015/cypress/components/aup-abstract-activity.js.map +1 -0
  56. package/esm2015/cypress/components/aup-abstract-activity.metadata.json +1 -0
  57. package/esm2015/cypress/components/aup-abstract-table.js +50 -0
  58. package/esm2015/cypress/components/aup-abstract-table.js.map +1 -0
  59. package/esm2015/cypress/components/aup-abstract-table.metadata.json +1 -0
  60. package/esm2015/cypress/components/aup-activity.js +13 -0
  61. package/esm2015/cypress/components/aup-activity.js.map +1 -0
  62. package/esm2015/cypress/components/aup-activity.metadata.json +1 -0
  63. package/esm2015/cypress/components/aup-alert-dialog.js +8 -0
  64. package/esm2015/cypress/components/aup-alert-dialog.js.map +1 -0
  65. package/esm2015/cypress/components/aup-alert-dialog.metadata.json +1 -0
  66. package/esm2015/cypress/components/aup-alert.js +13 -0
  67. package/esm2015/cypress/components/aup-alert.js.map +1 -0
  68. package/esm2015/cypress/components/aup-alert.metadata.json +1 -0
  69. package/esm2015/cypress/components/aup-command-face.js +11 -22
  70. package/esm2015/cypress/components/aup-command-face.js.map +1 -1
  71. package/esm2015/cypress/components/aup-command-face.metadata.json +1 -1
  72. package/esm2015/cypress/components/aup-command.js +12 -6
  73. package/esm2015/cypress/components/aup-command.js.map +1 -1
  74. package/esm2015/cypress/components/aup-command.metadata.json +1 -1
  75. package/esm2015/cypress/components/aup-confirm-dialog.js +8 -0
  76. package/esm2015/cypress/components/aup-confirm-dialog.js.map +1 -0
  77. package/esm2015/cypress/components/aup-confirm-dialog.metadata.json +1 -0
  78. package/esm2015/cypress/components/aup-confirm.js +19 -0
  79. package/esm2015/cypress/components/aup-confirm.js.map +1 -0
  80. package/esm2015/cypress/components/aup-confirm.metadata.json +1 -0
  81. package/esm2015/cypress/components/aup-empty-state.js +7 -0
  82. package/esm2015/cypress/components/aup-empty-state.js.map +1 -0
  83. package/esm2015/cypress/components/aup-empty-state.metadata.json +1 -0
  84. package/esm2015/cypress/components/aup-input.js +17 -5
  85. package/esm2015/cypress/components/aup-input.js.map +1 -1
  86. package/esm2015/cypress/components/aup-input.metadata.json +1 -1
  87. package/esm2015/cypress/components/aup-modal-activity.js +5 -0
  88. package/esm2015/cypress/components/aup-modal-activity.js.map +1 -0
  89. package/esm2015/cypress/components/aup-modal-activity.metadata.json +1 -0
  90. package/esm2015/cypress/components/aup-modal-mixin.js +18 -0
  91. package/esm2015/cypress/components/aup-modal-mixin.js.map +1 -0
  92. package/esm2015/cypress/components/aup-modal-mixin.metadata.json +1 -0
  93. package/esm2015/cypress/components/aup-navigation.js +1 -1
  94. package/esm2015/cypress/components/aup-navigation.js.map +1 -1
  95. package/esm2015/cypress/components/aup-table.js +5 -33
  96. package/esm2015/cypress/components/aup-table.js.map +1 -1
  97. package/esm2015/cypress/components/aup-table.metadata.json +1 -1
  98. package/esm2015/cypress/components/aup-tree-table.js +34 -0
  99. package/esm2015/cypress/components/aup-tree-table.js.map +1 -0
  100. package/esm2015/cypress/components/aup-tree-table.metadata.json +1 -0
  101. package/esm2015/cypress/components/button.js +4 -10
  102. package/esm2015/cypress/components/button.js.map +1 -1
  103. package/esm2015/cypress/components/button.metadata.json +1 -1
  104. package/esm2015/cypress/components/form-element-mixin.js +11 -0
  105. package/esm2015/cypress/components/form-element-mixin.js.map +1 -0
  106. package/esm2015/cypress/components/form-element-mixin.metadata.json +1 -0
  107. package/esm2015/cypress/components/mat-checkbox.js +34 -0
  108. package/esm2015/cypress/components/mat-checkbox.js.map +1 -0
  109. package/esm2015/cypress/components/mat-checkbox.metadata.json +1 -0
  110. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js +33 -0
  111. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.js.map +1 -0
  112. package/esm2015/cypress/components/popup/aup-abstract-popup-menu.metadata.json +1 -0
  113. package/esm2015/cypress/components/popup/aup-more-menu.js +8 -0
  114. package/esm2015/cypress/components/popup/aup-more-menu.js.map +1 -0
  115. package/esm2015/cypress/components/popup/aup-more-menu.metadata.json +1 -0
  116. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js +4 -0
  117. package/esm2015/cypress/components/popup/aup-popup-menu-panel.js.map +1 -0
  118. package/esm2015/cypress/components/popup/aup-popup-menu-panel.metadata.json +1 -0
  119. package/esm2015/cypress/components/popup/aup-popup-menu.js +12 -0
  120. package/esm2015/cypress/components/popup/aup-popup-menu.js.map +1 -0
  121. package/esm2015/cypress/components/popup/aup-popup-menu.metadata.json +1 -0
  122. package/esm2015/cypress/components/table/aup-table-cell.js +14 -0
  123. package/esm2015/cypress/components/table/aup-table-cell.js.map +1 -0
  124. package/esm2015/cypress/components/table/aup-table-cell.metadata.json +1 -0
  125. package/esm2015/cypress/components/table/aup-table-column.js +19 -0
  126. package/esm2015/cypress/components/table/aup-table-column.js.map +1 -0
  127. package/esm2015/cypress/components/table/aup-table-column.metadata.json +1 -0
  128. package/esm2015/cypress/components/table/aup-table-row.js +28 -0
  129. package/esm2015/cypress/components/table/aup-table-row.js.map +1 -0
  130. package/esm2015/cypress/components/table/aup-table-row.metadata.json +1 -0
  131. package/esm2015/cypress/components/table/aup-table-selection-cell.js +6 -0
  132. package/esm2015/cypress/components/table/aup-table-selection-cell.js.map +1 -0
  133. package/esm2015/cypress/components/table/aup-table-selection-cell.metadata.json +1 -0
  134. package/esm2015/cypress/components/table/aup-table-selection-column.js +6 -0
  135. package/esm2015/cypress/components/table/aup-table-selection-column.js.map +1 -0
  136. package/esm2015/cypress/components/table/aup-table-selection-column.metadata.json +1 -0
  137. package/esm2015/cypress/element-locator.js +16 -0
  138. package/esm2015/cypress/element-locator.js.map +1 -0
  139. package/esm2015/cypress/element-locator.metadata.json +1 -0
  140. package/esm2015/cypress/exports.js +25 -4
  141. package/esm2015/cypress/exports.js.map +1 -1
  142. package/esm2015/cypress/exports.metadata.json +1 -1
  143. package/esm2015/cypress/page-builder.js +16 -0
  144. package/esm2015/cypress/page-builder.js.map +1 -0
  145. package/esm2015/cypress/page-builder.metadata.json +1 -0
  146. package/esm2015/cypress/page-element.js +26 -19
  147. package/esm2015/cypress/page-element.js.map +1 -1
  148. package/esm2015/cypress/page-element.metadata.json +1 -1
  149. package/esm2015/cypress/page.js +31 -19
  150. package/esm2015/cypress/page.js.map +1 -1
  151. package/esm2015/cypress/page.metadata.json +1 -1
  152. package/esm2015/cypress/path.js +3 -1
  153. package/esm2015/cypress/path.js.map +1 -1
  154. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  155. package/esm2015/lib/components/cards/abstract-card-container.component.js +29 -0
  156. package/esm2015/lib/components/cards/abstract-card-container.component.js.map +1 -0
  157. package/esm2015/lib/components/cards/abstract-card-container.component.metadata.json +1 -0
  158. package/esm2015/lib/components/cards/abstract-card-container.component.ngfactory.js.map +1 -0
  159. package/esm2015/lib/components/cards/card-container/card-container.component.js +123 -0
  160. package/esm2015/lib/components/cards/card-container/card-container.component.js.map +1 -0
  161. package/esm2015/lib/components/cards/card-container/card-container.component.metadata.json +1 -0
  162. package/esm2015/lib/components/cards/card-container/card-container.component.ngfactory.js.map +1 -0
  163. package/esm2015/lib/components/cards/card-container/card-container.component.scss.shim.ngstyle.js.map +1 -0
  164. package/esm2015/lib/components/cards/card-stack/card-stack.component.js +78 -0
  165. package/esm2015/lib/components/cards/card-stack/card-stack.component.js.map +1 -0
  166. package/esm2015/lib/components/cards/card-stack/card-stack.component.metadata.json +1 -0
  167. package/esm2015/lib/components/cards/card-stack/card-stack.component.ngfactory.js.map +1 -0
  168. package/esm2015/lib/components/cards/card-stack/card-stack.component.scss.shim.ngstyle.js.map +1 -0
  169. package/esm2015/lib/components/components.module.js +37 -24
  170. package/esm2015/lib/components/components.module.js.map +1 -1
  171. package/esm2015/lib/components/components.module.metadata.json +1 -1
  172. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  173. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  174. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  175. package/esm2015/lib/components/exports.js +5 -1
  176. package/esm2015/lib/components/exports.js.map +1 -1
  177. package/esm2015/lib/components/exports.metadata.json +1 -1
  178. package/esm2015/lib/components/forms/abstract-input.component.js +1 -0
  179. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  180. package/esm2015/lib/components/labelled-value/labelled-value.component.js +22 -0
  181. package/esm2015/lib/components/labelled-value/labelled-value.component.js.map +1 -0
  182. package/esm2015/lib/components/labelled-value/labelled-value.component.metadata.json +1 -0
  183. package/esm2015/lib/components/labelled-value/labelled-value.component.ngfactory.js.map +1 -0
  184. package/esm2015/lib/components/{card-container/card-container.component.scss.shim.ngstyle.js.map → labelled-value/labelled-value.component.scss.shim.ngstyle.js.map} +1 -1
  185. package/esm2015/lib/components/loading-container/loading-container.component.js +45 -0
  186. package/esm2015/lib/components/loading-container/loading-container.component.js.map +1 -0
  187. package/esm2015/lib/components/loading-container/loading-container.component.metadata.json +1 -0
  188. package/esm2015/lib/components/loading-container/loading-container.component.ngfactory.js.map +1 -0
  189. package/esm2015/lib/components/loading-container/loading-container.component.scss.shim.ngstyle.js.map +1 -0
  190. package/esm2015/lib/components/section-header/section-header.component.js +12 -5
  191. package/esm2015/lib/components/section-header/section-header.component.js.map +1 -1
  192. package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
  193. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js +4 -4
  194. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.js.map +1 -1
  195. package/esm2015/lib/components/tables/tree-table/flattened-tree-list-model.metadata.json +1 -1
  196. package/esm2015/lib/components/tables/tree-table/tree-table-model.js +1 -0
  197. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  198. package/esm2015/lib/components/tables/tree-table/tree-table-model.metadata.json +1 -1
  199. package/esm2015/lib/components/track-by.js +12 -0
  200. package/esm2015/lib/components/track-by.js.map +1 -1
  201. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +17 -11
  202. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  203. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  204. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +1 -1
  205. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  206. package/esm2015/lib/interaction/components/activity-container/activity-container.component.metadata.json +1 -1
  207. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js +4 -0
  208. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js.map +1 -1
  209. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.metadata.json +1 -1
  210. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js +4 -1
  211. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js.map +1 -1
  212. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.metadata.json +1 -1
  213. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js +4 -1
  214. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js.map +1 -1
  215. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.metadata.json +1 -1
  216. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js +4 -1
  217. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js.map +1 -1
  218. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.metadata.json +1 -1
  219. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js +77 -0
  220. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.js.map +1 -0
  221. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.metadata.json +1 -0
  222. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.ngfactory.js.map +1 -0
  223. package/esm2015/lib/interaction/components/add-card-activity/add-card-activity.component.scss.shim.ngstyle.js.map +1 -0
  224. package/esm2015/lib/interaction/components/editors/edit-context.js +2 -0
  225. package/esm2015/lib/interaction/components/editors/edit-context.js.map +1 -0
  226. package/esm2015/lib/interaction/components/editors/edit-context.metadata.json +1 -0
  227. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js +50 -0
  228. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.js.map +1 -0
  229. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-editor-model.metadata.json +1 -0
  230. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js +161 -0
  231. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.js.map +1 -0
  232. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.metadata.json +1 -0
  233. package/esm2015/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.ngfactory.js.map +1 -0
  234. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +6 -2
  235. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  236. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
  237. package/esm2015/lib/interaction/components/input-activities/input-activity.js +95 -0
  238. package/esm2015/lib/interaction/components/input-activities/input-activity.js.map +1 -0
  239. package/esm2015/lib/interaction/components/input-activities/input-activity.metadata.json +1 -0
  240. package/esm2015/lib/interaction/components/input-activities/input-activity.ngfactory.js.map +1 -0
  241. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +5 -3
  242. package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
  243. package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
  244. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +6 -4
  245. package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
  246. package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
  247. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +1 -0
  248. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  249. package/esm2015/lib/interaction/exports.js +5 -3
  250. package/esm2015/lib/interaction/exports.js.map +1 -1
  251. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  252. package/esm2015/lib/interaction/interaction.module.js +19 -5
  253. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  254. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  255. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  256. package/esm2015/lib/place/guards/consolidated-param-map.js +2 -1
  257. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  258. package/esm2015/lib/place/guards/consolidated-param-map.metadata.json +1 -1
  259. package/esm2015/lib/place/guards/place.guard.js +2 -1
  260. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  261. package/esm2015/lib/place/place-component.js +31 -4
  262. package/esm2015/lib/place/place-component.js.map +1 -1
  263. package/esm2015/lib/place/place-component.metadata.json +1 -1
  264. package/esm2015/lib/place/place-router.js +10 -13
  265. package/esm2015/lib/place/place-router.js.map +1 -1
  266. package/esm2015/lib/place/place-router.metadata.json +1 -1
  267. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  268. package/esm2015/lib/place/url-snapshot.js +1 -7
  269. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  270. package/esm2015/lib/place/url-snapshot.metadata.json +1 -1
  271. package/esm2015/lib/place/visit.js +5 -1
  272. package/esm2015/lib/place/visit.js.map +1 -1
  273. package/esm2015/lib/place/visit.metadata.json +1 -1
  274. package/fesm2015/coolon-angular-ui-powerups-cypress.js +550 -237
  275. package/fesm2015/coolon-angular-ui-powerups-cypress.js.map +1 -1
  276. package/fesm2015/coolon-angular-ui-powerups.js +715 -107
  277. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  278. package/lib/components/cards/abstract-card-container.component.d.ts +11 -0
  279. package/lib/components/{card-container → cards/card-container}/card-container.component.d.ts +30 -9
  280. package/lib/components/cards/card-stack/card-stack.component.d.ts +65 -0
  281. package/lib/components/exports.d.ts +5 -1
  282. package/lib/components/labelled-value/labelled-value.component.d.ts +7 -0
  283. package/lib/components/loading-container/loading-container.component.d.ts +11 -0
  284. package/lib/components/section-header/section-header.component.d.ts +5 -2
  285. package/lib/components/tables/tree-table/flattened-tree-list-model.d.ts +0 -1
  286. package/lib/components/tables/tree-table/tree-table-model.d.ts +4 -5
  287. package/lib/components/track-by.d.ts +9 -0
  288. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +14 -3
  289. package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +1 -1
  290. package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +2 -1
  291. package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +2 -1
  292. package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +2 -1
  293. package/lib/interaction/components/add-card-activity/add-card-activity.component.d.ts +39 -0
  294. package/lib/interaction/components/editors/edit-context.d.ts +3 -0
  295. package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +24 -0
  296. package/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.d.ts +57 -0
  297. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -0
  298. package/lib/interaction/components/input-activities/input-activity.d.ts +41 -0
  299. package/lib/interaction/components/input-activities/select-input-activity.d.ts +11 -3
  300. package/lib/interaction/components/input-activities/string-input-activity.d.ts +6 -2
  301. package/lib/interaction/exports.d.ts +5 -3
  302. package/lib/place/place-component.d.ts +6 -1
  303. package/lib/place/place-router.d.ts +2 -2
  304. package/package.json +1 -1
  305. package/schematics/activity/templates/component/__name@dasherize__.component.html.template +1 -1
  306. package/schematics/activity/templates/component/__name@dasherize__.component.ts.template +5 -3
  307. package/schematics/place-routes/place-class-scanner.js +3 -1
  308. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  309. package/assets/activities.scss +0 -70
  310. package/cypress/components/aup-more-menu.d.ts +0 -4
  311. package/cypress/components/aup-popup-menu.d.ts +0 -7
  312. package/cypress/components/button-mixin.d.ts +0 -19
  313. package/cypress/section.d.ts +0 -52
  314. package/esm2015/cypress/components/aup-more-menu.js +0 -7
  315. package/esm2015/cypress/components/aup-more-menu.js.map +0 -1
  316. package/esm2015/cypress/components/aup-more-menu.metadata.json +0 -1
  317. package/esm2015/cypress/components/aup-popup-menu.js +0 -19
  318. package/esm2015/cypress/components/aup-popup-menu.js.map +0 -1
  319. package/esm2015/cypress/components/aup-popup-menu.metadata.json +0 -1
  320. package/esm2015/cypress/components/button-mixin.js +0 -15
  321. package/esm2015/cypress/components/button-mixin.js.map +0 -1
  322. package/esm2015/cypress/components/button-mixin.metadata.json +0 -1
  323. package/esm2015/cypress/section.js +0 -72
  324. package/esm2015/cypress/section.js.map +0 -1
  325. package/esm2015/cypress/section.metadata.json +0 -1
  326. package/esm2015/lib/components/card-container/card-container.component.js +0 -84
  327. package/esm2015/lib/components/card-container/card-container.component.js.map +0 -1
  328. package/esm2015/lib/components/card-container/card-container.component.metadata.json +0 -1
  329. package/esm2015/lib/components/card-container/card-container.component.ngfactory.js.map +0 -1
  330. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js +0 -43
  331. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.js.map +0 -1
  332. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.metadata.json +0 -1
  333. package/esm2015/lib/interaction/components/input-activities/abstract-input-activity.ngfactory.js.map +0 -1
  334. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js +0 -2
  335. package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +0 -1
  336. package/esm2015/lib/interaction/components/input-activities/input-activity-data.metadata.json +0 -1
  337. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js +0 -2
  338. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.js.map +0 -1
  339. package/esm2015/lib/interaction/components/input-activities/select-input-activity-data.metadata.json +0 -1
  340. package/lib/interaction/components/input-activities/abstract-input-activity.d.ts +0 -12
  341. package/lib/interaction/components/input-activities/input-activity-data.d.ts +0 -11
  342. package/lib/interaction/components/input-activities/select-input-activity-data.d.ts +0 -8
@@ -1,27 +1,48 @@
1
- import { lang, Mixin } from '@coolon/typescript-utilities';
1
+ import { Stringy, Mixin } from '@coolon/typescript-utilities';
2
2
  import * as _ from 'lodash';
3
+ import { __decorate, __metadata } from 'tslib';
4
+ import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
3
5
  import { DefaultUrlSerializer } from '@angular/router';
4
6
 
7
+ var ElementLocator;
8
+ (function (ElementLocator) {
9
+ function findByCssSelector(selector) {
10
+ return parent => parent.dom().find(selector);
11
+ }
12
+ ElementLocator.findByCssSelector = findByCssSelector;
13
+ function findByTextContent(text) {
14
+ return parent => parent.dom().contains(text);
15
+ }
16
+ ElementLocator.findByTextContent = findByTextContent;
17
+ function findBySelectorAndTextContent(selector, text) {
18
+ return parent => parent.dom().contains(selector, text);
19
+ }
20
+ ElementLocator.findBySelectorAndTextContent = findBySelectorAndTextContent;
21
+ })(ElementLocator || (ElementLocator = {}));
22
+
5
23
  class PageElement {
6
- constructor(parent, selector) {
7
- this.parentElementAccessor = parent instanceof PageElement ? () => parent.element() : parent;
8
- this.elementAccessStrategy = _.isString(selector) ? {
9
- findIn: p => p.find(selector),
10
- shouldNotExist: (p) => p.find(selector).should('not.exist')
11
- } : selector;
24
+ constructor(parent, selectorOrLocator) {
25
+ this.parent = parent;
26
+ this.domElementLocator = _.isNil(selectorOrLocator) ?
27
+ this.getDefaultElementLocator() :
28
+ _.isString(selectorOrLocator) ?
29
+ ElementLocator.findByCssSelector(selectorOrLocator) :
30
+ selectorOrLocator;
12
31
  }
13
- element() {
14
- const parent = this.getParentElement();
15
- return parent ? this.elementAccessStrategy.findIn(parent) : undefined;
32
+ getDefaultElementLocator() {
33
+ return ElementLocator.findByCssSelector(this.getDefaultElementSelector());
16
34
  }
17
- getParentElement() {
18
- return this.parentElementAccessor ? this.parentElementAccessor() : undefined;
35
+ getDefaultElementSelector() {
36
+ return Stringy.from(this.constructor.name).dasherize().toString();
37
+ }
38
+ dom() {
39
+ return this.domElementLocator(this.parent);
19
40
  }
20
41
  find(selector) {
21
- return new PageElement(() => this.element(), selector);
42
+ return new PageElement(this, selector);
22
43
  }
23
44
  click(text) {
24
- text ? this.element().contains(text).click() : this.element().click();
45
+ text ? this.dom().contains(text).click() : this.dom().click();
25
46
  }
26
47
  get should() {
27
48
  return this.getShoulder(this.getShouldElement());
@@ -30,113 +51,47 @@ class PageElement {
30
51
  return element.should.bind(element);
31
52
  }
32
53
  getShouldElement() {
33
- return this.element();
54
+ return this.dom();
34
55
  }
35
56
  shouldBeVisible() {
36
57
  this.should('be.visible');
37
58
  }
38
59
  shouldNotBeVisible() {
39
- if (!this.elementAccessStrategy.shouldNotExist) {
40
- lang.abstractMethod(this.constructor);
41
- }
42
- this.elementAccessStrategy.shouldNotExist(this.getParentElement());
43
- }
44
- }
45
-
46
- let urlSerialiser = new DefaultUrlSerializer();
47
- class Path {
48
- constructor(segments) {
49
- this.segments = segments;
60
+ this.should('not.be.visible');
50
61
  }
51
- static extractVisitParameters(url) {
52
- let result = {};
53
- const urlTree = urlSerialiser.parse(url);
54
- urlTree.root.children.primary.segments.forEach(s => {
55
- result = Object.assign(Object.assign({}, result), s.parameters);
56
- });
57
- return result;
62
+ shouldExist() {
63
+ this.dom().should('exist');
58
64
  }
59
- toUrl(matrixParams) {
60
- return this.segments.map(s => s.toUrlPart(matrixParams)).join('/');
65
+ shouldNotExist() {
66
+ this.dom().should('not.exist');
61
67
  }
62
68
  }
63
- (function (Path) {
64
- function setUrlSerialiser(serialiser) {
65
- urlSerialiser = serialiser;
66
- }
67
- Path.setUrlSerialiser = setUrlSerialiser;
68
- class Segment {
69
- constructor(path, params = {}) {
70
- var _a;
71
- this.path = path;
72
- this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
73
- this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
74
- }
75
- toUrlPart(params) {
76
- let path = this.path;
77
- this.visitParams.forEach(p => {
78
- const value = params[p];
79
- if (value) {
80
- path = `${path};${p}=${value}`;
81
- }
82
- });
83
- if (this.routeId && params[this.routeId]) {
84
- path = path + '/' + params[this.routeId];
85
- }
86
- return path;
87
- }
88
- }
89
- Path.Segment = Segment;
90
- class Builder {
91
- constructor() {
92
- this.segments = [];
93
- }
94
- segment(name, params) {
95
- const builder = new Segment(name, params);
96
- this.segments.push(builder);
97
- return this;
98
- }
99
- getPath() {
100
- return new Path(this.segments);
101
- }
102
- }
103
- Path.Builder = Builder;
104
- })(Path || (Path = {}));
105
69
 
106
- class FaceAccessor {
107
- constructor(face) {
108
- this.face = face;
109
- }
110
- findIn(parent) {
111
- return this.face.text ?
112
- parent.contains(`aup-command-face`, this.face.text()) :
113
- this.face.icon ?
114
- parent.find(`aup-icon[ng-reflect-icon=${this.face.icon()}]`).closest('aup-command-face') :
115
- undefined;
116
- }
117
- shouldNotExist(parent) {
118
- return this.face.text ?
119
- parent.should('not.contain', `aup-command-face`, this.face.text()) :
120
- this.face.icon ?
121
- parent.should('not.contain', `aup-icon[ng-reflect-icon=${this.face.icon()}]`) :
122
- undefined;
123
- }
124
- }
125
70
  class AupCommandFace extends PageElement {
126
71
  constructor(parentElement, face) {
127
- super(() => parentElement.element(), AupCommandFace.createAccessor(face));
128
- }
129
- static createAccessor(face) {
130
- return new FaceAccessor(face);
72
+ super(parentElement, AupCommandFace.createElementLocator(face));
73
+ }
74
+ static createElementLocator(face) {
75
+ const locator = parent => {
76
+ return face.text ?
77
+ parent.dom().contains(`aup-command-face`, face.text()) :
78
+ face.icon ?
79
+ parent.dom().find(`aup-icon[ng-reflect-icon=${face.icon()}]`).closest('aup-command-face') :
80
+ undefined;
81
+ };
82
+ // aot compiler doesn't like lambas
83
+ return locator;
131
84
  }
132
85
  }
133
86
 
134
87
  class AupCommand extends PageElement {
135
- constructor(parent, face) {
136
- const faceAccessor = AupCommandFace.createAccessor(face);
137
- super(parent, {
138
- findIn(parentElement) {
139
- return faceAccessor.findIn(parentElement).closest('aup-command');
88
+ constructor(parent, faceOrSelector) {
89
+ super(parent, parentElement => {
90
+ if (_.isString(faceOrSelector)) {
91
+ return parentElement.dom().find(faceOrSelector);
92
+ }
93
+ else {
94
+ return AupCommandFace.createElementLocator(faceOrSelector)(parentElement).closest('aup-command');
140
95
  }
141
96
  });
142
97
  }
@@ -149,20 +104,29 @@ class AupCommand extends PageElement {
149
104
  shouldBeDisabled() {
150
105
  this.getButton().should('be.disabled');
151
106
  }
107
+ shouldBeEnabled() {
108
+ this.getButton().should('not.be.disabled');
109
+ }
152
110
  getButton() {
153
- return this.element().find('button');
111
+ return this.dom().find('button');
112
+ }
113
+ }
114
+
115
+ class AupEmptyState extends PageElement {
116
+ shouldContainText(text) {
117
+ this.dom().should("contain.text", text);
154
118
  }
155
119
  }
156
120
 
157
121
  class AupInput extends PageElement {
158
122
  label() {
159
- return this.element().find('label');
123
+ return this.dom().find('label');
160
124
  }
161
125
  hint() {
162
- return this.element().find('mat-hint');
126
+ return this.dom().find('mat-hint');
163
127
  }
164
128
  error() {
165
- return this.element().find('mat-error');
129
+ return this.dom().find('mat-error');
166
130
  }
167
131
  get labelShould() {
168
132
  return this.getShoulder(this.label());
@@ -182,11 +146,23 @@ class AupInput extends PageElement {
182
146
  errorShouldBe(text) {
183
147
  return this.errorShould("have.text", text);
184
148
  }
149
+ shouldBeFocused() {
150
+ this.input().should("have.focus");
151
+ }
152
+ shouldNotBeFocused() {
153
+ this.input().should("not.have.focus");
154
+ }
155
+ type(characters) {
156
+ this.input().type(characters);
157
+ }
158
+ hitEnter() {
159
+ this.type("{enter}");
160
+ }
185
161
  }
186
162
  (function (AupInput) {
187
163
  class HtmlInput extends AupInput {
188
164
  input() {
189
- return this.element().find('input');
165
+ return this.dom().find('input');
190
166
  }
191
167
  clear() {
192
168
  this.input().clear();
@@ -207,7 +183,7 @@ class AupInput extends PageElement {
207
183
  return this.input();
208
184
  }
209
185
  input() {
210
- return this.element().find('textarea');
186
+ return this.dom().find('textarea');
211
187
  }
212
188
  clear() {
213
189
  this.input().clear();
@@ -222,6 +198,46 @@ class AupInput extends PageElement {
222
198
  AupInput.TextAreaInput = TextAreaInput;
223
199
  })(AupInput || (AupInput = {}));
224
200
 
201
+ class AupPopupMenuPanel extends PageElement {
202
+ }
203
+
204
+ class AupAbstractPopupMenu extends PageElement {
205
+ constructor(parent, locator) {
206
+ super(parent, locator);
207
+ this.popup = new AupPopupMenuPanel(this, p => this.findPopupIn(p));
208
+ }
209
+ findPopupIn(p) {
210
+ return this.getOverlay().find('.mat-menu-panel');
211
+ }
212
+ getOverlay() {
213
+ return this.dom().closest('body').find('.cdk-overlay-container');
214
+ }
215
+ getBackdrop() {
216
+ return this.getOverlay().find('.cdk-overlay-backdrop');
217
+ }
218
+ openPopup() {
219
+ this.shouldNotBeOpen();
220
+ this.click();
221
+ return this.popup;
222
+ }
223
+ closePopup() {
224
+ this.shouldBeOpen();
225
+ this.getBackdrop().click();
226
+ }
227
+ shouldBeOpen() {
228
+ this.popup.shouldBeVisible();
229
+ }
230
+ shouldNotBeOpen() {
231
+ this.dom().closest('body').find('.mat-menu-panel').should("not.exist");
232
+ }
233
+ }
234
+
235
+ class AupMoreMenu extends AupAbstractPopupMenu {
236
+ static create(parent, selector) {
237
+ return new AupMoreMenu(parent, ElementLocator.findByCssSelector(selector !== null && selector !== void 0 ? selector : 'aup-more-menu'));
238
+ }
239
+ }
240
+
225
241
  class AupNavigation extends PageElement {
226
242
  click(label) {
227
243
  return super.click(label);
@@ -233,137 +249,430 @@ class AupNavigation extends PageElement {
233
249
  this.face(label).shouldBeVisible();
234
250
  }
235
251
  shouldNotHaveLink(label) {
236
- this.face(label).shouldNotBeVisible();
252
+ this.face(label).shouldNotExist();
253
+ }
254
+ }
255
+
256
+ class AupTableCell extends PageElement {
257
+ rowId() {
258
+ return this.dom().closest('tr').invoke('attr', 'aup-row-id');
259
+ }
260
+ row() {
261
+ const self = this;
262
+ return this.parent.createRow(parent => {
263
+ return self.rowId().then(rowId => parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId)));
264
+ });
265
+ }
266
+ }
267
+
268
+ class AupTableColumn extends PageElement {
269
+ constructor(table, columnId) {
270
+ super(table, AupAbstractTable.cssSelectorForColumnCellRendererById(columnId));
271
+ this.columnId = columnId;
272
+ }
273
+ cellContaining(content) {
274
+ const self = this;
275
+ return new AupTableCell(this.parent, parent => {
276
+ return parent.dom().contains(AupAbstractTable.cssSelectorForColumnCellRendererById(self.columnId), content);
277
+ });
278
+ }
279
+ rowContaining(content) {
280
+ return this.cellContaining(content).row();
237
281
  }
238
282
  }
239
283
 
240
- class AupTable extends PageElement {
241
- constructor(parentElementAccessor, selector) {
242
- super(parentElementAccessor, selector);
284
+ class AupTableSelectionColumn extends AupTableColumn {
285
+ selectAll() {
243
286
  }
287
+ }
288
+
289
+ class AupAbstractTable extends PageElement {
244
290
  row(rowId) {
245
- return new AupTable.Row(() => this.element(), `tr[aup-table-id=${rowId}]`);
291
+ return this.createRow(parent => {
292
+ return parent.dom().find(AupAbstractTable.cssSelectorForTableRowById(rowId));
293
+ });
294
+ }
295
+ rowNumber(rowNumber) {
296
+ return this.createRow(parent => {
297
+ return parent.dom().find(AupAbstractTable.cssSelectorForNthTableRow(rowNumber));
298
+ });
246
299
  }
247
300
  column(columnId) {
248
- return new AupTable.Column(this, columnId);
301
+ return new AupTableColumn(this, columnId);
302
+ }
303
+ get selectionColumn() {
304
+ return new AupTableSelectionColumn(this, 'selection-column');
305
+ }
306
+ }
307
+ __decorate([
308
+ Memoize(),
309
+ __metadata("design:type", AupTableSelectionColumn),
310
+ __metadata("design:paramtypes", [])
311
+ ], AupAbstractTable.prototype, "selectionColumn", null);
312
+ (function (AupAbstractTable) {
313
+ function cssSelectorForTableRowById(rowId) {
314
+ return `tbody tr[aup-row-id=${rowId}]`;
315
+ }
316
+ AupAbstractTable.cssSelectorForTableRowById = cssSelectorForTableRowById;
317
+ function cssSelectorForNthTableRow(rowNumber) {
318
+ return `tbody tr:nth-child(${rowNumber})`;
319
+ }
320
+ AupAbstractTable.cssSelectorForNthTableRow = cssSelectorForNthTableRow;
321
+ function cssSelectorForColumnCellRendererById(columnOrId) {
322
+ const columnId = _.isString(columnOrId) ? columnOrId : columnOrId.columnId;
323
+ return `aup-table-cell-renderer[column-id=${columnId}]`;
324
+ }
325
+ AupAbstractTable.cssSelectorForColumnCellRendererById = cssSelectorForColumnCellRendererById;
326
+ function cssSelectorForCell(rowId, columnOrId) {
327
+ return `${cssSelectorForTableRowById(rowId)} ${cssSelectorForColumnCellRendererById(columnOrId)}`;
328
+ }
329
+ AupAbstractTable.cssSelectorForCell = cssSelectorForCell;
330
+ })(AupAbstractTable || (AupAbstractTable = {}));
331
+
332
+ /* tslint:disable:unified-signatures */
333
+ class AupTableRow extends PageElement {
334
+ rowId() {
335
+ return this.dom()
336
+ .invoke('attr', 'aup-row-id');
337
+ }
338
+ shouldHaveRowId(rowId) {
339
+ this.rowId().should('eq', rowId);
340
+ }
341
+ cell(columnOrId) {
342
+ const self = this;
343
+ return new AupTableCell(this.parent, parent => {
344
+ return self.rowId()
345
+ .then(rowId => AupAbstractTable.cssSelectorForCell(rowId, columnOrId))
346
+ .then(selector => parent.dom().find(selector));
347
+ });
348
+ }
349
+ shouldBeSelected() {
350
+ this.dom().should('have.class', 'aup-row-selected');
351
+ }
352
+ shouldNotBeSelected() {
353
+ this.dom().should('not.have.class', 'aup-row-selected');
354
+ }
355
+ }
356
+
357
+ class AupTable extends AupAbstractTable {
358
+ createRow(locator) {
359
+ return new AupTableRow(this, locator);
249
360
  }
250
361
  }
251
- (function (AupTable) {
252
- class Row extends PageElement {
362
+
363
+ class AupTreeTable extends AupAbstractTable {
364
+ get treeControlColumn() {
365
+ return new AupTreeTable.TreeControlColumn(this, 'tree-label');
366
+ }
367
+ createRow(locator) {
368
+ return new AupTreeTable.Row(this, locator);
253
369
  }
254
- AupTable.Row = Row;
255
- class Column {
256
- constructor(table, columnId) {
257
- this.table = table;
258
- this.columnId = columnId;
370
+ }
371
+ __decorate([
372
+ Memoize(),
373
+ __metadata("design:type", AupTreeTable.TreeControlColumn),
374
+ __metadata("design:paramtypes", [])
375
+ ], AupTreeTable.prototype, "treeControlColumn", null);
376
+ (function (AupTreeTable) {
377
+ class Row extends AupTableRow {
378
+ shouldBeExpanded() {
379
+ this.dom().should("not.have.class", "aup-node-collapsed");
259
380
  }
260
- cell(content) {
261
- const self = this;
262
- return new Cell(this.table, {
263
- findIn(parent) {
264
- return parent.contains(`aup-table-cell-renderer[column-id=${self.columnId}]`, content);
265
- }
266
- });
381
+ shouldBeCollapsed() {
382
+ this.dom().should("have.class", "aup-node-collapsed");
267
383
  }
268
384
  }
269
- AupTable.Column = Column;
270
- class Cell extends PageElement {
385
+ AupTreeTable.Row = Row;
386
+ class TreeControlColumn extends AupTableColumn {
271
387
  }
272
- AupTable.Cell = Cell;
273
- })(AupTable || (AupTable = {}));
388
+ AupTreeTable.TreeControlColumn = TreeControlColumn;
389
+ })(AupTreeTable || (AupTreeTable = {}));
274
390
 
275
- function ButtonMixin(Base) {
391
+ function FormElementMixin(Base) {
276
392
  return class extends Base {
277
393
  constructor(...args) {
278
394
  super(...args);
279
395
  }
280
- click() {
281
- return this.element().click();
282
- }
283
396
  shouldBeDisabled() {
284
397
  this.should("be.disabled");
285
- // this.should("have.css", "color", "rgba(0,0,0,0.26)")
286
398
  }
287
399
  };
288
400
  }
289
401
 
290
- class Button extends ButtonMixin(PageElement) {
402
+ class Button extends FormElementMixin(PageElement) {
291
403
  constructor(parentElementAccessor, buttonText) {
292
- super(parentElementAccessor, {
293
- findIn(parent) {
294
- return parent.contains('button', buttonText);
295
- },
296
- shouldNotExist(parent) {
297
- return parent.should('not.contain', buttonText);
404
+ super(parentElementAccessor, ElementLocator.findBySelectorAndTextContent('button', buttonText));
405
+ }
406
+ }
407
+
408
+ class MatCheckbox extends FormElementMixin(PageElement) {
409
+ constructor(parentElementAccessor, text) {
410
+ super(parentElementAccessor, ElementLocator.findBySelectorAndTextContent('mat-checkbox', text));
411
+ }
412
+ shouldBeChecked() {
413
+ this.hiddenCheckBoxElement().should('be.checked');
414
+ }
415
+ shouldNotBeChecked() {
416
+ this.hiddenCheckBoxElement().should('not.be.checked');
417
+ }
418
+ hiddenCheckBoxElement() {
419
+ return this.dom().find('input[type=checkbox]');
420
+ }
421
+ check() {
422
+ this.hiddenCheckBoxElement().then(el => {
423
+ if (!el.prop('checked')) {
424
+ this.click();
425
+ this.shouldBeChecked();
426
+ }
427
+ });
428
+ }
429
+ uncheck() {
430
+ this.hiddenCheckBoxElement().then(el => {
431
+ if (el.prop('checked')) {
432
+ this.click();
433
+ this.shouldNotBeChecked();
298
434
  }
299
435
  });
300
436
  }
301
437
  }
302
438
 
303
- var Section;
304
- (function (Section) {
305
- function create(builder) {
306
- const impl = new StandAloneSection();
307
- return Mixin.createProxy(builder(impl), impl);
439
+ class ComponentBuilder {
440
+ constructor(parentPageElement) {
441
+ this.parentPageElement = parentPageElement;
442
+ }
443
+ find(selector) {
444
+ return new PageElement(this.parentPageElement, selector);
445
+ }
446
+ section(selector, builder) {
447
+ return this.component(PageElement, selector, builder);
448
+ }
449
+ contains(text) {
450
+ return new PageElement(this.parentPageElement, ElementLocator.findByTextContent(text));
451
+ }
452
+ button(text) {
453
+ return new Button(this.parentPageElement, text);
454
+ }
455
+ matCheckbox(text) {
456
+ return new MatCheckbox(this.parentPageElement, text);
457
+ }
458
+ aupStringInput(selector) {
459
+ return new AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-string-input');
460
+ }
461
+ aupTextInput(selector) {
462
+ return new AupInput.TextAreaInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-text-input');
463
+ }
464
+ aupPasswordInput(selector) {
465
+ return new AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-password-input');
466
+ }
467
+ aupNumberInput(selector) {
468
+ return new AupInput.HtmlInput(this.parentPageElement, selector !== null && selector !== void 0 ? selector : 'aup-number-input');
308
469
  }
309
- Section.create = create;
310
- function Mixin$1(Base) {
470
+ aupCommand(faceOrSelector) {
471
+ return new AupCommand(this.parentPageElement, faceOrSelector);
472
+ }
473
+ aupTabbedNavigation() {
474
+ return new AupNavigation(this.parentPageElement, 'aup-tabbed-place-navigation');
475
+ }
476
+ aupSideNavigation() {
477
+ return new AupNavigation(this.parentPageElement, 'aup-list-place-nav');
478
+ }
479
+ aupMoreMenu(selector) {
480
+ return AupMoreMenu.create(this.parentPageElement, selector);
481
+ }
482
+ aupTable(selectorOrBuilder, optionalBuilder) {
483
+ return this.component(AupTable, selectorOrBuilder, optionalBuilder);
484
+ }
485
+ aupTreeTable(selectorOrBuilder, optionalBuilder) {
486
+ return this.component(AupTreeTable, selectorOrBuilder, optionalBuilder);
487
+ }
488
+ aupEmptyState(selectorOrBuilder, optionalBuilder) {
489
+ return this.component(AupEmptyState, selectorOrBuilder, optionalBuilder);
490
+ }
491
+ component(klass, selectorOrBuilder, optionalBuilder) {
492
+ const selector = _.isString(selectorOrBuilder) ? selectorOrBuilder : undefined;
493
+ const builder = _.isFunction(selectorOrBuilder) ? selectorOrBuilder : optionalBuilder;
494
+ const element = new klass(this.parentPageElement, selector);
495
+ if (builder) {
496
+ // create the B&E type that the builder has access to
497
+ const decoratedElement = Mixin.createProxy(element, new ComponentBuilder(element));
498
+ // create final type that has the E & T type
499
+ return Mixin.createProxy(decoratedElement, builder(decoratedElement));
500
+ }
501
+ else {
502
+ return element;
503
+ }
504
+ }
505
+ }
506
+ (function (ComponentBuilder) {
507
+ function Mixin(Base) {
311
508
  return class extends Base {
312
- section(selector, section) {
313
- const impl = new NestedSection(this, selector);
314
- return Mixin.createProxy(section(impl), impl);
315
- }
316
- find(selector) {
317
- return new PageElement(() => this.element(), selector);
318
- }
319
- contains(text) {
320
- return new PageElement(() => this.element(), {
321
- findIn: parent => parent.contains(text),
322
- shouldNotExist: (parent) => parent.should('not.contain', text)
323
- });
324
- }
325
- button(text) {
326
- return new Button(() => this.element(), text);
327
- }
328
- aupStringInput(selector) {
329
- return new AupInput.HtmlInput(() => this.element(), selector !== null && selector !== void 0 ? selector : 'aup-string-input');
330
- }
331
- aupTextInput(selector) {
332
- return new AupInput.TextAreaInput(() => this.element(), selector !== null && selector !== void 0 ? selector : 'aup-text-input');
333
- }
334
- aupPasswordInput(selector) {
335
- return new AupInput.HtmlInput(() => this.element(), selector !== null && selector !== void 0 ? selector : 'aup-password-input');
336
- }
337
- aupNumberInput(selector) {
338
- return new AupInput.HtmlInput(() => this.element(), selector !== null && selector !== void 0 ? selector : 'aup-number-input');
339
- }
340
- aupCommand(face) {
341
- return new AupCommand(this, face);
342
- }
343
- aupTabbedNavigation() {
344
- return new AupNavigation(this, 'aup-tabbed-place-navigation');
345
- }
346
- aupSideNavigation() {
347
- return new AupNavigation(() => this.element(), 'aup-list-place-nav');
348
- }
349
- aupTable(selector) {
350
- return new AupTable(() => this.element(), selector !== null && selector !== void 0 ? selector : 'aup-table');
509
+ constructor(...args) {
510
+ super(...args);
511
+ this.builder = new ComponentBuilder(this);
351
512
  }
352
513
  };
353
514
  }
354
- Section.Mixin = Mixin$1;
355
- class NestedSection extends Mixin$1(PageElement) {
515
+ ComponentBuilder.Mixin = Mixin;
516
+ })(ComponentBuilder || (ComponentBuilder = {}));
517
+
518
+ class AupAbstractActivity extends ComponentBuilder.Mixin(PageElement) {
519
+ constructor(parent, selector) {
520
+ // @ts-ignore
521
+ super(parent, selector);
522
+ this.title = this.find('aup-activity-title');
523
+ this._confirmCommand = this.builder.aupCommand('[data-cy=confirm-command]');
524
+ this._cancelCommand = this.builder.aupCommand('[data-cy=cancel-command]');
525
+ }
526
+ }
527
+
528
+ class AupAlert extends AupAbstractActivity {
529
+ constructor(parent, selector) {
530
+ super(parent, selector);
531
+ }
532
+ get closeCommand() {
533
+ return this._confirmCommand;
534
+ }
535
+ clickClose() {
536
+ this.closeCommand.click();
537
+ }
538
+ }
539
+
540
+ function AupModalMixin(Base) {
541
+ return class extends Base {
542
+ constructor(...args) {
543
+ super(...args);
544
+ }
545
+ getDefaultElementLocator() {
546
+ return (parent) => {
547
+ return parent.dom().closest('body').find(this.getDefaultElementSelector());
548
+ };
549
+ }
550
+ clickBackdrop() {
551
+ this.dom()
552
+ .closest(`.cdk-overlay-container`)
553
+ .find(`.cdk-overlay-backdrop`).click(-50, -50, { force: true });
554
+ }
555
+ };
556
+ }
557
+
558
+ class AupAlertDialog extends AupModalMixin(AupAlert) {
559
+ constructor(parent, selector) {
560
+ super(parent, selector);
561
+ }
562
+ }
563
+
564
+ class AupConfirm extends AupAbstractActivity {
565
+ constructor(parent, selector) {
566
+ super(parent, selector);
567
+ }
568
+ get confirmCommand() {
569
+ return this._confirmCommand;
570
+ }
571
+ clickConfirm() {
572
+ this.confirmCommand.click();
573
+ }
574
+ get cancelCommand() {
575
+ return this._cancelCommand;
576
+ }
577
+ clickCancel() {
578
+ this.cancelCommand.click();
579
+ }
580
+ }
581
+
582
+ class AupConfirmDialog extends AupModalMixin(AupConfirm) {
583
+ constructor(parent, selector) {
584
+ super(parent, selector);
585
+ }
586
+ }
587
+
588
+ class AupActivity extends AupAbstractActivity {
589
+ constructor(parent, selector) {
590
+ super(parent, selector);
591
+ }
592
+ get confirmCommand() {
593
+ return this._confirmCommand;
594
+ }
595
+ get cancelCommand() {
596
+ return this._cancelCommand;
597
+ }
598
+ }
599
+
600
+ class AupModalActivity extends AupModalMixin(AupActivity) {
601
+ }
602
+
603
+ class PageBuilder extends ComponentBuilder {
604
+ aupModalActivity(selector, builder) {
605
+ return this.component(AupModalActivity, selector, builder);
606
+ }
607
+ aupModalAlert(builder) {
608
+ return this.component(AupAlertDialog, builder);
356
609
  }
357
- class StandAloneSection extends Mixin$1(PageElement) {
610
+ aupModelConfirm(builder) {
611
+ return this.component(AupConfirmDialog, builder);
612
+ }
613
+ }
614
+
615
+ let urlSerialiser = new DefaultUrlSerializer();
616
+ class Path {
617
+ constructor(segments) {
618
+ this.segments = segments;
619
+ }
620
+ static extractVisitParameters(url) {
621
+ var _a, _b;
622
+ let result = {};
623
+ const urlTree = urlSerialiser.parse(url);
624
+ const urlSegments = (_b = (_a = urlTree.root.children.primary) === null || _a === void 0 ? void 0 : _a.segments) !== null && _b !== void 0 ? _b : [];
625
+ urlSegments === null || urlSegments === void 0 ? void 0 : urlSegments.forEach(s => {
626
+ result = Object.assign(Object.assign({}, result), s.parameters);
627
+ });
628
+ return result;
629
+ }
630
+ toUrl(matrixParams) {
631
+ return this.segments.map(s => s.toUrlPart(matrixParams)).join('/');
632
+ }
633
+ }
634
+ (function (Path) {
635
+ function setUrlSerialiser(serialiser) {
636
+ urlSerialiser = serialiser;
637
+ }
638
+ Path.setUrlSerialiser = setUrlSerialiser;
639
+ class Segment {
640
+ constructor(path, params = {}) {
641
+ var _a;
642
+ this.path = path;
643
+ this.routeId = params === null || params === void 0 ? void 0 : params.routeId;
644
+ this.visitParams = (_a = params === null || params === void 0 ? void 0 : params.visitParams) !== null && _a !== void 0 ? _a : [];
645
+ }
646
+ toUrlPart(params) {
647
+ let path = this.path;
648
+ this.visitParams.forEach(p => {
649
+ const value = params[p];
650
+ if (value) {
651
+ path = `${path};${p}=${value}`;
652
+ }
653
+ });
654
+ if (this.routeId && params[this.routeId]) {
655
+ path = path + '/' + params[this.routeId];
656
+ }
657
+ return path;
658
+ }
659
+ }
660
+ Path.Segment = Segment;
661
+ class Builder {
358
662
  constructor() {
359
- super(undefined, undefined);
360
- this.rootElementSelector = 'body';
663
+ this.segments = [];
664
+ }
665
+ segment(name, params) {
666
+ const builder = new Segment(name, params);
667
+ this.segments.push(builder);
668
+ return this;
361
669
  }
362
- element() {
363
- return cy.get(this.rootElementSelector);
670
+ getPath() {
671
+ return new Path(this.segments);
364
672
  }
365
673
  }
366
- })(Section || (Section = {}));
674
+ Path.Builder = Builder;
675
+ })(Path || (Path = {}));
367
676
 
368
677
  class Page extends PageElement {
369
678
  constructor(path) {
@@ -371,7 +680,7 @@ class Page extends PageElement {
371
680
  this.path = path;
372
681
  this.rootElementSelector = 'body';
373
682
  }
374
- element() {
683
+ dom() {
375
684
  return cy.get(this.rootElementSelector);
376
685
  }
377
686
  visit(visitParams, queryParams) {
@@ -381,7 +690,9 @@ class Page extends PageElement {
381
690
  tryAndVisit(params, queryParams) {
382
691
  const path = this.path.toUrl(params !== null && params !== void 0 ? params : {});
383
692
  const queryString = queryParams ? `?${new URLSearchParams(queryParams).toString()}` : '';
384
- cy.visit(`/${path}${queryString}`);
693
+ const fullPath = `/${path}${queryString}`;
694
+ cy.log(`Visiting -> ${fullPath}`);
695
+ cy.visit(fullPath);
385
696
  }
386
697
  shouldHaveActivityIds(...ids) {
387
698
  cy.location('search').should('contain', `?aup-interactions=${ids.join('--')}`);
@@ -394,71 +705,73 @@ class Page extends PageElement {
394
705
  }
395
706
  shouldBeActive(withParameters) {
396
707
  // Note: cy.window() doesn't return a promise... it's a chainable.
397
- cy["waitUntil"](() => {
708
+ cy['waitUntil'](() => {
398
709
  return cy.window().then(window => {
399
710
  return window['aup.PlaceRouter'] && !window['aup.PlaceRouter'].isNavigating();
400
711
  });
401
712
  });
402
713
  if (withParameters) {
403
- cy.location('pathname').then(path => {
404
- const urlParams = Path.extractVisitParameters(path);
405
- Object.keys(withParameters).forEach(param => {
406
- const expected = withParameters[param];
407
- // @ts-ignore
408
- expect(urlParams[param]).to.equal(expected);
409
- });
410
- });
714
+ this.shouldIncludeParameters(withParameters);
411
715
  }
412
716
  }
717
+ shouldIncludeParameters(parameters) {
718
+ cy.location('pathname').then(path => {
719
+ const urlParams = Path.extractVisitParameters(path);
720
+ Object.keys(parameters).forEach(param => {
721
+ const expected = parameters[param];
722
+ const actual = urlParams[param];
723
+ // cy.log(`${actual} - ${expected}`);
724
+ expect(urlParams[param]).to.equal(expected);
725
+ });
726
+ });
727
+ }
728
+ shouldNotHaveParameter(name) {
729
+ this.getUrlParameters().then(params => {
730
+ expect(params[name]).to.be.undefined;
731
+ });
732
+ }
733
+ getUrlParameters() {
734
+ return cy.location('pathname').then(path => Path.extractVisitParameters(path));
735
+ }
413
736
  }
414
737
  (function (Page) {
415
- function create(pathOrPathBuilder, page) {
738
+ function create(pathOrPathBuilder, builder) {
416
739
  const pathBuilder = new Path.Builder();
417
740
  if (_.isString(pathOrPathBuilder)) {
418
- pathOrPathBuilder.split("/").filter(p => !_.isEmpty(p)).forEach(p => pathBuilder.segment(p));
741
+ pathOrPathBuilder.split('/').filter(p => !_.isEmpty(p)).forEach(p => pathBuilder.segment(p));
419
742
  }
420
743
  else {
421
744
  pathOrPathBuilder(pathBuilder);
422
745
  }
423
- const builder = new PageBuilder(pathBuilder.getPath());
424
- return Mixin.createProxy(page(builder), builder);
746
+ const instance = new Page(pathBuilder.getPath());
747
+ const content = builder.call(instance, new PageBuilder(instance));
748
+ return Mixin.createProxy(content, instance);
425
749
  }
426
750
  Page.create = create;
427
- class PageBuilder extends Section.Mixin(Page) {
428
- }
429
- Page.PageBuilder = PageBuilder;
430
751
  })(Page || (Page = {}));
431
752
 
432
753
  class AupCommandGroup extends PageElement {
433
754
  }
434
755
 
435
- class AupMoreMenu extends PageElement {
436
- static create(parent) {
437
- return new AupMoreMenu(parent, 'aup-more-menu');
756
+ class AupToolBar extends PageElement {
757
+ static create(parent, face) {
758
+ // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
759
+ // return new AupCommandGroup(() => findFace().closest('button'));
438
760
  }
439
761
  }
440
762
 
441
- class AupPopupMenu extends PageElement {
763
+ class AupPopupMenu extends AupAbstractPopupMenu {
442
764
  constructor(parentElementAccessor, face) {
443
- const accessor = AupCommandFace.createAccessor(face);
444
- super(parentElementAccessor, {
445
- findIn(parent) {
446
- return accessor.findIn(parent).closest('button');
447
- },
448
- shouldNotExist(parent) {
449
- accessor.shouldNotExist(parent);
450
- }
451
- });
765
+ const locator = AupCommandFace.createElementLocator(face);
766
+ super(parentElementAccessor, parent => locator(parent).closest('button'));
452
767
  }
453
768
  static create(parent, face) {
454
769
  return new AupPopupMenu(parent, face);
455
770
  }
456
771
  }
457
772
 
458
- class AupToolBar extends PageElement {
459
- static create(parent, face) {
460
- // const findFace = AupCommandFace.createFinder(() => parent.element(), face)
461
- // return new AupCommandGroup(() => findFace().closest('button'));
773
+ class AupTableSelectionCell extends AupTableCell {
774
+ selectAll() {
462
775
  }
463
776
  }
464
777
 
@@ -470,5 +783,5 @@ class AupToolBar extends PageElement {
470
783
  * Generated bundle index. Do not edit.
471
784
  */
472
785
 
473
- export { AupCommand, AupCommandFace, AupCommandGroup, AupInput, AupMoreMenu, AupNavigation, AupPopupMenu, AupTable, AupToolBar, Button, ButtonMixin, FaceAccessor, Page, PageElement, Path, Section };
786
+ export { AupAbstractActivity, AupAbstractPopupMenu, AupAbstractTable, AupActivity, AupAlert, AupAlertDialog, AupCommand, AupCommandFace, AupCommandGroup, AupConfirm, AupConfirmDialog, AupEmptyState, AupInput, AupModalActivity, AupModalMixin, AupMoreMenu, AupNavigation, AupPopupMenu, AupPopupMenuPanel, AupTable, AupTableCell, AupTableColumn, AupTableRow, AupTableSelectionCell, AupTableSelectionColumn, AupToolBar, AupTreeTable, Button, ComponentBuilder, ElementLocator, FormElementMixin, MatCheckbox, Page, PageBuilder, PageElement, Path };
474
787
  //# sourceMappingURL=coolon-angular-ui-powerups-cypress.js.map