@leav/ui 0.3.6-c780e07 → 0.3.6-c9a34f2
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.
- package/dist/__mocks__/common/attribute.js +2 -1
- package/dist/__mocks__/common/attribute.js.map +1 -1
- package/dist/__mocks__/common/form.d.ts +11 -5
- package/dist/__mocks__/common/form.js +20 -4
- package/dist/__mocks__/common/form.js.map +1 -1
- package/dist/__mocks__/common/record.d.ts +13 -2
- package/dist/__mocks__/common/record.js.map +1 -1
- package/dist/_gqlTypes/index.d.ts +135 -18
- package/dist/_gqlTypes/index.js +97 -5
- package/dist/_gqlTypes/index.js.map +1 -1
- package/dist/_queries/records/getRecordFormQuery.js +2 -0
- package/dist/_queries/records/getRecordFormQuery.js.map +1 -1
- package/dist/_queries/records/recordFormAttributeFragment.js +2 -0
- package/dist/_queries/records/recordFormAttributeFragment.js.map +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js +1 -1
- package/dist/components/CreateDirectory/CreateDirectory.js.map +1 -1
- package/dist/components/EditApplication/EditApplication.js +2 -2
- package/dist/components/EditApplication/EditApplication.js.map +1 -1
- package/dist/components/EditApplication/_types.d.ts +2 -2
- package/dist/components/Explorer/DataView.d.ts +10 -1
- package/dist/components/Explorer/DataView.js +36 -36
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +9 -4
- package/dist/components/Explorer/Explorer.js +56 -10
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.d.ts +7 -0
- package/dist/components/Explorer/ExplorerTitle.js +30 -0
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -0
- package/dist/components/Explorer/IdCard.d.ts +7 -0
- package/dist/components/Explorer/IdCard.js +15 -0
- package/dist/components/Explorer/IdCard.js.map +1 -0
- package/dist/components/Explorer/TableCell.d.ts +8 -0
- package/dist/components/Explorer/TableCell.js +143 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/TableTagGroup.d.ts +7 -0
- package/dist/components/Explorer/TableTagGroup.js +30 -0
- package/dist/components/Explorer/TableTagGroup.js.map +1 -0
- package/dist/components/Explorer/_queries/useExplorerData.d.ts +27 -0
- package/dist/components/Explorer/_queries/useExplorerData.js +66 -0
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -0
- package/dist/components/Explorer/_types.d.ts +48 -0
- package/dist/components/Explorer/_types.js +2 -0
- package/dist/components/Explorer/_types.js.map +1 -0
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.d.ts +2 -0
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js +37 -0
- package/dist/components/Explorer/display-view-filters/ExplorerFilterBar.js.map +1 -0
- package/dist/components/Explorer/index.d.ts +9 -1
- package/dist/components/Explorer/index.js +6 -1
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.d.ts +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js +85 -0
- package/dist/components/Explorer/manage-view-settings/_shared/ColumnItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.d.ts +5 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js +12 -0
- package/dist/components/Explorer/manage-view-settings/_shared/CommonFilterItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.d.ts +11 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js +61 -0
- package/dist/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js +28 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js +56 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js +12 -0
- package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js +78 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js +33 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/FilterListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js +17 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js +75 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js +39 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/NumericAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +69 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js +47 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/TextAttributeDropDown.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.d.ts +14 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js +82 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/useConditionOptionsByType.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/index.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/index.js +11 -0
- package/dist/components/Explorer/manage-view-settings/index.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.d.ts +14 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js +15 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.d.ts +7 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js +17 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.d.ts +2 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js +19 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/SidePanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.d.ts +1 -0
- package/dist/components/{RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js → Explorer/manage-view-settings/open-view-settings/useEditSettings.js} +3 -3
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useEditSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +3 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js +21 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.d.ts +9 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js +55 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.d.ts +7 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js +53 -0
- package/dist/components/Explorer/manage-view-settings/router-menu/SettingsPanel.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js +109 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortItems.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.d.ts +10 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js +32 -0
- package/dist/components/Explorer/manage-view-settings/sort-items/SortListItem.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.d.ts +6 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js +11 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/ViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js +7 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.d.ts +4 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js +13 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsInitialState.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.d.ts +130 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js +164 -0
- package/dist/components/Explorer/manage-view-settings/store-view-settings/viewSettingsReducer.js.map +1 -0
- package/dist/components/Explorer/{useCreateMainAction.d.ts → useCreateAction.d.ts} +3 -3
- package/dist/components/Explorer/{useCreateMainAction.js → useCreateAction.js} +11 -7
- package/dist/components/Explorer/useCreateAction.js.map +1 -0
- package/dist/components/Explorer/useDeactivateAction.d.ts +1 -1
- package/dist/components/Explorer/useDeactivateAction.js +4 -3
- package/dist/components/Explorer/useDeactivateAction.js.map +1 -1
- package/dist/components/Explorer/useEditAction.d.ts +1 -1
- package/dist/components/Explorer/useEditAction.js +7 -5
- package/dist/components/Explorer/useEditAction.js.map +1 -1
- package/dist/components/Explorer/usePagination.d.ts +7 -0
- package/dist/components/Explorer/usePagination.js +25 -0
- package/dist/components/Explorer/usePagination.js.map +1 -0
- package/dist/components/Explorer/usePrimaryActions.d.ts +12 -0
- package/dist/components/Explorer/usePrimaryActions.js +21 -0
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -0
- package/dist/components/Explorer/useSearchInput.d.ts +10 -0
- package/dist/components/Explorer/useSearchInput.js +31 -0
- package/dist/components/Explorer/useSearchInput.js.map +1 -0
- package/dist/components/Explorer/useTableScrollableHeight.d.ts +5 -0
- package/dist/components/Explorer/useTableScrollableHeight.js +15 -0
- package/dist/components/Explorer/useTableScrollableHeight.js.map +1 -0
- package/dist/components/ExportModal/ExportModal.js +2 -2
- package/dist/components/ExportModal/ExportModal.js.map +1 -1
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js +5 -5
- package/dist/components/ImportModal/ImportModalConfigStep/ImportModalConfigStep.js.map +1 -1
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js +2 -2
- package/dist/components/LibraryItemsList/FiltersPanel/Filter/Filter.js.map +1 -1
- package/dist/components/RecordEdition/EditRecord/EditRecord.js +2 -2
- package/dist/components/RecordEdition/EditRecord/EditRecord.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/EditRecordContent.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/_types.d.ts +7 -20
- package/dist/components/RecordEdition/EditRecordContent/_types.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.d.ts +2 -1
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js +40 -33
- package/dist/components/RecordEdition/EditRecordContent/antdUtils.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js +3 -0
- package/dist/components/RecordEdition/EditRecordContent/hooks/useRunActionsListAndFormatOnValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.d.ts +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/Container/Container.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/LinkField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js +2 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +2 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.d.ts +6 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js +18 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/ComputeIndicator.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js +25 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.d.ts +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js +141 -193
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardField.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.d.ts +2 -8
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js +10 -30
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSBooleanWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.d.ts +2 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js +32 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSColorPickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js +19 -48
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSDatePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js +9 -77
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputEncryptedWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js +23 -49
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputNumberWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js +28 -54
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSInputWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js +39 -64
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRangePickerWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.d.ts +3 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js +24 -53
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/DSRichTextWrapper.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.d.ts +14 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js +64 -401
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValue.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.d.ts +4 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js +126 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/DSListSelect.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -6
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.d.ts +13 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js +2 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/_types.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.d.ts +42 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js +55 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/calculatedInheritedFlags.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.d.ts +12 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js +37 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/useGetPresentationValues.js.map +1 -0
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js +2 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/TreeField/ValuesAdd/ValuesAdd.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNode.d.ts +4 -7
- package/dist/components/SelectTreeNode/SelectTreeNode.js +17 -135
- package/dist/components/SelectTreeNode/SelectTreeNode.js.map +1 -1
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.d.ts +16 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js +131 -0
- package/dist/components/SelectTreeNode/SelectTreeNodeContent.js.map +1 -0
- package/dist/components/SelectTreeNode/index.d.ts +1 -1
- package/dist/components/SelectTreeNode/index.js +1 -1
- package/dist/components/SelectTreeNode/index.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.d.ts +4 -7
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js +10 -10
- package/dist/components/SelectTreeNodeModal/SelectTreeNodeModal.js.map +1 -1
- package/dist/components/SelectTreeNodeModal/index.d.ts +1 -2
- package/dist/components/SelectTreeNodeModal/index.js +1 -2
- package/dist/components/SelectTreeNodeModal/index.js.map +1 -1
- package/dist/components/UploadFiles/UploadFiles.js +1 -1
- package/dist/components/UploadFiles/UploadFiles.js.map +1 -1
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js +2 -2
- package/dist/components/ValuesVersionConfigurator/VersionTree/VersionTree.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/useDebouncedValue/index.d.ts +1 -0
- package/dist/{components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler → hooks/useDebouncedValue}/index.js +1 -1
- package/dist/hooks/useDebouncedValue/index.js.map +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.d.ts +1 -0
- package/dist/hooks/useGetRecordForm/useGetRecordForm.js.map +1 -1
- package/dist/locales/en/shared.json +60 -7
- package/dist/locales/fr/shared.json +60 -7
- package/package.json +7 -2
- package/dist/components/Explorer/types.d.ts +0 -21
- package/dist/components/Explorer/types.js +0 -2
- package/dist/components/Explorer/types.js.map +0 -1
- package/dist/components/Explorer/useCreateMainAction.js.map +0 -1
- package/dist/components/Explorer/useExplorerData.d.ts +0 -11
- package/dist/components/Explorer/useExplorerData.js +0 -23
- package/dist/components/Explorer/useExplorerData.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.d.ts +0 -2
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js +0 -6
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.d.ts +0 -138
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js +0 -361
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js +0 -9
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/standardFieldReducerContext.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js +0 -14
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/CheckboxInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/ColorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js +0 -22
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/DateInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js +0 -19
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/EncryptedInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js +0 -32
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/NumberInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js +0 -51
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/RichTextEditorInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js +0 -26
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/Inputs/TextInput.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.d.ts +0 -13
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js +0 -89
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueDisplayHandler.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.d.ts +0 -7
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js +0 -45
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/ColorPickerBlock.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.d.ts +0 -9
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js +0 -141
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/StandardFieldValueRead/StandardFieldValueRead.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.d.ts +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/StandardFieldValueDisplayHandler/index.js.map +0 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.d.ts +0 -3
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +0 -105
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,EAAE,SAAS,EAAE,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAQ/F,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAkD,CAAC;AAC3E,QAAQ,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AACnE,QAAQ,CAAC,eAAe,GAAG,eAAe,CAAC;AAC3C,QAAQ,CAAC,iBAAiB,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
interface IColumnItemProps {
|
|
3
|
+
itemId: string;
|
|
4
|
+
dragHandler?: ReactNode;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
onVisibilityClick?: () => void;
|
|
8
|
+
value?: string;
|
|
9
|
+
locked?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ColumnItem: FunctionComponent<IColumnItemProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitTypography } from 'aristid-ds';
|
|
6
|
+
import { FaEye, FaEyeSlash, FaLock } from 'react-icons/fa';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
9
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
10
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
11
|
+
const StyledValue = styled(KitTypography.Text) `
|
|
12
|
+
color: var(--general-utilities-disabled);
|
|
13
|
+
`;
|
|
14
|
+
const StyledConfigurationItem = styled.li `
|
|
15
|
+
color: var(--general-utilities-text-primary);
|
|
16
|
+
display: flex;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 40px;
|
|
19
|
+
padding: 0 calc(var(--general-spacing-xs) * 1px);
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
22
|
+
border-radius: calc(var(--general-spacing-xs) * 1px);
|
|
23
|
+
text-align: left;
|
|
24
|
+
|
|
25
|
+
&:first-child {
|
|
26
|
+
margin-top: calc(var(--general-spacing-xs) * 1px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background: var(--general-utilities-main-light);
|
|
31
|
+
|
|
32
|
+
${StyledValue} {
|
|
33
|
+
color: var(--general-utilities-text-primary);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title {
|
|
38
|
+
flex: 1 1 auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
> svg {
|
|
42
|
+
flex: 0 0 calc(var(--general-spacing-s) * 1px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
> button {
|
|
46
|
+
border: none;
|
|
47
|
+
background: transparent;
|
|
48
|
+
padding: 0;
|
|
49
|
+
&:not([disabled]) {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
const StyledFaEye = styled(FaEye) `
|
|
55
|
+
display: flex;
|
|
56
|
+
color: currentColor;
|
|
57
|
+
`;
|
|
58
|
+
const StyledEyeSlash = styled(FaEyeSlash) `
|
|
59
|
+
display: flex;
|
|
60
|
+
color: var(--general-utilities-disabled);
|
|
61
|
+
`;
|
|
62
|
+
const StyledLocked = styled(FaLock) `
|
|
63
|
+
display: flex;
|
|
64
|
+
color: var(--general-utilities-disabled);
|
|
65
|
+
`;
|
|
66
|
+
const StyledDragHandle = styled.span `
|
|
67
|
+
display: flex;
|
|
68
|
+
cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
|
|
69
|
+
`;
|
|
70
|
+
const StyledEmptyIcon = styled.div `
|
|
71
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
72
|
+
`;
|
|
73
|
+
export const ColumnItem = ({ itemId, dragHandler, title, visible, onVisibilityClick, locked = false }) => {
|
|
74
|
+
const { t } = useSharedTranslation();
|
|
75
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: itemId });
|
|
76
|
+
const style = {
|
|
77
|
+
transform: CSS.Transform.toString(transform),
|
|
78
|
+
transition
|
|
79
|
+
};
|
|
80
|
+
const _handleClick = () => onVisibilityClick?.();
|
|
81
|
+
const visibilityButtonLabel = visible ? t('explorer.hide') : t('explorer.show');
|
|
82
|
+
const visibilityIcon = locked ? _jsx(StyledLocked, {}) : visible ? _jsx(StyledFaEye, {}) : _jsx(StyledEyeSlash, {});
|
|
83
|
+
return (_jsxs(StyledConfigurationItem, { ref: setNodeRef, style: style, children: [dragHandler ? (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: dragHandler })) : (_jsx(StyledEmptyIcon, {})), _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx("button", { disabled: locked, onClick: _handleClick, title: visibilityButtonLabel, "aria-label": visibilityButtonLabel, children: visibilityIcon })] }));
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=ColumnItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/ColumnItem.t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ilterDropDown';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { KitFilter } from 'aristid-ds';
|
|
5
|
+
const FilterStyled = styled(KitFilter) `
|
|
6
|
+
flex: 0 0 auto;
|
|
7
|
+
`;
|
|
8
|
+
export const CommonFilterItem = ({ filter }) => (_jsx(FilterStyled, { expandable: true, label: filter.attribute.label, values: filter.value === null ? [] : [filter.value], dropDownProps: {
|
|
9
|
+
placement: 'bottomLeft',
|
|
10
|
+
dropdownRender: () => _jsx(FilterDropDown, { filter: filter })
|
|
11
|
+
} }));
|
|
12
|
+
//# sourceMappingURL=CommonFilterItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonFilterItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/CommonFilterItem.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,cAAc,EAAC,MAAM,4CAA4C,CAAC;AAC1E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAGrC,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;;CAErC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAiD,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,CACxF,KAAC,YAAY,IACT,UAAU,QACV,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,EAC7B,MAAM,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACnD,aAAa,EAAE;QACX,SAAS,EAAE,YAAY;QACvB,cAAc,EAAE,GAAG,EAAE,CAAC,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI;KAC3D,GACH,CACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { AttributeDetailsFragment } from '../../../../_gqlTypes';
|
|
3
|
+
interface IColumnsById {
|
|
4
|
+
[attributeId: string]: AttributeDetailsFragment;
|
|
5
|
+
}
|
|
6
|
+
export declare const useAttributeDetailsData: (libraryId: string) => {
|
|
7
|
+
attributeDetailsById: IColumnsById;
|
|
8
|
+
searchFilteredColumnsIds: string[];
|
|
9
|
+
onSearchChanged: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { useMemo, useState } from 'react';
|
|
5
|
+
import { useDebouncedValue } from '../../../../hooks/useDebouncedValue';
|
|
6
|
+
import { useGetAttributesByLibQuery } from '../../../../_gqlTypes';
|
|
7
|
+
import { localizedTranslation } from '@leav/utils';
|
|
8
|
+
import { useLang } from '../../../../hooks';
|
|
9
|
+
const _mapping = (data, availableLanguages) => data?.attributes?.list.reduce((acc, attribute) => {
|
|
10
|
+
acc[attribute.id] = {
|
|
11
|
+
...attribute,
|
|
12
|
+
label: localizedTranslation(attribute.label, availableLanguages)
|
|
13
|
+
};
|
|
14
|
+
return acc;
|
|
15
|
+
}, {}) ?? {};
|
|
16
|
+
export const useAttributeDetailsData = (libraryId) => {
|
|
17
|
+
const [searchInput, setSearchInput] = useState('');
|
|
18
|
+
const debouncedSearchInput = useDebouncedValue(searchInput, 300);
|
|
19
|
+
const { lang: availableLanguages } = useLang();
|
|
20
|
+
const { data } = useGetAttributesByLibQuery({
|
|
21
|
+
variables: {
|
|
22
|
+
library: libraryId
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const attributeDetailsById = _mapping(data, availableLanguages);
|
|
26
|
+
const searchFilteredColumns = useMemo(() => {
|
|
27
|
+
const columnIds = Object.keys(attributeDetailsById);
|
|
28
|
+
if (columnIds.length === 0) {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
if (debouncedSearchInput === '') {
|
|
32
|
+
return attributeDetailsById;
|
|
33
|
+
}
|
|
34
|
+
return columnIds.reduce((acc, columnId) => {
|
|
35
|
+
if (attributeDetailsById[columnId].label.includes(debouncedSearchInput) ||
|
|
36
|
+
columnId.includes(debouncedSearchInput)) {
|
|
37
|
+
acc[columnId] = attributeDetailsById[columnId];
|
|
38
|
+
}
|
|
39
|
+
return acc;
|
|
40
|
+
}, {});
|
|
41
|
+
}, [debouncedSearchInput, attributeDetailsById]);
|
|
42
|
+
const searchFilteredColumnsIds = Object.keys(searchFilteredColumns);
|
|
43
|
+
const onSearchChanged = (event) => {
|
|
44
|
+
const shouldIgnoreInputChange = event.target.value.length < 3 && debouncedSearchInput.length < 3;
|
|
45
|
+
if (shouldIgnoreInputChange) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
setSearchInput(() => {
|
|
49
|
+
if (event.target.value.length > 2) {
|
|
50
|
+
return event.target.value;
|
|
51
|
+
}
|
|
52
|
+
return '';
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
attributeDetailsById,
|
|
57
|
+
searchFilteredColumnsIds,
|
|
58
|
+
onSearchChanged
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=useAttributeDetailsData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttributeDetailsData.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/useAttributeDetailsData.tsx"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAc,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAoD,0BAA0B,E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,OAAO,oBAAoB,CAAC;QAChC,CAAC;QAED,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YACtC,IACI,oBAAoB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,oBAAoB,CAAC;gBACnE,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EACzC,CAAC;gBACC,GAAG,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;YACnD,CAAC;YACD,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CAAC;IACX,CAAC,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACjD,MAAM,wBAAwB,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAEpE,MAAM,eAAe,GAAG,CAAC,KAAoC,EAAE,EAAE;QAC7D,MAAM,uBAAuB,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC;QACjG,IAAI,uBAAuB,EAAE,CAAC;YAC1B,OAAO;QACX,CAAC;QACD,cAAc,CAAC,GAAG,EAAE;YAChB,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChC,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;YAC9B,CAAC;YACD,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO;QACH,oBAAoB;QACpB,wBAAwB;QACxB,eAAe;KAClB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { ViewSettingsActionTypes } from './../store-view-settings/viewSettingsReducer';
|
|
4
|
+
import { useViewSettingsContext } from './../store-view-settings/useViewSettingsContext';
|
|
5
|
+
import { SelectVisibleAttributes } from './attributes/SelectVisibleAttributes';
|
|
6
|
+
import { SelectViewType } from './view-type/SelectViewType';
|
|
7
|
+
const StyledWrapperDiv = styled.div `
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: calc(var(--general-spacing-l) * 1px);
|
|
11
|
+
|
|
12
|
+
.ant-radio-wrapper {
|
|
13
|
+
padding: calc(var(--general-spacing-xs) * 1px);
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
export const ConfigureDisplay = ({ libraryId }) => {
|
|
17
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
18
|
+
const _handleViewTypeChange = event => {
|
|
19
|
+
dispatch({
|
|
20
|
+
type: ViewSettingsActionTypes.CHANGE_VIEW_TYPE,
|
|
21
|
+
payload: {
|
|
22
|
+
viewType: event.target.value
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return (_jsxs(StyledWrapperDiv, { children: [_jsx(SelectViewType, { value: view.viewType, onChange: _handleViewTypeChange }), view.viewType === 'table' && _jsx(SelectVisibleAttributes, { libraryId: libraryId })] }));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ConfigureDisplay.js.map
|
package/dist/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigureDisplay.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/configure-display/ConfigureDisplay.tsx"],"names":[],"mappings":";AAIA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAC,uBAAuB,EAAC,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAC,sBAAsB,EAAC,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAC,uBAAuB,EAAC,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAE1D,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQlC,CAAC;AAMF,MAAM,CAAC,MAAM,gBAAgB,GAA8C,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IACvF,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAC,GAAG,sBAAsB,EAAE,CAAC;IAElD,MAAM,qBAAqB,GAAgC,KAAK,CAAC,EAAE;QAC/D,QAAQ,CAAC;YACL,IAAI,EAAE,uBAAuB,CAAC,gBAAgB;YAC9C,OAAO,EAAE;gBACL,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;aAC/B;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO,CACH,MAAC,gBAAgB,eACb,KAAC,cAAc,IAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,qBAAqB,GAAI,EACxE,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,KAAC,uBAAuB,IAAC,SAAS,EAAE,SAAS,GAAI,IAChE,CACtB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { KitInput, KitTypography } from 'aristid-ds';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
9
|
+
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
10
|
+
import { FaGripLines } from 'react-icons/fa';
|
|
11
|
+
import { ColumnItem } from '../../_shared/ColumnItem';
|
|
12
|
+
import { ViewSettingsActionTypes } from '../../store-view-settings/viewSettingsReducer';
|
|
13
|
+
import { useViewSettingsContext } from '../../store-view-settings/useViewSettingsContext';
|
|
14
|
+
import { useAttributeDetailsData } from '../../_shared/useAttributeDetailsData';
|
|
15
|
+
const StyledListTitle = styled.div `
|
|
16
|
+
margin-top: calc(var(--general-spacing-s) * 1px);
|
|
17
|
+
font-weight: var(--general-typography-boldFontWeight);
|
|
18
|
+
`;
|
|
19
|
+
const StyledList = styled.ul `
|
|
20
|
+
padding: 0;
|
|
21
|
+
margin: 0;
|
|
22
|
+
list-style: none;
|
|
23
|
+
color: var(--general-utilities-text-primary);
|
|
24
|
+
`;
|
|
25
|
+
const visibleListTitle = 'visibleListTitle';
|
|
26
|
+
const invisibleListTitle = 'invisibleListTitle';
|
|
27
|
+
export const SelectVisibleAttributes = ({ libraryId }) => {
|
|
28
|
+
const { t } = useSharedTranslation();
|
|
29
|
+
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
30
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
31
|
+
}));
|
|
32
|
+
const { view, dispatch } = useViewSettingsContext();
|
|
33
|
+
// TODO: make naming great again
|
|
34
|
+
const { attributesIds: orderedVisibleColumns } = view;
|
|
35
|
+
const { attributeDetailsById, searchFilteredColumnsIds, onSearchChanged } = useAttributeDetailsData(libraryId);
|
|
36
|
+
const _toggleColumnVisibility = (columnId) => () => {
|
|
37
|
+
const actionType = orderedVisibleColumns.includes(columnId)
|
|
38
|
+
? ViewSettingsActionTypes.REMOVE_ATTRIBUTE
|
|
39
|
+
: ViewSettingsActionTypes.ADD_ATTRIBUTE;
|
|
40
|
+
dispatch({ type: actionType, payload: { attributeId: columnId } });
|
|
41
|
+
};
|
|
42
|
+
const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
|
|
43
|
+
const indexFrom = orderedVisibleColumns.indexOf(String(draggedElement.id));
|
|
44
|
+
const indexTo = orderedVisibleColumns.indexOf(String(dropTarget?.id));
|
|
45
|
+
if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
dispatch({ type: ViewSettingsActionTypes.MOVE_ATTRIBUTE, payload: { indexFrom, indexTo } });
|
|
49
|
+
};
|
|
50
|
+
return (_jsxs("div", { children: [_jsx(KitTypography.Title, { level: "h4", children: t('explorer.columns') }), _jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true }), _jsx(StyledListTitle, { id: visibleListTitle, children: t('explorer.visible-columns') }), _jsx(StyledList, { "aria-labelledby": visibleListTitle, children: _jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: _handleDragEnd, children: _jsxs(SortableContext, { items: orderedVisibleColumns, strategy: verticalListSortingStrategy, children: [_jsx(ColumnItem, { itemId: "", title: t('record_edition.whoAmI'), visible: false, locked: true }), orderedVisibleColumns
|
|
51
|
+
.filter(columnId => searchFilteredColumnsIds.includes(columnId))
|
|
52
|
+
.map(columnId => (_jsx(ColumnItem, { itemId: attributeDetailsById[columnId].id, title: attributeDetailsById[columnId].label, visible: true, onVisibilityClick: _toggleColumnVisibility(columnId), dragHandler: _jsx(FaGripLines, {}) }, columnId)))] }) }) }), _jsx(StyledListTitle, { id: invisibleListTitle, children: t('explorer.invisible-columns') }), _jsx(StyledList, { "aria-labelledby": invisibleListTitle, children: searchFilteredColumnsIds
|
|
53
|
+
.filter(columnId => !orderedVisibleColumns.includes(columnId))
|
|
54
|
+
.map(columnId => (_jsx(ColumnItem, { itemId: attributeDetailsById[columnId].id, visible: false, title: attributeDetailsById[columnId].label, onVisibilityClick: _toggleColumnVisibility(columnId) }, attributeDetailsById[columnId].id))) })] }));
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=SelectVisibleAttributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectVisibleAttributes.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/configure-display/attributes/SelectVisibleAttributes.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAEnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,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,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAC,sBAAsB,EAAC,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAC,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AAE9E,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGjC,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAC5C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAMhD,MAAM,CAAC,MAAM,uBAAuB,GAAqD,CAAC,EAAC,SAAS,EAAC,EAAE,EAAE;IACrG,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,OAAO,GAAG,UAAU,CACtB,SAAS,CAAC,aAAa,CAAC,EACxB,SAAS,CAAC,cAAc,EAAE;QACtB,gBAAgB,EAAE,2BAA2B;KAChD,CAA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CAAC;qBAC7D,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CACb,KAAC,UAAU,IAEP,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,EAAE,EACzC,OAAO,EAAE,KAAK,EACd,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,KAAK,EAC3C,iBAAiB,EAAE,uBAAuB,CAAC,QAAQ,CAAC,IAJ/C,oBAAoB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAKxC,CACL,CAAC,GACG,IACX,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroupProps } from 'aristid-ds/dist/Kit/DataEntry/Radio';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
interface ISelectViewTypeProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: RadioGroupProps['onChange'];
|
|
6
|
+
}
|
|
7
|
+
export declare const SelectViewType: FunctionComponent<ISelectViewTypeProps>;
|
|
8
|
+
export {};
|
package/dist/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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 { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { KitRadio, KitSpace, KitTag } from 'aristid-ds';
|
|
7
|
+
export const SelectViewType = ({ value, onChange }) => {
|
|
8
|
+
const { t } = useSharedTranslation();
|
|
9
|
+
const comingSoonTag = _jsx(KitTag, { type: "secondary", idCardProps: { description: String(t('explorer.coming-soon')) } });
|
|
10
|
+
return (_jsx(KitRadio.Group, { value: value, onChange: onChange, children: _jsxs(KitSpace, { direction: "vertical", size: 0, children: [_jsx(KitRadio, { value: "list", disabled: true, children: _jsxs(KitSpace, { children: [t('explorer.view-type-list'), " ", comingSoonTag] }) }), _jsx(KitRadio, { value: "table", children: t('explorer.view-type-table') }), _jsx(KitRadio, { value: "mosaic", disabled: true, children: _jsxs(KitSpace, { children: [t('explorer.view-type-mosaic'), " ", comingSoonTag] }) }), _jsx(KitRadio, { value: "planning", disabled: true, children: _jsxs(KitSpace, { children: [t('explorer.view-type-planning'), " ", comingSoonTag] }) })] }) }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SelectViewType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectViewType.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/configure-display/view-type/SelectViewType.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AAStD,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,EAAE,EAAE;IACzF,MAAM,EAAC,CAAC,EAAC,GAAG,oBAAoB,EAAE,CAAC;IAEnC,MAAM,aAAa,GAAG,KAAC,MAAM,IAAC,IAAI,EAAC,WAAW,EAAC,WAAW,EAAE,EAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,EAAC,GAAI,CAAC;IAEjH,OAAO,CACH,KAAC,QAAQ,CAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,YAC5C,MAAC,QAAQ,IAAC,SAAS,EAAC,UAAU,EAAC,IAAI,EAAE,CAAC,aAClC,KAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,QAAQ,kBAC3B,MAAC,QAAQ,eACJ,CAAC,CAAC,yBAAyB,CAAC,OAAG,aAAa,IACtC,GACJ,EACX,KAAC,QAAQ,IAAC,KAAK,EAAC,OAAO,YAAE,CAAC,CAAC,0BAA0B,CAAC,GAAY,EAClE,KAAC,QAAQ,IAAC,KAAK,EAAC,QAAQ,EAAC,QAAQ,kBAC7B,MAAC,QAAQ,eACJ,CAAC,CAAC,2BAA2B,CAAC,OAAG,aAAa,IACxC,GACJ,EACX,KAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,kBAC/B,MAAC,QAAQ,eACJ,CAAC,CAAC,6BAA6B,CAAC,OAAG,aAAa,IAC1C,GACJ,IACJ,GACE,CACpB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FaEye, FaEyeSlash, FaSearch } from 'react-icons/fa';
|
|
3
|
+
import { KitFilter, KitInput, KitTypography } from 'aristid-ds';
|
|
4
|
+
import styled from 'styled-components';
|
|
5
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
6
|
+
import { AttributeFormat, AttributeType, RecordFilterCondition } from '../../../../_gqlTypes';
|
|
7
|
+
import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
8
|
+
import { SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
9
|
+
import { useAttributeDetailsData } from '../_shared/useAttributeDetailsData';
|
|
10
|
+
import { ViewSettingsActionTypes } from '../store-view-settings/viewSettingsReducer';
|
|
11
|
+
import { useViewSettingsContext } from '../store-view-settings/useViewSettingsContext';
|
|
12
|
+
import { FilterListItem } from './FilterListItem';
|
|
13
|
+
import { CommonFilterItem } from '../_shared/CommonFilterItem';
|
|
14
|
+
const StyledList = styled.ul `
|
|
15
|
+
padding: calc(var(--general-spacing-s) * 1px) 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
list-style: none;
|
|
18
|
+
color: var(--general-utilities-text-primary);
|
|
19
|
+
`;
|
|
20
|
+
const StyledEyeSlash = styled(FaEyeSlash) `
|
|
21
|
+
color: var(--general-utilities-neutral-dark);
|
|
22
|
+
`;
|
|
23
|
+
const StyledFaEye = styled(FaEye) `
|
|
24
|
+
color: var(--general-utilities-neutral-deepDark);
|
|
25
|
+
`;
|
|
26
|
+
export const FilterItems = ({ libraryId }) => {
|
|
27
|
+
const { t } = useSharedTranslation();
|
|
28
|
+
const { view: { filters, canAddFilter }, dispatch } = useViewSettingsContext();
|
|
29
|
+
const { onSearchChanged, searchFilteredColumnsIds, attributeDetailsById } = useAttributeDetailsData(libraryId);
|
|
30
|
+
const sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
|
|
31
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
32
|
+
}));
|
|
33
|
+
const addFilter = (attributeId) => () => {
|
|
34
|
+
dispatch({
|
|
35
|
+
type: ViewSettingsActionTypes.ADD_FILTER,
|
|
36
|
+
payload: {
|
|
37
|
+
field: attributeId,
|
|
38
|
+
attribute: {
|
|
39
|
+
label: attributeDetailsById[attributeId].label,
|
|
40
|
+
format: attributeDetailsById[attributeId].format ?? AttributeFormat.text
|
|
41
|
+
},
|
|
42
|
+
condition: RecordFilterCondition.EQUAL,
|
|
43
|
+
value: null
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const removeFilter = (filterId) => () => {
|
|
48
|
+
dispatch({
|
|
49
|
+
type: ViewSettingsActionTypes.REMOVE_FILTER,
|
|
50
|
+
payload: {
|
|
51
|
+
id: filterId
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const _handleDragEnd = ({ active: draggedElement, over: dropTarget }) => {
|
|
56
|
+
const indexFrom = activeFilters.findIndex(({ field }) => field === String(draggedElement.id));
|
|
57
|
+
const indexTo = activeFilters.findIndex(({ field }) => field === String(dropTarget?.id));
|
|
58
|
+
if (!dropTarget || indexFrom === indexTo || indexTo === -1) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
dispatch({ type: ViewSettingsActionTypes.MOVE_FILTER, payload: { indexFrom, indexTo } });
|
|
62
|
+
};
|
|
63
|
+
const activeFilters = filters.filter(({ field }) => searchFilteredColumnsIds.includes(field));
|
|
64
|
+
const inactiveFilters = searchFilteredColumnsIds.filter(attributeId => attributeDetailsById?.[attributeId]?.type === AttributeType.simple &&
|
|
65
|
+
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, visibilityButtonProps: {
|
|
67
|
+
icon: _jsx(StyledFaEye, {}),
|
|
68
|
+
title: String(t('explorer.hide')),
|
|
69
|
+
onClick: removeFilter(activeFilter.id)
|
|
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
|
|
71
|
+
? {
|
|
72
|
+
icon: _jsx(StyledEyeSlash, {}),
|
|
73
|
+
title: String(t('explorer.show')),
|
|
74
|
+
onClick: addFilter(attributeId)
|
|
75
|
+
}
|
|
76
|
+
: undefined, children: _jsx(KitFilter, { label: attributeDetailsById[attributeId].label, disabled: !canAddFilter }) }, attributeId))) })] }));
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=FilterItems.js.map
|
|
@@ -0,0 +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,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,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,gBAAgB,EAAC,MAAM,6BAA6B,CAAC;AAE7D,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;CAK3B,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;CAExC,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;CAEhC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA2C,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CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from 'react';
|
|
2
|
+
import { KitButton } from 'aristid-ds';
|
|
3
|
+
interface IActiveFilterListItemProps {
|
|
4
|
+
attributeId: string;
|
|
5
|
+
isDraggable?: true;
|
|
6
|
+
visibilityButtonProps?: Pick<ComponentProps<typeof KitButton>, 'onClick' | 'icon' | 'title'>;
|
|
7
|
+
}
|
|
8
|
+
export declare const FilterListItem: FunctionComponent<IActiveFilterListItemProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { FaGripLines } from 'react-icons/fa';
|
|
4
|
+
import { KitButton } from 'aristid-ds';
|
|
5
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
6
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
7
|
+
const StyledFilterListItem = styled.li `
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: 32px;
|
|
12
|
+
|
|
13
|
+
div {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const StyledDragHandle = styled.span `
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
|
|
24
|
+
`;
|
|
25
|
+
export const FilterListItem = ({ attributeId, isDraggable, visibilityButtonProps, children }) => {
|
|
26
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: attributeId });
|
|
27
|
+
const style = {
|
|
28
|
+
transform: CSS.Transform.toString(transform),
|
|
29
|
+
transition
|
|
30
|
+
};
|
|
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
|
+
};
|
|
33
|
+
//# sourceMappingURL=FilterListItem.js.map
|
|
@@ -0,0 +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,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"}
|
package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AttributeFormat } from '../../../../../_gqlTypes';
|
|
3
|
+
import { SimpleFilterDropdown } from './SimpleFilterDropDown';
|
|
4
|
+
import { TextAttributeDropDown } from './TextAttributeDropDown';
|
|
5
|
+
import { NumericAttributeDropDown } from './NumericAttributeDropDown';
|
|
6
|
+
export const FilterDropDown = ({ filter }) => {
|
|
7
|
+
switch (filter.attribute.format) {
|
|
8
|
+
case AttributeFormat.numeric:
|
|
9
|
+
return _jsx(NumericAttributeDropDown, { filter: filter });
|
|
10
|
+
case AttributeFormat.text:
|
|
11
|
+
case AttributeFormat.rich_text:
|
|
12
|
+
return _jsx(TextAttributeDropDown, { filter: filter });
|
|
13
|
+
default:
|
|
14
|
+
return _jsx(SimpleFilterDropdown, { filter: filter });
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=FilterDropDown.js.map
|
package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterDropDown.js","sourceRoot":"","sources":["../../../../../../src/components/Explorer/manage-view-settings/filter-items/filter-type/FilterDropDown.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAEpE,MAAM,CAAC,MAAM,cAAc,GAA4C,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE;IAChF,QAAQ,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QAC9B,KAAK,eAAe,CAAC,OAAO;YACxB,OAAO,KAAC,wBAAwB,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;QACxD,KAAK,eAAe,CAAC,IAAI,CAAC;QAC1B,KAAK,eAAe,CAAC,SAAS;YAC1B,OAAO,KAAC,qBAAqB,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;QACrD;YACI,OAAO,KAAC,oBAAoB,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;IACxD,CAAC;AACL,CAAC,CAAC"}
|
package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
interface IFilterValueListProps {
|
|
3
|
+
values: string[];
|
|
4
|
+
selectedValues: string[];
|
|
5
|
+
multiple: boolean;
|
|
6
|
+
freeEntry: boolean;
|
|
7
|
+
onSelectionChanged: (value: string[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FilterValueList: FunctionComponent<IFilterValueListProps>;
|
|
10
|
+
export {};
|
package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/FilterValueList.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
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 { useDebouncedValue } from '../../../../../hooks/useDebouncedValue';
|
|
6
|
+
import { useSharedTranslation } from '../../../../../hooks/useSharedTranslation';
|
|
7
|
+
import { KitInput, KitTypography } from 'aristid-ds';
|
|
8
|
+
import { useMemo, useState } from 'react';
|
|
9
|
+
import { FaCheck, FaSearch } from 'react-icons/fa';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
const FilterValueListStyledUl = styled.ul `
|
|
12
|
+
padding: 0;
|
|
13
|
+
margin: 0;
|
|
14
|
+
list-style: none;
|
|
15
|
+
`;
|
|
16
|
+
const ValueListItemValueLi = styled.li `
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
min-height: 32px;
|
|
20
|
+
height: 32px;
|
|
21
|
+
border-radius: calc(var(--general-border-radius-s) * 1px);
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
|
|
24
|
+
&.selected,
|
|
25
|
+
&:hover {
|
|
26
|
+
color: var(--components-Icon-colors-icon-on, var(--general-utilities-main-default));
|
|
27
|
+
background-color: var(--components-Icon-colors-background-on, var(--general-utilities-main-light));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.label {
|
|
31
|
+
flex: 1;
|
|
32
|
+
padding: 0 calc(var(--general-spacing-xs) * 1px);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.check {
|
|
36
|
+
flex: 0;
|
|
37
|
+
padding: 0 calc(var(--general-spacing-xs) * 1px);
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
export const FilterValueList = ({ values, selectedValues, multiple, onSelectionChanged }) => {
|
|
41
|
+
const { t } = useSharedTranslation();
|
|
42
|
+
const [searchInput, setSearchInput] = useState('');
|
|
43
|
+
const debouncedSearchInput = useDebouncedValue(searchInput, 300);
|
|
44
|
+
const searchFilteredValues = useMemo(() => {
|
|
45
|
+
if (debouncedSearchInput === '' || debouncedSearchInput.length < 3) {
|
|
46
|
+
return values;
|
|
47
|
+
}
|
|
48
|
+
return values.filter(value => value.includes(debouncedSearchInput));
|
|
49
|
+
}, [debouncedSearchInput, values]);
|
|
50
|
+
const onSearchChanged = (event) => {
|
|
51
|
+
const shouldIgnoreInputChange = event.target.value.length < 3 && debouncedSearchInput.length < 3;
|
|
52
|
+
if (shouldIgnoreInputChange) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
setSearchInput(() => {
|
|
56
|
+
if (event.target.value.length > 2) {
|
|
57
|
+
return event.target.value;
|
|
58
|
+
}
|
|
59
|
+
return '';
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const onClickItem = (value) => {
|
|
63
|
+
if (selectedValues.includes(value)) {
|
|
64
|
+
onSelectionChanged(selectedValues.filter(selectedValue => selectedValue !== value));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
onSelectionChanged(multiple ? [...selectedValues, value] : [value]);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return (_jsxs(_Fragment, { children: [_jsx(KitInput, { placeholder: String(t('global.search')), onChange: onSearchChanged, allowClear: true, prefix: _jsx(FaSearch, {}) }), _jsx(FilterValueListStyledUl, { children: searchFilteredValues.map(value => {
|
|
71
|
+
const isSelected = selectedValues.includes(value);
|
|
72
|
+
return (_jsxs(ValueListItemValueLi, { className: isSelected ? 'selected' : '', onClick: () => onClickItem(value), children: [_jsx(KitTypography.Text, { className: "label", ellipsis: true, size: "fontSize5", children: value }), isSelected && (_jsx(KitTypography.Text, { className: "check", size: "fontSize5", children: _jsx(FaCheck, {}) }))] }, value));
|
|
73
|
+
}) })] }));
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=FilterValueList.js.map
|