@databiosphere/findable-ui 35.1.0 → 36.0.0

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 (367) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +27 -0
  3. package/lib/common/entities.d.ts +2 -3
  4. package/lib/components/DataDictionary/components/Entities/constants.d.ts +3 -1
  5. package/lib/components/DataDictionary/components/Entities/constants.js +6 -2
  6. package/lib/components/DataDictionary/components/Entities/entities.js +6 -2
  7. package/lib/components/DataDictionary/components/Entities/entities.styles.d.ts +3 -0
  8. package/lib/components/DataDictionary/components/Entities/entities.styles.js +5 -0
  9. package/lib/components/DataDictionary/components/Entity/entity.styles.js +1 -8
  10. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.d.ts +4 -0
  11. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.js +15 -0
  12. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.d.ts +7 -0
  13. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.js +7 -0
  14. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/constants.d.ts +2 -0
  15. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/constants.js +6 -0
  16. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/types.d.ts +6 -0
  17. package/lib/components/DataDictionary/components/Filters/filters.js +2 -0
  18. package/lib/components/DataDictionary/components/Filters/filters.styles.js +3 -3
  19. package/lib/components/DataDictionary/components/Filters/stories/constants.d.ts +1 -0
  20. package/lib/components/DataDictionary/components/Filters/stories/constants.js +16 -0
  21. package/lib/components/DataDictionary/components/Filters/stories/filters.stories.js +11 -3
  22. package/lib/components/DataDictionary/components/Filters/stories/hook.d.ts +4 -0
  23. package/lib/components/DataDictionary/components/Filters/stories/hook.js +4 -0
  24. package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.d.ts +2 -1
  25. package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.js +4 -4
  26. package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.js +1 -4
  27. package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/types.d.ts +4 -2
  28. package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.d.ts +2 -1
  29. package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.js +4 -4
  30. package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.js +4 -1
  31. package/lib/components/DataDictionary/components/Table/hook.d.ts +2 -2
  32. package/lib/components/DataDictionary/components/Table/hook.js +8 -4
  33. package/lib/components/DataDictionary/components/Table/options/columnFilters/constants.js +2 -1
  34. package/lib/components/DataDictionary/components/Table/options/columnFilters/hook.d.ts +2 -5
  35. package/lib/components/DataDictionary/components/Table/options/columnFilters/hook.js +8 -6
  36. package/lib/components/DataDictionary/components/Table/options/globalFilter/constants.d.ts +2 -0
  37. package/lib/components/DataDictionary/components/Table/options/globalFilter/constants.js +5 -0
  38. package/lib/components/DataDictionary/components/Table/options/globalFilter/hook.d.ts +3 -0
  39. package/lib/components/DataDictionary/components/Table/options/globalFilter/hook.js +16 -0
  40. package/lib/components/DataDictionary/components/Table/options/hook.js +7 -5
  41. package/lib/components/DataDictionary/components/Table/options/pagination/constants.d.ts +2 -0
  42. package/lib/components/DataDictionary/components/Table/options/pagination/constants.js +3 -0
  43. package/lib/components/DataDictionary/dataDictionary.d.ts +1 -1
  44. package/lib/components/DataDictionary/dataDictionary.js +31 -12
  45. package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/hook.d.ts +4 -0
  46. package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/hook.js +27 -0
  47. package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/types.d.ts +7 -0
  48. package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/types.js +1 -0
  49. package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/utils.d.ts +6 -0
  50. package/lib/components/DataDictionary/hooks/UseDataDictionaryConfig/utils.js +8 -0
  51. package/lib/components/DataDictionary/hooks/UseMeasureFilters/hook.d.ts +2 -0
  52. package/lib/components/DataDictionary/hooks/UseMeasureFilters/hook.js +17 -0
  53. package/lib/components/DataDictionary/hooks/UseMeasureFilters/types.d.ts +7 -0
  54. package/lib/components/DataDictionary/hooks/UseMeasureFilters/types.js +1 -0
  55. package/lib/components/DataDictionary/types.d.ts +1 -0
  56. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.js +21 -29
  57. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestSpreadsheet/fileManifestSpreadsheet.js +21 -36
  58. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/constants.d.ts +2 -0
  59. package/lib/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/constants.js +22 -0
  60. package/lib/components/Filter/components/FilterCountChip/filterCountChip.d.ts +2 -0
  61. package/lib/components/Filter/components/FilterCountChip/filterCountChip.js +8 -0
  62. package/lib/components/Filter/components/FilterCountChip/filterCountChip.styles.d.ts +3 -0
  63. package/lib/components/Filter/components/FilterCountChip/filterCountChip.styles.js +18 -0
  64. package/lib/components/Filter/components/FilterCountChip/stories/filterCountChip.stories.d.ts +6 -0
  65. package/lib/components/Filter/components/FilterCountChip/stories/filterCountChip.stories.js +6 -0
  66. package/lib/components/Filter/components/FilterCountChip/types.d.ts +5 -0
  67. package/lib/components/Filter/components/FilterCountChip/types.js +1 -0
  68. package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.styles.d.ts +1 -1
  69. package/lib/components/Layout/components/Outline/outline.styles.d.ts +1 -1
  70. package/lib/components/Table/columnDef/globalFilter/constants.d.ts +2 -0
  71. package/lib/components/Table/columnDef/globalFilter/constants.js +4 -0
  72. package/lib/components/Table/columnDef/globalFilter/filterFn.d.ts +13 -0
  73. package/lib/components/Table/columnDef/globalFilter/filterFn.js +24 -0
  74. package/lib/components/Table/columnDef/globalFilter/types.d.ts +4 -0
  75. package/lib/components/Table/columnDef/globalFilter/types.js +1 -0
  76. package/lib/components/Table/columnDef/globalFilter/utils.d.ts +23 -0
  77. package/lib/components/Table/columnDef/globalFilter/utils.js +57 -0
  78. package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.d.ts +3 -0
  79. package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.js +9 -0
  80. package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.styles.d.ts +5 -0
  81. package/lib/components/Table/components/TableCell/components/CodeCell/codeCell.styles.js +15 -0
  82. package/lib/components/Table/components/TableCell/components/RankedCell/rankedCell.d.ts +3 -0
  83. package/lib/components/Table/components/TableCell/components/RankedCell/rankedCell.js +25 -0
  84. package/lib/components/Table/components/TableCell/components/RankedCell/utils.d.ts +30 -0
  85. package/lib/components/Table/components/TableCell/components/RankedCell/utils.js +64 -0
  86. package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.js +9 -5
  87. package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.d.ts +9 -0
  88. package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.js +20 -1
  89. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.d.ts +3 -0
  90. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.js +9 -0
  91. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.d.ts +5 -0
  92. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.js +24 -0
  93. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/constants.d.ts +3 -0
  94. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/constants.js +10 -0
  95. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/stories/columFilterTag.stories.d.ts +6 -0
  96. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/stories/columFilterTag.stories.js +17 -0
  97. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/types.d.ts +6 -0
  98. package/lib/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/types.js +1 -0
  99. package/lib/components/Table/components/TableFeatures/ColumnFilter/constants.d.ts +2 -1
  100. package/lib/components/Table/components/TableFeatures/ColumnFilter/constants.js +6 -0
  101. package/lib/components/Table/components/TableFeatures/ColumnFilter/types.d.ts +3 -2
  102. package/lib/components/Table/components/TableFeatures/GlobalFilter/constants.d.ts +2 -0
  103. package/lib/components/Table/components/TableFeatures/GlobalFilter/constants.js +6 -0
  104. package/lib/components/Table/components/TableFeatures/GlobalFilter/globalFilter.d.ts +3 -0
  105. package/lib/components/Table/components/TableFeatures/GlobalFilter/globalFilter.js +10 -0
  106. package/lib/components/Table/components/TableFeatures/GlobalFilter/types.d.ts +6 -0
  107. package/lib/components/Table/components/TableFeatures/GlobalFilter/types.js +1 -0
  108. package/lib/components/Table/coreOptions/state/pagination/constants.d.ts +2 -0
  109. package/lib/components/Table/coreOptions/state/pagination/constants.js +6 -0
  110. package/lib/components/Table/coreOptions/state/pagination/utils.d.ts +9 -0
  111. package/lib/components/Table/coreOptions/state/pagination/utils.js +18 -0
  112. package/lib/components/common/AnchorLink/anchorLink.js +4 -2
  113. package/lib/components/common/AnchorLink/anchorLink.styles.d.ts +1 -1
  114. package/lib/components/common/AnchorLink/anchorLink.styles.js +1 -1
  115. package/lib/components/common/CustomIcon/components/SearchIcon/searchIcon.d.ts +2 -2
  116. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.d.ts +2 -0
  117. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.js +13 -0
  118. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.d.ts +5 -0
  119. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.js +11 -0
  120. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/constants.d.ts +3 -0
  121. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/constants.js +10 -0
  122. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/types.d.ts +4 -0
  123. package/lib/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/types.js +1 -0
  124. package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/constants.d.ts +2 -0
  125. package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/constants.js +5 -0
  126. package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment.d.ts +1 -0
  127. package/lib/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment.js +9 -0
  128. package/lib/components/common/OutlinedInput/components/InputAdornment/components/constants.d.ts +2 -0
  129. package/lib/components/common/OutlinedInput/components/InputAdornment/components/constants.js +5 -0
  130. package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.d.ts +5 -0
  131. package/lib/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.js +5 -0
  132. package/lib/components/common/OutlinedInput/outlinedInput.styles.d.ts +7 -0
  133. package/lib/components/common/OutlinedInput/outlinedInput.styles.js +18 -0
  134. package/lib/hooks/stateSyncManager/hooks/UseMetaCommands/hook.js +2 -2
  135. package/lib/hooks/stateSyncManager/hooks/UseStateSync/hook.js +3 -3
  136. package/lib/hooks/stateSyncManager/types.d.ts +1 -1
  137. package/lib/hooks/useFileManifest/useFileManifestDownload.d.ts +2 -2
  138. package/lib/hooks/useFileManifest/useFileManifestDownload.js +3 -10
  139. package/lib/hooks/useFileManifest/useFileManifestSpreadsheet.d.ts +5 -4
  140. package/lib/hooks/useFileManifest/useFileManifestSpreadsheet.js +24 -20
  141. package/lib/providers/dataDictionary/context.d.ts +2 -0
  142. package/lib/providers/dataDictionary/context.js +4 -0
  143. package/lib/providers/dataDictionary/hook.d.ts +6 -0
  144. package/lib/providers/dataDictionary/hook.js +9 -0
  145. package/lib/providers/dataDictionary/types.d.ts +3 -0
  146. package/lib/providers/dataDictionary/types.js +1 -0
  147. package/lib/providers/dataDictionaryState/actions/clearMeta/action.d.ts +9 -0
  148. package/lib/providers/dataDictionaryState/actions/clearMeta/action.js +12 -0
  149. package/lib/providers/dataDictionaryState/actions/clearMeta/dispatch.d.ts +6 -0
  150. package/lib/providers/dataDictionaryState/actions/clearMeta/dispatch.js +11 -0
  151. package/lib/providers/dataDictionaryState/actions/clearMeta/types.d.ts +6 -0
  152. package/lib/providers/dataDictionaryState/actions/clearMeta/types.js +1 -0
  153. package/lib/providers/dataDictionaryState/actions/stateToUrl/action.d.ts +9 -0
  154. package/lib/providers/dataDictionaryState/actions/stateToUrl/action.js +14 -0
  155. package/lib/providers/dataDictionaryState/actions/stateToUrl/dispatch.d.ts +7 -0
  156. package/lib/providers/dataDictionaryState/actions/stateToUrl/dispatch.js +12 -0
  157. package/lib/providers/dataDictionaryState/actions/stateToUrl/types.d.ts +12 -0
  158. package/lib/providers/dataDictionaryState/actions/stateToUrl/types.js +5 -0
  159. package/lib/providers/dataDictionaryState/actions/types.d.ts +13 -0
  160. package/lib/providers/dataDictionaryState/actions/types.js +8 -0
  161. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/action.d.ts +9 -0
  162. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/action.js +18 -0
  163. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/dispatch.d.ts +7 -0
  164. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/dispatch.js +12 -0
  165. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/types.d.ts +10 -0
  166. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/types.js +1 -0
  167. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/utils.d.ts +11 -0
  168. package/lib/providers/dataDictionaryState/actions/updateColumnFilters/utils.js +27 -0
  169. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/action.d.ts +9 -0
  170. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/action.js +19 -0
  171. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/dispatch.d.ts +7 -0
  172. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/dispatch.js +12 -0
  173. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/types.d.ts +10 -0
  174. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/types.js +1 -0
  175. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/utils.d.ts +17 -0
  176. package/lib/providers/dataDictionaryState/actions/updateGlobalFilter/utils.js +36 -0
  177. package/lib/providers/dataDictionaryState/actions/urlToState/action.d.ts +9 -0
  178. package/lib/providers/dataDictionaryState/actions/urlToState/action.js +20 -0
  179. package/lib/providers/dataDictionaryState/actions/urlToState/dispatch.d.ts +7 -0
  180. package/lib/providers/dataDictionaryState/actions/urlToState/dispatch.js +12 -0
  181. package/lib/providers/dataDictionaryState/actions/urlToState/types.d.ts +9 -0
  182. package/lib/providers/dataDictionaryState/actions/urlToState/types.js +1 -0
  183. package/lib/providers/dataDictionaryState/context.d.ts +2 -0
  184. package/lib/providers/dataDictionaryState/context.js +6 -0
  185. package/lib/providers/dataDictionaryState/dictionaries/constants.d.ts +4 -0
  186. package/lib/providers/dataDictionaryState/dictionaries/constants.js +4 -0
  187. package/lib/providers/dataDictionaryState/dictionaries/state.d.ts +11 -0
  188. package/lib/providers/dataDictionaryState/dictionaries/state.js +29 -0
  189. package/lib/providers/dataDictionaryState/dictionaries/types.d.ts +9 -0
  190. package/lib/providers/dataDictionaryState/dictionaries/types.js +1 -0
  191. package/lib/providers/dataDictionaryState/dictionaries/utils.d.ts +14 -0
  192. package/lib/providers/dataDictionaryState/dictionaries/utils.js +20 -0
  193. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/hook.d.ts +2 -0
  194. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/hook.js +6 -0
  195. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/types.d.ts +4 -0
  196. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/types.js +1 -0
  197. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryReducer/hook.d.ts +2 -0
  198. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryReducer/hook.js +9 -0
  199. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryState/hook.d.ts +6 -0
  200. package/lib/providers/dataDictionaryState/hooks/UseDataDictionaryState/hook.js +9 -0
  201. package/lib/providers/dataDictionaryState/initializer/constants.d.ts +2 -0
  202. package/lib/providers/dataDictionaryState/initializer/constants.js +4 -0
  203. package/lib/providers/dataDictionaryState/initializer/initializer.d.ts +9 -0
  204. package/lib/providers/dataDictionaryState/initializer/initializer.js +17 -0
  205. package/lib/providers/dataDictionaryState/initializer/utils.d.ts +8 -0
  206. package/lib/providers/dataDictionaryState/initializer/utils.js +29 -0
  207. package/lib/providers/dataDictionaryState/provider.d.ts +4 -0
  208. package/lib/providers/dataDictionaryState/provider.js +7 -0
  209. package/lib/providers/dataDictionaryState/reducer.d.ts +9 -0
  210. package/lib/providers/dataDictionaryState/reducer.js +34 -0
  211. package/lib/providers/dataDictionaryState/types.d.ts +15 -0
  212. package/lib/providers/dataDictionaryState/types.js +1 -0
  213. package/lib/styles/common/mui/iconButton.d.ts +11 -0
  214. package/lib/styles/common/mui/iconButton.js +29 -0
  215. package/lib/styles/common/mui/inputAdornment.d.ts +9 -0
  216. package/lib/styles/common/mui/inputAdornment.js +13 -0
  217. package/lib/styles/common/mui/outlinedInput.d.ts +7 -0
  218. package/lib/styles/common/mui/outlinedInput.js +7 -0
  219. package/lib/theme/common/components.js +122 -16
  220. package/lib/theme/components/muiButtonGroup.js +4 -0
  221. package/lib/theme/components/muiTableCell.js +6 -0
  222. package/lib/utils/parseJsonQueryParam.d.ts +14 -0
  223. package/lib/utils/parseJsonQueryParam.js +25 -0
  224. package/lib/utils/stateToUrlQuery.d.ts +15 -0
  225. package/lib/utils/stateToUrlQuery.js +35 -0
  226. package/lib/views/DataDictionaryView/dataDictionaryView.d.ts +2 -2
  227. package/lib/views/DataDictionaryView/dataDictionaryView.js +16 -2
  228. package/lib/views/DataDictionaryView/types.d.ts +4 -0
  229. package/lib/views/DataDictionaryView/types.js +1 -0
  230. package/lib/views/DataDictionaryView/utils.d.ts +12 -0
  231. package/lib/views/DataDictionaryView/utils.js +17 -0
  232. package/lib/views/ExploreView/utils.d.ts +1 -1
  233. package/lib/views/ExploreView/utils.js +1 -1
  234. package/package.json +2 -1
  235. package/src/common/entities.ts +2 -3
  236. package/src/components/DataDictionary/components/Entities/constants.ts +9 -3
  237. package/src/components/DataDictionary/components/Entities/entities.styles.ts +6 -0
  238. package/src/components/DataDictionary/components/Entities/entities.tsx +7 -2
  239. package/src/components/DataDictionary/components/Entity/entity.styles.ts +1 -10
  240. package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.styles.ts +8 -0
  241. package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.tsx +33 -0
  242. package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/constants.ts +8 -0
  243. package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/types.ts +8 -0
  244. package/src/components/DataDictionary/components/Filters/filters.styles.ts +3 -3
  245. package/src/components/DataDictionary/components/Filters/filters.tsx +2 -0
  246. package/src/components/DataDictionary/components/Filters/stories/constants.ts +18 -0
  247. package/src/components/DataDictionary/components/Filters/stories/filters.stories.tsx +15 -3
  248. package/src/components/DataDictionary/components/Filters/stories/hook.ts +8 -0
  249. package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.ts +1 -5
  250. package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.tsx +13 -7
  251. package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/types.ts +4 -2
  252. package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.ts +4 -1
  253. package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.tsx +13 -7
  254. package/src/components/DataDictionary/components/Table/hook.ts +10 -6
  255. package/src/components/DataDictionary/components/Table/options/columnFilters/constants.ts +2 -1
  256. package/src/components/DataDictionary/components/Table/options/columnFilters/hook.ts +13 -12
  257. package/src/components/DataDictionary/components/Table/options/globalFilter/constants.ts +14 -0
  258. package/src/components/DataDictionary/components/Table/options/globalFilter/hook.ts +28 -0
  259. package/src/components/DataDictionary/components/Table/options/hook.ts +9 -11
  260. package/src/components/DataDictionary/components/Table/options/pagination/constants.ts +6 -0
  261. package/src/components/DataDictionary/dataDictionary.tsx +45 -16
  262. package/src/components/DataDictionary/hooks/UseDataDictionaryConfig/hook.ts +38 -0
  263. package/src/components/DataDictionary/hooks/UseDataDictionaryConfig/types.ts +8 -0
  264. package/src/components/DataDictionary/hooks/UseDataDictionaryConfig/utils.ts +8 -0
  265. package/src/components/DataDictionary/hooks/UseMeasureFilters/hook.ts +27 -0
  266. package/src/components/DataDictionary/hooks/UseMeasureFilters/types.ts +6 -0
  267. package/src/components/DataDictionary/types.ts +1 -0
  268. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestDownload/fileManifestDownload.tsx +43 -71
  269. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/components/FileManifestSpreadsheet/fileManifestSpreadsheet.tsx +52 -74
  270. package/src/components/Export/components/ManifestDownload/components/ManifestDownloadEntity/constants.ts +24 -0
  271. package/src/components/Filter/components/FilterCountChip/filterCountChip.styles.ts +19 -0
  272. package/src/components/Filter/components/FilterCountChip/filterCountChip.tsx +21 -0
  273. package/src/components/Filter/components/FilterCountChip/stories/filterCountChip.stories.tsx +12 -0
  274. package/src/components/Filter/components/FilterCountChip/types.ts +6 -0
  275. package/src/components/Table/columnDef/globalFilter/constants.ts +5 -0
  276. package/src/components/Table/columnDef/globalFilter/filterFn.ts +34 -0
  277. package/src/components/Table/columnDef/globalFilter/types.ts +5 -0
  278. package/src/components/Table/columnDef/globalFilter/utils.ts +74 -0
  279. package/src/components/Table/components/TableCell/components/CodeCell/codeCell.styles.ts +16 -0
  280. package/src/components/Table/components/TableCell/components/CodeCell/codeCell.tsx +21 -0
  281. package/src/components/Table/components/TableCell/components/RankedCell/rankedCell.tsx +50 -0
  282. package/src/components/Table/components/TableCell/components/RankedCell/utils.ts +85 -0
  283. package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.styles.ts +26 -1
  284. package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.tsx +11 -5
  285. package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.styles.ts +25 -0
  286. package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag.tsx +31 -0
  287. package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/constants.ts +13 -0
  288. package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/stories/columFilterTag.stories.tsx +26 -0
  289. package/src/components/Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/types.ts +9 -0
  290. package/src/components/Table/components/TableFeatures/ColumnFilter/constants.ts +8 -1
  291. package/src/components/Table/components/TableFeatures/ColumnFilter/types.ts +3 -2
  292. package/src/components/Table/components/TableFeatures/GlobalFilter/constants.ts +8 -0
  293. package/src/components/Table/components/TableFeatures/GlobalFilter/globalFilter.tsx +33 -0
  294. package/src/components/Table/components/TableFeatures/GlobalFilter/types.ts +9 -0
  295. package/src/components/Table/coreOptions/state/pagination/constants.ts +8 -0
  296. package/src/components/Table/coreOptions/state/pagination/utils.ts +21 -0
  297. package/src/components/common/AnchorLink/anchorLink.styles.ts +1 -1
  298. package/src/components/common/AnchorLink/anchorLink.tsx +9 -3
  299. package/src/components/common/CustomIcon/components/SearchIcon/searchIcon.tsx +2 -3
  300. package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.styles.ts +12 -0
  301. package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment.tsx +21 -0
  302. package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/constants.ts +13 -0
  303. package/src/components/common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/types.ts +4 -0
  304. package/src/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/constants.ts +7 -0
  305. package/src/components/common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment.tsx +13 -0
  306. package/src/components/common/OutlinedInput/components/InputAdornment/components/constants.ts +7 -0
  307. package/src/components/common/OutlinedInput/components/InputAdornment/inputAdornment.styles.ts +6 -0
  308. package/src/components/common/OutlinedInput/outlinedInput.styles.ts +24 -0
  309. package/src/hooks/stateSyncManager/hooks/UseMetaCommands/hook.ts +2 -2
  310. package/src/hooks/stateSyncManager/hooks/UseStateSync/hook.ts +3 -3
  311. package/src/hooks/stateSyncManager/types.ts +1 -1
  312. package/src/hooks/useFileManifest/useFileManifestDownload.ts +9 -16
  313. package/src/hooks/useFileManifest/useFileManifestSpreadsheet.ts +41 -26
  314. package/src/providers/dataDictionary/context.ts +6 -0
  315. package/src/providers/dataDictionary/hook.ts +11 -0
  316. package/src/providers/dataDictionary/types.ts +6 -0
  317. package/src/providers/dataDictionaryState/actions/clearMeta/action.ts +18 -0
  318. package/src/providers/dataDictionaryState/actions/clearMeta/dispatch.ts +13 -0
  319. package/src/providers/dataDictionaryState/actions/clearMeta/types.ts +8 -0
  320. package/src/providers/dataDictionaryState/actions/stateToUrl/action.ts +20 -0
  321. package/src/providers/dataDictionaryState/actions/stateToUrl/dispatch.ts +14 -0
  322. package/src/providers/dataDictionaryState/actions/stateToUrl/types.ts +15 -0
  323. package/src/providers/dataDictionaryState/actions/types.ts +20 -0
  324. package/src/providers/dataDictionaryState/actions/updateColumnFilters/action.ts +24 -0
  325. package/src/providers/dataDictionaryState/actions/updateColumnFilters/dispatch.ts +16 -0
  326. package/src/providers/dataDictionaryState/actions/updateColumnFilters/types.ts +12 -0
  327. package/src/providers/dataDictionaryState/actions/updateColumnFilters/utils.ts +41 -0
  328. package/src/providers/dataDictionaryState/actions/updateGlobalFilter/action.ts +25 -0
  329. package/src/providers/dataDictionaryState/actions/updateGlobalFilter/dispatch.ts +16 -0
  330. package/src/providers/dataDictionaryState/actions/updateGlobalFilter/types.ts +12 -0
  331. package/src/providers/dataDictionaryState/actions/updateGlobalFilter/utils.ts +50 -0
  332. package/src/providers/dataDictionaryState/actions/urlToState/action.ts +28 -0
  333. package/src/providers/dataDictionaryState/actions/urlToState/dispatch.ts +14 -0
  334. package/src/providers/dataDictionaryState/actions/urlToState/types.ts +11 -0
  335. package/src/providers/dataDictionaryState/context.ts +9 -0
  336. package/src/providers/dataDictionaryState/dictionaries/constants.ts +4 -0
  337. package/src/providers/dataDictionaryState/dictionaries/state.ts +45 -0
  338. package/src/providers/dataDictionaryState/dictionaries/types.ts +11 -0
  339. package/src/providers/dataDictionaryState/dictionaries/utils.ts +25 -0
  340. package/src/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/hook.ts +14 -0
  341. package/src/providers/dataDictionaryState/hooks/UseDataDictionaryInitialArgs/types.ts +5 -0
  342. package/src/providers/dataDictionaryState/hooks/UseDataDictionaryReducer/hook.ts +17 -0
  343. package/src/providers/dataDictionaryState/hooks/UseDataDictionaryState/hook.ts +11 -0
  344. package/src/providers/dataDictionaryState/initializer/constants.ts +6 -0
  345. package/src/providers/dataDictionaryState/initializer/initializer.ts +22 -0
  346. package/src/providers/dataDictionaryState/initializer/utils.ts +39 -0
  347. package/src/providers/dataDictionaryState/provider.tsx +16 -0
  348. package/src/providers/dataDictionaryState/reducer.ts +42 -0
  349. package/src/providers/dataDictionaryState/types.ts +18 -0
  350. package/src/styles/common/mui/iconButton.ts +40 -0
  351. package/src/styles/common/mui/inputAdornment.ts +22 -0
  352. package/src/styles/common/mui/outlinedInput.ts +14 -0
  353. package/src/theme/common/components.ts +122 -16
  354. package/src/theme/components/muiButtonGroup.ts +4 -0
  355. package/src/theme/components/muiTableCell.ts +6 -0
  356. package/src/utils/parseJsonQueryParam.ts +27 -0
  357. package/src/utils/stateToUrlQuery.ts +40 -0
  358. package/src/views/DataDictionaryView/dataDictionaryView.tsx +29 -3
  359. package/src/views/DataDictionaryView/types.ts +5 -0
  360. package/src/views/DataDictionaryView/utils.ts +23 -0
  361. package/src/views/ExploreView/utils.ts +1 -1
  362. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.d.ts +0 -4
  363. package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +0 -36
  364. package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +0 -8
  365. package/src/components/DataDictionary/hooks/UseDataDictionary/hook.ts +0 -51
  366. package/src/components/DataDictionary/hooks/UseDataDictionary/types.ts +0 -9
  367. /package/lib/components/DataDictionary/{hooks/UseDataDictionary → components/Filters/components/ColumnFilterTags}/types.js +0 -0
