@leav/ui 1.6.0-fb9dc9ec → 1.7.0-178015c1

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 (273) hide show
  1. package/README.md +13 -12
  2. package/dist/__mocks__/react-i18next.d.ts +1 -1
  3. package/dist/_gqlTypes/index.d.ts +1006 -686
  4. package/dist/_gqlTypes/index.js +167 -43
  5. package/dist/_gqlTypes/index.js.map +1 -1
  6. package/dist/_queries/attributes/attributeDetailsFragment.js +5 -0
  7. package/dist/_queries/attributes/attributeDetailsFragment.js.map +1 -1
  8. package/dist/_queries/trees/treeNodeChildrenQuery.js +2 -0
  9. package/dist/_queries/trees/treeNodeChildrenQuery.js.map +1 -1
  10. package/dist/_queries/views/viewDetailsFragment.js +1 -0
  11. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  12. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js +20 -12
  13. package/dist/components/AttributesSelectionList/SelectedAttributesList/SelectedAttributesList.js.map +1 -1
  14. package/dist/components/AttributesSelectionList/reducer/__mocks__/attributesSelectionListStateContext.d.ts +1 -1
  15. package/dist/components/AttributesSelectionList/sharedComponents.d.ts +159 -153
  16. package/dist/components/Explorer/DataView.d.ts +2 -0
  17. package/dist/components/Explorer/DataView.js +6 -3
  18. package/dist/components/Explorer/DataView.js.map +1 -1
  19. package/dist/components/Explorer/Explorer.d.ts +2 -0
  20. package/dist/components/Explorer/Explorer.js +7 -5
  21. package/dist/components/Explorer/Explorer.js.map +1 -1
  22. package/dist/components/Explorer/ExplorerFiltersAndSorts.js +1 -1
  23. package/dist/components/Explorer/ExplorerFiltersAndSorts.js.map +1 -1
  24. package/dist/components/Explorer/TableCell.js +6 -7
  25. package/dist/components/Explorer/TableCell.js.map +1 -1
  26. package/dist/components/Explorer/TableNameCell.js +3 -2
  27. package/dist/components/Explorer/TableNameCell.js.map +1 -1
  28. package/dist/components/Explorer/_queries/useExplorerData.d.ts +7 -7
  29. package/dist/components/Explorer/actions-item/useEditStatusItemAction.js +3 -2
  30. package/dist/components/Explorer/actions-item/useEditStatusItemAction.js.map +1 -1
  31. package/dist/components/Explorer/actions-item/useReplaceItemAction.d.ts +2 -1
  32. package/dist/components/Explorer/actions-item/useReplaceItemAction.js +5 -4
  33. package/dist/components/Explorer/actions-item/useReplaceItemAction.js.map +1 -1
  34. package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.d.ts +2 -4
  35. package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js +18 -16
  36. package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValueLine.js.map +1 -1
  37. package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js +2 -2
  38. package/dist/components/Explorer/actions-mass/edit-attribute/EditTreeAttributeValuesMapping.js.map +1 -1
  39. package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js +9 -1
  40. package/dist/components/Explorer/actions-mass/edit-attribute/useListEditableAttributeHook.js.map +1 -1
  41. package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.d.ts +10 -3
  42. package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js +16 -6
  43. package/dist/components/Explorer/actions-mass/edit-attribute/useListTreeAttributeValuesHook.js.map +1 -1
  44. package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.d.ts +10 -0
  45. package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.js +46 -0
  46. package/dist/components/Explorer/actions-mass/export/ExportProfileSelectionModal.js.map +1 -0
  47. package/dist/components/Explorer/actions-mass/export/content/NoProfiles.d.ts +1 -0
  48. package/dist/components/Explorer/actions-mass/export/content/NoProfiles.js +17 -0
  49. package/dist/components/Explorer/actions-mass/export/content/NoProfiles.js.map +1 -0
  50. package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.d.ts +8 -0
  51. package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.js +49 -0
  52. package/dist/components/Explorer/actions-mass/export/content/ProfilesSelection.js.map +1 -0
  53. package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.d.ts +27 -0
  54. package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.js +48 -0
  55. package/dist/components/Explorer/actions-mass/export/useGetLibraryExportProfiles.js.map +1 -0
  56. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js +3 -2
  57. package/dist/components/Explorer/actions-mass/useDeactivateMassAction.js.map +1 -1
  58. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js +3 -2
  59. package/dist/components/Explorer/actions-mass/useDeleteLinkValues.js.map +1 -1
  60. package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js +3 -2
  61. package/dist/components/Explorer/actions-mass/useEditAttributeMassAction.js.map +1 -1
  62. package/dist/components/Explorer/actions-mass/useExportMassAction.d.ts +7 -4
  63. package/dist/components/Explorer/actions-mass/useExportMassAction.js +80 -73
  64. package/dist/components/Explorer/actions-mass/useExportMassAction.js.map +1 -1
  65. package/dist/components/Explorer/actions-mass/useMassActions.js +3 -2
  66. package/dist/components/Explorer/actions-mass/useMassActions.js.map +1 -1
  67. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js +3 -2
  68. package/dist/components/Explorer/actions-primary/useCreatePrimaryAction.js.map +1 -1
  69. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.d.ts +2 -1
  70. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js +5 -4
  71. package/dist/components/Explorer/actions-primary/useLinkPrimaryAction.js.map +1 -1
  72. package/dist/components/Explorer/link-item/LinkModal.d.ts +1 -0
  73. package/dist/components/Explorer/link-item/LinkModal.js +2 -2
  74. package/dist/components/Explorer/link-item/LinkModal.js.map +1 -1
  75. package/dist/components/Explorer/list-saved-views/SavedViews.js +4 -3
  76. package/dist/components/Explorer/list-saved-views/SavedViews.js.map +1 -1
  77. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +5 -8
  78. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -1
  79. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +3 -2
  80. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -1
  81. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +7 -6
  82. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
  83. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +3 -2
  84. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -1
  85. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +4 -3
  86. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
  87. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js +3 -2
  88. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -1
  89. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +3 -2
  90. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
  91. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js +3 -2
  92. package/dist/components/Explorer/manage-view-settings/save-view/LabelViewFormModal.js.map +1 -1
  93. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js +3 -0
  94. package/dist/components/Explorer/manage-view-settings/save-view/prepareViewForRequest.js.map +1 -1
  95. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js +3 -2
  96. package/dist/components/Explorer/manage-view-settings/save-view/useCreateNewView.js.map +1 -1
  97. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js +4 -3
  98. package/dist/components/Explorer/manage-view-settings/save-view/useDeleteView.js.map +1 -1
  99. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js +3 -2
  100. package/dist/components/Explorer/manage-view-settings/save-view/useEditLabelView.js.map +1 -1
  101. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js +3 -2
  102. package/dist/components/Explorer/manage-view-settings/save-view/useResetView.js.map +1 -1
  103. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js +3 -2
  104. package/dist/components/Explorer/manage-view-settings/save-view/useShareView.js.map +1 -1
  105. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js +3 -2
  106. package/dist/components/Explorer/manage-view-settings/save-view/useUpdateView.js.map +1 -1
  107. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +7 -6
  108. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
  109. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +3 -2
  110. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -1
  111. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
  112. package/dist/components/Explorer/useSearchInput.js +6 -2
  113. package/dist/components/Explorer/useSearchInput.js.map +1 -1
  114. package/dist/components/Filters/FiltersProvider.d.ts +2 -2
  115. package/dist/components/Filters/FiltersProvider.js.map +1 -1
  116. package/dist/components/Filters/_types.d.ts +3 -0
  117. package/dist/components/Filters/_types.js.map +1 -1
  118. package/dist/components/Filters/context/filtersReducer.js +7 -4
  119. package/dist/components/Filters/context/filtersReducer.js.map +1 -1
  120. package/dist/components/Filters/filter-items/CommonFilterItem.d.ts +1 -0
  121. package/dist/components/Filters/filter-items/CommonFilterItem.js +28 -8
  122. package/dist/components/Filters/filter-items/CommonFilterItem.js.map +1 -1
  123. package/dist/components/Filters/filter-items/EmptyValueCheckbox.d.ts +8 -0
  124. package/dist/components/Filters/filter-items/EmptyValueCheckbox.js +16 -0
  125. package/dist/components/Filters/filter-items/EmptyValueCheckbox.js.map +1 -0
  126. package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js +23 -9
  127. package/dist/components/Filters/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -1
  128. package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js +9 -8
  129. package/dist/components/Filters/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -1
  130. package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js +4 -3
  131. package/dist/components/Filters/filter-items/filter-type/FilterDropDown.js.map +1 -1
  132. package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js +1 -1
  133. package/dist/components/Filters/filter-items/filter-type/FilterDropdownContent.js.map +1 -1
  134. package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.d.ts +0 -1
  135. package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js +17 -23
  136. package/dist/components/Filters/filter-items/filter-type/FilterValueListDropDown.js.map +1 -1
  137. package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js +10 -12
  138. package/dist/components/Filters/filter-items/filter-type/TreeAttributeDropDown.js.map +1 -1
  139. package/dist/components/Filters/filter-items/filter-type/useConditionOptionsByType.js +3 -13
  140. package/dist/components/Filters/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
  141. package/dist/components/Filters/index.d.ts +1 -0
  142. package/dist/components/Filters/index.js +1 -0
  143. package/dist/components/Filters/index.js.map +1 -1
  144. package/dist/components/Filters/prepareFiltersForRequest.js +36 -3
  145. package/dist/components/Filters/prepareFiltersForRequest.js.map +1 -1
  146. package/dist/components/Filters/useFilters.d.ts +5 -0
  147. package/dist/components/Filters/useTransformFilters.js +4 -0
  148. package/dist/components/Filters/useTransformFilters.js.map +1 -1
  149. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.d.ts +1 -3
  150. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +6 -2
  151. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  152. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js +1 -8
  153. package/dist/components/LibraryItemsList/FiltersPanel/FiltersOptions.js.map +1 -1
  154. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js +15 -17
  155. package/dist/components/LibraryItemsList/FiltersPanel/FiltersPanel.js.map +1 -1
  156. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js +0 -6
  157. package/dist/components/LibraryItemsList/LibraryItemsListTable/ChooseTableColumns/ChooseTableColumns.js.map +1 -1
  158. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -4
  159. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  160. package/dist/components/LibraryItemsList/ViewPanel/View/View.d.ts +1 -3
  161. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +9 -4
  162. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  163. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js +36 -14
  164. package/dist/components/LibraryItemsList/ViewPanel/ViewPanel.js.map +1 -1
  165. package/dist/components/Notifications/hooks/useNotificationSubscription.js +3 -2
  166. package/dist/components/Notifications/hooks/useNotificationSubscription.js.map +1 -1
  167. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  168. package/dist/components/RecordEdition/EditRecord/EditRecord.js +3 -3
  169. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  170. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  171. package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useDeleteValueMutation.d.ts +1 -1
  172. package/dist/components/RecordEdition/EditRecordContent/hooks/__mocks__/useSaveValueMutation.d.ts +1 -1
  173. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js +5 -20
  174. package/dist/components/RecordEdition/EditRecordContent/shared/ValuesVersionBtn/ValuesVersionBtn.js.map +1 -1
  175. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.d.ts +1 -11
  176. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +8 -95
  177. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  178. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/_types.d.ts +8 -0
  179. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/_types.js +2 -0
  180. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/_types.js.map +1 -0
  181. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/LinkFieldExplorer.d.ts +6 -0
  182. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/LinkFieldExplorer.js +77 -0
  183. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/LinkFieldExplorer.js.map +1 -0
  184. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record → explorer/link-record}/useExplorerLinkRecords.d.ts +5 -7
  185. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record → explorer/link-record}/useExplorerLinkRecords.js +3 -10
  186. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/link-record/useExplorerLinkRecords.js.map +1 -0
  187. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record → explorer/link-record}/useLinkRecords.d.ts +5 -6
  188. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/link-record/useLinkRecords.js +98 -0
  189. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/explorer/link-record/useLinkRecords.js.map +1 -0
  190. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/{ExplorerWrapper.d.ts → InputExtraAlignLeft.d.ts} +54 -52
  191. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/{link-record/ActionButton.js → shared/InputExtraAlignLeft.js} +4 -4
  192. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputExtraAlignLeft.js.map +1 -0
  193. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputWrapper.d.ts +3 -0
  194. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputWrapper.js +31 -0
  195. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/InputWrapper.js.map +1 -0
  196. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/Wrapper.d.ts +3 -0
  197. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/Wrapper.js +8 -0
  198. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/Wrapper.js.map +1 -0
  199. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/LinkFieldTags.d.ts +3 -0
  200. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/LinkFieldTags.js +57 -0
  201. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/LinkFieldTags.js.map +1 -0
  202. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/link-record/useLinkRecord.d.ts +16 -0
  203. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/link-record/useLinkRecord.js +82 -0
  204. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/link-record/useLinkRecord.js.map +1 -0
  205. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/unlink-record/useUnlinkRecord.d.ts +19 -0
  206. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/unlink-record/useUnlinkRecord.js +43 -0
  207. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/tag/unlink-record/useUnlinkRecord.js.map +1 -0
  208. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/unlink-all-records/useUnlinkAllRecords.d.ts +16 -0
  209. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/unlink-all-records/useUnlinkAllRecords.js +27 -0
  210. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/unlink-all-records/useUnlinkAllRecords.js.map +1 -0
  211. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +4 -3
  212. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  213. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js +9 -2
  214. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/TreeField.js.map +1 -1
  215. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeFieldWrapper.d.ts +53 -51
  216. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js +3 -2
  217. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/display-tree-node/TreeNodeItem.js.map +1 -1
  218. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.d.ts +2 -1
  219. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js +4 -7
  220. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/SelectTreeNodeModal.js.map +1 -1
  221. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.d.ts +3 -2
  222. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js +2 -2
  223. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/manage-tree-node-selection/useManageTreeNodeSelection.js.map +1 -1
  224. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js +3 -2
  225. package/dist/components/RecordEdition/EditRecordContent/uiElements/shared/ComputeIndicator.js.map +1 -1
  226. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +1 -0
  227. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  228. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  229. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +3 -2
  230. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -1
  231. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js +4 -3
  232. package/dist/components/RecordEdition/EditRecordSidebar/ValuesSummary/ValuesSummary.js.map +1 -1
  233. package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js +3 -2
  234. package/dist/components/RecordEdition/EditRecordSidebar/ValuesVersions/ValuesVersions.js.map +1 -1
  235. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js +2 -2
  236. package/dist/components/RecordEdition/hooks/useGetSubmitButtons.js.map +1 -1
  237. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.d.ts +1 -0
  238. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js +7 -7
  239. package/dist/components/SelectRecordForLinkModal/SelectRecordForLinkModal.js.map +1 -1
  240. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +2 -1
  241. package/dist/components/SelectTreeNode/SelectTreeNode.js +3 -3
  242. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  243. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +2 -1
  244. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +6 -2
  245. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -1
  246. package/dist/components/SelectTreeNode/TreeNodeTitle.js +3 -2
  247. package/dist/components/SelectTreeNode/TreeNodeTitle.js.map +1 -1
  248. package/dist/constants.d.ts +1 -0
  249. package/dist/constants.js +1 -0
  250. package/dist/constants.js.map +1 -1
  251. package/dist/hooks/useIFrameMessenger/messageHandlers.d.ts +3 -1
  252. package/dist/hooks/useIFrameMessenger/messageHandlers.js +16 -0
  253. package/dist/hooks/useIFrameMessenger/messageHandlers.js.map +1 -1
  254. package/dist/hooks/useIFrameMessenger/schema.d.ts +6 -3
  255. package/dist/hooks/useIFrameMessenger/schema.js +2 -1
  256. package/dist/hooks/useIFrameMessenger/schema.js.map +1 -1
  257. package/dist/hooks/useIFrameMessenger/types.d.ts +32 -2
  258. package/dist/hooks/useIFrameMessenger/types.js.map +1 -1
  259. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.d.ts +2 -0
  260. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js +16 -2
  261. package/dist/hooks/useIFrameMessenger/useIFrameMessenger.js.map +1 -1
  262. package/dist/hooks/useIFrameMessengerClient/iFrameMessengerClientContext.d.ts +2 -0
  263. package/dist/hooks/useIFrameMessengerClient/useIFrameMessengerClient.d.ts +2 -0
  264. package/dist/locales/en/shared.json +18 -3
  265. package/dist/locales/fr/shared.json +18 -3
  266. package/package.json +40 -42
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.d.ts +0 -3
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/ActionButton.js.map +0 -1
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useExplorerLinkRecords.js.map +0 -1
  270. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js +0 -100
  271. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/link-record/useLinkRecords.js.map +0 -1
  272. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js +0 -13
  273. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/shared/ExplorerWrapper.js.map +0 -1
