@leav/ui 0.3.6-3d13092 → 0.3.6-412fb2f

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 (422) 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 +11 -5
  5. package/dist/__mocks__/common/form.js +18 -2
  6. package/dist/__mocks__/common/form.js.map +1 -1
  7. package/dist/__mocks__/common/record.d.ts +13 -2
  8. package/dist/__mocks__/common/record.js.map +1 -1
  9. package/dist/__mocks__/common/value.js +3 -1
  10. package/dist/__mocks__/common/value.js.map +1 -1
  11. package/dist/__mocks__/common/view.js +7 -5
  12. package/dist/__mocks__/common/view.js.map +1 -1
  13. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
  14. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
  15. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
  16. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
  17. package/dist/_gqlTypes/index.d.ts +430 -88
  18. package/dist/_gqlTypes/index.js +252 -44
  19. package/dist/_gqlTypes/index.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/recordFormAttributeFragment.js +2 -0
  27. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  28. package/dist/_queries/views/saveViewMutation.js +1 -1
  29. package/dist/_queries/views/viewDetailsFragment.js +14 -11
  30. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  31. package/dist/_utils/index.js +5 -2
  32. package/dist/_utils/index.js.map +1 -1
  33. package/dist/_utils/interleaveElement.d.ts +1 -0
  34. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  35. package/dist/_utils/interleaveElement.js.map +1 -0
  36. package/dist/antdTheme/index.d.ts +0 -3
  37. package/dist/antdTheme/index.js +3 -42
  38. package/dist/antdTheme/index.js.map +1 -1
  39. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  40. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  41. package/dist/components/EditApplication/EditApplication.js +2 -2
  42. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  43. package/dist/components/EditApplication/_types.d.ts +2 -2
  44. package/dist/components/Explorer/DataView.d.ts +10 -1
  45. package/dist/components/Explorer/DataView.js +36 -35
  46. package/dist/components/Explorer/DataView.js.map +1 -1
  47. package/dist/components/Explorer/Explorer.d.ts +7 -4
  48. package/dist/components/Explorer/Explorer.js +53 -14
  49. package/dist/components/Explorer/Explorer.js.map +1 -1
  50. package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
  51. package/dist/components/Explorer/ExplorerTitle.js +30 -11
  52. package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
  53. package/dist/components/Explorer/IdCard.d.ts +7 -0
  54. package/dist/components/Explorer/IdCard.js +15 -0
  55. package/dist/components/Explorer/IdCard.js.map +1 -0
  56. package/dist/components/Explorer/TableCell.d.ts +8 -0
  57. package/dist/components/Explorer/TableCell.js +143 -0
  58. package/dist/components/Explorer/TableCell.js.map +1 -0
  59. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  60. package/dist/components/Explorer/TableTagGroup.js +30 -0
  61. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  62. package/dist/components/Explorer/_constants.d.ts +4 -0
  63. package/dist/components/Explorer/_constants.js +17 -0
  64. package/dist/components/Explorer/_constants.js.map +1 -0
  65. package/dist/components/Explorer/_queries/useExplorerData.d.ts +31 -7
  66. package/dist/components/Explorer/_queries/useExplorerData.js +199 -19
  67. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  68. package/dist/components/Explorer/_types.d.ts +62 -3
  69. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  70. package/dist/components/Explorer/conditionsHelper.js +16 -0
  71. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  72. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +4 -0
  73. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +47 -0
  74. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js.map +1 -0
  75. package/dist/components/Explorer/index.d.ts +1 -3
  76. package/dist/components/Explorer/index.js +1 -3
  77. package/dist/components/Explorer/index.js.map +1 -1
  78. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +2 -1
  79. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
  80. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  81. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
  82. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  83. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  84. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
  85. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
  86. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  87. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  88. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  89. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  90. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  91. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
  92. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  93. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  94. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  95. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  96. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  97. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +78 -0
  98. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  99. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  100. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  101. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  102. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  103. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
  104. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  105. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  106. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  107. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  108. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  109. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  110. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  111. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  112. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  113. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  114. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  115. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  116. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  117. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  118. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  119. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  120. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  121. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +71 -0
  122. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.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/NumericAttributeDropDown.d.ts +3 -0
  127. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
  128. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  129. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  130. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
  131. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  132. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +11 -0
  133. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +100 -0
  134. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  135. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  136. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  137. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  138. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +2 -0
  139. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +1 -0
  140. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  141. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +7 -0
  142. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
  143. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  144. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
  145. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  146. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  147. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
  148. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
  149. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  150. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  151. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +2 -1
  152. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +70 -0
  153. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  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 +109 -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/ViewSettingsContext.d.ts +6 -0
  161. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +11 -0
  162. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  163. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.d.ts +4 -0
  164. package/dist/components/{RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js → Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js} +3 -3
  165. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  166. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
  167. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +24 -0
  168. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  169. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +145 -0
  170. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +199 -0
  171. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  172. package/dist/components/Explorer/{useCreateMainAction.d.ts → useCreateAction.d.ts} +3 -3
  173. package/dist/components/Explorer/{useCreateMainAction.js → useCreateAction.js} +11 -7
  174. package/dist/components/Explorer/useCreateAction.js.map +1 -0
  175. package/dist/components/Explorer/useDeactivateAction.js +3 -2
  176. package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
  177. package/dist/components/Explorer/useEditAction.js +8 -6
  178. package/dist/components/Explorer/useEditAction.js.map +1 -1
  179. package/dist/components/Explorer/usePagination.d.ts +7 -0
  180. package/dist/components/Explorer/usePagination.js +25 -0
  181. package/dist/components/Explorer/usePagination.js.map +1 -0
  182. package/dist/components/Explorer/usePrimaryActions.d.ts +12 -0
  183. package/dist/components/Explorer/usePrimaryActions.js +21 -0
  184. package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
  185. package/dist/components/Explorer/useSearchInput.d.ts +10 -0
  186. package/dist/components/Explorer/useSearchInput.js +31 -0
  187. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  188. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  189. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  190. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  191. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  192. package/dist/components/Explorer/useViewSettingsReducer.js +125 -0
  193. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  194. package/dist/components/ExportModal/ExportModal.js +2 -2
  195. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  196. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  197. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  198. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  199. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  200. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  201. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  202. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  203. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  204. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
  205. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  206. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  207. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  208. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  209. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  210. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  211. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  212. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  213. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  214. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  215. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  216. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  217. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  218. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  219. package/dist/components/RecordEdition/EditRecord/EditRecord.js +10 -18
  220. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  221. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +16 -3
  222. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  223. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +9 -20
  224. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  225. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  226. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  227. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  228. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  229. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  230. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  231. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  232. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  233. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  234. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  235. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  236. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  237. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  238. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  239. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  240. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  241. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  242. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  243. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
  244. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  245. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  246. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  247. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  248. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  249. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +145 -191
  250. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  251. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  252. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +10 -30
  253. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  254. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  255. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +38 -45
  256. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  257. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  258. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +31 -46
  259. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  260. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  261. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +9 -77
  262. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  263. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  264. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +29 -49
  265. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  266. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +34 -54
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  270. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +48 -64
  271. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  272. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  273. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +30 -53
  274. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  275. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +16 -9
  276. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +66 -401
  277. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  278. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  279. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +45 -52
  280. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  281. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  282. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +15 -0
  283. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  284. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  285. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  286. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
  287. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  288. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  289. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +37 -0
  290. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  291. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  292. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  293. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
  294. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  295. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
  296. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  297. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  298. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  299. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +35 -3
  300. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  301. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  302. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  303. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  304. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  305. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  306. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  307. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  308. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  309. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  310. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
  311. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
  312. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  313. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  314. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  315. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  316. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  317. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
  318. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  319. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  320. package/dist/components/SelectTreeNode/index.js +1 -1
  321. package/dist/components/SelectTreeNode/index.js.map +1 -1
  322. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  323. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  324. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  325. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  326. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  327. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  328. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  329. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  330. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  331. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  332. package/dist/constants.d.ts +1 -0
  333. package/dist/constants.js +1 -0
  334. package/dist/constants.js.map +1 -1
  335. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  336. package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
  337. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  338. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  339. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer → hooks/useExecuteSaveViewMutation}/index.js +1 -2
  340. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  341. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  342. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
  343. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  344. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  345. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  346. package/dist/locales/en/shared.json +68 -14
  347. package/dist/locales/fr/shared.json +68 -14
  348. package/dist/types/views.d.ts +4 -4
  349. package/package.json +7 -2
  350. package/dist/components/Explorer/edit-settings/ColumnItem.js +0 -62
  351. package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
  352. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
  353. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -28
  354. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  355. package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
  356. package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -77
  357. package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
  358. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  359. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
  360. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  361. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  362. package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
  363. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  364. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  365. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  366. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
  367. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
  368. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
  369. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  370. package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
  371. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  372. package/dist/components/Explorer/useCreateMainAction.js.map +0 -1
  373. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  374. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  375. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  376. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  377. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  378. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  379. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  380. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  381. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  382. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  383. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  384. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  385. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  386. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  387. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  388. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  389. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  390. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  391. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  392. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  393. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  394. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  395. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  396. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  397. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  398. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  399. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  400. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  401. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  402. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  403. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  404. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  405. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  406. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  407. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  408. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  409. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  410. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  411. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  412. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  413. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  414. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  415. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  416. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  417. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
  418. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  419. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  420. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  421. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
  422. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
