gsintegrations 0.0.491 → 0.0.493
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/dist/bundle.cjs.js +362 -29
- package/dist/bundle.cjs.js.map +2 -2
- package/dist/bundle.esm.js +361 -30
- package/dist/bundle.esm.js.map +2 -2
- package/dist/index.d.ts +60 -2
- package/dist/types/pages/HomePage/HomePage.types.d.ts +46 -0
- package/dist/types/pages/HomePage/components/HomeBottomNav.d.ts +5 -0
- package/dist/types/pages/HomePage/components/HomeMenu.d.ts +14 -0
- package/dist/types/pages/HomePage/components/HomeMenu.types.d.ts +70 -1
- package/dist/types/pages/HomePage/components/HomeMenuShortcuts.d.ts +13 -0
- package/dist/types/pages/HomePage/components/bottomNavShortcuts.d.ts +78 -0
- package/dist/types/pages/HomePage/components/useHomeMenu.d.ts +12 -1
- package/dist/types/pages/HomePage/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -152634,7 +152634,139 @@ const isDefaultHomeWidgetOrder = (order, profile) => {
|
|
|
152634
152634
|
};
|
|
152635
152635
|
const mergeHomeWidgetVisibility = (partial) => (Object.assign(Object.assign({}, DEFAULT_HOME_WIDGET_VISIBILITY), (partial !== null && partial !== void 0 ? partial : {})));
|
|
152636
152636
|
|
|
152637
|
-
|
|
152637
|
+
/** Funcionalidade ids used as the untouched defaults for each profile. */
|
|
152638
|
+
const BOTTOM_NAV_ACTION_EVENTS = "events";
|
|
152639
|
+
const BOTTOM_NAV_ACTION_ACTIVITIES = "activities";
|
|
152640
|
+
const BOTTOM_NAV_ACTION_SOCIAL = "social";
|
|
152641
|
+
const BOTTOM_NAV_ACTION_RITUAL_BATHS = "ritual-baths";
|
|
152642
|
+
enumType(["leading", "trailing"]);
|
|
152643
|
+
const HomeBottomNavShortcutsSchema = objectType({
|
|
152644
|
+
leading: stringType().min(1),
|
|
152645
|
+
trailing: stringType().min(1),
|
|
152646
|
+
});
|
|
152647
|
+
const HomeBottomNavProfileKindSchema = enumType(["personal", "terreiro"]);
|
|
152648
|
+
const ATALHOS_DA_BARRA_TITLE = "Atalhos da barra";
|
|
152649
|
+
const ATALHOS_DA_BARRA_ROW_TITLE = "Escolher atalhos";
|
|
152650
|
+
const ATALHOS_DA_BARRA_SECTION_DESCRIPTION = "Troque os dois atalhos ao lado do logo por outras Funcionalidades. Home, o logo e Menu não mudam, e a escolha vale só para este perfil.";
|
|
152651
|
+
const ATALHOS_DA_BARRA_ONLY_TWO_TEXT = "Somente estes dois atalhos podem ser alterados. Home, o logo (troca de perfil) e Menu permanecem fixos.";
|
|
152652
|
+
const ATALHOS_DA_BARRA_FROM_FUNCIONALIDADES_TEXT = "A lista é a de Funcionalidades deste perfil.";
|
|
152653
|
+
const ATALHOS_DA_BARRA_PERSONAL_SCOPE_TEXT = "Esta escolha fica só no perfil pessoal. Cada terreiro guarda a sua, separada.";
|
|
152654
|
+
const atalhosDaBarraTerreiroScopeText = (terreiroName) => `Esta escolha fica só em ${terreiroName}. O perfil pessoal e os outros terreiros não são alterados.`;
|
|
152655
|
+
const ATALHOS_DA_BARRA_LEADING_LABEL = "Esquerda";
|
|
152656
|
+
const ATALHOS_DA_BARRA_TRAILING_LABEL = "Direita";
|
|
152657
|
+
const ATALHOS_DA_BARRA_USED_ELSEWHERE = "Usado no outro atalho";
|
|
152658
|
+
const RESTAURAR_ATALHOS_PADRAO_LABEL = "Restaurar padrão";
|
|
152659
|
+
const BOTTOM_NAV_PROFILE_PERSONAL_LABEL = "Perfil pessoal";
|
|
152660
|
+
const SYNTHETIC_ACTIONS = {
|
|
152661
|
+
[BOTTOM_NAV_ACTION_EVENTS]: {
|
|
152662
|
+
id: BOTTOM_NAV_ACTION_EVENTS,
|
|
152663
|
+
title: "Eventos",
|
|
152664
|
+
route: "/events",
|
|
152665
|
+
icon: "📅",
|
|
152666
|
+
},
|
|
152667
|
+
[BOTTOM_NAV_ACTION_ACTIVITIES]: {
|
|
152668
|
+
id: BOTTOM_NAV_ACTION_ACTIVITIES,
|
|
152669
|
+
title: "Atividades",
|
|
152670
|
+
route: "/activities",
|
|
152671
|
+
icon: "📋",
|
|
152672
|
+
},
|
|
152673
|
+
[BOTTOM_NAV_ACTION_SOCIAL]: {
|
|
152674
|
+
id: BOTTOM_NAV_ACTION_SOCIAL,
|
|
152675
|
+
title: "Social",
|
|
152676
|
+
route: "/social",
|
|
152677
|
+
icon: "🌐",
|
|
152678
|
+
},
|
|
152679
|
+
[BOTTOM_NAV_ACTION_RITUAL_BATHS]: {
|
|
152680
|
+
id: BOTTOM_NAV_ACTION_RITUAL_BATHS,
|
|
152681
|
+
title: "Banhos",
|
|
152682
|
+
route: "/ritual-baths",
|
|
152683
|
+
icon: "🧘",
|
|
152684
|
+
},
|
|
152685
|
+
};
|
|
152686
|
+
/**
|
|
152687
|
+
* The events Funcionalidade is titled "Giras" in the menu.
|
|
152688
|
+
* The bar keeps the established short label "Eventos".
|
|
152689
|
+
*/
|
|
152690
|
+
const bottomNavLabelForAction = (action) => action.id === BOTTOM_NAV_ACTION_EVENTS ? "Eventos" : action.title;
|
|
152691
|
+
const getDefaultBottomNavShortcuts = (input) => {
|
|
152692
|
+
if (input.hasTerreiroContext) {
|
|
152693
|
+
return {
|
|
152694
|
+
leading: BOTTOM_NAV_ACTION_EVENTS,
|
|
152695
|
+
trailing: BOTTOM_NAV_ACTION_ACTIVITIES,
|
|
152696
|
+
};
|
|
152697
|
+
}
|
|
152698
|
+
if (input.canUseSocial) {
|
|
152699
|
+
return {
|
|
152700
|
+
leading: BOTTOM_NAV_ACTION_SOCIAL,
|
|
152701
|
+
trailing: BOTTOM_NAV_ACTION_ACTIVITIES,
|
|
152702
|
+
};
|
|
152703
|
+
}
|
|
152704
|
+
return {
|
|
152705
|
+
leading: BOTTOM_NAV_ACTION_RITUAL_BATHS,
|
|
152706
|
+
trailing: BOTTOM_NAV_ACTION_ACTIVITIES,
|
|
152707
|
+
};
|
|
152708
|
+
};
|
|
152709
|
+
const toShortcutAction = (action) => ({
|
|
152710
|
+
id: action.id,
|
|
152711
|
+
label: bottomNavLabelForAction(action),
|
|
152712
|
+
route: action.route,
|
|
152713
|
+
icon: action.icon,
|
|
152714
|
+
badge: action.badge,
|
|
152715
|
+
});
|
|
152716
|
+
const findAction = (actions, id) => {
|
|
152717
|
+
if (!id)
|
|
152718
|
+
return undefined;
|
|
152719
|
+
return actions.find((action) => action.id === id);
|
|
152720
|
+
};
|
|
152721
|
+
/**
|
|
152722
|
+
* Maps stored ids onto the current Funcionalidades.
|
|
152723
|
+
* A missing id falls back to that profile's default. The two slots never share an id.
|
|
152724
|
+
*/
|
|
152725
|
+
const resolveBottomNavShortcuts = (input) => {
|
|
152726
|
+
var _a, _b, _c;
|
|
152727
|
+
const defaults = getDefaultBottomNavShortcuts(input);
|
|
152728
|
+
const availableIds = input.actions.map((action) => action.id);
|
|
152729
|
+
const available = new Set(availableIds);
|
|
152730
|
+
const pickId = (preferred, fallback, blocked) => {
|
|
152731
|
+
const candidates = [preferred, fallback, ...availableIds];
|
|
152732
|
+
for (const id of candidates) {
|
|
152733
|
+
if (!id || id === blocked)
|
|
152734
|
+
continue;
|
|
152735
|
+
if (available.size === 0 || available.has(id))
|
|
152736
|
+
return id;
|
|
152737
|
+
}
|
|
152738
|
+
return fallback;
|
|
152739
|
+
};
|
|
152740
|
+
const leadingId = pickId((_a = input.shortcuts) === null || _a === void 0 ? void 0 : _a.leading, defaults.leading);
|
|
152741
|
+
let trailingId = pickId((_b = input.shortcuts) === null || _b === void 0 ? void 0 : _b.trailing, defaults.trailing, leadingId);
|
|
152742
|
+
if (trailingId === leadingId) {
|
|
152743
|
+
trailingId = pickId(defaults.trailing === leadingId ? undefined : defaults.trailing, (_c = availableIds.find((id) => id !== leadingId)) !== null && _c !== void 0 ? _c : defaults.trailing, leadingId);
|
|
152744
|
+
}
|
|
152745
|
+
const resolveOne = (id) => {
|
|
152746
|
+
var _a;
|
|
152747
|
+
const match = (_a = findAction(input.actions, id)) !== null && _a !== void 0 ? _a : SYNTHETIC_ACTIONS[id];
|
|
152748
|
+
if (match)
|
|
152749
|
+
return toShortcutAction(match);
|
|
152750
|
+
return {
|
|
152751
|
+
id,
|
|
152752
|
+
label: id,
|
|
152753
|
+
route: "/",
|
|
152754
|
+
};
|
|
152755
|
+
};
|
|
152756
|
+
const leading = resolveOne(leadingId);
|
|
152757
|
+
const trailing = resolveOne(trailingId);
|
|
152758
|
+
const shortcuts = { leading: leading.id, trailing: trailing.id };
|
|
152759
|
+
const isDefault = shortcuts.leading === defaults.leading &&
|
|
152760
|
+
shortcuts.trailing === defaults.trailing;
|
|
152761
|
+
return { leading, trailing, shortcuts, defaults, isDefault };
|
|
152762
|
+
};
|
|
152763
|
+
|
|
152764
|
+
enumType([
|
|
152765
|
+
"root",
|
|
152766
|
+
"visibility",
|
|
152767
|
+
"order",
|
|
152768
|
+
"shortcuts",
|
|
152769
|
+
]);
|
|
152638
152770
|
objectType({
|
|
152639
152771
|
open: booleanType(),
|
|
152640
152772
|
onClose: functionType(tupleType([]), voidType()),
|
|
@@ -152670,6 +152802,19 @@ objectType({
|
|
|
152670
152802
|
*/
|
|
152671
152803
|
onWidgetsCustomizeViewOpen: functionType(tupleType([HomeWidgetsCustomizeViewSchema]), voidType())
|
|
152672
152804
|
.optional(),
|
|
152805
|
+
/**
|
|
152806
|
+
* Resolved leading/trailing Funcionalidade ids for the active profile.
|
|
152807
|
+
* Shown in Atalhos da barra. Omitted with onBottomNavShortcutChange hides the section.
|
|
152808
|
+
*/
|
|
152809
|
+
bottomNavShortcuts: HomeBottomNavShortcutsSchema.optional(),
|
|
152810
|
+
/** Profile defaults used by Restaurar padrão. */
|
|
152811
|
+
defaultBottomNavShortcuts: HomeBottomNavShortcutsSchema.optional(),
|
|
152812
|
+
onBottomNavShortcutChange: functionType(tupleType([HomeBottomNavShortcutsSchema]), voidType())
|
|
152813
|
+
.optional(),
|
|
152814
|
+
/** personal vs the selected terreiro — copy explains the choice is not shared. */
|
|
152815
|
+
bottomNavProfileKind: HomeBottomNavProfileKindSchema.optional(),
|
|
152816
|
+
/** Terreiro name, or "Perfil pessoal". */
|
|
152817
|
+
bottomNavProfileLabel: stringType().min(1).optional(),
|
|
152673
152818
|
});
|
|
152674
152819
|
const FUNCIONALIDADES_SECTION_DESCRIPTION = "Atalhos para as principais áreas e ações do terreiro.";
|
|
152675
152820
|
const WIDGETS_SECTION_DESCRIPTION = "Personalize quais widgets aparecem na tela inicial e em que ordem.";
|
|
@@ -152708,6 +152853,9 @@ const useHomeMenu = (props) => {
|
|
|
152708
152853
|
setView("order");
|
|
152709
152854
|
(_a = props.onWidgetsCustomizeViewOpen) === null || _a === void 0 ? void 0 : _a.call(props, "order");
|
|
152710
152855
|
}, [props]);
|
|
152856
|
+
const handleOpenShortcuts = React$1.useCallback(() => {
|
|
152857
|
+
setView("shortcuts");
|
|
152858
|
+
}, []);
|
|
152711
152859
|
const handleActionClick = React$1.useCallback((route) => {
|
|
152712
152860
|
props.onActionClick(route);
|
|
152713
152861
|
props.onClose();
|
|
@@ -152780,6 +152928,36 @@ const useHomeMenu = (props) => {
|
|
|
152780
152928
|
const meta = { method: "reset" };
|
|
152781
152929
|
props.onWidgetOrderChange([...defaultWidgetOrder], meta);
|
|
152782
152930
|
}, [props, currentOrder, defaultWidgetOrder]);
|
|
152931
|
+
const bottomNavShortcuts = props.bottomNavShortcuts;
|
|
152932
|
+
const defaultBottomNavShortcuts = props.defaultBottomNavShortcuts;
|
|
152933
|
+
const isDefaultBottomNavShortcuts = React$1.useMemo(() => {
|
|
152934
|
+
if (!bottomNavShortcuts || !defaultBottomNavShortcuts)
|
|
152935
|
+
return true;
|
|
152936
|
+
return (bottomNavShortcuts.leading === defaultBottomNavShortcuts.leading &&
|
|
152937
|
+
bottomNavShortcuts.trailing === defaultBottomNavShortcuts.trailing);
|
|
152938
|
+
}, [bottomNavShortcuts, defaultBottomNavShortcuts]);
|
|
152939
|
+
const handleBottomNavShortcutChange = React$1.useCallback((slot, actionId) => {
|
|
152940
|
+
if (!props.onBottomNavShortcutChange || !bottomNavShortcuts)
|
|
152941
|
+
return;
|
|
152942
|
+
if (bottomNavShortcuts[slot] === actionId)
|
|
152943
|
+
return;
|
|
152944
|
+
const next = Object.assign(Object.assign({}, bottomNavShortcuts), { [slot]: actionId });
|
|
152945
|
+
if (next.leading === next.trailing)
|
|
152946
|
+
return;
|
|
152947
|
+
props.onBottomNavShortcutChange(next);
|
|
152948
|
+
}, [props, bottomNavShortcuts]);
|
|
152949
|
+
const handleBottomNavShortcutReset = React$1.useCallback(() => {
|
|
152950
|
+
if (!props.onBottomNavShortcutChange ||
|
|
152951
|
+
!defaultBottomNavShortcuts ||
|
|
152952
|
+
isDefaultBottomNavShortcuts) {
|
|
152953
|
+
return;
|
|
152954
|
+
}
|
|
152955
|
+
props.onBottomNavShortcutChange(Object.assign({}, defaultBottomNavShortcuts));
|
|
152956
|
+
}, [
|
|
152957
|
+
props,
|
|
152958
|
+
defaultBottomNavShortcuts,
|
|
152959
|
+
isDefaultBottomNavShortcuts,
|
|
152960
|
+
]);
|
|
152783
152961
|
const widgets = React$1.useMemo(() => {
|
|
152784
152962
|
if (props.showQuickActions === undefined) {
|
|
152785
152963
|
return props.widgets;
|
|
@@ -152801,17 +152979,25 @@ const useHomeMenu = (props) => {
|
|
|
152801
152979
|
return widgets.filter((widget) => widget.id !== "quickActions");
|
|
152802
152980
|
}, [props.reorderableWidgets, props.widgetOrder, widgets]);
|
|
152803
152981
|
const showQuickActions = (_e = (_c = props.showQuickActions) !== null && _c !== void 0 ? _c : (_d = widgets.find((widget) => widget.id === "quickActions")) === null || _d === void 0 ? void 0 : _d.visible) !== null && _e !== void 0 ? _e : true;
|
|
152804
|
-
const data = React$1.useMemo(() =>
|
|
152805
|
-
|
|
152806
|
-
|
|
152807
|
-
|
|
152808
|
-
|
|
152809
|
-
|
|
152810
|
-
|
|
152811
|
-
|
|
152812
|
-
|
|
152813
|
-
|
|
152814
|
-
|
|
152982
|
+
const data = React$1.useMemo(() => {
|
|
152983
|
+
var _a;
|
|
152984
|
+
return ({
|
|
152985
|
+
open: props.open,
|
|
152986
|
+
actions: props.actions,
|
|
152987
|
+
widgets,
|
|
152988
|
+
reorderableWidgets,
|
|
152989
|
+
showQuickActions,
|
|
152990
|
+
view,
|
|
152991
|
+
canReorder,
|
|
152992
|
+
isDefaultOrder,
|
|
152993
|
+
defaultWidgetOrder,
|
|
152994
|
+
canCustomizeBottomNav: props.onBottomNavShortcutChange !== undefined && props.actions.length > 0,
|
|
152995
|
+
bottomNavShortcuts,
|
|
152996
|
+
isDefaultBottomNavShortcuts,
|
|
152997
|
+
bottomNavProfileKind: (_a = props.bottomNavProfileKind) !== null && _a !== void 0 ? _a : "personal",
|
|
152998
|
+
bottomNavProfileLabel: props.bottomNavProfileLabel,
|
|
152999
|
+
});
|
|
153000
|
+
}, [
|
|
152815
153001
|
props.open,
|
|
152816
153002
|
props.actions,
|
|
152817
153003
|
widgets,
|
|
@@ -152821,33 +153007,110 @@ const useHomeMenu = (props) => {
|
|
|
152821
153007
|
canReorder,
|
|
152822
153008
|
isDefaultOrder,
|
|
152823
153009
|
defaultWidgetOrder,
|
|
153010
|
+
props.onBottomNavShortcutChange,
|
|
153011
|
+
bottomNavShortcuts,
|
|
153012
|
+
isDefaultBottomNavShortcuts,
|
|
153013
|
+
props.bottomNavProfileKind,
|
|
153014
|
+
props.bottomNavProfileLabel,
|
|
152824
153015
|
]);
|
|
152825
153016
|
const fns = React$1.useMemo(() => ({
|
|
152826
153017
|
handleClose,
|
|
152827
153018
|
handleBack,
|
|
152828
153019
|
handleOpenVisibility,
|
|
152829
153020
|
handleOpenOrder,
|
|
153021
|
+
handleOpenShortcuts,
|
|
152830
153022
|
handleActionClick,
|
|
152831
153023
|
handleWidgetVisibilityChange,
|
|
152832
153024
|
handleShowQuickActionsChange,
|
|
152833
153025
|
handleWidgetOrderMove,
|
|
152834
153026
|
handleWidgetOrderReorder,
|
|
152835
153027
|
handleWidgetOrderReset,
|
|
153028
|
+
handleBottomNavShortcutChange,
|
|
153029
|
+
handleBottomNavShortcutReset,
|
|
152836
153030
|
}), [
|
|
152837
153031
|
handleClose,
|
|
152838
153032
|
handleBack,
|
|
152839
153033
|
handleOpenVisibility,
|
|
152840
153034
|
handleOpenOrder,
|
|
153035
|
+
handleOpenShortcuts,
|
|
152841
153036
|
handleActionClick,
|
|
152842
153037
|
handleWidgetVisibilityChange,
|
|
152843
153038
|
handleShowQuickActionsChange,
|
|
152844
153039
|
handleWidgetOrderMove,
|
|
152845
153040
|
handleWidgetOrderReorder,
|
|
152846
153041
|
handleWidgetOrderReset,
|
|
153042
|
+
handleBottomNavShortcutChange,
|
|
153043
|
+
handleBottomNavShortcutReset,
|
|
152847
153044
|
]);
|
|
152848
153045
|
return { data, fns };
|
|
152849
153046
|
};
|
|
152850
153047
|
|
|
153048
|
+
const sectionDescriptionSx$1 = {
|
|
153049
|
+
fontSize: "0.8125rem",
|
|
153050
|
+
lineHeight: 1.4,
|
|
153051
|
+
mt: 0,
|
|
153052
|
+
mb: 1.5,
|
|
153053
|
+
px: 0.5,
|
|
153054
|
+
};
|
|
153055
|
+
const ShortcutRadioList = ({ slot, label, value, blockedId, actions, onChange }) => {
|
|
153056
|
+
const theme = useTheme$1();
|
|
153057
|
+
return (React$1.createElement(Box$1, { sx: { mb: 2 } },
|
|
153058
|
+
React$1.createElement(Typography$1, { variant: "subtitle2", color: "text.secondary", component: "h2", sx: { fontWeight: 600, fontSize: "0.8125rem", mb: 1, px: 0.5 } }, label),
|
|
153059
|
+
React$1.createElement(RadioGroup$1, { "aria-label": `Atalho da ${label.toLowerCase()}`, value: value, onChange: (_event, next) => onChange(next), sx: {
|
|
153060
|
+
bgcolor: theme.palette.mode === "dark"
|
|
153061
|
+
? alpha(theme.palette.common.white, 0.08)
|
|
153062
|
+
: alpha(theme.palette.common.black, 0.04),
|
|
153063
|
+
borderRadius: RADIUS.default,
|
|
153064
|
+
overflow: "hidden",
|
|
153065
|
+
} }, actions.map((action, index) => {
|
|
153066
|
+
const usedElsewhere = action.id === blockedId;
|
|
153067
|
+
return (React$1.createElement(React$1.Fragment, { key: action.id },
|
|
153068
|
+
index > 0 && React$1.createElement(Divider$1, { sx: { ml: 2 } }),
|
|
153069
|
+
React$1.createElement(FormControlLabel$1, { value: action.id, disabled: usedElsewhere, "data-testid": `home-bottom-nav-shortcut-${slot}-${action.id}`, control: React$1.createElement(Radio$1, { color: "primary", inputProps: {
|
|
153070
|
+
"aria-label": usedElsewhere
|
|
153071
|
+
? `${action.title}, ${ATALHOS_DA_BARRA_USED_ELSEWHERE}`
|
|
153072
|
+
: action.title,
|
|
153073
|
+
} }), label: React$1.createElement(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1.5, py: 0.5 } },
|
|
153074
|
+
React$1.createElement(Box$1, { sx: {
|
|
153075
|
+
width: 36,
|
|
153076
|
+
height: 36,
|
|
153077
|
+
borderRadius: RADIUS.default,
|
|
153078
|
+
display: "flex",
|
|
153079
|
+
alignItems: "center",
|
|
153080
|
+
justifyContent: "center",
|
|
153081
|
+
bgcolor: alpha(theme.palette.primary.main, 0.12),
|
|
153082
|
+
color: theme.palette.primary.main,
|
|
153083
|
+
flexShrink: 0,
|
|
153084
|
+
"& .MuiSvgIcon-root": { fontSize: 20 },
|
|
153085
|
+
} }, resolveActionIcon(action.icon)),
|
|
153086
|
+
React$1.createElement(Box$1, { sx: { minWidth: 0 } },
|
|
153087
|
+
React$1.createElement(Typography$1, { variant: "body1", sx: { fontWeight: 500 } }, action.title),
|
|
153088
|
+
usedElsewhere && (React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", sx: { fontSize: "0.8125rem", lineHeight: 1.35 } }, ATALHOS_DA_BARRA_USED_ELSEWHERE)))), sx: {
|
|
153089
|
+
mx: 0,
|
|
153090
|
+
px: 1.5,
|
|
153091
|
+
py: 0.75,
|
|
153092
|
+
minHeight: 48,
|
|
153093
|
+
width: "100%",
|
|
153094
|
+
alignItems: "center",
|
|
153095
|
+
} })));
|
|
153096
|
+
}))));
|
|
153097
|
+
};
|
|
153098
|
+
const HomeMenuShortcuts = ({ actions, shortcuts, profileKind, profileLabel, isDefault, onChange, onReset, }) => {
|
|
153099
|
+
const terreiroName = (profileLabel === null || profileLabel === void 0 ? void 0 : profileLabel.trim()) || "este terreiro";
|
|
153100
|
+
const profileHeading = profileKind === "terreiro" ? terreiroName : BOTTOM_NAV_PROFILE_PERSONAL_LABEL;
|
|
153101
|
+
const scopeText = profileKind === "terreiro"
|
|
153102
|
+
? atalhosDaBarraTerreiroScopeText(terreiroName)
|
|
153103
|
+
: ATALHOS_DA_BARRA_PERSONAL_SCOPE_TEXT;
|
|
153104
|
+
return (React$1.createElement(Box$1, null,
|
|
153105
|
+
React$1.createElement(Typography$1, { variant: "subtitle1", component: "h2", "data-testid": "home-menu-bottom-nav-profile", sx: { fontWeight: 600, mb: 1 } }, profileHeading),
|
|
153106
|
+
React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", sx: sectionDescriptionSx$1 }, ATALHOS_DA_BARRA_ONLY_TWO_TEXT),
|
|
153107
|
+
React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", sx: Object.assign(Object.assign({}, sectionDescriptionSx$1), { mt: -0.5 }) }, ATALHOS_DA_BARRA_FROM_FUNCIONALIDADES_TEXT),
|
|
153108
|
+
React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", "data-testid": "home-menu-bottom-nav-scope", sx: Object.assign(Object.assign({}, sectionDescriptionSx$1), { mt: -0.5 }) }, scopeText),
|
|
153109
|
+
React$1.createElement(Button$1, { fullWidth: true, variant: "outlined", color: "primary", "data-testid": "home-bottom-nav-shortcuts-reset", "aria-label": RESTAURAR_ATALHOS_PADRAO_LABEL, disabled: isDefault, onClick: onReset, sx: { mb: 2, textTransform: "none", fontWeight: 500 } }, RESTAURAR_ATALHOS_PADRAO_LABEL),
|
|
153110
|
+
React$1.createElement(ShortcutRadioList, { slot: "leading", label: ATALHOS_DA_BARRA_LEADING_LABEL, value: shortcuts.leading, blockedId: shortcuts.trailing, actions: actions, onChange: (actionId) => onChange("leading", actionId) }),
|
|
153111
|
+
React$1.createElement(ShortcutRadioList, { slot: "trailing", label: ATALHOS_DA_BARRA_TRAILING_LABEL, value: shortcuts.trailing, blockedId: shortcuts.leading, actions: actions, onChange: (actionId) => onChange("trailing", actionId) })));
|
|
153112
|
+
};
|
|
153113
|
+
|
|
152851
153114
|
/** Below HomeBottomNav (appBar 1100) so the Menu tab stays tappable while open. */
|
|
152852
153115
|
const HOME_MENU_DRAWER_Z_INDEX = 1050;
|
|
152853
153116
|
const sectionTitleSx$2 = {
|
|
@@ -152970,12 +153233,16 @@ const HomeMenu = (props) => {
|
|
|
152970
153233
|
? EXIBIR_WIDGETS_TITLE
|
|
152971
153234
|
: data.view === "order"
|
|
152972
153235
|
? ORDENAR_WIDGETS_TITLE
|
|
152973
|
-
: "
|
|
153236
|
+
: data.view === "shortcuts"
|
|
153237
|
+
? ATALHOS_DA_BARRA_TITLE
|
|
153238
|
+
: "Opções";
|
|
152974
153239
|
const dialogLabel = data.view === "visibility"
|
|
152975
153240
|
? EXIBIR_WIDGETS_TITLE
|
|
152976
153241
|
: data.view === "order"
|
|
152977
153242
|
? ORDENAR_WIDGETS_TITLE
|
|
152978
|
-
: "
|
|
153243
|
+
: data.view === "shortcuts"
|
|
153244
|
+
? ATALHOS_DA_BARRA_TITLE
|
|
153245
|
+
: "Menu";
|
|
152979
153246
|
return (React$1.createElement(GenericDrawer, { open: data.open, onClose: fns.handleClose, fullHeight: true, disableEnforceFocus: true, zIndex: HOME_MENU_DRAWER_Z_INDEX, "aria-label": dialogLabel },
|
|
152980
153247
|
React$1.createElement(Box$1, { sx: {
|
|
152981
153248
|
display: "flex",
|
|
@@ -153049,6 +153316,24 @@ const HomeMenu = (props) => {
|
|
|
153049
153316
|
fontSize: 20,
|
|
153050
153317
|
} }))));
|
|
153051
153318
|
}))))),
|
|
153319
|
+
data.canCustomizeBottomNav && data.bottomNavShortcuts && (React$1.createElement(Box$1, { sx: { mb: 2 } },
|
|
153320
|
+
React$1.createElement(Typography$1, { variant: "subtitle2", color: "text.secondary", sx: sectionTitleSx$2 }, ATALHOS_DA_BARRA_TITLE),
|
|
153321
|
+
React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", sx: sectionDescriptionSx }, ATALHOS_DA_BARRA_SECTION_DESCRIPTION),
|
|
153322
|
+
React$1.createElement(Box$1, { sx: {
|
|
153323
|
+
bgcolor: cardBg,
|
|
153324
|
+
borderRadius: RADIUS.default,
|
|
153325
|
+
overflow: "hidden",
|
|
153326
|
+
} },
|
|
153327
|
+
React$1.createElement(List$1, { disablePadding: true },
|
|
153328
|
+
React$1.createElement(ListItemButton$1, { onClick: fns.handleOpenShortcuts, "aria-label": ATALHOS_DA_BARRA_TITLE, "data-testid": "home-menu-bottom-nav-shortcuts", sx: { py: 1.5, px: 2 } },
|
|
153329
|
+
React$1.createElement(ListItemText$1, { primary: ATALHOS_DA_BARRA_ROW_TITLE, secondary: "Somente os dois atalhos ao lado do logo", primaryTypographyProps: { fontWeight: 500 }, secondaryTypographyProps: {
|
|
153330
|
+
fontSize: "0.8125rem",
|
|
153331
|
+
lineHeight: 1.35,
|
|
153332
|
+
} }),
|
|
153333
|
+
React$1.createElement(ChevronRight$2, { sx: {
|
|
153334
|
+
color: theme.palette.text.secondary,
|
|
153335
|
+
fontSize: 20,
|
|
153336
|
+
} })))))),
|
|
153052
153337
|
data.widgets.length > 0 && (React$1.createElement(Box$1, null,
|
|
153053
153338
|
React$1.createElement(Typography$1, { variant: "subtitle2", color: "text.secondary", sx: sectionTitleSx$2 }, "Widgets"),
|
|
153054
153339
|
React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", sx: sectionDescriptionSx }, WIDGETS_SECTION_DESCRIPTION),
|
|
@@ -153084,7 +153369,8 @@ const HomeMenu = (props) => {
|
|
|
153084
153369
|
data.view === "order" && (React$1.createElement(Box$1, null,
|
|
153085
153370
|
React$1.createElement(Typography$1, { variant: "body2", color: "text.secondary", sx: Object.assign(Object.assign({}, sectionDescriptionSx), { mt: 0 }) }, ORDENAR_WIDGETS_DESCRIPTION),
|
|
153086
153371
|
React$1.createElement(Button$1, { fullWidth: true, variant: "outlined", color: "primary", "data-testid": "home-widget-order-reset", "aria-label": RESTAURAR_ORDEM_PADRAO_LABEL, disabled: data.isDefaultOrder, onClick: fns.handleWidgetOrderReset, sx: { mb: 1.5, textTransform: "none", fontWeight: 500 } }, RESTAURAR_ORDEM_PADRAO_LABEL),
|
|
153087
|
-
React$1.createElement(HomeMenuOrderList, { widgets: data.reorderableWidgets, cardBg: cardBg, onMove: fns.handleWidgetOrderMove, onReorder: fns.handleWidgetOrderReorder })))
|
|
153372
|
+
React$1.createElement(HomeMenuOrderList, { widgets: data.reorderableWidgets, cardBg: cardBg, onMove: fns.handleWidgetOrderMove, onReorder: fns.handleWidgetOrderReorder }))),
|
|
153373
|
+
data.view === "shortcuts" && data.bottomNavShortcuts && (React$1.createElement(HomeMenuShortcuts, { actions: data.actions, shortcuts: data.bottomNavShortcuts, profileKind: data.bottomNavProfileKind, profileLabel: data.bottomNavProfileLabel, isDefault: data.isDefaultBottomNavShortcuts, onChange: fns.handleBottomNavShortcutChange, onReset: fns.handleBottomNavShortcutReset }))))));
|
|
153088
153374
|
};
|
|
153089
153375
|
var HomeMenu$1 = React$1.memo(HomeMenu);
|
|
153090
153376
|
|
|
@@ -153876,7 +154162,25 @@ const SupplyPlanCard = ({ supplyPlanData, isLoadingSupplyPlan = false, onSupplyP
|
|
|
153876
154162
|
const HOME_BOTTOM_NAV_HEIGHT = 52;
|
|
153877
154163
|
/** Float margin below the pill (before safe-area). */
|
|
153878
154164
|
const HOME_BOTTOM_NAV_FLOAT_MB = 16;
|
|
153879
|
-
const
|
|
154165
|
+
const shortcutBadgeContent = (badge) => {
|
|
154166
|
+
if (badge == null || badge === 0 || badge === "0")
|
|
154167
|
+
return undefined;
|
|
154168
|
+
return badge;
|
|
154169
|
+
};
|
|
154170
|
+
const ShortcutTab = ({ action, onQuickAction, showLabel = true, selected, value, onChange, }) => {
|
|
154171
|
+
const badge = shortcutBadgeContent(action.badge);
|
|
154172
|
+
const isSocial = action.id === "social";
|
|
154173
|
+
const icon = resolveActionIcon(action.icon);
|
|
154174
|
+
return (React$1.createElement(BottomNavigationAction$1, { showLabel: showLabel, value: value, className: selected ? "Mui-selected" : undefined, label: isSocial ? "Social" : action.label, "aria-label": isSocial && badge != null
|
|
154175
|
+
? `Social, ${badge} notificações não lidas`
|
|
154176
|
+
: undefined, icon: isSocial ? (React$1.createElement(Badge$1, { badgeContent: badge, color: "error", invisible: badge == null, max: 99, "data-testid": "home-bottom-nav-social-badge" }, icon)) : (icon), onClick: () => {
|
|
154177
|
+
if (value !== undefined) {
|
|
154178
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({}, value);
|
|
154179
|
+
}
|
|
154180
|
+
onQuickAction(action.route);
|
|
154181
|
+
}, "data-testid": isSocial ? "home-bottom-nav-social" : `home-bottom-nav-${action.id}` }));
|
|
154182
|
+
};
|
|
154183
|
+
const HomeBottomNav = React$1.memo(function HomeBottomNav({ value, onChange, onQuickAction, onMenu, menuOpen = false, onOpenProfileSelector, hasTerreiroContext = true, canUseSocial = false, socialNotificationsUnreadCount = 0, leadingAction, trailingAction, }) {
|
|
153880
154184
|
const measureRef = useMeasureSlot(HOME_MEASURE_SLOTS.bottomNav);
|
|
153881
154185
|
const { isScrolling } = useHideOnScroll();
|
|
153882
154186
|
const [entered, setEntered] = React$1.useState(false);
|
|
@@ -153945,17 +154249,16 @@ const HomeBottomNav = React$1.memo(function HomeBottomNav({ value, onChange, onQ
|
|
|
153945
154249
|
},
|
|
153946
154250
|
} },
|
|
153947
154251
|
React$1.createElement(BottomNavigationAction$1, { label: "Home", icon: React$1.createElement(Home$1, null), onClick: () => onQuickAction("/") }),
|
|
153948
|
-
hasTerreiroContext ? (React$1.createElement(BottomNavigationAction$1, { label: "Eventos", icon: React$1.createElement(CalendarToday, null), onClick: () => onQuickAction("/events") })) : canUseSocial ? (React$1.createElement(BottomNavigationAction$1, { label: "Social", icon: React$1.createElement(Badge$1, { badgeContent: socialBadge, color: "error", invisible: socialBadge == null, max: 99, "data-testid": "home-bottom-nav-social-badge" },
|
|
154252
|
+
leadingAction ? (React$1.createElement(ShortcutTab, { action: leadingAction, onQuickAction: onQuickAction })) : hasTerreiroContext ? (React$1.createElement(BottomNavigationAction$1, { label: "Eventos", icon: React$1.createElement(CalendarToday, null), onClick: () => onQuickAction("/events") })) : canUseSocial ? (React$1.createElement(BottomNavigationAction$1, { label: "Social", icon: React$1.createElement(Badge$1, { badgeContent: socialBadge, color: "error", invisible: socialBadge == null, max: 99, "data-testid": "home-bottom-nav-social-badge" },
|
|
153949
154253
|
React$1.createElement(Public, null)), onClick: () => onQuickAction("/social"), "data-testid": "home-bottom-nav-social", "aria-label": socialBadge != null
|
|
153950
154254
|
? `Social, ${socialBadge} notificações não lidas`
|
|
153951
154255
|
: "Social" })) : (React$1.createElement(BottomNavigationAction$1, { label: "Banhos", icon: React$1.createElement(Spa, null), onClick: () => onQuickAction("/ritual-baths") })),
|
|
153952
154256
|
React$1.createElement(BottomNavigationAction$1, { label: "", "aria-label": "Selecione um perfil", sx: { overflow: "visible" }, icon: React$1.createElement(Box$1, { component: "img", src: LogoImg, alt: "Logo", sx: {
|
|
153953
|
-
width:
|
|
153954
|
-
height:
|
|
154257
|
+
width: 52,
|
|
154258
|
+
height: 52,
|
|
153955
154259
|
borderRadius: RADIUS.circle,
|
|
153956
154260
|
objectFit: "cover",
|
|
153957
154261
|
boxShadow: (theme) => `0 4px 12px ${theme.palette.primary.main}40`,
|
|
153958
|
-
transform: "translateY(-6px)",
|
|
153959
154262
|
transition: `transform ${ANIMATION_DURATION.fast}ms ${ANIMATION_EASING.spring}, box-shadow ${ANIMATION_DURATION.fast}ms ${ANIMATION_EASING.spring}`,
|
|
153960
154263
|
"&:hover": {
|
|
153961
154264
|
transform: "translateY(-8px) scale(1.04)",
|
|
@@ -153965,7 +154268,7 @@ const HomeBottomNav = React$1.memo(function HomeBottomNav({ value, onChange, onQ
|
|
|
153965
154268
|
transform: "translateY(-4px) scale(0.96)",
|
|
153966
154269
|
},
|
|
153967
154270
|
} }), onClick: onOpenProfileSelector }),
|
|
153968
|
-
React$1.createElement(BottomNavigationAction$1, { label: "Atividades", icon: React$1.createElement(EventIcon, null), onClick: () => onQuickAction("/activities") }),
|
|
154271
|
+
trailingAction ? (React$1.createElement(ShortcutTab, { action: trailingAction, onQuickAction: onQuickAction })) : (React$1.createElement(BottomNavigationAction$1, { label: "Atividades", icon: React$1.createElement(EventIcon, null), onClick: () => onQuickAction("/activities") })),
|
|
153969
154272
|
React$1.createElement(BottomNavigationAction$1, { label: "Menu", icon: React$1.createElement(Menu, null), onClick: onMenu, "aria-expanded": menuOpen }))))));
|
|
153970
154273
|
});
|
|
153971
154274
|
|
|
@@ -156307,7 +156610,7 @@ const resolveIsPersonalProfile = (args) => {
|
|
|
156307
156610
|
return (_a = args.isPersonalProfile) !== null && _a !== void 0 ? _a : args.selectedTerreiro === null;
|
|
156308
156611
|
};
|
|
156309
156612
|
const HomePage = (props) => {
|
|
156310
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
156613
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
156311
156614
|
const theme = useTheme$1();
|
|
156312
156615
|
const { data, fns } = useHomePage(props);
|
|
156313
156616
|
const [drawerOpen, setDrawerOpen] = React$1.useState(false);
|
|
@@ -156326,9 +156629,37 @@ const HomePage = (props) => {
|
|
|
156326
156629
|
isPersonalProfile: props.isPersonalProfile,
|
|
156327
156630
|
});
|
|
156328
156631
|
}, [props.terreiros, data === null || data === void 0 ? void 0 : data.selectedTerreiro, props.isPersonalProfile]);
|
|
156632
|
+
const hasTerreiroContext = Boolean((_c = data === null || data === void 0 ? void 0 : data.selectedTerreiro) === null || _c === void 0 ? void 0 : _c.id);
|
|
156633
|
+
const bottomNavScopeKey = (_e = (_d = data === null || data === void 0 ? void 0 : data.selectedTerreiro) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : "personal";
|
|
156634
|
+
const shortcutsControlled = props.onBottomNavShortcutChange !== undefined;
|
|
156635
|
+
const [localBottomNavShortcuts, setLocalBottomNavShortcuts] = React$1.useState({});
|
|
156636
|
+
const requestedBottomNavShortcuts = shortcutsControlled
|
|
156637
|
+
? props.bottomNavShortcuts
|
|
156638
|
+
: localBottomNavShortcuts[bottomNavScopeKey];
|
|
156639
|
+
const bottomNavResolved = React$1.useMemo(() => {
|
|
156640
|
+
var _a;
|
|
156641
|
+
return resolveBottomNavShortcuts({
|
|
156642
|
+
shortcuts: requestedBottomNavShortcuts,
|
|
156643
|
+
actions: ((_a = data === null || data === void 0 ? void 0 : data.quickActions) !== null && _a !== void 0 ? _a : []),
|
|
156644
|
+
hasTerreiroContext,
|
|
156645
|
+
canUseSocial: Boolean(props.canUseSocial),
|
|
156646
|
+
});
|
|
156647
|
+
}, [
|
|
156648
|
+
requestedBottomNavShortcuts,
|
|
156649
|
+
data === null || data === void 0 ? void 0 : data.quickActions,
|
|
156650
|
+
hasTerreiroContext,
|
|
156651
|
+
props.canUseSocial,
|
|
156652
|
+
]);
|
|
156653
|
+
const handleBottomNavShortcutChange = React$1.useCallback((next) => {
|
|
156654
|
+
var _a;
|
|
156655
|
+
if (!shortcutsControlled) {
|
|
156656
|
+
setLocalBottomNavShortcuts((current) => (Object.assign(Object.assign({}, current), { [bottomNavScopeKey]: next })));
|
|
156657
|
+
}
|
|
156658
|
+
(_a = props.onBottomNavShortcutChange) === null || _a === void 0 ? void 0 : _a.call(props, next);
|
|
156659
|
+
}, [shortcutsControlled, bottomNavScopeKey, props]);
|
|
156329
156660
|
const profileSelector = useProfileSelector({
|
|
156330
|
-
terreiros: (
|
|
156331
|
-
selectedTerreiroIdx: (
|
|
156661
|
+
terreiros: (_f = props.terreiros) !== null && _f !== void 0 ? _f : [],
|
|
156662
|
+
selectedTerreiroIdx: (_g = data === null || data === void 0 ? void 0 : data.selectedTerreiroIdx) !== null && _g !== void 0 ? _g : 0,
|
|
156332
156663
|
onTerreiroChange: (terreiro, idx) => {
|
|
156333
156664
|
fns === null || fns === void 0 ? void 0 : fns.handleTerreiroChange(terreiro, idx);
|
|
156334
156665
|
},
|
|
@@ -156405,7 +156736,7 @@ const HomePage = (props) => {
|
|
|
156405
156736
|
(Boolean(props.terreiroCompletenessData) ||
|
|
156406
156737
|
Boolean(props.isLoadingTerreiroCompleteness));
|
|
156407
156738
|
const showGamification = visibleWidgets.gamification && props.showGamificationCard !== false;
|
|
156408
|
-
const widgetOrder = (
|
|
156739
|
+
const widgetOrder = (_h = data.widgetOrder) !== null && _h !== void 0 ? _h : DEFAULT_HOME_WIDGET_ORDER;
|
|
156409
156740
|
const showMoonPhaseContent = visibleWidgets.moonPhase &&
|
|
156410
156741
|
(Boolean(props.moonData) || Boolean(props.isLoadingMoonData));
|
|
156411
156742
|
const showDailyRitualsContent = visibleWidgets.dailyRituals &&
|
|
@@ -156457,12 +156788,12 @@ const HomePage = (props) => {
|
|
|
156457
156788
|
color: theme.palette.text.primary,
|
|
156458
156789
|
position: "relative",
|
|
156459
156790
|
} },
|
|
156460
|
-
React$1.createElement(TopBar, { user: data.user, terreiros: (
|
|
156791
|
+
React$1.createElement(TopBar, { user: data.user, terreiros: (_j = props.terreiros) !== null && _j !== void 0 ? _j : [], greeting: data.greeting, onProfileClick: fns.handleProfileClick, onTerreiroAvatarClick: () => profileSelector.fns.openProfileDrawer("top_bar_avatar"), onOpenDrawer: () => setDrawerOpen(true), onSettings: fns.handleSettingsClick, onOnboardingInfoClick: props.onOnboardingInfoClick, onboardingInfoIcon: props.onboardingInfoIcon, inviteShareUrl: props.inviteShareUrl, onTerreiroChange: (terreiro) => {
|
|
156461
156792
|
const idx = Array.isArray(props.terreiros)
|
|
156462
156793
|
? props.terreiros.findIndex((t) => t === terreiro)
|
|
156463
156794
|
: 0;
|
|
156464
156795
|
fns.handleTerreiroChange(terreiro, idx);
|
|
156465
|
-
}, selectedTerreiroIdx: data.selectedTerreiroIdx, quickActions: data.quickActions, onQuickActionClick: fns.handleQuickActionClick, showQuickActions: showQuickActions, onLayoutChange: handleLayoutChange, badgeTier: (
|
|
156796
|
+
}, selectedTerreiroIdx: data.selectedTerreiroIdx, quickActions: data.quickActions, onQuickActionClick: fns.handleQuickActionClick, showQuickActions: showQuickActions, onLayoutChange: handleLayoutChange, badgeTier: (_k = props.profileCompletenessData) === null || _k === void 0 ? void 0 : _k.badgeTier, onNotificationClick: isActivePersonalProfile ? undefined : props.onNotificationClick, notificationCount: isActivePersonalProfile ? undefined : props.notificationCount, notificationItems: isActivePersonalProfile ? undefined : props.notificationItems, onViewAllNotifications: isActivePersonalProfile ? undefined : props.onViewAllNotifications }),
|
|
156466
156797
|
React$1.createElement(Container$1, { maxWidth: "md", sx: {
|
|
156467
156798
|
px: PAGE_LIST_CONTAINER_SPACING.px,
|
|
156468
156799
|
} },
|
|
@@ -156471,8 +156802,8 @@ const HomePage = (props) => {
|
|
|
156471
156802
|
React$1.createElement(MediumStatusAlert, { mediumStatus: data.mediumStatus, showApprovedAlert: showApprovedAlert, onShowApprovedAlert: handleShowApprovedAlert, setShowRejectedDialog: setShowRejectedDialog }))),
|
|
156472
156803
|
React$1.createElement(RejectionReasonDialog$1, { open: !!showRejectedDialog, rejectionMessage: data.rejectionMessage, onClose: handleShowRejectedDialog }),
|
|
156473
156804
|
widgetOrder.map((id) => renderHomeWidget(id)))),
|
|
156474
|
-
React$1.createElement(HomeBottomNav, { value: bottomNavValue, onChange: setBottomNavValue, onQuickAction: handleBottomQuickAction, onMenu: handleToggleMenu, menuOpen: menuOpen, onOpenProfileSelector: () => profileSelector.fns.openProfileDrawer("bottom_nav_logo"), hasTerreiroContext:
|
|
156475
|
-
React$1.createElement(HomeMenu$1, { open: menuOpen, onClose: handleCloseMenu, actions: data.quickActions, onActionClick: fns.handleQuickActionClick, widgets: (
|
|
156805
|
+
React$1.createElement(HomeBottomNav, { value: bottomNavValue, onChange: setBottomNavValue, onQuickAction: handleBottomQuickAction, onMenu: handleToggleMenu, menuOpen: menuOpen, onOpenProfileSelector: () => profileSelector.fns.openProfileDrawer("bottom_nav_logo"), hasTerreiroContext: hasTerreiroContext, canUseSocial: Boolean(props.canUseSocial), socialNotificationsUnreadCount: (_l = props.socialNotificationsUnreadCount) !== null && _l !== void 0 ? _l : 0, leadingAction: bottomNavResolved.leading, trailingAction: bottomNavResolved.trailing }),
|
|
156806
|
+
React$1.createElement(HomeMenu$1, { open: menuOpen, onClose: handleCloseMenu, actions: data.quickActions, onActionClick: fns.handleQuickActionClick, widgets: (_m = data.menuWidgets) !== null && _m !== void 0 ? _m : [], onWidgetVisibilityChange: (_o = fns.handleHomeWidgetVisibilityChange) !== null && _o !== void 0 ? _o : (() => undefined), showQuickActions: showQuickActions, onShowQuickActionsChange: (_p = fns.handleShowQuickActionsChange) !== null && _p !== void 0 ? _p : (() => undefined), widgetOrder: widgetOrder, reorderableWidgets: (_q = data.reorderableWidgets) !== null && _q !== void 0 ? _q : [], defaultWidgetOrder: (_r = data.defaultWidgetOrder) !== null && _r !== void 0 ? _r : [], onWidgetOrderChange: (_s = fns.handleHomeWidgetOrderChange) !== null && _s !== void 0 ? _s : (() => undefined), onWidgetsCustomizeViewOpen: fns.handleHomeWidgetsCustomizeViewOpen, bottomNavShortcuts: bottomNavResolved.shortcuts, defaultBottomNavShortcuts: bottomNavResolved.defaults, onBottomNavShortcutChange: handleBottomNavShortcutChange, bottomNavProfileKind: hasTerreiroContext ? "terreiro" : "personal", bottomNavProfileLabel: (_u = (_t = data.selectedTerreiro) === null || _t === void 0 ? void 0 : _t.name) !== null && _u !== void 0 ? _u : BOTTOM_NAV_PROFILE_PERSONAL_LABEL }),
|
|
156476
156807
|
React$1.createElement(ProfileSelectorDrawer, { open: profileSelector.data.profileDrawerOpen, onClose: profileSelector.fns.closeProfileDrawer, terreiros: profileSelector.data.terreiros, selectedTerreiroIdx: profileSelector.data.selectedTerreiroIdx, onTerreiroSelect: profileSelector.fns.handleTerreiroSelect, inviteShareUrl: props.inviteShareUrl, snackbarOpen: profileSelector.data.snackbarOpen, snackbarMsg: profileSelector.data.snackbarMsg, onSnackbarClose: profileSelector.fns.handleSnackbarClose }),
|
|
156477
156808
|
React$1.createElement(SettingsDrawer, { open: drawerOpen, onClose: () => setDrawerOpen(false), onRefresh: fns.handleRefresh, onSettings: fns.handleSettingsClick }))));
|
|
156478
156809
|
};
|
|
@@ -196308,6 +196639,7 @@ exports.getContentMarginTop = getContentMarginTop;
|
|
|
196308
196639
|
exports.getContentPaddingTop = getContentPaddingTop;
|
|
196309
196640
|
exports.getCustomBannerGradient = getCustomBannerGradient;
|
|
196310
196641
|
exports.getDateString = getDateString;
|
|
196642
|
+
exports.getDefaultBottomNavShortcuts = getDefaultBottomNavShortcuts;
|
|
196311
196643
|
exports.getDefaultHomeWidgetOrder = getDefaultHomeWidgetOrder;
|
|
196312
196644
|
exports.getHomeWidgetsForProfile = getHomeWidgetsForProfile;
|
|
196313
196645
|
exports.getReorderableHomeWidgetsForProfile = getReorderableHomeWidgetsForProfile;
|
|
@@ -196351,6 +196683,7 @@ exports.overlayZIndex = overlayZIndex;
|
|
|
196351
196683
|
exports.parseScheduleDate = parseScheduleDate;
|
|
196352
196684
|
exports.radiusPx = radiusPx;
|
|
196353
196685
|
exports.reorderHomeWidgetOrder = reorderHomeWidgetOrder;
|
|
196686
|
+
exports.resolveBottomNavShortcuts = resolveBottomNavShortcuts;
|
|
196354
196687
|
exports.resolveExperiencePostType = resolveExperiencePostType;
|
|
196355
196688
|
exports.secondsToRoundedMinutes = secondsToRoundedMinutes;
|
|
196356
196689
|
exports.startPasskeyAuthentication = startPasskeyAuthentication;
|
package/dist/bundle.cjs.js.map
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/bundle.cjs.js.map
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 59397443 bytes
|
|
4
|
+
sha256: 5503726f0a04457be04f3d1f746f1c7faa52be59ac6b05537c6946ea5ef02611
|