@@ -4,7 +4,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
6
  import { KitButton, KitModal, KitTypography } from 'aristid-ds';
7
- import { FaTimes, FaTrash } from 'react-icons/fa';
8
7
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
9
8
  import { useState } from 'react';
10
9
  import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
@@ -12,6 +11,8 @@ import useExecuteDeleteViewMutation from '../../../../hooks/useExecuteDeleteView
12
11
  import { localizedTranslation } from '@leav/utils';
13
12
  import { useLang } from '../../../../hooks';
14
13
  import styled from 'styled-components';
14
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
15
+ import { faTimes, faTrash } from '@fortawesome/free-solid-svg-icons';
15
16
  const StyledButton = styled.button `
16
17
  all: unset;
17
18
  `;
@@ -38,10 +39,10 @@ export const useDeleteView = () => {
38
39
  };
39
40
  const iconDelete = (viewItem) => (_jsx(StyledButton, { className: "delete", title: t('explorer.viewList.delete-view'), onClick: () => {
40
41
  setDataViewOnAction({ id: viewItem.id, label: viewItem.label });
41
- }, children: _jsx(FaTrash, {}) }));
42
+ }, children: _jsx(FontAwesomeIcon, { icon: faTrash }) }));
42
43
  return {
43
44
  iconDelete,
44
- deleteModal: dataViewOnAction.id && dataViewOnAction.label && (_jsx(KitModal, { appElement: document.getElementById('root'), 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
+ deleteModal: dataViewOnAction.id && dataViewOnAction.label && (_jsx(KitModal, { appElement: document.getElementById('root'), 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(FontAwesomeIcon, { icon: faTimes }), children: t('global.close') }), _jsx(KitButton, { type: "primary", danger: true, onClick: _onDeleteConfirm, icon: _jsx(FontAwesomeIcon, { icon: faTrash }), children: t('global.delete') })] }), children: _jsx(KitTypography.Text, { size: "fontSize3", weight: "medium", children: localizedTranslation(dataViewOnAction.label, availableLangs) }) })),
45
46
  };
46
47
  };
47
48
  //# sourceMappingURL=useDeleteView.js.map
@@ -1 +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,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAsB,QAAQ,EAAC,MAAM,OAAO,CAAC;AACpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,4BAA4B,MAAM,qEAAqE,CAAC;AAC/G,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAA;;CAEjC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAC9B,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,EAAC,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IACnC,MAAM,EAAC,UAAU,EAAC,GAAG,4BAA4B,EAAE,CAAC;IACpD,MAAM,EAAC,QAAQ,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAC5C,MAAM,CAAC,gBAAg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KAAK,EACzD,MAAM,EACF,8BACI,KAAC,SAAS,IACN,IAAI,EAAC,WAAW,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,EAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,EAC3D,IAAI,EAAE,KAAC,OAAO,KAAG,YAEhB,CAAC,CAAC,cAAc,CAAC,GACV,EACZ,KAAC,SAAS,IAAC,IAAI,EAAC,SAAS,EAAC,MAAM,QAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,KAAC,OAAO,KAAG,YACxE,CAAC,CAAC,eAAe,CAAC,GACX,IACb,YAGP,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,MAAM,EAAC,QAAQ,YAC/C,oBAAoB,CAAC,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,GAC5C,GACd,CACd;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {KitButton, KitModal, KitTypography} from 'aristid-ds';\nimport {FaTimes, FaTrash} from 'react-icons/fa';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {type ComponentProps, useState} from 'react';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport useExecuteDeleteViewMutation from '_ui/hooks/useExecuteDeleteViewMutation/useExecuteDeleteViewMutation';\nimport {localizedTranslation} from '@leav/utils';\nimport {useLang} from '_ui/hooks';\nimport {type IUserView, type IDataViewOnAction} from '../../_types';\nimport styled from 'styled-components';\nimport {type Button} from 'antd';\n\nconst StyledButton = styled.button`\n all: unset;\n`;\n\nexport const useDeleteView = () => {\n const {t} = useSharedTranslation();\n const {availableLangs} = useLang();\n const {deleteView} = useExecuteDeleteViewMutation();\n const {dispatch} = useViewSettingsContext();\n const [dataViewOnAction, setDataViewOnAction] = useState<IDataViewOnAction>({id: null, label: null});\n\n const _onDeleteConfirm: ComponentProps<typeof Button>['onClick'] = async () => {\n if (!dataViewOnAction.id) {\n return;\n }\n const {data} = await deleteView(dataViewOnAction.id);\n\n if (data) {\n dispatch({\n type: ViewSettingsActionTypes.DELETE_VIEW,\n payload: {\n id: dataViewOnAction.id,\n },\n });\n }\n setDataViewOnAction({id: null, label: null});\n };\n\n const iconDelete = (viewItem: IUserView) => (\n <StyledButton\n className=\"delete\"\n title={t('explorer.viewList.delete-view')}\n onClick={() => {\n setDataViewOnAction({id: viewItem.id, label: viewItem.label});\n }}\n >\n <FaTrash />\n </StyledButton>\n );\n\n return {\n iconDelete,\n deleteModal: dataViewOnAction.id && dataViewOnAction.label && (\n <KitModal\n appElement={document.getElementById('root')}\n title={t('explorer.viewList.confirm-delete-view')}\n isOpen={!!dataViewOnAction.id && !!dataViewOnAction.label}\n footer={\n <>\n <KitButton\n type=\"secondary\"\n onClick={() => setDataViewOnAction({id: null, label: null})}\n icon={<FaTimes />}\n >\n {t('global.close')}\n </KitButton>\n <KitButton type=\"primary\" danger onClick={_onDeleteConfirm} icon={<FaTrash />}>\n {t('global.delete')}\n </KitButton>\n </>\n }\n >\n <KitTypography.Text size=\"fontSize3\" weight=\"medium\">\n {localizedTranslation(dataViewOnAction.label, availableLangs)}\n </KitTypography.Text>\n </KitModal>\n ),\n };\n};\n"]}
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,sBAAsB,EAAC,MAA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eAAe,CAAC,GACX,IACb,YAGP,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,MAAM,EAAC,QAAQ,YAC/C,oBAAoB,CAAC,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,GAC5C,GACd,CACd;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {KitButton, KitModal, KitTypography} from 'aristid-ds';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {type ComponentProps, useState} from 'react';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport useExecuteDeleteViewMutation from '_ui/hooks/useExecuteDeleteViewMutation/useExecuteDeleteViewMutation';\nimport {localizedTranslation} from '@leav/utils';\nimport {useLang} from '_ui/hooks';\nimport {type IUserView, type IDataViewOnAction} from '../../_types';\nimport styled from 'styled-components';\nimport {type Button} from 'antd';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faTimes, faTrash} from '@fortawesome/free-solid-svg-icons';\n\nconst StyledButton = styled.button`\n all: unset;\n`;\n\nexport const useDeleteView = () => {\n const {t} = useSharedTranslation();\n const {availableLangs} = useLang();\n const {deleteView} = useExecuteDeleteViewMutation();\n const {dispatch} = useViewSettingsContext();\n const [dataViewOnAction, setDataViewOnAction] = useState<IDataViewOnAction>({id: null, label: null});\n\n const _onDeleteConfirm: ComponentProps<typeof Button>['onClick'] = async () => {\n if (!dataViewOnAction.id) {\n return;\n }\n const {data} = await deleteView(dataViewOnAction.id);\n\n if (data) {\n dispatch({\n type: ViewSettingsActionTypes.DELETE_VIEW,\n payload: {\n id: dataViewOnAction.id,\n },\n });\n }\n setDataViewOnAction({id: null, label: null});\n };\n\n const iconDelete = (viewItem: IUserView) => (\n <StyledButton\n className=\"delete\"\n title={t('explorer.viewList.delete-view')}\n onClick={() => {\n setDataViewOnAction({id: viewItem.id, label: viewItem.label});\n }}\n >\n <FontAwesomeIcon icon={faTrash} />\n </StyledButton>\n );\n\n return {\n iconDelete,\n deleteModal: dataViewOnAction.id && dataViewOnAction.label && (\n <KitModal\n appElement={document.getElementById('root')}\n title={t('explorer.viewList.confirm-delete-view')}\n isOpen={!!dataViewOnAction.id && !!dataViewOnAction.label}\n footer={\n <>\n <KitButton\n type=\"secondary\"\n onClick={() => setDataViewOnAction({id: null, label: null})}\n icon={<FontAwesomeIcon icon={faTimes} />}\n >\n {t('global.close')}\n </KitButton>\n <KitButton\n type=\"primary\"\n danger\n onClick={_onDeleteConfirm}\n icon={<FontAwesomeIcon icon={faTrash} />}\n >\n {t('global.delete')}\n </KitButton>\n </>\n }\n >\n <KitTypography.Text size=\"fontSize3\" weight=\"medium\">\n {localizedTranslation(dataViewOnAction.label, availableLangs)}\n </KitTypography.Text>\n </KitModal>\n ),\n };\n};\n"]}
@@ -2,7 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
- import { FaEdit } from 'react-icons/fa';
6
5
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
7
6
  import { useState } from 'react';
8
7
  import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
@@ -10,6 +9,8 @@ import useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMut
10
9
  import { LabelViewFormModal } from './LabelViewFormModal';
11
10
  import styled from 'styled-components';
12
11
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
12
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
13
+ import { faEdit } from '@fortawesome/free-solid-svg-icons';
13
14
  const StyledButton = styled.button `
14
15
  all: unset;
15
16
  `;
@@ -39,7 +40,7 @@ export const useEditLabelView = () => {
39
40
  });
40
41
  }
