gsintegrations 0.0.490 → 0.0.492
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 +1076 -944
- package/dist/bundle.cjs.js.map +2 -2
- package/dist/bundle.esm.js +1068 -945
- package/dist/bundle.esm.js.map +2 -2
- package/dist/index.d.ts +99 -5
- package/dist/types/components/molecules/NotchedBottomBar/NotchedBottomBar.d.ts +36 -0
- package/dist/types/components/molecules/NotchedBottomBar/index.d.ts +2 -0
- package/dist/types/components/molecules/index.d.ts +1 -0
- package/dist/types/components/social/SocialHomeBottomNav.d.ts +5 -3
- package/dist/types/components/social/index.d.ts +1 -1
- package/dist/types/pages/FinancialAccountsList/FinancialAccountsList.d.ts +1 -0
- package/dist/types/pages/FinancialAccountsList/FinancialAccountsList.types.d.ts +3 -0
- package/dist/types/pages/HomePage/HomePage.constants.d.ts +2 -2
- package/dist/types/pages/HomePage/HomePage.types.d.ts +48 -2
- package/dist/types/pages/HomePage/components/HomeBottomNav.d.ts +10 -3
- 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/index.d.ts +1 -1
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
|
|
2
|
+
import { type HomeBottomNavProfileKind, type HomeBottomNavShortcuts } from "./bottomNavShortcuts";
|
|
3
|
+
export declare const HomeMenuViewSchema: z.ZodEnum<["root", "visibility", "order", "shortcuts"]>;
|
|
3
4
|
export type HomeMenuView = z.infer<typeof HomeMenuViewSchema>;
|
|
4
5
|
export declare const HomeMenuPropsSchema: z.ZodObject<{
|
|
5
6
|
open: z.ZodBoolean;
|
|
@@ -102,6 +103,45 @@ export declare const HomeMenuPropsSchema: z.ZodObject<{
|
|
|
102
103
|
* Does not fire for root Opções or back navigation.
|
|
103
104
|
*/
|
|
104
105
|
onWidgetsCustomizeViewOpen: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodEnum<["visibility", "order"]>], null>, z.ZodVoid>>;
|
|
106
|
+
/**
|
|
107
|
+
* Resolved leading/trailing Funcionalidade ids for the active profile.
|
|
108
|
+
* Shown in Atalhos da barra. Omitted with onBottomNavShortcutChange hides the section.
|
|
109
|
+
*/
|
|
110
|
+
bottomNavShortcuts: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
leading: z.ZodString;
|
|
112
|
+
trailing: z.ZodString;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
leading: string;
|
|
115
|
+
trailing: string;
|
|
116
|
+
}, {
|
|
117
|
+
leading: string;
|
|
118
|
+
trailing: string;
|
|
119
|
+
}>>;
|
|
120
|
+
/** Profile defaults used by Restaurar padrão. */
|
|
121
|
+
defaultBottomNavShortcuts: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
leading: z.ZodString;
|
|
123
|
+
trailing: z.ZodString;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
leading: string;
|
|
126
|
+
trailing: string;
|
|
127
|
+
}, {
|
|
128
|
+
leading: string;
|
|
129
|
+
trailing: string;
|
|
130
|
+
}>>;
|
|
131
|
+
onBottomNavShortcutChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
132
|
+
leading: z.ZodString;
|
|
133
|
+
trailing: z.ZodString;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
leading: string;
|
|
136
|
+
trailing: string;
|
|
137
|
+
}, {
|
|
138
|
+
leading: string;
|
|
139
|
+
trailing: string;
|
|
140
|
+
}>], null>, z.ZodVoid>>;
|
|
141
|
+
/** personal vs the selected terreiro — copy explains the choice is not shared. */
|
|
142
|
+
bottomNavProfileKind: z.ZodOptional<z.ZodEnum<["personal", "terreiro"]>>;
|
|
143
|
+
/** Terreiro name, or "Perfil pessoal". */
|
|
144
|
+
bottomNavProfileLabel: z.ZodOptional<z.ZodString>;
|
|
105
145
|
}, "strip", z.ZodTypeAny, {
|
|
106
146
|
onClose: () => void;
|
|
107
147
|
open: boolean;
|
|
@@ -139,6 +179,20 @@ export declare const HomeMenuPropsSchema: z.ZodObject<{
|
|
|
139
179
|
}[] | undefined;
|
|
140
180
|
defaultWidgetOrder?: ("attendance" | "calendar" | "highlights" | "quickActions" | "weeklyTasks" | "profileCompleteness" | "terreiroCompleteness" | "gamification" | "supplyPlan" | "moonPhase" | "dailyRituals")[] | undefined;
|
|
141
181
|
onWidgetsCustomizeViewOpen?: ((args_0: "order" | "visibility") => void) | undefined;
|
|
182
|
+
bottomNavShortcuts?: {
|
|
183
|
+
leading: string;
|
|
184
|
+
trailing: string;
|
|
185
|
+
} | undefined;
|
|
186
|
+
defaultBottomNavShortcuts?: {
|
|
187
|
+
leading: string;
|
|
188
|
+
trailing: string;
|
|
189
|
+
} | undefined;
|
|
190
|
+
onBottomNavShortcutChange?: ((args_0: {
|
|
191
|
+
leading: string;
|
|
192
|
+
trailing: string;
|
|
193
|
+
}) => void) | undefined;
|
|
194
|
+
bottomNavProfileKind?: "terreiro" | "personal" | undefined;
|
|
195
|
+
bottomNavProfileLabel?: string | undefined;
|
|
142
196
|
}, {
|
|
143
197
|
onClose: () => void;
|
|
144
198
|
open: boolean;
|
|
@@ -176,7 +230,22 @@ export declare const HomeMenuPropsSchema: z.ZodObject<{
|
|
|
176
230
|
}[] | undefined;
|
|
177
231
|
defaultWidgetOrder?: ("attendance" | "calendar" | "highlights" | "quickActions" | "weeklyTasks" | "profileCompleteness" | "terreiroCompleteness" | "gamification" | "supplyPlan" | "moonPhase" | "dailyRituals")[] | undefined;
|
|
178
232
|
onWidgetsCustomizeViewOpen?: ((args_0: "order" | "visibility") => void) | undefined;
|
|
233
|
+
bottomNavShortcuts?: {
|
|
234
|
+
leading: string;
|
|
235
|
+
trailing: string;
|
|
236
|
+
} | undefined;
|
|
237
|
+
defaultBottomNavShortcuts?: {
|
|
238
|
+
leading: string;
|
|
239
|
+
trailing: string;
|
|
240
|
+
} | undefined;
|
|
241
|
+
onBottomNavShortcutChange?: ((args_0: {
|
|
242
|
+
leading: string;
|
|
243
|
+
trailing: string;
|
|
244
|
+
}) => void) | undefined;
|
|
245
|
+
bottomNavProfileKind?: "terreiro" | "personal" | undefined;
|
|
246
|
+
bottomNavProfileLabel?: string | undefined;
|
|
179
247
|
}>;
|
|
248
|
+
export type { HomeBottomNavProfileKind, HomeBottomNavShortcuts };
|
|
180
249
|
export type HomeMenuProps = z.infer<typeof HomeMenuPropsSchema>;
|
|
181
250
|
export declare const FUNCIONALIDADES_SECTION_DESCRIPTION = "Atalhos para as principais \u00E1reas e a\u00E7\u00F5es do terreiro.";
|
|
182
251
|
export declare const WIDGETS_SECTION_DESCRIPTION = "Personalize quais widgets aparecem na tela inicial e em que ordem.";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { QuickAction } from "./QuickActionsBar.types";
|
|
3
|
+
import { type HomeBottomNavProfileKind, type HomeBottomNavShortcuts } from "./bottomNavShortcuts";
|
|
4
|
+
declare const HomeMenuShortcuts: React.FunctionComponent<{
|
|
5
|
+
actions: QuickAction[];
|
|
6
|
+
shortcuts: HomeBottomNavShortcuts;
|
|
7
|
+
profileKind: HomeBottomNavProfileKind;
|
|
8
|
+
profileLabel?: string;
|
|
9
|
+
isDefault: boolean;
|
|
10
|
+
onChange: (slot: "leading" | "trailing", actionId: string) => void;
|
|
11
|
+
onReset: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
export default HomeMenuShortcuts;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Funcionalidade ids used as the untouched defaults for each profile. */
|
|
3
|
+
export declare const BOTTOM_NAV_ACTION_EVENTS = "events";
|
|
4
|
+
export declare const BOTTOM_NAV_ACTION_ACTIVITIES = "activities";
|
|
5
|
+
export declare const BOTTOM_NAV_ACTION_SOCIAL = "social";
|
|
6
|
+
export declare const BOTTOM_NAV_ACTION_RITUAL_BATHS = "ritual-baths";
|
|
7
|
+
export declare const BOTTOM_NAV_SCOPE_PERSONAL = "personal";
|
|
8
|
+
export declare const HomeBottomNavSlotSchema: z.ZodEnum<["leading", "trailing"]>;
|
|
9
|
+
export type HomeBottomNavSlot = z.infer<typeof HomeBottomNavSlotSchema>;
|
|
10
|
+
export declare const HomeBottomNavShortcutsSchema: z.ZodObject<{
|
|
11
|
+
leading: z.ZodString;
|
|
12
|
+
trailing: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
leading: string;
|
|
15
|
+
trailing: string;
|
|
16
|
+
}, {
|
|
17
|
+
leading: string;
|
|
18
|
+
trailing: string;
|
|
19
|
+
}>;
|
|
20
|
+
export type HomeBottomNavShortcuts = z.infer<typeof HomeBottomNavShortcutsSchema>;
|
|
21
|
+
export declare const HomeBottomNavProfileKindSchema: z.ZodEnum<["personal", "terreiro"]>;
|
|
22
|
+
export type HomeBottomNavProfileKind = z.infer<typeof HomeBottomNavProfileKindSchema>;
|
|
23
|
+
export declare const ATALHOS_DA_BARRA_TITLE = "Atalhos da barra";
|
|
24
|
+
export declare const ATALHOS_DA_BARRA_ROW_TITLE = "Escolher atalhos";
|
|
25
|
+
export declare const ATALHOS_DA_BARRA_SECTION_DESCRIPTION = "Troque os dois atalhos ao lado do logo por outras Funcionalidades. Home, o logo e Menu n\u00E3o mudam, e a escolha vale s\u00F3 para este perfil.";
|
|
26
|
+
export declare const ATALHOS_DA_BARRA_ONLY_TWO_TEXT = "Somente estes dois atalhos podem ser alterados. Home, o logo (troca de perfil) e Menu permanecem fixos.";
|
|
27
|
+
export declare const ATALHOS_DA_BARRA_FROM_FUNCIONALIDADES_TEXT = "A lista \u00E9 a de Funcionalidades deste perfil.";
|
|
28
|
+
export declare const ATALHOS_DA_BARRA_PERSONAL_SCOPE_TEXT = "Esta escolha fica s\u00F3 no perfil pessoal. Cada terreiro guarda a sua, separada.";
|
|
29
|
+
export declare const atalhosDaBarraTerreiroScopeText: (terreiroName: string) => string;
|
|
30
|
+
export declare const ATALHOS_DA_BARRA_LEADING_LABEL = "Esquerda";
|
|
31
|
+
export declare const ATALHOS_DA_BARRA_TRAILING_LABEL = "Direita";
|
|
32
|
+
export declare const ATALHOS_DA_BARRA_USED_ELSEWHERE = "Usado no outro atalho";
|
|
33
|
+
export declare const RESTAURAR_ATALHOS_PADRAO_LABEL = "Restaurar padr\u00E3o";
|
|
34
|
+
export declare const BOTTOM_NAV_PROFILE_PERSONAL_LABEL = "Perfil pessoal";
|
|
35
|
+
type ShortcutSource = {
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
route: string;
|
|
39
|
+
icon?: string;
|
|
40
|
+
badge?: number | string;
|
|
41
|
+
};
|
|
42
|
+
/** Action rendered in one changeable bottom-nav slot. */
|
|
43
|
+
export type HomeBottomNavShortcutAction = {
|
|
44
|
+
id: string;
|
|
45
|
+
label: string;
|
|
46
|
+
route: string;
|
|
47
|
+
icon?: string;
|
|
48
|
+
badge?: number | string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The events Funcionalidade is titled "Giras" in the menu.
|
|
52
|
+
* The bar keeps the established short label "Eventos".
|
|
53
|
+
*/
|
|
54
|
+
export declare const bottomNavLabelForAction: (action: {
|
|
55
|
+
id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
}) => string;
|
|
58
|
+
export declare const getDefaultBottomNavShortcuts: (input: {
|
|
59
|
+
hasTerreiroContext: boolean;
|
|
60
|
+
canUseSocial?: boolean;
|
|
61
|
+
}) => HomeBottomNavShortcuts;
|
|
62
|
+
/**
|
|
63
|
+
* Maps stored ids onto the current Funcionalidades.
|
|
64
|
+
* A missing id falls back to that profile's default. The two slots never share an id.
|
|
65
|
+
*/
|
|
66
|
+
export declare const resolveBottomNavShortcuts: (input: {
|
|
67
|
+
shortcuts?: Partial<HomeBottomNavShortcuts> | null;
|
|
68
|
+
actions: readonly ShortcutSource[];
|
|
69
|
+
hasTerreiroContext: boolean;
|
|
70
|
+
canUseSocial?: boolean;
|
|
71
|
+
}) => {
|
|
72
|
+
leading: HomeBottomNavShortcutAction;
|
|
73
|
+
trailing: HomeBottomNavShortcutAction;
|
|
74
|
+
shortcuts: HomeBottomNavShortcuts;
|
|
75
|
+
defaults: HomeBottomNavShortcuts;
|
|
76
|
+
isDefault: boolean;
|
|
77
|
+
};
|
|
78
|
+
export {};
|
|
@@ -17,7 +17,7 @@ export { default as AttendanceInsightsSection } from "./AttendanceInsightsSectio
|
|
|
17
17
|
export type { AttendanceInsightsSectionProps } from "./AttendanceInsightsSection";
|
|
18
18
|
export { SupplyPlanCard } from "./SupplyPlanCard";
|
|
19
19
|
export type { SupplyPlanCardProps } from "./SupplyPlanCard";
|
|
20
|
-
export { default as HomeBottomNav, HOME_BOTTOM_NAV_HEIGHT, HOME_BOTTOM_NAV_FLOAT_MB, HOME_BOTTOM_NAV_CLEARANCE, } from "./HomeBottomNav";
|
|
20
|
+
export { default as HomeBottomNav, HOME_BOTTOM_NAV_HEIGHT, HOME_BOTTOM_NAV_PROTRUSION, HOME_BOTTOM_NAV_FLOAT_MB, HOME_BOTTOM_NAV_CLEARANCE, } from "./HomeBottomNav";
|
|
21
21
|
export { default as ProfileSelectorDrawer } from "./ProfileSelectorDrawer";
|
|
22
22
|
export type { ProfileSelectorDrawerProps } from "./ProfileSelectorDrawer";
|
|
23
23
|
export { default as useProfileSelector } from "./useProfileSelector";
|
|
@@ -26,22 +26,33 @@ declare const useHomeMenu: (props: HomeMenuProps) => {
|
|
|
26
26
|
description: string;
|
|
27
27
|
}[];
|
|
28
28
|
showQuickActions: boolean;
|
|
29
|
-
view: "order" | "visibility" | "root";
|
|
29
|
+
view: "order" | "visibility" | "root" | "shortcuts";
|
|
30
30
|
canReorder: boolean;
|
|
31
31
|
isDefaultOrder: boolean;
|
|
32
32
|
defaultWidgetOrder: HomeWidgetOrder;
|
|
33
|
+
canCustomizeBottomNav: boolean;
|
|
34
|
+
bottomNavShortcuts: {
|
|
35
|
+
leading: string;
|
|
36
|
+
trailing: string;
|
|
37
|
+
} | undefined;
|
|
38
|
+
isDefaultBottomNavShortcuts: boolean;
|
|
39
|
+
bottomNavProfileKind: "terreiro" | "personal";
|
|
40
|
+
bottomNavProfileLabel: string | undefined;
|
|
33
41
|
};
|
|
34
42
|
fns: {
|
|
35
43
|
handleClose: () => void;
|
|
36
44
|
handleBack: () => void;
|
|
37
45
|
handleOpenVisibility: () => void;
|
|
38
46
|
handleOpenOrder: () => void;
|
|
47
|
+
handleOpenShortcuts: () => void;
|
|
39
48
|
handleActionClick: (route: string) => void;
|
|
40
49
|
handleWidgetVisibilityChange: (id: HomeWidgetId, visible: boolean) => void;
|
|
41
50
|
handleShowQuickActionsChange: (_event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
42
51
|
handleWidgetOrderMove: (id: HomeWidgetId, direction: "up" | "down") => void;
|
|
43
52
|
handleWidgetOrderReorder: (activeId: HomeWidgetId, overId: HomeWidgetId) => void;
|
|
44
53
|
handleWidgetOrderReset: () => void;
|
|
54
|
+
handleBottomNavShortcutChange: (slot: "leading" | "trailing", actionId: string) => void;
|
|
55
|
+
handleBottomNavShortcutReset: () => void;
|
|
45
56
|
};
|
|
46
57
|
};
|
|
47
58
|
export default useHomeMenu;
|
|
@@ -5,4 +5,6 @@ export { HOME_BELL_NOTIFICATION_LIMIT } from "./HomePage.constants";
|
|
|
5
5
|
export { DAILY_MESSAGE_POOL } from "./components/WelcomeAdminBox/WelcomeAdminBox";
|
|
6
6
|
export { DEFAULT_HOME_WIDGET_ORDER, DEFAULT_HOME_WIDGET_VISIBILITY, getHomeWidgetsForProfile, getReorderableHomeWidgetsForProfile, HOME_WIDGETS_CATALOG, mergeHomeWidgetOrder, mergeHomeWidgetVisibility, moveHomeWidgetInOrder, getDefaultHomeWidgetOrder, isDefaultHomeWidgetOrder, reorderHomeWidgetOrder, } from "./widgets";
|
|
7
7
|
export type { HomeWidgetCatalogEntry, HomeWidgetId, HomeWidgetMenuItem, HomeWidgetOrder, HomeWidgetOrderChangeMethod, HomeWidgetOrderChangeMeta, HomeWidgetsCustomizeView, HomeWidgetProfile, HomeWidgetVisibilityMap, } from "./widgets";
|
|
8
|
+
export type { HomeBottomNavProfileKind, HomeBottomNavShortcutAction, HomeBottomNavShortcuts, HomeBottomNavSlot, } from "./components/bottomNavShortcuts";
|
|
9
|
+
export { getDefaultBottomNavShortcuts, resolveBottomNavShortcuts, } from "./components/bottomNavShortcuts";
|
|
8
10
|
export { mockHomePageProps, mockMediumHomePageProps, mockPendingMediumHomePageProps, mockLoadingHomePageProps, mockCalendarActivities, mockCalendarEvents, mockCalendarRitualBaths, mockUser, mockTerreiros, mockQuickActions, mockUpcomingEvents, mockRituals, mockMoonData, getDateString, STATUS_COLORS, } from "./HomePage.mocks";
|
package/package.json
CHANGED