@@ -0,0 +1,15 @@
1
+ import styled from "@emotion/styled";
2
+ import { Chip } from "@mui/material";
3
+ import { PALETTE } from "../../../../../../styles/common/constants/palette";
4
+ export const StyledChip = styled(Chip) `
5
+ border-radius: 4px;
6
+ box-shadow: 0 0 0 2px ${PALETTE.COMMON_WHITE};
7
+ height: auto;
8
+ justify-self: flex-start;
9
+ min-width: 0;
10
+
11
+ .MuiChip-label {
12
+ padding: 2px 8px;
13
+ white-space: normal;
14
+ }
15
+ `;
@@ -0,0 +1,3 @@
1
+ import { CellContext, RowData } from "@tanstack/react-table";
2
+ import { BaseComponentProps } from "../../../../../types";
3
+ export declare const RankedCell: <T extends RowData, TValue = string | undefined | null>({ className, column, getValue, row, table, }: BaseComponentProps & CellContext<T, TValue>) => JSX.Element | null;
@@ -0,0 +1,25 @@
1
+ import React, { Fragment } from "react";
2
+ import { getTokens, getTokensRegex, isRankedCell } from "./utils";
3
+ export const RankedCell = ({ className, column, getValue, row, table, }) => {
4
+ // Get the cell value.
5
+ const value = getValue();
6
+ // If the cell value is undefined or null, return null.
7
+ if (value === undefined || value === null)
8
+ return null;
9
+ // Convert the cell value to a string.
10
+ const stringValue = String(value);
11
+ // Check if the cell is ranked.
12
+ const isRanked = isRankedCell(table, row, column.id);
13
+ // Return the unranked cell, as-is.
14
+ if (!isRanked)
15
+ return React.createElement(Fragment, null, stringValue);
16
+ // Tokenise the current global filter.
17
+ const tokens = getTokens(table);
18
+ // If there are no tokens, return the value as-is.
19
+ if (tokens.length === 0)
20
+ return React.createElement(Fragment, null, stringValue);
21
+ // Create regex pattern.
22
+ const regex = getTokensRegex(tokens);
23
+ // Return the ranked cell, with highlighting.
24
+ return (React.createElement("span", { className: className }, stringValue.split(regex).map((part, i) => (React.createElement(Fragment, { key: i }, part.match(regex) ? React.createElement("mark", null, part) : part)))));
25
+ };
@@ -0,0 +1,30 @@
1
+ import { Row, RowData, Table } from "@tanstack/react-table";
2
+ /**
3
+ * Renders a cell value with highlighting if it matches item rank filter criteria.
4
+ * @param table - Table.
5
+ * @param row - Row.
6
+ * @param columnId - Column identifier.
7
+ * @param value - Cell value.
8
+ * @returns Rendered cell value with highlighting.
9
+ */
10
+ export declare function renderRankedCell<T extends RowData>(table: Table<T>, row: Row<T>, columnId: string, value: string | undefined | null): string;
11
+ /**
12
+ * Returns the current global filter tokens from the table.
13
+ * @param table - Table.
14
+ * @returns An array of search tokens.
15
+ */
16
+ export declare function getTokens<T extends RowData>(table: Table<T>): string[];
17
+ /**
18
+ * Returns a RegExp pattern for matching search tokens.
19
+ * @param tokens - Search tokens.
20
+ * @returns A RegExp pattern that matches any of the tokens.
21
+ */
22
+ export declare function getTokensRegex(tokens: string[]): RegExp;
23
+ /**
24
+ * Checks if a cell is ranked based on the global filter.
25
+ * @param table - Table.
26
+ * @param row - Row.
27
+ * @param columnId - Column identifier.
28
+ * @returns Whether the cell is ranked.
29
+ */
30
+ export declare function isRankedCell<T extends RowData>(table: Table<T>, row: Row<T>, columnId: string): boolean;
@@ -0,0 +1,64 @@
1
+ import { escapeRegExp } from "../../../../../../common/utils";
2
+ import { parseSearchTerms } from "../../../../columnDef/globalFilter/utils";
3
+ /**
4
+ * Renders a cell value with highlighting if it matches item rank filter criteria.
5
+ * @param table - Table.
6
+ * @param row - Row.
7
+ * @param columnId - Column identifier.
8
+ * @param value - Cell value.
9
+ * @returns Rendered cell value with highlighting.
10
+ */
11
+ export function renderRankedCell(table, row, columnId, value) {
12
+ // If the cell value is undefined or null, return an empty string.
13
+ if (value === undefined || value === null)
14
+ return "";
15
+ const stringValue = String(value);
16
+ // Check if the cell is ranked.
17
+ const isRanked = isRankedCell(table, row, columnId);
18
+ // Return the unranked cell, as-is, in string form.
19
+ if (!isRanked)
20
+ return stringValue;
21
+ // Tokenise the current global filter.
22
+ const tokens = getTokens(table);
23
+ // If there are no tokens, return the value as-is, in string form.
24
+ if (tokens.length === 0)
25
+ return stringValue;
26
+ // Create regex pattern.
27
+ const regex = getTokensRegex(tokens);
28
+ return stringValue.replace(regex, "<mark>$1</mark>");
29
+ }
30
+ /**
31
+ * Returns the current global filter tokens from the table.
32
+ * @param table - Table.
33
+ * @returns An array of search tokens.
34
+ */
35
+ export function getTokens(table) {
36
+ const { getState } = table;
37
+ const { globalFilter } = getState();
38
+ return parseSearchTerms(globalFilter);
39
+ }
40
+ /**
41
+ * Returns a RegExp pattern for matching search tokens.
42
+ * @param tokens - Search tokens.
43
+ * @returns A RegExp pattern that matches any of the tokens.
44
+ */
45
+ export function getTokensRegex(tokens) {
46
+ return new RegExp(`(${tokens.map(escapeRegExp).join("|")})`, "gi");
47
+ }
48
+ /**
49
+ * Checks if a cell is ranked based on the global filter.
50
+ * @param table - Table.
51
+ * @param row - Row.
52
+ * @param columnId - Column identifier.
53
+ * @returns Whether the cell is ranked.
54
+ */
55
+ export function isRankedCell(table, row, columnId) {
56
+ const { getState } = table;
57
+ const { globalFilter } = getState();
58
+ // If there is no global filter, return the value as-is.
59
+ if (!globalFilter)
60
+ return false;
61
+ // Check if the column has filter metadata with itemRank.passed
62
+ const columnFilterMeta = row.columnFiltersMeta[columnId];
63
+ return columnFilterMeta?.passed ?? false;
64
+ }
@@ -1,4 +1,4 @@
1
- import { Checkbox, ListItemButton, ListItemText, Button as MButton, Typography, } from "@mui/material";
1
+ import { Checkbox, Grid, ListItemButton, ListItemText, Typography, } from "@mui/material";
2
2
  import React, { Fragment } from "react";
