@fluxo-dev/shell 25.3.6 → 25.3.8

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, connect, Provider } from 'react-redux';
5
5
  import { Navigate, Outlet, useNavigate, useLocation, Link, useOutlet, matchPath, Route, useSearchParams, createBrowserRouter, RouterProvider } from 'react-router-dom';
6
6
  import { useFlxNavigate, DataCard, SessionIdContext, TabActiveContext, IconFactory, ShellConfigProvider, useShellLayout, ShellPage, NoData, ConfirmModal, CronGenerator, Datagrid, RichTextEditorInput, ErrorPage as ErrorPage$1, FlxRoutes, WaitData } from '@fluxo-dev/ui-components';
7
7
  import { ModuleLoader } from '@fluxo-dev/shell-mfe';
8
- import { Text, Box, TextInput, ActionIcon, useMantineTheme, AppShell, Stack, Group, Burger, Badge, Drawer, NavLink, Popover, Avatar, Center, Button, Divider, Modal, FocusTrap, Tabs, ScrollArea, ThemeIcon, Tooltip, Anchor, Space, useMantineColorScheme, UnstyledButton, Collapse, Menu, rem, Loader, Overlay, Grid, PasswordInput, Paper, Alert, Title, Card, ColorSwatch, FileButton, NumberInput, ColorInput, Checkbox, Switch, Select, Radio, LoadingOverlay, Chip, Image as Image$1, Table, SegmentedControl, MultiSelect, Code, Portal, useDirection, px as px$1, parseThemeColor, rgba as rgba$1, Breadcrumbs, TagsInput, Textarea, Accordion, useCombobox, Combobox, InputBase, Slider, MantineProvider } from '@mantine/core';
8
+ import { Text, Box, TextInput, Popover, Stack, UnstyledButton, Group, Highlight, ActionIcon, useMantineTheme, AppShell, Burger, Badge, Drawer, NavLink, Avatar, Center, Button, Divider, Modal, FocusTrap, Tabs, ScrollArea, ThemeIcon, Tooltip, Anchor, Space, useMantineColorScheme, Collapse, Menu, rem, Loader, Overlay, Grid, PasswordInput, Paper, Alert, Title, Card, ColorSwatch, FileButton, NumberInput, ColorInput, Checkbox, Switch, Select, Radio, LoadingOverlay, Chip, Image as Image$1, Table, SegmentedControl, MultiSelect, Code, Portal, useDirection, px as px$1, parseThemeColor, rgba as rgba$1, Breadcrumbs, TagsInput, Textarea, Accordion, useCombobox, Combobox, InputBase, Slider, MantineProvider } from '@mantine/core';
9
9
  import { MinimalStateViewer, RavifyProvider, JobsViewer } from '@fluxo-dev/shell-ravify';
10
10
  import { useAppSelector, store as store$4 } from '@fluxo-dev/state';
11
11
  import { useHotkeys, useOs, useMediaQuery, useDocumentTitle, useIdle, useWindowEvent, useResizeObserver, useTimeout, useDisclosure } from '@mantine/hooks';
@@ -10950,6 +10950,152 @@ function ShellSessionProvider(props) {
10950
10950
  });
10951
10951
  }
10952
10952
 
