@theseam/ui-common 0.2.12 → 0.2.16

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 (328) hide show
  1. package/assets/vendor/intl-tel-input/js/utils.js +255 -254
  2. package/bundles/theseam-ui-common-asset-reader.umd.js +7 -9
  3. package/bundles/theseam-ui-common-asset-reader.umd.js.map +1 -1
  4. package/bundles/theseam-ui-common-breadcrumbs.umd.js +6 -8
  5. package/bundles/theseam-ui-common-breadcrumbs.umd.js.map +1 -1
  6. package/bundles/theseam-ui-common-buttons.umd.js +5 -5
  7. package/bundles/theseam-ui-common-buttons.umd.js.map +1 -1
  8. package/bundles/theseam-ui-common-card.umd.js +6 -6
  9. package/bundles/theseam-ui-common-card.umd.js.map +1 -1
  10. package/bundles/theseam-ui-common-checkbox.umd.js +4 -4
  11. package/bundles/theseam-ui-common-checkbox.umd.js.map +1 -1
  12. package/bundles/theseam-ui-common-confirm-dialog.umd.js +4 -4
  13. package/bundles/theseam-ui-common-confirm-dialog.umd.js.map +1 -1
  14. package/bundles/theseam-ui-common-core.umd.js +4 -4
  15. package/bundles/theseam-ui-common-core.umd.js.map +1 -1
  16. package/bundles/theseam-ui-common-data-exporter.umd.js +5 -5
  17. package/bundles/theseam-ui-common-data-filters.umd.js +9 -6
  18. package/bundles/theseam-ui-common-data-filters.umd.js.map +1 -1
  19. package/bundles/theseam-ui-common-datatable-dynamic.umd.js +7 -7
  20. package/bundles/theseam-ui-common-datatable-dynamic.umd.js.map +1 -1
  21. package/bundles/theseam-ui-common-datatable.umd.js +1308 -378
  22. package/bundles/theseam-ui-common-datatable.umd.js.map +1 -1
  23. package/bundles/theseam-ui-common-dynamic-component-loader.umd.js +5 -7
  24. package/bundles/theseam-ui-common-dynamic-component-loader.umd.js.map +1 -1
  25. package/bundles/theseam-ui-common-dynamic.umd.js +7 -9
  26. package/bundles/theseam-ui-common-dynamic.umd.js.map +1 -1
  27. package/bundles/theseam-ui-common-footer-bar.umd.js +3 -3
  28. package/bundles/theseam-ui-common-form-field-error.umd.js +5 -5
  29. package/bundles/theseam-ui-common-form-field-error.umd.js.map +1 -1
  30. package/bundles/theseam-ui-common-form-field.umd.js +5 -5
  31. package/bundles/theseam-ui-common-form-field.umd.js.map +1 -1
  32. package/bundles/theseam-ui-common-framework.umd.js +27 -29
  33. package/bundles/theseam-ui-common-framework.umd.js.map +1 -1
  34. package/bundles/theseam-ui-common-graphql.umd.js +958 -8
  35. package/bundles/theseam-ui-common-graphql.umd.js.map +1 -1
  36. package/bundles/theseam-ui-common-icon.umd.js +5 -5
  37. package/bundles/theseam-ui-common-icon.umd.js.map +1 -1
  38. package/bundles/theseam-ui-common-layout.umd.js +5 -7
  39. package/bundles/theseam-ui-common-layout.umd.js.map +1 -1
  40. package/bundles/theseam-ui-common-loading.umd.js +4 -4
  41. package/bundles/theseam-ui-common-menu.umd.js +5 -5
  42. package/bundles/theseam-ui-common-menu.umd.js.map +1 -1
  43. package/bundles/theseam-ui-common-modal.umd.js +6 -6
  44. package/bundles/theseam-ui-common-modal.umd.js.map +1 -1
  45. package/bundles/theseam-ui-common-models.umd.js +3 -3
  46. package/bundles/theseam-ui-common-popover.umd.js +4 -4
  47. package/bundles/theseam-ui-common-progress.umd.js +5 -5
  48. package/bundles/theseam-ui-common-progress.umd.js.map +1 -1
  49. package/bundles/theseam-ui-common-scrollbar.umd.js +7 -9
  50. package/bundles/theseam-ui-common-scrollbar.umd.js.map +1 -1
  51. package/bundles/theseam-ui-common-services.umd.js +6 -8
  52. package/bundles/theseam-ui-common-services.umd.js.map +1 -1
  53. package/bundles/theseam-ui-common-shared.umd.js +4 -4
  54. package/bundles/theseam-ui-common-shared.umd.js.map +1 -1
  55. package/bundles/theseam-ui-common-storage.umd.js +5 -7
  56. package/bundles/theseam-ui-common-storage.umd.js.map +1 -1
  57. package/bundles/theseam-ui-common-story-helpers.umd.js +4 -4
  58. package/bundles/theseam-ui-common-story-helpers.umd.js.map +1 -1
  59. package/bundles/theseam-ui-common-tabbed.umd.js +5 -5
  60. package/bundles/theseam-ui-common-tabbed.umd.js.map +1 -1
  61. package/bundles/theseam-ui-common-table-cell-type.umd.js +5 -7
  62. package/bundles/theseam-ui-common-table-cell-type.umd.js.map +1 -1
  63. package/bundles/theseam-ui-common-table-cell-types.umd.js +16 -16
  64. package/bundles/theseam-ui-common-table-cell-types.umd.js.map +1 -1
  65. package/bundles/theseam-ui-common-table.umd.js +5 -5
  66. package/bundles/theseam-ui-common-table.umd.js.map +1 -1
  67. package/bundles/theseam-ui-common-tel-input.umd.js +6 -6
  68. package/bundles/theseam-ui-common-tel-input.umd.js.map +1 -1
  69. package/bundles/theseam-ui-common-testing.umd.js +568 -0
  70. package/bundles/theseam-ui-common-testing.umd.js.map +1 -0
  71. package/bundles/theseam-ui-common-tiled-select.umd.js +56 -39
  72. package/bundles/theseam-ui-common-tiled-select.umd.js.map +1 -1
  73. package/bundles/theseam-ui-common-toggle-edit.umd.js +8 -10
  74. package/bundles/theseam-ui-common-toggle-edit.umd.js.map +1 -1
  75. package/bundles/theseam-ui-common-toggle-group.umd.js +4 -4
  76. package/bundles/theseam-ui-common-toggle-group.umd.js.map +1 -1
  77. package/bundles/theseam-ui-common-unsaved-changes-dialog.umd.js +5 -7
  78. package/bundles/theseam-ui-common-unsaved-changes-dialog.umd.js.map +1 -1
  79. package/bundles/theseam-ui-common-utils.umd.js +174 -81
  80. package/bundles/theseam-ui-common-utils.umd.js.map +1 -1
  81. package/bundles/theseam-ui-common-validators.umd.js +3 -3
  82. package/bundles/theseam-ui-common-viewers.umd.js +6 -8
  83. package/bundles/theseam-ui-common-viewers.umd.js.map +1 -1
  84. package/bundles/theseam-ui-common-widget.umd.js +18 -20
  85. package/bundles/theseam-ui-common-widget.umd.js.map +1 -1
  86. package/bundles/theseam-ui-common.umd.js +2 -2
  87. package/buttons/theseam-ui-common-buttons.metadata.json +1 -1
  88. package/card/theseam-ui-common-card.metadata.json +1 -1
  89. package/data-filters/data-filter.d.ts +10 -6
  90. package/data-filters/theseam-ui-common-data-filters.metadata.json +1 -1
  91. package/datatable/datatable/datatable.component.d.ts +46 -32
  92. package/datatable/datatable-column/datatable-column.component.d.ts +26 -25
  93. package/datatable/datatable-column-preferences/datatable-column-preferences.component.d.ts +6 -5
  94. package/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.d.ts +7 -1
  95. package/datatable/datatable-menu-bar/datatable-menu-bar.component.d.ts +1 -1
  96. package/datatable/directives/datatable-filter.directive.d.ts +1 -1
  97. package/datatable/models/columns-alteration.d.ts +61 -0
  98. package/datatable/models/columns-alterations/hide-column.columns-alteration.d.ts +15 -0
  99. package/datatable/models/columns-alterations/order.columns-alteration.d.ts +20 -0
  100. package/datatable/models/columns-alterations/sort.columns-alteration.d.ts +14 -0
  101. package/datatable/models/columns-alterations/width.columns-alteration.d.ts +16 -0
  102. package/datatable/models/datatable-accessor.d.ts +5 -3
  103. package/datatable/models/internal-column-props.d.ts +7 -0
  104. package/datatable/models/page-info.d.ts +12 -0
  105. package/datatable/models/preferences-accessor.d.ts +1 -1
  106. package/datatable/models/preferences.d.ts +11 -3
  107. package/datatable/models/sort-item.d.ts +2 -1
  108. package/datatable/services/columns-alterations-manager.service.d.ts +39 -0
  109. package/datatable/services/columns-manager.service.d.ts +55 -0
  110. package/datatable/services/datatable-preferences.service.d.ts +10 -7
  111. package/datatable/theseam-ui-common-datatable.d.ts +2 -0
  112. package/datatable/theseam-ui-common-datatable.metadata.json +1 -1
  113. package/datatable/tokens/datatable-preferences-accessor.d.ts +2 -2
  114. package/datatable/utils/create-action-menu-column.d.ts +3 -0
  115. package/datatable/utils/create-checkbox-column.d.ts +3 -0
  116. package/datatable/utils/get-column-prop.d.ts +5 -0
  117. package/datatable/utils/map-columns-alterations-states.d.ts +2 -0
  118. package/datatable/utils/remove-unused-diffs.d.ts +7 -0
  119. package/datatable/utils/set-column-defaults.d.ts +2 -0
  120. package/datatable/utils/translate-templates.d.ts +2 -0
  121. package/datatable/utils/with-stored-column-info.d.ts +2 -2
  122. package/datatable-dynamic/theseam-ui-common-datatable-dynamic.metadata.json +1 -1
  123. package/esm2015/buttons/progress-circle-button/progress-circle-button.component.js +1 -1
  124. package/esm2015/card/card-action/card-action.component.js +1 -1
  125. package/esm2015/card/card-body/card-body.component.js +1 -1
  126. package/esm2015/data-filters/data-filter.js +5 -2
  127. package/esm2015/data-filters/filters/data-filter-search/data-filter-search.component.js +1 -1
  128. package/esm2015/data-filters/filters/data-filter-text/data-filter-text.component.js +1 -1
  129. package/esm2015/datatable/datatable/datatable.component.js +195 -211
  130. package/esm2015/datatable/datatable-action-menu/datatable-action-menu.component.js +1 -1
  131. package/esm2015/datatable/datatable-column/datatable-column.component.js +1 -1
  132. package/esm2015/datatable/datatable-column-preferences/datatable-column-preferences.component.js +36 -19
  133. package/esm2015/datatable/datatable-column-preferences-button/datatable-column-preferences-button.component.js +38 -4
  134. package/esm2015/datatable/datatable-export-button/datatable-export-button.component.js +9 -6
  135. package/esm2015/datatable/datatable-menu-bar/datatable-menu-bar.component.js +1 -1
  136. package/esm2015/datatable/datatable-menu-bar-column-center/datatable-menu-bar-column-center.component.js +1 -1
  137. package/esm2015/datatable/datatable-menu-bar-column-left/datatable-menu-bar-column-left.component.js +1 -1
  138. package/esm2015/datatable/datatable-menu-bar-column-right/datatable-menu-bar-column-right.component.js +1 -1
  139. package/esm2015/datatable/datatable-menu-bar-row/datatable-menu-bar-row.component.js +1 -1
  140. package/esm2015/datatable/models/columns-alteration.js +38 -0
  141. package/esm2015/datatable/models/columns-alterations/hide-column.columns-alteration.js +38 -0
  142. package/esm2015/datatable/models/columns-alterations/order.columns-alteration.js +81 -0
  143. package/esm2015/datatable/models/columns-alterations/sort.columns-alteration.js +33 -0
  144. package/esm2015/datatable/models/columns-alterations/width.columns-alteration.js +41 -0
  145. package/esm2015/datatable/models/datatable-accessor.js +1 -1
  146. package/esm2015/datatable/models/internal-column-props.js +15 -0
  147. package/esm2015/datatable/models/page-info.js +1 -1
  148. package/esm2015/datatable/models/preferences-accessor.js +1 -1
  149. package/esm2015/datatable/models/preferences.js +6 -2
  150. package/esm2015/datatable/models/sort-item.js +1 -1
  151. package/esm2015/datatable/services/columns-alterations-manager.service.js +134 -0
  152. package/esm2015/datatable/services/columns-manager.service.js +257 -0
  153. package/esm2015/datatable/services/datatable-preferences.service.js +78 -32
  154. package/esm2015/datatable/theseam-ui-common-datatable.js +3 -1
  155. package/esm2015/datatable/tokens/datatable-preferences-accessor.js +2 -2
  156. package/esm2015/datatable/utils/create-action-menu-column.js +18 -0
  157. package/esm2015/datatable/utils/create-checkbox-column.js +15 -0
  158. package/esm2015/datatable/utils/get-column-prop.js +9 -0
  159. package/esm2015/datatable/utils/map-columns-alterations-states.js +39 -0
  160. package/esm2015/datatable/utils/remove-unused-diffs.js +9 -0
  161. package/esm2015/datatable/utils/set-column-defaults.js +10 -0
  162. package/esm2015/datatable/utils/translate-templates.js +12 -0
  163. package/esm2015/datatable/utils/with-stored-column-info.js +1 -1
  164. package/esm2015/datatable-dynamic/datatable-dynamic-action-menu/datatable-dynamic-action-menu.component.js +1 -1
  165. package/esm2015/datatable-dynamic/datatable-dynamic-filter-container/datatable-dynamic-filter-container.component.js +1 -1
  166. package/esm2015/datatable-dynamic/datatable-dynamic.component.js +1 -1
  167. package/esm2015/form-field/form-field.component.js +1 -1
  168. package/esm2015/form-field-error/form-field-error/form-field-error.component.js +1 -1
  169. package/esm2015/framework/base-layout/base-layout.component.js +1 -1
  170. package/esm2015/framework/dashboard/dashboard-widgets/dashboard-widgets.component.js +1 -1
  171. package/esm2015/framework/dynamic-router/hierarchy-router-outlet/hierarchy-router-outlet.component.js +1 -1
  172. package/esm2015/framework/schema-form-controls/schema-form-input/schema-form-input.component.js +1 -1
  173. package/esm2015/framework/schema-form-controls/schema-form-number/schema-form-number.component.js +1 -1
  174. package/esm2015/framework/schema-form-controls/schema-form-select/schema-form-select.component.js +1 -1
  175. package/esm2015/framework/schema-form-controls/schema-form-submit-split/schema-form-submit-split.component.js +1 -1
  176. package/esm2015/framework/side-nav/side-nav-item/side-nav-item.component.js +1 -1
  177. package/esm2015/framework/side-nav/side-nav-toggle/side-nav-toggle.component.js +1 -1
  178. package/esm2015/framework/side-nav/side-nav.component.js +1 -1
  179. package/esm2015/framework/top-bar/top-bar-menu-button/top-bar-menu-button.component.js +1 -1
  180. package/esm2015/framework/top-bar/top-bar-title/top-bar-title.component.js +1 -1
  181. package/esm2015/framework/top-bar/top-bar.component.js +1 -1
  182. package/esm2015/graphql/datatable/create-page-info-observable.js +38 -0
  183. package/esm2015/graphql/datatable/datatable-graphql-query-ref.js +236 -0
  184. package/esm2015/graphql/datatable/datatable-graphql.service.js +35 -0
  185. package/esm2015/graphql/datatable/datatable-helpers.js +170 -0
  186. package/esm2015/graphql/datatable/get-page-info.js +11 -0
  187. package/esm2015/graphql/datatable/index.js +7 -0
  188. package/esm2015/graphql/datatable/map-filter-states.js +64 -0
  189. package/esm2015/graphql/datatable/map-page-info.js +14 -0
  190. package/esm2015/graphql/datatable/mapper-context.js +2 -0
  191. package/esm2015/graphql/models/gql-datatable-accessor.js +2 -0
  192. package/esm2015/graphql/models/index.js +2 -1
  193. package/esm2015/graphql/models/query-processing-config.js +1 -1
  194. package/esm2015/graphql/public-api.js +2 -1
  195. package/esm2015/graphql/utils/parse-hints.js +3 -3
  196. package/esm2015/icon/icon/icon.component.js +1 -1
  197. package/esm2015/loading/loading/loading.component.js +1 -1
  198. package/esm2015/menu/menu.component.js +1 -1
  199. package/esm2015/modal/modal-body/modal-body.component.js +1 -1
  200. package/esm2015/modal/modal-container/modal-container.component.js +1 -1
  201. package/esm2015/popover/popover/popover.component.js +1 -1
  202. package/esm2015/progress/progress-circle/progress-circle.component.js +1 -1
  203. package/esm2015/tabbed/tabbed.component.js +1 -1
  204. package/esm2015/table/table/table.component.js +1 -1
  205. package/esm2015/table-cell-types/table-cell-type-icon/table-cell-type-icon.component.js +1 -1
  206. package/esm2015/table-cell-types/table-cell-type-progress-circle/table-cell-type-progress-circle.component.js +1 -1
  207. package/esm2015/tel-input/tel-input/tel-input.component.js +1 -1
  208. package/esm2015/testing/current-tick-time.js +16 -0
  209. package/esm2015/testing/fake-toastr.js +29 -0
  210. package/esm2015/testing/get-harness.js +16 -0
  211. package/esm2015/testing/public-api.js +7 -0
  212. package/esm2015/testing/render-story.js +12 -0
  213. package/esm2015/testing/story-expect.js +39 -0
  214. package/esm2015/testing/theseam-ui-common-testing.js +5 -0
  215. package/esm2015/testing/tick-helper.js +74 -0
  216. package/esm2015/tiled-select/components/tiled-select/tiled-select.component.js +25 -17
  217. package/esm2015/tiled-select/components/tiled-select-tile/tiled-select-tile.component.js +5 -2
  218. package/esm2015/tiled-select/components/tiled-select-tile-icon/tiled-select-tile-icon.component.js +1 -1
  219. package/esm2015/tiled-select/public-api.js +2 -1
  220. package/esm2015/tiled-select/tiled-select.models.js +1 -1
  221. package/esm2015/tiled-select/tiled-select.module.js +4 -4
  222. package/esm2015/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.js +1 -1
  223. package/esm2015/toggle-edit/toggle-edit.component.js +1 -1
  224. package/esm2015/utils/array-move.js +62 -0
  225. package/esm2015/utils/public-api.js +2 -1
  226. package/esm2015/utils/router/is-empty-url-route.js +1 -1
  227. package/esm2015/utils/subscriber-count.js +31 -4
  228. package/esm2015/widget/widget/widget.component.js +1 -1
  229. package/esm2015/widget/widget-content-components/widget-button-group/widget-button-group.component.js +1 -1
  230. package/esm2015/widget/widget-content-components/widget-content-header/widget-content-header.component.js +1 -1
  231. package/esm2015/widget/widget-content-components/widget-empty-label/widget-empty-label.component.js +1 -1
  232. package/esm2015/widget/widget-content-components/widget-footer-link/widget-footer-link.component.js +1 -1
  233. package/esm2015/widget/widget-content-components/widget-footer-text/widget-footer-text.component.js +1 -1
  234. package/esm2015/widget/widget-content-components/widget-header-badge/widget-header-badge.component.js +1 -1
  235. package/esm2015/widget/widget-content-components/widget-tile/widget-tile-footer-item/widget-tile-footer-item.component.js +1 -1
  236. package/esm2015/widget/widget-content-components/widget-tile/widget-tile-group/widget-tile-group.component.js +1 -1
  237. package/esm2015/widget/widget-content-components/widget-tile/widget-tile.component.js +1 -1
  238. package/esm2015/widget/widget-content-components/widget-tile-list/widget-tile-list.component.js +1 -1
  239. package/esm2015/widget/widget-footer/widget-footer.component.js +1 -1
  240. package/fesm2015/theseam-ui-common-buttons.js +1 -1
  241. package/fesm2015/theseam-ui-common-card.js +2 -2
  242. package/fesm2015/theseam-ui-common-data-filters.js +6 -3
  243. package/fesm2015/theseam-ui-common-data-filters.js.map +1 -1
  244. package/fesm2015/theseam-ui-common-datatable-dynamic.js +3 -3
  245. package/fesm2015/theseam-ui-common-datatable.js +1100 -319
  246. package/fesm2015/theseam-ui-common-datatable.js.map +1 -1
  247. package/fesm2015/theseam-ui-common-form-field-error.js +1 -1
  248. package/fesm2015/theseam-ui-common-form-field.js +1 -1
  249. package/fesm2015/theseam-ui-common-framework.js +13 -13
  250. package/fesm2015/theseam-ui-common-graphql.js +555 -5
  251. package/fesm2015/theseam-ui-common-graphql.js.map +1 -1
  252. package/fesm2015/theseam-ui-common-icon.js +1 -1
  253. package/fesm2015/theseam-ui-common-loading.js +1 -1
  254. package/fesm2015/theseam-ui-common-menu.js +1 -1
  255. package/fesm2015/theseam-ui-common-modal.js +2 -2
  256. package/fesm2015/theseam-ui-common-popover.js +1 -1
  257. package/fesm2015/theseam-ui-common-progress.js +1 -1
  258. package/fesm2015/theseam-ui-common-tabbed.js +1 -1
  259. package/fesm2015/theseam-ui-common-table-cell-types.js +2 -2
  260. package/fesm2015/theseam-ui-common-table.js +1 -1
  261. package/fesm2015/theseam-ui-common-tel-input.js +1 -1
  262. package/fesm2015/theseam-ui-common-testing.js +191 -0
  263. package/fesm2015/theseam-ui-common-testing.js.map +1 -0
  264. package/fesm2015/theseam-ui-common-tiled-select.js +34 -21
  265. package/fesm2015/theseam-ui-common-tiled-select.js.map +1 -1
  266. package/fesm2015/theseam-ui-common-toggle-edit.js +2 -2
  267. package/fesm2015/theseam-ui-common-utils.js +92 -4
  268. package/fesm2015/theseam-ui-common-utils.js.map +1 -1
  269. package/fesm2015/theseam-ui-common-widget.js +12 -12
  270. package/form-field/theseam-ui-common-form-field.metadata.json +1 -1
  271. package/form-field-error/theseam-ui-common-form-field-error.metadata.json +1 -1
  272. package/framework/theseam-ui-common-framework.metadata.json +1 -1
  273. package/graphql/datatable/create-page-info-observable.d.ts +4 -0
  274. package/graphql/datatable/datatable-graphql-query-ref.d.ts +65 -0
  275. package/graphql/datatable/datatable-graphql.service.d.ts +26 -0
  276. package/graphql/datatable/datatable-helpers.d.ts +12 -0
  277. package/graphql/datatable/get-page-info.d.ts +4 -0
  278. package/graphql/datatable/index.d.ts +6 -0
  279. package/graphql/datatable/map-filter-states.d.ts +18 -0
  280. package/graphql/datatable/map-page-info.d.ts +11 -0
  281. package/graphql/datatable/mapper-context.d.ts +6 -0
  282. package/graphql/models/gql-datatable-accessor.d.ts +9 -0
  283. package/graphql/models/index.d.ts +1 -0
  284. package/graphql/models/query-processing-config.d.ts +4 -0
  285. package/graphql/public-api.d.ts +1 -0
  286. package/graphql/theseam-ui-common-graphql.metadata.json +1 -1
  287. package/icon/theseam-ui-common-icon.metadata.json +1 -1
  288. package/loading/theseam-ui-common-loading.metadata.json +1 -1
  289. package/menu/theseam-ui-common-menu.metadata.json +1 -1
  290. package/modal/theseam-ui-common-modal.metadata.json +1 -1
  291. package/package.json +1 -1
  292. package/popover/theseam-ui-common-popover.metadata.json +1 -1
  293. package/progress/theseam-ui-common-progress.metadata.json +1 -1
  294. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +54 -52
  295. package/tabbed/theseam-ui-common-tabbed.metadata.json +1 -1
  296. package/table/theseam-ui-common-table.metadata.json +1 -1
  297. package/table-cell-types/theseam-ui-common-table-cell-types.metadata.json +1 -1
  298. package/tel-input/theseam-ui-common-tel-input.metadata.json +1 -1
  299. package/testing/current-tick-time.d.ts +13 -0
  300. package/testing/fake-toastr.d.ts +30 -0
  301. package/testing/get-harness.d.ts +7 -0
  302. package/testing/package.json +11 -0
  303. package/testing/public-api.d.ts +6 -0
  304. package/testing/render-story.d.ts +2 -0
  305. package/testing/story-expect.d.ts +5 -0
  306. package/{test-helpers/theseam-ui-common-test-helpers.d.ts → testing/theseam-ui-common-testing.d.ts} +0 -0
  307. package/testing/theseam-ui-common-testing.metadata.json +1 -0
  308. package/{test-helpers → testing}/tick-helper.d.ts +0 -0
  309. package/tiled-select/components/tiled-select/tiled-select.component.d.ts +7 -3
  310. package/tiled-select/components/tiled-select-tile/tiled-select-tile.component.d.ts +1 -0
  311. package/tiled-select/theseam-ui-common-tiled-select.metadata.json +1 -1
  312. package/tiled-select/tiled-select.models.d.ts +3 -1
  313. package/toggle-edit/theseam-ui-common-toggle-edit.metadata.json +1 -1
  314. package/utils/array-move.d.ts +49 -0
  315. package/utils/public-api.d.ts +1 -0
  316. package/utils/subscriber-count.d.ts +13 -1
  317. package/utils/theseam-ui-common-utils.metadata.json +1 -1
  318. package/widget/theseam-ui-common-widget.metadata.json +1 -1
  319. package/bundles/theseam-ui-common-test-helpers.umd.js +0 -94
  320. package/bundles/theseam-ui-common-test-helpers.umd.js.map +0 -1
  321. package/esm2015/test-helpers/public-api.js +0 -2
  322. package/esm2015/test-helpers/theseam-ui-common-test-helpers.js +0 -5
  323. package/esm2015/test-helpers/tick-helper.js +0 -74
  324. package/fesm2015/theseam-ui-common-test-helpers.js +0 -81
  325. package/fesm2015/theseam-ui-common-test-helpers.js.map +0 -1
  326. package/test-helpers/package.json +0 -11
  327. package/test-helpers/public-api.d.ts +0 -1
  328. package/test-helpers/theseam-ui-common-test-helpers.metadata.json +0 -1
