@fluxo-dev/shell 25.3.5 → 25.3.6
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/index.esm.js +15 -2
- package/package.json +12 -12
- package/src/lib/app.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -65124,12 +65124,24 @@ function FrontendSwitcher(props) {
|
|
|
65124
65124
|
const [loading, setLoading] = React__default.useState(false);
|
|
65125
65125
|
const navigateTo = useNavigate();
|
|
65126
65126
|
const isMobile = useMediaQuery('(max-width: 992px)');
|
|
65127
|
+
const [sortedAllowedFrontends, setSortedAllowedFrontends] = React__default.useState([]);
|
|
65127
65128
|
useDocumentTitle((_b = (_a = props.ui) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'Aree funzionali');
|
|
65128
65129
|
const [showReturnBackButton, setShowReturnBackButton] = React__default.useState(true);
|
|
65129
65130
|
const [searchParams] = useSearchParams();
|
|
65130
65131
|
useEffect(() => {
|
|
65131
65132
|
setShowReturnBackButton(searchParams.get('returnTo') !== 'false');
|
|
65132
65133
|
}, []);
|
|
65134
|
+
useEffect(() => {
|
|
65135
|
+
// Ordiniamo le aree funzionali in base all'ordine definito nei frontends
|
|
65136
|
+
// la proprietà "order" è presente nello stato "frontends" e definisce l'ordine di visualizzazione. è opzionale, se non è presente si assume un ordine di default (es. 0)
|
|
65137
|
+
const sorted = [...allowedFrontends].sort((a, b) => {
|
|
65138
|
+
var _a, _b, _c, _d;
|
|
65139
|
+
const orderA = (_b = (_a = frontends.find(f => f.id === a)) === null || _a === void 0 ? void 0 : _a.order) !== null && _b !== void 0 ? _b : 0;
|
|
65140
|
+
const orderB = (_d = (_c = frontends.find(f => f.id === b)) === null || _c === void 0 ? void 0 : _c.order) !== null && _d !== void 0 ? _d : 0;
|
|
65141
|
+
return orderA - orderB;
|
|
65142
|
+
});
|
|
65143
|
+
setSortedAllowedFrontends(sorted);
|
|
65144
|
+
}, []);
|
|
65133
65145
|
return jsx(Center, {
|
|
65134
65146
|
h: '100vh',
|
|
65135
65147
|
bg: 'rgb(250, 251, 255)',
|
|
@@ -65154,7 +65166,7 @@ function FrontendSwitcher(props) {
|
|
|
65154
65166
|
wrap: 'wrap',
|
|
65155
65167
|
align: 'center',
|
|
65156
65168
|
justify: 'center',
|
|
65157
|
-
children:
|
|
65169
|
+
children: sortedAllowedFrontends.map(f => {
|
|
65158
65170
|
return jsx(Box, {
|
|
65159
65171
|
className: `${classes['box']} flxFrontendSwitcherBox`,
|
|
65160
65172
|
onClick: () => {
|
|
@@ -76614,7 +76626,8 @@ function FluxoShell(props) {
|
|
|
76614
76626
|
FluxoStateDispatcher.dispatchSetFrontends(props.frontends.map(a => ({
|
|
76615
76627
|
id: a.id,
|
|
76616
76628
|
name: a.name,
|
|
76617
|
-
external: a.external
|
|
76629
|
+
external: a.external,
|
|
76630
|
+
order: a.order
|
|
76618
76631
|
})));
|
|
76619
76632
|
FluxoStateDispatcher.dispatchSetCurrentFrontend(res.currentFrontend);
|
|
76620
76633
|
FluxoStateDispatcher.dispatchAllowedFrontends(res.frontends);
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/shell",
|
|
3
|
-
"version": "25.3.
|
|
3
|
+
"version": "25.3.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^18.3.1",
|
|
6
6
|
"@mantine/core": "^7.12.2",
|
|
7
7
|
"react-router-dom": "^6.11.2",
|
|
8
8
|
"react-redux": "^8.0.5",
|
|
9
9
|
"@reduxjs/toolkit": "^1.9.1",
|
|
10
|
-
"@fluxo-dev/api-client-base": "^25.3.
|
|
11
|
-
"@fluxo-dev/shell-bi": "^25.3.
|
|
12
|
-
"@fluxo-dev/shell-hub": "^25.3.
|
|
13
|
-
"@fluxo-dev/shell-korebi": "^25.3.
|
|
14
|
-
"@fluxo-dev/shell-mfe": "^25.3.
|
|
15
|
-
"@fluxo-dev/shell-printing": "^25.3.
|
|
16
|
-
"@fluxo-dev/shell-reporting": "^25.3.
|
|
17
|
-
"@fluxo-dev/shell-workflow": "^25.3.
|
|
18
|
-
"@fluxo-dev/shell-ravify": "^25.3.
|
|
19
|
-
"@fluxo-dev/state": "^25.3.
|
|
20
|
-
"@fluxo-dev/ui-components": "^25.3.
|
|
10
|
+
"@fluxo-dev/api-client-base": "^25.3.6",
|
|
11
|
+
"@fluxo-dev/shell-bi": "^25.3.6",
|
|
12
|
+
"@fluxo-dev/shell-hub": "^25.3.6",
|
|
13
|
+
"@fluxo-dev/shell-korebi": "^25.3.6",
|
|
14
|
+
"@fluxo-dev/shell-mfe": "^25.3.6",
|
|
15
|
+
"@fluxo-dev/shell-printing": "^25.3.6",
|
|
16
|
+
"@fluxo-dev/shell-reporting": "^25.3.6",
|
|
17
|
+
"@fluxo-dev/shell-workflow": "^25.3.6",
|
|
18
|
+
"@fluxo-dev/shell-ravify": "^25.3.6",
|
|
19
|
+
"@fluxo-dev/state": "^25.3.6",
|
|
20
|
+
"@fluxo-dev/ui-components": "^25.3.6",
|
|
21
21
|
"@scalar/api-reference-react": "^0.3.142",
|
|
22
22
|
"@devexpress/analytics-core": "23.1.3",
|
|
23
23
|
"devexpress-dashboard": "23.1.3",
|
package/src/lib/app.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { FrontendSwitcherUiProps } from './pages/frontend-switcher/frontend-swit
|
|
|
9
9
|
export type ShellFrontend = {
|
|
10
10
|
id: string | 'admin';
|
|
11
11
|
name: string;
|
|
12
|
+
order?: number;
|
|
12
13
|
layout?: React.ReactNode | JSX.Element;
|
|
13
14
|
dashboardComponent: React.ReactNode | React.ReactElement;
|
|
14
15
|
modules: EmbeddedModule[];
|