@leav/ui 0.3.6-1190202 → 0.3.6-1e8a80b

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 (221) hide show
  1. package/dist/__mocks__/common/attribute.d.ts +1 -0
  2. package/dist/__mocks__/common/attribute.js +9 -1
  3. package/dist/__mocks__/common/attribute.js.map +1 -1
  4. package/dist/__mocks__/common/value.js +3 -1
  5. package/dist/__mocks__/common/value.js.map +1 -1
  6. package/dist/__mocks__/common/view.js +7 -5
  7. package/dist/__mocks__/common/view.js.map +1 -1
  8. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js +1 -1
  9. package/dist/__mocks__/mockQuery/mockGetLibraryDetailExtendedQuery.js.map +1 -1
  10. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js +2 -1
  11. package/dist/__mocks__/mockQuery/mockGetViewListQuery.js.map +1 -1
  12. package/dist/_gqlTypes/index.d.ts +367 -72
  13. package/dist/_gqlTypes/index.js +202 -48
  14. package/dist/_gqlTypes/index.js.map +1 -1
  15. package/dist/_queries/libraries/getLibraryDetailExtendQuery.d.ts +3 -4
  16. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js +2 -3
  17. package/dist/_queries/libraries/getLibraryDetailExtendQuery.js.map +1 -1
  18. package/dist/_queries/records/getRecordColumnsValues.d.ts +5 -3
  19. package/dist/_queries/records/getRecordColumnsValues.js +4 -1
  20. package/dist/_queries/records/getRecordColumnsValues.js.map +1 -1
  21. package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
  22. package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
  23. package/dist/_queries/views/saveViewMutation.js +1 -1
  24. package/dist/_queries/views/viewDetailsFragment.js +14 -11
  25. package/dist/_queries/views/viewDetailsFragment.js.map +1 -1
  26. package/dist/_utils/index.js +5 -2
  27. package/dist/_utils/index.js.map +1 -1
  28. package/dist/_utils/interleaveElement.d.ts +1 -0
  29. package/dist/_utils/interleaveElement.js +5 -0
  30. package/dist/_utils/interleaveElement.js.map +1 -0
  31. package/dist/components/Explorer/DataView.js +2 -1
  32. package/dist/components/Explorer/DataView.js.map +1 -1
  33. package/dist/components/Explorer/Explorer.d.ts +3 -4
  34. package/dist/components/Explorer/Explorer.js +22 -25
  35. package/dist/components/Explorer/Explorer.js.map +1 -1
  36. package/dist/components/Explorer/ExplorerTitle.d.ts +2 -0
  37. package/dist/components/Explorer/ExplorerTitle.js +28 -11
  38. package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
  39. package/dist/components/Explorer/_constants.d.ts +4 -0
  40. package/dist/components/Explorer/_constants.js +17 -0
  41. package/dist/components/Explorer/_constants.js.map +1 -0
  42. package/dist/components/Explorer/_queries/useExplorerData.d.ts +15 -7
  43. package/dist/components/Explorer/_queries/useExplorerData.js +136 -19
  44. package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
  45. package/dist/components/Explorer/_types.d.ts +33 -1
  46. package/dist/components/Explorer/conditionsHelper.d.ts +2 -0
  47. package/dist/components/Explorer/conditionsHelper.js +16 -0
  48. package/dist/components/Explorer/conditionsHelper.js.map +1 -0
  49. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.d.ts +4 -0
  50. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js +47 -0
  51. package/dist/components/Explorer/display-view-filters/ExplorerToolBar.js.map +1 -0
  52. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
  53. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
  54. package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
  55. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +11 -21
  56. package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -1
  57. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +1 -2
  58. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +3 -3
  59. package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -1
  60. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.d.ts +3 -0
  61. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js +10 -0
  62. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.js.map +1 -0
  63. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.d.ts +3 -0
  64. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js +11 -0
  65. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.js.map +1 -0
  66. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.d.ts +3 -0
  67. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js +66 -0
  68. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.js.map +1 -0
  69. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.d.ts +3 -0
  70. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js +11 -0
  71. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.js.map +1 -0
  72. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.d.ts +3 -0
  73. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js +11 -0
  74. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.js.map +1 -0
  75. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.d.ts +3 -0
  76. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js +11 -0
  77. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.js.map +1 -0
  78. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +1 -1
  79. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +60 -6
  80. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -1
  81. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -1
  82. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +2 -2
  83. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +11 -27
  84. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -1
  85. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +2 -2
  86. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +11 -26
  87. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -1
  88. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +6 -9
  89. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +25 -7
  90. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -1
  91. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +1 -0
  92. package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -1
  93. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +2 -0
  94. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +24 -6
  95. package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -1
  96. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +2 -1
  97. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +45 -28
  98. package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -1
  99. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +20 -20
  100. package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -1
  101. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +12 -1
  102. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -1
  103. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +26 -11
  104. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +58 -23
  105. package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -1
  106. package/dist/components/Explorer/useEditAction.js +3 -3
  107. package/dist/components/Explorer/useEditAction.js.map +1 -1
  108. package/dist/components/Explorer/useSearchInput.js +1 -1
  109. package/dist/components/Explorer/useSearchInput.js.map +1 -1
  110. package/dist/components/Explorer/useViewSettingsReducer.d.ts +8 -0
  111. package/dist/components/Explorer/useViewSettingsReducer.js +125 -0
  112. package/dist/components/Explorer/useViewSettingsReducer.js.map +1 -0
  113. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js +7 -11
  114. package/dist/components/LibraryItemsList/LibraryItemsListContent/LibraryItemsListContent.js.map +1 -1
  115. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js +7 -5
  116. package/dist/components/LibraryItemsList/LibraryItemsListTable/Header/Header.js.map +1 -1
  117. package/dist/components/LibraryItemsList/MenuView/MenuView.js +4 -9
  118. package/dist/components/LibraryItemsList/MenuView/MenuView.js.map +1 -1
  119. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js +2 -3
  120. package/dist/components/LibraryItemsList/ViewPanel/EditView/EditView.js.map +1 -1
  121. package/dist/components/LibraryItemsList/ViewPanel/View/View.js +3 -3
  122. package/dist/components/LibraryItemsList/ViewPanel/View/View.js.map +1 -1
  123. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js +4 -9
  124. package/dist/components/LibraryItemsList/helpers/getFieldsFromView.js.map +1 -1
  125. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js +7 -5
  126. package/dist/components/LibraryItemsList/hooks/useLibraryView/useLibraryView.js.map +1 -1
  127. package/dist/components/LibraryItemsList/hooks/useSearchReducer/_types.d.ts +1 -1
  128. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.d.ts +1 -1
  129. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js +25 -33
  130. package/dist/components/LibraryItemsList/hooks/useSearchReducer/searchReducer.js.map +1 -1
  131. package/dist/components/RecordEdition/EditRecord/EditRecord.d.ts +1 -0
  132. package/dist/components/RecordEdition/EditRecord/EditRecord.js +8 -16
  133. package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
  134. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +16 -3
  135. package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
  136. package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +2 -0
  137. package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
  138. package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +5 -2
  139. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +6 -3
  140. package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
  141. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.d.ts +3 -1
  142. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js +8 -2
  143. package/dist/components/RecordEdition/EditRecordContent/helpers/extractFormElements/extractFormElements.js.map +1 -1
  144. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +3 -1
  145. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
  146. package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
  147. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +2 -2
  148. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
  149. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
  150. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
  151. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
  152. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
  153. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -7
  154. package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
  155. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
  156. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
  157. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
  158. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +2 -0
  159. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +16 -36
  160. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
  161. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +1 -2
  162. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
  163. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +9 -6
  164. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
  165. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +18 -5
  166. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
  167. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +9 -5
  168. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
  169. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +9 -8
  170. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
  171. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +13 -6
  172. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
  173. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +9 -10
  174. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
  175. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +4 -2
  176. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +3 -1
  177. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
  178. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +15 -3
  179. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -1
  180. package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +2 -0
  181. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js +10 -4
  182. package/dist/components/RecordEdition/EditRecordModal/EditRecordModal.js.map +1 -1
  183. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.d.ts +2 -0
  184. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js +2 -2
  185. package/dist/components/RecordEdition/EditRecordPage/EditRecordPage.js.map +1 -1
  186. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.d.ts +4 -1
  187. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js +35 -3
  188. package/dist/components/RecordEdition/EditRecordSidebar/EditRecordSidebar.js.map +1 -1
  189. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.d.ts +4 -7
  190. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js +6 -8
  191. package/dist/components/RecordEdition/EditRecordSidebar/PropertiesList/PropertiesList.js.map +1 -1
  192. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.d.ts +9 -0
  193. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js +42 -0
  194. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/RecordInformations.js.map +1 -0
  195. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.d.ts +6 -0
  196. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js +35 -0
  197. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordInformations/useRecordInformations.js.map +1 -0
  198. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.d.ts +2 -281
  199. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js +25 -56
  200. package/dist/components/RecordEdition/EditRecordSidebar/RecordSummary/RecordSummary.js.map +1 -1
  201. package/dist/constants.d.ts +1 -0
  202. package/dist/constants.js +1 -0
  203. package/dist/constants.js.map +1 -1
  204. package/dist/hooks/useExecuteSaveViewMutation/index.d.ts +1 -0
  205. package/dist/hooks/useExecuteSaveViewMutation/index.js +5 -0
  206. package/dist/hooks/useExecuteSaveViewMutation/index.js.map +1 -0
  207. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.d.ts +6 -0
  208. package/dist/hooks/{useExecuteAddViewMutation/useExecuteAddViewMutation.js → useExecuteSaveViewMutation/useExecuteSaveViewMutation.js} +6 -6
  209. package/dist/hooks/useExecuteSaveViewMutation/useExecuteSaveViewMutation.js.map +1 -0
  210. package/dist/locales/en/shared.json +19 -6
  211. package/dist/locales/fr/shared.json +19 -6
  212. package/dist/types/views.d.ts +4 -4
  213. package/package.json +2 -2
  214. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +0 -2
  215. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +0 -41
  216. package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +0 -1
  217. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +0 -3
  218. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +0 -69
  219. package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +0 -1
  220. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.d.ts +0 -6
  221. package/dist/hooks/useExecuteAddViewMutation/useExecuteAddViewMutation.js.map +0 -1
