@leav/ui 0.3.6-c939f2f → 0.3.6-cc1031e

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 (429) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +9 -1
  3. package/dist/__mocks__/common/attribute.js.map +1 -1
  4. package/dist/__mocks__/common/form.d.ts +11 -5
  5. package/dist/__mocks__/common/form.js +18 -2
  6. package/dist/__mocks__/common/form.js.map +1 -1
  7. package/dist/__mocks__/common/record.d.ts +13 -2
  8. package/dist/__mocks__/common/record.js.map +1 -1
  9. package/dist/__mocks__/common/value.js +3 -1
  10. package/dist/__mocks__/common/value.js.map +1 -1
  11. package/dist/__mocks__/common/view.js +7 -5
  12. package/dist/__mocks__/common/view.js.map +1 -1
  13. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
  14. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
  15. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
  16. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
  17. package/dist/_gqlTypes/index.d.ts +462 -77
  18. package/dist/_gqlTypes/index.js +1274 -1055
  19. package/dist/_gqlTypes/index.js.map +1 -1
  20. package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
  21. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
  22. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
  23. package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
  24. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  25. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  26. package/dist/_queries/records/getRecordsFromLibraryQuery.js +1 -0
  27. package/dist/_queries/records/getRecordsFromLibraryQuery.js.map +1 -1
  28. package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
  29. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  30. package/dist/_queries/views/saveViewMutation.js +1 -1
  31. package/dist/_queries/views/viewDetailsFragment.js +14 -11
  32. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  33. package/dist/_utils/index.js +5 -2
  34. package/dist/_utils/index.js.map +1 -1
  35. package/dist/_utils/interleaveElement.d.ts +1 -0
  36. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  37. package/dist/_utils/interleaveElement.js.map +1 -0
  38. package/dist/antdTheme/index.d.ts +0 -3
  39. package/dist/antdTheme/index.js +3 -42
  40. package/dist/antdTheme/index.js.map +1 -1
  41. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  42. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  43. package/dist/components/EditApplication/EditApplication.js +2 -2
  44. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  45. package/dist/components/EditApplication/_types.d.ts +2 -2
  46. package/dist/components/Explorer/DataView.d.ts +10 -1
  47. package/dist/components/Explorer/DataView.js +37 -36
  48. package/dist/components/Explorer/DataView.js.map +1 -1
  49. package/dist/components/Explorer/Explorer.d.ts +9 -5
  50. package/dist/components/Explorer/Explorer.js +61 -17
  51. package/dist/components/Explorer/Explorer.js.map +1 -1
  52. package/dist/components/Explorer/ExplorerTitle.d.ts +9 -0
  53. package/dist/components/Explorer/ExplorerTitle.js +47 -0
  54. package/dist/components/Explorer/ExplorerTitle.js.map +1 -0
  55. package/dist/components/Explorer/IdCard.d.ts +7 -0
  56. package/dist/components/Explorer/IdCard.js +15 -0
  57. package/dist/components/Explorer/IdCard.js.map +1 -0
  58. package/dist/components/Explorer/TableCell.d.ts +8 -0
  59. package/dist/components/Explorer/TableCell.js +144 -0
  60. package/dist/components/Explorer/TableCell.js.map +1 -0
  61. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  62. package/dist/components/Explorer/TableTagGroup.js +30 -0
  63. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  64. package/dist/components/Explorer/_constants.d.ts +4 -0
  65. package/dist/components/Explorer/_constants.js +17 -0
  66. package/dist/components/Explorer/_constants.js.map +1 -0
  67. package/dist/components/Explorer/_queries/useExplorerData.d.ts +31 -7
  68. package/dist/components/Explorer/_queries/useExplorerData.js +199 -19
  69. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  70. package/dist/components/Explorer/_types.d.ts +63 -3
  71. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  72. package/dist/components/Explorer/conditionsHelper.js +16 -0
  73. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  74. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +4 -0
  75. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +47 -0
  76. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js.map +1 -0
  77. package/dist/components/Explorer/index.d.ts +1 -3
  78. package/dist/components/Explorer/index.js +1 -3
  79. package/dist/components/Explorer/index.js.map +1 -1
  80. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +12 -0
  81. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
  82. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  83. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
  84. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  85. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  86. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
  87. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
  88. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  89. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  90. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  91. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  92. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  93. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
  94. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  95. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  96. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  97. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  98. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  99. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +78 -0
  100. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  101. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  102. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  103. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  104. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  105. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +22 -0
  106. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  107. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  108. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  109. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  110. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  111. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  112. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  113. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  114. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  115. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  116. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  117. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  118. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  119. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  120. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  121. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  122. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  123. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +71 -0
  124. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  125. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  126. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  127. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  128. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  129. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +19 -0
  130. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  131. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  132. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +28 -0
  133. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  134. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +11 -0
  135. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +100 -0
  136. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  137. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  138. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  139. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  140. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +2 -0
  141. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +1 -0
  142. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  143. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +7 -0
  144. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
  145. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  146. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
  147. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  148. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  149. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +5 -0
  150. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +39 -0
  151. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  152. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +4 -2
  153. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  154. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +8 -0
  155. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +70 -0
  156. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  157. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  158. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
  159. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  160. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  161. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  162. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  163. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.d.ts +6 -0
  164. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +11 -0
  165. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  166. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.d.ts +4 -0
  167. package/dist/components/{RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js → Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js} +3 -3
  168. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  169. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
  170. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +24 -0
  171. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  172. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +145 -0
  173. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +199 -0
  174. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  175. package/dist/components/Explorer/{useCreateMainAction.d.ts → useCreateAction.d.ts} +5 -3
  176. package/dist/components/Explorer/useCreateAction.js +73 -0
  177. package/dist/components/Explorer/useCreateAction.js.map +1 -0
  178. package/dist/components/Explorer/useEditAction.js +9 -7
  179. package/dist/components/Explorer/useEditAction.js.map +1 -1
  180. package/dist/components/Explorer/usePagination.d.ts +7 -0
  181. package/dist/components/Explorer/usePagination.js +25 -0
  182. package/dist/components/Explorer/usePagination.js.map +1 -0
  183. package/dist/components/Explorer/usePrimaryActions.d.ts +12 -0
  184. package/dist/components/Explorer/usePrimaryActions.js +28 -0
  185. package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
  186. package/dist/components/Explorer/useRemoveAction.d.ts +12 -0
  187. package/dist/components/Explorer/useRemoveAction.js +90 -0
  188. package/dist/components/Explorer/useRemoveAction.js.map +1 -0
  189. package/dist/components/Explorer/useSearchInput.d.ts +10 -0
  190. package/dist/components/Explorer/useSearchInput.js +31 -0
  191. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  192. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  193. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  194. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  195. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  196. package/dist/components/Explorer/useViewSettingsReducer.js +126 -0
  197. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  198. package/dist/components/ExportModal/ExportModal.js +2 -2
  199. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  200. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  201. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  202. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  203. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  204. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  205. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  206. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js +7 -2
  207. package/dist/components/LibraryItemsList/LibraryItemsListTable/Cell/StandardCell/StandardCell.js.map +1 -1
  208. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  209. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  210. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
  211. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  212. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  213. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  214. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  215. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  216. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  217. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  218. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  219. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  220. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  221. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  222. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  223. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  224. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  225. package/dist/components/RecordEdition/EditRecord/EditRecord.js +10 -18
  226. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  227. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +16 -3
  228. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  229. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +10 -21
  230. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  231. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  232. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  233. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  234. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  235. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  236. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  237. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  238. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  239. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  240. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  241. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  242. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  243. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  244. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  245. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  246. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  247. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  248. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  249. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
  250. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  251. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  252. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  253. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  254. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  255. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +178 -186
  256. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  257. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  258. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +11 -30
  259. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  260. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  261. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +73 -45
  262. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  263. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  264. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +35 -46
  265. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  266. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  267. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +11 -76
  268. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  269. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  270. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +32 -49
  271. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  272. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  273. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +38 -54
  274. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  275. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  276. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +51 -63
  277. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  278. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  279. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +33 -53
  280. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  281. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +17 -9
  282. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +67 -401
  283. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  284. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  285. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +48 -52
  286. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  287. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  288. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +16 -0
  289. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  290. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  291. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  292. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
  293. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  294. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  295. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +32 -0
  296. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  297. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  298. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  299. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
  300. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  301. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
  302. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  303. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  304. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  305. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +36 -3
  306. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  307. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  308. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  309. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  310. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  311. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  312. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  313. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  314. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  315. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  316. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
  317. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
  318. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  319. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js +1 -13
  320. package/dist/components/RecordEdition/EditRecordSidebar/ValueDetails/ValueDetails.js.map +1 -1
  321. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  322. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  323. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  324. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  325. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
  326. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  327. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  328. package/dist/components/SelectTreeNode/index.js +1 -1
  329. package/dist/components/SelectTreeNode/index.js.map +1 -1
  330. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  331. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  332. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  333. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  334. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  335. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  336. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  337. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  338. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  339. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  340. package/dist/constants.d.ts +3 -0
  341. package/dist/constants.js +3 -0
  342. package/dist/constants.js.map +1 -1
  343. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  344. package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
  345. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  346. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  347. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer → hooks/useExecuteSaveViewMutation}/index.js +1 -2
  348. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  349. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  350. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
  351. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  352. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  353. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  354. package/dist/locales/en/shared.json +71 -10
  355. package/dist/locales/fr/shared.json +71 -10
  356. package/dist/types/views.d.ts +4 -4
  357. package/package.json +7 -2
  358. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -2
  359. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -10
  360. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  361. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  362. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
  363. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  364. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  365. package/dist/components/Explorer/edit-settings/SettingsPanel.d.ts +0 -3
  366. package/dist/components/Explorer/edit-settings/SettingsPanel.js +0 -53
  367. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  368. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  369. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  370. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  371. package/dist/components/Explorer/edit-settings/useOpenSettings.js +0 -19
  372. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  373. package/dist/components/Explorer/useCreateMainAction.js +0 -36
  374. package/dist/components/Explorer/useCreateMainAction.js.map +0 -1
  375. package/dist/components/Explorer/useDeactivateAction.d.ts +0 -12
  376. package/dist/components/Explorer/useDeactivateAction.js +0 -51
  377. package/dist/components/Explorer/useDeactivateAction.js.map +0 -1
  378. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  379. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  380. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  381. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  382. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  383. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  384. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  385. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  386. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  387. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.d.ts +0 -8
  388. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js +0 -23
  389. package/dist/components/RecordEdition/EditRecordContent/shared/ValueDetailsBtn/useValueDetailsButton.js.map +0 -1
  390. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  391. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  392. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  393. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  394. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  395. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  396. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  397. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  398. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  399. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  400. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  401. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  402. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  403. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  404. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  405. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  406. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  407. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  408. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  409. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  410. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  411. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  412. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  413. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  414. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  415. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  416. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  417. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  418. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  419. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  420. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  421. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  422. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  423. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  424. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  425. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
  426. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  427. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  428. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  429. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_constants.js","sourceRoot":"","sources":["../../../src/components/Explorer/_constants.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAGxC,yJAAyJ;AACzJ,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IACxE,KAAK,EAAE,SAAS,CAAC,IAAI;IACrB,MAAM,EAAE,SAAS,CAAC,KAAK;IACvB,QAAQ,EAAE,SAAS,CAAC,QAAQ;IAC5B,IAAI,EAAE,SAAS,CAAC,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IACxE,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO;IACzB,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,QAAQ;IAC3B,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,UAAU;CACnC,CAAC"}