3
3
  import { SVG_ICON_PROPS } from "../../../../../styles/common/mui/svgIcon";
4
4
  import { TYPOGRAPHY_PROPS } from "../../../../../styles/common/mui/typography";
@@ -6,22 +6,26 @@ import { CheckedIcon } from "../../../../common/CustomIcon/components/CheckedIco
6
6
  import { UncheckedIcon } from "../../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
7
7
  import { DropDownIcon } from "../../../../common/Form/components/Select/components/DropDownIcon/dropDownIcon";
8
8
  import { useMenu } from "../../../../common/Menu/hooks/useMenu";
9
+ import { FilterCountChip } from "../../../../Filter/components/FilterCountChip/filterCountChip";
9
10
  import { getColumnHeader } from "../../../common/utils";
10
11
  import { getSortedFacetedValues } from "../../../featureOptions/facetedColumn/utils";
11
- import { StyledMenu } from "./columnFilter.styles";
12
- import { MENU_PROPS } from "./constants";
12
+ import { StyledButton, StyledMenu } from "./columnFilter.styles";
13
+ import { GRID_PROPS, MENU_PROPS } from "./constants";
13
14
  import { updater } from "./utils";
14
15
  /**
15
16
  * Column filter component with supported filter functions:
16
17
  * - `arrIncludesSome`
17
18
  */
