@leav/ui 0.3.6-8cec779 → 0.3.6-8ee78f1

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 (414) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +9 -1
  3. package/dist/__mocks__/common/attribute.js.map +1 -1
  4. package/dist/__mocks__/common/form.d.ts +2 -0
  5. package/dist/__mocks__/common/form.js +33 -2
  6. package/dist/__mocks__/common/form.js.map +1 -1
  7. package/dist/__mocks__/common/value.js +3 -1
  8. package/dist/__mocks__/common/value.js.map +1 -1
  9. package/dist/__mocks__/common/view.js +7 -5
  10. package/dist/__mocks__/common/view.js.map +1 -1
  11. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
  12. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
  13. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
  14. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
  15. package/dist/_gqlTypes/index.d.ts +539 -71
  16. package/dist/_gqlTypes/index.js +319 -53
  17. package/dist/_gqlTypes/index.js.map +1 -1
  18. package/dist/_queries/attributes/getAttributesByLib.js +7 -5
  19. package/dist/_queries/attributes/getAttributesByLib.js.map +1 -1
  20. package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
  21. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
  22. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
  23. package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
  24. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  25. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  26. package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
  27. package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
  28. package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
  29. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  30. package/dist/_queries/views/saveViewMutation.js +1 -1
  31. package/dist/_queries/views/viewDetailsFragment.js +14 -11
  32. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  33. package/dist/_utils/attributeType.d.ts +3 -0
  34. package/dist/_utils/attributeType.js +7 -0
  35. package/dist/_utils/attributeType.js.map +1 -0
  36. package/dist/_utils/index.js +5 -2
  37. package/dist/_utils/index.js.map +1 -1
  38. package/dist/_utils/interleaveElement.d.ts +1 -0
  39. package/dist/_utils/interleaveElement.js +5 -0
  40. package/dist/_utils/interleaveElement.js.map +1 -0
  41. package/dist/antdTheme/index.d.ts +0 -3
  42. package/dist/antdTheme/index.js +3 -42
  43. package/dist/antdTheme/index.js.map +1 -1
  44. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  45. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  46. package/dist/components/EditApplication/EditApplication.js +2 -2
  47. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  48. package/dist/components/EditApplication/_types.d.ts +2 -2
  49. package/dist/components/Explorer/DataView.d.ts +13 -0
  50. package/dist/components/Explorer/DataView.js +94 -20
  51. package/dist/components/Explorer/DataView.js.map +1 -1
  52. package/dist/components/Explorer/Explorer.d.ts +9 -6
  53. package/dist/components/Explorer/Explorer.js +90 -24
  54. package/dist/components/Explorer/Explorer.js.map +1 -1
  55. package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
  56. package/dist/components/Explorer/ExplorerTitle.js +28 -11
  57. package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
  58. package/dist/components/Explorer/ExplorerToolbar.d.ts +5 -0
  59. package/dist/components/Explorer/ExplorerToolbar.js +45 -0
  60. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
  61. package/dist/components/Explorer/TableCell.d.ts +1 -1
  62. package/dist/components/Explorer/TableCell.js +71 -5
  63. package/dist/components/Explorer/TableCell.js.map +1 -1
  64. package/dist/components/Explorer/TableTagGroup.d.ts +1 -0
  65. package/dist/components/Explorer/TableTagGroup.js +9 -1
  66. package/dist/components/Explorer/TableTagGroup.js.map +1 -1
  67. package/dist/components/Explorer/_constants.d.ts +5 -0
  68. package/dist/components/Explorer/_constants.js +18 -0
  69. package/dist/components/Explorer/_constants.js.map +1 -0
  70. package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +4 -0
  71. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -0
  72. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
  73. package/dist/components/Explorer/_queries/useExplorerData.d.ts +29 -5
  74. package/dist/components/Explorer/_queries/useExplorerData.js +80 -7
  75. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  76. package/dist/components/Explorer/_types.d.ts +77 -1
  77. package/dist/components/Explorer/_types.js +7 -1
  78. package/dist/components/Explorer/_types.js.map +1 -1
  79. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  80. package/dist/components/Explorer/conditionsHelper.js +16 -0
  81. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  82. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +1 -1
  83. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +11 -4
  84. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -1
  85. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +6 -0
  86. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  87. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  88. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +13 -0
  89. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +67 -0
  90. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  91. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +19 -52
  92. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
  93. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  94. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +88 -0
  95. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  96. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  97. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  98. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  99. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  100. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
  101. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  102. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  103. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  104. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  105. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  106. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  107. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  108. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  109. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  110. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  111. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  112. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  113. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  114. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  115. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  116. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  117. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  118. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +35 -0
  119. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  120. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.d.ts +7 -0
  121. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +40 -0
  122. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
  123. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  124. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  125. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  126. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.d.ts +3 -0
  127. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js +79 -0
  128. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
  129. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  130. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
  131. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  132. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  133. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
  134. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  135. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +10 -0
  136. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js +2 -0
  137. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +1 -0
  138. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +12 -0
  139. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +108 -0
  140. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  141. package/dist/components/Explorer/manage-view-settings/index.d.ts +4 -4
  142. package/dist/components/Explorer/manage-view-settings/index.js +3 -3
  143. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -1
  144. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +1 -0
  145. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
  146. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +1 -1
  147. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -1
  148. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
  149. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
  150. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  151. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +2 -1
  152. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +55 -31
  153. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
  154. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  155. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +113 -0
  156. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  157. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  158. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  159. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  160. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +2 -0
  161. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +21 -1
  162. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
  163. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +132 -16
  164. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +199 -24
  165. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
  166. package/dist/components/Explorer/useColumnWidth.d.ts +6 -0
  167. package/dist/components/Explorer/useColumnWidth.js +48 -0
  168. package/dist/components/Explorer/useColumnWidth.js.map +1 -0
  169. package/dist/components/Explorer/useCreateAction.d.ts +4 -2
  170. package/dist/components/Explorer/useCreateAction.js +35 -2
  171. package/dist/components/Explorer/useCreateAction.js.map +1 -1
  172. package/dist/components/Explorer/useDeactivateMassAction.d.ts +27 -0
  173. package/dist/components/Explorer/useDeactivateMassAction.js +71 -0
  174. package/dist/components/Explorer/useDeactivateMassAction.js.map +1 -0
  175. package/dist/components/Explorer/useEditAction.js +8 -6
  176. package/dist/components/Explorer/useEditAction.js.map +1 -1
  177. package/dist/components/Explorer/useMassActions.d.ts +27 -0
  178. package/dist/components/Explorer/useMassActions.js +109 -0
  179. package/dist/components/Explorer/useMassActions.js.map +1 -0
  180. package/dist/components/Explorer/usePagination.d.ts +7 -0
  181. package/dist/components/Explorer/usePagination.js +25 -0
  182. package/dist/components/Explorer/usePagination.js.map +1 -0
  183. package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
  184. package/dist/components/Explorer/usePrimaryActions.js +16 -17
  185. package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
  186. package/dist/components/Explorer/useRemoveAction.d.ts +23 -0
  187. package/dist/components/Explorer/useRemoveAction.js +109 -0
  188. package/dist/components/Explorer/useRemoveAction.js.map +1 -0
  189. package/dist/components/Explorer/useSearchInput.d.ts +16 -0
  190. package/dist/components/Explorer/useSearchInput.js +39 -0
  191. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  192. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  193. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  194. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  195. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  196. package/dist/components/Explorer/useViewSettingsReducer.js +201 -0
  197. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  198. package/dist/components/ExportModal/ExportModal.js +2 -2
  199. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  200. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  201. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  202. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  203. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  204. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  205. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  206. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
  207. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
  208. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  209. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  210. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
  211. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  212. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  213. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  214. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  215. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  216. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  217. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  218. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  219. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  220. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  221. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  222. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  223. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  224. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  225. package/dist/components/RecordEdition/EditRecord/EditRecord.js +61 -73
  226. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  227. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +17 -4
  228. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  229. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -17
  230. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  231. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  232. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +15 -8
  233. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  234. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  235. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  236. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  237. package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js.map +1 -1
  238. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  239. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  240. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  241. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  242. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  243. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  244. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  245. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  246. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  247. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  248. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  249. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  250. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +16 -0
  251. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  252. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +4 -2
  253. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +149 -295
  254. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  255. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +9 -9
  256. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  257. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +71 -22
  258. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  259. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +32 -18
  260. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  261. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +16 -8
  262. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  263. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +21 -14
  264. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  265. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +23 -27
  266. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +50 -42
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +23 -23
  270. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  271. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +13 -9
  272. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +15 -403
  273. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  274. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.d.ts → DSListSelect.d.ts} +1 -1
  275. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +35 -13
  276. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  277. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +0 -2
  278. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +10 -4
  279. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  280. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +56 -0
  281. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  282. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  283. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
  284. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  285. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  286. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  287. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
  288. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  289. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
  290. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  291. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  292. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.d.ts +7 -0
  293. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js +9 -0
  294. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js.map +1 -0
  295. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.d.ts +2 -0
  296. package/dist/components/RecordEdition/{EditRecordContent/reducers/standardFieldReducer → EditRecordSidebar/AttributeSummary}/index.js +2 -2
  297. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.js.map +1 -0
  298. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.d.ts +2 -0
  299. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +25 -0
  300. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js.map +1 -0
  301. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.d.ts +3 -0
  302. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +53 -0
  303. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -0
  304. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.d.ts +2 -0
  305. package/dist/components/RecordEdition/{EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → EditRecordSidebar/Breacrumb/index.js} +3 -6
  306. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.js.map +1 -0
  307. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  308. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +39 -5
  309. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  310. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  311. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  312. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  313. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  314. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  315. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  316. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  317. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  318. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  319. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
  320. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
  321. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  322. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +1 -13
  323. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
  324. package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.d.ts +1 -1
  325. package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.js +2 -2
  326. package/dist/components/RecordEdition/EditRecordSkeleton/EditRecordSkeleton.js.map +1 -0
  327. package/dist/components/RecordEdition/EditRecordSkeleton/index.d.ts +2 -0
  328. package/dist/components/RecordEdition/EditRecordSkeleton/index.js +6 -0
  329. package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
  330. package/dist/components/RecordEdition/index.d.ts +1 -0
  331. package/dist/components/RecordEdition/index.js +1 -0
  332. package/dist/components/RecordEdition/index.js.map +1 -1
  333. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  334. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  335. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  336. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  337. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
  338. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  339. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  340. package/dist/components/SelectTreeNode/index.js +1 -1
  341. package/dist/components/SelectTreeNode/index.js.map +1 -1
  342. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  343. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  344. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  345. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  346. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  347. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  348. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  349. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  350. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  351. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  352. package/dist/constants.d.ts +3 -0
  353. package/dist/constants.js +3 -0
  354. package/dist/constants.js.map +1 -1
  355. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  356. package/dist/hooks/useDebouncedValue/index.js +5 -0
  357. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  358. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  359. package/dist/hooks/useExecuteSaveViewMutation/index.js +5 -0
  360. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  361. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  362. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
  363. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  364. package/dist/locales/en/shared.json +72 -10
  365. package/dist/locales/fr/shared.json +74 -12
  366. package/dist/types/views.d.ts +4 -4
  367. package/package.json +5 -2
  368. package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.d.ts +0 -10
  369. package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.js +0 -24
  370. package/dist/components/Explorer/manage-view-settings/_shared/useGetLibraryColumns.js.map +0 -1
  371. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.d.ts +0 -1
  372. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.js +0 -19
  373. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenSettings.js.map +0 -1
  374. package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
  375. package/dist/components/Explorer/useDeactivateAction.js +0 -51
  376. package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
  377. package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.js.map +0 -1
  378. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  379. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  380. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  381. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  382. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  383. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  384. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  385. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  386. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
  387. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  388. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
  389. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
  390. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
  391. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  392. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  393. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  394. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  395. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  396. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  397. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  398. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  399. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  400. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  401. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  402. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  403. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  404. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  405. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  406. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  407. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  408. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  409. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  410. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  411. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  412. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  413. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  414. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
