@applica-software-guru/react-admin 1.0.32 → 1.0.34
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/.eslintrc.json +43 -0
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -0
- package/.prettierrc +8 -0
- package/bitbucket-pipelines.yml +30 -0
- package/dist/Admin.d.ts +1 -1
- package/dist/ApplicaAdmin.d.ts +3 -3
- package/dist/ApplicaAdmin.d.ts.map +1 -1
- package/dist/components/@extended/AnimateButton.d.ts +5 -5
- package/dist/components/@extended/Avatar.d.ts +3 -3
- package/dist/components/@extended/Breadcrumbs.d.ts +5 -5
- package/dist/components/@extended/Dot.d.ts +1 -1
- package/dist/components/@extended/Tooltip.d.ts +1 -1
- package/dist/components/ActionsMenu.d.ts +1 -1
- package/dist/components/ActionsMenu.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.d.ts +1 -1
- package/dist/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.d.ts.map +1 -1
- package/dist/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.d.ts +5 -5
- package/dist/components/Layout/Header/AppBarStyled.d.ts +13 -13
- package/dist/components/Layout/Header/HeaderContent/NotificationItem.d.ts +3 -3
- package/dist/components/Logo.d.ts +2 -2
- package/dist/components/MenuPopover/MenuPopover.d.ts +1 -1
- package/dist/components/Notification.d.ts +5 -1
- package/dist/components/Notification.d.ts.map +1 -1
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts +16 -1
- package/dist/components/ra-buttons/CreateInDialogButton.d.ts.map +1 -1
- package/dist/components/ra-buttons/ImpersonateUserButton.d.ts +1 -1
- package/dist/components/ra-fields/ActionsField.d.ts +1 -1
- package/dist/components/ra-fields/ActionsField.d.ts.map +1 -1
- package/dist/components/ra-fields/AttachmentField.d.ts +19 -1
- package/dist/components/ra-fields/AttachmentField.d.ts.map +1 -1
- package/dist/components/ra-fields/BaseAttachmentField.d.ts +2 -2
- package/dist/components/ra-fields/CoverField.d.ts +19 -1
- package/dist/components/ra-fields/CoverField.d.ts.map +1 -1
- package/dist/components/ra-fields/EmailField.d.ts +12 -1
- package/dist/components/ra-fields/FileField.d.ts +19 -1
- package/dist/components/ra-fields/FileField.d.ts.map +1 -1
- package/dist/components/ra-fields/ImageField.d.ts +15 -1
- package/dist/components/ra-fields/ImageField.d.ts.map +1 -1
- package/dist/components/ra-fields/ReadonlyField.d.ts +1 -1
- package/dist/components/ra-fields/ReferenceManyField.d.ts +32 -2
- package/dist/components/ra-fields/ReferenceManyField.d.ts.map +1 -1
- package/dist/components/ra-forms/Edit.d.ts +24 -1
- package/dist/components/ra-forms/Edit.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/LongFormHeader.d.ts +1 -1
- package/dist/components/ra-forms/LongForm/LongFormHeader.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/LongFormTab.d.ts +4 -4
- package/dist/components/ra-forms/LongForm/LongFormTab.d.ts.map +1 -1
- package/dist/components/ra-forms/LongForm/LongFormTabs.d.ts +2 -2
- package/dist/components/ra-forms/SimpleForm.d.ts +13 -1
- package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
- package/dist/components/ra-forms/TabbedForm.d.ts +9 -1
- package/dist/components/ra-forms/TabbedForm.d.ts.map +1 -1
- package/dist/components/ra-forms/Toolbar.d.ts +5 -1
- package/dist/components/ra-inputs/AttachmentInput.d.ts +20 -1
- package/dist/components/ra-inputs/AttachmentInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts +1 -2
- package/dist/components/ra-inputs/AutocompleteArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/AutocompleteInput.d.ts +1 -2
- package/dist/components/ra-inputs/AutocompleteInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/BooleanInput.d.ts +19 -2
- package/dist/components/ra-inputs/BooleanInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/DateInput.d.ts +11 -1
- package/dist/components/ra-inputs/FileInput.d.ts +21 -1
- package/dist/components/ra-inputs/FileInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/LabeledInput.d.ts +2 -2
- package/dist/components/ra-inputs/NumberInput.d.ts +19 -2
- package/dist/components/ra-inputs/RecordInput.d.ts +1 -1
- package/dist/components/ra-inputs/ReferenceArrayInput.d.ts +25 -2
- package/dist/components/ra-inputs/ReferenceArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceInput.d.ts +26 -2
- package/dist/components/ra-inputs/ReferenceInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts +34 -2
- package/dist/components/ra-inputs/ReferenceManyInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SelectArrayInput.d.ts +18 -1
- package/dist/components/ra-inputs/SelectInput.d.ts +21 -1
- package/dist/components/ra-inputs/SmartTextInput.d.ts +17 -1
- package/dist/components/ra-inputs/SmartTextInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/TextInput.d.ts +16 -2
- package/dist/components/ra-inputs/TimeInput.d.ts +11 -1
- package/dist/components/ra-lists/Datagrid.d.ts +616 -2
- package/dist/components/ra-lists/List.d.ts +28 -2
- package/dist/contexts/AppConfigContext.d.ts +1 -1
- package/dist/contexts/MenuConfigContext.d.ts +4 -4
- package/dist/dev/useCliErrorCatcher.d.ts +5 -5
- package/dist/hooks/useAppConfig.d.ts +1 -1
- package/dist/hooks/useBreadcrumbs.d.ts +2 -2
- package/dist/hooks/useMenu.d.ts +2 -2
- package/dist/hooks/useMenu.d.ts.map +1 -1
- package/dist/hooks/useMenuConfig.d.ts +2 -2
- package/dist/i18n/createI18nProvider.d.ts +1 -1
- package/dist/i18n/useI18nCatcher.d.ts +4 -4
- package/dist/i18n/useI18nLanguages.d.ts +4 -4
- package/dist/i18n/useI18nProvider.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/react-admin.cjs.js +25 -25
- package/dist/react-admin.es.js +304 -315
- package/dist/react-admin.umd.js +25 -25
- package/dist/themes/overrides/PaginationItem.d.ts +72 -72
- package/jsconfig.json +31 -0
- package/jsconfig.node.json +10 -0
- package/package.json +6 -5
- package/playground/config-overrides.js +31 -0
- package/playground/jsconfig.json +9 -0
- package/playground/package-lock.json +17764 -0
- package/playground/package.json +69 -0
- package/playground/public/favicon-dark.png +0 -0
- package/playground/public/favicon-light.png +0 -0
- package/playground/public/index.html +46 -0
- package/playground/src/App.js +49 -0
- package/playground/src/build.json +1 -0
- package/playground/src/components/index.js +5 -0
- package/playground/src/components/pages/CustomPage.jsx +7 -0
- package/playground/src/components/pages/index.jsx +2 -0
- package/playground/src/components/ra-buttons/index.js +1 -0
- package/playground/src/components/ra-fields/UserPictureField.js +20 -0
- package/playground/src/components/ra-fields/index.js +2 -0
- package/playground/src/components/ra-forms/DeviceForm.js +36 -0
- package/playground/src/components/ra-forms/I18nMessageForm.js +24 -0
- package/playground/src/components/ra-forms/UserForm.js +51 -0
- package/playground/src/components/ra-forms/index.js +5 -0
- package/playground/src/components/ra-inputs/LangSelectInput.js +4 -0
- package/playground/src/components/ra-inputs/YesOrNoSelectInput.js +14 -0
- package/playground/src/components/ra-inputs/index.js +3 -0
- package/playground/src/components/ra-lists/DeviceList.js +33 -0
- package/playground/src/components/ra-lists/I18nMessageList.js +20 -0
- package/playground/src/components/ra-lists/UserList.js +96 -0
- package/playground/src/components/ra-lists/index.js +4 -0
- package/playground/src/config.js +19 -0
- package/playground/src/contexts/index.js +1 -0
- package/playground/src/hooks/index.js +1 -0
- package/playground/src/index.js +10 -0
- package/playground/src/menu.js +72 -0
- package/playground/src/react-app-env.d.js +1 -0
- package/playground/src/reportWebVitals.js +13 -0
- package/playground/src/resource/device.js +23 -0
- package/playground/src/resource/i18n-message.js +29 -0
- package/playground/src/resource/index.js +4 -0
- package/playground/src/resource/notification.js +18 -0
- package/playground/src/resource/user.js +28 -0
- package/playground/src/theme.js +3 -0
- package/src/Admin.jsx +67 -0
- package/src/AdminContext.jsx +26 -0
- package/src/ApplicaAdmin.jsx +210 -0
- package/src/assets/README.md +7 -0
- package/src/assets/logo-icon.png +0 -0
- package/src/assets/logo-main.png +0 -0
- package/src/components/@extended/AnimateButton.jsx +96 -0
- package/src/components/@extended/Avatar.jsx +125 -0
- package/src/components/@extended/Breadcrumbs.jsx +324 -0
- package/src/components/@extended/Dot.jsx +35 -0
- package/src/components/@extended/IconButton.jsx +166 -0
- package/src/components/@extended/LoadingButton.jsx +228 -0
- package/src/components/@extended/Tooltip.jsx +67 -0
- package/src/components/@extended/Transitions.jsx +125 -0
- package/src/components/@extended/index.jsx +11 -0
- package/src/components/@extended/progress/CircularWithLabel.jsx +34 -0
- package/src/components/@extended/progress/CircularWithPath.jsx +74 -0
- package/src/components/@extended/progress/LinearWithIcon.jsx +22 -0
- package/src/components/@extended/progress/LinearWithLabel.jsx +23 -0
- package/src/components/@extended/progress/index.jsx +6 -0
- package/src/components/ActionsMenu.jsx +77 -0
- package/src/components/Layout/Drawer/DrawerContent/Navigation/NavCollapse.jsx +440 -0
- package/src/components/Layout/Drawer/DrawerContent/Navigation/NavGroup.jsx +359 -0
- package/src/components/Layout/Drawer/DrawerContent/Navigation/NavItem.jsx +259 -0
- package/src/components/Layout/Drawer/DrawerContent/Navigation/index.jsx +73 -0
- package/src/components/Layout/Drawer/DrawerContent/index.jsx +19 -0
- package/src/components/Layout/Drawer/DrawerHeader/DrawerHeaderStyled.jsx +20 -0
- package/src/components/Layout/Drawer/DrawerHeader/index.jsx +44 -0
- package/src/components/Layout/Drawer/HorizontalBar.jsx +55 -0
- package/src/components/Layout/Drawer/MiniDrawerStyled.jsx +47 -0
- package/src/components/Layout/Drawer/index.jsx +63 -0
- package/src/components/Layout/Footer.jsx +23 -0
- package/src/components/Layout/Header/AppBarStyled.jsx +34 -0
- package/src/components/Layout/Header/HeaderContent/MobileSection.jsx +91 -0
- package/src/components/Layout/Header/HeaderContent/Notification.jsx +179 -0
- package/src/components/Layout/Header/HeaderContent/NotificationItem.jsx +109 -0
- package/src/components/Layout/Header/HeaderContent/Profile.jsx +181 -0
- package/src/components/Layout/Header/HeaderContent/index.jsx +38 -0
- package/src/components/Layout/Header/index.jsx +99 -0
- package/src/components/Layout/index.jsx +119 -0
- package/src/components/Loadable.jsx +11 -0
- package/src/components/Loader.jsx +21 -0
- package/src/components/Logo.jsx +29 -0
- package/src/components/MainCard.jsx +111 -0
- package/src/components/MainIcon.jsx +20 -0
- package/src/components/MenuPopover/MenuPopover.jsx +61 -0
- package/src/components/MenuPopover/getPosition.jsx +98 -0
- package/src/components/MenuPopover/index.jsx +3 -0
- package/src/components/MenuPopover/styles.jsx +87 -0
- package/src/components/Notification.jsx +13 -0
- package/src/components/ScrollTop.jsx +24 -0
- package/src/components/ScrollX.jsx +10 -0
- package/src/components/SmallIcon.jsx +14 -0
- package/src/components/index.jsx +36 -0
- package/src/components/ra-buttons/CreateInDialogButton.jsx +203 -0
- package/src/components/ra-buttons/EditInDialogButton.jsx +108 -0
- package/src/components/ra-buttons/ImpersonateUserButton.jsx +41 -0
- package/src/components/ra-buttons/index.jsx +4 -0
- package/src/components/ra-fields/ActionsField.jsx +33 -0
- package/src/components/ra-fields/AttachmentField.jsx +82 -0
- package/src/components/ra-fields/BaseAttachmentField.jsx +72 -0
- package/src/components/ra-fields/CoverField.jsx +83 -0
- package/src/components/ra-fields/DateAgoField.jsx +35 -0
- package/src/components/ra-fields/DateField.jsx +27 -0
- package/src/components/ra-fields/EmailField.jsx +27 -0
- package/src/components/ra-fields/FileField.jsx +40 -0
- package/src/components/ra-fields/FunctionField.jsx +9 -0
- package/src/components/ra-fields/ImageField.jsx +20 -0
- package/src/components/ra-fields/ReadonlyField.jsx +107 -0
- package/src/components/ra-fields/ReferenceManyField.jsx +63 -0
- package/src/components/ra-fields/SizeField.jsx +32 -0
- package/src/components/ra-fields/TextField.jsx +27 -0
- package/src/components/ra-fields/index.jsx +28 -0
- package/src/components/ra-forms/CardForm.jsx +113 -0
- package/src/components/ra-forms/Edit.jsx +13 -0
- package/src/components/ra-forms/FormHeader.jsx +42 -0
- package/src/components/ra-forms/LongForm/DispositionProps.jsx +10 -0
- package/src/components/ra-forms/LongForm/LongForm.jsx +38 -0
- package/src/components/ra-forms/LongForm/LongFormHeader.jsx +24 -0
- package/src/components/ra-forms/LongForm/LongFormTab.jsx +121 -0
- package/src/components/ra-forms/LongForm/LongFormTabs.jsx +63 -0
- package/src/components/ra-forms/LongForm/LongFormView.jsx +129 -0
- package/src/components/ra-forms/LongForm/index.jsx +2 -0
- package/src/components/ra-forms/LongForm/useFormRootPath.jsx +22 -0
- package/src/components/ra-forms/SimpleForm.jsx +69 -0
- package/src/components/ra-forms/TabbedForm.jsx +19 -0
- package/src/components/ra-forms/Toolbar.jsx +36 -0
- package/src/components/ra-forms/index.jsx +8 -0
- package/src/components/ra-inputs/ArrayInput.jsx +29 -0
- package/src/components/ra-inputs/AttachmentInput.jsx +57 -0
- package/src/components/ra-inputs/AutocompleteArrayInput.jsx +25 -0
- package/src/components/ra-inputs/AutocompleteInput.jsx +24 -0
- package/src/components/ra-inputs/BooleanInput.jsx +54 -0
- package/src/components/ra-inputs/DateInput.jsx +30 -0
- package/src/components/ra-inputs/FileInput.jsx +98 -0
- package/src/components/ra-inputs/ImageInput.jsx +44 -0
- package/src/components/ra-inputs/LabeledInput.jsx +80 -0
- package/src/components/ra-inputs/NumberInput.jsx +28 -0
- package/src/components/ra-inputs/RecordInput.jsx +102 -0
- package/src/components/ra-inputs/ReferenceArrayInput.jsx +23 -0
- package/src/components/ra-inputs/ReferenceInput.jsx +23 -0
- package/src/components/ra-inputs/ReferenceManyInput.jsx +44 -0
- package/src/components/ra-inputs/SearchInput.jsx +14 -0
- package/src/components/ra-inputs/SelectArrayInput.jsx +45 -0
- package/src/components/ra-inputs/SelectInput.jsx +24 -0
- package/src/components/ra-inputs/SmartTextInput.jsx +52 -0
- package/src/components/ra-inputs/TextInput.jsx +20 -0
- package/src/components/ra-inputs/TimeInput.jsx +46 -0
- package/src/components/ra-inputs/index.jsx +42 -0
- package/src/components/ra-lists/Datagrid.jsx +42 -0
- package/src/components/ra-lists/Empty.jsx +94 -0
- package/src/components/ra-lists/List.jsx +81 -0
- package/src/components/ra-lists/NotificationList/NotificationList.jsx +41 -0
- package/src/components/ra-lists/NotificationList/button/MarkAsReadedButton.jsx +57 -0
- package/src/components/ra-lists/NotificationList/button/MarkAsUnreadedButton.jsx +56 -0
- package/src/components/ra-lists/NotificationList/button/index.jsx +2 -0
- package/src/components/ra-lists/NotificationList/field/NotificationField.jsx +80 -0
- package/src/components/ra-lists/NotificationList/field/index.jsx +1 -0
- package/src/components/ra-lists/NotificationList/index.jsx +2 -0
- package/src/components/ra-lists/index.jsx +5 -0
- package/src/components/third-party/SimpleBar.jsx +61 -0
- package/src/components/third-party/index.jsx +3 -0
- package/src/contexts/AppConfigContext.jsx +54 -0
- package/src/contexts/MenuConfigContext.jsx +93 -0
- package/src/contexts/MenuPropTypes.jsx +19 -0
- package/src/contexts/ThemeConfigContext.jsx +138 -0
- package/src/contexts/index.jsx +5 -0
- package/src/dev/index.jsx +2 -0
- package/src/dev/useCliErrorCatcher.jsx +86 -0
- package/src/hooks/index.jsx +16 -0
- package/src/hooks/useAppConfig.jsx +6 -0
- package/src/hooks/useBreadcrumbs.jsx +68 -0
- package/src/hooks/useLocalStorage.jsx +31 -0
- package/src/hooks/useMenu.jsx +223 -0
- package/src/hooks/useMenuConfig.jsx +6 -0
- package/src/hooks/useResourceTitle.jsx +25 -0
- package/src/hooks/useThemeConfig.jsx +6 -0
- package/src/i18n/createI18nProvider.jsx +15 -0
- package/src/i18n/index.jsx +4 -0
- package/src/i18n/useI18nCatcher.jsx +71 -0
- package/src/i18n/useI18nLanguages.jsx +22 -0
- package/src/i18n/useI18nProvider.jsx +5 -0
- package/src/index.jsx +67 -0
- package/src/themes/getColors.jsx +18 -0
- package/src/themes/getShadow.jsx +37 -0
- package/src/themes/index.jsx +70 -0
- package/src/themes/overrides/Accordion.jsx +27 -0
- package/src/themes/overrides/AccordionDetails.jsx +14 -0
- package/src/themes/overrides/AccordionSummary.jsx +33 -0
- package/src/themes/overrides/Alert.jsx +72 -0
- package/src/themes/overrides/AlertTitle.jsx +15 -0
- package/src/themes/overrides/Autocomplete.jsx +23 -0
- package/src/themes/overrides/Badge.jsx +36 -0
- package/src/themes/overrides/Button.jsx +229 -0
- package/src/themes/overrides/ButtonBase.jsx +12 -0
- package/src/themes/overrides/ButtonGroup.jsx +11 -0
- package/src/themes/overrides/CardContent.jsx +16 -0
- package/src/themes/overrides/Checkbox.jsx +125 -0
- package/src/themes/overrides/Chip.jsx +75 -0
- package/src/themes/overrides/Dialog.jsx +18 -0
- package/src/themes/overrides/DialogContentText.jsx +14 -0
- package/src/themes/overrides/DialogTitle.jsx +14 -0
- package/src/themes/overrides/Fab.jsx +77 -0
- package/src/themes/overrides/IconButton.jsx +28 -0
- package/src/themes/overrides/InputBase.jsx +13 -0
- package/src/themes/overrides/InputLabel.jsx +25 -0
- package/src/themes/overrides/LinearProgress.jsx +17 -0
- package/src/themes/overrides/Link.jsx +11 -0
- package/src/themes/overrides/ListItemButton.jsx +18 -0
- package/src/themes/overrides/ListItemIcon.jsx +14 -0
- package/src/themes/overrides/LoadingButton.jsx +17 -0
- package/src/themes/overrides/OutlinedInput.jsx +54 -0
- package/src/themes/overrides/Pagination.jsx +11 -0
- package/src/themes/overrides/PaginationItem.jsx +211 -0
- package/src/themes/overrides/Popover.jsx +13 -0
- package/src/themes/overrides/Radio.jsx +121 -0
- package/src/themes/overrides/Slider.jsx +66 -0
- package/src/themes/overrides/Switch.jsx +88 -0
- package/src/themes/overrides/Tab.jsx +24 -0
- package/src/themes/overrides/TableBody.jsx +27 -0
- package/src/themes/overrides/TableCell.jsx +44 -0
- package/src/themes/overrides/TableFooter.jsx +15 -0
- package/src/themes/overrides/TableHead.jsx +15 -0
- package/src/themes/overrides/TablePagination.jsx +16 -0
- package/src/themes/overrides/TableRow.jsx +25 -0
- package/src/themes/overrides/Tabs.jsx +13 -0
- package/src/themes/overrides/ToggleButton.jsx +20 -0
- package/src/themes/overrides/Tooltip.jsx +13 -0
- package/src/themes/overrides/TreeItem.jsx +18 -0
- package/src/themes/overrides/Typography.jsx +13 -0
- package/src/themes/overrides/index.jsx +98 -0
- package/src/themes/palette.jsx +78 -0
- package/src/themes/shadows.jsx +27 -0
- package/src/themes/theme/default.jsx +98 -0
- package/src/themes/theme/index.jsx +44 -0
- package/src/themes/theme/theme1.jsx +128 -0
- package/src/themes/theme/theme2.jsx +128 -0
- package/src/themes/theme/theme3.jsx +128 -0
- package/src/themes/theme/theme4.jsx +128 -0
- package/src/themes/theme/theme5.jsx +128 -0
- package/src/themes/theme/theme6.jsx +128 -0
- package/src/themes/theme/theme7.jsx +128 -0
- package/src/themes/theme/theme8.jsx +128 -0
- package/src/themes/typography.jsx +71 -0
- package/src/utils/index.js +2 -0
- package/src/utils/lang.js +12 -0
- package/src/utils/time.js +13 -0
- package/tsconfig.json +28 -0
- package/vite.config.js +74 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "playground",
|
|
3
|
+
"description": "Applica Playground",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"private": true,
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@applica-software-guru/crud-client": "^1.0",
|
|
8
|
+
"@applica-software-guru/iam-client": "^1.0",
|
|
9
|
+
"@applica-software-guru/react-admin": "file:../",
|
|
10
|
+
"react": "file:../node_modules/react",
|
|
11
|
+
"react-app-rewired": "^2.2.1",
|
|
12
|
+
"react-dom": "file:../node_modules/react-dom",
|
|
13
|
+
"react-router-dom": "file:../node_modules/react-router-dom",
|
|
14
|
+
"react-scripts": "^5.0.0",
|
|
15
|
+
"web-vitals": "^3.0.3"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"start": "react-app-rewired start",
|
|
19
|
+
"build": "react-app-rewired build",
|
|
20
|
+
"test": "react-scripts test",
|
|
21
|
+
"eject": "react-scripts eject"
|
|
22
|
+
},
|
|
23
|
+
"eslintConfig": {
|
|
24
|
+
"extends": [
|
|
25
|
+
"react-app",
|
|
26
|
+
"react-app/jest"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"babel": {
|
|
30
|
+
"presets": [
|
|
31
|
+
"@babel/preset-react"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"browserslist": {
|
|
35
|
+
"production": [
|
|
36
|
+
">0.2%",
|
|
37
|
+
"not dead",
|
|
38
|
+
"not op_mini all"
|
|
39
|
+
],
|
|
40
|
+
"development": [
|
|
41
|
+
"last 1 chrome version",
|
|
42
|
+
"last 1 firefox version",
|
|
43
|
+
"last 1 safari version"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"resolutions": {
|
|
47
|
+
"@svgr/webpack": "6.4.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@babel/core": "^7.19.3",
|
|
51
|
+
"@babel/eslint-parser": "^7.19.1",
|
|
52
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
53
|
+
"buffer": "^6.0.3",
|
|
54
|
+
"crypto-browserify": "^3.12.0",
|
|
55
|
+
"eslint": "^8.25.0",
|
|
56
|
+
"eslint-config-prettier": "^8.5.0",
|
|
57
|
+
"eslint-config-react-app": "7.0.1",
|
|
58
|
+
"eslint-plugin-flowtype": "^8.0.3",
|
|
59
|
+
"eslint-plugin-import": "^2.26.0",
|
|
60
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
61
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
62
|
+
"eslint-plugin-react": "^7.31.10",
|
|
63
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
64
|
+
"prettier": "^2.7.1",
|
|
65
|
+
"process": "^0.11.10",
|
|
66
|
+
"react-error-overlay": "6.0.9",
|
|
67
|
+
"stream-browserify": "^3.0.0"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="theme-color" content="#000000" />
|
|
7
|
+
<meta name="description" content="Applica Web" />
|
|
8
|
+
<link href="%PUBLIC_URL%/favicon-light.png" rel="apple-touch-icon" media="(prefers-color-scheme: light)" />
|
|
9
|
+
<link href="%PUBLIC_URL%/favicon-dark.png" rel="apple-touch-icon" media="(prefers-color-scheme: dark)" />
|
|
10
|
+
<link href="%PUBLIC_URL%/favicon-light.png" rel="icon" media="(prefers-color-scheme: light)" />
|
|
11
|
+
<link href="%PUBLIC_URL%/favicon-dark.png" rel="icon" media="(prefers-color-scheme: dark)" />
|
|
12
|
+
<!--
|
|
13
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
14
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
15
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
16
|
+
|
|
17
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
18
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
19
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
20
|
+
-->
|
|
21
|
+
<title>Applica Web</title>
|
|
22
|
+
|
|
23
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
24
|
+
<link
|
|
25
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap&family=Public+Sans:wght@400;500;600;700"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- this is to resolve issue in old safari browser in tablet -->
|
|
30
|
+
<script src="https://cdn.jsdelivr.net/npm/resize-observer-polyfill@1.5.1/dist/ResizeObserver.min.js"></script>
|
|
31
|
+
</head>
|
|
32
|
+
<body>
|
|
33
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
34
|
+
<div id="root"></div>
|
|
35
|
+
<!--
|
|
36
|
+
This HTML file is a template.
|
|
37
|
+
If you open it directly in the browser, you will see an empty page.
|
|
38
|
+
|
|
39
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
40
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
41
|
+
|
|
42
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
43
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
44
|
+
-->
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import '@applica-software-guru/react-admin/style.css'
|
|
2
|
+
|
|
3
|
+
import * as resourceConfig from './resource'
|
|
4
|
+
|
|
5
|
+
import { API_URL, FILE_FIELDS } from './config'
|
|
6
|
+
import { ApplicaAdmin, HttpError, Resource } from '@applica-software-guru/react-admin'
|
|
7
|
+
import { createAttachmentsParser, createDataProvider } from '@applica-software-guru/crud-client'
|
|
8
|
+
|
|
9
|
+
import { CustomPage } from 'components/pages'
|
|
10
|
+
import { CustomRoutes } from 'ra-core'
|
|
11
|
+
import { Route } from 'react-router-dom'
|
|
12
|
+
import build from './build.json'
|
|
13
|
+
import { useAuthProvider as createAuthProvider } from '@applica-software-guru/iam-client'
|
|
14
|
+
import menu from './menu'
|
|
15
|
+
import theme from './theme'
|
|
16
|
+
|
|
17
|
+
const authProvider = createAuthProvider({ apiUrl: API_URL })
|
|
18
|
+
const dataProvider = createDataProvider({
|
|
19
|
+
apiUrl: API_URL,
|
|
20
|
+
authProvider,
|
|
21
|
+
getHeaders: () => authProvider.getHeaders(),
|
|
22
|
+
getToken: () => authProvider.getToken(),
|
|
23
|
+
attachmentsParser: createAttachmentsParser(FILE_FIELDS),
|
|
24
|
+
HttpErrorClass: HttpError
|
|
25
|
+
})
|
|
26
|
+
const App = () => {
|
|
27
|
+
return (
|
|
28
|
+
<ApplicaAdmin
|
|
29
|
+
theme={theme}
|
|
30
|
+
apiUrl={API_URL}
|
|
31
|
+
authProvider={authProvider}
|
|
32
|
+
dataProvider={dataProvider}
|
|
33
|
+
defaultLocale="it"
|
|
34
|
+
menu={menu}
|
|
35
|
+
name="RA"
|
|
36
|
+
version={build.version}
|
|
37
|
+
>
|
|
38
|
+
<Resource name="entities/notification" {...resourceConfig.notification} />
|
|
39
|
+
<Resource name="entities/user" {...resourceConfig.user} />
|
|
40
|
+
<Resource name="entities/i18n-message" {...resourceConfig.i18nMessage} />
|
|
41
|
+
<Resource name="entities/device" {...resourceConfig.device} />
|
|
42
|
+
<CustomRoutes>
|
|
43
|
+
<Route path="/custom-page" element={<CustomPage />} />
|
|
44
|
+
</CustomRoutes>
|
|
45
|
+
</ApplicaAdmin>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default App
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "version": "0.0.0" }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CoverField, useRecordContext } from '@applica-software-guru/react-admin';
|
|
2
|
+
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { get } from 'lodash';
|
|
6
|
+
|
|
7
|
+
const UserPictureField = ({ source, ...props }) => {
|
|
8
|
+
const record = useRecordContext();
|
|
9
|
+
const image = get(record, source);
|
|
10
|
+
if (!image) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return <CoverField {...props} circle width={50} height={50} justify="flex-end" />;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
UserPictureField.propTypes = {
|
|
17
|
+
source: PropTypes.string.isRequired
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default UserPictureField;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReadonlyField,
|
|
3
|
+
SimpleForm,
|
|
4
|
+
TextInput,
|
|
5
|
+
required,
|
|
6
|
+
useRecordContext,
|
|
7
|
+
useThemeConfig
|
|
8
|
+
} from '@applica-software-guru/react-admin'
|
|
9
|
+
|
|
10
|
+
import { Grid } from '@mui/material'
|
|
11
|
+
|
|
12
|
+
const DeviceForm = () => {
|
|
13
|
+
const { spacing } = useThemeConfig()
|
|
14
|
+
const record = useRecordContext()
|
|
15
|
+
return (
|
|
16
|
+
<SimpleForm>
|
|
17
|
+
<Grid container spacing={spacing}>
|
|
18
|
+
{record?.id && (
|
|
19
|
+
<Grid item xs={12} sm={12}>
|
|
20
|
+
<ReadonlyField source="registrationDate" fullWidth />
|
|
21
|
+
</Grid>
|
|
22
|
+
)}
|
|
23
|
+
<Grid item xs={12} sm={12}>
|
|
24
|
+
<TextInput source="code" validate={required()} fullWidth />
|
|
25
|
+
</Grid>
|
|
26
|
+
{record?.id && (
|
|
27
|
+
<Grid item xs={12} sm={12}>
|
|
28
|
+
<TextInput source="secret" validate={required()} fullWidth />
|
|
29
|
+
</Grid>
|
|
30
|
+
)}
|
|
31
|
+
</Grid>
|
|
32
|
+
</SimpleForm>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default DeviceForm
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SimpleForm, SmartTextInput, TextInput, useThemeConfig } from '@applica-software-guru/react-admin';
|
|
2
|
+
|
|
3
|
+
import { Grid } from '@mui/material';
|
|
4
|
+
import { LangSelectInput } from '../ra-inputs';
|
|
5
|
+
|
|
6
|
+
const I18nMessageForm = () => {
|
|
7
|
+
const { spacing } = useThemeConfig();
|
|
8
|
+
return (
|
|
9
|
+
<SimpleForm defaultValues={{ lang: 'it' }}>
|
|
10
|
+
<Grid container spacing={spacing}>
|
|
11
|
+
<Grid item lg={3} md={3} sm={4} xs={12}>
|
|
12
|
+
<LangSelectInput source="lang" />
|
|
13
|
+
</Grid>
|
|
14
|
+
<Grid item lg={9} md={9} sm={8} xs={12}>
|
|
15
|
+
<TextInput source="code" fullWidth helperText="Code mapped/or to map for the message" />
|
|
16
|
+
</Grid>
|
|
17
|
+
<Grid item xs={12}>
|
|
18
|
+
<SmartTextInput maxLength={200} source="text" fullWidth multiline rows={3} />
|
|
19
|
+
</Grid>
|
|
20
|
+
</Grid>
|
|
21
|
+
</SimpleForm>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
export default I18nMessageForm;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BooleanInput,
|
|
3
|
+
ImageInput,
|
|
4
|
+
SelectArrayInput,
|
|
5
|
+
SimpleForm,
|
|
6
|
+
TextInput,
|
|
7
|
+
useThemeConfig
|
|
8
|
+
} from '@applica-software-guru/react-admin'
|
|
9
|
+
|
|
10
|
+
import { Grid } from '@mui/material'
|
|
11
|
+
import PropTypes from 'prop-types'
|
|
12
|
+
|
|
13
|
+
const UserForm = ({ configuredRoles }) => {
|
|
14
|
+
const { spacing } = useThemeConfig()
|
|
15
|
+
return (
|
|
16
|
+
<SimpleForm defaultValues={{ active: true }}>
|
|
17
|
+
<Grid container spacing={spacing}>
|
|
18
|
+
<Grid item lg={6} xs={12}>
|
|
19
|
+
<TextInput source="email" fullWidth helperText="E-mail (ex. roob@applica.it)" />
|
|
20
|
+
</Grid>
|
|
21
|
+
<Grid item lg={6} xs={12}>
|
|
22
|
+
<TextInput source="password" fullWidth type="password" />
|
|
23
|
+
</Grid>
|
|
24
|
+
<Grid item lg={12} xs={12}>
|
|
25
|
+
<TextInput source="name" fullWidth />
|
|
26
|
+
</Grid>
|
|
27
|
+
<Grid item lg={12} xs={12}>
|
|
28
|
+
<SelectArrayInput
|
|
29
|
+
source="roles"
|
|
30
|
+
label="ra.user.roles"
|
|
31
|
+
choices={configuredRoles}
|
|
32
|
+
fullWidth
|
|
33
|
+
/>
|
|
34
|
+
</Grid>
|
|
35
|
+
<Grid item lg={12} xs={12}>
|
|
36
|
+
<ImageInput source="image" accept="image/*" multiple={false} fullWidth />
|
|
37
|
+
</Grid>
|
|
38
|
+
</Grid>
|
|
39
|
+
|
|
40
|
+
<BooleanInput source="active" />
|
|
41
|
+
</SimpleForm>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
UserForm.propTypes = {
|
|
46
|
+
configuredRoles: PropTypes.arrayOf(
|
|
47
|
+
PropTypes.shape({ id: PropTypes.string, name: PropTypes.string })
|
|
48
|
+
).isRequired
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default UserForm
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectInput } from '@applica-software-guru/react-admin';
|
|
2
|
+
const YesOrNoSelectInput = (props) => (
|
|
3
|
+
<SelectInput
|
|
4
|
+
{...props}
|
|
5
|
+
display="legend"
|
|
6
|
+
emptyText={'ra.boolean.null'}
|
|
7
|
+
choices={[
|
|
8
|
+
{ id: true, name: 'ra.yes' },
|
|
9
|
+
{ id: false, name: 'ra.no' }
|
|
10
|
+
]}
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
export default YesOrNoSelectInput;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Datagrid,
|
|
3
|
+
DateField,
|
|
4
|
+
List,
|
|
5
|
+
SearchInput,
|
|
6
|
+
TextField,
|
|
7
|
+
useThemeConfig,
|
|
8
|
+
useTranslate
|
|
9
|
+
} from '@applica-software-guru/react-admin'
|
|
10
|
+
|
|
11
|
+
import { Alert } from '@mui/material'
|
|
12
|
+
|
|
13
|
+
const AlertBox = () => {
|
|
14
|
+
const { spacing } = useThemeConfig()
|
|
15
|
+
const translate = useTranslate()
|
|
16
|
+
return (
|
|
17
|
+
<Alert sx={{ p: spacing, m: spacing }} severity="info">
|
|
18
|
+
{translate('resources.entities/device.alert')}
|
|
19
|
+
</Alert>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
const DeviceList = () => (
|
|
23
|
+
<List perPage={25} filters={[<SearchInput source="keyword" alwaysOn />]}>
|
|
24
|
+
<AlertBox />
|
|
25
|
+
<Datagrid rowClick="edit">
|
|
26
|
+
<TextField source="id" />
|
|
27
|
+
<TextField source="code" />
|
|
28
|
+
<DateField source="registrationDate" showTime />
|
|
29
|
+
</Datagrid>
|
|
30
|
+
</List>
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
export default DeviceList
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionsField, BooleanField, Datagrid, List, RecordInput, SearchInput, TextField } from '@applica-software-guru/react-admin';
|
|
2
|
+
|
|
3
|
+
import { YesOrNoSelectInput } from '../ra-inputs';
|
|
4
|
+
|
|
5
|
+
const I18nMessageList = () => (
|
|
6
|
+
<List
|
|
7
|
+
perPage={25}
|
|
8
|
+
filters={[<SearchInput key="q" source="q" alwaysOn />, <YesOrNoSelectInput key="translated" source="translated" alwaysOn />]}
|
|
9
|
+
>
|
|
10
|
+
<Datagrid>
|
|
11
|
+
<TextField source="lang" />
|
|
12
|
+
<TextField source="code" />
|
|
13
|
+
<RecordInput source="text" />
|
|
14
|
+
<BooleanField source="translated" />
|
|
15
|
+
<ActionsField />
|
|
16
|
+
</Datagrid>
|
|
17
|
+
</List>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export default I18nMessageList;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BooleanField,
|
|
3
|
+
BooleanInput,
|
|
4
|
+
CoverField,
|
|
5
|
+
Datagrid,
|
|
6
|
+
DateField,
|
|
7
|
+
EmailField,
|
|
8
|
+
FunctionField,
|
|
9
|
+
ImpersonateUserButton,
|
|
10
|
+
List,
|
|
11
|
+
SearchInput,
|
|
12
|
+
SelectInput,
|
|
13
|
+
SimpleList,
|
|
14
|
+
TextField
|
|
15
|
+
} from '@applica-software-guru/react-admin'
|
|
16
|
+
import { Chip, useMediaQuery } from '@mui/material'
|
|
17
|
+
|
|
18
|
+
import PropTypes from 'prop-types'
|
|
19
|
+
|
|
20
|
+
const sortRoles = (roles, configuredRoles) => {
|
|
21
|
+
return roles
|
|
22
|
+
?.filter((r) => configuredRoles.find((cr) => cr.id === r))
|
|
23
|
+
.sort((a, b) => {
|
|
24
|
+
const aIndex = configuredRoles.findIndex((r) => r.id === a)
|
|
25
|
+
const bIndex = configuredRoles.findIndex((r) => r.id === b)
|
|
26
|
+
|
|
27
|
+
return aIndex - bIndex
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
const UserList = ({ configuredRoles }) => {
|
|
31
|
+
const isSmall = useMediaQuery((theme) => theme.breakpoints.down('sm'))
|
|
32
|
+
return (
|
|
33
|
+
<List
|
|
34
|
+
perPage={25}
|
|
35
|
+
filters={[
|
|
36
|
+
<SearchInput key="keyword" source="keyword" alwaysOn fullWidth />,
|
|
37
|
+
<SelectInput
|
|
38
|
+
key="role"
|
|
39
|
+
source="role"
|
|
40
|
+
choices={configuredRoles}
|
|
41
|
+
alwaysOn
|
|
42
|
+
emptyText="ra.action.view_all"
|
|
43
|
+
display="legend"
|
|
44
|
+
/>,
|
|
45
|
+
<BooleanInput key="active" source="active" display="legend" />
|
|
46
|
+
]}
|
|
47
|
+
>
|
|
48
|
+
{isSmall ? (
|
|
49
|
+
<SimpleList
|
|
50
|
+
leftAvatar={(record) => (
|
|
51
|
+
<CoverField
|
|
52
|
+
source="image"
|
|
53
|
+
circle
|
|
54
|
+
width={50}
|
|
55
|
+
height={50}
|
|
56
|
+
justify="flex-end"
|
|
57
|
+
record={record}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
primaryText={(record) => record.name}
|
|
61
|
+
secondaryText={(record) => record.email}
|
|
62
|
+
/>
|
|
63
|
+
) : (
|
|
64
|
+
<Datagrid rowClick="edit">
|
|
65
|
+
<CoverField source="image" sortable={false} label="" width={50} height={50} circle />
|
|
66
|
+
<BooleanField source="active" />
|
|
67
|
+
<TextField source="name" sortBy="username" />
|
|
68
|
+
<EmailField source="email" />
|
|
69
|
+
<DateField source="registrationDate" showTime />
|
|
70
|
+
<FunctionField
|
|
71
|
+
label="ra.user.roles"
|
|
72
|
+
render={(record) =>
|
|
73
|
+
sortRoles(record?.roles, configuredRoles)?.map((role) => (
|
|
74
|
+
<Chip
|
|
75
|
+
label={configuredRoles.find((r) => r.id === role)?.name}
|
|
76
|
+
key={role}
|
|
77
|
+
sx={{ mr: 1, mt: 1 }}
|
|
78
|
+
color="secondary"
|
|
79
|
+
/>
|
|
80
|
+
))
|
|
81
|
+
}
|
|
82
|
+
/>
|
|
83
|
+
<ImpersonateUserButton />
|
|
84
|
+
</Datagrid>
|
|
85
|
+
)}
|
|
86
|
+
</List>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
UserList.propTypes = {
|
|
91
|
+
configuredRoles: PropTypes.arrayOf(
|
|
92
|
+
PropTypes.shape({ id: PropTypes.string, name: PropTypes.string })
|
|
93
|
+
).isRequired
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export default UserList
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
let environment = 'PRODUCTION';
|
|
2
|
+
let appUrl = `//${document.location.host}/`;
|
|
3
|
+
if (appUrl.endsWith(':3000/')) {
|
|
4
|
+
appUrl = 'http://localhost:8080/';
|
|
5
|
+
environment = 'DEVELOPER';
|
|
6
|
+
}
|
|
7
|
+
export const APP_URL = appUrl;
|
|
8
|
+
export const API_URL = `${APP_URL}api`;
|
|
9
|
+
export const ENVIRONMENT = environment;
|
|
10
|
+
|
|
11
|
+
export const FILE_FIELDS = {
|
|
12
|
+
images: ['image'],
|
|
13
|
+
files: ['file'],
|
|
14
|
+
attachments: ['attachment']
|
|
15
|
+
};
|
|
16
|
+
export const CONFIGURED_ROLES = [
|
|
17
|
+
{ id: 'ROLE_ADMIN', name: 'Admin' },
|
|
18
|
+
{ id: 'ROLE_USER', name: 'User' }
|
|
19
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import App from './App';
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
|
+
import reportWebVitals from './reportWebVitals';
|
|
4
|
+
|
|
5
|
+
const container = document.getElementById('root');
|
|
6
|
+
const root = createRoot(container);
|
|
7
|
+
|
|
8
|
+
root.render(<App />);
|
|
9
|
+
|
|
10
|
+
reportWebVitals();
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DashboardOutlined,
|
|
3
|
+
FlagOutlined,
|
|
4
|
+
NotificationOutlined,
|
|
5
|
+
TableOutlined,
|
|
6
|
+
UserOutlined
|
|
7
|
+
} from '@ant-design/icons'
|
|
8
|
+
|
|
9
|
+
const config = [
|
|
10
|
+
{
|
|
11
|
+
id: 'dashboard',
|
|
12
|
+
title: 'Dashboard',
|
|
13
|
+
type: 'group',
|
|
14
|
+
icon: DashboardOutlined,
|
|
15
|
+
children: [
|
|
16
|
+
{
|
|
17
|
+
id: '/entities/notification',
|
|
18
|
+
title: 'ra.menu.item.notification',
|
|
19
|
+
type: 'item',
|
|
20
|
+
url: '/entities/notification',
|
|
21
|
+
icon: NotificationOutlined
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'custom-pages',
|
|
27
|
+
title: 'ra.menu.custom_pages',
|
|
28
|
+
icon: TableOutlined,
|
|
29
|
+
type: 'group',
|
|
30
|
+
children: [
|
|
31
|
+
{
|
|
32
|
+
id: 'custom-pages/custom-page',
|
|
33
|
+
title: 'ra.menu.item.custom_page',
|
|
34
|
+
type: 'item',
|
|
35
|
+
url: '/custom-page',
|
|
36
|
+
resource: false,
|
|
37
|
+
icon: TableOutlined
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'control-panel',
|
|
43
|
+
title: 'ra.menu.control-panel',
|
|
44
|
+
icon: TableOutlined,
|
|
45
|
+
type: 'group',
|
|
46
|
+
children: [
|
|
47
|
+
{
|
|
48
|
+
id: 'entities/i18n-message',
|
|
49
|
+
title: 'ra.menu.item.entities/i18n-message',
|
|
50
|
+
type: 'item',
|
|
51
|
+
url: '/entities/i18n-message',
|
|
52
|
+
icon: FlagOutlined
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'entities/user',
|
|
56
|
+
title: 'ra.menu.item.entities/user',
|
|
57
|
+
type: 'item',
|
|
58
|
+
url: '/entities/user',
|
|
59
|
+
icon: UserOutlined
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'entities/device',
|
|
63
|
+
title: 'ra.menu.item.entities/device',
|
|
64
|
+
type: 'item',
|
|
65
|
+
url: '/entities/device',
|
|
66
|
+
icon: TableOutlined
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
export default config
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="react-scripts" />
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const reportWebVitals = (onPerfEntry) => {
|
|
2
|
+
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
4
|
+
getCLS(onPerfEntry);
|
|
5
|
+
getFID(onPerfEntry);
|
|
6
|
+
getFCP(onPerfEntry);
|
|
7
|
+
getLCP(onPerfEntry);
|
|
8
|
+
getTTFB(onPerfEntry);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default reportWebVitals;
|