18
- export const ColumnFilter = ({ Button = MButton, className, column, ...props /* MuiMenuProps */ }) => {
19
+ export const ColumnFilter = ({ Button = StyledButton, className, column, ...props /* MuiMenuProps */ }) => {
19
20
  const { anchorEl, onClose, onOpen, open } = useMenu();
20
21
  const facetedUniqueValues = column.getFacetedUniqueValues();
21
22
  const sortedValues = getSortedFacetedValues(facetedUniqueValues);
22
23
  const filterValue = (column.getFilterValue() || []);
23
24
  return (React.createElement(Fragment, null,
24
- React.createElement(Button, { key: column.id, endIcon: React.createElement(DropDownIcon, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }), onClick: onOpen }, getColumnHeader(column)),
25
+ React.createElement(Button, { key: column.id, disabled: sortedValues.length === 0, endIcon: React.createElement(DropDownIcon, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }), onClick: onOpen, open: open },
26
+ React.createElement(Grid, { ...GRID_PROPS },
27
+ getColumnHeader(column),
28
+ React.createElement(FilterCountChip, { count: filterValue.length }))),
25
29
  React.createElement(StyledMenu, { ...MENU_PROPS, ...props, className: className, anchorEl: anchorEl, onClose: onClose, open: open },
26
30
  sortedValues.map(([value, occurrence]) => (React.createElement(ListItemButton, { key: String(value), selected: filterValue.includes(value), onClick: () => column.setFilterValue(updater(value)) },
27
31
  React.createElement(Checkbox, { checked: filterValue.includes(value), checkedIcon: React.createElement(CheckedIcon, null), icon: React.createElement(UncheckedIcon, null) }),
@@ -1,3 +1,12 @@
1
+ interface Props {
2
+ open: boolean;
3
+ }
4
+ export declare const StyledButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
5
+ ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
6
+ }, "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "href" | "action" | "loading" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loadingIndicator" | "loadingPosition" | "startIcon"> & {
7
+ theme?: import("@emotion/react").Theme;
8
+ } & Props, {}, {}>;
1
9
  export declare const StyledMenu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & {
2
10
  theme?: import("@emotion/react").Theme;
3
11
  }, {}, {}>;
12
+ export {};
@@ -1,7 +1,26 @@
1
+ import { css } from "@emotion/react";
1
2
  import styled from "@emotion/styled";
2
- import { Menu, menuClasses, paperClasses } from "@mui/material";
3
+ import { Button, Menu, menuClasses, paperClasses } from "@mui/material";
4
+ import { PALETTE } from "../../../../../styles/common/constants/palette";
3
5
  import { MAX_LIST_HEIGHT_PX } from "../../../../Filter/common/constants";
4
6
  import { MuiListItemButtonRoot, MuiListItemTextRoot, } from "../../../../Filter/components/FilterList/filterList.styles";
7
+ export const StyledButton = styled(Button, {
8
+ shouldForwardProp: (prop) => prop !== "open",
9
+ }) `
10
+ &.MuiButtonGroup-grouped {
11
+ gap: 0;
12
+
13
+ .MuiButton-endIcon {
14
+ margin-left: 0;
15
+ margin-right: -8px;
16
+ }
17
+
18
+ ${({ open }) => open &&
19
+ css `
20
+ background-color: ${PALETTE.SMOKE_LIGHT};
21
+ `}
22
+ }
23
+ `;
5
24
  export const StyledMenu = styled(Menu) `
6
25
  .${paperClasses.root} {
7
26
  margin: 4px 0;
@@ -0,0 +1,3 @@
1
+ import { RowData } from "@tanstack/react-table";
2
+ import { ColumnFilterTagProps } from "./types";
3
+ export declare const ColumnFilterTag: <T extends RowData>({ className, column, ...props }: ColumnFilterTagProps<T>) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { CloseRounded } from "@mui/icons-material";
2
+ import React, { Fragment } from "react";
3
+ import { updater } from "../../../../../components/TableFeatures/ColumnFilter/utils";
4
+ import { StyledChip } from "./columnFilterTag.styles";
5
+ import { CHIP_PROPS, SVG_ICON_PROPS } from "./constants";
6
+ export const ColumnFilterTag = ({ className, column, ...props /* MuiChipProps */ }) => {
7
+ const filterValue = column.getFilterValue();
8
+ return (React.createElement(Fragment, null, filterValue.map((value) => (React.createElement(StyledChip, { ...CHIP_PROPS, key: String(value), className: className, deleteIcon: React.createElement(CloseRounded, { ...SVG_ICON_PROPS }), label: String(value), onClick: () => column.setFilterValue(updater(value)), onDelete: () => column.setFilterValue(updater(value)), ...props })))));
9
+ };
@@ -0,0 +1,5 @@
1
+ export declare const StyledChip: import("@emotion/styled").StyledComponent<import("@mui/material").ChipOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
+ }, "label" | "style" | "className" | "classes" | "tabIndex" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "avatar" | "clickable" | "deleteIcon" | "icon" | "onDelete" | "skipFocusWhenDisabled"> & {
4
+ theme?: import("@emotion/react").Theme;
5
+ }, {}, {}>;
@@ -0,0 +1,24 @@
1
+ import styled from "@emotion/styled";
2
+ import { Chip } from "@mui/material";
3
+ import { PALETTE } from "../../../../../../../styles/common/constants/palette";
4
+ export const StyledChip = styled(Chip) `
5
+ border-radius: 4px;
6
+ box-shadow: 0 0 0 2px ${PALETTE.COMMON_WHITE};
7
+ cursor: pointer;
8
+ gap: 4px;
9
+ justify-self: flex-start;
10
+ padding: 0 8px;
11
+
12
+ .MuiChip-label {
13
+ padding: 0;
14
+ }
15
+
16
+ .MuiChip-deleteIcon {
17
+ font-size: 16px;
18
+ margin: 0 -4px 0 0;
19
+
20
+ &:hover {
21
+ color: inherit;
22
+ }
23
+ }
24
+ `;
@@ -0,0 +1,3 @@
1
+ import { ChipProps, SvgIconProps } from "@mui/material";
2
+ export declare const CHIP_PROPS: ChipProps;
3
+ export declare const SVG_ICON_PROPS: SvgIconProps;
@@ -0,0 +1,10 @@
1
+ import { CHIP_PROPS as MUI_CHIP_PROPS } from "../../../../../../../styles/common/mui/chip";
2
+ import { SVG_ICON_PROPS as MUI_SVG_ICON_PROPS } from "../../../../../../../styles/common/mui/svgIcon";
3
+ export const CHIP_PROPS = {
4
+ clickable: false,
5
+ color: MUI_CHIP_PROPS.COLOR.DEFAULT,
6
+ size: MUI_CHIP_PROPS.SIZE.MEDIUM,
7
+ };
8
+ export const SVG_ICON_PROPS = {
9
+ color: MUI_SVG_ICON_PROPS.COLOR.INHERIT,
10
+ };
@@ -0,0 +1,6 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { ColumnFilterTag } from "../columnFilterTag";
3
+ declare const meta: Meta<typeof ColumnFilterTag>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
@@ -0,0 +1,17 @@
1
+ import { Box } from "@mui/material";
2
+ import React from "react";
3
+ import { BIONETWORK } from "../../../../../../../DataDictionary/components/Filters/stories/constants";
4
+ import { ColumnFilterTag } from "../columnFilterTag";
5
+ const meta = {
6
+ component: ColumnFilterTag,
7
+ decorators: [
8
+ (Story) => (React.createElement(Box, { sx: { display: "grid", gap: 2, gridAutoFlow: "column" } },
9
+ React.createElement(Story, null))),
10
+ ],
11
+ };
12
+ export default meta;
13
+ export const Default = {
14
+ args: {
15
+ column: BIONETWORK,
16
+ },
17
+ };
@@ -0,0 +1,6 @@
1
+ import { ChipProps } from "@mui/material";
2
+ import { Column, RowData } from "@tanstack/react-table";
3
+ import { BaseComponentProps } from "../../../../../../types";
4
+ export interface ColumnFilterTagProps<T extends RowData> extends BaseComponentProps, ChipProps {
5
+ column: Column<T>;
6
+ }
@@ -1,2 +1,3 @@
1
- import { MenuProps } from "@mui/material";
1
+ import { GridProps, MenuProps } from "@mui/material";
2
+ export declare const GRID_PROPS: GridProps;
2
3
  export declare const MENU_PROPS: Omit<MenuProps, "anchorEl" | "onClose" | "open">;
@@ -1,3 +1,9 @@
1
+ export const GRID_PROPS = {
2
+ alignItems: "center",
3
+ container: true,
4
+ direction: "row",
5
+ gap: 1,
6
+ };
1
7
  export const MENU_PROPS = {
2
8
  anchorOrigin: {
3
9
  horizontal: "right",
@@ -1,7 +1,8 @@
1
- import { Button, MenuProps } from "@mui/material";
1
+ import { MenuProps } from "@mui/material";
2
2
  import { Column, RowData } from "@tanstack/react-table";
3
3
  import { BaseComponentProps } from "../../../../types";
4
+ import { StyledButton } from "./columnFilter.styles";
4
5
  export interface ColumnFilterProps<T extends RowData> extends BaseComponentProps, Omit<MenuProps, "anchorEl" | "onClose" | "open"> {
5
- Button?: typeof Button;
6
+ Button?: typeof StyledButton;
6
7
  column: Column<T>;
7
8
  }
@@ -0,0 +1,2 @@
1
+ import { OutlinedInputProps } from "@mui/material";
2
+ export declare const OUTLINED_INPUT_PROPS: OutlinedInputProps;
@@ -0,0 +1,6 @@
1
+ import { OUTLINED_INPUT_PROPS as MUI_OUTLINED_INPUT_PROPS } from "../../../../../styles/common/mui/outlinedInput";
2
+ export const OUTLINED_INPUT_PROPS = {
3
+ color: MUI_OUTLINED_INPUT_PROPS.COLOR.SECONDARY,
4
+ fullWidth: true,
5
+ id: "global-filter",
6
+ };
@@ -0,0 +1,3 @@
1
+ import { RowData } from "@tanstack/react-table";
2
+ import { GlobalFilterProps } from "./types";
3
+ export declare const GlobalFilter: <T extends RowData>({ className, table, ...props }: GlobalFilterProps<T>) => JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { ClearInputAdornment } from "../../../../common/OutlinedInput/components/InputAdornment/components/ClearInputAdornment/clearInputAdornment";
3
+ import { SearchInputAdornment } from "../../../../common/OutlinedInput/components/InputAdornment/components/SearchInputAdornment/searchInputAdornment";
4
+ import { StyledOutlinedInput } from "../../../../common/OutlinedInput/outlinedInput.styles";
5
+ import { OUTLINED_INPUT_PROPS } from "./constants";
6
+ export const GlobalFilter = ({ className, table, ...props /* MuiOutlinedInputProps */ }) => {
7
+ const { getState, setGlobalFilter } = table;
8
+ const { globalFilter } = getState();
9
+ return (React.createElement(StyledOutlinedInput, { ...OUTLINED_INPUT_PROPS, className: className, endAdornment: React.createElement(ClearInputAdornment, { in: !!globalFilter, onClick: () => setGlobalFilter(undefined) }), hasValue: !!globalFilter, onChange: (e) => setGlobalFilter(e.target.value), startAdornment: React.createElement(SearchInputAdornment, null), value: globalFilter ?? "", ...props }));
10
+ };
@@ -0,0 +1,6 @@
1
+ import { OutlinedInputProps } from "@mui/material";
2
+ import { RowData, Table } from "@tanstack/react-table";
3
+ import { BaseComponentProps } from "components/types";
4
+ export interface GlobalFilterProps<T extends RowData> extends BaseComponentProps, OutlinedInputProps {
5
+ table: Table<T>;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { PaginationTableState } from "@tanstack/react-table";
2
+ export declare const PAGINATION_TABLE_STATE: PaginationTableState;
@@ -0,0 +1,6 @@
1
+ export const PAGINATION_TABLE_STATE = {
2
+ pagination: {
3
+ pageIndex: 0,
4
+ pageSize: 10,
5
+ },
6
+ };
@@ -0,0 +1,9 @@
1
+ import { InitialTableState, PaginationTableState } from "@tanstack/react-table";
2
+ /**
3
+ * Initializes pagination state by merging default values with initial state.
4
+ * TanStack Table always applies a default pagination of `{ pageIndex: 0, pageSize: 10 }`,
5
+ * so this function ensures custom pagination state is properly initialized from the initial state.
6
+ * @param initialState - The initial state.
7
+ * @returns The initialized pagination state.
8
+ */
9
+ export declare function initPaginationState(initialState?: InitialTableState): PaginationTableState;
@@ -0,0 +1,18 @@
1
+ import { PAGINATION_TABLE_STATE } from "./constants";
2
+ /**
3
+ * Initializes pagination state by merging default values with initial state.
4
+ * TanStack Table always applies a default pagination of `{ pageIndex: 0, pageSize: 10 }`,
5
+ * so this function ensures custom pagination state is properly initialized from the initial state.
6
+ * @param initialState - The initial state.
7
+ * @returns The initialized pagination state.
8
+ */
9
+ export function initPaginationState(initialState) {
10
+ if (!initialState?.pagination)
11
+ return PAGINATION_TABLE_STATE;
12
+ return {
13
+ pagination: {
14
+ ...PAGINATION_TABLE_STATE.pagination,
15
+ ...initialState.pagination,
16
+ },
17
+ };
18
+ }
@@ -1,7 +1,9 @@
1
1
  import { LinkRounded } from "@mui/icons-material";
2
+ import { useRouter } from "next/router";
2
3
  import React from "react";
3
- import { AnchorLink as Link } from "./anchorLink.styles";
4
+ import { StyledNextLink } from "./anchorLink.styles";
4
5
  export const AnchorLink = ({ anchorLink, className, }) => {
5
- return (React.createElement(Link, { "aria-label": anchorLink, className: className, href: `#${anchorLink}` },
6
+ const { query } = useRouter();
7
+ return (React.createElement(StyledNextLink, { "aria-label": anchorLink, className: className, href: { hash: anchorLink, query } },
6
8
  React.createElement(LinkRounded, { fontSize: "xsmall" })));
7
9
  };
@@ -1,4 +1,4 @@
1
- export declare const AnchorLink: import("@emotion/styled").StyledComponent<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, keyof {
1
+ export declare const StyledNextLink: import("@emotion/styled").StyledComponent<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, keyof {
2
2
  href: string | import("url").UrlObject;
3
3
  as?: string | import("url").UrlObject;
4
4
  replace?: boolean;
@@ -1,7 +1,7 @@
1
1
  import styled from "@emotion/styled";
2
2
  import Link from "next/link";
3
3
  import { inkLight } from "../../../styles/common/mixins/colors";
4
- export const AnchorLink = styled(Link) `
4
+ export const StyledNextLink = styled(Link) `
5
5
  color: ${inkLight};
6
6
  margin-left: 4px;
7
7
  opacity: 0;
@@ -1,5 +1,5 @@
1
- import { CustomSVGIconProps } from "../../common/entities";
1
+ import { SvgIconProps } from "@mui/material";
2
2
  /**
3
3
  * Custom search icon.
4
4
  */
5
- export declare const SearchIcon: ({ fontSize, viewBox, ...props }: CustomSVGIconProps) => JSX.Element;
5
+ export declare const SearchIcon: ({ fontSize, viewBox, ...props }: SvgIconProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ClearInputAdornmentProps } from "./types";
2
+ export declare const ClearInputAdornment: ({ in: isIn, onClick, }: ClearInputAdornmentProps) => JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { CloseRounded } from "@mui/icons-material";
2
+ import { IconButton } from "@mui/material";
3
+ import React from "react";
4
+ import { SVG_ICON_PROPS } from "../constants";
5
+ import { StyledInputAdornment } from "./clearInputAdornment.styles";
6
+ import { ICON_BUTTON_PROPS, INPUT_ADORNMENT_PROPS } from "./constants";
7
+ export const ClearInputAdornment = ({ in: isIn, onClick, }) => {
8
+ if (!isIn)
9
+ return null;
10
+ return (React.createElement(StyledInputAdornment, { ...INPUT_ADORNMENT_PROPS },
11
+ React.createElement(IconButton, { ...ICON_BUTTON_PROPS, onClick: onClick },
12
+ React.createElement(CloseRounded, { ...SVG_ICON_PROPS }))));
13
+ };
@@ -0,0 +1,5 @@
1
+ export declare const StyledInputAdornment: import("@emotion/styled").StyledComponent<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
+ }, "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "disableTypography" | "disablePointerEvents"> & {
4
+ theme?: import("@emotion/react").Theme;
5
+ }, {}, {}>;
@@ -0,0 +1,11 @@
1
+ import styled from "@emotion/styled";
2
+ import { InputAdornment } from "@mui/material";
3
+ import { PALETTE } from "../../../../../../../styles/common/constants/palette";
4
+ export const StyledInputAdornment = styled(InputAdornment) `
5
+ color: ${PALETTE.INK_LIGHT};
6
+ margin: 0;
7
+
8
+ .MuiIconButton-root {
9
+ margin-right: -10px;
10
+ }
11
+ `;
@@ -0,0 +1,3 @@
1
+ import { IconButtonProps, InputAdornmentProps } from "@mui/material";
2
+ export declare const ICON_BUTTON_PROPS: IconButtonProps;
3
+ export declare const INPUT_ADORNMENT_PROPS: InputAdornmentProps;
@@ -0,0 +1,10 @@
1
+ import { ICON_BUTTON_PROPS as MUI_ICON_BUTTON_PROPS } from "../../../../../../../styles/common/mui/iconButton";
2
+ import { INPUT_ADORNMENT_PROPS as MUI_INPUT_ADORNMENT_PROPS } from "../../../../../../../styles/common/mui/inputAdornment";
3
+ export const ICON_BUTTON_PROPS = {
4
+ color: MUI_ICON_BUTTON_PROPS.COLOR.INHERIT,
5
+ edge: MUI_ICON_BUTTON_PROPS.EDGE.END,
6
+ size: MUI_ICON_BUTTON_PROPS.SIZE.MEDIUM,
7
+ };
8
+ export const INPUT_ADORNMENT_PROPS = {
9
+ position: MUI_INPUT_ADORNMENT_PROPS.POSITION.END,
10
+ };
@@ -0,0 +1,4 @@
1
+ export interface ClearInputAdornmentProps {
2
+ in?: boolean;
3
+ onClick: () => void;
4
+ }
@@ -0,0 +1,2 @@
1
+ import { InputAdornmentProps } from "@mui/material";
2
+ export declare const INPUT_ADORNMENT_PROPS: InputAdornmentProps;
@@ -0,0 +1,5 @@
1
+ import { INPUT_ADORNMENT_PROPS as MUI_INPUT_ADORNMENT_PROPS } from "../../../../../../../styles/common/mui/inputAdornment";
2
+ export const INPUT_ADORNMENT_PROPS = {
3
+ disablePointerEvents: true,
4
+ position: MUI_INPUT_ADORNMENT_PROPS.POSITION.START,
5
+ };
@@ -0,0 +1 @@
1
+ export declare const SearchInputAdornment: () => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { SearchIcon } from "../../../../../CustomIcon/components/SearchIcon/searchIcon";
3
+ import { StyledInputAdornment } from "../../inputAdornment.styles";
4
+ import { SVG_ICON_PROPS } from "../constants";
5
+ import { INPUT_ADORNMENT_PROPS } from "./constants";
6
+ export const SearchInputAdornment = () => {
7
+ return (React.createElement(StyledInputAdornment, { ...INPUT_ADORNMENT_PROPS },
8
+ React.createElement(SearchIcon, { ...SVG_ICON_PROPS })));
9
+ };
@@ -0,0 +1,2 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ export declare const SVG_ICON_PROPS: SvgIconProps;
@@ -0,0 +1,5 @@
1
+ import { SVG_ICON_PROPS as MUI_SVG_ICON_PROPS } from "../../../../../../styles/common/mui/svgIcon";
2
+ export const SVG_ICON_PROPS = {
3
+ color: MUI_SVG_ICON_PROPS.COLOR.INHERIT,
4
+ fontSize: MUI_SVG_ICON_PROPS.FONT_SIZE.SMALL,
5
+ };
@@ -0,0 +1,5 @@
1
+ export declare const StyledInputAdornment: import("@emotion/styled").StyledComponent<import("@mui/material").InputAdornmentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
+ }, "style" | "className" | "classes" | "children" | "position" | "sx" | "variant" | "disableTypography" | "disablePointerEvents"> & {
4
+ theme?: import("@emotion/react").Theme;
5
+ }, {}, {}>;
@@ -0,0 +1,5 @@
1
+ import styled from "@emotion/styled";
2
+ import { InputAdornment } from "@mui/material";
3
+ export const StyledInputAdornment = styled(InputAdornment) `
4
+ color: inherit;
5
+ `;
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ hasValue: boolean;
3
+ }
4
+ export declare const StyledOutlinedInput: import("@emotion/styled").StyledComponent<import("@mui/material").OutlinedInputProps & {
5
+ theme?: import("@emotion/react").Theme;
6
+ } & Props, {}, {}>;
7
+ export {};