@@ -1,11 +1,35 @@
1
- import { IItemData } from '../_types';
2
- import { ExplorerQuery } from '../../../_gqlTypes';
3
- export declare const useExplorerData: (libraryId: string, attributeIds: string[]) => {
4
- data: IItemData[];
1
+ import { Entrypoint, IExplorerData, IExplorerFilter } from '../_types';
2
+ import { ExplorerLibraryDataQuery, ExplorerLinkDataQuery, RecordFilterInput, SortOrder } from '../../../_gqlTypes';
3
+ export declare const dateValuesSeparator = "\n";
4
+ export declare const useExplorerData: ({ entrypoint, libraryId, attributeIds, fulltextSearch, sorts, pagination, filters, skip }: {
5
+ entrypoint: Entrypoint;
6
+ libraryId: string;
7
+ attributeIds: string[];
8
+ fulltextSearch: string;
9
+ sorts: Array<{
10
+ field: string;
11
+ order: SortOrder;
12
+ }>;
13
+ pagination: null | {
14
+ limit: number;
15
+ offset: number;
16
+ };
17
+ filters: IExplorerFilter[];
18
+ skip: boolean;
19
+ }) => {
20
+ data: IExplorerData;
5
21
  loading: boolean;
6
- refetch: (variables?: Partial<import("../../../_gqlTypes").Exact<{
22
+ refetch: ((variables?: Partial<import("../../../_gqlTypes").Exact<{
7
23
  libraryId: import("../../../_gqlTypes").Scalars["ID"];
8
24
  attributeIds: Array<import("../../../_gqlTypes").Scalars["ID"]> | import("../../../_gqlTypes").Scalars["ID"];
9
- filters?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordFilterInput>> | import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordFilterInput>>;
10
- }>>) => Promise<import("@apollo/client").ApolloQueryResult<ExplorerQuery>>;
25
+ pagination?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordsPagination>;
26
+ filters?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").InputMaybe<RecordFilterInput>> | import("../../../_gqlTypes").InputMaybe<RecordFilterInput>>;
27
+ multipleSort?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").RecordSortInput> | import("../../../_gqlTypes").RecordSortInput>;
28
+ searchQuery?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").Scalars["String"]>;
29
+ }>>) => Promise<import("@apollo/client").ApolloQueryResult<ExplorerLibraryDataQuery>>) | ((variables?: Partial<import("../../../_gqlTypes").Exact<{
30
+ attributeIds: Array<import("../../../_gqlTypes").Scalars["ID"]> | import("../../../_gqlTypes").Scalars["ID"];
31
+ parentLibraryId: import("../../../_gqlTypes").Scalars["ID"];
32
+ parentRecordId?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").Scalars["String"]>;
33
+ linkAttributeId: import("../../../_gqlTypes").Scalars["ID"];
34
+ }>>) => Promise<import("@apollo/client").ApolloQueryResult<ExplorerLinkDataQuery>>);
11
35
  };
@@ -1,23 +1,203 @@
1
- import { useExplorerQuery } from '../../../_gqlTypes';
2
- const _mapping = (data, libraryId) => data.records.list.map(({ whoAmI, properties }) => ({
3
- libraryId,
4
- key: whoAmI.id, // For <KitTable /> only
5
- itemId: whoAmI.id, // For <KitTable /> only
6
- whoAmI: {
7
- label: null,
8
- subLabel: null,
9
- color: null,
10
- preview: null,
11
- ...whoAmI
12
- },
13
- propertiesById: properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {})
14
- }));
15
- export const useExplorerData = (libraryId, attributeIds) => {
16
- const { data, loading, refetch } = useExplorerQuery({ variables: { libraryId, attributeIds } });
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
+ import { localizedTranslation } from '@leav/utils';
5
+ import { AttributeFormat, RecordFilterCondition, RecordFilterOperator, useExplorerLibraryDataQuery, useExplorerLinkDataQuery } from '../../../_gqlTypes';
6
+ import { useLang } from '../../../hooks';
7
+ import { useMemo } from 'react';
8
+ import { interleaveElement } from '../../../_utils/interleaveElement';
9
+ import dayjs from 'dayjs';
10
+ import { nullValueConditions } from '../conditionsHelper';
11
+ import { AttributeConditionFilter } from '../../../types';
12
+ export const dateValuesSeparator = '\n';
13
+ const _mappingLibrary = (data, libraryId, availableLangs) => {
14
+ const attributes = data.records.list.length
15
+ ? data.records.list[0].properties.reduce((acc, property) => {
16
+ acc[property.attributeId] = {
17
+ ...property.attributeProperties,
18
+ label: localizedTranslation(property.attributeProperties.label, availableLangs)
19
+ };
20
+ return acc;
21
+ }, {})
22
+ : {};
23
+ const records = data.records.list.map(({ whoAmI, properties }) => ({
24
+ libraryId,
25
+ key: whoAmI.id, // For <KitTable /> only
26
+ itemId: whoAmI.id, // For <KitTable /> only
27
+ whoAmI: {
28
+ label: null,
29
+ subLabel: null,
30
+ color: null,
31
+ preview: null,
32
+ ...whoAmI
33
+ },
34
+ propertiesById: properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {})
35
+ }));
17
36
  return {
18
- data: data !== undefined ? _mapping(data, libraryId) : null,
19
- loading,
20
- refetch
37
+ totalCount: data.records.totalCount ?? 0,
38
+ attributes,
39
+ records
40
+ };
41
+ };
42
+ const _mappingLink = (data, libraryId, availableLangs) => {
43
+ const attributes = data.records.list.length
44
+ ? (data.records.list[0].property[0]?.payload?.properties ?? []).reduce((acc, property) => {
45
+ acc[property.attributeId] = {
46
+ ...property.attributeProperties,
47
+ label: localizedTranslation(property.attributeProperties.label, availableLangs)
48
+ };
49
+ return acc;
50
+ }, {})
51
+ : {};
52
+ const records = data.records.list[0].property
53
+ .map((linkValue) => {
54
+ if (!linkValue.payload) {
55
+ return null;
56
+ }
57
+ return {
58
+ libraryId,
59
+ key: linkValue.payload.whoAmI.id, // For <KitTable /> only
60
+ itemId: linkValue.payload.whoAmI.id, // For <KitTable /> only
61
+ whoAmI: {
62
+ label: null,
63
+ subLabel: null,
64
+ color: null,
65
+ preview: null,
66
+ ...linkValue.payload.whoAmI
67
+ },
68
+ propertiesById: linkValue.payload.properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {}),
69
+ id_value: linkValue.id_value
70
+ };
71
+ })
72
+ .filter(Boolean);
73
+ return {
74
+ totalCount: records.length,
75
+ attributes,
76
+ records
77
+ };
78
+ };
79
+ const _getDateRequestFilters = ({ field, condition, value }) => {
80
+ switch (condition) {
81
+ case RecordFilterCondition.BETWEEN:
82
+ const [from, to] = value.split(dateValuesSeparator);
83
+ return [
84
+ {
85
+ field,
86
+ condition,
87
+ value: JSON.stringify({
88
+ from,
89
+ to
90
+ })
91
+ }
92
+ ];
93
+ case RecordFilterCondition.NOT_EQUAL:
94
+ return [
95
+ {
96
+ field,
97
+ condition: RecordFilterCondition.LESS_THAN,
98
+ value: dayjs.unix(Number(value)).startOf('day').unix().toString()
99
+ },
100
+ { operator: RecordFilterOperator.OR },
101
+ {
102
+ field,
103
+ condition: RecordFilterCondition.GREATER_THAN,
104
+ value: dayjs.unix(Number(value)).endOf('day').unix().toString()
105
+ },
106
+ { operator: RecordFilterOperator.OR },
107
+ {
108
+ field,
109
+ condition: RecordFilterCondition.IS_EMPTY,
110
+ value: null
111
+ }
112
+ ];
113
+ case RecordFilterCondition.EQUAL:
114
+ return [
115
+ {
116
+ field,
117
+ condition: RecordFilterCondition.BETWEEN,
118
+ value: JSON.stringify({
119
+ from: dayjs.unix(Number(value)).startOf('day').unix().toString(),
120
+ to: dayjs.unix(Number(value)).endOf('day').unix().toString()
121
+ })
122
+ }
123
+ ];
124
+ default:
125
+ return [
126
+ {
127
+ field,
128
+ condition,
129
+ value
130
+ }
131
+ ];
132
+ }
133
+ };
134
+ const _getBooleanRequestFilters = ({ field, condition, value }) => {
135
+ if (value === 'false') {
136
+ return [
137
+ {
138
+ field,
139
+ condition: AttributeConditionFilter.NOT_EQUAL,
140
+ value: 'true'
141
+ }
142
+ ];
143
+ }
144
+ return [{ field, condition, value }];
145
+ };
146
+ export const useExplorerData = ({ entrypoint, libraryId, attributeIds, fulltextSearch, sorts, pagination, filters, skip }) => {
147
+ const { lang: availableLangs } = useLang();
148
+ const queryFilters = interleaveElement({ operator: RecordFilterOperator.AND }, filters
149
+ .filter(({ value, condition }) => value !== null || nullValueConditions.includes(condition))
150
+ .map(({ attribute, field, condition, value }) => {
151
+ switch (attribute.format) {
152
+ case AttributeFormat.date:
153
+ return _getDateRequestFilters({ field, condition, value });
154
+ case AttributeFormat.boolean:
155
+ return _getBooleanRequestFilters({ field, condition, value });
156
+ default:
157
+ return [
158
+ {
159
+ field,
160
+ condition,
161
+ value
162
+ }
163
+ ];
164
+ }
165
+ }));
166
+ const isLibrary = entrypoint.type === 'library';
167
+ const isLink = entrypoint.type === 'link';
168
+ const { data: linkData, loading: linkLoading, refetch: linkRefetch } = useExplorerLinkDataQuery({
169
+ skip: skip || !isLink,
170
+ variables: {
171
+ parentLibraryId: entrypoint.parentLibraryId,
172
+ parentRecordId: entrypoint.parentRecordId,
173
+ linkAttributeId: entrypoint.linkAttributeId,
174
+ attributeIds
175
+ }
176
+ });
177
+ const { data: libraryData, loading: libraryLoading, refetch: libraryRefetch } = useExplorerLibraryDataQuery({
178
+ skip: skip || !isLibrary,
179
+ variables: {
180
+ libraryId,
181
+ attributeIds,
182
+ pagination,
183
+ searchQuery: fulltextSearch,
184
+ multipleSort: sorts,
185
+ filters: queryFilters
186
+ }
187
+ });
188
+ const memoizedData = useMemo(() => {
189
+ if (isLibrary) {
190
+ return libraryData ? _mappingLibrary(libraryData, libraryId, availableLangs) : null;
191
+ }
192
+ if (isLink) {
193
+ return linkData ? _mappingLink(linkData, libraryId, availableLangs) : null;
194
+ }
195
+ return null;
196
+ }, [libraryData, linkData]);
197
+ return {
198
+ data: memoizedData,
199
+ loading: isLibrary ? libraryLoading : linkLoading,
200
+ refetch: isLibrary ? libraryRefetch : linkRefetch
21
201
  };
22
202
  };
