@leav/ui 1.9.0-3 → 1.9.0-51ddde49

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 (479) hide show
  1. package/dist/_gqlTypes/index.d.ts +187 -120
  2. package/dist/_gqlTypes/index.js +107 -87
  3. package/dist/_gqlTypes/index.js.map +1 -1
  4. package/dist/_queries/records/createRecordMutation.js +2 -2
  5. package/dist/_queries/records/createRecordMutation.js.map +1 -1
  6. package/dist/_queries/trees/getTreeContentQuery.d.ts +6 -0
  7. package/dist/_queries/trees/getTreeContentQuery.js +70 -0
  8. package/dist/_queries/trees/getTreeContentQuery.js.map +1 -0
  9. package/dist/_utils/getFiltersFromRequest.js +5 -6
  10. package/dist/_utils/getFiltersFromRequest.js.map +1 -1
  11. package/dist/_utils/index.js +3 -4
  12. package/dist/_utils/index.js.map +1 -1
  13. package/dist/_utils/typeguards.d.ts +5 -0
  14. package/dist/_utils/typeguards.js +6 -0
  15. package/dist/_utils/typeguards.js.map +1 -1
  16. package/dist/components/Explorer/Explorer.d.ts +2 -1
  17. package/dist/components/Explorer/Explorer.js +31 -13
  18. package/dist/components/Explorer/Explorer.js.map +1 -1
  19. package/dist/components/Explorer/ExplorerToolbar.js +2 -1
  20. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -1
  21. package/dist/components/Explorer/_queries/useExplorerCountData.d.ts +16 -0
  22. package/dist/components/Explorer/_queries/useExplorerCountData.js +26 -0
  23. package/dist/components/Explorer/_queries/useExplorerCountData.js.map +1 -0
  24. package/dist/components/Explorer/_queries/useExplorerData.js +18 -20
  25. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  26. package/dist/components/Explorer/actions-mass/ResultsCount.d.ts +10 -0
  27. package/dist/components/Explorer/actions-mass/ResultsCount.js +8 -0
  28. package/dist/components/Explorer/actions-mass/ResultsCount.js.map +1 -0
  29. package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js +1 -1
  30. package/dist/components/Explorer/actions-mass/edit-attribute/EditAttributeMassActionModal.js.map +1 -1
  31. package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.d.ts +9 -2
  32. package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js +18 -4
  33. package/dist/components/Explorer/actions-mass/edit-attribute/useCountValuesOccurrencesHook.js.map +1 -1
  34. package/dist/components/Explorer/actions-mass/generate-previews/GeneratePreviewsModal.d.ts +10 -0
  35. package/dist/components/Explorer/actions-mass/generate-previews/GeneratePreviewsModal.js +69 -0
  36. package/dist/components/Explorer/actions-mass/generate-previews/GeneratePreviewsModal.js.map +1 -0
  37. package/dist/components/Explorer/actions-mass/generate-previews/useGetPreviewSizesData.d.ts +18 -0
  38. package/dist/components/Explorer/actions-mass/generate-previews/useGetPreviewSizesData.js +57 -0
  39. package/dist/components/Explorer/actions-mass/generate-previews/useGetPreviewSizesData.js.map +1 -0
  40. package/dist/components/Explorer/actions-mass/useGeneratePreviewsMassAction.d.ts +19 -0
  41. package/dist/components/Explorer/actions-mass/useGeneratePreviewsMassAction.js +94 -0
  42. package/dist/components/Explorer/actions-mass/useGeneratePreviewsMassAction.js.map +1 -0
  43. package/dist/components/Explorer/actions-mass/useMassActions.d.ts +5 -3
  44. package/dist/components/Explorer/actions-mass/useMassActions.js +19 -13
  45. package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
  46. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +3 -1
  47. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +5 -1
  48. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
  49. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +1 -1
  50. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -1
  51. package/dist/components/Filters/context/useGetTreeFilters.js +22 -38
  52. package/dist/components/Filters/context/useGetTreeFilters.js.map +1 -1
  53. package/dist/components/Filters/filter-items/filter-type/tree/useGetTreeData.js +22 -41
  54. package/dist/components/Filters/filter-items/filter-type/tree/useGetTreeData.js.map +1 -1
  55. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  56. package/dist/components/RecordEdition/EditRecord/EditRecord.js +3 -3
  57. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  58. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +4 -0
  59. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  60. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +1 -3
  61. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  62. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +28 -17
  63. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  64. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +1 -0
  65. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +30 -18
  66. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  67. package/dist/components/RecordEdition/EditRecordPage/ErrorComponent.d.ts +2 -0
  68. package/dist/components/RecordEdition/EditRecordPage/ErrorComponent.js +11 -0
  69. package/dist/components/RecordEdition/EditRecordPage/ErrorComponent.js.map +1 -0
  70. package/dist/components/RecordEdition/EditRecordPage/getInitialRecordValues.d.ts +2 -0
  71. package/dist/components/RecordEdition/EditRecordPage/getInitialRecordValues.js +35 -0
  72. package/dist/components/RecordEdition/EditRecordPage/getInitialRecordValues.js.map +1 -0
  73. package/dist/components/RecordEdition/_types.d.ts +1 -1
  74. package/dist/components/RecordEdition/_types.js.map +1 -1
  75. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +7 -6
  76. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
  77. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.d.ts +1 -1
  78. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js +6 -2
  79. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
  80. package/dist/components/SearchModal/SearchModal.js +28 -18
  81. package/dist/components/SearchModal/SearchModal.js.map +1 -1
  82. package/dist/components/index.d.ts +0 -3
  83. package/dist/components/index.js +0 -3
  84. package/dist/components/index.js.map +1 -1
  85. package/dist/hooks/useIFrameMessenger/schema.d.ts +2 -2
  86. package/dist/hooks/useIFrameMessenger/schema.js +1 -1
  87. package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
  88. package/dist/hooks/useIFrameMessenger/types.d.ts +5 -0
  89. package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
  90. package/dist/locales/en/shared.json +11 -4
  91. package/dist/locales/fr/shared.json +11 -4
  92. package/package.json +10 -19
  93. package/dist/__mocks__/common/mockSearchContextProvider.d.ts +0 -6
  94. package/dist/__mocks__/common/mockSearchContextProvider.js +0 -10
  95. package/dist/__mocks__/common/mockSearchContextProvider.js.map +0 -1
  96. package/dist/components/AttributesSelectionList/Attribute/Attribute.d.ts +0 -3
  97. package/dist/components/AttributesSelectionList/Attribute/Attribute.js +0 -50
  98. package/dist/components/AttributesSelectionList/Attribute/Attribute.js.map +0 -1
  99. package/dist/components/AttributesSelectionList/Attribute/index.d.ts +0 -2
  100. package/dist/components/AttributesSelectionList/Attribute/index.js +0 -6
  101. package/dist/components/AttributesSelectionList/Attribute/index.js.map +0 -1
  102. package/dist/components/AttributesSelectionList/AttributesSelectionList.d.ts +0 -10
  103. package/dist/components/AttributesSelectionList/AttributesSelectionList.js +0 -72
  104. package/dist/components/AttributesSelectionList/AttributesSelectionList.js.map +0 -1
  105. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.d.ts +0 -7
  106. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js +0 -39
  107. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/SelectedAttribute.js.map +0 -1
  108. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.d.ts +0 -2
  109. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.js +0 -6
  110. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttribute/index.js.map +0 -1
  111. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.d.ts +0 -2
  112. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js +0 -63
  113. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js.map +0 -1
  114. package/dist/components/AttributesSelectionList/SelectedAttributesList/index.d.ts +0 -2
  115. package/dist/components/AttributesSelectionList/SelectedAttributesList/index.js +0 -6
  116. package/dist/components/AttributesSelectionList/SelectedAttributesList/index.js.map +0 -1
  117. package/dist/components/AttributesSelectionList/_types.d.ts +0 -8
  118. package/dist/components/AttributesSelectionList/_types.js +0 -2
  119. package/dist/components/AttributesSelectionList/_types.js.map +0 -1
  120. package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.d.ts +0 -3
  121. package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js +0 -9
  122. package/dist/components/AttributesSelectionList/helpers/attributeToSelectedAttribute.js.map +0 -1
  123. package/dist/components/AttributesSelectionList/index.d.ts +0 -2
  124. package/dist/components/AttributesSelectionList/index.js +0 -6
  125. package/dist/components/AttributesSelectionList/index.js.map +0 -1
  126. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.d.ts +0 -11
  127. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js +0 -10
  128. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.js.map +0 -1
  129. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.d.ts +0 -33
  130. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js +0 -77
  131. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListReducer.js.map +0 -1
  132. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.d.ts +0 -10
  133. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js +0 -8
  134. package/dist/components/AttributesSelectionList/reducer/attributesSelectionListStateContext.js.map +0 -1
  135. package/dist/components/AttributesSelectionList/sharedComponents.d.ts +0 -809
  136. package/dist/components/AttributesSelectionList/sharedComponents.js +0 -16
  137. package/dist/components/AttributesSelectionList/sharedComponents.js.map +0 -1
  138. package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.d.ts +0 -10
  139. package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js +0 -39
  140. package/dist/components/DeactivateRecordsModal/DeactivateRecordsModal.js.map +0 -1
  141. package/dist/components/DeactivateRecordsModal/index.d.ts +0 -1
  142. package/dist/components/DeactivateRecordsModal/index.js +0 -5
  143. package/dist/components/DeactivateRecordsModal/index.js.map +0 -1
  144. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.d.ts +0 -13
  145. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js +0 -50
  146. package/dist/components/LibraryItemsList/CreateNewRecordButton/CreateNewRecordButton.js.map +0 -1
  147. package/dist/components/LibraryItemsList/CreateNewRecordButton/index.d.ts +0 -2
  148. package/dist/components/LibraryItemsList/CreateNewRecordButton/index.js +0 -6
  149. package/dist/components/LibraryItemsList/CreateNewRecordButton/index.js.map +0 -1
  150. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.d.ts +0 -2
  151. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js +0 -80
  152. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js.map +0 -1
  153. package/dist/components/LibraryItemsList/DisplayOptions/index.d.ts +0 -2
  154. package/dist/components/LibraryItemsList/DisplayOptions/index.js +0 -6
  155. package/dist/components/LibraryItemsList/DisplayOptions/index.js.map +0 -1
  156. package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.d.ts +0 -2
  157. package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js +0 -22
  158. package/dist/components/LibraryItemsList/DisplayTypeSelector/DisplayTypeSelector.js.map +0 -1
  159. package/dist/components/LibraryItemsList/DisplayTypeSelector/index.d.ts +0 -2
  160. package/dist/components/LibraryItemsList/DisplayTypeSelector/index.js +0 -6
  161. package/dist/components/LibraryItemsList/DisplayTypeSelector/index.js.map +0 -1
  162. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.d.ts +0 -13
  163. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js +0 -229
  164. package/dist/components/LibraryItemsList/FiltersDropdown/FiltersDropdown.js.map +0 -1
  165. package/dist/components/LibraryItemsList/FiltersDropdown/index.d.ts +0 -2
  166. package/dist/components/LibraryItemsList/FiltersDropdown/index.js +0 -6
  167. package/dist/components/LibraryItemsList/FiltersDropdown/index.js.map +0 -1
  168. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.d.ts +0 -11
  169. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +0 -328
  170. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +0 -1
  171. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.d.ts +0 -7
  172. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js +0 -90
  173. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/FilterAttributeCondition.js.map +0 -1
  174. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.d.ts +0 -2
  175. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.js +0 -6
  176. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterAttributeCondition/index.js.map +0 -1
  177. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.d.ts +0 -3
  178. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.js +0 -13
  179. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/BooleanFilter.js.map +0 -1
  180. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.d.ts +0 -2
  181. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.js +0 -6
  182. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/BooleanFilter/index.js.map +0 -1
  183. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.d.ts +0 -3
  184. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js +0 -26
  185. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/DateBetweenFilter.js.map +0 -1
  186. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.d.ts +0 -2
  187. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.js +0 -6
  188. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateBetweenFilter/index.js.map +0 -1
  189. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.d.ts +0 -3
  190. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js +0 -22
  191. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/DateFilter.js.map +0 -1
  192. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.d.ts +0 -2
  193. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.js +0 -6
  194. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/DateFilter/index.js.map +0 -1
  195. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.d.ts +0 -3
  196. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js +0 -35
  197. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/NumericFilter.js.map +0 -1
  198. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.d.ts +0 -2
  199. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.js +0 -6
  200. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/NumericFilter/index.js.map +0 -1
  201. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.d.ts +0 -3
  202. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js +0 -34
  203. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/TextFilter.js.map +0 -1
  204. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.d.ts +0 -2
  205. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.js +0 -6
  206. package/dist/components/LibraryItemsList/FiltersPanel/Filter/FilterInput/TextFilter/index.js.map +0 -1
  207. package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.d.ts +0 -2
  208. package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.js +0 -16
  209. package/dist/components/LibraryItemsList/FiltersPanel/Filter/filterUtils.js.map +0 -1
  210. package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.d.ts +0 -2
  211. package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.js +0 -6
  212. package/dist/components/LibraryItemsList/FiltersPanel/Filter/index.js.map +0 -1
  213. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.d.ts +0 -8
  214. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.js +0 -11
  215. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/FilterDropdownButton.js.map +0 -1
  216. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.d.ts +0 -2
  217. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.js +0 -6
  218. package/dist/components/LibraryItemsList/FiltersPanel/FilterDropdownButton/index.js.map +0 -1
  219. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.d.ts +0 -6
  220. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js +0 -38
  221. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/FilterTreeCondition.js.map +0 -1
  222. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.d.ts +0 -2
  223. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.js +0 -6
  224. package/dist/components/LibraryItemsList/FiltersPanel/FilterTreeCondition/index.js.map +0 -1
  225. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.d.ts +0 -14
  226. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js +0 -147
  227. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +0 -1
  228. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.d.ts +0 -2
  229. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js +0 -121
  230. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js.map +0 -1
  231. package/dist/components/LibraryItemsList/FiltersPanel/index.d.ts +0 -2
  232. package/dist/components/LibraryItemsList/FiltersPanel/index.js +0 -6
  233. package/dist/components/LibraryItemsList/FiltersPanel/index.js.map +0 -1
  234. package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.d.ts +0 -3
  235. package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js +0 -17
  236. package/dist/components/LibraryItemsList/FiltersPanel/mustHideValue.js.map +0 -1
  237. package/dist/components/LibraryItemsList/IconViewType/IconViewType.d.ts +0 -8
  238. package/dist/components/LibraryItemsList/IconViewType/IconViewType.js +0 -18
  239. package/dist/components/LibraryItemsList/IconViewType/IconViewType.js.map +0 -1
  240. package/dist/components/LibraryItemsList/IconViewType/index.d.ts +0 -2
  241. package/dist/components/LibraryItemsList/IconViewType/index.js +0 -6
  242. package/dist/components/LibraryItemsList/IconViewType/index.js.map +0 -1
  243. package/dist/components/LibraryItemsList/LibraryItemsList.d.ts +0 -14
  244. package/dist/components/LibraryItemsList/LibraryItemsList.js +0 -18
  245. package/dist/components/LibraryItemsList/LibraryItemsList.js.map +0 -1
  246. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.d.ts +0 -16
  247. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +0 -202
  248. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +0 -1
  249. package/dist/components/LibraryItemsList/LibraryItemsListContent/index.d.ts +0 -2
  250. package/dist/components/LibraryItemsList/LibraryItemsListContent/index.js +0 -6
  251. package/dist/components/LibraryItemsList/LibraryItemsListContent/index.js.map +0 -1
  252. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.d.ts +0 -6
  253. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js +0 -32
  254. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/LibraryItemsListEmpty.js.map +0 -1
  255. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.d.ts +0 -2
  256. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.js +0 -6
  257. package/dist/components/LibraryItemsList/LibraryItemsListEmpty/index.js.map +0 -1
  258. package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.d.ts +0 -2
  259. package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.js +0 -21
  260. package/dist/components/LibraryItemsList/LibraryItemsListPagination/LibraryItemsListPagination.js.map +0 -1
  261. package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.d.ts +0 -2
  262. package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.js +0 -6
  263. package/dist/components/LibraryItemsList/LibraryItemsListPagination/index.js.map +0 -1
  264. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.d.ts +0 -8
  265. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js +0 -56
  266. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/BodyCell.js.map +0 -1
  267. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.d.ts +0 -2
  268. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.js +0 -6
  269. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyCell/index.js.map +0 -1
  270. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.d.ts +0 -7
  271. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js +0 -54
  272. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/BodyRow.js.map +0 -1
  273. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.d.ts +0 -2
  274. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.js +0 -6
  275. package/dist/components/LibraryItemsList/LibraryItemsListTable/BodyRow/index.js.map +0 -1
  276. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.d.ts +0 -8
  277. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js +0 -66
  278. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/AllValuesCount.js.map +0 -1
  279. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.d.ts +0 -2
  280. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.js +0 -6
  281. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/AllValuesCount/index.js.map +0 -1
  282. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.d.ts +0 -8
  283. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js +0 -59
  284. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/Cell.js.map +0 -1
  285. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.d.ts +0 -9
  286. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js +0 -56
  287. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/CellInfos.js.map +0 -1
  288. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.d.ts +0 -2
  289. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.js +0 -6
  290. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellInfos/index.js.map +0 -1
  291. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.d.ts +0 -5
  292. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.js +0 -34
  293. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/CellSelection.js.map +0 -1
  294. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.d.ts +0 -2
  295. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.js +0 -6
  296. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/CellSelection/index.js.map +0 -1
  297. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.d.ts +0 -5
  298. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.js +0 -23
  299. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/ElementsToDisplay/RichTextDisplay.js.map +0 -1
  300. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.d.ts +0 -3
  301. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +0 -80
  302. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +0 -1
  303. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.d.ts +0 -2
  304. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.js +0 -6
  305. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/index.js.map +0 -1
  306. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.d.ts +0 -2
  307. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.js +0 -6
  308. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/index.js.map +0 -1
  309. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.d.ts +0 -12
  310. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js +0 -11
  311. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/typeGuards.js.map +0 -1
  312. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.d.ts +0 -12
  313. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.js +0 -2
  314. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/types.js.map +0 -1
  315. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.d.ts +0 -2
  316. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js +0 -40
  317. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/utils.js.map +0 -1
  318. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.d.ts +0 -6
  319. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js +0 -81
  320. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js.map +0 -1
  321. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.d.ts +0 -2
  322. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.js +0 -6
  323. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/index.js.map +0 -1
  324. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.d.ts +0 -9
  325. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +0 -142
  326. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +0 -1
  327. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.d.ts +0 -2
  328. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.js +0 -6
  329. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/index.js.map +0 -1
  330. package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.d.ts +0 -2
  331. package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js +0 -232
  332. package/dist/components/LibraryItemsList/LibraryItemsListTable/Table.js.map +0 -1
  333. package/dist/components/LibraryItemsList/LibraryItemsListTable/index.d.ts +0 -2
  334. package/dist/components/LibraryItemsList/LibraryItemsListTable/index.js +0 -6
  335. package/dist/components/LibraryItemsList/LibraryItemsListTable/index.js.map +0 -1
  336. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.d.ts +0 -9
  337. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js +0 -27
  338. package/dist/components/LibraryItemsList/MenuItemList/MenuItemList.js.map +0 -1
  339. package/dist/components/LibraryItemsList/MenuItemList/index.d.ts +0 -2
  340. package/dist/components/LibraryItemsList/MenuItemList/index.js +0 -6
  341. package/dist/components/LibraryItemsList/MenuItemList/index.js.map +0 -1
  342. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.d.ts +0 -2
  343. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js +0 -62
  344. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/ActionsMenu.js.map +0 -1
  345. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.d.ts +0 -2
  346. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.js +0 -6
  347. package/dist/components/LibraryItemsList/MenuItemListSelected/ActionsMenu/index.js.map +0 -1
  348. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.d.ts +0 -5
  349. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js +0 -139
  350. package/dist/components/LibraryItemsList/MenuItemListSelected/MenuItemListSelected.js.map +0 -1
  351. package/dist/components/LibraryItemsList/MenuItemListSelected/index.d.ts +0 -2
  352. package/dist/components/LibraryItemsList/MenuItemListSelected/index.js +0 -6
  353. package/dist/components/LibraryItemsList/MenuItemListSelected/index.js.map +0 -1
  354. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.d.ts +0 -2
  355. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js +0 -58
  356. package/dist/components/LibraryItemsList/MenuSelection/MenuSelection.js.map +0 -1
  357. package/dist/components/LibraryItemsList/MenuSelection/index.d.ts +0 -2
  358. package/dist/components/LibraryItemsList/MenuSelection/index.js +0 -6
  359. package/dist/components/LibraryItemsList/MenuSelection/index.js.map +0 -1
  360. package/dist/components/LibraryItemsList/MenuView/MenuView.d.ts +0 -6
  361. package/dist/components/LibraryItemsList/MenuView/MenuView.js +0 -162
  362. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +0 -1
  363. package/dist/components/LibraryItemsList/MenuView/index.d.ts +0 -2
  364. package/dist/components/LibraryItemsList/MenuView/index.js +0 -6
  365. package/dist/components/LibraryItemsList/MenuView/index.js.map +0 -1
  366. package/dist/components/LibraryItemsList/SearchItems/SearchItems.d.ts +0 -2
  367. package/dist/components/LibraryItemsList/SearchItems/SearchItems.js +0 -21
  368. package/dist/components/LibraryItemsList/SearchItems/SearchItems.js.map +0 -1
  369. package/dist/components/LibraryItemsList/SearchItems/index.d.ts +0 -2
  370. package/dist/components/LibraryItemsList/SearchItems/index.js +0 -6
  371. package/dist/components/LibraryItemsList/SearchItems/index.js.map +0 -1
  372. package/dist/components/LibraryItemsList/Sidebar/Sidebar.d.ts +0 -2
  373. package/dist/components/LibraryItemsList/Sidebar/Sidebar.js +0 -58
  374. package/dist/components/LibraryItemsList/Sidebar/Sidebar.js.map +0 -1
  375. package/dist/components/LibraryItemsList/Sidebar/index.d.ts +0 -2
  376. package/dist/components/LibraryItemsList/Sidebar/index.js +0 -6
  377. package/dist/components/LibraryItemsList/Sidebar/index.js.map +0 -1
  378. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.d.ts +0 -6
  379. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js +0 -199
  380. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/ItemTileDisplay.js.map +0 -1
  381. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.d.ts +0 -2
  382. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.js +0 -6
  383. package/dist/components/LibraryItemsList/TileDisplay/ItemTileDisplay/index.js.map +0 -1
  384. package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.d.ts +0 -2
  385. package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js +0 -50
  386. package/dist/components/LibraryItemsList/TileDisplay/TileDisplay.js.map +0 -1
  387. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.d.ts +0 -3
  388. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js +0 -11
  389. package/dist/components/LibraryItemsList/TileDisplay/helpers/getItemPreviewSize.js.map +0 -1
  390. package/dist/components/LibraryItemsList/TileDisplay/index.d.ts +0 -2
  391. package/dist/components/LibraryItemsList/TileDisplay/index.js +0 -6
  392. package/dist/components/LibraryItemsList/TileDisplay/index.js.map +0 -1
  393. package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.d.ts +0 -2
  394. package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js +0 -66
  395. package/dist/components/LibraryItemsList/VersionsPanel/VersionsPanel.js.map +0 -1
  396. package/dist/components/LibraryItemsList/VersionsPanel/index.d.ts +0 -2
  397. package/dist/components/LibraryItemsList/VersionsPanel/index.js +0 -6
  398. package/dist/components/LibraryItemsList/VersionsPanel/index.js.map +0 -1
  399. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.d.ts +0 -9
  400. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +0 -85
  401. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +0 -1
  402. package/dist/components/LibraryItemsList/ViewPanel/EditView/index.d.ts +0 -2
  403. package/dist/components/LibraryItemsList/ViewPanel/EditView/index.js +0 -6
  404. package/dist/components/LibraryItemsList/ViewPanel/EditView/index.js.map +0 -1
  405. package/dist/components/LibraryItemsList/ViewPanel/View/View.d.ts +0 -7
  406. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +0 -152
  407. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +0 -1
  408. package/dist/components/LibraryItemsList/ViewPanel/View/index.d.ts +0 -2
  409. package/dist/components/LibraryItemsList/ViewPanel/View/index.js +0 -6
  410. package/dist/components/LibraryItemsList/ViewPanel/View/index.js.map +0 -1
  411. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.d.ts +0 -2
  412. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js +0 -209
  413. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js.map +0 -1
  414. package/dist/components/LibraryItemsList/ViewPanel/index.d.ts +0 -2
  415. package/dist/components/LibraryItemsList/ViewPanel/index.js +0 -6
  416. package/dist/components/LibraryItemsList/ViewPanel/index.js.map +0 -1
  417. package/dist/components/LibraryItemsList/constants.d.ts +0 -12
  418. package/dist/components/LibraryItemsList/constants.js +0 -19
  419. package/dist/components/LibraryItemsList/constants.js.map +0 -1
  420. package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.d.ts +0 -3
  421. package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js +0 -21
  422. package/dist/components/LibraryItemsList/helpers/defaultFilterConditionByAttributeFormat.js.map +0 -1
  423. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.d.ts +0 -3
  424. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js +0 -18
  425. package/dist/components/LibraryItemsList/helpers/displayTypeToPreviewSize.js.map +0 -1
  426. package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.d.ts +0 -4
  427. package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js +0 -64
  428. package/dist/components/LibraryItemsList/helpers/extractAttributesFromLibrary.js.map +0 -1
  429. package/dist/components/LibraryItemsList/helpers/getFieldFromKey.d.ts +0 -5
  430. package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js +0 -40
  431. package/dist/components/LibraryItemsList/helpers/getFieldFromKey.js.map +0 -1
  432. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.d.ts +0 -6
  433. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +0 -10
  434. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +0 -1
  435. package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.d.ts +0 -2
  436. package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js +0 -13
  437. package/dist/components/LibraryItemsList/helpers/getFieldsKeyFromAttribute.js.map +0 -1
  438. package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.d.ts +0 -2
  439. package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js +0 -18
  440. package/dist/components/LibraryItemsList/helpers/getSortFieldByAttributeType.js.map +0 -1
  441. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.d.ts +0 -8
  442. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +0 -99
  443. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +0 -1
  444. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +0 -82
  445. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.js +0 -2
  446. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.js.map +0 -1
  447. package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.d.ts +0 -2
  448. package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.js +0 -6
  449. package/dist/components/LibraryItemsList/hooks/useSearchReducer/index.js.map +0 -1
  450. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.d.ts +0 -7
  451. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.js +0 -7
  452. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchContext.js.map +0 -1
  453. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +0 -121
  454. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +0 -228
  455. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +0 -1
  456. package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.d.ts +0 -5
  457. package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.js +0 -8
  458. package/dist/components/LibraryItemsList/hooks/useSearchReducer/useSearchReducer.js.map +0 -1
  459. package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.d.ts +0 -7
  460. package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js +0 -40
  461. package/dist/components/LibraryItemsList/hooks/useUpdateViewsOrderMutation.js.map +0 -1
  462. package/dist/components/LibraryItemsList/index.d.ts +0 -1
  463. package/dist/components/LibraryItemsList/index.js +0 -5
  464. package/dist/components/LibraryItemsList/index.js.map +0 -1
  465. package/dist/components/LibraryItemsList/manageItems.d.ts +0 -11
  466. package/dist/components/LibraryItemsList/manageItems.js +0 -98
  467. package/dist/components/LibraryItemsList/manageItems.js.map +0 -1
  468. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.d.ts +0 -7
  469. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js +0 -38
  470. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/DeactivateRecordBtn.js.map +0 -1
  471. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.d.ts +0 -2
  472. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.js +0 -6
  473. package/dist/components/LibraryItemsList/shared/DeactivateRecordBtn/index.js.map +0 -1
  474. package/dist/components/LibraryItemsList/shared/SelectCellsBtn.d.ts +0 -12
  475. package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js +0 -29
  476. package/dist/components/LibraryItemsList/shared/SelectCellsBtn.js.map +0 -1
  477. package/dist/components/LibraryItemsList/shared/sharedUtils.d.ts +0 -4
  478. package/dist/components/LibraryItemsList/shared/sharedUtils.js +0 -9
  479. package/dist/components/LibraryItemsList/shared/sharedUtils.js.map +0 -1
