@leav/ui 0.3.6-fa687e8 → 0.4.0-049caba

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 (637) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +9 -2
  3. package/dist/__mocks__/common/attribute.js.map +1 -1
  4. package/dist/__mocks__/common/form.d.ts +12 -5
  5. package/dist/__mocks__/common/form.js +33 -2
  6. package/dist/__mocks__/common/form.js.map +1 -1
  7. package/dist/__mocks__/common/record.d.ts +13 -2
  8. package/dist/__mocks__/common/record.js.map +1 -1
  9. package/dist/__mocks__/common/value.js +3 -2
  10. package/dist/__mocks__/common/value.js.map +1 -1
  11. package/dist/__mocks__/common/view.js +7 -5
  12. package/dist/__mocks__/common/view.js.map +1 -1
  13. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
  14. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
  15. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
  16. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
  17. package/dist/_gqlTypes/index.d.ts +944 -121
  18. package/dist/_gqlTypes/index.js +515 -55
  19. package/dist/_gqlTypes/index.js.map +1 -1
  20. package/dist/_queries/attributes/attributeDetailsFragment.js +0 -1
  21. package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
  22. package/dist/_queries/attributes/getAttributesByLib.js +7 -5
  23. package/dist/_queries/attributes/getAttributesByLib.js.map +1 -1
  24. package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
  25. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
  26. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
  27. package/dist/_queries/records/createRecordMutation.js +2 -3
  28. package/dist/_queries/records/createRecordMutation.js.map +1 -1
  29. package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
  30. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  31. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  32. package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
  33. package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
  34. package/dist/_queries/records/recordFormAttributeFragment.js +3 -0
  35. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  36. package/dist/_queries/views/saveViewMutation.js +1 -1
  37. package/dist/_queries/views/viewDetailsFragment.js +14 -11
  38. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  39. package/dist/_utils/attributeType.d.ts +3 -0
  40. package/dist/_utils/attributeType.js +7 -0
  41. package/dist/_utils/attributeType.js.map +1 -0
  42. package/dist/_utils/index.js +6 -3
  43. package/dist/_utils/index.js.map +1 -1
  44. package/dist/_utils/interleaveElement.d.ts +1 -0
  45. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  46. package/dist/_utils/interleaveElement.js.map +1 -0
  47. package/dist/antdTheme/index.d.ts +0 -3
  48. package/dist/antdTheme/index.js +3 -42
  49. package/dist/antdTheme/index.js.map +1 -1
  50. package/dist/components/CreateDirectory/CreateDirectory.js +1 -3
  51. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  52. package/dist/components/EditApplication/EditApplication.js +2 -2
  53. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  54. package/dist/components/EditApplication/EditApplicationInfo/EditApplicationInfoForm/EditApplicationInfoForm.js.map +1 -1
  55. package/dist/components/EditApplication/_types.d.ts +2 -2
  56. package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js +0 -1
  57. package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfo.js.map +1 -1
  58. package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js +2 -5
  59. package/dist/components/EditAttributeModal/EditAttribute/EditAttributeInfo/EditAttributeInfoForm/EditAttributeInfoForm.js.map +1 -1
  60. package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.d.ts +1 -1
  61. package/dist/components/EditTreeModal/EditTree/EditTreeInfo/EditTreeInfoForm/EditTreeInfoForm.js.map +1 -1
  62. package/dist/components/Explorer/DataView.d.ts +18 -2
  63. package/dist/components/Explorer/DataView.js +112 -50
  64. package/dist/components/Explorer/DataView.js.map +1 -1
  65. package/dist/components/Explorer/Explorer.d.ts +45 -5
  66. package/dist/components/Explorer/Explorer.js +152 -29
  67. package/dist/components/Explorer/Explorer.js.map +1 -1
  68. package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
  69. package/dist/components/Explorer/ExplorerTitle.js +28 -11
  70. package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
  71. package/dist/components/Explorer/ExplorerToolbar.d.ts +6 -0
  72. package/dist/components/Explorer/ExplorerToolbar.js +53 -0
  73. package/dist/components/Explorer/ExplorerToolbar.js.map +1 -0
  74. package/dist/components/Explorer/IdCard.d.ts +7 -0
  75. package/dist/components/Explorer/IdCard.js +15 -0
  76. package/dist/components/Explorer/IdCard.js.map +1 -0
  77. package/dist/components/Explorer/TableCell.d.ts +8 -0
  78. package/dist/components/Explorer/TableCell.js +152 -0
  79. package/dist/components/Explorer/TableCell.js.map +1 -0
  80. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  81. package/dist/components/Explorer/TableTagGroup.js +30 -0
  82. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  83. package/dist/components/Explorer/_constants.d.ts +5 -0
  84. package/dist/components/Explorer/_constants.js +18 -0
  85. package/dist/components/Explorer/_constants.js.map +1 -0
  86. package/dist/components/Explorer/_queries/prepareFiltersForRequest.d.ts +4 -0
  87. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js +99 -0
  88. package/dist/components/Explorer/_queries/prepareFiltersForRequest.js.map +1 -0
  89. package/dist/components/Explorer/_queries/useExecuteUpdateViewMutation.d.ts +6 -0
  90. package/dist/components/Explorer/_queries/useExecuteUpdateViewMutation.js +12 -0
  91. package/dist/components/Explorer/_queries/useExecuteUpdateViewMutation.js.map +1 -0
  92. package/dist/components/Explorer/_queries/useExplorerData.d.ts +32 -5
  93. package/dist/components/Explorer/_queries/useExplorerData.js +107 -16
  94. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  95. package/dist/components/Explorer/_types.d.ts +107 -6
  96. package/dist/components/Explorer/_types.js +7 -1
  97. package/dist/components/Explorer/_types.js.map +1 -1
  98. package/dist/components/Explorer/{useEditAction.d.ts → actions-item/useEditItemAction.d.ts} +7 -4
  99. package/dist/components/Explorer/{useEditAction.js → actions-item/useEditItemAction.js} +18 -15
  100. package/dist/components/Explorer/actions-item/useEditItemAction.js.map +1 -0
  101. package/dist/components/Explorer/actions-item/useRemoveItemAction.d.ts +26 -0
  102. package/dist/components/Explorer/actions-item/useRemoveItemAction.js +123 -0
  103. package/dist/components/Explorer/actions-item/useRemoveItemAction.js.map +1 -0
  104. package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +21 -0
  105. package/dist/components/Explorer/actions-item/useReplaceItemAction.js +42 -0
  106. package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -0
  107. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.d.ts +29 -0
  108. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +81 -0
  109. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -0
  110. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.d.ts +19 -0
  111. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +86 -0
  112. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -0
  113. package/dist/components/Explorer/actions-mass/useMassActions.d.ts +27 -0
  114. package/dist/components/Explorer/actions-mass/useMassActions.js +111 -0
  115. package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -0
  116. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.d.ts +32 -0
  117. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +120 -0
  118. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -0
  119. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +21 -0
  120. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +39 -0
  121. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -0
  122. package/dist/components/Explorer/actions-primary/usePrimaryActions.d.ts +17 -0
  123. package/dist/components/Explorer/actions-primary/usePrimaryActions.js +27 -0
  124. package/dist/components/Explorer/actions-primary/usePrimaryActions.js.map +1 -0
  125. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  126. package/dist/components/Explorer/conditionsHelper.js +16 -0
  127. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  128. package/dist/components/Explorer/index.d.ts +1 -5
  129. package/dist/components/Explorer/index.js +1 -5
  130. package/dist/components/Explorer/index.js.map +1 -1
  131. package/dist/components/Explorer/link-item/LinkModal.d.ts +11 -0
  132. package/dist/components/Explorer/link-item/LinkModal.js +32 -0
  133. package/dist/components/Explorer/link-item/LinkModal.js.map +1 -0
  134. package/dist/components/Explorer/link-item/useAddLinkMassAction.d.ts +21 -0
  135. package/dist/components/Explorer/link-item/useAddLinkMassAction.js +34 -0
  136. package/dist/components/Explorer/link-item/useAddLinkMassAction.js.map +1 -0
  137. package/dist/components/Explorer/link-item/useReplaceLinkMassAction.d.ts +23 -0
  138. package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js +35 -0
  139. package/dist/components/Explorer/link-item/useReplaceLinkMassAction.js.map +1 -0
  140. package/dist/components/Explorer/list-saved-views/SavedViews.d.ts +2 -0
  141. package/dist/components/Explorer/list-saved-views/SavedViews.js +88 -0
  142. package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -0
  143. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +1 -1
  144. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +12 -5
  145. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  146. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +6 -0
  147. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +19 -0
  148. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  149. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +13 -0
  150. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +69 -0
  151. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  152. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.d.ts +21 -0
  153. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js +93 -0
  154. package/dist/components/Explorer/manage-view-settings/_shared/useTransformFilters.js.map +1 -0
  155. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  156. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  157. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  158. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  159. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +55 -0
  160. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  161. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  162. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  163. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  164. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  165. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +88 -0
  166. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  167. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  168. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  169. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  170. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  171. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
  172. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  173. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  174. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  175. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  176. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  177. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  178. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  179. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  180. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  181. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  182. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  183. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  184. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  185. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  186. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  187. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  188. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  189. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +40 -0
  190. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  191. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.d.ts +8 -0
  192. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js +41 -0
  193. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropdownContent.js.map +1 -0
  194. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  195. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  196. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  197. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.d.ts +3 -0
  198. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js +79 -0
  199. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/LinkAttributeDropdown.js.map +1 -0
  200. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  201. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
  202. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  203. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  204. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
  205. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  206. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.d.ts +13 -0
  207. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js +2 -0
  208. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/_types.js.map +1 -0
  209. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +12 -0
  210. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +108 -0
  211. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  212. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  213. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  214. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  215. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +3 -1
  216. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +3 -2
  217. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  218. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +8 -0
  219. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +4 -3
  220. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  221. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +4 -4
  222. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  223. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  224. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +12 -0
  225. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +66 -0
  226. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  227. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  228. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +2 -1
  229. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +36 -0
  230. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  231. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.d.ts +9 -0
  232. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js +36 -0
  233. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js.map +1 -0
  234. package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.d.ts +1 -0
  235. package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js +22 -0
  236. package/dist/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.js.map +1 -0
  237. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.d.ts +3 -0
  238. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +24 -0
  239. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -0
  240. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.d.ts +3 -0
  241. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +52 -0
  242. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -0
  243. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.d.ts +5 -0
  244. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +47 -0
  245. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js.map +1 -0
  246. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.d.ts +5 -0
  247. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +48 -0
  248. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js.map +1 -0
  249. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.d.ts +3 -0
  250. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +20 -0
  251. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -0
  252. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.d.ts +3 -0
  253. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +64 -0
  254. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -0
  255. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.d.ts +3 -0
  256. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +65 -0
  257. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -0
  258. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  259. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +111 -0
  260. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  261. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  262. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  263. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  264. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
  265. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +2 -6
  266. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  267. package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
  268. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  269. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +5 -0
  270. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +37 -0
  271. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  272. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +189 -0
  273. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +320 -0
  274. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  275. package/dist/components/Explorer/useColumnWidth.d.ts +8 -0
  276. package/dist/components/Explorer/useColumnWidth.js +49 -0
  277. package/dist/components/Explorer/useColumnWidth.js.map +1 -0
  278. package/dist/components/Explorer/useLoadView.d.ts +3 -0
  279. package/dist/components/Explorer/useLoadView.js +83 -0
  280. package/dist/components/Explorer/useLoadView.js.map +1 -0
  281. package/dist/components/Explorer/usePagination.d.ts +7 -0
  282. package/dist/components/Explorer/usePagination.js +25 -0
  283. package/dist/components/Explorer/usePagination.js.map +1 -0
  284. package/dist/components/Explorer/useSearchInput.d.ts +16 -0
  285. package/dist/components/Explorer/useSearchInput.js +40 -0
  286. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  287. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  288. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  289. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  290. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  291. package/dist/components/Explorer/useViewSettingsReducer.js +136 -0
  292. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  293. package/dist/components/ExportModal/ExportModal.js +2 -2
  294. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  295. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  296. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  297. package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js +1 -2
  298. package/dist/components/ImportModal/ImportModalSelectFileStep/ImportModalSelectFileStep.js.map +1 -1
  299. package/dist/components/LibraryItemsList/DisplayOptions/DisplayOptions.js.map +1 -1
  300. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  301. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  302. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  303. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  304. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
  305. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
  306. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  307. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  308. package/dist/components/LibraryItemsList/MenuView/MenuView.js +5 -10
  309. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  310. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  311. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  312. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  313. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  314. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  315. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  316. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  317. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  318. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  319. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  320. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  321. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  322. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +2 -0
  323. package/dist/components/RecordEdition/EditRecord/EditRecord.js +82 -76
  324. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  325. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.d.ts +3 -1
  326. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +27 -7
  327. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  328. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +17 -22
  329. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  330. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  331. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  332. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  333. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  334. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  335. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  336. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.d.ts +5 -0
  337. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js +28 -0
  338. package/dist/components/RecordEdition/EditRecordContent/hooks/useCreateRecordMutation.js.map +1 -0
  339. package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js +3 -8
  340. package/dist/components/RecordEdition/EditRecordContent/hooks/useExecuteSaveValueBatchMutation.js.map +1 -1
  341. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js +1 -7
  342. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/ValueDetailsBtn.js.map +1 -1
  343. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  344. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +3 -2
  345. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  346. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js +5 -0
  347. package/dist/components/RecordEdition/EditRecordContent/uiElements/FormTabs/FormTabs.js.map +1 -1
  348. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.d.ts +4 -0
  349. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js +53 -0
  350. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/Frame.js.map +1 -0
  351. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/index.d.ts +2 -0
  352. package/dist/components/RecordEdition/{EditRecordSidebar/ValueDetails/ValueInfo → EditRecordContent/uiElements/Frame}/index.js +2 -2
  353. package/dist/components/RecordEdition/EditRecordContent/uiElements/Frame/index.js.map +1 -0
  354. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  355. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  356. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  357. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  358. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  359. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  360. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  361. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  362. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  363. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +16 -0
  364. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  365. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  366. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  367. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  368. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  369. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +205 -185
  370. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  371. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  372. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
  373. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  374. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  375. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +77 -45
  376. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  377. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  378. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +37 -46
  379. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  380. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  381. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +14 -74
  382. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  383. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  384. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +33 -49
  385. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  386. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  387. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +33 -60
  388. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  389. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  390. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +51 -64
  391. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  392. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  393. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -56
  394. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  395. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +16 -9
  396. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +56 -402
  397. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  398. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  399. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
  400. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  401. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  402. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +15 -0
  403. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  404. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  405. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  406. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +56 -0
  407. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  408. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  409. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +33 -0
  410. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  411. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +4 -7
  412. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  413. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  414. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  415. package/dist/components/RecordEdition/EditRecordContent/uiElements/index.js +3 -1
  416. package/dist/components/RecordEdition/EditRecordContent/uiElements/index.js.map +1 -1
  417. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.d.ts +2 -0
  418. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +13 -6
  419. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  420. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +4 -0
  421. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +3 -2
  422. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  423. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.d.ts +7 -0
  424. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js +9 -0
  425. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/AttributeSummary.js.map +1 -0
  426. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.d.ts +2 -0
  427. package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/AttributeDetails → AttributeSummary}/index.js +2 -2
  428. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/index.js.map +1 -0
  429. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.d.ts +2 -0
  430. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js +25 -0
  431. package/dist/components/RecordEdition/EditRecordSidebar/AttributeSummary/useAttributeInformations.js.map +1 -0
  432. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.d.ts +3 -0
  433. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js +53 -0
  434. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/Breadcrumb.js.map +1 -0
  435. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.d.ts +2 -0
  436. package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails → Breacrumb}/index.js +2 -2
  437. package/dist/components/RecordEdition/EditRecordSidebar/Breacrumb/index.js.map +1 -0
  438. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  439. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +48 -6
  440. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  441. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  442. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  443. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  444. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  445. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  446. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  447. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  448. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  449. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  450. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +3 -282
  451. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +28 -61
  452. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  453. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.d.ts +8 -0
  454. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +81 -0
  455. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -0
  456. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.d.ts +2 -0
  457. package/dist/components/RecordEdition/EditRecordSidebar/{ValueDetails/TreeValuePath → ValuesSummary}/index.js +2 -2
  458. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/index.js.map +1 -0
  459. package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.d.ts +1 -1
  460. package/dist/components/RecordEdition/{EditRecordContent → EditRecordSkeleton}/EditRecordSkeleton.js +2 -2
  461. package/dist/components/RecordEdition/EditRecordSkeleton/EditRecordSkeleton.js.map +1 -0
  462. package/dist/components/RecordEdition/EditRecordSkeleton/index.d.ts +2 -0
  463. package/dist/components/RecordEdition/{EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → EditRecordSkeleton}/index.js +2 -1
  464. package/dist/components/RecordEdition/EditRecordSkeleton/index.js.map +1 -0
  465. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.d.ts +12 -10
  466. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js +15 -13
  467. package/dist/components/RecordEdition/editRecordReducer/editRecordReducer.js.map +1 -1
  468. package/dist/components/RecordEdition/index.d.ts +1 -0
  469. package/dist/components/RecordEdition/index.js +1 -0
  470. package/dist/components/RecordEdition/index.js.map +1 -1
  471. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +14 -0
  472. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +83 -0
  473. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -0
  474. package/dist/components/SelectRecordForLinkModal/index.d.ts +1 -0
  475. package/dist/components/{RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata → SelectRecordForLinkModal}/index.js +1 -2
  476. package/dist/components/SelectRecordForLinkModal/index.js.map +1 -0
  477. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  478. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  479. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  480. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  481. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +130 -0
  482. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  483. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  484. package/dist/components/SelectTreeNode/index.js +1 -1
  485. package/dist/components/SelectTreeNode/index.js.map +1 -1
  486. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  487. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  488. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  489. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  490. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  491. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  492. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  493. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  494. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  495. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  496. package/dist/constants.d.ts +3 -0
  497. package/dist/constants.js +3 -0
  498. package/dist/constants.js.map +1 -1
  499. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  500. package/dist/hooks/useDebouncedValue/index.js +5 -0
  501. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  502. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  503. package/dist/hooks/useExecuteSaveViewMutation/index.js +5 -0
  504. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  505. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  506. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +8 -7
  507. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  508. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  509. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  510. package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.d.ts +1 -1
  511. package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js +2 -2
  512. package/dist/hooks/useGetRecordValuesQuery/useGetRecordValuesQuery.js.map +1 -1
  513. package/dist/locales/en/shared.json +122 -18
  514. package/dist/locales/fr/shared.json +125 -21
  515. package/dist/types/views.d.ts +4 -4
  516. package/package.json +9 -7
  517. package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
  518. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
  519. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
  520. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  521. package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
  522. package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -89
  523. package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
  524. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  525. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
  526. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  527. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  528. package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
  529. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  530. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  531. package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
  532. package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.d.ts +0 -2
  533. package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js +0 -12
  534. package/dist/components/Explorer/edit-settings/ViewSetingsContextProvider.js.map +0 -1
  535. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  536. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
  537. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
  538. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
  539. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  540. package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
  541. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  542. package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
  543. package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -43
  544. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -58
  545. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
  546. package/dist/components/Explorer/useCreateAction.d.ts +0 -19
  547. package/dist/components/Explorer/useCreateAction.js +0 -40
  548. package/dist/components/Explorer/useCreateAction.js.map +0 -1
  549. package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
  550. package/dist/components/Explorer/useDeactivateAction.js +0 -51
  551. package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
  552. package/dist/components/Explorer/useEditAction.js.map +0 -1
  553. package/dist/components/Explorer/usePrimaryActions.d.ts +0 -20
  554. package/dist/components/Explorer/usePrimaryActions.js +0 -29
  555. package/dist/components/Explorer/usePrimaryActions.js.map +0 -1
  556. package/dist/components/RecordEdition/EditRecordContent/EditRecordSkeleton.js.map +0 -1
  557. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  558. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
  559. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  560. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  561. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  562. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  563. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  564. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  565. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  566. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
  567. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  568. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
  569. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
  570. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
  571. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  572. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  573. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  574. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  575. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  576. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  577. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  578. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  579. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  580. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  581. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  582. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  583. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  584. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  585. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  586. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  587. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  588. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  589. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  590. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  591. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  592. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  593. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  594. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  595. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  596. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  597. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  598. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  599. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  600. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  601. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  602. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  603. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  604. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  605. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.d.ts +0 -6
  606. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js +0 -56
  607. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/AttributeDetails.js.map +0 -1
  608. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.d.ts +0 -2
  609. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/AttributeDetails/index.js.map +0 -1
  610. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.d.ts +0 -8
  611. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js +0 -41
  612. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/TreeValuePath.js.map +0 -1
  613. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.d.ts +0 -2
  614. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/TreeValuePath/index.js.map +0 -1
  615. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.d.ts +0 -10
  616. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +0 -63
  617. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +0 -1
  618. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.d.ts +0 -2
  619. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js +0 -76
  620. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/ValueInfo.js.map +0 -1
  621. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.d.ts +0 -2
  622. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueInfo/index.js.map +0 -1
  623. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.d.ts +0 -11
  624. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js +0 -43
  625. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/ValueMetadata.js.map +0 -1
  626. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.d.ts +0 -2
  627. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueMetadata/index.js.map +0 -1
  628. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.d.ts +0 -2
  629. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/index.js.map +0 -1
  630. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  631. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
  632. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  633. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  634. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  635. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
  636. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
  637. /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'react';
