@fluxo-dev/shell 25.1.4 → 25.1.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.
Files changed (2) hide show
  1. package/index.esm.js +36 -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,11 @@ function AppBar(props) {
11207
11221
  }), jsx(SearchBar, {
11208
11222
  disabled: props.previewMode !== undefined
11209
11223
  }), jsxs(Popover, {
11224
+ opened: userPopoverOpened,
11210
11225
  disabled: props.previewMode !== undefined,
11211
11226
  children: [jsx(Popover.Target, {
11212
11227
  children: jsxs(Avatar, {
11228
+ onClick: () => setUserPopoverOpened(true),
11213
11229
  tabIndex: -1,
11214
11230
  style: {
11215
11231
  cursor: 'pointer'
@@ -11238,7 +11254,7 @@ function AppBar(props) {
11238
11254
  })
11239
11255
  }), props.shellUi.security.showChangePassword && jsx(Button, {
11240
11256
  variant: 'subtle',
11241
- onClick: () => logout(),
11257
+ onClick: () => goToResetPassword(),
11242
11258
  children: "Cambia password"
11243
11259
  }), jsx(Divider, {}), jsx(Button, {
11244
11260
  variant: 'subtle',
@@ -13725,6 +13741,7 @@ function ChangePassword() {
13725
13741
  const [currentPassword, setCurrentPassword] = useState();
13726
13742
  const [newPassword, setNewPassword] = useState();
13727
13743
  const [confirmNewPassword, setConfirmNewPassword] = useState();
13744
+ const navigate = useNavigate();
13728
13745
  const userService = new UserService();
13729
13746
  const [recoveryResult, setRecoveryResult] = useState();
13730
13747
  const onFormSubmitClickHandler = () => {
@@ -13747,13 +13764,17 @@ function ChangePassword() {
13747
13764
  };
13748
13765
  return jsx(Grid, {
13749
13766
  justify: "center",
13767
+ mt: 32,
13750
13768
  children: jsx(Grid.Col, {
13751
- span: 3,
13769
+ span: 4,
13752
13770
  children: jsxs(Stack, {
13753
13771
  gap: 16,
13754
13772
  children: [(!recoveryResult || !recoveryResult.success) && jsxs(Stack, {
13755
13773
  gap: 16,
13756
- children: [jsx("h2", {
13774
+ children: [jsx(Text, {
13775
+ ta: 'center',
13776
+ size: 'xl',
13777
+ fw: 600,
13757
13778
  children: "Cambio password"
13758
13779
  }), jsx(TextInput, {
13759
13780
  type: 'password',
@@ -13776,8 +13797,18 @@ function ChangePassword() {
13776
13797
  disabled: !(newPassword && newPassword === confirmNewPassword) || currentPassword === newPassword,
13777
13798
  children: "Cambia password"
13778
13799
  })]
13779
- }), recoveryResult && recoveryResult.success && jsx("h2", {
13780
- children: "Password modificata con successo"
13800
+ }), recoveryResult && recoveryResult.success && jsxs(Stack, {
13801
+ children: [jsx(Text, {
13802
+ ta: 'center',
13803
+ size: 'xl',
13804
+ fw: 600,
13805
+ children: "Password modificata con successo"
13806
+ }), jsx(Button, {
13807
+ onClick: () => {
13808
+ navigate('/');
13809
+ },
13810
+ children: "Torna indietro"
13811
+ })]
13781
13812
  })]
13782
13813
  })
13783
13814
  })
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@fluxo-dev/shell",
3
- "version": "25.1.4",
3
+ "version": "25.1.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.1.4",
11
- "@fluxo-dev/shell-bi": "^25.1.4",
12
- "@fluxo-dev/shell-hub": "^25.1.4",
13
- "@fluxo-dev/shell-korebi": "^25.1.4",
14
- "@fluxo-dev/shell-mfe": "^25.1.4",
15
- "@fluxo-dev/shell-printing": "^25.1.4",
16
- "@fluxo-dev/shell-reporting": "^25.1.4",
17
- "@fluxo-dev/shell-workflow": "^25.1.4",
18
- "@fluxo-dev/shell-ravify": "^25.1.4",
19
- "@fluxo-dev/state": "^25.1.4",
20
- "@fluxo-dev/ui-components": "^25.1.4",
10
+ "@fluxo-dev/api-client-base": "^25.1.6",
11
+ "@fluxo-dev/shell-bi": "^25.1.6",
12
+ "@fluxo-dev/shell-hub": "^25.1.6",
13
+ "@fluxo-dev/shell-korebi": "^25.1.6",
14
+ "@fluxo-dev/shell-mfe": "^25.1.6",
15
+ "@fluxo-dev/shell-printing": "^25.1.6",
16
+ "@fluxo-dev/shell-reporting": "^25.1.6",
17
+ "@fluxo-dev/shell-workflow": "^25.1.6",
18
+ "@fluxo-dev/shell-ravify": "^25.1.6",
19
+ "@fluxo-dev/state": "^25.1.6",
20
+ "@fluxo-dev/ui-components": "^25.1.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",