41
42
  };
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
+ const iconEditLabel = (viewItem) => (_jsx(StyledButton, { className: "edit", title: t('explorer.viewList.edit-view'), onClick: () => setDataViewOnAction({ id: viewItem.id, label: viewItem.label }), children: _jsx(FontAwesomeIcon, { icon: faEdit }) }));
43
44
  return {
44
45
  iconEditLabel,
45
46
  editViewModal: dataViewOnAction.id && dataViewOnAction.label && (_jsx(LabelViewFormModal, { viewData: dataViewOnAction.label, isOpen: true, onSubmit: _onEditLabel, onClose: () => setDataViewOnAction({ id: null, label: null }) })),
@@ -1 +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,o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AAC,KAAK,IAAI,CAC5D,KAAC,kBAAkB,IACf,QAAQ,EAAE,gBAAgB,CAAC,KAAK,EAChC,MAAM,QACN,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,EAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC,GAC7D,CACL;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {FaEdit} from 'react-icons/fa';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {useState} from 'react';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {type IDataViewOnAction, type IUserView} from '../../_types';\nimport useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMutation';\nimport {LabelViewFormModal} from './LabelViewFormModal';\nimport styled from 'styled-components';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\n\nconst StyledButton = styled.button`\n all: unset;\n`;\n\nexport const useEditLabelView = () => {\n const {t} = useSharedTranslation();\n const {updateView} = useExecuteUpdateViewMutation();\n const {dispatch} = useViewSettingsContext();\n const [dataViewOnAction, setDataViewOnAction] = useState<IDataViewOnAction>({id: null, label: null});\n\n const _onEditLabel = async (label: Record<string, string>) => {\n if (!dataViewOnAction.id) {\n return;\n }\n const mappedView = {\n id: dataViewOnAction.id,\n label,\n };\n\n const {data} = await updateView({\n view: mappedView,\n });\n\n if (data) {\n dispatch({\n type: ViewSettingsActionTypes.RENAME_VIEW,\n payload: {\n id: data.updateView.id,\n label: data.updateView.label,\n },\n });\n }\n };\n\n const iconEditLabel = (viewItem: IUserView) => (\n <StyledButton\n className=\"edit\"\n title={t('explorer.viewList.edit-view')}\n onClick={() => setDataViewOnAction({id: viewItem.id, label: viewItem.label})}\n >\n <FaEdit />\n </StyledButton>\n );\n\n return {\n iconEditLabel,\n editViewModal: dataViewOnAction.id && dataViewOnAction.label && (\n <LabelViewFormModal\n viewData={dataViewOnAction.label}\n isOpen\n onSubmit={_onEditLabel}\n onClose={() => setDataViewOnAction({id: null, label: null})}\n />\n ),\n };\n};\n"]}
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,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;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,mCAAmC,CAAC;AAEzD,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;IAErG,MAAM,YAAY,GAAG,KAAK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":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {useState} from 'react';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {type IDataViewOnAction, type IUserView} from '../../_types';\nimport useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMutation';\nimport {LabelViewFormModal} from './LabelViewFormModal';\nimport styled from 'styled-components';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faEdit} from '@fortawesome/free-solid-svg-icons';\n\nconst StyledButton = styled.button`\n all: unset;\n`;\n\nexport const useEditLabelView = () => {\n const {t} = useSharedTranslation();\n const {updateView} = useExecuteUpdateViewMutation();\n const {dispatch} = useViewSettingsContext();\n const [dataViewOnAction, setDataViewOnAction] = useState<IDataViewOnAction>({id: null, label: null});\n\n const _onEditLabel = async (label: Record<string, string>) => {\n if (!dataViewOnAction.id) {\n return;\n }\n const mappedView = {\n id: dataViewOnAction.id,\n label,\n };\n\n const {data} = await updateView({\n view: mappedView,\n });\n\n if (data) {\n dispatch({\n type: ViewSettingsActionTypes.RENAME_VIEW,\n payload: {\n id: data.updateView.id,\n label: data.updateView.label,\n },\n });\n }\n };\n\n const iconEditLabel = (viewItem: IUserView) => (\n <StyledButton\n className=\"edit\"\n title={t('explorer.viewList.edit-view')}\n onClick={() => setDataViewOnAction({id: viewItem.id, label: viewItem.label})}\n >\n <FontAwesomeIcon icon={faEdit} />\n </StyledButton>\n );\n\n return {\n iconEditLabel,\n editViewModal: dataViewOnAction.id && dataViewOnAction.label && (\n <LabelViewFormModal\n viewData={dataViewOnAction.label}\n isOpen\n onSubmit={_onEditLabel}\n onClose={() => setDataViewOnAction({id: null, label: null})}\n />\n ),\n };\n};\n"]}
@@ -6,9 +6,10 @@ import { KitButton } from 'aristid-ds';
6
6
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
7
7
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
8
8
  import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
9
- import { FaUndo } from 'react-icons/fa';
10
9
  import { useFiltersContext } from '../../../../components/Filters/useFiltersContext';
11
10
  import { FiltersActionTypes } from '../../../../components/Filters/context/filtersReducer';
11
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
12
+ import { faUndo } from '@fortawesome/free-solid-svg-icons';
12
13
  export const useResetView = () => {
13
14
  const { t } = useSharedTranslation();
14
15
  const { dispatch } = useViewSettingsContext();
@@ -18,7 +19,7 @@ export const useResetView = () => {
18
19
  filtersDispatch({ type: FiltersActionTypes.RESTORE_INITIAL_VIEW_SETTINGS });
19
20
  };
20
21
  return {
21
- resetViewButton: (_jsx(KitButton, { type: "action", icon: _jsx(FaUndo, {}), onClick: _resetView, children: t('explorer.viewList.reinit-view') })),
22
+ resetViewButton: (_jsx(KitButton, { type: "action", icon: _jsx(FontAwesomeIcon, { icon: faUndo }), onClick: _resetView, children: t('explorer.viewList.reinit-view') })),
22
23
  };
23
24
  };
24
25
  //# sourceMappingURL=useResetView.js.map
@@ -1 +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;AACtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,kBAAkB,EAAC,MAAM,+CAA+C,CAAC;AAEjF,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;IAC5C,MAAM,EAAC,QAAQ,EAAE,eAAe,EAAC,GAAG,iBAAiB,EAAE,CAAC;IAExD,MAAM,UAAU,GAAG,GAAG,EAAE;QACpB,QAAQ,CAAC,EAAC,IAAI,EAAE,uBAAuB,CAAC,6BAA6B,EAAC,CAAC,CAAC;QACxE,eAAe,CAAC,EAAC,IAAI,EAAE,kBAAkB,CAAC,6BAA6B,EAAC,CAAC,CAAC;IAC9E,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","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {KitButton} from 'aristid-ds';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {FaUndo} from 'react-icons/fa';\nimport {useFiltersContext} from '_ui/components/Filters/useFiltersContext';\nimport {FiltersActionTypes} from '_ui/components/Filters/context/filtersReducer';\n\nexport const useResetView = () => {\n const {t} = useSharedTranslation();\n const {dispatch} = useViewSettingsContext();\n const {dispatch: filtersDispatch} = useFiltersContext();\n\n const _resetView = () => {\n dispatch({type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS});\n filtersDispatch({type: FiltersActionTypes.RESTORE_INITIAL_VIEW_SETTINGS});\n };\n\n return {\n resetViewButton: (\n <KitButton type=\"action\" icon={<FaUndo />} onClick={_resetView}>\n {t('explorer.viewList.reinit-view')}\n </KitButton>\n ),\n };\n};\n"]}
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,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,kBAAkB,EAAC,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,mCAAmC,CAAC;AAEzD,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;IAC5C,MAAM,EAAC,QAAQ,EAAE,eAAe,EAAC,GAAG,iBAAiB,EAAE,CAAC;IAExD,MAAM,UAAU,GAAG,GAAG,EAAE;QACpB,QAAQ,CAAC,EAAC,IAAI,EAAE,uBAAuB,CAAC,6BAA6B,EAAC,CAAC,CAAC;QACxE,eAAe,CAAC,EAAC,IAAI,EAAE,kBAAkB,CAAC,6BAA6B,EAAC,CAAC,CAAC;IAC9E,CAAC,CAAC;IAEF,OAAO;QACH,eAAe,EAAE,CACb,KAAC,SAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,KAAC,eAAe,IAAC,IAAI,EAAE,MAAM,GAAI,EAAE,OAAO,EAAE,UAAU,YAChF,CAAC,CAAC,+BAA+B,CAAC,GAC3B,CACf;KACJ,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {KitButton} from 'aristid-ds';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {useFiltersContext} from '_ui/components/Filters/useFiltersContext';\nimport {FiltersActionTypes} from '_ui/components/Filters/context/filtersReducer';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faUndo} from '@fortawesome/free-solid-svg-icons';\n\nexport const useResetView = () => {\n const {t} = useSharedTranslation();\n const {dispatch} = useViewSettingsContext();\n const {dispatch: filtersDispatch} = useFiltersContext();\n\n const _resetView = () => {\n dispatch({type: ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS});\n filtersDispatch({type: FiltersActionTypes.RESTORE_INITIAL_VIEW_SETTINGS});\n };\n\n return {\n resetViewButton: (\n <KitButton type=\"action\" icon={<FontAwesomeIcon icon={faUndo} />} onClick={_resetView}>\n {t('explorer.viewList.reinit-view')}\n </KitButton>\n ),\n };\n};\n"]}
@@ -4,7 +4,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
6
  import { KitButton } from 'aristid-ds';
7
- import { FaShare } from 'react-icons/fa';
8
7
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
9
8
  import { useEffect, useState } from 'react';
10
9
  import useExecuteSaveViewMutation from '../../../../hooks/useExecuteSaveViewMutation';
@@ -14,6 +13,8 @@ import { mapViewTypeFromExplorerToLegacy } from '../../_constants';
14
13
  import { useMeQuery } from '../../../../_gqlTypes';
15
14
  import { useTransformFilters } from '../../../../components/Filters/useTransformFilters';
16
15
  import { useFiltersContext } from '../../../../components/Filters';
16
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
17
+ import { faShare } from '@fortawesome/free-solid-svg-icons';
17
18
  export const useShareView = () => {
18
19
  const { t } = useSharedTranslation();
19
20
  const { view, dispatch } = useViewSettingsContext();
@@ -60,7 +61,7 @@ export const useShareView = () => {
60
61
  }
61
62
  };
62
63
  return {
63
- 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') })),
64
+ shareViewButton: !view.viewId || (isSharedView && !isOwnerView) ? null : (_jsx(KitButton, { type: "action", icon: _jsx(FontAwesomeIcon, { icon: faShare }), onClick: _toggleShareView, children: isSharedView ? t('explorer.viewList.unshare-view') : t('explorer.viewList.share-view') })),
64
65
  };
65
66
  };
66
67
  //# sourceMappingURL=useShareView.js.map
@@ -1 +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,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1C,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AAE;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","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {KitButton} from 'aristid-ds';\nimport {FaShare} from 'react-icons/fa';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {useEffect, useState} from 'react';\nimport useExecuteSaveViewMutation from '_ui/hooks/useExecuteSaveViewMutation';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {prepareViewForRequest} from './prepareViewForRequest';\nimport {type IViewDisplay} from '_ui/types';\nimport {mapViewTypeFromExplorerToLegacy} from '../../_constants';\nimport {useMeQuery} from '_ui/_gqlTypes';\nimport {useTransformFilters} from '_ui/components/Filters/useTransformFilters';\nimport {useFiltersContext} from '_ui/components/Filters';\n\nexport const useShareView = () => {\n const {t} = useSharedTranslation();\n const {view, dispatch} = useViewSettingsContext();\n const {filtersData} = useFiltersContext();\n const {saveView} = useExecuteSaveViewMutation();\n const {toValidFilters} = useTransformFilters();\n const [isSharedView, setIsSharedView] = useState(false);\n const [isOwnerView, setIsOwnerView] = useState(false);\n\n const {data: userData} = useMeQuery();\n\n useEffect(() => {\n const currentView = view.savedViews.find(v => v.id === view.viewId);\n if (currentView === undefined) {\n return;\n }\n setIsSharedView(currentView.shared ?? false);\n setIsOwnerView(currentView.ownerId === userData?.me?.whoAmI?.id);\n }, [view.viewId]);\n\n const _toggleShareView = async () => {\n const mappedView = {\n ...prepareViewForRequest(view, filtersData.filters, view.viewLabels),\n shared: !isSharedView,\n id: view.viewId,\n };\n\n const {data} = await saveView({\n view: mappedView,\n });\n\n setIsSharedView(!isSharedView);\n if (data) {\n dispatch({\n type: ViewSettingsActionTypes.UPDATE_VIEWS,\n payload: {\n id: data.saveView.id,\n ownerId: data.saveView.created_by.id,\n label: data.saveView.label,\n shared: data.saveView.shared,\n filters: toValidFilters(data.saveView.filters),\n sort: data.saveView.sort ?? [],\n display: (data.saveView.display as IViewDisplay) ?? {\n type: mapViewTypeFromExplorerToLegacy[view.viewType],\n },\n attributes: data.saveView?.attributes?.map(({id}) => id) ?? [],\n },\n });\n }\n };\n\n return {\n shareViewButton:\n !view.viewId || (isSharedView && !isOwnerView) ? null : (\n <KitButton type=\"action\" icon={<FaShare />} onClick={_toggleShareView}>\n {isSharedView ? t('explorer.viewList.unshare-view') : t('explorer.viewList.share-view')}\n </KitButton>\n ),\n };\n};\n"]}
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,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,O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AAI,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,eAAe,IAAC,IAAI,EAAE,OAAO,GAAI,EAAE,OAAO,EAAE,gBAAgB,YACvF,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,GAC/E,CACf;KACR,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {KitButton} from 'aristid-ds';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {useEffect, useState} from 'react';\nimport useExecuteSaveViewMutation from '_ui/hooks/useExecuteSaveViewMutation';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {prepareViewForRequest} from './prepareViewForRequest';\nimport {type IViewDisplay} from '_ui/types';\nimport {mapViewTypeFromExplorerToLegacy} from '../../_constants';\nimport {useMeQuery} from '_ui/_gqlTypes';\nimport {useTransformFilters} from '_ui/components/Filters/useTransformFilters';\nimport {useFiltersContext} from '_ui/components/Filters';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faShare} from '@fortawesome/free-solid-svg-icons';\n\nexport const useShareView = () => {\n const {t} = useSharedTranslation();\n const {view, dispatch} = useViewSettingsContext();\n const {filtersData} = useFiltersContext();\n const {saveView} = useExecuteSaveViewMutation();\n const {toValidFilters} = useTransformFilters();\n const [isSharedView, setIsSharedView] = useState(false);\n const [isOwnerView, setIsOwnerView] = useState(false);\n\n const {data: userData} = useMeQuery();\n\n useEffect(() => {\n const currentView = view.savedViews.find(v => v.id === view.viewId);\n if (currentView === undefined) {\n return;\n }\n setIsSharedView(currentView.shared ?? false);\n setIsOwnerView(currentView.ownerId === userData?.me?.whoAmI?.id);\n }, [view.viewId]);\n\n const _toggleShareView = async () => {\n const mappedView = {\n ...prepareViewForRequest(view, filtersData.filters, view.viewLabels),\n shared: !isSharedView,\n id: view.viewId,\n };\n\n const {data} = await saveView({\n view: mappedView,\n });\n\n setIsSharedView(!isSharedView);\n if (data) {\n dispatch({\n type: ViewSettingsActionTypes.UPDATE_VIEWS,\n payload: {\n id: data.saveView.id,\n ownerId: data.saveView.created_by.id,\n label: data.saveView.label,\n shared: data.saveView.shared,\n filters: toValidFilters(data.saveView.filters),\n sort: data.saveView.sort ?? [],\n display: (data.saveView.display as IViewDisplay) ?? {\n type: mapViewTypeFromExplorerToLegacy[view.viewType],\n },\n attributes: data.saveView?.attributes?.map(({id}) => id) ?? [],\n },\n });\n }\n };\n\n return {\n shareViewButton:\n !view.viewId || (isSharedView && !isOwnerView) ? null : (\n <KitButton type=\"action\" icon={<FontAwesomeIcon icon={faShare} />} onClick={_toggleShareView}>\n {isSharedView ? t('explorer.viewList.unshare-view') : t('explorer.viewList.share-view')}\n </KitButton>\n ),\n };\n};\n"]}
@@ -3,7 +3,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import { KitButton } from 'aristid-ds';
6
- import { FaSave } from 'react-icons/fa';
7
6
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
8
7
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
9
8
  import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
@@ -15,6 +14,8 @@ import { useMeQuery } from '../../../../_gqlTypes';
15
14
  import { useTransformFilters } from '../../../../components/Filters/useTransformFilters';
16
15
  import { useFiltersContext } from '../../../../components/Filters/useFiltersContext';
17
16
  import { FiltersActionTypes } from '../../../../components/Filters/context/filtersReducer';
17
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
18
+ import { faSave } from '@fortawesome/free-solid-svg-icons';
18
19
  export const useUpdateView = () => {
19
20
  const { t } = useSharedTranslation();
20
21
  const { toValidFilters } = useTransformFilters();
@@ -71,7 +72,7 @@ export const useUpdateView = () => {
71
72
  }
72
73
  };
73
74
  return {
74
- updateViewButton: !view.viewId || !view.savedViews.length || !isOwnerView ? null : (_jsx(KitButton, { type: "action", icon: _jsx(FaSave, {}), onClick: _updateView, children: t('global.save') })),
75
+ updateViewButton: !view.viewId || !view.savedViews.length || !isOwnerView ? null : (_jsx(KitButton, { type: "action", icon: _jsx(FontAwesomeIcon, { icon: faSave }), onClick: _updateView, children: t('global.save') })),
75
76
  };
76
77
  };
