@leav/ui 0.4.0-fd9dcf3f → 1.0.0-3000adb1

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 (253) hide show
  1. package/dist/_gqlTypes/index.d.ts +488 -211
  2. package/dist/_gqlTypes/index.js +259 -81
  3. package/dist/_gqlTypes/index.js.map +1 -1
  4. package/dist/_queries/attributes/attributeDetailsFragment.js +1 -0
  5. package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
  6. package/dist/_utils/attributeType.d.ts +2 -1
  7. package/dist/_utils/attributeType.js +2 -1
  8. package/dist/_utils/attributeType.js.map +1 -1
  9. package/dist/components/Explorer/DataView.js +3 -3
  10. package/dist/components/Explorer/DataView.js.map +1 -1
  11. package/dist/components/Explorer/Explorer.d.ts +6 -2
  12. package/dist/components/Explorer/Explorer.js +13 -4
  13. package/dist/components/Explorer/Explorer.js.map +1 -1
  14. package/dist/components/Explorer/ExplorerToolbar.js +11 -2
  15. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
  16. package/dist/components/Explorer/TableCell.js +26 -10
  17. package/dist/components/Explorer/TableCell.js.map +1 -1
  18. package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +1 -1
  19. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -31
  20. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -1
  21. package/dist/components/Explorer/_queries/useExplorerData.js +32 -27
  22. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  23. package/dist/components/Explorer/_types.d.ts +74 -8
  24. package/dist/components/Explorer/_types.js +5 -0
  25. package/dist/components/Explorer/_types.js.map +1 -1
  26. package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +2 -1
  27. package/dist/components/Explorer/actions-item/useReplaceItemAction.js +2 -2
  28. package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
  29. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +3 -1
  30. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +9 -19
  31. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
  32. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +6 -3
  33. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +5 -19
  34. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
  35. package/dist/components/Explorer/link-item/LinkModal.d.ts +3 -0
  36. package/dist/components/Explorer/link-item/LinkModal.js +44 -4
  37. package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
  38. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +4 -4
  39. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -1
  40. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +5 -7
  41. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +81 -16
  42. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -1
  43. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +21 -8
  44. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
  45. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +2 -2
  46. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
  47. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +9 -1
  48. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
  49. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.d.ts +9 -0
  50. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js +131 -0
  51. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueListDropDown.js.map +1 -0
  52. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.d.ts +3 -0
  53. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js +69 -0
  54. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -0
  55. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +6 -1
  56. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +3 -0
  57. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +43 -4
  58. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
  59. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +29 -8
  60. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
  61. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +2 -1
  62. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
  63. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +3 -2
  64. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +57 -14
  65. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
  66. package/dist/components/Explorer/useLoadView.d.ts +1 -1
  67. package/dist/components/Explorer/useLoadView.js +42 -49
  68. package/dist/components/Explorer/useLoadView.js.map +1 -1
  69. package/dist/components/Explorer/useSearchInput.js +2 -0
  70. package/dist/components/Explorer/useSearchInput.js.map +1 -1
  71. package/dist/components/Explorer/useViewSettingsReducer.d.ts +1 -1
  72. package/dist/components/Explorer/useViewSettingsReducer.js +41 -22
  73. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
  74. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +1 -12
  75. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +1 -1
  76. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +2 -1
  77. package/dist/components/RecordEdition/EditRecord/EditRecord.js +33 -214
  78. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  79. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -3
  80. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +15 -22
  81. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  82. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +6 -16
  83. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  84. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.d.ts +5 -0
  85. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js +28 -0
  86. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateEmptyRecordMutation.js.map +1 -0
  87. package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.d.ts +11 -0
  88. package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js +35 -0
  89. package/dist/components/RecordEdition/EditRecordContent/hooks/useTabManagement.js.map +1 -0
  90. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
  91. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  92. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  93. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormDivider/FormDivider.js.map +1 -1
  94. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.d.ts +2 -1
  95. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js +6 -9
  96. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js.map +1 -1
  97. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +1 -1
  98. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js.map +1 -1
  99. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +6 -33
  100. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  101. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.d.ts +3 -0
  102. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js +9 -0
  103. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js.map +1 -0
  104. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecords.d.ts → link-record/useExplorerLinkRecords.d.ts} +2 -2
  105. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecords.js → link-record/useExplorerLinkRecords.js} +3 -3
  106. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +1 -0
  107. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record-in-edition/useLinkRecordsInEdition.d.ts → link-record/useLinkRecords.d.ts} +5 -9
  108. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +76 -0
  109. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +1 -0
  110. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +26 -21
  111. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  112. package/dist/components/RecordEdition/EditRecordContent/uiElements/TextBlock/TextBlock.js.map +1 -1
  113. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.d.ts +1 -1
  114. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +10 -23
  115. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  116. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/{useDisplayTreeNode.d.ts → TreeNodeList.d.ts} +3 -4
  117. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js +5 -0
  118. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeList.js.map +1 -0
  119. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +1 -9
  120. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +12 -16
  121. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -1
  122. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.d.ts +2 -1
  123. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +51 -63
  124. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
  125. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.d.ts +1 -3
  126. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js +6 -10
  127. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/useOutsideInteractionDetector.js.map +1 -1
  128. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +45 -7
  129. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  130. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +46 -8
  131. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  132. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +8 -2
  133. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  134. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +24 -17
  135. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  136. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +3 -0
  137. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +52 -41
  138. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
  139. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +2 -5
  140. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +1 -1
  141. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
  142. package/dist/components/RecordEdition/index.d.ts +1 -1
  143. package/dist/components/RecordEdition/index.js +1 -1
  144. package/dist/components/RecordEdition/index.js.map +1 -1
  145. package/dist/components/RecordHistory/RecordHistory.d.ts +8 -0
  146. package/dist/components/RecordHistory/RecordHistory.js +47 -0
  147. package/dist/components/RecordHistory/RecordHistory.js.map +1 -0
  148. package/dist/components/RecordHistory/RecordHistoryGoUpButton.d.ts +6 -0
  149. package/dist/components/RecordHistory/RecordHistoryGoUpButton.js +29 -0
  150. package/dist/components/RecordHistory/RecordHistoryGoUpButton.js.map +1 -0
  151. package/dist/components/RecordHistory/RecordHistoryLogEntry.d.ts +8 -0
  152. package/dist/components/RecordHistory/RecordHistoryLogEntry.js +59 -0
  153. package/dist/components/RecordHistory/RecordHistoryLogEntry.js.map +1 -0
  154. package/dist/components/RecordHistory/_types.d.ts +8 -0
  155. package/dist/components/RecordHistory/_types.js +2 -0
  156. package/dist/components/RecordHistory/_types.js.map +1 -0
  157. package/dist/components/RecordHistory/hooks/useFetchRecordHistory.d.ts +19 -0
  158. package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js +61 -0
  159. package/dist/components/RecordHistory/hooks/useFetchRecordHistory.js.map +1 -0
  160. package/dist/components/RecordHistory/index.d.ts +1 -0
  161. package/dist/components/{LinkSelect → RecordHistory}/index.js +1 -2
  162. package/dist/components/RecordHistory/index.js.map +1 -0
  163. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +2 -0
  164. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +6 -4
  165. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
  166. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +5 -3
  167. package/dist/components/SelectTreeNode/SelectTreeNode.js +2 -3
  168. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  169. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +3 -1
  170. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +68 -55
  171. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
  172. package/dist/components/SelectTreeNode/_types.d.ts +18 -0
  173. package/dist/components/SelectTreeNode/_types.js +2 -0
  174. package/dist/components/SelectTreeNode/_types.js.map +1 -0
  175. package/dist/components/ShowMore/ShowMore.d.ts +11 -0
  176. package/dist/components/ShowMore/ShowMore.js +18 -0
  177. package/dist/components/ShowMore/ShowMore.js.map +1 -0
  178. package/dist/components/ShowMore/index.d.ts +1 -0
  179. package/dist/components/{RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList → ShowMore}/index.js +1 -2
  180. package/dist/components/ShowMore/index.js.map +1 -0
  181. package/dist/components/index.d.ts +2 -0
  182. package/dist/components/index.js +2 -0
  183. package/dist/components/index.js.map +1 -1
  184. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -1
  185. package/dist/hooks/useGetRecordForm/useGetRecordForm.js +2 -2
  186. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  187. package/dist/hooks/useIFrameMessenger/schema.d.ts +5 -3
  188. package/dist/hooks/useIFrameMessenger/schema.js +11 -8
  189. package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
  190. package/dist/hooks/useIFrameMessenger/types.d.ts +2 -0
  191. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +3 -3
  192. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +5 -1
  193. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
  194. package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.d.ts +6 -3
  195. package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js +1 -3
  196. package/dist/hooks/useIFrameMessengerClient/IFrameMessengerClient.js.map +1 -1
  197. package/dist/locales/en/shared.json +16 -1
  198. package/dist/locales/fr/shared.json +15 -0
  199. package/package.json +17 -4
  200. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +0 -10
  201. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +0 -75
  202. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +0 -1
  203. package/dist/components/LinkSelect/LinkSelect.d.ts +0 -15
  204. package/dist/components/LinkSelect/LinkSelect.js +0 -88
  205. package/dist/components/LinkSelect/LinkSelect.js.map +0 -1
  206. package/dist/components/LinkSelect/index.d.ts +0 -2
  207. package/dist/components/LinkSelect/index.js.map +0 -1
  208. package/dist/components/RecordEdition/EditRecord/creationErrorContext.d.ts +0 -6
  209. package/dist/components/RecordEdition/EditRecord/creationErrorContext.js +0 -7
  210. package/dist/components/RecordEdition/EditRecord/creationErrorContext.js.map +0 -1
  211. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +0 -5
  212. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +0 -28
  213. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +0 -1
  214. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.d.ts +0 -121
  215. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +0 -31
  216. package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +0 -1
  217. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.d.ts +0 -5
  218. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js +0 -39
  219. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useEditRecord.js.map +0 -1
  220. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.d.ts +0 -8
  221. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js +0 -23
  222. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-item/useUnselectRecord.js.map +0 -1
  223. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.d.ts +0 -9
  224. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js +0 -23
  225. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-mass/useUnselectAllRecords.js.map +0 -1
  226. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.d.ts +0 -8
  227. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js +0 -26
  228. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useCreateRecord.js.map +0 -1
  229. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.d.ts +0 -12
  230. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js +0 -24
  231. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/action-primary/useRecordSelector.js.map +0 -1
  232. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.d.ts +0 -19
  233. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js +0 -103
  234. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecords.js.map +0 -1
  235. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.d.ts +0 -22
  236. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js +0 -104
  237. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-creation/useLinkRecordsInCreation.js.map +0 -1
  238. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecords.js.map +0 -1
  239. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js +0 -311
  240. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record-in-edition/useLinkRecordsInEdition.js.map +0 -1
  241. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.d.ts +0 -9
  242. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js +0 -15
  243. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/LinkActionsButtons.js.map +0 -1
  244. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.d.ts +0 -4
  245. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js +0 -22
  246. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/utils.js.map +0 -1
  247. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.d.ts +0 -16
  248. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js +0 -35
  249. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/ValuesList.js.map +0 -1
  250. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.d.ts +0 -2
  251. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/index.js.map +0 -1
  252. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js +0 -8
  253. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/useDisplayTreeNode.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RecordEdition/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,gCAAgC,EAAC,MAAM,4DAA4D,CAAC;AACvH,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,mDAAmD,CAAC;AACrG,OAAO,EAAC,mBAAmB,EAAC,MAAM,yFAAyF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RecordEdition/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,gCAAgC,EAAC,MAAM,4DAA4D,CAAC;AACvH,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,wDAAwD,CAAC;AAC1G,OAAO,EAAC,mBAAmB,EAAC,MAAM,yFAAyF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { IRecordIdentityWhoAmI } from '../../types';