@@ -2,7 +2,7 @@ import { __decorate } from 'tslib';
2
2
  import { animation, style, stagger, animate, trigger, transition, query, useAnimation, keyframes } from '@angular/animations';
3
3
  import { coerceArray } from '@angular/cdk/coercion';
4
4
  import { Platform } from '@angular/cdk/platform';
5
- import { Directive, TemplateRef, Input, forwardRef, EventEmitter, Component, ChangeDetectorRef, Output, ContentChildren, HostBinding, ContentChild, NgModule } from '@angular/core';
5
+ import { Directive, TemplateRef, Input, forwardRef, EventEmitter, Component, ChangeDetectorRef, Renderer2, ElementRef, Output, ContentChildren, HostBinding, ContentChild, NgModule } from '@angular/core';
6
6
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import { InputBoolean } from '@theseam/ui-common/core';
8
8
  import { faCheckCircle } from '@fortawesome/free-regular-svg-icons';
@@ -36,13 +36,15 @@ const slideEnterAnimation = animation([
36
36
  const TILED_SELECT_VALUE_ACCESSOR = {
37
37
  provide: NG_VALUE_ACCESSOR,
38
38
  // tslint:disable-next-line:no-use-before-declare
39
- useExisting: forwardRef(() => TiledSelectComponent),
39
+ useExisting: forwardRef(() => TheSeamTiledSelectComponent),
40
40
  multi: true,
41
41
  };
42
- class TiledSelectComponent {
43
- constructor(_platform, _cdr) {
42
+ class TheSeamTiledSelectComponent {
43
+ constructor(_platform, _cdr, _renderer, _elementRef) {
44
44
  this._platform = _platform;
45
45
  this._cdr = _cdr;
46
+ this._renderer = _renderer;
47
+ this._elementRef = _elementRef;
46
48
  this.layout = 'grid';
47
49
  this._tiles = [];
48
50
  this.disabled = false;
@@ -85,6 +87,7 @@ class TiledSelectComponent {
85
87
  }
86
88
  set value(value) {
87
89
  this.val = (this.multiple) ? [...(value || [])] : value || '';
90
+ this._renderer.setProperty(this._elementRef.nativeElement, 'value', this.val);
88
91
  if (this.onChange) {
89
92
  this.onChange(this.val);
90
93
  this.change.emit(this.val);
@@ -165,11 +168,14 @@ class TiledSelectComponent {
165
168
  return (this.overlayTpls || []).find(t => { var _a; return ((_a = t.record) === null || _a === void 0 ? void 0 : _a.name) === tile.name; });
166
169
  }
167
170
  }
168
- TiledSelectComponent.decorators = [
171
+ TheSeamTiledSelectComponent.decorators = [
169
172
  { type: Component, args: [{
170
173
  selector: 'seam-tiled-select',
171
- template: "<div class=\"tiled-select--container\"\n [class.grid]=\"layout === 'grid'\"\n [class.list]=\"layout === 'list'\"\n [@tiles]=\"tilesAnimationState\"\n [@.disabled]=\"animationsDisabled\">\n <ng-container *ngFor=\"let tile of tiles\">\n <div class=\"tile-wrapper\" [ngClass]=\"tile.customClass || ''\">\n <seam-tiled-select-tile\n class=\"tiled-select-tile\"\n [ngClass]=\"tile.customClass || ''\"\n [name]=\"tile.name\"\n [label]=\"tile.label\"\n [icon]=\"tile.icon\"\n [disabled]=\"disabled || tile.disabled\"\n [attr.hidden]=\"tile.hidden\"\n [layout]=\"layout\"\n [selected]=\"isSelected(tile)\"\n [selectable]=\"true\"\n [tileBackdrop]=\"tileBackdrop\"\n [showSelectedIcon]=\"showSelectedIcon\"\n [overlayTpl]=\"getOverlayTpl(tile)\"\n (activated)=\"onTileSelected($event, tile)\">\n </seam-tiled-select-tile>\n </div>\n </ng-container>\n</div>\n",
174
+ template: "<div class=\"tiled-select--container\"\n [class.grid]=\"layout === 'grid'\"\n [class.list]=\"layout === 'list'\"\n [@tiles]=\"tilesAnimationState\"\n [@.disabled]=\"animationsDisabled\">\n <ng-container *ngFor=\"let tile of tiles; let index = index\">\n <div class=\"tile-wrapper\" [ngClass]=\"tile.customClass || ''\">\n <seam-tiled-select-tile\n class=\"tiled-select-tile\"\n [ngClass]=\"tile.customClass || ''\"\n [name]=\"tile.name\"\n [label]=\"tile.label\"\n [icon]=\"tile.icon\"\n [disabled]=\"disabled || tile.disabled\"\n [attr.hidden]=\"tile.hidden\"\n [layout]=\"layout\"\n [selected]=\"isSelected(tile)\"\n [selectable]=\"true\"\n [tileBackdrop]=\"tileBackdrop\"\n [showSelectedIcon]=\"showSelectedIcon\"\n [overlayTpl]=\"getOverlayTpl(tile)\"\n (activated)=\"onTileSelected($event, tile)\"\n [attr.data-tile-index]=\"index\"\n [attr.data-testid]=\"tile.name\">\n </seam-tiled-select-tile>\n </div>\n </ng-container>\n</div>\n",
172
175
  providers: [TILED_SELECT_VALUE_ACCESSOR],
176
+ host: {
177
+ '[attr.data-testid]': '"tiled-select"'
178
+ },
173
179
  animations: [
174
180
  trigger('tiles', [
175
181
  transition('* => *', [
@@ -177,14 +183,16 @@ TiledSelectComponent.decorators = [
177
183
  ])
178
184
  ])
179
185
  ],
180
- styles: [":host{display:block;width:100%}.tiled-select--container{display:flex;flex-wrap:wrap;justify-content:center}.tiled-select--container.grid{flex-direction:row}.tiled-select--container.grid .tile-wrapper{padding:12px;width:200px;height:180px}.tiled-select--container.grid .tile-wrapper .tiled-select-tile{height:100%}.tiled-select--container.grid .tile-wrapper.other-org{width:auto;height:auto}@media screen and (max-width:600px){.tiled-select--container.grid .tile-wrapper{padding:6px;width:150px;height:135px}}.tiled-select--container.list{flex-direction:column}.tiled-select--container.list .tile-wrapper{width:100%;height:50px}.tiled-select--container.list .tile-wrapper:not(:last-child){margin-bottom:4px}"]
186
+ styles: [":host{display:block;width:100%}.tiled-select--container{display:flex;flex-wrap:wrap;justify-content:center}.tiled-select--container.grid{flex-direction:row}.tiled-select--container.grid .tile-wrapper{padding:12px;width:200px;height:180px}.tiled-select--container.grid .tile-wrapper .tiled-select-tile{height:100%}.tiled-select--container.grid .tile-wrapper.other-org{width:auto;height:auto}@media screen and (max-width: 600px){.tiled-select--container.grid .tile-wrapper{padding:6px;width:150px;height:135px}}.tiled-select--container.list{flex-direction:column}.tiled-select--container.list .tile-wrapper{width:100%;height:50px}.tiled-select--container.list .tile-wrapper:not(:last-child){margin-bottom:4px}\n"]
181
187
  },] }
182
188
  ];
183
- TiledSelectComponent.ctorParameters = () => [
189
+ TheSeamTiledSelectComponent.ctorParameters = () => [
184
190
  { type: Platform },
185
- { type: ChangeDetectorRef }
191
+ { type: ChangeDetectorRef },
192
+ { type: Renderer2 },
193
+ { type: ElementRef }
186
194
  ];
187
- TiledSelectComponent.propDecorators = {
195
+ TheSeamTiledSelectComponent.propDecorators = {
188
196
  layout: [{ type: Input }],
189
197
  tiles: [{ type: Input }],
190
198
  val: [{ type: Input, args: ['value',] }],
@@ -199,22 +207,22 @@ TiledSelectComponent.propDecorators = {
199
207
  };
200
208
  __decorate([
201
209
  InputBoolean()
202
- ], TiledSelectComponent.prototype, "disabled", void 0);
210
+ ], TheSeamTiledSelectComponent.prototype, "disabled", void 0);
203
211
  __decorate([
204
212
  InputBoolean()
205
- ], TiledSelectComponent.prototype, "multiple", void 0);
213
+ ], TheSeamTiledSelectComponent.prototype, "multiple", void 0);
206
214
  __decorate([
207
215
  InputBoolean()
208
- ], TiledSelectComponent.prototype, "selectionToggleable", void 0);
216
+ ], TheSeamTiledSelectComponent.prototype, "selectionToggleable", void 0);
209
217
  __decorate([
210
218
  InputBoolean()
211
- ], TiledSelectComponent.prototype, "tileBackdrop", void 0);
219
+ ], TheSeamTiledSelectComponent.prototype, "tileBackdrop", void 0);
212
220
  __decorate([
213
221
  InputBoolean()
214
- ], TiledSelectComponent.prototype, "showSelectedIcon", void 0);
222
+ ], TheSeamTiledSelectComponent.prototype, "showSelectedIcon", void 0);
215
223
  __decorate([
216
224
  InputBoolean()
217
- ], TiledSelectComponent.prototype, "animationsDisabled", void 0);
225
+ ], TheSeamTiledSelectComponent.prototype, "animationsDisabled", void 0);
218
226
 