@@ -0,0 +1,4 @@
1
+ import { IViewSettingsState } from './viewSettingsReducer';
2
+ export declare const defaultPageSizeOptions: number[];
3
+ export declare const defaultMaxFilters = 3;
4
+ export declare const viewSettingsInitialState: IViewSettingsState;
@@ -0,0 +1,24 @@
1
+ export const defaultPageSizeOptions = [20, 50, 100];
2
+ export const defaultMaxFilters = 3;
3
+ export const viewSettingsInitialState = {
4
+ libraryId: '',
5
+ viewType: 'table',
6
+ entrypoint: {
7
+ type: 'library',
8
+ libraryId: ''
9
+ },
10
+ attributesIds: [],
11
+ fulltextSearch: '',
12
+ sort: [],
13
+ pageSize: defaultPageSizeOptions[0],
14
+ filters: [],
15
+ maxFilters: defaultMaxFilters,
16
+ initialViewSettings: {
17
+ viewType: 'table',
18
+ attributesIds: [],
19
+ sort: [],
20
+ pageSize: defaultPageSizeOptions[0],
21
+ filters: []
22
+ }
23
+ };
24
+ //# sourceMappingURL=viewSettingsInitialState.js.map
@@ -0,0 +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,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,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"}
@@ -0,0 +1,145 @@
1
+ import { SortOrder } from '../../../../_gqlTypes';
2
+ import { Entrypoint, IExplorerFilter } from '../../_types';
3
+ export type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';
4
+ export declare const ViewSettingsActionTypes: {
5
+ readonly RESET: "RESET";
6
+ readonly ADD_ATTRIBUTE: "ADD_ATTRIBUTE";
7
+ readonly REMOVE_ATTRIBUTE: "REMOVE_ATTRIBUTE";
8
+ readonly MOVE_ATTRIBUTE: "MOVE_ATTRIBUTE";
9
+ readonly RESET_ATTRIBUTES: "RESET_ATTRIBUTES";
10
+ readonly CHANGE_VIEW_TYPE: "CHANGE_VIEW_TYPE";
11
+ readonly ADD_SORT: "ADD_SORT";
12
+ readonly REMOVE_SORT: "REMOVE_SORT";
13
+ readonly MOVE_SORT: "MOVE_SORT";
14
+ readonly CHANGE_SORT_ORDER: "CHANGE_SORT_ORDER";
15
+ readonly CHANGE_PAGE_SIZE: "CHANGE_PAGE_SIZE";
16
+ readonly CHANGE_FULLTEXT_SEARCH: "CHANGE_FULLTEXT_SEARCH";
17
+ readonly CLEAR_FULLTEXT_SEARCH: "CLEAR_FULLTEXT_SEARCH";
18
+ readonly ADD_FILTER: "ADD_FILTER";
19
+ readonly RESET_FILTER: "RESET_FILTER";
20
+ readonly REMOVE_FILTER: "REMOVE_FILTER";
21
+ readonly MOVE_FILTER: "MOVE_FILTER";
22
+ readonly CHANGE_FILTER_CONFIG: "CHANGE_FILTER_CONFIG";
23
+ readonly RESTORE_INITIAL_VIEW_SETTINGS: "RESTORE_INITIAL_VIEW_SETTINGS";
24
+ };
25
+ export interface IViewSettingsState {
26
+ libraryId: string;
27
+ viewId?: string;
28
+ entrypoint: Entrypoint;
29
+ viewType: ViewType;
30
+ attributesIds: string[];
31
+ fulltextSearch: string;
32
+ sort: Array<{
33
+ field: string;
34
+ order: SortOrder;
35
+ }>;
36
+ pageSize: number;
37
+ filters: IExplorerFilter[];
38
+ maxFilters: number;
39
+ initialViewSettings: Pick<IViewSettingsState, 'viewType' | 'attributesIds' | 'sort' | 'pageSize' | 'filters'>;
40
+ }
41
+ interface IViewSettingsActionChangePageSize {
42
+ type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;
43
+ payload: {
44
+ pageSize: number;
45
+ };
46
+ }
47
+ interface IViewSettingsActionAddAttribute {
48
+ type: typeof ViewSettingsActionTypes.ADD_ATTRIBUTE;
49
+ payload: {
50
+ attributeId: string;
51
+ };
52
+ }
53
+ interface IViewSettingsActionRemoveAttribute {
54
+ type: typeof ViewSettingsActionTypes.REMOVE_ATTRIBUTE;
55
+ payload: {
56
+ attributeId: string;
57
+ };
58
+ }
59
+ interface IViewSettingsActionMoveAttribute {
60
+ type: typeof ViewSettingsActionTypes.MOVE_ATTRIBUTE;
61
+ payload: {
62
+ indexFrom: number;
63
+ indexTo: number;
64
+ };
65
+ }
66
+ interface IViewSettingsActionChangeViewType {
67
+ type: typeof ViewSettingsActionTypes.CHANGE_VIEW_TYPE;
68
+ payload: {
69
+ viewType: ViewType;
70
+ };
71
+ }
72
+ interface IViewSettingsActionResetAttributes {
73
+ type: typeof ViewSettingsActionTypes.RESET_ATTRIBUTES;
74
+ }
75
+ interface IViewSettingsActionAddSort {
76
+ type: typeof ViewSettingsActionTypes.ADD_SORT;
77
+ payload: {
78
+ field: string;
79
+ order: SortOrder;
80
+ };
81
+ }
82
+ interface IViewSettingsActionRemoveSort {
83
+ type: typeof ViewSettingsActionTypes.REMOVE_SORT;
84
+ payload: {
85
+ field: string;
86
+ };
87
+ }
88
+ interface IViewSettingsActionChangeSortOrder {
89
+ type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;
90
+ payload: {
91
+ field: string;
92
+ order: SortOrder;
93
+ };
94
+ }
95
+ interface IViewSettingsActionMoveSort {
96
+ type: typeof ViewSettingsActionTypes.MOVE_SORT;
97
+ payload: {
98
+ indexFrom: number;
99
+ indexTo: number;
100
+ };
101
+ }
102
+ interface IViewSettingsActionChangeFulltextSearch {
103
+ type: typeof ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH;
104
+ payload: {
105
+ search: string;
106
+ };
107
+ }
108
+ interface IViewSettingsActionClearFulltextSearch {
109
+ type: typeof ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH;
110
+ }
111
+ interface IViewSettingsActionAddFilter {
112
+ type: typeof ViewSettingsActionTypes.ADD_FILTER;
113
+ payload: Omit<IExplorerFilter, 'id' | 'value' | 'condition'>;
114
+ }
115
+ interface IViewSettingsActionResetFilter {
116
+ type: typeof ViewSettingsActionTypes.RESET_FILTER;
117
+ payload: Pick<IExplorerFilter, 'id'>;
118
+ }
119
+ interface IViewSettingsActionRemoveFilter {
120
+ type: typeof ViewSettingsActionTypes.REMOVE_FILTER;
121
+ payload: Pick<IExplorerFilter, 'id'>;
122
+ }
123
+ interface IViewSettingsActionChangeFilterConfig {
124
+ type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;
125
+ payload: IExplorerFilter;
126
+ }
127
+ interface IViewSettingsActionMoveFilter {
128
+ type: typeof ViewSettingsActionTypes.MOVE_FILTER;
129
+ payload: {
130
+ indexFrom: number;
131
+ indexTo: number;
132
+ };
133
+ }
134
+ interface IViewSettingsActionReset {
135
+ type: typeof ViewSettingsActionTypes.RESET;
136
+ payload: IViewSettingsState;
137
+ }
138
+ interface IViewSettingsActionRestoreInitialViewSettings {
139
+ type: typeof ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS;
140
+ }
141
+ type Reducer<PAYLOAD = 'no_payload'> = PAYLOAD extends 'no_payload' ? (state: IViewSettingsState) => IViewSettingsState : (state: IViewSettingsState, payload: PAYLOAD) => IViewSettingsState;
142
+ export declare const clearFulltextSearch: Reducer;
143
+ export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionResetFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter | IViewSettingsActionReset | IViewSettingsActionRestoreInitialViewSettings;
144
+ export declare const viewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
145
+ export {};
@@ -0,0 +1,199 @@
1
+ import { v4 as uuid } from 'uuid';
2
+ import { hasOnlyNoValueConditions } from '../../conditionsHelper';
3
+ import { conditionsByFormat } from '../filter-items/filter-type/useConditionOptionsByType';
4
+ export const ViewSettingsActionTypes = {
5
+ RESET: 'RESET',
6
+ ADD_ATTRIBUTE: 'ADD_ATTRIBUTE',
7
+ REMOVE_ATTRIBUTE: 'REMOVE_ATTRIBUTE',
8
+ MOVE_ATTRIBUTE: 'MOVE_ATTRIBUTE',
9
+ RESET_ATTRIBUTES: 'RESET_ATTRIBUTES',
10
+ CHANGE_VIEW_TYPE: 'CHANGE_VIEW_TYPE',
11
+ ADD_SORT: 'ADD_SORT',
12
+ REMOVE_SORT: 'REMOVE_SORT',
13
+ MOVE_SORT: 'MOVE_SORT',
14
+ CHANGE_SORT_ORDER: 'CHANGE_SORT_ORDER',
15
+ CHANGE_PAGE_SIZE: 'CHANGE_PAGE_SIZE',
16
+ CHANGE_FULLTEXT_SEARCH: 'CHANGE_FULLTEXT_SEARCH',
17
+ CLEAR_FULLTEXT_SEARCH: 'CLEAR_FULLTEXT_SEARCH',
18
+ ADD_FILTER: 'ADD_FILTER',
19
+ RESET_FILTER: 'RESET_FILTER',
20
+ REMOVE_FILTER: 'REMOVE_FILTER',
21
+ MOVE_FILTER: 'MOVE_FILTER',
22
+ CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG',
23
+ RESTORE_INITIAL_VIEW_SETTINGS: 'RESTORE_INITIAL_VIEW_SETTINGS'
24
+ };
25
+ const changePageSize = (state, payload) => ({
26
+ ...state,
27
+ pageSize: payload.pageSize
28
+ });
29
+ const addAttribute = (state, payload) => ({
30
+ ...state,
31
+ attributesIds: [...state.attributesIds, payload.attributeId]
32
+ });
33
+ const removeAttribute = (state, payload) => ({
34
+ ...state,
35
+ attributesIds: state.attributesIds.filter(attributesId => attributesId !== payload.attributeId)
36
+ });
37
+ const moveAttribute = (state, payload) => {
38
+ const attributesIds = [...state.attributesIds];
39
+ const [attributeIdToMove] = attributesIds.splice(payload.indexFrom, 1);
40
+ // TODO use newES6 syntax (toSpliced)
41
+ attributesIds.splice(payload.indexTo, 0, attributeIdToMove);
42
+ return {
43
+ ...state,
44
+ attributesIds
45
+ };
46
+ };
47
+ const resetAttributes = state => ({
48
+ ...state,
49
+ attributesIds: []
50
+ });
51
+ const changeViewType = (state, payload) => ({
52
+ ...state,
53
+ viewType: payload.viewType
54
+ });
55
+ const addSort = (state, payload) => ({
56
+ ...state,
57
+ sort: [...state.sort, { field: payload.field, order: payload.order }]
58
+ });
59
+ const removeSort = (state, payload) => ({
60
+ ...state,
61
+ sort: state.sort.filter(({ field: attributeId }) => attributeId !== payload.field)
62
+ });
63
+ const changeSortOrder = (state, payload) => ({
64
+ ...state,
65
+ sort: state.sort.map(sort => (sort.field === payload.field ? { ...sort, order: payload.order } : sort))
66
+ });
67
+ const moveSort = (state, payload) => {
68
+ const attributesUsedToSort = [...state.sort];
69
+ const [sortToMove] = attributesUsedToSort.splice(payload.indexFrom, 1);
70
+ attributesUsedToSort.splice(payload.indexTo, 0, sortToMove);
71
+ return {
72
+ ...state,
73
+ sort: attributesUsedToSort
74
+ };
75
+ };
76
+ const changeFulltextSearch = (state, payload) => ({
77
+ ...state,
78
+ fulltextSearch: payload.search
79
+ });
80
+ export const clearFulltextSearch = state => ({
81
+ ...state,
82
+ fulltextSearch: ''
83
+ });
84
+ const addFilter = (state, payload) => ({
85
+ ...state,
86
+ filters: [
87
+ ...state.filters,
88
+ {
89
+ ...payload,
90
+ id: uuid(),
91
+ condition: hasOnlyNoValueConditions(payload.attribute.format)
92
+ ? null
93
+ : (conditionsByFormat[payload.attribute.format][0] ?? null),
94
+ value: null
95
+ }
96
+ ]
97
+ });
98
+ const resetFilter = (state, payload) => ({
99
+ ...state,
100
+ filters: state.filters.map(filter => {
101
+ if (filter.id === payload.id) {
102
+ const initialViewFilter = state.initialViewSettings.filters.find(({ id }) => id === payload.id);
103
+ return (initialViewFilter ?? {
104
+ ...filter,
105
+ condition: hasOnlyNoValueConditions(filter.attribute.format)
106
+ ? null
107
+ : (conditionsByFormat[filter.attribute.format][0] ?? null),
108
+ value: null
109
+ });
110
+ }
111
+ return filter;
112
+ })
113
+ });
114
+ const removeFilter = (state, payload) => ({
115
+ ...state,
116
+ filters: state.filters.filter(({ id }) => id !== payload.id)
117
+ });
118
+ const changeFilterConfig = (state, payload) => ({
119
+ ...state,
120
+ filters: state.filters.map(filter => (filter.id === payload.id ? { ...filter, ...payload } : filter))
121
+ });
122
+ const moveFilter = (state, payload) => {
123
+ const attributesUsedToFilter = [...state.filters];
124
+ const [filterToMove] = attributesUsedToFilter.splice(payload.indexFrom, 1);
125
+ attributesUsedToFilter.splice(payload.indexTo, 0, filterToMove);
126
+ return {
127
+ ...state,
128
+ filters: attributesUsedToFilter
129
+ };
130
+ };
131
+ const reset = (_, payload) => payload;
132
+ const restoreInitialViewSettings = state => ({
133
+ ...state,
134
+ ...state.initialViewSettings
135
+ });
136
+ export const viewSettingsReducer = (state, action) => {
137
+ switch (action.type) {
138
+ case ViewSettingsActionTypes.CHANGE_PAGE_SIZE: {
139
+ return changePageSize(state, action.payload);
140
+ }
141
+ case ViewSettingsActionTypes.ADD_ATTRIBUTE: {
142
+ return addAttribute(state, action.payload);
143
+ }
144
+ case ViewSettingsActionTypes.REMOVE_ATTRIBUTE: {
145
+ return removeAttribute(state, action.payload);
146
+ }
147
+ case ViewSettingsActionTypes.MOVE_ATTRIBUTE: {
148
+ return moveAttribute(state, action.payload);
149
+ }
150
+ case ViewSettingsActionTypes.RESET_ATTRIBUTES: {
151
+ return resetAttributes(state);
152
+ }
153
+ case ViewSettingsActionTypes.CHANGE_VIEW_TYPE: {
154
+ return changeViewType(state, action.payload);
155
+ }
156
+ case ViewSettingsActionTypes.ADD_SORT: {
157
+ return addSort(state, action.payload);
158
+ }
159
+ case ViewSettingsActionTypes.REMOVE_SORT: {
160
+ return removeSort(state, action.payload);
161
+ }
162
+ case ViewSettingsActionTypes.MOVE_SORT: {
163
+ return moveSort(state, action.payload);
164
+ }
165
+ case ViewSettingsActionTypes.CHANGE_SORT_ORDER: {
166
+ return changeSortOrder(state, action.payload);
167
+ }
168
+ case ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH: {
169
+ return changeFulltextSearch(state, action.payload);
170
+ }
171
+ case ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH: {
172
+ return clearFulltextSearch(state);
173
+ }
174
+ case ViewSettingsActionTypes.ADD_FILTER: {
175
+ return addFilter(state, action.payload);
176
+ }
177
+ case ViewSettingsActionTypes.RESET_FILTER: {
178
+ return resetFilter(state, action.payload);
179
+ }
180
+ case ViewSettingsActionTypes.REMOVE_FILTER: {
181
+ return removeFilter(state, action.payload);
182
+ }
183
+ case ViewSettingsActionTypes.CHANGE_FILTER_CONFIG: {
184
+ return changeFilterConfig(state, action.payload);
185
+ }
186
+ case ViewSettingsActionTypes.MOVE_FILTER: {
187
+ return moveFilter(state, action.payload);
188
+ }
189
+ case ViewSettingsActionTypes.RESET: {
190
+ return reset(state, action.payload);
191
+ }
192
+ case ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS: {
193
+ return restoreInitialViewSettings(state);
194
+ }
195
+ default:
196
+ return state;
197
+ }
198
+ };
199
+ //# sourceMappingURL=viewSettingsReducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAC;AAChC,OAAO,EAAC,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAC,kBAAkB,EAAC,MAAM,uDAAuD,CAAC;AAIzF,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,sBAAsB,EAAE,wBAAwB;IAChD,qBAAqB,EAAE,uBAAuB;IAC9C,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,oBAAoB,EAAE,sBAAsB;IAC5C,6BAA6B,EAAE,+BAA+B;CACxD,CAAC;AA4HX,MAAM,cAAc,GAA0D,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/F,GAAG,KAA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,CAAC,CAAC;YACjC,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,KAAK,uBAAuB,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACzD,OAAO,0BAA0B,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ActionHook } from './_types';
1
+ import { ActionHook, IPrimaryAction } from './_types';
2
2
  /**
3
3
  * Hook used to get the action for `<DataView />` component.
4
4
  *
@@ -10,10 +10,10 @@ import { ActionHook } from './_types';
10
10
  * @param library - the library's id to add new item
11
11
  * @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
12
12
  */