@@ -1,53 +1,77 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import styled from 'styled-components';
6
- import { useState } from 'react';
7
- import { KitTypography } from 'aristid-ds';
8
- import { FaFilter, FaList, FaSortAlphaDown } from 'react-icons/fa';
6
+ import { KitButton, KitTypography } from 'aristid-ds';
7
+ import { FaFilter, FaList, FaSave, FaSortAlphaDown, FaUndo } from 'react-icons/fa';
9
8
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
10
- import { useEditSettings } from '../open-view-settings/useEditSettings';
11
9
  import { ConfigureDisplay } from '../configure-display/ConfigureDisplay';
10
+ import { SortItems } from '../sort-items/SortItems';
12
11
  import { SettingItem } from './SettingItem';
12
+ import { FilterItems } from '../filter-items/FilterItems';
13
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
14
+ import useExecuteSaveViewMutation from '../../../../hooks/useExecuteSaveViewMutation';
15
+ import { useLang } from '../../../../hooks';
16
+ import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
17
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
18
+ import { useOpenViewSettings } from '../open-view-settings/useOpenViewSettings';
19
+ import { isExplorerFilterThrough } from '../../_types';
13
20
  const ContentWrapperStyledDiv = styled.div `
14
21
  display: flex;
15
22
  flex-direction: column;
16
23
  gap: calc(var(--general-spacing-s) * 1px);
24
+ justify-content: space-between;
25
+ height: 100%;
26
+ `;
27
+ const FooterStyledDiv = styled.footer `
28
+ display: flex;
29
+ justify-content: center;
30
+ gap: calc(var(--general-spacing-xs) * 1px);
31
+ padding: calc(var(--general-spacing-xxs) * 1px) 0;
17
32
  `;