2
+ interface ISaveViewProps {
3
+ viewData?: Record<string, string> | null;
4
+ isOpen: boolean;
5
+ onSubmit: (label: Record<string, string>, id?: string | undefined) => void;
6
+ onClose: () => void;
7
+ }
8
+ export declare const LabelViewFormModal: FunctionComponent<ISaveViewProps>;
9
+ export {};
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FaTimes, FaSave } from 'react-icons/fa';
3
+ import { KitModal, KitButton, AntForm, KitInputWrapper, KitInput } from 'aristid-ds';
4
+ import { useLang } from '../../../../hooks';
5
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
7
+ const sortWithDefaultAtFirst = defaultLang => (a, b) => (b === defaultLang ? 1 : 0) - (a === defaultLang ? 1 : 0);
8
+ export const LabelViewFormModal = ({ viewData, isOpen, onSubmit, onClose }) => {
9
+ const { t } = useSharedTranslation();
10
+ const { defaultLang, availableLangs } = useLang();
11
+ const { view } = useViewSettingsContext();
12
+ const [form] = AntForm.useForm();
13
+ const initialValues = viewData ? viewData : view.viewId ? view.viewLabels : {};
14
+ const _toggleModal = () => {
15
+ onClose();
16
+ };
17
+ const _handleSaveView = () => {
18
+ form.submit();
19
+ };
20
+ const _onSubmit = values => {
21
+ onSubmit(values);
22
+ onClose();
23
+ };
24
+ const _preventCloseSettingsPanel = e => e.stopPropagation();
25
+ return (_jsx(KitModal
26
+ // TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
27
+ , {
28
+ // TODO: remove appElement and put in the test : "KitModal.setAppElement(document.body) once exposed"
29
+ appElement: document.body, title: t('explorer.viewList.save-view-as'), showCloseIcon: false, close: _toggleModal, isOpen: isOpen, footer: _jsxs(_Fragment, { children: [_jsx(KitButton, { type: "secondary", onClick: _toggleModal, icon: _jsx(FaTimes, {}), children: t('global.close') }), _jsx(KitButton, { type: "primary", onClick: _handleSaveView, icon: _jsx(FaSave, {}), children: t('global.save') })] }), children: _jsx(AntForm, { name: "label", form: form, initialValues: initialValues, onFinish: _onSubmit, children: _jsx(KitInputWrapper, { label: String(t('explorer.viewList.view-name')), children: [...availableLangs].sort(sortWithDefaultAtFirst(defaultLang)).map(lang => (_jsx(AntForm.Item, { name: lang, validateTrigger: "onBlur", rules: [
30
+ {
31
+ required: lang === defaultLang,
32
+ message: String(t('errors.standard_field_required'))
33
+ }
34
+ ], children: _jsx(KitInput, { label: lang, required: lang === defaultLang, onMouseDown: _preventCloseSettingsPanel }) }, lang))) }) }) }));
35
+ };
36
+ //# sourceMappingURL=LabelViewFormModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LabelViewFormModal.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACnF,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AASrF,MAAM,sBAAsB,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAElH,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAC,EAAE,EAAE;IAC3G,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,WAAW,EAAE,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IAChD,MAAM,EAAC,IAAI,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAExC,MAAM,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CA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AAI,IAET,IAAI,EAAE,IAAI,EACV,eAAe,EAAC,QAAQ,EACxB,KAAK,EAAE;wBACH;4BACI,QAAQ,EAAE,IAAI,KAAK,WAAW;4BAC9B,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC;yBACvD;qBACJ,YAED,KAAC,QAAQ,IACL,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,IAAI,KAAK,WAAW,EAC9B,WAAW,EAAE,0BAA0B,GACzC,IAdG,IAAI,CAeE,CAClB,CAAC,GACY,GACZ,GACH,CACd,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const ViewActionsButtons: () => JSX.Element;
@@ -0,0 +1,22 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useCreateNewView } from './useCreateNewView';
6
+ import styled from 'styled-components';
7
+ import { useUpdateView } from './useUpdateView';
8
+ import { useResetView } from './useResetView';
9
+ import { useShareView } from './useShareView';
10
+ const StyledFooter = styled.footer `
11
+ display: flex;
12
+ flex-direction: column;
13
+ padding-bottom: calc(var(--general-spacing-xs) * 1px);
14
+ `;
15
+ export const ViewActionsButtons = () => {
16
+ const { updateViewButton } = useUpdateView();
17
+ const { createNewViewButton } = useCreateNewView();
18
+ const { shareViewButton } = useShareView();
19
+ const { resetViewButton } = useResetView();
20
+ return (_jsxs(StyledFooter, { children: [updateViewButton, createNewViewButton, shareViewButton, resetViewButton] }));
21
+ };
22
+ //# sourceMappingURL=ViewActionsButtons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewActionsButtons.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/ViewActionsButtons.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;;;;CAIjC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAC,gBAAgB,EAAC,GAAG,aAAa,EAAE,CAAC;IAC3C,MAAM,EAAC,mBAAmB,EAAC,GAAG,gBAAgB,EAAE,CAAC;IACjD,MAAM,EAAC,eAAe,EAAC,GAAG,YAAY,EAAE,CAAC;IACzC,MAAM,EAAC,eAAe,EAAC,GAAG,YAAY,EAAE,CAAC;IAEzC,OAAO,CACH,MAAC,YAAY,eACR,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,eAAe,IACL,CAClB,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ViewInput } from '../../../../_gqlTypes';
2
+ import { IViewSettingsState } from '../store-view-settings/viewSettingsReducer';
3
+ export declare const prepareViewForRequest: (view: IViewSettingsState, label: Record<string, string>) => ViewInput;
@@ -0,0 +1,24 @@
1
+ import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
2
+ import { isExplorerFilterThrough } from '../../_types';
3
+ export const prepareViewForRequest = (view, label) => ({
4
+ library: view.libraryId,
5
+ shared: false,
6
+ display: {
7
+ type: mapViewTypeFromExplorerToLegacy[view.viewType]
8
+ },
9
+ filters: view.filters.map(filter => isExplorerFilterThrough(filter)
10
+ ? {
11
+ field: `${filter.field}.${filter.subField}`,
12
+ value: filter.value,
13
+ condition: filter.subCondition
14
+ }
15
+ : {
16
+ field: filter.field,
17
+ value: filter.value,
18
+ condition: filter.condition
19
+ }),
20
+ sort: view.sort.map(({ field, order }) => ({ field, order })),
21
+ attributes: view.attributesIds,
22
+ label
23
+ });
24
+ //# sourceMappingURL=prepareViewForRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepareViewForRequest.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,+BAA+B,EAAC,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAGrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAwB,EAAE,KAA6B,EAAa,EAAE,CAAC,CAAC;IAC1G,OAAO,EAAE,IAAI,CAAC,SAAS;IACvB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE;QACL,IAAI,EAAE,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC;KACvD;IACD,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC/B,uBAAuB,CAAC,MAAM,CAAC;QAC3B,CAAC,CAAC;YACI,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE;YAC3C,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,YAAY;SACjC;QACH,CAAC,CAAC;YACI,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,SAAS;SAC9B,CACV;IACD,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,KAAK,EAAC,CAAC,CAAC;IACzD,UAAU,EAAE,IAAI,CAAC,aAAa;IAC9B,KAAK;CACR,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const useCreateNewView: () => {
2
+ createNewViewButton: JSX.Element;
3
+ };
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useState } from 'react';
6
+ import { LabelViewFormModal } from './LabelViewFormModal';
7
+ import { KitButton } from 'aristid-ds';
8
+ import { FaSdCard } from 'react-icons/fa';
9
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
10
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
11
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
12
+ import useExecuteSaveViewMutation from '../../../../hooks/useExecuteSaveViewMutation';
13
+ import { prepareViewForRequest } from './prepareViewForRequest';
14
+ import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
15
+ import { useTransformFilters } from '../_shared/useTransformFilters';
16
+ export const useCreateNewView = () => {
17
+ const { t } = useSharedTranslation();
18
+ const { toValidFilters } = useTransformFilters();
19
+ const { view, dispatch } = useViewSettingsContext();
20
+ const { saveView } = useExecuteSaveViewMutation();
21
+ const [isModalOpen, setIsModalOpen] = useState(false);
22
+ const _toggleModal = () => {
23
+ setIsModalOpen(!isModalOpen);
24
+ };
25
+ const _createView = async (label) => {
26
+ const mappedView = prepareViewForRequest(view, label);
27
+ const { data } = await saveView({
28
+ view: mappedView
29
+ });
30
+ if (data) {
31
+ dispatch({
32
+ type: ViewSettingsActionTypes.UPDATE_VIEWS,
33
+ payload: {
34
+ id: data.saveView.id,
35
+ ownerId: data.saveView.created_by.id,
36
+ label: data.saveView.label,
37
+ shared: data.saveView.shared,
38
+ filters: toValidFilters(data.saveView.filters),
39
+ sort: data.saveView.sort ?? [],
40
+ display: data.saveView.display ?? {
41
+ type: mapViewTypeFromExplorerToLegacy[view.viewType]
42
+ },
43
+ attributes: data.saveView?.attributes?.map(({ id }) => id) ?? []
44
+ }
45
+ });
46
+ }
47
+ };
48
+ return {
49
+ createNewViewButton: (_jsxs(_Fragment, { children: [_jsx(LabelViewFormModal, { isOpen: isModalOpen, onSubmit: _createView, onClose: _toggleModal }), _jsx(KitButton, { type: "action", icon: _jsx(FaSdCard, {}), onClick: _toggleModal, children: t('explorer.viewList.save-view-as') })] }))
50
+ };
51
+ };
52
+ //# sourceMappingURL=useCreateNewView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateNewView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useCreateNewView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,+BAA+B,EAAC,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;AAEnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACjC,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,cAAc,EAAC,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,EAAC,I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J,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,mBAAmB,EAAE,CACjB,8BACI,KAAC,kBAAkB,IAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAI,EACzF,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,QAAQ,KAAG,EAAE,OAAO,EAAE,YAAY,YAC7D,CAAC,CAAC,gCAAgC,CAAC,GAC5B,IACb,CACN;KACJ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IUserView } from '../../_types';
2
+ export declare const useDeleteView: () => {
3
+ iconDelete: (viewItem: IUserView) => JSX.Element;
4
+ deleteModal: JSX.Element;
5
+ };
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
+ import { KitButton, KitModal, KitTypography } from 'aristid-ds';
7
+ import { FaTimes, FaTrash } from 'react-icons/fa';
8
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
9
+ import { useState } from 'react';
10
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
11
+ import useExecuteDeleteViewMutation from '../../../../hooks/useExecuteDeleteViewMutation/useExecuteDeleteViewMutation';
12
+ import { localizedTranslation } from '@leav/utils';
13
+ import { useLang } from '../../../../hooks';
14
+ import styled from 'styled-components';
15
+ const StyledButton = styled.button `
16
+ all: unset;
17
+ `;
18
+ export const useDeleteView = () => {
19
+ const { t } = useSharedTranslation();
20
+ const { availableLangs } = useLang();
21
+ const { deleteView } = useExecuteDeleteViewMutation();
22
+ const { dispatch } = useViewSettingsContext();
23
+ const [dataViewOnAction, setDataViewOnAction] = useState({ id: null, label: null });
24
+ const _onDeleteConfirm = async () => {
25
+ if (!dataViewOnAction.id) {
26
+ return;
27
+ }
28
+ const { data } = await deleteView(dataViewOnAction.id);
29
+ if (data) {
30
+ dispatch({
31
+ type: ViewSettingsActionTypes.DELETE_VIEW,
32
+ payload: {
33
+ id: dataViewOnAction.id
34
+ }
35
+ });
36
+ }
37
+ setDataViewOnAction({ id: null, label: null });
38
+ };
39
+ const iconDelete = (viewItem) => (_jsx(StyledButton, { className: "delete", title: t('explorer.viewList.delete-view'), onClick: () => {
40
+ setDataViewOnAction({ id: viewItem.id, label: viewItem.label });
41
+ }, children: _jsx(FaTrash, {}) }));
42
+ return {
43
+ iconDelete,
44
+ deleteModal: dataViewOnAction.id && dataViewOnAction.label && (_jsx(KitModal, { appElement: document.body, title: t('explorer.viewList.confirm-delete-view'), isOpen: !!dataViewOnAction.id && !!dataViewOnAction.label, footer: _jsxs(_Fragment, { children: [_jsx(KitButton, { type: "secondary", onClick: () => setDataViewOnAction({ id: null, label: null }), icon: _jsx(FaTimes, {}), children: t('global.close') }), _jsx(KitButton, { type: "primary", danger: true, onClick: _onDeleteConfirm, icon: _jsx(FaTrash, {}), children: t('global.delete') })] }), children: _jsx(KitTypography.Text, { size: "fontSize3", weight: "medium", children: localizedTranslation(dataViewOnAction.label, availableLangs) }) }))
45
+ };
46
+ };
47
+ //# sourceMappingURL=useDeleteView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeleteView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useDeleteView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAC,OAAO,EAAE,OAAO,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,EAAE,cAAc,CAAC,GAC5C,GACd,CACd;KACJ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IUserView } from '../../_types';
2
+ export declare const useEditLabelView: () => {
3
+ iconEditLabel: (viewItem: IUserView) => JSX.Element;
4
+ editViewModal: JSX.Element;
5
+ };
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { FaEdit } from 'react-icons/fa';
6
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
7
+ import { useState } from 'react';
8
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
9
+ import useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMutation';
10
+ import { LabelViewFormModal } from './LabelViewFormModal';
11
+ import styled from 'styled-components';
12
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
13
+ const StyledButton = styled.button `
14
+ all: unset;
15
+ `;
16
+ export const useEditLabelView = () => {
17
+ const { t } = useSharedTranslation();
18
+ const { updateView } = useExecuteUpdateViewMutation();
19
+ const { dispatch } = useViewSettingsContext();
20
+ const [dataViewOnAction, setDataViewOnAction] = useState({ id: null, label: null });
21
+ const _onEditLabel = async (label) => {
22
+ if (!dataViewOnAction.id) {
23
+ return;
24
+ }
25
+ const mappedView = {
26
+ id: dataViewOnAction.id,
27
+ label
28
+ };
29
+ const { data } = await updateView({
30
+ view: mappedView
31
+ });
32
+ if (data) {
33
+ dispatch({
34
+ type: ViewSettingsActionTypes.RENAME_VIEW,
35
+ payload: {
36
+ id: data.updateView.id,
37
+ label: data.updateView.label
38
+ }
39
+ });
40
+ }
41
+ };
42
+ const iconEditLabel = (viewItem) => (_jsx(StyledButton, { className: "edit", title: t('explorer.viewList.edit-view'), onClick: () => setDataViewOnAction({ id: viewItem.id, label: viewItem.label }), children: _jsx(FaEdit, {}) }));
43
+ return {
44
+ iconEditLabel,
45
+ editViewModal: dataViewOnAction.id && dataViewOnAction.label && (_jsx(LabelViewFormModal, { viewData: dataViewOnAction.label, isOpen: true, onSubmit: _onEditLabel, onClose: () => setDataViewOnAction({ id: null, label: null }) }))
46
+ };
47
+ };
48
+ //# sourceMappingURL=useEditLabelView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEditLabelView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useEditLabelView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AAEnF,OAAO,4BAA4B,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;;CAEjC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACjC,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,UAAU,EAAC,GAAG,4BAA4B,EAAE,CAAC;IACpD,MAAM,EAAC,QAAQ,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAC5C,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAoB,EAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;IA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-0,0 +1,3 @@
1
+ export declare const useResetView: () => {
2
+ resetViewButton: JSX.Element;
3
+ };
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { KitButton } from 'aristid-ds';
6
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
7
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
8
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
9
+ import { FaUndo } from 'react-icons/fa';
10
+ export const useResetView = () => {
11
+ const { t } = useSharedTranslation();
12
+ const { dispatch } = useViewSettingsContext();
13
+ const _resetView = () => {
14
+ dispatch({ type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS });
15
+ };
16
+ return {
17
+ resetViewButton: (_jsx(KitButton, { type: "action", icon: _jsx(FaUndo, {}), onClick: _resetView, children: t('explorer.viewList.reinit-view') }))
18
+ };
19
+ };
20
+ //# sourceMappingURL=useResetView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResetView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useResetView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAEtC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,QAAQ,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAE5C,MAAM,UAAU,GAAG,GAAG,EAAE;QACpB,QAAQ,CAAC,EAAC,IAAI,EAAE,uBAAuB,CAAC,6BAA6B,EAAC,CAAC,CAAC;IAC5E,CAAC,CAAC;IAEF,OAAO;QACH,eAAe,EAAE,CACb,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,MAAM,KAAG,EAAE,OAAO,EAAE,UAAU,YACzD,CAAC,CAAC,+BAA+B,CAAC,GAC3B,CACf;KACJ,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const useShareView: () => {
2
+ shareViewButton: JSX.Element;
3
+ };
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
+ import { KitButton } from 'aristid-ds';
7
+ import { FaShare } from 'react-icons/fa';
8
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
9
+ import { useEffect, useState } from 'react';
10
+ import useExecuteSaveViewMutation from '../../../../hooks/useExecuteSaveViewMutation';
11
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
12
+ import { prepareViewForRequest } from './prepareViewForRequest';
13
+ import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
14
+ import { useTransformFilters } from '../_shared/useTransformFilters';
15
+ import { useMeQuery } from '../../../../_gqlTypes';
16
+ export const useShareView = () => {
17
+ const { t } = useSharedTranslation();
18
+ const { view, dispatch } = useViewSettingsContext();
19
+ const { saveView } = useExecuteSaveViewMutation();
20
+ const { toValidFilters } = useTransformFilters();
21
+ const [isSharedView, setIsSharedView] = useState(false);
22
+ const [isOwnerView, setIsOwnerView] = useState(false);
23
+ const { data: userData } = useMeQuery();
24
+ useEffect(() => {
25
+ const currentView = view.savedViews.find(v => v.id === view.viewId);
26
+ if (currentView === undefined) {
27
+ return;
28
+ }
29
+ setIsSharedView(currentView.shared ?? false);
30
+ setIsOwnerView(currentView.ownerId === userData?.me?.whoAmI?.id);
31
+ }, [view.viewId]);
32
+ const _toggleShareView = async () => {
33
+ const mappedView = {
34
+ ...prepareViewForRequest(view, view.viewLabels),
35
+ shared: !isSharedView,
36
+ id: view.viewId
37
+ };
38
+ const { data } = await saveView({
39
+ view: mappedView
40
+ });
41
+ setIsSharedView(!isSharedView);
42
+ if (data) {
43
+ dispatch({
44
+ type: ViewSettingsActionTypes.UPDATE_VIEWS,
45
+ payload: {
46
+ id: data.saveView.id,
47
+ ownerId: data.saveView.created_by.id,
48
+ label: data.saveView.label,
49
+ shared: data.saveView.shared,
50
+ filters: toValidFilters(data.saveView.filters),
51
+ sort: data.saveView.sort ?? [],
52
+ display: data.saveView.display ?? {
53
+ type: mapViewTypeFromExplorerToLegacy[view.viewType]
54
+ },
55
+ attributes: data.saveView?.attributes?.map(({ id }) => id) ?? []
56
+ }
57
+ });
58
+ }
59
+ };
60
+ return {
61
+ shareViewButton: !view.viewId || (isSharedView && !isOwnerView) ? null : (_jsx(KitButton, { type: "action", icon: _jsx(FaShare, {}), onClick: _toggleShareView, children: isSharedView ? t('explorer.viewList.unshare-view') : t('explorer.viewList.share-view') }))
62
+ };
63
+ };
64
+ //# sourceMappingURL=useShareView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShareView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useShareView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAA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C,EAAE,CAAC,IAAI,EAAE;iBACjE;aACJ,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,eAAe,EACX,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,YAAY,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpD,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,OAAO,EAAE,gBAAgB,YAChE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,GAC/E,CACf;KACR,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const useUpdateView: () => {
2
+ updateViewButton: JSX.Element;
3
+ };
@@ -0,0 +1,65 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { KitButton } from 'aristid-ds';
6
+ import { FaSave } from 'react-icons/fa';
7
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
8
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
9
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
10
+ import useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMutation';
11
+ import { prepareViewForRequest } from './prepareViewForRequest';
12
+ import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
13
+ import { useTransformFilters } from '../_shared/useTransformFilters';
14
+ import { useEffect, useRef, useState } from 'react';
15
+ import { useMeQuery } from '../../../../_gqlTypes';
16
+ export const useUpdateView = () => {
17
+ const { t } = useSharedTranslation();
18
+ const { toValidFilters } = useTransformFilters();
19
+ const { view, dispatch } = useViewSettingsContext();
20
+ const { updateView } = useExecuteUpdateViewMutation();
21
+ const [isOwnerView, setIsOwnerView] = useState(false);
22
+ const currentView = useRef();
23
+ const { data: userData } = useMeQuery();
24
+ useEffect(() => {
25
+ currentView.current = view.savedViews.find(v => v.id === view.viewId);
26
+ if (currentView.current === undefined) {
27
+ return;
28
+ }
29
+ setIsOwnerView(currentView.current.ownerId === userData?.me?.whoAmI?.id);
30
+ }, [view.viewId]);
31
+ const _updateView = async () => {
32
+ if (!view.viewId) {
33
+ return;
34
+ }
35
+ const mappedView = {
36
+ ...prepareViewForRequest(view, view.viewLabels),
37
+ id: view.viewId,
38
+ shared: currentView.current?.shared ?? false
39
+ };
40
+ const { data } = await updateView({
41
+ view: mappedView
42
+ });
43
+ if (data) {
44
+ dispatch({
45
+ type: ViewSettingsActionTypes.UPDATE_VIEWS,
46
+ payload: {
47
+ id: data.updateView.id,
48
+ ownerId: data.updateView.created_by.id,
49
+ label: data.updateView.label,
50
+ shared: data.updateView.shared,
51
+ filters: toValidFilters(data.updateView.filters),
52
+ sort: data.updateView.sort ?? [],
53
+ display: data.updateView.display ?? {
54
+ type: mapViewTypeFromExplorerToLegacy[view.viewType]
55
+ },
56
+ attributes: data.updateView?.attributes?.map(({ id }) => id) ?? []
57
+ }
58
+ });
59
+ }
60
+ };
61
+ return {
62
+ updateViewButton: !view.viewId || !view.savedViews.length || !isOwnerView ? null : (_jsx(KitButton, { type: "action", icon: _jsx(FaSave, {}), onClick: _updateView, children: t('global.save') }))
63
+ };
64
+ };
65
+ //# sourceMappingURL=useUpdateView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdateView.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/save-view/useUpdateView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,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C,IAAI,EAAE;iBACnE;aACJ,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACH,gBAAgB,EACZ,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC7D,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,MAAM,KAAG,EAAE,OAAO,EAAE,WAAW,YAC1D,CAAC,CAAC,aAAa,CAAC,GACT,CACf;KACR,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const SortItems: FunctionComponent<{
3
+ libraryId: string;
4
+ }>;
@@ -0,0 +1,111 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
3
+ import { KitInput, KitTypography } from 'aristid-ds';
4
+ import styled from 'styled-components';
5
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
+ import { SortOrder } from '../../../../_gqlTypes';
7
+ import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
8
+ import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
9
+ import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
10
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
11
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
12
+ import { SortListItem } from './SortListItem';
13
+ const StyledListContainer = styled.div `
14
+ display: flex;
15
+ flex-direction: column;
16
+ `;
17
+ const StyledList = styled.ul `
18
+ padding: calc(var(--general-spacing-s) * 1px) 0;
19
+ margin: 0;
20
+ list-style: none;
21
+ color: var(--general-utilities-text-primary);
22
+ `;
23
+ const StyledEyeSlash = styled(FaEyeSlash) `
24
+ color: var(--general-utilities-neutral-dark);
25
+ `;
26
+ const StyledFaEye = styled(FaEye) `
27
+ color: var(--general-utilities-neutral-deepDark);
28
+ `;
29
+ export const SortItems = ({ libraryId }) => {
30
+ const { t } = useSharedTranslation();
31
+ const { view, dispatch } = useViewSettingsContext();
32
+ const { onSearchChanged, searchFilteredColumnsIds, attributeDetailsById } = useAttributeDetailsData(libraryId);
33
+ const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
34
+ coordinateGetter: sortableKeyboardCoordinates
35
+ }));
36
+ const _toggleColumnVisibility = (field) => () => {
37
+ const isAttributeAlreadySorting = view.sort.some(sortItem => sortItem.field === field);
38
+ if (isAttributeAlreadySorting) {
39
+ dispatch({
40
+ type: ViewSettingsActionTypes.REMOVE_SORT,
41
+ payload: {
42
+ field
43
+ }
44
+ });
45
+ }
46
+ else {
47
+ dispatch({
48
+ type: ViewSettingsActionTypes.ADD_SORT,
49
+ payload: {
50
+ order: SortOrder.asc,
51
+ field
52
+ }
53
+ });
54
+ }
55
+ };
56
+ const _changeOrderActiveFilterTo = (field) => (order) => dispatch({
57
+ type: ViewSettingsActionTypes.CHANGE_SORT_ORDER,
58
+ payload: {
59
+ field,
60
+ order
61
+ }
62
+ });
63
+ const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
64
+ const indexFrom = activeFilters.findIndex(({ field }) => field === String(draggedElement.id));
65
+ const indexTo = activeFilters.findIndex(({ field }) => field === String(dropTarget?.id));
66
+ if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
67
+ return;
68
+ }
69
+ dispatch({ type: ViewSettingsActionTypes.MOVE_SORT, payload: { indexFrom, indexTo } });
70
+ };
71
+ const activeFilters = view.sort.filter(({ field }) => searchFilteredColumnsIds.includes(field));
72
+ const inactiveFilters = searchFilteredColumnsIds.filter(field => view.sort.every(sortItem => sortItem.field !== field));
73
+ return (_jsxs(StyledListContainer, { children: [activeFilters.length > 0 && (_jsx(StyledList, { "aria-label": t('explorer.sort-list.active'), children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsx(SortableContext, { items: activeFilters.map(({ field }) => ({ id: field })), strategy: verticalListSortingStrategy, children: activeFilters.map(({ field, order }) => (_jsx(SortListItem, { attributeId: field, isDraggable: true, filterChipProps: {
74
+ label: attributeDetailsById[field].label,
75
+ values: [
76
+ order === SortOrder.asc
77
+ ? t('explorer.sort-ascending')
78
+ : t('explorer.sort-descending')
79
+ ],
80
+ expandable: true,
81
+ dropDownProps: {
82
+ menu: {
83
+ selectable: true,
84
+ selectedKeys: [order],
85
+ items: [
86
+ {
87
+ key: SortOrder.asc,
88
+ label: t('explorer.sort-ascending')
89
+ },
90
+ {
91
+ key: SortOrder.desc,
92
+ label: t('explorer.sort-descending')
93
+ }
94
+ ],
95
+ onSelect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(field)(newOrder),
96
+ onDeselect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(field)(newOrder)
97
+ }
98
+ }
99
+ }, visibilityButtonProps: {
100
+ icon: _jsx(StyledFaEye, {}),
101
+ title: String(t('explorer.hide')),
102
+ onClick: _toggleColumnVisibility(field)
103
+ } }, field))) }) }) })), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.available-attributes') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FaSearch, {}) }), _jsx(StyledList, { "aria-label": t('explorer.sort-list.inactive'), children: inactiveFilters.map(field => (_jsx(SortListItem, { attributeId: field, filterChipProps: {
104
+ label: attributeDetailsById[field].label
105
+ }, visibilityButtonProps: {
106
+ icon: _jsx(StyledEyeSlash, {}),
107
+ title: String(t('explorer.show')),
108
+ onClick: _toggleColumnVisibility(field)
109
+ } }, field))) })] }));
110
+ };
111
+ //# sourceMappingURL=SortItems.js.map