23
203
  //# sourceMappingURL=useExplorerData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAIA,OA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CAAC,CAAC,CAAC;IAE5B,OAAO;QACH,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW;QACjD,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,WAAW;KACpD,CAAC;AACN,CAAC,CAAC"}
@@ -1,14 +1,28 @@
1
- import { PropertyValueFragment, RecordIdentityFragment } from '../../_gqlTypes';
1
+ import { Override } from '@leav/utils';
2
+ import { AttributeFormat, AttributePropertiesFragment, PropertyValueFragment, RecordFilterCondition, RecordIdentityFragment } from '../../_gqlTypes';
2
3
  import { ReactElement } from 'react';
3
- export type ItemWhoAmI = Required<RecordIdentityFragment['whoAmI']>;
4
+ import { IViewSettingsState } from './manage-view-settings';
5
+ export interface IExplorerData {
6
+ totalCount: number;
7
+ attributes: {
8
+ [attributeId: string]: Override<AttributePropertiesFragment, {
9
+ label: string;
10
+ }>;
11
+ };
12
+ records: IItemData[];
13
+ }
4
14
  export interface IItemData {
5
15
  libraryId: string;
6
16
  key: string;
7
17
  itemId: string;
8
- whoAmI: ItemWhoAmI;
18
+ whoAmI: Required<RecordIdentityFragment['whoAmI']>;
9
19
  propertiesById: {
10
20
  [attributeId: string]: PropertyValueFragment[];
11
21
  };
22
+ /**
23
+ * Can be named `linkId` too, but for historical reason we keep old name 👴🏼.
24
+ */
25
+ id_value?: string;
12
26
  }