77
78
  //# sourceMappingURL=useUpdateView.js.map
@@ -1 +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,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,4BAA4B,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAC,+BAA+B,EAAC,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,QAA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,YAAY;gBACrC,OAAO,EAAE;oBACL,GAAG,WAAW;oBACd,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE;oBAC1B,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAqB;iBACjD;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","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {KitButton} from 'aristid-ds';\nimport {FaSave} from 'react-icons/fa';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMutation';\nimport {prepareViewForRequest} from './prepareViewForRequest';\nimport {type IViewDisplay} from '_ui/types';\nimport {mapViewTypeFromExplorerToLegacy} from '../../_constants';\nimport {useEffect, useRef, useState} from 'react';\nimport {useMeQuery} from '_ui/_gqlTypes';\nimport {type IUserView} from '../../_types';\nimport {useTransformFilters} from '_ui/components/Filters/useTransformFilters';\nimport {useFiltersContext} from '_ui/components/Filters/useFiltersContext';\nimport {FiltersActionTypes} from '_ui/components/Filters/context/filtersReducer';\nimport {type UIFilter} from '_ui/components/Filters/_types';\n\nexport const useUpdateView = () => {\n const {t} = useSharedTranslation();\n const {toValidFilters} = useTransformFilters();\n const {view, dispatch} = useViewSettingsContext();\n const {filtersData, dispatch: filtersDispatch} = useFiltersContext();\n const {updateView} = useExecuteUpdateViewMutation();\n const [isOwnerView, setIsOwnerView] = useState(false);\n const currentView = useRef<IUserView | undefined>();\n\n const {data: userData} = useMeQuery();\n\n useEffect(() => {\n currentView.current = view.savedViews.find(v => v.id === view.viewId);\n if (currentView.current === undefined) {\n return;\n }\n setIsOwnerView(currentView.current.ownerId === userData?.me?.whoAmI?.id);\n }, [view.viewId]);\n\n const _updateView = async () => {\n if (!view.viewId) {\n return;\n }\n const mappedView = {\n ...prepareViewForRequest(view, filtersData.filters, view.viewLabels),\n id: view.viewId,\n shared: currentView.current?.shared ?? false,\n };\n\n const {data} = await updateView({\n view: mappedView,\n });\n\n if (data) {\n const validFilters = toValidFilters(data.updateView.filters);\n dispatch({\n type: ViewSettingsActionTypes.UPDATE_VIEWS,\n payload: {\n id: data.updateView.id,\n ownerId: data.updateView.created_by.id,\n label: data.updateView.label,\n shared: data.updateView.shared,\n filters: validFilters,\n sort: data.updateView.sort ?? [],\n display: (data.updateView.display as IViewDisplay) ?? {\n type: mapViewTypeFromExplorerToLegacy[view.viewType],\n },\n attributes: data.updateView?.attributes?.map(({id}) => id) ?? [],\n },\n });\n filtersDispatch({\n type: FiltersActionTypes.UPDATE_VIEWS,\n payload: {\n ...filtersData,\n viewId: data.updateView.id,\n filters: data.updateView.filters as UIFilter[],\n },\n });\n }\n };\n\n return {\n updateViewButton:\n !view.viewId || !view.savedViews.length || !isOwnerView ? null : (\n <KitButton type=\"action\" icon={<FaSave />} onClick={_updateView}>\n {t('global.save')}\n </KitButton>\n ),\n };\n};\n"]}
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,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CAAC,KAAK;oBAC5B,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM;oBAC9B,OAAO,EAAE,YAAY;oBACrB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE;oBAChC,OAAO,EAAG,IAAI,CAAC,UAAU,CAAC,OAAwB,IAAI;wBAClD,IAAI,EAAE,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC;qBACvD;oBACD,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE;iBACnE;aACJ,CAAC,CAAC;YACH,eAAe,CAAC;gBACZ,IAAI,EAAE,kBAAkB,CAAC,YAAY;gBACrC,OAAO,EAAE;oBACL,GAAG,WAAW;oBACd,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE;oBAC1B,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAqB;iBACjD;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,eAAe,IAAC,IAAI,EAAE,MAAM,GAAI,EAAE,OAAO,EAAE,WAAW,YACjF,CAAC,CAAC,aAAa,CAAC,GACT,CACf;KACR,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {KitButton} from 'aristid-ds';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport useExecuteUpdateViewMutation from '../../_queries/useExecuteUpdateViewMutation';\nimport {prepareViewForRequest} from './prepareViewForRequest';\nimport {type IViewDisplay} from '_ui/types';\nimport {mapViewTypeFromExplorerToLegacy} from '../../_constants';\nimport {useEffect, useRef, useState} from 'react';\nimport {useMeQuery} from '_ui/_gqlTypes';\nimport {type IUserView} from '../../_types';\nimport {useTransformFilters} from '_ui/components/Filters/useTransformFilters';\nimport {useFiltersContext} from '_ui/components/Filters/useFiltersContext';\nimport {FiltersActionTypes} from '_ui/components/Filters/context/filtersReducer';\nimport {type UIFilter} from '_ui/components/Filters/_types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faSave} from '@fortawesome/free-solid-svg-icons';\n\nexport const useUpdateView = () => {\n const {t} = useSharedTranslation();\n const {toValidFilters} = useTransformFilters();\n const {view, dispatch} = useViewSettingsContext();\n const {filtersData, dispatch: filtersDispatch} = useFiltersContext();\n const {updateView} = useExecuteUpdateViewMutation();\n const [isOwnerView, setIsOwnerView] = useState(false);\n const currentView = useRef<IUserView | undefined>();\n\n const {data: userData} = useMeQuery();\n\n useEffect(() => {\n currentView.current = view.savedViews.find(v => v.id === view.viewId);\n if (currentView.current === undefined) {\n return;\n }\n setIsOwnerView(currentView.current.ownerId === userData?.me?.whoAmI?.id);\n }, [view.viewId]);\n\n const _updateView = async () => {\n if (!view.viewId) {\n return;\n }\n const mappedView = {\n ...prepareViewForRequest(view, filtersData.filters, view.viewLabels),\n id: view.viewId,\n shared: currentView.current?.shared ?? false,\n };\n\n const {data} = await updateView({\n view: mappedView,\n });\n\n if (data) {\n const validFilters = toValidFilters(data.updateView.filters);\n dispatch({\n type: ViewSettingsActionTypes.UPDATE_VIEWS,\n payload: {\n id: data.updateView.id,\n ownerId: data.updateView.created_by.id,\n label: data.updateView.label,\n shared: data.updateView.shared,\n filters: validFilters,\n sort: data.updateView.sort ?? [],\n display: (data.updateView.display as IViewDisplay) ?? {\n type: mapViewTypeFromExplorerToLegacy[view.viewType],\n },\n attributes: data.updateView?.attributes?.map(({id}) => id) ?? [],\n },\n });\n filtersDispatch({\n type: FiltersActionTypes.UPDATE_VIEWS,\n payload: {\n ...filtersData,\n viewId: data.updateView.id,\n filters: data.updateView.filters as UIFilter[],\n },\n });\n }\n };\n\n return {\n updateViewButton:\n !view.viewId || !view.savedViews.length || !isOwnerView ? null : (\n <KitButton type=\"action\" icon={<FontAwesomeIcon icon={faSave} />} onClick={_updateView}>\n {t('global.save')}\n </KitButton>\n ),\n };\n};\n"]}
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
3
2
  import { KitInput, KitTypography } from 'aristid-ds';
4
3
  import styled from 'styled-components';
5
4
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
@@ -10,6 +9,8 @@ import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
10
9
  import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
11
10
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
12
11
  import { SortListItem } from './SortListItem';