2
+ import { FunctionComponent } from 'react';
3
+ interface IRecordHistoryProps {
4
+ record: IRecordIdentityWhoAmI;
5
+ attributeId?: string;
6
+ }
7
+ export declare const RecordHistory: FunctionComponent<IRecordHistoryProps>;
8
+ export default RecordHistory;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } 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 { useSharedTranslation } from '../../hooks/useSharedTranslation';
6
+ import { KitButton, KitSpace, KitTypography } from 'aristid-ds';
7
+ import { useState } from 'react';
8
+ import styled from 'styled-components';
9
+ import { ErrorDisplay } from '../ErrorDisplay';
10
+ import { Loading } from '../Loading';
11
+ import { ShowMore } from '../ShowMore';
12
+ import { useFetchRecordHistory } from './hooks/useFetchRecordHistory';
13
+ import { RecordHistoryGoUpButton } from './RecordHistoryGoUpButton';
14
+ import { RecordHistoryLogEntry } from './RecordHistoryLogEntry';
15
+ const StyledDivContentWrapper = styled.div `
16
+ margin-top: calc(var(--general-spacing-s) * 1px);
17
+ flex: 1 1 0;
18
+ overflow-y: auto;
19
+ `;
20
+ const StyledKitButtonShow = styled(KitButton) `
21
+ margin: 4px;
22
+ `;
23
+ export const RecordHistory = ({ record, attributeId }) => {
24
+ const { t } = useSharedTranslation();
25
+ const [showAllHistory, setShowAllHistory] = useState(false);
26
+ const { loading, inError, logs, total, hasMore, fetchMore } = useFetchRecordHistory({
27
+ record: {
28
+ id: record.id,
29
+ libraryId: record.library.id
30
+ },
31
+ attributeId
32
+ });
33
+ if (loading && logs.length === 0) {
34
+ return _jsx(Loading, {});
35
+ }
36
+ if (inError) {
37
+ return _jsx(ErrorDisplay, { message: t('record_history.error_fetching') });
38
+ }
39
+ if (logs.length === 0) {
40
+ return (_jsx(StyledDivContentWrapper, { children: _jsx(KitTypography.Text, { children: t('record_history.empty_history') }) }));
41
+ }
42
+ return (_jsx(StyledDivContentWrapper, { children: _jsx(RecordHistoryGoUpButton, { children: _jsxs(KitSpace, { size: "s", direction: "vertical", children: [total > 1 && (_jsx(StyledKitButtonShow, { type: "secondary", size: "s", onClick: () => setShowAllHistory(!showAllHistory), children: showAllHistory
43
+ ? t('record_history.hide_history', { total })
44
+ : t('record_history.show_history', { total }) })), showAllHistory && (_jsxs(_Fragment, { children: [logs.map((logEntry, index) => (_jsx(RecordHistoryLogEntry, { index: index, logEntry: logEntry }, index))), _jsx(ShowMore, { hasMore: hasMore, fetchMore: fetchMore })] })), !showAllHistory && _jsx(RecordHistoryLogEntry, { index: 0, logEntry: logs[0] }, 0)] }) }) }));
45
+ };
46
+ export default RecordHistory;
47
+ //# sourceMappingURL=RecordHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordHistory.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/RecordHistory.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAoB,QAAQ,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,MAAM,MAAM,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AO,CACH,KAAC,uBAAuB,cACpB,KAAC,aAAa,CAAC,IAAI,cAAE,CAAC,CAAC,8BAA8B,CAAC,GAAsB,GACtD,CAC7B,CAAC;IACN,CAAC;IAED,OAAO,CACH,KAAC,uBAAuB,cACpB,KAAC,uBAAuB,cACpB,MAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,SAAS,EAAC,UAAU,aAClC,KAAK,GAAG,CAAC,IAAI,CACV,KAAC,mBAAmB,IAChB,IAAI,EAAC,WAAW,EAChB,IAAI,EAAC,GAAG,EACR,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,CAAC,cAAc,CAAC,YAEhD,cAAc;4BACX,CAAC,CAAC,CAAC,CAAC,6BAA6B,EAAE,EAAC,KAAK,EAAC,CAAC;4BAC3C,CAAC,CAAC,CAAC,CAAC,6BAA6B,EAAE,EAAC,KAAK,EAAC,CAAC,GAC7B,CACzB,EACA,cAAc,IAAI,CACf,8BACK,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3B,KAAC,qBAAqB,IAAa,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,IAAvC,KAAK,CAAsC,CAC1E,CAAC,EACF,KAAC,QAAQ,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAI,IACrD,CACN,EACA,CAAC,cAAc,IAAI,KAAC,qBAAqB,IAAS,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,IAA9B,CAAC,CAAiC,IAC3E,GACW,GACJ,CAC7B,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ interface IRecordHistoryGoUpButtonProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const RecordHistoryGoUpButton: React.FC<IRecordHistoryGoUpButtonProps>;
6
+ export default RecordHistoryGoUpButton;
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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 { faAngleUp } from '@fortawesome/free-solid-svg-icons';
6
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
+ import { useIntersectionObserver } from '@uidotdev/usehooks';
8
+ import { KitButton } from 'aristid-ds';
9
+ import { useRef } from 'react';
10
+ import styled from 'styled-components';
11
+ const StyledKitButtonGoUp = styled(KitButton) `
12
+ position: absolute;
13
+ right: calc(var(--general-spacing-m) * 1px);
14
+ bottom: calc(var(--general-spacing-m) * 1px);
15
+ z-index: 10;
16
+ `;
17
+ export const RecordHistoryGoUpButton = ({ children }) => {
18
+ // cannot use detectScrollTopRef because it is not a ref to div but to a customRef to a callback
19
+ const scrollTopRef = useRef(null);
20
+ // Detect if the top of the list is visible or not
21
+ // to show or hide the "go up" button
22
+ const [detectScrollTopRef, detectScrollTopEntry] = useIntersectionObserver({ threshold: 0 });
23
+ const showGoUpButton = !detectScrollTopEntry?.isIntersecting;
24
+ return (_jsxs("div", { ref: scrollTopRef, children: [_jsx("div", { ref: detectScrollTopRef }), children, showGoUpButton && (_jsx(StyledKitButtonGoUp, { type: "segmented", size: "m", icon: _jsx(FontAwesomeIcon, { icon: faAngleUp }), onClick: () => {
25
+ scrollTopRef.current?.scrollIntoView({ behavior: 'smooth' });
26
+ } }))] }));
27
+ };
28
+ export default RecordHistoryGoUpButton;
29
+ //# sourceMappingURL=RecordHistoryGoUpButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordHistoryGoUpButton.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/RecordHistoryGoUpButton.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAA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
+ logEntry: LogEntry;
6
+ }
7
+ export declare const RecordHistoryLogEntry: FunctionComponent<IRecordHistoryLogEntryProps>;
8
+ export default RecordHistoryLogEntry;
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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 { localizedTranslation } from '@leav/utils';
6
+ import { AttributeFormat, LogAction } from '../../_gqlTypes';
7
+ import { useLang } from '../../hooks';
8
+ import { useSharedTranslation } from '../../hooks/useSharedTranslation';
9
+ import { KitSpace, KitTypography } from 'aristid-ds';
10
+ import dayjs from 'dayjs';
11
+ export const RecordHistoryLogEntry = ({ index, logEntry }) => {
12
+ const { t } = useSharedTranslation();
13
+ const { lang } = useLang();
14
+ const { action, time, user, topic, before, after } = logEntry;
15
+ const attribute = topic?.attribute;
16
+ const hasValue = (value) => value != null && 'asString' in value && value.asString != null;
17
+ const hasBefore = hasValue(before);
18
+ const hasAfter = hasValue(after);
19
+ const getUserString = () => {
20
+ const email = user?.properties[0]?.values[0]?.payload;
21
+ return email ? (_jsx("a", { href: `mailto:${email}`, style: { textDecoration: 'underline' }, children: email })) : (user?.id || t('record_history.unknown_user'));
22
+ };
23
+ const getDateString = () => dayjs.unix(time).format('DD/MM/YYYY HH:mm:ss'); // Maybe use https://day.js.org/docs/en/display/format#localized-formats if needed
24
+ const getActionString = () => {
25
+ if (attribute?.multiple_values) {
26
+ if (!hasBefore && hasAfter) {
27
+ return t('record_history.action.value_add');
28
+ }
29
+ if (hasBefore && !hasAfter) {
30
+ return t('record_history.action.value_delete');
31
+ }
32
+ }
33
+ return t('record_history.action.value_modify');
34
+ };
35
+ const getAttributeLabel = () => localizedTranslation(attribute?.label, lang) || attribute?.id || t('record_history.unknown_attribute');
36
+ const formatValue = (logData) => {
37
+ if (attribute?.format === AttributeFormat.rich_text) {
38
+ return (_jsx(KitTypography.AdvancedParagraph, { size: "fontSize7", ellipsis: { rows: 4, expandable: true }, children: logData.asString }));
39
+ }
40
+ return _jsx(KitTypography.Text, { size: "fontSize7", children: logData.asString });
41
+ };
42
+ const formatValueChange = () => {
43
+ const noValue = _jsx(KitTypography.Text, { size: "fontSize7", children: t('record_history.no_value') });
44
+ if (attribute?.multiple_values) {
45
+ const uniqValue = !hasBefore && hasAfter ? after : hasBefore && !hasAfter ? before : null;
46
+ if (uniqValue != null) {
47
+ return (_jsx(KitSpace, { size: "xxs", direction: "horizontal", wrap: true, children: formatValue(uniqValue) }));
48
+ }
49
+ }
50
+ return (_jsxs(KitSpace, { size: "xxs", direction: "horizontal", wrap: true, children: [hasBefore ? formatValue(before) : noValue, _jsx(KitTypography.Text, { size: "fontSize7", children: " \u2192 " }), hasAfter ? formatValue(after) : noValue] }));
51
+ };
52
+ switch (action) {
53
+ case LogAction.VALUE_SAVE:
54
+ case LogAction.VALUE_DELETE:
55
+ return (_jsxs(KitSpace, { size: "none", direction: "vertical", children: [_jsxs(KitTypography.Text, { size: "fontSize7", children: [getUserString(), " ", getActionString(), " ", _jsx("strong", { children: getAttributeLabel() })] }), _jsx(KitTypography.Text, { size: "fontSize7", children: getDateString() }), formatValueChange()] }, index));
56
+ }
57
+ };
58
+ export default RecordHistoryLogEntry;
59
+ //# sourceMappingURL=RecordHistoryLogEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordHistoryLogEntry.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/RecordHistoryLogEntry.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,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} from '../../_gqlTypes';
2
+ export type LogEntry = RecordHistoryLogEntryFragment;
3
+ export type LogEntryValue = Extract<LogEntry, {
4
+ before?: any;
5
+ after?: any;
6
+ }>;
7
+ export type LogEntryAttribute = RecordHistoryLogAttributeFragment;
8
+ export type LogEntryData = LogEntryValue['before'] | LogEntryValue['after'];
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=_types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/_types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import { LogEntry } from '../_types';
2
+ export interface IUseFetchRecordHistoryHook {
3
+ loading: boolean;
4
+ inError: boolean;
5
+ logs: LogEntry[];
6
+ total: number;
7
+ hasMore: boolean;
8
+ fetchMore: () => void;
9
+ }
10
+ export interface IUseFetchRecordHistoryProps {
11
+ record: {
12
+ id: string;
13
+ libraryId: string;
14
+ };
15
+ attributeId?: string;
16
+ }
17
+ export declare const RECORD_HISTORY_LOGS_PAGE = 50;
18
+ export declare const RECORD_HISTORY_LOGS_FIRST_PAGE = 1;
19
+ export declare const useFetchRecordHistory: ({ record, attributeId }: IUseFetchRecordHistoryProps) => IUseFetchRecordHistoryHook;
@@ -0,0 +1,61 @@
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 { LogAction, useGetRecordHistoryQuery } from '../../../_gqlTypes';
5
+ import { useCallback, useEffect, useState } from 'react';
6
+ export const RECORD_HISTORY_LOGS_PAGE = 50;
7
+ export const RECORD_HISTORY_LOGS_FIRST_PAGE = 1;
8
+ const eventsToFetch = [LogAction.VALUE_SAVE, LogAction.VALUE_DELETE];
9
+ export const useFetchRecordHistory = ({ record, attributeId }) => {
10
+ const [logs, setLogs] = useState([]);
11
+ const [total, setTotal] = useState(0);
12
+ const [hasMore, setHasMore] = useState(false);
13
+ const { loading, error, data: history, refetch } = useGetRecordHistoryQuery({
14
+ fetchPolicy: 'network-only',
15
+ variables: {
16
+ record: {
17
+ id: record.id,
18
+ libraryId: record.libraryId
19
+ },
20
+ attributeId,
21
+ actions: eventsToFetch,
22
+ pagination: { limit: RECORD_HISTORY_LOGS_FIRST_PAGE, offset: 0 }
23
+ }
24
+ });
25
+ useEffect(() => {
26
+ // Reset if record or attribute change
27
+ setLogs([]);
28
+ setTotal(0);
29
+ setHasMore(false);
30
+ }, [record.id, record.libraryId, attributeId]);
31
+ const fetchMore = useCallback(() => {
32
+ refetch({
33
+ record: {
34
+ id: record.id,
35
+ libraryId: record.libraryId
36
+ },
37
+ attributeId,
38
+ actions: eventsToFetch,
39
+ pagination: { limit: RECORD_HISTORY_LOGS_PAGE, offset: logs.length }
40
+ });
41
+ }, [logs.length, refetch, record.id, record.libraryId, attributeId]);
42
+ useEffect(() => {
43
+ if (loading || !history) {
44
+ return;
45
+ }
46
+ const newLogs = [...logs, ...history.logs.logs];
47
+ const newTotal = history.logs.total || 0;
48
+ setLogs(newLogs);
49
+ setTotal(newTotal);
50
+ setHasMore(newLogs.length < newTotal);
51
+ }, [history, loading]);
52
+ return {
53
+ loading,
54
+ inError: !!error,
55
+ logs,
56
+ total,
57
+ hasMore,
58
+ fetchMore
59
+ };
60
+ };
61
+ //# sourceMappingURL=useFetchRecordHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchRecordHistory.js","sourceRoot":"","sources":["../../../../src/components/RecordHistory/hooks/useFetchRecordHistory.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAE,wBAAwB,EAAC,MAAM,eAAe,CAAC;AAElE,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAgBvD,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAC3C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;aAC9B;YACD,WAAW;YACX,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,EAAC,KAAK,EAAE,wBAAwB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAC;SACrE,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAErE,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO;QACX,CAAC;QACD,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjB,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC;IAC1C,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAEvB,OAAO;QACH,OAAO;QACP,OAAO,EAAE,CAAC,CAAC,KAAK;QAChB,IAAI;QACJ,KAAK;QACL,OAAO;QACP,SAAS;KACZ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export { RecordHistory } from './RecordHistory';
@@ -1,6 +1,5 @@
1
1
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
2
  // This file is released under LGPL V3