18
33
  const ConfigurationStyledMenu = styled.menu `
19
34
  padding: 0;
20
35
  `;
21
- export const SettingsPanel = ({ library }) => {
36
+ export const SettingsPanel = ({ library, page = 'router-menu' }) => {
22
37
  const { t } = useSharedTranslation();
23
- const { setActiveSettings, activeSettings } = useEditSettings();
24
- const [currentPage, setCurrentPage] = useState('router-menu');
25
- const _goToAdvancedSettingsPage = (page) => {
26
- if (!activeSettings) {
27
- throw Error('Should not be able to change side pane page if there is no side panel!');
28
- }
29
- const _changePanelPage = ({ pageName, title, onClickLeftButton }) => {
30
- setCurrentPage(pageName);
31
- setActiveSettings({
32
- ...activeSettings,
33
- title,
34
- onClickLeftButton
35
- });
36
- };
37
- _changePanelPage({
38
- pageName: page,
39
- title: t(`explorer.${page}`),
40
- onClickLeftButton: () => {
41
- const rootPanel = { pageName: 'router-menu', title: t('explorer.settings') };
42
- _changePanelPage(rootPanel);
38
+ const { defaultLang } = useLang();
39
+ const { openSettingsPanel } = useOpenViewSettings(library);
40
+ const { view, dispatch } = useViewSettingsContext();
41
+ const { saveView } = useExecuteSaveViewMutation();
42
+ const _handleSaveView = () => {
43
+ saveView({
44
+ view: {
45
+ id: view.viewId,
46
+ library,
47
+ shared: false,
48
+ display: {
49
+ type: mapViewTypeFromExplorerToLegacy[view.viewType]
50
+ },
51
+ filters: view.filters.map(filter => isExplorerFilterThrough(filter)
52
+ ? {
53
+ field: `${filter.field}.${filter.subField}`,
54
+ value: filter.value,
55
+ condition: filter.subCondition
56
+ }
57
+ : {
58
+ field: filter.field,
59
+ value: filter.value,
60
+ condition: filter.condition
61
+ }),
62
+ sort: view.sort.map(({ field: attributeId, order }) => ({ field: attributeId, order })),
63
+ attributes: view.attributesIds,
64
+ label: {
65
+ //TODO: add a better label when view management is more advanced
66
+ [defaultLang]: 'user view'
67
+ }
43
68
  }
44
69
  });
45
70
  };
71
+ const _handleReinitView = () => {
72
+ dispatch({ type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS });
73
+ };
46
74
  // TODO: look for MemoryRouter
47
- return (_jsxs(ContentWrapperStyledDiv, { children: [currentPage === 'router-menu' && (_jsxs("nav", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.router-menu') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.configure-display'), onClick: () => _goToAdvancedSettingsPage('configure-display') }), _jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), onClick: () => {
48
- /* TODO: not implemented yet */
49
- } }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort'), onClick: () => {
50
- /* TODO: not implemented yet */
51
- } })] })] })), currentPage === 'configure-display' && _jsx(ConfigureDisplay, { libraryId: library })] }));
75
+ return (_jsxs(ContentWrapperStyledDiv, { children: [page === 'router-menu' && (_jsxs(_Fragment, { children: [_jsxs("nav", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.router-menu') }), _jsxs(ConfigurationStyledMenu, { children: [_jsx(SettingItem, { icon: _jsx(FaList, {}), title: t('explorer.configure-display'), onClick: () => openSettingsPanel('configure-display') }), view.entrypoint.type === 'library' && (_jsxs(_Fragment, { children: [_jsx(SettingItem, { icon: _jsx(FaFilter, {}), title: t('explorer.filters'), value: String(t('explorer.active-items-number', { count: view.filters.length })), onClick: () => openSettingsPanel('filter-items') }), _jsx(SettingItem, { icon: _jsx(FaSortAlphaDown, {}), title: t('explorer.sort-items'), onClick: () => openSettingsPanel('sort-items') })] }))] })] }), _jsxs(FooterStyledDiv, { children: [_jsx(KitButton, { type: "secondary", danger: true, icon: _jsx(FaUndo, {}), onClick: _handleReinitView, children: t('explorer.reinit-view') }), _jsx(KitButton, { type: "primary", icon: _jsx(FaSave, {}), onClick: _handleSaveView, children: t('explorer.save-view') })] })] })), page === 'configure-display' && _jsx(ConfigureDisplay, { libraryId: library }), page === 'sort-items' && _jsx(SortItems, { libraryId: library }), page === 'filter-items' && _jsx(FilterItems, { libraryId: library })] }));
52
76
  };
53
77
  //# sourceMappingURL=SettingsPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsPanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/router-menu/SettingsPanel.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIzC,CAAC;AAEF,MAAM,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAA;;CAE1C,CAAC;AAMF,MAAM,CAAC,MAAM,aAAa,GAA2C,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;IAC/E,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,iBAAiB,EAAE,cAAc,EAAC,GAAG,eAAe,EAAE,CAAC;IAE9D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAqB,aAAa,CAAC,CAAC;IAElF,MAAM,yBAAyB,GAAG,CAAC,IAAwB,EAAE,EAAE;QAC3D,IAAI,CAAC,cAAc,EAAE,CAAC;YAClB,MAAM,KAAK,CAAC,wEAAwE,CAAC,CAAC;QAC1F,CAAC;QAED,MAA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,IACxB,CACT,EACA,WAAW,KAAK,mBAAmB,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,OAAO,GAAI,IAC1D,CAC7B,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"SettingsPanel.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/router-menu/SettingsPanel.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACpD,OAAO,EAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,+BAA+B,EAAC,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AAEnF,OAAO,EAAC,mBAAmB,EAAC,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAErD,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;CAMzC,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;CAKpC,CAAC;AAEF,MA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,YAAY,CAAC,GAChD,IACH,CACN,IACqB,IACxB,EACN,MAAC,eAAe,eACZ,KAAC,SAAS,IAAC,IAAI,EAAC,WAAW,EAAC,MAAM,QAAC,IAAI,EAAE,KAAC,MAAM,KAAG,EAAE,OAAO,EAAE,iBAAiB,YAC1E,CAAC,CAAC,sBAAsB,CAAC,GAClB,EACZ,KAAC,SAAS,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,KAAC,MAAM,KAAG,EAAE,OAAO,EAAE,eAAe,YAC/D,CAAC,CAAC,oBAAoB,CAAC,GAChB,IACE,IACnB,CACN,EACA,IAAI,KAAK,mBAAmB,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAE,OAAO,GAAI,EACxE,IAAI,KAAK,YAAY,IAAI,KAAC,SAAS,IAAC,SAAS,EAAE,OAAO,GAAI,EAC1D,IAAI,KAAK,cAAc,IAAI,KAAC,WAAW,IAAC,SAAS,EAAE,OAAO,GAAI,IACzC,CAC7B,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const SortItems: FunctionComponent<{
3
+ libraryId: string;
4
+ }>;
@@ -0,0 +1,113 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
3
+ import { KitInput, KitTypography } from 'aristid-ds';
4
+ import styled from 'styled-components';
5
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
+ import { SortOrder } from '../../../../_gqlTypes';
7
+ import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
8
+ import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
9
+ import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
10
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
11
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
12
+ import { SortListItem } from './SortListItem';
13
+ const StyledListContainer = styled.div `
14
+ display: flex;
15
+ flex-direction: column;
16
+ `;
17
+ const StyledList = styled.ul `
18
+ padding: calc(var(--general-spacing-s) * 1px) 0;
19
+ margin: 0;
20
+ list-style: none;
21
+ color: var(--general-utilities-text-primary);
22
+ `;
23
+ const StyledEyeSlash = styled(FaEyeSlash) `
24
+ color: var(--general-utilities-neutral-dark);
25
+ `;
26
+ const StyledFaEye = styled(FaEye) `
27
+ color: var(--general-utilities-neutral-deepDark);
28
+ `;
29
+ export const SortItems = ({ libraryId }) => {
30
+ const { t } = useSharedTranslation();
31
+ const { view, dispatch } = useViewSettingsContext();
32
+ const { onSearchChanged, searchFilteredColumnsIds, attributeDetailsById } = useAttributeDetailsData(libraryId);
33
+ const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
34
+ coordinateGetter: sortableKeyboardCoordinates
35
+ }));
36
+ const _toggleColumnVisibility = (field) => () => {
37
+ const isAttributeAlreadySorting = view.sort.some(sortItem => sortItem.field === field);
38
+ if (isAttributeAlreadySorting) {
39
+ dispatch({
40
+ type: ViewSettingsActionTypes.REMOVE_SORT,
41
+ payload: {
42
+ field
43
+ }
44
+ });
45
+ }
46
+ else {
47
+ dispatch({
48
+ type: ViewSettingsActionTypes.ADD_SORT,
49
+ payload: {
50
+ order: SortOrder.asc,
51
+ field
52
+ }
53
+ });
54
+ }
55
+ };
56
+ const _changeOrderActiveFilterTo = (field) => (order) => {
57
+ dispatch({
58
+ type: ViewSettingsActionTypes.CHANGE_SORT_ORDER,
59
+ payload: {
60
+ field,
61
+ order
62
+ }
63
+ });
64
+ };
65
+ const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
66
+ const indexFrom = activeFilters.findIndex(({ field }) => field === String(draggedElement.id));
67
+ const indexTo = activeFilters.findIndex(({ field }) => field === String(dropTarget?.id));
68
+ if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
69
+ return;
70
+ }
71
+ dispatch({ type: ViewSettingsActionTypes.MOVE_SORT, payload: { indexFrom, indexTo } });
72
+ };
73
+ const activeFilters = view.sort.filter(({ field }) => searchFilteredColumnsIds.includes(field));
74
+ const inactiveFilters = searchFilteredColumnsIds.filter(field => view.sort.every(sortItem => sortItem.field !== field));
75
+ return (_jsxs(StyledListContainer, { children: [activeFilters.length > 0 && (_jsx(StyledList, { "aria-label": t('explorer.sort-list.active'), children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsx(SortableContext, { items: activeFilters.map(({ field }) => ({ id: field })), strategy: verticalListSortingStrategy, children: activeFilters.map(({ field, order }) => (_jsx(SortListItem, { attributeId: field, isDraggable: true, filterChipProps: {
76
+ label: attributeDetailsById[field].label,
77
+ values: [
78
+ order === SortOrder.asc
79
+ ? t('explorer.sort-ascending')
80
+ : t('explorer.sort-descending')
81
+ ],
82
+ expandable: true,
83
+ dropDownProps: {
84
+ menu: {
85
+ selectable: true,
86
+ selectedKeys: [order],
87
+ items: [
88
+ {
89
+ key: SortOrder.asc,
90
+ label: t('explorer.sort-ascending')
91
+ },
92
+ {
93
+ key: SortOrder.desc,
94
+ label: t('explorer.sort-descending')
95
+ }
96
+ ],
97
+ onSelect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(field)(newOrder),
98
+ onDeselect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(field)(newOrder)
99
+ }
100
+ }
101
+ }, visibilityButtonProps: {
102
+ icon: _jsx(StyledFaEye, {}),
103
+ title: String(t('explorer.hide')),
104
+ onClick: _toggleColumnVisibility(field)
105
+ } }, field))) }) }) })), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.available-attributes') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FaSearch, {}) }), _jsx(StyledList, { "aria-label": t('explorer.sort-list.inactive'), children: inactiveFilters.map(field => (_jsx(SortListItem, { attributeId: field, filterChipProps: {
106
+ label: attributeDetailsById[field].label
107
+ }, visibilityButtonProps: {
108
+ icon: _jsx(StyledEyeSlash, {}),
109
+ title: String(t('explorer.show')),
110
+ onClick: _toggleColumnVisibility(field)
111
+ } }, field))) })] }));
112
+ };
113
+ //# sourceMappingURL=SortItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortItems.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EACH,aAAa,EACb,UAAU,EAEV,cAAc,EACd,aAAa,EACb,SAAS,EACT,UAAU,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAE,2BAA2B,EAAE,2BAA2B,EAAC,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAC,uBAAuB,EAAC,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGrC,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAExC,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEhC,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AC,CAAC,eAAe,CAAC,CAAC;gCACjC,OAAO,EAAE,uBAAuB,CAAC,KAAK,CAAC;6BAC1C,IApCI,KAAK,CAqCZ,CACL,CAAC,GACY,GACT,GACJ,CAChB,EACD,KAAC,aAAa,CAAC,KAAK,IAAC,KAAK,EAAC,IAAI,YAAE,CAAC,CAAC,+BAA+B,CAAC,GAAuB,EAC1F,KAAC,QAAQ,IACL,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EACvC,QAAQ,EAAE,eAAe,EACzB,UAAU,QACV,MAAM,EAAE,KAAC,QAAQ,KAAG,GACtB,EACF,KAAC,UAAU,kBAAa,CAAC,CAAC,6BAA6B,CAAC,YACnD,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC1B,KAAC,YAAY,IAET,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE;wBACb,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,KAAK;qBAC3C,EACD,qBAAqB,EAAE;wBACnB,IAAI,EAAE,KAAC,cAAc,KAAG;wBACxB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;wBACjC,OAAO,EAAE,uBAAuB,CAAC,KAAK,CAAC;qBAC1C,IATI,KAAK,CAUZ,CACL,CAAC,GACO,IACK,CACzB,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ComponentProps, FunctionComponent } from 'react';
2
+ import { KitButton, KitFilter } from 'aristid-ds';
3
+ interface IActiveFilterListItemProps {
4
+ attributeId: string;
5
+ isDraggable?: true;
6
+ filterChipProps: Pick<ComponentProps<typeof KitFilter>, 'label' | 'values' | 'expandable' | 'dropDownProps'>;
7
+ visibilityButtonProps: Pick<ComponentProps<typeof KitButton>, 'onClick' | 'icon' | 'title'>;
8
+ }
9
+ export declare const SortListItem: FunctionComponent<IActiveFilterListItemProps>;
10
+ export {};
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ import { FaGripLines } from 'react-icons/fa';
4
+ import { KitButton, KitFilter } from 'aristid-ds';
5
+ import { useSortable } from '@dnd-kit/sortable';
6
+ import { CSS } from '@dnd-kit/utilities';
7
+ const StyledSortListItem = styled.li `
8
+ display: flex;
9
+ justify-content: space-between;
10
+ align-items: center;
11
+
12
+ div {
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: center;
16
+ gap: calc(var(--general-spacing-xs) * 1px);
17
+ }
18
+ `;
19
+ const StyledDragHandle = styled.span `
20
+ display: flex;
21
+ align-items: center;
22
+ cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
23
+ `;
24
+ export const SortListItem = ({ attributeId, isDraggable, visibilityButtonProps, filterChipProps }) => {
25
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: attributeId });
26
+ const style = {
27
+ transform: CSS.Transform.toString(transform),
28
+ transition
29
+ };
30
+ return (_jsxs(StyledSortListItem, { ref: setNodeRef, style: style, children: [_jsxs("div", { children: [isDraggable && (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: _jsx(FaGripLines, {}) })), _jsx(KitFilter, { ...filterChipProps }, attributeId)] }), _jsx(KitButton, { size: "m", type: "tertiary", ...visibilityButtonProps })] }));
31
+ };
32
+ //# sourceMappingURL=SortListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortListItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortListItem.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,oBAAoB,CAAC;AAEvC,MAAM,kBAAkB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;CAWnC,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAwB;;;cAG9C,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;CAC/D,CAAC;AASF,MAAM,CAAC,MAAM,YAAY,GAAkD,CAAC,EACxE,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,EAClB,EAAE,EAAE;IACD,MAAM,EAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,WAAW,CAAC,EAAC,EAAE,EAAE,WAAW,EAAC,CAAC,CAAC;IAC9G,MAAM,KAAK,GAAG;QACV,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,UAAU;KACb,CAAC;IAEF,OAAO,CACH,MAAC,kBAAkB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aAC7C,0BACK,WAAW,IAAI,CACZ,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACpE,KAAC,WAAW,KAAG,GACA,CACtB,EACD,KAAC,SAAS,OAAuB,eAAe,IAAhC,WAAW,CAAyB,IAClD,EACN,KAAC,SAAS,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,UAAU,KAAK,qBAAqB,GAAI,IAChD,CACxB,CAAC;AACN,CAAC,CAAC"}
@@ -1,2 +1,4 @@
1
1
  import { IViewSettingsState } from './viewSettingsReducer';
