@leav/ui 0.4.0-80a4e22 → 0.4.0-8a9f5492

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 (446) hide show
  1. package/README.md +1 -0
  2. package/dist/__mocks__/common/form.js +5 -1
  3. package/dist/__mocks__/common/form.js.map +1 -1
  4. package/dist/__mocks__/common/value.d.ts +1 -2
  5. package/dist/__mocks__/common/value.js +0 -11
  6. package/dist/__mocks__/common/value.js.map +1 -1
  7. package/dist/_gqlTypes/index.d.ts +1449 -172
  8. package/dist/_gqlTypes/index.js +424 -42
  9. package/dist/_gqlTypes/index.js.map +1 -1
  10. package/dist/_queries/attributes/attributeDetailsFragment.js +1 -0
  11. package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
  12. package/dist/_queries/records/activateRecordsMutation.d.ts +1 -0
  13. package/dist/_queries/records/activateRecordsMutation.js +15 -0
  14. package/dist/_queries/records/activateRecordsMutation.js.map +1 -0
  15. package/dist/_queries/records/getRecordFormQuery.js +13 -0
  16. package/dist/_queries/records/getRecordFormQuery.js.map +1 -1
  17. package/dist/_queries/trees/treeNodeChildrenQuery.js +12 -2
  18. package/dist/_queries/trees/treeNodeChildrenQuery.js.map +1 -1
  19. package/dist/_utils/attributeType.d.ts +2 -1
  20. package/dist/_utils/attributeType.js +2 -1
  21. package/dist/_utils/attributeType.js.map +1 -1
  22. package/dist/components/CreateDirectory/CreateDirectory.js +4 -4
  23. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  24. package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.js +3 -2
  25. package/dist/components/EditLibraryModal/EditLibrary/EditLibraryAttributes/AttributesList/DeleteButton/DeleteButton.js.map +1 -1
  26. package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js +8 -1
  27. package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/TreeLibrariesForm/TreeLibrariesForm.js.map +1 -1
  28. package/dist/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.d.ts +2 -2
  29. package/dist/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.js +4 -3
  30. package/dist/components/ErrorBoundary/ErrorBoundaryContent/ErrorBoundaryContent.js.map +1 -1
  31. package/dist/components/Explorer/DataView.d.ts +2 -1
  32. package/dist/components/Explorer/DataView.js +32 -12
  33. package/dist/components/Explorer/DataView.js.map +1 -1
  34. package/dist/components/Explorer/Explorer.d.ts +10 -6
  35. package/dist/components/Explorer/Explorer.js +36 -13
  36. package/dist/components/Explorer/Explorer.js.map +1 -1
  37. package/dist/components/Explorer/ExplorerToolbar.d.ts +2 -1
  38. package/dist/components/Explorer/ExplorerToolbar.js +5 -4
  39. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
  40. package/dist/components/Explorer/IdCard.js +1 -1
  41. package/dist/components/Explorer/IdCard.js.map +1 -1
  42. package/dist/components/Explorer/TableCell.js +22 -11
  43. package/dist/components/Explorer/TableCell.js.map +1 -1
  44. package/dist/components/Explorer/TableTagGroup.d.ts +0 -1
  45. package/dist/components/Explorer/TableTagGroup.js +3 -16
  46. package/dist/components/Explorer/TableTagGroup.js.map +1 -1
  47. package/dist/components/Explorer/_constants.d.ts +3 -0
  48. package/dist/components/Explorer/_constants.js +3 -0
  49. package/dist/components/Explorer/_constants.js.map +1 -1
  50. package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +1 -1
  51. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +82 -31
  52. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -1
  53. package/dist/components/Explorer/_queries/useExplorerData.d.ts +1 -0
  54. package/dist/components/Explorer/_queries/useExplorerData.js +45 -30
  55. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  56. package/dist/components/Explorer/_types.d.ts +47 -6
  57. package/dist/components/Explorer/_types.js +1 -0
  58. package/dist/components/Explorer/_types.js.map +1 -1
  59. package/dist/components/Explorer/actions-item/useEditItemAction.d.ts +2 -1
  60. package/dist/components/Explorer/actions-item/useEditItemAction.js +6 -4
  61. package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -1
  62. package/dist/components/Explorer/actions-item/{useRemoveItemAction.d.ts → useEditStatusItemAction.d.ts} +4 -2
  63. package/dist/components/Explorer/actions-item/{useRemoveItemAction.js → useEditStatusItemAction.js} +81 -24
  64. package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -0
  65. package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +22 -0
  66. package/dist/components/Explorer/actions-item/useReplaceItemAction.js +42 -0
  67. package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -0
  68. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.d.ts +2 -1
  69. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +12 -3
  70. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
  71. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +5 -5
  72. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
  73. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +6 -1
  74. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +26 -21
  75. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
  76. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +7 -1
  77. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +7 -5
  78. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
  79. package/dist/components/Explorer/link-item/LinkModal.d.ts +5 -0
  80. package/dist/components/Explorer/link-item/LinkModal.js +55 -5
  81. package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
  82. package/dist/components/Explorer/link-item/{useLinkMassAction.d.ts → useAddLinkMassAction.d.ts} +1 -1
  83. package/dist/components/Explorer/link-item/{useLinkMassAction.js → useAddLinkMassAction.js} +2 -2
  84. package/dist/components/Explorer/link-item/useAddLinkMassAction.js.map +1 -0
  85. package/dist/components/Explorer/link-item/useReplaceLinkMassAction.d.ts +23 -0
  86. package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js +35 -0
  87. package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js.map +1 -0
  88. package/dist/components/Explorer/list-saved-views/SavedViews.js +32 -42
  89. package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -1
  90. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +1 -1
  91. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
  92. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +11 -9
  93. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -1
  94. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +4 -0
  95. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +26 -2
  96. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -1
  97. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +10 -7
  98. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
  99. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +2 -2
  100. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
  101. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +5 -1
  102. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
  103. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.d.ts +3 -0
  104. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js +69 -0
  105. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -0
  106. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +6 -1
  107. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +2 -0
  108. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +31 -4
  109. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
  110. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +1 -1
  111. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
  112. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +2 -2
  113. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
  114. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +1 -1
  115. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
  116. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js +1 -1
  117. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js.map +1 -1
  118. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +19 -8
  119. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
  120. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +1 -1
  121. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
  122. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.d.ts +5 -0
  123. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +47 -0
  124. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js.map +1 -0
  125. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.d.ts +5 -0
  126. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +48 -0
  127. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js.map +1 -0
  128. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +1 -1
  129. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
  130. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +1 -1
  131. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
  132. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +1 -0
  133. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +5 -3
  134. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
  135. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +11 -3
  136. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +68 -12
  137. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
  138. package/dist/components/Explorer/useColumnWidth.js +2 -1
  139. package/dist/components/Explorer/useColumnWidth.js.map +1 -1
  140. package/dist/components/Explorer/useLoadView.d.ts +1 -1
  141. package/dist/components/Explorer/useLoadView.js +31 -35
  142. package/dist/components/Explorer/useLoadView.js.map +1 -1
  143. package/dist/components/Explorer/usePagination.d.ts +2 -1
  144. package/dist/components/Explorer/usePagination.js.map +1 -1
  145. package/dist/components/Explorer/useSearchInput.d.ts +3 -1
  146. package/dist/components/Explorer/useSearchInput.js +4 -1
  147. package/dist/components/Explorer/useSearchInput.js.map +1 -1
  148. package/dist/components/Explorer/useViewSettingsReducer.d.ts +1 -1
  149. package/dist/components/Explorer/useViewSettingsReducer.js +43 -19
  150. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
  151. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +1 -1
  152. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  153. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js +1 -0
  154. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +1 -1
  155. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +3 -3
  156. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  157. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.js +2 -2
  158. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.utils.js.map +1 -1
  159. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.d.ts +4 -0
  160. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js +4 -1
  161. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js.map +1 -1
  162. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js +3 -3
  163. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js.map +1 -1
  164. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +4 -5
  165. package/dist/components/RecordEdition/EditRecord/EditRecord.js +84 -239
  166. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  167. package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.d.ts +2 -0
  168. package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.js +43 -0
  169. package/dist/components/RecordEdition/EditRecordButtons/EditRecordButtons.js.map +1 -0
  170. package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.d.ts +2 -0
  171. package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.js +25 -0
  172. package/dist/components/RecordEdition/EditRecordButtons/SidebarButton.js.map +1 -0
  173. package/dist/components/RecordEdition/EditRecordButtons/index.d.ts +2 -0
  174. package/dist/components/RecordEdition/{EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList → EditRecordButtons}/index.js +2 -2
  175. package/dist/components/RecordEdition/EditRecordButtons/index.js.map +1 -0
  176. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -1
  177. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +25 -23
  178. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  179. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -11
  180. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  181. package/dist/components/RecordEdition/EditRecordContent/formConstants.d.ts +1 -0
  182. package/dist/components/RecordEdition/EditRecordContent/formConstants.js +1 -0
  183. package/dist/components/RecordEdition/EditRecordContent/formConstants.js.map +1 -1
  184. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.d.ts +5 -0
  185. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js +28 -0
  186. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js.map +1 -0
  187. package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.d.ts +11 -0
  188. package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js +35 -0
  189. package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js.map +1 -0
  190. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
  191. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  192. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  193. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.js.map +1 -1
  194. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.d.ts +2 -1
  195. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js +6 -9
  196. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js.map +1 -1
  197. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.d.ts +1 -1
  198. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +40 -12
  199. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js.map +1 -1
  200. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.d.ts +8 -2
  201. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +76 -92
  202. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  203. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.d.ts +3 -0
  204. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js +9 -0
  205. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js.map +1 -0
  206. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.d.ts +22 -0
  207. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js +85 -0
  208. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +1 -0
  209. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.d.ts +24 -0
  210. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +76 -0
  211. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -0
  212. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.d.ts +265 -0
  213. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js +13 -0
  214. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js.map +1 -0
  215. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.d.ts +4 -0
  216. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js +23 -0
  217. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js.map +1 -0
  218. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +47 -55
  219. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  220. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +1 -2
  221. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  222. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +1 -2
  223. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  224. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +1 -2
  225. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  226. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +2 -5
  227. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  228. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +1 -2
  229. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  230. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +1 -2
  231. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  232. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +1 -2
  233. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  234. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +1 -2
  235. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  236. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +2 -3
  237. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +2 -3
  238. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  239. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +5 -8
  240. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
  241. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +1 -2
  242. package/dist/components/RecordEdition/EditRecordContent/uiElements/TextBlock/TextBlock.js.map +1 -1
  243. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +3 -1
  244. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +64 -217
  245. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  246. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.d.ts +265 -0
  247. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.js +13 -0
  248. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.js.map +1 -0
  249. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.d.ts +11 -0
  250. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js +51 -0
  251. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js.map +1 -0
  252. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.d.ts +11 -0
  253. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +5 -0
  254. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -0
  255. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +27 -0
  256. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +43 -0
  257. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -0
  258. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.d.ts +25 -0
  259. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +132 -0
  260. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -0
  261. package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/ComputeIndicator.d.ts +4 -2
  262. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map +1 -0
  263. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/DeleteAllValuesButton.d.ts +8 -0
  264. package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/DeleteAllValuesButton.js +2 -2
  265. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/DeleteAllValuesButton.js.map +1 -0
  266. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/calculatedInheritedFlags.js.map +1 -0
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.d.ts +15 -0
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +72 -0
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js.map +1 -0
  270. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +4 -0
  271. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +71 -53
  272. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  273. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +3 -1
  274. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +30 -10
  275. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  276. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +2 -2
  277. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -1
  278. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +0 -1
  279. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +18 -12
  280. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  281. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +3 -0
  282. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
  283. package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js +2 -2
  284. package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js.map +1 -1
  285. package/dist/components/RecordEdition/constants.d.ts +2 -0
  286. package/dist/components/RecordEdition/constants.js +6 -0
  287. package/dist/components/RecordEdition/constants.js.map +1 -0
  288. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +30 -7
  289. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +66 -6
  290. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
  291. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +1 -1
  292. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js +3 -3
  293. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
  294. package/dist/components/RecordEdition/index.d.ts +3 -0
  295. package/dist/components/RecordEdition/index.js +3 -0
  296. package/dist/components/RecordEdition/index.js.map +1 -1
  297. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +6 -1
  298. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +12 -8
  299. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
  300. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +8 -2
  301. package/dist/components/SelectTreeNode/SelectTreeNode.js +4 -5
  302. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  303. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +8 -2
  304. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +73 -51
  305. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
  306. package/dist/components/SelectTreeNode/SelectTreeNodeContentSkeleton.d.ts +2 -0
  307. package/dist/components/SelectTreeNode/SelectTreeNodeContentSkeleton.js +17 -0
  308. package/dist/components/SelectTreeNode/SelectTreeNodeContentSkeleton.js.map +1 -0
  309. package/dist/components/SelectTreeNode/TreeNodeTitle.d.ts +9 -0
  310. package/dist/components/SelectTreeNode/TreeNodeTitle.js +8 -0
  311. package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -0
  312. package/dist/components/SelectTreeNode/_types.d.ts +18 -0
  313. package/dist/components/SelectTreeNode/_types.js +2 -0
  314. package/dist/components/SelectTreeNode/_types.js.map +1 -0
  315. package/dist/components/{SelectTreeNodeModal/SelectTreeNodeModal.d.ts → SelectTreeNodeModalOld/SelectTreeNodeModalOld.d.ts} +1 -1
  316. package/dist/components/{SelectTreeNodeModal/SelectTreeNodeModal.js → SelectTreeNodeModalOld/SelectTreeNodeModalOld.js} +5 -3
  317. package/dist/components/SelectTreeNodeModalOld/SelectTreeNodeModalOld.js.map +1 -0
  318. package/dist/components/SelectTreeNodeModalOld/index.d.ts +1 -0
  319. package/dist/components/{RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd → SelectTreeNodeModalOld}/index.js +1 -2
  320. package/dist/components/SelectTreeNodeModalOld/index.js.map +1 -0
  321. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.d.ts +1 -1
  322. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundary.js.map +1 -1
  323. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.d.ts +2 -2
  324. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.js +6 -3
  325. package/dist/components/SimpleErrorBoundary/SimpleErrorBoundaryContent/SimpleErrorBoundaryContent.js.map +1 -1
  326. package/dist/components/UploadFiles/UploadFiles.js +4 -4
  327. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  328. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  329. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  330. package/dist/components/index.d.ts +1 -2
  331. package/dist/components/index.js +1 -2
  332. package/dist/components/index.js.map +1 -1
  333. package/dist/constants.d.ts +3 -1
  334. package/dist/constants.js +3 -1
  335. package/dist/constants.js.map +1 -1
  336. package/dist/contexts/LangContext/LangContext.d.ts +1 -2
  337. package/dist/contexts/LangContext/LangContext.js +2 -2
  338. package/dist/contexts/LangContext/LangContext.js.map +1 -1
  339. package/dist/hooks/index.d.ts +3 -0
  340. package/dist/hooks/index.js +3 -0
  341. package/dist/hooks/index.js.map +1 -1
  342. package/dist/hooks/useAppLang/useAppLang.js.map +1 -1
  343. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -1
  344. package/dist/hooks/useGetRecordForm/useGetRecordForm.js +3 -3
  345. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  346. package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +15 -0
  347. package/dist/hooks/useIFrameMessenger/messageHandlers.js +121 -0
  348. package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -0
  349. package/dist/hooks/useIFrameMessenger/schema.d.ts +21 -0
  350. package/dist/hooks/useIFrameMessenger/schema.js +76 -0
  351. package/dist/hooks/useIFrameMessenger/schema.js.map +1 -0
  352. package/dist/hooks/useIFrameMessenger/types.d.ts +120 -0
  353. package/dist/hooks/useIFrameMessenger/types.js +2 -0
  354. package/dist/hooks/useIFrameMessenger/types.js.map +1 -0
  355. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +19 -0
  356. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +108 -0
  357. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -0
  358. package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.d.ts +7 -0
  359. package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js +13 -0
  360. package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js.map +1 -0
  361. package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +13 -0
  362. package/dist/{components/RecordEdition/EditRecord/creationErrorContext.js → hooks/useIFrameMessengerClient/iFrameMessengerClientContext.js} +2 -3
  363. package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.js.map +1 -0
  364. package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +13 -0
  365. package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.js +13 -0
  366. package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.js.map +1 -0
  367. package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js +1 -1
  368. package/dist/hooks/useRedirectToLogin/useRedirectToLogin.js.map +1 -1
  369. package/dist/locales/en/shared.json +34 -13
  370. package/dist/locales/fr/shared.json +33 -12
  371. package/dist/types/attributes.d.ts +2 -1
  372. package/dist/types/trees.d.ts +1 -0
  373. package/package.json +24 -9
  374. package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +0 -1
  375. package/dist/components/Explorer/link-item/useLinkMassAction.js.map +0 -1
  376. package/dist/components/RecordEdition/EditRecord/creationErrorContext.d.ts +0 -6
  377. package/dist/components/RecordEdition/EditRecord/creationErrorContext.js.map +0 -1
  378. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +0 -5
  379. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +0 -28
  380. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +0 -1
  381. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.d.ts +0 -121
  382. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +0 -31
  383. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +0 -1
  384. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.d.ts +0 -14
  385. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.js +0 -29
  386. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/FloatingMenuHandler.js.map +0 -1
  387. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/index.d.ts +0 -2
  388. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/index.js +0 -6
  389. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/FloatingMenuHandler/index.js.map +0 -1
  390. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -20
  391. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +0 -53
  392. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +0 -1
  393. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.d.ts +0 -19
  394. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.js +0 -111
  395. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/useGetOptionsQuery.js.map +0 -1
  396. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -20
  397. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +0 -71
  398. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +0 -1
  399. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.d.ts +0 -14
  400. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.js +0 -58
  401. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/useGetOptionsQuery.js.map +0 -1
  402. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.d.ts +0 -6
  403. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.js +0 -11
  404. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/RecordIdentityCell.js.map +0 -1
  405. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/index.d.ts +0 -2
  406. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/index.js +0 -6
  407. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/RecordIdentityCell/index.js.map +0 -1
  408. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.d.ts +0 -13
  409. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.js +0 -50
  410. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/QuickSearch.js.map +0 -1
  411. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/index.d.ts +0 -2
  412. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/index.js +0 -6
  413. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/QuickSearch/index.js.map +0 -1
  414. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.d.ts +0 -9
  415. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.js +0 -215
  416. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/ValuesAdd.js.map +0 -1
  417. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/index.d.ts +0 -2
  418. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/ValuesAdd/index.js.map +0 -1
  419. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +0 -1
  420. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +0 -4
  421. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +0 -1
  422. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.d.ts +0 -16
  423. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js +0 -35
  424. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js.map +0 -1
  425. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.d.ts +0 -2
  426. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.js.map +0 -1
  427. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +0 -1
  428. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.d.ts +0 -10
  429. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.js +0 -50
  430. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/TreeFieldValue.js.map +0 -1
  431. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/index.d.ts +0 -2
  432. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/index.js +0 -6
  433. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeFieldValue/index.js.map +0 -1
  434. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.d.ts +0 -9
  435. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +0 -106
  436. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +0 -1
  437. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/index.d.ts +0 -2
  438. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/index.js +0 -6
  439. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/index.js.map +0 -1
  440. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +0 -1
  441. package/dist/components/SelectTreeNodeModal/index.d.ts +0 -1
  442. package/dist/components/SelectTreeNodeModal/index.js +0 -5
  443. package/dist/components/SelectTreeNodeModal/index.js.map +0 -1
  444. /package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/ComputeIndicator.js +0 -0
  445. /package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/calculatedInheritedFlags.d.ts +0 -0
  446. /package/dist/components/RecordEdition/EditRecordContent/uiElements/{StandardField → shared}/calculatedInheritedFlags.js +0 -0
