@firestitch/filter 14.0.0 → 14.0.2

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 (269) hide show
  1. package/{package/app → app}/classes/actions-controller.d.ts +41 -41
  2. package/{package/app → app}/components/action-button/action-button.component.d.ts +9 -9
  3. package/{package/app → app}/components/action-kebab-actions/action-kebab-actions.component.d.ts +7 -7
  4. package/{package/app → app}/components/actions/actions.component.d.ts +13 -13
  5. package/{package/app → app}/components/filter/filter.component.d.ts +204 -204
  6. package/{package/app → app}/components/filter-chip/filter-chip.component.d.ts +26 -26
  7. package/{package/app → app}/components/filter-chip-content/filter-chip-content.component.d.ts +18 -18
  8. package/{package/app → app}/components/filter-chips/filter-chips.component.d.ts +9 -9
  9. package/{package/app → app}/components/filter-drawer/filter-drawer.component.d.ts +30 -30
  10. package/{package/app → app}/components/filter-drawer-actions/filter-drawer-actions.component.d.ts +15 -15
  11. package/{package/app → app}/components/filters-item/autocomplete/autocomplete.component.d.ts +14 -14
  12. package/{package/app → app}/components/filters-item/autocompletechips/autocompletechips.component.d.ts +16 -16
  13. package/{package/app → app}/components/filters-item/base-item/base-item.component.d.ts +25 -25
  14. package/{package/app → app}/components/filters-item/checkbox/checkbox.component.d.ts +11 -11
  15. package/{package/app → app}/components/filters-item/chips/chips.component.d.ts +13 -13
  16. package/{package/app → app}/components/filters-item/date/date.component.d.ts +20 -20
  17. package/{package/app → app}/components/filters-item/date-range/date-range.component.d.ts +15 -15
  18. package/{package/app → app}/components/filters-item/filter-item.component.d.ts +39 -39
  19. package/{package/app → app}/components/filters-item/range/range.component.d.ts +15 -15
  20. package/{package/app → app}/components/filters-item/select/backdrop/backdrop.component.d.ts +6 -6
  21. package/{package/app → app}/components/filters-item/select/groups/groups.component.d.ts +12 -12
  22. package/{package/app → app}/components/filters-item/select/multiple/multiple.component.d.ts +15 -15
  23. package/{package/app → app}/components/filters-item/select/select.component.d.ts +23 -23
  24. package/{package/app → app}/components/filters-item/select/simple/simple.component.d.ts +14 -14
  25. package/{package/app → app}/components/filters-item/text/text.component.d.ts +19 -19
  26. package/{package/app → app}/components/filters-item/week/week.component.d.ts +12 -12
  27. package/{package/app → app}/components/saved-filter/index.d.ts +3 -3
  28. package/{package/app → app}/components/saved-filter/saved-filter-edit/index.d.ts +1 -1
  29. package/{package/app → app}/components/saved-filter/saved-filter-edit/saved-filter-edit.component.d.ts +18 -18
  30. package/{package/app → app}/components/saved-filter/saved-filter-manage/index.d.ts +1 -1
  31. package/{package/app → app}/components/saved-filter/saved-filter-manage/saved-filter-manage.component.d.ts +16 -16
  32. package/{package/app → app}/components/saved-filter/saved-filters-menu/index.d.ts +1 -1
  33. package/{package/app → app}/components/saved-filter/saved-filters-menu/saved-filters-menu.component.d.ts +23 -23
  34. package/{package/app → app}/consts/query-param-delimiter.d.ts +1 -1
  35. package/{package/app → app}/directives/focus-to-item/focus-to-item.directive.d.ts +27 -27
  36. package/{package/app → app}/directives/status-bar/status-bar.directive.d.ts +8 -8
  37. package/{package/app → app}/enums/action-mode.enum.d.ts +6 -6
  38. package/{package/app → app}/enums/action-type.enum.d.ts +9 -9
  39. package/{package/app → app}/enums/button-style.d.ts +9 -9
  40. package/{package/app → app}/enums/index.d.ts +6 -6
  41. package/{package/app → app}/enums/item-date-mode.enum.d.ts +5 -5
  42. package/{package/app → app}/enums/item-type.enum.d.ts +15 -15
  43. package/{package/app → app}/enums/picker-view-type.enum.d.ts +7 -7
  44. package/{package/app → app}/fs-filter.module.d.ts +70 -70
  45. package/{package/app → app}/helpers/build-query-params.d.ts +3 -3
  46. package/{package/app → app}/helpers/compare.d.ts +2 -2
  47. package/{package/app → app}/helpers/create-filter-item.d.ts +14 -14
  48. package/{package/app → app}/helpers/find-value.d.ts +1 -1
  49. package/{package/app → app}/helpers/get-range-name.d.ts +1 -1
  50. package/{package/app → app}/helpers/parse-date.d.ts +1 -1
  51. package/{package/app → app}/helpers/parse-item-value-from-stored.d.ts +1 -1
  52. package/{package/app → app}/helpers/query-param-transformers.d.ts +2 -2
  53. package/{package/app → app}/helpers/restore-items.d.ts +12 -12
  54. package/{package/app → app}/injectors/filter-config.d.ts +2 -2
  55. package/{package/app → app}/injectors/filter-drawer-data.d.ts +2 -2
  56. package/{package/app → app}/injectors/filter-drawer-overlay.d.ts +2 -2
  57. package/{package/app → app}/interfaces/action.interface.d.ts +81 -81
  58. package/{package/app → app}/interfaces/config.interface.d.ts +66 -66
  59. package/{package/app → app}/interfaces/external-params.interface.d.ts +3 -3
  60. package/{package/app → app}/interfaces/filter.interface.d.ts +4 -4
  61. package/{package/app → app}/interfaces/index.d.ts +6 -6
  62. package/{package/app → app}/interfaces/items/autocomplete-chips.interface.d.ts +15 -15
  63. package/{package/app → app}/interfaces/items/autocomplete.interface.d.ts +9 -9
  64. package/{package/app → app}/interfaces/items/base.interface.d.ts +29 -29
  65. package/{package/app → app}/interfaces/items/checkbox.interface.d.ts +7 -7
  66. package/{package/app → app}/interfaces/items/chips.interface.d.ts +6 -6
  67. package/{package/app → app}/interfaces/items/date-range.interface.d.ts +8 -8
  68. package/{package/app → app}/interfaces/items/date.interface.d.ts +7 -7
  69. package/{package/app → app}/interfaces/items/range.interface.d.ts +13 -13
  70. package/{package/app → app}/interfaces/items/select.interface.d.ts +20 -20
  71. package/{package/app → app}/interfaces/items/text.interface.d.ts +9 -9
  72. package/{package/app → app}/interfaces/items/week.interface.d.ts +7 -7
  73. package/{package/app → app}/interfaces/saved-filters.interface.d.ts +18 -18
  74. package/{package/app → app}/interfaces/update-filter-item.interface.d.ts +4 -4
  75. package/{package/app → app}/models/action-menu-item.model.d.ts +23 -23
  76. package/{package/app → app}/models/action.model.d.ts +54 -54
  77. package/{package/app → app}/models/filter-config.d.ts +31 -31
  78. package/{package/app → app}/models/items/autocomplete/base-autocomplete-item.d.ts +12 -12
  79. package/{package/app → app}/models/items/autocomplete-chips-item.d.ts +20 -20
  80. package/{package/app → app}/models/items/autocomplete-item.d.ts +11 -11
  81. package/{package/app → app}/models/items/base-item.d.ts +80 -80
  82. package/{package/app → app}/models/items/checkbox-item.d.ts +17 -17
  83. package/{package/app → app}/models/items/chips-item.d.ts +18 -18
  84. package/{package/app → app}/models/items/date/base-date-item.d.ts +14 -14
  85. package/{package/app → app}/models/items/date-item.d.ts +8 -8
  86. package/{package/app → app}/models/items/date-range/base-date-range-item.d.ts +21 -21
  87. package/{package/app → app}/models/items/date-range-item.d.ts +6 -6
  88. package/{package/app → app}/models/items/date-time-item.d.ts +7 -7
  89. package/{package/app → app}/models/items/date-time-range-item.d.ts +6 -6
  90. package/{package/app → app}/models/items/range-item.d.ts +23 -23
  91. package/{package/app → app}/models/items/select/base-select-item.d.ts +13 -13
  92. package/{package/app → app}/models/items/select/multiple-select-item.d.ts +14 -14
  93. package/{package/app → app}/models/items/select/simple-select-item.d.ts +14 -14
  94. package/{package/app → app}/models/items/select-item.d.ts +8 -8
  95. package/{package/app → app}/models/items/text-item.d.ts +15 -15
  96. package/{package/app → app}/models/items/week-item.d.ts +18 -18
  97. package/{package/app → app}/pipes/remove-isolate-value.pipe.d.ts +8 -8
  98. package/{package/app → app}/providers/filter-meta.d.ts +5 -5
  99. package/{package/app → app}/services/external-params/persistance-params-controller.service.d.ts +22 -22
  100. package/{package/app → app}/services/external-params/query-params-controller.service.d.ts +22 -22
  101. package/{package/app → app}/services/external-params/saved-filters-controller.service.d.ts +40 -40
  102. package/{package/app → app}/services/external-params-controller.service.d.ts +42 -42
  103. package/{package/app → app}/services/filter-overlay.service.d.ts +36 -36
  104. package/{package/app → app}/services/focus-controller.service.d.ts +18 -18
  105. package/{package/app → app}/services/items-store.service.d.ts +69 -69
  106. package/{package/esm2020 → esm2020}/app/classes/actions-controller.mjs +126 -126
  107. package/{package/esm2020 → esm2020}/app/components/action-button/action-button.component.mjs +21 -21
  108. package/{package/esm2020 → esm2020}/app/components/action-kebab-actions/action-kebab-actions.component.mjs +16 -16
  109. package/{package/esm2020 → esm2020}/app/components/actions/actions.component.mjs +41 -41
  110. package/{package/esm2020 → esm2020}/app/components/filter/filter.component.mjs +613 -613
  111. package/{package/esm2020 → esm2020}/app/components/filter-chip/filter-chip.component.mjs +85 -85
  112. package/{package/esm2020 → esm2020}/app/components/filter-chip-content/filter-chip-content.component.mjs +78 -78
  113. package/{package/esm2020 → esm2020}/app/components/filter-chips/filter-chips.component.mjs +18 -18
  114. package/{package/esm2020 → esm2020}/app/components/filter-drawer/filter-drawer.component.mjs +70 -70
  115. package/{package/esm2020 → esm2020}/app/components/filter-drawer-actions/filter-drawer-actions.component.mjs +40 -40
  116. package/{package/esm2020 → esm2020}/app/components/filters-item/autocomplete/autocomplete.component.mjs +26 -26
  117. package/{package/esm2020 → esm2020}/app/components/filters-item/autocompletechips/autocompletechips.component.mjs +41 -41
  118. package/{package/esm2020 → esm2020}/app/components/filters-item/base-item/base-item.component.mjs +62 -62
  119. package/{package/esm2020 → esm2020}/app/components/filters-item/checkbox/checkbox.component.mjs +20 -20
  120. package/{package/esm2020 → esm2020}/app/components/filters-item/chips/chips.component.mjs +27 -27
  121. package/{package/esm2020 → esm2020}/app/components/filters-item/date/date.component.mjs +42 -42
  122. package/{package/esm2020 → esm2020}/app/components/filters-item/date-range/date-range.component.mjs +33 -33
  123. package/{package/esm2020 → esm2020}/app/components/filters-item/filter-item.component.mjs +79 -79
  124. package/{package/esm2020 → esm2020}/app/components/filters-item/range/range.component.mjs +44 -44
  125. package/{package/esm2020 → esm2020}/app/components/filters-item/select/backdrop/backdrop.component.mjs +11 -11
  126. package/{package/esm2020 → esm2020}/app/components/filters-item/select/groups/groups.component.mjs +29 -29
  127. package/{package/esm2020 → esm2020}/app/components/filters-item/select/multiple/multiple.component.mjs +56 -56
  128. package/{package/esm2020 → esm2020}/app/components/filters-item/select/select.component.mjs +50 -50
  129. package/{package/esm2020 → esm2020}/app/components/filters-item/select/simple/simple.component.mjs +42 -42
  130. package/{package/esm2020 → esm2020}/app/components/filters-item/text/text.component.mjs +48 -48
  131. package/{package/esm2020 → esm2020}/app/components/filters-item/week/week.component.mjs +24 -24
  132. package/{package/esm2020 → esm2020}/app/components/saved-filter/index.mjs +3 -3
  133. package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-edit/index.mjs +1 -1
  134. package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-edit/saved-filter-edit.component.mjs +49 -49
  135. package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-manage/index.mjs +1 -1
  136. package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filter-manage/saved-filter-manage.component.mjs +39 -39
  137. package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filters-menu/index.mjs +1 -1
  138. package/{package/esm2020 → esm2020}/app/components/saved-filter/saved-filters-menu/saved-filters-menu.component.mjs +51 -51
  139. package/{package/esm2020 → esm2020}/app/consts/query-param-delimiter.mjs +1 -1
  140. package/{package/esm2020 → esm2020}/app/directives/focus-to-item/focus-to-item.directive.mjs +129 -129
  141. package/{package/esm2020 → esm2020}/app/directives/status-bar/status-bar.directive.mjs +15 -15
  142. package/{package/esm2020 → esm2020}/app/enums/action-mode.enum.mjs +7 -7
  143. package/{package/esm2020 → esm2020}/app/enums/action-type.enum.mjs +11 -11
  144. package/{package/esm2020 → esm2020}/app/enums/button-style.mjs +10 -10
  145. package/{package/esm2020 → esm2020}/app/enums/index.mjs +6 -6
  146. package/{package/esm2020 → esm2020}/app/enums/item-date-mode.enum.mjs +6 -6
  147. package/{package/esm2020 → esm2020}/app/enums/item-type.enum.mjs +16 -16
  148. package/{package/esm2020 → esm2020}/app/enums/picker-view-type.enum.mjs +8 -8
  149. package/{package/esm2020 → esm2020}/app/fs-filter.module.mjs +260 -260
  150. package/{package/esm2020 → esm2020}/app/helpers/build-query-params.mjs +32 -32
  151. package/{package/esm2020 → esm2020}/app/helpers/compare.mjs +37 -37
  152. package/{package/esm2020 → esm2020}/app/helpers/create-filter-item.mjs +54 -54
  153. package/{package/esm2020 → esm2020}/app/helpers/find-value.mjs +12 -12
  154. package/{package/esm2020 → esm2020}/app/helpers/get-range-name.mjs +8 -8
  155. package/{package/esm2020 → esm2020}/app/helpers/parse-date.mjs +7 -7
  156. package/{package/esm2020 → esm2020}/app/helpers/parse-item-value-from-stored.mjs +80 -80
  157. package/{package/esm2020 → esm2020}/app/helpers/query-param-transformers.mjs +8 -8
  158. package/{package/esm2020 → esm2020}/app/helpers/restore-items.mjs +48 -48
  159. package/{package/esm2020 → esm2020}/app/injectors/filter-config.mjs +2 -2
  160. package/{package/esm2020 → esm2020}/app/injectors/filter-drawer-data.mjs +2 -2
  161. package/{package/esm2020 → esm2020}/app/injectors/filter-drawer-overlay.mjs +2 -2
  162. package/{package/esm2020 → esm2020}/app/interfaces/action.interface.mjs +1 -1
  163. package/{package/esm2020 → esm2020}/app/interfaces/config.interface.mjs +1 -1
  164. package/{package/esm2020 → esm2020}/app/interfaces/external-params.interface.mjs +1 -1
  165. package/{package/esm2020 → esm2020}/app/interfaces/filter.interface.mjs +1 -1
  166. package/{package/esm2020 → esm2020}/app/interfaces/index.mjs +6 -6
  167. package/{package/esm2020 → esm2020}/app/interfaces/items/autocomplete-chips.interface.mjs +1 -1
  168. package/{package/esm2020 → esm2020}/app/interfaces/items/autocomplete.interface.mjs +1 -1
  169. package/{package/esm2020 → esm2020}/app/interfaces/items/base.interface.mjs +1 -1
  170. package/{package/esm2020 → esm2020}/app/interfaces/items/checkbox.interface.mjs +1 -1
  171. package/{package/esm2020 → esm2020}/app/interfaces/items/chips.interface.mjs +1 -1
  172. package/{package/esm2020 → esm2020}/app/interfaces/items/date-range.interface.mjs +1 -1
  173. package/{package/esm2020 → esm2020}/app/interfaces/items/date.interface.mjs +1 -1
  174. package/{package/esm2020 → esm2020}/app/interfaces/items/range.interface.mjs +1 -1
  175. package/{package/esm2020 → esm2020}/app/interfaces/items/select.interface.mjs +1 -1
  176. package/{package/esm2020 → esm2020}/app/interfaces/items/text.interface.mjs +1 -1
  177. package/{package/esm2020 → esm2020}/app/interfaces/items/week.interface.mjs +1 -1
  178. package/{package/esm2020 → esm2020}/app/interfaces/saved-filters.interface.mjs +1 -1
  179. package/{package/esm2020 → esm2020}/app/interfaces/update-filter-item.interface.mjs +1 -1
  180. package/{package/esm2020 → esm2020}/app/models/action-menu-item.model.mjs +66 -66
  181. package/{package/esm2020 → esm2020}/app/models/action.model.mjs +129 -129
  182. package/{package/esm2020 → esm2020}/app/models/filter-config.mjs +66 -66
  183. package/{package/esm2020 → esm2020}/app/models/items/autocomplete/base-autocomplete-item.mjs +13 -13
  184. package/{package/esm2020 → esm2020}/app/models/items/autocomplete-chips-item.mjs +60 -60
  185. package/{package/esm2020 → esm2020}/app/models/items/autocomplete-item.mjs +32 -32
  186. package/{package/esm2020 → esm2020}/app/models/items/base-item.mjs +233 -233
  187. package/{package/esm2020 → esm2020}/app/models/items/checkbox-item.mjs +49 -49
  188. package/{package/esm2020 → esm2020}/app/models/items/chips-item.mjs +88 -88
  189. package/{package/esm2020 → esm2020}/app/models/items/date/base-date-item.mjs +47 -47
  190. package/{package/esm2020 → esm2020}/app/models/items/date-item.mjs +18 -18
  191. package/{package/esm2020 → esm2020}/app/models/items/date-range/base-date-range-item.mjs +134 -134
  192. package/{package/esm2020 → esm2020}/app/models/items/date-range-item.mjs +6 -6
  193. package/{package/esm2020 → esm2020}/app/models/items/date-time-item.mjs +9 -9
  194. package/{package/esm2020 → esm2020}/app/models/items/date-time-range-item.mjs +6 -6
  195. package/{package/esm2020 → esm2020}/app/models/items/range-item.mjs +82 -82
  196. package/{package/esm2020 → esm2020}/app/models/items/select/base-select-item.mjs +36 -36
  197. package/{package/esm2020 → esm2020}/app/models/items/select/multiple-select-item.mjs +87 -87
  198. package/{package/esm2020 → esm2020}/app/models/items/select/simple-select-item.mjs +65 -65
  199. package/{package/esm2020 → esm2020}/app/models/items/select-item.mjs +10 -10
  200. package/{package/esm2020 → esm2020}/app/models/items/text-item.mjs +33 -33
  201. package/{package/esm2020 → esm2020}/app/models/items/week-item.mjs +93 -93
  202. package/{package/esm2020 → esm2020}/app/pipes/remove-isolate-value.pipe.mjs +20 -20
  203. package/{package/esm2020 → esm2020}/app/providers/filter-meta.mjs +9 -9
  204. package/{package/esm2020 → esm2020}/app/services/external-params/persistance-params-controller.service.mjs +57 -57
  205. package/{package/esm2020 → esm2020}/app/services/external-params/query-params-controller.service.mjs +61 -61
  206. package/{package/esm2020 → esm2020}/app/services/external-params/saved-filters-controller.service.mjs +162 -162
  207. package/{package/esm2020 → esm2020}/app/services/external-params-controller.service.mjs +178 -178
  208. package/{package/esm2020 → esm2020}/app/services/filter-overlay.service.mjs +121 -121
  209. package/{package/esm2020 → esm2020}/app/services/focus-controller.service.mjs +29 -29
  210. package/{package/esm2020 → esm2020}/app/services/items-store.service.mjs +344 -344
  211. package/{package/esm2020 → esm2020}/firestitch-filter.mjs +4 -4
  212. package/{package/esm2020 → esm2020}/public_api.mjs +35 -35
  213. package/{package/fesm2015 → fesm2015}/firestitch-filter.mjs +4349 -4349
  214. package/{package/fesm2015 → fesm2015}/firestitch-filter.mjs.map +1 -1
  215. package/{package/fesm2020 → fesm2020}/firestitch-filter.mjs +4336 -4336
  216. package/{package/fesm2020 → fesm2020}/firestitch-filter.mjs.map +1 -1
  217. package/{package/index.d.ts → index.d.ts} +5 -5
  218. package/package.json +22 -79
  219. package/{package/public_api.d.ts → public_api.d.ts} +40 -40
  220. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/16/25/214635fa124a83a4fe3a52bde70e7124d9d011a5d176790a9c607bf1f5ed27cadefc4a1b5a225c0bda11250a180ca5798773e0c108e8d5e2d8559d2f9eed +0 -1
  221. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/44/f9/ee834587d4ac4a429d8c4af2e1562028c7432ac179f9699f2990ab3dadc8e4f66ae45bf22625aedf47fad137e2de39a9b99141784e56d5123544f90c922a +0 -1
  222. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/4d/89/993c2eaff9e0cfca023676bf3f2d3d446f6b6cc90eec839075529d155102b2808a8b44e259d357704acd43143c12af5a5916b4e291a799164b722142ee8e +0 -1
  223. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/52/cb/71f80b48163c432fcb05ac0f736ae7cae10318713c98c74739b3eb5d83ebce635b1a7c77d357b1a4b13a9ae9cfe43348538e4336c25c234551f1e80f0567 +0 -1
  224. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/54/f6/73f0d8ea64a18aa71d80a2cf99d6eb4a2cd345e943127e018913d0f76e9575fabe3aee5002ee4da996e661662d474ad31e9a77f2858c68eed532c2d45d47 +0 -1
  225. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/61/84/7f56389ef39faf5c5b6ad292f668ec6cc5cb6e476d94b1740bdadb9832e3de22a0032b90811f02c80d3d56be5f5e32d8bb900e17ebcb09db379befddc221 +0 -1
  226. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/69/d3/d48ad36dd0a576c4d6f8af3a2ee671037639b0a8d91679992dcbd9dabc284bf316c3126201837e931a162f23cdc4a505608bb64df8e87f59a17364890873 +0 -1
  227. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/70/92/ac80dcd48732b949f163abf36c48b0912598d2bb66e5c1f2056fef872f59fb1b591abbf3bfdbf461a46cbd507eea05a6bd0f14ba3d573f1684cbc78bd094 +0 -1
  228. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/73/10/12664696206dcdab6b084331532b234c439acef8a6428af667a2e1bb1c15e2055b3ac70f44fd8bf508396d3e11a798b40849fd66dbdbd0ff9d9d7e780edd +0 -1
  229. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/74/f6/4c2db73499d08279895e1ab6e2fb65baa613d31218b6968f74143ba03819c72a2720b927ca5a708dd484c0bc6763124e62ce9c2e652f71b740cb2d29ae03 +0 -1
  230. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/78/30/8eedd8d752a08df898806b01abde5b4c1809f6edcba95fcf112c006833b34986c295b62a7e47cd73297c3da78ca6072ef18ba502b6efdd6048dbdbbcd257 +0 -1
  231. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/8c/f8/d9f30e3e898c99e8c3157d4c9157dead1b1115ea4db50aced0c33713cd394bb770b182d1d5087c821d22b2abb99e288191ba9e30954ea4ed9ab6ff70d391 +0 -1
  232. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/8d/53/ad58764bc240411378ae1c47c0c20525da378a3b143795a11bc3fdbf6c9cde6fb2de6c3947d673d5872b9ce205d6274114b3b4dfd27609a636df7fd0b600 +0 -1
  233. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/8f/74/3ed29367f32f9c909f5898704561eb1ebe5cdabba507ba08cbeeaeecd274d020b1401ba871938be899025a265299f8be66c59d59b574a996a74b2987d98e +0 -1
  234. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/a1/ac/1dbcf215585477c3f70180cb40186b5119d9ad1d27b2e0dcde66034c950e334ce0577409535c29bb15d2e6c9238eb9e841177fc62d3949a58bbbb397238d +0 -1
  235. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/a3/08/068a7a29e9cc2385b62d4b0fc14b04a7f09ed469d9b79bb754e37d4933b0ab8aa171b286080e20a11e67f42b8558a4bda64aa03ca097001ecda5c25a9015 +0 -1
  236. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/ae/6c/352ab77e603fa53f25ab95cd6fd19a230095b212464689ab76c89db8d97bd0f221c27fbd84d0767fb5ce7e33f5feb175a9256ab35cf216d30dd3263b6b14 +0 -1
  237. package/.angular/cache/14.2.13/ng-packagr/content-v2/sha512/b6/38/eb8a1b6bd6265968335935cbc2763fbcbb9cd4e32dd58a5234bfd87379ee840044338eeae5f126da9936d21ed423071cfbca6748ee153235addf874824f7 +0 -1
  238. package/.angular/cache/14.2.13/ng-packagr/index-v5/01/3c/d4dca899e5bd80c43ed2e78ec79687adc272ff835d03f0ae48cb881ddd83 +0 -2
  239. package/.angular/cache/14.2.13/ng-packagr/index-v5/05/a7/da2d9625c1bc294409dbf750062e363a1abbe39b51177bfb7e5a9aa9ae81 +0 -2
  240. package/.angular/cache/14.2.13/ng-packagr/index-v5/08/f1/b2e705e45544df7c77f4238b558d569a1215422c2086df9140963f960eef +0 -2
  241. package/.angular/cache/14.2.13/ng-packagr/index-v5/21/1d/398c87beb2402502d4e706beedd98ea707f31b441d6aa7711eef62a0439b +0 -2
  242. package/.angular/cache/14.2.13/ng-packagr/index-v5/26/0b/ee2b1cad7f114e99f8d4da848bd6ceb4e849178b50723d9dcd10f39fb05c +0 -2
  243. package/.angular/cache/14.2.13/ng-packagr/index-v5/26/98/b8614f38ea6fefe80f96f06adb98d925eccfae9eec0937c645a42034614c +0 -2
  244. package/.angular/cache/14.2.13/ng-packagr/index-v5/64/4d/18a7b240783e7b3de33ad33724d2b43e8f3349e840ccab571ca3c6c51c00 +0 -2
  245. package/.angular/cache/14.2.13/ng-packagr/index-v5/64/70/77036e049a76cab5a64caa9cba4b603631c7e9e2f47e6c5fbc7f39d67a2f +0 -2
  246. package/.angular/cache/14.2.13/ng-packagr/index-v5/6c/5d/700bf777ddebfd9b8f15e2709674069747b6fcd37376049712828252ca92 +0 -3
  247. package/.angular/cache/14.2.13/ng-packagr/index-v5/71/89/4e4e3808e28a4a95a98391ab38f87f165ae234aefd4231092d1f531f56b3 +0 -2
  248. package/.angular/cache/14.2.13/ng-packagr/index-v5/7c/c2/bd7b21a07f8b1da7797f40df86dc4289416305c26464c6b965a336fd3975 +0 -2
  249. package/.angular/cache/14.2.13/ng-packagr/index-v5/85/64/cb2f22b4df13a70eb519564e382de3d7dd3747bc0cab1109017f8934cff8 +0 -2
  250. package/.angular/cache/14.2.13/ng-packagr/index-v5/96/b1/2730596477eee53fc70082999f48e373f6795e68d21e04234a45131added +0 -2
  251. package/.angular/cache/14.2.13/ng-packagr/index-v5/af/e4/165326aa8daa8e07ac9e02bde3d64a31b00d1b2b59a797a51a89456d2ad6 +0 -2
  252. package/.angular/cache/14.2.13/ng-packagr/index-v5/cd/96/32e83b96bce723e8ad58fdb7c43cf0002b3e0561309899e8b2a75204cbff +0 -2
  253. package/.angular/cache/14.2.13/ng-packagr/index-v5/dd/38/1f423a0e17cf4e99ef3c880daeb533cdce9275226cb2f617aed52e881e59 +0 -2
  254. package/.angular/cache/14.2.13/ng-packagr/index-v5/e4/e8/f48bdfbec024c932fd928e4db790b6454d090d4db31e9d69201a5e1ea466 +0 -2
  255. package/.angular/cache/14.2.13/ng-packagr/index-v5/ee/59/16a63690de125da5067876d4ccf122230175174f3489e48893448bcbdcd3 +0 -2
  256. package/.angular/cache/14.2.13/ng-packagr/index-v5/fd/46/71e9d6d1a123ed68ce03aa617dcaaad4ad9c5a9193f1281166766c453621 +0 -3
  257. package/.angulardoc.json +0 -4
  258. package/.editorconfig +0 -15
  259. package/.eslintrc.json +0 -9
  260. package/.gitmodules +0 -3
  261. package/README.MD +0 -0
  262. package/angular.json +0 -163
  263. package/babel.config.js +0 -11
  264. package/jest.config.js +0 -24
  265. package/package/package.json +0 -56
  266. package/tsconfig.compodoc.json +0 -12
  267. package/tsconfig.json +0 -10
  268. package/tslint.json +0 -8
  269. /package/{package/styles.scss → styles.scss} +0 -0