219
227
  class TiledSelectTileLabelTplDirective {
220
228
  constructor(template) {
@@ -257,7 +265,9 @@ class TiledSelectTileComponent {
257
265
  this.activated = new EventEmitter();
258
266
  this.pulsing = false;
259
267
  }
268
+ get _tileNameAttr() { return this.name; }
260
269
  onTileClick(event) {
270
+ console.log('event', event);
261
271
  if (!this.selectable) {
262
272
  return;
263
273
  }
@@ -303,7 +313,7 @@ TiledSelectTileComponent.decorators = [
303
313
  // transition('false <=> true', animate(500))
304
314
  // ])
305
315
  ],
306
- styles: [":host{display:block}.tiled-select-tile-panel{width:100%;height:100%;box-sizing:border-box;border:1px solid #e6e6e6;background-color:#fff;color:#505050;position:relative;overflow:hidden}.tiled-select-tile-panel:disabled:not(.no-grayscale){filter:grayscale(1)}.tiled-select-tile-panel .grey-fix{visibility:hidden;display:block}.tiled-select-tile-panel.selected{border:1px solid #3c96c8}.tiled-select-tile-panel.selectable:hover:not(:disabled){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);cursor:pointer}.tiled-select-tile-panel.selectable:focus:not(:disabled){outline:none}.tiled-select-tile-panel:not(.selectable){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.tiled-select-tile-panel .tiled-select-tile-panel--content{display:flex;height:100%;width:100%}.tiled-select-tile-panel .tiled-select-tile-panel--content .tiled-select-tile-panel--selected{position:absolute;top:4px;right:4px}.tiled-select-tile-panel .tiled-select-tile-panel--content .selected-backdrop{opacity:.2;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:15px;transition:background-color .2s ease-in-out;pointer-events:none}.tiled-select-tile-panel .tiled-select-tile-panel--overlay{position:absolute;top:0;left:0;bottom:0;right:0}.tiled-select-tile-panel.grid{border-radius:15px;padding:0;margin:0}.tiled-select-tile-panel.grid .tiled-select-tile-panel--content{flex-direction:column}.tiled-select-tile-panel.grid .tiled-select-tile-panel--content .selected-backdrop{border-radius:15px}.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container{flex:0 0 auto;height:2.5em;line-height:1em}.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container .tiled-select-tile-panel--label{display:block;font-size:90%;padding:0 1em;white-space:normal}@media screen and (max-width:600px){.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container{height:2rem;line-height:.9em}.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container .tiled-select-tile-panel--label{font-size:13px;padding:0 .7em}}.tiled-select-tile-panel.list{border-radius:10px;padding:4px}.tiled-select-tile-panel.list .tiled-select-tile-panel--content{flex-direction:row}.tiled-select-tile-panel.list .tiled-select-tile-panel--content .selected-backdrop{border-radius:10px}.tiled-select-tile-panel.list .tiled-select-tile-panel--label-container{display:flex;max-height:100%;flex-direction:column;padding-right:40px}.tiled-select-tile-panel.list .tiled-select-tile-panel--label-container .tiled-select-tile-panel--label{padding:0 6px;text-align:left;margin:auto 0;font-size:80%;white-space:normal}.tiled-select-tile-panel.list .tiled-select-tile-panel--selected ::ng-deep .svg-inline--fa{height:39px}:host(.other-org) .tiled-select-tile-panel.grid{border:0}:host(.other-org) .tiled-select-tile-panel.grid.selectable:hover:not(:disabled){box-shadow:0 0}:host(.other-org) .tiled-select-tile-panel.grid.selectable:hover:not(:disabled) .tiled-select-tile-panel--label-container{text-decoration:underline}:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--icon,:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--selected.text-success{display:none}:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container{height:auto;color:#357ebd}:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--label{padding:.5rem 1rem}"]
316
+ styles: [":host{display:block}.tiled-select-tile-panel{width:100%;height:100%;box-sizing:border-box;border:1px solid #e6e6e6;background-color:#fff;color:#505050;position:relative;overflow:hidden}.tiled-select-tile-panel:disabled:not(.no-grayscale){filter:grayscale(1)}.tiled-select-tile-panel .grey-fix{visibility:hidden;display:block}.tiled-select-tile-panel.selected{border:1px solid #3c96c8}.tiled-select-tile-panel.selectable:hover:not(:disabled){box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f;cursor:pointer}.tiled-select-tile-panel.selectable:focus:not(:disabled){outline:none}.tiled-select-tile-panel:not(.selectable){box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.tiled-select-tile-panel .tiled-select-tile-panel--content{display:flex;height:100%;width:100%}.tiled-select-tile-panel .tiled-select-tile-panel--content .tiled-select-tile-panel--selected{position:absolute;top:4px;right:4px}.tiled-select-tile-panel .tiled-select-tile-panel--content .selected-backdrop{opacity:.2;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:15px;transition:ease-in-out .2s background-color;pointer-events:none}.tiled-select-tile-panel .tiled-select-tile-panel--overlay{position:absolute;top:0;left:0;bottom:0;right:0}.tiled-select-tile-panel.grid{border-radius:15px;padding:0;margin:0}.tiled-select-tile-panel.grid .tiled-select-tile-panel--content{flex-direction:column}.tiled-select-tile-panel.grid .tiled-select-tile-panel--content .selected-backdrop{border-radius:15px}.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container{flex:0 0 auto;height:2.5em;line-height:1em}.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container .tiled-select-tile-panel--label{display:block;font-size:90%;padding:0 1em;white-space:normal;white-space:initial}@media screen and (max-width: 600px){.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container{height:2rem;line-height:.9em}.tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container .tiled-select-tile-panel--label{font-size:13px;padding:0 .7em}}.tiled-select-tile-panel.list{border-radius:10px;padding:4px}.tiled-select-tile-panel.list .tiled-select-tile-panel--content{flex-direction:row}.tiled-select-tile-panel.list .tiled-select-tile-panel--content .selected-backdrop{border-radius:10px}.tiled-select-tile-panel.list .tiled-select-tile-panel--label-container{display:flex;max-height:100%;flex-direction:column;padding-right:40px}.tiled-select-tile-panel.list .tiled-select-tile-panel--label-container .tiled-select-tile-panel--label{padding:0 6px;text-align:left;margin:auto 0;font-size:80%;white-space:normal;white-space:initial}.tiled-select-tile-panel.list .tiled-select-tile-panel--selected ::ng-deep .svg-inline--fa{height:39px}:host(.other-org) .tiled-select-tile-panel.grid{border:0}:host(.other-org) .tiled-select-tile-panel.grid.selectable:hover:not(:disabled){box-shadow:0 0}:host(.other-org) .tiled-select-tile-panel.grid.selectable:hover:not(:disabled) .tiled-select-tile-panel--label-container{text-decoration:underline}:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--icon,:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--selected.text-success{display:none}:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--label-container{height:auto;color:#357ebd}:host(.other-org) .tiled-select-tile-panel.grid .tiled-select-tile-panel--label{padding:.5rem 1rem}\n"]
307
317
  },] }
