@leav/ui 0.3.6-df40eff → 0.3.6-e218b23

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 (335) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +8 -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 +2 -1
  10. package/dist/__mocks__/common/value.js.map +1 -1
  11. package/dist/_gqlTypes/index.d.ts +118 -40
  12. package/dist/_gqlTypes/index.js +96 -8
  13. package/dist/_gqlTypes/index.js.map +1 -1
  14. package/dist/_queries/records/getRecordColumnsValues.d.ts +4 -2
  15. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  16. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  17. package/dist/_queries/records/recordFormAttributeFragment.js +1 -0
  18. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  19. package/dist/_utils/interleaveElement.d.ts +1 -0
  20. package/dist/{components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js → _utils/interleaveElement.js} +2 -6
  21. package/dist/_utils/interleaveElement.js.map +1 -0
  22. package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
  23. package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
  24. package/dist/components/EditApplication/EditApplication.js +2 -2
  25. package/dist/components/EditApplication/EditApplication.js.map +1 -1
  26. package/dist/components/EditApplication/_types.d.ts +2 -2
  27. package/dist/components/Explorer/DataView.d.ts +9 -1
  28. package/dist/components/Explorer/DataView.js +35 -16
  29. package/dist/components/Explorer/DataView.js.map +1 -1
  30. package/dist/components/Explorer/Explorer.d.ts +3 -1
  31. package/dist/components/Explorer/Explorer.js +45 -26
  32. package/dist/components/Explorer/Explorer.js.map +1 -1
  33. package/dist/components/Explorer/IdCard.d.ts +7 -0
  34. package/dist/components/Explorer/IdCard.js +15 -0
  35. package/dist/components/Explorer/IdCard.js.map +1 -0
  36. package/dist/components/Explorer/TableCell.d.ts +2 -1
  37. package/dist/components/Explorer/TableCell.js +123 -20
  38. package/dist/components/Explorer/TableCell.js.map +1 -1
  39. package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
  40. package/dist/components/Explorer/TableTagGroup.js +30 -0
  41. package/dist/components/Explorer/TableTagGroup.js.map +1 -0
  42. package/dist/components/Explorer/_queries/useExplorerData.d.ts +22 -4
  43. package/dist/components/Explorer/_queries/useExplorerData.js +93 -11
  44. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  45. package/dist/components/Explorer/_types.d.ts +28 -4
  46. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +2 -0
  47. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +37 -0
  48. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +1 -0
  49. package/dist/components/Explorer/index.d.ts +1 -3
  50. package/dist/components/Explorer/index.js +1 -3
  51. package/dist/components/Explorer/index.js.map +1 -1
  52. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +1 -1
  53. package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +12 -5
  54. package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
  55. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
  56. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  57. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  58. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
  59. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
  60. package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
  61. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
  62. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
  63. package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
  64. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
  65. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
  66. package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
  67. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
  68. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
  69. package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
  70. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
  71. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +77 -0
  72. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
  73. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
  74. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
  75. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
  76. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  77. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +37 -0
  78. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  79. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  80. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +90 -0
  81. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  82. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
  83. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +23 -0
  84. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
  85. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
  86. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
  87. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
  88. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
  89. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +44 -0
  90. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
  91. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +3 -0
  92. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +72 -0
  93. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +1 -0
  94. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
  95. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +53 -0
  96. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
  97. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +10 -0
  98. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +110 -0
  99. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
  100. package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
  101. package/dist/components/Explorer/manage-view-settings/index.js +11 -0
  102. package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
  103. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
  104. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
  105. package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
  106. package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
  107. package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
  108. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +3 -0
  109. package/dist/components/Explorer/{edit-settings/useOpenSettings.js → manage-view-settings/open-view-settings/useOpenViewSettings.js} +7 -5
  110. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
  111. package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
  112. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +1 -1
  113. package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.js +10 -10
  114. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
  115. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
  116. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
  117. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
  118. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
  119. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
  120. package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
  121. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.d.ts → manage-view-settings/store-view-settings/ViewSettingsContext.d.ts} +1 -2
  122. package/dist/components/Explorer/{edit-settings/ViewSetingsContext.js → manage-view-settings/store-view-settings/ViewSettingsContext.js} +1 -5
  123. package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
  124. package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.js +1 -1
  125. package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
  126. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
  127. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +13 -0
  128. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
  129. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +138 -0
  130. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +194 -0
  131. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
  132. package/dist/components/Explorer/nullValuesConditions.d.ts +1 -0
  133. package/dist/components/Explorer/nullValuesConditions.js +14 -0
  134. package/dist/components/Explorer/nullValuesConditions.js.map +1 -0
  135. package/dist/components/Explorer/useDeactivateAction.js +3 -2
  136. package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
  137. package/dist/components/Explorer/useEditAction.js +5 -3
  138. package/dist/components/Explorer/useEditAction.js.map +1 -1
  139. package/dist/components/Explorer/usePagination.d.ts +7 -0
  140. package/dist/components/Explorer/usePagination.js +25 -0
  141. package/dist/components/Explorer/usePagination.js.map +1 -0
  142. package/dist/components/Explorer/usePrimaryActions.d.ts +1 -9
  143. package/dist/components/Explorer/usePrimaryActions.js +4 -12
  144. package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
  145. package/dist/components/Explorer/useSearchInput.d.ts +10 -0
  146. package/dist/components/Explorer/useSearchInput.js +31 -0
  147. package/dist/components/Explorer/useSearchInput.js.map +1 -0
  148. package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
  149. package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
  150. package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
  151. package/dist/components/Explorer/useViewSettingsReducer.d.ts +7 -0
  152. package/dist/components/Explorer/useViewSettingsReducer.js +60 -0
  153. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  154. package/dist/components/ExportModal/ExportModal.js +2 -2
  155. package/dist/components/ExportModal/ExportModal.js.map +1 -1
  156. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
  157. package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
  158. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
  159. package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
  160. package/dist/components/RecordEdition/EditRecord/EditRecord.js +1 -1
  161. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  162. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +15 -2
  163. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  164. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +9 -20
  165. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  166. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -1
  167. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +44 -34
  168. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  169. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  170. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  171. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  172. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +1 -1
  173. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  174. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  175. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  176. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  177. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  178. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
  179. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  180. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  181. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
  182. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  183. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
  184. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
  185. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
  186. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +5 -2
  187. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +147 -191
  188. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  189. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
  190. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +10 -30
  191. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  192. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
  193. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +38 -45
  194. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  195. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
  196. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +31 -46
  197. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  198. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
  199. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +9 -77
  200. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
  201. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
  202. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +29 -49
  203. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  204. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
  205. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +34 -54
  206. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  207. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
  208. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +48 -64
  209. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  210. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
  211. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +30 -53
  212. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  213. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +16 -9
  214. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +66 -401
  215. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  216. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
  217. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/{MonoValueSelect.js → DSListSelect.js} +45 -52
  218. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
  219. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
  220. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +15 -0
  221. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
  222. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
  223. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
  224. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
  225. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
  226. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
  227. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +37 -0
  228. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
  229. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
  230. package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
  231. package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
  232. package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
  233. package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
  234. package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
  235. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
  236. package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
  237. package/dist/components/SelectTreeNode/index.d.ts +1 -1
  238. package/dist/components/SelectTreeNode/index.js +1 -1
  239. package/dist/components/SelectTreeNode/index.js.map +1 -1
  240. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
  241. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
  242. package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
  243. package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
  244. package/dist/components/SelectTreeNodeModal/index.js +1 -2
  245. package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
  246. package/dist/components/UploadFiles/UploadFiles.js +1 -1
  247. package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
  248. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
  249. package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
  250. package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
  251. package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
  252. package/dist/hooks/useDebouncedValue/index.js.map +1 -0
  253. package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
  254. package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
  255. package/dist/locales/en/shared.json +51 -13
  256. package/dist/locales/fr/shared.json +51 -13
  257. package/package.json +5 -2
  258. package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
  259. package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
  260. package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -34
  261. package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
  262. package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
  263. package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -89
  264. package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
  265. package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
  266. package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
  267. package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
  268. package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
  269. package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
  270. package/dist/components/Explorer/edit-settings/ViewSetingsContext.js.map +0 -1
  271. package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
  272. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
  273. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
  274. package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
  275. package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
  276. package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
  277. package/dist/components/Explorer/edit-settings/useViewSettingsContext.js.map +0 -1
  278. package/dist/components/Explorer/edit-settings/viewSettingsReducer.d.ts +0 -43
  279. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js +0 -58
  280. package/dist/components/Explorer/edit-settings/viewSettingsReducer.js.map +0 -1
  281. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
  282. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
  283. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
  284. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
  285. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
  286. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
  287. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
  288. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
  289. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
  290. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js +0 -7
  291. package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
  292. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
  293. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
  294. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
  295. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
  296. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
  297. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
  298. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
  299. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
  300. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
  301. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
  302. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
  303. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
  304. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
  305. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
  306. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
  307. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
  308. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
  309. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
  310. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
  311. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
  312. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
  313. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
  314. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -90
  315. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
  316. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
  317. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
  318. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
  319. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
  320. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
  321. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
  322. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
  323. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
  324. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
  325. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
  326. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +0 -0
  327. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +0 -0
  328. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.d.ts +0 -0
  329. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +0 -0
  330. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
  331. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
  332. /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
  333. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
  334. /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
  335. /package/dist/components/Explorer/{edit-settings → manage-view-settings/store-view-settings}/useViewSettingsContext.d.ts +0 -0
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
3
+ import { KitInput, KitTypography } from 'aristid-ds';
4
+ import styled from 'styled-components';
5
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
+ import { SortOrder } from '../../../../_gqlTypes';
7
+ import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
8
+ import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
9
+ import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
10
+ import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
11
+ import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
12
+ import { SortListItem } from './SortListItem';
13
+ const StyledList = styled.ul `
14
+ padding: calc(var(--general-spacing-s) * 1px) 0;
15
+ margin: 0;
16
+ list-style: none;
17
+ color: var(--general-utilities-text-primary);
18
+ `;
19
+ const StyledEyeSlash = styled(FaEyeSlash) `
20
+ color: var(--general-utilities-neutral-dark);
21
+ `;
22
+ const StyledFaEye = styled(FaEye) `
23
+ color: var(--general-utilities-neutral-deepDark);
24
+ `;
25
+ export const SortItems = ({ libraryId }) => {
26
+ const { t } = useSharedTranslation();
27
+ const { view: { sort }, dispatch } = useViewSettingsContext();
28
+ const { onSearchChanged, searchFilteredColumnsIds, attributeDetailsById } = useAttributeDetailsData(libraryId);
29
+ const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
30
+ coordinateGetter: sortableKeyboardCoordinates
31
+ }));
32
+ const _toggleColumnVisibility = (attributeId) => () => {
33
+ const isAttributeAlreadySorting = sort.some(sortItem => sortItem.attributeId === attributeId);
34
+ if (isAttributeAlreadySorting) {
35
+ dispatch({
36
+ type: ViewSettingsActionTypes.REMOVE_SORT,
37
+ payload: {
38
+ attributeId
39
+ }
40
+ });
41
+ }
42
+ else {
43
+ dispatch({
44
+ type: ViewSettingsActionTypes.ADD_SORT,
45
+ payload: {
46
+ order: SortOrder.asc,
47
+ attributeId
48
+ }
49
+ });
50
+ }
51
+ };
52
+ const _changeOrderActiveFilterTo = (attributeId) => (order) => {
53
+ dispatch({
54
+ type: ViewSettingsActionTypes.CHANGE_SORT_ORDER,
55
+ payload: {
56
+ attributeId,
57
+ order
58
+ }
59
+ });
60
+ };
61
+ const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
62
+ const indexFrom = activeFilters.findIndex(({ attributeId }) => attributeId === String(draggedElement.id));
63
+ const indexTo = activeFilters.findIndex(({ attributeId }) => attributeId === String(dropTarget?.id));
64
+ if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
65
+ return;
66
+ }
67
+ dispatch({ type: ViewSettingsActionTypes.MOVE_SORT, payload: { indexFrom, indexTo } });
68
+ };
69
+ const activeFilters = sort.filter(({ attributeId }) => searchFilteredColumnsIds.includes(attributeId));
70
+ const inactiveFilters = searchFilteredColumnsIds.filter(attributeId => sort.every(sortItem => sortItem.attributeId !== attributeId));
71
+ return (_jsxs(_Fragment, { children: [activeFilters.length > 0 && (_jsx(StyledList, { "aria-label": t('explorer.sort-list.active'), children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsx(SortableContext, { items: activeFilters.map(({ attributeId }) => ({ id: attributeId })), strategy: verticalListSortingStrategy, children: activeFilters.map(({ attributeId, order }) => (_jsx(SortListItem, { attributeId: attributeId, isDraggable: true, filterChipProps: {
72
+ label: attributeDetailsById[attributeId].label,
73
+ values: [
74
+ order === SortOrder.asc
75
+ ? t('explorer.sort-ascending')
76
+ : t('explorer.sort-descending')
77
+ ],
78
+ expandable: true,
79
+ dropDownProps: {
80
+ menu: {
81
+ selectable: true,
82
+ selectedKeys: [order],
83
+ items: [
84
+ {
85
+ key: SortOrder.asc,
86
+ label: t('explorer.sort-ascending')
87
+ },
88
+ {
89
+ key: SortOrder.desc,
90
+ label: t('explorer.sort-descending')
91
+ }
92
+ ],
93
+ onSelect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(attributeId)(newOrder),
94
+ onDeselect: ({ selectedKeys: [newOrder] }) => _changeOrderActiveFilterTo(attributeId)(newOrder)
95
+ }
96
+ }
97
+ }, visibilityButtonProps: {
98
+ icon: _jsx(StyledFaEye, {}),
99
+ title: String(t('explorer.hide')),
100
+ onClick: _toggleColumnVisibility(attributeId)
101
+ } }, attributeId))) }) }) })), _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(attributeId => (_jsx(SortListItem, { attributeId: attributeId, filterChipProps: {
102
+ label: attributeDetailsById[attributeId].label
103
+ }, visibilityButtonProps: {
104
+ icon: _jsx(StyledEyeSlash, {}),
105
+ title: String(t('explorer.show')),
106
+ onClick: _toggleColumnVisibility(attributeId)
107
+ } }, attributeId))) })] }));
108
+ };
109
+ //# sourceMappingURL=SortItems.js.map
@@ -0,0 +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,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EACH,aAAa,EACb,UAAU,EAEV,cAAc,EACd,aAAa,EACb,SAAS,EACT,UAAU,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAE,2BAA2B,EAAE,2BAA2B,EAAC,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAC,uBAAuB,EAAC,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAC,sBAAsB,EAAC,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAA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I,EAAE,KAAC,WAAW,KAAG;gCACrB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;gCACjC,OAAO,EAAE,uBAAuB,CAAC,WAAW,CAAC;6BAChD,IApCI,WAAW,CAqClB,CACL,CAAC,GACY,GACT,GACJ,CAChB,EACD,KAAC,aAAa,CAAC,KAAK,IAAC,KAAK,EAAC,IAAI,YAAE,CAAC,CAAC,+BAA+B,CAAC,GAAuB,EAC1F,KAAC,QAAQ,IACL,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EACvC,QAAQ,EAAE,eAAe,EACzB,UAAU,QACV,MAAM,EAAE,KAAC,QAAQ,KAAG,GACtB,EACF,KAAC,UAAU,kBAAa,CAAC,CAAC,6BAA6B,CAAC,YACnD,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAChC,KAAC,YAAY,IAET,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE;wBACb,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC,KAAK;qBACjD,EACD,qBAAqB,EAAE;wBACnB,IAAI,EAAE,KAAC,cAAc,KAAG;wBACxB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;wBACjC,OAAO,EAAE,uBAAuB,CAAC,WAAW,CAAC;qBAChD,IATI,WAAW,CAUlB,CACL,CAAC,GACO,IACd,CACN,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ComponentProps, FunctionComponent } from 'react';
2
+ import { KitButton, KitFilter } from 'aristid-ds';
3
+ interface IActiveFilterListItemProps {
4
+ attributeId: string;
5
+ isDraggable?: true;
6
+ filterChipProps: Pick<ComponentProps<typeof KitFilter>, 'label' | 'values' | 'expandable' | 'dropDownProps'>;
7
+ visibilityButtonProps: Pick<ComponentProps<typeof KitButton>, 'onClick' | 'icon' | 'title'>;
8
+ }
9
+ export declare const SortListItem: FunctionComponent<IActiveFilterListItemProps>;
10
+ export {};
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ import { FaGripLines } from 'react-icons/fa';
4
+ import { KitButton, KitFilter } from 'aristid-ds';
5
+ import { useSortable } from '@dnd-kit/sortable';
6
+ import { CSS } from '@dnd-kit/utilities';
7
+ const StyledSortListItem = styled.li `
8
+ display: flex;
9
+ justify-content: space-between;
10
+ align-items: center;
11
+
12
+ div {
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: center;
16
+ gap: calc(var(--general-spacing-xs) * 1px);
17
+ }
18
+ `;
19
+ const StyledDragHandle = styled.span `
20
+ display: flex;
21
+ align-items: center;
22
+ cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
23
+ `;
24
+ export const SortListItem = ({ attributeId, isDraggable, visibilityButtonProps, filterChipProps }) => {
25
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: attributeId });
26
+ const style = {
27
+ transform: CSS.Transform.toString(transform),
28
+ transition
29
+ };
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
+ };
32
+ //# sourceMappingURL=SortListItem.js.map
@@ -0,0 +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,EAClB,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"}
@@ -1,6 +1,5 @@
1
1
  import { Dispatch } from 'react';