12
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
13
+ import { faSearch, faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
13
14
  const StyledListContainer = styled.div `
14
15
  display: flex;
15
16
  flex-direction: column;
@@ -20,10 +21,10 @@ const StyledList = styled.ul `
20
21
  list-style: none;
21
22
  color: var(--general-utilities-text-primary);
22
23
  `;
23
- const StyledEyeSlash = styled(FaEyeSlash) `
24
+ const StyledEyeSlash = styled(FontAwesomeIcon) `
24
25
  color: var(--general-utilities-neutral-dark);
25
26
  `;
26
- const StyledFaEye = styled(FaEye) `
27
+ const StyledFaEye = styled(FontAwesomeIcon) `
27
28
  color: var(--general-utilities-neutral-deepDark);
28
29
  `;
29
30
  export const SortItems = ({ libraryId }) => {
@@ -97,13 +98,13 @@ export const SortItems = ({ libraryId }) => {
97
98
  },
98
99
  },
99
100
  }, visibilityButtonProps: {
100
- icon: _jsx(StyledFaEye, {}),
101
+ icon: _jsx(StyledFaEye, { icon: faEye }),
101
102
  title: String(t('explorer.hide')),
102
103
  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
+ } }, field))) }) }) })), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.available-attributes') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FontAwesomeIcon, { icon: faSearch }) }), _jsx(StyledList, { "aria-label": t('explorer.sort-list.inactive'), children: inactiveFilters.map(field => (_jsx(SortListItem, { attributeId: field, filterChipProps: {
104
105
  label: attributeDetailsById[field].label,
105
106
  }, visibilityButtonProps: {
106
- icon: _jsx(StyledEyeSlash, {}),
107
+ icon: _jsx(StyledEyeSlash, { icon: faEyeSlash }),
107
108
  title: String(t('explorer.show')),
108
109
  onClick: _toggleColumnVisibility(field),
109
110
  } }, field))) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"SortItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortItems.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAA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,eAAe,EAAE;wBACb,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,KAAK;qBAC3C,EACD,qBAAqB,EAAE;wBACnB,IAAI,EAAE,KAAC,cAAc,KAAG;wBACxB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;wBACjC,OAAO,EAAE,uBAAuB,CAAC,KAAK,CAAC;qBAC1C,IATI,KAAK,CAUZ,CACL,CAAC,GACO,IACK,CACzB,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type FunctionComponent} from 'react';\nimport {FaEye, FaEyeSlash, FaSearch} from 'react-icons/fa';\nimport {KitInput, KitTypography} from 'aristid-ds';\nimport styled from 'styled-components';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {SortOrder} from '_ui/_gqlTypes';\nimport {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy} from '@dnd-kit/sortable';\nimport {useAttributeDetailsData} from '../_shared/useAttributeDetailsData';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {SortListItem} from './SortListItem';\n\nconst StyledListContainer = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst StyledList = styled.ul`\n padding: calc(var(--general-spacing-s) * 1px) 0;\n margin: 0;\n list-style: none;\n color: var(--general-utilities-text-primary);\n`;\n\nconst StyledEyeSlash = styled(FaEyeSlash)`\n color: var(--general-utilities-neutral-dark);\n`;\n\nconst StyledFaEye = styled(FaEye)`\n color: var(--general-utilities-neutral-deepDark);\n`;\n\nexport const SortItems: FunctionComponent<{libraryId: string}> = ({libraryId}) => {\n const {t} = useSharedTranslation();\n const {view, dispatch} = useViewSettingsContext();\n\n const {onSearchChanged, searchFilteredColumnsIds, attributeDetailsById} = useAttributeDetailsData(libraryId);\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const _toggleColumnVisibility = (field: string) => () => {\n const isAttributeAlreadySorting = view.sort.some(sortItem => sortItem.field === field);\n if (isAttributeAlreadySorting) {\n dispatch({\n type: ViewSettingsActionTypes.REMOVE_SORT,\n payload: {\n field,\n },\n });\n } else {\n dispatch({\n type: ViewSettingsActionTypes.ADD_SORT,\n payload: {\n order: SortOrder.asc,\n field,\n },\n });\n }\n };\n\n const _changeOrderActiveFilterTo = (field: string) => (order: SortOrder) =>\n dispatch({\n type: ViewSettingsActionTypes.CHANGE_SORT_ORDER,\n payload: {\n field,\n order,\n },\n });\n\n const _handleDragEnd = ({active: draggedElement, over: dropTarget}: DragEndEvent) => {\n const indexFrom = activeFilters.findIndex(({field}) => field === String(draggedElement.id));\n const indexTo = activeFilters.findIndex(({field}) => field === String(dropTarget?.id));\n\n if (!dropTarget || indexFrom === indexTo || indexTo === -1) {\n return;\n }\n\n dispatch({type: ViewSettingsActionTypes.MOVE_SORT, payload: {indexFrom, indexTo}});\n };\n\n const activeFilters = view.sort.filter(({field}) => searchFilteredColumnsIds.includes(field));\n const inactiveFilters = searchFilteredColumnsIds.filter(field =>\n view.sort.every(sortItem => sortItem.field !== field),\n );\n\n return (\n <StyledListContainer>\n {activeFilters.length > 0 && (\n <StyledList aria-label={t('explorer.sort-list.active')}>\n <DndContext sensors={sensors} collisionDetection={closestCenter} onDragEnd={_handleDragEnd}>\n <SortableContext\n items={activeFilters.map(({field}) => ({id: field}))}\n strategy={verticalListSortingStrategy}\n >\n {activeFilters.map(({field, order}) => (\n <SortListItem\n key={field}\n attributeId={field}\n isDraggable\n filterChipProps={{\n label: attributeDetailsById[field].label,\n values: [\n order === SortOrder.asc\n ? t('explorer.sort-ascending')\n : t('explorer.sort-descending'),\n ],\n expandable: true,\n dropDownProps: {\n menu: {\n selectable: true,\n selectedKeys: [order],\n items: [\n {\n key: SortOrder.asc,\n label: t('explorer.sort-ascending'),\n },\n {\n key: SortOrder.desc,\n label: t('explorer.sort-descending'),\n },\n ],\n onSelect: ({selectedKeys: [newOrder]}) =>\n _changeOrderActiveFilterTo(field)(newOrder as SortOrder),\n onDeselect: ({selectedKeys: [newOrder]}) =>\n _changeOrderActiveFilterTo(field)(newOrder as SortOrder),\n },\n },\n }}\n visibilityButtonProps={{\n icon: <StyledFaEye />,\n title: String(t('explorer.hide')),\n onClick: _toggleColumnVisibility(field),\n }}\n />\n ))}\n </SortableContext>\n </DndContext>\n </StyledList>\n )}\n <KitTypography.Title level=\"h4\">{t('explorer.available-attributes')}</KitTypography.Title>\n <KitInput\n placeholder={String(t('global.search'))}\n onChange={onSearchChanged}\n allowClear\n prefix={<FaSearch />}\n />\n <StyledList aria-label={t('explorer.sort-list.inactive')}>\n {inactiveFilters.map(field => (\n <SortListItem\n key={field}\n attributeId={field}\n filterChipProps={{\n label: attributeDetailsById[field].label,\n }}\n visibilityButtonProps={{\n icon: <StyledEyeSlash />,\n title: String(t('explorer.show')),\n onClick: _toggleColumnVisibility(field),\n }}\n />\n ))}\n </StyledList>\n </StyledListContainer>\n );\n};\n"]}
1
+ {"version":3,"file":"SortItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortItems.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EACH,aAAa,EACb,UAAU,EAEV,cAAc,EACd,aAAa,EACb,SAAS,EACT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AC,CAC1B,KAAC,YAAY,IAET,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE;wBACb,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,KAAK;qBAC3C,EACD,qBAAqB,EAAE;wBACnB,IAAI,EAAE,KAAC,cAAc,IAAC,IAAI,EAAE,UAAU,GAAI;wBAC1C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;wBACjC,OAAO,EAAE,uBAAuB,CAAC,KAAK,CAAC;qBAC1C,IATI,KAAK,CAUZ,CACL,CAAC,GACO,IACK,CACzB,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type FunctionComponent} from 'react';\nimport {KitInput, KitTypography} from 'aristid-ds';\nimport styled from 'styled-components';\nimport {useSharedTranslation} from '_ui/hooks/useSharedTranslation';\nimport {SortOrder} from '_ui/_gqlTypes';\nimport {\n closestCenter,\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy} from '@dnd-kit/sortable';\nimport {useAttributeDetailsData} from '../_shared/useAttributeDetailsData';\nimport {ViewSettingsActionTypes} from '../store-view-settings/viewSettingsReducer';\nimport {useViewSettingsContext} from '../store-view-settings/useViewSettingsContext';\nimport {SortListItem} from './SortListItem';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faSearch, faEye, faEyeSlash} from '@fortawesome/free-solid-svg-icons';\n\nconst StyledListContainer = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst StyledList = styled.ul`\n padding: calc(var(--general-spacing-s) * 1px) 0;\n margin: 0;\n list-style: none;\n color: var(--general-utilities-text-primary);\n`;\n\nconst StyledEyeSlash = styled(FontAwesomeIcon)`\n color: var(--general-utilities-neutral-dark);\n`;\n\nconst StyledFaEye = styled(FontAwesomeIcon)`\n color: var(--general-utilities-neutral-deepDark);\n`;\n\nexport const SortItems: FunctionComponent<{libraryId: string}> = ({libraryId}) => {\n const {t} = useSharedTranslation();\n const {view, dispatch} = useViewSettingsContext();\n\n const {onSearchChanged, searchFilteredColumnsIds, attributeDetailsById} = useAttributeDetailsData(libraryId);\n\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const _toggleColumnVisibility = (field: string) => () => {\n const isAttributeAlreadySorting = view.sort.some(sortItem => sortItem.field === field);\n if (isAttributeAlreadySorting) {\n dispatch({\n type: ViewSettingsActionTypes.REMOVE_SORT,\n payload: {\n field,\n },\n });\n } else {\n dispatch({\n type: ViewSettingsActionTypes.ADD_SORT,\n payload: {\n order: SortOrder.asc,\n field,\n },\n });\n }\n };\n\n const _changeOrderActiveFilterTo = (field: string) => (order: SortOrder) =>\n dispatch({\n type: ViewSettingsActionTypes.CHANGE_SORT_ORDER,\n payload: {\n field,\n order,\n },\n });\n\n const _handleDragEnd = ({active: draggedElement, over: dropTarget}: DragEndEvent) => {\n const indexFrom = activeFilters.findIndex(({field}) => field === String(draggedElement.id));\n const indexTo = activeFilters.findIndex(({field}) => field === String(dropTarget?.id));\n\n if (!dropTarget || indexFrom === indexTo || indexTo === -1) {\n return;\n }\n\n dispatch({type: ViewSettingsActionTypes.MOVE_SORT, payload: {indexFrom, indexTo}});\n };\n\n const activeFilters = view.sort.filter(({field}) => searchFilteredColumnsIds.includes(field));\n const inactiveFilters = searchFilteredColumnsIds.filter(field =>\n view.sort.every(sortItem => sortItem.field !== field),\n );\n\n return (\n <StyledListContainer>\n {activeFilters.length > 0 && (\n <StyledList aria-label={t('explorer.sort-list.active')}>\n <DndContext sensors={sensors} collisionDetection={closestCenter} onDragEnd={_handleDragEnd}>\n <SortableContext\n items={activeFilters.map(({field}) => ({id: field}))}\n strategy={verticalListSortingStrategy}\n >\n {activeFilters.map(({field, order}) => (\n <SortListItem\n key={field}\n attributeId={field}\n isDraggable\n filterChipProps={{\n label: attributeDetailsById[field].label,\n values: [\n order === SortOrder.asc\n ? t('explorer.sort-ascending')\n : t('explorer.sort-descending'),\n ],\n expandable: true,\n dropDownProps: {\n menu: {\n selectable: true,\n selectedKeys: [order],\n items: [\n {\n key: SortOrder.asc,\n label: t('explorer.sort-ascending'),\n },\n {\n key: SortOrder.desc,\n label: t('explorer.sort-descending'),\n },\n ],\n onSelect: ({selectedKeys: [newOrder]}) =>\n _changeOrderActiveFilterTo(field)(newOrder as SortOrder),\n onDeselect: ({selectedKeys: [newOrder]}) =>\n _changeOrderActiveFilterTo(field)(newOrder as SortOrder),\n },\n },\n }}\n visibilityButtonProps={{\n icon: <StyledFaEye icon={faEye} />,\n title: String(t('explorer.hide')),\n onClick: _toggleColumnVisibility(field),\n }}\n />\n ))}\n </SortableContext>\n </DndContext>\n </StyledList>\n )}\n <KitTypography.Title level=\"h4\">{t('explorer.available-attributes')}</KitTypography.Title>\n <KitInput\n placeholder={String(t('global.search'))}\n onChange={onSearchChanged}\n allowClear\n prefix={<FontAwesomeIcon icon={faSearch} />}\n />\n <StyledList aria-label={t('explorer.sort-list.inactive')}>\n {inactiveFilters.map(field => (\n <SortListItem\n key={field}\n attributeId={field}\n filterChipProps={{\n label: attributeDetailsById[field].label,\n }}\n visibilityButtonProps={{\n icon: <StyledEyeSlash icon={faEyeSlash} />,\n title: String(t('explorer.show')),\n onClick: _toggleColumnVisibility(field),\n }}\n />\n ))}\n </StyledList>\n </StyledListContainer>\n );\n};\n"]}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from 'styled-components';
3
- import { FaGripLines } from 'react-icons/fa';
4
3
  import { KitButton, KitFilter } from 'aristid-ds';
5
4
  import { useSortable } from '@dnd-kit/sortable';
6
5
  import { CSS } from '@dnd-kit/utilities';
6
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
+ import { faGripLines } from '@fortawesome/free-solid-svg-icons';
7
8
  const StyledSortListItem = styled.li `
8
9
  display: flex;
9
10
  justify-content: space-between;
@@ -27,6 +28,6 @@ export const SortListItem = ({ attributeId, isDraggable, visibilityButtonProps,
27
28
  transform: CSS.Transform.toString(transform),
28
29
  transition,
29
30
  };
30
- return (_jsxs(StyledSortListItem, { ref: setNodeRef, style: style, children: [_jsxs("div", { children: [isDraggable && (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: _jsx(FaGripLines, {}) })), _jsx(KitFilter, { ...filterChipProps }, attributeId)] }), _jsx(KitButton, { size: "m", type: "tertiary", ...visibilityButtonProps })] }));
31
+ return (_jsxs(StyledSortListItem, { ref: setNodeRef, style: style, children: [_jsxs("div", { children: [isDraggable && (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: _jsx(FontAwesomeIcon, { icon: faGripLines }) })), _jsx(KitFilter, { ...filterChipProps }, attributeId)] }), _jsx(KitButton, { size: "m", type: "tertiary", ...visibilityButtonProps })] }));
31
32
  };
32
33
  //# sourceMappingURL=SortListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SortListItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortListItem.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,oBAAoB,CAAC;AAEvC,MAAM,kBAAkB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;CAWnC,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAwB;;;cAG9C,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;CAC/D,CAAC;AASF,MAAM,CAAC,MAAM,YAAY,GAAkD,CAAC,EACxE,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,GAClB,EAAE,EAAE;IACD,MAAM,EAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,WAAW,CAAC,EAAC,EAAE,EAAE,WAAW,EAAC,CAAC,CAAC;IAC9G,MAAM,KAAK,GAAG;QACV,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,UAAU;KACb,CAAC;IAEF,OAAO,CACH,MAAC,kBAAkB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aAC7C,0BACK,WAAW,IAAI,CACZ,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACpE,KAAC,WAAW,KAAG,GACA,CACtB,EACD,KAAC,SAAS,OAAuB,eAAe,IAAhC,WAAW,CAAyB,IAClD,EACN,KAAC,SAAS,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,UAAU,KAAK,qBAAqB,GAAI,IAChD,CACxB,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ComponentProps, type FunctionComponent} from 'react';\nimport styled from 'styled-components';\nimport {FaGripLines} from 'react-icons/fa';\nimport {KitButton, KitFilter} from 'aristid-ds';\nimport {useSortable} from '@dnd-kit/sortable';\nimport {CSS} from '@dnd-kit/utilities';\n\nconst StyledSortListItem = styled.li`\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n div {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: calc(var(--general-spacing-xs) * 1px);\n }\n`;\n\nconst StyledDragHandle = styled.span<{$isDragging: boolean}>`\n display: flex;\n align-items: center;\n cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};\n`;\n\ninterface IActiveFilterListItemProps {\n attributeId: string;\n isDraggable?: true;\n filterChipProps: Pick<ComponentProps<typeof KitFilter>, 'label' | 'values' | 'expandable' | 'dropDownProps'>;\n visibilityButtonProps: Pick<ComponentProps<typeof KitButton>, 'onClick' | 'icon' | 'title'>;\n}\n\nexport const SortListItem: FunctionComponent<IActiveFilterListItemProps> = ({\n attributeId,\n isDraggable,\n visibilityButtonProps,\n filterChipProps,\n}) => {\n const {attributes, listeners, setNodeRef, transform, transition, isDragging} = useSortable({id: attributeId});\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n <StyledSortListItem ref={setNodeRef} style={style}>\n <div>\n {isDraggable && (\n <StyledDragHandle {...attributes} {...listeners} $isDragging={isDragging}>\n <FaGripLines />\n </StyledDragHandle>\n )}\n <KitFilter key={attributeId} {...filterChipProps} />\n </div>\n <KitButton size=\"m\" type=\"tertiary\" {...visibilityButtonProps} />\n </StyledSortListItem>\n );\n};\n"]}