@@ -1,42 +1,42 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { IFilterExternalParams } from '../interfaces/external-params.interface';
4
- import { IFilterSavedFilter } from '../interfaces/saved-filters.interface';
5
- import { PersistanceParamsController } from './external-params/persistance-params-controller.service';
6
- import { QueryParamsController } from './external-params/query-params-controller.service';
7
- import { SavedFiltersController } from './external-params/saved-filters-controller.service';
8
- import { FsFilterItemsStore } from './items-store.service';
9
- import * as i0 from "@angular/core";
10
- export declare class ExternalParamsController implements OnDestroy {
11
- private _itemsStore;
12
- private _persistanceStore;
13
- private _queryParams;
14
- private _savedFilters;
15
- protected _init: any;
16
- private _pending$;
17
- private _shouldResetSavedFilters;
18
- private _config;
19
- private _destroy$;
20
- constructor(_itemsStore: FsFilterItemsStore, _persistanceStore: PersistanceParamsController, _queryParams: QueryParamsController, _savedFilters: SavedFiltersController);
21
- get params(): IFilterExternalParams;
22
- get pending(): boolean;
23
- get pending$(): Observable<boolean>;
24
- get savedFiltersController(): SavedFiltersController;
25
- get savedFiltersEnabled(): boolean;
26
- ngOnDestroy(): void;
27
- setConfig(config: any): void;
28
- setActiveSavedFilter(savedFilter: IFilterSavedFilter): void;
29
- reloadFiltersWithValues(params: IFilterExternalParams, shouldResetSavedFilters?: boolean): void;
30
- initItems(): void;
31
- _initItemsValues(): void;
32
- fetchQueryParams(): void;
33
- private _initPersistance;
34
- private _initQueryParams;
35
- private _initSavedFilters;
36
- private _listenItemsChange;
37
- private _listenAndResetSavedFilters;
38
- private _saveQueryParams;
39
- private _savePersistedParams;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<ExternalParamsController, never>;
41
- static ɵprov: i0.ɵɵInjectableDeclaration<ExternalParamsController>;
42
- }
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { IFilterExternalParams } from '../interfaces/external-params.interface';
4
+ import { IFilterSavedFilter } from '../interfaces/saved-filters.interface';
5
+ import { PersistanceParamsController } from './external-params/persistance-params-controller.service';
6
+ import { QueryParamsController } from './external-params/query-params-controller.service';
7
+ import { SavedFiltersController } from './external-params/saved-filters-controller.service';
8
+ import { FsFilterItemsStore } from './items-store.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class ExternalParamsController implements OnDestroy {
11
+ private _itemsStore;
12
+ private _persistanceStore;
13
+ private _queryParams;
14
+ private _savedFilters;
15
+ protected _init: any;
16
+ private _pending$;
17
+ private _shouldResetSavedFilters;
18
+ private _config;
19
+ private _destroy$;
20
+ constructor(_itemsStore: FsFilterItemsStore, _persistanceStore: PersistanceParamsController, _queryParams: QueryParamsController, _savedFilters: SavedFiltersController);
21
+ get params(): IFilterExternalParams;
22
+ get pending(): boolean;
23
+ get pending$(): Observable<boolean>;
24
+ get savedFiltersController(): SavedFiltersController;
25
+ get savedFiltersEnabled(): boolean;
26
+ ngOnDestroy(): void;
27
+ setConfig(config: any): void;
28
+ setActiveSavedFilter(savedFilter: IFilterSavedFilter): void;
29
+ reloadFiltersWithValues(params: IFilterExternalParams, shouldResetSavedFilters?: boolean): void;
30
+ initItems(): void;
31
+ _initItemsValues(): void;
32
+ fetchQueryParams(): void;
33
+ private _initPersistance;
34
+ private _initQueryParams;
35
+ private _initSavedFilters;
36
+ private _listenItemsChange;
37
+ private _listenAndResetSavedFilters;
38
+ private _saveQueryParams;
39
+ private _savePersistedParams;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExternalParamsController, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExternalParamsController>;
42
+ }
@@ -1,36 +1,36 @@
1
- import { Injector, OnDestroy } from '@angular/core';
2
- import { Overlay } from '@angular/cdk/overlay';
3
- import { Subject } from 'rxjs';
4
- import { HtmlClassRenderer } from '@firestitch/html';
5
- import { FilterDrawerComponent } from '../components/filter-drawer/filter-drawer.component';
6
- import { FsFilterMeta } from '../providers/filter-meta';
7
- import { FocusControllerService } from './focus-controller.service';
8
- import * as i0 from "@angular/core";
9
- export declare class FsFilterOverlayService implements OnDestroy {
10
- private _filterMeta;
11
- private _injector;
12
- private _overlay;
13
- private _focusController;
14
- private _htmlClassRenderer;
15
- detach$: Subject<unknown>;
16
- attach$: Subject<unknown>;
17
- private _clearFn;
18
- private _doneFn;
19
- private _destroy$;
20
- private _overlayRef;
21
- constructor(_filterMeta: FsFilterMeta, _injector: Injector, _overlay: Overlay, _focusController: FocusControllerService, _htmlClassRenderer: HtmlClassRenderer);
22
- get isOpened(): boolean;
23
- setClearFn(fn: Function): void;
24
- setDoneFn(fn: Function): void;
25
- close(): void;
26
- open(): FilterDrawerComponent;
27
- ngOnDestroy(): void;
28
- private _createOverlay;
29
- private _openPortalPreview;
30
- private _createInjector;
31
- private _removeFilterClass;
32
- private _addFilterClass;
33
- private _openWhenChipClicked;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterOverlayService, never>;
35
- static ɵprov: i0.ɵɵInjectableDeclaration<FsFilterOverlayService>;
36
- }
1
+ import { Injector, OnDestroy } from '@angular/core';
2
+ import { Overlay } from '@angular/cdk/overlay';
3
+ import { Subject } from 'rxjs';
4
+ import { HtmlClassRenderer } from '@firestitch/html';
5
+ import { FilterDrawerComponent } from '../components/filter-drawer/filter-drawer.component';
6
+ import { FsFilterMeta } from '../providers/filter-meta';
7
+ import { FocusControllerService } from './focus-controller.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class FsFilterOverlayService implements OnDestroy {
10
+ private _filterMeta;
11
+ private _injector;
12
+ private _overlay;
13
+ private _focusController;
14
+ private _htmlClassRenderer;
15
+ detach$: Subject<unknown>;
16
+ attach$: Subject<unknown>;
17
+ private _clearFn;
18
+ private _doneFn;
19
+ private _destroy$;
20
+ private _overlayRef;
21
+ constructor(_filterMeta: FsFilterMeta, _injector: Injector, _overlay: Overlay, _focusController: FocusControllerService, _htmlClassRenderer: HtmlClassRenderer);
22
+ get isOpened(): boolean;
23
+ setClearFn(fn: Function): void;
24
+ setDoneFn(fn: Function): void;
25
+ close(): void;
26
+ open(): FilterDrawerComponent;
27
+ ngOnDestroy(): void;
28
+ private _createOverlay;
29
+ private _openPortalPreview;
30
+ private _createInjector;
31
+ private _removeFilterClass;
32
+ private _addFilterClass;
33
+ private _openWhenChipClicked;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterOverlayService, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<FsFilterOverlayService>;
36
+ }
@@ -1,18 +1,18 @@
1
- import { BaseItem } from '../models/items/base-item';
2
- import * as i0 from "@angular/core";
3
- export declare class FocusControllerService {
4
- private _focusOn;
5
- constructor();
6
- get focusOn$(): import("rxjs").Observable<{
7
- item: BaseItem<any>;
8
- type: "from" | "to";
9
- }>;
10
- click(item: BaseItem<any>, type?: 'from' | 'to'): void;
11
- listenFocusFor$(targetItem: BaseItem<any>, targetType?: 'from' | 'to'): import("rxjs").Observable<{
12
- item: BaseItem<any>;
13
- type: "from" | "to";
14
- }>;
15
- clearFocus(): void;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusControllerService, never>;
17
- static ɵprov: i0.ɵɵInjectableDeclaration<FocusControllerService>;
18
- }
1
+ import { BaseItem } from '../models/items/base-item';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FocusControllerService {
4
+ private _focusOn;
5
+ constructor();
6
+ get focusOn$(): import("rxjs").Observable<{
7
+ item: BaseItem<any>;
8
+ type: "from" | "to";
9
+ }>;
10
+ click(item: BaseItem<any>, type?: 'from' | 'to'): void;
11
+ listenFocusFor$(targetItem: BaseItem<any>, targetType?: 'from' | 'to'): import("rxjs").Observable<{
12
+ item: BaseItem<any>;
13
+ type: "from" | "to";
14
+ }>;
15
+ clearFocus(): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusControllerService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<FocusControllerService>;
18
+ }
@@ -1,69 +1,69 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import type { FilterComponent } from '../components/filter/filter.component';
4
- import { FilterSort, IFilterConfigItem, SortItem } from '../interfaces/config.interface';
5
- import { IFilterExternalParams } from '../interfaces/external-params.interface';
6
- import { ISortingChangeEvent } from '../interfaces/filter.interface';
7
- import { BaseItem } from '../models/items/base-item';
8
- import { TextItem } from '../models/items/text-item';
9
- import * as i0 from "@angular/core";
10
- interface IValueAsQuery {
11
- onlyPresented?: boolean;
12
- items?: BaseItem<IFilterConfigItem>[];
13
- persisted?: boolean;
14
- }
15
- export declare class FsFilterItemsStore implements OnDestroy {
16
- sortByItem: BaseItem<IFilterConfigItem>;
17
- sortDirectionItem: BaseItem<IFilterConfigItem>;
18
- keywordItem: TextItem;
19
- filter: FilterComponent;
20
- private _ready$;
21
- private _items;
22
- private _visibleItems$;
23
- private _itemsByName;
24
- private _itemsValuesLoaded;
25
- private _hasKeyword;
26
- private _config;
27
- private _itemsChange$;
28
- private _destroy$;
29
- constructor();
30
- get items(): BaseItem<IFilterConfigItem>[];
31
- get itemNames(): string[];
32
- get visibleItems(): BaseItem<IFilterConfigItem>[];
33
- set visibleItems(items: BaseItem<IFilterConfigItem>[]);
34
- get visibleItems$(): Observable<BaseItem<IFilterConfigItem>[]>;
35
- get hasKeyword(): boolean;
36
- get itemsChange$(): Observable<unknown>;
37
- get ready$(): Observable<boolean>;
38
- ngOnDestroy(): void;
39
- setConfig(config: any): void;
40
- getItemByName(name: string): BaseItem<IFilterConfigItem>;
41
- initItems(items: IFilterConfigItem[]): void;
42
- filtersClear(): void;
43
- loadAsyncValues(): void;
44
- loadAsyncDefaults(): void;
45
- getSort(): FilterSort;
46
- getSortByValue(): any;
47
- getSortDirectionValue(): any;
48
- updateSort(sort: ISortingChangeEvent): void;
49
- values(onlyPresented?: boolean): Record<string, unknown>;
50
- valuesAsQuery({ onlyPresented, items, persisted, }?: IValueAsQuery): Record<string, unknown>;
51
- init(p: IFilterExternalParams): void;
52
- updateItemsWithValues(values: IFilterExternalParams): void;
53
- updateSortingItemsValues(items: SortItem[]): void;
54
- destroyItems(): void;
55
- /**
56
- * Some items might need to load async values before they will be shown
57
- */
58
- prepareItems(): void;
59
- updateItemsVisiblity(): void;
60
- private _createItems;
61
- private _subscribeToItemsChanges;
62
- private _lazyInit;
63
- private _initSortingItems;
64
- private _createSortingItems;
65
- private _setKeywordItem;
66
- static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterItemsStore, never>;
67
- static ɵprov: i0.ɵɵInjectableDeclaration<FsFilterItemsStore>;
68
- }
69
- export {};
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import type { FilterComponent } from '../components/filter/filter.component';
4
+ import { FilterSort, IFilterConfigItem, SortItem } from '../interfaces/config.interface';
5
+ import { IFilterExternalParams } from '../interfaces/external-params.interface';
6
+ import { ISortingChangeEvent } from '../interfaces/filter.interface';
7
+ import { BaseItem } from '../models/items/base-item';
8
+ import { TextItem } from '../models/items/text-item';
9
+ import * as i0 from "@angular/core";
10
+ interface IValueAsQuery {
11
+ onlyPresented?: boolean;
12
+ items?: BaseItem<IFilterConfigItem>[];
13
+ persisted?: boolean;
14
+ }
15
+ export declare class FsFilterItemsStore implements OnDestroy {
16
+ sortByItem: BaseItem<IFilterConfigItem>;
17
+ sortDirectionItem: BaseItem<IFilterConfigItem>;
18
+ keywordItem: TextItem;
19
+ filter: FilterComponent;
20
+ private _ready$;
21
+ private _items;
22
+ private _visibleItems$;
23
+ private _itemsByName;
24
+ private _itemsValuesLoaded;
25
+ private _hasKeyword;
26
+ private _config;
27
+ private _itemsChange$;
28
+ private _destroy$;
29
+ constructor();
30
+ get items(): BaseItem<IFilterConfigItem>[];
31
+ get itemNames(): string[];
32
+ get visibleItems(): BaseItem<IFilterConfigItem>[];
33
+ set visibleItems(items: BaseItem<IFilterConfigItem>[]);
34
+ get visibleItems$(): Observable<BaseItem<IFilterConfigItem>[]>;
35
+ get hasKeyword(): boolean;
36
+ get itemsChange$(): Observable<unknown>;
37
+ get ready$(): Observable<boolean>;
38
+ ngOnDestroy(): void;
39
+ setConfig(config: any): void;
40
+ getItemByName(name: string): BaseItem<IFilterConfigItem>;
41
+ initItems(items: IFilterConfigItem[]): void;
42
+ filtersClear(): void;
43
+ loadAsyncValues(): void;
44
+ loadAsyncDefaults(): void;
45
+ getSort(): FilterSort;
46
+ getSortByValue(): any;
47
+ getSortDirectionValue(): any;
48
+ updateSort(sort: ISortingChangeEvent): void;
49
+ values(onlyPresented?: boolean): Record<string, unknown>;
50
+ valuesAsQuery({ onlyPresented, items, persisted, }?: IValueAsQuery): Record<string, unknown>;
51
+ init(p: IFilterExternalParams): void;
52
+ updateItemsWithValues(values: IFilterExternalParams): void;
53
+ updateSortingItemsValues(items: SortItem[]): void;
54
+ destroyItems(): void;
55
+ /**
56
+ * Some items might need to load async values before they will be shown
57
+ */
58
+ prepareItems(): void;
59
+ updateItemsVisiblity(): void;
60
+ private _createItems;
61
+ private _subscribeToItemsChanges;
62
+ private _lazyInit;
63
+ private _initSortingItems;
64
+ private _createSortingItems;
65
+ private _setKeywordItem;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterItemsStore, never>;
67
+ static ɵprov: i0.ɵɵInjectableDeclaration<FsFilterItemsStore>;
68
+ }
69
+ export {};
@@ -1,127 +1,127 @@
1
- import { BreakpointObserver } from '@angular/cdk/layout';
2
- import { Injectable } from '@angular/core';
3
- import { BehaviorSubject, Subject } from 'rxjs';
4
- import { skip, takeUntil } from 'rxjs/operators';
5
- import { Action } from '../models/action.model';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@angular/cdk/layout";
8
- export class ActionsController {
9
- constructor(_breakpointObserver) {
10
- this._breakpointObserver = _breakpointObserver;
11
- this._visible$ = new BehaviorSubject(false);
12
- this._actions$ = new BehaviorSubject([]);
13
- this._menuActions$ = new BehaviorSubject([]);
14
- this._destroy$ = new Subject();
15
- this._mobileMedia = '(max-width: 799px)';
16
- this._allActions = [];
17
- this._listenMobileMedia();
18
- }
19
- get menuActions() {
20
- return this._menuActions$.value;
21
- }
22
- get actions() {
23
- return this._actions$.value;
24
- }
25
- get actions$() {
26
- return this._actions$.asObservable();
27
- }
28
- get menuActions$() {
29
- return this._menuActions$.asObservable();
30
- }
31
- get visible$() {
32
- return this._visible$.asObservable();
33
- }
34
- get mobileMode() {
35
- return this._breakpointObserver.isMatched(this._mobileMedia);
36
- }
37
- ngOnDestroy() {
38
- this._destroy$.next();
39
- this._destroy$.complete();
40
- }
41
- setConfig(config) {
42
- this._config = config;
43
- this.initActions(config.actions);
44
- }
45
- initActions(rawActions) {
46
- if (!rawActions || !Array.isArray(rawActions)) {
47
- return;
48
- }
49
- this.show();
50
- this._allActions = rawActions
51
- .map((action) => new Action(this._config, action));
52
- if (this._reorderAction) {
53
- this._allActions.unshift(this._reorderAction);
54
- }
55
- this._classifyActions();
56
- }
57
- show() {
58
- this._visible$.next(true);
59
- }
60
- hide() {
61
- this._visible$.next(false);
62
- }
63
- addReorderAction(action) {
64
- this._allActions.unshift(action);
65
- action.isReorderAction = true;
66
- this._classifyAction(action);
67
- this._reorderAction = action;
68
- }
69
- clearActions() {
70
- this._allActions = [];
71
- this._setActions([]);
72
- this._setKebabActions([]);
73
- }
74
- updateActionsVisibility() {
75
- this._allActions.forEach((action) => action.updateVisibility());
76
- this._classifyActions();
77
- }
78
- updateDisabledState() {
79
- this.actions.forEach((action) => action.updateDisabledState());
80
- }
81
- _setKebabActions(actions) {
82
- this._menuActions$.next(actions);
83
- }
84
- _setActions(actions) {
85
- this._actions$.next(actions);
86
- }
87
- _classifyActions() {
88
- const kebabActions = [];
89
- const actions = [];
90
- const mobileMode = this.mobileMode;
91
- this._allActions
92
- .filter((action) => {
93
- return action.visible;
94
- })
95
- .forEach((action) => {
96
- if (action.menu !== false && (action.menu || mobileMode)) {
97
- kebabActions.push(action);
98
- }
99
- else {
100
- actions.push(action);
101
- }
102
- });
103
- this._setKebabActions(kebabActions);
104
- this._setActions(actions);
105
- }
106
- _classifyAction(action) {
107
- if (action.menu) {
108
- this._setKebabActions([...this.menuActions, action]);
109
- }
110
- else {
111
- this._setActions([...this.actions, action]);
112
- }
113
- }
114
- _listenMobileMedia() {
115
- this._breakpointObserver.observe(this._mobileMedia)
116
- .pipe(skip(1), takeUntil(this._destroy$))
117
- .subscribe(() => {
118
- this._classifyActions();
119
- });
120
- }
121
- }
122
- ActionsController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsController, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
123
- ActionsController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsController });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsController, decorators: [{
125
- type: Injectable
126
- }], ctorParameters: function () { return [{ type: i1.BreakpointObserver }]; } });
1
+ import { BreakpointObserver } from '@angular/cdk/layout';
2
+ import { Injectable } from '@angular/core';
3
+ import { BehaviorSubject, Subject } from 'rxjs';
4
+ import { skip, takeUntil } from 'rxjs/operators';
5
+ import { Action } from '../models/action.model';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/cdk/layout";
8
+ export class ActionsController {
9
+ constructor(_breakpointObserver) {
10
+ this._breakpointObserver = _breakpointObserver;
11
+ this._visible$ = new BehaviorSubject(false);
12
+ this._actions$ = new BehaviorSubject([]);
13
+ this._menuActions$ = new BehaviorSubject([]);
14
+ this._destroy$ = new Subject();
15
+ this._mobileMedia = '(max-width: 799px)';
16
+ this._allActions = [];
17
+ this._listenMobileMedia();
18
+ }
19
+ get menuActions() {
20
+ return this._menuActions$.value;
21
+ }
22
+ get actions() {
23
+ return this._actions$.value;
24
+ }
25
+ get actions$() {
26
+ return this._actions$.asObservable();
27
+ }
28
+ get menuActions$() {
29
+ return this._menuActions$.asObservable();
30
+ }
31
+ get visible$() {
32
+ return this._visible$.asObservable();
33
+ }
34
+ get mobileMode() {
35
+ return this._breakpointObserver.isMatched(this._mobileMedia);
36
+ }
37
+ ngOnDestroy() {
38
+ this._destroy$.next();
39
+ this._destroy$.complete();
40
+ }
41
+ setConfig(config) {
42
+ this._config = config;
43
+ this.initActions(config.actions);
44
+ }
45
+ initActions(rawActions) {
46
+ if (!rawActions || !Array.isArray(rawActions)) {
47
+ return;
48
+ }
49
+ this.show();
50
+ this._allActions = rawActions
51
+ .map((action) => new Action(this._config, action));
52
+ if (this._reorderAction) {
53
+ this._allActions.unshift(this._reorderAction);
54
+ }
55
+ this._classifyActions();
56
+ }
57
+ show() {
58
+ this._visible$.next(true);
59
+ }
60
+ hide() {
61
+ this._visible$.next(false);
62
+ }
63
+ addReorderAction(action) {
64
+ this._allActions.unshift(action);
65
+ action.isReorderAction = true;
66
+ this._classifyAction(action);
67
+ this._reorderAction = action;
68
+ }
69
+ clearActions() {
70
+ this._allActions = [];
71
+ this._setActions([]);
72
+ this._setKebabActions([]);
73
+ }
74
+ updateActionsVisibility() {
75
+ this._allActions.forEach((action) => action.updateVisibility());
76
+ this._classifyActions();
77
+ }
78
+ updateDisabledState() {
79
+ this.actions.forEach((action) => action.updateDisabledState());
80
+ }
81
+ _setKebabActions(actions) {
82
+ this._menuActions$.next(actions);
83
+ }
84
+ _setActions(actions) {
85
+ this._actions$.next(actions);
86
+ }
87
+ _classifyActions() {
88
+ const kebabActions = [];
89
+ const actions = [];
90
+ const mobileMode = this.mobileMode;
91
+ this._allActions
92
+ .filter((action) => {
93
+ return action.visible;
94
+ })
95
+ .forEach((action) => {
96
+ if (action.menu !== false && (action.menu || mobileMode)) {
97
+ kebabActions.push(action);
98
+ }
99
+ else {
100
+ actions.push(action);
101
+ }
102
+ });
103
+ this._setKebabActions(kebabActions);
104
+ this._setActions(actions);
105
+ }
106
+ _classifyAction(action) {
107
+ if (action.menu) {
108
+ this._setKebabActions([...this.menuActions, action]);
109
+ }
110
+ else {
111
+ this._setActions([...this.actions, action]);
112
+ }
113
+ }
114
+ _listenMobileMedia() {
115
+ this._breakpointObserver.observe(this._mobileMedia)
116
+ .pipe(skip(1), takeUntil(this._destroy$))
117
+ .subscribe(() => {
118
+ this._classifyActions();
119
+ });
120
+ }
121
+ }
122
+ ActionsController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsController, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
123
+ ActionsController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsController });
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ActionsController, decorators: [{
125
+ type: Injectable
126
+ }], ctorParameters: function () { return [{ type: i1.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