2
- import { IViewSettingsState, IViewSettingsAction } from './viewSettingsReducer';
3
- export declare const viewSettingsInitialState: IViewSettingsState;
2
+ import { IViewSettingsAction, IViewSettingsState } from './viewSettingsReducer';
4
3
  export declare const ViewSettingsContext: import("react").Context<{
5
4
  view: IViewSettingsState;
6
5
  dispatch: Dispatch<IViewSettingsAction>;
@@ -2,14 +2,10 @@
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 { createContext } from 'react';
5
- export const viewSettingsInitialState = {
6
- displayMode: 'table',
7
- fields: []
8
- };
9
5
  export const ViewSettingsContext = createContext({
10
6
  view: null,
11
7
  dispatch: () => {
12
8
  throw new Error('useViewSettingsContext must be used inside a <ViewSettingsContext.Provider />');
13
9
  }
14
10
  });
15
- //# sourceMappingURL=ViewSetingsContext.js.map
11
+ //# sourceMappingURL=ViewSettingsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAW,MAAM,OAAO,CAAC;AAG9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAG7C;IACC,IAAI,EAAE,IAAW;IACjB,QAAQ,EAAE,GAAG,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;IACrG,CAAC;CACJ,CAAC,CAAC"}
@@ -2,6 +2,6 @@
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 { useContext } from 'react';
5
- import { ViewSettingsContext } from './ViewSetingsContext';
5
+ import { ViewSettingsContext } from './ViewSettingsContext';
6
6
  export const useViewSettingsContext = () => useContext(ViewSettingsContext);
7
7
  //# sourceMappingURL=useViewSettingsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useViewSettingsContext.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IViewSettingsState } from './viewSettingsReducer';
2
+ export declare const defaultPageSizeOptions: number[];
3
+ export declare const defaultMaxFilters = 3;
4
+ export declare const viewSettingsInitialState: IViewSettingsState;
@@ -0,0 +1,13 @@
1
+ export const defaultPageSizeOptions = [20, 50, 100];
2
+ export const defaultMaxFilters = 3;
3
+ export const viewSettingsInitialState = {
4
+ viewType: 'table',
5
+ attributesIds: [],
6
+ fulltextSearch: '',
7
+ sort: [],
8
+ pageSize: defaultPageSizeOptions[0],
9
+ filters: [],
10
+ maxFilters: defaultMaxFilters,
11
+ canAddFilter: true
12
+ };
13
+ //# sourceMappingURL=viewSettingsInitialState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewSettingsInitialState.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,wBAAwB,GAAuB;IACxD,QAAQ,EAAE,OAAO;IACjB,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACnC,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE,IAAI;CACrB,CAAC"}
@@ -0,0 +1,138 @@
1
+ import { SortOrder } from '../../../../_gqlTypes';
2
+ import { IExplorerFilter } from '../../_types';
3
+ export type ViewType = 'table' | 'list' | 'timeline' | 'mosaic';
4
+ export declare const ViewSettingsActionTypes: {
5
+ readonly RESET: "RESET";
6
+ readonly ADD_ATTRIBUTE: "ADD_ATTRIBUTE";
7
+ readonly REMOVE_ATTRIBUTE: "REMOVE_ATTRIBUTE";
8
+ readonly MOVE_ATTRIBUTE: "MOVE_ATTRIBUTE";
9
+ readonly RESET_ATTRIBUTES: "RESET_ATTRIBUTES";
10
+ readonly CHANGE_VIEW_TYPE: "CHANGE_VIEW_TYPE";
11
+ readonly ADD_SORT: "ADD_SORT";
12
+ readonly REMOVE_SORT: "REMOVE_SORT";
13
+ readonly MOVE_SORT: "MOVE_SORT";
14
+ readonly CHANGE_SORT_ORDER: "CHANGE_SORT_ORDER";
15
+ readonly CHANGE_PAGE_SIZE: "CHANGE_PAGE_SIZE";
16
+ readonly CHANGE_FULLTEXT_SEARCH: "CHANGE_FULLTEXT_SEARCH";
17
+ readonly CLEAR_FULLTEXT_SEARCH: "CLEAR_FULLTEXT_SEARCH";
18
+ readonly ADD_FILTER: "ADD_FILTER";
19
+ readonly RESET_FILTER: "RESET_FILTER";
20
+ readonly REMOVE_FILTER: "REMOVE_FILTER";
21
+ readonly MOVE_FILTER: "MOVE_FILTER";
22
+ readonly CHANGE_FILTER_CONFIG: "CHANGE_FILTER_CONFIG";
23
+ };
24
+ export interface IViewSettingsState {
25
+ viewType: ViewType;
26
+ attributesIds: string[];
27
+ fulltextSearch: string;
28
+ sort: Array<{
29
+ attributeId: string;
30
+ order: SortOrder;
31
+ }>;
32
+ pageSize: number;
33
+ filters: IExplorerFilter[];
34
+ maxFilters: number;
35
+ canAddFilter: boolean;
36
+ }
37
+ interface IViewSettingsActionChangePageSize {
38
+ type: typeof ViewSettingsActionTypes.CHANGE_PAGE_SIZE;
39
+ payload: {
40
+ pageSize: number;
41
+ };
42
+ }
43
+ interface IViewSettingsActionAddAttribute {
44
+ type: typeof ViewSettingsActionTypes.ADD_ATTRIBUTE;
45
+ payload: {
46
+ attributeId: string;
47
+ };
48
+ }
49
+ interface IViewSettingsActionRemoveAttribute {
50
+ type: typeof ViewSettingsActionTypes.REMOVE_ATTRIBUTE;
51
+ payload: {
52
+ attributeId: string;
53
+ };
54
+ }
55
+ interface IViewSettingsActionMoveAttribute {
56
+ type: typeof ViewSettingsActionTypes.MOVE_ATTRIBUTE;
57
+ payload: {
58
+ indexFrom: number;
59
+ indexTo: number;
60
+ };
61
+ }
62
+ interface IViewSettingsActionChangeViewType {
63
+ type: typeof ViewSettingsActionTypes.CHANGE_VIEW_TYPE;
64
+ payload: {
65
+ viewType: ViewType;
66
+ };
67
+ }
68
+ interface IViewSettingsActionResetAttributes {
69
+ type: typeof ViewSettingsActionTypes.RESET_ATTRIBUTES;
70
+ }
71
+ interface IViewSettingsActionAddSort {
72
+ type: typeof ViewSettingsActionTypes.ADD_SORT;
73
+ payload: {
74
+ attributeId: string;
75
+ order: SortOrder;
76
+ };
77
+ }
78
+ interface IViewSettingsActionRemoveSort {
79
+ type: typeof ViewSettingsActionTypes.REMOVE_SORT;
80
+ payload: {
81
+ attributeId: string;
82
+ };
83
+ }
84
+ interface IViewSettingsActionChangeSortOrder {
85
+ type: typeof ViewSettingsActionTypes.CHANGE_SORT_ORDER;
86
+ payload: {
87
+ attributeId: string;
88
+ order: SortOrder;
89
+ };
90
+ }
91
+ interface IViewSettingsActionMoveSort {
92
+ type: typeof ViewSettingsActionTypes.MOVE_SORT;
93
+ payload: {
94
+ indexFrom: number;
95
+ indexTo: number;
96
+ };
97
+ }
98
+ interface IViewSettingsActionChangeFulltextSearch {
99
+ type: typeof ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH;
100
+ payload: {
101
+ search: string;
102
+ };
103
+ }
104
+ interface IViewSettingsActionClearFulltextSearch {
105
+ type: typeof ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH;
106
+ }
107
+ interface IViewSettingsActionAddFilter {
108
+ type: typeof ViewSettingsActionTypes.ADD_FILTER;
109
+ payload: Omit<IExplorerFilter, 'id' | 'value' | 'condition'>;
110
+ }
111
+ interface IViewSettingsActionResetFilter {
112
+ type: typeof ViewSettingsActionTypes.RESET_FILTER;
113
+ payload: Pick<IExplorerFilter, 'id'>;
114
+ }
115
+ interface IViewSettingsActionRemoveFilter {
116
+ type: typeof ViewSettingsActionTypes.REMOVE_FILTER;
117
+ payload: Pick<IExplorerFilter, 'id'>;
118
+ }
119
+ interface IViewSettingsActionChangeFilterConfig {
120
+ type: typeof ViewSettingsActionTypes.CHANGE_FILTER_CONFIG;
121
+ payload: IExplorerFilter;
122
+ }
123
+ interface IViewSettingsActionMoveFilter {
124
+ type: typeof ViewSettingsActionTypes.MOVE_FILTER;
125
+ payload: {
126
+ indexFrom: number;
127
+ indexTo: number;
128
+ };
129
+ }
130
+ interface IViewSettingsActionReset {
131
+ type: typeof ViewSettingsActionTypes.RESET;
132
+ payload: IViewSettingsState;
133
+ }
134
+ type Reducer<PAYLOAD = 'no_payload'> = PAYLOAD extends 'no_payload' ? (state: IViewSettingsState) => IViewSettingsState : (state: IViewSettingsState, payload: PAYLOAD) => IViewSettingsState;
135
+ export declare const clearFulltextSearch: Reducer;
136
+ export type IViewSettingsAction = IViewSettingsActionResetAttributes | IViewSettingsActionAddAttribute | IViewSettingsActionRemoveAttribute | IViewSettingsActionMoveAttribute | IViewSettingsActionChangeViewType | IViewSettingsActionAddSort | IViewSettingsActionRemoveSort | IViewSettingsActionChangeSortOrder | IViewSettingsActionMoveSort | IViewSettingsActionChangePageSize | IViewSettingsActionChangeFulltextSearch | IViewSettingsActionClearFulltextSearch | IViewSettingsActionAddFilter | IViewSettingsActionResetFilter | IViewSettingsActionRemoveFilter | IViewSettingsActionChangeFilterConfig | IViewSettingsActionMoveFilter | IViewSettingsActionReset;
137
+ export declare const viewSettingsReducer: (state: IViewSettingsState, action: IViewSettingsAction) => IViewSettingsState;
138
+ export {};
@@ -0,0 +1,194 @@
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 { RecordFilterCondition } from '../../../../_gqlTypes';
5
+ import { v4 as uuid } from 'uuid';
6
+ export const ViewSettingsActionTypes = {
7
+ RESET: 'RESET',
8
+ ADD_ATTRIBUTE: 'ADD_ATTRIBUTE',
9
+ REMOVE_ATTRIBUTE: 'REMOVE_ATTRIBUTE',
10
+ MOVE_ATTRIBUTE: 'MOVE_ATTRIBUTE',
11
+ RESET_ATTRIBUTES: 'RESET_ATTRIBUTES',
12
+ CHANGE_VIEW_TYPE: 'CHANGE_VIEW_TYPE',
13
+ ADD_SORT: 'ADD_SORT',
14
+ REMOVE_SORT: 'REMOVE_SORT',
15
+ MOVE_SORT: 'MOVE_SORT',
16
+ CHANGE_SORT_ORDER: 'CHANGE_SORT_ORDER',
17
+ CHANGE_PAGE_SIZE: 'CHANGE_PAGE_SIZE',
18
+ CHANGE_FULLTEXT_SEARCH: 'CHANGE_FULLTEXT_SEARCH',
19
+ CLEAR_FULLTEXT_SEARCH: 'CLEAR_FULLTEXT_SEARCH',
20
+ ADD_FILTER: 'ADD_FILTER',
21
+ RESET_FILTER: 'RESET_FILTER',
22
+ REMOVE_FILTER: 'REMOVE_FILTER',
23
+ MOVE_FILTER: 'MOVE_FILTER',
24
+ CHANGE_FILTER_CONFIG: 'CHANGE_FILTER_CONFIG'
25
+ };
26
+ const changePageSize = (state, payload) => ({
27
+ ...state,
28
+ pageSize: payload.pageSize
29
+ });
30
+ const addAttribute = (state, payload) => ({
31
+ ...state,
32
+ attributesIds: [...state.attributesIds, payload.attributeId]
33
+ });
34
+ const removeAttribute = (state, payload) => ({
35
+ ...state,
36
+ attributesIds: state.attributesIds.filter(attributesId => attributesId !== payload.attributeId)
37
+ });
38
+ const moveAttribute = (state, payload) => {
39
+ const attributesIds = [...state.attributesIds];
40
+ const [attributeIdToMove] = attributesIds.splice(payload.indexFrom, 1);
41
+ // TODO use newES6 syntax (toSpliced)
42
+ attributesIds.splice(payload.indexTo, 0, attributeIdToMove);
43
+ return {
44
+ ...state,
45
+ attributesIds
46
+ };
47
+ };
48
+ const resetAttributes = state => ({
49
+ ...state,
50
+ attributesIds: []
51
+ });
52
+ const changeViewType = (state, payload) => ({
53
+ ...state,
54
+ viewType: payload.viewType
55
+ });
56
+ const addSort = (state, payload) => ({
57
+ ...state,
58
+ sort: [...state.sort, { attributeId: payload.attributeId, order: payload.order }]
59
+ });
60
+ const removeSort = (state, payload) => ({
61
+ ...state,
62
+ sort: state.sort.filter(({ attributeId }) => attributeId !== payload.attributeId)
63
+ });
64
+ const changeSortOrder = (state, payload) => ({
65
+ ...state,
66
+ sort: state.sort.map(sort => (sort.attributeId === payload.attributeId ? { ...sort, order: payload.order } : sort))
67
+ });
68
+ const moveSort = (state, payload) => {
69
+ const attributesUsedToSort = [...state.sort];
70
+ const [sortToMove] = attributesUsedToSort.splice(payload.indexFrom, 1);
71
+ attributesUsedToSort.splice(payload.indexTo, 0, sortToMove);
72
+ return {
73
+ ...state,
74
+ sort: attributesUsedToSort
75
+ };
76
+ };
77
+ const changeFulltextSearch = (state, payload) => ({
78
+ ...state,
79
+ fulltextSearch: payload.search
80
+ });
81
+ export const clearFulltextSearch = state => ({
82
+ ...state,
83
+ fulltextSearch: ''
84
+ });
85
+ const addFilter = (state, payload) => {
86
+ if (!state.canAddFilter) {
87
+ return state;
88
+ }
89
+ const newFilters = [
90
+ ...state.filters,
91
+ { ...payload, id: uuid(), condition: RecordFilterCondition.EQUAL, value: null }
92
+ ];
93
+ return {
94
+ ...state,
95
+ filters: newFilters,
96
+ canAddFilter: newFilters.length < state.maxFilters
97
+ };
98
+ };
99
+ const resetFilter = (state, payload) => ({
100
+ ...state,
101
+ filters: state.filters.map(filter => {
102
+ if (filter.id === payload.id) {
103
+ return {
104
+ ...filter,
105
+ condition: RecordFilterCondition.EQUAL,
106
+ value: null
107
+ };
108
+ }
109
+ return filter;
110
+ })
111
+ });
112
+ const removeFilter = (state, payload) => {
113
+ const newFilters = state.filters.filter(({ id }) => id !== payload.id);
114
+ return {
115
+ ...state,
116
+ filters: newFilters,
117
+ canAddFilter: newFilters.length < state.maxFilters
118
+ };
119
+ };
120
+ const changeFilterConfig = (state, payload) => ({
121
+ ...state,
122
+ filters: state.filters.map(filter => (filter.id === payload.id ? { ...filter, ...payload } : filter))
123
+ });
124
+ const moveFilter = (state, payload) => {
125
+ const attributesUsedToFilter = [...state.filters];
126
+ const [filterToMove] = attributesUsedToFilter.splice(payload.indexFrom, 1);
127
+ attributesUsedToFilter.splice(payload.indexTo, 0, filterToMove);
128
+ return {
129
+ ...state,
130
+ filters: attributesUsedToFilter
131
+ };
132
+ };
133
+ const reset = (_, payload) => payload;
134
+ export const viewSettingsReducer = (state, action) => {
135
+ switch (action.type) {
136
+ case ViewSettingsActionTypes.CHANGE_PAGE_SIZE: {
137
+ return changePageSize(state, action.payload);
138
+ }
139
+ case ViewSettingsActionTypes.ADD_ATTRIBUTE: {
140
+ return addAttribute(state, action.payload);
141
+ }
142
+ case ViewSettingsActionTypes.REMOVE_ATTRIBUTE: {
143
+ return removeAttribute(state, action.payload);
144
+ }
145
+ case ViewSettingsActionTypes.MOVE_ATTRIBUTE: {
146
+ return moveAttribute(state, action.payload);
147
+ }
148
+ case ViewSettingsActionTypes.RESET_ATTRIBUTES: {
149
+ return resetAttributes(state);
150
+ }
151
+ case ViewSettingsActionTypes.CHANGE_VIEW_TYPE: {
152
+ return changeViewType(state, action.payload);
153
+ }
154
+ case ViewSettingsActionTypes.ADD_SORT: {
155
+ return addSort(state, action.payload);
156
+ }
157
+ case ViewSettingsActionTypes.REMOVE_SORT: {
158
+ return removeSort(state, action.payload);
159
+ }
160
+ case ViewSettingsActionTypes.MOVE_SORT: {
161
+ return moveSort(state, action.payload);
162
+ }
163
+ case ViewSettingsActionTypes.CHANGE_SORT_ORDER: {
164
+ return changeSortOrder(state, action.payload);
165
+ }
166
+ case ViewSettingsActionTypes.CHANGE_FULLTEXT_SEARCH: {
167
+ return changeFulltextSearch(state, action.payload);
168
+ }
169
+ case ViewSettingsActionTypes.CLEAR_FULLTEXT_SEARCH: {
170
+ return clearFulltextSearch(state);
171
+ }
172
+ case ViewSettingsActionTypes.ADD_FILTER: {
173
+ return addFilter(state, action.payload);
174
+ }
175
+ case ViewSettingsActionTypes.RESET_FILTER: {
176
+ return resetFilter(state, action.payload);
177
+ }
178
+ case ViewSettingsActionTypes.REMOVE_FILTER: {
179
+ return removeFilter(state, action.payload);
180
+ }
181
+ case ViewSettingsActionTypes.CHANGE_FILTER_CONFIG: {
182
+ return changeFilterConfig(state, action.payload);
183
+ }
184
+ case ViewSettingsActionTypes.MOVE_FILTER: {
185
+ return moveFilter(state, action.payload);
186
+ }
187
+ case ViewSettingsActionTypes.RESET: {
188
+ return reset(state, action.payload);
189
+ }
190
+ default:
191
+ return state;
192
+ }
193
+ };
194
+ //# sourceMappingURL=viewSettingsReducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewSettingsReducer.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAY,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,MAAM,CAAC;AAIhC,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,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CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const nullValueConditions: import("../../_gqlTypes").RecordFilterCondition[];
@@ -0,0 +1,14 @@
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 { AttributeConditionFilter } from '../../types';
5
+ export const nullValueConditions = [
6
+ AttributeConditionFilter.IS_EMPTY,
7
+ AttributeConditionFilter.IS_NOT_EMPTY,
8
+ AttributeConditionFilter.TODAY,
9
+ AttributeConditionFilter.TOMORROW,
10
+ AttributeConditionFilter.YESTERDAY,
11
+ AttributeConditionFilter.LAST_MONTH,
12
+ AttributeConditionFilter.NEXT_MONTH
13
+ ];
14
+ //# sourceMappingURL=nullValuesConditions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullValuesConditions.js","sourceRoot":"","sources":["../../../src/components/Explorer/nullValuesConditions.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAEnD,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"}
@@ -6,6 +6,7 @@ import { FaTrash } from 'react-icons/fa';
6
6
  import { KitModal } from 'aristid-ds';
7
7
  import { useDeactivateRecordsMutation } from '../../_gqlTypes';
8
8
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
9
+ import { useMemo } from 'react';
9
10
  /**
10
11
  * Hook used to get the action for `<DataView />` component.
11
12
  *
@@ -26,7 +27,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
26
27
  cache.gc();
27
28
  }
28
29
  });
29
- const _deactivateAction = {
30
+ const _deactivateAction = useMemo(() => ({
30
31
  label: t('explorer.deactivate-item'),
31
32
  icon: _jsx(FaTrash, {}),
32
33
  isDanger: true,
@@ -43,7 +44,7 @@ export const useDeactivateAction = ({ isEnabled }) => {
43
44
  }
44
45
  })
45
46
  })
46
- };
47
+ }), [t, deactivateRecordsMutation]);
47
48
  return {
48
49
  deactivateAction: isEnabled ? _deactivateAction : null
49
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGpE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,SAAS,EAAa,EAAE,EAAE;IAC3D,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,4BAA4B,CAAC;QAC7D,MAAM,CAAC,KAAK,EAAE,kBAAkB;YAC5B,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBACxD,KAAK,CAAC,KAAK,CAAC;oBACR,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAC7B,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;YACH,KAAK,CAAC,EAAE,EAAE,CAAC;QACf,CAAC;KACJ,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAgB;QACnC,KAAK,EAAE,CAAC,CAAC,0BAA0B,CAAC;QACpC,IAAI,EAAE,KAAC,OAAO,KAAG;QACjB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CAAC,EAAC,MAAM,EAAE,SAAS,EAAC,EAAE,EAAE,CAC9B,QAAQ,CAAC,OAAO,CAAC;YACb,IAAI,EAAE,SAAS;YACf,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,CAAC,CAAC,kCAAkC,CAAC,IAAI,SAAS;YAC3D,MAAM,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YACvC,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,IAAI,SAAS;YAC3C,IAAI,EAAE,GAAG,EAAE,CACP,yBAAyB,CAAC;gBACtB,SAAS,EAAE;oBACP,SAAS;oBACT,UAAU,EAAE,CAAC,MAAM,CAAC;iBACvB;aACJ,CAAC;SACT,CAAC;KACT,CAAC;IAEF,OAAO;QACH,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;KACzD,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"useDeactivateAction.js","sourceRoot":"","sources":["../../../src/components/Explorer/useDeactivateAction.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAC,SAAS,EAA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