@equinor/fusion-react-filter 1.1.10 → 2.1.0-filter.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 (401) hide show
  1. package/README.md +4 -4
  2. package/dist/FilterProvider.d.ts +7 -28
  3. package/dist/FilterProvider.d.ts.map +1 -1
  4. package/dist/FilterProvider.js +24 -31
  5. package/dist/FilterProvider.js.map +1 -1
  6. package/dist/actions.d.ts +32 -0
  7. package/dist/actions.d.ts.map +1 -0
  8. package/dist/actions.js +20 -0
  9. package/dist/actions.js.map +1 -0
  10. package/dist/components/filter/FilterOptionHeader.d.ts +7 -0
  11. package/dist/components/filter/FilterOptionHeader.d.ts.map +1 -0
  12. package/dist/components/filter/FilterOptionHeader.js +69 -0
  13. package/dist/components/filter/FilterOptionHeader.js.map +1 -0
  14. package/dist/components/filter/checkbox/CheckboxFilter.d.ts +16 -0
  15. package/dist/components/filter/checkbox/CheckboxFilter.d.ts.map +1 -0
  16. package/dist/components/filter/checkbox/CheckboxFilter.js +16 -0
  17. package/dist/components/filter/checkbox/CheckboxFilter.js.map +1 -0
  18. package/dist/components/filter/checkbox/CheckboxFilter.style.d.ts +5 -0
  19. package/dist/components/filter/checkbox/CheckboxFilter.style.d.ts.map +1 -0
  20. package/dist/components/filter/checkbox/CheckboxFilter.style.js +19 -0
  21. package/dist/components/filter/checkbox/CheckboxFilter.style.js.map +1 -0
  22. package/dist/components/filter/checkbox/CheckboxFilterOption.d.ts +14 -0
  23. package/dist/components/filter/checkbox/CheckboxFilterOption.d.ts.map +1 -0
  24. package/dist/components/filter/checkbox/CheckboxFilterOption.js +19 -0
  25. package/dist/components/filter/checkbox/CheckboxFilterOption.js.map +1 -0
  26. package/dist/components/filter/checkbox/CheckboxFilterOption.style.d.ts +3 -0
  27. package/dist/components/filter/checkbox/CheckboxFilterOption.style.d.ts.map +1 -0
  28. package/dist/components/filter/checkbox/CheckboxFilterOption.style.js +40 -0
  29. package/dist/components/filter/checkbox/CheckboxFilterOption.style.js.map +1 -0
  30. package/dist/components/filter/checkbox/CheckboxFilterOptionAll.d.ts +3 -0
  31. package/dist/components/filter/checkbox/CheckboxFilterOptionAll.d.ts.map +1 -0
  32. package/dist/components/filter/checkbox/CheckboxFilterOptionAll.js +24 -0
  33. package/dist/components/filter/checkbox/CheckboxFilterOptionAll.js.map +1 -0
  34. package/dist/components/filter/checkbox/CheckboxFilterOptions.d.ts +3 -0
  35. package/dist/components/filter/checkbox/CheckboxFilterOptions.d.ts.map +1 -0
  36. package/dist/components/filter/checkbox/CheckboxFilterOptions.js +37 -0
  37. package/dist/components/filter/checkbox/CheckboxFilterOptions.js.map +1 -0
  38. package/dist/components/filter/checkbox/CheckboxFilterProvider.d.ts +13 -0
  39. package/dist/components/filter/checkbox/CheckboxFilterProvider.d.ts.map +1 -0
  40. package/dist/components/filter/checkbox/CheckboxFilterProvider.js +16 -0
  41. package/dist/components/filter/checkbox/CheckboxFilterProvider.js.map +1 -0
  42. package/dist/components/filter/checkbox/context.d.ts +4 -0
  43. package/dist/components/filter/checkbox/context.d.ts.map +1 -0
  44. package/dist/components/filter/checkbox/context.js +3 -0
  45. package/dist/components/filter/checkbox/context.js.map +1 -0
  46. package/dist/components/filter/checkbox/index.d.ts +2 -0
  47. package/dist/components/filter/checkbox/index.d.ts.map +1 -0
  48. package/dist/components/filter/checkbox/index.js +2 -0
  49. package/dist/components/filter/checkbox/index.js.map +1 -0
  50. package/dist/components/filter/checkbox/types.d.ts +7 -0
  51. package/dist/components/filter/checkbox/types.d.ts.map +1 -0
  52. package/dist/components/filter/checkbox/types.js +2 -0
  53. package/dist/components/filter/checkbox/types.js.map +1 -0
  54. package/dist/components/filter/index.d.ts +5 -0
  55. package/dist/components/filter/index.d.ts.map +1 -0
  56. package/dist/components/filter/index.js +5 -0
  57. package/dist/components/filter/index.js.map +1 -0
  58. package/dist/components/filter/search/SearchFilter.d.ts +17 -0
  59. package/dist/components/filter/search/SearchFilter.d.ts.map +1 -0
  60. package/dist/components/filter/search/SearchFilter.js +47 -0
  61. package/dist/components/filter/search/SearchFilter.js.map +1 -0
  62. package/dist/components/filter/search/index.d.ts +2 -0
  63. package/dist/components/filter/search/index.d.ts.map +1 -0
  64. package/dist/components/filter/search/index.js +2 -0
  65. package/dist/components/filter/search/index.js.map +1 -0
  66. package/dist/components/filter/types.d.ts +7 -0
  67. package/dist/components/filter/types.d.ts.map +1 -0
  68. package/dist/components/filter/types.js +2 -0
  69. package/dist/components/filter/types.js.map +1 -0
  70. package/dist/components/index.d.ts +4 -0
  71. package/dist/components/index.d.ts.map +1 -0
  72. package/dist/components/index.js +4 -0
  73. package/dist/components/index.js.map +1 -0
  74. package/dist/components/misc/ClearFilterButton.d.ts +10 -0
  75. package/dist/components/misc/ClearFilterButton.d.ts.map +1 -0
  76. package/dist/components/misc/ClearFilterButton.js +25 -0
  77. package/dist/components/misc/ClearFilterButton.js.map +1 -0
  78. package/dist/components/misc/FilterContainer.d.ts +12 -0
  79. package/dist/components/misc/FilterContainer.d.ts.map +1 -0
  80. package/dist/components/misc/FilterContainer.js +18 -0
  81. package/dist/components/misc/FilterContainer.js.map +1 -0
  82. package/dist/components/misc/index.d.ts +3 -0
  83. package/dist/components/misc/index.d.ts.map +1 -0
  84. package/dist/components/misc/index.js +3 -0
  85. package/dist/components/misc/index.js.map +1 -0
  86. package/dist/components/panel/FilterPanel.d.ts +19 -0
  87. package/dist/components/panel/FilterPanel.d.ts.map +1 -0
  88. package/dist/components/panel/FilterPanel.js +17 -0
  89. package/dist/components/panel/FilterPanel.js.map +1 -0
  90. package/dist/components/panel/FilterPanelBar.d.ts +3 -0
  91. package/dist/components/panel/FilterPanelBar.d.ts.map +1 -0
  92. package/dist/components/panel/FilterPanelBar.js +31 -0
  93. package/dist/components/panel/FilterPanelBar.js.map +1 -0
  94. package/dist/components/panel/FilterPanelFilters.d.ts +3 -0
  95. package/dist/components/panel/FilterPanelFilters.d.ts.map +1 -0
  96. package/dist/components/panel/FilterPanelFilters.js +13 -0
  97. package/dist/components/panel/FilterPanelFilters.js.map +1 -0
  98. package/dist/components/panel/FilterPanelProvider.d.ts +32 -0
  99. package/dist/components/panel/FilterPanelProvider.d.ts.map +1 -0
  100. package/dist/components/panel/FilterPanelProvider.js +35 -0
  101. package/dist/components/panel/FilterPanelProvider.js.map +1 -0
  102. package/dist/components/panel/FilterPanelSelector.d.ts +7 -0
  103. package/dist/components/panel/FilterPanelSelector.d.ts.map +1 -0
  104. package/dist/components/panel/FilterPanelSelector.js +17 -0
  105. package/dist/components/panel/FilterPanelSelector.js.map +1 -0
  106. package/dist/components/panel/index.d.ts +5 -0
  107. package/dist/components/panel/index.d.ts.map +1 -0
  108. package/dist/components/panel/index.js +5 -0
  109. package/dist/components/panel/index.js.map +1 -0
  110. package/dist/context.d.ts +6 -0
  111. package/dist/context.d.ts.map +1 -0
  112. package/dist/context.js +6 -0
  113. package/dist/context.js.map +1 -0
  114. package/dist/hooks/index.d.ts +12 -0
  115. package/dist/hooks/index.d.ts.map +1 -0
  116. package/dist/hooks/index.js +25 -0
  117. package/dist/hooks/index.js.map +1 -0
  118. package/dist/hooks/useClearFilter.d.ts +9 -0
  119. package/dist/hooks/useClearFilter.d.ts.map +1 -0
  120. package/dist/hooks/useClearFilter.js +30 -0
  121. package/dist/hooks/useClearFilter.js.map +1 -0
  122. package/dist/hooks/useFilter.d.ts +7 -0
  123. package/dist/hooks/useFilter.d.ts.map +1 -0
  124. package/dist/hooks/useFilter.js +26 -0
  125. package/dist/hooks/useFilter.js.map +1 -0
  126. package/dist/hooks/useFilterData.d.ts +11 -0
  127. package/dist/hooks/useFilterData.d.ts.map +1 -0
  128. package/dist/hooks/useFilterData.js +39 -0
  129. package/dist/hooks/useFilterData.js.map +1 -0
  130. package/dist/hooks/useFilterSelection.d.ts +5 -9
  131. package/dist/hooks/useFilterSelection.d.ts.map +1 -1
  132. package/dist/hooks/useFilterSelection.js +6 -21
  133. package/dist/hooks/useFilterSelection.js.map +1 -1
  134. package/dist/index.d.ts +4 -14
  135. package/dist/index.d.ts.map +1 -1
  136. package/dist/index.js +3 -15
  137. package/dist/index.js.map +1 -1
  138. package/dist/options/FilterOptionProvider.d.ts +12 -0
  139. package/dist/options/FilterOptionProvider.d.ts.map +1 -0
  140. package/dist/options/FilterOptionProvider.js +55 -0
  141. package/dist/options/FilterOptionProvider.js.map +1 -0
  142. package/dist/options/actions.d.ts +8 -0
  143. package/dist/options/actions.d.ts.map +1 -0
  144. package/dist/options/actions.js +6 -0
  145. package/dist/options/actions.js.map +1 -0
  146. package/dist/options/context.d.ts +6 -0
  147. package/dist/options/context.d.ts.map +1 -0
  148. package/dist/options/context.js +7 -0
  149. package/dist/options/context.js.map +1 -0
  150. package/dist/options/create-options.d.ts +4 -0
  151. package/dist/options/create-options.d.ts.map +1 -0
  152. package/dist/options/create-options.js +24 -0
  153. package/dist/options/create-options.js.map +1 -0
  154. package/dist/options/index.d.ts +6 -0
  155. package/dist/options/index.d.ts.map +1 -0
  156. package/dist/options/index.js +6 -0
  157. package/dist/options/index.js.map +1 -0
  158. package/dist/options/reducer.d.ts +58 -0
  159. package/dist/options/reducer.d.ts.map +1 -0
  160. package/dist/options/reducer.js +4 -0
  161. package/dist/options/reducer.js.map +1 -0
  162. package/dist/options/search/filter-option-match.d.ts +7 -0
  163. package/dist/options/search/filter-option-match.d.ts.map +1 -0
  164. package/dist/options/search/filter-option-match.js +10 -0
  165. package/dist/options/search/filter-option-match.js.map +1 -0
  166. package/dist/options/search/filter-option-search.d.ts +8 -0
  167. package/dist/options/search/filter-option-search.d.ts.map +1 -0
  168. package/dist/options/search/filter-option-search.js +12 -0
  169. package/dist/options/search/filter-option-search.js.map +1 -0
  170. package/dist/options/search/index.d.ts +2 -0
  171. package/dist/options/search/index.d.ts.map +1 -0
  172. package/dist/options/search/index.js +2 -0
  173. package/dist/options/search/index.js.map +1 -0
  174. package/dist/options/search/types.d.ts +9 -0
  175. package/dist/options/search/types.d.ts.map +1 -0
  176. package/dist/options/search/types.js +2 -0
  177. package/dist/options/search/types.js.map +1 -0
  178. package/dist/options/search/useFilterOptionSearch.d.ts +12 -0
  179. package/dist/options/search/useFilterOptionSearch.d.ts.map +1 -0
  180. package/dist/options/search/useFilterOptionSearch.js +28 -0
  181. package/dist/options/search/useFilterOptionSearch.js.map +1 -0
  182. package/dist/options/types.d.ts +32 -0
  183. package/dist/options/types.d.ts.map +1 -0
  184. package/dist/options/types.js +2 -0
  185. package/dist/options/types.js.map +1 -0
  186. package/dist/reducers.d.ts +170 -0
  187. package/dist/reducers.d.ts.map +1 -0
  188. package/dist/reducers.js +23 -0
  189. package/dist/reducers.js.map +1 -0
  190. package/dist/{types/Filter.d.ts → types.d.ts} +19 -16
  191. package/dist/types.d.ts.map +1 -0
  192. package/dist/types.js +2 -0
  193. package/dist/types.js.map +1 -0
  194. package/package.json +13 -9
  195. package/dist/FilterContext.d.ts +0 -8
  196. package/dist/FilterContext.d.ts.map +0 -1
  197. package/dist/FilterContext.js +0 -4
  198. package/dist/FilterContext.js.map +0 -1
  199. package/dist/components/CheckBoxFilter/CheckBoxFilter.d.ts +0 -34
  200. package/dist/components/CheckBoxFilter/CheckBoxFilter.d.ts.map +0 -1
  201. package/dist/components/CheckBoxFilter/CheckBoxFilter.js +0 -76
  202. package/dist/components/CheckBoxFilter/CheckBoxFilter.js.map +0 -1
  203. package/dist/components/CheckBoxFilter/CheckBoxOption.d.ts +0 -14
  204. package/dist/components/CheckBoxFilter/CheckBoxOption.d.ts.map +0 -1
  205. package/dist/components/CheckBoxFilter/CheckBoxOption.js +0 -10
  206. package/dist/components/CheckBoxFilter/CheckBoxOption.js.map +0 -1
  207. package/dist/components/CheckBoxFilter/CheckBoxOption.style.d.ts +0 -3
  208. package/dist/components/CheckBoxFilter/CheckBoxOption.style.d.ts.map +0 -1
  209. package/dist/components/CheckBoxFilter/CheckBoxOption.style.js +0 -24
  210. package/dist/components/CheckBoxFilter/CheckBoxOption.style.js.map +0 -1
  211. package/dist/components/CheckBoxFilter/CheckboxFilter.style.d.ts +0 -3
  212. package/dist/components/CheckBoxFilter/CheckboxFilter.style.d.ts.map +0 -1
  213. package/dist/components/CheckBoxFilter/CheckboxFilter.style.js +0 -29
  214. package/dist/components/CheckBoxFilter/CheckboxFilter.style.js.map +0 -1
  215. package/dist/components/CheckBoxFilter/SelectAllOption.d.ts +0 -12
  216. package/dist/components/CheckBoxFilter/SelectAllOption.d.ts.map +0 -1
  217. package/dist/components/CheckBoxFilter/SelectAllOption.js +0 -22
  218. package/dist/components/CheckBoxFilter/SelectAllOption.js.map +0 -1
  219. package/dist/components/CheckBoxFilter/index.d.ts +0 -5
  220. package/dist/components/CheckBoxFilter/index.d.ts.map +0 -1
  221. package/dist/components/CheckBoxFilter/index.js +0 -5
  222. package/dist/components/CheckBoxFilter/index.js.map +0 -1
  223. package/dist/components/FilterSection/FilterSection.d.ts +0 -29
  224. package/dist/components/FilterSection/FilterSection.d.ts.map +0 -1
  225. package/dist/components/FilterSection/FilterSection.js +0 -64
  226. package/dist/components/FilterSection/FilterSection.js.map +0 -1
  227. package/dist/components/FilterSection/FilterSection.style.d.ts +0 -3
  228. package/dist/components/FilterSection/FilterSection.style.d.ts.map +0 -1
  229. package/dist/components/FilterSection/FilterSection.style.js +0 -56
  230. package/dist/components/FilterSection/FilterSection.style.js.map +0 -1
  231. package/dist/components/FilterSection/index.d.ts +0 -3
  232. package/dist/components/FilterSection/index.d.ts.map +0 -1
  233. package/dist/components/FilterSection/index.js +0 -3
  234. package/dist/components/FilterSection/index.js.map +0 -1
  235. package/dist/components/FilterSelectionChips/FilterSelectionChips.d.ts +0 -7
  236. package/dist/components/FilterSelectionChips/FilterSelectionChips.d.ts.map +0 -1
  237. package/dist/components/FilterSelectionChips/FilterSelectionChips.js +0 -18
  238. package/dist/components/FilterSelectionChips/FilterSelectionChips.js.map +0 -1
  239. package/dist/components/FilterSelectionChips/FilterSelectionChips.style.d.ts +0 -3
  240. package/dist/components/FilterSelectionChips/FilterSelectionChips.style.d.ts.map +0 -1
  241. package/dist/components/FilterSelectionChips/FilterSelectionChips.style.js +0 -31
  242. package/dist/components/FilterSelectionChips/FilterSelectionChips.style.js.map +0 -1
  243. package/dist/components/FilterSelectionChips/index.d.ts +0 -2
  244. package/dist/components/FilterSelectionChips/index.d.ts.map +0 -1
  245. package/dist/components/FilterSelectionChips/index.js +0 -2
  246. package/dist/components/FilterSelectionChips/index.js.map +0 -1
  247. package/dist/components/FilterSelectionChips/useChipsSelection.d.ts +0 -9
  248. package/dist/components/FilterSelectionChips/useChipsSelection.d.ts.map +0 -1
  249. package/dist/components/FilterSelectionChips/useChipsSelection.js +0 -26
  250. package/dist/components/FilterSelectionChips/useChipsSelection.js.map +0 -1
  251. package/dist/components/FilterSelector/FilterCategory.d.ts +0 -7
  252. package/dist/components/FilterSelector/FilterCategory.d.ts.map +0 -1
  253. package/dist/components/FilterSelector/FilterCategory.js +0 -24
  254. package/dist/components/FilterSelector/FilterCategory.js.map +0 -1
  255. package/dist/components/FilterSelector/FilterCategory.style.d.ts +0 -3
  256. package/dist/components/FilterSelector/FilterCategory.style.d.ts.map +0 -1
  257. package/dist/components/FilterSelector/FilterCategory.style.js +0 -12
  258. package/dist/components/FilterSelector/FilterCategory.style.js.map +0 -1
  259. package/dist/components/FilterSelector/FilterSelector.d.ts +0 -31
  260. package/dist/components/FilterSelector/FilterSelector.d.ts.map +0 -1
  261. package/dist/components/FilterSelector/FilterSelector.js +0 -51
  262. package/dist/components/FilterSelector/FilterSelector.js.map +0 -1
  263. package/dist/components/FilterSelector/FilterSelector.style.d.ts +0 -3
  264. package/dist/components/FilterSelector/FilterSelector.style.d.ts.map +0 -1
  265. package/dist/components/FilterSelector/FilterSelector.style.js +0 -44
  266. package/dist/components/FilterSelector/FilterSelector.style.js.map +0 -1
  267. package/dist/components/FilterSelector/index.d.ts +0 -4
  268. package/dist/components/FilterSelector/index.d.ts.map +0 -1
  269. package/dist/components/FilterSelector/index.js +0 -4
  270. package/dist/components/FilterSelector/index.js.map +0 -1
  271. package/dist/components/GeneralBar/GeneralBar.d.ts +0 -26
  272. package/dist/components/GeneralBar/GeneralBar.d.ts.map +0 -1
  273. package/dist/components/GeneralBar/GeneralBar.js +0 -63
  274. package/dist/components/GeneralBar/GeneralBar.js.map +0 -1
  275. package/dist/components/GeneralBar/GeneralBar.style.d.ts +0 -3
  276. package/dist/components/GeneralBar/GeneralBar.style.d.ts.map +0 -1
  277. package/dist/components/GeneralBar/GeneralBar.style.js +0 -20
  278. package/dist/components/GeneralBar/GeneralBar.style.js.map +0 -1
  279. package/dist/components/GeneralBar/index.d.ts +0 -3
  280. package/dist/components/GeneralBar/index.d.ts.map +0 -1
  281. package/dist/components/GeneralBar/index.js +0 -3
  282. package/dist/components/GeneralBar/index.js.map +0 -1
  283. package/dist/components/HorizontalBar/HorizontalBar.d.ts +0 -10
  284. package/dist/components/HorizontalBar/HorizontalBar.d.ts.map +0 -1
  285. package/dist/components/HorizontalBar/HorizontalBar.js +0 -23
  286. package/dist/components/HorizontalBar/HorizontalBar.js.map +0 -1
  287. package/dist/components/HorizontalBar/index.d.ts +0 -3
  288. package/dist/components/HorizontalBar/index.d.ts.map +0 -1
  289. package/dist/components/HorizontalBar/index.js +0 -3
  290. package/dist/components/HorizontalBar/index.js.map +0 -1
  291. package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.d.ts +0 -17
  292. package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.d.ts.map +0 -1
  293. package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.js +0 -28
  294. package/dist/components/HorizontalFilterPanel/HorizontalFilterPanel.js.map +0 -1
  295. package/dist/components/HorizontalFilterPanel/index.d.ts +0 -3
  296. package/dist/components/HorizontalFilterPanel/index.d.ts.map +0 -1
  297. package/dist/components/HorizontalFilterPanel/index.js +0 -3
  298. package/dist/components/HorizontalFilterPanel/index.js.map +0 -1
  299. package/dist/components/Icon/index.d.ts +0 -11
  300. package/dist/components/Icon/index.d.ts.map +0 -1
  301. package/dist/components/Icon/index.js +0 -16
  302. package/dist/components/Icon/index.js.map +0 -1
  303. package/dist/components/RadioFilter/RadioFilter.d.ts +0 -17
  304. package/dist/components/RadioFilter/RadioFilter.d.ts.map +0 -1
  305. package/dist/components/RadioFilter/RadioFilter.js +0 -51
  306. package/dist/components/RadioFilter/RadioFilter.js.map +0 -1
  307. package/dist/components/RadioFilter/RadioFilter.style.d.ts +0 -3
  308. package/dist/components/RadioFilter/RadioFilter.style.d.ts.map +0 -1
  309. package/dist/components/RadioFilter/RadioFilter.style.js +0 -38
  310. package/dist/components/RadioFilter/RadioFilter.style.js.map +0 -1
  311. package/dist/components/RadioFilter/index.d.ts +0 -3
  312. package/dist/components/RadioFilter/index.d.ts.map +0 -1
  313. package/dist/components/RadioFilter/index.js +0 -3
  314. package/dist/components/RadioFilter/index.js.map +0 -1
  315. package/dist/epic/StatefulObserver.d.ts +0 -8
  316. package/dist/epic/StatefulObserver.d.ts.map +0 -1
  317. package/dist/epic/StatefulObserver.js +0 -26
  318. package/dist/epic/StatefulObserver.js.map +0 -1
  319. package/dist/epic/epic.d.ts +0 -14
  320. package/dist/epic/epic.d.ts.map +0 -1
  321. package/dist/epic/epic.js +0 -2
  322. package/dist/epic/epic.js.map +0 -1
  323. package/dist/epic/hooks/useObservableSelector.d.ts +0 -14
  324. package/dist/epic/hooks/useObservableSelector.d.ts.map +0 -1
  325. package/dist/epic/hooks/useObservableSelector.js +0 -16
  326. package/dist/epic/hooks/useObservableSelector.js.map +0 -1
  327. package/dist/epic/hooks/useObservableState.d.ts +0 -13
  328. package/dist/epic/hooks/useObservableState.d.ts.map +0 -1
  329. package/dist/epic/hooks/useObservableState.js +0 -18
  330. package/dist/epic/hooks/useObservableState.js.map +0 -1
  331. package/dist/epic/hooks/useSelector.d.ts +0 -10
  332. package/dist/epic/hooks/useSelector.d.ts.map +0 -1
  333. package/dist/epic/hooks/useSelector.js +0 -14
  334. package/dist/epic/hooks/useSelector.js.map +0 -1
  335. package/dist/epic/reducer.d.ts +0 -56
  336. package/dist/epic/reducer.d.ts.map +0 -1
  337. package/dist/epic/reducer.js +0 -78
  338. package/dist/epic/reducer.js.map +0 -1
  339. package/dist/filterStore/actions.d.ts +0 -23
  340. package/dist/filterStore/actions.d.ts.map +0 -1
  341. package/dist/filterStore/actions.js +0 -18
  342. package/dist/filterStore/actions.js.map +0 -1
  343. package/dist/filterStore/epics.d.ts +0 -10
  344. package/dist/filterStore/epics.d.ts.map +0 -1
  345. package/dist/filterStore/epics.js +0 -10
  346. package/dist/filterStore/epics.js.map +0 -1
  347. package/dist/filterStore/reducers.d.ts +0 -4
  348. package/dist/filterStore/reducers.d.ts.map +0 -1
  349. package/dist/filterStore/reducers.js +0 -43
  350. package/dist/filterStore/reducers.js.map +0 -1
  351. package/dist/filterStore/store.d.ts +0 -106
  352. package/dist/filterStore/store.d.ts.map +0 -1
  353. package/dist/filterStore/store.js +0 -158
  354. package/dist/filterStore/store.js.map +0 -1
  355. package/dist/hooks/useEventListener.d.ts +0 -4
  356. package/dist/hooks/useEventListener.d.ts.map +0 -1
  357. package/dist/hooks/useEventListener.js +0 -14
  358. package/dist/hooks/useEventListener.js.map +0 -1
  359. package/dist/hooks/useFilterChangeHandler.d.ts +0 -26
  360. package/dist/hooks/useFilterChangeHandler.d.ts.map +0 -1
  361. package/dist/hooks/useFilterChangeHandler.js +0 -43
  362. package/dist/hooks/useFilterChangeHandler.js.map +0 -1
  363. package/dist/hooks/useFilterContext.d.ts +0 -4
  364. package/dist/hooks/useFilterContext.d.ts.map +0 -1
  365. package/dist/hooks/useFilterContext.js +0 -5
  366. package/dist/hooks/useFilterContext.js.map +0 -1
  367. package/dist/hooks/useFilterOptionsBuilder.d.ts +0 -27
  368. package/dist/hooks/useFilterOptionsBuilder.d.ts.map +0 -1
  369. package/dist/hooks/useFilterOptionsBuilder.js +0 -39
  370. package/dist/hooks/useFilterOptionsBuilder.js.map +0 -1
  371. package/dist/hooks/useFilterOptionsCounter.d.ts +0 -16
  372. package/dist/hooks/useFilterOptionsCounter.d.ts.map +0 -1
  373. package/dist/hooks/useFilterOptionsCounter.js +0 -32
  374. package/dist/hooks/useFilterOptionsCounter.js.map +0 -1
  375. package/dist/hooks/useFilterStore.d.ts +0 -25
  376. package/dist/hooks/useFilterStore.d.ts.map +0 -1
  377. package/dist/hooks/useFilterStore.js +0 -34
  378. package/dist/hooks/useFilterStore.js.map +0 -1
  379. package/dist/hooks/useResizablePanel.d.ts +0 -20
  380. package/dist/hooks/useResizablePanel.d.ts.map +0 -1
  381. package/dist/hooks/useResizablePanel.js +0 -71
  382. package/dist/hooks/useResizablePanel.js.map +0 -1
  383. package/dist/types/Filter.d.ts.map +0 -1
  384. package/dist/types/Filter.js +0 -2
  385. package/dist/types/Filter.js.map +0 -1
  386. package/dist/types/FilterContainerProps.d.ts +0 -10
  387. package/dist/types/FilterContainerProps.d.ts.map +0 -1
  388. package/dist/types/FilterContainerProps.js +0 -2
  389. package/dist/types/FilterContainerProps.js.map +0 -1
  390. package/dist/types/FilterCounters.d.ts +0 -3
  391. package/dist/types/FilterCounters.d.ts.map +0 -1
  392. package/dist/types/FilterCounters.js +0 -2
  393. package/dist/types/FilterCounters.js.map +0 -1
  394. package/dist/types/FilterOption.d.ts +0 -13
  395. package/dist/types/FilterOption.d.ts.map +0 -1
  396. package/dist/types/FilterOption.js +0 -2
  397. package/dist/types/FilterOption.js.map +0 -1
  398. package/dist/types/FilterStoreState.d.ts +0 -6
  399. package/dist/types/FilterStoreState.d.ts.map +0 -1
  400. package/dist/types/FilterStoreState.js +0 -2
  401. package/dist/types/FilterStoreState.js.map +0 -1
