@fluxo-dev/shell 25.1.5 → 25.1.7

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.
Files changed (2) hide show
  1. package/index.esm.js +37 -5
  2. package/package.json +12 -12
package/index.esm.js CHANGED
@@ -11047,6 +11047,7 @@ function AppBar(props) {
11047
11047
  const location = useLocation();
11048
11048
  const [developmentMode, setDevelopmentMode] = React__default.useState(undefined);
11049
11049
  const [lastLocation, setLastLocation] = React__default.useState(undefined);
11050
+ const [userPopoverOpened, setUserPopoverOpened] = React__default.useState(false);
11050
11051
  useHotkeys(props.shellUi.navigation === ShellUINavigation.Sidebar ? [['mod + o', () => {
11051
11052
  if (navbarOpened) FluxoStateDispatcher.dispatchCloseNavbar();else FluxoStateDispatcher.dispatchOpenNavbar();
11052
11053
  }]] : []);
@@ -11080,6 +11081,19 @@ function AppBar(props) {
11080
11081
  const logout = () => {
11081
11082
  FluxoClientSys.Instance.auth.logout();
11082
11083
  };
11084
+ const goToResetPassword = () => {
11085
+ if (props.shellUi.security.showChangePassword) {
11086
+ navigate('/change-password');
11087
+ } else {
11088
+ showNotification({
11089
+ title: 'Funzionalità non disponibile',
11090
+ message: 'La funzionalità di cambio password non è abilitata in questa applicazione.',
11091
+ color: 'red',
11092
+ icon: jsx(IconRefresh, {})
11093
+ });
11094
+ }
11095
+ setUserPopoverOpened(false);
11096
+ };
11083
11097
  const refreshJitApps = app => {
11084
11098
  appJitManager.refreshApp(app).then(result => {
11085
11099
  if (result) {
@@ -11207,9 +11221,12 @@ function AppBar(props) {
11207
11221
  }), jsx(SearchBar, {
11208
11222
  disabled: props.previewMode !== undefined
11209
11223
  }), jsxs(Popover, {
11224
+ onClose: () => setUserPopoverOpened(false),
11225
+ opened: userPopoverOpened,
11210
11226
  disabled: props.previewMode !== undefined,
11211
11227
  children: [jsx(Popover.Target, {
11212
11228
  children: jsxs(Avatar, {
11229
+ onClick: () => setUserPopoverOpened(true),
11213
11230
  tabIndex: -1,
11214
11231
  style: {
11215
11232
  cursor: 'pointer'
@@ -11238,7 +11255,7 @@ function AppBar(props) {
11238
11255
  })
11239
11256
  }), props.shellUi.security.showChangePassword && jsx(Button, {
11240
11257
  variant: 'subtle',
11241
- onClick: () => logout(),
11258
+ onClick: () => goToResetPassword(),
11242
11259
  children: "Cambia password"
11243
11260
  }), jsx(Divider, {}), jsx(Button, {
11244
11261
  variant: 'subtle',
@@ -13725,6 +13742,7 @@ function ChangePassword() {
13725
13742
  const [currentPassword, setCurrentPassword] = useState();
13726
13743
  const [newPassword, setNewPassword] = useState();
13727
13744
  const [confirmNewPassword, setConfirmNewPassword] = useState();
13745
+ const navigate = useNavigate();
13728
13746
  const userService = new UserService();
13729
13747
  const [recoveryResult, setRecoveryResult] = useState();
13730
13748
  const onFormSubmitClickHandler = () => {
@@ -13747,13 +13765,17 @@ function ChangePassword() {
13747
13765
  };
13748
13766
  return jsx(Grid, {
13749
13767
  justify: "center",
13768
+ mt: 32,
13750
13769
  children: jsx(Grid.Col, {
13751
- span: 3,
13770
+ span: 4,
13752
13771
  children: jsxs(Stack, {
13753
13772
  gap: 16,
13754
13773
  children: [(!recoveryResult || !recoveryResult.success) && jsxs(Stack, {
13755
13774
  gap: 16,
13756
- children: [jsx("h2", {
13775
+ children: [jsx(Text, {
13776
+ ta: 'center',
13777
+ size: 'xl',
13778
+ fw: 600,
13757
13779
  children: "Cambio password"
13758
13780
  }), jsx(TextInput, {
13759
13781
  type: 'password',
@@ -13776,8 +13798,18 @@ function ChangePassword() {
13776
13798
  disabled: !(newPassword && newPassword === confirmNewPassword) || currentPassword === newPassword,
13777
13799
  children: "Cambia password"
13778
13800
  })]
13779
- }), recoveryResult && recoveryResult.success && jsx("h2", {
13780
- children: "Password modificata con successo"
13801
+ }), recoveryResult && recoveryResult.success && jsxs(Stack, {
13802
+ children: [jsx(Text, {
13803
+ ta: 'center',
13804
+ size: 'xl',
13805
+ fw: 600,
13806
+ children: "Password modificata con successo"
13807
+ }), jsx(Button, {
13808
+ onClick: () => {
13809
+ navigate('/');
13810
+ },
13811
+ children: "Torna indietro"
13812
+ })]
13781
13813
  })]
13782
13814
  })
13783
13815
  })
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@fluxo-dev/shell",
3
- "version": "25.1.5",
3
+ "version": "25.1.7",
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.1.5",
11
- "@fluxo-dev/shell-bi": "^25.1.5",
12
- "@fluxo-dev/shell-hub": "^25.1.5",
13
- "@fluxo-dev/shell-korebi": "^25.1.5",
14
- "@fluxo-dev/shell-mfe": "^25.1.5",
15
- "@fluxo-dev/shell-printing": "^25.1.5",
16
- "@fluxo-dev/shell-reporting": "^25.1.5",
17
- "@fluxo-dev/shell-workflow": "^25.1.5",
18
- "@fluxo-dev/shell-ravify": "^25.1.5",
19
- "@fluxo-dev/state": "^25.1.5",
20
- "@fluxo-dev/ui-components": "^25.1.5",
10
+ "@fluxo-dev/api-client-base": "^25.1.7",
11
+ "@fluxo-dev/shell-bi": "^25.1.7",
12
+ "@fluxo-dev/shell-hub": "^25.1.7",
13
+ "@fluxo-dev/shell-korebi": "^25.1.7",
14
+ "@fluxo-dev/shell-mfe": "^25.1.7",
15
+ "@fluxo-dev/shell-printing": "^25.1.7",
16
+ "@fluxo-dev/shell-reporting": "^25.1.7",
17
+ "@fluxo-dev/shell-workflow": "^25.1.7",
18
+ "@fluxo-dev/shell-ravify": "^25.1.7",
19
+ "@fluxo-dev/state": "^25.1.7",
20
+ "@fluxo-dev/ui-components": "^25.1.7",
21
21
  "@scalar/api-reference-react": "^0.3.142",
22
22
  "@devexpress/analytics-core": "23.1.3",
23
23
  "devexpress-dashboard": "23.1.3",