@@ -1,6 +1,7 @@
1
1
  import { Override } from '@leav/utils';
2
2
  import { AttributeFormat, AttributePropertiesFragment, PropertyValueFragment, RecordFilterCondition, RecordIdentityFragment } from '../../_gqlTypes';
3
3
  import { ReactElement } from 'react';
4
+ import { IViewSettingsState } from './manage-view-settings';
4
5
  export interface IExplorerData {
5
6
  totalCount: number;
6
7
  attributes: {
@@ -18,6 +19,10 @@ export interface IItemData {
18
19
  propertiesById: {
19
20
  [attributeId: string]: PropertyValueFragment[];
20
21
  };
22
+ /**
23
+ * Can be named `linkId` too, but for historical reason we keep old name 👴🏼.
24
+ */
25
+ id_value?: string;
21
26
  }
22
27
  export interface IItemAction {
23
28
  callback: (item: IItemData) => void;
@@ -40,9 +45,36 @@ export interface IExplorerFilter {
40
45
  label: string;
41
46
  };
42
47
  field: string;
43
- condition: RecordFilterCondition;
48
+ condition: RecordFilterCondition | null;
44
49
  value: string | null;
45
50
  }
51
+ export interface IFilterChildrenDropDownProps {
52
+ filter: IExplorerFilter;
53
+ onFilterChange: (filterData: IExplorerFilter) => void;
54
+ }
46
55
  export interface IFilterDropDownProps {
47
56
  filter: IExplorerFilter;
48
57
  }
58
+ export type DefaultViewSettings = Override<Partial<IViewSettingsState>, {
59
+ filters?: Array<{
60
+ field: string;
61
+ condition: RecordFilterCondition;
62
+ value: string | null;
63
+ }>;
64
+ }>;
65
+ export interface IEntrypointTree {
66
+ type: 'tree';
67
+ treeId: string;
68
+ nodeId: string;
69
+ }
70
+ export interface IEntrypointLibrary {
71
+ type: 'library';
72
+ libraryId: string;
73
+ }
74
+ export interface IEntrypointLink {
75
+ type: 'link';
76
+ parentLibraryId: string;
77
+ parentRecordId: string;
78
+ linkAttributeId: string;
79
+ }
80
+ export type Entrypoint = IEntrypointTree | IEntrypointLibrary | IEntrypointLink;
@@ -0,0 +1,2 @@
1
+ export declare const hasOnlyNoValueConditions: (attributeFormat: string) => boolean;
2
+ export declare const nullValueConditions: import("../../_gqlTypes").RecordFilterCondition[];
@@ -0,0 +1,16 @@
1
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
2
+ // This file is released under LGPL V3
3
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
4
+ import { AttributeFormat } from '../../_gqlTypes';
5
+ import { AttributeConditionFilter } from '../../types';
6
+ export const hasOnlyNoValueConditions = (attributeFormat) => [AttributeFormat.color, AttributeFormat.date_range, AttributeFormat.encrypted, AttributeFormat.extended].includes(attributeFormat);
7
+ export const nullValueConditions = [
8
+ AttributeConditionFilter.IS_EMPTY,
9
+ AttributeConditionFilter.IS_NOT_EMPTY,
10
+ AttributeConditionFilter.TODAY,
11
+ AttributeConditionFilter.TOMORROW,
12
+ AttributeConditionFilter.YESTERDAY,
13
+ AttributeConditionFilter.LAST_MONTH,
14
+ AttributeConditionFilter.NEXT_MONTH
15
+ ];
16
+ //# sourceMappingURL=conditionsHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionsHelper.js","sourceRoot":"","sources":["../../../src/components/Explorer/conditionsHelper.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,eAAuB,EAAW,EAAE,CACzE,CAAC,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC,UAAU,EAAE,eAAe,CAAC,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAC7G,eAAe,CAClB,CAAC;AAEN,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,wBAAwB,CAAC,QAAQ;IACjC,wBAAwB,CAAC,YAAY;IACrC,wBAAwB,CAAC,KAAK;IAC9B,wBAAwB,CAAC,QAAQ;IACjC,wBAAwB,CAAC,SAAS;IAClC,wBAAwB,CAAC,UAAU;IACnC,wBAAwB,CAAC,UAAU;CACtC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FunctionComponent } from 'react';
2
+ export declare const ExplorerToolBar: FunctionComponent<{
3
+ libraryId: string;
4
+ }>;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
3
+ // This file is released under LGPL V3
4
+ // License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
5
+ import styled from 'styled-components';
6
+ import { useViewSettingsContext } from '../manage-view-settings/store-view-settings/useViewSettingsContext';
7
+ import { KitButton, KitDivider, KitFilter, KitSpace } from 'aristid-ds';
8
+ import { FaTrash } from 'react-icons/fa';
9
+ import { useSharedTranslation } from '../../../hooks/useSharedTranslation';
10
+ import { CommonFilterItem } from '../manage-view-settings/_shared/CommonFilterItem';
11
+ import { SortOrder } from '../../../_gqlTypes';
12
+ import { useOpenViewSettings } from '../manage-view-settings';
13
+ import { useAttributeDetailsData } from '../manage-view-settings/_shared/useAttributeDetailsData';
14
+ const FilterStyled = styled(KitFilter) `
15
+ flex: 0 0 auto;
16
+ `;
17
+ const ExplorerToolBarListStyled = styled.ul `
18
+ padding: calc(var(--general-spacing-xs) * 1px) calc(var(--general-spacing-xxs) * 1px)
19
+ calc(var(--general-spacing-m) * 1px) calc(var(--general-spacing-xxs) * 1px);
20
+ margin: 0;
21
+ list-style: none;
22
+ display: flex;
23
+ overflow: auto;
24
+ flex-wrap: nowrap;
25
+ align-items: center;
26
+ gap: 0;
27
+ white-space: nowrap;
28
+ `;
29
+ const DividerStyled = styled(KitDivider) `
30
+ height: 2em;
31
+ `;
32
+ export const ExplorerToolBar = ({ libraryId }) => {
33
+ const { t } = useSharedTranslation();
34
+ const { view: { filters, sort } } = useViewSettingsContext();
35
+ const { openSettingsPanel } = useOpenViewSettings(libraryId);
36
+ const { attributeDetailsById } = useAttributeDetailsData(libraryId);
37
+ if (filters.length === 0 && sort.length === 0) {
38
+ return null;
39
+ }
40
+ const sortValues = sort.length === 0
41
+ ? undefined
42
+ : sort.map(({ field, order }) => (attributeDetailsById?.[field]?.label ?? field) +
43
+ ' ' +
44
+ (order === SortOrder.asc ? t('explorer.sort-ascending') : t('explorer.sort-descending')));
45
+ return (_jsxs(ExplorerToolBarListStyled, { "aria-label": t('explorer.toolbar.active'), children: [_jsx(KitSpace, { size: "s", children: filters.map(filter => (_jsx("li", { children: _jsx(CommonFilterItem, { filter: filter }, filter.id) }, filter.id))) }), filters.length > 0 && sort.length > 0 && _jsx(DividerStyled, { type: "vertical" }), sort.length > 0 && (_jsx("li", { children: _jsx(FilterStyled, { label: t('explorer.sort-items'), values: sortValues, onClick: () => openSettingsPanel('sort-items') }) })), _jsx(DividerStyled, { type: "vertical" }), _jsx("li", { children: _jsx(FilterStyled, { as: KitButton, type: "secondary", size: "s", danger: true, icon: _jsx(FaTrash, {}), disabled: true, children: t('explorer.reset-view') }) })] }));
46
+ };
47
+ //# sourceMappingURL=ExplorerToolBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplorerToolBar.js","sourceRoot":"","sources":["../../../../src/components/Explorer/display-view-filters/ExplorerToolBar.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,sBAAsB,EAAC,MAAM,oEAAoE,CAAC;AAC1G,OAAO,EAAC,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,uBAAuB,EAAC,MAAM,yDAAyD,CAAC;AAEhG,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;CAW1C,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAEvC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;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AG,EAC1E,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAChB,uBACI,KAAC,YAAY,IACT,KAAK,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAC/B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAChD,GACD,CACR,EACD,KAAC,aAAa,IAAC,IAAI,EAAC,UAAU,GAAG,EACjC,uBACI,KAAC,YAAY,IAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAC,WAAW,EAAC,IAAI,EAAC,GAAG,EAAC,MAAM,QAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,QAAQ,kBACpF,CAAC,CAAC,qBAAqB,CAAC,GACd,GACd,IACmB,CAC/B,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IExplorerFilter } from '../../_types';
3
+ export declare const CommonFilterItem: FunctionComponent<{
4
+ filter: IExplorerFilter;
5
+ }>;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FilterDropDown } from '../filter-items/filter-type/FilterDropDown';
3
+ import styled from 'styled-components';
4
+ import { KitFilter } from 'aristid-ds';
5
+ const FilterStyled = styled(KitFilter) `
6
+ flex: 0 0 auto;
7
+ `;
8
+ export const CommonFilterItem = ({ filter }) => (_jsx(FilterStyled, { expandable: true, label: filter.attribute.label, values: filter.value === null ? [] : [filter.value], dropDownProps: {
9
+ placement: 'bottomLeft',
10
+ dropdownRender: () => _jsx(FilterDropDown, { filter: filter })
11
+ } }));
12
+ //# sourceMappingURL=CommonFilterItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonFilterItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/CommonFilterItem.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,cAAc,EAAC,MAAM,4CAA4C,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAGrC,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAiD,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,CACxF,KAAC,YAAY,IACT,UAAU,QACV,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAC7B,MAAM,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACnD,aAAa,EAAE;QACX,SAAS,EAAE,YAAY;QACvB,cAAc,EAAE,GAAG,EAAE,CAAC,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI;KAC3D,GACH,CACL,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
3
- import { KitInput, KitTypography } from 'aristid-ds';
3
+ import { KitFilter, KitInput, KitTypography } from 'aristid-ds';
4
4
  import styled from 'styled-components';
5
5
  import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
6
- import { AttributeFormat, AttributeType, RecordFilterCondition } from '../../../../_gqlTypes';
6
+ import { AttributeFormat, AttributeType } from '../../../../_gqlTypes';
7
7
  import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
8
8
  import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
9
9
  import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
10
+ import { CommonFilterItem } from '../_shared/CommonFilterItem';
10
11
  import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
11
12
  import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
12
13
  import { FilterListItem } from './FilterListItem';
13
- import { FilterDropDown } from './filter-type/FilterDropDown';
14
14
  const StyledList = styled.ul `
15
15
  padding: calc(var(--general-spacing-s) * 1px) 0;
16
16
  margin: 0;
@@ -25,7 +25,7 @@ const StyledFaEye = styled(FaEye) `
25
25
  `;
26
26
  export const FilterItems = ({ libraryId }) => {
27
27
  const { t } = useSharedTranslation();
28
- const { view: { filters, canAddFilter }, dispatch } = useViewSettingsContext();
28
+ const { view: { filters, maxFilters }, dispatch } = useViewSettingsContext();
29
29
  const { onSearchChanged, searchFilteredColumnsIds, attributeDetailsById } = useAttributeDetailsData(libraryId);
30
30
  const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
31
31
  coordinateGetter: sortableKeyboardCoordinates
@@ -38,9 +38,7 @@ export const FilterItems = ({ libraryId }) => {
38
38
  attribute: {
39
39
  label: attributeDetailsById[attributeId].label,
40
40
  format: attributeDetailsById[attributeId].format ?? AttributeFormat.text
41
- },
42
- condition: RecordFilterCondition.EQUAL,
43
- value: null
41
+ }
44
42
  }
45
43
  });
46
44
  };
@@ -60,29 +58,21 @@ export const FilterItems = ({ libraryId }) => {
60
58
  }
61
59
  dispatch({ type: ViewSettingsActionTypes.MOVE_FILTER, payload: { indexFrom, indexTo } });
62
60
  };
61
+ const ignoredTypes = [AttributeType.tree];
63
62
  const activeFilters = filters.filter(({ field }) => searchFilteredColumnsIds.includes(field));
64
- const inactiveFilters = searchFilteredColumnsIds.filter(attributeId => attributeDetailsById?.[attributeId]?.type === AttributeType.simple &&
63
+ const inactiveFilters = searchFilteredColumnsIds.filter(attributeId => !ignoredTypes.includes(attributeDetailsById?.[attributeId]?.type) &&
65
64
  filters.every(filterItem => filterItem.field !== attributeId));
66
- return (_jsxs(_Fragment, { children: [activeFilters.length > 0 && (_jsx(StyledList, { "aria-label": t('explorer.filter-list.active'), children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsx(SortableContext, { items: activeFilters.map(({ field }) => ({ id: field })), strategy: verticalListSortingStrategy, children: activeFilters.map(activeFilter => (_jsx(FilterListItem, { attributeId: activeFilter.field, isDraggable: true, filterChipProps: {
67
- label: activeFilter.attribute.label,
68
- expandable: true,
69
- values: activeFilter.value === null ? [] : [activeFilter.value],
70
- dropDownProps: {
71
- dropdownRender: () => _jsx(FilterDropDown, { filter: activeFilter })
72
- }
73
- }, visibilityButtonProps: {
65
+ const canAddFilter = activeFilters.length < maxFilters;
66
+ return (_jsxs(_Fragment, { children: [activeFilters.length > 0 && (_jsx(StyledList, { "aria-label": t('explorer.filter-list.active'), children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsx(SortableContext, { items: activeFilters.map(({ field }) => ({ id: field })), strategy: verticalListSortingStrategy, children: activeFilters.map(activeFilter => (_jsx(FilterListItem, { attributeId: activeFilter.field, isDraggable: true, visibilityButtonProps: {
74
67
  icon: _jsx(StyledFaEye, {}),
75
68
  title: String(t('explorer.hide')),
76
69
  onClick: removeFilter(activeFilter.id)
77
- } }, activeFilter.field))) }) }) })), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.available-attributes') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FaSearch, {}) }), _jsx(StyledList, { "aria-label": t('explorer.filter-list.inactive'), children: inactiveFilters.map(attributeId => (_jsx(FilterListItem, { attributeId: attributeId, filterChipProps: {
78
- label: attributeDetailsById[attributeId].label,
79
- disabled: !canAddFilter
80
- }, visibilityButtonProps: canAddFilter
70
+ }, children: _jsx(CommonFilterItem, { filter: activeFilter }) }, activeFilter.field))) }) }) })), _jsx(KitTypography.Title, { level: "h4", children: t('explorer.available-attributes') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FaSearch, {}) }), _jsx(StyledList, { "aria-label": t('explorer.filter-list.inactive'), children: inactiveFilters.map(attributeId => (_jsx(FilterListItem, { attributeId: attributeId, visibilityButtonProps: canAddFilter
81
71
  ? {
82
72
  icon: _jsx(StyledEyeSlash, {}),
83
73
  title: String(t('explorer.show')),
84
74
  onClick: addFilter(attributeId)
85
75
  }
86
- : undefined }, attributeId))) })] }));
76
+ : undefined, children: _jsx(KitFilter, { label: attributeDetailsById[attributeId].label, disabled: !canAddFilter }) }, attributeId))) })] }));
87
77
  };
88
78
  //# sourceMappingURL=FilterItems.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/filter-items/FilterItems.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,eAAe,EAAE,aAAa,EAAE,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACpF,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,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAE5D,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MA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AAC,WAAW,CAAC,EAAE,CAAC,CAChC,KAAC,cAAc,IAEX,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE;wBACb,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC,KAAK;wBAC9C,QAAQ,EAAE,CAAC,YAAY;qBAC1B,EACD,qBAAqB,EACjB,YAAY;wBACR,CAAC,CAAC;4BACI,IAAI,EAAE,KAAC,cAAc,KAAG;4BACxB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;4BACjC,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC;yBAClC;wBACH,CAAC,CAAC,SAAS,IAbd,WAAW,CAelB,CACL,CAAC,GACO,IACd,CACN,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"FilterItems.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/filter-items/FilterItems.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAC9D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAC7D,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,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAC,uBAAuB,EAAC,MAAM,4CAA4C,CAAC;AACnF,OAAO,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AAC,cAAc,IAEX,WAAW,EAAE,WAAW,EACxB,qBAAqB,EACjB,YAAY;wBACR,CAAC,CAAC;4BACI,IAAI,EAAE,KAAC,cAAc,KAAG;4BACxB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;4BACjC,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC;yBAClC;wBACH,CAAC,CAAC,SAAS,YAGnB,KAAC,SAAS,IAAC,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,YAAY,GAAI,IAZjF,WAAW,CAaH,CACpB,CAAC,GACO,IACd,CACN,CAAC;AACN,CAAC,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import { ComponentProps, FunctionComponent } from 'react';
2
- import { KitButton, KitFilter } from 'aristid-ds';
2
+ import { KitButton } from 'aristid-ds';
3
3
  interface IActiveFilterListItemProps {
4
4
  attributeId: string;
5
5
  isDraggable?: true;
6
- filterChipProps: Pick<ComponentProps<typeof KitFilter>, 'label' | 'values' | 'expandable' | 'dropDownProps' | 'disabled'>;
7
6
  visibilityButtonProps?: Pick<ComponentProps<typeof KitButton>, 'onClick' | 'icon' | 'title'>;
8
7
  }
9
8
  export declare const FilterListItem: FunctionComponent<IActiveFilterListItemProps>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import styled from 'styled-components';
3
3
  import { FaGripLines } from 'react-icons/fa';
4
- import { KitButton, KitFilter } from 'aristid-ds';
4
+ import { KitButton } from 'aristid-ds';
5
5
  import { useSortable } from '@dnd-kit/sortable';
6
6
  import { CSS } from '@dnd-kit/utilities';
7
7
  const StyledFilterListItem = styled.li `
@@ -22,12 +22,12 @@ const StyledDragHandle = styled.span `
22
22
  align-items: center;
23
23
  cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
24
24
  `;
25
- export const FilterListItem = ({ attributeId, isDraggable, visibilityButtonProps, filterChipProps }) => {
25
+ export const FilterListItem = ({ attributeId, isDraggable, visibilityButtonProps, children }) => {
26
26
  const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: attributeId });
27
27
  const style = {
28
28
  transform: CSS.Transform.toString(transform),
29
29
  transition
30
30
  };
31
- return (_jsxs(StyledFilterListItem, { ref: setNodeRef, style: style, children: [_jsxs("div", { children: [isDraggable && (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: _jsx(FaGripLines, {}) })), _jsx(KitFilter, { ...filterChipProps }, attributeId)] }), visibilityButtonProps && _jsx(KitButton, { size: "m", type: "tertiary", ...visibilityButtonProps })] }));
31
+ return (_jsxs(StyledFilterListItem, { ref: setNodeRef, style: style, children: [_jsxs("div", { children: [isDraggable && (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: _jsx(FaGripLines, {}) })), children] }), visibilityButtonProps && _jsx(KitButton, { size: "m", type: "tertiary", ...visibilityButtonProps })] }));
32
32
  };