1
+ {"version":3,"file":"SortListItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/sort-items/SortListItem.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAC,WAAW,EAAC,MAAM,mCAAmC,CAAC;AAE9D,MAAM,kBAAkB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;CAWnC,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAwB;;;cAG9C,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;CAC/D,CAAC;AASF,MAAM,CAAC,MAAM,YAAY,GAAkD,CAAC,EACxE,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,eAAe,GAClB,EAAE,EAAE;IACD,MAAM,EAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,WAAW,CAAC,EAAC,EAAE,EAAE,WAAW,EAAC,CAAC,CAAC;IAC9G,MAAM,KAAK,GAAG;QACV,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC5C,UAAU;KACb,CAAC;IAEF,OAAO,CACH,MAAC,kBAAkB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aAC7C,0BACK,WAAW,IAAI,CACZ,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACpE,KAAC,eAAe,IAAC,IAAI,EAAE,WAAW,GAAI,GACvB,CACtB,EACD,KAAC,SAAS,OAAuB,eAAe,IAAhC,WAAW,CAAyB,IAClD,EACN,KAAC,SAAS,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,UAAU,KAAK,qBAAqB,GAAI,IAChD,CACxB,CAAC;AACN,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {type ComponentProps, type FunctionComponent} from 'react';\nimport styled from 'styled-components';\nimport {KitButton, KitFilter} from 'aristid-ds';\nimport {useSortable} from '@dnd-kit/sortable';\nimport {CSS} from '@dnd-kit/utilities';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faGripLines} from '@fortawesome/free-solid-svg-icons';\n\nconst StyledSortListItem = styled.li`\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n div {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: calc(var(--general-spacing-xs) * 1px);\n }\n`;\n\nconst StyledDragHandle = styled.span<{$isDragging: boolean}>`\n display: flex;\n align-items: center;\n cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};\n`;\n\ninterface IActiveFilterListItemProps {\n attributeId: string;\n isDraggable?: true;\n filterChipProps: Pick<ComponentProps<typeof KitFilter>, 'label' | 'values' | 'expandable' | 'dropDownProps'>;\n visibilityButtonProps: Pick<ComponentProps<typeof KitButton>, 'onClick' | 'icon' | 'title'>;\n}\n\nexport const SortListItem: FunctionComponent<IActiveFilterListItemProps> = ({\n attributeId,\n isDraggable,\n visibilityButtonProps,\n filterChipProps,\n}) => {\n const {attributes, listeners, setNodeRef, transform, transition, isDragging} = useSortable({id: attributeId});\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n <StyledSortListItem ref={setNodeRef} style={style}>\n <div>\n {isDraggable && (\n <StyledDragHandle {...attributes} {...listeners} $isDragging={isDragging}>\n <FontAwesomeIcon icon={faGripLines} />\n </StyledDragHandle>\n )}\n <KitFilter key={attributeId} {...filterChipProps} />\n </div>\n <KitButton size=\"m\" type=\"tertiary\" {...visibilityButtonProps} />\n </StyledSortListItem>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAmBzD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB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AAuB,CAAC,SAAS,CAAC,CAAC,CAAC;YACrC,OAAO,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {v4 as uuid} from 'uuid';\nimport {AttributeFormat, type RecordFilterCondition, type SortOrder} from '_ui/_gqlTypes';\nimport {type DefaultViewSettings, type Entrypoint, type IUserView, type MassSelection} from '../../_types';\nimport {hasOnlyNoValueConditions, nullValueConditions} from '../../conditionsHelper';\nimport {AttributeConditionFilter, ThroughConditionFilter} from '_ui/types';\nimport {DefaultViewId} from './viewSettingsInitialState';\nimport {isLinkAttribute} from '_ui/_utils/attributeType';\nimport {\n conditionsByFormat,\n getFirstConditionByFilterType,\n} from '_ui/components/Filters/filter-items/filter-type/useConditionOptionsByType';\nimport {\n isUIFilterLink,\n isUIFilterStandard,\n isUIFilterThrough,\n isUIFilterTree,\n isUIFilterValueList,\n type IUIFilterStandard,\n type IUIFilterTree,\n type UIFilter,\n} from '_ui/components/Filters';\n\nexport type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';\n\nexport const ViewSettingsActionTypes = {\n RESET: 'RESET',\n ADD_ATTRIBUTE: 'ADD_ATTRIBUTE',\n REMOVE_ATTRIBUTE: 'REMOVE_ATTRIBUTE',\n MOVE_ATTRIBUTE: 'MOVE_ATTRIBUTE',\n RESET_ATTRIBUTES: 'RESET_ATTRIBUTES',\n CHANGE_VIEW_TYPE: 'CHANGE_VIEW_TYPE',\n ADD_SORT: 'ADD_SORT',\n REMOVE_SORT: 'REMOVE_SORT',\n MOVE_SORT: 'MOVE_SORT',\n CHANGE_SORT_ORDER: 'CHANGE_SORT_ORDER',\n CHANGE_PAGE_SIZE: 'CHANGE_PAGE_SIZE',\n CHANGE_FULLTEXT_SEARCH: 'CHANGE_FULLTEXT_SEARCH',\n CLEAR_FULLTEXT_SEARCH: 'CLEAR_FULLTEXT_SEARCH',\n ADD_FILTER: 'ADD_FILTER',\n RESET_FILTER: 'RESET_FILTER',\n REMOVE_FILTER: 'REMOVE_FILTER',\n MOVE_FILTER: 'MOVE_FILTER',\n CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG',\n SET_SELECTED_KEYS: 'SET_SELECTED_KEYS',\n RESTORE_INITIAL_VIEW_SETTINGS: 'RESTORE_INITIAL_VIEW_SETTINGS',\n UPDATE_VIEWS: 'UPDATE_VIEWS',\n RENAME_VIEW: 'RENAME_VIEW',\n DELETE_VIEW: 'DELETE_VIEW',\n LOAD_VIEW: 'LOAD_VIEW',\n} as const;\n\nexport interface IViewSettingsState {\n libraryId: string;\n viewId: string | null;\n viewLabels: Record<string, string>;\n viewModified: boolean;\n entrypoint: Entrypoint;\n viewType: ViewType;\n savedViews: IUserView[];\n attributesIds: string[];\n fulltextSearch: string;\n sort: Array<{\n field: string;\n order: SortOrder;\n }>;\n pageSize: number;\n initialViewSettings: Pick<IViewSettingsState, 'viewType' | 'attributesIds' | 'sort' | 'pageSize'>;\n defaultViewSettings: DefaultViewSettings;\n massSelection: MassSelection;\n enableConfigureView?: boolean;\n}\n\ninterface IViewSettingsActionChangePageSize {\n type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;\n payload: {pageSize: number};\n}\n\ninterface IViewSettingsActionAddAttribute {\n type: typeof ViewSettingsActionTypes.ADD_ATTRIBUTE;\n payload: {attributeId: string};\n}\n\ninterface IViewSettingsActionRemoveAttribute {\n type: typeof ViewSettingsActionTypes.REMOVE_ATTRIBUTE;\n payload: {attributeId: string};\n}\n\ninterface IViewSettingsActionMoveAttribute {\n type: typeof ViewSettingsActionTypes.MOVE_ATTRIBUTE;\n payload: {\n indexFrom: number;\n indexTo: number;\n };\n}\n\ninterface IViewSettingsActionChangeViewType {\n type: typeof ViewSettingsActionTypes.CHANGE_VIEW_TYPE;\n payload: {viewType: ViewType};\n}\n\ninterface IViewSettingsActionResetAttributes {\n type: typeof ViewSettingsActionTypes.RESET_ATTRIBUTES;\n}\n\ninterface IViewSettingsActionAddSort {\n type: typeof ViewSettingsActionTypes.ADD_SORT;\n payload: {field: string; order: SortOrder};\n}\n\ninterface IViewSettingsActionRemoveSort {\n type: typeof ViewSettingsActionTypes.REMOVE_SORT;\n payload: {field: string};\n}\n\ninterface IViewSettingsActionChangeSortOrder {\n type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;\n payload: {field: string; order: SortOrder};\n}\n\ninterface IViewSettingsActionMoveSort {\n type: typeof ViewSettingsActionTypes.MOVE_SORT;\n payload: {\n indexFrom: number;\n indexTo: number;\n };\n}\n\ninterface IViewSettingsActionChangeFulltextSearch {\n type: typeof ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH;\n payload: {search: string};\n}\n\ninterface IViewSettingsActionClearFulltextSearch {\n type: typeof ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH;\n}\n\ninterface IViewSettingsActionAddFilter {\n type: typeof ViewSettingsActionTypes.ADD_FILTER;\n payload: Omit<UIFilter, 'id' | 'value' | 'condition'>;\n}\n\ninterface IViewSettingsActionResetFilter {\n type: typeof ViewSettingsActionTypes.RESET_FILTER;\n payload: Pick<UIFilter, 'id'>;\n}\n\ninterface IViewSettingsActionRemoveFilter {\n type: typeof ViewSettingsActionTypes.REMOVE_FILTER;\n payload: Pick<UIFilter, 'id'>;\n}\n\ninterface IViewSettingsActionChangeFilterConfig {\n type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;\n payload: UIFilter | IUIFilterTree;\n}\n\ninterface IViewSettingsActionMoveFilter {\n type: typeof ViewSettingsActionTypes.MOVE_FILTER;\n payload: {\n indexFrom: number;\n indexTo: number;\n };\n}\n\ninterface IViewSettingsActionReset {\n type: typeof ViewSettingsActionTypes.RESET;\n payload: IViewSettingsState;\n}\n\ninterface IViewSettingsActionSetSelectedKeys {\n type: typeof ViewSettingsActionTypes.SET_SELECTED_KEYS;\n payload: MassSelection;\n}\n\ninterface IViewSettingsActionRestoreInitialViewSettings {\n type: typeof ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS;\n}\n\ninterface IViewSettingsActionUpdateViewListAndCurrentView {\n type: typeof ViewSettingsActionTypes.UPDATE_VIEWS;\n payload: IUserView;\n}\n\ninterface IViewDataPayload {\n id: string;\n label: Record<string, string>;\n}\n\ninterface IViewSettingsActionRenameView {\n type: typeof ViewSettingsActionTypes.RENAME_VIEW;\n payload: IViewDataPayload;\n}\n\ninterface IViewSettingsActionDeleteView {\n type: typeof ViewSettingsActionTypes.DELETE_VIEW;\n payload: {id: string};\n}\n\nexport type IViewSettingsActionLoadViewPayload = Pick<\n IViewSettingsState,\n 'viewId' | 'viewLabels' | 'viewType' | 'attributesIds' | 'sort'\n>;\n\ninterface IViewSettingsActionLoadView {\n type: typeof ViewSettingsActionTypes.LOAD_VIEW;\n payload: IViewSettingsActionLoadViewPayload;\n}\n\ntype Reducer<\n PAYLOAD extends {\n type: keyof typeof ViewSettingsActionTypes;\n payload?: unknown;\n } = {type: any; payload: 'no_payload'},\n> = PAYLOAD['payload'] extends 'no_payload'\n ? (state: IViewSettingsState) => IViewSettingsState\n : (state: IViewSettingsState, payload: PAYLOAD['payload']) => IViewSettingsState;\n\nconst changePageSize: Reducer<IViewSettingsActionChangePageSize> = (state, payload) => ({\n ...state,\n pageSize: payload.pageSize,\n});\n\nconst addAttribute: Reducer<IViewSettingsActionAddAttribute> = (state, payload) => ({\n ...state,\n attributesIds: [...state.attributesIds, payload.attributeId],\n viewModified: true,\n});\n\nconst removeAttribute: Reducer<IViewSettingsActionRemoveAttribute> = (state, payload) => ({\n ...state,\n attributesIds: state.attributesIds.filter(attributesId => attributesId !== payload.attributeId),\n viewModified: true,\n});\n\nconst moveAttribute: Reducer<IViewSettingsActionMoveAttribute> = (state, payload) => {\n const attributesIds = [...state.attributesIds];\n const [attributeIdToMove] = attributesIds.splice(payload.indexFrom, 1);\n // TODO use newES6 syntax (toSpliced)\n attributesIds.splice(payload.indexTo, 0, attributeIdToMove);\n return {\n ...state,\n attributesIds,\n viewModified: true,\n };\n};\n\nconst resetAttributes: Reducer = state => ({\n ...state,\n attributesIds: [],\n});\n\nconst changeViewType: Reducer<IViewSettingsActionChangeViewType> = (state, payload) => ({\n ...state,\n viewType: payload.viewType,\n viewModified: true,\n});\n\nconst addSort: Reducer<IViewSettingsActionAddSort> = (state, payload) => ({\n ...state,\n sort: [...state.sort, {field: payload.field, order: payload.order}],\n viewModified: true,\n});\n\nconst removeSort: Reducer<IViewSettingsActionRemoveSort> = (state, payload) => ({\n ...state,\n sort: state.sort.filter(({field: attributeId}) => attributeId !== payload.field),\n viewModified: true,\n});\n\nconst changeSortOrder: Reducer<IViewSettingsActionChangeSortOrder> = (state, payload) => ({\n ...state,\n sort: state.sort.map(sort => (sort.field === payload.field ? {...sort, order: payload.order} : sort)),\n viewModified: true,\n});\n\nconst moveSort: Reducer<IViewSettingsActionMoveSort> = (state, payload) => {\n const attributesUsedToSort = [...state.sort];\n const [sortToMove] = attributesUsedToSort.splice(payload.indexFrom, 1);\n attributesUsedToSort.splice(payload.indexTo, 0, sortToMove);\n return {\n ...state,\n sort: attributesUsedToSort,\n viewModified: true,\n };\n};\n\nconst changeFulltextSearch: Reducer<IViewSettingsActionChangeFulltextSearch> = (state, payload) => ({\n ...state,\n fulltextSearch: payload.search,\n});\n\nexport const clearFulltextSearch: Reducer = state => ({\n ...state,\n fulltextSearch: '',\n});\n\nconst reset: Reducer<IViewSettingsActionReset> = (_, payload) => payload;\n\nconst setSelectedKeys: Reducer<IViewSettingsActionSetSelectedKeys> = (state, payload) => ({\n ...state,\n massSelection: payload,\n});\n\nconst restoreInitialViewSettings: Reducer = state => ({\n ...state,\n ...state.initialViewSettings,\n viewModified: false,\n});\n\nconst updateViewListAndCurrentView: Reducer<IViewSettingsActionUpdateViewListAndCurrentView> = (state, payload) => ({\n ...state,\n viewId: payload.id ?? null,\n viewLabels: payload.label,\n savedViews: state.savedViews.find(({id}) => id === payload.id)\n ? state.savedViews.map(view => (view.id === payload.id ? payload : view))\n : state.savedViews.concat([payload]),\n initialViewSettings: {\n viewType: state.viewType,\n attributesIds: state.attributesIds,\n sort: state.sort,\n pageSize: state.pageSize,\n },\n viewModified: false,\n});\n\nconst renameView: Reducer<IViewSettingsActionRenameView> = (state, payload) => ({\n ...state,\n viewLabels: payload.label,\n savedViews: state.savedViews.map(view => (view.id === payload.id ? {...view, label: payload?.label} : view)),\n});\n\nconst deleteView: Reducer<IViewSettingsActionDeleteView> = (state, payload) => {\n const newSavedViews = [...state.savedViews];\n const indexViewDeleted = newSavedViews.findIndex(view => view.id === payload.id);\n // TODO use newES6 syntax (toSpliced)\n if (indexViewDeleted !== -1) {\n newSavedViews.splice(indexViewDeleted, 1);\n }\n if (state.viewId === payload.id) {\n const defaultViewSettings = {\n ...state.defaultViewSettings,\n viewId: DefaultViewId,\n viewLabels: {},\n viewModified: false,\n };\n return {\n ...state,\n ...defaultViewSettings,\n savedViews: newSavedViews,\n };\n }\n return {\n ...state,\n savedViews: newSavedViews,\n };\n};\n\nconst loadView: Reducer<IViewSettingsActionLoadView> = (state, payload) => ({\n ...state,\n ...payload,\n initialViewSettings: {\n viewType: payload.viewType,\n attributesIds: payload.attributesIds,\n sort: payload.sort,\n pageSize: state.pageSize,\n },\n viewModified: false,\n});\n\nexport type IViewSettingsAction =\n | IViewSettingsActionResetAttributes\n | IViewSettingsActionAddAttribute\n | IViewSettingsActionRemoveAttribute\n | IViewSettingsActionMoveAttribute\n | IViewSettingsActionChangeViewType\n | IViewSettingsActionAddSort\n | IViewSettingsActionRemoveSort\n | IViewSettingsActionChangeSortOrder\n | IViewSettingsActionMoveSort\n | IViewSettingsActionChangePageSize\n | IViewSettingsActionChangeFulltextSearch\n | IViewSettingsActionClearFulltextSearch\n | IViewSettingsActionAddFilter\n | IViewSettingsActionResetFilter\n | IViewSettingsActionRemoveFilter\n | IViewSettingsActionChangeFilterConfig\n | IViewSettingsActionMoveFilter\n | IViewSettingsActionReset\n | IViewSettingsActionSetSelectedKeys\n | IViewSettingsActionRestoreInitialViewSettings\n | IViewSettingsActionUpdateViewListAndCurrentView\n | IViewSettingsActionRenameView\n | IViewSettingsActionDeleteView\n | IViewSettingsActionLoadView;\n\nexport const viewSettingsReducer = (state: IViewSettingsState, action: IViewSettingsAction): IViewSettingsState => {\n switch (action.type) {\n case ViewSettingsActionTypes.CHANGE_PAGE_SIZE: {\n return changePageSize(state, action.payload);\n }\n case ViewSettingsActionTypes.ADD_ATTRIBUTE: {\n return addAttribute(state, action.payload);\n }\n case ViewSettingsActionTypes.REMOVE_ATTRIBUTE: {\n return removeAttribute(state, action.payload);\n }\n case ViewSettingsActionTypes.MOVE_ATTRIBUTE: {\n return moveAttribute(state, action.payload);\n }\n case ViewSettingsActionTypes.RESET_ATTRIBUTES: {\n return resetAttributes(state);\n }\n case ViewSettingsActionTypes.CHANGE_VIEW_TYPE: {\n return changeViewType(state, action.payload);\n }\n case ViewSettingsActionTypes.ADD_SORT: {\n return addSort(state, action.payload);\n }\n case ViewSettingsActionTypes.REMOVE_SORT: {\n return removeSort(state, action.payload);\n }\n case ViewSettingsActionTypes.MOVE_SORT: {\n return moveSort(state, action.payload);\n }\n case ViewSettingsActionTypes.CHANGE_SORT_ORDER: {\n return changeSortOrder(state, action.payload);\n }\n case ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH: {\n return changeFulltextSearch(state, action.payload);\n }\n case ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH: {\n return clearFulltextSearch(state);\n }\n /*case ViewSettingsActionTypes.ADD_FILTER: {\n return addFilter(state, action.payload);\n }\n case ViewSettingsActionTypes.RESET_FILTER: {\n return resetFilter(state, action.payload);\n }\n case ViewSettingsActionTypes.REMOVE_FILTER: {\n return removeFilter(state, action.payload);\n }\n case ViewSettingsActionTypes.CHANGE_FILTER_CONFIG: {\n return changeFilterConfig(state, action.payload);\n }\n case ViewSettingsActionTypes.MOVE_FILTER: {\n return moveFilter(state, action.payload);\n }*/\n case ViewSettingsActionTypes.RESET: {\n return reset(state, action.payload);\n }\n case ViewSettingsActionTypes.SET_SELECTED_KEYS: {\n return setSelectedKeys(state, action.payload);\n }\n case ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS: {\n return restoreInitialViewSettings(state);\n }\n case ViewSettingsActionTypes.UPDATE_VIEWS: {\n return updateViewListAndCurrentView(state, action.payload);\n }\n case ViewSettingsActionTypes.RENAME_VIEW: {\n return renameView(state, action.payload);\n }\n case ViewSettingsActionTypes.DELETE_VIEW: {\n return deleteView(state, action.payload);\n }\n case ViewSettingsActionTypes.LOAD_VIEW: {\n return loadView(state, action.payload);\n }\n default:\n return state;\n }\n};\n"]}
1
+ {"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AAmBzD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,cAAc,EAAE,gBAAgB;IAChC,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,kBAAkB;IACpC,sBAAsB,EAAE,wBAAwB;IAChD,qBAAqB,EAAE,uBAAuB;IAC9C,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,WAAW,EAAE,aAAa;IAC1B,oBAAoB,E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BAAmB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD;;;;;;;;;;;;;;WAcG;QACH,KAAK,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC;YACjC,OAAO,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,KAAK,uBAAuB,CAAC,iBAAiB,CAAC,CAAC,CAAC;YAC7C,OAAO,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC;QACD,KAAK,uBAAuB,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACzD,OAAO,0BAA0B,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QACD,KAAK,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;YACxC,OAAO,4BAA4B,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/D,CAAC;QACD,KAAK,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,OAAO,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,KAAK,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC;YACvC,OAAO,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,KAAK,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC;YACrC,OAAO,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06\n// This file is released under LGPL V3\n// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt\nimport {AttributeFormat, type RecordFilterCondition, type SortOrder} from '_ui/_gqlTypes';\nimport {type DefaultViewSettings, type Entrypoint, type IUserView, type MassSelection} from '../../_types';\nimport {hasOnlyNoValueConditions, nullValueConditions} from '../../conditionsHelper';\nimport {AttributeConditionFilter, ThroughConditionFilter} from '_ui/types';\nimport {DefaultViewId} from './viewSettingsInitialState';\nimport {isLinkAttribute} from '_ui/_utils/attributeType';\nimport {\n conditionsByFormat,\n getFirstConditionByFilterType,\n} from '_ui/components/Filters/filter-items/filter-type/useConditionOptionsByType';\nimport {\n isUIFilterLink,\n isUIFilterStandard,\n isUIFilterThrough,\n isUIFilterTree,\n isUIFilterValueList,\n type IUIFilterStandard,\n type IUIFilterTree,\n type UIFilter,\n} from '_ui/components/Filters';\n\nexport type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';\n\nexport const ViewSettingsActionTypes = {\n RESET: 'RESET',\n ADD_ATTRIBUTE: 'ADD_ATTRIBUTE',\n REMOVE_ATTRIBUTE: 'REMOVE_ATTRIBUTE',\n MOVE_ATTRIBUTE: 'MOVE_ATTRIBUTE',\n RESET_ATTRIBUTES: 'RESET_ATTRIBUTES',\n CHANGE_VIEW_TYPE: 'CHANGE_VIEW_TYPE',\n ADD_SORT: 'ADD_SORT',\n REMOVE_SORT: 'REMOVE_SORT',\n MOVE_SORT: 'MOVE_SORT',\n CHANGE_SORT_ORDER: 'CHANGE_SORT_ORDER',\n CHANGE_PAGE_SIZE: 'CHANGE_PAGE_SIZE',\n CHANGE_FULLTEXT_SEARCH: 'CHANGE_FULLTEXT_SEARCH',\n CLEAR_FULLTEXT_SEARCH: 'CLEAR_FULLTEXT_SEARCH',\n ADD_FILTER: 'ADD_FILTER',\n RESET_FILTER: 'RESET_FILTER',\n REMOVE_FILTER: 'REMOVE_FILTER',\n MOVE_FILTER: 'MOVE_FILTER',\n CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG',\n SET_SELECTED_KEYS: 'SET_SELECTED_KEYS',\n RESTORE_INITIAL_VIEW_SETTINGS: 'RESTORE_INITIAL_VIEW_SETTINGS',\n UPDATE_VIEWS: 'UPDATE_VIEWS',\n RENAME_VIEW: 'RENAME_VIEW',\n DELETE_VIEW: 'DELETE_VIEW',\n LOAD_VIEW: 'LOAD_VIEW',\n} as const;\n\nexport interface IViewSettingsState {\n libraryId: string;\n viewId: string | null;\n viewLabels: Record<string, string>;\n viewModified: boolean;\n entrypoint: Entrypoint;\n viewType: ViewType;\n savedViews: IUserView[];\n attributesIds: string[];\n fulltextSearch: string;\n sort: Array<{\n field: string;\n order: SortOrder;\n }>;\n pageSize: number;\n initialViewSettings: Pick<IViewSettingsState, 'viewType' | 'attributesIds' | 'sort' | 'pageSize'>;\n defaultViewSettings: DefaultViewSettings;\n massSelection: MassSelection;\n enableConfigureView?: boolean;\n}\n\ninterface IViewSettingsActionChangePageSize {\n type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;\n payload: {pageSize: number};\n}\n\ninterface IViewSettingsActionAddAttribute {\n type: typeof ViewSettingsActionTypes.ADD_ATTRIBUTE;\n payload: {attributeId: string};\n}\n\ninterface IViewSettingsActionRemoveAttribute {\n type: typeof ViewSettingsActionTypes.REMOVE_ATTRIBUTE;\n payload: {attributeId: string};\n}\n\ninterface IViewSettingsActionMoveAttribute {\n type: typeof ViewSettingsActionTypes.MOVE_ATTRIBUTE;\n payload: {\n indexFrom: number;\n indexTo: number;\n };\n}\n\ninterface IViewSettingsActionChangeViewType {\n type: typeof ViewSettingsActionTypes.CHANGE_VIEW_TYPE;\n payload: {viewType: ViewType};\n}\n\ninterface IViewSettingsActionResetAttributes {\n type: typeof ViewSettingsActionTypes.RESET_ATTRIBUTES;\n}\n\ninterface IViewSettingsActionAddSort {\n type: typeof ViewSettingsActionTypes.ADD_SORT;\n payload: {field: string; order: SortOrder};\n}\n\ninterface IViewSettingsActionRemoveSort {\n type: typeof ViewSettingsActionTypes.REMOVE_SORT;\n payload: {field: string};\n}\n\ninterface IViewSettingsActionChangeSortOrder {\n type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;\n payload: {field: string; order: SortOrder};\n}\n\ninterface IViewSettingsActionMoveSort {\n type: typeof ViewSettingsActionTypes.MOVE_SORT;\n payload: {\n indexFrom: number;\n indexTo: number;\n };\n}\n\ninterface IViewSettingsActionChangeFulltextSearch {\n type: typeof ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH;\n payload: {search: string};\n}\n\ninterface IViewSettingsActionClearFulltextSearch {\n type: typeof ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH;\n}\n\ninterface IViewSettingsActionAddFilter {\n type: typeof ViewSettingsActionTypes.ADD_FILTER;\n payload: Omit<UIFilter, 'id' | 'value' | 'condition'>;\n}\n\ninterface IViewSettingsActionResetFilter {\n type: typeof ViewSettingsActionTypes.RESET_FILTER;\n payload: Pick<UIFilter, 'id'>;\n}\n\ninterface IViewSettingsActionRemoveFilter {\n type: typeof ViewSettingsActionTypes.REMOVE_FILTER;\n payload: Pick<UIFilter, 'id'>;\n}\n\ninterface IViewSettingsActionChangeFilterConfig {\n type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;\n payload: UIFilter | IUIFilterTree;\n}\n\ninterface IViewSettingsActionMoveFilter {\n type: typeof ViewSettingsActionTypes.MOVE_FILTER;\n payload: {\n indexFrom: number;\n indexTo: number;\n };\n}\n\ninterface IViewSettingsActionReset {\n type: typeof ViewSettingsActionTypes.RESET;\n payload: IViewSettingsState;\n}\n\ninterface IViewSettingsActionSetSelectedKeys {\n type: typeof ViewSettingsActionTypes.SET_SELECTED_KEYS;\n payload: MassSelection;\n}\n\ninterface IViewSettingsActionRestoreInitialViewSettings {\n type: typeof ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS;\n}\n\ninterface IViewSettingsActionUpdateViewListAndCurrentView {\n type: typeof ViewSettingsActionTypes.UPDATE_VIEWS;\n payload: IUserView;\n}\n\ninterface IViewDataPayload {\n id: string;\n label: Record<string, string>;\n}\n\ninterface IViewSettingsActionRenameView {\n type: typeof ViewSettingsActionTypes.RENAME_VIEW;\n payload: IViewDataPayload;\n}\n\ninterface IViewSettingsActionDeleteView {\n type: typeof ViewSettingsActionTypes.DELETE_VIEW;\n payload: {id: string};\n}\n\nexport type IViewSettingsActionLoadViewPayload = Pick<\n IViewSettingsState,\n 'viewId' | 'viewLabels' | 'viewType' | 'attributesIds' | 'sort'\n>;\n\ninterface IViewSettingsActionLoadView {\n type: typeof ViewSettingsActionTypes.LOAD_VIEW;\n payload: IViewSettingsActionLoadViewPayload;\n}\n\ntype Reducer<\n PAYLOAD extends {\n type: keyof typeof ViewSettingsActionTypes;\n payload?: unknown;\n } = {type: any; payload: 'no_payload'},\n> = PAYLOAD['payload'] extends 'no_payload'\n ? (state: IViewSettingsState) => IViewSettingsState\n : (state: IViewSettingsState, payload: PAYLOAD['payload']) => IViewSettingsState;\n\nconst changePageSize: Reducer<IViewSettingsActionChangePageSize> = (state, payload) => ({\n ...state,\n pageSize: payload.pageSize,\n});\n\nconst addAttribute: Reducer<IViewSettingsActionAddAttribute> = (state, payload) => ({\n ...state,\n attributesIds: [...state.attributesIds, payload.attributeId],\n viewModified: true,\n});\n\nconst removeAttribute: Reducer<IViewSettingsActionRemoveAttribute> = (state, payload) => ({\n ...state,\n attributesIds: state.attributesIds.filter(attributesId => attributesId !== payload.attributeId),\n viewModified: true,\n});\n\nconst moveAttribute: Reducer<IViewSettingsActionMoveAttribute> = (state, payload) => {\n const attributesIds = [...state.attributesIds];\n const [attributeIdToMove] = attributesIds.splice(payload.indexFrom, 1);\n // TODO use newES6 syntax (toSpliced)\n attributesIds.splice(payload.indexTo, 0, attributeIdToMove);\n return {\n ...state,\n attributesIds,\n viewModified: true,\n };\n};\n\nconst resetAttributes: Reducer = state => ({\n ...state,\n attributesIds: [],\n});\n\nconst changeViewType: Reducer<IViewSettingsActionChangeViewType> = (state, payload) => ({\n ...state,\n viewType: payload.viewType,\n viewModified: true,\n});\n\nconst addSort: Reducer<IViewSettingsActionAddSort> = (state, payload) => ({\n ...state,\n sort: [...state.sort, {field: payload.field, order: payload.order}],\n viewModified: true,\n});\n\nconst removeSort: Reducer<IViewSettingsActionRemoveSort> = (state, payload) => ({\n ...state,\n sort: state.sort.filter(({field: attributeId}) => attributeId !== payload.field),\n viewModified: true,\n});\n\nconst changeSortOrder: Reducer<IViewSettingsActionChangeSortOrder> = (state, payload) => ({\n ...state,\n sort: state.sort.map(sort => (sort.field === payload.field ? {...sort, order: payload.order} : sort)),\n viewModified: true,\n});\n\nconst moveSort: Reducer<IViewSettingsActionMoveSort> = (state, payload) => {\n const attributesUsedToSort = [...state.sort];\n const [sortToMove] = attributesUsedToSort.splice(payload.indexFrom, 1);\n attributesUsedToSort.splice(payload.indexTo, 0, sortToMove);\n return {\n ...state,\n sort: attributesUsedToSort,\n viewModified: true,\n };\n};\n\nconst changeFulltextSearch: Reducer<IViewSettingsActionChangeFulltextSearch> = (state, payload) => ({\n ...state,\n fulltextSearch: payload.search,\n});\n\nexport const clearFulltextSearch: Reducer = state => ({\n ...state,\n fulltextSearch: '',\n});\n\nconst reset: Reducer<IViewSettingsActionReset> = (_, payload) => payload;\n\nconst setSelectedKeys: Reducer<IViewSettingsActionSetSelectedKeys> = (state, payload) => ({\n ...state,\n massSelection: payload,\n});\n\nconst restoreInitialViewSettings: Reducer = state => ({\n ...state,\n ...state.initialViewSettings,\n viewModified: false,\n});\n\nconst updateViewListAndCurrentView: Reducer<IViewSettingsActionUpdateViewListAndCurrentView> = (state, payload) => ({\n ...state,\n viewId: payload.id ?? null,\n viewLabels: payload.label,\n savedViews: state.savedViews.find(({id}) => id === payload.id)\n ? state.savedViews.map(view => (view.id === payload.id ? payload : view))\n : state.savedViews.concat([payload]),\n initialViewSettings: {\n viewType: state.viewType,\n attributesIds: state.attributesIds,\n sort: state.sort,\n pageSize: state.pageSize,\n },\n viewModified: false,\n});\n\nconst renameView: Reducer<IViewSettingsActionRenameView> = (state, payload) => ({\n ...state,\n viewLabels: payload.label,\n savedViews: state.savedViews.map(view => (view.id === payload.id ? {...view, label: payload?.label} : view)),\n});\n\nconst deleteView: Reducer<IViewSettingsActionDeleteView> = (state, payload) => {\n const newSavedViews = [...state.savedViews];\n const indexViewDeleted = newSavedViews.findIndex(view => view.id === payload.id);\n // TODO use newES6 syntax (toSpliced)\n if (indexViewDeleted !== -1) {\n newSavedViews.splice(indexViewDeleted, 1);\n }\n if (state.viewId === payload.id) {\n const defaultViewSettings = {\n ...state.defaultViewSettings,\n viewId: DefaultViewId,\n viewLabels: {},\n viewModified: false,\n };\n return {\n ...state,\n ...defaultViewSettings,\n savedViews: newSavedViews,\n };\n }\n return {\n ...state,\n savedViews: newSavedViews,\n };\n};\n\nconst loadView: Reducer<IViewSettingsActionLoadView> = (state, payload) => ({\n ...state,\n ...payload,\n initialViewSettings: {\n viewType: payload.viewType,\n attributesIds: payload.attributesIds,\n sort: payload.sort,\n pageSize: state.pageSize,\n },\n viewModified: false,\n});\n\nexport type IViewSettingsAction =\n | IViewSettingsActionResetAttributes\n | IViewSettingsActionAddAttribute\n | IViewSettingsActionRemoveAttribute\n | IViewSettingsActionMoveAttribute\n | IViewSettingsActionChangeViewType\n | IViewSettingsActionAddSort\n | IViewSettingsActionRemoveSort\n | IViewSettingsActionChangeSortOrder\n | IViewSettingsActionMoveSort\n | IViewSettingsActionChangePageSize\n | IViewSettingsActionChangeFulltextSearch\n | IViewSettingsActionClearFulltextSearch\n | IViewSettingsActionAddFilter\n | IViewSettingsActionResetFilter\n | IViewSettingsActionRemoveFilter\n | IViewSettingsActionChangeFilterConfig\n | IViewSettingsActionMoveFilter\n | IViewSettingsActionReset\n | IViewSettingsActionSetSelectedKeys\n | IViewSettingsActionRestoreInitialViewSettings\n | IViewSettingsActionUpdateViewListAndCurrentView\n | IViewSettingsActionRenameView\n | IViewSettingsActionDeleteView\n | IViewSettingsActionLoadView;\n\nexport const viewSettingsReducer = (state: IViewSettingsState, action: IViewSettingsAction): IViewSettingsState => {\n switch (action.type) {\n case ViewSettingsActionTypes.CHANGE_PAGE_SIZE: {\n return changePageSize(state, action.payload);\n }\n case ViewSettingsActionTypes.ADD_ATTRIBUTE: {\n return addAttribute(state, action.payload);\n }\n case ViewSettingsActionTypes.REMOVE_ATTRIBUTE: {\n return removeAttribute(state, action.payload);\n }\n case ViewSettingsActionTypes.MOVE_ATTRIBUTE: {\n return moveAttribute(state, action.payload);\n }\n case ViewSettingsActionTypes.RESET_ATTRIBUTES: {\n return resetAttributes(state);\n }\n case ViewSettingsActionTypes.CHANGE_VIEW_TYPE: {\n return changeViewType(state, action.payload);\n }\n case ViewSettingsActionTypes.ADD_SORT: {\n return addSort(state, action.payload);\n }\n case ViewSettingsActionTypes.REMOVE_SORT: {\n return removeSort(state, action.payload);\n }\n case ViewSettingsActionTypes.MOVE_SORT: {\n return moveSort(state, action.payload);\n }\n case ViewSettingsActionTypes.CHANGE_SORT_ORDER: {\n return changeSortOrder(state, action.payload);\n }\n case ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH: {\n return changeFulltextSearch(state, action.payload);\n }\n case ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH: {\n return clearFulltextSearch(state);\n }\n /*case ViewSettingsActionTypes.ADD_FILTER: {\n return addFilter(state, action.payload);\n }\n case ViewSettingsActionTypes.RESET_FILTER: {\n return resetFilter(state, action.payload);\n }\n case ViewSettingsActionTypes.REMOVE_FILTER: {\n return removeFilter(state, action.payload);\n }\n case ViewSettingsActionTypes.CHANGE_FILTER_CONFIG: {\n return changeFilterConfig(state, action.payload);\n }\n case ViewSettingsActionTypes.MOVE_FILTER: {\n return moveFilter(state, action.payload);\n }*/\n case ViewSettingsActionTypes.RESET: {\n return reset(state, action.payload);\n }\n case ViewSettingsActionTypes.SET_SELECTED_KEYS: {\n return setSelectedKeys(state, action.payload);\n }\n case ViewSettingsActionTypes.RESTORE_INITIAL_VIEW_SETTINGS: {\n return restoreInitialViewSettings(state);\n }\n case ViewSettingsActionTypes.UPDATE_VIEWS: {\n return updateViewListAndCurrentView(state, action.payload);\n }\n case ViewSettingsActionTypes.RENAME_VIEW: {\n return renameView(state, action.payload);\n }\n case ViewSettingsActionTypes.DELETE_VIEW: {\n return deleteView(state, action.payload);\n }\n case ViewSettingsActionTypes.LOAD_VIEW: {\n return loadView(state, action.payload);\n }\n default:\n return state;\n }\n};\n"]}
@@ -3,12 +3,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
6
- import { KitInput } from 'aristid-ds';
6
+ import { KitSearchInput } from 'aristid-ds';
7
7
  import { useState } from 'react';
