@leav/ui 1.9.0-e85cb486 → 1.9.0-ee5969b7

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 (454) hide show
  1. package/dist/_gqlTypes/index.d.ts +199 -111
  2. package/dist/_gqlTypes/index.js +159 -77
  3. package/dist/_gqlTypes/index.js.map +1 -1
  4. package/dist/_utils/getFiltersFromRequest.js +5 -6
  5. package/dist/_utils/getFiltersFromRequest.js.map +1 -1
  6. package/dist/_utils/index.js +3 -4
  7. package/dist/_utils/index.js.map +1 -1
  8. package/dist/_utils/typeguards.d.ts +5 -0
  9. package/dist/_utils/typeguards.js +6 -0
  10. package/dist/_utils/typeguards.js.map +1 -1
  11. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +6 -1
  12. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -1
  13. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +3 -0
  14. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +5 -5
  15. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
  16. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +2 -2
  17. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
  18. package/dist/components/Explorer/useViewSettingsReducer.js +11 -8
  19. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -1
  20. package/dist/components/Filters/_queries/treeFiltersDataQuery.d.ts +6 -0
  21. package/dist/components/Filters/_queries/treeFiltersDataQuery.js +54 -0
  22. package/dist/components/Filters/_queries/treeFiltersDataQuery.js.map +1 -0
  23. package/dist/components/Filters/context/useGetTreeFilters.js +24 -40
  24. package/dist/components/Filters/context/useGetTreeFilters.js.map +1 -1
  25. package/dist/components/Filters/filter-items/filter-type/tree/TreeAttributeDropDown.js +1 -2
  26. package/dist/components/Filters/filter-items/filter-type/tree/TreeAttributeDropDown.js.map +1 -1
  27. package/dist/components/Filters/filter-items/filter-type/tree/_queries/filterTreeDataQuery.d.ts +6 -0
  28. package/dist/components/Filters/filter-items/filter-type/tree/_queries/filterTreeDataQuery.js +54 -0
  29. package/dist/components/Filters/filter-items/filter-type/tree/_queries/filterTreeDataQuery.js.map +1 -0
  30. package/dist/components/Filters/filter-items/filter-type/tree/useGetTreeData.js +22 -41
  31. package/dist/components/Filters/filter-items/filter-type/tree/useGetTreeData.js.map +1 -1
  32. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +1 -3
  33. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  34. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +7 -6
  35. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
  36. package/dist/components/SearchModal/SearchModal.js +28 -18
  37. package/dist/components/SearchModal/SearchModal.js.map +1 -1
  38. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +0 -2
  39. package/dist/components/SelectTreeNode/SelectTreeNode.js +2 -2
  40. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  41. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +0 -2
  42. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +60 -114
  43. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
  44. package/dist/components/SelectTreeNode/TreeNodeTitle.d.ts +0 -1
  45. package/dist/components/SelectTreeNode/TreeNodeTitle.js +3 -7
  46. package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -1
  47. package/dist/components/SelectTreeNode/_queries/treeContentDataQuery.d.ts +6 -0
  48. package/dist/components/SelectTreeNode/_queries/treeContentDataQuery.js +56 -0
  49. package/dist/components/SelectTreeNode/_queries/treeContentDataQuery.js.map +1 -0
  50. package/dist/components/SelectTreeNode/_types.d.ts +0 -1
  51. package/dist/components/SelectTreeNode/_types.js.map +1 -1
  52. package/dist/components/index.d.ts +0 -3
  53. package/dist/components/index.js +0 -3
  54. package/dist/components/index.js.map +1 -1
  55. package/dist/hooks/useGetRecordForm/useGetRecordForm.js +24 -22
  56. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  57. package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +9 -6
  58. package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
  59. package/dist/hooks/useIFrameMessenger/schema.d.ts +12 -0
  60. package/dist/hooks/useIFrameMessenger/schema.js +6 -0
  61. package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
  62. package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.d.ts +1 -1
  63. package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.js +14 -6
  64. package/dist/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.js.map +1 -1
  65. package/dist/locales/en/shared.json +3 -0
  66. package/dist/locales/fr/shared.json +3 -0
  67. package/package.json +8 -13
  68. package/dist/__mocks__/common/mockSearchContextProvider.d.ts +0 -6
  69. package/dist/__mocks__/common/mockSearchContextProvider.js +0 -10
  70. package/dist/__mocks__/common/mockSearchContextProvider.js.map +0 -1
  71. package/dist/components/AttributesSelectionList/Attribute/Attribute.d.ts +0 -3
  72. package/dist/components/AttributesSelectionList/Attribute/Attribute.js +0 -50
  73. package/dist/components/AttributesSelectionList/Attribute/Attribute.js.map +0 -1
  74. package/dist/components/AttributesSelectionList/Attribute/index.d.ts +0 -2
  75. package/dist/components/AttributesSelectionList/Attribute/index.js +0 -6
  76. package/dist/components/AttributesSelectionList/Attribute/index.js.map +0 -1
  77. package/dist/components/AttributesSelectionList/AttributesSelectionList.d.ts +0 -10
  78. package/dist/components/AttributesSelectionList/AttributesSelectionList.js +0 -72
  79. package/dist/components/AttributesSelectionList/AttributesSelectionList.js.map +0 -1
  80. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.d.ts +0 -7
  81. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js +0 -39
  82. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js.map +0 -1
  83. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.d.ts +0 -2
  84. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.js +0 -6
  85. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.js.map +0 -1
  86. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.d.ts +0 -2
  87. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js +0 -63
  88. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js.map +0 -1
  89. package/dist/components/AttributesSelectionList/SelectedAttributesList/index.d.ts +0 -2
  90. package/dist/components/AttributesSelectionList/SelectedAttributesList/index.js +0 -6
  91. package/dist/components/AttributesSelectionList/SelectedAttributesList/index.js.map +0 -1
  92. package/dist/components/AttributesSelectionList/_types.d.ts +0 -8
  93. package/dist/components/AttributesSelectionList/_types.js +0 -2
  94. package/dist/components/AttributesSelectionList/_types.js.map +0 -1
  95. package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.d.ts +0 -3
  96. package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js +0 -9
  97. package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js.map +0 -1
  98. package/dist/components/AttributesSelectionList/index.d.ts +0 -2
  99. package/dist/components/AttributesSelectionList/index.js +0 -6
  100. package/dist/components/AttributesSelectionList/index.js.map +0 -1
  101. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.d.ts +0 -11
  102. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js +0 -10
  103. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js.map +0 -1
  104. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.d.ts +0 -33
  105. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js +0 -77
  106. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js.map +0 -1
  107. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.d.ts +0 -10
  108. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js +0 -8
  109. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js.map +0 -1
  110. package/dist/components/AttributesSelectionList/sharedComponents.d.ts +0 -809
  111. package/dist/components/AttributesSelectionList/sharedComponents.js +0 -16
  112. package/dist/components/AttributesSelectionList/sharedComponents.js.map +0 -1
  113. package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.d.ts +0 -10
  114. package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js +0 -39
  115. package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js.map +0 -1
  116. package/dist/components/DeactivateRecordsModal/index.d.ts +0 -1
  117. package/dist/components/DeactivateRecordsModal/index.js +0 -5
  118. package/dist/components/DeactivateRecordsModal/index.js.map +0 -1
  119. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.d.ts +0 -13
  120. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js +0 -50
  121. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +0 -1
  122. package/dist/components/LibraryItemsList/CreateNewRecordButton/index.d.ts +0 -2
  123. package/dist/components/LibraryItemsList/CreateNewRecordButton/index.js +0 -6
  124. package/dist/components/LibraryItemsList/CreateNewRecordButton/index.js.map +0 -1
  125. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.d.ts +0 -2
  126. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js +0 -80
  127. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js.map +0 -1
  128. package/dist/components/LibraryItemsList/DisplayOptions/index.d.ts +0 -2
  129. package/dist/components/LibraryItemsList/DisplayOptions/index.js +0 -6
  130. package/dist/components/LibraryItemsList/DisplayOptions/index.js.map +0 -1
  131. package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.d.ts +0 -2
  132. package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js +0 -22
  133. package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js.map +0 -1
  134. package/dist/components/LibraryItemsList/DisplayTypeSelector/index.d.ts +0 -2
  135. package/dist/components/LibraryItemsList/DisplayTypeSelector/index.js +0 -6
  136. package/dist/components/LibraryItemsList/DisplayTypeSelector/index.js.map +0 -1
  137. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.d.ts +0 -13
  138. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +0 -229
  139. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +0 -1
  140. package/dist/components/LibraryItemsList/FiltersDropdown/index.d.ts +0 -2
  141. package/dist/components/LibraryItemsList/FiltersDropdown/index.js +0 -6
  142. package/dist/components/LibraryItemsList/FiltersDropdown/index.js.map +0 -1
  143. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.d.ts +0 -11
  144. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +0 -328
  145. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +0 -1
  146. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.d.ts +0 -7
  147. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js +0 -90
  148. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js.map +0 -1
  149. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.d.ts +0 -2
  150. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.js +0 -6
  151. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.js.map +0 -1
  152. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.d.ts +0 -3
  153. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.js +0 -13
  154. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.js.map +0 -1
  155. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.d.ts +0 -2
  156. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.js +0 -6
  157. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.js.map +0 -1
  158. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.d.ts +0 -3
  159. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js +0 -26
  160. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js.map +0 -1
  161. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.d.ts +0 -2
  162. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.js +0 -6
  163. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.js.map +0 -1
  164. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.d.ts +0 -3
  165. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js +0 -22
  166. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js.map +0 -1
  167. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.d.ts +0 -2
  168. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.js +0 -6
  169. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.js.map +0 -1
  170. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.d.ts +0 -3
  171. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js +0 -35
  172. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js.map +0 -1
  173. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.d.ts +0 -2
  174. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.js +0 -6
  175. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.js.map +0 -1
  176. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.d.ts +0 -3
  177. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js +0 -34
  178. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js.map +0 -1
  179. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.d.ts +0 -2
  180. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.js +0 -6
  181. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.js.map +0 -1
  182. package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.d.ts +0 -2
  183. package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.js +0 -16
  184. package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.js.map +0 -1
  185. package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.d.ts +0 -2
  186. package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.js +0 -6
  187. package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.js.map +0 -1
  188. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.d.ts +0 -8
  189. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.js +0 -11
  190. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.js.map +0 -1
  191. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.d.ts +0 -2
  192. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.js +0 -6
  193. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.js.map +0 -1
  194. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.d.ts +0 -6
  195. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js +0 -38
  196. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js.map +0 -1
  197. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.d.ts +0 -2
  198. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.js +0 -6
  199. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.js.map +0 -1
  200. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.d.ts +0 -14
  201. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js +0 -147
  202. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +0 -1
  203. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.d.ts +0 -2
  204. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js +0 -121
  205. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js.map +0 -1
  206. package/dist/components/LibraryItemsList/FiltersPanel/index.d.ts +0 -2
  207. package/dist/components/LibraryItemsList/FiltersPanel/index.js +0 -6
  208. package/dist/components/LibraryItemsList/FiltersPanel/index.js.map +0 -1
  209. package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.d.ts +0 -3
  210. package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js +0 -17
  211. package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js.map +0 -1
  212. package/dist/components/LibraryItemsList/IconViewType/IconViewType.d.ts +0 -8
  213. package/dist/components/LibraryItemsList/IconViewType/IconViewType.js +0 -18
  214. package/dist/components/LibraryItemsList/IconViewType/IconViewType.js.map +0 -1
  215. package/dist/components/LibraryItemsList/IconViewType/index.d.ts +0 -2
  216. package/dist/components/LibraryItemsList/IconViewType/index.js +0 -6
  217. package/dist/components/LibraryItemsList/IconViewType/index.js.map +0 -1
  218. package/dist/components/LibraryItemsList/LibraryItemsList.d.ts +0 -14
  219. package/dist/components/LibraryItemsList/LibraryItemsList.js +0 -18
  220. package/dist/components/LibraryItemsList/LibraryItemsList.js.map +0 -1
  221. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.d.ts +0 -16
  222. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +0 -202
  223. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +0 -1
  224. package/dist/components/LibraryItemsList/LibraryItemsListContent/index.d.ts +0 -2
  225. package/dist/components/LibraryItemsList/LibraryItemsListContent/index.js +0 -6
  226. package/dist/components/LibraryItemsList/LibraryItemsListContent/index.js.map +0 -1
  227. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.d.ts +0 -6
  228. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js +0 -32
  229. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js.map +0 -1
  230. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.d.ts +0 -2
  231. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.js +0 -6
  232. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.js.map +0 -1
  233. package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.d.ts +0 -2
  234. package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.js +0 -21
  235. package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.js.map +0 -1
  236. package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.d.ts +0 -2
  237. package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.js +0 -6
  238. package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.js.map +0 -1
  239. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.d.ts +0 -8
  240. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js +0 -56
  241. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js.map +0 -1
  242. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.d.ts +0 -2
  243. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.js +0 -6
  244. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.js.map +0 -1
  245. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.d.ts +0 -7
  246. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js +0 -54
  247. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js.map +0 -1
  248. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.d.ts +0 -2
  249. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.js +0 -6
  250. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.js.map +0 -1
  251. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.d.ts +0 -8
  252. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js +0 -66
  253. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js.map +0 -1
  254. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.d.ts +0 -2
  255. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.js +0 -6
  256. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.js.map +0 -1
  257. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.d.ts +0 -8
  258. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js +0 -59
  259. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js.map +0 -1
  260. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.d.ts +0 -9
  261. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js +0 -56
  262. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js.map +0 -1
  263. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.d.ts +0 -2
  264. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.js +0 -6
  265. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.js.map +0 -1
  266. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.d.ts +0 -5
  267. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.js +0 -34
  268. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.js.map +0 -1
  269. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.d.ts +0 -2
  270. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.js +0 -6
  271. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.js.map +0 -1
  272. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.d.ts +0 -5
  273. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.js +0 -23
  274. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.js.map +0 -1
  275. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.d.ts +0 -3
  276. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +0 -80
  277. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +0 -1
  278. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.d.ts +0 -2
  279. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.js +0 -6
  280. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.js.map +0 -1
  281. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.d.ts +0 -2
  282. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.js +0 -6
  283. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.js.map +0 -1
  284. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.d.ts +0 -12
  285. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js +0 -11
  286. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js.map +0 -1
  287. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.d.ts +0 -12
  288. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.js +0 -2
  289. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.js.map +0 -1
  290. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.d.ts +0 -2
  291. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js +0 -40
  292. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js.map +0 -1
  293. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.d.ts +0 -6
  294. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js +0 -81
  295. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js.map +0 -1
  296. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.d.ts +0 -2
  297. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.js +0 -6
  298. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.js.map +0 -1
  299. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.d.ts +0 -9
  300. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +0 -142
  301. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +0 -1
  302. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.d.ts +0 -2
  303. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.js +0 -6
  304. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.js.map +0 -1
  305. package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.d.ts +0 -2
  306. package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js +0 -232
  307. package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js.map +0 -1
  308. package/dist/components/LibraryItemsList/LibraryItemsListTable/index.d.ts +0 -2
  309. package/dist/components/LibraryItemsList/LibraryItemsListTable/index.js +0 -6
  310. package/dist/components/LibraryItemsList/LibraryItemsListTable/index.js.map +0 -1
  311. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.d.ts +0 -9
  312. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js +0 -27
  313. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js.map +0 -1
  314. package/dist/components/LibraryItemsList/MenuItemList/index.d.ts +0 -2
  315. package/dist/components/LibraryItemsList/MenuItemList/index.js +0 -6
  316. package/dist/components/LibraryItemsList/MenuItemList/index.js.map +0 -1
  317. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.d.ts +0 -2
  318. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js +0 -62
  319. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js.map +0 -1
  320. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.d.ts +0 -2
  321. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.js +0 -6
  322. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.js.map +0 -1
  323. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.d.ts +0 -5
  324. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js +0 -139
  325. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js.map +0 -1
  326. package/dist/components/LibraryItemsList/MenuItemListSelected/index.d.ts +0 -2
  327. package/dist/components/LibraryItemsList/MenuItemListSelected/index.js +0 -6
  328. package/dist/components/LibraryItemsList/MenuItemListSelected/index.js.map +0 -1
  329. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.d.ts +0 -2
  330. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js +0 -58
  331. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js.map +0 -1
  332. package/dist/components/LibraryItemsList/MenuSelection/index.d.ts +0 -2
  333. package/dist/components/LibraryItemsList/MenuSelection/index.js +0 -6
  334. package/dist/components/LibraryItemsList/MenuSelection/index.js.map +0 -1
  335. package/dist/components/LibraryItemsList/MenuView/MenuView.d.ts +0 -6
  336. package/dist/components/LibraryItemsList/MenuView/MenuView.js +0 -162
  337. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +0 -1
  338. package/dist/components/LibraryItemsList/MenuView/index.d.ts +0 -2
  339. package/dist/components/LibraryItemsList/MenuView/index.js +0 -6
  340. package/dist/components/LibraryItemsList/MenuView/index.js.map +0 -1
  341. package/dist/components/LibraryItemsList/SearchItems/SearchItems.d.ts +0 -2
  342. package/dist/components/LibraryItemsList/SearchItems/SearchItems.js +0 -21
  343. package/dist/components/LibraryItemsList/SearchItems/SearchItems.js.map +0 -1
  344. package/dist/components/LibraryItemsList/SearchItems/index.d.ts +0 -2
  345. package/dist/components/LibraryItemsList/SearchItems/index.js +0 -6
  346. package/dist/components/LibraryItemsList/SearchItems/index.js.map +0 -1
  347. package/dist/components/LibraryItemsList/Sidebar/Sidebar.d.ts +0 -2
  348. package/dist/components/LibraryItemsList/Sidebar/Sidebar.js +0 -58
  349. package/dist/components/LibraryItemsList/Sidebar/Sidebar.js.map +0 -1
  350. package/dist/components/LibraryItemsList/Sidebar/index.d.ts +0 -2
  351. package/dist/components/LibraryItemsList/Sidebar/index.js +0 -6
  352. package/dist/components/LibraryItemsList/Sidebar/index.js.map +0 -1
  353. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.d.ts +0 -6
  354. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +0 -199
  355. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js.map +0 -1
  356. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.d.ts +0 -2
  357. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.js +0 -6
  358. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.js.map +0 -1
  359. package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.d.ts +0 -2
  360. package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js +0 -50
  361. package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js.map +0 -1
  362. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.d.ts +0 -3
  363. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js +0 -11
  364. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js.map +0 -1
  365. package/dist/components/LibraryItemsList/TileDisplay/index.d.ts +0 -2
  366. package/dist/components/LibraryItemsList/TileDisplay/index.js +0 -6
  367. package/dist/components/LibraryItemsList/TileDisplay/index.js.map +0 -1
  368. package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.d.ts +0 -2
  369. package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js +0 -66
  370. package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js.map +0 -1
  371. package/dist/components/LibraryItemsList/VersionsPanel/index.d.ts +0 -2
  372. package/dist/components/LibraryItemsList/VersionsPanel/index.js +0 -6
  373. package/dist/components/LibraryItemsList/VersionsPanel/index.js.map +0 -1
  374. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.d.ts +0 -9
  375. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +0 -85
  376. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +0 -1
  377. package/dist/components/LibraryItemsList/ViewPanel/EditView/index.d.ts +0 -2
  378. package/dist/components/LibraryItemsList/ViewPanel/EditView/index.js +0 -6
  379. package/dist/components/LibraryItemsList/ViewPanel/EditView/index.js.map +0 -1
  380. package/dist/components/LibraryItemsList/ViewPanel/View/View.d.ts +0 -7
  381. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +0 -152
  382. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +0 -1
  383. package/dist/components/LibraryItemsList/ViewPanel/View/index.d.ts +0 -2
  384. package/dist/components/LibraryItemsList/ViewPanel/View/index.js +0 -6
  385. package/dist/components/LibraryItemsList/ViewPanel/View/index.js.map +0 -1
  386. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.d.ts +0 -2
  387. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js +0 -209
  388. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js.map +0 -1
  389. package/dist/components/LibraryItemsList/ViewPanel/index.d.ts +0 -2
  390. package/dist/components/LibraryItemsList/ViewPanel/index.js +0 -6
  391. package/dist/components/LibraryItemsList/ViewPanel/index.js.map +0 -1
  392. package/dist/components/LibraryItemsList/constants.d.ts +0 -12
  393. package/dist/components/LibraryItemsList/constants.js +0 -19
  394. package/dist/components/LibraryItemsList/constants.js.map +0 -1
  395. package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.d.ts +0 -3
  396. package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js +0 -21
  397. package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js.map +0 -1
  398. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.d.ts +0 -3
  399. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js +0 -18
  400. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js.map +0 -1
  401. package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.d.ts +0 -4
  402. package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js +0 -64
  403. package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js.map +0 -1
  404. package/dist/components/LibraryItemsList/helpers/getFieldFromKey.d.ts +0 -5
  405. package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js +0 -40
  406. package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js.map +0 -1
  407. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.d.ts +0 -6
  408. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +0 -10
  409. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +0 -1
  410. package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.d.ts +0 -2
  411. package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js +0 -13
  412. package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js.map +0 -1
  413. package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.d.ts +0 -2
  414. package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js +0 -18
  415. package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js.map +0 -1
  416. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.d.ts +0 -8
  417. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +0 -99
  418. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +0 -1
  419. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +0 -82
  420. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.js +0 -2
  421. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.js.map +0 -1
  422. package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.d.ts +0 -2
  423. package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.js +0 -6
  424. package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.js.map +0 -1
  425. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.d.ts +0 -7
  426. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.js +0 -7
  427. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.js.map +0 -1
  428. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +0 -121
  429. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +0 -228
  430. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +0 -1
  431. package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.d.ts +0 -5
  432. package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.js +0 -8
  433. package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.js.map +0 -1
  434. package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.d.ts +0 -7
  435. package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js +0 -40
  436. package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js.map +0 -1
  437. package/dist/components/LibraryItemsList/index.d.ts +0 -1
  438. package/dist/components/LibraryItemsList/index.js +0 -5
  439. package/dist/components/LibraryItemsList/index.js.map +0 -1
  440. package/dist/components/LibraryItemsList/manageItems.d.ts +0 -11
  441. package/dist/components/LibraryItemsList/manageItems.js +0 -98
  442. package/dist/components/LibraryItemsList/manageItems.js.map +0 -1
  443. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.d.ts +0 -7
  444. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js +0 -38
  445. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js.map +0 -1
  446. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.d.ts +0 -2
  447. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.js +0 -6
  448. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.js.map +0 -1
  449. package/dist/components/LibraryItemsList/shared/SelectCellsBtn.d.ts +0 -12
  450. package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js +0 -29
  451. package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js.map +0 -1
  452. package/dist/components/LibraryItemsList/shared/sharedUtils.d.ts +0 -4
  453. package/dist/components/LibraryItemsList/shared/sharedUtils.js +0 -9
  454. package/dist/components/LibraryItemsList/shared/sharedUtils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TreeNodeTitle.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/TreeNodeTitle.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAyB,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACvE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAE1D,OAAO,E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AEtE,OAAO,qBAAqB,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/B,KAAC,MAAM,cACH,KAAC,SAAS,IAAC,WAAW,EAAE,qBAAqB,GAAI,GAC5C,CACZ,CAAC,CAAC,CAAC,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAqB,EAAE,aAAuB,EAAU,EAAE,CAClF,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;IACnC,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACxD,KAAK,IAAI,CAAC,CAAC;IACf,CAAC;IACD,KAAK,IAAI,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAClD,OAAO,KAAK,CAAC;AACjB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useState, type FunctionComponent} from 'react';\nimport {type ITreeMapElement} from './_types';\nimport {KitButton, KitIdCard, KitTag, KitTypography} from 'aristid-ds';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faCheck} from '@fortawesome/free-solid-svg-icons';\nimport {type ITreeNodeWithRecord} from '_ui/types';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport styled from 'styled-components';\n\nconst TreeNodeLine = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n`;\nconst TreeNodeLineSection = styled.div`\n display: flex;\n align-items: center;\n gap: calc(var(--general-spacing-xs) * 1px);\n`;\ninterface ITreeNodeTitleProps {\n checkable: boolean;\n disabledNodes: string[];\n loadRecursively: boolean;\n node: ITreeMapElement;\n onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;\n selectedNodes: string[];\n showSelectChildrenButton: boolean;\n}\n\nexport const TreeNodeTitle: FunctionComponent<ITreeNodeTitleProps> = ({\n checkable,\n disabledNodes,\n loadRecursively,\n node,\n onSelect,\n selectedNodes,\n showSelectChildrenButton,\n}) => {\n const {t} = useSharedTranslation();\n\n const [hover, setHover] = useState(false);\n\n const isSelected = selectedNodes.includes(node.id) && !node.isShowMore;\n const isDisabled = disabledNodes.includes(node.id);\n\n const buttonInSelectMode = node.children\n .filter(child => !child.isShowMore && !disabledNodes.includes(child.id))\n .every(child => !selectedNodes.includes(child.id));\n\n const handleChildrenSelection = (event: React.MouseEvent) => {\n event.stopPropagation();\n node.children.forEach(child => {\n if (node.disabled || child.isShowMore) {\n return;\n }\n onSelect(child, buttonInSelectMode);\n });\n };\n\n return (\n <TreeNodeLine onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}>\n <TreeNodeLineSection>\n <KitTypography.Text size=\"fontSize5\" disabled={isDisabled}>\n {node.title}\n </KitTypography.Text>\n <SelectedChildrenCount node={node} selectedNodes={selectedNodes} loadRecursively={loadRecursively} />\n </TreeNodeLineSection>\n <TreeNodeLineSection>\n {showSelectChildrenButton && node.children.length > 0 && hover && (\n <KitButton size=\"s\" onClick={e => handleChildrenSelection(e)}>\n {t(`tree-node-selection.${buttonInSelectMode ? 'select_children' : 'unselect_children'}`)}\n </KitButton>\n )}\n {!checkable && isSelected && (\n <FontAwesomeIcon\n icon={faCheck}\n color={\n isDisabled ? 'var(--general-utilities-text-disabled)' : 'var(--general-utilities-text-blue)'\n }\n />\n )}\n </TreeNodeLineSection>\n </TreeNodeLine>\n );\n};\n\nconst SelectedChildrenCount: FunctionComponent<{\n node: ITreeMapElement;\n selectedNodes: string[];\n loadRecursively: boolean;\n}> = ({node, selectedNodes, loadRecursively}) => {\n // it can work only if all children are loaded\n if (!loadRecursively) {\n return null;\n }\n\n const selectedChildrenCount = countSelectedNodes(node, selectedNodes);\n\n return selectedChildrenCount > 0 ? (\n <KitTag>\n <KitIdCard description={selectedChildrenCount} />\n </KitTag>\n ) : null;\n};\n\nconst countSelectedNodes = (node: ITreeMapElement, selectedNodes: string[]): number =>\n node.children?.reduce((count, child) => {\n if (selectedNodes.includes(child.id) && !child.isShowMore) {\n count += 1;\n }\n count += countSelectedNodes(child, selectedNodes);\n return count;\n }, 0) ?? 0;\n"]}
1
+ {"version":3,"file":"TreeNodeTitle.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/TreeNodeTitle.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAyB,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACvE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,mCAAmC,CAAC;AAE1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAI9B,CAAC;AACF,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIrC,CAAC;AAUF,MAAM,CAAC,MAAM,aAAa,GAA2C,CAAC,EAClE,SAAS,EACT,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,wBAAwB,GAC3B,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IACvE,MAAM,UAAU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C,uBAAuB,CAAC,CAAC,CAAC,YACvD,CAAC,CAAC,uBAAuB,kBAAkB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC,GACjF,CACf,EACA,CAAC,SAAS,IAAI,UAAU,IAAI,CACzB,KAAC,eAAe,IACZ,IAAI,EAAE,OAAO,EACb,KAAK,EACD,UAAU,CAAC,CAAC,CAAC,wCAAwC,CAAC,CAAC,CAAC,oCAAoC,GAElG,CACL,IACiB,IACX,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAGtB,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,EAAE,EAAE;IAC3B,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAEtE,OAAO,qBAAqB,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/B,KAAC,MAAM,cACH,KAAC,SAAS,IAAC,WAAW,EAAE,qBAAqB,GAAI,GAC5C,CACZ,CAAC,CAAC,CAAC,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAqB,EAAE,aAAuB,EAAU,EAAE,CAClF,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;IACnC,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACxD,KAAK,IAAI,CAAC,CAAC;IACf,CAAC;IACD,KAAK,IAAI,kBAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAClD,OAAO,KAAK,CAAC;AACjB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useState, type FunctionComponent} from 'react';\nimport {type ITreeMapElement} from './_types';\nimport {KitButton, KitIdCard, KitTag, KitTypography} from 'aristid-ds';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faCheck} from '@fortawesome/free-solid-svg-icons';\nimport {type ITreeNodeWithRecord} from '_ui/types';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport styled from 'styled-components';\n\nconst TreeNodeLine = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n`;\nconst TreeNodeLineSection = styled.div`\n display: flex;\n align-items: center;\n gap: calc(var(--general-spacing-xs) * 1px);\n`;\ninterface ITreeNodeTitleProps {\n checkable: boolean;\n disabledNodes: string[];\n node: ITreeMapElement;\n onSelect: (node: ITreeNodeWithRecord, selected: boolean) => void;\n selectedNodes: string[];\n showSelectChildrenButton: boolean;\n}\n\nexport const TreeNodeTitle: FunctionComponent<ITreeNodeTitleProps> = ({\n checkable,\n disabledNodes,\n node,\n onSelect,\n selectedNodes,\n showSelectChildrenButton,\n}) => {\n const {t} = useSharedTranslation();\n\n const [hover, setHover] = useState(false);\n\n const isSelected = selectedNodes.includes(node.id) && !node.isShowMore;\n const isDisabled = disabledNodes.includes(node.id);\n\n const buttonInSelectMode = node.children\n .filter(child => !child.isShowMore && !disabledNodes.includes(child.id))\n .every(child => !selectedNodes.includes(child.id));\n\n const handleChildrenSelection = (event: React.MouseEvent) => {\n event.stopPropagation();\n node.children.forEach(child => {\n if (node.disabled || child.isShowMore) {\n return;\n }\n onSelect(child, buttonInSelectMode);\n });\n };\n\n return (\n <TreeNodeLine onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)}>\n <TreeNodeLineSection>\n <KitTypography.Text size=\"fontSize5\" disabled={isDisabled}>\n {node.title}\n </KitTypography.Text>\n <SelectedChildrenCount node={node} selectedNodes={selectedNodes} />\n </TreeNodeLineSection>\n <TreeNodeLineSection>\n {showSelectChildrenButton && node.children.length > 0 && hover && (\n <KitButton size=\"s\" onClick={e => handleChildrenSelection(e)}>\n {t(`tree-node-selection.${buttonInSelectMode ? 'select_children' : 'unselect_children'}`)}\n </KitButton>\n )}\n {!checkable && isSelected && (\n <FontAwesomeIcon\n icon={faCheck}\n color={\n isDisabled ? 'var(--general-utilities-text-disabled)' : 'var(--general-utilities-text-blue)'\n }\n />\n )}\n </TreeNodeLineSection>\n </TreeNodeLine>\n );\n};\n\nconst SelectedChildrenCount: FunctionComponent<{\n node: ITreeMapElement;\n selectedNodes: string[];\n}> = ({node, selectedNodes}) => {\n const selectedChildrenCount = countSelectedNodes(node, selectedNodes);\n\n return selectedChildrenCount > 0 ? (\n <KitTag>\n <KitIdCard description={selectedChildrenCount} />\n </KitTag>\n ) : null;\n};\n\nconst countSelectedNodes = (node: ITreeMapElement, selectedNodes: string[]): number =>\n node.children?.reduce((count, child) => {\n if (selectedNodes.includes(child.id) && !child.isShowMore) {\n count += 1;\n }\n count += countSelectedNodes(child, selectedNodes);\n return count;\n }, 0) ?? 0;\n"]}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generates recursive GraphQL for tree node children.
3
+ * Used to fetch nested children up to the specified depth.
4
+ */
5
+ export declare const treeContentTreeNodeChildren: (depth?: number) => string;
6
+ export declare const treeContentDataQuery: (depthTreeNodes?: number) => import("@apollo/client").DocumentNode;
@@ -0,0 +1,56 @@
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 { gql } from '@apollo/client';
5
+ const DEFAULT_DEPTH_TREE_NODES = 10;
6
+ /**
7
+ * Generates recursive GraphQL for tree node children.
8
+ * Used to fetch nested children up to the specified depth.
9
+ */
10
+ export const treeContentTreeNodeChildren = (depth = 0) => `
11
+ children {
12
+ id
13
+ childrenCount
14
+ record {
15
+ id
16
+ whoAmI {
17
+ id
18
+ label
19
+ library {
20
+ id
21
+ }
22
+ }
23
+ }
24
+ ${depth > 0 ? treeContentTreeNodeChildren(depth - 1) : ''}
25
+ }
26
+ `;
27
+ export const treeContentDataQuery = (depthTreeNodes = DEFAULT_DEPTH_TREE_NODES) => gql `
28
+ query TreeContentDataQuery(
29
+ $treeId: ID!
30
+ $startAt: ID
31
+ $childrenAsRecordValuePermissionFilter: ChildrenAsRecordValuePermissionFilterInput
32
+ $dependentValuesPermissionFilter: DependentValuesPermissionFilterInput
33
+ ) {
34
+ treeContent(
35
+ treeId: $treeId
36
+ startAt: $startAt
37
+ childrenAsRecordValuePermissionFilter: $childrenAsRecordValuePermissionFilter
38
+ dependentValuesPermissionFilter: $dependentValuesPermissionFilter
39
+ ) {
40
+ id
41
+ childrenCount
42
+ record {
43
+ id
44
+ whoAmI {
45
+ id
46
+ label
47
+ library {
48
+ id
49
+ }
50
+ }
51
+ }
52
+ ${treeContentTreeNodeChildren(depthTreeNodes - 1)}
53
+ }
54
+ }
55
+ `;
56
+ //# sourceMappingURL=treeContentDataQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeContentDataQuery.js","sourceRoot":"","sources":["../../../../src/components/SelectTreeNode/_queries/treeContentDataQuery.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AAEnC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,EAAE,CAAC;;;;;;;;;;;;;;UAchD,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,2BAA2B,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;;CAEhE,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,cAAc,GAAG,wBAAwB,EAAE,EAAE,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;cAyBxE,2BAA2B,CAAC,cAAc,GAAG,CAAC,CAAC;;;CAG5D,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {gql} from '@apollo/client';\n\nconst DEFAULT_DEPTH_TREE_NODES = 10;\n\n/**\n * Generates recursive GraphQL for tree node children.\n * Used to fetch nested children up to the specified depth.\n */\nexport const treeContentTreeNodeChildren = (depth = 0) => `\n children {\n id\n childrenCount\n record {\n id\n whoAmI {\n id\n label\n library {\n id\n }\n }\n }\n ${depth > 0 ? treeContentTreeNodeChildren(depth - 1) : ''}\n }\n`;\n\nexport const treeContentDataQuery = (depthTreeNodes = DEFAULT_DEPTH_TREE_NODES) => gql`\n query TreeContentDataQuery(\n $treeId: ID!\n $startAt: ID\n $childrenAsRecordValuePermissionFilter: ChildrenAsRecordValuePermissionFilterInput\n $dependentValuesPermissionFilter: DependentValuesPermissionFilterInput\n ) {\n treeContent(\n treeId: $treeId\n startAt: $startAt\n childrenAsRecordValuePermissionFilter: $childrenAsRecordValuePermissionFilter\n dependentValuesPermissionFilter: $dependentValuesPermissionFilter\n ) {\n id\n childrenCount\n record {\n id\n whoAmI {\n id\n label\n library {\n id\n }\n }\n }\n ${treeContentTreeNodeChildren(depthTreeNodes - 1)}\n }\n }\n`;\n"]}
@@ -3,7 +3,6 @@ import { type KitTree } from 'aristid-ds';
3
3
  import { type ITreeNodeWithRecord } from '../../types';