2
+ export declare const defaultPageSizeOptions: number[];
3
+ export declare const defaultMaxFilters = 3;
2
4
  export declare const viewSettingsInitialState: IViewSettingsState;
@@ -1,5 +1,25 @@
1
+ export const defaultPageSizeOptions = [20, 50, 100];
2
+ export const defaultMaxFilters = 3;
1
3
  export const viewSettingsInitialState = {
4
+ libraryId: '',
2
5
  viewType: 'table',
3
- fields: []
6
+ entrypoint: {
7
+ type: 'library',
8
+ libraryId: ''
9
+ },
10
+ attributesIds: [],
11
+ fulltextSearch: '',
12
+ sort: [],
13
+ pageSize: defaultPageSizeOptions[0],
14
+ filters: [],
15
+ maxFilters: defaultMaxFilters,
16
+ massSelection: [],
17
+ initialViewSettings: {
18
+ viewType: 'table',
19
+ attributesIds: [],
20
+ sort: [],
21
+ pageSize: defaultPageSizeOptions[0],
22
+ filters: []
23
+ }
4
24
  };
5
25
  //# sourceMappingURL=viewSettingsInitialState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewSettingsInitialState.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,EAAE;CACb,CAAC"}
1
+ {"version":3,"file":"viewSettingsInitialState.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE;QACR,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,EAAE;KAChB;IACD,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACnC,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,iBAAiB;IAC7B,aAAa,EAAE,EAAE;IACjB,mBAAmB,EAAE;QACjB,QAAQ,EAAE,OAAO;QACjB,aAAa,EAAE,EAAE;QACjB,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;QACnC,OAAO,EAAE,EAAE;KACd;CACJ,CAAC"}
@@ -1,29 +1,67 @@
1
+ import { SortOrder } from '../../../../_gqlTypes';
2
+ import { Entrypoint, ExplorerFilter } from '../../_types';
3
+ import { MASS_SELECTION_ALL } from '../../_constants';
1
4
  export type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';