13
27
  export interface IItemAction {
14
28
  callback: (item: IItemData) => void;
@@ -16,6 +30,52 @@ export interface IItemAction {
16
30
  label: string;
17
31
  isDanger?: boolean;
18
32
  }
33
+ export interface IPrimaryAction {
34
+ callback: () => void;
35
+ disabled?: boolean;
36
+ icon: ReactElement;
37
+ label: string;
38
+ }
19
39
  export type ActionHook<T = {}> = {
20
40
  isEnabled: boolean;
21
41
  } & T;
42
+ export interface IExplorerFilter {
43
+ id: string;
44
+ attribute: {
45
+ format: AttributeFormat;
46
+ label: string;
47
+ };
48
+ field: string;
49
+ condition: RecordFilterCondition | null;
50
+ value: string | null;
51
+ }
52
+ export interface IFilterChildrenDropDownProps {
53
+ filter: IExplorerFilter;
54
+ onFilterChange: (filterData: IExplorerFilter) => void;
55
+ }
56
+ export interface IFilterDropDownProps {
57
+ filter: IExplorerFilter;
58
+ }
59
+ export type DefaultViewSettings = Override<Partial<IViewSettingsState>, {
60
+ filters?: Array<{
61
+ field: string;
62
+ condition: RecordFilterCondition;
63
+ value: string | null;
64
+ }>;
65
+ }>;
66
+ export interface IEntrypointTree {
67
+ type: 'tree';
68
+ treeId: string;
69
+ nodeId: string;
70
+ }
71
+ export interface IEntrypointLibrary {
72
+ type: 'library';
73
+ libraryId: string;
74
+ }
75
+ export interface IEntrypointLink {
76
+ type: 'link';
77
+ parentLibraryId: string;
78
+ parentRecordId: string;
79
+ linkAttributeId: string;
80
+ }
81
+ export type Entrypoint = IEntrypointTree | IEntrypointLibrary | IEntrypointLink;
@@ -0,0 +1,2 @@
1
+ export declare const hasOnlyNoValueConditions: (attributeFormat: string) => boolean;
2
+ export declare const nullValueConditions: import("../../_gqlTypes").RecordFilterCondition[];
@@ -0,0 +1,16 @@
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
+ import { AttributeFormat } from '../../_gqlTypes';
5
+ import { AttributeConditionFilter } from '../../types';
6
+ export const hasOnlyNoValueConditions = (attributeFormat) => [AttributeFormat.color, AttributeFormat.date_range, AttributeFormat.encrypted, AttributeFormat.extended].includes(attributeFormat);
7
+ export const nullValueConditions = [
8
+ AttributeConditionFilter.IS_EMPTY,
9
+ AttributeConditionFilter.IS_NOT_EMPTY,
10
+ AttributeConditionFilter.TODAY,
11
+ AttributeConditionFilter.TOMORROW,
12
+ AttributeConditionFilter.YESTERDAY,
13
+ AttributeConditionFilter.LAST_MONTH,
14
+ AttributeConditionFilter.NEXT_MONTH
15
+ ];
16
+ //# sourceMappingURL=conditionsHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionsHelper.js","sourceRoot":"","sources":["../../../src/components/Explorer/conditionsHelper.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,eAAuB,EAAW,EAAE,CACzE,CAAC,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC,UAAU,EAAE,eAAe,CAAC,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAC7G,eAAe,CAClB,CAAC;AAEN,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,wBAAwB,CAAC,QAAQ;IACjC,wBAAwB,CAAC,YAAY;IACrC,wBAAwB,CAAC,KAAK;IAC9B,wBAAwB,CAAC,QAAQ;IACjC,wBAAwB,CAAC,SAAS;IAClC,wBAAwB,CAAC,UAAU;IACnC,wBAAwB,CAAC,UAAU;CACtC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const ExplorerToolBar: FunctionComponent<{
3
+ libraryId: string;
4
+ }>;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import styled from 'styled-components';
6
+ import { useViewSettingsContext } from '../manage-view-settings/store-view-settings/useViewSettingsContext';
7
+ import { KitButton, KitDivider, KitFilter, KitSpace } from 'aristid-ds';
8
+ import { FaTrash } from 'react-icons/fa';
9
+ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
10
+ import { CommonFilterItem } from '../manage-view-settings/_shared/CommonFilterItem';
11
+ import { SortOrder } from '../../../_gqlTypes';
12
+ import { useOpenViewSettings } from '../manage-view-settings';
13
+ import { useAttributeDetailsData } from '../manage-view-settings/_shared/useAttributeDetailsData';
14
+ const FilterStyled = styled(KitFilter) `
15
+ flex: 0 0 auto;
16
+ `;
17
+ const ExplorerToolBarListStyled = styled.ul `
18
+ padding: calc(var(--general-spacing-xs) * 1px) calc(var(--general-spacing-xxs) * 1px)
19
+ calc(var(--general-spacing-m) * 1px) calc(var(--general-spacing-xxs) * 1px);
20
+ margin: 0;
21
+ list-style: none;
22
+ display: flex;
23
+ overflow: auto;
24
+ flex-wrap: nowrap;
25
+ align-items: center;
26
+ gap: 0;
27
+ white-space: nowrap;
28
+ `;
29
+ const DividerStyled = styled(KitDivider) `
30
+ height: 2em;
31
+ `;
32
+ export const ExplorerToolBar = ({ libraryId }) => {
33
+ const { t } = useSharedTranslation();
34
+ const { view: { filters, sort } } = useViewSettingsContext();
35
+ const { openSettingsPanel } = useOpenViewSettings(libraryId);
36
+ const { attributeDetailsById } = useAttributeDetailsData(libraryId);
37
+ if (filters.length === 0 && sort.length === 0) {
38
+ return null;
39
+ }
40
+ const sortValues = sort.length === 0
41
+ ? undefined
42
+ : sort.map(({ field, order }) => (attributeDetailsById?.[field]?.label ?? field) +
43
+ ' ' +
44
+ (order === SortOrder.asc ? t('explorer.sort-ascending') : t('explorer.sort-descending')));
45
+ return (_jsxs(ExplorerToolBarListStyled, { "aria-label": t('explorer.toolbar.active'), children: [_jsx(KitSpace, { size: "s", children: filters.map(filter => (_jsx("li", { children: _jsx(CommonFilterItem, { filter: filter }, filter.id) }, filter.id))) }), filters.length > 0 && sort.length > 0 && _jsx(DividerStyled, { type: "vertical" }), sort.length > 0 && (_jsx("li", { children: _jsx(FilterStyled, { label: t('explorer.sort-items'), values: sortValues, onClick: () => openSettingsPanel('sort-items') }) })), _jsx(DividerStyled, { type: "vertical" }), _jsx("li", { children: _jsx(FilterStyled, { as: KitButton, type: "secondary", size: "s", danger: true, icon: _jsx(FaTrash, {}), disabled: true, children: t('explorer.reset-view') }) })] }));
46
+ };
47
+ //# sourceMappingURL=ExplorerToolBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplorerToolBar.js","sourceRoot":"","sources":["../../../../src/components/Explorer/display-view-filters/ExplorerToolBar.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,sBAAsB,EAAC,MAAM,oEAAoE,CAAC;AAC1G,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,uBAAuB,EAAC,MAAM,yDAAyD,CAAC;AAEhG,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;CAW1C,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IACjB,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EACF,IAAI,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,EACxB,GAAG,sBAAsB,EAAE,CAAC;IAE7B,MAA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AG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAChD,GACD,CACR,EACD,KAAC,aAAa,IAAC,IAAI,EAAC,UAAU,GAAG,EACjC,uBACI,KAAC,YAAY,IAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,GAAG,EAAC,MAAM,QAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,QAAQ,kBACpF,CAAC,CAAC,qBAAqB,CAAC,GACd,GACd,IACmB,CAC/B,CAAC;AACN,CAAC,CAAC"}
@@ -1,7 +1,5 @@
1
1
  import { Explorer as InternalExplorer } from './Explorer';
