@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
@@ -1,40 +1,143 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import { useCallback } from 'react';
5
6
  import { AttributeFormat, AttributeType } from '../../_gqlTypes';
6
7
  import { useSharedTranslation } from '../../hooks/useSharedTranslation';
7
- import { KitTag, KitTypography } from 'aristid-ds';
8
+ import { FaArrowRight, FaCalendar, FaListAlt } from 'react-icons/fa';
9
+ import DOMPurify from 'dompurify';
10
+ import { KitAvatar, KitSpace, KitTag, KitTypography } from 'aristid-ds';
8
11
  import styled from 'styled-components';
9
- const isLinkValue = (v) => [AttributeType.simple_link, AttributeType.advanced_link].includes(v.attribute.type);
10
- const isTreeValue = (v) => [AttributeType.tree].includes(v.attribute.type);
11
- const isStandardValue = (v) => [AttributeType.simple, AttributeType.advanced].includes(v.attribute.type);
12
+ import { IdCard } from './IdCard';
13
+ import { multiColorTagAvatarClassName, TableTagGroup } from './TableTagGroup';
14
+ const isStandardValue = (v, attribute) => [AttributeType.simple, AttributeType.advanced].includes(attribute.type);
15
+ const isStandardValues = (values, attribute) => values.every(value => isStandardValue(value, attribute));
16
+ const isLinkValue = (v, attribute) => [AttributeType.simple_link, AttributeType.advanced_link].includes(attribute.type);
17
+ const isLinkValues = (values, attribute) => values.every(value => isLinkValue(value, attribute));
18
+ const isTreeValue = (v, attribute) => [AttributeType.tree].includes(attribute.type);
19
+ const isDateRangeValue = (v) => 'from' in v && 'to' in v;
12
20
  const StyledCenteringWrapper = styled.div `
13
21
  display: flex;
14
22
  align-items: center;
23
+ gap: calc(var(--general-spacing-xs) * 1px);
15
24
  `;
