@leav/ui 0.3.6-89067e7 → 0.3.6-8bbbdf7
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 +28 -18
- package/dist/_gqlTypes/index.js +25 -5
- package/dist/_gqlTypes/index.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 +31 -33
- package/dist/components/Explorer/DataView.js.map +1 -1
- package/dist/components/Explorer/Explorer.d.ts +3 -0
- package/dist/components/Explorer/Explorer.js +49 -13
- package/dist/components/Explorer/Explorer.js.map +1 -1
- package/dist/components/Explorer/ExplorerTitle.js +3 -1
- package/dist/components/Explorer/ExplorerTitle.js.map +1 -1
- 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 +110 -0
- package/dist/components/Explorer/TableCell.js.map +1 -0
- package/dist/components/Explorer/TableTagGroup.d.ts +6 -0
- package/dist/components/Explorer/TableTagGroup.js +22 -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 +12 -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 +1 -0
- package/dist/components/Explorer/{edit-settings → manage-view-settings/_shared}/ColumnItem.js +17 -2
- 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 +58 -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/useEditAction.js +1 -0
- 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 +1 -8
- package/dist/components/Explorer/usePrimaryActions.js +4 -11
- package/dist/components/Explorer/usePrimaryActions.js.map +1 -1
- 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/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/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 +40 -10
- package/dist/locales/fr/shared.json +40 -10
- package/package.json +5 -2
- 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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataView.js","sourceRoot":"","sources":["../../../src/components/Explorer/DataView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,YAAY,EAA+B,MAAM,OAAO,CAAC;AACjE,OAAO,EAAC,SAAS,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"DataView.js","sourceRoot":"","sources":["../../../src/components/Explorer/DataView.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,YAAY,EAA+B,MAAM,OAAO,CAAC;AACjE,OAAO,EAAC,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EA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BACxC,CAAC,CAAC,CACN;aACR;SACJ,CACV,CAAC;IAEN,4DAA4D;IAC5D,OAAO,CACH,MAAC,0BAA0B,IAAC,GAAG,EAAE,YAAY,aACzC,KAAC,QAAQ,IACL,YAAY,QACZ,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,EAC3C,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAC3C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,EAAC,CAAC,EAAE,YAAY,EAAC,EACzB,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAC,OAAO,EACnB,UAAU,EAAE,KAAK,GACnB,EACD,eAAe,IAAI,CAChB,cAAK,SAAS,EAAC,YAAY,YACvB,KAAC,aAAa,IACV,eAAe,QACf,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kCAAkC,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,CAAC,EAC1F,KAAK,EAAE,eAAe,EAAE,UAAU,EAClC,cAAc,EAAE,eAAe,EAAE,WAAW,EAC5C,eAAe,EAAE,eAAe,EAAE,QAAQ,EAC1C,eAAe,EAAE,eAAe,EAAE,eAAe,EACjD,QAAQ,EAAE,eAAe,EAAE,UAAU,EACrC,gBAAgB,EAAE,eAAe,EAAE,cAAc,GACnD,GACA,CACT,IACwB,CAChC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { IItemAction, IPrimaryAction } from './_types';
|
|
3
|
+
import { type IViewSettingsState } from './manage-view-settings';
|
|
3
4
|
interface IExplorerProps {
|
|
5
|
+
noPagination?: true;
|
|
4
6
|
library: string;
|
|
5
7
|
itemActions?: IItemAction[];
|
|
6
8
|
primaryActions?: IPrimaryAction[];
|
|
7
9
|
title?: string;
|
|
8
10
|
defaultActionsForItem?: Array<'edit' | 'deactivate'>;
|
|
9
11
|
defaultPrimaryActions?: Array<'create'>;
|
|
12
|
+
defaultViewSettings?: Partial<IViewSettingsState>;
|
|
10
13
|
}
|
|
11
14
|
export declare const Explorer: FunctionComponent<IExplorerProps>;
|
|
12
15
|
export {};
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
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 { useReducer } from 'react';
|
|
6
|
+
import { createPortal } from 'react-dom';
|
|
2
7
|
import { KitSpace, KitTypography } from 'aristid-ds';
|
|
3
8
|
import styled from 'styled-components';
|
|
4
|
-
import { DataView } from './DataView';
|
|
5
|
-
import { useOpenSettings } from './edit-settings/useOpenSettings';
|
|
6
9
|
import { useExplorerData } from './_queries/useExplorerData';
|
|
10
|
+
import { DataView } from './DataView';
|
|
7
11
|
import { useDeactivateAction } from './useDeactivateAction';
|
|
8
12
|
import { useEditAction } from './useEditAction';
|
|
9
|
-
import { usePrimaryActionsButton
|
|
13
|
+
import { usePrimaryActionsButton } from './usePrimaryActions';
|
|
10
14
|
import { ExplorerTitle } from './ExplorerTitle';
|
|
11
15
|
import { useCreateAction } from './useCreateAction';
|
|
16
|
+
import { SidePanel, useEditSettings, useOpenViewSettings, ViewSettingsContext, viewSettingsInitialState, defaultPageSizeOptions, viewSettingsReducer } from './manage-view-settings';
|
|
17
|
+
import { useSearchInput } from './useSearchInput';
|
|
18
|
+
import { usePagination } from './usePagination';
|
|
19
|
+
import { Loading } from '../Loading';
|
|
12
20
|
const isNotEmpty = (union) => union.length > 0;
|
|
13
21
|
const ExplorerHeaderDivStyled = styled.div `
|
|
14
22
|
display: flex;
|
|
@@ -16,9 +24,27 @@ const ExplorerHeaderDivStyled = styled.div `
|
|
|
16
24
|
align-items: center;
|
|
17
25
|
padding-bottom: calc(var(--general-spacing-xs) * 1px);
|
|
18
26
|
`;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
const ExplorerPageDivStyled = styled.div `
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
height: 100%;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
`;
|
|
33
|
+
export const Explorer = ({ library, itemActions, primaryActions, title, noPagination, defaultActionsForItem = ['edit', 'deactivate'], defaultPrimaryActions = ['create'], defaultViewSettings }) => {
|
|
34
|
+
const { panelElement } = useEditSettings();
|
|
35
|
+
const [view, dispatch] = useReducer(viewSettingsReducer, {
|
|
36
|
+
...viewSettingsInitialState,
|
|
37
|
+
...defaultViewSettings,
|
|
38
|
+
maxFilters: defaultViewSettings?.maxFilters ?? viewSettingsInitialState.maxFilters
|
|
39
|
+
});
|
|
40
|
+
const { currentPage, setNewPageSize, setNewPage } = usePagination(dispatch);
|
|
41
|
+
const { data, loading, refetch } = useExplorerData({
|
|
42
|
+
libraryId: library,
|
|
43
|
+
attributeIds: view.attributesIds,
|
|
44
|
+
fulltextSearch: view.fulltextSearch,
|
|
45
|
+
pagination: noPagination ? null : { limit: view.pageSize, offset: view.pageSize * (currentPage - 1) },
|
|
46
|
+
sorts: view.sort
|
|
47
|
+
}); // TODO: refresh when go back on page
|
|
22
48
|
const { deactivateAction } = useDeactivateAction({
|
|
23
49
|
isEnabled: isNotEmpty(defaultActionsForItem) && defaultActionsForItem.includes('deactivate')
|
|
24
50
|
});
|
|
@@ -30,11 +56,21 @@ export const Explorer = ({ library, itemActions, primaryActions, title, defaultA
|
|
|
30
56
|
library,
|
|
31
57
|
refetch
|
|
32
58
|
});
|
|
33
|
-
const
|
|
34
|
-
const {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
const { primaryButton } = usePrimaryActionsButton([createAction, ...(primaryActions ?? [])].filter(Boolean));
|
|
60
|
+
const { viewSettingsButton } = useOpenViewSettings(library);
|
|
61
|
+
const { searchInput } = useSearchInput({ view, dispatch });
|
|
62
|
+
const dataViewAdditionalProps = noPagination
|
|
63
|
+
? {}
|
|
64
|
+
: {
|
|
65
|
+
paginationProps: {
|
|
66
|
+
pageSizeOptions: defaultPageSizeOptions,
|
|
67
|
+
currentPage,
|
|
68
|
+
pageSize: view.pageSize,
|
|
69
|
+
setNewPageSize,
|
|
70
|
+
setNewPage,
|
|
71
|
+
totalItems: data?.totalCount ?? 0
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (_jsxs(ViewSettingsContext.Provider, { value: { view, dispatch }, children: [_jsxs(ExplorerPageDivStyled, { children: [_jsxs(ExplorerHeaderDivStyled, { children: [_jsx(KitTypography.Title, { level: "h1", children: _jsx(ExplorerTitle, { library: library, title: title }) }), _jsxs(KitSpace, { size: "xs", children: [searchInput, viewSettingsButton, primaryButton] })] }), loading ? (_jsx(Loading, {})) : (_jsx(DataView, { dataGroupedFilteredSorted: data?.records ?? [], itemActions: [editAction, deactivateAction, ...(itemActions ?? [])].filter(Boolean), attributesProperties: data?.attributes ?? {}, attributesToDisplay: ['whoAmI', ...view.attributesIds], ...dataViewAdditionalProps }))] }), panelElement && createPortal(_jsx(SidePanel, {}), panelElement), editModal, createModal] }));
|
|
39
75
|
};
|
|
40
76
|
//# sourceMappingURL=Explorer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Explorer.js","sourceRoot":"","sources":["../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Explorer.js","sourceRoot":"","sources":["../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAoC,UAAU,EAAC,MAAM,OAAO,CAAC;AACpE,OAA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AAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EACnF,oBAAoB,EAAE,IAAI,EAAE,UAAU,IAAI,EAAE,EAC5C,mBAAmB,EAAE,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,KAClD,uBAAuB,GAC7B,CACL,IACmB,EACvB,YAAY,IAAI,YAAY,CAAC,KAAC,SAAS,KAAG,EAAE,YAAY,CAAC,EACzD,SAAS,EACT,WAAW,IACe,CAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { localizedTranslation } from '@leav/utils';
|
|
|
6
6
|
import { useExplorerLibraryDataQuery } from '../../_gqlTypes';
|
|
7
7
|
import useLang from '../../hooks/useLang';
|
|
8
8
|
import { AntSkeleton } from 'aristid-ds';
|
|
9
|
+
// TODO: use <h1 /> tag
|
|
9
10
|
export const ExplorerTitle = ({ title, library }) => {
|
|
10
11
|
const { data, loading, error } = useExplorerLibraryDataQuery({ variables: { libraryId: library }, skip: !!title });
|
|
11
12
|
const { lang } = useLang();
|
|
@@ -15,12 +16,13 @@ export const ExplorerTitle = ({ title, library }) => {
|
|
|
15
16
|
if (loading) {
|
|
16
17
|
return _jsx(AntSkeleton.Input, { style: { width: 400 }, active: true });
|
|
17
18
|
}
|
|
18
|
-
//TODO: handle error and bad library ID
|
|
19
|
+
// TODO: handle error and bad library ID
|
|
19
20
|
if (error) {
|
|
20
21
|
return _jsx("span", { children: error.message });
|
|
21
22
|
}
|
|
22
23
|
const libraryData = data?.libraries?.list[0];
|
|
23
24
|
if (!libraryData) {
|
|
25
|
+
// TODO: make it i18n
|
|
24
26
|
return _jsx("span", { children: "Unknown library" });
|
|
25
27
|
}
|
|
26
28
|
return _jsx("span", { children: localizedTranslation(libraryData.label, lang) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplorerTitle.js","sourceRoot":"","sources":["../../../src/components/Explorer/ExplorerTitle.tsx"],"names":[],"mappings":";AAAA,oF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,EAAE,OAAO,EAAE,KAAK,EAAC,GAAG,2BAA2B,CAAC,EAAC,SAAS,EAAE,EAAC,SAAS,EAAE,OAAO,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAC,CAAC,CAAC;IAC7G,MAAM,EAAC,IAAI,EAAC,GAAG,OAAO,EAAE,CAAC;IAEzB,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,yBAAO,KAAK,GAAQ,CAAC;IAChC,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,KAAC,WAAW,CAAC,KAAK,IAAC,KAAK,EAAE,EAAC,KAAK,EAAE,GAAG,EAAC,EAAE,MAAM,SAAG,CAAC;IAC7D,CAAC;IAED,wCAAwC;IACxC,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,yBAAO,KAAK,CAAC,OAAO,GAAQ,CAAC;IACxC,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAE7C,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,qBAAqB;QACrB,OAAO,6CAA4B,CAAC;IACxC,CAAC;IAED,OAAO,yBAAO,oBAAoB,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,GAAQ,CAAC;AACxE,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } 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 { KitIdCard } from 'aristid-ds';
|
|
6
|
+
export const IdCard = ({ item }) => {
|
|
7
|
+
const { id, label, library, preview, subLabel } = item;
|
|
8
|
+
const itemLabel = label ?? id;
|
|
9
|
+
const avatarProps = { label: itemLabel };
|
|
10
|
+
if (preview) {
|
|
11
|
+
avatarProps.src = preview.small;
|
|
12
|
+
}
|
|
13
|
+
return _jsx(KitIdCard, { avatarProps: avatarProps, title: label ?? id, description: subLabel ?? library.id });
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=IdCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdCard.js","sourceRoot":"","sources":["../../../src/components/Explorer/IdCard.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AASrC,MAAM,CAAC,MAAM,MAAM,GAAoC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAE;IAC9D,MAAM,EAAC,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC;IACrD,MAAM,SAAS,GAAG,KAAK,IAAI,EAAE,CAAC;IAC9B,MAAM,WAAW,GAAe,EAAC,KAAK,EAAE,SAAS,EAAC,CAAC;IAEnD,IAAI,OAAO,EAAE,CAAC;QACV,WAAW,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;IACpC,CAAC;IAED,OAAO,KAAC,SAAS,IAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,WAAW,EAAE,QAAQ,IAAI,OAAO,CAAC,EAAE,GAAI,CAAC;AAC5G,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AttributePropertiesFragment, PropertyValueFragment } from '../../_gqlTypes';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
interface ITableCellProps {
|
|
4
|
+
values: PropertyValueFragment[];
|
|
5
|
+
attributeProperties: AttributePropertiesFragment;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableCell: FunctionComponent<ITableCellProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, 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 { AttributeFormat, AttributeType } from '../../_gqlTypes';
|
|
6
|
+
import { useSharedTranslation } from '../../hooks/useSharedTranslation';
|
|
7
|
+
import { KitAvatar, KitTag, KitTypography } from 'aristid-ds';
|
|
8
|
+
import styled from 'styled-components';
|
|
9
|
+
import { IdCard } from './IdCard';
|
|
10
|
+
import { TableTagGroup } from './TableTagGroup';
|
|
11
|
+
import { FaListAlt } from 'react-icons/fa';
|
|
12
|
+
import DOMPurify from 'dompurify';
|
|
13
|
+
const isStandardValue = (v, attribute) => [AttributeType.simple, AttributeType.advanced].includes(attribute.type);
|
|
14
|
+
const isStandardValues = (values, attribute) => values.every(value => isStandardValue(value, attribute));
|
|
15
|
+
const isLinkValue = (v, attribute) => [AttributeType.simple_link, AttributeType.advanced_link].includes(attribute.type);
|
|
16
|
+
const isLinkValues = (values, attribute) => values.every(value => isLinkValue(value, attribute));
|
|
17
|
+
const isTreeValue = (v, attribute) => [AttributeType.tree].includes(attribute.type);
|
|
18
|
+
const StyledCenteringWrapper = styled.div `
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: calc(var(--general-spacing-xs) * 1px);
|
|
22
|
+
`;
|
|
23
|
+
const StyledColorChip = styled.div `
|
|
24
|
+
height: calc(var(--general-spacing-s) * 1px);
|
|
25
|
+
width: calc(var(--general-spacing-s) * 1px);
|
|
26
|
+
border-radius: calc(var(--general-border-radius-xs) * 1px);
|
|
27
|
+
background-color: ${props => props.$colorTextContent};
|
|
28
|
+
`;
|
|
29
|
+
const StyledFaListAlt = styled(FaListAlt) `
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
`;
|
|
32
|
+
export const TableCell = ({ values, attributeProperties }) => {
|
|
33
|
+
const { t } = useSharedTranslation();
|
|
34
|
+
if (attributeProperties.multiple_values) {
|
|
35
|
+
if (isStandardValues(values, attributeProperties)) {
|
|
36
|
+
const tags = values.map(value => {
|
|
37
|
+
switch (attributeProperties.format) {
|
|
38
|
+
case AttributeFormat.boolean:
|
|
39
|
+
return {
|
|
40
|
+
idCardProps: {
|
|
41
|
+
description: value.valuePayload ? String(t('global.yes')) : String(t('global.no'))
|
|
42
|
+
},
|
|
43
|
+
type: value.valuePayload ? 'primary' : 'neutral'
|
|
44
|
+
};
|
|
45
|
+
default:
|
|
46
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted
|
|
47
|
+
? '●●●●●●●●●●●●'
|
|
48
|
+
: value.valuePayload;
|
|
49
|
+
return {
|
|
50
|
+
idCardProps: { description: valueContent },
|
|
51
|
+
type: 'primary'
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return _jsx(TableTagGroup, { tags: tags });
|
|
56
|
+
}
|
|
57
|
+
else if (isLinkValues(values, attributeProperties)) {
|
|
58
|
+
return (_jsx(KitAvatar.Group, { maxCount: 5, children: values.map((value, index) => {
|
|
59
|
+
if (!isLinkValue(value, attributeProperties)) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return (_jsx(KitAvatar, { label: String(value?.linkPayload?.whoAmI.label), src: value?.linkPayload?.whoAmI.preview?.small, color: "primary", secondaryColorInvert: true }, index));
|
|
63
|
+
}) }));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
// TODO: handle multiple tree values
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const value = values[0]; // Not multiple_values attribute should not have more than one value
|
|
72
|
+
if (!value) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
let content = null;
|
|
76
|
+
if (isStandardValue(value, attributeProperties)) {
|
|
77
|
+
if (value.valuePayload === null) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
switch (attributeProperties.format) {
|
|
81
|
+
case AttributeFormat.boolean:
|
|
82
|
+
const valueToDisplay = value.valuePayload ? t('global.yes') : t('global.no');
|
|
83
|
+
content = (_jsx(KitTag, { type: !!value.valuePayload ? 'primary' : 'neutral', idCardProps: { description: valueToDisplay } }, attributeProperties.id));
|
|
84
|
+
break;
|
|
85
|
+
case AttributeFormat.rich_text:
|
|
86
|
+
const tmp = document.createElement('div');
|
|
87
|
+
tmp.innerHTML = DOMPurify.sanitize(value.valuePayload);
|
|
88
|
+
const textContent = tmp.textContent;
|
|
89
|
+
content = (_jsxs(_Fragment, { children: [_jsx(StyledFaListAlt, {}), _jsx(KitTypography.Text, { ellipsis: { tooltip: textContent }, children: textContent }, attributeProperties.id)] }));
|
|
90
|
+
break;
|
|
91
|
+
case AttributeFormat.color:
|
|
92
|
+
const colorTextContent = `#${value.valuePayload}`;
|
|
93
|
+
content = (_jsxs(_Fragment, { children: [_jsx(StyledColorChip, { "$colorTextContent": colorTextContent }), _jsx(KitTypography.Text, { ellipsis: { tooltip: colorTextContent }, children: colorTextContent }, attributeProperties.id)] }));
|
|
94
|
+
break;
|
|
95
|
+
default:
|
|
96
|
+
const valueContent = attributeProperties.format === AttributeFormat.encrypted ? '●●●●●●●●●●●●' : value.valuePayload;
|
|
97
|
+
content = (_jsx(KitTypography.Text, { ellipsis: { tooltip: valueContent }, children: valueContent }, attributeProperties.id));
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (isTreeValue(value, attributeProperties)) {
|
|
102
|
+
content = value.treePayload?.record.id ?? '';
|
|
103
|
+
}
|
|
104
|
+
if (isLinkValue(value, attributeProperties)) {
|
|
105
|
+
content = value.linkPayload?.whoAmI ? (_jsx(IdCard, { item: value.linkPayload?.whoAmI }, attributeProperties.id)) : null;
|
|
106
|
+
}
|
|
107
|
+
return _jsx(StyledCenteringWrapper, { children: content });
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=TableCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableCell.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EACH,eAAe,EAEf,aAAa,EAKhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAE5D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,eAAe,GAAG,CACpB,CAAwB,EACxB,SAAsC,EACP,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AAC9G,MAAM,gBAAgB,GAAG,CACrB,MAA+B,EAC/B,SAAsC,EACA,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtG,MAAM,WAAW,GAAG,CAChB,CAAwB,EACxB,SAAsC,EACH,EAAE,CACrC,CAAC,aAAa,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACtF,MAAM,YAAY,GAAG,CACjB,MAA+B,EAC/B,SAAsC,EACI,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,E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E1B,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,22 @@
|
|
|
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
|
+
const StyledTagsGroupDiv = styled.div `
|
|
8
|
+
display: flex;
|
|
9
|
+
column-gap: calc(var(--general-spacing-xxs) * 1px);
|
|
10
|
+
row-gap: calc(var(--general-spacing-xxs) * 0.5px);
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
|
|
13
|
+
& > span {
|
|
14
|
+
margin-right: var(--general-spacing-none);
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
export const TableTagGroup = ({ tags, maxTags = 3 }) => {
|
|
18
|
+
const hiddenTags = tags.slice(maxTags);
|
|
19
|
+
const visibleTags = tags.slice(0, maxTags);
|
|
20
|
+
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}` } }) }))] }));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=TableTagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableTagGroup.js","sourceRoot":"","sources":["../../../src/components/Explorer/TableTagGroup.tsx"],"names":[],"mappings":";AAAA,oFAAoF;AACpF,sCAAsC;AACtC,sEAAsE;AACtE,OAAO,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,YAAY,CAAC;AAG9C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASpC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAGrB,CAAC,EAAC,IAAI,EAAE,OAAO,GAAG,CAAC,EAAC,EAAE,EAAE;IACzB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAE3C,OAAO,CACH,MAAC,kBAAkB,eACd,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,KAAC,MAAM,OAAiB,GAAG,IAAd,KAAK,CAAa,CAClC,CAAC,EACD,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CACtB,KAAC,UAAU,IACP,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,wBAAkB,SAAS,CAAC,WAAW,EAAE,WAAW,IAA1C,KAAK,CAA4C,CAC9D,CAAC,YAEF,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,EAAC,WAAW,EAAE,EAAC,WAAW,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,EAAC,GAAI,GACrE,CAChB,IACgB,CACxB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
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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AAM,EAAC,CAAC,EAAE,EAAE,CAAC;KAC3G,CAAC,CAAC,CAAC;IAEJ,OAAO;QACH,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC;QACxC,UAAU;QACV,OAAO;KACV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC5B,SAAS,EACT,YAAY,EACZ,cAAc,EACd,KAAK,EACL,UAAU,EAUb,EAAE,EAAE;IACD,MAAM,EAAC,IAAI,EAAE,cAAc,EAAC,GAAG,OAAO,EAAE,CAAC;IACzC,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,gBAAgB,CAAC;QAC9C,SAAS,EAAE;YACP,SAAS;YACT,YAAY;YACZ,UAAU;YACV,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,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
|
};
|
|
@@ -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.js
RENAMED
|
@@ -5,11 +5,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { KitTypography } from 'aristid-ds';
|
|
6
6
|
import { FaEye, FaEyeSlash } from 'react-icons/fa';
|
|
7
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';
|
|
8
11
|
const StyledValue = styled(KitTypography.Text) `
|
|
9
12
|
color: var(--general-utilities-disabled);
|
|
10
13
|
`;
|
|
11
14
|
const StyledConfigurationItem = styled.li `
|
|
12
|
-
list-style: none;
|
|
13
15
|
color: var(--general-utilities-text-primary);
|
|
14
16
|
display: flex;
|
|
15
17
|
width: 100%;
|
|
@@ -55,8 +57,21 @@ const StyledFaEye = styled(FaEye) `
|
|
|
55
57
|
const StyledEyeSlash = styled(FaEyeSlash) `
|
|
56
58
|
color: var(--general-utilities-disabled);
|
|
57
59
|
`;
|
|
60
|
+
const StyledDragHandle = styled.span `
|
|
61
|
+
cursor: ${props => (props.$isDragging ? 'grabbing' : 'grab')};
|
|
62
|
+
`;
|
|
58
63
|
const StyledEmptyIcon = styled.div `
|
|
59
64
|
width: calc(var(--general-spacing-s) * 1px);
|
|
60
65
|
`;
|
|
61
|
-
export const ColumnItem = ({ dragHandler, title, disabled, visible, onVisibilityClick }) =>
|
|
66
|
+
export const ColumnItem = ({ itemId, dragHandler, title, disabled, visible, onVisibilityClick }) => {
|
|
67
|
+
const { t } = useSharedTranslation();
|
|
68
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id: itemId });
|
|
69
|
+
const style = {
|
|
70
|
+
transform: CSS.Transform.toString(transform),
|
|
71
|
+
transition
|
|
72
|
+
};
|
|
73
|
+
const _handleClick = () => onVisibilityClick?.();
|
|
74
|
+
const visibilityButtonLabel = visible ? t('explorer.hide') : t('explorer.show');
|
|
75
|
+
return (_jsxs(StyledConfigurationItem, { className: disabled ? 'disabled' : '', ref: setNodeRef, style: style, children: [dragHandler ? (_jsx(StyledDragHandle, { ...attributes, ...listeners, "$isDragging": isDragging, children: dragHandler })) : (_jsx(StyledEmptyIcon, {})), _jsx(KitTypography.Text, { size: "fontSize5", ellipsis: true, className: "title", children: title }), _jsx("button", { disabled: disabled, onClick: _handleClick, title: visibilityButtonLabel, "aria-label": visibilityButtonLabel, children: visible ? _jsx(StyledFaEye, {}) : _jsx(StyledEyeSlash, {}) })] }));
|
|
76
|
+
};
|
|
62
77
|
//# 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,UAA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