2
- import { useEditSettings } from './edit-settings/useEditSettings';
3
- import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
4
- import { SidePanel } from './edit-settings/SidePanel';
2
+ import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
5
3
  type CompoundedComponent = typeof InternalExplorer & {
6
4
  useEditSettings: typeof useEditSettings;
7
5
  EditSettingsContextProvider: typeof EditSettingsContextProvider;
@@ -2,9 +2,7 @@
2
2
  // This file is released under LGPL V3
3
3
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
4
  import { Explorer as InternalExplorer } from './Explorer';
5
- import { useEditSettings } from './edit-settings/useEditSettings';
6
- import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
7
- import { SidePanel } from './edit-settings/SidePanel';
5
+ import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
8
6
  export const Explorer = InternalExplorer;
9
7
  Explorer.EditSettingsContextProvider = EditSettingsContextProvider;
10
8
  Explorer.useEditSettings = useEditSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAC,2BAA2B,EAAC,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAQpD,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAkD,CAAC;AAC3E,QAAQ,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AACnE,QAAQ,CAAC,eAAe,GAAG,eAAe,CAAC;AAC3C,QAAQ,CAAC,iBAAiB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAQ/F,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAkD,CAAC;AAC3E,QAAQ,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AACnE,QAAQ,CAAC,eAAe,GAAG,eAAe,CAAC;AAC3C,QAAQ,CAAC,iBAAiB,GAAG,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ interface IColumnItemProps {
3
+ itemId: string;
4
+ dragHandler?: ReactNode;
5
+ visible: boolean;
6
+ title: string;
7
+ onVisibilityClick?: () => void;
8
+ value?: string;
9
+ locked?: boolean;
10
+ }
11
+ export declare const ColumnItem: FunctionComponent<IColumnItemProps>;
12
+ export {};
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { KitTypography } from 'aristid-ds';
6
+ import { FaEye, FaEyeSlash, FaLock } from 'react-icons/fa';
7
+ import styled from 'styled-components';
8
+ import { useSortable } from '@dnd-kit/sortable';
9
+ import { CSS } from '@dnd-kit/utilities';
10
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
11
+ const StyledValue = styled(KitTypography.Text) `
12
+ color: var(--general-utilities-disabled);
13
+ `;
14
+ const StyledConfigurationItem = styled.li `
15
+ color: var(--general-utilities-text-primary);
16
+ display: flex;
17
+ width: 100%;
18
+ height: 40px;
19
+ padding: 0 calc(var(--general-spacing-xs) * 1px);
20
+ align-items: center;
21
+ gap: calc(var(--general-spacing-xs) * 1px);
22
+ border-radius: calc(var(--general-spacing-xs) * 1px);
23
+ text-align: left;
24
+
25
+ &:first-child {
26
+ margin-top: calc(var(--general-spacing-xs) * 1px);
27
+ }
28
+
29
+ &:hover {
30
+ background: var(--general-utilities-main-light);
31
+
32
+ ${StyledValue} {
33
+ color: var(--general-utilities-text-primary);
34
+ }
35
+ }
36
+
37
+ .title {
38
+ flex: 1 1 auto;
39
+ }
40
+
41
+ > svg {
42
+ flex: 0 0 calc(var(--general-spacing-s) * 1px);
43
+ }
44
+
45
+ > button {
46
+ border: none;
47
+ background: transparent;
48
+ padding: 0;
49
+ &:not([disabled]) {
50
+ cursor: pointer;
51
+ }
52
+ }
53
+ `;
54
+ const StyledFaEye = styled(FaEye) `
55
+ display: flex;
56
+ color: currentColor;
57
+ `;
58
+ const StyledEyeSlash = styled(FaEyeSlash) `
59
+ display: flex;
60
+ color: var(--general-utilities-disabled);
61
+ `;
62
+ const StyledLocked = styled(FaLock) `
63
+ display: flex;
64
+ color: var(--general-utilities-disabled);
65
+ `;
66
+ const StyledDragHandle = styled.span `
67
+ display: flex;
68
+ cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
69
+ `;
70
+ const StyledEmptyIcon = styled.div `
71
+ width: calc(var(--general-spacing-s) * 1px);
72
+ `;
73
+ export const ColumnItem = ({ itemId, dragHandler, title, visible, onVisibilityClick, locked = false }) => {
74
+ const { t } = useSharedTranslation();
75
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: itemId });
76
+ const style = {
77
+ transform: CSS.Transform.toString(transform),
78
+ transition
79
+ };
80
+ const _handleClick = () => onVisibilityClick?.();
81
+ const visibilityButtonLabel = visible ? t('explorer.hide') : t('explorer.show');
82
+ const visibilityIcon = locked ? _jsx(StyledLocked, {}) : visible ? _jsx(StyledFaEye, {}) : _jsx(StyledEyeSlash, {});
83
+ return (_jsxs(StyledConfigurationItem, { ref: setNodeRef, style: style, children: [dragHandler ? (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: dragHandler })) : (_jsx(StyledEmptyIcon, {})), _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx("button", { disabled: locked, onClick: _handleClick, title: visibilityButtonLabel, "aria-label": visibilityButtonLabel, children: visibilityIcon })] }));
84
+ };
85
+ //# sourceMappingURL=ColumnItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/ColumnItem.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;;CAE7C,CAAC;AAEF,MAAM,uBAAuB,G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MAAM,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC;IAElG,OAAO,CACH,MAAC,uBAAuB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aACjD,WAAW,CAAC,CAAC,CAAC,CACX,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACnE,WAAW,GACG,CACtB,CAAC,CAAC,CAAC,CACA,KAAC,eAAe,KAAG,CACtB,EACD,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YAC1D,KAAK,GACW,EACrB,iBACI,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,qBAAqB,gBAChB,qBAAqB,YAEhC,cAAc,GACV,IACa,CAC7B,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IExplorerFilter } from '../../_types';
3
+ export declare const CommonFilterItem: FunctionComponent<{
4
+ filter: IExplorerFilter;
5
+ }>;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FilterDropDown } from '../filter-items/filter-type/FilterDropDown';
3
+ import styled from 'styled-components';
4
+ import { KitFilter } from 'aristid-ds';
5
+ const FilterStyled = styled(KitFilter) `
6
+ flex: 0 0 auto;
7
+ `;
8
+ export const CommonFilterItem = ({ filter }) => (_jsx(FilterStyled, { expandable: true, label: filter.attribute.label, values: filter.value === null ? [] : [filter.value], dropDownProps: {
9
+ placement: 'bottomLeft',
10
+ dropdownRender: () => _jsx(FilterDropDown, { filter: filter })
11
+ } }));
12
+ //# sourceMappingURL=CommonFilterItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonFilterItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/CommonFilterItem.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,cAAc,EAAC,MAAM,4CAA4C,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAGrC,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAiD,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,CACxF,KAAC,YAAY,IACT,UAAU,QACV,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAC7B,MAAM,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACnD,aAAa,EAAE;QACX,SAAS,EAAE,YAAY;QACvB,cAAc,EAAE,GAAG,EAAE,CAAC,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI;KAC3D,GACH,CACL,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ChangeEvent } from 'react';
2
+ import { AttributeDetailsFragment } from '../../../../_gqlTypes';
3
+ interface IColumnsById {
4
+ [attributeId: string]: AttributeDetailsFragment;
5
+ }
6
+ export declare const useAttributeDetailsData: (libraryId: string) => {
7
+ attributeDetailsById: IColumnsById;
8
+ searchFilteredColumnsIds: string[];
9
+ onSearchChanged: (event: ChangeEvent<HTMLInputElement>) => void;
10
+ };
11
+ export {};