@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,18 @@
1
+ import { css } from "@emotion/react";
2
+ import styled from "@emotion/styled";
3
+ import { OutlinedInput } from "@mui/material";
4
+ import { PALETTE } from "../../../styles/common/constants/palette";
5
+ export const StyledOutlinedInput = styled(OutlinedInput, {
6
+ shouldForwardProp: (prop) => prop !== "hasValue",
7
+ }) `
8
+ ${({ hasValue }) => hasValue &&
9
+ css `
10
+ & {
11
+ color: ${PALETTE.INK_MAIN};
12
+
13
+ .MuiOutlinedInput-input {
14
+ color: inherit;
15
+ }
16
+ }
17
+ `};
18
+ `;
@@ -10,11 +10,11 @@ export const useMetaCommands = ({ actions, dispatch, state, }) => {
10
10
  switch (command) {
11
11
  case META_COMMAND.STATE_TO_URL_PUSH:
12
12
  Router.push({ query }, undefined, { shallow: true });
13
- dispatch(actions.clearMeta());
13
+ dispatch?.(actions.clearMeta());
14
14
  break;
15
15
  case META_COMMAND.STATE_TO_URL_REPLACE:
16
16
  Router.replace({ query }, undefined, { shallow: true });
17
- dispatch(actions.clearMeta());
17
+ dispatch?.(actions.clearMeta());
18
18
  break;
19
19
  default:
20
20
  break;
@@ -23,18 +23,18 @@ export const useStateSync = ({ actions, dispatch, state, }) => {
23
23
  // Dispatch action sync URL >> state.
24
24
  if (wasPop(basePath, pathname, popRef.current)) {
25
25
  // When the user navigates with the back/forward buttons.
26
- dispatch(actions.urlToState({ query }));
26
+ dispatch?.(actions.urlToState({ query }));
27
27
  onClearPopRef();
28
28
  return;
29
29
  }
30
30
  // Dispatch action sync URL >> state.
31
31
  if (hasParams(query, paramKeys)) {
32
32
  // When the URL has parameters.
33
- dispatch(actions.urlToState({ query }));
33
+ dispatch?.(actions.urlToState({ query }));
34
34
  return;
35
35
  }
36
36
  // Otherwise, dispatch action sync URL << state.
37
- dispatch(actions.stateToUrl({ method: ROUTER_METHOD.REPLACE }));
37
+ dispatch?.(actions.stateToUrl({ method: ROUTER_METHOD.REPLACE }));
38
38
  // eslint-disable-next-line react-hooks/exhaustive-deps -- deliberate omission of `state.query`, `state.paramKeys`, `actions` and `dispatch` from dependencies, hook is only expected to run when the Next.js router changes.
39
39
  }, [basePath, isReady, pathname, query]);
40
40
  };
@@ -21,6 +21,6 @@ export interface StateSyncManagerContext {
21
21
  }
22
22
  export interface UseStateSyncManagerProps<Action> {
23
23
  actions: StateSyncManagerActions<Action>;
24
- dispatch: Dispatch<Action>;
24
+ dispatch: Dispatch<Action> | null;
25
25
  state: StateSyncManagerContext;
26
26
  }
@@ -4,11 +4,11 @@ export interface ManifestDownload {
4
4
  isIdle: boolean;
5
5
  isLoading: boolean;
6
6
  manifestURL?: string;
7
+ requestManifest: () => void;
7
8
  }
8
9
  /**
9
10
  * Returns file manifest download url and file name.
10
11
  * @param filters - Filters.
11
- * @param disabled - Disabled.
12
12
  * @returns file manifest download url and file name.
13
13
  */
14
- export declare const useFileManifestDownload: (filters: Filters, disabled: boolean) => ManifestDownload;
14
+ export declare const useFileManifestDownload: (filters: Filters) => ManifestDownload;
@@ -1,4 +1,3 @@
1
- import { useEffect } from "react";
2
1
  import { MANIFEST_DOWNLOAD_FORMAT } from "../../apis/azul/common/entities";