3
3
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
- import LinkSelect from './LinkSelect';
5
- export default LinkSelect;
4
+ export { RecordHistory } from './RecordHistory';
6
5
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RecordHistory/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC"}
@@ -6,6 +6,8 @@ interface ISelectRecordForLinkModalProps {
6
6
  open: boolean;
7
7
  childLibraryId: string;
8
8
  replacementMode: boolean;
9
+ valuesList?: string[];
10
+ allowFreeEntry: boolean;
9
11
  joinLibraryContext?: JoinLibraryContextFragment;
10
12
  selectionMode: ComponentProps<typeof Explorer>['selectionMode'];
11
13
  hideSelectAllAction: ComponentProps<typeof Explorer>['hideSelectAllAction'];
@@ -47,7 +47,7 @@ const ModalMainStyledDiv = styled.div `
47
47
  height: 100%;
48
48
  position: relative;
49
49
  `;
50
- export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, selectionMode, joinLibraryContext, hideSelectAllAction, onSelectionCompleted, onClose }) => {
50
+ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, replacementMode, valuesList, allowFreeEntry, selectionMode, joinLibraryContext, hideSelectAllAction, onSelectionCompleted, onClose }) => {
51
51
  const { t } = useSharedTranslation();
52
52
  const explorerContainerRef = useRef(null);
53
53
  const _handleClose = () => {
@@ -62,8 +62,10 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
62
62
  });