33
33
  //# sourceMappingURL=FilterListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterListItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/filter-items/FilterListItem.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,oBAAoB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;CAYrC,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;AAYF,MAAM,CAAC,MAAM,cAAc,GAAkD,CAAC,EAC1E,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,oBAAoB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aAC/C,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,EACL,qBAAqB,IAAI,KAAC,SAAS,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,UAAU,KAAK,qBAAqB,GAAI,IACxE,CAC1B,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"FilterListItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/filter-items/FilterListItem.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,GAAG,EAAC,MAAM,oBAAoB,CAAC;AAEvC,MAAM,oBAAoB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;CAYrC,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;AAQF,MAAM,CAAC,MAAM,cAAc,GAAkD,CAAC,EAC1E,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,QAAQ,EACX,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,oBAAoB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aAC/C,0BACK,WAAW,IAAI,CACZ,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACpE,KAAC,WAAW,KAAG,GACA,CACtB,EACA,QAAQ,IACP,EACL,qBAAqB,IAAI,KAAC,SAAS,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,UAAU,KAAK,qBAAqB,GAAI,IACxE,CAC1B,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IFilterChildrenDropDownProps } from '../../../../../components/Explorer/_types';
3
+ export declare const BooleanAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitSwitch } from 'aristid-ds';
3
+ import { AttributeConditionFilter } from '../../../../../types';
4
+ export const BooleanAttributeDropDown = ({ filter, onFilterChange }) => {
5
+ const _onBooleanChanged = checked => {
6
+ onFilterChange({ ...filter, condition: AttributeConditionFilter.EQUAL, value: checked ? 'true' : 'false' });
7
+ };
8
+ return _jsx(KitSwitch, { defaultValue: Boolean(filter.value), onChange: _onBooleanChanged });
9
+ };
10
+ //# sourceMappingURL=BooleanAttributeDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BooleanAttributeDropdown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/BooleanAttributeDropdown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAGnD,MAAM,CAAC,MAAM,wBAAwB,GAAoD,CAAC,EAAC,MAAM,EAAE,cAAc,EAAC,EAAE,EAAE;IAClH,MAAM,iBAAiB,GAAiD,OAAO,CAAC,EAAE;QAC9E,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAE,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAC,CAAC,CAAC;IAC9G,CAAC,CAAC;IAEF,OAAO,KAAC,SAAS,IAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,iBAAiB,GAAI,CAAC;AAC3F,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IFilterChildrenDropDownProps } from '../../../../../components/Explorer/_types';
3
+ export declare const ColorAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitSelect } from 'aristid-ds';
3
+ import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
4
+ import { useConditionsOptionsByType } from './useConditionOptionsByType';
5
+ export const ColorAttributeDropDown = ({ filter, onFilterChange }) => {
6
+ const { t } = useSharedTranslation();
7
+ const { conditionOptionsByType } = useConditionsOptionsByType(filter);
8
+ const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
9
+ return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
10
+ };
11
+ //# sourceMappingURL=ColorAttributeDropDown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/ColorAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAoD,CAAC,EAAC,MAAM,EAAE,cAAc,EAAC,EAAE,EAAE;IAChH,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE,CAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAE3C,OAAO,CACH,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IFilterChildrenDropDownProps } from '../../../../../components/Explorer/_types';
3
+ export declare const DateAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { useRef } from 'react';
6
+ import dayjs from 'dayjs';
7
+ import styled from 'styled-components';
8
+ import { KitDatePicker, KitSelect } from 'aristid-ds';
9
+ import { AttributeConditionFilter } from '../../../../../types';
10
+ import { nullValueConditions } from '../../../../../components/Explorer/conditionsHelper';
11
+ import { dateValuesSeparator } from '../../../../../components/Explorer/_queries/useExplorerData';
12
+ import { useConditionsOptionsByType } from './useConditionOptionsByType';
13
+ const DatePickerContainerStyledDiv = styled.div `
14
+ .ant-picker {
15
+ width: 100%;
16
+ }
17
+ `;
18
+ const DatePickerDropdowncontainerStyledDiv = styled.div `
19
+ .ant-picker-dropdown {
20
+ position: initial;
21
+
22
+ .ant-picker-panel-container {
23
+ box-shadow: none;
24
+ }
25
+ }
26
+ `;
27
+ export const DateAttributeDropDown = ({ filter, onFilterChange }) => {
28
+ const datePickerRef = useRef(null);
29
+ const { conditionOptionsByType } = useConditionsOptionsByType(filter);
30
+ const _onConditionChanged = condition => {
31
+ const isMultiDate = filter.value?.includes(dateValuesSeparator);
32
+ const unsetValue = nullValueConditions.includes(condition) ||
33
+ (!isMultiDate && condition === AttributeConditionFilter.BETWEEN) ||
34
+ (isMultiDate && condition !== AttributeConditionFilter.BETWEEN);
35
+ onFilterChange({
36
+ ...filter,
37
+ condition,
38
+ value: unsetValue ? null : filter.value
39
+ });
40
+ };
41
+ const _onDateChanged = date => {
42
+ onFilterChange({
43
+ ...filter,
44
+ value: date ? String(date.unix()) : null
45
+ });
46
+ };
47
+ const _onDateRangeChanged = dates => {
48
+ let value = null;
49
+ if (dates && dates.length === 2) {
50
+ let [dateFrom, dateTo] = dates;
51
+ if (dateFrom && dateTo) {
52
+ dateFrom = dateFrom.startOf('day');
53
+ dateTo = dateTo.endOf('day');
54
+ value = dateFrom.unix() + dateValuesSeparator + dateTo.unix();
55
+ }
56
+ }
57
+ onFilterChange({ ...filter, value });
58
+ };
59
+ const showDatePicker = filter.condition && !nullValueConditions.includes(filter.condition);
60
+ const getDateRangeValue = (dates) => {
61
+ const [dateFrom, dateTo] = dates.split(dateValuesSeparator).map(date => dayjs.unix(Number(date)));
62
+ return [dateFrom, dateTo];
63
+ };
64
+ return (_jsxs(_Fragment, { children: [_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition }), showDatePicker && (_jsxs(DatePickerContainerStyledDiv, { children: [filter.condition === AttributeConditionFilter.BETWEEN ? (_jsx(KitDatePicker.RangePicker, { open: true, getPopupContainer: () => datePickerRef.current ?? document.body, value: filter.value ? getDateRangeValue(filter.value) : null, onChange: _onDateRangeChanged })) : (_jsx(KitDatePicker, { open: true, getPopupContainer: () => datePickerRef.current ?? document.body, value: filter.value ? dayjs.unix(Number(filter.value)) : null, onChange: _onDateChanged })), _jsx(DatePickerDropdowncontainerStyledDiv, { ref: datePickerRef })] }))] }));
65
+ };
66
+ //# sourceMappingURL=DateAttributeDropDown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/DateAttributeDropDown.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,MAAM,EAAC,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAE,SAAS,EAAC,MAAM,YAAY,CAAC;AACpD,OAAO,EAAC,wBAAwB,EAAC,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAC,mBAAmB,EAAC,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAC,mBAAmB,EA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AE,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAC/D,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAC5D,QAAQ,EAAE,mBAAmB,GAC/B,CACL,CAAC,CAAC,CAAC,CACA,KAAC,aAAa,IACV,IAAI,QACJ,iBAAiB,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAC/D,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAC7D,QAAQ,EAAE,cAAc,GAC1B,CACL,EACD,KAAC,oCAAoC,IAAC,GAAG,EAAE,aAAa,GAAI,IACjC,CAClC,IACF,CACN,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IFilterChildrenDropDownProps } from '../../../../../components/Explorer/_types';
3
+ export declare const DateRangeAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitSelect } from 'aristid-ds';
3
+ import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
4
+ import { useConditionsOptionsByType } from './useConditionOptionsByType';
5
+ export const DateRangeAttributeDropDown = ({ filter, onFilterChange }) => {
6
+ const { t } = useSharedTranslation();
7
+ const { conditionOptionsByType } = useConditionsOptionsByType(filter);
8
+ const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
9
+ return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
10
+ };
11
+ //# sourceMappingURL=DateRangeAttributeDropDown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateRangeAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/DateRangeAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAoD,CAAC,EACxF,MAAM,EACN,cAAc,EACjB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE,CAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAE3C,OAAO,CACH,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IFilterChildrenDropDownProps } from '../../../../../components/Explorer/_types';
3
+ export declare const EncryptedAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitSelect } from 'aristid-ds';
3
+ import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
4
+ import { useConditionsOptionsByType } from './useConditionOptionsByType';
5
+ export const EncryptedAttributeDropDown = ({ filter, onFilterChange }) => {
6
+ const { t } = useSharedTranslation();
7
+ const { conditionOptionsByType } = useConditionsOptionsByType(filter);
8
+ const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
9
+ return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
10
+ };
11
+ //# sourceMappingURL=EncryptedAttributeDropDown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncryptedAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/EncryptedAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAoD,CAAC,EACxF,MAAM,EACN,cAAc,EACjB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE,CAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAE3C,OAAO,CACH,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { IFilterChildrenDropDownProps } from '../../../../../components/Explorer/_types';
3
+ export declare const ExtendedAttributeDropDown: FunctionComponent<IFilterChildrenDropDownProps>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { KitSelect } from 'aristid-ds';
3
+ import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
4
+ import { useConditionsOptionsByType } from './useConditionOptionsByType';
5
+ export const ExtendedAttributeDropDown = ({ filter, onFilterChange }) => {
6
+ const { t } = useSharedTranslation();
7
+ const { conditionOptionsByType } = useConditionsOptionsByType(filter);
8
+ const _onConditionChanged = condition => onFilterChange({ ...filter, condition });
9
+ return (_jsx(KitSelect, { options: conditionOptionsByType, onChange: _onConditionChanged, value: filter.condition, placeholder: t('explorer.select-condition') }));
10
+ };
11
+ //# sourceMappingURL=ExtendedAttributeDropDown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExtendedAttributeDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/ExtendedAttributeDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,6BAA6B,CAAC;AAEvE,MAAM,CAAC,MAAM,yBAAyB,GAAoD,CAAC,EACvF,MAAM,EACN,cAAc,EACjB,EAAE,EAAE;IACD,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,EAAC,sBAAsB,EAAC,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAEpE,MAAM,mBAAmB,GAAiD,SAAS,CAAC,EAAE,CAClF,cAAc,CAAC,EAAC,GAAG,MAAM,EAAE,SAAS,EAAC,CAAC,CAAC;IAE3C,OAAO,CACH,KAAC,SAAS,IACN,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,mBAAmB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,EACvB,WAAW,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAC7C,CACL,CAAC;AACN,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
- import { IFilterDropDownProps } from '../../../../../components/Explorer/_types';
2
1
  import { FunctionComponent } from 'react';