3
2
  import { BULK_DOWNLOAD_EXECUTION_ENVIRONMENT } from "../../components/Export/common/entities";
4
3
  import { useCatalog } from "../useCatalog";
@@ -8,10 +7,9 @@ import { buildRequestManifest } from "../useRequestManifest/utils";
8
7
  /**
9
8
  * Returns file manifest download url and file name.
10
9
  * @param filters - Filters.
11
- * @param disabled - Disabled.
12
10
  * @returns file manifest download url and file name.
13
11
  */
14
- export const useFileManifestDownload = (filters, disabled) => {
12
+ export const useFileManifestDownload = (filters) => {
15
13
  // Retrieve the endpoint URL from configured data source.
16
14
  const config = useConfig();
17
15
  const endpointUrl = config.config.dataSource.url;
@@ -19,20 +17,15 @@ export const useFileManifestDownload = (filters, disabled) => {
19
17
  const catalog = useCatalog(); // catalog should be defined.
20
18
  // Build request manifest request URL.
21
19
  const { requestMethod, requestUrl } = buildRequestManifest(endpointUrl, catalog, filters, MANIFEST_DOWNLOAD_FORMAT.COMPACT);
22
- const { data, isIdle, isLoading, run } = useRequestFileLocation(requestUrl, requestMethod);
20
+ const { data, isIdle, isLoading, run: requestManifest, } = useRequestFileLocation(requestUrl, requestMethod);
23
21
  const manifestURL = getManifestDownloadURL(data);
24
22
  const fileName = getManifestDownloadFileName(data);
25
- // Requests file manifest.
26
- useEffect(() => {
27
- if (disabled)
28
- return;
29
- run();
30
- }, [disabled, requestUrl, run]);
31
23
  return {
32
24
  fileName,
33
25
  isIdle,
34
26
  isLoading,
35
27
  manifestURL,
28
+ requestManifest,
36
29
  };
37
30
  };
38
31
  /**
@@ -1,14 +1,15 @@
1
1
  import { Filters } from "../../common/entities";
2
2
  export interface ManifestSpreadsheet {
3
- exists?: boolean;
4
- fileFormat?: string;
5
3
  fileName?: string;
6
4
  fileUrl?: string;
5
+ isIdle?: boolean;
6
+ isLoading?: boolean;
7
+ requestManifest?: () => void;
8
+ spreadsheetUrl?: string;
7
9
  }
8
10
  /**
9
11
  * Returns file manifest spreadsheet.
10
12
  * @param filters - Filters.
11
- * @param disabled - Disabled.
12
13
  * @returns file manifest spreadsheet.
13
14
  */
14
- export declare const useFileManifestSpreadsheet: (filters: Filters, disabled: boolean) => ManifestSpreadsheet | undefined;
15
+ export declare const useFileManifestSpreadsheet: (filters: Filters) => Omit<ManifestSpreadsheet, "fileUrl">;
@@ -1,17 +1,17 @@
1
- import { useEffect, useMemo } from "react";
1
+ import { useCallback, useEffect, useMemo } from "react";
2
2
  import { APIEndpoints, } from "../../apis/azul/common/entities";
3
3
  import { fetchEntitiesFromURL } from "../../entity/common/service";
4
4
  import { fetchQueryParams } from "../../utils/fetchQueryParams";
5
5
  import { useAsync } from "../useAsync";
6
6
  import { useCatalog } from "../useCatalog";
7
7
  import { useFetchRequestURL } from "../useFetchRequestURL";
8
+ import { useRequestFileLocation } from "../useRequestFileLocation";
8
9
  /**
9
10
  * Returns file manifest spreadsheet.
10
11
  * @param filters - Filters.
11
- * @param disabled - Disabled.
12
12
  * @returns file manifest spreadsheet.
13
13
  */
14
- export const useFileManifestSpreadsheet = (filters, disabled) => {
14
+ export const useFileManifestSpreadsheet = (filters) => {
15
15
  // Determine catalog.
16
16
  const catalog = useCatalog(); // catalog should be defined.
17
17
  // Build request params.
@@ -19,16 +19,26 @@ export const useFileManifestSpreadsheet = (filters, disabled) => {
19
19
  // Build request URL.
20
20
  const requestURL = useFetchRequestURL(APIEndpoints.FILES, requestParams);
21
21
  // Fetch files to determine if file exists.
22
- const { data, run } = useAsync();
22
+ const { data: files, isIdle, isLoading: isFilesLoading, run: requestFiles, } = useAsync();
23
23
  // Grab manifest spreadsheet.
24
- const manifestSpreadsheet = useMemo(() => getManifestSpreadsheet(data?.hits), [data]);
24
+ const { fileName, fileUrl } = useMemo(() => getManifestSpreadsheet(files?.hits), [files]);
25
+ // Fetch file manifest.
26
+ const { data, isLoading, run } = useRequestFileLocation(fileUrl);
25
27
  // Fetch response from files endpoint.
28
+ const requestManifest = useCallback(() => {
29
+ requestFiles(fetchEntitiesFromURL(requestURL, undefined));
30
+ }, [requestFiles, requestURL]);
31
+ // Fetch file manifest.
26
32
  useEffect(() => {
27
- if (disabled)
28
- return;
29
- run(fetchEntitiesFromURL(requestURL, undefined));
30
- }, [disabled, requestURL, run]);
31
- return manifestSpreadsheet;
33
+ run();
34
+ }, [fileUrl, run]);
35
+ return {
36
+ fileName,
37
+ isIdle,
38
+ isLoading: isFilesLoading || isLoading,
39
+ requestManifest,
40
+ spreadsheetUrl: data?.location,
41
+ };
32
42
  };
33
43
  /**
34
44
  * Prepend "/fetch" to the path of the specified file URL, if not already included.
@@ -52,20 +62,14 @@ function buildFetchFileUrl(fileUrl) {
52
62
  * @returns manifest spreadsheet.
53
63
  */
54
64
  function getManifestSpreadsheet(files) {
55
- if (!files) {
56
- return;
57
- }
65
+ if (!files)
66
+ return { fileName: undefined, fileUrl: undefined };
58
67
  // Handle case where file does not exist.
59
- if (files.length === 0) {
60
- return {
61
- exists: false,
62
- };
63
- }
68
+ if (files.length === 0)
69
+ return { fileName: undefined, fileUrl: undefined };
64
70
  // Project manifest spreadsheet exists.
65
71
  const file = files[0];
66
72
  return {
67
- exists: true,
68
- fileFormat: file.files[0]?.format,
69
73
  fileName: file.files[0]?.name,
70
74
  fileUrl: buildFetchFileUrl(file.files[0]?.url),
71
75
  };
@@ -0,0 +1,2 @@
1
+ import { DataDictionaryContextProps } from "./types";
2
+ export declare const DataDictionaryContext: import("react").Context<DataDictionaryContextProps>;
@@ -0,0 +1,4 @@
1
+ import { createContext } from "react";
2
+ export const DataDictionaryContext = createContext({
3
+ dictionary: "",
4
+ });
@@ -0,0 +1,6 @@
1
+ import { DataDictionaryContextProps } from "./types";
2
+ /**
3
+ * Returns data dictionary context.
4
+ * @returns data dictionary context.
5
+ */
6
+ export declare const useDataDictionary: () => DataDictionaryContextProps;
@@ -0,0 +1,9 @@
1
+ import { useContext } from "react";
2
+ import { DataDictionaryContext } from "./context";
3
+ /**
4
+ * Returns data dictionary context.
5
+ * @returns data dictionary context.
6
+ */
7
+ export const useDataDictionary = () => {
8
+ return useContext(DataDictionaryContext);
9
+ };
@@ -0,0 +1,3 @@
1
+ export interface DataDictionaryContextProps {
2
+ dictionary: string;
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { DataDictionaryState } from "../../types";
2
+ import { ClearMetaPayload } from "./types";
3
+ /**
4
+ * Reducer function to handle the "clear meta" action.
5
+ * @param state - Data Dictionary State.
6
+ * @param payload - Payload.
7
+ * @returns data dictionary state.
8
+ */
9
+ export declare function clearMetaAction(state: DataDictionaryState, payload: ClearMetaPayload): DataDictionaryState;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Reducer function to handle the "clear meta" action.
3
+ * @param state - Data Dictionary State.
4
+ * @param payload - Payload.
5
+ * @returns data dictionary state.
6
+ */
7
+ export function clearMetaAction(state, payload) {
8
+ return {
9
+ ...state,
10
+ meta: payload,
11
+ };
12
+ }
@@ -0,0 +1,6 @@
1
+ import { ClearMetaAction } from "./types";
2
+ /**
3
+ * Action creator for clearing meta in the state.
4
+ * @returns Action with payload and action type.
5
+ */
6
+ export declare function clearMeta(): ClearMetaAction;
@@ -0,0 +1,11 @@
1
+ import { DataDictionaryActionKind } from "../types";
2
+ /**
3
+ * Action creator for clearing meta in the state.
4
+ * @returns Action with payload and action type.
5
+ */
6
+ export function clearMeta() {
7
+ return {
8
+ payload: null,
9
+ type: DataDictionaryActionKind.ClearMeta,
10
+ };
11
+ }
@@ -0,0 +1,6 @@
1
+ import { DataDictionaryActionKind } from "../types";
2
+ export type ClearMetaAction = {
3
+ payload: ClearMetaPayload;
4
+ type: DataDictionaryActionKind.ClearMeta;
5
+ };
6
+ export type ClearMetaPayload = null;
@@ -0,0 +1,9 @@
1
+ import { DataDictionaryState } from "../../types";
2
+ import { StateToUrlPayload } from "./types";
3
+ /**
4
+ * Reducer function to handle the "state >> URL sync" action.
5
+ * @param state - State.
6
+ * @param payload - Payload.
7
+ * @returns state.
8
+ */
9
+ export declare function stateToUrlAction(state: DataDictionaryState, payload: StateToUrlPayload): DataDictionaryState;
@@ -0,0 +1,14 @@
1
+ import { META_COMMAND } from "../../../../hooks/stateSyncManager/hooks/UseMetaCommands/types";
2
+ import { ROUTER_METHOD } from "./types";
3
+ /**
4
+ * Reducer function to handle the "state >> URL sync" action.
5
+ * @param state - State.
6
+ * @param payload - Payload.
7
+ * @returns state.
8
+ */
9
+ export function stateToUrlAction(state, payload) {
10
+ const command = payload.method === ROUTER_METHOD.PUSH
11
+ ? META_COMMAND.STATE_TO_URL_PUSH
12
+ : META_COMMAND.STATE_TO_URL_REPLACE;
13
+ return { ...state, meta: { command } };
14
+ }
@@ -0,0 +1,7 @@
1
+ import { StateToUrlAction, StateToUrlPayload } from "./types";
2
+ /**
3
+ * Action creator for state >> URL sync.
4
+ * @param payload - Payload.
5
+ * @returns Action with payload and action type.
6
+ */
7
+ export declare function stateToUrl(payload: StateToUrlPayload): StateToUrlAction;
@@ -0,0 +1,12 @@
1
+ import { DataDictionaryActionKind } from "../types";
2
+ /**
3
+ * Action creator for state >> URL sync.
4
+ * @param payload - Payload.
5
+ * @returns Action with payload and action type.
6
+ */
7
+ export function stateToUrl(payload) {
8
+ return {
9
+ payload,
10
+ type: DataDictionaryActionKind.StateToUrl,
11
+ };
12
+ }
@@ -0,0 +1,12 @@
1
+ import { DataDictionaryActionKind } from "../types";
2
+ export declare enum ROUTER_METHOD {
3
+ PUSH = "push",
4
+ REPLACE = "replace"
5
+ }
6
+ export type StateToUrlAction = {
7
+ payload: StateToUrlPayload;
8
+ type: DataDictionaryActionKind.StateToUrl;
9
+ };
10
+ export type StateToUrlPayload = {
11
+ method: ROUTER_METHOD;
12
+ };
@@ -0,0 +1,5 @@
1
+ export var ROUTER_METHOD;
2
+ (function (ROUTER_METHOD) {
3
+ ROUTER_METHOD["PUSH"] = "push";
4
+ ROUTER_METHOD["REPLACE"] = "replace";
5
+ })(ROUTER_METHOD || (ROUTER_METHOD = {}));
@@ -0,0 +1,13 @@
1
+ import { ClearMetaAction } from "./clearMeta/types";
2
+ import { StateToUrlAction } from "./stateToUrl/types";
3
+ import { UpdateColumnFiltersAction } from "./updateColumnFilters/types";
4
+ import { UpdateGlobalFilterAction } from "./updateGlobalFilter/types";
5
+ import { UrlToStateAction } from "./urlToState/types";
6
+ export type DataDictionaryAction = ClearMetaAction | StateToUrlAction | UpdateColumnFiltersAction | UpdateGlobalFilterAction | UrlToStateAction;
7
+ export declare enum DataDictionaryActionKind {
8
+ ClearMeta = "CLEAR_META",
9
+ StateToUrl = "STATE_TO_URL",
10
+ UpdateColumnFilters = "UPDATE_COLUMN_FILTERS",
11
+ UpdateGlobalFilter = "UPDATE_GLOBAL_FILTER",
12
+ UrlToState = "URL_TO_STATE"
13
+ }
@@ -0,0 +1,8 @@
1
+ export var DataDictionaryActionKind;
2
+ (function (DataDictionaryActionKind) {
3
+ DataDictionaryActionKind["ClearMeta"] = "CLEAR_META";
4
+ DataDictionaryActionKind["StateToUrl"] = "STATE_TO_URL";
5
+ DataDictionaryActionKind["UpdateColumnFilters"] = "UPDATE_COLUMN_FILTERS";
6
+ DataDictionaryActionKind["UpdateGlobalFilter"] = "UPDATE_GLOBAL_FILTER";
7
+ DataDictionaryActionKind["UrlToState"] = "URL_TO_STATE";
8
+ })(DataDictionaryActionKind || (DataDictionaryActionKind = {}));
@@ -0,0 +1,9 @@
1
+ import { DataDictionaryState } from "../../types";
2
+ import { UpdateColumnFiltersPayload } from "./types";
3
+ /**
4
+ * Reducer function to handle the "update column filters" action.
5
+ * @param state - Data dictionary state.
6
+ * @param payload - Payload.
7
+ * @returns data dictionary state.
8
+ */
9
+ export declare function updateColumnFiltersAction(state: DataDictionaryState, payload: UpdateColumnFiltersPayload): DataDictionaryState;
@@ -0,0 +1,18 @@
1
+ import { META_COMMAND } from "../../../../hooks/stateSyncManager/hooks/UseMetaCommands/types";
2
+ import { buildNextDictionaries } from "../../dictionaries/state";
3
+ import { buildNextColumnFilters } from "./utils";
4
+ /**
5
+ * Reducer function to handle the "update column filters" action.
6
+ * @param state - Data dictionary state.
7
+ * @param payload - Payload.
8
+ * @returns data dictionary state.
9
+ */
10
+ export function updateColumnFiltersAction(state, payload) {
11
+ return {
12
+ ...state,
13
+ dictionaries: buildNextDictionaries(state, payload.dictionary, {
14
+ columnFilters: buildNextColumnFilters(state, payload),
15
+ }),
16
+ meta: { command: META_COMMAND.STATE_TO_URL_PUSH },
17
+ };
18
+ }
@@ -0,0 +1,7 @@
1
+ import { UpdateColumnFiltersAction, UpdateColumnFiltersPayload } from "./types";
2
+ /**
3
+ * Action creator for updating column filters in the state.
4
+ * @param payload - Payload.
5
+ * @returns Action with payload and action type.
6
+ */
7
+ export declare function updateColumnFilters(payload: UpdateColumnFiltersPayload): UpdateColumnFiltersAction;
@@ -0,0 +1,12 @@
1
+ import { DataDictionaryActionKind } from "../types";
2
+ /**
3
+ * Action creator for updating column filters in the state.
4
+ * @param payload - Payload.
5
+ * @returns Action with payload and action type.
6
+ */
7
+ export function updateColumnFilters(payload) {
8
+ return {
9
+ payload,
10
+ type: DataDictionaryActionKind.UpdateColumnFilters,
11
+ };
12
+ }
@@ -0,0 +1,10 @@
1
+ import { ColumnFiltersState, Updater } from "@tanstack/react-table";
2
+ import { DataDictionaryActionKind } from "../types";
3
+ export type UpdateColumnFiltersAction = {
4
+ payload: UpdateColumnFiltersPayload;
5
+ type: DataDictionaryActionKind.UpdateColumnFilters;
6
+ };
7
+ export interface UpdateColumnFiltersPayload {
8
+ dictionary: string;
9
+ updaterOrValue: Updater<ColumnFiltersState>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { ColumnFiltersState } from "@tanstack/react-table";
2
+ import { DataDictionaryState } from "../../types";
3
+ import { UpdateColumnFiltersPayload } from "./types";
4
+ /**
5
+ * Builds the next column filters state for the current dictionary.
6
+ * Uses TanStack updater to update the column filters state.
7
+ * @param state - State.
8
+ * @param payload - Payload.
9
+ * @returns column filters state.
10
+ */
11
+ export declare function buildNextColumnFilters(state: DataDictionaryState, payload: UpdateColumnFiltersPayload): ColumnFiltersState;
@@ -0,0 +1,27 @@
1
+ import { functionalUpdate } from "@tanstack/react-table";
2
+ /**
3
+ * Builds the next column filters state for the current dictionary.
4
+ * Uses TanStack updater to update the column filters state.
5
+ * @param state - State.
6
+ * @param payload - Payload.
7
+ * @returns column filters state.
8
+ */
9
+ export function buildNextColumnFilters(state, payload) {
10
+ return functionalUpdate(payload.updaterOrValue, getOldColumnFilters(state, payload));
11
+ }
12
+ /**
13
+ * Retrieves the current "old" column filters state.
14
+ * @param state - State.
15
+ * @param payload - Payload.
16
+ * @returns old column filters state.
17
+ */
18
+ function getOldColumnFilters(state, payload) {
19
+ // Grab the dictionary.
20
+ const dictionary = state.dictionaries[payload.dictionary];
21
+ // If the dictionary is not found, return an empty array.
22
+ if (!dictionary)
23
+ return [];
24
+ // Grab column filters from dictionary state.
25
+ const { columnFilters = [] } = dictionary.state;
26
+ return columnFilters;
27
+ }
@@ -0,0 +1,9 @@
1
+ import { DataDictionaryState } from "../../types";
2
+ import { UpdateGlobalFilterPayload } from "./types";
3
+ /**
4
+ * Reducer function to handle the "update global filter" action.
5
+ * @param state - State.
6
+ * @param payload - Payload.
7
+ * @returns state.
8
+ */
9
+ export declare function updateGlobalFilterAction(state: DataDictionaryState, payload: UpdateGlobalFilterPayload): DataDictionaryState;
@@ -0,0 +1,19 @@
1
+ import { buildNextDictionaries } from "../../dictionaries/state";
2
+ import { buildNextGlobalFilter, buildNextMeta } from "./utils";
3
+ /**
4
+ * Reducer function to handle the "update global filter" action.
5
+ * @param state - State.
6
+ * @param payload - Payload.
7
+ * @returns state.
8
+ */
9
+ export function updateGlobalFilterAction(state, payload) {
10
+ const globalFilter = buildNextGlobalFilter(payload);
11
+ const meta = buildNextMeta(state, payload, globalFilter);
12
+ return {
13
+ ...state,
14
+ dictionaries: buildNextDictionaries(state, payload.dictionary, {
15
+ globalFilter,
16
+ }),
17
+ meta,
18
+ };
19
+ }
@@ -0,0 +1,7 @@
1
+ import { UpdateGlobalFilterAction, UpdateGlobalFilterPayload } from "./types";
2
+ /**
3
+ * Action creator for updating global filter in the state.
4
+ * @param payload - Payload.
5
+ * @returns Action with payload and action type.
6
+ */
7
+ export declare function updateGlobalFilter(payload: UpdateGlobalFilterPayload): UpdateGlobalFilterAction;
@@ -0,0 +1,12 @@
1
+ import { DataDictionaryActionKind } from "../types";
2
+ /**
3
+ * Action creator for updating global filter in the state.
4
+ * @param payload - Payload.
5
+ * @returns Action with payload and action type.
6
+ */
7
+ export function updateGlobalFilter(payload) {
8
+ return {
9
+ payload,
10
+ type: DataDictionaryActionKind.UpdateGlobalFilter,
11
+ };
12
+ }
@@ -0,0 +1,10 @@
1
+ import { Updater } from "@tanstack/react-table";
2
+ import { DataDictionaryActionKind } from "../types";
3
+ export type UpdateGlobalFilterAction = {
4
+ payload: UpdateGlobalFilterPayload;
5
+ type: DataDictionaryActionKind.UpdateGlobalFilter;
6
+ };
7
+ export interface UpdateGlobalFilterPayload {
8
+ dictionary: string;
9
+ updaterOrValue: Updater<string | undefined>;
10
+ }
@@ -0,0 +1,17 @@
1
+ import { DataDictionaryState } from "../../types";
2
+ import { UpdateGlobalFilterPayload } from "./types";
3
+ /**
4
+ * Builds the next global filter state for the current dictionary.
5
+ * Uses TanStack updater to update the global filter state.
6
+ * @param payload - Payload.
7
+ * @returns global filter state.
8
+ */
9
+ export declare function buildNextGlobalFilter(payload: UpdateGlobalFilterPayload): string | undefined;
10
+ /**
11
+ * Builds the next meta state for the current dictionary.
12
+ * @param state - State.
13
+ * @param payload - Payload.
14
+ * @param nextGlobalFilter - Next global filter.
15
+ * @returns meta state.
16
+ */
17
+ export declare function buildNextMeta(state: DataDictionaryState, payload: UpdateGlobalFilterPayload, nextGlobalFilter: string | undefined): DataDictionaryState["meta"];
@@ -0,0 +1,36 @@
1
+ import { functionalUpdate } from "@tanstack/react-table";
2
+ import { META_COMMAND } from "../../../../hooks/stateSyncManager/hooks/UseMetaCommands/types";
3
+ /**
4
+ * Builds the next global filter state for the current dictionary.
5
+ * Uses TanStack updater to update the global filter state.
6
+ * @param payload - Payload.
7
+ * @returns global filter state.
8
+ */
9
+ export function buildNextGlobalFilter(payload) {
10
+ return functionalUpdate(payload.updaterOrValue, undefined) || undefined;
11
+ }
12
+ /**
13
+ * Builds the next meta state for the current dictionary.
14
+ * @param state - State.
15
+ * @param payload - Payload.
16
+ * @param nextGlobalFilter - Next global filter.
17
+ * @returns meta state.
18
+ */
19
+ export function buildNextMeta(state, payload, nextGlobalFilter) {
20
+ const currentGlobalFilter = getCurrentGlobalFilter(state, payload);
21
+ // Use PUSH method with adding or removing the global filter.
22
+ if (currentGlobalFilter === undefined || nextGlobalFilter === undefined) {
23
+ return { command: META_COMMAND.STATE_TO_URL_PUSH };
24
+ }
25
+ // Use REPLACE method with edits to the global filter.
26
+ return { command: META_COMMAND.STATE_TO_URL_REPLACE };
27
+ }
28
+ /**
29
+ * Returns the current global filter for the current dictionary.
30
+ * @param state - State.
31
+ * @param payload - Payload.
32
+ * @returns global filter.
33
+ */
34
+ function getCurrentGlobalFilter(state, payload) {
35
+ return state.dictionaries[payload.dictionary].state.globalFilter;
36
+ }