63
63
  return (_jsx(StyledModal, { className: className, open: open, onCancel: _handleClose, destroyOnClose: true, closable: false, cancelText: t('global.cancel'), width: "90vw", centered: true, footer: _footer, children: _jsx(ModalMainStyledDiv, { ref: explorerContainerRef, children: _jsx(Explorer.EditSettingsContextProvider, { panelElement: () => explorerContainerRef.current ?? document.body, children: _jsx(Explorer, { entrypoint: {
64
64
  type: 'library',
65
- libraryId: childLibraryId
66
- }, selectionMode: selectionMode, hideSelectAllAction: hideSelectAllAction, massActions: [
65
+ libraryId: childLibraryId,
66
+ valuesList,
67
+ allowFreeEntry
68
+ }, showCreateOnNoResultOnly: true, selectionMode: selectionMode, hideSelectAllAction: hideSelectAllAction, massActions: [
67
69
  {
68
70
  label: replacementMode
69
71
  ? t('explorer.massAction.replace-link')
@@ -78,6 +80,6 @@ export const SelectRecordForLinkModal = ({ className, open, childLibraryId, repl
78
80
  });
79
81
  }
80
82
  }
81
- ], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [], defaultPrimaryActions: [], joinLibraryContext: joinLibraryContext, showSearch: true }) }) }) }));
83
+ ], primaryActions: [], defaultActionsForItem: [], defaultMassActions: [], itemActions: [], defaultPrimaryActions: ['create'], joinLibraryContext: joinLibraryContext, showSearch: true, ignoreViewByDefault: true }) }) }) }));
82
84
  };