@@ -1,103 +1,87 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import { localizedTranslation } from '@leav/utils';
6
- import { useContext, useEffect, useReducer } from 'react';
7
- import CreationErrorContext from '../../../../../components/RecordEdition/EditRecord/creationErrorContext';
6
+ import { useState } from 'react';
8
7
  import { useEditRecordReducer } from '../../../../../components/RecordEdition/editRecordReducer/useEditRecordReducer';
9
- import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
10
- import { arrayValueVersionToObject } from '../../../../../_utils';
11
- import getActiveFieldValues from '../../helpers/getActiveFieldValues';
12
- import { useRecordEditionContext } from '../../hooks/useRecordEditionContext';
13
- import linkFieldReducer from '../../reducers/linkFieldReducer';
14
- import { computeInitialState, LinkFieldReducerActionsType } from '../../reducers/linkFieldReducer/linkFieldReducer';
15
- import { APICallStatus } from '../../_types';
16
- import { MonoValueSelect } from '../../../../../components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect';
17
- import { AntForm } from 'aristid-ds';
18
- import { MultiValueSelect } from './MultiValueSelect/MultiValueSelect';
8
+ import { AntForm, KitInputWrapper } from 'aristid-ds';
19
9
  import { useLang } from '../../../../../hooks';
20
- const LinkField = ({ element, onValueSubmit, onValueDelete }) => {
21
- const { t } = useSharedTranslation();
22
- const { lang } = useLang();
23
- const { readOnly: isRecordReadOnly, record } = useRecordEditionContext();
24
- const { state: editRecordState } = useEditRecordReducer();
25
- const creationErrors = useContext(CreationErrorContext);
26
- const [state, dispatch] = useReducer(linkFieldReducer, computeInitialState({
27
- element,
28
- formVersion: editRecordState.valuesVersion,
29
- isRecordReadOnly,
30
- record
31
- }));
32
- const attribute = state.attribute;
33
- const activeValues = getActiveFieldValues(state);
34
- const activeVersion = state.values[state.activeScope].version;
35
- useEffect(() => {
36
- if (creationErrors[attribute.id]) {
37
- dispatch({
38
- type: LinkFieldReducerActionsType.SET_ERROR_MESSAGE,
39
- errorMessage: creationErrors[attribute.id].map(err => err.message).join(' ')
40
- });
41
- }
42
- }, [creationErrors, attribute.id]);
43
- const _handleDeleteValue = async (value) => {
44
- const deleteRes = await onValueDelete({ payload: value.linkValue.id, id_value: value.id_value }, attribute.id);
45
- if (deleteRes.status === APICallStatus.SUCCESS) {
46
- dispatch({
47
- type: LinkFieldReducerActionsType.DELETE_VALUE,
48
- idValue: value.id_value
49
- });
50
- }
51
- };
52
- const _handleUpdateValueSubmit = async (values) => {
53
- const valuesToSave = values.map(value => ({
54
- attribute,
55
- idValue: value.idValue,
56
- value: value.value
57
- }));
58
- const res = await onValueSubmit(valuesToSave, activeVersion);
59
- if (res.status === APICallStatus.ERROR) {
60
- dispatch({
61
- type: LinkFieldReducerActionsType.SET_ERROR_MESSAGE,
62
- errorMessage: res.error
63
- });
10
+ import styled from 'styled-components';
11
+ import { LINK_FIELD_ID_PREFIX } from '../../../../../constants';
12
+ import { computeCalculatedFlags, computeInheritedFlags } from '../shared/calculatedInheritedFlags';
13
+ import { ComputeIndicator } from '../shared/ComputeIndicator';
14
+ import { useOutsideInteractionDetector } from '../shared/useOutsideInteractionDetector';
15
+ import { useLinkRecords } from './link-record/useLinkRecords';
16
+ import { CREATE_RECORD_MODAL_CLASSNAME, EDIT_RECORD_MODAL_CLASSNAME, LINK_RECORDS_MODAL_CLASSNAME } from '../../../../../components/Explorer/_constants';
17
+ const Wrapper = styled.div `
18
+ margin-bottom: ${props => (props.$metadataEdit ? 0 : '1.5em')};
19
+ `;
20
+ const KitInputExtraAlignLeft = styled.div `
21
+ margin-right: auto;
22
+ line-height: 12px;
23
+ `;
24
+ const KitInputWrapperStyled = styled(KitInputWrapper) `
25
+ &.disabled {
26
+ .kit-input-wrapper-content {
27
+ background-color: var(--general-utilities-neutral-light);
64
28
  }
65
- else if (res.values) {
66
- const formattedValues = res.values.map(v => ({
67
- ...v,
68
- version: arrayValueVersionToObject(v.version),
69
- metadata: v.metadata?.map(metadata => ({
70
- ...metadata,
71
- value: {
72
- ...metadata.value,
73
- version: arrayValueVersionToObject(metadata.value?.version ?? [])
74
- }
75
- }))
76
- }));
77
- dispatch({
78
- type: LinkFieldReducerActionsType.ADD_VALUES,
79
- values: formattedValues
80
- });
29
+ }
30
+
31
+ &.error:not(.disabled) {
32
+ .kit-input-wrapper-content {
33
+ background-color: var(--general-utilities-error-light);
81
34
  }
82
- if (res?.errors?.length) {
83
- const selectedRecordsById = values.reduce((acc, cur) => ({ ...acc, [cur.value.id]: cur.value }), {});
84
- const errorsMessage = res.errors.map(err => {
85
- const linkedRecordLabel = selectedRecordsById[err.input].label || selectedRecordsById[err.input].id;
86
- return `${linkedRecordLabel}: ${err.message}`;
87
- });
88
- dispatch({
89
- type: LinkFieldReducerActionsType.SET_ERROR_MESSAGE,
90
- errorMessage: errorsMessage
91
- });
92
- }
93
- };
94
- const label = localizedTranslation(state.formElement.settings.label, lang);
95
- return (_jsx(AntForm.Item, { name: attribute.id, rules: [
96
- {
97
- required: state.formElement.attribute.required,
98
- message: t('errors.standard_field_required')
99
- }
100
- ], children: attribute.multiple_values === true ? (_jsx(MultiValueSelect, { activeValues: activeValues, attribute: attribute, label: label, required: state.formElement.attribute.required, onValueDeselect: _handleDeleteValue, onSelectChange: _handleUpdateValueSubmit })) : (_jsx(MonoValueSelect, { activeValue: activeValues[0], attribute: attribute, label: label, required: state.formElement.attribute.required, onSelectClear: _handleDeleteValue, onSelectChange: _handleUpdateValueSubmit })) }));
35
+ }
36
+
37
+ .ant-empty-image,
38
+ .ant-empty-description {
39
+ display: none;
40
+ }
41
+ `;
42
+ const LinkField = ({ element, readonly, isFormCreationMode, onDeleteMultipleValues, metadataEdit = false }) => {
43
+ const { state, dispatch } = useEditRecordReducer();
44
+ const { lang } = useLang();
45
+ const { settings, attribute, joinLibraryContext } = element;
46
+ const [backendValues, setBackendValues] = useState(element.values);
47
+ const calculatedFlags = computeCalculatedFlags(backendValues);
48
+ const inheritedFlags = computeInheritedFlags(backendValues);
49
+ const form = AntForm.useFormInstance();
50
+ const label = localizedTranslation(settings.label, lang);
51
+ const fieldErrors = form.getFieldError(attribute.id);
52
+ const columnsToDisplay = settings.columns?.map(({ id }) => id);
53
+ const isReadOnly = attribute.readonly || !attribute.permissions.edit_value || readonly;
54
+ const isFieldInError = fieldErrors.length > 0;
55
+ useOutsideInteractionDetector({
56
+ attribute,
57
+ activeAttribute: state.activeAttribute,
58
+ attributePrefix: LINK_FIELD_ID_PREFIX,
59
+ dispatch,
60
+ backendValues,
61
+ allowedSelectors: [
62
+ 'div[role="status"]:has(.kit-snackbar-message)',
63
+ '.kit-modal-wrapper',
64
+ `.${CREATE_RECORD_MODAL_CLASSNAME}`,
65
+ `.${LINK_RECORDS_MODAL_CLASSNAME}`,
66
+ `.${EDIT_RECORD_MODAL_CLASSNAME}`,
67
+ '.kit-select-dropdown-content'
68
+ ]
69
+ });
70
+ const { UnlinkAllRecords, LinkRecordsExplorer } = useLinkRecords({
71
+ libraryId: state.libraryId,
72
+ recordId: state.record?.id,
73
+ isFormCreationMode,
74
+ attribute,
75
+ joinLibraryContext,
76
+ columnsToDisplay,
77
+ backendValues,
78
+ setBackendValues,
79
+ isReadOnly,
80
+ isFieldInError,
81
+ hasNoValue: backendValues.length === 0,
82
+ onDeleteMultipleValues
83
+ });
84
+ return (_jsx(Wrapper, { "$metadataEdit": metadataEdit, children: _jsx(AntForm.Item, { name: attribute.id, noStyle: true, children: _jsx(KitInputWrapperStyled, { id: LINK_FIELD_ID_PREFIX + attribute.id, "data-testid": "link-field", label: label, required: attribute.required, bordered: true, disabled: isReadOnly, status: isFieldInError ? 'error' : undefined, helper: isFieldInError ? String(fieldErrors[0]) : undefined, extra: _jsxs(_Fragment, { children: [_jsx(KitInputExtraAlignLeft, { children: _jsx(ComputeIndicator, { calculatedFlags: calculatedFlags, inheritedFlags: inheritedFlags }) }), UnlinkAllRecords] }), children: LinkRecordsExplorer }) }) }));
101
85
  };
102
86
  export default LinkField;
103
87
  //# sourceMappingURL=LinkField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinkField.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAwB,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACxE,OAAO,EAA6B,UAAU,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,OAAO,CAAC;AACpF,OAAO,oBAAoB,MAAM,8DAA8D,CAAC;AAChG,OAAO,EAAC,oBAAoB,EAAC,MAAM,qEAAqE,CAAC;AAEzG,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAIpE,OAAO,EAAC,yBAAyB,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAC,uBAAuB,EAAC,MAAM,qCAAqC,CAAC;AAC5E,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EACH,mBAAmB,EAGnB,2BAA2B,EAC9B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAoB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,qGAAqG,CAAC;AACpI,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAKlC,MAAM,SAAS,GAAgE,CAAC,EAC5E,OAAO,EACP,aAAa,EACb,aAAa,EAChB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,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YAEA,SAAS,CAAC,eAAe,KAAK,IAAI,CAAC,CAAC,CAAC,CAClC,KAAC,gBAAgB,IACb,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9C,eAAe,EAAE,kBAAkB,EACnC,cAAc,EAAE,wBAAwB,GAC1C,CACL,CAAC,CAAC,CAAC,CACA,KAAC,eAAe,IACZ,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,EAC5B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9C,aAAa,EAAE,kBAAkB,EACjC,cAAc,EAAE,wBAAwB,GAC1C,CACL,GACU,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"LinkField.js","sourceRoot":"","sources":["../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAA+B,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qEAAqE,CAAC;AAKzG,OAAO,EAAC,OAAO,EAAE,eAAe,EAAC,MAAM,YAAY,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,sBAAsB,EAAE,qBAAqB,EAAC,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EA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E,UAAU,EACpB,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAC5C,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAC3D,KAAK,EACD,8BACI,KAAC,sBAAsB,cACnB,KAAC,gBAAgB,IAAC,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,GAAI,GACjE,EACxB,gBAAgB,IAClB,YAGN,mBAAmB,GACA,GACb,GACT,CACb,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const ActionButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("aristid-ds/dist/Kit/General/Button/types").IKitButton & import("react").RefAttributes<HTMLElement>, {
2
+ $hasNoValue: boolean;
3
+ }>> & import("aristid-ds/dist/Kit/General/Button/types").KitButtonCompoundedComponent;
@@ -0,0 +1,9 @@
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 { KitButton } from 'aristid-ds';
5
+ import styled from 'styled-components';
6
+ export const ActionButton = styled(KitButton) `
7
+ margin-top: ${props => (props.$hasNoValue ? 0 : 'calc((var(--general-spacing-xs)) * 1px)')};
8
+ `;
9
+ //# sourceMappingURL=ActionButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionButton.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAwB;kBACnD,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,yCAAyC,CAAC;CAC7F,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { RecordFilterInput, RecordFormAttributeLinkAttributeFragment } from '../../../../../../_gqlTypes';
2
+ import { DeleteMultipleValuesFunc, ISubmitMultipleResult } from '../../../_types';
3
+ import { Dispatch, SetStateAction } from 'react';
4
+ import { IItemData, MassSelection } from '../../../../../../components/Explorer/_types';
5
+ import { RecordFormElementsValueLinkValue } from '../../../../../../hooks/useGetRecordForm';
6
+ interface IUseExplorerLinkRecordsProps {
7
+ attribute: RecordFormAttributeLinkAttributeFragment;
8
+ backendValues: RecordFormElementsValueLinkValue[];
9
+ setBackendValues: Dispatch<SetStateAction<RecordFormElementsValueLinkValue[]>>;
10
+ onDeleteMultipleValues: DeleteMultipleValuesFunc;
11
+ }
12
+ export declare const useExplorerLinkRecords: ({ attribute, backendValues, setBackendValues, onDeleteMultipleValues }: IUseExplorerLinkRecordsProps) => {
13
+ handleDeleteAllValues: () => Promise<void>;
14
+ handleExplorerRemoveValue: (item: IItemData) => void;
15
+ handleExplorerMassDeactivateValues: (_massSelectedFilter: RecordFilterInput[], massSelection: MassSelection) => void;
16
+ handleExplorerLinkValue: (saveValuesResult: ISubmitMultipleResult) => void;
17
+ handleExplorerCreateValue: ({ recordIdCreated, saveValuesResultOnLink }: {
18
+ recordIdCreated: string;
19
+ saveValuesResultOnLink?: ISubmitMultipleResult;
20
+ }) => void;
21
+ };
22
+ export {};
@@ -0,0 +1,85 @@
1
+ import { APICallStatus } from '../../../_types';
2
+ import { AntForm } from 'aristid-ds';
3
+ import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
4
+ import { ErrorTypes } from '@leav/utils';
5
+ export const useExplorerLinkRecords = ({ attribute, backendValues, setBackendValues, onDeleteMultipleValues }) => {
6
+ const { t } = useSharedTranslation();
7
+ const form = AntForm.useFormInstance();
8
+ const removeValues = (filterFn, useIdValue = false) => {
9
+ if (!filterFn) {
10
+ form.setFieldValue(attribute.id, []);
11
+ form.setFields([
12
+ {
13
+ name: attribute.id,
14
+ errors: attribute.required ? [t('errors.standard_field_required')] : []
15
+ }
16
+ ]);
17
+ setBackendValues([]);
18
+ return;
19
+ }
20
+ const newBackendValues = backendValues.filter(backendValue => filterFn(useIdValue ? backendValue.id_value : backendValue.linkValue.id));
21
+ form.setFieldValue(attribute.id, newBackendValues.map(({ linkValue }) => linkValue.id));
22
+ form.setFields([
23
+ {
24
+ name: attribute.id,
25
+ errors: attribute.required && newBackendValues.length === 0 ? [t('errors.standard_field_required')] : []
26
+ }
27
+ ]);
28
+ setBackendValues(previousBackendValues => previousBackendValues.filter(backendValue => filterFn(useIdValue ? backendValue.id_value : backendValue.linkValue.id)));
29
+ };
30
+ const handleDeleteAllValues = async () => {
31
+ const deleteRes = await onDeleteMultipleValues(attribute.id, backendValues.filter(backendValue => backendValue.id_value), null);
32
+ if (deleteRes.status === APICallStatus.SUCCESS) {
33
+ removeValues();
34
+ }
35
+ };
36
+ const handleExplorerRemoveValue = (item) => {
37
+ removeValues(id => id !== item.itemId);
38
+ };
39
+ const handleExplorerMassDeactivateValues = (_massSelectedFilter, massSelection) => {
40
+ removeValues(idValue => !massSelection.includes(idValue), true);
41
+ };
42
+ const handleExplorerLinkValue = (saveValuesResult) => {
43
+ if (saveValuesResult.status === APICallStatus.SUCCESS) {
44
+ const saveLinkValues = saveValuesResult.values;
45
+ form.setFieldValue(attribute.id, [
46
+ ...backendValues.map(({ linkValue }) => linkValue.id),
47
+ ...saveLinkValues.map(({ linkValue }) => linkValue.id)
48
+ ]);
49
+ form.setFields([
50
+ {
51
+ name: attribute.id,
52
+ errors: []
53
+ }
54
+ ]);
55
+ setBackendValues(previousBackendValues => [...previousBackendValues, ...saveLinkValues]);
56
+ }
57
+ if (saveValuesResult.status === APICallStatus.ERROR && saveValuesResult.errors) {
58
+ const attributeError = saveValuesResult.errors.filter(err => err.attribute === attribute.id)?.[0];
59
+ if (attributeError) {
60
+ const errorMessage = attributeError.type === ErrorTypes.VALIDATION_ERROR
61
+ ? attributeError.message
62
+ : t(`errors.${attributeError.type}`);
63
+ form.setFields([
64
+ {
65
+ name: attribute.id,
66
+ errors: [errorMessage]
67
+ }
68
+ ]);
69
+ }
70
+ }
71
+ };
72
+ const handleExplorerCreateValue = ({ recordIdCreated, saveValuesResultOnLink }) => {
73
+ if (saveValuesResultOnLink) {
74
+ handleExplorerLinkValue(saveValuesResultOnLink);
75
+ }
76
+ };
77
+ return {
78
+ handleDeleteAllValues,
79
+ handleExplorerRemoveValue,
80
+ handleExplorerMassDeactivateValues,
81
+ handleExplorerLinkValue,
82
+ handleExplorerCreateValue
83
+ };
84
+ };
85
+ //# sourceMappingURL=useExplorerLinkRecords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExplorerLinkRecords.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,aAAa,EAAkD,MAAM,iBAAiB,CAAC;AAG/F,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AASvC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACnC,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACK,EAAE,EAAE;IAC/B,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAEvC,MAAM,YAAY,GAAG,CAAC,QAAkC,EAAE,aAAsB,KAAK,EAAE,EAAE;QACrF,IAAI,CAAC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J,CAAC,CAAC;YAEH,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,GAAG,qBAAqB,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;QAC7F,CAAC;QAED,IAAI,gBAAgB,CAAC,MAAM,KAAK,aAAa,CAAC,KAAK,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAC7E,MAAM,cAAc,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAElG,IAAI,cAAc,EAAE,CAAC;gBACjB,MAAM,YAAY,GACd,cAAc,CAAC,IAAI,KAAK,UAAU,CAAC,gBAAgB;oBAC/C,CAAC,CAAC,cAAc,CAAC,OAAO;oBACxB,CAAC,CAAC,CAAC,CAAC,UAAU,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;gBAE7C,IAAI,CAAC,SAAS,CAAC;oBACX;wBACI,IAAI,EAAE,SAAS,CAAC,EAAE;wBAClB,MAAM,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACJ,CAAC,CAAC;YACP,CAAC;QACL,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,yBAAyB,GAAG,CAAC,EAC/B,eAAe,EACf,sBAAsB,EAIzB,EAAE,EAAE;QACD,IAAI,sBAAsB,EAAE,CAAC;YACzB,uBAAuB,CAAC,sBAAsB,CAAC,CAAC;QACpD,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,qBAAqB;QACrB,yBAAyB;QACzB,kCAAkC;QAClC,uBAAuB;QACvB,yBAAyB;KAC5B,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Explorer } from '../../../../../../components/Explorer';
2
+ import { ComponentProps, Dispatch, SetStateAction } from 'react';
3
+ import { DeleteMultipleValuesFunc } from '../../../_types';
4
+ import { JoinLibraryContextFragment, RecordFormAttributeLinkAttributeFragment } from '../../../../../../_gqlTypes';
5
+ import { RecordFormElementsValueLinkValue } from '../../../../../../hooks/useGetRecordForm';
6
+ interface ILinkRecords {
7
+ libraryId: string;
8
+ recordId: string;
9
+ isFormCreationMode: boolean;
10
+ attribute: RecordFormAttributeLinkAttributeFragment;
11
+ joinLibraryContext: JoinLibraryContextFragment;
12
+ columnsToDisplay: ComponentProps<typeof Explorer>['defaultViewSettings']['attributesIds'];
13
+ backendValues: RecordFormElementsValueLinkValue[];
14
+ setBackendValues: Dispatch<SetStateAction<RecordFormElementsValueLinkValue[]>>;
15
+ isReadOnly: boolean;
16
+ isFieldInError: boolean;
17
+ hasNoValue: boolean;
18
+ onDeleteMultipleValues: DeleteMultipleValuesFunc;
19
+ }
20
+ export declare const useLinkRecords: ({ libraryId, recordId, isFormCreationMode, attribute, joinLibraryContext, columnsToDisplay, backendValues, setBackendValues, isReadOnly, isFieldInError, hasNoValue, onDeleteMultipleValues }: ILinkRecords) => {
21
+ UnlinkAllRecords: JSX.Element;
22
+ LinkRecordsExplorer: JSX.Element;
23
+ };
24
+ export {};
@@ -0,0 +1,76 @@
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 { Explorer } from '../../../../../../components/Explorer';
6
+ import { useEffect, useState } from 'react';
7
+ import { ExplorerWrapper } from '../shared/ExplorerWrapper';
8
+ import { DeleteAllValuesButton } from '../../shared/DeleteAllValuesButton';
9
+ import { AntForm, KitSpace } from 'aristid-ds';
10
+ import { useExplorerLinkRecords } from './useExplorerLinkRecords';
11
+ import { FaList } from 'react-icons/fa';
12
+ import { ActionButton } from './ActionButton';
13
+ import { useSharedTranslation } from '../../../../../../hooks/useSharedTranslation';
14
+ const _shouldUpdateExplorerActions = (ref, explorerActions) => ref?.createAction?.disabled !== explorerActions?.createAction?.disabled ||
15
+ ref?.linkAction?.disabled !== explorerActions?.linkAction?.disabled ||
16
+ ref?.totalCount !== explorerActions?.totalCount;
17
+ export const useLinkRecords = ({ libraryId, recordId, isFormCreationMode, attribute, joinLibraryContext, columnsToDisplay, backendValues, setBackendValues, isReadOnly, isFieldInError, hasNoValue, onDeleteMultipleValues }) => {
18
+ const { t } = useSharedTranslation();
19
+ const form = AntForm.useFormInstance();
20
+ const [explorerActions, setExplorerActions] = useState(null);
21
+ const { handleDeleteAllValues, handleExplorerCreateValue, handleExplorerLinkValue, handleExplorerMassDeactivateValues, handleExplorerRemoveValue } = useExplorerLinkRecords({
22
+ attribute,
23
+ backendValues,
24
+ setBackendValues,
25
+ onDeleteMultipleValues
26
+ });
27
+ const _handleExplorerRef = (ref) => {
28
+ if (_shouldUpdateExplorerActions(ref, explorerActions)) {
29
+ setExplorerActions({
30
+ createAction: ref?.createAction,
31
+ linkAction: ref?.linkAction,
32
+ totalCount: ref?.totalCount
33
+ });
34
+ }
35
+ };
36
+ const _getExplorerItemActions = () => {
37
+ if (isReadOnly) {
38
+ return [];
39
+ }
40
+ if ((!attribute.multiple_values && attribute.required) ||
41
+ (attribute.multiple_values && backendValues.length === 1 && attribute.required)) {
42
+ return ['edit'];
43
+ }
44
+ return ['edit', 'remove'];
45
+ };
46
+ useEffect(() => {
47
+ if (!isFormCreationMode && backendValues.length === 0 && attribute.required) {
48
+ form.setFields([{ name: attribute.id, errors: [t('errors.standard_field_required')] }]);
49
+ }
50
+ }, []);
51
+ return {
52
+ UnlinkAllRecords: backendValues.length > 1 && attribute.multiple_values && !attribute.required && (_jsx(DeleteAllValuesButton, { handleDelete: handleDeleteAllValues, disabled: isReadOnly, danger: isFieldInError })),
53
+ LinkRecordsExplorer: recordId && (_jsxs(_Fragment, { children: [_jsx(ExplorerWrapper, { children: _jsx(Explorer, { ref: _handleExplorerRef, defaultViewSettings: {
54
+ attributesIds: columnsToDisplay
55
+ }, entrypoint: {
56
+ type: 'link',
57
+ parentLibraryId: libraryId,
58
+ parentRecordId: recordId,
59
+ linkAttributeId: attribute.id
60
+ }, defaultCallbacks: {
61
+ item: {
62
+ remove: handleExplorerRemoveValue
63
+ },
64
+ mass: {
65
+ deactivate: handleExplorerMassDeactivateValues
66
+ },
67
+ primary: {
68
+ link: handleExplorerLinkValue,
69
+ create: handleExplorerCreateValue
70
+ }
71
+ }, showTitle: false, showSearch: false, selectionMode: attribute.multiple_values ? 'multiple' : 'simple', disableSelection: isReadOnly ||
72
+ !attribute.multiple_values ||
73
+ (attribute.required && attribute.multiple_values && backendValues.length === 1), defaultActionsForItem: _getExplorerItemActions(), joinLibraryContext: joinLibraryContext, hidePrimaryActions: true, hideTableHeader: true, iconsOnlyItemActions: true }) }), _jsxs(KitSpace, { size: "xs", style: { padding: '1rem' }, children: [_jsx(ActionButton, { type: "secondary", size: "m", "$hasNoValue": hasNoValue, icon: explorerActions?.createAction?.icon, disabled: isReadOnly || explorerActions?.createAction?.disabled, onClick: explorerActions?.createAction?.callback, children: explorerActions?.createAction?.label }), _jsx(ActionButton, { type: "secondary", size: "m", "$hasNoValue": hasNoValue, icon: _jsx(FaList, {}), disabled: isReadOnly || (attribute.multiple_values && explorerActions?.linkAction?.disabled), onClick: explorerActions?.linkAction?.callback, children: explorerActions?.linkAction?.label })] })] }))
74
+ };
75
+ };
76
+ //# sourceMappingURL=useLinkRecords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLinkRecords.js","sourceRoot":"","sources":["../../../../../../../src/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAA2C,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACpF,OAAO,EAAC,eAAe,EAAC,MAAM,2BAA2B,CA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