10953
+ // `SameValue` abstract operation
10954
+ // https://tc39.es/ecma262/#sec-samevalue
10955
+ // eslint-disable-next-line es/no-object-is -- safe
10956
+ var sameValue$1 = Object.is || function is(x, y) {
10957
+ // eslint-disable-next-line no-self-compare -- NaN check
10958
+ return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
10959
+ };
10960
+
10961
+ var call$5 = functionCall;
10962
+ var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
10963
+ var anObject$7 = anObject$r;
10964
+ var isNullOrUndefined$1 = isNullOrUndefined$7;
10965
+ var requireObjectCoercible$5 = requireObjectCoercible$c;
10966
+ var sameValue = sameValue$1;
10967
+ var toString$8 = toString$j;
10968
+ var getMethod$1 = getMethod$7;
10969
+ var regExpExec$1 = regexpExecAbstract;
10970
+
10971
+ // @@search logic
10972
+ fixRegExpWellKnownSymbolLogic$1('search', function (SEARCH, nativeSearch, maybeCallNative) {
10973
+ return [
10974
+ // `String.prototype.search` method
10975
+ // https://tc39.es/ecma262/#sec-string.prototype.search
10976
+ function search(regexp) {
10977
+ var O = requireObjectCoercible$5(this);
10978
+ var searcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$1(regexp, SEARCH);
10979
+ return searcher ? call$5(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString$8(O));
10980
+ },
10981
+ // `RegExp.prototype[@@search]` method
10982
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
10983
+ function (string) {
10984
+ var rx = anObject$7(this);
10985
+ var S = toString$8(string);
10986
+ var res = maybeCallNative(nativeSearch, rx, S);
10987
+
10988
+ if (res.done) return res.value;
10989
+
10990
+ var previousLastIndex = rx.lastIndex;
10991
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
10992
+ var result = regExpExec$1(rx, S);
10993
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
10994
+ return result === null ? -1 : result.index;
10995
+ }
10996
+ ];
10997
+ });
10998
+
10999
+ var $$m = _export;
11000
+ var $includes = arrayIncludes.includes;
11001
+ var fails$6 = fails$v;
11002
+ var addToUnscopables$1 = addToUnscopables$3;
11003
+
11004
+ // FF99+ bug
11005
+ var BROKEN_ON_SPARSE = fails$6(function () {
11006
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
11007
+ return !Array(1).includes();
11008
+ });
11009
+
11010
+ // `Array.prototype.includes` method
11011
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
11012
+ $$m({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
11013
+ includes: function includes(el /* , fromIndex = 0 */) {
11014
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
11015
+ }
11016
+ });
11017
+
11018
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
11019
+ addToUnscopables$1('includes');
11020
+
11021
+ var $$l = _export;
11022
+ var uncurryThis$7 = functionUncurryThis;
11023
+ var notARegExp = notARegexp;
11024
+ var requireObjectCoercible$4 = requireObjectCoercible$c;
11025
+ var toString$7 = toString$j;
11026
+ var correctIsRegExpLogic = correctIsRegexpLogic;
11027
+
11028
+ var stringIndexOf = uncurryThis$7(''.indexOf);
11029
+
11030
+ // `String.prototype.includes` method
11031
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
11032
+ $$l({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
11033
+ includes: function includes(searchString /* , position = 0 */) {
11034
+ return !!~stringIndexOf(
11035
+ toString$7(requireObjectCoercible$4(this)),
11036
+ toString$7(notARegExp(searchString)),
11037
+ arguments.length > 1 ? arguments[1] : undefined
11038
+ );
11039
+ }
11040
+ });
11041
+
11042
+ // a string of all valid unicode whitespaces
11043
+ var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
11044
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
11045
+
11046
+ var uncurryThis$6 = functionUncurryThis;
11047
+ var requireObjectCoercible$3 = requireObjectCoercible$c;
11048
+ var toString$6 = toString$j;
11049
+ var whitespaces$2 = whitespaces$3;
11050
+
11051
+ var replace = uncurryThis$6(''.replace);
11052
+ var ltrim = RegExp('^[' + whitespaces$2 + ']+');
11053
+ var rtrim = RegExp('(^|[^' + whitespaces$2 + '])[' + whitespaces$2 + ']+$');
11054
+
11055
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
11056
+ var createMethod$2 = function (TYPE) {
11057
+ return function ($this) {
11058
+ var string = toString$6(requireObjectCoercible$3($this));
11059
+ if (TYPE & 1) string = replace(string, ltrim, '');
11060
+ if (TYPE & 2) string = replace(string, rtrim, '$1');
11061
+ return string;
11062
+ };
11063
+ };
11064
+
11065
+ var stringTrim = {
11066
+ // `String.prototype.trim` method
11067
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
11068
+ trim: createMethod$2(3)
11069
+ };
11070
+
11071
+ var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
11072
+ var fails$5 = fails$v;
11073
+ var whitespaces$1 = whitespaces$3;
11074
+
11075
+ var non = '\u200B\u0085\u180E';
11076
+
11077
+ // check that a method works with the correct list
11078
+ // of whitespaces and has a correct name
11079
+ var stringTrimForced = function (METHOD_NAME) {
11080
+ return fails$5(function () {
11081
+ return !!whitespaces$1[METHOD_NAME]()
11082
+ || non[METHOD_NAME]() !== non
11083
+ || (PROPER_FUNCTION_NAME$1 && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
11084
+ });
11085
+ };
11086
+
11087
+ var $$k = _export;
11088
+ var $trim = stringTrim.trim;
11089
+ var forcedStringTrimMethod = stringTrimForced;
11090
+
11091
+ // `String.prototype.trim` method
11092
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
11093
+ $$k({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
11094
+ trim: function trim() {
11095
+ return $trim(this);
11096
+ }
11097
+ });
11098
+
10953
11099
  /**
10954
11100
  * @license @tabler/icons-react v3.36.0 - MIT
10955
11101
  *
@@ -12138,9 +12284,148 @@ const IconX = createReactComponent("outline", "x", "X", __iconNode$1);
12138
12284
  const __iconNode = [["path", { "d": "M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z", "key": "svg-0" }]];
12139
12285
  const IconCircleFilled = createReactComponent("filled", "circle-filled", "CircleFilled", __iconNode);
12140
12286
 
12287
+ class AppMenuService {
12288
+ getSpotlightMenu(menu, parentPath) {
12289
+ return __awaiter(this, void 0, void 0, function* () {
12290
+ const result = [];
12291
+ const currentGroup = {
12292
+ group: parentPath !== null && parentPath !== void 0 ? parentPath : 'Generale',
12293
+ actions: []
12294
+ };
12295
+ menu.forEach(m => {
12296
+ var _a;
12297
+ if (m.hasIndex) {
12298
+ currentGroup.actions.push({
12299
+ label: m.label,
12300
+ description: parentPath ? `${parentPath} → ${m.label}` : m.label,
12301
+ id: ((_a = m.routerLink) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith('http')) ? m.routerLink : '/' + m.routerLink
12302
+ });
12303
+ }
12304
+ if (m.children && m.children.length > 0) {
12305
+ // Costruisce il percorso completo includendo il livello corrente
12306
+ const childPath = parentPath ? `${parentPath} → ${m.label}` : m.label;
12307
+ this.getSpotlightMenu(m.children, childPath).then(res => {
12308
+ result.push(...res);
12309
+ });
12310
+ }
12311
+ });
12312
+ // Aggiunge il gruppo corrente solo se ha almeno una action
12313
+ if (currentGroup.actions.length > 0) {
12314
+ result.push(currentGroup);
12315
+ }
12316
+ return Promise.resolve(result);
12317
+ });
12318
+ }
12319
+ }
12320
+
12141
12321
  function SearchBar(props) {
12322
+ var _a, _b, _c, _d;
12142
12323
  const currentOs = useOs();
12143
- const rightSection = jsx("div", {
12324
+ const [searchQuery, setSearchQuery] = useState('');
12325
+ const [dropdownOpened, setDropdownOpened] = useState(false);
12326
+ const [selectedIndex, setSelectedIndex] = useState(-1);
12327
+ const navigate = useNavigate();
12328
+ const {
12329
+ appMenu
12330
+ } = useSelector(state => state.layout);
12331
+ const inputRef = useRef(null);
12332
+ const [allGroups, setAllGroups] = useState([]);
12333
+ const searchType = (_b = (_a = props.shellUi.search) === null || _a === void 0 ? void 0 : _a.searchType) !== null && _b !== void 0 ? _b : ShellUISearchType.Spotlight;
12334
+ const searchPosition = (_d = (_c = props.shellUi.search) === null || _c === void 0 ? void 0 : _c.searchPosition) !== null && _d !== void 0 ? _d : ShellUISearchPosition.Left;
12335
+ const isCenterPosition = searchPosition === ShellUISearchPosition.Center;
12336
+ // Dimensioni diverse in base alla posizione
12337
+ const searchWidth = isCenterPosition ? 800 : 280;
12338
+ const searchSize = isCenterPosition ? 'sm' : 'sm';
12339
+ const iconSize = isCenterPosition ? 18 : 18;
12340
+ // Carica le actions dal menu come fa lo Spotlight, mantenendo i gruppi
12341
+ useEffect(() => {
12342
+ const appMenuService = new AppMenuService();
12343
+ if (appMenu) {
12344
+ appMenuService.getSpotlightMenu(appMenu).then(res => {
12345
+ setAllGroups(res);
12346
+ });
12347
+ }
12348
+ }, [appMenu]);
12349
+ // Gestione shortcut Cmd/Ctrl + K
12350
+ useEffect(() => {
12351
+ const handleKeyDown = event => {
12352
+ var _a;
12353
+ if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
12354
+ event.preventDefault();
12355
+ event.stopPropagation();
12356
+ event.stopImmediatePropagation();
12357
+ if (props.disabled) return;
12358
+ if (searchType === ShellUISearchType.Spotlight) {
12359
+ // Apre spotlight
12360
+ openSpotlight();
12361
+ } else {
12362
+ // Mette focus sull'input per il dropdown
12363
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
12364
+ setDropdownOpened(true);
12365
+ }
12366
+ }
12367
+ };
12368
+ // Usa capture: true per intercettare l'evento prima dello spotlight
12369
+ window.addEventListener('keydown', handleKeyDown, {
12370
+ capture: true
12371
+ });
12372
+ return () => window.removeEventListener('keydown', handleKeyDown, {
12373
+ capture: true
12374
+ });
12375
+ }, [searchType, props.disabled]);
12376
+ // Filtra i risultati in base alla query, mantenendo la struttura a gruppi
12377
+ const filteredGroups = searchQuery.trim() ? allGroups.map(group => Object.assign(Object.assign({}, group), {
12378
+ actions: group.actions.filter(action => {
12379
+ var _a, _b;
12380
+ return ((_a = action.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchQuery.toLowerCase())) || ((_b = action.description) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchQuery.toLowerCase()));
12381
+ })
12382
+ })).filter(group => group.actions.length > 0) // Rimuove gruppi senza risultati
12383
+ : allGroups.slice(0, 5); // Mostra i primi 5 gruppi quando non c'è query
12384
+ // Appiattisce tutti i risultati in un array per la navigazione
12385
+ const flatResults = [];
12386
+ filteredGroups.forEach(group => {
12387
+ flatResults.push(...group.actions);
12388
+ });
12389
+ // Gestione navigazione da tastiera
12390
+ const handleKeyDown = e => {
12391
+ var _a;
12392
+ if (e.key === 'ArrowDown') {
12393
+ e.preventDefault();
12394
+ setSelectedIndex(prev => prev < flatResults.length - 1 ? prev + 1 : prev);
12395
+ } else if (e.key === 'ArrowUp') {
12396
+ e.preventDefault();
12397
+ setSelectedIndex(prev => prev > 0 ? prev - 1 : -1);
12398
+ } else if (e.key === 'Enter') {
12399
+ e.preventDefault();
12400
+ if (selectedIndex >= 0 && flatResults[selectedIndex]) {
12401
+ handleSelectAction(flatResults[selectedIndex]);
12402
+ }
12403
+ } else if (e.key === 'Escape') {
12404
+ e.preventDefault();
12405
+ setSearchQuery('');
12406
+ setSelectedIndex(-1);
12407
+ setDropdownOpened(false);
12408
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
12409
+ }
12410
+ };
12411
+ // Reset selected index quando cambia la query
12412
+ useEffect(() => {
12413
+ setSelectedIndex(-1);
12414
+ }, [searchQuery]);
12415
+ const handleSelectAction = action => {
12416
+ if (action.id.toLowerCase().startsWith('http')) {
12417
+ window.open(action.id, '_blank');
12418
+ } else {
12419
+ navigate(action.id, {
12420
+ state: {
12421
+ title: action.label
12422
+ }
12423
+ });
12424
+ }
12425
+ setDropdownOpened(false);
12426
+ setSearchQuery('');
12427
+ };
12428
+ const rightSection = !isCenterPosition ? jsx("div", {
12144
12429
  style: {
12145
12430
  display: 'flex',
12146
12431
  alignItems: 'center'
@@ -12165,29 +12450,212 @@ function SearchBar(props) {
12165
12450
  children: "+"
12166
12451
  }), "K"]
12167
12452
  })
12168
- });
12453
+ }) : null;
12454
+ // Spotlight Type (originale)
12455
+ if (searchType === ShellUISearchType.Spotlight) {
12456
+ return jsx(Box, {
12457
+ visibleFrom: 'sm',
12458
+ children: jsx(TextInput, {
12459
+ disabled: props.disabled,
12460
+ size: searchSize,
12461
+ placeholder: isCenterPosition ? "Cerca funzionalità, moduli..." : "Cerca...",
12462
+ onClick: () => props.disabled ? undefined : openSpotlight(),
12463
+ leftSection: jsx(IconSearch, {
12464
+ size: iconSize
12465
+ }),
12466
+ rightSectionWidth: isCenterPosition ? 0 : 90,
12467
+ w: searchWidth,
12468
+ rightSection: rightSection,
12469
+ styles: {
12470
+ input: {
12471
+ cursor: 'pointer',
12472
+ borderRadius: isCenterPosition ? 8 : 4,
12473
+ backgroundColor: isCenterPosition ? 'rgba(255, 255, 255, 0.95)' : undefined,
12474
+ border: isCenterPosition ? '1px solid rgba(255, 255, 255, 0.2)' : undefined,
12475
+ boxShadow: isCenterPosition ? '0 1px 3px rgba(0, 0, 0, 0.1)' : undefined,
12476
+ paddingLeft: isCenterPosition ? 44 : undefined,
12477
+ paddingRight: isCenterPosition ? 16 : undefined,
12478
+ opacity: isCenterPosition ? 0.8 : undefined,
12479
+ '&:hover': isCenterPosition ? {
12480
+ opacity: 0.9
12481
+ } : undefined,
12482
+ '&:focus': isCenterPosition ? {
12483
+ boxShadow: '0 1px 4px rgba(0, 0, 0, 0.15)',
12484
+ borderColor: 'rgba(255, 255, 255, 0.3)',
12485
+ opacity: 1
12486
+ } : undefined
12487
+ },
12488
+ section: {
12489
+ pointerEvents: 'none'
12490
+ }
12491
+ }
12492
+ })
12493
+ });
12494
+ }
12495
+ // Dropdown Type (nuovo)
12169
12496
  return jsx(Box, {
12170
12497
  visibleFrom: 'sm',
12171
- children: jsx(TextInput, {
12172
- disabled: props.disabled,
12173
- size: 'xs',
12174
- placeholder: "Cerca...",
12175
- onClick: () => props.disabled ? undefined : openSpotlight(),
12176
- leftSection: jsx(IconSearch, {
12177
- size: 16
12178
- }),
12179
- rightSectionWidth: 90,
12180
- width: 150,
12181
- rightSection: rightSection,
12182
- styles: {
12183
- input: {
12184
- cursor: 'pointer',
12185
- borderRadius: 4
12498
+ children: jsxs(Popover, {
12499
+ opened: dropdownOpened,
12500
+ onChange: setDropdownOpened,
12501
+ width: "target",
12502
+ position: "bottom-start",
12503
+ shadow: "md",
12504
+ offset: 8,
12505
+ withinPortal: true,
12506
+ children: [jsx(Popover.Target, {
12507
+ children: jsx(TextInput, {
12508
+ ref: inputRef,
12509
+ disabled: props.disabled,
12510
+ size: searchSize,
12511
+ placeholder: isCenterPosition ? "Cerca funzionalità, moduli..." : "Cerca...",
12512
+ value: searchQuery,
12513
+ onChange: e => {
12514
+ setSearchQuery(e.currentTarget.value);
12515
+ setDropdownOpened(true);
12516
+ },
12517
+ onFocus: () => setDropdownOpened(true),
12518
+ onKeyDown: handleKeyDown,
12519
+ leftSection: jsx(IconSearch, {
12520
+ size: iconSize
12521
+ }),
12522
+ rightSectionWidth: isCenterPosition ? 0 : 90,
12523
+ w: searchWidth,
12524
+ rightSection: rightSection,
12525
+ styles: {
12526
+ input: {
12527
+ borderRadius: isCenterPosition ? 8 : 4,
12528
+ backgroundColor: isCenterPosition ? 'rgba(255, 255, 255, 0.95)' : undefined,
12529
+ border: isCenterPosition ? '1px solid rgba(255, 255, 255, 0.2)' : undefined,
12530
+ boxShadow: isCenterPosition ? '0 1px 3px rgba(0, 0, 0, 0.1)' : undefined,
12531
+ paddingLeft: isCenterPosition ? 44 : undefined,
12532
+ paddingRight: isCenterPosition ? 16 : undefined,
12533
+ opacity: isCenterPosition ? 0.8 : undefined,
12534
+ '&:hover': isCenterPosition ? {
12535
+ opacity: 0.9
12536
+ } : undefined,
12537
+ '&:focus': isCenterPosition ? {
12538
+ boxShadow: '0 1px 4px rgba(0, 0, 0, 0.15)',
12539
+ borderColor: 'rgba(255, 255, 255, 0.3)',
12540
+ opacity: 1
12541
+ } : undefined
12542
+ },
12543
+ section: {
12544
+ pointerEvents: 'none'
12545
+ }
12546
+ }
12547
+ })
12548
+ }), jsx(Popover.Dropdown, {
12549
+ p: 0,
12550
+ style: {
12551
+ borderRadius: isCenterPosition ? 8 : 6,
12552
+ border: '1px solid #e9ecef',
12553
+ overflow: 'hidden',
12554
+ maxHeight: '400px',
12555
+ overflowY: 'auto'
12186
12556
  },
12187
- section: {
12188
- pointerEvents: 'none'
12189
- }
12190
- }
12557
+ children: jsx(Stack, {
12558
+ gap: 0,
12559
+ children: filteredGroups.length > 0 ? (() => {
12560
+ let globalIndex = 0;
12561
+ const items = [];
12562
+ filteredGroups.forEach((group, groupIndex) => {
12563
+ // Aggiungi intestazione gruppo
12564
+ items.push(jsx(Box, {
12565
+ px: isCenterPosition ? 18 : 14,
12566
+ py: 8,
12567
+ style: {
12568
+ backgroundColor: '#f8f9fa',
12569
+ borderBottom: '1px solid #e9ecef'
12570
+ },
12571
+ children: jsx(Text, {
12572
+ size: "xs",
12573
+ fw: 600,
12574
+ c: "dimmed",
12575
+ tt: "uppercase",
12576
+ style: {
12577
+ letterSpacing: '0.5px'
12578
+ },
12579
+ children: group.group
12580
+ })
12581
+ }, `header-${groupIndex}`));
12582
+ // Aggiungi tutti gli item del gruppo in sequenza verticale
12583
+ group.actions.forEach((action, actionIndex) => {
12584
+ const currentIndex = globalIndex++;
12585
+ const isSelected = currentIndex === selectedIndex;
12586
+ items.push(jsx(UnstyledButton, {
12587
+ onClick: () => handleSelectAction(action),
12588
+ px: isCenterPosition ? 18 : 14,
12589
+ py: isCenterPosition ? 12 : 10,
12590
+ style: {
12591
+ borderBottom: '1px solid #f1f3f5',
12592
+ cursor: 'pointer',
12593
+ backgroundColor: isSelected ? '#e7f5ff' : 'transparent'
12594
+ },
12595
+ onMouseEnter: e => {
12596
+ if (!isSelected) {
12597
+ e.currentTarget.style.backgroundColor = '#fafafa';
12598
+ }
12599
+ },
12600
+ onMouseLeave: e => {
12601
+ if (!isSelected) {
12602
+ e.currentTarget.style.backgroundColor = 'transparent';
12603
+ }
12604
+ },
12605
+ children: jsxs(Group, {
12606
+ justify: "space-between",
12607
+ wrap: "nowrap",
12608
+ gap: "md",
12609
+ children: [jsxs(Stack, {
12610
+ gap: 4,
12611
+ style: {
12612
+ flex: 1,
12613
+ minWidth: 0
12614
+ },
12615
+ children: [jsx(Highlight, {
12616
+ highlight: searchQuery,
12617
+ fw: 500,
12618
+ size: isCenterPosition ? 'sm' : 'sm',
12619
+ style: {
12620
+ color: '#212529',
12621
+ lineHeight: 1.5
12622
+ },
12623
+ children: action.label || ''
12624
+ }), action.description && jsx(Text, {
12625
+ size: "xs",
12626
+ c: "dimmed",
12627
+ lineClamp: 1,
12628
+ style: {
12629
+ lineHeight: 1.4,
12630
+ overflow: 'hidden',
12631
+ textOverflow: 'ellipsis'
12632
+ },
12633
+ children: action.description
12634
+ })]
12635
+ }), action.id.toLowerCase().startsWith('http') && jsx(IconExternalLink, {
12636
+ size: 14,
12637
+ style: {
12638
+ opacity: 0.3,
12639
+ flexShrink: 0,
12640
+ color: '#adb5bd'
12641
+ }
12642
+ })]
12643
+ })
12644
+ }, `item-${groupIndex}-${actionIndex}`));
12645
+ });
12646
+ });
12647
+ return items;
12648
+ })() : jsx(Box, {
12649
+ p: 24,
12650
+ children: jsx(Text, {
12651
+ size: "sm",
12652
+ c: "dimmed",
12653
+ ta: "center",
12654
+ children: "Nessun risultato trovato"
12655
+ })
12656
+ })
12657
+ })
12658
+ })]
12191
12659
  })
12192
12660
  });
12193
12661
  }
@@ -12279,7 +12747,7 @@ function FrontendSwitch(props) {
12279
12747
  }
12280
12748
 
12281
12749
  function AppBar(props) {
12282
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
12750
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
12283
12751
  const {
12284
12752
  userInfo
12285
12753
  } = useSelector(state => state.user);
@@ -12376,7 +12844,7 @@ function AppBar(props) {
12376
12844
  backgroundColor: (_b = (_a = props.previewMode) === null || _a === void 0 ? void 0 : _a.headerColor) !== null && _b !== void 0 ? _b : fluxoTheme.colors['brand'][7]
12377
12845
  },
12378
12846
  children: [jsxs(Group, {
12379
- children: [(props.shellUi.navigation === ShellUINavigation.Sidebar || isMobile) && jsx(Burger, {
12847
+ children: [(props.shellUi.navigation === ShellUINavigation.Sidebar || props.shellUi.navigation === ShellUINavigation.SidebarMinimal || isMobile) && jsx(Burger, {
12380
12848
  tabIndex: -1,
12381
12849
  disabled: props.previewMode !== undefined,
12382
12850
  color: '#fff',
@@ -12398,6 +12866,16 @@ function AppBar(props) {
12398
12866
  }
12399
12867
  })
12400
12868
  })]
12869
+ }), ((_j = (_h = props.shellUi.search) === null || _h === void 0 ? void 0 : _h.searchPosition) !== null && _j !== void 0 ? _j : ShellUISearchPosition.Left) === ShellUISearchPosition.Center && jsx(Box, {
12870
+ style: {
12871
+ position: 'absolute',
12872
+ left: '50%',
12873
+ transform: 'translateX(-50%)'
12874
+ },
12875
+ children: jsx(SearchBar, {
12876
+ disabled: props.previewMode !== undefined,
12877
+ shellUi: props.shellUi
12878
+ })
12401
12879
  }), jsxs(Group, {
12402
12880
  wrap: "nowrap",
12403
12881
  children: [developmentMode && jsx(Badge, {
@@ -12462,8 +12940,9 @@ function AppBar(props) {
12462
12940
  })
12463
12941
  })
12464
12942
  })]
12465
- }), jsx(SearchBar, {
12466
- disabled: props.previewMode !== undefined
12943
+ }), (((_l = (_k = props.shellUi.search) === null || _k === void 0 ? void 0 : _k.searchPosition) !== null && _l !== void 0 ? _l : ShellUISearchPosition.Left) === ShellUISearchPosition.Left || ((_o = (_m = props.shellUi.search) === null || _m === void 0 ? void 0 : _m.searchPosition) !== null && _o !== void 0 ? _o : ShellUISearchPosition.Left) === ShellUISearchPosition.Right) && jsx(SearchBar, {
12944
+ disabled: props.previewMode !== undefined,
12945
+ shellUi: props.shellUi
12467
12946
  }), jsxs(Popover, {
12468
12947
  onDismiss: () => setUserPopoverOpened(false),
12469
12948
  opened: userPopoverOpened,
@@ -12478,7 +12957,7 @@ function AppBar(props) {
12478
12957
  color: "cyan",
12479
12958
  radius: "xl",
12480
12959
  size: 32,
12481
- children: [(_h = userInfo === null || userInfo === void 0 ? void 0 : userInfo.FirstName) === null || _h === void 0 ? void 0 : _h.substr(0, 1), (_j = userInfo === null || userInfo === void 0 ? void 0 : userInfo.LastName) === null || _j === void 0 ? void 0 : _j.substr(0, 1)]
12960
+ children: [(_p = userInfo === null || userInfo === void 0 ? void 0 : userInfo.FirstName) === null || _p === void 0 ? void 0 : _p.substr(0, 1), (_q = userInfo === null || userInfo === void 0 ? void 0 : userInfo.LastName) === null || _q === void 0 ? void 0 : _q.substr(0, 1)]
12482
12961
  })
12483
12962
  }), jsx(Popover.Dropdown, {
12484
12963
  w: 300,
@@ -12492,7 +12971,7 @@ function AppBar(props) {
12492
12971
  color: "cyan",
12493
12972
  radius: "xl",
12494
12973
  size: 64,
12495
- children: [(_k = userInfo === null || userInfo === void 0 ? void 0 : userInfo.FirstName) === null || _k === void 0 ? void 0 : _k.substr(0, 1), (_l = userInfo === null || userInfo === void 0 ? void 0 : userInfo.LastName) === null || _l === void 0 ? void 0 : _l.substr(0, 1)]
12974
+ children: [(_r = userInfo === null || userInfo === void 0 ? void 0 : userInfo.FirstName) === null || _r === void 0 ? void 0 : _r.substr(0, 1), (_s = userInfo === null || userInfo === void 0 ? void 0 : userInfo.LastName) === null || _s === void 0 ? void 0 : _s.substr(0, 1)]
12496
12975
  }), jsxs(Text, {
12497
12976
  children: [userInfo === null || userInfo === void 0 ? void 0 : userInfo.FirstName, " ", userInfo === null || userInfo === void 0 ? void 0 : userInfo.LastName]
12498
12977
  })]
@@ -12523,52 +13002,6 @@ function AppBar(props) {
12523
13002
  });
12524
13003
  }
12525
13004
 
12526
- // `SameValue` abstract operation
12527
- // https://tc39.es/ecma262/#sec-samevalue
12528
- // eslint-disable-next-line es/no-object-is -- safe
12529
- var sameValue$1 = Object.is || function is(x, y) {
12530
- // eslint-disable-next-line no-self-compare -- NaN check
12531
- return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
12532
- };
12533
-
12534
- var call$5 = functionCall;
12535
- var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
12536
- var anObject$7 = anObject$r;
12537
- var isNullOrUndefined$1 = isNullOrUndefined$7;
12538
- var requireObjectCoercible$5 = requireObjectCoercible$c;
12539
- var sameValue = sameValue$1;
12540
- var toString$8 = toString$j;
12541
- var getMethod$1 = getMethod$7;
12542
- var regExpExec$1 = regexpExecAbstract;
12543
-
12544
- // @@search logic
12545
- fixRegExpWellKnownSymbolLogic$1('search', function (SEARCH, nativeSearch, maybeCallNative) {
12546
- return [
12547
- // `String.prototype.search` method
12548
- // https://tc39.es/ecma262/#sec-string.prototype.search
12549
- function search(regexp) {
12550
- var O = requireObjectCoercible$5(this);
12551
- var searcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$1(regexp, SEARCH);
12552
- return searcher ? call$5(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString$8(O));
12553
- },
12554
- // `RegExp.prototype[@@search]` method
12555
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
12556
- function (string) {
12557
- var rx = anObject$7(this);
12558
- var S = toString$8(string);
12559
- var res = maybeCallNative(nativeSearch, rx, S);
12560
-
12561
- if (res.done) return res.value;
12562
-
12563
- var previousLastIndex = rx.lastIndex;
12564
- if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
12565
- var result = regExpExec$1(rx, S);
12566
- if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
12567
- return result === null ? -1 : result.index;
12568
- }
12569
- ];
12570
- });
12571
-
12572
13005
  const useDocumentTitleManager = (withMultipleSessions, sessionContext) => {
12573
13006
  const [documentTitle, setDocumentTitle] = useState('');
12574
13007
  const location = useLocation();
@@ -12646,7 +13079,7 @@ const useDocumentTitleManager = (withMultipleSessions, sessionContext) => {
12646
13079
  };
12647
13080
  };
12648
13081
 
12649
- var uncurryThis$7 = functionUncurryThis;
13082
+ var uncurryThis$5 = functionUncurryThis;
12650
13083
 
12651
13084
  // eslint-disable-next-line es/no-set -- safe
12652
13085
  var SetPrototype$1 = Set.prototype;
@@ -12654,9 +13087,9 @@ var SetPrototype$1 = Set.prototype;
12654
13087
  var setHelpers = {
12655
13088
  // eslint-disable-next-line es/no-set -- safe
12656
13089
  Set: Set,
12657
- add: uncurryThis$7(SetPrototype$1.add),
12658
- has: uncurryThis$7(SetPrototype$1.has),
12659
- remove: uncurryThis$7(SetPrototype$1['delete']),
13090
+ add: uncurryThis$5(SetPrototype$1.add),
13091
+ has: uncurryThis$5(SetPrototype$1.has),
13092
+ remove: uncurryThis$5(SetPrototype$1['delete']),
12660
13093
  proto: SetPrototype$1
12661
13094
  };
12662
13095
 
@@ -12680,14 +13113,14 @@ var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
12680
13113
  }
12681
13114
  };
12682
13115
 
12683
- var uncurryThis$6 = functionUncurryThis;
13116
+ var uncurryThis$4 = functionUncurryThis;
12684
13117
  var iterateSimple$6 = iterateSimple$7;
12685
13118
  var SetHelpers$5 = setHelpers;
12686
13119
 
12687
13120
  var Set$3 = SetHelpers$5.Set;
12688
13121
  var SetPrototype = SetHelpers$5.proto;
12689
- var forEach = uncurryThis$6(SetPrototype.forEach);
12690
- var keys = uncurryThis$6(SetPrototype.keys);
13122
+ var forEach = uncurryThis$4(SetPrototype.forEach);
13123
+ var keys = uncurryThis$4(SetPrototype.keys);
12691
13124
  var next = keys(new Set$3()).next;
12692
13125
 
12693
13126
  var setIterate = function (set, fn, interruptible) {
@@ -12816,13 +13249,13 @@ var setMethodAcceptSetLike$7 = function (name) {
12816
13249
  }
12817
13250
  };
12818
13251
 
12819
- var $$m = _export;
13252
+ var $$j = _export;
12820
13253
  var difference = setDifference;
12821
13254
  var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
12822
13255
 
12823
13256
  // `Set.prototype.difference` method
12824
13257
  // https://github.com/tc39/proposal-set-methods
12825
- $$m({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
13258
+ $$j({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
12826
13259
  difference: difference
12827
13260
  });
12828
13261
 
@@ -12857,19 +13290,19 @@ var setIntersection = function intersection(other) {
12857
13290
  return result;
12858
13291
  };
12859
13292
 
12860
- var $$l = _export;
12861
- var fails$6 = fails$v;
13293
+ var $$i = _export;
13294
+ var fails$4 = fails$v;
12862
13295
  var intersection$1 = setIntersection;
12863
13296
  var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
12864
13297
 
12865
- var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails$6(function () {
13298
+ var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails$4(function () {
12866
13299
  // eslint-disable-next-line es/no-array-from, es/no-set -- testing
12867
13300
  return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
12868
13301
  });
12869
13302
 
12870
13303
  // `Set.prototype.intersection` method
12871
13304
  // https://github.com/tc39/proposal-set-methods
12872
- $$l({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
13305
+ $$i({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
12873
13306
  intersection: intersection$1
12874
13307
  });
12875
13308
 
@@ -12895,13 +13328,13 @@ var setIsDisjointFrom = function isDisjointFrom(other) {
12895
13328
  }) !== false;
12896
13329
  };
12897
13330
 
12898
- var $$k = _export;
13331
+ var $$h = _export;
12899
13332
  var isDisjointFrom = setIsDisjointFrom;
12900
13333
  var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
12901
13334
 
12902
13335
  // `Set.prototype.isDisjointFrom` method
12903
13336
  // https://github.com/tc39/proposal-set-methods
12904
- $$k({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
13337
+ $$h({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
12905
13338
  isDisjointFrom: isDisjointFrom
12906
13339
  });
12907
13340
 
@@ -12921,13 +13354,13 @@ var setIsSubsetOf = function isSubsetOf(other) {
12921
13354
  }, true) !== false;
12922
13355
  };
12923
13356
 
12924
- var $$j = _export;
13357
+ var $$g = _export;
12925
13358
  var isSubsetOf = setIsSubsetOf;
12926
13359
  var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
12927
13360
 
12928
13361
  // `Set.prototype.isSubsetOf` method
12929
13362
  // https://github.com/tc39/proposal-set-methods
12930
- $$j({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
13363
+ $$g({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
12931
13364
  isSubsetOf: isSubsetOf
12932
13365
  });
12933
13366
 
@@ -12950,13 +13383,13 @@ var setIsSupersetOf = function isSupersetOf(other) {
12950
13383
  }) !== false;
12951
13384
  };
12952
13385
 
12953
- var $$i = _export;
13386
+ var $$f = _export;
12954
13387
  var isSupersetOf = setIsSupersetOf;
12955
13388
  var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
12956
13389
 
12957
13390
  // `Set.prototype.isSupersetOf` method
12958
13391
  // https://github.com/tc39/proposal-set-methods
12959
- $$i({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
13392
+ $$f({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
12960
13393
  isSupersetOf: isSupersetOf
12961
13394
  });
12962
13395
 
@@ -12983,13 +13416,13 @@ var setSymmetricDifference = function symmetricDifference(other) {
12983
13416
  return result;
12984
13417
  };
12985
13418
 
12986
- var $$h = _export;
13419
+ var $$e = _export;
12987
13420
  var symmetricDifference = setSymmetricDifference;
12988
13421
  var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
12989
13422
 
12990
13423
  // `Set.prototype.symmetricDifference` method
12991
13424
  // https://github.com/tc39/proposal-set-methods
12992
- $$h({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
13425
+ $$e({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
12993
13426
  symmetricDifference: symmetricDifference
12994
13427
  });
12995
13428
 
@@ -13011,13 +13444,13 @@ var setUnion = function union(other) {
13011
13444
  return result;
13012
13445
  };
13013
13446
 
13014
- var $$g = _export;
13447
+ var $$d = _export;
13015
13448
  var union$1 = setUnion;
13016
13449
  var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
13017
13450
 
13018
13451
  // `Set.prototype.union` method
13019
13452
  // https://github.com/tc39/proposal-set-methods
13020
- $$g({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
13453
+ $$d({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
13021
13454
  union: union$1
13022
13455
  });
13023
13456
 
@@ -13465,12 +13898,24 @@ function AppContent(props) {
13465
13898
  children: [jsx(Box, {
13466
13899
  style: {
13467
13900
  position: 'fixed',
13468
- top: props.shellUi.navigation === ShellUINavigation.Sidebar || isMobile ? 48 : 88,
13901
+ top: props.shellUi.navigation === ShellUINavigation.Sidebar || props.shellUi.navigation === ShellUINavigation.SidebarMinimal || isMobile ? 48 : 88,
13469
13902
  zIndex: 99,
13470
13903
  background: '#ffffff',
13471
13904
  borderBottom: '1px solid #e1e5e9',
13472
13905
  boxShadow: '0 1px 3px rgba(0, 0, 0, 0.05)',
13473
- width: navbarOpened && !isMobile ? 'calc(100% - 248px)' : '100%'
13906
+ width: (() => {
13907
+ if (isMobile) return '100%';
13908
+ // Sidebar minimale: sempre 80px
13909
+ if (props.shellUi.navigation === ShellUINavigation.SidebarMinimal) {
13910
+ return navbarOpened ? 'calc(100% - 248px)' : 'calc(100% - 80px)';
13911
+ }
13912
+ // Sidebar normale: 248px se aperta, 100% se chiusa
13913
+ if (props.shellUi.navigation === ShellUINavigation.Sidebar) {
13914
+ return navbarOpened ? 'calc(100% - 248px)' : '100%';
13915
+ }
13916
+ // Topbar o None: 100%
13917
+ return '100%';
13918
+ })()
13474
13919
  },
13475
13920
  children: jsxs("div", {
13476
13921
  style: {
@@ -14490,6 +14935,20 @@ function FooterBar(props) {
14490
14935
  }), jsx(Divider, {
14491
14936
  orientation: 'vertical'
14492
14937
  })]
14938
+ }), props.brandElement && jsxs(Fragment, {
14939
+ children: [jsx(Box, {
14940
+ visibleFrom: 'sm',
14941
+ style: {
14942
+ display: 'flex',
14943
+ alignItems: 'center',
14944
+ maxHeight: '32px',
14945
+ overflow: 'hidden'
14946
+ },
14947
+ children: props.brandElement
14948
+ }), jsx(Divider, {
14949
+ visibleFrom: 'sm',
14950
+ orientation: 'vertical'
14951
+ })]
14493
14952
  }), jsxs(Text, {
14494
14953
  visibleFrom: 'sm',
14495
14954
  c: "dimmed",
@@ -14516,11 +14975,11 @@ var deletePropertyOrThrow$2 = function (O, P) {
14516
14975
  if (!delete O[P]) throw new $TypeError$2('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
14517
14976
  };
14518
14977
 
14519
- var fails$5 = fails$v;
14978
+ var fails$3 = fails$v;
14520
14979
 
14521
14980
  var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
14522
14981
  var method = [][METHOD_NAME];
14523
- return !!method && fails$5(function () {
14982
+ return !!method && fails$3(function () {
14524
14983
  // eslint-disable-next-line no-useless-call -- required for testing
14525
14984
  method.call(null, argument || function () { return 1; }, 1);
14526
14985
  });
@@ -14542,14 +15001,14 @@ var webkit = userAgent$1.match(/AppleWebKit\/(\d+)\./);
14542
15001
 
14543
15002
  var engineWebkitVersion = !!webkit && +webkit[1];
14544
15003
 
14545
- var $$f = _export;
14546
- var uncurryThis$5 = functionUncurryThis;
15004
+ var $$c = _export;
15005
+ var uncurryThis$3 = functionUncurryThis;
14547
15006
  var aCallable$4 = aCallable$i;
14548
15007
  var toObject$3 = toObject$a;
14549
15008
  var lengthOfArrayLike$4 = lengthOfArrayLike$9;
14550
15009
  var deletePropertyOrThrow$1 = deletePropertyOrThrow$2;
14551
- var toString$7 = toString$j;
14552
- var fails$4 = fails$v;
15010
+ var toString$5 = toString$j;
15011
+ var fails$2 = fails$v;
14553
15012
  var internalSort = arraySort$1;
14554
15013
  var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
14555
15014
  var FF = engineFfVersion;
@@ -14558,21 +15017,21 @@ var V8 = engineV8Version;
14558
15017
  var WEBKIT = engineWebkitVersion;
14559
15018
 
14560
15019
  var test$2 = [];
14561
- var nativeSort = uncurryThis$5(test$2.sort);
14562
- var push = uncurryThis$5(test$2.push);
15020
+ var nativeSort = uncurryThis$3(test$2.sort);
15021
+ var push = uncurryThis$3(test$2.push);
14563
15022
 
14564
15023
  // IE8-
14565
- var FAILS_ON_UNDEFINED = fails$4(function () {
15024
+ var FAILS_ON_UNDEFINED = fails$2(function () {
14566
15025
  test$2.sort(undefined);
14567
15026
  });
14568
15027
  // V8 bug
14569
- var FAILS_ON_NULL = fails$4(function () {
15028
+ var FAILS_ON_NULL = fails$2(function () {
14570
15029
  test$2.sort(null);
14571
15030
  });
14572
15031
  // Old WebKit
14573
15032
  var STRICT_METHOD = arrayMethodIsStrict$1('sort');
14574
15033
 
14575
- var STABLE_SORT = !fails$4(function () {
15034
+ var STABLE_SORT = !fails$2(function () {
14576
15035
  // feature detection can be too slow, so check engines versions
14577
15036
  if (V8) return V8 < 70;
14578
15037
  if (FF && FF > 3) return;
@@ -14614,13 +15073,13 @@ var getSortCompare = function (comparefn) {
14614
15073
  if (y === undefined) return -1;
14615
15074
  if (x === undefined) return 1;
14616
15075
  if (comparefn !== undefined) return +comparefn(x, y) || 0;
14617
- return toString$7(x) > toString$7(y) ? 1 : -1;
15076
+ return toString$5(x) > toString$5(y) ? 1 : -1;
14618
15077
  };
14619
15078
  };
14620
15079
 
14621
15080
  // `Array.prototype.sort` method
14622
15081
  // https://tc39.es/ecma262/#sec-array.prototype.sort
14623
- $$f({ target: 'Array', proto: true, forced: FORCED$4 }, {
15082
+ $$c({ target: 'Array', proto: true, forced: FORCED$4 }, {
14624
15083
  sort: function sort(comparefn) {
14625
15084
  if (comparefn !== undefined) aCallable$4(comparefn);
14626
15085
 
@@ -14648,7 +15107,7 @@ $$f({ target: 'Array', proto: true, forced: FORCED$4 }, {
14648
15107
  }
14649
15108
  });
14650
15109
 
14651
- var $$e = _export;
15110
+ var $$b = _export;
14652
15111
  var toObject$2 = toObject$a;
14653
15112
  var lengthOfArrayLike$3 = lengthOfArrayLike$9;
14654
15113
  var setArrayLength = arraySetLength;
@@ -14672,7 +15131,7 @@ var FORCED$3 = INCORRECT_RESULT || !properErrorOnNonWritableLength();
14672
15131
 
14673
15132
  // `Array.prototype.unshift` method
14674
15133
  // https://tc39.es/ecma262/#sec-array.prototype.unshift
14675
- $$e({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
15134
+ $$b({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
14676
15135
  // eslint-disable-next-line no-unused-vars -- required for `.length`
14677
15136
  unshift: function unshift(item) {
14678
15137
  var O = toObject$2(this);
@@ -14706,20 +15165,20 @@ var regexpGetFlags = function (R) {
14706
15165
  ? call$2(regExpFlags, R) : flags;
14707
15166
  };
14708
15167
 
14709
- var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
15168
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
14710
15169
  var defineBuiltIn = defineBuiltIn$d;
14711
15170
  var anObject$5 = anObject$r;
14712
15171
  var $toString = toString$j;
14713
- var fails$3 = fails$v;
15172
+ var fails$1 = fails$v;
14714
15173
  var getRegExpFlags = regexpGetFlags;
14715
15174
 
14716
15175
  var TO_STRING = 'toString';
14717
15176
  var RegExpPrototype = RegExp.prototype;
14718
15177
  var nativeToString = RegExpPrototype[TO_STRING];
14719
15178
 
14720
- var NOT_GENERIC = fails$3(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
15179
+ var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
14721
15180
  // FF44- RegExp#toString has a wrong name
14722
- var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name !== TO_STRING;
15181
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
14723
15182
 
14724
15183
  // `RegExp.prototype.toString` method
14725
15184
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
@@ -14737,8 +15196,8 @@ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
14737
15196
  var anObject$4 = anObject$r;
14738
15197
  var isNullOrUndefined = isNullOrUndefined$7;
14739
15198
  var toLength$1 = toLength$5;
14740
- var toString$6 = toString$j;
14741
- var requireObjectCoercible$4 = requireObjectCoercible$c;
15199
+ var toString$4 = toString$j;
15200
+ var requireObjectCoercible$2 = requireObjectCoercible$c;
14742
15201
  var getMethod = getMethod$7;
14743
15202
  var advanceStringIndex = advanceStringIndex$2;
14744
15203
  var regExpExec = regexpExecAbstract;
@@ -14749,15 +15208,15 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
14749
15208
  // `String.prototype.match` method
14750
15209
  // https://tc39.es/ecma262/#sec-string.prototype.match
14751
15210
  function match(regexp) {
14752
- var O = requireObjectCoercible$4(this);
15211
+ var O = requireObjectCoercible$2(this);
14753
15212
  var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
14754
- return matcher ? call$1(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$6(O));
15213
+ return matcher ? call$1(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$4(O));
14755
15214
  },
14756
15215
  // `RegExp.prototype[@@match]` method
14757
15216
  // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
14758
15217
  function (string) {
14759
15218
  var rx = anObject$4(this);
14760
- var S = toString$6(string);
15219
+ var S = toString$4(string);
14761
15220
  var res = maybeCallNative(nativeMatch, rx, S);
14762
15221
 
14763
15222
  if (res.done) return res.value;
@@ -14770,7 +15229,7 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
14770
15229
  var n = 0;
14771
15230
  var result;
14772
15231
  while ((result = regExpExec(rx, S)) !== null) {
14773
- var matchStr = toString$6(result[0]);
15232
+ var matchStr = toString$4(result[0]);
14774
15233
  A[n] = matchStr;
14775
15234
  if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$1(rx.lastIndex), fullUnicode);
14776
15235
  n++;
@@ -14780,7 +15239,7 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
14780
15239
  ];
14781
15240
  });
14782
15241
 
14783
- var $$d = _export;
15242
+ var $$a = _export;
14784
15243
  var iterate$2 = iterate$9;
14785
15244
  var aCallable$3 = aCallable$i;
14786
15245
  var anObject$3 = anObject$r;
@@ -14788,7 +15247,7 @@ var getIteratorDirect$2 = getIteratorDirect$8;
14788
15247
 
14789
15248
  // `Iterator.prototype.some` method
14790
15249
  // https://github.com/tc39/proposal-iterator-helpers
14791
- $$d({ target: 'Iterator', proto: true, real: true }, {
15250
+ $$a({ target: 'Iterator', proto: true, real: true }, {
14792
15251
  some: function some(predicate) {
14793
15252
  anObject$3(this);
14794
15253
  aCallable$3(predicate);
@@ -14808,7 +15267,8 @@ function NavBarItem({
14808
15267
  routerLink,
14809
15268
  initiallyOpened,
14810
15269
  links,
14811
- level
15270
+ level,
15271
+ isMinimal
14812
15272
  }) {
14813
15273
  const hasLinks = Array.isArray(links);
14814
15274
  const [opened, setOpened] = useState(initiallyOpened || false);
@@ -14876,7 +15336,8 @@ function NavBarItem({
14876
15336
  links: link.children,
14877
15337
  routerLink: link.routerLink,
14878
15338
  initiallyOpened: false,
14879
- level: level + 1
15339
+ level: level + 1,
15340
+ isMinimal: isMinimal
14880
15341
  }, link.label + '_' + i);
14881
15342
  }
14882
15343
  if ((_a = link.routerLink) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith('http')) {
@@ -14926,6 +15387,81 @@ function NavBarItem({
14926
15387
  return false;
14927
15388
  };
14928
15389
  const isItemActive = isCurrentOrChildActive();
15390
+ // Funzione ricorsiva per renderizzare i menu items multi-livello in modalità minimale
15391
+ const renderMinimalMenuItems = menuLinks => {
15392
+ return menuLinks.map((link, i) => {
15393
+ var _a;
15394
+ if (link.hasPermissions && !FluxoClientSys.Instance.security.currentUser.hasPermissions(link.permissions)) {
15395
+ return null;
15396
+ }
15397
+ const linkIsActive = isActive(link.routerLink);
15398
+ // Se il link ha figli, crea un submenu
15399
+ if (link.children && link.children.length > 0) {
15400
+ return jsx(Menu.Item, {
15401
+ style: {
15402
+ backgroundColor: linkIsActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][9] : theme.colors[theme.primaryColor][0] : undefined,
15403
+ color: linkIsActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : undefined
15404
+ },
15405
+ children: jsxs(Menu, {
15406
+ trigger: "hover",
15407
+ position: "right-start",
15408
+ offset: 2,
15409
+ withinPortal: true,
15410
+ children: [jsx(Menu.Target, {
15411
+ children: jsx(Box, {
15412
+ style: {
15413
+ width: '100%',
15414
+ cursor: 'pointer'
15415
+ },
15416
+ children: jsxs(Group, {
15417
+ justify: "space-between",
15418
+ children: [jsx(Text, {
15419
+ children: link.label
15420
+ }), jsx(IconChevronRight, {
15421
+ size: 14
15422
+ })]
15423
+ })
15424
+ })
15425
+ }), jsx(Menu.Dropdown, {
15426
+ children: renderMinimalMenuItems(link.children)
15427
+ })]
15428
+ })
15429
+ }, link.label + '_' + i);
15430
+ }
15431
+ // Link semplice senza figli
15432
+ if ((_a = link.routerLink) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith('http')) {
15433
+ // Link esterno
15434
+ return jsx(Menu.Item, {
15435
+ component: "a",
15436
+ href: link.routerLink,
15437
+ target: "_blank",
15438
+ rel: "noopener noreferrer",
15439
+ style: {
15440
+ backgroundColor: linkIsActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][9] : theme.colors[theme.primaryColor][0] : undefined,
15441
+ color: linkIsActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : undefined
15442
+ },
15443
+ children: link.label
15444
+ }, link.label + '_' + i);
15445
+ } else {
15446
+ // Link interno
15447
+ return jsx(Menu.Item, {
15448
+ component: Link,
15449
+ to: '/' + link.routerLink,
15450
+ state: {
15451
+ title: link.label
15452
+ },
15453
+ onClick: () => {
15454
+ if (isMobile) FluxoStateDispatcher.dispatchCloseNavbar();
15455
+ },
15456
+ style: {
15457
+ backgroundColor: linkIsActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][9] : theme.colors[theme.primaryColor][0] : undefined,
15458
+ color: linkIsActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : undefined
15459
+ },
15460
+ children: link.label
15461
+ }, link.label + '_' + i);
15462
+ }
15463
+ }).filter(item => item !== null);
15464
+ };
14929
15465
  return jsx(Fragment, {
14930
15466
  children: navbarOpened ? jsxs(Fragment, {
14931
15467
  children: [jsx(UnstyledButton, {
@@ -14986,20 +15522,105 @@ function NavBarItem({
14986
15522
  style: {
14987
15523
  width: '100%',
14988
15524
  marginBottom: 8,
14989
- marginTop: 8
15525
+ marginTop: 8,
15526
+ display: opened ? 'block' : 'none'
14990
15527
  },
14991
15528
  in: opened,
14992
15529
  children: items
14993
15530
  }) : null]
14994
- }) : jsx(Fragment, {})
15531
+ }) : jsx(Fragment, {
15532
+ children: isMinimal && level === 0 ? hasLinks ? jsxs(Menu, {
15533
+ trigger: "hover",
15534
+ openDelay: 100,
15535
+ closeDelay: 200,
15536
+ position: "right-start",
15537
+ offset: 10,
15538
+ withinPortal: true,
15539
+ children: [jsx(Menu.Target, {
15540
+ children: jsx(UnstyledButton, {
15541
+ mt: 2,
15542
+ mb: 2,
15543
+ className: `${style$1["control"]} ${isItemActive ? style$1["controlActive"] : ""}`,
15544
+ style: {
15545
+ width: 64,
15546
+ height: 48,
15547
+ padding: 0,
15548
+ display: 'flex',
15549
+ justifyContent: 'center',
15550
+ alignItems: 'center',
15551
+ backgroundColor: isItemActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][9] : theme.colors[theme.primaryColor][0] : 'transparent',
15552
+ color: isItemActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : colorScheme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.colors.gray[9]
15553
+ },
15554
+ children: jsx(ThemeIcon, {
15555
+ variant: "light",
15556
+ style: {
15557
+ background: 'transparent',
15558
+ color: isItemActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : 'inherit'
15559
+ },
15560
+ size: 30,
15561
+ children: Icon
15562
+ })
15563
+ })
15564
+ }), jsxs(Menu.Dropdown, {
15565
+ children: [jsx(Menu.Label, {
15566
+ children: label
15567
+ }), renderMinimalMenuItems(links || [])]
15568
+ })]
15569
+ }) : jsx(Tooltip, {
15570
+ label: label,
15571
+ position: "right",
15572
+ offset: 10,
15573
+ children: jsx(UnstyledButton, {
15574
+ mt: 2,
15575
+ mb: 2,
15576
+ onClick: () => {
15577
+ var _a;
15578
+ if (routerLink === null || routerLink === void 0 ? void 0 : routerLink.toLowerCase().startsWith('http')) (_a = window.open(routerLink, '_blank')) === null || _a === void 0 ? void 0 : _a.focus();else {
15579
+ if (routerLink === '/') navigate('/', {
15580
+ state: {
15581
+ title: 'Home'
15582
+ }
15583
+ });else navigate('/' + routerLink, {
15584
+ state: {
15585
+ title: label
15586
+ }
15587
+ });
15588
+ }
15589
+ if (isMobile) FluxoStateDispatcher.dispatchCloseNavbar();
15590
+ },
15591
+ className: `${style$1["control"]} ${isItemActive ? style$1["controlActive"] : ""}`,
15592
+ style: {
15593
+ width: 64,
15594
+ height: 48,
15595
+ padding: 0,
15596
+ display: 'flex',
15597
+ justifyContent: 'center',
15598
+ alignItems: 'center',
15599
+ backgroundColor: isItemActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][9] : theme.colors[theme.primaryColor][0] : 'transparent',
15600
+ color: isItemActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : colorScheme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.colors.gray[9]
15601
+ },
15602
+ children: jsx(ThemeIcon, {
15603
+ variant: "light",
15604
+ style: {
15605
+ background: 'transparent',
15606
+ color: isItemActive ? colorScheme.colorScheme === 'dark' ? theme.colors[theme.primaryColor][4] : theme.colors[theme.primaryColor][6] : 'inherit'
15607
+ },
15608
+ size: 30,
15609
+ children: Icon
15610
+ })
15611
+ })
15612
+ }) : null
15613
+ })
14995
15614
  });
14996
15615
  }
14997
15616
 
14998
15617
  function Navbar(props) {
14999
15618
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
15000
15619
  const {
15001
- appMenu
15620
+ appMenu,
15621
+ navbarOpened
15002
15622
  } = useSelector(state => state.layout);
15623
+ const fluxoTheme = useMantineTheme();
15003
15624
  const getPermittedNavBarItems = () => {
15004
15625
  const permittedNavBarItems = appMenu === null || appMenu === void 0 ? void 0 : appMenu.filter(a => {
15005
15626
  var _a;
@@ -15018,30 +15639,63 @@ function Navbar(props) {
15018
15639
  return permittedNavBarItems;
15019
15640
  };
15020
15641
  const isMobile = useMediaQuery('(max-width: 992px)');
15642
+ const isMinimalSidebar = props.shellUi.navigation === ShellUINavigation.SidebarMinimal;
15643
+ const showSidebar = props.shellUi.navigation === ShellUINavigation.Sidebar || props.shellUi.navigation === ShellUINavigation.SidebarMinimal || isMobile;
15021
15644
  return jsxs(Fragment, {
15022
- children: [(props.shellUi.navigation === ShellUINavigation.Sidebar || isMobile) && jsx(AppShell.Navbar, {
15023
- id: 'fluxo-shell-sidebar',
15024
- zIndex: 197,
15025
- children: jsx(AppShell.Section, {
15026
- grow: true,
15027
- my: "md",
15028
- component: ScrollArea,
15029
- children: jsx(Stack, {
15030
- justify: "center",
15031
- align: 'center',
15032
- gap: 0,
15033
- children: getPermittedNavBarItems().map((e, i) => {
15034
- const IconComponent = e.icon ? IconFactory.getIcon(e.icon) : IconFactory.getIcon('Dashboard');
15035
- return jsx(NavBarItem, {
15036
- level: 0,
15037
- routerLink: e.routerLink,
15038
- icon: IconComponent,
15039
- label: e.label,
15040
- links: e.children && e.children.length > 0 ? e.children : undefined
15041
- }, i);
15645
+ children: [showSidebar && jsxs(Fragment, {
15646
+ children: [(props.shellUi.navigation === ShellUINavigation.Sidebar || props.shellUi.navigation === ShellUINavigation.SidebarMinimal) && navbarOpened && jsx("div", {
15647
+ style: {
15648
+ position: 'fixed',
15649
+ top: 0,
15650
+ left: 0,
15651
+ width: 248,
15652
+ height: 'calc(100vh - 40px)',
15653
+ background: fluxoTheme.colors['brand'][7],
15654
+ zIndex: 196,
15655
+ pointerEvents: 'none'
15656
+ }
15657
+ }), props.shellUi.navigation === ShellUINavigation.SidebarMinimal && !navbarOpened && !isMobile && jsx("div", {
15658
+ style: {
15659
+ position: 'fixed',
15660
+ top: 0,
15661
+ left: 0,
15662
+ width: 80,
15663
+ height: 'calc(100vh - 40px)',
15664
+ background: fluxoTheme.colors['brand'][7],
15665
+ zIndex: 196,
15666
+ pointerEvents: 'none'
15667
+ }
15668
+ }), jsx(AppShell.Navbar, {
15669
+ id: 'fluxo-shell-sidebar',
15670
+ zIndex: 197,
15671
+ style: props.shellUi.navigation === ShellUINavigation.Sidebar || props.shellUi.navigation === ShellUINavigation.SidebarMinimal ? {
15672
+ borderTopLeftRadius: '20px',
15673
+ overflow: 'visible'
15674
+ } : undefined,
15675
+ children: jsx(AppShell.Section, {
15676
+ grow: true,
15677
+ my: "md",
15678
+ mt: 26,
15679
+ component: ScrollArea,
15680
+ className: isMinimalSidebar && !navbarOpened ? 'custom-scrollbar' : undefined,
15681
+ children: jsx(Stack, {
15682
+ justify: "center",
15683
+ align: 'center',
15684
+ gap: 0,
15685
+ children: getPermittedNavBarItems().map((e, i) => {
15686
+ const IconComponent = e.icon ? IconFactory.getIcon(e.icon) : IconFactory.getIcon('Dashboard');
15687
+ return jsx(NavBarItem, {
15688
+ level: 0,
15689
+ routerLink: e.routerLink,
15690
+ icon: IconComponent,
15691
+ label: e.label,
15692
+ links: e.children && e.children.length > 0 ? e.children : undefined,
15693
+ isMinimal: isMinimalSidebar && !navbarOpened
15694
+ }, i);
15695
+ })
15042
15696
  })
15043
15697
  })
15044
- })
15698
+ })]
15045
15699
  }), props.shellUi.navigation === ShellUINavigation.Topbar && !isMobile && jsx(AppShell.Header, {
15046
15700
  id: 'fluxo-shell-topmenu',
15047
15701
  style: {
@@ -15430,37 +16084,7 @@ function HorizontalRecursiveMenuItem(props) {
15430
16084
  });
15431
16085
  }
15432
16086
 
15433
- class AppMenuService {
15434
- getSpotlightMenu(menu, parentTitle) {
15435
- return __awaiter(this, void 0, void 0, function* () {
15436
- const result = [];
15437
- const currentGroup = {
15438
- group: parentTitle !== null && parentTitle !== void 0 ? parentTitle : 'Generale',
15439
- actions: []
15440
- };
15441
- menu.forEach(m => {
15442
- var _a;
15443
- if (m.hasIndex) {
15444
- currentGroup.actions.push({
15445
- label: m.label,
15446
- description: parentTitle ? `${parentTitle} -> ${m.label}` : m.label,
15447
- id: ((_a = m.routerLink) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith('http')) ? m.routerLink : '/' + m.routerLink
15448
- });
15449
- }
15450
- if (m.children && m.children.length > 0) {
15451
- this.getSpotlightMenu(m.children, m.label).then(res => {
15452
- const aaa = res;
15453
- result.push(...aaa);
15454
- });
15455
- }
15456
- });
15457
- result.push(currentGroup);
15458
- return Promise.resolve(result);
15459
- });
15460
- }
15461
- }
15462
-
15463
- var $$c = _export;
16087
+ var $$9 = _export;
15464
16088
  var iterate$1 = iterate$9;
15465
16089
  var aCallable$2 = aCallable$i;
15466
16090
  var anObject$2 = anObject$r;
@@ -15468,7 +16092,7 @@ var getIteratorDirect$1 = getIteratorDirect$8;
15468
16092
 
15469
16093
  // `Iterator.prototype.every` method
15470
16094
  // https://github.com/tc39/proposal-iterator-helpers
15471
- $$c({ target: 'Iterator', proto: true, real: true }, {
16095
+ $$9({ target: 'Iterator', proto: true, real: true }, {
15472
16096
  every: function every(predicate) {
15473
16097
  anObject$2(this);
15474
16098
  aCallable$2(predicate);
@@ -16540,18 +17164,18 @@ const styles$6 = {
16540
17164
  }
16541
17165
  };
16542
17166
 
16543
- var $$b = _export;
16544
- var uncurryThis$4 = functionUncurryThis;
17167
+ var $$8 = _export;
17168
+ var uncurryThis$2 = functionUncurryThis;
16545
17169
  var isArray$2 = isArray$5;
16546
17170
 
16547
- var nativeReverse = uncurryThis$4([].reverse);
17171
+ var nativeReverse = uncurryThis$2([].reverse);
16548
17172
  var test$1 = [1, 2];
16549
17173
 
16550
17174
  // `Array.prototype.reverse` method
16551
17175
  // https://tc39.es/ecma262/#sec-array.prototype.reverse
16552
17176
  // fix for Safari 12.0 bug
16553
17177
  // https://bugs.webkit.org/show_bug.cgi?id=188794
16554
- $$b({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.reverse()) }, {
17178
+ $$8({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.reverse()) }, {
16555
17179
  reverse: function reverse() {
16556
17180
  // eslint-disable-next-line no-self-assign -- dirty hack
16557
17181
  if (isArray$2(this)) this.length = this.length;
@@ -16560,15 +17184,15 @@ $$b({ target: 'Array', proto: true, forced: String(test$1) === String(test$1.rev
16560
17184
  });
16561
17185
 
16562
17186
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$7;
16563
- var toString$5 = toString$j;
16564
- var requireObjectCoercible$3 = requireObjectCoercible$c;
17187
+ var toString$3 = toString$j;
17188
+ var requireObjectCoercible$1 = requireObjectCoercible$c;
16565
17189
 
16566
17190
  var $RangeError = RangeError;
16567
17191
 
16568
17192
  // `String.prototype.repeat` method implementation
16569
17193
  // https://tc39.es/ecma262/#sec-string.prototype.repeat
16570
17194
  var stringRepeat = function repeat(count) {
16571
- var str = toString$5(requireObjectCoercible$3(this));
17195
+ var str = toString$3(requireObjectCoercible$1(this));
16572
17196
  var result = '';
16573
17197
  var n = toIntegerOrInfinity$1(count);
16574
17198
  if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions');
@@ -16577,23 +17201,23 @@ var stringRepeat = function repeat(count) {
16577
17201
  };
16578
17202
 
16579
17203
  // https://github.com/tc39/proposal-string-pad-start-end
16580
- var uncurryThis$3 = functionUncurryThis;
17204
+ var uncurryThis$1 = functionUncurryThis;
16581
17205
  var toLength = toLength$5;
16582
- var toString$4 = toString$j;
17206
+ var toString$2 = toString$j;
16583
17207
  var $repeat = stringRepeat;
16584
- var requireObjectCoercible$2 = requireObjectCoercible$c;
17208
+ var requireObjectCoercible = requireObjectCoercible$c;
16585
17209
 
16586
- var repeat = uncurryThis$3($repeat);
16587
- var stringSlice = uncurryThis$3(''.slice);
17210
+ var repeat = uncurryThis$1($repeat);
17211
+ var stringSlice = uncurryThis$1(''.slice);
16588
17212
  var ceil = Math.ceil;
16589
17213
 
16590
17214
  // `String.prototype.{ padStart, padEnd }` methods implementation
16591
- var createMethod$2 = function (IS_END) {
17215
+ var createMethod$1 = function (IS_END) {
16592
17216
  return function ($this, maxLength, fillString) {
16593
- var S = toString$4(requireObjectCoercible$2($this));
17217
+ var S = toString$2(requireObjectCoercible($this));
16594
17218
  var intMaxLength = toLength(maxLength);
16595
17219
  var stringLength = S.length;
16596
- var fillStr = fillString === undefined ? ' ' : toString$4(fillString);
17220
+ var fillStr = fillString === undefined ? ' ' : toString$2(fillString);
16597
17221
  var fillLen, stringFiller;
16598
17222
  if (intMaxLength <= stringLength || fillStr === '') return S;
16599
17223
  fillLen = intMaxLength - stringLength;
@@ -16606,20 +17230,20 @@ var createMethod$2 = function (IS_END) {
16606
17230
  var stringPad = {
16607
17231
  // `String.prototype.padStart` method
16608
17232
  // https://tc39.es/ecma262/#sec-string.prototype.padstart
16609
- start: createMethod$2(false)};
17233
+ start: createMethod$1(false)};
16610
17234
 
16611
17235
  // https://github.com/zloirock/core-js/issues/280
16612
17236
  var userAgent = engineUserAgent;
16613
17237
 
16614
17238
  var stringPadWebkitBug = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
16615
17239
 
16616
- var $$a = _export;
17240
+ var $$7 = _export;
16617
17241
  var $padStart = stringPad.start;
16618
17242
  var WEBKIT_BUG = stringPadWebkitBug;
16619
17243
 
16620
17244
  // `String.prototype.padStart` method
16621
17245
  // https://tc39.es/ecma262/#sec-string.prototype.padstart
16622
- $$a({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
17246
+ $$7({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
16623
17247
  padStart: function padStart(maxLength /* , fillString = ' ' */) {
16624
17248
  return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
16625
17249
  }
