tenanthub-core-ui
v5.3.2
Published
Core ui for tenant projects
Downloads
1,286
Readme
tenanthub-core-ui
This package contains the core UI components for the TenanHub platform. It is built to work with react-admin and @mui v5.
- How to debug
In your package.json, you can write this line.
"tenanthub-core-ui": "file:/path/to/this/project/tenanthub-core-ui",
yarn
Publish
version up in package.json
yarn prepub
cd pack-temp
npm publish
cd ..
Installation
npm install tenanthub-core-ui
or
yarn add tenanthub-core-ui
Usage
import { DependencyProvider } from "tenanthub-core-ui/providers";
and wrap your HydraAdmin layout with it:
<DependencyProvider>...</DependencyProvider>
the DependencyProvider
takes the dependencies {useApi, useStyles, useEntityAccess} which only cares of having the interface implementation and not the details .
replace <DirtyContextContainer>
with <DirtyContextProvider>
exported from tenanthub-core-ui/providers
The main entry exports only the components:
i18n
: please add...enPosMessages,
to your en.js and de.js files.
import { TranslationMessages } from "react-admin";
import englishMessages from "ra-language-english";
import { enPosMessages } from "tenanthub-core-ui";
const customEnglishMessages: TranslationMessages = {
...englishMessages,
pos: {
...
...enPosMessages,
},
}
Buttons
:ColorButton
Forms
:DatePicker
DateRangePicker
DateRangePickerPro
IconPicker
NumberInput
SearchInput
TextInput
Select
DateFilterInput
DateRangeFilterInput
FloatFilterInput
SingleSelectFilterInput
Grid
:CustomPagination
Grid
GridContainer
MultiSelection
Loaders
:CircularProgressOverlay
Modals
:Modal
ModalWarning
ModalWithHeaderActions
VirtualizedTable
:ChipsRow
VirtualizedTable
VirtualizedTableMultiSelection
Nested Imports
The package supports nested imports, /providers, /utils, /hooks
providers
:DependencyProvider
DirtyContextProvider
utils
:getDotsField
grid-column
grid
theme
time*format
hooks
:useDependency
useGrid