4
4
  export interface ITreeMapElement extends ITreeNodeWithRecord {
5
5
  isLeaf?: boolean;
6
- paginationOffset: number;
7
6
  children: ITreeMapElement[];
8
7
  parents?: string[];
9
8
  isShowMore?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/_types.ts"],"names":[],"mappings":"AAuBA,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAA4B,EAAkD,EAAE,CAC/G,SAAS,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ComponentProps, type Key} from 'react';\nimport {type KitTree} from 'aristid-ds';\nimport {type ITreeNodeWithRecord} from '_ui/types';\n\nexport interface ITreeMapElement extends ITreeNodeWithRecord {\n isLeaf?: boolean;\n paginationOffset: number;\n children: ITreeMapElement[];\n parents?: string[];\n isShowMore?: boolean;\n selectable?: boolean;\n disabled?: boolean;\n}\n\nexport interface ITreeMap {\n [nodeId: string]: ITreeMapElement;\n}\n\ntype OnCheckFirstParam = Parameters<ComponentProps<typeof KitTree>['onCheck']>[0];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const _isObjectSelection = (selection: OnCheckFirstParam): selection is Exclude<OnCheckFirstParam, Key[]> =>\n 'checked' in selection && 'halfChecked' in selection;\n"]}
1
+ {"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../src/components/SelectTreeNode/_types.ts"],"names":[],"mappings":"AAsBA,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAA4B,EAAkD,EAAE,CAC/G,SAAS,IAAI,SAAS,IAAI,aAAa,IAAI,SAAS,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ComponentProps, type Key} from 'react';\nimport {type KitTree} from 'aristid-ds';\nimport {type ITreeNodeWithRecord} from '_ui/types';\n\nexport interface ITreeMapElement extends ITreeNodeWithRecord {\n isLeaf?: boolean;\n children: ITreeMapElement[];\n parents?: string[];\n isShowMore?: boolean;\n selectable?: boolean;\n disabled?: boolean;\n}\n\nexport interface ITreeMap {\n [nodeId: string]: ITreeMapElement;\n}\n\ntype OnCheckFirstParam = Parameters<ComponentProps<typeof KitTree>['onCheck']>[0];\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const _isObjectSelection = (selection: OnCheckFirstParam): selection is Exclude<OnCheckFirstParam, Key[]> =>\n 'checked' in selection && 'halfChecked' in selection;\n"]}
@@ -1,8 +1,6 @@
1
1
  export * from './AttributePicker';
