@leav/ui 0.3.6-7be4667 → 0.3.6-7d696be
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/form.d.ts +11 -5
- package/dist/__mocks__/common/form.js +18 -2
- 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 +102 -18
- package/dist/_gqlTypes/index.js +1102 -1039
- package/dist/_gqlTypes/index.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 +32 -34
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +9 -4
- package/dist/components/Explorer/Explorer.js +53 -11
- 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 +119 -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 +19 -4
- package/dist/components/Explorer/_queries/useExplorerData.js +49 -16
- package/dist/components/Explorer/_queries/useExplorerData.js.map +1 -1
- package/dist/components/Explorer/_types.d.ts +17 -3
- package/dist/components/Explorer/index.d.ts +1 -3
- package/dist/components/Explorer/index.js +1 -3
- package/dist/components/Explorer/index.js.map +1 -1
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts +2 -1
- 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/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 +89 -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 +10 -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/SimpleFilterDropDown.d.ts +8 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.js +100 -0
- package/dist/components/Explorer/manage-view-settings/filter-items/filter-type/SimpleFilterDropDown.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/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.d.ts +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContext.js +1 -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/{edit-settings → manage-view-settings/open-view-settings}/EditSettingsContextProvider.js +2 -1
- package/dist/components/Explorer/manage-view-settings/open-view-settings/EditSettingsContextProvider.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.js +2 -2
- 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.js.map +1 -0
- package/dist/components/Explorer/manage-view-settings/open-view-settings/useOpenViewSettings.d.ts +3 -0
- package/dist/components/Explorer/{edit-settings/useOpenSettings.js → manage-view-settings/open-view-settings/useOpenViewSettings.js} +7 -5
- 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.js.map +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.d.ts +1 -1
- package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingsPanel.js +10 -10
- 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/{RecordEdition/EditRecordContent/reducers/standardFieldReducer/useStandardFieldReducer.js → Explorer/manage-view-settings/store-view-settings/useViewSettingsContext.js} +3 -3
- 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 +135 -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/useEditAction.js +2 -1
- 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 +1 -1
- 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/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/MonoValueSelect/MonoValueSelect.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MonoValueSelect/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/LinkField/MultiValueSelect/MultiValueSelect.js.map +1 -1
- 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 +165 -192
- 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 -29
- 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 +33 -43
- 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 -47
- 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 +24 -46
- 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 +29 -50
- 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 +43 -62
- 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 +28 -50
- 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/MonoValueSelect.d.ts +3 -2
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js +23 -49
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/MonoValueSelect.js.map +1 -1
- package/dist/components/RecordEdition/EditRecordContent/uiElements/StandardField/StandardFieldValue/ValuesList/_types.d.ts +2 -9
- 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 +31 -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/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 +45 -11
- package/dist/locales/fr/shared.json +45 -11
- package/package.json +5 -2
- package/dist/components/Explorer/edit-settings/ColumnItem.js +0 -62
- package/dist/components/Explorer/edit-settings/ColumnItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayMode.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayMode.js +0 -28
- package/dist/components/Explorer/edit-settings/DisplayMode.js.map +0 -1
- package/dist/components/Explorer/edit-settings/DisplayModeTable.d.ts +0 -6
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js +0 -77
- package/dist/components/Explorer/edit-settings/DisplayModeTable.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContext.js.map +0 -1
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.d.ts +0 -2
- package/dist/components/Explorer/edit-settings/EditSettingsContextProvider.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingItem.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SettingsPanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/SidePanel.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useEditSettings.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.d.ts +0 -10
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js +0 -24
- package/dist/components/Explorer/edit-settings/useGetLibraryColumns.js.map +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.d.ts +0 -1
- package/dist/components/Explorer/edit-settings/useOpenSettings.js.map +0 -1
- package/dist/components/Explorer/useCreateMainAction.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 -90
- 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/Explorer/{edit-settings → manage-view-settings/open-view-settings}/SidePanel.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/open-view-settings}/useEditSettings.js +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.d.ts +0 -0
- /package/dist/components/Explorer/{edit-settings → manage-view-settings/router-menu}/SettingItem.js +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AttributeFormat, AttributeType } from '../../_gqlTypes';
|
|
3
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
4
|
+
import { FaListAlt } from 'react-icons/fa';
|
|
5
|
+
import DOMPurify from 'dompurify';
|
|
6
|
+
import { KitAvatar, KitTag, KitTypography } from 'aristid-ds';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { IdCard } from './IdCard';
|
|
9
|
+
import { multiColorTagAvatarClassName, TableTagGroup } from './TableTagGroup';
|
|
10
|
+
const isStandardValue = (v, attribute) => [AttributeType.simple, AttributeType.advanced].includes(attribute.type);
|
|
11
|
+
const isStandardValues = (values, attribute) => values.every(value => isStandardValue(value, attribute));
|
|
12
|
+
const isLinkValue = (v, attribute) => [AttributeType.simple_link, AttributeType.advanced_link].includes(attribute.type);
|
|
13
|
+
const isLinkValues = (values, attribute) => values.every(value => isLinkValue(value, attribute));
|
|
14
|
+
const isTreeValue = (v, attribute) => [AttributeType.tree].includes(attribute.type);
|
|
15
|
+
const StyledCenteringWrapper = styled.div `
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
19
|
+
`;
|
|
20
|
+
const StyledColorChip = styled.div `
|
|
21
|
+
height: calc(var(--general-spacing-s) * 1px);
|
|
22
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
23
|
+
border-radius: calc(var(--general-border-radius-xs) * 1px);
|
|
24
|
+
background-color: ${props => props.$colorTextContent};
|
|
25
|
+
`;
|
|
26
|
+
const StyledFaListAlt = styled(FaListAlt) `
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
`;
|
|
29
|
+
export const TableCell = ({ values, attributeProperties }) => {
|
|
30
|
+
const { t } = useSharedTranslation();
|
|
31
|
+
if (attributeProperties.multiple_values) {
|
|
32
|
+
if (isStandardValues(values, attributeProperties)) {
|
|
33
|
+
const tags = values.map(value => {
|
|
34
|
+
switch (attributeProperties.format) {
|
|
35
|
+
case AttributeFormat.boolean:
|
|
36
|
+
return {
|
|
37
|
+
idCardProps: {
|
|
38
|
+
description: value.valuePayload ? String(t('global.yes')) : String(t('global.no'))
|
|
39
|
+
},
|
|
40
|
+
type: value.valuePayload ? 'primary' : 'neutral'
|
|
41
|
+
};
|
|
42
|
+
case AttributeFormat.color:
|
|
43
|
+
const colorHexa = `#${value.valuePayload}`;
|
|
44
|
+
return {
|
|
45
|
+
idCardProps: {
|
|
46
|
+
description: colorHexa,
|
|
47
|
+
avatarProps: {
|
|
48
|
+
color: colorHexa,
|
|
49
|
+
shape: 'square',
|
|
50
|
+
className: multiColorTagAvatarClassName
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
default:
|
|
55
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted
|
|
56
|
+
? '●●●●●●●●●●●●'
|
|
57
|
+
: value.valuePayload;
|
|
58
|
+
return {
|
|
59
|
+
idCardProps: { description: valueContent },
|
|
60
|
+
type: 'primary'
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return _jsx(TableTagGroup, { tags: tags });
|
|
65
|
+
}
|
|
66
|
+
else if (isLinkValues(values, attributeProperties)) {
|
|
67
|
+
return (_jsx(KitAvatar.Group, { maxCount: 5, children: values.map((value, index) => {
|
|
68
|
+
if (!isLinkValue(value, attributeProperties)) {
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
return (_jsx(KitAvatar, { label: String(value?.linkPayload?.whoAmI.label), src: value?.linkPayload?.whoAmI.preview?.small, color: "primary", secondaryColorInvert: true }, index));
|
|
72
|
+
}) }));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
// TODO: handle multiple tree values
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const value = values[0]; // Not multiple_values attribute should not have more than one value
|
|
81
|
+
if (!value) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
let content = null;
|
|
85
|
+
if (isStandardValue(value, attributeProperties)) {
|
|
86
|
+
if (value.valuePayload === null) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
switch (attributeProperties.format) {
|
|
90
|
+
case AttributeFormat.boolean:
|
|
91
|
+
const valueToDisplay = value.valuePayload ? t('global.yes') : t('global.no');
|
|
92
|
+
content = (_jsx(KitTag, { type: !!value.valuePayload ? 'primary' : 'neutral', idCardProps: { description: valueToDisplay } }, attributeProperties.id));
|
|
93
|
+
break;
|
|
94
|
+
case AttributeFormat.rich_text:
|
|
95
|
+
const tmp = document.createElement('div');
|
|
96
|
+
tmp.innerHTML = DOMPurify.sanitize(value.valuePayload);
|
|
97
|
+
const textContent = tmp.textContent;
|
|
98
|
+
content = (_jsxs(_Fragment, { children: [_jsx(StyledFaListAlt, {}), _jsx(KitTypography.Text, { ellipsis: { tooltip: textContent }, children: textContent }, attributeProperties.id)] }));
|
|
99
|
+
break;
|
|
100
|
+
case AttributeFormat.color:
|
|
101
|
+
const colorTextContent = `#${value.valuePayload}`;
|
|
102
|
+
content = (_jsxs(_Fragment, { children: [_jsx(StyledColorChip, { "$colorTextContent": colorTextContent }), _jsx(KitTypography.Text, { ellipsis: { tooltip: colorTextContent }, children: colorTextContent }, attributeProperties.id)] }));
|
|
103
|
+
break;
|
|
104
|
+
default:
|
|
105
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted ? '●●●●●●●●●●●●' : value.valuePayload;
|
|
106
|
+
content = (_jsx(KitTypography.Text, { ellipsis: { tooltip: valueContent }, children: valueContent }, attributeProperties.id));
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (isTreeValue(value, attributeProperties)) {
|
|
111
|
+
content = value.treePayload?.record.id ?? '';
|
|
112
|
+
}
|
|
113
|
+
if (isLinkValue(value, attributeProperties)) {
|
|
114
|
+
content = value.linkPayload?.whoAmI ? (_jsx(IdCard, { item: value.linkPayload?.whoAmI }, attributeProperties.id)) : null;
|
|
115
|
+
}
|
|
116
|
+
return _jsx(StyledCenteringWrapper, { children: content });
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=TableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableCell.tsx"],"names":[],"mappings":";AAIA,OAAO,EACH,eAAe,EAEf,aA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AAgB,EAAC,YACjF,gBAAgB,IADI,mBAAmB,CAAC,EAAE,CAE1B,IACtB,CACN,CAAC;oBACF,MAAM;gBACV;oBACI,MAAM,YAAY,GACd,mBAAmB,CAAC,MAAM,KAAK,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;oBACnG,OAAO,GAAG,CACN,KAAC,aAAa,CAAC,IAAI,IAA8B,QAAQ,EAAE,EAAC,OAAO,EAAE,YAAY,EAAC,YAC7E,YAAY,IADQ,mBAAmB,CAAC,EAAE,CAE1B,CACxB,CAAC;oBACF,MAAM;YACd,CAAC;QACL,CAAC;QAED,IAAI,WAAW,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1C,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;QACjD,CAAC;QAED,IAAI,WAAW,CAAC,KAAK,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1C,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,CAClC,KAAC,MAAM,IAA8B,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,IAAvD,mBAAmB,CAAC,EAAE,CAAqC,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;QACb,CAAC;QAED,OAAO,KAAC,sBAAsB,cAAE,OAAO,GAA0B,CAAC;IACtE,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IKitTag } from 'aristid-ds/dist/Kit/DataDisplay/Tag/types';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
export declare const multiColorTagAvatarClassName = "multi-color-tag-avatar";
|
|
4
|
+
export declare const TableTagGroup: FunctionComponent<{
|
|
5
|
+
tags: IKitTag[];
|
|
6
|
+
maxTags?: number;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitTag, KitTooltip } from 'aristid-ds';
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
export const multiColorTagAvatarClassName = 'multi-color-tag-avatar';
|
|
8
|
+
const StyledTagsGroupDiv = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
column-gap: calc(var(--general-spacing-xxs) * 1px);
|
|
11
|
+
row-gap: calc(var(--general-spacing-xxs) * 0.5px);
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
|
|
14
|
+
& > span {
|
|
15
|
+
margin-right: var(--general-spacing-none);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// TODO: wait DS to allow better customization on avatar
|
|
19
|
+
&&& .${multiColorTagAvatarClassName} {
|
|
20
|
+
height: calc(var(--general-spacing-s) * 1px);
|
|
21
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
22
|
+
border-radius: calc(var(--general-border-radius-xs) * 1px);
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
export const TableTagGroup = ({ tags, maxTags = 3 }) => {
|
|
26
|
+
const hiddenTags = tags.slice(maxTags);
|
|
27
|
+
const visibleTags = tags.slice(0, maxTags);
|
|
28
|
+
return (_jsxs(StyledTagsGroupDiv, { children: [visibleTags.map((tag, index) => (_jsx(KitTag, { ...tag }, index))), hiddenTags.length > 0 && (_jsx(KitTooltip, { overlay: hiddenTags.map((hiddenTag, index) => (_jsx("div", { children: hiddenTag.idCardProps?.description }, index))), children: _jsx(KitTag, { type: "primary", idCardProps: { description: `+${hiddenTags.length}` } }) }))] }));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=TableTagGroup.js.map
|
|
@@ -0,0 +1 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import {
|
|
2
|
-
import { ExplorerQuery } from '../../../_gqlTypes';
|
|
3
|
-
export declare const useExplorerData: (libraryId
|
|
4
|
-
|
|
1
|
+
import { IExplorerData } from '../_types';
|
|
2
|
+
import { ExplorerQuery, SortOrder } from '../../../_gqlTypes';
|
|
3
|
+
export declare const useExplorerData: ({ libraryId, attributeIds, fulltextSearch, sorts, pagination }: {
|
|
4
|
+
libraryId: string;
|
|
5
|
+
attributeIds: string[];
|
|
6
|
+
fulltextSearch: string;
|
|
7
|
+
sorts: Array<{
|
|
8
|
+
attributeId: string;
|
|
9
|
+
order: SortOrder;
|
|
10
|
+
}>;
|
|
11
|
+
pagination: null | {
|
|
12
|
+
limit: number;
|
|
13
|
+
offset: number;
|
|
14
|
+
};
|
|
15
|
+
}) => {
|
|
16
|
+
data: IExplorerData;
|
|
5
17
|
loading: boolean;
|
|
6
18
|
refetch: (variables?: Partial<import("../../../_gqlTypes").Exact<{
|
|
7
19
|
libraryId: import("../../../_gqlTypes").Scalars["ID"];
|
|
8
20
|
attributeIds: Array<import("../../../_gqlTypes").Scalars["ID"]> | import("../../../_gqlTypes").Scalars["ID"];
|
|
21
|
+
pagination?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordsPagination>;
|
|
9
22
|
filters?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordFilterInput>> | import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").RecordFilterInput>>;
|
|
23
|
+
multipleSort?: import("../../../_gqlTypes").InputMaybe<Array<import("../../../_gqlTypes").RecordSortInput> | import("../../../_gqlTypes").RecordSortInput>;
|
|
24
|
+
searchQuery?: import("../../../_gqlTypes").InputMaybe<import("../../../_gqlTypes").Scalars["String"]>;
|
|
10
25
|
}>>) => Promise<import("@apollo/client").ApolloQueryResult<ExplorerQuery>>;
|
|
11
26
|
};
|
|
@@ -1,21 +1,54 @@
|
|
|
1
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
2
|
+
// This file is released under LGPL V3
|
|
3
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
|
+
import { localizedTranslation } from '@leav/utils';
|
|
1
5
|
import { useExplorerQuery } from '../../../_gqlTypes';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
import { useLang } from '../../../hooks';
|
|
7
|
+
const _mapping = (data, libraryId, availableLangs) => {
|
|
8
|
+
const attributes = data.records.list.length
|
|
9
|
+
? data.records.list[0].properties.reduce((acc, property) => {
|
|
10
|
+
acc[property.attributeId] = {
|
|
11
|
+
...property.attributeProperties,
|
|
12
|
+
label: localizedTranslation(property.attributeProperties.label, availableLangs)
|
|
13
|
+
};
|
|
14
|
+
return acc;
|
|
15
|
+
}, {})
|
|
16
|
+
: {};
|
|
17
|
+
const records = data.records.list.map(({ whoAmI, properties }) => ({
|
|
18
|
+
libraryId,
|
|
19
|
+
key: whoAmI.id, // For <KitTable /> only
|
|
20
|
+
itemId: whoAmI.id, // For <KitTable /> only
|
|
21
|
+
whoAmI: {
|
|
22
|
+
label: null,
|
|
23
|
+
subLabel: null,
|
|
24
|
+
color: null,
|
|
25
|
+
preview: null,
|
|
26
|
+
...whoAmI
|
|
27
|
+
},
|
|
28
|
+
propertiesById: properties.reduce((acc, { attributeId, values }) => ({ ...acc, [attributeId]: values }), {})
|
|
29
|
+
}));
|
|
17
30
|
return {
|
|
18
|
-
|
|
31
|
+
totalCount: data.records.totalCount ?? 0,
|
|
32
|
+
attributes,
|
|
33
|
+
records
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export const useExplorerData = ({ libraryId, attributeIds, fulltextSearch, sorts, pagination }) => {
|
|
37
|
+
const { lang: availableLangs } = useLang();
|
|
38
|
+
const { data, loading, refetch } = useExplorerQuery({
|
|
39
|
+
variables: {
|
|
40
|
+
libraryId,
|
|
41
|
+
attributeIds,
|
|
42
|
+
pagination,
|
|
43
|
+
searchQuery: fulltextSearch,
|
|
44
|
+
multipleSort: sorts.map(({ order, attributeId }) => ({
|
|
45
|
+
field: attributeId,
|
|
46
|
+
order
|
|
47
|
+
}))
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
data: data !== undefined ? _mapping(data, libraryId, availableLangs) : null,
|
|
19
52
|
loading,
|
|
20
53
|
refetch
|
|
21
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useExplorerData.js","sourceRoot":"","sources":["../../../../src/components/Explorer/_queries/useExplorerData.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAA2B,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACzE,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC,MAAM,QAAQ,GAAG,CAAC,IAAmB,EAAE,SAAiB,EAAE,cAAwB,EAAiB,EAAE;IACjG,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM;QACvC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YACrD,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG;gBACxB,GAAG,QAAQ,CAAC,mBAAmB;gBAC/B,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,mB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CAAC,EAAC,KAAK,EAAE,WAAW,EAAC,EAAE,EAAE,CAAC,CAAC;gBAC/C,KAAK,EAAE,WAAW;gBAClB,KAAK;aACR,CAAC,CAAC;SACN;KACJ,CAAC,CAAC;IAEH,OAAO;QACH,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI;QAC3E,OAAO;QACP,OAAO;KACV,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Override } from '@leav/utils';
|
|
2
|
+
import { AttributePropertiesFragment, PropertyValueFragment, RecordIdentityFragment } from '../../_gqlTypes';
|
|
2
3
|
import { ReactElement } from 'react';
|
|
3
|
-
export
|
|
4
|
+
export interface IExplorerData {
|
|
5
|
+
totalCount: number;
|
|
6
|
+
attributes: {
|
|
7
|
+
[attributeId: string]: Override<AttributePropertiesFragment, {
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
records: IItemData[];
|
|
12
|
+
}
|
|
4
13
|
export interface IItemData {
|
|
5
14
|
libraryId: string;
|
|
6
15
|
key: string;
|
|
7
16
|
itemId: string;
|
|
8
|
-
whoAmI:
|
|
17
|
+
whoAmI: Required<RecordIdentityFragment['whoAmI']>;
|
|
9
18
|
propertiesById: {
|
|
10
19
|
[attributeId: string]: PropertyValueFragment[];
|
|
11
20
|
};
|
|
@@ -16,6 +25,11 @@ export interface IItemAction {
|
|
|
16
25
|
label: string;
|
|
17
26
|
isDanger?: boolean;
|
|
18
27
|
}
|
|
28
|
+
export interface IPrimaryAction {
|
|
29
|
+
callback: () => void;
|
|
30
|
+
icon: ReactElement;
|
|
31
|
+
label: string;
|
|
32
|
+
}
|
|
19
33
|
export type ActionHook<T = {}> = {
|
|
20
34
|
isEnabled: boolean;
|
|
21
35
|
} & T;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Explorer as InternalExplorer } from './Explorer';
|
|
2
|
-
import { useEditSettings } from './
|
|
3
|
-
import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
|
|
4
|
-
import { SidePanel } from './edit-settings/SidePanel';
|
|
2
|
+
import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
|
|
5
3
|
type CompoundedComponent = typeof InternalExplorer & {
|
|
6
4
|
useEditSettings: typeof useEditSettings;
|
|
7
5
|
EditSettingsContextProvider: typeof EditSettingsContextProvider;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
// This file is released under LGPL V3
|
|
3
3
|
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
4
4
|
import { Explorer as InternalExplorer } from './Explorer';
|
|
5
|
-
import { useEditSettings } from './
|
|
6
|
-
import { EditSettingsContextProvider } from './edit-settings/EditSettingsContextProvider';
|
|
7
|
-
import { SidePanel } from './edit-settings/SidePanel';
|
|
5
|
+
import { useEditSettings, SidePanel, EditSettingsContextProvider } from './manage-view-settings';
|
|
8
6
|
export const Explorer = InternalExplorer;
|
|
9
7
|
Explorer.EditSettingsContextProvider = EditSettingsContextProvider;
|
|
10
8
|
Explorer.useEditSettings = useEditSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,QAAQ,IAAI,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACxD,OAAO,EAAC,eAAe,
|
|
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"}
|
package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.d.ts
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
interface IColumnItemProps {
|
|
3
|
+
itemId: string;
|
|
3
4
|
dragHandler?: ReactNode;
|
|
4
5
|
visible: boolean;
|
|
5
6
|
title: string;
|
|
6
7
|
onVisibilityClick?: () => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
8
|
value?: string;
|
|
9
|
+
locked?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const ColumnItem: FunctionComponent<IColumnItemProps>;
|
|
11
12
|
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06
|
|
3
|
+
// This file is released under LGPL V3
|
|
4
|
+
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt
|
|
5
|
+
import { KitTypography } from 'aristid-ds';
|
|
6
|
+
import { FaEye, FaEyeSlash, FaLock } from 'react-icons/fa';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
9
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
10
|
+
import { useSharedTranslation } from '../../../../hooks/useSharedTranslation';
|
|
11
|
+
const StyledValue = styled(KitTypography.Text) `
|
|
12
|
+
color: var(--general-utilities-disabled);
|
|
13
|
+
`;
|
|
14
|
+
const StyledConfigurationItem = styled.li `
|
|
15
|
+
color: var(--general-utilities-text-primary);
|
|
16
|
+
display: flex;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 40px;
|
|
19
|
+
padding: 0 calc(var(--general-spacing-xs) * 1px);
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
22
|
+
border-radius: calc(var(--general-spacing-xs) * 1px);
|
|
23
|
+
text-align: left;
|
|
24
|
+
|
|
25
|
+
&:first-child {
|
|
26
|
+
margin-top: calc(var(--general-spacing-xs) * 1px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background: var(--general-utilities-main-light);
|
|
31
|
+
|
|
32
|
+
${StyledValue} {
|
|
33
|
+
color: var(--general-utilities-text-primary);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title {
|
|
38
|
+
flex: 1 1 auto;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
> svg {
|
|
42
|
+
flex: 0 0 calc(var(--general-spacing-s) * 1px);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
> button {
|
|
46
|
+
border: none;
|
|
47
|
+
background: transparent;
|
|
48
|
+
padding: 0;
|
|
49
|
+
&:not([disabled]) {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
const StyledFaEye = styled(FaEye) `
|
|
55
|
+
display: flex;
|
|
56
|
+
color: currentColor;
|
|
57
|
+
`;
|
|
58
|
+
const StyledEyeSlash = styled(FaEyeSlash) `
|
|
59
|
+
display: flex;
|
|
60
|
+
color: var(--general-utilities-disabled);
|
|
61
|
+
`;
|
|
62
|
+
const StyledLocked = styled(FaLock) `
|
|
63
|
+
display: flex;
|
|
64
|
+
color: var(--general-utilities-disabled);
|
|
65
|
+
`;
|
|
66
|
+
const StyledDragHandle = styled.span `
|
|
67
|
+
display: flex;
|
|
68
|
+
cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
|
|
69
|
+
`;
|
|
70
|
+
const StyledEmptyIcon = styled.div `
|
|
71
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
72
|
+
`;
|
|
73
|
+
export const ColumnItem = ({ itemId, dragHandler, title, visible, onVisibilityClick, locked = false }) => {
|
|
74
|
+
const { t } = useSharedTranslation();
|
|
75
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: itemId });
|
|
76
|
+
const style = {
|
|
77
|
+
transform: CSS.Transform.toString(transform),
|
|
78
|
+
transition
|
|
79
|
+
};
|
|
80
|
+
const _handleClick = () => onVisibilityClick?.();
|
|
81
|
+
const visibilityButtonLabel = visible ? t('explorer.hide') : t('explorer.show');
|
|
82
|
+
const visibilityIcon = locked ? _jsx(StyledLocked, {}) : visible ? _jsx(StyledFaEye, {}) : _jsx(StyledEyeSlash, {});
|
|
83
|
+
return (_jsxs(StyledConfigurationItem, { ref: setNodeRef, style: style, children: [dragHandler ? (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: dragHandler })) : (_jsx(StyledEmptyIcon, {})), _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx("button", { disabled: locked, onClick: _handleClick, title: visibilityButtonLabel, "aria-label": visibilityButtonLabel, children: visibilityIcon })] }));
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=ColumnItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnItem.js","sourceRoot":"","sources":["../../../../../src/components/Explorer/manage-view-settings/_shared/ColumnItem.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,MAAM,MAAM,mBAAmB,CAAC;A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AC,SAAS,CAAC;QAC5C,UAAU;KACb,CAAC;IAEF,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAEjD,MAAM,qBAAqB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAEhF,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,KAAC,YAAY,KAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAC,WAAW,KAAG,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC;IAElG,OAAO,CACH,MAAC,uBAAuB,IAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,aACjD,WAAW,CAAC,CAAC,CAAC,CACX,KAAC,gBAAgB,OAAK,UAAU,KAAM,SAAS,iBAAe,UAAU,YACnE,WAAW,GACG,CACtB,CAAC,CAAC,CAAC,CACA,KAAC,eAAe,KAAG,CACtB,EACD,KAAC,aAAa,CAAC,IAAI,IAAC,IAAI,EAAC,WAAW,EAAC,QAAQ,QAAC,SAAS,EAAC,OAAO,YAC1D,KAAK,GACW,EACrB,iBACI,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,qBAAqB,gBAChB,qBAAqB,YAEhC,cAAc,GACV,IACa,CAC7B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,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,EAAC,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAMlC,MAAM,QAAQ,GAAG,CAAC,IAAyC,EAAE,kBAA4B,EAAgB,EAAE,CACvG,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,E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AAG,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"}
|