5
+ export type MassSelection = string[] | typeof MASS_SELECTION_ALL;
2
6
  export declare const ViewSettingsActionTypes: {
3
- readonly ADD_FIELD: "ADD_FIELD";
4
- readonly REMOVE_FIELD: "REMOVE_FIELD";
5
- readonly MOVE_FIELD: "MOVE_FIELD";
6
- readonly RESET_FIELDS: "RESET_FIELDS";
7
+ readonly RESET: "RESET";
8
+ readonly ADD_ATTRIBUTE: "ADD_ATTRIBUTE";
9
+ readonly REMOVE_ATTRIBUTE: "REMOVE_ATTRIBUTE";
10
+ readonly MOVE_ATTRIBUTE: "MOVE_ATTRIBUTE";
11
+ readonly RESET_ATTRIBUTES: "RESET_ATTRIBUTES";
7
12
  readonly CHANGE_VIEW_TYPE: "CHANGE_VIEW_TYPE";
13
+ readonly ADD_SORT: "ADD_SORT";
14
+ readonly REMOVE_SORT: "REMOVE_SORT";
15
+ readonly MOVE_SORT: "MOVE_SORT";
16
+ readonly CHANGE_SORT_ORDER: "CHANGE_SORT_ORDER";
17
+ readonly CHANGE_PAGE_SIZE: "CHANGE_PAGE_SIZE";
18
+ readonly CHANGE_FULLTEXT_SEARCH: "CHANGE_FULLTEXT_SEARCH";
19
+ readonly CLEAR_FULLTEXT_SEARCH: "CLEAR_FULLTEXT_SEARCH";
20
+ readonly ADD_FILTER: "ADD_FILTER";
21
+ readonly RESET_FILTER: "RESET_FILTER";
22
+ readonly REMOVE_FILTER: "REMOVE_FILTER";
23
+ readonly MOVE_FILTER: "MOVE_FILTER";
24
+ readonly CHANGE_FILTER_CONFIG: "CHANGE_FILTER_CONFIG";
25
+ readonly SET_SELECTED_KEYS: "SET_SELECTED_KEYS";
26
+ readonly RESTORE_INITIAL_VIEW_SETTINGS: "RESTORE_INITIAL_VIEW_SETTINGS";
8
27
  };