@@ -18005,7 +18629,7 @@ const ArkanoidGame = () => {
18005
18629
  });
18006
18630
  };
18007
18631
 
18008
- var $$9 = _export;
18632
+ var $$6 = _export;
18009
18633
 
18010
18634
  // eslint-disable-next-line es/no-math-hypot -- required for testing
18011
18635
  var $hypot = Math.hypot;
@@ -18018,7 +18642,7 @@ var FORCED$2 = !!$hypot && $hypot(Infinity, NaN) !== Infinity;
18018
18642
 
18019
18643
  // `Math.hypot` method
18020
18644
  // https://tc39.es/ecma262/#sec-math.hypot
18021
- $$9({ target: 'Math', stat: true, arity: 2, forced: FORCED$2 }, {
18645
+ $$6({ target: 'Math', stat: true, arity: 2, forced: FORCED$2 }, {
18022
18646
  // eslint-disable-next-line no-unused-vars -- required for `.length`
18023
18647
  hypot: function hypot(value1, value2) {
18024
18648
  var sum = 0;
@@ -19412,7 +20036,8 @@ function AppLayout({
19412
20036
  appVersion,
19413
20037
  brandName,
19414
20038
  ui,
19415
- frontends
20039
+ frontends,
20040
+ brandElement
19416
20041
  }) {
19417
20042
  var _a, _b;
19418
20043
  const {
@@ -19457,7 +20082,7 @@ function AppLayout({
19457
20082
  }, [currentFrontend]);
19458
20083
  useEffect(() => {
19459
20084
  if (currentShellUI.withMultipleSessions) FluxoStateDispatcher.dispatchSetSessionMode('multi-session');else FluxoStateDispatcher.dispatchSetSessionMode('single-session');
19460
- if (currentShellUI.navigation === ShellUINavigation.Sidebar) FluxoStateDispatcher.dispatchSetNavigationMode('sidebar');else if (currentShellUI.navigation === ShellUINavigation.Topbar) FluxoStateDispatcher.dispatchSetNavigationMode('topmenu');else {
20085
+ if (currentShellUI.navigation === ShellUINavigation.Sidebar) FluxoStateDispatcher.dispatchSetNavigationMode('sidebar');else if (currentShellUI.navigation === ShellUINavigation.SidebarMinimal) FluxoStateDispatcher.dispatchSetNavigationMode('sidebar-minimal');else if (currentShellUI.navigation === ShellUINavigation.Topbar) FluxoStateDispatcher.dispatchSetNavigationMode('topmenu');else {
19461
20086
  FluxoStateDispatcher.dispatchSetNavigationMode('none');
19462
20087
  FluxoStateDispatcher.dispatchCloseNavbar();
19463
20088
  }
@@ -19473,17 +20098,19 @@ function AppLayout({
19473
20098
  fluxoClientConfig: fluxoClientConfig,
19474
20099
  children: jsxs(AppShell, {
19475
20100
  padding: 0,
20101
+ className: currentShellUI.navigation === ShellUINavigation.Sidebar || currentShellUI.navigation === ShellUINavigation.SidebarMinimal ? 'flxShellAppShellV2' : 'flxShellAppShellV1',
19476
20102
  styles: {
19477
20103
  main: {
19478
20104
  backgroundColor: '#fafbff'
19479
20105
  }
19480
20106
  },
19481
20107
  navbar: {
19482
- width: 248,
20108
+ width: currentShellUI.navigation === ShellUINavigation.SidebarMinimal ? navbarOpened ? 248 : 80 : 248,
19483
20109
  breakpoint: 'sm',
19484
20110
  collapsed: {
19485
20111
  mobile: !navbarOpened,
19486
- desktop: !navbarOpened
20112
+ // Su mobile, sempre nascosta quando chiusa
20113
+ desktop: !navbarOpened && currentShellUI.navigation === ShellUINavigation.Sidebar // Su desktop, nascosta solo con Sidebar normale
19487
20114
  }
19488
20115
  },
19489
20116
  header: {
@@ -19513,6 +20140,7 @@ function AppLayout({
19513
20140
  }), jsx(AppShell.Footer, {
19514
20141
  children: jsx(FooterBar, {
19515
20142
  brandName: brandName,
20143
+ brandElement: brandElement,
19516
20144
  appVersion: appVersion
19517
20145
  })
19518
20146
  }), showDisconnectionOverlay && jsx(Overlay, {
@@ -19861,63 +20489,6 @@ function LoginPage(props) {
19861
20489
  });
19862
20490
  }
19863
20491
 
19864
- // a string of all valid unicode whitespaces
19865
- var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
19866
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
19867
-
19868
- var uncurryThis$2 = functionUncurryThis;
19869
- var requireObjectCoercible$1 = requireObjectCoercible$c;
19870
- var toString$3 = toString$j;
19871
- var whitespaces$2 = whitespaces$3;
19872
-
19873
- var replace = uncurryThis$2(''.replace);
19874
- var ltrim = RegExp('^[' + whitespaces$2 + ']+');
19875
- var rtrim = RegExp('(^|[^' + whitespaces$2 + '])[' + whitespaces$2 + ']+$');
19876
-
19877
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
19878
- var createMethod$1 = function (TYPE) {
19879
- return function ($this) {
19880
- var string = toString$3(requireObjectCoercible$1($this));
19881
- if (TYPE & 1) string = replace(string, ltrim, '');
19882
- if (TYPE & 2) string = replace(string, rtrim, '$1');
19883
- return string;
19884
- };
19885
- };
19886
-
19887
- var stringTrim = {
19888
- // `String.prototype.trim` method
19889
- // https://tc39.es/ecma262/#sec-string.prototype.trim
19890
- trim: createMethod$1(3)
19891
- };
19892
-
19893
- var PROPER_FUNCTION_NAME = functionName.PROPER;
19894
- var fails$2 = fails$v;
19895
- var whitespaces$1 = whitespaces$3;
19896
-
19897
- var non = '\u200B\u0085\u180E';
19898
-
19899
- // check that a method works with the correct list
19900
- // of whitespaces and has a correct name
19901
- var stringTrimForced = function (METHOD_NAME) {
19902
- return fails$2(function () {
19903
- return !!whitespaces$1[METHOD_NAME]()
19904
- || non[METHOD_NAME]() !== non
19905
- || (PROPER_FUNCTION_NAME && whitespaces$1[METHOD_NAME].name !== METHOD_NAME);
19906
- });
19907
- };
19908
-
19909
- var $$8 = _export;
19910
- var $trim = stringTrim.trim;
19911
- var forcedStringTrimMethod = stringTrimForced;
19912
-
19913
- // `String.prototype.trim` method
19914
- // https://tc39.es/ecma262/#sec-string.prototype.trim
19915
- $$8({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
19916
- trim: function trim() {
19917
- return $trim(this);
19918
- }
19919
- });
19920
-
19921
20492
  var dayjs_min = {exports: {}};
19922
20493
 
19923
20494
  (function (module, exports) {
@@ -21707,7 +22278,7 @@ var arraySpeciesCreate$1 = function (originalArray, length) {
21707
22278
  return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
21708
22279
  };
21709
22280
 
21710
- var $$7 = _export;
22281
+ var $$5 = _export;
21711
22282
  var flattenIntoArray = flattenIntoArray_1;
21712
22283
  var toObject$1 = toObject$a;
21713
22284
  var lengthOfArrayLike$1 = lengthOfArrayLike$9;
@@ -21716,7 +22287,7 @@ var arraySpeciesCreate = arraySpeciesCreate$1;
21716
22287
 
21717
22288
  // `Array.prototype.flat` method
21718
22289
  // https://tc39.es/ecma262/#sec-array.prototype.flat
21719
- $$7({ target: 'Array', proto: true }, {
22290
+ $$5({ target: 'Array', proto: true }, {
21720
22291
  flat: function flat(/* depthArg = 1 */) {
21721
22292
  var depthArg = arguments.length ? arguments[0] : undefined;
21722
22293
  var O = toObject$1(this);
@@ -21729,10 +22300,10 @@ $$7({ target: 'Array', proto: true }, {
21729
22300
 
21730
22301
  // this method was added to unscopables after implementation
21731
22302
  // in popular engines, so it's moved to a separate module
21732
- var addToUnscopables$1 = addToUnscopables$3;
22303
+ var addToUnscopables = addToUnscopables$3;
21733
22304
 
21734
22305
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
21735
- addToUnscopables$1('flat');
22306
+ addToUnscopables('flat');
21736
22307
 
21737
22308
  function Ui() {
21738
22309
  const {
@@ -36423,49 +36994,6 @@ var Tree = forwardRef(TreeInner);
36423
36994
 
36424
36995
  var styles$2 = {"root":"CustomNode-module_root__MTD8I","expandIconWrapper":"CustomNode-module_expandIconWrapper__XgO8w","isOpen":"CustomNode-module_isOpen__jPvPC","labelGridItem":"CustomNode-module_labelGridItem__k-wO-"};
36425
36996
 
36426
- var $$6 = _export;
36427
- var $includes = arrayIncludes.includes;
36428
- var fails$1 = fails$v;
36429
- var addToUnscopables = addToUnscopables$3;
36430
-
36431
- // FF99+ bug
36432
- var BROKEN_ON_SPARSE = fails$1(function () {
36433
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
36434
- return !Array(1).includes();
36435
- });
36436
-
36437
- // `Array.prototype.includes` method
36438
- // https://tc39.es/ecma262/#sec-array.prototype.includes
36439
- $$6({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
36440
- includes: function includes(el /* , fromIndex = 0 */) {
36441
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
36442
- }
36443
- });
36444
-
36445
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
36446
- addToUnscopables('includes');
36447
-
36448
- var $$5 = _export;
36449
- var uncurryThis$1 = functionUncurryThis;
36450
- var notARegExp = notARegexp;
36451
- var requireObjectCoercible = requireObjectCoercible$c;
36452
- var toString$2 = toString$j;
36453
- var correctIsRegExpLogic = correctIsRegexpLogic;
36454
-
36455
- var stringIndexOf = uncurryThis$1(''.indexOf);
36456
-
36457
- // `String.prototype.includes` method
36458
- // https://tc39.es/ecma262/#sec-string.prototype.includes
36459
- $$5({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
36460
- includes: function includes(searchString /* , position = 0 */) {
36461
- return !!~stringIndexOf(
36462
- toString$2(requireObjectCoercible(this)),
36463
- toString$2(notARegExp(searchString)),
36464
- arguments.length > 1 ? arguments[1] : undefined
36465
- );
36466
- }
36467
- });
36468
-
36469
36997
  function PermissionNavigator(props) {
36470
36998
  const [structuredPermissions, setStructuredPermissions] = useState();
36471
36999
  const [domainRolePermissions, setDomainRolePermissions] = useState([]);
@@ -64664,6 +65192,9 @@ function Settings(props) {
64664
65192
  }
64665
65193
  };
64666
65194
  return jsxs(ShellPage, {
65195
+ headerProps: {
65196
+ title: 'Amministrazione'
65197
+ },
64667
65198
  withoutPadding: currentTab === 'bi' || currentTab === 'apidoc',
64668
65199
  contextSidebarProps: {
64669
65200
  groups: getSideMenuGroups(),
@@ -76381,7 +76912,20 @@ var ShellUINavigation;
76381
76912
  ShellUINavigation[ShellUINavigation["Sidebar"] = 1] = "Sidebar";
76382
76913
  ShellUINavigation[ShellUINavigation["Topbar"] = 2] = "Topbar";
76383
76914
  ShellUINavigation[ShellUINavigation["None"] = 3] = "None";
76915
+ ShellUINavigation[ShellUINavigation["SidebarMinimal"] = 4] = "SidebarMinimal";
76384
76916
  })(ShellUINavigation || (ShellUINavigation = {}));
76917
+ var ShellUISearchPosition;
76918
+ (function (ShellUISearchPosition) {
76919
+ ShellUISearchPosition["None"] = "none";
76920
+ ShellUISearchPosition["Left"] = "left";
76921
+ ShellUISearchPosition["Right"] = "right";
76922
+ ShellUISearchPosition["Center"] = "center";
76923
+ })(ShellUISearchPosition || (ShellUISearchPosition = {}));
76924
+ var ShellUISearchType;
76925
+ (function (ShellUISearchType) {
76926
+ ShellUISearchType["Spotlight"] = "spotlight";
76927
+ ShellUISearchType["Dropdown"] = "dropdown";
76928
+ })(ShellUISearchType || (ShellUISearchType = {}));
76385
76929
  const culture = "it";
76386
76930
  ResourceManager.setLocalizationMessages(Object.assign(Object.assign(Object.assign({}, dxDashboardIt), dxReportingIt), dxAnalyticsCoreIt));
76387
76931
  locale(culture);
@@ -76610,6 +77154,7 @@ function FluxoShell(props) {
76610
77154
  return (_a = frontendByRender === null || frontendByRender === void 0 ? void 0 : frontendByRender.layout) !== null && _a !== void 0 ? _a : jsx(AppLayout, {
76611
77155
  frontends: props.frontends,
76612
77156
  ui: props.ui,
77157
+ brandElement: props.brandElement,
76613
77158
  brandName: (_b = props.brandName) !== null && _b !== void 0 ? _b : 'Fluxo',
76614
77159
  appVersion: props.appVersion
76615
77160
  });
@@ -77146,4 +77691,4 @@ function LockedResource({
77146
77691
  });
77147
77692
  }
77148
77693
 
77149
- export { FluxoShell, FrontendSwitch, LockedResource, ScreenSharingProvider, ScreenSharingWidget, ShellSessionContext, ShellUINavigation, useScreenSharingContext, useSessionHub };
77694
+ export { FluxoShell, FrontendSwitch, LockedResource, ScreenSharingProvider, ScreenSharingWidget, ShellSessionContext, ShellUINavigation, ShellUISearchPosition, ShellUISearchType, useScreenSharingContext, useSessionHub };