8
8
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
9
  import { faMagnifyingGlass } from '@fortawesome/free-solid-svg-icons';
10
10
  import { ViewSettingsActionTypes, } from './manage-view-settings/store-view-settings/viewSettingsReducer';
11
11
  import { MASS_SELECTION_ALL } from './_constants';
12
+ import styled from 'styled-components';
13
+ const SearchInputStyled = styled(KitSearchInput) `
14
+ width: 214px;
15
+ `;
12
16
  /**
13
17
  * Hook used to handle a full search text in a library
14
18
  *
@@ -37,7 +41,7 @@ export const useSearchInput = ({ view, dispatch, setNewPage, }) => {
37
41
  setNewPage(1, 0);
38
42
  };
39
43
  return {
40
- searchInput: view.entrypoint.type === 'library' ? (_jsx("form", { onSubmit: _handleSubmit, children: _jsx(KitInput, { prefix: _jsx(FontAwesomeIcon, { icon: faMagnifyingGlass }), title: String(t('global.search')), placeholder: String(t('global.search')), value: search ?? '', disabled: view.massSelection === MASS_SELECTION_ALL, onChange: _handleChange, size: "middle" }) })) : null,
44
+ searchInput: view.entrypoint.type === 'library' ? (_jsx("form", { onSubmit: _handleSubmit, children: _jsx(SearchInputStyled, { prefix: _jsx(FontAwesomeIcon, { icon: faMagnifyingGlass }), title: String(t('global.search')), placeholder: String(t('global.search')), value: search ?? '', disabled: view.massSelection === MASS_SELECTION_ALL, onChange: _handleChange, size: "middle", expandable: true }) })) : null,
41
45
  };
42
46
  };
43
47
  //# sourceMappingURL=useSearchInput.js.map