83
85
  //# sourceMappingURL=SelectRecordForLinkModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC3E,+BAA+B;AAC/B,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAwD,gCAAgC,EAAC,MAAM,eAAe,CAAC;AACtH,OAAO,EAAC,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAEjD,MAAM,aAAa,GAAG,IAAK,CAAC;AAE5B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;qBAGf,aAAa;;;;;;;;;;;;;;;;;;;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kBAAkB,IAAC,GAAG,EAAE,oBAAoB,YACzC,KAAC,QAAQ,CAAC,2BAA2B,IACjC,YAAY,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,YAEjE,KAAC,QAAQ,IACL,UAAU,EAAE;wBACR,IAAI,EAAE,SAAS;wBACf,SAAS,EAAE,cAAc;qBAC5B,EACD,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE;wBACT;4BACI,KAAK,EAAE,eAAe;gCAClB,CAAC,CAAC,CAAC,CAAC,kCAAkC,CAAC;gCACvC,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC;4BACvC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC,CAAC,KAAC,MAAM,KAAG;4BACtD,QAAQ,EAAE,KAAK,EAAC,mBAAmB,EAAC,EAAE;gCAClC,MAAM,uBAAuB,CAAC;oCAC1B,SAAS,EAAE;wCACP,SAAS,EAAE,cAAc;wCACzB,OAAO,EAAE,mBAAmB;qCAC/B;iCACJ,CAAC,CAAC;4BACP,CAAC;yBACJ;qBACJ,EACD,cAAc,EAAE,EAAE,EAClB,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,EAAE,EACf,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,SACZ,GAEiC,GACtB,GACX,CACjB,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"SelectRecordForLinkModal.js","sourceRoot":"","sources":["../../../src/components/SelectRecordForLinkModal/SelectRecordForLinkModal.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,gBAAgB,EA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,SAAS,EAAE,cAAc;wCACzB,OAAO,EAAE,mBAAmB;qCAC/B;iCACJ,CAAC,CAAC;4BACP,CAAC;yBACJ;qBACJ,EACD,cAAc,EAAE,EAAE,EAClB,qBAAqB,EAAE,EAAE,EACzB,kBAAkB,EAAE,EAAE,EACtB,WAAW,EAAE,EAAE,EACf,qBAAqB,EAAE,CAAC,QAAQ,CAAC,EACjC,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,QACV,mBAAmB,SACrB,GAEiC,GACtB,GACX,CACjB,CAAC;AACN,CAAC,CAAC"}
