quidproquo-web-admin 0.0.213 → 0.0.215
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/lib/commonjs/components/AdminDialog.d.ts +25 -0
- package/lib/commonjs/components/AdminDialog.js +39 -0
- package/lib/commonjs/components/DataGrid.d.ts +11 -8
- package/lib/commonjs/components/DataGrid.js +5 -6
- package/lib/commonjs/components/DateCell/DateCell.d.ts +4 -2
- package/lib/commonjs/components/DateCell/DateCell.js +3 -3
- package/lib/commonjs/components/LoadingSpinner/LoadingSpinner.d.ts +8 -0
- package/lib/commonjs/components/LoadingSpinner/LoadingSpinner.js +21 -0
- package/lib/commonjs/components/LoadingSpinner/index.d.ts +1 -0
- package/lib/commonjs/components/LoadingSpinner/index.js +17 -0
- package/lib/commonjs/components/index.d.ts +2 -0
- package/lib/commonjs/components/index.js +2 -0
- package/lib/commonjs/useFederatedAddon.js +1 -1
- package/lib/esm/components/AdminDialog.d.ts +25 -0
- package/lib/esm/components/AdminDialog.js +34 -0
- package/lib/esm/components/DataGrid.d.ts +11 -8
- package/lib/esm/components/DataGrid.js +5 -6
- package/lib/esm/components/DateCell/DateCell.d.ts +4 -2
- package/lib/esm/components/DateCell/DateCell.js +3 -3
- package/lib/esm/components/LoadingSpinner/LoadingSpinner.d.ts +8 -0
- package/lib/esm/components/LoadingSpinner/LoadingSpinner.js +17 -0
- package/lib/esm/components/LoadingSpinner/index.d.ts +1 -0
- package/lib/esm/components/LoadingSpinner/index.js +1 -0
- package/lib/esm/components/index.d.ts +2 -0
- package/lib/esm/components/index.js +2 -0
- package/lib/esm/useFederatedAddon.js +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useAdminDialog: (tabs: string[], defaultTab: string) => {
|
|
3
|
+
open: boolean;
|
|
4
|
+
tabs: string[];
|
|
5
|
+
selectedTab: string;
|
|
6
|
+
openDialog: () => void;
|
|
7
|
+
onSelectTab: (tab: string) => void;
|
|
8
|
+
handleClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
interface AdminDialogProps {
|
|
11
|
+
open: boolean;
|
|
12
|
+
handleClose: () => void;
|
|
13
|
+
title: string;
|
|
14
|
+
tabs: string[];
|
|
15
|
+
selectedTab: string;
|
|
16
|
+
onSelectTab: (tabName: string) => void;
|
|
17
|
+
buttons: {
|
|
18
|
+
text: string;
|
|
19
|
+
onClick: () => Promise<void>;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const AdminDialog: ({ open, handleClose, title, selectedTab, onSelectTab, tabs, buttons, children }: AdminDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminDialog = exports.useAdminDialog = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const useAdminDialog = (tabs, defaultTab) => {
|
|
8
|
+
const [open, setIsOpen] = (0, react_1.useState)(false);
|
|
9
|
+
const [selectedTab, setSelectedTab] = (0, react_1.useState)(defaultTab);
|
|
10
|
+
return {
|
|
11
|
+
open,
|
|
12
|
+
tabs,
|
|
13
|
+
selectedTab,
|
|
14
|
+
openDialog: () => setIsOpen(true),
|
|
15
|
+
onSelectTab: (tab) => {
|
|
16
|
+
setSelectedTab(tab);
|
|
17
|
+
},
|
|
18
|
+
handleClose: () => setIsOpen(false),
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.useAdminDialog = useAdminDialog;
|
|
22
|
+
const AdminDialog = ({ open, handleClose, title, selectedTab, onSelectTab, tabs, buttons, children }) => {
|
|
23
|
+
const selectedTabIndex = tabs.findIndex((t) => t === selectedTab);
|
|
24
|
+
const handleTabChange = (event, newValue) => {
|
|
25
|
+
onSelectTab(tabs[newValue]);
|
|
26
|
+
};
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ open: open, scroll: 'paper', "aria-labelledby": "scroll-dialog-title", "aria-describedby": "scroll-dialog-description", onClose: handleClose, maxWidth: false, fullWidth: true, PaperProps: {
|
|
28
|
+
style: {
|
|
29
|
+
width: '90%',
|
|
30
|
+
height: '90%',
|
|
31
|
+
maxHeight: '90%',
|
|
32
|
+
maxWidth: '90%',
|
|
33
|
+
},
|
|
34
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, Object.assign({ id: "scroll-dialog-title" }, { children: title })), tabs.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.AppBar, Object.assign({ position: "sticky", color: "primary" }, { children: (0, jsx_runtime_1.jsx)(material_1.Tabs, Object.assign({ value: selectedTabIndex, onChange: handleTabChange, textColor: "inherit", indicatorColor: "secondary" }, { children: tabs.map((t) => ((0, jsx_runtime_1.jsx)(material_1.Tab, { label: t }, t))) })) }))), (0, jsx_runtime_1.jsx)(material_1.DialogContent, Object.assign({ dividers: true, sx: {
|
|
35
|
+
minHeight: '150px',
|
|
36
|
+
overflowY: 'scroll',
|
|
37
|
+
} }, { children: children })), buttons.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: buttons.map((b) => ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ disabled: b.disabled, onClick: b.onClick }, { children: b.text }), b.text))) }))] })));
|
|
38
|
+
};
|
|
39
|
+
exports.AdminDialog = AdminDialog;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type DataGridColumDefinitions<T extends object> = {
|
|
3
3
|
headerName: string;
|
|
4
4
|
widthScale?: number;
|
|
5
5
|
sortable?: boolean;
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
6
|
+
renderCell?: (i: T, params?: any) => React.ReactNode;
|
|
7
|
+
} & ({
|
|
8
|
+
field: keyof T;
|
|
9
|
+
} | {
|
|
10
|
+
valueGetter: (i: T, params?: any) => any;
|
|
11
|
+
});
|
|
12
|
+
export interface DataGridProps<T extends object> {
|
|
9
13
|
items: T[];
|
|
10
14
|
columns: DataGridColumDefinitions<T>[];
|
|
11
|
-
onRowClick?: (
|
|
15
|
+
onRowClick?: (row: T) => void;
|
|
12
16
|
}
|
|
13
|
-
export declare const DataGrid: <T>({ items, columns, onRowClick }: DataGridProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
17
|
+
export declare const DataGrid: <T extends object>({ items, columns, onRowClick }: DataGridProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,16 +6,15 @@ const x_data_grid_1 = require("@mui/x-data-grid");
|
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const DataGrid = ({ items, columns, onRowClick }) => {
|
|
8
8
|
const handleRowClick = ({ row }) => {
|
|
9
|
-
()
|
|
10
|
-
onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row);
|
|
11
|
-
};
|
|
9
|
+
onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row);
|
|
12
10
|
};
|
|
13
|
-
const muiColumns = columns.map((col) => ({
|
|
14
|
-
field: col.field,
|
|
11
|
+
const muiColumns = columns.map((col, index) => ({
|
|
15
12
|
headerName: col.headerName,
|
|
16
13
|
flex: col.widthScale,
|
|
17
14
|
sortable: col.sortable !== undefined ? col.sortable : true,
|
|
18
|
-
|
|
15
|
+
field: 'field' in col ? col.field : `_dynamicField${index}`,
|
|
16
|
+
valueGetter: 'valueGetter' in col ? (params) => col.valueGetter(params.row, params) : undefined,
|
|
17
|
+
renderCell: (params) => { var _a; return (_a = col.renderCell) === null || _a === void 0 ? void 0 : _a.call(col, params.row, params); },
|
|
19
18
|
}));
|
|
20
19
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { height: '100%', width: '100%' } }, { children: (0, jsx_runtime_1.jsx)(x_data_grid_1.DataGrid, { rows: items, columns: muiColumns, onRowClick: handleRowClick }) })));
|
|
21
20
|
};
|
|
@@ -7,8 +7,8 @@ exports.DateCell = void 0;
|
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
9
9
|
const LastSeen_1 = __importDefault(require("../LastSeen/LastSeen"));
|
|
10
|
-
const DateCell = (
|
|
11
|
-
|
|
10
|
+
const DateCell = (props) => {
|
|
11
|
+
let date = 'isoDateTime' in props ? new Date(props.isoDateTime) : new Date(props.unixTimestampMs);
|
|
12
12
|
const formattedTime = date.toLocaleTimeString('en-AU', {
|
|
13
13
|
hour: '2-digit',
|
|
14
14
|
minute: '2-digit',
|
|
@@ -18,6 +18,6 @@ const DateCell = ({ isoDateTime }) => {
|
|
|
18
18
|
month: '2-digit',
|
|
19
19
|
year: '2-digit',
|
|
20
20
|
});
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { display: 'flex', flexDirection: 'column' } }, { children: [(0, jsx_runtime_1.jsxs)(Typography_1.default, Object.assign({ variant: "body2", component: "span" }, { children: [formattedDate, " ", formattedTime] })), (0, jsx_runtime_1.jsx)(LastSeen_1.default, { isoTime:
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { display: 'flex', flexDirection: 'column' } }, { children: [(0, jsx_runtime_1.jsxs)(Typography_1.default, Object.assign({ variant: "body2", component: "span" }, { children: [formattedDate, " ", formattedTime] })), (0, jsx_runtime_1.jsx)(LastSeen_1.default, { isoTime: date.toISOString(), timeStyle: "twitter" })] })));
|
|
22
22
|
};
|
|
23
23
|
exports.DateCell = DateCell;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoadingSpinner = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const LoadingSpinner = ({ isLoading, size = 200, children }) => {
|
|
8
|
+
const sx = (0, react_1.useMemo)(() => ({
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
height: `${size}px`,
|
|
13
|
+
width: '100%',
|
|
14
|
+
p: 2,
|
|
15
|
+
}), [size]);
|
|
16
|
+
if (isLoading) {
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: sx }, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: size / 2 }) })));
|
|
18
|
+
}
|
|
19
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
20
|
+
};
|
|
21
|
+
exports.LoadingSpinner = LoadingSpinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoadingSpinner';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./LoadingSpinner"), exports);
|
|
@@ -26,3 +26,5 @@ __exportStar(require("./GridItem"), exports);
|
|
|
26
26
|
__exportStar(require("./TextInput"), exports);
|
|
27
27
|
__exportStar(require("./DataGrid"), exports);
|
|
28
28
|
__exportStar(require("./AutocompleteInput"), exports);
|
|
29
|
+
__exportStar(require("./AdminDialog"), exports);
|
|
30
|
+
__exportStar(require("./LoadingSpinner"), exports);
|
|
@@ -44,7 +44,7 @@ function useFederatedAddon() {
|
|
|
44
44
|
], { force: true });
|
|
45
45
|
// Load the remote
|
|
46
46
|
console.log(`Loading remote: [${manifest.id}]`);
|
|
47
|
-
const remote = yield (0, runtime_1.loadRemote)(`${manifest.id}/
|
|
47
|
+
const remote = yield (0, runtime_1.loadRemote)(`${manifest.id}/shared`, {
|
|
48
48
|
from: 'runtime',
|
|
49
49
|
});
|
|
50
50
|
if (remote && typeof remote === 'object') {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useAdminDialog: (tabs: string[], defaultTab: string) => {
|
|
3
|
+
open: boolean;
|
|
4
|
+
tabs: string[];
|
|
5
|
+
selectedTab: string;
|
|
6
|
+
openDialog: () => void;
|
|
7
|
+
onSelectTab: (tab: string) => void;
|
|
8
|
+
handleClose: () => void;
|
|
9
|
+
};
|
|
10
|
+
interface AdminDialogProps {
|
|
11
|
+
open: boolean;
|
|
12
|
+
handleClose: () => void;
|
|
13
|
+
title: string;
|
|
14
|
+
tabs: string[];
|
|
15
|
+
selectedTab: string;
|
|
16
|
+
onSelectTab: (tabName: string) => void;
|
|
17
|
+
buttons: {
|
|
18
|
+
text: string;
|
|
19
|
+
onClick: () => Promise<void>;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const AdminDialog: ({ open, handleClose, title, selectedTab, onSelectTab, tabs, buttons, children }: AdminDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Tabs, Tab, AppBar } from '@mui/material';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
export const useAdminDialog = (tabs, defaultTab) => {
|
|
5
|
+
const [open, setIsOpen] = useState(false);
|
|
6
|
+
const [selectedTab, setSelectedTab] = useState(defaultTab);
|
|
7
|
+
return {
|
|
8
|
+
open,
|
|
9
|
+
tabs,
|
|
10
|
+
selectedTab,
|
|
11
|
+
openDialog: () => setIsOpen(true),
|
|
12
|
+
onSelectTab: (tab) => {
|
|
13
|
+
setSelectedTab(tab);
|
|
14
|
+
},
|
|
15
|
+
handleClose: () => setIsOpen(false),
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export const AdminDialog = ({ open, handleClose, title, selectedTab, onSelectTab, tabs, buttons, children }) => {
|
|
19
|
+
const selectedTabIndex = tabs.findIndex((t) => t === selectedTab);
|
|
20
|
+
const handleTabChange = (event, newValue) => {
|
|
21
|
+
onSelectTab(tabs[newValue]);
|
|
22
|
+
};
|
|
23
|
+
return (_jsxs(Dialog, { open: open, scroll: 'paper', "aria-labelledby": "scroll-dialog-title", "aria-describedby": "scroll-dialog-description", onClose: handleClose, maxWidth: false, fullWidth: true, PaperProps: {
|
|
24
|
+
style: {
|
|
25
|
+
width: '90%',
|
|
26
|
+
height: '90%',
|
|
27
|
+
maxHeight: '90%',
|
|
28
|
+
maxWidth: '90%',
|
|
29
|
+
},
|
|
30
|
+
}, children: [_jsx(DialogTitle, { id: "scroll-dialog-title", children: title }), tabs.length > 0 && (_jsx(AppBar, { position: "sticky", color: "primary", children: _jsx(Tabs, { value: selectedTabIndex, onChange: handleTabChange, textColor: "inherit", indicatorColor: "secondary", children: tabs.map((t) => (_jsx(Tab, { label: t }, t))) }) })), _jsx(DialogContent, { dividers: true, sx: {
|
|
31
|
+
minHeight: '150px',
|
|
32
|
+
overflowY: 'scroll',
|
|
33
|
+
}, children: children }), buttons.length > 0 && (_jsx(DialogActions, { children: buttons.map((b) => (_jsx(Button, { disabled: b.disabled, onClick: b.onClick, children: b.text }, b.text))) }))] }));
|
|
34
|
+
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type DataGridColumDefinitions<T extends object> = {
|
|
3
3
|
headerName: string;
|
|
4
4
|
widthScale?: number;
|
|
5
5
|
sortable?: boolean;
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
6
|
+
renderCell?: (i: T, params?: any) => React.ReactNode;
|
|
7
|
+
} & ({
|
|
8
|
+
field: keyof T;
|
|
9
|
+
} | {
|
|
10
|
+
valueGetter: (i: T, params?: any) => any;
|
|
11
|
+
});
|
|
12
|
+
export interface DataGridProps<T extends object> {
|
|
9
13
|
items: T[];
|
|
10
14
|
columns: DataGridColumDefinitions<T>[];
|
|
11
|
-
onRowClick?: (
|
|
15
|
+
onRowClick?: (row: T) => void;
|
|
12
16
|
}
|
|
13
|
-
export declare const DataGrid: <T>({ items, columns, onRowClick }: DataGridProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
17
|
+
export declare const DataGrid: <T extends object>({ items, columns, onRowClick }: DataGridProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,16 +3,15 @@ import { DataGrid as MuiDataGrid } from '@mui/x-data-grid';
|
|
|
3
3
|
import { Box } from '@mui/material';
|
|
4
4
|
export const DataGrid = ({ items, columns, onRowClick }) => {
|
|
5
5
|
const handleRowClick = ({ row }) => {
|
|
6
|
-
()
|
|
7
|
-
onRowClick?.(row);
|
|
8
|
-
};
|
|
6
|
+
onRowClick?.(row);
|
|
9
7
|
};
|
|
10
|
-
const muiColumns = columns.map((col) => ({
|
|
11
|
-
field: col.field,
|
|
8
|
+
const muiColumns = columns.map((col, index) => ({
|
|
12
9
|
headerName: col.headerName,
|
|
13
10
|
flex: col.widthScale,
|
|
14
11
|
sortable: col.sortable !== undefined ? col.sortable : true,
|
|
15
|
-
|
|
12
|
+
field: 'field' in col ? col.field : `_dynamicField${index}`,
|
|
13
|
+
valueGetter: 'valueGetter' in col ? (params) => col.valueGetter(params.row, params) : undefined,
|
|
14
|
+
renderCell: (params) => col.renderCell?.(params.row, params),
|
|
16
15
|
}));
|
|
17
16
|
return (_jsx(Box, { sx: { height: '100%', width: '100%' }, children: _jsx(MuiDataGrid, { rows: items, columns: muiColumns, onRowClick: handleRowClick }) }));
|
|
18
17
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Typography from '@mui/material/Typography';
|
|
3
3
|
import LastSeen from '../LastSeen/LastSeen';
|
|
4
|
-
export const DateCell = (
|
|
5
|
-
|
|
4
|
+
export const DateCell = (props) => {
|
|
5
|
+
let date = 'isoDateTime' in props ? new Date(props.isoDateTime) : new Date(props.unixTimestampMs);
|
|
6
6
|
const formattedTime = date.toLocaleTimeString('en-AU', {
|
|
7
7
|
hour: '2-digit',
|
|
8
8
|
minute: '2-digit',
|
|
@@ -12,5 +12,5 @@ export const DateCell = ({ isoDateTime }) => {
|
|
|
12
12
|
month: '2-digit',
|
|
13
13
|
year: '2-digit',
|
|
14
14
|
});
|
|
15
|
-
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsxs(Typography, { variant: "body2", component: "span", children: [formattedDate, " ", formattedTime] }), _jsx(LastSeen, { isoTime:
|
|
15
|
+
return (_jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsxs(Typography, { variant: "body2", component: "span", children: [formattedDate, " ", formattedTime] }), _jsx(LastSeen, { isoTime: date.toISOString(), timeStyle: "twitter" })] }));
|
|
16
16
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { Box, CircularProgress } from '@mui/material';
|
|
4
|
+
export const LoadingSpinner = ({ isLoading, size = 200, children }) => {
|
|
5
|
+
const sx = useMemo(() => ({
|
|
6
|
+
display: 'flex',
|
|
7
|
+
justifyContent: 'center',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
height: `${size}px`,
|
|
10
|
+
width: '100%',
|
|
11
|
+
p: 2,
|
|
12
|
+
}), [size]);
|
|
13
|
+
if (isLoading) {
|
|
14
|
+
return (_jsx(Box, { sx: sx, children: _jsx(CircularProgress, { size: size / 2 }) }));
|
|
15
|
+
}
|
|
16
|
+
return _jsx(_Fragment, { children: children });
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoadingSpinner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoadingSpinner';
|
|
@@ -32,7 +32,7 @@ export function useFederatedAddon() {
|
|
|
32
32
|
], { force: true });
|
|
33
33
|
// Load the remote
|
|
34
34
|
console.log(`Loading remote: [${manifest.id}]`);
|
|
35
|
-
const remote = await loadRemote(`${manifest.id}/
|
|
35
|
+
const remote = await loadRemote(`${manifest.id}/shared`, {
|
|
36
36
|
from: 'runtime',
|
|
37
37
|
});
|
|
38
38
|
if (remote && typeof remote === 'object') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-web-admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.215",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"date-fns": "^2.30.0",
|
|
43
43
|
"dayjs": "^1.11.7",
|
|
44
44
|
"javascript-time-ago": "^2.5.9",
|
|
45
|
-
"quidproquo-core": "0.0.
|
|
46
|
-
"quidproquo-web": "0.0.
|
|
47
|
-
"quidproquo-webserver": "0.0.
|
|
48
|
-
"quidproquo-tsconfig": "0.0.
|
|
49
|
-
"quidproquo-web-react": "0.0.
|
|
45
|
+
"quidproquo-core": "0.0.215",
|
|
46
|
+
"quidproquo-web": "0.0.215",
|
|
47
|
+
"quidproquo-webserver": "0.0.215",
|
|
48
|
+
"quidproquo-tsconfig": "0.0.215",
|
|
49
|
+
"quidproquo-web-react": "0.0.215",
|
|
50
50
|
"react": "18.3.1",
|
|
51
51
|
"react-d3-tree": "^3.6.0",
|
|
52
52
|
"react-dom": "18.3.1",
|