@@ -1,14 +0,0 @@
1
- import { ReactNode } from 'react';
2
- declare type CheckboxOptionProps = {
3
- filterKey: string;
4
- onSelectionChange: (key: string, selected: boolean, singleSelect?: boolean) => void;
5
- selected: boolean;
6
- label: ReactNode;
7
- counter?: string | number;
8
- indeterminate?: boolean;
9
- compact?: boolean;
10
- singleSelect?: boolean;
11
- };
12
- export declare const CheckboxOption: ({ filterKey, onSelectionChange, selected, label, counter, indeterminate, compact, singleSelect, }: CheckboxOptionProps) => JSX.Element;
13
- export default CheckboxOption;
14
- //# sourceMappingURL=CheckBoxOption.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckBoxOption.d.ts","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/CheckBoxOption.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,aAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpF,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,cAAc,sGASxB,mBAAmB,KAAG,WAkBxB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import CheckBox from '@equinor/fusion-react-checkbox';
3
- import { useStyles } from './CheckBoxOption.style';
4
- export const CheckboxOption = ({ filterKey, onSelectionChange, selected, label, counter, indeterminate, compact, singleSelect, }) => {
5
- const styles = useStyles();
6
- // TODO: @olerichard - when fusion-react-components support attribute filter, remove undefined from props
7
- return (_jsxs("li", Object.assign({ className: styles.FilterOption }, { children: [_jsx(CheckBox, { onInput: () => onSelectionChange(filterKey, selected), checked: selected || undefined, reducedTouchTarget: compact, indeterminate: indeterminate || undefined }, void 0), _jsx("label", Object.assign({ onClick: () => onSelectionChange(filterKey, selected, singleSelect), className: styles.FilterOptionLabel }, { children: label }), void 0), counter && _jsx("label", Object.assign({ className: styles.FilterOptionCount }, { children: counter }), void 0)] }), filterKey));
8
- };
9
- export default CheckboxOption;
10
- //# sourceMappingURL=CheckBoxOption.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckBoxOption.js","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/CheckBoxOption.tsx"],"names":[],"mappings":";AACA,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAanD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,OAAO,EACP,aAAa,EACb,OAAO,EACP,YAAY,GACQ,EAAe,EAAE;IACrC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,yGAAyG;IACzG,OAAO,CACL,4BAAI,SAAS,EAAE,MAAM,CAAC,YAAY,iBAChC,KAAC,QAAQ,IACP,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,QAAQ,CAAC,EACrD,OAAO,EAAE,QAAQ,IAAI,SAAS,EAC9B,kBAAkB,EAAE,OAAO,EAC3B,aAAa,EAAE,aAAa,IAAI,SAAS,WACzC,EACF,8BAAO,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,gBAC5G,KAAK,YACA,EACP,OAAO,IAAI,8BAAO,SAAS,EAAE,MAAM,CAAC,iBAAiB,gBAAG,OAAO,YAAS,MAVlC,SAAS,CAW7C,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const useStyles: (props?: {} | undefined) => import("@material-ui/styles").ClassNameMap<"FilterOption" | "FilterOptionLabel" | "FilterOptionCount">;
2
- export default useStyles;
3
- //# sourceMappingURL=CheckBoxOption.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckBoxOption.style.d.ts","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/CheckBoxOption.style.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,oIAwBrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,24 +0,0 @@
1
- import { createStyles, makeStyles } from '@equinor/fusion-react-styles';
2
- export const useStyles = makeStyles(() => createStyles({
3
- FilterOption: {
4
- display: 'flex',
5
- alignItems: 'center',
6
- cursor: 'pointer',
7
- },
8
- FilterOptionLabel: {
9
- flex: 1,
10
- overflow: 'hidden',
11
- height: '100%',
12
- cursor: 'pointer',
13
- alignItems: 'center',
14
- textOverflow: 'ellipsis',
15
- },
16
- FilterOptionCount: {
17
- wordBreak: 'keep-all',
18
- display: 'flex',
19
- padding: '8px',
20
- justifyContent: 'flex-end',
21
- },
22
- }), { name: 'fusion-filterpane-checkboxFilterOption' });
23
- export default useStyles;
24
- //# sourceMappingURL=CheckBoxOption.style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckBoxOption.style.js","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/CheckBoxOption.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,GAAG,EAAE,CACH,YAAY,CAAC;IACX,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,SAAS;KAClB;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,QAAQ;QAClB,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,SAAS;QACjB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,UAAU;KACzB;IACD,iBAAiB,EAAE;QACjB,SAAS,EAAE,UAAU;QACrB,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE,UAAU;KAC3B;CACF,CAAC,EACJ,EAAE,IAAI,EAAE,wCAAwC,EAAE,CACnD,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const useStyles: (props?: {} | undefined) => import("@material-ui/styles").ClassNameMap<"CheckBoxFilterContainer" | "FilterHeader" | "TextInputIcon" | "FilterOptionsContainer">;
2
- export default useStyles;
3
- //# sourceMappingURL=CheckboxFilter.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxFilter.style.d.ts","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/CheckboxFilter.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,iKA6BrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,29 +0,0 @@
1
- import { createStyles, makeStyles } from '@equinor/fusion-react-styles';
2
- export const useStyles = makeStyles(() => createStyles({
3
- CheckBoxFilterContainer: {
4
- display: 'flex',
5
- flexDirection: 'column',
6
- padding: '16px',
7
- paddingBottom: '0px',
8
- boxSizing: 'border-box',
9
- minWidth: '150px',
10
- maxWidth: '240px',
11
- },
12
- FilterHeader: {
13
- padding: '0 8px',
14
- fontWeight: 'bold',
15
- whiteSpace: 'nowrap',
16
- },
17
- TextInputIcon: {
18
- transform: 'scale(0.8)',
19
- cursor: 'pointer',
20
- },
21
- FilterOptionsContainer: {
22
- flexDirection: 'column',
23
- overflowY: 'auto',
24
- margin: 0,
25
- padding: 0,
26
- },
27
- }), { name: 'fusion-filterpane-checkBoxFilter' });
28
- export default useStyles;
29
- //# sourceMappingURL=CheckboxFilter.style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxFilter.style.js","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/CheckboxFilter.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,GAAG,EAAE,CACH,YAAY,CAAC;IACX,uBAAuB,EAAE;QACvB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,KAAK;QACpB,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,OAAO;KAClB;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,QAAQ;KACrB;IACD,aAAa,EAAE;QACb,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,SAAS;KAClB;IACD,sBAAsB,EAAE;QACtB,aAAa,EAAE,QAAQ;QACvB,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX;CACF,CAAC,EACJ,EAAE,IAAI,EAAE,kCAAkC,EAAE,CAC7C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,12 +0,0 @@
1
- import FilterCounters from '../../types/FilterCounters';
2
- import FilterOption from '../../types/FilterOption';
3
- declare type SelectAllOptionProps = {
4
- filterKey: string;
5
- filterOptions: Record<string, FilterOption>;
6
- filterCounters: FilterCounters | null;
7
- resetSearchString: () => void;
8
- compact?: boolean;
9
- };
10
- export declare const SelectAllOption: ({ filterOptions, filterKey, filterCounters, resetSearchString, compact, }: SelectAllOptionProps) => JSX.Element;
11
- export default SelectAllOption;
12
- //# sourceMappingURL=SelectAllOption.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectAllOption.d.ts","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/SelectAllOption.tsx"],"names":[],"mappings":"AAIA,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAGpD,aAAK,oBAAoB,GAAG;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAKF,eAAO,MAAM,eAAe,8EAMzB,oBAAoB,KAAG,WAsCzB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useCallback, useMemo } from 'react';
3
- import useFilterChangeHandler from '../../hooks/useFilterChangeHandler';
4
- import useFilterSelection from '../../hooks/useFilterSelection';
5
- import CheckboxOption from './CheckBoxOption';
6
- const selectionUpdate = (change) => change.allSelected ? [] : change.filterOptionsKeys;
7
- export const SelectAllOption = ({ filterOptions, filterKey, filterCounters, resetSearchString, compact, }) => {
8
- const currentOptionsSelection = useFilterSelection(filterKey);
9
- const validFilterOptionsKeys = useMemo(() => filterCounters ? Object.keys(filterOptions).filter((key) => filterCounters[key] > 0) : Object.keys(filterOptions), [filterOptions, filterCounters]);
10
- const allSelected = useMemo(() => validFilterOptionsKeys.length === currentOptionsSelection?.length, [validFilterOptionsKeys, currentOptionsSelection]);
11
- const handleSelectionChange = useFilterChangeHandler(filterKey, selectionUpdate);
12
- const onSelectionChange = useCallback((_, selected) => {
13
- resetSearchString();
14
- handleSelectionChange({
15
- allSelected: selected,
16
- filterOptionsKeys: validFilterOptionsKeys,
17
- });
18
- }, [handleSelectionChange, validFilterOptionsKeys, resetSearchString]);
19
- return (_jsx(CheckboxOption, { filterKey: filterKey, onSelectionChange: onSelectionChange, selected: allSelected, label: '(All)', indeterminate: Boolean(!allSelected && currentOptionsSelection?.length), compact: compact }, 'SelectAllOption' + filterKey));
20
- };
21
- export default SelectAllOption;
22
- //# sourceMappingURL=SelectAllOption.js.map
@@ -1 +0,0 @@
1
- {"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,qBAAqB,CAAC;YACpB,WAAW,EAAE,QAAQ;YACrB,iBAAiB,EAAE,sBAAsB;SAC1C,CAAC,CAAC;IACL,CAAC,EACD,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,CACnE,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,IAEb,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,OAAO,EACd,aAAa,EAAE,OAAO,CAAC,CAAC,WAAW,IAAI,uBAAuB,EAAE,MAAM,CAAC,EACvE,OAAO,EAAE,OAAO,IANX,iBAAiB,GAAG,SAAS,CAOlC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './CheckBoxOption';
2
- export * from './CheckBoxFilter';
3
- export * from './SelectAllOption';
4
- export { default } from './CheckBoxFilter';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './CheckBoxOption';
2
- export * from './CheckBoxFilter';
3
- export * from './SelectAllOption';
4
- export { default } from './CheckBoxFilter';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CheckBoxFilter/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,29 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- declare type FilterSectionProps = {
3
- isMinimized?: boolean;
4
- useFilterSelector?: boolean;
5
- compactFilterSelector?: boolean;
6
- useFilterSelectorSearch?: boolean;
7
- };
8
- /**
9
- *FilterSection is a vertically adjustable, that list out registered filters horizontally.
10
- *When used with FilterSelector, the are will show all filters that are selected in the selector.
11
- *The filter selector will give the user the ability to select the filters that are currently relevant.
12
- *Giving greater clarity of what is being filtered at the moment.
13
- *It also helps with performance, as all filters does not need to be registered at all times.
14
- *Resulting in less work for the Filter provider when a selection is made.
15
- *
16
- * @param isMinimized Minimized will set the section to display :'none'
17
- * @param useFilterSelector Add a filter selector on the left side. Where user can (de)select filters for use.
18
- * @param compactFilterSelector Compact Filter options text and checkbox size
19
- * @param useFilterSelectorSearch Add a search bar to filter selector, to search for filters.
20
- * @param children Add Filters components as children, and they will be displayed in the filtersection.
21
- * @example
22
- * const [minimized, setMinimized] = useState(false);
23
- * <FilterSection isMinimized={minimized} useFilterSelector useFilterSelectorSearch>
24
- * <CheckBoxFilter filter={filterSettings} />
25
- * </FilterSection>
26
- */
27
- export declare const FilterSection: ({ isMinimized, useFilterSelector, compactFilterSelector, useFilterSelectorSearch, children, }: PropsWithChildren<FilterSectionProps>) => JSX.Element;
28
- export default FilterSection;
29
- //# sourceMappingURL=FilterSection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSection.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSection/FilterSection.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EASlB,MAAM,OAAO,CAAC;AAUf,aAAK,kBAAkB,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,aAAa,kGAMvB,kBAAkB,kBAAkB,CAAC,KAAG,WAyE1C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,64 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Children, useEffect, useMemo, useRef, useState, } from 'react';
3
- import FilterSelector from '../FilterSelector/FilterSelector';
4
- import useResizablePanel from '../../hooks/useResizablePanel';
5
- import { pipe } from 'rxjs';
6
- import { clsx } from '@equinor/fusion-react-styles';
7
- import useStyles from './FilterSection.style';
8
- import { unfold_more } from '@equinor/eds-icons';
9
- import Icon from '../Icon';
10
- import useFilterContext from '../../hooks/useFilterContext';
11
- /**
12
- *FilterSection is a vertically adjustable, that list out registered filters horizontally.
13
- *When used with FilterSelector, the are will show all filters that are selected in the selector.
14
- *The filter selector will give the user the ability to select the filters that are currently relevant.
15
- *Giving greater clarity of what is being filtered at the moment.
16
- *It also helps with performance, as all filters does not need to be registered at all times.
17
- *Resulting in less work for the Filter provider when a selection is made.
18
- *
19
- * @param isMinimized Minimized will set the section to display :'none'
20
- * @param useFilterSelector Add a filter selector on the left side. Where user can (de)select filters for use.
21
- * @param compactFilterSelector Compact Filter options text and checkbox size
22
- * @param useFilterSelectorSearch Add a search bar to filter selector, to search for filters.
23
- * @param children Add Filters components as children, and they will be displayed in the filtersection.
24
- * @example
25
- * const [minimized, setMinimized] = useState(false);
26
- * <FilterSection isMinimized={minimized} useFilterSelector useFilterSelectorSearch>
27
- * <CheckBoxFilter filter={filterSettings} />
28
- * </FilterSection>
29
- */
30
- export const FilterSection = ({ isMinimized, useFilterSelector, compactFilterSelector = false, useFilterSelectorSearch, children, }) => {
31
- const [selection, setSelections] = useState([]);
32
- const { store } = useFilterContext();
33
- useEffect(() => {
34
- if (!useFilterSelector) {
35
- setSelections(Children.toArray(children));
36
- return;
37
- }
38
- const activeChildren = store.selection$.subscribe(pipe((currSelection) => {
39
- const selectionKeys = Object.keys(currSelection);
40
- const activeChildren = Children.toArray(children)
41
- .filter((child) => selectionKeys.includes(child.props.filter.key))
42
- .sort((a, b) => {
43
- const aPriority = a.props.filter?.priority || 9999;
44
- const bPriority = b.props.filter?.priority || 9999;
45
- return aPriority - bPriority;
46
- });
47
- setSelections(activeChildren);
48
- }));
49
- return () => activeChildren.unsubscribe();
50
- }, [store, useFilterSelector, children]);
51
- const resizeContainerRef = useRef(null);
52
- const { resizedSize, isResizing, onResizeStart } = useResizablePanel({
53
- isResizable: true,
54
- id: 'FilterPane',
55
- minHeight: 300,
56
- maxHeight: 1000,
57
- resizeContainerRef: resizeContainerRef,
58
- });
59
- const styles = useStyles();
60
- const filterContainerClassNames = useMemo(() => clsx(styles.FilterSectionContainer, isMinimized ? styles.Minimized : undefined, isResizing ? styles.Resizing : undefined), [isMinimized, styles, isResizing]);
61
- return (_jsxs("div", Object.assign({ className: filterContainerClassNames }, { children: [_jsxs("div", Object.assign({ ref: resizeContainerRef, className: styles.FilterSection, style: { ...resizedSize } }, { children: [useFilterSelector && (_jsx(FilterSelector, Object.assign({ useSearch: useFilterSelectorSearch, compact: compactFilterSelector }, { children: children }), void 0)), selection.length ? (selection) : (_jsx("span", Object.assign({ className: styles.FilterSectionEmptyText }, { children: "\u2B05 Select filter categories to start filtering the dataset" }), void 0))] }), void 0), _jsxs("div", Object.assign({ className: styles.Resize, onMouseDown: onResizeStart }, { children: [_jsx("div", { className: styles.ResizeBar }, void 0), _jsx("div", Object.assign({ className: styles.ResizeIndicator }, { children: _jsx(Icon, { icon: unfold_more }, void 0) }), void 0)] }), void 0)] }), void 0));
62
- };
63
- export default FilterSection;
64
- //# sourceMappingURL=FilterSection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSection.js","sourceRoot":"","sources":["../../../src/components/FilterSection/FilterSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EAMR,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,cAAc,MAAM,kCAAkC,CAAC;AAC9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B,EAAE,OAAO,EAAE,qBAAqB,gBAC/E,QAAQ,YACM,CAClB,EACA,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB,SAAS,CACV,CAAC,CAAC,CAAC,CACF,6BAAM,SAAS,EAAE,MAAM,CAAC,sBAAsB,4FAEvC,CACR,aACG,EACN,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,iBACvD,cAAK,SAAS,EAAE,MAAM,CAAC,SAAS,WAAI,EACpC,4BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,gBACpC,KAAC,IAAI,IAAC,IAAI,EAAE,WAAW,WAAI,YACvB,aACF,aACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const useStyles: (props?: {} | undefined) => import("@material-ui/styles").ClassNameMap<"FilterSectionContainer" | "FilterSection" | "FilterSectionEmptyText" | "Resize" | "Resizing" | "ResizeBar" | "ResizeIndicator" | "Minimized">;
2
- export default useStyles;
3
- //# sourceMappingURL=FilterSection.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSection.style.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSection/FilterSection.style.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,uNA8DrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,56 +0,0 @@
1
- import { createStyles, makeStyles } from '@equinor/fusion-react-styles';
2
- export const useStyles = makeStyles((theme) => createStyles({
3
- FilterSectionContainer: {
4
- display: 'flex',
5
- flexDirection: 'column',
6
- },
7
- FilterSection: {
8
- display: 'flex',
9
- width: '100%',
10
- backgroundColor: theme.colors.ui.background__light.value.hex,
11
- boxSizing: 'border-box',
12
- borderBottom: `solid 1px ${theme.colors.ui.background__medium.value.hex}`,
13
- overflowY: 'auto',
14
- },
15
- FilterSectionEmptyText: {
16
- padding: '16px',
17
- },
18
- Resize: {
19
- width: '100%',
20
- zIndex: 2,
21
- height: '4px',
22
- left: '-16px',
23
- cursor: 'row-resize',
24
- opacity: 0,
25
- transition: 'opacity 0.2s',
26
- '&:hover': { opacity: 1 },
27
- },
28
- Resizing: {
29
- userSelect: 'none',
30
- transition: 'none',
31
- },
32
- ResizeBar: {
33
- width: '100%',
34
- position: 'relative',
35
- zIndex: 1,
36
- height: '4px',
37
- background: 'rgba(0, 0, 0, 0.1)',
38
- },
39
- ResizeIndicator: {
40
- position: 'relative',
41
- left: 'calc(50% - 12px)',
42
- top: '-14px',
43
- height: '24px',
44
- width: '24px',
45
- background: 'white',
46
- borderRadius: '4px',
47
- display: 'flex',
48
- alignItems: 'center',
49
- zIndex: 2,
50
- },
51
- Minimized: {
52
- display: 'none',
53
- },
54
- }), { name: 'fusion-filterpane-filterSection' });
55
- export default useStyles;
56
- //# sourceMappingURL=FilterSection.style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSection.style.js","sourceRoot":"","sources":["../../../src/components/FilterSection/FilterSection.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,EAAE,CACR,YAAY,CAAC;IACX,sBAAsB,EAAE;QACtB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;KACxB;IAED,aAAa,EAAE;QACb,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG;QAC5D,SAAS,EAAE,YAAY;QACvB,YAAY,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,GAAG,EAAE;QACzE,SAAS,EAAE,MAAM;KAClB;IAED,sBAAsB,EAAE;QACtB,OAAO,EAAE,MAAM;KAChB;IAED,MAAM,EAAE;QACN,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,YAAY;QACpB,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;KAC1B;IAED,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,MAAM;KACnB;IAED,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,KAAK;QACb,UAAU,EAAE,oBAAoB;KACjC;IAED,eAAe,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,kBAAkB;QACxB,GAAG,EAAE,OAAO;QACZ,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,OAAO;QACnB,YAAY,EAAE,KAAK;QACnB,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,CAAC;KACV;IACD,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;KAChB;CACF,CAAC,EACJ,EAAE,IAAI,EAAE,iCAAiC,EAAE,CAC5C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './FilterSection';
2
- export { default } from './FilterSection';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSection/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './FilterSection';
2
- export { default } from './FilterSection';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FilterSection/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- *Looks at the filter selections and summarized all none-empty selections into a Chip.
3
- *Chip will show name filter title, amount selected and a clear filter button .
4
- */
5
- export declare const FilterSelectionChips: () => JSX.Element;
6
- export default FilterSelectionChips;
7
- //# sourceMappingURL=FilterSelectionChips.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSelectionChips.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/FilterSelectionChips.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAO,WAoBvC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Icon from '../Icon';
3
- import { close } from '@equinor/eds-icons';
4
- import useFilterContext from '../../hooks/useFilterContext';
5
- import { useChipsSelection } from './useChipsSelection';
6
- import { useStyles } from './FilterSelectionChips.style';
7
- /**
8
- *Looks at the filter selections and summarized all none-empty selections into a Chip.
9
- *Chip will show name filter title, amount selected and a clear filter button .
10
- */
11
- export const FilterSelectionChips = () => {
12
- const chips = useChipsSelection();
13
- const { store } = useFilterContext();
14
- const styles = useStyles();
15
- return (_jsx("div", Object.assign({ className: styles.ChipsContainer }, { children: chips.map((chip) => (_jsxs("div", Object.assign({ className: styles.Chip }, { children: [`${chip.title} (${Array.isArray(chip.selection) ? chip.selection.length : chip.selection}) `, _jsx("div", Object.assign({ className: styles.ChipResetFilter }, { children: _jsx(Icon, { icon: close, onClick: chip.noFilterReset ? undefined : () => store.clearSingleFilterSelection(chip.key) }, void 0) }), void 0)] }), 'Chip' + chip.key))) }), void 0));
16
- };
17
- export default FilterSelectionChips;
18
- //# sourceMappingURL=FilterSelectionChips.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSelectionChips.js","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/FilterSelectionChips.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAgB,EAAE;IACpD,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC;IAClC,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,4BAAK,SAAS,EAAE,MAAM,CAAC,cAAc,gBAClC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,6BAA6B,SAAS,EAAE,MAAM,CAAC,IAAI,iBAChD,GAAG,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,EAC7F,4BAAK,SAAS,EAAE,MAAM,CAAC,eAAe,gBACpC,KAAC,IAAI,IACH,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,WAC1F,YACE,MAPE,MAAM,GAAG,IAAI,CAAC,GAAG,CAQrB,CACP,CAAC,YACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const useStyles: (props?: {} | undefined) => import("@material-ui/styles").ClassNameMap<"ChipsContainer" | "Chip" | "ChipResetFilter">;
2
- export default useStyles;
3
- //# sourceMappingURL=FilterSelectionChips.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSelectionChips.style.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/FilterSelectionChips.style.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,uHA+BrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,31 +0,0 @@
1
- import { createStyles, makeStyles } from '@equinor/fusion-react-styles';
2
- export const useStyles = makeStyles((theme) => createStyles({
3
- ChipsContainer: {
4
- display: 'grid',
5
- gridAutoFlow: 'column',
6
- gridGap: '8px',
7
- alignContent: 'center',
8
- overflow: 'auto',
9
- },
10
- Chip: {
11
- fontFamily: 'Equinor',
12
- fontWeight: 500,
13
- fontSize: '0.875rem',
14
- color: theme.colors.interactive.primary__resting.value.hex,
15
- display: 'flex',
16
- borderRadius: '16px',
17
- background: theme.colors.interactive.primary__selected_highlight.value.hex,
18
- whiteSpace: 'nowrap',
19
- padding: '4px 8px ',
20
- lineHeight: '24px',
21
- alignItems: 'center',
22
- },
23
- ChipResetFilter: {
24
- borderRadius: '16px',
25
- '&:hover': {
26
- background: theme.colors.interactive.primary__hover_alt.value.hex,
27
- },
28
- },
29
- }), { name: 'fusion-filterpane-chips' });
30
- export default useStyles;
31
- //# sourceMappingURL=FilterSelectionChips.style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterSelectionChips.style.js","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/FilterSelectionChips.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,EAAE,CACR,YAAY,CAAC;IACX,cAAc,EAAE;QACd,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,QAAQ;QACtB,OAAO,EAAE,KAAK;QACd,YAAY,EAAE,QAAQ;QACtB,QAAQ,EAAE,MAAM;KACjB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,GAAG;QACf,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG;QAC1D,OAAO,EAAE,MAAM;QACf,YAAY,EAAE,MAAM;QACpB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,2BAA2B,CAAC,KAAK,CAAC,GAAG;QAC1E,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,UAAU;QACnB,UAAU,EAAE,MAAM;QAClB,UAAU,EAAE,QAAQ;KACrB;IACD,eAAe,EAAE;QACf,YAAY,EAAE,MAAM;QACpB,SAAS,EAAE;YACT,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,KAAK,CAAC,GAAG;SAClE;KACF;CACF,CAAC,EACJ,EAAE,IAAI,EAAE,yBAAyB,EAAE,CACpC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './FilterSelectionChips';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/index.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './FilterSelectionChips';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/index.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare type FilterChips = {
2
- key: string;
3
- title: string;
4
- noFilterReset: boolean;
5
- selection: any;
6
- };
7
- export declare const useChipsSelection: () => FilterChips[];
8
- export default useChipsSelection;
9
- //# sourceMappingURL=useChipsSelection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useChipsSelection.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/useChipsSelection.ts"],"names":[],"mappings":"AAIA,oBAAY,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qBAsB7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,26 +0,0 @@
1
- import { useState, useEffect } from 'react';
2
- import useFilterContext from '../../hooks/useFilterContext';
3
- export const useChipsSelection = () => {
4
- const { store } = useFilterContext();
5
- const [chips, setChips] = useState([]);
6
- useEffect(() => {
7
- const subscription = store.selection$.subscribe((selections) => {
8
- const chips = Object.keys(selections)
9
- .filter((selection) => selections[selection].length)
10
- .map((key) => {
11
- const { title, noFilterReset } = store.getFilterSetting(key);
12
- return {
13
- key: key,
14
- title: title,
15
- noFilterReset: Boolean(noFilterReset),
16
- selection: selections[key],
17
- };
18
- });
19
- setChips(chips);
20
- });
21
- return () => subscription.unsubscribe();
22
- }, []);
23
- return chips;
24
- };
25
- export default useChipsSelection;
26
- //# sourceMappingURL=useChipsSelection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useChipsSelection.js","sourceRoot":"","sources":["../../../src/components/FilterSelectionChips/useChipsSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAS5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,EAAE,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,UAA+B,EAAE,EAAE;YAClF,MAAM,KAAK,GAAkB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;iBACjD,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;iBACnD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;gBAC7D,OAAO;oBACL,GAAG,EAAE,GAAG;oBACR,KAAK,EAAE,KAAK;oBACZ,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC;oBACrC,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC;iBAC3B,CAAC;YACJ,CAAC,CAAC,CAAC;YACL,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,7 +0,0 @@
1
- import { FilterCategoryType } from './FilterSelector';
2
- declare type FilterCategoryProps = FilterCategoryType & {
3
- compact?: boolean;
4
- };
5
- export declare const FilterCategory: ({ filterKey, title, selected, disabled, description, compact, }: FilterCategoryProps) => JSX.Element;
6
- export default FilterCategory;
7
- //# sourceMappingURL=FilterCategory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterCategory.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSelector/FilterCategory.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAkBtD,aAAK,mBAAmB,GAAG,kBAAkB,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtE,eAAO,MAAM,cAAc,oEAOxB,mBAAmB,KAAG,WAgBxB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useMemo, useEffect, useCallback } from 'react';
3
- import { Subject } from 'rxjs';
4
- import CheckBox from '@equinor/fusion-react-checkbox';
5
- import useFilterContext from '../../hooks/useFilterContext';
6
- import { useStyles } from './FilterCategory.style';
7
- const useChangeHandler = (key) => {
8
- const { store } = useFilterContext();
9
- const change$ = useMemo(() => new Subject(), []);
10
- useEffect(() => {
11
- const subscription = change$.subscribe((checked) => {
12
- checked ? store.registerSelection(key, []) : store.unregisterSelection(key);
13
- });
14
- return () => subscription.unsubscribe();
15
- }, [store, key, change$]);
16
- return useCallback((checked) => change$.next(checked), [change$]);
17
- };
18
- export const FilterCategory = ({ filterKey, title, selected, disabled, description, compact = false, }) => {
19
- const onChange = useChangeHandler(filterKey);
20
- const styles = useStyles();
21
- return (_jsxs("li", Object.assign({ className: styles.FilterCategoryContainer }, { children: [_jsx(CheckBox, { onInput: () => onChange(!selected), checked: selected || undefined, reducedTouchTarget: compact, disabled: disabled || undefined }, void 0), _jsx("label", Object.assign({ className: styles.CategoryLabel, onClick: () => !disabled && onChange(!selected), title: description }, { children: title }), void 0)] }), filterKey));
22
- };
23
- export default FilterCategory;
24
- //# sourceMappingURL=FilterCategory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterCategory.js","sourceRoot":"","sources":["../../../src/components/FilterSelector/FilterCategory.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,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3C,KAAC,QAAQ,IACP,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAClC,OAAO,EAAE,QAAQ,IAAI,SAAS,EAC9B,kBAAkB,EAAE,OAAO,EAC3B,QAAQ,EAAE,QAAQ,IAAI,SAAS,WAC/B,EACF,8BAAO,SAAS,EAAE,MAAM,CAAC,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,WAAW,gBACxG,KAAK,YACA,MAT0C,SAAS,CAUxD,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const useStyles: (props?: {} | undefined) => import("@material-ui/styles").ClassNameMap<"FilterCategoryContainer" | "CategoryLabel">;
2
- export default useStyles;
3
- //# sourceMappingURL=FilterCategory.style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterCategory.style.d.ts","sourceRoot":"","sources":["../../../src/components/FilterSelector/FilterCategory.style.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,qHAUrB,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,12 +0,0 @@
1
- import { createStyles, makeStyles } from '@equinor/fusion-react-styles';
2
- export const useStyles = makeStyles(() => createStyles({
3
- FilterCategoryContainer: {
4
- display: 'flex',
5
- alignItems: 'center',
6
- },
7
- CategoryLabel: {
8
- cursor: 'pointer',
9
- },
10
- }));
11
- export default useStyles;
12
- //# sourceMappingURL=FilterCategory.style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FilterCategory.style.js","sourceRoot":"","sources":["../../../src/components/FilterSelector/FilterCategory.style.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CACvC,YAAY,CAAC;IACX,uBAAuB,EAAE;QACvB,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;KACrB;IACD,aAAa,EAAE;QACb,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CACH,CAAC;AAEF,eAAe,SAAS,CAAC"}