@@ -4,14 +4,16 @@ import { ITreeNodeWithRecord } from '../../types/trees';
4
4
  interface ISelectTreeNodeProps {
5
5
  treeId: string;
6
6
  childrenAsRecordValuePermissionFilter?: ChildrenAsRecordValuePermissionFilterInput;
7
- selectedNodes?: string[];
8
- disabledNodes?: string[];
9
7
  onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;
10
8
  onCheck?: (selection: ITreeNodeWithRecord[]) => void;
9
+ selectedNodes?: string[];
10
+ disabledNodes?: string[];
11
+ selectableLibraries?: string[];
11
12
  multiple?: boolean;
13
+ checkStrictly?: boolean;
12
14
  checkable?: boolean;
13
15
  canSelectRoot?: boolean;
14
- selectableLibraries?: string[];
16
+ loadRecursively?: boolean;
15
17
  }
16
18
  export declare const SelectTreeNode: FunctionComponent<ISelectTreeNodeProps>;
17
19
  export {};
@@ -9,7 +9,7 @@ import { ErrorDisplay } from '../..';
9
9
  import useLang from '../../hooks/useLang';
10
10
  import { SelectTreeNodeContent } from './SelectTreeNodeContent';
11
11
  import { SelectTreeNodeContentSkeleton } from './SelectTreeNodeContentSkeleton';