9
28
  export interface IViewSettingsState {
29
+ libraryId: string;
30
+ viewId?: string;
31
+ entrypoint: Entrypoint;
10
32
  viewType: ViewType;
11
- fields: string[];
33
+ attributesIds: string[];
34
+ fulltextSearch: string;
35
+ sort: Array<{
36
+ field: string;
37
+ order: SortOrder;
38
+ }>;
39
+ pageSize: number;
40
+ filters: ExplorerFilter[];
41
+ maxFilters: number;
42
+ initialViewSettings: Pick<IViewSettingsState, 'viewType' | 'attributesIds' | 'sort' | 'pageSize' | 'filters'>;
43
+ massSelection: MassSelection;
12
44
  }
13
- interface IViewSettingsActionAddField {
14
- type: typeof ViewSettingsActionTypes.ADD_FIELD;
45
+ interface IViewSettingsActionChangePageSize {
46
+ type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;
15
47
  payload: {
16
- field: string;
48
+ pageSize: number;
17
49
  };
18
50
  }
19
- interface IViewSettingsActionRemoveField {
20
- type: typeof ViewSettingsActionTypes.REMOVE_FIELD;
51
+ interface IViewSettingsActionAddAttribute {
52
+ type: typeof ViewSettingsActionTypes.ADD_ATTRIBUTE;
21
53
  payload: {
22
- field: string;
54
+ attributeId: string;
55
+ };
56
+ }
57
+ interface IViewSettingsActionRemoveAttribute {
58
+ type: typeof ViewSettingsActionTypes.REMOVE_ATTRIBUTE;
59
+ payload: {
60
+ attributeId: string;
23
61
  };
24
62
  }
25
- interface IViewSettingsActionMoveField {
26
- type: typeof ViewSettingsActionTypes.MOVE_FIELD;
63
+ interface IViewSettingsActionMoveAttribute {
64
+ type: typeof ViewSettingsActionTypes.MOVE_ATTRIBUTE;
27
65
  payload: {
28
66
  indexFrom: number;
29
67
  indexTo: number;
@@ -35,9 +73,87 @@ interface IViewSettingsActionChangeViewType {
35
73
  viewType: ViewType;
36
74
  };
37
75
  }
38
- interface IViewSettingsActionResetFields {
39
- type: typeof ViewSettingsActionTypes.RESET_FIELDS;
76
+ interface IViewSettingsActionResetAttributes {
77
+ type: typeof ViewSettingsActionTypes.RESET_ATTRIBUTES;
78
+ }
79
+ interface IViewSettingsActionAddSort {
80
+ type: typeof ViewSettingsActionTypes.ADD_SORT;
81
+ payload: {
82
+ field: string;
83
+ order: SortOrder;
84
+ };
85
+ }
86
+ interface IViewSettingsActionRemoveSort {
87
+ type: typeof ViewSettingsActionTypes.REMOVE_SORT;
88
+ payload: {
89
+ field: string;
90
+ };
91
+ }
92
+ interface IViewSettingsActionChangeSortOrder {
93
+ type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;
94
+ payload: {
95
+ field: string;
96
+ order: SortOrder;
97
+ };
98
+ }
99
+ interface IViewSettingsActionMoveSort {
100
+ type: typeof ViewSettingsActionTypes.MOVE_SORT;
101
+ payload: {
102
+ indexFrom: number;
103
+ indexTo: number;
104
+ };
105
+ }
106
+ interface IViewSettingsActionChangeFulltextSearch {
107
+ type: typeof ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH;
108
+ payload: {
109
+ search: string;
110
+ };
111
+ }
112
+ interface IViewSettingsActionClearFulltextSearch {
113
+ type: typeof ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH;
114
+ }
115
+ interface IViewSettingsActionAddFilter {
116
+ type: typeof ViewSettingsActionTypes.ADD_FILTER;
117
+ payload: Omit<ExplorerFilter, 'id' | 'value' | 'condition'>;
118
+ }
119
+ interface IViewSettingsActionResetFilter {
120
+ type: typeof ViewSettingsActionTypes.RESET_FILTER;
121
+ payload: Pick<ExplorerFilter, 'id'>;
122
+ }
123
+ interface IViewSettingsActionRemoveFilter {
124
+ type: typeof ViewSettingsActionTypes.REMOVE_FILTER;
125
+ payload: Pick<ExplorerFilter, 'id'>;
126
+ }
127
+ interface IViewSettingsActionChangeFilterConfig {
128
+ type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;
129
+ payload: ExplorerFilter;
130
+ }
131
+ interface IViewSettingsActionMoveFilter {
132
+ type: typeof ViewSettingsActionTypes.MOVE_FILTER;
133
+ payload: {
134
+ indexFrom: number;
135
+ indexTo: number;
136
+ };
137
+ }
138
+ interface IViewSettingsActionReset {
139
+ type: typeof ViewSettingsActionTypes.RESET;
140
+ payload: IViewSettingsState;
141
+ }
142
+ interface IViewSettingsActionSetSelectedKeys {
143
+ type: typeof ViewSettingsActionTypes.SET_SELECTED_KEYS;
144
+ payload: MassSelection;
145
+ }
146
+ interface IViewSettingsActionRestoreInitialViewSettings {
147
+ type: typeof ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS;
40
148
  }
41
- export type IViewSettingsAction = IViewSettingsActionResetFields | IViewSettingsActionAddField | IViewSettingsActionRemoveField | IViewSettingsActionMoveField | IViewSettingsActionChangeViewType;
149
+ type Reducer<PAYLOAD extends {
150
+ type: keyof typeof ViewSettingsActionTypes;
151
+ payload?: unknown;
152
+ } = {
153
+ type: any;
154
+ payload: 'no_payload';
155
+ }> = PAYLOAD['payload'] extends 'no_payload' ? (state: IViewSettingsState) => IViewSettingsState : (state: IViewSettingsState, payload: PAYLOAD['payload']) => IViewSettingsState;
156
+ export declare const clearFulltextSearch: Reducer;
157
+ export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionResetFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter | IViewSettingsActionReset | IViewSettingsActionSetSelectedKeys | IViewSettingsActionRestoreInitialViewSettings;
42
158
  export declare const viewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
43
159
  export {};