16
- export const TableCell = ({ values }) => {
25
+ const StyledColorChip = styled.div `
26
+ height: calc(var(--general-spacing-s) * 1px);
27
+ width: calc(var(--general-spacing-s) * 1px);
28
+ border-radius: calc(var(--general-border-radius-xs) * 1px);
29
+ background-color: ${props => props.$colorTextContent};
30
+ `;
31
+ const StyledFaListAlt = styled(FaListAlt) `
32
+ flex-shrink: 0;
33
+ `;
34
+ const StyledFaCalendar = styled(FaCalendar) `
35
+ flex-shrink: 0;
36
+ `;
37
+ export const TableCell = ({ values, attributeProperties }) => {
17
38
  const { t } = useSharedTranslation();
18
- return (_jsx(StyledCenteringWrapper, { children: values.map((value) => {
19
- if (isStandardValue(value)) {
20
- switch (value.attribute.format) {
39
+ const _getDateRangeValueContent = useCallback((value) => {
40
+ if (!isDateRangeValue(value)) {
41
+ return t('explorer.invalid-value');
42
+ }
43
+ return (_jsxs(KitSpace, { size: "xxs", children: [_jsx(StyledFaCalendar, {}), value.from, " ", _jsx(FaArrowRight, {}), " ", value.to] }));
44
+ }, []);
45
+ if (attributeProperties.multiple_values) {
46
+ if (isStandardValues(values, attributeProperties)) {
47
+ const tags = values.map(value => {
48
+ switch (attributeProperties.format) {
21
49
  case AttributeFormat.boolean:
22
- const valueToDisplay = value.valuePayload ? t('global.yes') : t('global.no');
23
- return (_jsx(KitTag, { type: !!value.valuePayload ? 'primary' : 'neutral', idCardProps: { description: valueToDisplay } }, value.attribute.id));
50
+ return {
51
+ idCardProps: {
52
+ description: value.valuePayload ? String(t('global.yes')) : String(t('global.no'))
53
+ },
54
+ type: value.valuePayload ? 'primary' : 'neutral'
55
+ };
56
+ case AttributeFormat.color:
57
+ const colorHexa = `#${value.valuePayload}`;
58
+ return {
59
+ idCardProps: {
60
+ description: colorHexa,
61
+ avatarProps: {
62
+ color: colorHexa,
63
+ shape: 'square',
64
+ className: multiColorTagAvatarClassName
65
+ }
66
+ }
67
+ };
68
+ case AttributeFormat.date_range:
69
+ return {
70
+ idCardProps: {
71
+ description: _getDateRangeValueContent(value.valuePayload)
72
+ },
73
+ type: 'primary'
74
+ };
24
75
  default:
25
- const valueContent = value.attribute.format === AttributeFormat.encrypted
76
+ const valueContent = attributeProperties.format === AttributeFormat.encrypted
26
77
  ? '●●●●●●●●●●●●'
27
78
  : value.valuePayload;
28
- return (_jsx(KitTypography.Text, { ellipsis: { tooltip: valueContent }, children: valueContent }, value.attribute.id));
79
+ return {
80
+ idCardProps: { description: valueContent },
81
+ type: 'primary'
82
+ };
29
83
  }
84
+ });
85
+ return _jsx(TableTagGroup, { tags: tags });
86
+ }
87
+ else if (isLinkValues(values, attributeProperties)) {
88
+ return (_jsx(KitAvatar.Group, { maxCount: 5, children: values.map((value, index) => {
89
+ if (!isLinkValue(value, attributeProperties)) {
90
+ return null;
91
+ }
92
+ return (_jsx(KitAvatar, { label: String(value?.linkPayload?.whoAmI.label), src: value?.linkPayload?.whoAmI.preview?.small, color: "primary", secondaryColorInvert: true }, index));
93
+ }) }));
94
+ }
95
+ else {
96
+ // TODO: handle multiple tree values
97
+ return null;
98
+ }
99
+ }
100
+ else {
101
+ const value = values[0]; // Not multiple_values attribute should not have more than one value
102
+ if (!value) {
103
+ return null;
104
+ }
105
+ let content = null;
106
+ if (isStandardValue(value, attributeProperties)) {
107
+ if (value.valuePayload === null) {
108
+ return null;
30
109
  }
31
- const defaultValue = '';
32
- if (isTreeValue(value)) {
33
- return value.treePayload?.record.id ?? defaultValue;
34
- }
35
- if (isLinkValue(value)) {
36
- return value.linkPayload?.id ?? defaultValue;
110
+ switch (attributeProperties.format) {
111
+ case AttributeFormat.boolean:
112
+ const valueToDisplay = value.valuePayload ? t('global.yes') : t('global.no');
113
+ content = (_jsx(KitTag, { type: !!value.valuePayload ? 'primary' : 'neutral', idCardProps: { description: valueToDisplay } }, attributeProperties.id));
114
+ break;
115
+ case AttributeFormat.rich_text:
116
+ const tmp = document.createElement('div');
117
+ tmp.innerHTML = DOMPurify.sanitize(value.valuePayload);
118
+ const textContent = tmp.textContent;
119
+ content = (_jsxs(_Fragment, { children: [_jsx(StyledFaListAlt, {}), _jsx(KitTypography.Text, { ellipsis: { tooltip: textContent }, children: textContent }, attributeProperties.id)] }));
120
+ break;
121
+ case AttributeFormat.color:
122
+ const colorTextContent = `#${value.valuePayload}`;
123
+ content = (_jsxs(_Fragment, { children: [_jsx(StyledColorChip, { "$colorTextContent": colorTextContent }), _jsx(KitTypography.Text, { ellipsis: { tooltip: colorTextContent }, children: colorTextContent }, attributeProperties.id)] }));
124
+ break;
125
+ case AttributeFormat.date_range:
126
+ content = _getDateRangeValueContent(value.valuePayload);
127
+ break;
128
+ default:
129
+ const valueContent = attributeProperties.format === AttributeFormat.encrypted ? '●●●●●●●●●●●●' : value.valuePayload;
130
+ content = (_jsx(KitTypography.Text, { ellipsis: { tooltip: valueContent }, children: valueContent }, attributeProperties.id));
131
+ break;
37
132
  }
38
- }) }));
133
+ }
134
+ if (isTreeValue(value, attributeProperties)) {
135
+ content = value.treePayload?.record.id ?? '';
136
+ }
137
+ if (isLinkValue(value, attributeProperties)) {
138
+ content = value.linkPayload?.whoAmI ? (_jsx(IdCard, { item: value.linkPayload?.whoAmI }, attributeProperties.id)) : null;
139
+ }
140
+ return _jsx(StyledCenteringWrapper, { children: content });
141
+ }
39
142
  };
40
143
  //# sourceMappingURL=TableCell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableCell.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EACH,eAAe,EACf,aAAa,EAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAEjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,WAAW,GAAG,CAAC,CAAwB,EAAuC,EAAE,CAClF,CAAC,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACxF,MAAM,WAAW,GAAG,CAAC,CAAwB,EAAuC,EAAE,CAClF,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACpD,MAAM,eAAe,GAAG,CAAC,CAAwB,EAAmC,EAAE,CAClF,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAE9E,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGxC,CAAC;AAMF,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e,CAAC,UAAU;oBAC3B,OAAO,GAAG,yBAAyB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;oBACxD,MAAM;gBACV;oBACI,MAAM,YAAY,GACd,mBAAmB,CAAC,MAAM,KAAK,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;oBACnG,OAAO,GAAG,CACN,KAAC,aAAa,CAAC,IAAI,IAA8B,QAAQ,EAAE,EAAC,OAAO,EAAE,YAAY,EAAC,YAC7E,YAAY,IADQ,mBAAmB,CAAC,EAAE,CAE1B,CACxB,CAAC;oBACF,MAAM;YACd,CAAC;QACL,CAAC;QAED,IAAI,WAAW,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1C,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;QACjD,CAAC;QAED,IAAI,WAAW,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1C,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAClC,KAAC,MAAM,IAA8B,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,IAAvD,mBAAmB,CAAC,EAAE,CAAqC,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;QACb,CAAC;QAED,OAAO,KAAC,sBAAsB,cAAE,OAAO,GAA0B,CAAC;IACtE,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { IKitTag } from 'aristid-ds/dist/Kit/DataDisplay/Tag/types';
2
+ import { FunctionComponent } from 'react';
3
+ export declare const multiColorTagAvatarClassName = "multi-color-tag-avatar";
4
+ export declare const TableTagGroup: FunctionComponent<{
5
+ tags: IKitTag[];
6
+ maxTags?: number;
7
+ }>;
@@ -0,0 +1,30 @@
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 { KitTag, KitTooltip } from 'aristid-ds';
6
+ import styled from 'styled-components';
7
+ export const multiColorTagAvatarClassName = 'multi-color-tag-avatar';
8
+ const StyledTagsGroupDiv = styled.div `
9
+ display: flex;
10
+ column-gap: calc(var(--general-spacing-xxs) * 1px);
11
+ row-gap: calc(var(--general-spacing-xxs) * 0.5px);
12
+ flex-wrap: wrap;
13
+
14
+ & > span {
15
+ margin-right: var(--general-spacing-none);
16
+ }
17
+
18
+ // TODO: wait DS to allow better customization on avatar
19
+ &&& .${multiColorTagAvatarClassName} {
20
+ height: calc(var(--general-spacing-s) * 1px);
21
+ width: calc(var(--general-spacing-s) * 1px);
22
+ border-radius: calc(var(--general-border-radius-xs) * 1px);
23
+ }
24
+ `;
25
+ export const TableTagGroup = ({ tags, maxTags = 3 }) => {
26
+ const hiddenTags = tags.slice(maxTags);
27
+ const visibleTags = tags.slice(0, maxTags);
28
+ return (_jsxs(StyledTagsGroupDiv, { children: [visibleTags.map((tag, index) => (_jsx(KitTag, { ...tag }, index))), hiddenTags.length > 0 && (_jsx(KitTooltip, { overlay: hiddenTags.map((hiddenTag, index) => (_jsx("div", { children: hiddenTag.idCardProps?.description }, index))), children: _jsx(KitTag, { type: "primary", idCardProps: { description: `+${hiddenTags.length}` } }) }))] }));
29
+ };
30
+ //# sourceMappingURL=TableTagGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableTagGroup.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableTagGroup.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,YAAY,CAAC;AAG9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAErE,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;WAW1B,4BAA4B;;;;;CAKtC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAGrB,CAAC,EAAC,IAAI,EAAE,OAAO,GAAG,CAAC,EAAC,EAAE,EAAE;IACzB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAE3C,OAAO,CACH,MAAC,kBAAkB,eACd,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,KAAC,MAAM,OAAiB,GAAG,IAAd,KAAK,CAAa,CAClC,CAAC,EACD,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,KAAC,UAAU,IACP,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,wBAAkB,SAAS,CAAC,WAAW,EAAE,WAAW,IAA1C,KAAK,CAA4C,CAC9D,CAAC,YAEF,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,WAAW,EAAE,EAAC,WAAW,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,EAAC,GAAI,GACrE,CAChB,IACgB,CACxB,CAAC;AACN,CAAC,CAAC"}
@@ -1,11 +1,29 @@
1
- import { IExplorerData } from '../_types';
2
- import { ExplorerQuery } from '../../../_gqlTypes';
3
- export declare const useExplorerData: (libraryId: string, attributeIds: string[]) => {
1
+ import { IExplorerData, IExplorerFilter } from '../_types';
2
+ import { ExplorerQuery, RecordFilterInput, SortOrder } from '../../../_gqlTypes';
3
+ export declare const dateValuesSeparator = "\n";
4
+ export declare const useExplorerData: ({ libraryId, attributeIds, fulltextSearch, sorts, pagination, filters, skip }: {
5
+ libraryId: string;
6
+ attributeIds: string[];
7
+ fulltextSearch: string;
8
+ sorts: Array<{
9
+ attributeId: string;
10
+ order: SortOrder;
11
+ }>;
12
+ pagination: null | {
13
+ limit: number;
14
+ offset: number;
15
+ };
16
+ filters: IExplorerFilter[];
17
+ skip: boolean;
18
+ }) => {
4
19
  data: IExplorerData;
5
20
  loading: boolean;
6
21
  refetch: (variables?: Partial<import("../../../_gqlTypes").Exact<{
7
22
  libraryId: import("../../../_gqlTypes").Scalars["ID"];
8
23
  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>>;
24
+ pagination?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordsPagination>;
25
+ filters?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").InputMaybe<RecordFilterInput>> | import("../../../_gqlTypes").InputMaybe<RecordFilterInput>>;
26
+ multipleSort?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").RecordSortInput> | import("../../../_gqlTypes").RecordSortInput>;
27
+ searchQuery?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").Scalars["String"]>;
10
28
  }>>) => Promise<import("@apollo/client").ApolloQueryResult<ExplorerQuery>>;
11
29
  };
@@ -2,16 +2,23 @@
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 { localizedTranslation } from '@leav/utils';
5
- import { useExplorerQuery } from '../../../_gqlTypes';
5
+ import { AttributeFormat, RecordFilterCondition, RecordFilterOperator, useExplorerQuery } from '../../../_gqlTypes';
6
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 '../nullValuesConditions';
11
+ export const dateValuesSeparator = '\n';
7
12
  const _mapping = (data, libraryId, availableLangs) => {
8
- const attributes = {};
9
- // TODO: can we use `Array.reduce` method?
10
- if (data.records.list.length > 0) {
11
- data.records.list[0].properties.forEach(({ attributeId, values }) => {
12
- attributes[attributeId] = localizedTranslation(values[0].attribute.label, availableLangs);
13
- });
14
- }
13
+ const attributes = data.records.list.length
14
+ ? data.records.list[0].properties.reduce((acc, property) => {
15
+ acc[property.attributeId] = {
16
+ ...property.attributeProperties,
17
+ label: localizedTranslation(property.attributeProperties.label, availableLangs)
18
+ };
19
+ return acc;
20
+ }, {})
21
+ : {};
15
22
  const records = data.records.list.map(({ whoAmI, properties }) => ({
16
23
  libraryId,
17
24
  key: whoAmI.id, // For <KitTable /> only
@@ -26,15 +33,90 @@ const _mapping = (data, libraryId, availableLangs) => {
26
33
  propertiesById: properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {})
27
34
  }));
28
35
  return {
36
+ totalCount: data.records.totalCount ?? 0,
29
37
  attributes,
30
38
  records
31
39
  };
32
40
  };
33
- export const useExplorerData = (libraryId, attributeIds) => {
41
+ const _getDateRequestFilters = ({ field, condition, value }) => {
42
+ switch (condition) {
43
+ case RecordFilterCondition.BETWEEN:
44
+ const [from, to] = value.split(dateValuesSeparator);
45
+ return [
46
+ {
47
+ field,
48
+ condition,
49
+ value: JSON.stringify({
50
+ from,
51
+ to
52
+ })
53
+ }
54
+ ];
55
+ case RecordFilterCondition.NOT_EQUAL:
56
+ return [
57
+ {
58
+ field,
59
+ condition: RecordFilterCondition.LESS_THAN,
60
+ value: dayjs.unix(Number(value)).startOf('day').unix().toString()
61
+ },
62
+ { operator: RecordFilterOperator.OR },
63
+ {
64
+ field,
65
+ condition: RecordFilterCondition.GREATER_THAN,
66
+ value: dayjs.unix(Number(value)).endOf('day').unix().toString()
67
+ }
68
+ ];
69
+ case RecordFilterCondition.EQUAL:
70
+ return [
71
+ {
72
+ field,
73
+ condition: RecordFilterCondition.BETWEEN,
74
+ value: JSON.stringify({
75
+ from: dayjs.unix(Number(value)).startOf('day').unix().toString(),
76
+ to: dayjs.unix(Number(value)).endOf('day').unix().toString()
77
+ })
78
+ }
79
+ ];
80
+ default:
81
+ return [
82
+ {
83
+ field,
84
+ condition,
85
+ value
86
+ }
87
+ ];
88
+ }
89
+ };
90
+ export const useExplorerData = ({ libraryId, attributeIds, fulltextSearch, sorts, pagination, filters, skip }) => {
34
91
  const { lang: availableLangs } = useLang();
35
- const { data, loading, refetch } = useExplorerQuery({ variables: { libraryId, attributeIds } });
92
+ const queryFilters = interleaveElement({ operator: RecordFilterOperator.AND }, filters
93
+ .filter(({ value, condition }) => value !== null || nullValueConditions.includes(condition))
94
+ .map(({ attribute, field, condition, value }) => attribute.format === AttributeFormat.date
95
+ ? _getDateRequestFilters({ field, condition, value })
96
+ : [
97
+ {
98
+ field,
99
+ condition,
100
+ value
101
+ }
102
+ ]));
103
+ const { data, loading, refetch } = useExplorerQuery({
104
+ skip,
105
+ variables: {
106
+ libraryId,
107
+ attributeIds,
108
+ pagination,
109
+ searchQuery: fulltextSearch,
110
+ multipleSort: sorts.map(({ order, attributeId }) => ({
111
+ field: attributeId,
112
+ order
113
+ })),
114
+ filters: queryFilters
115
+ }
116
+ });
117
+ const memoizedData = useMemo(() => (data !== undefined ? _mapping(data, libraryId, availableLangs) : null), [data]);
36
118
  return {
37
- data: data !== undefined ? _mapping(data, libraryId, availableLangs) : null,
119
+ data: memoizedData,
38
120
  loading,
39
121
  refetch
40
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAgB,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EA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IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEpH,OAAO;QACH,IAAI,EAAE,YAAY;QAClB,OAAO;QACP,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
@@ -1,9 +1,13 @@
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';
4
5
  export interface IExplorerData {
6
+ totalCount: number;
5
7
  attributes: {
6
- [attributeId: string]: string;
8
+ [attributeId: string]: Override<AttributePropertiesFragment, {
9
+ label: string;
10
+ }>;
7
11
  };
8
12
  records: IItemData[];
9
13
  }
@@ -11,7 +15,7 @@ export interface IItemData {
11
15
  libraryId: string;
12
16
  key: string;
13
17
  itemId: string;
14
- whoAmI: ItemWhoAmI;
18
+ whoAmI: Required<RecordIdentityFragment['whoAmI']>;
15
19
  propertiesById: {
16
20
  [attributeId: string]: PropertyValueFragment[];
17
21
  };
@@ -30,3 +34,23 @@ export interface IPrimaryAction {
30
34
  export type ActionHook<T = {}> = {
31
35
  isEnabled: boolean;
32
36
  } & T;
37
+ export interface IExplorerFilter {
38
+ id: string;
39
+ attribute: {
40
+ format: AttributeFormat;
41
+ label: string;
42
+ };
43
+ field: string;
44
+ condition: RecordFilterCondition;
45
+ value: string | null;
46
+ }
47
+ export interface IFilterDropDownProps {
48
+ filter: IExplorerFilter;
49
+ }
50
+ export type DefaultViewSettings = Override<Partial<IViewSettingsState>, {
51
+ filters?: Array<{
52
+ field: string;
53
+ condition: RecordFilterCondition;
54
+ value: string | null;
55
+ }>;
56
+ }>;
@@ -0,0 +1,2 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const ExplorerFilterBar: FunctionComponent;
@@ -0,0 +1,37 @@
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
+ const FilterStyled = styled(KitFilter) `
12
+ flex: 0 0 auto;
13
+ `;
14
+ const ExplorerFilterBarListStyled = styled.ul `
15
+ padding: calc(var(--general-spacing-xs) * 1px) calc(var(--general-spacing-xxs) * 1px)
16
+ calc(var(--general-spacing-m) * 1px) calc(var(--general-spacing-xxs) * 1px);
17
+ margin: 0;
18
+ list-style: none;
19
+ display: flex;
20
+ overflow: auto;
21
+ flex-wrap: nowrap;
22
+ align-items: center;
23
+ gap: 0;
24
+ white-space: nowrap;
25
+ `;
26
+ const DividerStyled = styled(KitDivider) `
27
+ height: 2em;
28
+ `;
29
+ export const ExplorerFilterBar = () => {
30
+ const { t } = useSharedTranslation();
31
+ const { view: { filters } } = useViewSettingsContext();
32
+ if (filters.length === 0) {
33
+ return null;
34
+ }
35
+ return (_jsxs(ExplorerFilterBarListStyled, { "aria-label": t('explorer.filter-list.active'), children: [_jsx(KitSpace, { size: "s", children: filters.map(filter => (_jsx("li", { children: _jsx(CommonFilterItem, { filter: filter }, filter.id) }, filter.id))) }), _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.delete-filters') }) })] }));
36
+ };
37
+ //# sourceMappingURL=ExplorerFilterBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplorerFilterBar.js","sourceRoot":"","sources":["../../../../src/components/Explorer/display-view-filters/ExplorerFilterBar.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;AAElF,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,2BAA2B,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;CAW5C,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAsB,GAAG,EAAE;IACrD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EACF,IAAI,EAAE,EAAC,OAAO,EAAC,EAClB,GAAG,sBAAsB,EAAE,CAAC;IAE7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,MAAC,2BAA2B,kBAAa,CAAC,CAAC,6BAA6B,CAAC,aACrE,KAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,YACb,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACnB,uBACI,KAAC,gBAAgB,IAAiB,MAAM,EAAE,MAAM,IAAzB,MAAM,CAAC,EAAE,CAAoB,IAD/C,MAAM,CAAC,EAAE,CAEb,CACR,CAAC,GACK,EACX,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,yBAAyB,CAAC,GAClB,GACd,IACqB,CACjC,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"}
@@ -5,8 +5,8 @@ interface IColumnItemProps {
5
5
  visible: boolean;
6
6
  title: string;
7
7
  onVisibilityClick?: () => void;
8
- disabled?: boolean;
9
8
  value?: string;
9
+ locked?: boolean;
10
10
  }
11
11
  export declare const ColumnItem: FunctionComponent<IColumnItemProps>;
12
12
  export {};
@@ -3,16 +3,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  // This file is released under LGPL V3
4
4
  // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
5
  import { KitTypography } from 'aristid-ds';
6
- import { FaEye, FaEyeSlash } from 'react-icons/fa';
6
+ import { FaEye, FaEyeSlash, FaLock } from 'react-icons/fa';
7
7
  import styled from 'styled-components';
8
8
  import { useSortable } from '@dnd-kit/sortable';
9
9
  import { CSS } from '@dnd-kit/utilities';
10
- import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
10
+ import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
11
11
  const StyledValue = styled(KitTypography.Text) `
12
12
  color: var(--general-utilities-disabled);
13
13
  `;
14
14
  const StyledConfigurationItem = styled.li `
15
- list-style: none;
16
15
  color: var(--general-utilities-text-primary);
17
16
  display: flex;
18
17
  width: 100%;
@@ -53,18 +52,25 @@ const StyledConfigurationItem = styled.li `
53
52
  }
54
53
  `;
55
54
  const StyledFaEye = styled(FaEye) `
55
+ display: flex;
56
56
  color: currentColor;
57
57
  `;
58
58
  const StyledEyeSlash = styled(FaEyeSlash) `
59
+ display: flex;
60
+ color: var(--general-utilities-disabled);
61
+ `;
62
+ const StyledLocked = styled(FaLock) `
63
+ display: flex;
59
64
  color: var(--general-utilities-disabled);
60
65
  `;
61
66
  const StyledDragHandle = styled.span `
67
+ display: flex;
62
68
  cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
63
69
  `;
64
70
  const StyledEmptyIcon = styled.div `
65
71
  width: calc(var(--general-spacing-s) * 1px);
66
72
  `;
67
- export const ColumnItem = ({ itemId, dragHandler, title, disabled, visible, onVisibilityClick }) => {
73
+ export const ColumnItem = ({ itemId, dragHandler, title, visible, onVisibilityClick, locked = false }) => {
68
74
  const { t } = useSharedTranslation();
69
75
  const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: itemId });
70
76
  const style = {
@@ -73,6 +79,7 @@ export const ColumnItem = ({ itemId, dragHandler, title, disabled, visible, onVi
73
79
  };
74
80
  const _handleClick = () => onVisibilityClick?.();
75
81
  const visibilityButtonLabel = visible ? t('explorer.hide') : t('explorer.show');
76
- return (_jsxs(StyledConfigurationItem, { className: disabled ? 'disabled' : '', 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: disabled, onClick: _handleClick, title: visibilityButtonLabel, "aria-label": visibilityButtonLabel, children: visible ? _jsx(StyledFaEye, {}) : _jsx(StyledEyeSlash, {}) })] }));
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 })] }));
77
84
  };
78
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,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AAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAEhF,MAAM,cAAc,GAAG,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
+ }>;