@fluxo-dev/shell 0.0.27 → 0.0.28
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
CHANGED
|
@@ -5,7 +5,7 @@ import { useSelector, Provider } from 'react-redux';
|
|
|
5
5
|
import { useLocation, Navigate, Outlet, useNavigate, Link, useOutlet, Route, useSearchParams, createBrowserRouter, RouterProvider } from 'react-router-dom';
|
|
6
6
|
import { DataCard, useFlxNavigate, NoData, ConfirmModal, ShellPage, ErrorPage as ErrorPage$1, WaitData, FlxRoutes } from '@fluxo-dev/ui-components';
|
|
7
7
|
import { ModuleLoader } from '@fluxo-dev/shell-mfe';
|
|
8
|
-
import { Text, TextInput, ActionIcon, useMantineTheme, AppShell, Stack, Group, Burger, Badge, Drawer, NavLink, Popover, Avatar, Center, Divider, Button, Tabs, Anchor, Tooltip, Space, useMantineColorScheme, UnstyledButton, Box, ThemeIcon, Collapse, ScrollArea, rem, Loader, Grid, PasswordInput, ColorSwatch, FileButton, NumberInput, Alert, ColorInput, Checkbox, Modal, Switch, Select, Chip, LoadingOverlay, Image as Image$1, Menu,
|
|
8
|
+
import { Text, TextInput, ActionIcon, useMantineTheme, AppShell, Stack, Group, Burger, Badge, Drawer, NavLink, Popover, Avatar, Center, Divider, Button, Tabs, Anchor, Tooltip, Space, useMantineColorScheme, UnstyledButton, Box, ThemeIcon, Collapse, ScrollArea, rem, Loader, Grid, PasswordInput, ColorSwatch, FileButton, NumberInput, Alert, ColorInput, Checkbox, Modal, Switch, Select, Chip, LoadingOverlay, Image as Image$1, Menu, Table, MultiSelect, Card, MantineProvider } from '@mantine/core';
|
|
9
9
|
import { openSpotlight, Spotlight } from '@mantine/spotlight';
|
|
10
10
|
import { useOs, useHotkeys, useIdle } from '@mantine/hooks';
|
|
11
11
|
import { AppType, AppState, FluxoStateDispatcher, FluxoClientSys, UserService, AppMenuContextType, ApiKeyService, DomainRoleService, EmailServerProviderType } from '@fluxo-dev/api-client-base';
|
|
@@ -21188,8 +21188,14 @@ function MenuCreateForm(props) {
|
|
|
21188
21188
|
}, [context, role, user, name]);
|
|
21189
21189
|
const onSubmit = () => {
|
|
21190
21190
|
if (saveButtonIsDisabled()) return;
|
|
21191
|
+
let ctx = AppMenuContextType.Default;
|
|
21192
|
+
if (context === '1') {
|
|
21193
|
+
ctx = AppMenuContextType.DomainRole;
|
|
21194
|
+
} else if (context === '2') {
|
|
21195
|
+
ctx = AppMenuContextType.User;
|
|
21196
|
+
}
|
|
21191
21197
|
FluxoClientSys.Instance.configuration.createAppMenu({
|
|
21192
|
-
contextType:
|
|
21198
|
+
contextType: ctx,
|
|
21193
21199
|
name: name,
|
|
21194
21200
|
domainRoleId: context === '1' ? +role : 0,
|
|
21195
21201
|
copyItemsFromWebMenuId: 0,
|
|
@@ -21206,7 +21212,7 @@ function MenuCreateForm(props) {
|
|
|
21206
21212
|
}).catch(err => {
|
|
21207
21213
|
showNotification({
|
|
21208
21214
|
title: 'Errore',
|
|
21209
|
-
message:
|
|
21215
|
+
message: `Si è verificato un errore durante la creazione del menu: ${err.message}`,
|
|
21210
21216
|
color: 'red',
|
|
21211
21217
|
autoClose: 5000
|
|
21212
21218
|
});
|
|
@@ -28124,6 +28130,31 @@ function EmbeddedModuleItem(props) {
|
|
|
28124
28130
|
});
|
|
28125
28131
|
}
|
|
28126
28132
|
|
|
28133
|
+
function EmbeddedBackendModuleItem(props) {
|
|
28134
|
+
React__default.useState(false);
|
|
28135
|
+
return jsx(Group, {
|
|
28136
|
+
justify: 'space-between',
|
|
28137
|
+
style: {
|
|
28138
|
+
border: '1px solid #dedede',
|
|
28139
|
+
padding: 15
|
|
28140
|
+
},
|
|
28141
|
+
children: jsx(Group, {
|
|
28142
|
+
children: jsxs(Stack, {
|
|
28143
|
+
gap: 0,
|
|
28144
|
+
children: [jsxs("span", {
|
|
28145
|
+
children: [props.app.description, " ", jsxs("small", {
|
|
28146
|
+
children: ["(", props.app.version, ")"]
|
|
28147
|
+
})]
|
|
28148
|
+
}), jsxs("small", {
|
|
28149
|
+
children: [props.app.name, " - ", jsx("b", {
|
|
28150
|
+
children: props.app.author
|
|
28151
|
+
})]
|
|
28152
|
+
})]
|
|
28153
|
+
})
|
|
28154
|
+
})
|
|
28155
|
+
});
|
|
28156
|
+
}
|
|
28157
|
+
|
|
28127
28158
|
function AppsList(props) {
|
|
28128
28159
|
const [apps, setApps] = useState([]);
|
|
28129
28160
|
const [showInstallComponent, setShowInstallComponent] = useState(false);
|
|
@@ -28202,7 +28233,7 @@ function AppsList(props) {
|
|
|
28202
28233
|
}, app.id))]
|
|
28203
28234
|
})]
|
|
28204
28235
|
}), jsx(DataCard, {
|
|
28205
|
-
title: 'Apps di sistema',
|
|
28236
|
+
title: 'Apps di sistema (frontend)',
|
|
28206
28237
|
children: jsxs(Stack, {
|
|
28207
28238
|
gap: 16,
|
|
28208
28239
|
children: [embeddedModules.length === 0 && jsx(NoData, {
|
|
@@ -28215,6 +28246,18 @@ function AppsList(props) {
|
|
|
28215
28246
|
}, i))
|
|
28216
28247
|
}) : jsx(Loader, {})]
|
|
28217
28248
|
})
|
|
28249
|
+
}), jsx(DataCard, {
|
|
28250
|
+
title: 'Apps di sistema (server)',
|
|
28251
|
+
children: jsxs(Stack, {
|
|
28252
|
+
gap: 16,
|
|
28253
|
+
children: [apps.length === 0 && jsx(NoData, {
|
|
28254
|
+
message: 'Nessun modulo di sistema trovato'
|
|
28255
|
+
}), !loading ? jsx(Fragment, {
|
|
28256
|
+
children: apps.filter(a => a.type === AppType.Backend).map((app, i) => jsx(EmbeddedBackendModuleItem, {
|
|
28257
|
+
app: app
|
|
28258
|
+
}, i))
|
|
28259
|
+
}) : jsx(Loader, {})]
|
|
28260
|
+
})
|
|
28218
28261
|
}), jsxs(DataCard, {
|
|
28219
28262
|
title: 'Apps JIT (Sviluppo)',
|
|
28220
28263
|
actions: [{
|
|
@@ -28271,52 +28314,6 @@ function AppsList(props) {
|
|
|
28271
28314
|
});
|
|
28272
28315
|
}
|
|
28273
28316
|
|
|
28274
|
-
function UpdatePermission(props) {
|
|
28275
|
-
const [permissionsJson, setPermissionsJson] = React__default.useState('');
|
|
28276
|
-
const updatePermissions = () => {
|
|
28277
|
-
try {
|
|
28278
|
-
const data = JSON.parse(permissionsJson);
|
|
28279
|
-
FluxoClientSys.Instance.security.permission.installPermissions(data).then(() => {
|
|
28280
|
-
showNotification({
|
|
28281
|
-
title: 'Operazione completata',
|
|
28282
|
-
color: 'green',
|
|
28283
|
-
message: `I permessi sono stati aggiornati con successo`
|
|
28284
|
-
});
|
|
28285
|
-
props.onUpdated();
|
|
28286
|
-
}, err => {
|
|
28287
|
-
showNotification({
|
|
28288
|
-
title: 'Operazione fallita',
|
|
28289
|
-
color: 'red',
|
|
28290
|
-
message: `Non è stato possibile aggiornare i permessi: ${err.message}`
|
|
28291
|
-
});
|
|
28292
|
-
});
|
|
28293
|
-
} catch (err) {
|
|
28294
|
-
showNotification({
|
|
28295
|
-
title: 'Operazione fallita',
|
|
28296
|
-
color: 'red',
|
|
28297
|
-
message: `Il file non è valido.`
|
|
28298
|
-
});
|
|
28299
|
-
}
|
|
28300
|
-
};
|
|
28301
|
-
return jsxs(Stack, {
|
|
28302
|
-
children: [jsx(Textarea, {
|
|
28303
|
-
minRows: 20,
|
|
28304
|
-
value: permissionsJson,
|
|
28305
|
-
onChange: v => setPermissionsJson(v.target.value)
|
|
28306
|
-
}), jsxs(Group, {
|
|
28307
|
-
justify: 'right',
|
|
28308
|
-
children: [jsx(Button, {
|
|
28309
|
-
onClick: props.onCanceled,
|
|
28310
|
-
children: "Annulla"
|
|
28311
|
-
}), jsx(Button, {
|
|
28312
|
-
onClick: updatePermissions,
|
|
28313
|
-
disabled: !permissionsJson,
|
|
28314
|
-
children: "Aggiorna"
|
|
28315
|
-
})]
|
|
28316
|
-
})]
|
|
28317
|
-
});
|
|
28318
|
-
}
|
|
28319
|
-
|
|
28320
28317
|
function CreateScopeForm(props) {
|
|
28321
28318
|
const [permissionScopes] = useState(props.permissionScopes);
|
|
28322
28319
|
const [createdScopes, setCreatedScopes] = useState([]);
|
|
@@ -28477,7 +28474,6 @@ function CreateCustomPermissionForm(props) {
|
|
|
28477
28474
|
|
|
28478
28475
|
function PermissionGrid() {
|
|
28479
28476
|
const [permissions, setPermissions] = useState([]);
|
|
28480
|
-
const [updatePermissionModal, setUpdatePermissionModal] = useState(false);
|
|
28481
28477
|
const [permissionScopes, setPermissionScopes] = useState([]);
|
|
28482
28478
|
const [permissionScopesLoaded, setPermissionScopesLoaded] = useState(false);
|
|
28483
28479
|
const [currentScope, setCurrentScope] = useState(null);
|
|
@@ -28562,14 +28558,6 @@ function PermissionGrid() {
|
|
|
28562
28558
|
return jsx(DataCard, {
|
|
28563
28559
|
title: 'Permessi',
|
|
28564
28560
|
actions: [{
|
|
28565
|
-
icon: jsx(IconArrowDown, {
|
|
28566
|
-
size: 18
|
|
28567
|
-
}),
|
|
28568
|
-
label: 'Installa permessi',
|
|
28569
|
-
onClick: () => {
|
|
28570
|
-
setUpdatePermissionModal(true);
|
|
28571
|
-
}
|
|
28572
|
-
}, {
|
|
28573
28561
|
icon: jsx(IconPlus, {
|
|
28574
28562
|
size: 18
|
|
28575
28563
|
}),
|
|
@@ -28745,19 +28733,6 @@ function PermissionGrid() {
|
|
|
28745
28733
|
})
|
|
28746
28734
|
})]
|
|
28747
28735
|
})]
|
|
28748
|
-
}), jsx(Modal, {
|
|
28749
|
-
centered: true,
|
|
28750
|
-
opened: updatePermissionModal,
|
|
28751
|
-
onClose: () => {
|
|
28752
|
-
setUpdatePermissionModal(false);
|
|
28753
|
-
},
|
|
28754
|
-
title: "Aggiorna permessi",
|
|
28755
|
-
children: jsx(UpdatePermission, {
|
|
28756
|
-
onUpdated: () => {
|
|
28757
|
-
setUpdatePermissionModal(false);
|
|
28758
|
-
},
|
|
28759
|
-
onCanceled: () => setUpdatePermissionModal(false)
|
|
28760
|
-
})
|
|
28761
28736
|
}), jsx(Modal, {
|
|
28762
28737
|
centered: true,
|
|
28763
28738
|
opened: createPermissionScopeModalOpened,
|
|
@@ -29751,7 +29726,7 @@ function EmailServerConfiguration() {
|
|
|
29751
29726
|
})]
|
|
29752
29727
|
})]
|
|
29753
29728
|
})
|
|
29754
|
-
}),
|
|
29729
|
+
}), configExists && jsx(DataCard, {
|
|
29755
29730
|
title: "Test invio email",
|
|
29756
29731
|
children: jsxs(Stack, {
|
|
29757
29732
|
children: [jsx(Alert, {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/shell",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@fluxo-dev/shell-hub": "0.0.
|
|
6
|
-
"@fluxo-dev/shell-korebi": "0.0.
|
|
7
|
-
"@fluxo-dev/shell-mfe": "0.0.
|
|
8
|
-
"@fluxo-dev/shell-printing": "0.0.
|
|
9
|
-
"@fluxo-dev/shell-reporting": "0.0.
|
|
10
|
-
"@fluxo-dev/shell-workflow": "0.0.
|
|
5
|
+
"@fluxo-dev/shell-hub": "0.0.28",
|
|
6
|
+
"@fluxo-dev/shell-korebi": "0.0.28",
|
|
7
|
+
"@fluxo-dev/shell-mfe": "0.0.28",
|
|
8
|
+
"@fluxo-dev/shell-printing": "0.0.28",
|
|
9
|
+
"@fluxo-dev/shell-reporting": "0.0.28",
|
|
10
|
+
"@fluxo-dev/shell-workflow": "0.0.28"
|
|
11
11
|
},
|
|
12
12
|
"module": "./index.esm.js",
|
|
13
13
|
"type": "module",
|