2
- export * from './AttributesSelectionList';
3
2
  export * from './BasicButton';
4
3
  export * from './CreateDirectory';
5
- export * from './DeactivateRecordsModal';
6
4
  export * from './Dimmer';
7
5
  export * from './EditApplication';
8
6
  export * from './EditAttributeModal';
@@ -20,7 +18,6 @@ export * from './FloatingMenu';
20
18
  export * from './ImageLoading';
21
19
  export * from './ImageMissing';
22
20
  export * from './ImportModal';
23
- export * from './LibraryItemsList';
24
21
  export * from './LibraryPicker';
25
22
  export * from './List';
26
23
  export * from './Loading';
@@ -2,10 +2,8 @@
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
4
  export * from './AttributePicker';
5
- export * from './AttributesSelectionList';
6
5
  export * from './BasicButton';
7
6
  export * from './CreateDirectory';
8
- export * from './DeactivateRecordsModal';
9
7
  export * from './Dimmer';
10
8
  export * from './EditApplication';
11
9
  export * from './EditAttributeModal';
@@ -23,7 +21,6 @@ export * from './FloatingMenu';
23
21
  export * from './ImageLoading';
24
22
  export * from './ImageMissing';
25
23
  export * from './ImportModal';
26
- export * from './LibraryItemsList';
27
24
  export * from './LibraryPicker';