@@ -5,8 +5,8 @@ import { gql } from '@apollo/client';
5
5
  import { recordIdentityFragment } from '../../gqlFragments';
6
6
  const createRecordMutation = gql `
7
7
  ${recordIdentityFragment}
8
- mutation CREATE_RECORD($library: ID!, $data: CreateRecordDataInput) {
9
- createRecord(library: $library, data: $data) {
8
+ mutation CREATE_RECORD($library: ID!, $skipActivate: Boolean, $data: CreateRecordDataInput) {
9
+ createRecord(library: $library, skipActivate: $skipActivate, data: $data) {
10
10
  record {
11
11
  ...RecordIdentity
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createRecordMutation.js","sourceRoot":"","sources":["../../../src/_queries/records/createRecordMutation.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAE1D,MAAM,oBAAoB,GAAG,GAAG,CAAA;MAC1B,sBAAsB;;;;;;;;;;;;;;CAc3B,CAAC;AAEF,eAAe,oBAAoB,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 {gql} from '@apollo/client';\nimport {recordIdentityFragment} from '../../gqlFragments';\n\nconst createRecordMutation = gql`\n ${recordIdentityFragment}\n mutation CREATE_RECORD($library: ID!, $data: CreateRecordDataInput) {\n createRecord(library: $library, data: $data) {\n record {\n ...RecordIdentity\n }\n valuesErrors {\n type\n attribute\n input\n message\n }\n }\n }\n`;\n\nexport default createRecordMutation;\n"]}
1
+ {"version":3,"file":"createRecordMutation.js","sourceRoot":"","sources":["../../../src/_queries/records/createRecordMutation.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAE1D,MAAM,oBAAoB,GAAG,GAAG,CAAA;MAC1B,sBAAsB;;;;;;;;;;;;;;CAc3B,CAAC;AAEF,eAAe,oBAAoB,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 {gql} from '@apollo/client';\nimport {recordIdentityFragment} from '../../gqlFragments';\n\nconst createRecordMutation = gql`\n ${recordIdentityFragment}\n mutation CREATE_RECORD($library: ID!, $skipActivate: Boolean, $data: CreateRecordDataInput) {\n createRecord(library: $library, skipActivate: $skipActivate, data: $data) {\n record {\n ...RecordIdentity\n }\n valuesErrors {\n type\n attribute\n input\n message\n }\n }\n }\n`;\n\nexport default createRecordMutation;\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 getTreeNodeChildren: (depth?: number) => string;
6
+ export declare const getTreeContentQuery: (depthTreeNodes?: number) => import("@apollo/client").DocumentNode;
@@ -0,0 +1,70 @@
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 { recordIdentityFragment } from '../../gqlFragments';
5
+ import { gql } from '@apollo/client';
6
+ const DEFAULT_DEPTH_TREE_NODES = 10;
7
+ /**
8
+ * Generates recursive GraphQL for tree node children.
9
+ * Used to fetch nested children up to the specified depth.
10
+ */
11
+ export const getTreeNodeChildren = (depth = 0) => `
12
+ children {
13
+ id
14
+ order
15
+ childrenCount
16
+ record {
17
+ ...RecordIdentity
18
+ active: property(attribute: "active") {
19
+ ... on Value {
20
+ value
21
+ }
22
+ }
23
+ }
24
+ permissions {
25
+ access_tree
26
+ detach
27
+ edit_children
28
+ }
29
+ accessRecordByDefaultPermission
30
+ ${depth > 0 ? getTreeNodeChildren(depth - 1) : ''}
31
+ }
32
+ `;
33
+ export const getTreeContentQuery = (depthTreeNodes = DEFAULT_DEPTH_TREE_NODES) => gql `
34
+ ${recordIdentityFragment}
35
+ query GetTreeContentQuery(
36
+ $treeId: ID!
37
+ $startAt: ID
38
+ $childrenAsRecordValuePermissionFilter: ChildrenAsRecordValuePermissionFilterInput
39
+ $dependentValuesPermissionFilter: DependentValuesPermissionFilterInput
40
+ $accessRecordByDefaultPermission: AccessRecordByDefaultPermissionInput
41
+ ) {
42
+ treeContent(
43
+ treeId: $treeId
44
+ startAt: $startAt
45
+ childrenAsRecordValuePermissionFilter: $childrenAsRecordValuePermissionFilter
46
+ dependentValuesPermissionFilter: $dependentValuesPermissionFilter
47
+ accessRecordByDefaultPermission: $accessRecordByDefaultPermission
48
+ ) {
49
+ id
50
+ order
51
+ childrenCount
52
+ record {
53
+ ...RecordIdentity
54
+ active: property(attribute: "active") {
55
+ ... on Value {
56
+ value
57
+ }
58
+ }
59
+ }
60
+ ${getTreeNodeChildren(depthTreeNodes - 1)}
61
+ permissions {
62
+ access_tree
63
+ detach
64
+ edit_children
65
+ }
66
+ accessRecordByDefaultPermission
67
+ }
68
+ }
69
+ `;
70
+ //# sourceMappingURL=getTreeContentQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTreeContentQuery.js","sourceRoot":"","sources":["../../../src/_queries/trees/getTreeContentQuery.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,sBAAsB,EAAC,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AAEnC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,EAAE,CAAC;;;;;;;;;;;;;;;;;;;UAmBxC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;;CAExD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,cAAc,GAAG,wBAAwB,EAAE,EAAE,CAAC,GAAG,CAAA;MAC/E,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;cA0Bd,mBAAmB,CAAC,cAAc,GAAG,CAAC,CAAC;;;;;;;;;CASpD,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 {recordIdentityFragment} from '../../gqlFragments';\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 getTreeNodeChildren = (depth = 0) => `\n children {\n id\n order\n childrenCount\n record {\n ...RecordIdentity\n active: property(attribute: \"active\") {\n ... on Value {\n value\n }\n }\n }\n permissions {\n access_tree\n detach\n edit_children\n }\n accessRecordByDefaultPermission\n ${depth > 0 ? getTreeNodeChildren(depth - 1) : ''}\n }\n`;\n\nexport const getTreeContentQuery = (depthTreeNodes = DEFAULT_DEPTH_TREE_NODES) => gql`\n ${recordIdentityFragment}\n query GetTreeContentQuery(\n $treeId: ID!\n $startAt: ID\n $childrenAsRecordValuePermissionFilter: ChildrenAsRecordValuePermissionFilterInput\n $dependentValuesPermissionFilter: DependentValuesPermissionFilterInput\n $accessRecordByDefaultPermission: AccessRecordByDefaultPermissionInput\n ) {\n treeContent(\n treeId: $treeId\n startAt: $startAt\n childrenAsRecordValuePermissionFilter: $childrenAsRecordValuePermissionFilter\n dependentValuesPermissionFilter: $dependentValuesPermissionFilter\n accessRecordByDefaultPermission: $accessRecordByDefaultPermission\n ) {\n id\n order\n childrenCount\n record {\n ...RecordIdentity\n active: property(attribute: \"active\") {\n ... on Value {\n value\n }\n }\n }\n ${getTreeNodeChildren(depthTreeNodes - 1)}\n permissions {\n access_tree\n detach\n edit_children\n }\n accessRecordByDefaultPermission\n }\n }\n`;\n"]}
@@ -2,9 +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
  import { isTypeLink } from '@leav/utils';
5
- import { defaultLinkAttributeFilterFormat } from '../components/LibraryItemsList/constants';
6
5
  import { AttributeConditionFilter, FilterType, TreeConditionFilter, } from '../types/search';
7
- import { AttributeType, RecordFilterCondition } from '../_gqlTypes';
6
+ import { AttributeFormat, AttributeType, RecordFilterCondition } from '../_gqlTypes';
8
7
  const _isConditionWithNoValue = (condition) => condition === RecordFilterCondition.IS_EMPTY ||
9
8
  condition === RecordFilterCondition.IS_NOT_EMPTY ||
10
9
  condition === RecordFilterCondition.LAST_MONTH ||
@@ -44,7 +43,7 @@ export const getFiltersFromRequest = (queryFilters, library, attributes) => {
44
43
  const linkedAttribute = attributes.find(attr => attr.library === rootAttribute?.linkedLibrary?.id && attr.id === linkedAttributeId);
45
44
  filter.attribute = {
46
45
  ...linkedAttribute,
47
- parentAttribute: { ...rootAttribute, format: defaultLinkAttributeFilterFormat },
46
+ parentAttribute: { ...rootAttribute, format: AttributeFormat.text },
48
47
  };
49
48
  }
50
49
  else {
@@ -57,7 +56,7 @@ export const getFiltersFromRequest = (queryFilters, library, attributes) => {
57
56
  // Only root attribute => search on tree
58
57
  filter.attribute = {
59
58
  ...rootAttribute,
60
- format: defaultLinkAttributeFilterFormat,
59
+ format: AttributeFormat.text,
61
60
  };
62
61
  }
63
62
  else if (libraryId && !linkedTreeAttribute) {
@@ -65,7 +64,7 @@ export const getFiltersFromRequest = (queryFilters, library, attributes) => {
65
64
  filter.type = FilterType.LIBRARY;
66
65
  filter.parentAttribute = {
67
66
  ...rootAttribute,
68
- format: defaultLinkAttributeFilterFormat,
67
+ format: AttributeFormat.text,
69
68
  };
70
69
  filter.library = {
71
70
  id: libraryId,
@@ -87,7 +86,7 @@ export const getFiltersFromRequest = (queryFilters, library, attributes) => {
87
86
  .library.label
88
87
  : null,
89
88
  },
90
- parentAttribute: { ...rootAttribute, format: defaultLinkAttributeFilterFormat },
89
+ parentAttribute: { ...rootAttribute, format: AttributeFormat.text },
91
90
  };
92
91
  }
93
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getFiltersFromRequest.js","sourceRoot":"","sources":["../../src/_utils/getFiltersFromRequest.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,EAAC,gCAAgC,EAAC,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EACH,wBAAwB,EACxB,UAAU,EAMV,mBAAmB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AAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;yCAC1E,OAAO,CAAC,KAAK;oCACpB,CAAC,CAAC,IAAI;6BACb;4BACD,eAAe,EAAE,EAAC,GAAG,aAAa,EAAE,MAAM,EAAE,gCAAgC,EAAC;yBAChF,CAAC;oBACN,CAAC;gBACL,CAAC;YACL,CAAC;iBAAM,IAAI,WAAW,CAAC,SAAS,IAAI,mBAAmB,EAAE,CAAC;gBACrD,MAAsB,CAAC,IAAI,GAAG,EAAC,EAAE,EAAE,WAAW,CAAC,MAAM,EAAC,CAAC;YAC5D,CAAC;YAED,OAAO,GAAG,CAAC,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC;QACnC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,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 {isTypeLink} from '@leav/utils';\nimport {defaultLinkAttributeFilterFormat} from '_ui/components/LibraryItemsList/constants';\nimport {\n AttributeConditionFilter,\n FilterType,\n type IAttribute,\n type IFilter,\n type IFilterAttribute,\n type IFilterLibrary,\n type IFilterTree,\n TreeConditionFilter,\n} from '_ui/types/search';\nimport {AttributeType, RecordFilterCondition, type RecordFilterInput} from '_ui/_gqlTypes';\n\nconst _isConditionWithNoValue = (condition: RecordFilterCondition): boolean =>\n condition === RecordFilterCondition.IS_EMPTY ||\n condition === RecordFilterCondition.IS_NOT_EMPTY ||\n condition === RecordFilterCondition.LAST_MONTH ||\n condition === RecordFilterCondition.NEXT_MONTH ||\n condition === RecordFilterCondition.TODAY ||\n condition === RecordFilterCondition.TOMORROW ||\n condition === RecordFilterCondition.YESTERDAY;\n\nexport const getFiltersFromRequest = (\n queryFilters: RecordFilterInput[],\n library: string,\n attributes: IAttribute[],\n): IFilter[] => {\n let filters: IFilter[] = [];\n\n for (const queryFilter of queryFilters) {\n const isConditionWithNoValue = _isConditionWithNoValue(queryFilter.condition);\n\n if (queryFilter.value || isConditionWithNoValue) {\n const splitKey = queryFilter.field.split('.');\n\n const filter: IFilter = {\n type: queryFilter.condition in TreeConditionFilter ? FilterType.TREE : FilterType.ATTRIBUTE,\n index: filters.length,\n key: queryFilter.field,\n value: !isConditionWithNoValue\n ? {\n value:\n queryFilter.condition === AttributeConditionFilter.BETWEEN\n ? String(JSON.parse(queryFilter.value))\n : queryFilter.value,\n }\n : null,\n active: true,\n condition:\n AttributeConditionFilter[queryFilter.condition] || TreeConditionFilter[queryFilter.condition],\n };\n\n // Get root attribute by first key part\n const rootAttribute = attributes.find(attr => attr.library === library && attr.id === splitKey[0]);\n\n if (rootAttribute) {\n if (rootAttribute.type === AttributeType.simple || rootAttribute.type === AttributeType.advanced) {\n (filter as IFilterAttribute).attribute = rootAttribute;\n }\n\n if (isTypeLink(rootAttribute.type)) {\n const [, linkedAttributeId] = splitKey;\n if (linkedAttributeId) {\n const linkedAttribute = attributes.find(\n attr => attr.library === rootAttribute?.linkedLibrary?.id && attr.id === linkedAttributeId,\n );\n\n (filter as IFilterAttribute).attribute = {\n ...linkedAttribute,\n parentAttribute: {...rootAttribute, format: defaultLinkAttributeFilterFormat},\n };\n } else {\n (filter as IFilterAttribute).attribute = rootAttribute;\n }\n }\n\n if (rootAttribute.type === AttributeType.tree) {\n const [, libraryId, linkedTreeAttribute] = splitKey;\n\n if (!libraryId && !linkedTreeAttribute) {\n // Only root attribute => search on tree\n (filter as IFilterAttribute).attribute = {\n ...rootAttribute,\n format: defaultLinkAttributeFilterFormat,\n };\n } else if (libraryId && !linkedTreeAttribute) {\n // Search on tree library\n filter.type = FilterType.LIBRARY;\n (filter as IFilterLibrary).parentAttribute = {\n ...rootAttribute,\n format: defaultLinkAttributeFilterFormat,\n };\n (filter as IFilterLibrary).library = {\n id: libraryId,\n label:\n rootAttribute.linkedTree.libraries.filter(l => l.library.id === libraryId)?.[0].library\n .label ?? null,\n };\n } else {\n // Search on linked attribute through tree attribute\n const linkedAttribute = attributes.find(\n attr => attr.library === libraryId && attr.id === linkedTreeAttribute,\n );\n\n (filter as IFilterAttribute).attribute = linkedAttribute;\n (filter as IFilterAttribute).parentTreeLibrary = {\n ...filter,\n type: FilterType.LIBRARY,\n library: {\n id: libraryId,\n label: rootAttribute?.linkedTree?.libraries\n ? rootAttribute.linkedTree.libraries.filter(l => l.library.id === libraryId)?.[0]\n .library.label\n : null,\n },\n parentAttribute: {...rootAttribute, format: defaultLinkAttributeFilterFormat},\n };\n }\n }\n } else if (queryFilter.condition in TreeConditionFilter) {\n (filter as IFilterTree).tree = {id: queryFilter.treeId};\n }\n\n filters = [...filters, filter];\n }\n }\n\n return filters;\n};\n"]}
1
+ {"version":3,"file":"getFiltersFromRequest.js","sourceRoot":"","sources":["../../src/_utils/getFiltersFromRequest.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AAEtE,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,EACH,wBAAwB,EACxB,UAAU,EAMV,mBAAmB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,eAAe,EAAE,aAAa,EAAE,qBAAqB,EAAyB,MAAM,eAAe,CAAC;AAE5G,MAAM,uBAAuB,GAAG,CAAC,SAAgC,EAAW,EAAE,CAC1E,SAAS,KAAK,qBAAqB,CAAC,QAAQ;IAC5C,SAAS,KAAK,qBAAqB,CAAC,YAAY;IAChD,SAAS,KAAK,qBAAqB,CAAC,UAAU;IAC9C,SAAS,KAAK,qBAAqB,CAAC,UAAU;IAC9C,SAAS,KAAK,qBAAqB,CAAC,KAAK;IACzC,SAAS,KAAK,qBAAqB,CAAC,QAAQ;IAC5C,SAAS,KAAK,qBAAqB,CAAC,SAAS,CAAC;AAElD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,YA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GAAG,OAAO,EAAE,MAAM,CAAC,CAAC;QACnC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,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 {isTypeLink} from '@leav/utils';\nimport {\n AttributeConditionFilter,\n FilterType,\n type IAttribute,\n type IFilter,\n type IFilterAttribute,\n type IFilterLibrary,\n type IFilterTree,\n TreeConditionFilter,\n} from '_ui/types/search';\nimport {AttributeFormat, AttributeType, RecordFilterCondition, type RecordFilterInput} from '_ui/_gqlTypes';\n\nconst _isConditionWithNoValue = (condition: RecordFilterCondition): boolean =>\n condition === RecordFilterCondition.IS_EMPTY ||\n condition === RecordFilterCondition.IS_NOT_EMPTY ||\n condition === RecordFilterCondition.LAST_MONTH ||\n condition === RecordFilterCondition.NEXT_MONTH ||\n condition === RecordFilterCondition.TODAY ||\n condition === RecordFilterCondition.TOMORROW ||\n condition === RecordFilterCondition.YESTERDAY;\n\nexport const getFiltersFromRequest = (\n queryFilters: RecordFilterInput[],\n library: string,\n attributes: IAttribute[],\n): IFilter[] => {\n let filters: IFilter[] = [];\n\n for (const queryFilter of queryFilters) {\n const isConditionWithNoValue = _isConditionWithNoValue(queryFilter.condition);\n\n if (queryFilter.value || isConditionWithNoValue) {\n const splitKey = queryFilter.field.split('.');\n\n const filter: IFilter = {\n type: queryFilter.condition in TreeConditionFilter ? FilterType.TREE : FilterType.ATTRIBUTE,\n index: filters.length,\n key: queryFilter.field,\n value: !isConditionWithNoValue\n ? {\n value:\n queryFilter.condition === AttributeConditionFilter.BETWEEN\n ? String(JSON.parse(queryFilter.value))\n : queryFilter.value,\n }\n : null,\n active: true,\n condition:\n AttributeConditionFilter[queryFilter.condition] || TreeConditionFilter[queryFilter.condition],\n };\n\n // Get root attribute by first key part\n const rootAttribute = attributes.find(attr => attr.library === library && attr.id === splitKey[0]);\n\n if (rootAttribute) {\n if (rootAttribute.type === AttributeType.simple || rootAttribute.type === AttributeType.advanced) {\n (filter as IFilterAttribute).attribute = rootAttribute;\n }\n\n if (isTypeLink(rootAttribute.type)) {\n const [, linkedAttributeId] = splitKey;\n if (linkedAttributeId) {\n const linkedAttribute = attributes.find(\n attr => attr.library === rootAttribute?.linkedLibrary?.id && attr.id === linkedAttributeId,\n );\n\n (filter as IFilterAttribute).attribute = {\n ...linkedAttribute,\n parentAttribute: {...rootAttribute, format: AttributeFormat.text},\n };\n } else {\n (filter as IFilterAttribute).attribute = rootAttribute;\n }\n }\n\n if (rootAttribute.type === AttributeType.tree) {\n const [, libraryId, linkedTreeAttribute] = splitKey;\n\n if (!libraryId && !linkedTreeAttribute) {\n // Only root attribute => search on tree\n (filter as IFilterAttribute).attribute = {\n ...rootAttribute,\n format: AttributeFormat.text,\n };\n } else if (libraryId && !linkedTreeAttribute) {\n // Search on tree library\n filter.type = FilterType.LIBRARY;\n (filter as IFilterLibrary).parentAttribute = {\n ...rootAttribute,\n format: AttributeFormat.text,\n };\n (filter as IFilterLibrary).library = {\n id: libraryId,\n label:\n rootAttribute.linkedTree.libraries.filter(l => l.library.id === libraryId)?.[0].library\n .label ?? null,\n };\n } else {\n // Search on linked attribute through tree attribute\n const linkedAttribute = attributes.find(\n attr => attr.library === libraryId && attr.id === linkedTreeAttribute,\n );\n\n (filter as IFilterAttribute).attribute = linkedAttribute;\n (filter as IFilterAttribute).parentTreeLibrary = {\n ...filter,\n type: FilterType.LIBRARY,\n library: {\n id: libraryId,\n label: rootAttribute?.linkedTree?.libraries\n ? rootAttribute.linkedTree.libraries.filter(l => l.library.id === libraryId)?.[0]\n .library.label\n : null,\n },\n parentAttribute: {...rootAttribute, format: AttributeFormat.text},\n };\n }\n }\n } else if (queryFilter.condition in TreeConditionFilter) {\n (filter as IFilterTree).tree = {id: queryFilter.treeId};\n }\n\n filters = [...filters, filter];\n }\n }\n\n return filters;\n};\n"]}
@@ -3,9 +3,8 @@
3
3
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
4
  import { gql } from '@apollo/client';
5
5
  import { isTypeLink, objectToNameValueArray, omit } from '@leav/utils';
6
- import { defaultLinkAttributeFilterFormat } from '../components/LibraryItemsList/constants';
7
6
  import { PreviewSize } from '../constants';
8
- import { AttributeType, } from '../_gqlTypes';
7
+ import { AttributeFormat, AttributeType, } from '../_gqlTypes';
9
8
  import { getFiltersFromRequest } from './getFiltersFromRequest';
10
9
  import dayjs from 'dayjs';
11
10
  import utc from 'dayjs/plugin/utc';
@@ -107,7 +106,7 @@ export const getAttributeFromKey = (key, library, attributes) => {
107
106
  if (isTypeLink(rootAttribute.type)) {
108
107
  if (splitKey[1]) {
109
108
  const linkedAttribute = attributes.find(attr => attr.library === rootAttribute?.linkedLibrary?.id && attr.id === splitKey[1]);
110
- return { ...linkedAttribute, parentAttribute: { ...rootAttribute, format: defaultLinkAttributeFilterFormat } };
109
+ return { ...linkedAttribute, parentAttribute: { ...rootAttribute, format: AttributeFormat.text } };
111
110
  }
112
111
  return rootAttribute;
113
112
  }
@@ -115,7 +114,7 @@ export const getAttributeFromKey = (key, library, attributes) => {
115
114
  const [, libraryId, linkedTreeAttribute] = splitKey;
116
115
  if (!libraryId && !linkedTreeAttribute) {
117
116
  // Only root attribute => search on tree
118
- return { ...rootAttribute, format: defaultLinkAttributeFilterFormat };
117
+ return { ...rootAttribute, format: AttributeFormat.text };
119
118
  }
120
119
  else if (libraryId && !linkedTreeAttribute) {
121
120
  return rootAttribute;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/_utils/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAuB,UAAU,EAAE,sBAAsB,EAAE,IAAI,EAAoB,MAAM,aAAa,CAAC;AAG9G,OAAO,EAAC,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C,MAAM,OAAO,GAAG,CAAC,IAAW,EAAE,UAAkB,EAAE,QAAgB,EAAE,EAAE;IACzE,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAEpC,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC/C,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 {gql} from '@apollo/client';\nimport {type IDateRangeValue, isTypeLink, objectToNameValueArray, omit, type WithTypename} from '@leav/utils';\nimport {type TFunction} from 'i18next';\nimport {type SyntheticEvent} from 'react';\nimport {defaultLinkAttributeFilterFormat} from '_ui/components/LibraryItemsList/constants';\nimport {PreviewSize} from '_ui/constants';\nimport {type IAttribute} from '_ui/types/search';\nimport {type IValueVersion} from '_ui/types/values';\nimport {type IView} from '_ui/types/views';\nimport {\n AttributeType,\n type PermissionsActions,\n type RecordFilterInput,\n type RecordIdentityFragment,\n type useIsAllowedQuery,\n type ValueDetailsFragment,\n type ValueVersionInput,\n type ViewDetailsFragment,\n} from '_ui/_gqlTypes';\nimport {getFiltersFromRequest} from './getFiltersFromRequest';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\n\ndayjs.extend(utc);\n\nexport const arrayValueVersionToObject = (version: ValueDetailsFragment['version']): IValueVersion =>\n version?.reduce((acc: IValueVersion, value) => {\n acc[value.treeId] = {\n id: value.treeNode.id,\n label: value.treeNode.record.whoAmI.label,\n };\n\n return acc;\n }, {});\n\nexport const objectValueVersionToArray = (version: IValueVersion): ValueVersionInput[] =>\n version\n ? objectToNameValueArray(version).map(v => ({\n treeId: v.name,\n treeNodeId: v?.value?.id ?? null,\n }))\n : null;\n\nexport const extractPermissionFromQuery = (\n queryResult: ReturnType<typeof useIsAllowedQuery>,\n action: PermissionsActions,\n fallbackPermission = false,\n): boolean =>\n !queryResult.loading && !queryResult.error\n ? (queryResult.data?.isAllowed?.find(permission => permission.name === action)?.allowed ?? fallbackPermission)\n : fallbackPermission;\n\nexport const getPreviewSize = (size?: PreviewSize, simplistic = false) => {\n if (simplistic) {\n return '1.2rem';\n }\n\n switch (size) {\n case PreviewSize.MEDIUM:\n return '3.5rem';\n case PreviewSize.BIG:\n return '6rem';\n case PreviewSize.SMALL:\n return '2.5rem';\n case PreviewSize.TINY:\n return '1.7rem';\n default:\n return '2rem';\n }\n};\n\nexport const setDateToUTCNoon = (date: dayjs.Dayjs): dayjs.Dayjs =>\n date.set('hour', 12).set('minute', 0).set('second', 0).set('millisecond', 0);\n\nexport const getTreeRecordKey = (record: RecordIdentityFragment): string => `${record.whoAmI.library.id}/${record.id}`;\n\nexport const getValueVersionLabel = (version: IValueVersion) =>\n Object.values(version ?? {})\n .map(v => v.label)\n .join(' / ');\n\nexport const stringifyDateRangeValue = (value: IDateRangeValue, t: TFunction): string =>\n t('record_edition.date_range_value', {\n ...value,\n interpolation: {escapeValue: false},\n });\n\n/**\n * Cloning gql template tag because some apollo tools like query validation and codegen won't be happy if we use\n * interpolation in template strings. With a different tag name, the query won't be parsed by these tools\n * thus they won't complain about it.\n * It works exactly the same at runtime.\n */\nexport const gqlUnchecked = gql;\n\nexport const getPropertyCacheFieldName = (attributeId: string): string => `property({\"attribute\":\"${attributeId}\"})`;\n\n/**\n * Prepare view coming from the server to be used in the app\n */\nexport const prepareView = (\n view: WithTypename<ViewDetailsFragment>,\n attributes: IAttribute[],\n libraryId: string,\n userId: string,\n): IView => {\n const viewFilters: RecordFilterInput[] = (view?.filters ?? []).map(filter => ({\n ...filter,\n treeId: filter.tree?.id,\n }));\n\n const viewValuesVersions = (view?.valuesVersions ?? []).map(version => ({\n ...version,\n treeNode: {\n ...version.treeNode,\n title: version.treeNode.record.whoAmI.label,\n },\n }));\n\n return {\n ...omit(view, 'created_by', '__typename'),\n owner: view.created_by.id === userId,\n filters: getFiltersFromRequest(viewFilters, libraryId, attributes),\n sort: (view.sort ?? []).map(s => ({\n field: s.field,\n order: s.order,\n })),\n display: omit(view.display, '__typename') as ViewDetailsFragment['display'],\n valuesVersions: viewValuesVersions.reduce((versions: IValueVersion, version): IValueVersion => {\n versions[version.treeId] = {\n id: version.treeNode.id,\n label: version.treeNode.record.whoAmI.label,\n };\n\n return versions;\n }, {}),\n attributes: (view.attributes ?? []).map(attr => attr.id),\n };\n};\nexport const getAttributeFromKey = (key: string, library: string, attributes: IAttribute[]): IAttribute | undefined => {\n const splitKey = key.split('.');\n\n // Get root attribute by first key part\n const rootAttribute = attributes.find(attr => attr.library === library && attr.id === splitKey[0]);\n\n if (!rootAttribute) {\n return;\n }\n\n if (rootAttribute.type === AttributeType.simple || rootAttribute.type === AttributeType.advanced) {\n return rootAttribute;\n }\n\n if (isTypeLink(rootAttribute.type)) {\n if (splitKey[1]) {\n const linkedAttribute = attributes.find(\n attr => attr.library === rootAttribute?.linkedLibrary?.id && attr.id === splitKey[1],\n );\n\n return {...linkedAttribute, parentAttribute: {...rootAttribute, format: defaultLinkAttributeFilterFormat}};\n }\n\n return rootAttribute;\n }\n\n if (rootAttribute.type === AttributeType.tree) {\n const [, libraryId, linkedTreeAttribute] = splitKey;\n\n if (!libraryId && !linkedTreeAttribute) {\n // Only root attribute => search on tree\n return {...rootAttribute, format: defaultLinkAttributeFilterFormat};\n } else if (libraryId && !linkedTreeAttribute) {\n return rootAttribute;\n }\n\n const linkedAttribute = attributes.find(attr => attr.library === splitKey[1] && attr.id === splitKey[2]);\n\n return linkedAttribute;\n }\n};\n\nexport const stopEvent = (e: SyntheticEvent) => {\n e.stopPropagation();\n e.preventDefault();\n};\n\nexport const reorder = (list: any[], startIndex: number, endIndex: number) => {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result.filter(element => !!element);\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/_utils/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAuB,UAAU,EAAE,sBAAsB,EAAE,IAAI,EAAoB,MAAM,aAAa,CAAC;AAG9G,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,OAAO,EACH,eAAe,EACf,aAAa,GAQhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,kBAAkB,CAAC;AAEnC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAElB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAwC,EAAiB,EAAE,CACjG,OAAO,EAAE,MAAM,CAAC,CAAC,GAAkB,EAAE,KAAK,EAAE,EAAE;IAC1C,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG;QAChB,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE;QACrB,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK;KAC5C,CAAC;IAEF,OAAO,GAAG,CAAC;AACf,CAAC,EAAE,EAAE,CAAC,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,OAAsB,EAAuB,EAAE,CACrF,OAAO;IACH,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,EAAE,CAAC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CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAEzG,OAAO,eAAe,CAAC;IAC3B,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAiB,EAAE,EAAE;IAC3C,CAAC,CAAC,eAAe,EAAE,CAAC;IACpB,CAAC,CAAC,cAAc,EAAE,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAW,EAAE,UAAkB,EAAE,QAAgB,EAAE,EAAE;IACzE,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAEpC,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC/C,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 {gql} from '@apollo/client';\nimport {type IDateRangeValue, isTypeLink, objectToNameValueArray, omit, type WithTypename} from '@leav/utils';\nimport {type TFunction} from 'i18next';\nimport {type SyntheticEvent} from 'react';\nimport {PreviewSize} from '_ui/constants';\nimport {type IAttribute} from '_ui/types/search';\nimport {type IValueVersion} from '_ui/types/values';\nimport {type IView} from '_ui/types/views';\nimport {\n AttributeFormat,\n AttributeType,\n type PermissionsActions,\n type RecordFilterInput,\n type RecordIdentityFragment,\n type useIsAllowedQuery,\n type ValueDetailsFragment,\n type ValueVersionInput,\n type ViewDetailsFragment,\n} from '_ui/_gqlTypes';\nimport {getFiltersFromRequest} from './getFiltersFromRequest';\nimport dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\n\ndayjs.extend(utc);\n\nexport const arrayValueVersionToObject = (version: ValueDetailsFragment['version']): IValueVersion =>\n version?.reduce((acc: IValueVersion, value) => {\n acc[value.treeId] = {\n id: value.treeNode.id,\n label: value.treeNode.record.whoAmI.label,\n };\n\n return acc;\n }, {});\n\nexport const objectValueVersionToArray = (version: IValueVersion): ValueVersionInput[] =>\n version\n ? objectToNameValueArray(version).map(v => ({\n treeId: v.name,\n treeNodeId: v?.value?.id ?? null,\n }))\n : null;\n\nexport const extractPermissionFromQuery = (\n queryResult: ReturnType<typeof useIsAllowedQuery>,\n action: PermissionsActions,\n fallbackPermission = false,\n): boolean =>\n !queryResult.loading && !queryResult.error\n ? (queryResult.data?.isAllowed?.find(permission => permission.name === action)?.allowed ?? fallbackPermission)\n : fallbackPermission;\n\nexport const getPreviewSize = (size?: PreviewSize, simplistic = false) => {\n if (simplistic) {\n return '1.2rem';\n }\n\n switch (size) {\n case PreviewSize.MEDIUM:\n return '3.5rem';\n case PreviewSize.BIG:\n return '6rem';\n case PreviewSize.SMALL:\n return '2.5rem';\n case PreviewSize.TINY:\n return '1.7rem';\n default:\n return '2rem';\n }\n};\n\nexport const setDateToUTCNoon = (date: dayjs.Dayjs): dayjs.Dayjs =>\n date.set('hour', 12).set('minute', 0).set('second', 0).set('millisecond', 0);\n\nexport const getTreeRecordKey = (record: RecordIdentityFragment): string => `${record.whoAmI.library.id}/${record.id}`;\n\nexport const getValueVersionLabel = (version: IValueVersion) =>\n Object.values(version ?? {})\n .map(v => v.label)\n .join(' / ');\n\nexport const stringifyDateRangeValue = (value: IDateRangeValue, t: TFunction): string =>\n t('record_edition.date_range_value', {\n ...value,\n interpolation: {escapeValue: false},\n });\n\n/**\n * Cloning gql template tag because some apollo tools like query validation and codegen won't be happy if we use\n * interpolation in template strings. With a different tag name, the query won't be parsed by these tools\n * thus they won't complain about it.\n * It works exactly the same at runtime.\n */\nexport const gqlUnchecked = gql;\n\nexport const getPropertyCacheFieldName = (attributeId: string): string => `property({\"attribute\":\"${attributeId}\"})`;\n\n/**\n * Prepare view coming from the server to be used in the app\n */\nexport const prepareView = (\n view: WithTypename<ViewDetailsFragment>,\n attributes: IAttribute[],\n libraryId: string,\n userId: string,\n): IView => {\n const viewFilters: RecordFilterInput[] = (view?.filters ?? []).map(filter => ({\n ...filter,\n treeId: filter.tree?.id,\n }));\n\n const viewValuesVersions = (view?.valuesVersions ?? []).map(version => ({\n ...version,\n treeNode: {\n ...version.treeNode,\n title: version.treeNode.record.whoAmI.label,\n },\n }));\n\n return {\n ...omit(view, 'created_by', '__typename'),\n owner: view.created_by.id === userId,\n filters: getFiltersFromRequest(viewFilters, libraryId, attributes),\n sort: (view.sort ?? []).map(s => ({\n field: s.field,\n order: s.order,\n })),\n display: omit(view.display, '__typename') as ViewDetailsFragment['display'],\n valuesVersions: viewValuesVersions.reduce((versions: IValueVersion, version): IValueVersion => {\n versions[version.treeId] = {\n id: version.treeNode.id,\n label: version.treeNode.record.whoAmI.label,\n };\n\n return versions;\n }, {}),\n attributes: (view.attributes ?? []).map(attr => attr.id),\n };\n};\nexport const getAttributeFromKey = (key: string, library: string, attributes: IAttribute[]): IAttribute | undefined => {\n const splitKey = key.split('.');\n\n // Get root attribute by first key part\n const rootAttribute = attributes.find(attr => attr.library === library && attr.id === splitKey[0]);\n\n if (!rootAttribute) {\n return;\n }\n\n if (rootAttribute.type === AttributeType.simple || rootAttribute.type === AttributeType.advanced) {\n return rootAttribute;\n }\n\n if (isTypeLink(rootAttribute.type)) {\n if (splitKey[1]) {\n const linkedAttribute = attributes.find(\n attr => attr.library === rootAttribute?.linkedLibrary?.id && attr.id === splitKey[1],\n );\n\n return {...linkedAttribute, parentAttribute: {...rootAttribute, format: AttributeFormat.text}};\n }\n\n return rootAttribute;\n }\n\n if (rootAttribute.type === AttributeType.tree) {\n const [, libraryId, linkedTreeAttribute] = splitKey;\n\n if (!libraryId && !linkedTreeAttribute) {\n // Only root attribute => search on tree\n return {...rootAttribute, format: AttributeFormat.text};\n } else if (libraryId && !linkedTreeAttribute) {\n return rootAttribute;\n }\n\n const linkedAttribute = attributes.find(attr => attr.library === splitKey[1] && attr.id === splitKey[2]);\n\n return linkedAttribute;\n }\n};\n\nexport const stopEvent = (e: SyntheticEvent) => {\n e.stopPropagation();\n e.preventDefault();\n};\n\nexport const reorder = (list: any[], startIndex: number, endIndex: number) => {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result.filter(element => !!element);\n};\n"]}
@@ -1,2 +1,7 @@
1
1
  import { type WithTypename } from '@leav/utils';
2
+ import { type RecordFormElementsValueTreeValue, type RecordFormElementAttribute, type RecordFormElementsValue, type RecordFormElementsValueLinkValue } from '../hooks/useGetRecordForm';
2
3
  export declare const hasTypename: <T>(value: any) => value is WithTypename<T>;
4
+ export declare const isRecordFormElementsValueLinkValue: (value: RecordFormElementsValue, attribute: RecordFormElementAttribute) => value is RecordFormElementsValueLinkValue;
5
+ export declare const isRecordFormElementsValueLinkValues: (values: RecordFormElementsValue[], attribute: RecordFormElementAttribute) => values is RecordFormElementsValueLinkValue[];
6
+ export declare const isRecordFormElementsValuesTreeValue: (value: RecordFormElementsValue, attribute: RecordFormElementAttribute) => value is RecordFormElementsValueTreeValue;
7
+ export declare const isRecordFormElementsValuesTreeValues: (values: RecordFormElementsValue[], attribute: RecordFormElementAttribute) => values is RecordFormElementsValueTreeValue[];
@@ -1,2 +1,8 @@
1
+ import { AttributeType } from '../_gqlTypes';
1
2
  export const hasTypename = (value) => '__typename' in value;
3
+ export const isRecordFormElementsValueLinkValue = (value, attribute) => attribute.type === AttributeType.simple_link ||
4
+ (attribute.type === AttributeType.advanced_link && attribute.multiple_values === false);
5
+ export const isRecordFormElementsValueLinkValues = (values, attribute) => attribute.type === AttributeType.advanced_link && attribute.multiple_values === true;
6
+ export const isRecordFormElementsValuesTreeValue = (value, attribute) => attribute.type === AttributeType.tree && attribute.multiple_values === false;
7
+ export const isRecordFormElementsValuesTreeValues = (values, attribute) => attribute.type === AttributeType.tree && attribute.multiple_values === true;
2
8
  //# sourceMappingURL=typeguards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"typeguards.js","sourceRoot":"","sources":["../../src/_utils/typeguards.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAI,KAAU,EAA4B,EAAE,CAAC,YAAY,IAAI,KAAK,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 WithTypename} from '@leav/utils';\n\nexport const hasTypename = <T>(value: any): value is WithTypename<T> => '__typename' in value;\n"]}
1
+ {"version":3,"file":"typeguards.js","sourceRoot":"","sources":["../../src/_utils/typeguards.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAQ5C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAI,KAAU,EAA4B,EAAE,CAAC,YAAY,IAAI,KAAK,CAAC;AAE9F,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAC9C,KAA8B,EAC9B,SAAqC,EACI,EAAE,CAC3C,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,WAAW;IAC5C,CAAC,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,aAAa,IAAI,SAAS,CAAC,eAAe,KAAK,KAAK,CAAC,CAAC;AAE5F,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAC/C,MAAiC,EACjC,SAAqC,EACO,EAAE,CAC9C,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,aAAa,IAAI,SAAS,CAAC,eAAe,KAAK,IAAI,CAAC;AAEzF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAC/C,KAA8B,EAC9B,SAAqC,EACI,EAAE,CAC3C,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,IAAI,SAAS,CAAC,eAAe,KAAK,KAAK,CAAC;AAEjF,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAChD,MAAiC,EACjC,SAAqC,EACO,EAAE,CAC9C,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,IAAI,SAAS,CAAC,eAAe,KAAK,IAAI,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 WithTypename} from '@leav/utils';\nimport {AttributeType} from '_ui/_gqlTypes';\nimport {\n type RecordFormElementsValueTreeValue,\n type RecordFormElementAttribute,\n type RecordFormElementsValue,\n type RecordFormElementsValueLinkValue,\n} from '_ui/hooks/useGetRecordForm';\n\nexport const hasTypename = <T>(value: any): value is WithTypename<T> => '__typename' in value;\n\nexport const isRecordFormElementsValueLinkValue = (\n value: RecordFormElementsValue,\n attribute: RecordFormElementAttribute,\n): value is RecordFormElementsValueLinkValue =>\n attribute.type === AttributeType.simple_link ||\n (attribute.type === AttributeType.advanced_link && attribute.multiple_values === false);\n\nexport const isRecordFormElementsValueLinkValues = (\n values: RecordFormElementsValue[],\n attribute: RecordFormElementAttribute,\n): values is RecordFormElementsValueLinkValue[] =>\n attribute.type === AttributeType.advanced_link && attribute.multiple_values === true;\n\nexport const isRecordFormElementsValuesTreeValue = (\n value: RecordFormElementsValue,\n attribute: RecordFormElementAttribute,\n): value is RecordFormElementsValueTreeValue =>\n attribute.type === AttributeType.tree && attribute.multiple_values === false;\n\nexport const isRecordFormElementsValuesTreeValues = (\n values: RecordFormElementsValue[],\n attribute: RecordFormElementAttribute,\n): values is RecordFormElementsValueTreeValue[] =>\n attribute.type === AttributeType.tree && attribute.multiple_values === true;\n"]}
@@ -13,7 +13,7 @@ export interface IExplorerProps {
13
13
  emptyPlaceholder?: ReactNode;
14
14
  defaultActionsForItem?: Array<'replaceLink' | 'remove' | 'activate'>;
15
15
  defaultPrimaryActions?: Array<'create'>;
16
- defaultMassActions?: Array<'deactivate' | 'export' | 'editAttribute'>;
16
+ defaultMassActions?: Array<'deactivate' | 'export' | 'editAttribute' | 'generatePreviews'>;
17
17
  defaultViewSettings?: DefaultViewSettings;
18
18
  defaultCallbacks?: {
19
19
  item?: {
@@ -32,6 +32,7 @@ export interface IExplorerProps {
32
32
  mass?: {
33
33
  deactivate?: IMassActions['callback'];
34
34
  export?: IMassActions['callback'];
35
+ generatePreviews?: IMassActions['callback'];
35
36
  };
36
37
  };
37
38
  showCreateOnNoResultOnly?: boolean;
@@ -29,6 +29,8 @@ import { useFiltersReducer } from '../../components/Filters/context/useFiltersRe
29
29
  import { FiltersContext } from '../../components/Filters/context/filtersContext';
30
30
  import { useExportMassAction } from './actions-mass/useExportMassAction';
31
31
  import { useEditAttributeMassAction } from './actions-mass/useEditAttributeMassAction';
32
+ import { useExplorerCountData } from './_queries/useExplorerCountData';
33
+ import { useGeneratePreviewsMassAction } from './actions-mass/useGeneratePreviewsMassAction';
32
34
  const isNotEmpty = (union) => union.length > 0;
33
35
  const emptyArray = [];
34
36
  const emptyObject = {};
@@ -50,7 +52,7 @@ const ExplorerEmptyDataStyled = styled.div `
50
52
  align-items: center;
51
53
  justify-content: center;
52
54
  `;
53
- export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActions = [], massActions = [], title, selectionMode = 'multiple', emptyPlaceholder, noPagination, creationFormId, showCreateOnNoResultOnly = false, showFilters = false, showSorts = false, hideFirstActionLabel = false, disableSelection = false, hideSelectAllAction = false, showTitle = false, showSearch = false, hidePrimaryActions = false, hideTableHeader = false, useSmallHeaderSize = false, tableBodyHeight, ignoreViewByDefault = false, defaultActionsForItem = ['replaceLink', 'remove', 'activate'], defaultPrimaryActions = ['create'], defaultMassActions = ['deactivate', 'editAttribute'], defaultCallbacks, defaultViewSettings, joinLibraryContext, }, ref) => {
55
+ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActions = [], massActions = [], title, selectionMode = 'multiple', emptyPlaceholder, noPagination, creationFormId, showCreateOnNoResultOnly = false, showFilters = false, showSorts = false, hideFirstActionLabel = false, disableSelection = false, hideSelectAllAction = false, showTitle = false, showSearch = false, hidePrimaryActions = false, hideTableHeader = false, useSmallHeaderSize = false, tableBodyHeight, ignoreViewByDefault = false, defaultActionsForItem = ['replaceLink', 'remove', 'activate'], defaultPrimaryActions = ['create'], defaultMassActions = ['deactivate', 'editAttribute', 'export', 'generatePreviews'], defaultCallbacks, defaultViewSettings, joinLibraryContext, }, ref) => {
54
56
  const { t } = useSharedTranslation();
55
57
  const { panelElement: settingsPanelElement } = useEditSettings();
56
58
  const { loading: viewSettingsLoading, view, dispatch: viewSettingsDispatch, } = useViewSettingsReducer(entrypoint, defaultViewSettings, ignoreViewByDefault);
@@ -91,7 +93,14 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
91
93
  canReplaceLinkValues: canEditLinkAttributeValues,
92
94
  columnsToDisplay: !joinLibraryContext ? view.attributesIds : [],
93
95
  });
94
- const totalCount = data?.totalCount ?? 0;
96
+ const totalCountFiltered = data?.totalCount ?? 0;
97
+ const { countData: totalCountLibrary, refetchCount } = useExplorerCountData({
98
+ entrypoint,
99
+ libraryId: view.libraryId,
100
+ defaultFilters: defaultViewSettings?.filters ?? [],
101
+ filters: filtersData.filters,
102
+ skip: viewSettingsLoading,
103
+ });
95
104
  const hasNoResults = data === null || data.totalCount === 0;
96
105
  const isAllowedFreeEntry = !(entrypoint.type === 'library' && !entrypoint.allowFreeEntry);
97
106
  const showCreatePrimaryButton = showCreateOnNoResultOnly
@@ -106,9 +115,10 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
106
115
  joinLibraryContext,
107
116
  entrypoint,
108
117
  isMultivalue,
109
- totalCount,
118
+ totalCount: totalCountFiltered,
110
119
  formId: creationFormId,
111
120
  refetch,
121
+ refetchCount,
112
122
  });
113
123
  const { linkPrimaryAction, linkModal } = useLinkPrimaryAction({
114
124
  isEnabled: isLink,
@@ -122,22 +132,28 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
122
132
  columnsToDisplay: !joinLibraryContext ? view.attributesIds : [],
123
133
  });
124
134
  const allVisibleKeys = data?.records.map(({ key }) => key) ?? [];
135
+ const { generatePreviewsMassAction, GeneratePreviewsModal } = useGeneratePreviewsMassAction({
136
+ isEnabled: !isLink && isNotEmpty(defaultMassActions) && defaultMassActions.includes('generatePreviews'),
137
+ store: { view },
138
+ totalCount: totalCountFiltered,
139
+ onGeneratePreviews: defaultCallbacks?.mass?.generatePreviews,
140
+ });
125
141
  const { exportMassAction, ExportModal } = useExportMassAction({
126
142
  isEnabled: !isLink && isNotEmpty(defaultMassActions) && defaultMassActions.includes('export'),
127
143
  store: { view, dispatch: viewSettingsDispatch },
128
- totalCount,
144
+ totalCount: totalCountFiltered,
129
145
  onExport: defaultCallbacks?.mass?.export,
130
146
  });
131
147
  const { editAttributeMassAction, editAttributeMassActionModal } = useEditAttributeMassAction({
132
148
  isEnabled: !isLink && isNotEmpty(defaultMassActions) && defaultMassActions.includes('editAttribute'),
133
149
  store: { view },
134
- totalCount,
150
+ totalCount: totalCountFiltered,
135
151
  });
136
152
  const { deactivateMassAction } = useDeactivateMassAction({
137
153
  isEnabled: !isLink && isNotEmpty(defaultMassActions) && defaultMassActions.includes('deactivate'),
138
154
  store: { view, dispatch: viewSettingsDispatch },
139
155
  allVisibleKeys,
140
- totalCount,
156
+ totalCount: totalCountFiltered,
141
157
  onDeactivate: defaultCallbacks?.mass?.deactivate,
142
158
  refetch,
143
159
  });
@@ -150,17 +166,19 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
150
166
  onDelete: defaultCallbacks?.mass?.deactivate,
151
167
  refetch,
152
168
  });
153
- const _isSelectionDisable = disableSelection || (isLink && !isMultivalue && totalCount > 0);
169
+ const _isSelectionDisable = disableSelection || (isLink && !isMultivalue && totalCountFiltered > 0);
154
170
  const massActionSnackbarId = useMemo(() => `${SNACKBAR_MASS_ID}_${Date.now()}`, []);
155
171
  const { setSelectedKeys, selectAllButton } = useMassActions({
156
- isEnabled: totalCount > 0 &&
172
+ isEnabled: totalCountFiltered > 0 &&
157
173
  !_isSelectionDisable &&
158
174
  (isNotEmpty(defaultMassActions) || isNotEmpty(massActions) || !!defaultCallbacks?.item?.select),
159
175
  store: { view, dispatch: viewSettingsDispatch },
160
176
  filtersStore: filtersData,
161
- totalCount,
177
+ totalCountFiltered,
178
+ totalCountLibrary,
162
179
  allVisibleKeys,
163
180
  massActions: [
181
+ generatePreviewsMassAction,
164
182
  exportMassAction,
165
183
  editAttributeMassAction,
166
184
  deactivateMassAction,
@@ -179,8 +197,8 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
179
197
  useImperativeHandle(ref, () => ({
180
198
  createAction: createPrimaryAction,
181
199
  linkAction: linkPrimaryAction,
182
- totalCount,
183
- }), [createPrimaryAction?.disabled, linkPrimaryAction?.disabled, totalCount]);
200
+ totalCount: totalCountFiltered,
201
+ }), [createPrimaryAction?.disabled, linkPrimaryAction?.disabled, totalCountFiltered]);
184
202
  return (_jsxs(_Fragment, { children: [_jsx(FiltersContext.Provider, { value: { filtersData, dispatch: filtersDispatch }, children: _jsxs(ViewSettingsContext.Provider, { value: { view, dispatch: viewSettingsDispatch }, children: [_jsxs(ExplorerPageDivStyled, { children: [showTitle && (_jsx(ExplorerHeaderDivStyled, { children: _jsx(KitTypography.Title, { level: "h3", children: !viewSettingsLoading && (_jsx(ExplorerTitle, { library: view.libraryId, title: title, entrypoint: entrypoint })) /*TODO: manage loading*/ }) })), _jsxs(ExplorerToolbar, { showFilters: showFilters, showSorts: showSorts, isMassSelectionAll: isMassSelectionAll, headless: hideTableHeader, canRemoveFilters: view?.enableConfigureView ?? false, selectAllButton: hideSelectAllAction ? null : selectAllButton, viewSettingsLoading: viewSettingsLoading, children: [view?.enableConfigureView ? viewListButton : null, showSearch ? searchInput : null, view?.enableConfigureView ? viewSettingsButton : null, hidePrimaryActions ? null : primaryButton] }), loadingData || viewSettingsLoading ? (_jsx(Loading, {})) : hasNoResults ? (_jsx(ExplorerEmptyDataStyled, { children: emptyPlaceholder || _jsx(KitEmpty, { title: t('explorer.empty-data') }) })) : (_jsx(DataView, { dataGroupedFilteredSorted: data?.records ?? emptyArray, attributesProperties: data?.attributes ?? emptyObject, attributesToDisplay: [WHO_AM_I_COLUMN, ...view.attributesIds], hideTableHeader: hideTableHeader, useSmallHeaderSize: useSmallHeaderSize, paginationProps: entrypoint.type === 'library' && !noPagination
185
203
  ? {
186
204
  pageSizeOptions: defaultPageSizeOptions,
@@ -188,7 +206,7 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
188
206
  pageSize: view.pageSize,
189
207
  setNewPageSize,
190
208
  setNewPage,
191
- totalCount,
209
+ totalCount: totalCountFiltered,
192
210
  }
193
211
  : undefined, itemActions: [...itemActions, replaceItemAction, editStatusItemAction]
194
212
  .filter(Boolean)
@@ -203,6 +221,6 @@ export const Explorer = forwardRef(({ entrypoint, itemActions = [], primaryActio
203
221
  ? data?.records.map(({ whoAmI }) => whoAmI.id)
204
222
  : view.massSelection,
205
223
  mode: selectionMode,
206
- }, tableBodyHeight: tableBodyHeight }))] }), settingsPanelElement && createPortal(_jsx(SidePanel, {}), settingsPanelElement?.() ?? document.body), replaceItemModal, createModal, linkModal, editAttributeMassActionModal, ExportModal] }) }), _jsx(KitSnackBarProvider, { id: massActionSnackbarId })] }));
224
+ }, tableBodyHeight: tableBodyHeight }))] }), settingsPanelElement && createPortal(_jsx(SidePanel, {}), settingsPanelElement?.() ?? document.body), replaceItemModal, createModal, linkModal, editAttributeMassActionModal, ExportModal, GeneratePreviewsModal] }) }), _jsx(KitSnackBarProvider, { id: massActionSnackbarId })] }));
207
225
  });
208
226
  //# sourceMappingURL=Explorer.js.map