12
- export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, multiple = false, checkable = false, canSelectRoot = false, selectableLibraries }) => {
12
+ export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter, onSelect, onCheck, selectedNodes, disabledNodes, selectableLibraries, multiple = false, checkStrictly = true, checkable = false, canSelectRoot = false, loadRecursively = false }) => {
13
13
  const { lang } = useLang();
14
14
  const { t } = useSharedTranslation();
15
15
  const { loading, error, data } = useTreeDataQueryQuery({
@@ -24,7 +24,6 @@ export const SelectTreeNode = ({ treeId, childrenAsRecordValuePermissionFilter,
24
24
  if (!data?.trees.list[0]) {
25
25
  return _jsx(ErrorDisplay, { message: t('error.unknown_tree', { treeId }) });
26
26
  }
27
- const label = localizedTranslation(data.trees.list[0].label, lang) || treeId;
28
- return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label }, childrenAsRecordValuePermissionFilter: childrenAsRecordValuePermissionFilter, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries }));
27
+ return (_jsx(SelectTreeNodeContent, { treeData: { id: treeId, label: localizedTranslation(data.trees.list[0].label, lang) || treeId }, childrenAsRecordValuePermissionFilter: childrenAsRecordValuePermissionFilter, onCheck: onCheck, onSelect: onSelect, multiple: multiple, checkable: checkable, checkStrictly: checkStrictly, selectedNodes: selectedNodes, disabledNodes: disabledNodes, canSelectRoot: canSelectRoot, selectableLibraries: selectableLibraries, loadRecursively: loadRecursively }));
29
28
  };