28
25
  export * from './List';
29
26
  export * from './Loading';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nexport * from './AttributePicker';\nexport * from './AttributesSelectionList';\nexport * from './BasicButton';\nexport * from './CreateDirectory';\nexport * from './DeactivateRecordsModal';\nexport * from './Dimmer';\nexport * from './EditApplication';\nexport * from './EditAttributeModal';\nexport * from './EditLibraryModal';\nexport * from './EditTreeModal';\nexport * from './EntityCard';\nexport * from './EntityPreview';\nexport * from './ErrorBoundary';\nexport * from './ErrorDisplay';\nexport * from './ErrorMessage';\nexport * from './Explorer';\nexport * from './FieldsGroup';\nexport * from './Filters';\nexport * from './FloatingMenu';\nexport * from './ImageLoading';\nexport * from './ImageMissing';\nexport * from './ImportModal';\nexport * from './LibraryItemsList';\nexport * from './LibraryPicker';\nexport * from './List';\nexport * from './Loading';\nexport * from './Notifications';\nexport * from './RecordCard';\nexport * from './RecordEdition';\nexport * from './RecordHistory';\nexport * from './RecordPreviewWithModal';\nexport * from './SearchModal';\nexport * from './SelectTreeNode';\nexport * from './SelectTreeNodeModalOld';\nexport * from './ShowMore';\nexport * from './SimpleErrorBoundary';\nexport * from './SubmitStateNotifier';\nexport * from './TreePicker';\nexport * from './TriggerPreviewsGenerationModal';\nexport * from './UploadFiles';\nexport * from './ValuesVersionConfigurator';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kCAAkC,CAAC;AACjD,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nexport * from './AttributePicker';\nexport * from './BasicButton';\nexport * from './CreateDirectory';\nexport * from './Dimmer';\nexport * from './EditApplication';\nexport * from './EditAttributeModal';\nexport * from './EditLibraryModal';\nexport * from './EditTreeModal';\nexport * from './EntityCard';\nexport * from './EntityPreview';\nexport * from './ErrorBoundary';\nexport * from './ErrorDisplay';\nexport * from './ErrorMessage';\nexport * from './Explorer';\nexport * from './FieldsGroup';\nexport * from './Filters';\nexport * from './FloatingMenu';\nexport * from './ImageLoading';\nexport * from './ImageMissing';\nexport * from './ImportModal';\nexport * from './LibraryPicker';\nexport * from './List';\nexport * from './Loading';\nexport * from './Notifications';\nexport * from './RecordCard';\nexport * from './RecordEdition';\nexport * from './RecordHistory';\nexport * from './RecordPreviewWithModal';\nexport * from './SearchModal';\nexport * from './SelectTreeNode';\nexport * from './SelectTreeNodeModalOld';\nexport * from './ShowMore';\nexport * from './SimpleErrorBoundary';\nexport * from './SubmitStateNotifier';\nexport * from './TreePicker';\nexport * from './TriggerPreviewsGenerationModal';\nexport * from './UploadFiles';\nexport * from './ValuesVersionConfigurator';\n"]}
@@ -1,5 +1,5 @@
1
1
  import { objectToNameValueArray } from '@leav/utils';
2
- import { useState } from 'react';
2
+ import { useEffect, useState } from 'react';
3
3
  import { useRecordFormQuery, } from '../../_gqlTypes';
4
4
  import { arrayValueVersionToObject } from '../../_utils';
5
5
  const useGetRecordForm = ({ libraryId, recordId, formId, version, }) => {
@@ -12,7 +12,7 @@ const useGetRecordForm = ({ libraryId, recordId, formId, version, }) => {
12
12
  treeNodeId: value.id,
13
13
  }))
14
14
  : null;