13
- export declare const useCreateMainAction: ({ isEnabled, library, refetch }: ActionHook<{
13
+ export declare const useCreateAction: ({ isEnabled, library, refetch }: ActionHook<{
14
14
  library: string;
15
15
  refetch: () => void;
16
16
  }>) => {
17
- createButton: JSX.Element;
17
+ createAction: IPrimaryAction;
18
18
  createModal: JSX.Element;
19
19
  };
@@ -3,7 +3,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
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 { useState } from 'react';
6
- import { KitButton } from 'aristid-ds';
7
6
  import { FaPlus } from 'react-icons/fa';
8
7
  import { EditRecordModal } from '../../components';
9
8
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
@@ -18,19 +17,24 @@ import { useSharedTranslation } from '../../hooks/useSharedTranslation';
18
17
  * @param library - the library's id to add new item
19
18
  * @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
20
19
  */
21
- export const useCreateMainAction = ({ isEnabled, library, refetch }) => {
20
+ export const useCreateAction = ({ isEnabled, library, refetch }) => {
22
21
  const { t } = useSharedTranslation();
23
22
  const [isRecordCreationVisible, setRecordCreationVisible] = useState(false);
23
+ const createAction = {
24
+ callback: () => {
25
+ setRecordCreationVisible(true);
26
+ },
27
+ icon: _jsx(FaPlus, {}),
28
+ label: t('explorer.create-one')
29
+ };
24
30
  return {
25
- createButton: isEnabled ? (_jsx(KitButton, { type: "primary", icon: _jsx(FaPlus, {}) /* TODO: move to font-awesome 6 icons */, onClick: () => {
26
- setRecordCreationVisible(true);
27
- }, children: t('explorer.create-one') })) : null,
31
+ createAction: isEnabled ? createAction : null,
28
32
  createModal: isRecordCreationVisible ? (_jsx(EditRecordModal, { open: true, record: null, library: library, onClose: () => {
29
33
  setRecordCreationVisible(false);
30
- }, onCreate: ignoreNewItem => {
34
+ }, onCreate: () => {
31
35
  refetch();
32
36
  setRecordCreationVisible(false);
33
37
  }, submitButtons: ['create'] })) : null
34
38
  };
35
39
  };
36
- //# sourceMappingURL=useCreateMainAction.js.map
40
+ //# sourceMappingURL=useCreateAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useCreateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC5B,SAAS,EACT,OAAO,EACP,OAAO,EAIT,EAAE,EAAE;IACF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5E,MAAM,YAAY,GAAmB;QACjC,QAAQ,EAAE,GAAG,EAAE;YACX,wBAAwB,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,EAAE,KAAC,MAAM,KAAG;QAChB,KAAK,EAAE,CAAC,CAAC,qBAAqB,CAAC;KAClC,CAAC;IAEF,OAAO;QACH,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;QAC7C,WAAW,EAAE,uBAAuB,CAAC,CAAC,CAAC,CACnC,KAAC,eAAe,IACZ,IAAI,QACJ,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,EACD,QAAQ,EAAE,GAAG,EAAE;gBACX,OAAO,EAAE,CAAC;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC,EACD,aAAa,EAAE,CAAC,QAAQ,CAAC,GAC3B,CACL,CAAC,CAAC,CAAC,IAAI;KACX,CAAC;AACN,CAAC,CAAC"}
@@ -6,6 +6,7 @@ import { FaTrash } from 'react-icons/fa';
6
6
  import { KitModal } from 'aristid-ds';
7
7
  import { useDeactivateRecordsMutation } from '../../_gqlTypes';
8
8
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
9
+ import { useMemo } from 'react';
9
10
  /**
10
11
  * Hook used to get the action for `<DataView />` component.
11
12
  *
@@ -26,7 +27,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
26
27
  cache.gc();
27
28
  }
28
29
  });
29
- const _deactivateAction = {
30
+ const _deactivateAction = useMemo(() => ({
30
31
  label: t('explorer.deactivate-item'),
31
32
  icon: _jsx(FaTrash, {}),
32
33
  isDanger: true,
@@ -43,7 +44,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
43
44
  }
44
45
  })
45
46
  })
46
- };
47
+ }), [t, deactivateRecordsMutation]);
47
48
  return {
48
49
  deactivateAction: isEnabled ? _deactivateAction : null
49
50
  };
@@ -1 +1 @@
1
- {"version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AAS;YACvC,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YAC3C,IAAI,EAAE,GAAG,EAAE,CACP,yBAAyB,CAAC;gBACtB,SAAS,EAAE;oBACP,SAAS;oBACT,UAAU,EAAE,CAAC,MAAM,CAAC;iBACvB;aACJ,CAAC;SACT,CAAC;KACT,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,SAAS,EAAa,EAAE,EAAE;IAC3D,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,4BAA4B,CAAC;QAC7D,MAAM,CAAC,KAAK,EAAE,kBAAkB;YAC5B,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACxD,KAAK,CAAC,KAAK,CAAC;oBACR,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAC7B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YACH,KAAK,CAAC,EAAE,EAAE,CAAC;QACf,CAAC;KACJ,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAgB,OAAO,CAC1C,GAAG,EAAE,CAAC,CAAC;QACH,KAAK,EAAE,CAAC,CAAC,0BAA0B,CAAC;QACpC,IAAI,EAAE,KAAC,OAAO,KAAG;QACjB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CAAC,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,EAAE,CAC9B,QAAQ,CAAC,OAAO,CAAC;YACb,IAAI,EAAE,SAAS;YACf,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,CAAC,CAAC,kCAAkC,CAAC,IAAI,SAAS;YAC3D,MAAM,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YACvC,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YAC3C,IAAI,EAAE,GAAG,EAAE,CACP,yBAAyB,CAAC;gBACtB,SAAS,EAAE;oBACP,SAAS;oBACT,UAAU,EAAE,CAAC,MAAM,CAAC;iBACvB;aACJ,CAAC;SACT,CAAC;KACT,CAAC,EACF,CAAC,CAAC,EAAE,yBAAyB,CAAC,CACjC,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACN,CAAC,CAAC"}
@@ -2,11 +2,11 @@ import { jsx as _jsx } 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
- import { useState } from 'react';
5
+ import { useMemo, useState } from 'react';
6
6
  import { FaPen } from 'react-icons/fa';
7
7
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
8
8
  import { EditRecordModal } from '../../components/RecordEdition/EditRecordModal';
9
- import { RecordFilterCondition, useExplorerLazyQuery } from '../../_gqlTypes';
9
+ import { RecordFilterCondition, useExplorerLibraryDataLazyQuery } from '../../_gqlTypes';
10
10
  /**
11
11
  * Hook used to get the action for `<DataView />` component.
12
12
  *
@@ -19,7 +19,7 @@ import { RecordFilterCondition, useExplorerLazyQuery } from '../../_gqlTypes';
19
19
  */
20
20
  export const useEditAction = ({ isEnabled }) => {
21
21
  const { t } = useSharedTranslation();
22
- const [refreshItem] = useExplorerLazyQuery({ fetchPolicy: 'network-only' });
22
+ const [refreshItem] = useExplorerLibraryDataLazyQuery({ fetchPolicy: 'network-only' });
23
23
  const [editingItem, setEditingItem] = useState(null);
24
24
  const _editAction = {
25
25
  label: t('explorer.edit-item'),
@@ -32,7 +32,8 @@ export const useEditAction = ({ isEnabled }) => {
32
32
  refreshItem({
33
33
  variables: {
34
34
  libraryId: item.libraryId,
35
- attributeIds: ['id'],
35
+ attributeIds: ['id'], // TODO: get list of displayed attributes stored in the view
36
+ pagination: { limit: 1 },
36
37
  filters: [
37
38
  {
38
39
  condition: RecordFilterCondition.EQUAL,
@@ -44,9 +45,10 @@ export const useEditAction = ({ isEnabled }) => {
44
45
  });
45
46
  setEditingItem(null);
46
47
  };
47
- return {
48
+ const editAction = useMemo(() => ({
48
49
  editAction: isEnabled ? _editAction : null,
49
50
  editModal: isEnabled && editingItem !== null ? (_jsx(EditRecordModal, { open: true, record: editingItem.whoAmI, library: editingItem.libraryId, onClose: () => _handleEditModalClose(editingItem) })) : null
50
- };
51
+ }), [isEnabled, editingItem]);
52
+ return editAction;
51
53
  };
52
54
  //# sourceMappingURL=useEditAction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEditAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useEditAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,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EAAE,CAAC,IAAI,CAAC,EAAE,4DAA4D;gBAClF,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAC;gBACtB,OAAO,EAAE;oBACL;wBACI,SAAS,EAAE,qBAAqB,CAAC,KAAK;wBACtC,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,IAAI,CAAC,MAAM;qBACrB;iBACJ;aACJ;SACJ,CAAC,CAAC;QACH,cAAc,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,CAAC;QACH,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;QAC1C,SAAS,EACL,SAAS,IAAI,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,CAChC,KAAC,eAAe,IACZ,IAAI,QACJ,MAAM,EAAE,WAAW,CAAC,MAAM,EAC1B,OAAO,EAAE,WAAW,CAAC,SAAS,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,WAAW,CAAC,GACnD,CACL,CAAC,CAAC,CAAC,IAAI;KACf,CAAC,EACF,CAAC,SAAS,EAAE,WAAW,CAAC,CAC3B,CAAC;IAEF,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Dispatch } from 'react';
2
+ import { IViewSettingsAction } from './manage-view-settings';
3
+ export declare const usePagination: (dispatch: Dispatch<IViewSettingsAction>) => {
4
+ currentPage: number;
5
+ setNewPage: (newCurrentPage: number, ignoredPageSize: number) => void;
6
+ setNewPageSize: (ignoredCurrentPage: number, newPageSize: number) => void;
7
+ };
@@ -0,0 +1,25 @@
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
+ import { useState } from 'react';
5
+ import { ViewSettingsActionTypes } from './manage-view-settings';
6
+ export const usePagination = (dispatch) => {
7
+ const [currentPage, setCurrentPage] = useState(1);
8
+ const setNewPage = (newCurrentPage, ignoredPageSize) => {
9
+ setCurrentPage(newCurrentPage);
10
+ };
11
+ const setNewPageSize = (ignoredCurrentPage, newPageSize) => {
12
+ dispatch({
13
+ type: ViewSettingsActionTypes.CHANGE_PAGE_SIZE,
14
+ payload: {
15
+ pageSize: newPageSize
16
+ }
17
+ });
18
+ };
19
+ return {
20
+ currentPage,
21
+ setNewPage,
22
+ setNewPageSize
23
+ };
24
+ };
25
+ //# sourceMappingURL=usePagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePagination.js","sourceRoot":"","sources":["../../../src/components/Explorer/usePagination.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAW,QAAQ,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAsB,uBAAuB,EAAC,MAAM,wBAAwB,CAAC;AAEpF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAuC,EAAE,EAAE;IACrE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAElD,MAAM,UAAU,GAAG,CAAC,cAAsB,EAAE,eAAuB,EAAE,EAAE;QACnE,cAAc,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,kBAA0B,EAAE,WAAmB,EAAE,EAAE;QACvE,QAAQ,CAAC;YACL,IAAI,EAAE,uBAAuB,CAAC,gBAAgB;YAC9C,OAAO,EAAE;gBACL,QAAQ,EAAE,WAAW;aACxB;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO;QACH,WAAW;QACX,UAAU;QACV,cAAc;KACjB,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { IPrimaryAction } from './_types';
2
+ /**
3
+ * Hook used to get the primary actions for `<DataView />` component.
4
+ *
5
+ * Based on default actions and custom actions, it returns a primary with first action as "main" action and the others
6
+ * in the dropdown accessible via a split button.
7
+ *
8
+ * @param {Object[]} actions - list of actions to be display as one button: the primary action button
9
+ */
10
+ export declare const usePrimaryActionsButton: (actions: IPrimaryAction[]) => {
11
+ primaryButton: JSX.Element;
12
+ };
@@ -0,0 +1,21 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitButton, KitSpace } from 'aristid-ds';
3
+ /**
4
+ * Hook used to get the primary actions for `<DataView />` component.
5
+ *
6
+ * Based on default actions and custom actions, it returns a primary with first action as "main" action and the others
7
+ * in the dropdown accessible via a split button.
8
+ *
9
+ * @param {Object[]} actions - list of actions to be display as one button: the primary action button
10
+ */
11
+ export const usePrimaryActionsButton = (actions) => {
12
+ const [firstAction, ...dropdownActions] = actions;
13
+ return {
14
+ primaryButton: actions.length === 0 ? null : (_jsx(KitButton, { type: "primary", icon: firstAction.icon, onClick: firstAction.callback, items: dropdownActions.map((action, index) => ({
15
+ key: index,
16
+ label: (_jsxs(KitSpace, { size: 8, children: [action.icon, " ", action.label] })),
17
+ onClick: action.callback
18
+ })), children: firstAction.label }))
19
+ };
20
+ };
21
+ //# sourceMappingURL=usePrimaryActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrimaryActions.js","sourceRoot":"","sources":["../../../src/components/Explorer/usePrimaryActions.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAyB,EAAE,EAAE;IACjE,MAAM,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,GAAG,OAAO,CAAC;IAElD,OAAO;QACH,aAAa,EACT,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC1B,KAAC,SAAS,IACN,IAAI,EAAC,SAAS,EACd,IAAI,EAAE,WAAW,CAAC,IAAI,EACtB,OAAO,EAAE,WAAW,CAAC,QAAQ,EAC7B,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC3C,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,CACH,MAAC,QAAQ,IAAC,IAAI,EAAE,CAAC,aACZ,MAAM,CAAC,IAAI,OAAG,MAAM,CAAC,KAAK,IACpB,CACd;gBACD,OAAO,EAAE,MAAM,CAAC,QAAQ;aAC3B,CAAC,CAAC,YAEF,WAAW,CAAC,KAAK,GACV,CACf;KACR,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Dispatch } from 'react';
2
+ import { IViewSettingsAction, IViewSettingsState } from './manage-view-settings/store-view-settings/viewSettingsReducer';
3
+ interface IUseSearchInputParams {
4
+ view: IViewSettingsState;
5
+ dispatch: Dispatch<IViewSettingsAction>;
6
+ }
7
+ export declare const useSearchInput: ({ view, dispatch }: IUseSearchInputParams) => {
8
+ searchInput: JSX.Element;
9
+ };
10
+ export {};