30
29
  //# sourceMappingURL=SelectTreeNode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTreeNode.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/SelectTreeNode.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAA6C,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAChG,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,OAAO,MAAM,qBAAqB,CAAC;A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OAAO,EAAE,CAAC;QACV,OAAO,KAAC,6BAA6B,KAAG,CAAC;IAC7C,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI,CAAC;IACpD,CAAC;IAED,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvB,OAAO,KAAC,YAAY,IAAC,OAAO,EAAE,CAAC,CAAC,oBAAoB,EAAE,EAAC,MAAM,EAAC,CAAC,GAAI,CAAC;IACxE,CAAC;IAED,OAAO,CACH,KAAC,qBAAqB,IAClB,QAAQ,EAAE,EAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,MAAM,EAAC,EAC7F,qCAAqC,EAAE,qCAAqC,EAC5E,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,eAAe,EAAE,eAAe,GAClC,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
+ import { ITreeNodeWithRecord } from '../../types';
2
3
  import { ChildrenAsRecordValuePermissionFilterInput } from '../../_gqlTypes';
3
- import { ITreeNodeWithRecord } from '../../types/trees';
4
4
  interface ISelectTreeNodeContentProps {
5
5
  treeData: {
6
6
  id: string;
@@ -13,8 +13,10 @@ interface ISelectTreeNodeContentProps {
13
13
  onCheck?: (selection: ITreeNodeWithRecord[]) => void;
14
14
  multiple?: boolean;
15
15
  checkable?: boolean;
16
+ checkStrictly?: boolean;
16
17
  canSelectRoot?: boolean;
17
18
  selectableLibraries?: string[];
19
+ loadRecursively?: boolean;
18
20
  }
19
21
  export declare const SelectTreeNodeContent: FunctionComponent<ISelectTreeNodeContentProps>;
20
22
  export {};