@leav/ui 0.3.6-4d50dfd → 0.3.6-50b62a3

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 (443) 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 +436 -94
  18. package/dist/_gqlTypes/index.js +254 -45
  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/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/index.js +5 -2
  34. package/dist/_utils/index.js.map +1 -1
  35. package/dist/_utils/interleaveElement.d.ts +1 -0
  36. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  37. package/dist/_utils/interleaveElement.js.map +1 -0
  38. package/dist/antdTheme/index.d.ts +0 -3
  39. package/dist/antdTheme/index.js +3 -42
  40. package/dist/antdTheme/index.js.map +1 -1
  41. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  42. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  43. package/dist/components/EditApplication/EditApplication.js +2 -2
  44. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  45. package/dist/components/EditApplication/_types.d.ts +2 -2
  46. package/dist/components/Explorer/DataView.d.ts +9 -1
  47. package/dist/components/Explorer/DataView.js +36 -36
  48. package/dist/components/Explorer/DataView.js.map +1 -1
  49. package/dist/components/Explorer/Explorer.d.ts +5 -3
  50. package/dist/components/Explorer/Explorer.js +57 -23
  51. package/dist/components/Explorer/Explorer.js.map +1 -1
  52. package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
  53. package/dist/components/Explorer/ExplorerTitle.js +28 -11
  54. package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
  55. package/dist/components/Explorer/IdCard.d.ts +7 -0
  56. package/dist/components/Explorer/IdCard.js +15 -0
  57. package/dist/components/Explorer/IdCard.js.map +1 -0
  58. package/dist/components/Explorer/TableCell.d.ts +8 -0
  59. package/dist/components/Explorer/TableCell.js +144 -0
  60. package/dist/components/Explorer/TableCell.js.map +1 -0
  61. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  62. package/dist/components/Explorer/TableTagGroup.js +30 -0
  63. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  64. package/dist/components/Explorer/_constants.d.ts +4 -0
  65. package/dist/components/Explorer/_constants.js +17 -0
  66. package/dist/components/Explorer/_constants.js.map +1 -0
  67. package/dist/components/Explorer/_queries/useExplorerData.d.ts +30 -6
  68. package/dist/components/Explorer/_queries/useExplorerData.js +175 -14
  69. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  70. package/dist/components/Explorer/_types.d.ts +53 -4
  71. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  72. package/dist/components/Explorer/conditionsHelper.js +16 -0
  73. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  74. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +4 -0
  75. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +47 -0
  76. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js.map +1 -0
  77. package/dist/components/Explorer/index.d.ts +1 -5
  78. package/dist/components/Explorer/index.js +1 -5
  79. package/dist/components/Explorer/index.js.map +1 -1
  80. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +2 -1
  81. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
  82. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  83. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
  84. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  85. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  86. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
  87. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
  88. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  89. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  90. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  91. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  92. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  93. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
  94. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  95. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  96. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  97. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  98. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  99. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +83 -0
  100. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  101. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  102. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  103. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  104. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  105. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
  106. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  107. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  108. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  109. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  110. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  111. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  112. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  113. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  114. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  115. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  116. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  117. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  118. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  119. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  120. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  121. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  122. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  123. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +71 -0
  124. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  125. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  126. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  127. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  128. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  129. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
  130. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  131. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  132. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
  133. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  134. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +11 -0
  135. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +100 -0
  136. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  137. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  138. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  139. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  140. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +2 -0
  141. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +1 -0
  142. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  143. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +7 -0
  144. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
  145. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  146. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
  147. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  148. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  149. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
  150. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
  151. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  152. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  153. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +2 -1
  154. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +70 -0
  155. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  156. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  157. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +113 -0
  158. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  159. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  160. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  161. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  162. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
  163. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +2 -6
  164. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  165. package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
  166. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  167. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
  168. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +24 -0
  169. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  170. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +145 -0
  171. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +199 -0
  172. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  173. package/dist/components/Explorer/useCreateAction.d.ts +4 -2
  174. package/dist/components/Explorer/useCreateAction.js +35 -2
  175. package/dist/components/Explorer/useCreateAction.js.map +1 -1
  176. package/dist/components/Explorer/useEditAction.js +8 -6
  177. package/dist/components/Explorer/useEditAction.js.map +1 -1
  178. package/dist/components/Explorer/usePagination.d.ts +7 -0
  179. package/dist/components/Explorer/usePagination.js +25 -0
  180. package/dist/components/Explorer/usePagination.js.map +1 -0
  181. package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
  182. package/dist/components/Explorer/usePrimaryActions.js +16 -17
  183. package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
  184. package/dist/components/Explorer/useRemoveAction.d.ts +12 -0
  185. package/dist/components/Explorer/useRemoveAction.js +90 -0
  186. package/dist/components/Explorer/useRemoveAction.js.map +1 -0
  187. package/dist/components/Explorer/useSearchInput.d.ts +10 -0
  188. package/dist/components/Explorer/useSearchInput.js +31 -0
  189. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  190. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  191. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  192. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  193. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  194. package/dist/components/Explorer/useViewSettingsReducer.js +126 -0
  195. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  196. package/dist/components/ExportModal/ExportModal.js +2 -2
  197. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  198. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  199. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  200. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  201. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  202. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  203. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  204. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
  205. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
  206. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  207. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  208. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
  209. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  210. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  211. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  212. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  213. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  214. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  215. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  216. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  217. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  218. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  219. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  220. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  221. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  222. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  223. package/dist/components/RecordEdition/EditRecord/EditRecord.js +9 -17
  224. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  225. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +16 -3
  226. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  227. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +10 -21
  228. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  229. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  230. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  231. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  232. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  233. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  234. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  235. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  236. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  237. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  238. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  239. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  240. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  241. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  242. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  243. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  244. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  245. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  246. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  247. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
  248. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  249. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  250. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  251. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  252. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  253. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +178 -186
  254. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  255. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  256. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
  257. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  258. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  259. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +73 -45
  260. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  261. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  262. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +35 -46
  263. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  264. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  265. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +11 -76
  266. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +32 -49
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  270. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  271. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +38 -54
  272. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  273. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  274. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +51 -63
  275. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  276. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  277. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -53
  278. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  279. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +17 -9
  280. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +67 -401
  281. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  282. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  283. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
  284. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  285. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  286. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +16 -0
  287. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  288. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  289. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  290. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
  291. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  292. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  293. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
  294. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  295. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  296. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  297. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
  298. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  299. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
  300. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  301. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  302. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  303. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +36 -3
  304. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  305. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  306. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  307. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  308. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  309. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  310. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  311. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  312. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  313. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  314. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
  315. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
  316. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  317. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +1 -13
  318. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
  319. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  320. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  321. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  322. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  323. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
  324. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  325. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  326. package/dist/components/SelectTreeNode/index.js +1 -1
  327. package/dist/components/SelectTreeNode/index.js.map +1 -1
  328. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  329. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  330. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  331. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  332. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  333. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  334. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  335. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  336. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  337. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  338. package/dist/constants.d.ts +3 -0
  339. package/dist/constants.js +3 -0
  340. package/dist/constants.js.map +1 -1
  341. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  342. package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
  343. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  344. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  345. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer → hooks/useExecuteSaveViewMutation}/index.js +1 -2
  346. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  347. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  348. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
  349. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  350. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  351. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  352. package/dist/locales/en/shared.json +71 -15
  353. package/dist/locales/fr/shared.json +71 -15
  354. package/dist/types/views.d.ts +4 -4
  355. package/package.json +7 -2
  356. package/dist/components/Explorer/edit-settings/ColumnItem.js +0 -62
  357. package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
  358. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
  359. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
  360. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  361. package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
  362. package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -76
  363. package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
  364. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  365. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
  366. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  367. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  368. package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
  369. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  370. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  371. package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
  372. package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.d.ts +0 -2
  373. package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js +0 -12
  374. package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js.map +0 -1
  375. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  376. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
  377. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
  378. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
  379. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  380. package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
  381. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  382. package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
  383. package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -42
  384. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -53
  385. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
  386. package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
  387. package/dist/components/Explorer/useDeactivateAction.js +0 -51
  388. package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
  389. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  390. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  391. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  392. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  393. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  394. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  395. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  396. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  397. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
  398. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  399. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
  400. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
  401. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
  402. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  403. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  404. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  405. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  406. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  407. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  408. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  409. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  410. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  411. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  412. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  413. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  414. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  415. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  416. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  417. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  418. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  419. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  420. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  421. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  422. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  423. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  424. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  425. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  426. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  427. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  428. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  429. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  430. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  431. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  432. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  433. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  434. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  435. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  436. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  437. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
  438. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  439. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  440. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  441. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
  442. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
  443. /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +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,KAAK;IACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;CAC7B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAwD,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAA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,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, IPrimaryAction } from './_types';