15
- const { loading, error, refetch } = useRecordFormQuery({
15
+ const { loading, error, data, refetch } = useRecordFormQuery({
16
16
  fetchPolicy: 'no-cache',
17
17
  notifyOnNetworkStatusChange: true,
18
18
  variables: {
@@ -21,28 +21,30 @@ const useGetRecordForm = ({ libraryId, recordId, formId, version, }) => {
21
21
  formId,
22
22
  version: requestVersion,
23
23
  },
24
- onCompleted: data => {
25
- // Transform result to format values version to a more convenient object
26
- const recordFormFormatted = {
27
- ...data.recordForm,
28
- elements: data.recordForm.elements.map((element) => ({
29
- ...element,
30
- values: (element?.values ?? []).map(value => ({
31
- ...value,
32
- version: arrayValueVersionToObject(value.version ?? []),
33
- metadata: (value.metadata ?? []).map(metadata => ({
34
- ...metadata,
35
- value: {
36
- ...metadata.value,
37
- version: arrayValueVersionToObject(metadata.value?.version ?? []),
38
- },
39
- })),
24
+ });
25
+ useEffect(() => {
26
+ if (!data?.recordForm) {
27
+ return;
28
+ }
29
+ const recordFormFormatted = {
30
+ ...data.recordForm,
31
+ elements: data.recordForm.elements.map((element) => ({
32
+ ...element,
33
+ values: (element?.values ?? []).map(value => ({
34
+ ...value,
35
+ version: arrayValueVersionToObject(value.version ?? []),
36
+ metadata: (value.metadata ?? []).map(metadata => ({
37
+ ...metadata,
38
+ value: {
39
+ ...metadata.value,
40
+ version: arrayValueVersionToObject(metadata.value?.version ?? []),
41
+ },
40
42
  })),
41
43
  })),
42
- };
43
- setRecordForm(recordFormFormatted);
44
- },
45
- });
44
+ })),
45
+ };
46
+ setRecordForm(recordFormFormatted);
47
+ }, [data]);
46
48
  const refetchRecordForm = () => refetch({
47
49
  libraryId,
48
50
  recordId,
@@ -1 +1 @@
1
- {"version":3,"file":"useGetRecordForm.js","sourceRoot":"","sources":["../../../src/hooks/useGetRecordForm/useGetRecordForm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,sBAAsB,EAAgB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE/B,OAAO,EAIH,kBAAkB,GAIrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,yBAAyB,EAAC,MAAM,YAAY,CAAC;AAkErD,MAAM,gBAAgB,GAAG,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,GAMV,EAAyB,EAAE;IACxB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAC;IAEvE,MAAM,cAAc,GAAG,OAAO;QAC1B,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC;aAC1B,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC;aAC5C,GAAG,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;YACrB,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,KAAK,CAAC,EAAE;SACvB,CAAC,CAAC;QACT,CAAC,CAAC,IAAI,CAAC;IAEX,MAAM,EAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC,GAAG,kBAAkB,CAAC;QACjD,WAAW,EAAE,UAAU;QACvB,2BAA2B,EAAE,IAAI;QACjC,SAAS,EAAE;YACP,SAAS;YACT,QAAQ;YACR,MAAM;YACN,OAAO,EAAE,cAAc;SAC1B;QACD,WAAW,EAAE,IAAI,CAAC,EAAE;YAChB,wEAAwE;YACxE,MAAM,mBAAmB,GAAgB;gBACrC,GAAG,IAAI,CAAC,UAAU;gBAClB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAClC,CAAC,OAAO,EAAqB,EAAE,CAAC,CAAC;oBAC7B,GAAG,OAAO;oBACV,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAC1C,GAAG,KAAK;wBACR,OAAO,EAAE,yBAAyB,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;wBACvD,QAAQ,EAAE,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;4BAC9C,GAAG,QAAQ;4BACX,KAAK,EAAE;gCACH,GAAG,QAAQ,CAAC,KAAK;gCACjB,OAAO,EAAE,yBAAyB,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE,CAAC;6BACpE;yBACJ,CAAC,CAAC;qBACN,CAAC,CAAC;iBACN,CAAC,CACL;aACJ,CAAC;YAEF,aAAa,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;KACJ,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAC3B,OAAO,CAAC;QACJ,SAAS;QACT,QAAQ;QACR,MAAM;QACN,OAAO,EAAE,cAAc;KAC1B,CAAC,CAAC;IAEP,kHAAkH;IAClH,2BAA2B;IAC3B,OAAO,EAAC,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAC,CAAC;AACxG,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ApolloError} from '@apollo/client';\nimport {objectToNameValueArray, type Override} from '@leav/utils';\nimport {useState} from 'react';\nimport {type IValueVersion} from '_ui/types/values';\nimport {\n type RecordFormElementFragment,\n type RecordFormQuery,\n type RecordFormQueryResult,\n useRecordFormQuery,\n type ValueDetailsLinkValueFragment,\n type ValueDetailsTreeValueFragment,\n type ValueDetailsValueFragment,\n} from '_ui/_gqlTypes';\nimport {arrayValueVersionToObject} from '_ui/_utils';\n\nexport type RecordFormElementsValueStandardValue = Override<\n ValueDetailsValueFragment,\n {\n version?: IValueVersion;\n metadata?: Array<{\n name: string;\n value: Override<ValueDetailsValueFragment['metadata'][number]['value'], {version?: IValueVersion}>;\n }>;\n attribute?: ValueDetailsValueFragment['attribute'];\n }\n>;\n\nexport type RecordFormElementsValueLinkValue = Override<\n ValueDetailsLinkValueFragment,\n {\n version?: IValueVersion;\n metadata?: Array<{\n name: string;\n value: Override<ValueDetailsLinkValueFragment['metadata'][number]['value'], {version?: IValueVersion}>;\n }>;\n attribute?: ValueDetailsValueFragment['attribute'];\n }\n>;\n\nexport type RecordFormElementsValueTreeValue = Override<\n ValueDetailsTreeValueFragment,\n {\n version?: IValueVersion;\n metadata?: Array<{\n name: string;\n value: Override<ValueDetailsTreeValueFragment['metadata'][number]['value'], {version?: IValueVersion}>;\n }>;\n attribute?: ValueDetailsValueFragment['attribute'];\n }\n>;\n\nexport type RecordFormElementsValue =\n | RecordFormElementsValueStandardValue\n | RecordFormElementsValueLinkValue\n | RecordFormElementsValueTreeValue;\n\nexport type RecordFormElement = Override<\n RecordFormElementFragment,\n {\n values: RecordFormElementsValue[];\n }\n>;\n\nexport type IRecordForm = Override<\n RecordFormQuery['recordForm'],\n {\n elements: RecordFormElement[];\n }\n>;\n\nexport type RecordFormElementAttribute = RecordFormElement['attribute'];\n\nexport interface IUseGetRecordFormHook {\n loading: boolean;\n error: ApolloError;\n recordForm: IRecordForm | null;\n refetch: RecordFormQueryResult['refetch'];\n}\n\nconst useGetRecordForm = ({\n libraryId,\n recordId,\n formId,\n version,\n}: {\n libraryId: string;\n recordId: string;\n formId: string;\n version: IValueVersion;\n}): IUseGetRecordFormHook => {\n const [recordForm, setRecordForm] = useState<IRecordForm | null>(null);\n\n const requestVersion = version\n ? objectToNameValueArray(version)\n .filter(arrayVersion => !!arrayVersion.value)\n .map(({name, value}) => ({\n treeId: name,\n treeNodeId: value.id,\n }))\n : null;\n\n const {loading, error, refetch} = useRecordFormQuery({\n fetchPolicy: 'no-cache',\n notifyOnNetworkStatusChange: true,\n variables: {\n libraryId,\n recordId,\n formId,\n version: requestVersion,\n },\n onCompleted: data => {\n // Transform result to format values version to a more convenient object\n const recordFormFormatted: IRecordForm = {\n ...data.recordForm,\n elements: data.recordForm.elements.map(\n (element): RecordFormElement => ({\n ...element,\n values: (element?.values ?? []).map(value => ({\n ...value,\n version: arrayValueVersionToObject(value.version ?? []),\n metadata: (value.metadata ?? []).map(metadata => ({\n ...metadata,\n value: {\n ...metadata.value,\n version: arrayValueVersionToObject(metadata.value?.version ?? []),\n },\n })),\n })),\n }),\n ),\n };\n\n setRecordForm(recordFormFormatted);\n },\n });\n\n const refetchRecordForm = () =>\n refetch({\n libraryId,\n recordId,\n formId,\n version: requestVersion,\n });\n\n // To avoid a moment where loading is done and record form is not available yet, we force loading to be true until\n // record form is available\n return {loading: loading || (!recordForm && !error), error, recordForm, refetch: refetchRecordForm};\n};\n\nexport default useGetRecordForm;\n"]}
1
+ {"version":3,"file":"useGetRecordForm.js","sourceRoot":"","sources":["../../../src/hooks/useGetRecordForm/useGetRecordForm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,sBAAsB,EAAgB,MAAM,aAAa,CAAC;AAClE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE1C,OAAO,EAIH,kBAAkB,GAIrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,yBAAyB,EAAC,MAAM,YAAY,CAAC;AAkErD,MAAM,gBAAgB,GAAG,CAAC,EACtB,SAAS,EACT,QAAQ,E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EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;wBAC9C,GAAG,QAAQ;wBACX,KAAK,EAAE;4BACH,GAAG,QAAQ,CAAC,KAAK;4BACjB,OAAO,EAAE,yBAAyB,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE,CAAC;yBACpE;qBACJ,CAAC,CAAC;iBACN,CAAC,CAAC;aACN,CAAC,CACL;SACJ,CAAC;QAEF,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAC3B,OAAO,CAAC;QACJ,SAAS;QACT,QAAQ;QACR,MAAM;QACN,OAAO,EAAE,cAAc;KAC1B,CAAC,CAAC;IAEP,kHAAkH;IAClH,2BAA2B;IAC3B,OAAO,EAAC,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAC,CAAC;AACxG,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ApolloError} from '@apollo/client';\nimport {objectToNameValueArray, type Override} from '@leav/utils';\nimport {useEffect, useState} from 'react';\nimport {type IValueVersion} from '_ui/types/values';\nimport {\n type RecordFormElementFragment,\n type RecordFormQuery,\n type RecordFormQueryResult,\n useRecordFormQuery,\n type ValueDetailsLinkValueFragment,\n type ValueDetailsTreeValueFragment,\n type ValueDetailsValueFragment,\n} from '_ui/_gqlTypes';\nimport {arrayValueVersionToObject} from '_ui/_utils';\n\nexport type RecordFormElementsValueStandardValue = Override<\n ValueDetailsValueFragment,\n {\n version?: IValueVersion;\n metadata?: Array<{\n name: string;\n value: Override<ValueDetailsValueFragment['metadata'][number]['value'], {version?: IValueVersion}>;\n }>;\n attribute?: ValueDetailsValueFragment['attribute'];\n }\n>;\n\nexport type RecordFormElementsValueLinkValue = Override<\n ValueDetailsLinkValueFragment,\n {\n version?: IValueVersion;\n metadata?: Array<{\n name: string;\n value: Override<ValueDetailsLinkValueFragment['metadata'][number]['value'], {version?: IValueVersion}>;\n }>;\n attribute?: ValueDetailsValueFragment['attribute'];\n }\n>;\n\nexport type RecordFormElementsValueTreeValue = Override<\n ValueDetailsTreeValueFragment,\n {\n version?: IValueVersion;\n metadata?: Array<{\n name: string;\n value: Override<ValueDetailsTreeValueFragment['metadata'][number]['value'], {version?: IValueVersion}>;\n }>;\n attribute?: ValueDetailsValueFragment['attribute'];\n }\n>;\n\nexport type RecordFormElementsValue =\n | RecordFormElementsValueStandardValue\n | RecordFormElementsValueLinkValue\n | RecordFormElementsValueTreeValue;\n\nexport type RecordFormElement = Override<\n RecordFormElementFragment,\n {\n values: RecordFormElementsValue[];\n }\n>;\n\nexport type IRecordForm = Override<\n RecordFormQuery['recordForm'],\n {\n elements: RecordFormElement[];\n }\n>;\n\nexport type RecordFormElementAttribute = RecordFormElement['attribute'];\n\nexport interface IUseGetRecordFormHook {\n loading: boolean;\n error: ApolloError;\n recordForm: IRecordForm | null;\n refetch: RecordFormQueryResult['refetch'];\n}\n\nconst useGetRecordForm = ({\n libraryId,\n recordId,\n formId,\n version,\n}: {\n libraryId: string;\n recordId: string;\n formId: string;\n version: IValueVersion;\n}): IUseGetRecordFormHook => {\n const [recordForm, setRecordForm] = useState<IRecordForm | null>(null);\n\n const requestVersion = version\n ? objectToNameValueArray(version)\n .filter(arrayVersion => !!arrayVersion.value)\n .map(({name, value}) => ({\n treeId: name,\n treeNodeId: value.id,\n }))\n : null;\n\n const {loading, error, data, refetch} = useRecordFormQuery({\n fetchPolicy: 'no-cache',\n notifyOnNetworkStatusChange: true,\n variables: {\n libraryId,\n recordId,\n formId,\n version: requestVersion,\n },\n });\n\n useEffect(() => {\n if (!data?.recordForm) {\n return;\n }\n\n const recordFormFormatted: IRecordForm = {\n ...data.recordForm,\n elements: data.recordForm.elements.map(\n (element): RecordFormElement => ({\n ...element,\n values: (element?.values ?? []).map(value => ({\n ...value,\n version: arrayValueVersionToObject(value.version ?? []),\n metadata: (value.metadata ?? []).map(metadata => ({\n ...metadata,\n value: {\n ...metadata.value,\n version: arrayValueVersionToObject(metadata.value?.version ?? []),\n },\n })),\n })),\n }),\n ),\n };\n\n setRecordForm(recordFormFormatted);\n }, [data]);\n\n const refetchRecordForm = () =>\n refetch({\n libraryId,\n recordId,\n formId,\n version: requestVersion,\n });\n\n // To avoid a moment where loading is done and record form is not available yet, we force loading to be true until\n // record form is available\n return {loading: loading || (!recordForm && !error), error, recordForm, refetch: refetchRecordForm};\n};\n\nexport default useGetRecordForm;\n"]}
@@ -2,7 +2,7 @@
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
4
  import { useQuery } from '@apollo/client';
5
- import { useState } from 'react';
5
+ import { useEffect, useState } from 'react';
6
6
  import { RecordFilterCondition, RecordFilterOperator } from '../../_gqlTypes';
7
7
  import { getRecordColumnsValues, } from '../../_queries/records/getRecordColumnsValues';
8
8
  const _recordIdsToQueryFilters = (recordIds) => recordIds.reduce((allFilters, recordId, i) => {
@@ -25,18 +25,21 @@ export const useGetRecordValuesQuery = (libraryId, columns, recordIds, skip) =>
25
25
  filters: _recordIdsToQueryFilters(recordIds),
26
26
  },
27
27
  skip: skip || !libraryId || !columns.length || !recordIds.length,
28
- onCompleted: data => {
29
- const cleanData = _convertQueryResult(data);
30
- setQueryData(cleanData);
31
- },
32
28
  });
29
+ useEffect(() => {
30
+ if (!query.data) {
31
+ return;
32
+ }
33
+ const cleanData = _convertQueryResult(query.data);
34
+ setQueryData(cleanData);
35
+ }, [query.data]);
33
36
  const customRefetch = async (refetchRecordIds) => {
34
37
  const customVariables = {
35
38
  filters: _recordIdsToQueryFilters(refetchRecordIds ?? []),
36
39
  };
37
40
  const refetchData = await query.refetch(customVariables);
38
41
  const cleanData = _convertQueryResult(refetchData.data);
39
- setQueryData({ ...queryData, ...cleanData });
42
+ setQueryData(prev => ({ ...(prev ?? {}), ...cleanData }));
40
43
  return refetchData;
41
44
  };
42
45
  // @ts-ignore
@@ -1 +1 @@
1
- {"version":3,"file":"useGetRecordValuesQuery.js","sourceRoot":"","sources":["../../../src/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAA2C,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAElF,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,qBAAqB,EAA0B,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EACH,sBAAsB,GAIzB,MAAM,+CAA+C,CAAC;AAWvD,MAAM,wBAAwB,GAAG,CAAC,SAAmB,EAAuB,EAAE,CAC1E,SAAS,CAAC,MAAM,CAAC,CAAC,UAA+B,EAAE,QAAgB,EAAE,CAAS,EAAE,EAAE;IAC9E,IAAI,CAAC,EAAE,CAAC;QACJ,UAAU,CAAC,IAAI,CAAC,EAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,EAAC,CAAC,CAAC;IACzD,CAAC;IAED,UAAU,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC,CAAC;IAExF,OAAO,UAAU,CAAC;AACtB,CAAC,EAAE,EAAE,CAAC,CAAC;AAEX,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACnC,SAAiB,EACjB,OAAiB,EACjB,SAAmB,EACnB,IAAc,EACqB,EAAE;IACrC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAA0B,CA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SAAS,KAAK,SAAS;QACxD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,aAE+C;KAC3D,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\n\nimport {type ApolloQueryResult, type QueryResult, useQuery} from '@apollo/client';\nimport {type Override} from '@leav/utils';\nimport {useState} from 'react';\nimport {RecordFilterCondition, type RecordFilterInput, RecordFilterOperator} from '_ui/_gqlTypes';\nimport {\n getRecordColumnsValues,\n type GetRecordColumnsValuesRecord,\n type IGetRecordColumnsValues,\n type IGetRecordColumnsValuesVariables,\n} from '../../_queries/records/getRecordColumnsValues';\n\nexport interface IColumnsValuesByRecord {\n [recordId: string]: GetRecordColumnsValuesRecord;\n}\n\nexport type IUseGetRecordColumnsValuesQueryHook = Override<\n QueryResult<IGetRecordColumnsValues>,\n {data: IColumnsValuesByRecord}\n>;\n\nconst _recordIdsToQueryFilters = (recordIds: string[]): RecordFilterInput[] =>\n recordIds.reduce((allFilters: RecordFilterInput[], recordId: string, i: number) => {\n if (i) {\n allFilters.push({operator: RecordFilterOperator.OR});\n }\n\n allFilters.push({field: 'id', condition: RecordFilterCondition.EQUAL, value: recordId});\n\n return allFilters;\n }, []);\n\nexport const useGetRecordValuesQuery = (\n libraryId: string,\n columns: string[],\n recordIds: string[],\n skip?: boolean,\n): IUseGetRecordColumnsValuesQueryHook => {\n const [queryData, setQueryData] = useState<IColumnsValuesByRecord>();\n\n const _convertQueryResult = (queryResult: IGetRecordColumnsValues): IColumnsValuesByRecord =>\n (queryResult.records.list ?? []).reduce((valuesByRecord, recordValues) => {\n valuesByRecord[recordValues._id] = recordValues;\n return valuesByRecord;\n }, {});\n\n const query = useQuery<IGetRecordColumnsValues, IGetRecordColumnsValuesVariables>(getRecordColumnsValues(columns), {\n variables: {\n library: libraryId,\n // Turn records ids into filters with OR operators\n filters: _recordIdsToQueryFilters(recordIds),\n },\n skip: skip || !libraryId || !columns.length || !recordIds.length,\n onCompleted: data => {\n const cleanData: IColumnsValuesByRecord = _convertQueryResult(data);\n setQueryData(cleanData);\n },\n });\n\n const customRefetch = async (refetchRecordIds: string[]) => {\n const customVariables = {\n filters: _recordIdsToQueryFilters(refetchRecordIds ?? []),\n };\n\n const refetchData = await query.refetch(customVariables);\n\n const cleanData: IColumnsValuesByRecord = _convertQueryResult(refetchData.data);\n setQueryData({...queryData, ...cleanData});\n\n return refetchData;\n };\n\n // @ts-ignore\n return {\n ...query,\n loading: query.loading || typeof queryData === undefined,\n data: queryData,\n refetch: customRefetch as (\n variables?: Partial<IGetRecordColumnsValuesVariables>,\n ) => Promise<ApolloQueryResult<IGetRecordColumnsValues>>,\n };\n};\n"]}
1
+ {"version":3,"file":"useGetRecordValuesQuery.js","sourceRoot":"","sources":["../../../src/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAA2C,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAElF,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAC,qBAAqB,EAA0B,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAClG,OAAO,EACH,sBAAsB,GAIzB,MAAM,+CAA+C,CAAC;AAWvD,MAAM,wBAAwB,GAAG,CAAC,SAAmB,EAAuB,EAAE,CAC1E,SAAS,CAAC,MAAM,CAAC,CAAC,UAA+B,EAAE,QAAgB,EAAE,CAAS,EAAE,EAAE;IAC9E,IAAI,CAAC,EAAE,CAAC;QACJ,UAAU,CAAC,IAAI,CAAC,EAAC,QAAQ,EAAE,oBAAoB,CAAC,EAAE,EAAC,CAAC,CAAC;IACzD,CAAC;IAED,UAAU,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,qBAAq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AO,EAAE,wBAAwB,CAAC,gBAAgB,IAAI,EAAE,CAAC;SAC5D,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAEzD,MAAM,SAAS,GAA2B,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAChF,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,EAAC,CAAC,CAAC,CAAC;QAExD,OAAO,WAAW,CAAC;IACvB,CAAC,CAAC;IAEF,aAAa;IACb,OAAO;QACH,GAAG,KAAK;QACR,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,OAAO,SAAS,KAAK,SAAS;QACxD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,aAE+C;KAC3D,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\n\nimport {type ApolloQueryResult, type QueryResult, useQuery} from '@apollo/client';\nimport {type Override} from '@leav/utils';\nimport {useEffect, useState} from 'react';\nimport {RecordFilterCondition, type RecordFilterInput, RecordFilterOperator} from '_ui/_gqlTypes';\nimport {\n getRecordColumnsValues,\n type GetRecordColumnsValuesRecord,\n type IGetRecordColumnsValues,\n type IGetRecordColumnsValuesVariables,\n} from '../../_queries/records/getRecordColumnsValues';\n\nexport interface IColumnsValuesByRecord {\n [recordId: string]: GetRecordColumnsValuesRecord;\n}\n\nexport type IUseGetRecordColumnsValuesQueryHook = Override<\n QueryResult<IGetRecordColumnsValues>,\n {data: IColumnsValuesByRecord}\n>;\n\nconst _recordIdsToQueryFilters = (recordIds: string[]): RecordFilterInput[] =>\n recordIds.reduce((allFilters: RecordFilterInput[], recordId: string, i: number) => {\n if (i) {\n allFilters.push({operator: RecordFilterOperator.OR});\n }\n\n allFilters.push({field: 'id', condition: RecordFilterCondition.EQUAL, value: recordId});\n\n return allFilters;\n }, []);\n\nexport const useGetRecordValuesQuery = (\n libraryId: string,\n columns: string[],\n recordIds: string[],\n skip?: boolean,\n): IUseGetRecordColumnsValuesQueryHook => {\n const [queryData, setQueryData] = useState<IColumnsValuesByRecord>();\n\n const _convertQueryResult = (queryResult: IGetRecordColumnsValues): IColumnsValuesByRecord =>\n (queryResult.records.list ?? []).reduce((valuesByRecord, recordValues) => {\n valuesByRecord[recordValues._id] = recordValues;\n return valuesByRecord;\n }, {});\n\n const query = useQuery<IGetRecordColumnsValues, IGetRecordColumnsValuesVariables>(getRecordColumnsValues(columns), {\n variables: {\n library: libraryId,\n // Turn records ids into filters with OR operators\n filters: _recordIdsToQueryFilters(recordIds),\n },\n skip: skip || !libraryId || !columns.length || !recordIds.length,\n });\n\n useEffect(() => {\n if (!query.data) {\n return;\n }\n\n const cleanData: IColumnsValuesByRecord = _convertQueryResult(query.data);\n setQueryData(cleanData);\n }, [query.data]);\n\n const customRefetch = async (refetchRecordIds: string[]) => {\n const customVariables = {\n filters: _recordIdsToQueryFilters(refetchRecordIds ?? []),\n };\n\n const refetchData = await query.refetch(customVariables);\n\n const cleanData: IColumnsValuesByRecord = _convertQueryResult(refetchData.data);\n setQueryData(prev => ({...(prev ?? {}), ...cleanData}));\n\n return refetchData;\n };\n\n // @ts-ignore\n return {\n ...query,\n loading: query.loading || typeof queryData === undefined,\n data: queryData,\n refetch: customRefetch as (\n variables?: Partial<IGetRecordColumnsValuesVariables>,\n ) => Promise<ApolloQueryResult<IGetRecordColumnsValues>>,\n };\n};\n"]}
@@ -40,6 +40,10 @@ export declare const iframePanelSchema: z.ZodObject<{
40
40
  iframeSource: z.ZodString;
41
41
  viewId: z.ZodOptional<z.ZodString>;
42
42
  isSelfContaining: z.ZodOptional<z.ZodBoolean>;
43
+ popupProps: z.ZodOptional<z.ZodObject<{
44
+ width: z.ZodOptional<z.ZodString>;
45
+ height: z.ZodOptional<z.ZodString>;
46
+ }, z.core.$strip>>;
43
47
  }, z.core.$strip>;
44
48
  export declare const creationPanelSchema: z.ZodObject<{
45
49
  type: z.ZodLiteral<"creationForm">;
@@ -132,6 +136,10 @@ export declare const PanelSchema: z.ZodIntersection<z.ZodObject<{
132
136
  iframeSource: z.ZodString;
133
137
  viewId: z.ZodOptional<z.ZodString>;
134
138
  isSelfContaining: z.ZodOptional<z.ZodBoolean>;
139
+ popupProps: z.ZodOptional<z.ZodObject<{
140
+ width: z.ZodOptional<z.ZodString>;
141
+ height: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strip>>;
135
143
  }, z.core.$strip>, z.ZodObject<{
136
144
  type: z.ZodLiteral<"editionForm">;
137
145
  formId: z.ZodString;
@@ -152,4 +160,8 @@ export declare const PanelIFrameSchema: z.ZodIntersection<z.ZodObject<{
152
160
  iframeSource: z.ZodString;
153
161
  viewId: z.ZodOptional<z.ZodString>;
154
162
  isSelfContaining: z.ZodOptional<z.ZodBoolean>;
163
+ popupProps: z.ZodOptional<z.ZodObject<{
164
+ width: z.ZodOptional<z.ZodString>;
165
+ height: z.ZodOptional<z.ZodString>;
166
+ }, z.core.$strip>>;
155
167
  }, z.core.$strip>>;
@@ -51,6 +51,12 @@ export const iframePanelSchema = z.object({
51
51
  iframeSource: z.string(),
52
52
  viewId: z.string().optional(),
53
53
  isSelfContaining: z.boolean().optional(),
54
+ popupProps: z
55
+ .object({
56
+ width: z.string().optional(),
57
+ height: z.string().optional(),
58
+ })
59
+ .optional(),
54
60
  });
55
61
  const editionPanelSchema = z.object({
56
62
  type: z.literal('editionForm'),
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/schema.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,MA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,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,iBAAiB;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,eAAe;IAC1B,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,GAAG,CACnD,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,CAAC,CACtE,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport * as z from 'zod/v4';\n\nexport const FONT_AWESOME_ICON_REGEX = /^fa-/;\n\nexport const PanelIdSchema = z.string();\nexport const LanguageSchema = z.string();\nexport const LibraryIdSchema = z.string();\nexport const FontAwesomeIconSchema = z.string().regex(FONT_AWESOME_ICON_REGEX).optional();\n\nexport const WhereSchema = z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]);\n\nexport const FlapPanelIdSchema = z.union([z.literal('info-history'), z.literal('thread')]);\n\nexport const ExplorerPropsSchema = z.object({\n showSearch: z.boolean().optional(),\n showFilters: z.boolean().optional(),\n showSorts: z.boolean().optional(),\n freezeView: z.boolean().optional(),\n showAttributeLabels: z.boolean().optional(),\n creationFormId: z.string().optional(),\n noPagination: z.literal(true).optional(),\n showActionsLabels: z.boolean().optional(),\n defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),\n defaultMassActions: z\n .array(z.union([z.literal('deactivate'), z.literal('export'), z.literal('editAttribute')]))\n .optional(),\n defaultActionsForItem: z\n .array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))\n .optional(),\n});\n\nexport const ItemActionsSchema = z\n .array(\n z.object({\n where: WhereSchema,\n what: z.literal('record'),\n targetPanelId: PanelIdSchema.optional(),\n targetFlapPanelId: FlapPanelIdSchema.optional(),\n icon: FontAwesomeIconSchema,\n label: z.record(LanguageSchema, z.string()),\n onRowClick: z.boolean().optional(),\n }),\n )\n .refine(actions => actions.reduce((acc, action) => (action.onRowClick ? acc + 1 : acc), 0) <= 1, {\n message: 'At most one action must have onRowClick set to true',\n });\n\nexport const basePanelSchema = z.object({\n id: PanelIdSchema,\n icon: FontAwesomeIconSchema,\n name: z.record(LanguageSchema, z.string()).optional(),\n isStandalone: z.boolean().optional(),\n hideInCompactMode: z.boolean().optional(),\n});\n\nexport const iframePanelSchema = z.object({\n type: z.literal('custom'),\n iframeSource: z.string(),\n viewId: z.string().optional(),\n isSelfContaining: z.boolean().optional(),\n});\n\nconst editionPanelSchema = z.object({\n type: z.literal('editionForm'),\n formId: z.string(),\n});\n\nexport const creationPanelSchema = z.object({\n type: z.literal('creationForm'),\n formId: z.string(),\n attributeSource: z.string().optional(),\n isStandalone: z.literal(true),\n});\n\nexport const baseExplorerPanelSchema = z.object({\n type: z.literal('explorer'),\n viewId: z.string().optional(),\n actions: ItemActionsSchema,\n});\n\nexport const attributeExplorerPanelSchema = z.object({\n attributeSource: z.string(),\n deactivateOnUnlink: z.boolean().optional(),\n libraryId: LibraryIdSchema,\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst libraryExplorerPanelSchema = z.object({\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst explorerPanelSchema = baseExplorerPanelSchema.and(\n z.union([attributeExplorerPanelSchema, libraryExplorerPanelSchema]),\n);\n\nexport const PanelSchema = basePanelSchema.and(\n z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]),\n);\n\nexport const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/hooks/useIFrameMessenger/schema.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE1F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,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AiB;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,eAAe;IAC1B,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,GAAG,CACnD,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,CAAC,CACtE,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC,CAC7F,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport * as z from 'zod/v4';\n\nexport const FONT_AWESOME_ICON_REGEX = /^fa-/;\n\nexport const PanelIdSchema = z.string();\nexport const LanguageSchema = z.string();\nexport const LibraryIdSchema = z.string();\nexport const FontAwesomeIconSchema = z.string().regex(FONT_AWESOME_ICON_REGEX).optional();\n\nexport const WhereSchema = z.union([z.literal('popup'), z.literal('slider'), z.literal('fullpage')]);\n\nexport const FlapPanelIdSchema = z.union([z.literal('info-history'), z.literal('thread')]);\n\nexport const ExplorerPropsSchema = z.object({\n showSearch: z.boolean().optional(),\n showFilters: z.boolean().optional(),\n showSorts: z.boolean().optional(),\n freezeView: z.boolean().optional(),\n showAttributeLabels: z.boolean().optional(),\n creationFormId: z.string().optional(),\n noPagination: z.literal(true).optional(),\n showActionsLabels: z.boolean().optional(),\n defaultPrimaryActions: z.array(z.union([z.literal('create')])).optional(),\n defaultMassActions: z\n .array(z.union([z.literal('deactivate'), z.literal('export'), z.literal('editAttribute')]))\n .optional(),\n defaultActionsForItem: z\n .array(z.union([z.literal('replaceLink'), z.literal('remove'), z.literal('activate')]))\n .optional(),\n});\n\nexport const ItemActionsSchema = z\n .array(\n z.object({\n where: WhereSchema,\n what: z.literal('record'),\n targetPanelId: PanelIdSchema.optional(),\n targetFlapPanelId: FlapPanelIdSchema.optional(),\n icon: FontAwesomeIconSchema,\n label: z.record(LanguageSchema, z.string()),\n onRowClick: z.boolean().optional(),\n }),\n )\n .refine(actions => actions.reduce((acc, action) => (action.onRowClick ? acc + 1 : acc), 0) <= 1, {\n message: 'At most one action must have onRowClick set to true',\n });\n\nexport const basePanelSchema = z.object({\n id: PanelIdSchema,\n icon: FontAwesomeIconSchema,\n name: z.record(LanguageSchema, z.string()).optional(),\n isStandalone: z.boolean().optional(),\n hideInCompactMode: z.boolean().optional(),\n});\n\nexport const iframePanelSchema = z.object({\n type: z.literal('custom'),\n iframeSource: z.string(),\n viewId: z.string().optional(),\n isSelfContaining: z.boolean().optional(),\n popupProps: z\n .object({\n width: z.string().optional(),\n height: z.string().optional(),\n })\n .optional(),\n});\n\nconst editionPanelSchema = z.object({\n type: z.literal('editionForm'),\n formId: z.string(),\n});\n\nexport const creationPanelSchema = z.object({\n type: z.literal('creationForm'),\n formId: z.string(),\n attributeSource: z.string().optional(),\n isStandalone: z.literal(true),\n});\n\nexport const baseExplorerPanelSchema = z.object({\n type: z.literal('explorer'),\n viewId: z.string().optional(),\n actions: ItemActionsSchema,\n});\n\nexport const attributeExplorerPanelSchema = z.object({\n attributeSource: z.string(),\n deactivateOnUnlink: z.boolean().optional(),\n libraryId: LibraryIdSchema,\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst libraryExplorerPanelSchema = z.object({\n explorerProps: ExplorerPropsSchema.optional(),\n});\n\nconst explorerPanelSchema = baseExplorerPanelSchema.and(\n z.union([attributeExplorerPanelSchema, libraryExplorerPanelSchema]),\n);\n\nexport const PanelSchema = basePanelSchema.and(\n z.union([explorerPanelSchema, iframePanelSchema, editionPanelSchema, creationPanelSchema]),\n);\n\nexport const PanelIFrameSchema = basePanelSchema.and(iframePanelSchema);\n"]}
@@ -1 +1 @@
1
- export default function (libraryId: string | null, recordId: string | null): Promise<void>;
1
+ export default function (libraryId: string | null, recordId: string | null): void;
@@ -1,17 +1,21 @@
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 { useEffect } from 'react';
4
5
  import { useGetUserDataQuery, useSaveUserDataMutation } from '../../_gqlTypes';
5
6
  const RECORDS_CONSULTATION_KEY = 'records_consultation';
6
7
  const HISTORY_LENGTH = 10;
7
- export default async function (libraryId, recordId) {
8
+ export default function (libraryId, recordId) {
8
9
  const historyKey = `${RECORDS_CONSULTATION_KEY}_${libraryId}`;
9
10
  const [updatingRecordsConsultationMutation] = useSaveUserDataMutation();
10
- useGetUserDataQuery({
11
+ const { data } = useGetUserDataQuery({
11
12
  skip: !libraryId || !recordId,
12
13
  variables: { keys: [historyKey] },
13
- onCompleted: async (data) => {
14
- const history = data.userData.data[historyKey] ? [...data.userData.data[historyKey]] : [];
14
+ });
15
+ useEffect(() => {
16
+ const _updateRecordsConsultation = async () => {
17
+ const storedHistory = data?.userData?.data?.[historyKey] ?? [];
18
+ const history = [...storedHistory];
15
19
  const idx = history.indexOf(recordId);
16
20
  if (idx !== -1) {
17
21
  history.splice(idx, 1);
@@ -27,7 +31,11 @@ export default async function (libraryId, recordId) {
27
31
  global: false,
28
32
  },
29
33
  });
30
- },
31
- });
34
+ };
35
+ if (!recordId || !data?.userData?.data) {
36
+ return;
37
+ }
38
+ _updateRecordsConsultation();
39
+ }, [data, historyKey, recordId, updatingRecordsConsultationMutation]);
32
40
  }
33
41
  //# sourceMappingURL=useRecordsConsultationHistory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRecordsConsultationHistory.js","sourceRoot":"","sources":["../../../src/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,mBAAmB,EAAE,uBAAuB,EAAC,MAAM,eAAe,CAAC;AAE3E,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AACxD,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,CAAC,KAAK,WAAW,SAAwB,EAAE,QAAuB;IAC5E,MAAM,UAAU,GAAG,GAAG,wBAAwB,IAAI,SAAS,EAAE,CAAC;IAC9D,MAAM,CAAC,mCAAmC,CAAC,GAAG,uBAAuB,EAAE,CAAC;IAExE,mBAAmB,CAAC;QAChB,IAAI,EAAE,CAAC,SAAS,IAAI,CAAC,QAAQ;QAC7B,SAAS,EAAE,EAAC,IAAI,EAAE,CAAC,UAAU,CAAC,EAAC;QAC/B,WAAW,EAAE,KAAK,EAAC,IAAI,EAAC,EAAE;YACtB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAE1F,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAEtC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAC3B,CAAC;iBAAM,IAAI,OAAO,CAAC,MAAM,IAAI,cAAc,EAAE,CAAC;gBAC1C,OAAO,CAAC,GAAG,EAAE,CAAC;YAClB,CAAC;YAED,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAE1B,MAAM,mCAAmC,CAAC;gBACtC,SAAS,EAAE;oBACP,GAAG,EAAE,UAAU;oBACf,KAAK,EAAE,OAAO;oBACd,MAAM,EAAE,KAAK;iBAChB;aACJ,CAAC,CAAC;QACP,CAAC;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useGetUserDataQuery, useSaveUserDataMutation} from '_ui/_gqlTypes';\n\nconst RECORDS_CONSULTATION_KEY = 'records_consultation';\nconst HISTORY_LENGTH = 10;\n\nexport default async function (libraryId: string | null, recordId: string | null) {\n const historyKey = `${RECORDS_CONSULTATION_KEY}_${libraryId}`;\n const [updatingRecordsConsultationMutation] = useSaveUserDataMutation();\n\n useGetUserDataQuery({\n skip: !libraryId || !recordId,\n variables: {keys: [historyKey]},\n onCompleted: async data => {\n const history = data.userData.data[historyKey] ? [...data.userData.data[historyKey]] : [];\n\n const idx = history.indexOf(recordId);\n\n if (idx !== -1) {\n history.splice(idx, 1);\n } else if (history.length >= HISTORY_LENGTH) {\n history.pop();\n }\n\n history.unshift(recordId);\n\n await updatingRecordsConsultationMutation({\n variables: {\n key: historyKey,\n value: history,\n global: false,\n },\n });\n },\n });\n}\n"]}
1
+ {"version":3,"file":"useRecordsConsultationHistory.js","sourceRoot":"","sources":["../../../src/hooks/useRecordsConsultationHistory/useRecordsConsultationHistory.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,mBAAm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,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACrC,OAAO;QACX,CAAC;QAED,0BAA0B,EAAE,CAAC;IACjC,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,mCAAmC,CAAC,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useEffect} from 'react';\nimport {useGetUserDataQuery, useSaveUserDataMutation} from '_ui/_gqlTypes';\n\nconst RECORDS_CONSULTATION_KEY = 'records_consultation';\nconst HISTORY_LENGTH = 10;\n\nexport default function (libraryId: string | null, recordId: string | null) {\n const historyKey = `${RECORDS_CONSULTATION_KEY}_${libraryId}`;\n const [updatingRecordsConsultationMutation] = useSaveUserDataMutation();\n\n const {data} = useGetUserDataQuery({\n skip: !libraryId || !recordId,\n variables: {keys: [historyKey]},\n });\n\n useEffect(() => {\n const _updateRecordsConsultation = async () => {\n const storedHistory = data?.userData?.data?.[historyKey] ?? [];\n const history = [...storedHistory];\n\n const idx = history.indexOf(recordId);\n\n if (idx !== -1) {\n history.splice(idx, 1);\n } else if (history.length >= HISTORY_LENGTH) {\n history.pop();\n }\n\n history.unshift(recordId);\n\n await updatingRecordsConsultationMutation({\n variables: {\n key: historyKey,\n value: history,\n global: false,\n },\n });\n };\n\n if (!recordId || !data?.userData?.data) {\n return;\n }\n\n _updateRecordsConsultation();\n }, [data, historyKey, recordId, updatingRecordsConsultationMutation]);\n}\n"]}
@@ -715,8 +715,11 @@
715
715
  "show": "Show",
716
716
  "hide": "Hide",
717
717
  "columns": "Columns",
718
+ "available-attributes-for-users": "Available attributes for users",
718
719
  "visible-columns": "Visible columns",
719
720
  "invisible-columns": "Invisible columns",
721
+ "visible-attributes": "Visible attributes",
722
+ "invisible-attributes": "Invisible attributes",
720
723
  "pagination-total-number_one": "{{from, number}} - {{to, number}} of {{count, number}} item",
721
724
  "pagination-total-number_other": "{{from, number}} - {{to, number}} of {{count, number}} items",
722
725
  "active-items-number": "{{count, number}} active",
@@ -717,8 +717,11 @@
717
717
  "pagination-total-number_one": "{{from, number}} - {{to, number}} de {{count, number}} élément",
718
718
  "pagination-total-number_other": "{{from, number}} - {{to, number}} de {{count, number}} éléments",
719
719
  "columns": "Colonnes",
720
+ "available-attributes-for-users": "Attributs disponibles pour les utilisateurs",
720
721
  "visible-columns": "Colonnes visibles",
721
722
  "invisible-columns": "Colonnes invisibles",
723
+ "visible-attributes": "Attributs visibles",
724
+ "invisible-attributes": "Attributs invisibles",
722
725
  "active-items-number": "{{count, number}} actifs",
723
726
  "active-items-number_zero": "Aucun",
724
727
  "invalid-value": "Valeur invalide",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leav/ui",
3
- "version": "1.9.0-e85cb486",
3
+ "version": "1.9.0-ee5969b7",
4
4
  "description": "Shared React components and hooks",
5
5
  "scripts": {
6
6
  "prepublishOnly": "yarn build",
@@ -28,23 +28,21 @@
28
28
  "@babel/preset-env": "7.29.0",
29
29
  "@babel/preset-react": "7.28.5",
30
30
  "@graphql-codegen/add": "5.0.3",
31
- "@graphql-codegen/cli": "6.1.2",
32
- "@graphql-codegen/typescript": "5.0.8",
33
- "@graphql-codegen/typescript-operations": "5.0.8",
34
- "@graphql-codegen/typescript-react-apollo": "4.4.0",
31
+ "@graphql-codegen/cli": "6.1.3",
32
+ "@graphql-codegen/typescript": "5.0.9",
33
+ "@graphql-codegen/typescript-operations": "5.0.9",
34
+ "@graphql-codegen/typescript-react-apollo": "4.4.1",
35
35
  "@testing-library/jest-dom": "5.17.0",
36
36
  "@testing-library/react": "14.3.1",
37
37
  "@testing-library/react-hooks": "8.0.1",
38
38
  "@testing-library/user-event": "14.6.1",
39
39
  "@total-typescript/ts-reset": "0.6.1",
40
- "@types/dompurify": "3.0.3",
40
+ "@types/dompurify": "3.2.0",
41
41
  "@types/jest": "29.5.14",
42
42
  "@types/lodash.isequal": "^4",
43
- "@types/object-path": "0.11.4",
44
43
  "@types/react": "18.2.14",
45
44
  "@types/react-dom": "18.2.6",
46
- "@types/react-table": "7.7.20",
47
- "aristid-ds": "15.2.0-efdeb96",
45
+ "aristid-ds": "15.2.0-bc3380f",
48
46
  "babel-jest": "29.7.0",
49
47
  "graphql": "16.12.0",
50
48
  "i18next": "22.5.1",
@@ -79,14 +77,11 @@
79
77
  "@leav/utils": "1.9.0",
80
78
  "@uidotdev/usehooks": "2.4.1",
81
79
  "dayjs": "^1.11.13",
82
- "dompurify": "3.2.4",
80
+ "dompurify": "3.3.2",
83
81
  "html-react-parser": "4.2.10",
84
82
  "i18next-resources-to-backend": "1.1.4",
85
83
  "lodash.isequal": "4.5.0",
86
- "object-path": "0.11.8",
87
84
  "react-markdown": "5.0.3",
88
- "react-table": "7.8.0",
89
- "react-table-sticky": "1.1.3",
90
85
  "styled-components": "6.0.8",
91
86
  "xlsx": "0.18.5",
92
87
  "zod": "3.25.76"
@@ -1,6 +0,0 @@
1
- import { type PropsWithChildren } from 'react';
2
- import { type ISearchState } from '../../components/LibraryItemsList/hooks/useSearchReducer/_types';
3
- declare const MockSearchContextProvider: ({ state, children }: PropsWithChildren<{
4
- state?: Partial<ISearchState>;
5
- }>) => JSX.Element;
6
- export default MockSearchContextProvider;
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { SearchContext } from '../../components/LibraryItemsList/hooks/useSearchReducer/searchContext';
3
- import { initialSearchState } from '../../components/LibraryItemsList/hooks/useSearchReducer/searchReducer';
4
- import { mockGetLibraryDetailExtendedElement } from '../mockQuery/mockGetLibraryDetailExtendedQuery';
5
- const MockSearchContextProvider = ({ state, children }) => (_jsx(SearchContext.Provider, { value: {
6
- state: { ...initialSearchState, library: mockGetLibraryDetailExtendedElement, ...state },
7
- dispatch: jest.fn(),
8
- }, children: children }));
9
- export default MockSearchContextProvider;
10
- //# sourceMappingURL=mockSearchContextProvider.js.map