308
318
  ];
309
319
  TiledSelectTileComponent.ctorParameters = () => [
@@ -311,6 +321,7 @@ TiledSelectTileComponent.ctorParameters = () => [
311
321
  ];
312
322
  TiledSelectTileComponent.propDecorators = {
313
323
  pulseAnimationState: [{ type: HostBinding, args: ['@pulse',] }],
324
+ _tileNameAttr: [{ type: HostBinding, args: ['attr.data-tile-name',] }],
314
325
  layout: [{ type: Input }],
315
326
  name: [{ type: Input }],
316
327
  label: [{ type: Input }],
@@ -393,7 +404,7 @@ TiledSelectTileIconComponent.decorators = [
393
404
  { type: Component, args: [{
394
405
  selector: 'seam-tiled-select-tile-icon',
395
406
  template: "<ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <ng-template\n [ngTemplateOutlet]=\"iconTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: icon, icon: icon }\">\n </ng-template>\n</ng-container>\n<ng-template #noIconTpl>\n\n <fa-icon *ngIf=\"_iconObj\"\n class=\"tiled-select-tile-icon--fa {{ iconClass }}\"\n [icon]=\"_iconObj\"></fa-icon>\n\n <ng-container *ngIf=\"_iconUrl\">\n <!-- Partial fix for IE greyscale -->\n <ng-container *ngIf=\"needToFix\">\n <ng-container *ngIf=\"disabled && grayscaleOnDisable\">\n <span class=\"grayscale-fix\" style=\"display: inline-block; position: relative;\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" id=\"svgroot\" style=\"position: absolute; left: 0; right: 0;\" viewBox=\"0 0 48 48\" width=\"100%\" height=\"100%\">\n <defs><filter id=\"gray\"><feColorMatrix type=\"matrix\" values=\"0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\" /></filter></defs>\n <image filter=\"url(&quot;#gray&quot;)\" preserveAspectRatio=\"none meet\" x=\"0\" y=\"0\" width=\"48\" height=\"48\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n [attr.xlink:href]=\"_iconUrl\" />\n </svg>\n <img class=\"tiled-select-tile-panel--icon-img {{ iconClass }}\" style=\"display: block; visibility: hidden;\" alt=\"Icon\" [src]=\"_iconUrl\">\n </span>\n </ng-container>\n <ng-container *ngIf=\"!disabled\">\n <img class=\"tiled-select-tile-panel--icon-img {{ iconClass }}\" [src]=\"_iconUrl\" alt=\"Icon\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!needToFix\">\n <img class=\"tiled-select-tile-panel--icon-img {{ iconClass }}\" [src]=\"_iconUrl\" alt=\"Icon\">\n </ng-container>\n </ng-container>\n\n</ng-template>\n",
396
- styles: [":host{display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden}:host.grid{flex:1 1 auto;margin:0 auto;display:flex;align-items:center;width:100%}:host.grid .tiled-select-tile-panel--icon-img{width:100%;max-width:75px;max-height:75px;margin:0 auto}:host.grid .tiled-select-tile-panel--icon-img[src$=\".svg\"]{height:100%}:host.grid>.grayscale-fix{max-width:75px;max-height:75px;margin:0 auto}:host.list{border:1px solid #e6e6e6;border-radius:8px;min-width:39px;width:39px;min-height:39px;height:39px;padding:1px;align-items:center;display:flex}:host.list img{max-width:100%;max-height:100%;margin:0 auto}.grey-fix{visibility:hidden;display:block}.tiled-select-tile-icon--fa{height:100%;display:flex;flex-direction:row;justify-content:center;text-align:center;width:100%;padding:2px}.tiled-select-tile-icon--fa ::ng-deep .svg-inline--fa{max-width:100%;height:100%;width:100%}"]
407
+ styles: [":host{display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden}:host.grid{flex:1 1 auto;margin:0 auto;display:flex;align-items:center;width:100%}:host.grid .tiled-select-tile-panel--icon-img{width:100%;max-width:75px;max-height:75px;margin:0 auto}:host.grid .tiled-select-tile-panel--icon-img[src$=\".svg\"]{height:100%}:host.grid>.grayscale-fix{max-width:75px;max-height:75px;margin:0 auto}:host.list{border:1px solid #e6e6e6;border-radius:8px;min-width:39px;width:39px;min-height:39px;height:39px;padding:1px;align-items:center;display:flex}:host.list img{max-width:100%;max-height:100%;margin:0 auto}.grey-fix{visibility:hidden;display:block}.tiled-select-tile-icon--fa{height:100%;display:flex;flex-direction:row;justify-content:center;text-align:center;width:100%;padding:2px}.tiled-select-tile-icon--fa ::ng-deep .svg-inline--fa{max-width:100%;height:100%;width:100%}\n"]
397
408
  },] }
398
409
  ];
399
410
  TiledSelectTileIconComponent.ctorParameters = () => [];
@@ -423,7 +434,7 @@ TheSeamTiledSelectModule.decorators = [
423
434
  FontAwesomeModule
424
435
  ],
425
436
  declarations: [
426
- TiledSelectComponent,
437
+ TheSeamTiledSelectComponent,
427
438
  TiledSelectTileComponent,
428
439
  TiledSelectTileOverlayDirective,
429
440
  TiledSelectTileIconComponent,
@@ -431,7 +442,7 @@ TheSeamTiledSelectModule.decorators = [
431
442
  TiledSelectTileLabelTplDirective
432
443
  ],
433
444
  exports: [
434
- TiledSelectComponent,
445
+ TheSeamTiledSelectComponent,
435
446
  TiledSelectTileComponent,
436
447
  TiledSelectTileOverlayDirective,
437
448
  TiledSelectTileIconTplDirective,
@@ -440,9 +451,11 @@ TheSeamTiledSelectModule.decorators = [
440
451
  },] }
441
452
  ];
442
453
 
454
+ // export * from './testing'
455
+
443
456
  /**
444
457
  * Generated bundle index. Do not edit.
445
458
  */
446
459
 
447
- export { TILED_SELECT_VALUE_ACCESSOR, TheSeamTiledSelectModule, TiledSelectComponent, TiledSelectTileComponent, TiledSelectTileIconComponent, TiledSelectTileIconTplDirective, TiledSelectTileLabelTplDirective, TiledSelectTileOverlayDirective, slideEnterAnimation, tilePulse, tileScaleDown, tileScaleUp };
460
+ export { TILED_SELECT_VALUE_ACCESSOR, TheSeamTiledSelectComponent, TheSeamTiledSelectModule, TiledSelectTileComponent, TiledSelectTileIconComponent, TiledSelectTileIconTplDirective, TiledSelectTileLabelTplDirective, TiledSelectTileOverlayDirective, slideEnterAnimation, tilePulse, tileScaleDown, tileScaleUp };
448
461
  //# sourceMappingURL=theseam-ui-common-tiled-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theseam-ui-common-tiled-select.js","sources":["../../../projects/ui-common/tiled-select/directives/tiled-select-tile-overlay.directive.ts","../../../projects/ui-common/tiled-select/components/tiled-select/tiled-select.component.ts","../../../projects/ui-common/tiled-select/directives/tiled-select-tile-label-tpl.directive.ts","../../../projects/ui-common/tiled-select/components/tiled-select-tile/tiled-select-tile.component.ts","../../../projects/ui-common/tiled-select/directives/tiled-select-tile-icon-tpl.directive.ts","../../../projects/ui-common/tiled-select/components/tiled-select-tile-icon/tiled-select-tile-icon.component.ts","../../../projects/ui-common/tiled-select/tiled-select.module.ts","../../../projects/ui-common/tiled-select/theseam-ui-common-tiled-select.ts"],"sourcesContent":["import { Directive, Input, TemplateRef } from '@angular/core'\n\nimport { ITiledSelectItem } from '../tiled-select.models'\n\n@Directive({\n selector: '[seamTiledSelectTileOverlay]',\n exportAs: 'seamTiledSelectTileOverlay'\n})\nexport class TiledSelectTileOverlayDirective {\n\n @Input() record: ITiledSelectItem | undefined | null\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { animate, animation, query, stagger, style, transition, trigger, useAnimation } from '@angular/animations'\nimport { BooleanInput, coerceArray } from '@angular/cdk/coercion'\nimport { Platform } from '@angular/cdk/platform'\nimport { ChangeDetectorRef, Component, ContentChildren, EventEmitter, forwardRef, Input, OnInit, Output, QueryList } from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\n\nimport { TiledSelectTileOverlayDirective } from './../../directives/tiled-select-tile-overlay.directive'\n\nimport { ITiledSelectItem, TiledSelectLayout } from '../../tiled-select.models'\n\nexport const slideEnterAnimation = animation([\n style({ opacity: 0, transform: 'translateX(-15px)' }),\n stagger(100, [\n animate('0.5s', style({ opacity: 1, transform: 'translateX(0)' }))\n ])\n])\n\nexport const TILED_SELECT_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => TiledSelectComponent),\n multi: true,\n}\n\n@Component({\n selector: 'seam-tiled-select',\n templateUrl: './tiled-select.component.html',\n styleUrls: ['./tiled-select.component.scss'],\n providers: [ TILED_SELECT_VALUE_ACCESSOR ],\n animations: [\n trigger('tiles', [\n transition('* => *', [\n query(':enter', useAnimation(slideEnterAnimation), { optional: true })\n ])\n ])\n ],\n})\nexport class TiledSelectComponent implements OnInit, ControlValueAccessor {\n static ngAcceptInputType_val: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_multiple: BooleanInput\n static ngAcceptInputType_selectionToggleable: BooleanInput\n static ngAcceptInputType_tileBackdrop: BooleanInput\n static ngAcceptInputType_showSelectedIcon: BooleanInput\n static ngAcceptInputType_animationsDisabled: BooleanInput\n\n @Input() layout: TiledSelectLayout = 'grid'\n @Input()\n get tiles() { return this._tiles }\n set tiles(value: ITiledSelectItem[]) {\n const _value = [ ...(value || []) ]\n for (const v of _value) {\n if (v.value === undefined) {\n if (v.name === undefined) {\n throw new Error('If value is undefined then name must be defined.')\n }\n v.value = v.name\n }\n }\n\n const prev = this._tiles\n if (prev.length !== _value.length) {\n this.tilesAnimationState = !this.tilesAnimationState\n } else {\n for (const t of _value) {\n if (!prev.find(p => p.name === t.name)) {\n this.tilesAnimationState = !this.tilesAnimationState\n break\n }\n }\n }\n\n this._tiles = _value\n }\n private _tiles: ITiledSelectItem[] = []\n\n // tslint:disable-next-line:no-input-rename\n @Input('value') val: string | string[] | undefined\n\n @Input() @InputBoolean() disabled: boolean = false\n @Input() @InputBoolean() multiple: boolean = false\n @Input() @InputBoolean() selectionToggleable: boolean = true\n @Input() @InputBoolean() tileBackdrop: boolean = false\n @Input() @InputBoolean() showSelectedIcon: boolean = true\n @Input() @InputBoolean() animationsDisabled: boolean = this._platform.IOS\n\n @Output() readonly change = new EventEmitter<string | string[] | undefined>()\n\n tilesAnimationState = false\n\n onChange: any\n onTouched: any\n\n @ContentChildren(TiledSelectTileOverlayDirective)\n public overlayTpls?: QueryList<TiledSelectTileOverlayDirective>\n\n constructor(\n private readonly _platform: Platform,\n private readonly _cdr: ChangeDetectorRef\n ) { }\n\n ngOnInit() { }\n\n get value(): string | string[] | undefined {\n return this.val\n }\n\n set value(value: string | string[] | undefined) {\n this.val = (this.multiple) ? [ ...(<string[]>value || []) ] : value || ''\n if (this.onChange) {\n this.onChange(this.val)\n this.change.emit(this.val)\n this._cdr.markForCheck()\n }\n if (this.onTouched) { this.onTouched() }\n }\n\n writeValue(value: any): void {\n this.value = value\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n }\n\n onTileSelected(event: MouseEvent, tile: ITiledSelectItem) {\n this.toggleTileSelected(tile)\n }\n\n public isSelected(tile: ITiledSelectItem) {\n if (!this.multiple) {\n if (this.value === tile.value) {\n return true\n }\n } else {\n if (this.value) {\n for (const v of this.value) {\n if (v === tile.value) {\n return true\n }\n }\n }\n }\n\n return false\n }\n\n public toggleTileSelected(tile: ITiledSelectItem): void {\n if (!this.selectionToggleable && this.isSelected(tile)) {\n return\n }\n\n if (this.isSelected(tile)) {\n this.unselectTile(tile)\n } else {\n this.selectTile(tile)\n }\n }\n\n public selectTile(tile: ITiledSelectItem): void {\n if (this.multiple) {\n if (!this.isSelected(tile)) {\n const value: string[] = <string[]>this.value || []\n this.value = [ ...coerceArray(value), tile.value ]\n }\n } else {\n this.value = tile.value\n }\n }\n\n public unselectTile(tile: ITiledSelectItem): void {\n if (this.multiple) {\n const value: string[] = <string[]>this.value || []\n this.value = value.filter(v => v !== tile.value)\n } else {\n this.value = undefined\n }\n }\n\n public getSelectedTiles(): ITiledSelectItem[] {\n return this.tiles.filter(t => this.isSelected(t))\n }\n\n getOverlayTpl(tile: ITiledSelectItem): TiledSelectTileOverlayDirective | undefined {\n // console.log('overlayTpls', this.overlayTpls)\n return (this.overlayTpls || []).find(t => t.record?.name === tile.name)\n }\n\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamTiledSelectTileLabelTpl]'\n})\nexport class TiledSelectTileLabelTplDirective {\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { animate, animation, keyframes, style, transition, trigger, useAnimation } from '@angular/animations'\nimport { BooleanInput } from '@angular/cdk/coercion'\nimport { ChangeDetectorRef, Component, ContentChild, EventEmitter, HostBinding, Input, Output } from '@angular/core'\n\nimport { faCheckCircle } from '@fortawesome/free-regular-svg-icons'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { SeamIcon } from '@theseam/ui-common/icon'\n\nimport { TiledSelectTileLabelTplDirective } from '../../directives/tiled-select-tile-label-tpl.directive'\nimport { TiledSelectTileOverlayDirective } from '../../directives/tiled-select-tile-overlay.directive'\nimport { TiledSelectLayout } from '../../tiled-select.models'\n\nexport const tilePulse = animation(\n animate(\n '{{ timing }}s {{ delay }}s',\n keyframes([\n style({ transform: 'scale3d(1, 1, 1)' }),\n style({ transform: 'scale3d({{ scale }}, {{ scale }}, {{ scale }})' }),\n style({ transform: 'scale3d(1, 1, 1)' }),\n ])\n ),\n { params: { scale: 1.05, timing: 0.75, delay: 0 } }\n)\n\nexport const tileScaleUp = animation(\n animate(\n '{{ timing }}s {{ delay }}s',\n keyframes([\n style({ transform: 'scale3d({{ scale }}, {{ scale }}, {{ scale }})' }),\n ])\n ),\n { params: { scale: 1.05, timing: 0.75, delay: 0 } }\n)\n\nexport const tileScaleDown = animation(\n animate(\n '{{ timing }}s {{ delay }}s',\n keyframes([\n style({ transform: 'scale3d(1, 1, 1)' }),\n ])\n ),\n { params: { scale: 1.05, timing: 0.75, delay: 0 } }\n)\n\n@Component({\n selector: 'seam-tiled-select-tile',\n templateUrl: './tiled-select-tile.component.html',\n styleUrls: ['./tiled-select-tile.component.scss'],\n animations: [\n trigger('pulse', [\n transition('false => true', [\n useAnimation(tilePulse)\n // useAnimation(tileScaleUp)\n ]),\n // transition('true => false', [\n // useAnimation(tileScaleDown)\n // ])\n ]),\n // trigger('openClose', [\n // state('true', style({ height: '*' })),\n // state('false', style({ height: '0px' })),\n // transition('false <=> true', animate(500))\n // ])\n ],\n // changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TiledSelectTileComponent {\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_selected: BooleanInput\n static ngAcceptInputType_tileBackdrop: BooleanInput\n static ngAcceptInputType_selectable: BooleanInput\n static ngAcceptInputType_grayscaleOnDisable: BooleanInput\n static ngAcceptInputType_showLabel: BooleanInput\n static ngAcceptInputType_showSelectedIcon: BooleanInput\n\n faCheckCircle = faCheckCircle\n\n @HostBinding('@pulse') pulseAnimationState = true\n\n @Input() layout: TiledSelectLayout = 'grid'\n\n @Input() name: string | undefined | null\n @Input() label: string | undefined | null\n @Input() icon: SeamIcon | undefined | null\n @Input() @InputBoolean() disabled: boolean = false\n @Input() @InputBoolean() selected: boolean = false\n\n @Input() @InputBoolean() tileBackdrop: boolean = false\n @Input() @InputBoolean() selectable: boolean = false\n @Input() @InputBoolean() grayscaleOnDisable: boolean = true\n @Input() @InputBoolean() showLabel: boolean = true\n @Input() @InputBoolean() showSelectedIcon: boolean = true\n\n @Input() iconClass: string | undefined | null\n\n @Input() overlayTpl: TiledSelectTileOverlayDirective | undefined | null\n\n @Output() activated = new EventEmitter<any>()\n\n @ContentChild(TiledSelectTileLabelTplDirective, { static: true }) labelTpl?: TiledSelectTileLabelTplDirective\n\n pulsing = false\n pulsingTimeout: number | undefined\n\n constructor(\n private cdr: ChangeDetectorRef\n ) { }\n\n onTileClick(event: any) {\n if (!this.selectable) { return }\n this.activated.emit(event)\n\n // this.pulsing = true\n // setTimeout(() => {\n // this.pulsing = false\n // }, 750)\n }\n\n mDown() {\n if (this.pulsingTimeout) {\n clearTimeout(this.pulsingTimeout)\n }\n\n if (!this.pulsing) {\n this.pulsing = true\n // this.cdr.detectChanges()\n }\n\n // console.log('start')\n this.pulsingTimeout = window.setTimeout(() => {\n this.pulsing = false\n // this.cdr.detectChanges()\n this.pulsingTimeout = undefined\n }, 750)\n }\n\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamTiledSelectTileIconTpl]',\n exportAs: 'seamTiledSelectTileIconTpl'\n})\nexport class TiledSelectTileIconTplDirective {\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { Component, ContentChild, HostBinding, Input, OnInit } from '@angular/core'\n\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { SeamIcon } from '@theseam/ui-common/icon'\n\nimport { TiledSelectTileIconTplDirective } from '../../directives/tiled-select-tile-icon-tpl.directive'\nimport { TiledSelectLayout } from '../../tiled-select.models'\n\nconst needToFix = /(MSIE 10)|(Trident.*rv:11\\.0)|( Edge\\/[\\d\\.]+$)/.test(navigator.userAgent)\n\n@Component({\n selector: 'seam-tiled-select-tile-icon',\n templateUrl: './tiled-select-tile-icon.component.html',\n styleUrls: ['./tiled-select-tile-icon.component.scss']\n})\nexport class TiledSelectTileIconComponent implements OnInit {\n static ngAcceptInputType_grayscaleOnDisable: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n\n needToFix = needToFix\n\n @HostBinding('class.grid') get _cssClassGrid() { return this.layout === 'grid' }\n @HostBinding('class.list') get _cssClassList() { return this.layout === 'list' }\n\n @Input()\n set layout(value: TiledSelectLayout) { this._layout = value || 'grid' }\n get layout(): TiledSelectLayout { return this._layout }\n private _layout: TiledSelectLayout = 'grid'\n\n @Input() @InputBoolean() grayscaleOnDisable: boolean = false\n @Input() @InputBoolean() disabled: boolean = false\n\n @Input() iconClass: string | undefined | null\n\n @Input()\n get icon(): SeamIcon | undefined | null { return this._iconUrl || this._iconObj }\n set icon(value: SeamIcon | undefined | null) {\n if (typeof value === 'string') {\n this._iconUrl = value\n this._iconObj = undefined\n } else {\n this._iconUrl = undefined\n this._iconObj = value\n }\n }\n\n public _iconUrl: string | undefined | null\n public _iconObj: IconProp | undefined | null\n\n @ContentChild(TiledSelectTileIconTplDirective, { static: true }) iconTpl?: TiledSelectTileIconTplDirective\n\n constructor() { }\n\n ngOnInit() { }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\n\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\n\nimport { TiledSelectTileIconComponent } from './components/tiled-select-tile-icon/tiled-select-tile-icon.component'\nimport { TiledSelectTileComponent } from './components/tiled-select-tile/tiled-select-tile.component'\nimport { TiledSelectComponent } from './components/tiled-select/tiled-select.component'\nimport { TiledSelectTileIconTplDirective } from './directives/tiled-select-tile-icon-tpl.directive'\nimport { TiledSelectTileLabelTplDirective } from './directives/tiled-select-tile-label-tpl.directive'\nimport { TiledSelectTileOverlayDirective } from './directives/tiled-select-tile-overlay.directive'\n\n@NgModule({\n imports: [\n CommonModule,\n FontAwesomeModule\n ],\n declarations: [\n TiledSelectComponent,\n TiledSelectTileComponent,\n TiledSelectTileOverlayDirective,\n TiledSelectTileIconComponent,\n TiledSelectTileIconTplDirective,\n TiledSelectTileLabelTplDirective\n ],\n exports: [\n TiledSelectComponent,\n TiledSelectTileComponent,\n TiledSelectTileOverlayDirective,\n TiledSelectTileIconTplDirective,\n TiledSelectTileLabelTplDirective\n ]\n})\nexport class TheSeamTiledSelectModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAQa,+BAA+B;IAI1C,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAK;;;YARnD,SAAS,SAAC;gBACT,QAAQ,EAAE,8BAA8B;gBACxC,QAAQ,EAAE,4BAA4B;aACvC;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EAAE;IACvE,IAAI,MAAM,KAAwB,OAAO,IAAI,CAAC,OAAO,CAAA,EAAE;IAQvD,IACI,IAAI,KAAkC,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAA,EAAE;IACjF,IAAI,IAAI,CAAC,KAAkC;QACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;YACrB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAA;SAC1B;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAA;YACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;SACtB;KACF;IASD,QAAQ,MAAM;;;YA3Cf,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,wzDAAsD;;aAEvD;;;;4BAOE,WAAW,SAAC,YAAY;4BACxB,WAAW,SAAC,YAAY;qBAExB,KAAK;iCAKL,KAAK;uBACL,KAAK;wBAEL,KAAK;mBAEL,KAAK;sBAeL,YAAY,SAAC,+BAA+B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;AApBtC;IAAf,YAAY,EAAE;wEAAoC;AACnC;IAAf,YAAY,EAAE;8DAA0B;;MCAvC,wBAAwB;;;YArBpC,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,iBAAiB;iBAClB;gBACD,YAAY,EAAE;oBACZ,oBAAoB;oBACpB,wBAAwB;oBACxB,+BAA+B;oBAC/B,4BAA4B;oBAC5B,+BAA+B;oBAC/B,gCAAgC;iBACjC;gBACD,OAAO,EAAE;oBACP,oBAAoB;oBACpB,wBAAwB;oBACxB,+BAA+B;oBAC/B,+BAA+B;oBAC/B,gCAAgC;iBACjC;aACF;;;AChCD;;;;;;"}
1
+ {"version":3,"file":"theseam-ui-common-tiled-select.js","sources":["../../../projects/ui-common/tiled-select/directives/tiled-select-tile-overlay.directive.ts","../../../projects/ui-common/tiled-select/components/tiled-select/tiled-select.component.ts","../../../projects/ui-common/tiled-select/directives/tiled-select-tile-label-tpl.directive.ts","../../../projects/ui-common/tiled-select/components/tiled-select-tile/tiled-select-tile.component.ts","../../../projects/ui-common/tiled-select/directives/tiled-select-tile-icon-tpl.directive.ts","../../../projects/ui-common/tiled-select/components/tiled-select-tile-icon/tiled-select-tile-icon.component.ts","../../../projects/ui-common/tiled-select/tiled-select.module.ts","../../../projects/ui-common/tiled-select/public-api.ts","../../../projects/ui-common/tiled-select/theseam-ui-common-tiled-select.ts"],"sourcesContent":["import { Directive, Input, TemplateRef } from '@angular/core'\n\nimport { ITiledSelectItem } from '../tiled-select.models'\n\n@Directive({\n selector: '[seamTiledSelectTileOverlay]',\n exportAs: 'seamTiledSelectTileOverlay'\n})\nexport class TiledSelectTileOverlayDirective {\n\n @Input() record: ITiledSelectItem | undefined | null\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { animate, animation, query, stagger, style, transition, trigger, useAnimation } from '@angular/animations'\nimport { BooleanInput, coerceArray } from '@angular/cdk/coercion'\nimport { Platform } from '@angular/cdk/platform'\nimport { ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, forwardRef, Input, OnInit, Output, QueryList, Renderer2 } from '@angular/core'\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\n\nimport { TiledSelectTileOverlayDirective } from './../../directives/tiled-select-tile-overlay.directive'\n\nimport { ITiledSelectItem, TiledSelectLayout } from '../../tiled-select.models'\n\nexport const slideEnterAnimation = animation([\n style({ opacity: 0, transform: 'translateX(-15px)' }),\n stagger(100, [\n animate('0.5s', style({ opacity: 1, transform: 'translateX(0)' }))\n ])\n])\n\nexport const TILED_SELECT_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n // tslint:disable-next-line:no-use-before-declare\n useExisting: forwardRef(() => TheSeamTiledSelectComponent),\n multi: true,\n}\n\n@Component({\n selector: 'seam-tiled-select',\n templateUrl: './tiled-select.component.html',\n styleUrls: ['./tiled-select.component.scss'],\n providers: [ TILED_SELECT_VALUE_ACCESSOR ],\n host: {\n '[attr.data-testid]': '\"tiled-select\"'\n },\n animations: [\n trigger('tiles', [\n transition('* => *', [\n query(':enter', useAnimation(slideEnterAnimation), { optional: true })\n ])\n ])\n ],\n})\nexport class TheSeamTiledSelectComponent implements OnInit, ControlValueAccessor {\n static ngAcceptInputType_val: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_multiple: BooleanInput\n static ngAcceptInputType_selectionToggleable: BooleanInput\n static ngAcceptInputType_tileBackdrop: BooleanInput\n static ngAcceptInputType_showSelectedIcon: BooleanInput\n static ngAcceptInputType_animationsDisabled: BooleanInput\n\n @Input() layout: TiledSelectLayout = 'grid'\n @Input()\n get tiles() { return this._tiles }\n set tiles(value: ITiledSelectItem[]) {\n const _value = [ ...(value || []) ]\n for (const v of _value) {\n if (v.value === undefined) {\n if (v.name === undefined) {\n throw new Error('If value is undefined then name must be defined.')\n }\n v.value = v.name\n }\n }\n\n const prev = this._tiles\n if (prev.length !== _value.length) {\n this.tilesAnimationState = !this.tilesAnimationState\n } else {\n for (const t of _value) {\n if (!prev.find(p => p.name === t.name)) {\n this.tilesAnimationState = !this.tilesAnimationState\n break\n }\n }\n }\n\n this._tiles = _value\n }\n private _tiles: ITiledSelectItem[] = []\n\n // tslint:disable-next-line:no-input-rename\n @Input('value') val: string | string[] | undefined\n\n @Input() @InputBoolean() disabled: boolean = false\n @Input() @InputBoolean() multiple: boolean = false\n @Input() @InputBoolean() selectionToggleable: boolean = true\n @Input() @InputBoolean() tileBackdrop: boolean = false\n @Input() @InputBoolean() showSelectedIcon: boolean = true\n @Input() @InputBoolean() animationsDisabled: boolean = this._platform.IOS\n\n @Output() readonly change = new EventEmitter<string | string[] | undefined>()\n\n tilesAnimationState = false\n\n onChange: any\n onTouched: any\n\n @ContentChildren(TiledSelectTileOverlayDirective)\n public overlayTpls?: QueryList<TiledSelectTileOverlayDirective>\n\n constructor(\n private readonly _platform: Platform,\n private readonly _cdr: ChangeDetectorRef,\n private readonly _renderer: Renderer2,\n private readonly _elementRef: ElementRef\n ) { }\n\n ngOnInit() { }\n\n get value(): string | string[] | undefined {\n return this.val\n }\n\n set value(value: string | string[] | undefined) {\n this.val = (this.multiple) ? [ ...(<string[]>value || []) ] : value || ''\n\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', this.val)\n\n if (this.onChange) {\n this.onChange(this.val)\n this.change.emit(this.val)\n this._cdr.markForCheck()\n }\n if (this.onTouched) { this.onTouched() }\n }\n\n writeValue(value: any): void {\n this.value = value\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled\n }\n\n onTileSelected(event: MouseEvent, tile: ITiledSelectItem) {\n this.toggleTileSelected(tile)\n }\n\n public isSelected(tile: ITiledSelectItem) {\n if (!this.multiple) {\n if (this.value === tile.value) {\n return true\n }\n } else {\n if (this.value) {\n for (const v of this.value) {\n if (v === tile.value) {\n return true\n }\n }\n }\n }\n\n return false\n }\n\n public toggleTileSelected(tile: ITiledSelectItem): void {\n if (!this.selectionToggleable && this.isSelected(tile)) {\n return\n }\n\n if (this.isSelected(tile)) {\n this.unselectTile(tile)\n } else {\n this.selectTile(tile)\n }\n }\n\n public selectTile(tile: ITiledSelectItem): void {\n if (this.multiple) {\n if (!this.isSelected(tile)) {\n const value: string[] = <string[]>this.value || []\n this.value = [ ...coerceArray(value), tile.value ]\n }\n } else {\n this.value = tile.value\n }\n }\n\n public unselectTile(tile: ITiledSelectItem): void {\n if (this.multiple) {\n const value: string[] = <string[]>this.value || []\n this.value = value.filter(v => v !== tile.value)\n } else {\n this.value = undefined\n }\n }\n\n public getSelectedTiles(): ITiledSelectItem[] {\n return this.tiles.filter(t => this.isSelected(t))\n }\n\n getOverlayTpl(tile: ITiledSelectItem): TiledSelectTileOverlayDirective | undefined {\n // console.log('overlayTpls', this.overlayTpls)\n return (this.overlayTpls || []).find(t => t.record?.name === tile.name)\n }\n\n}\n\n/** @deprecated Use `TheSeamTiledSelectComponent`. */\nexport type TiledSelectComponent = TheSeamTiledSelectComponent\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamTiledSelectTileLabelTpl]'\n})\nexport class TiledSelectTileLabelTplDirective {\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { animate, animation, keyframes, style, transition, trigger, useAnimation } from '@angular/animations'\nimport { BooleanInput } from '@angular/cdk/coercion'\nimport { ChangeDetectorRef, Component, ContentChild, EventEmitter, HostBinding, Input, Output } from '@angular/core'\n\nimport { faCheckCircle } from '@fortawesome/free-regular-svg-icons'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { SeamIcon } from '@theseam/ui-common/icon'\n\nimport { TiledSelectTileLabelTplDirective } from '../../directives/tiled-select-tile-label-tpl.directive'\nimport { TiledSelectTileOverlayDirective } from '../../directives/tiled-select-tile-overlay.directive'\nimport { TiledSelectLayout } from '../../tiled-select.models'\n\nexport const tilePulse = animation(\n animate(\n '{{ timing }}s {{ delay }}s',\n keyframes([\n style({ transform: 'scale3d(1, 1, 1)' }),\n style({ transform: 'scale3d({{ scale }}, {{ scale }}, {{ scale }})' }),\n style({ transform: 'scale3d(1, 1, 1)' }),\n ])\n ),\n { params: { scale: 1.05, timing: 0.75, delay: 0 } }\n)\n\nexport const tileScaleUp = animation(\n animate(\n '{{ timing }}s {{ delay }}s',\n keyframes([\n style({ transform: 'scale3d({{ scale }}, {{ scale }}, {{ scale }})' }),\n ])\n ),\n { params: { scale: 1.05, timing: 0.75, delay: 0 } }\n)\n\nexport const tileScaleDown = animation(\n animate(\n '{{ timing }}s {{ delay }}s',\n keyframes([\n style({ transform: 'scale3d(1, 1, 1)' }),\n ])\n ),\n { params: { scale: 1.05, timing: 0.75, delay: 0 } }\n)\n\n@Component({\n selector: 'seam-tiled-select-tile',\n templateUrl: './tiled-select-tile.component.html',\n styleUrls: ['./tiled-select-tile.component.scss'],\n animations: [\n trigger('pulse', [\n transition('false => true', [\n useAnimation(tilePulse)\n // useAnimation(tileScaleUp)\n ]),\n // transition('true => false', [\n // useAnimation(tileScaleDown)\n // ])\n ]),\n // trigger('openClose', [\n // state('true', style({ height: '*' })),\n // state('false', style({ height: '0px' })),\n // transition('false <=> true', animate(500))\n // ])\n ],\n // changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TiledSelectTileComponent {\n static ngAcceptInputType_disabled: BooleanInput\n static ngAcceptInputType_selected: BooleanInput\n static ngAcceptInputType_tileBackdrop: BooleanInput\n static ngAcceptInputType_selectable: BooleanInput\n static ngAcceptInputType_grayscaleOnDisable: BooleanInput\n static ngAcceptInputType_showLabel: BooleanInput\n static ngAcceptInputType_showSelectedIcon: BooleanInput\n\n faCheckCircle = faCheckCircle\n\n @HostBinding('@pulse') pulseAnimationState = true\n @HostBinding('attr.data-tile-name') get _tileNameAttr() { return this.name }\n\n @Input() layout: TiledSelectLayout = 'grid'\n\n @Input() name: string | undefined | null\n @Input() label: string | undefined | null\n @Input() icon: SeamIcon | undefined | null\n @Input() @InputBoolean() disabled: boolean = false\n @Input() @InputBoolean() selected: boolean = false\n\n @Input() @InputBoolean() tileBackdrop: boolean = false\n @Input() @InputBoolean() selectable: boolean = false\n @Input() @InputBoolean() grayscaleOnDisable: boolean = true\n @Input() @InputBoolean() showLabel: boolean = true\n @Input() @InputBoolean() showSelectedIcon: boolean = true\n\n @Input() iconClass: string | undefined | null\n\n @Input() overlayTpl: TiledSelectTileOverlayDirective | undefined | null\n\n @Output() activated = new EventEmitter<any>()\n\n @ContentChild(TiledSelectTileLabelTplDirective, { static: true }) labelTpl?: TiledSelectTileLabelTplDirective\n\n pulsing = false\n pulsingTimeout: number | undefined\n\n constructor(\n private cdr: ChangeDetectorRef\n ) { }\n\n onTileClick(event: any) {\n console.log('event', event)\n if (!this.selectable) { return }\n this.activated.emit(event)\n\n // this.pulsing = true\n // setTimeout(() => {\n // this.pulsing = false\n // }, 750)\n }\n\n mDown() {\n if (this.pulsingTimeout) {\n clearTimeout(this.pulsingTimeout)\n }\n\n if (!this.pulsing) {\n this.pulsing = true\n // this.cdr.detectChanges()\n }\n\n // console.log('start')\n this.pulsingTimeout = window.setTimeout(() => {\n this.pulsing = false\n // this.cdr.detectChanges()\n this.pulsingTimeout = undefined\n }, 750)\n }\n\n}\n","import { Directive, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamTiledSelectTileIconTpl]',\n exportAs: 'seamTiledSelectTileIconTpl'\n})\nexport class TiledSelectTileIconTplDirective {\n\n constructor(public template: TemplateRef<any>) { }\n\n}\n","import { BooleanInput } from '@angular/cdk/coercion'\nimport { Component, ContentChild, HostBinding, Input, OnInit } from '@angular/core'\n\nimport { IconProp } from '@fortawesome/fontawesome-svg-core'\n\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { SeamIcon } from '@theseam/ui-common/icon'\n\nimport { TiledSelectTileIconTplDirective } from '../../directives/tiled-select-tile-icon-tpl.directive'\nimport { TiledSelectLayout } from '../../tiled-select.models'\n\nconst needToFix = /(MSIE 10)|(Trident.*rv:11\\.0)|( Edge\\/[\\d\\.]+$)/.test(navigator.userAgent)\n\n@Component({\n selector: 'seam-tiled-select-tile-icon',\n templateUrl: './tiled-select-tile-icon.component.html',\n styleUrls: ['./tiled-select-tile-icon.component.scss']\n})\nexport class TiledSelectTileIconComponent implements OnInit {\n static ngAcceptInputType_grayscaleOnDisable: BooleanInput\n static ngAcceptInputType_disabled: BooleanInput\n\n needToFix = needToFix\n\n @HostBinding('class.grid') get _cssClassGrid() { return this.layout === 'grid' }\n @HostBinding('class.list') get _cssClassList() { return this.layout === 'list' }\n\n @Input()\n set layout(value: TiledSelectLayout) { this._layout = value || 'grid' }\n get layout(): TiledSelectLayout { return this._layout }\n private _layout: TiledSelectLayout = 'grid'\n\n @Input() @InputBoolean() grayscaleOnDisable: boolean = false\n @Input() @InputBoolean() disabled: boolean = false\n\n @Input() iconClass: string | undefined | null\n\n @Input()\n get icon(): SeamIcon | undefined | null { return this._iconUrl || this._iconObj }\n set icon(value: SeamIcon | undefined | null) {\n if (typeof value === 'string') {\n this._iconUrl = value\n this._iconObj = undefined\n } else {\n this._iconUrl = undefined\n this._iconObj = value\n }\n }\n\n public _iconUrl: string | undefined | null\n public _iconObj: IconProp | undefined | null\n\n @ContentChild(TiledSelectTileIconTplDirective, { static: true }) iconTpl?: TiledSelectTileIconTplDirective\n\n constructor() { }\n\n ngOnInit() { }\n\n}\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\n\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\n\nimport { TiledSelectTileIconComponent } from './components/tiled-select-tile-icon/tiled-select-tile-icon.component'\nimport { TiledSelectTileComponent } from './components/tiled-select-tile/tiled-select-tile.component'\nimport { TheSeamTiledSelectComponent } from './components/tiled-select/tiled-select.component'\nimport { TiledSelectTileIconTplDirective } from './directives/tiled-select-tile-icon-tpl.directive'\nimport { TiledSelectTileLabelTplDirective } from './directives/tiled-select-tile-label-tpl.directive'\nimport { TiledSelectTileOverlayDirective } from './directives/tiled-select-tile-overlay.directive'\n\n@NgModule({\n imports: [\n CommonModule,\n FontAwesomeModule\n ],\n declarations: [\n TheSeamTiledSelectComponent,\n TiledSelectTileComponent,\n TiledSelectTileOverlayDirective,\n TiledSelectTileIconComponent,\n TiledSelectTileIconTplDirective,\n TiledSelectTileLabelTplDirective\n ],\n exports: [\n TheSeamTiledSelectComponent,\n TiledSelectTileComponent,\n TiledSelectTileOverlayDirective,\n TiledSelectTileIconTplDirective,\n TiledSelectTileLabelTplDirective\n ]\n})\nexport class TheSeamTiledSelectModule { }\n","export * from './components/tiled-select/tiled-select.component'\nexport * from './components/tiled-select-tile/tiled-select-tile.component'\nexport * from './components/tiled-select-tile-icon/tiled-select-tile-icon.component'\nexport * from './directives/tiled-select-tile-icon-tpl.directive'\nexport * from './directives/tiled-select-tile-label-tpl.directive'\nexport * from './directives/tiled-select-tile-overlay.directive'\nexport * from './tiled-select.models'\nexport * from './tiled-select.module'\n// export * from './testing'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAQa,+BAA+B;IAI1C,YAAmB,QAA0B;QAA1B,aAAQ,GAAR,QAAQ,CAAkB;KAAK;;;YARnD,SAAS,SAAC;gBACT,QAAQ,EAAE,8BAA8B;gBACxC,QAAQ,EAAE,4BAA4B;aACvC;;;YAP0B,WAAW;;;qBAUnC,KAAK;;;MCEK,mBAAmB,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACrD,OAAO,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;KACnE,CAAC;CACH,EAAC;MAEW,2BAA2B,GAAQ;IAC9C,OAAO,EAAE,iBAAiB;;IAE1B,WAAW,EAAE,UAAU,CAAC,MAAM,2BAA2B,CAAC;IAC1D,KAAK,EAAE,IAAI;EACZ;MAkBY,2BAA2B;IA2DtC,YACmB,SAAmB,EACnB,IAAuB,EACvB,SAAoB,EACpB,WAAuB;QAHvB,cAAS,GAAT,SAAS,CAAU;QACnB,SAAI,GAAJ,IAAI,CAAmB;QACvB,cAAS,GAAT,SAAS,CAAW;QACpB,gBAAW,GAAX,WAAW,CAAY;QAtDjC,WAAM,GAAsB,MAAM,CAAA;QA4BnC,WAAM,GAAuB,EAAE,CAAA;QAKd,aAAQ,GAAY,KAAK,CAAA;QACzB,aAAQ,GAAY,KAAK,CAAA;QACzB,wBAAmB,GAAY,IAAI,CAAA;QACnC,iBAAY,GAAY,KAAK,CAAA;QAC7B,qBAAgB,GAAY,IAAI,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AA;SACtB;KACF;IASD,QAAQ,MAAM;;;YA3Cf,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,wzDAAsD;;aAEvD;;;;4BAOE,WAAW,SAAC,YAAY;4BACxB,WAAW,SAAC,YAAY;qBAExB,KAAK;iCAKL,KAAK;uBACL,KAAK;wBAEL,KAAK;mBAEL,KAAK;sBAeL,YAAY,SAAC,+BAA+B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;AApBtC;IAAf,YAAY,EAAE;wEAAoC;AACnC;IAAf,YAAY,EAAE;8DAA0B;;MCAvC,wBAAwB;;;YArBpC,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,iBAAiB;iBAClB;gBACD,YAAY,EAAE;oBACZ,2BAA2B;oBAC3B,wBAAwB;oBACxB,+BAA+B;oBAC/B,4BAA4B;oBAC5B,+BAA+B;oBAC/B,gCAAgC;iBACjC;gBACD,OAAO,EAAE;oBACP,2BAA2B;oBAC3B,wBAAwB;oBACxB,+BAA+B;oBAC/B,+BAA+B;oBAC/B,gCAAgC;iBACjC;aACF;;;ACxBD;;ACRA;;;;;;"}
@@ -439,7 +439,7 @@ ToggleEditComponent.decorators = [
439
439
  { type: Component, args: [{
440
440
  selector: 'seam-toggle-edit',
441
441
  template: "<div class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\">\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template [ngTemplateOutlet]=\"displayTpl.template\" [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template *ngIf=\"!editing\" [cdkPortalOutlet]=\"templatePortal\"></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\">\n <button *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\">\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\">\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\">\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n",
442
- styles: [":host{display:block;position:relative}.toggle-edit-not-editing{transition:background-color .25s ease-in-out}.toggle-edit-not-editing .toggle-edit-content-container{display:flex;flex-direction:row}.toggle-edit-not-editing .toggle-edit-content-container .toggle-edit-content{flex:1 1 auto;display:flex;align-items:center}.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing,.toggle-edit-not-editing:not(.is-disabled):hover{background-color:#f8f9fa}.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing .toggle-edit-edit-btn,.toggle-edit-not-editing:not(.is-disabled):hover .toggle-edit-edit-btn{opacity:1;visibility:visible}.toggle-edit-not-editing .toggle-edit-edit-btn{opacity:0;visibility:hidden}.toggle-edit-not-editing .toggle-edit-cancel-btn,.toggle-edit-not-editing .toggle-edit-edit-btn,.toggle-edit-not-editing .toggle-edit-submit-btn{transition:.25s ease-in-out}.toggle-edit-not-editing .toggle-edit-edit-btn{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-edit-not-editing .toggle-edit-submit-btn{border-radius:0}.toggle-edit-not-editing .toggle-edit-cancel-btn{border-top-left-radius:0;border-bottom-left-radius:0}"]
442
+ styles: [":host{display:block;position:relative}.toggle-edit-not-editing{transition:.25s ease-in-out background-color}.toggle-edit-not-editing .toggle-edit-content-container{display:flex;flex-direction:row}.toggle-edit-not-editing .toggle-edit-content-container .toggle-edit-content{flex:1 1 auto;display:flex;align-items:center}.toggle-edit-not-editing:not(.is-disabled):hover,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing{background-color:#f8f9fa}.toggle-edit-not-editing:not(.is-disabled):hover .toggle-edit-edit-btn,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing .toggle-edit-edit-btn{opacity:1;visibility:visible}.toggle-edit-not-editing .toggle-edit-edit-btn{opacity:0;visibility:hidden}.toggle-edit-not-editing .toggle-edit-edit-btn,.toggle-edit-not-editing .toggle-edit-submit-btn,.toggle-edit-not-editing .toggle-edit-cancel-btn{transition:.25s ease-in-out}.toggle-edit-not-editing .toggle-edit-edit-btn{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-edit-not-editing .toggle-edit-submit-btn{border-radius:0}.toggle-edit-not-editing .toggle-edit-cancel-btn{border-top-left-radius:0;border-bottom-left-radius:0}\n"]
443
443
  },] }
444
444
  ];
445
445
  ToggleEditComponent.ctorParameters = () => [
@@ -481,7 +481,7 @@ ToggleEditActionsContainerComponent.decorators = [
481
481
  { type: Component, args: [{
482
482
  selector: 'seam-toggle-edit-actions-container',
483
483
  template: "<ng-content></ng-content>\n",
484
- styles: [":host{display:block}"]
484
+ styles: [":host{display:block}\n"]
485
485
  },] }
486
486
  ];
487
487
  ToggleEditActionsContainerComponent.ctorParameters = () => [];
@@ -307,6 +307,68 @@ function isEmptyUrlRoute(activatedRoute) {
307
307
  return activatedRoute.snapshot.url.length === 0;
308
308
  }
309
309
 
310
+ // Based on source: https://github.com/sindresorhus/array-move/blob/main/index.js
311
+ /**
312
+ Moves the item to the new position in the input array. Useful for huge arrays
313
+ where absolute performance is needed.
314
+
315
+ @param array - The array to modify.
316
+ @param fromIndex - The index of item to move. If negative, it will begin that
317
+ many elements from the end.
318
+ @param toIndex - The index of where to move the item. If negative, it will
319
+ begin that many elements from the end.
320
+ @example
321
+ ```
322
+ import { arrayMoveMutable } from '@theseam/ui-common/utils';
323
+
324
+ const input = ['a', 'b', 'c'];
325
+ arrayMoveMutable(input, 1, 2);
326
+ console.log(input);
327
+ //=> ['a', 'c', 'b']
328
+ ```
329
+ */
330
+ function arrayMoveMutable(array, fromIndex, toIndex) {
331
+ const startIndex = fromIndex < 0 ? array.length + fromIndex : fromIndex;
332
+ if (startIndex >= 0 && startIndex < array.length) {
333
+ const endIndex = toIndex < 0 ? array.length + toIndex : toIndex;
334
+ const [item] = array.splice(fromIndex, 1);
335
+ array.splice(endIndex, 0, item);
336
+ }
337
+ }
338
+ /**
339
+ Clones the given `array`, moves the item to a new position in the new array,
340
+ and then returns the new array. The given `array` is not mutated.
341
+
342
+ @param array - The array with the item to move.
343
+ @param fromIndex - The index of item to move. If negative, it will begin that
344
+ many elements from the end.
345
+ @param toIndex - The index of where to move the item. If negative, it will
346
+ begin that many elements from the end.
347
+ @returns A new array with the item moved to the new position.
348
+ @example
349
+ ```
350
+ import { arrayMoveImmutable } from '@theseam/ui-common/utils';
351
+
352
+ const input = ['a', 'b', 'c'];
353
+ const array1 = arrayMoveImmutable(input, 1, 2);
354
+ console.log(array1);
355
+ //=> ['a', 'c', 'b']
356
+
357
+ const array2 = arrayMoveImmutable(input, -1, 0);
358
+ console.log(array2);
359
+ //=> ['c', 'a', 'b']
360
+
361
+ const array3 = arrayMoveImmutable(input, -2, -3);
362
+ console.log(array3);
363
+ //=> ['b', 'a', 'c']
364
+ ```
365
+ */
366
+ function arrayMoveImmutable(array, fromIndex, toIndex) {
367
+ const newArray = [...array];
368
+ arrayMoveMutable(newArray, fromIndex, toIndex);
369
+ return newArray;
370
+ }
371
+
310
372
  function calcPercentage(total, n) {
311
373
  return total && total > 0 ? (n / total) * 100 : 0;
312
374
  }
@@ -715,19 +777,45 @@ function isAbsoluteUrl(url) {
715
777
  /**
716
778
  * This is just for helping debug observables that aren't being unsubscribed
717
779
  * from correctly.
780
+ *
781
+ * If description is 'foo' then you can check the how many observers are
782
+ * subscribed with the expression `__subscriberCounts['foo']`. In a debugger you
783
+ * can add the expression to the "Watch" expressions or in Chrome Devtools
784
+ * Console you can add it to the live expressions(Add live expressions by
785
+ * clicking the eye the the left of the Console filter input).
718
786
  */
719
- function subscriberCount(sourceObservable, description) {
787
+ function subscriberCount(sourceObservable, description, countChangedFn = logOnChange) {
720
788
  let counter = 0;
721
789
  return new Observable((subscriber) => {
722
790
  const subscription = sourceObservable.subscribe(subscriber);
723
791
  counter++;
724
- console.log(`${description} subscriptions: ${counter}`);
792
+ if (countChangedFn !== undefined && countChangedFn !== null) {
793
+ countChangedFn(description, counter, 'subscribed');
794
+ }
795
+ setGlobalSubscriberCount(description, counter);
725
796
  return () => {
726
797
  subscription.unsubscribe();
727
798
  counter--;
728
- console.log(`${description} subscriptions: ${counter}`);
799
+ if (countChangedFn !== undefined && countChangedFn !== null) {
800
+ countChangedFn(description, counter, 'unsubscribed');
801
+ }
802
+ setGlobalSubscriberCount(description, counter);
729
803
  };
730
804
  });
805
+ }
806
+ const logOnChange = (description, count, reason) => {
807
+ console.log(`${description} subscriptions: ${count} [${reason}]`);
808
+ };
809
+ const ɵ0 = logOnChange;
810
+ function getGlobalSubscriberCounts() {
811
+ const w = window;
812
+ if (w.__subscriberCounts === undefined || w.__subscriberCounts === null) {
813
+ w.__subscriberCounts = {};
814
+ }
815
+ return w.__subscriberCounts;
816
+ }
817
+ function setGlobalSubscriberCount(description, count) {
818
+ getGlobalSubscriberCounts()[description] = count;
731
819
  }
732
820
 
733
821
  function observeQueryList(queryList, emitCurrentValue = true) {
@@ -793,5 +881,5 @@ function fractionalDigitsCount(value) {
793
881
  * Generated bundle index. Do not edit.
794
882
  */
795
883
 
796
- export { PollingTickerOptions, Refreshable, activatedRoutesWithDataProperty, calcPercentage, createPadding, deleteProperties, deleteProperty, fileBufferToBlob, fileBufferToObjectUrl, fileDataFromBuffer, fractionalDigitsCount, getAttribute, getClosestWidgetCdkDrag, getControlName, getControlPath, hasAttribute, hasProperty, hasRequiredControl, isAbsoluteUrl, isEmptyInputValue, isEmptyUrlRoute, isNullOrUndefined, isNumeric, leafChildRoute, loadStyle, loadStyleSheet, mapEach, notNullOrUndefined, observeControlIsDifferent, observeControlStatus, observeControlValid, observeControlValue, observeControlValueChange, observeQueryList, openBlob, padEnd, padStart, phoneNumberMask, pollingTicker, readFileAsDataUrlAsync, readFileAsync, routeSnapshotPathFull, routeSnapshotPathRelative, tapFirst, toggleAttribute, waitOnConditionAsync, waitOnNonPendingStatus, willHaveDataProp, withoutProperties, withoutProperty, wrapIntoObservable };
884
+ export { PollingTickerOptions, Refreshable, activatedRoutesWithDataProperty, arrayMoveImmutable, arrayMoveMutable, calcPercentage, createPadding, deleteProperties, deleteProperty, fileBufferToBlob, fileBufferToObjectUrl, fileDataFromBuffer, fractionalDigitsCount, getAttribute, getClosestWidgetCdkDrag, getControlName, getControlPath, hasAttribute, hasProperty, hasRequiredControl, isAbsoluteUrl, isEmptyInputValue, isEmptyUrlRoute, isNullOrUndefined, isNumeric, leafChildRoute, loadStyle, loadStyleSheet, mapEach, notNullOrUndefined, observeControlIsDifferent, observeControlStatus, observeControlValid, observeControlValue, observeControlValueChange, observeQueryList, openBlob, padEnd, padStart, phoneNumberMask, pollingTicker, readFileAsDataUrlAsync, readFileAsync, routeSnapshotPathFull, routeSnapshotPathRelative, subscriberCount, tapFirst, toggleAttribute, waitOnConditionAsync, waitOnNonPendingStatus, willHaveDataProp, withoutProperties, withoutProperty, wrapIntoObservable, ɵ0 };
797
885
  //# sourceMappingURL=theseam-ui-common-utils.js.map