1
+ import { ActionHook, Entrypoint, IPrimaryAction } from './_types';
2
2
  /**
3
3
  * Hook used to get the action for `<DataView />` component.
4
4
  *
@@ -10,8 +10,10 @@ import { ActionHook, IPrimaryAction } 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 useCreateAction: ({ isEnabled, library, refetch }: ActionHook<{
13
+ export declare const useCreateAction: ({ isEnabled, library, entrypoint, itemsCount, refetch }: ActionHook<{
14
14
  library: string;
15
+ entrypoint: Entrypoint;
16
+ itemsCount: number;
15
17
  refetch: () => void;
16
18
  }>) => {
17
19
  createAction: IPrimaryAction;
@@ -6,6 +6,8 @@ import { useState } from 'react';
6
6
  import { FaPlus } from 'react-icons/fa';
7
7
  import { EditRecordModal } from '../../components';
8
8
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
9
+ import useSaveValueBatchMutation from '../../components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation';
10
+ import { useExplorerLinkAttributeQuery } from '../../_gqlTypes';
9
11
  /**
10
12
  * Hook used to get the action for `<DataView />` component.
11
13
  *
@@ -17,23 +19,54 @@ import { useSharedTranslation } from '../../hooks/useSharedTranslation';
17
19
  * @param library - the library's id to add new item
18
20
  * @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
19
21
  */