2
+ import { IFilterDropDownProps } from '../../../../../components/Explorer/_types';
3
3
  export declare const FilterDropDown: FunctionComponent<IFilterDropDownProps>;
@@ -1,17 +1,71 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FaClock, FaTrash } from 'react-icons/fa';
3
+ import styled from 'styled-components';
4
+ import { KitDivider, KitButton } from 'aristid-ds';
2
5
  import { AttributeFormat } from '../../../../../_gqlTypes';
3
- import { SimpleFilterDropdown } from './SimpleFilterDropDown';
4
6
  import { TextAttributeDropDown } from './TextAttributeDropDown';
5
7
  import { NumericAttributeDropDown } from './NumericAttributeDropDown';
8
+ import { BooleanAttributeDropDown } from './BooleanAttributeDropdown';
9
+ import { DateAttributeDropDown } from './DateAttributeDropDown';
10
+ import { EncryptedAttributeDropDown } from './EncryptedAttributeDropDown';
11
+ import { ExtendedAttributeDropDown } from './ExtendedAttributeDropDown';
12
+ import { ColorAttributeDropDown } from './ColorAttributeDropDown';
13
+ import { DateRangeAttributeDropDown } from './DateRangeAttributeDropDown';
14
+ import { ViewSettingsActionTypes } from '../../store-view-settings/viewSettingsReducer';
15
+ import { useViewSettingsContext } from '../../store-view-settings/useViewSettingsContext';
16
+ import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
17
+ const FilterDropDownStyledDiv = styled.div `
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: calc(var(--general-spacing-xxs) * 1px);
21
+ `;
6
22
  export const FilterDropDown = ({ filter }) => {
23
+ const { t } = useSharedTranslation();
24
+ const { dispatch } = useViewSettingsContext();
25
+ let selectedDropDown;
26
+ const onFilterChange = (filterData) => dispatch({
27
+ type: ViewSettingsActionTypes.CHANGE_FILTER_CONFIG,
28
+ payload: filterData
29
+ });
30
+ const _onResetFilter = () => dispatch({
31
+ type: ViewSettingsActionTypes.RESET_FILTER,
32
+ payload: {
33
+ id: filter.id
34
+ }
35
+ });
36
+ const _onDeleteFilter = () => dispatch({
37
+ type: ViewSettingsActionTypes.REMOVE_FILTER,
38
+ payload: {
39
+ id: filter.id
40
+ }
41
+ });
7
42
  switch (filter.attribute.format) {
8
43
  case AttributeFormat.numeric:
9
- return _jsx(NumericAttributeDropDown, { filter: filter });
44
+ selectedDropDown = _jsx(NumericAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
45
+ break;
46
+ case AttributeFormat.date:
47
+ selectedDropDown = _jsx(DateAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
48
+ break;
10
49
  case AttributeFormat.text:
11
50
  case AttributeFormat.rich_text:
12
- return _jsx(TextAttributeDropDown, { filter: filter });
13
- default:
14
- return _jsx(SimpleFilterDropdown, { filter: filter });
51
+ selectedDropDown = _jsx(TextAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
52
+ break;
53
+ case AttributeFormat.boolean:
54
+ selectedDropDown = _jsx(BooleanAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
55
+ break;
56
+ case AttributeFormat.encrypted:
57
+ selectedDropDown = _jsx(EncryptedAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
58
+ break;
59
+ case AttributeFormat.extended:
60
+ selectedDropDown = _jsx(ExtendedAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
61
+ break;
62
+ case AttributeFormat.color:
63
+ selectedDropDown = _jsx(ColorAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
64
+ break;
65
+ case AttributeFormat.date_range:
66
+ selectedDropDown = _jsx(DateRangeAttributeDropDown, { filter: filter, onFilterChange: onFilterChange });
67
+ break;
15
68
  }
69
+ return (_jsxs(FilterDropDownStyledDiv, { children: [selectedDropDown, _jsx(KitDivider, { noMargin: true }), _jsx(KitButton, { type: "redirect", icon: _jsx(FaClock, {}), onClick: _onResetFilter, children: t('explorer.reset-filter') }), _jsx(KitButton, { type: "redirect", icon: _jsx(FaTrash, {}), onClick: _onDeleteFilter, children: t('global.delete') })] }));
16
70
  };
17
71
  //# sourceMappingURL=FilterDropDown.js.map