20
- export const useCreateAction = ({ isEnabled, library, refetch }) => {
22
+ export const useCreateAction = ({ isEnabled, library, entrypoint, itemsCount, refetch }) => {
21
23
  const { t } = useSharedTranslation();
22
24
  const [isRecordCreationVisible, setRecordCreationVisible] = useState(false);
25
+ const [multipleValues, setIsMultivalues] = useState(false);
26
+ const { saveValues } = useSaveValueBatchMutation();
27
+ useExplorerLinkAttributeQuery({
28
+ skip: entrypoint.type !== 'link',
29
+ variables: {
30
+ id: entrypoint.linkAttributeId
31
+ },
32
+ onCompleted: data => {
33
+ const attributeData = data?.attributes?.list?.[0];
34
+ if (!attributeData) {
35
+ throw new Error('Unknown link attribute');
36
+ }
37
+ setIsMultivalues(attributeData.multiple_values);
38
+ }
39
+ });
40
+ const canCreateRecord = entrypoint.type === 'library' ? true : multipleValues || itemsCount === 0;
23
41
  const createAction = {
24
42
  callback: () => {
25
43
  setRecordCreationVisible(true);
26
44
  },
27
45
  icon: _jsx(FaPlus, {}),
46
+ disabled: !canCreateRecord,
28
47
  label: t('explorer.create-one')
29
48
  };
30
49
  return {
31
50
  createAction: isEnabled ? createAction : null,
32
51
  createModal: isRecordCreationVisible ? (_jsx(EditRecordModal, { open: true, record: null, library: library, onClose: () => {
33
52
  setRecordCreationVisible(false);
34
- }, onCreate: () => {
53
+ }, onCreate: newRecord => {
35
54
  refetch();
36
55
  setRecordCreationVisible(false);
56
+ if (entrypoint.type === 'link') {
57
+ saveValues({
58
+ id: entrypoint.parentRecordId,
59
+ library: {
60
+ id: entrypoint.parentLibraryId
61
+ }
62
+ }, [
63
+ {
64
+ attribute: entrypoint.linkAttributeId,
65
+ idValue: null,
66
+ value: newRecord.id
67
+ }
68
+ ]);
69
+ }
37
70
  }, submitButtons: ['create'] })) : null
38
71
  };
39
72
  };
@@ -1 +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"}
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,gBA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AAC;QACnC,CAAC;QACD,IAAI,EAAE,KAAC,MAAM,KAAG;QAChB,QAAQ,EAAE,CAAC,eAAe;QAC1B,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,SAAS,CAAC,EAAE;gBAClB,OAAO,EAAE,CAAC;gBACV,wBAAwB,CAAC,KAAK,CAAC,CAAC;gBAChC,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;oBAC7B,UAAU,CACN;wBACI,EAAE,EAAE,UAAU,CAAC,cAAc;wBAC7B,OAAO,EAAE;4BACL,EAAE,EAAE,UAAU,CAAC,eAAe;yBACjC;qBACJ,EACD;wBACI;4BACI,SAAS,EAAE,UAAU,CAAC,eAAe;4BACrC,OAAO,EAAE,IAAI;4BACb,KAAK,EAAE,SAAS,CAAC,EAAE;yBACtB;qBACJ,CACJ,CAAC;gBACN,CAAC;YACL,CAAC,EACD,aAAa,EAAE,CAAC,QAAQ,CAAC,GAC3B,CACL,CAAC,CAAC,CAAC,IAAI;KACX,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,E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AAC;KACJ,CAAC;IAEF,MAAM,qBAAqB,GAAG,CAAC,IAAe,EAAE,EAAE;QAC9C,WAAW,CAAC;YACR,SAAS,EAAE;gBACP,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,YAAY,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"}
@@ -5,15 +5,7 @@ import { IPrimaryAction } from './_types';
5
5
  * Based on default actions and custom actions, it returns a primary with first action as "main" action and the others
6
6
  * in the dropdown accessible via a split button.
7
7
  *
8
- * When the creation is done, we refresh all data even if the new record will not be visible due to some filters.
9
- *
10
- * It returns also two parts : one for the call action button - one for displayed the modal required by the action.
11
- * It also returns the modal required for default actions (like create record).
12
- *
13
- * TODO: change params to match to signature
14
- * @param isEnabled - whether the action is present
15
- * @param library - the library's id to add new item
16
- * @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
8
+ * @param {Object[]} actions - list of actions to be display as one button: the primary action button
17
9
  */
18
10
  export declare const usePrimaryActionsButton: (actions: IPrimaryAction[]) => {
19
11
  primaryButton: JSX.Element;
@@ -1,29 +1,28 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { KitButton, KitSpace } from 'aristid-ds';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { FaEllipsisV } from 'react-icons/fa';
6
+ import { KitButton, KitDropDown, KitSpace } from 'aristid-ds';
3
7
  /**
4
8
  * Hook used to get the primary actions for `<DataView />` component.
5
9
  *
6
10
  * Based on default actions and custom actions, it returns a primary with first action as "main" action and the others
7
11
  * in the dropdown accessible via a split button.
8
12
  *
9
- * When the creation is done, we refresh all data even if the new record will not be visible due to some filters.
10
- *
11
- * It returns also two parts : one for the call action button - one for displayed the modal required by the action.
12
- * It also returns the modal required for default actions (like create record).
13
- *
14
- * TODO: change params to match to signature
15
- * @param isEnabled - whether the action is present
16
- * @param library - the library's id to add new item
17
- * @param refetch - method to call to refresh the list. New item will be visible if it matches filters and sorts
13
+ * @param {Object[]} actions - list of actions to be display as one button: the primary action button
18
14
  */
19
15
  export const usePrimaryActionsButton = (actions) => {
20
- const [mainAction, ...dropdownActions] = actions;
16
+ const [firstAction, ...dropdownActions] = actions;
21
17
  return {
22
- primaryButton: mainAction ? (_jsx(KitButton, { type: "primary", icon: mainAction.icon, onClick: mainAction.callback, items: dropdownActions.map((action, index) => ({
23
- key: index,
24
- label: (_jsxs(KitSpace, { size: 8, children: [action.icon, " ", action.label] })),
25
- onClick: action.callback
26
- })), children: mainAction.label })) : null
18
+ primaryButton: actions.length === 0 ? null : (_jsxs(_Fragment, { children: [_jsx(KitButton, { type: "primary", icon: firstAction.icon, disabled: firstAction.disabled, onClick: firstAction.callback, children: firstAction.label }), dropdownActions.length > 0 && (_jsx(KitDropDown, { trigger: ['click'], menu: {
19
+ items: dropdownActions.map((action, index) => ({
20
+ key: index,
21
+ label: (_jsxs(KitSpace, { size: 8, children: [action.icon, " ", action.label] })),
22
+ disabled: action.disabled,
23
+ onClick: action.callback
24
+ }))
25
+ }, children: _jsx(KitButton, { "data-testid": "actions-dropdown", type: "secondary", icon: _jsx(FaEllipsisV, {}) }) }))] }))
27
26
  };
28
27
  };
29
28
  //# sourceMappingURL=usePrimaryActions.js.map