@armoyu/ui 1.0.1 → 1.0.2
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/app/api/proxy/[...path]/route.d.ts +22 -0
- package/dist/app/api/proxy/[...path]/route.d.ts.map +1 -0
- package/dist/app/api/proxy/[...path]/route.js +89 -0
- package/dist/app/api/proxy/[...path]/route.js.map +1 -0
- package/dist/app/layout.d.ts.map +1 -1
- package/dist/app/layout.js +2 -5
- package/dist/app/layout.js.map +1 -1
- package/dist/components/RollingNumber.d.ts +6 -6
- package/dist/components/RollingNumber.js +23 -23
- package/dist/components/RollingNumber.js.map +1 -1
- package/dist/components/StatsGrid.d.ts +5 -5
- package/dist/components/modules/auth/Dashboard.d.ts +1 -1
- package/dist/components/modules/auth/PostCard.d.ts +24 -24
- package/dist/components/modules/auth/PostInteractionsModal.d.ts +11 -11
- package/dist/components/modules/auth/RepostModal.d.ts +21 -21
- package/dist/components/modules/auth/SidebarLeft.d.ts +1 -1
- package/dist/components/modules/auth/Stories.d.ts +1 -1
- package/dist/components/modules/auth/StoryViewer.d.ts +9 -9
- package/dist/components/modules/chat/ChatContainer.d.ts +1 -1
- package/dist/components/modules/chat/ChatInput.d.ts +4 -4
- package/dist/components/modules/chat/ChatList.d.ts +6 -6
- package/dist/components/modules/chat/ChatNotes.d.ts +1 -1
- package/dist/components/modules/community/GroupHeader.d.ts +10 -10
- package/dist/components/modules/community/GroupMenu.d.ts +9 -9
- package/dist/components/modules/community/SchoolCard.d.ts +6 -6
- package/dist/components/modules/community/SurveyCard.d.ts +6 -6
- package/dist/components/modules/guest/Introduction.d.ts +1 -1
- package/dist/components/modules/magaza/BackToStore.d.ts +1 -1
- package/dist/components/modules/magaza/StoreHeader.d.ts +5 -5
- package/dist/components/modules/news/NewsCard.d.ts +11 -11
- package/dist/components/modules/news/NewsComments.d.ts +1 -1
- package/dist/components/modules/profile/ProfileContent.d.ts +4 -4
- package/dist/components/modules/profile/ProfileHeader.d.ts +7 -7
- package/dist/components/modules/profile/ProfileStats.d.ts +1 -1
- package/dist/components/modules/profile/ProfileStats.js +14 -14
- package/dist/components/modules/profile/ProfileStats.js.map +1 -1
- package/dist/components/modules/profile/TeamSelectorModal.d.ts +10 -10
- package/dist/components/modules/stations/StationCard.d.ts +2 -2
- package/dist/components/modules/stations/StationQRModal.d.ts +9 -9
- package/dist/components/shared/FloatingChatButton.d.ts +4 -4
- package/dist/components/shared/Header.d.ts +1 -1
- package/dist/components/shared/LoginModal.d.ts +4 -4
- package/dist/components/shared/LoginModal.d.ts.map +1 -1
- package/dist/components/shared/LoginModal.js +65 -69
- package/dist/components/shared/LoginModal.js.map +1 -1
- package/dist/components/shared/MainLayoutWrapper.d.ts +3 -3
- package/dist/components/showcase/SocialTab.d.ts.map +1 -1
- package/dist/components/showcase/SocialTab.js +47 -2
- package/dist/components/showcase/SocialTab.js.map +1 -1
- package/dist/context/AuthContext.d.ts +18 -18
- package/dist/context/AuthContext.d.ts.map +1 -1
- package/dist/context/AuthContext.js +93 -74
- package/dist/context/AuthContext.js.map +1 -1
- package/dist/context/CartContext.d.ts +16 -16
- package/dist/context/SocketContext.d.ts +12 -12
- package/dist/index.d.ts +65 -65
- package/dist/lib/constants/educationData.d.ts +7 -7
- package/dist/lib/constants/seedData.d.ts +164 -164
- package/dist/lib/constants/stationData.d.ts +13 -13
- package/dist/lib/constants/surveyData.d.ts +2 -2
- package/dist/lib/constants/teamData.d.ts +12 -12
- package/package.json +13 -11
- package/next.config.ts +0 -13
- package/postcss.config.js +0 -6
- package/src/app/layout.tsx +0 -67
- package/src/app/page.tsx +0 -101
- package/src/components/Button.tsx +0 -41
- package/src/components/GenderStatsBar.tsx +0 -66
- package/src/components/RollingNumber.tsx +0 -50
- package/src/components/Slider.tsx +0 -114
- package/src/components/StatsGrid.tsx +0 -35
- package/src/components/ViewModeToggle.tsx +0 -39
- package/src/components/modules/auth/Dashboard.tsx +0 -649
- package/src/components/modules/auth/MediaLightbox.tsx +0 -112
- package/src/components/modules/auth/PostCard.tsx +0 -556
- package/src/components/modules/auth/PostInteractionsModal.tsx +0 -138
- package/src/components/modules/auth/RepostModal.tsx +0 -167
- package/src/components/modules/auth/SidebarLeft.tsx +0 -237
- package/src/components/modules/auth/Stories.tsx +0 -69
- package/src/components/modules/auth/StoryViewer.tsx +0 -146
- package/src/components/modules/chat/ChatContainer.tsx +0 -332
- package/src/components/modules/chat/ChatInput.tsx +0 -57
- package/src/components/modules/chat/ChatList.tsx +0 -179
- package/src/components/modules/chat/ChatMessage.tsx +0 -43
- package/src/components/modules/chat/ChatNotes.tsx +0 -58
- package/src/components/modules/community/GroupHeader.tsx +0 -111
- package/src/components/modules/community/GroupMenu.tsx +0 -82
- package/src/components/modules/community/SchoolCard.tsx +0 -104
- package/src/components/modules/community/SurveyCard.tsx +0 -149
- package/src/components/modules/forum/ForumBoard.tsx +0 -78
- package/src/components/modules/forum/ForumPost.tsx +0 -71
- package/src/components/modules/forum/NewTopicModal.tsx +0 -112
- package/src/components/modules/forum/TopicItem.tsx +0 -72
- package/src/components/modules/galleries/GalleryCard.tsx +0 -66
- package/src/components/modules/giveaways/GiveawayCard.tsx +0 -76
- package/src/components/modules/groups/ApplicationModal.tsx +0 -133
- package/src/components/modules/groups/GroupCard.tsx +0 -96
- package/src/components/modules/guest/Introduction.tsx +0 -60
- package/src/components/modules/magaza/BackToStore.tsx +0 -53
- package/src/components/modules/magaza/StoreHeader.tsx +0 -74
- package/src/components/modules/news/NewsCard.tsx +0 -66
- package/src/components/modules/news/NewsComments.tsx +0 -141
- package/src/components/modules/profile/CloudStorageModal.tsx +0 -200
- package/src/components/modules/profile/EditProfileModal.tsx +0 -191
- package/src/components/modules/profile/ProfileContent.tsx +0 -491
- package/src/components/modules/profile/ProfileHeader.tsx +0 -128
- package/src/components/modules/profile/ProfileStats.tsx +0 -72
- package/src/components/modules/profile/TeamSelectorModal.tsx +0 -129
- package/src/components/modules/stations/StationCard.tsx +0 -95
- package/src/components/modules/stations/StationQRModal.tsx +0 -102
- package/src/components/shared/FloatingChatButton.tsx +0 -57
- package/src/components/shared/Footer.tsx +0 -77
- package/src/components/shared/Header.tsx +0 -799
- package/src/components/shared/LoginModal.tsx +0 -208
- package/src/components/shared/MainLayoutWrapper.tsx +0 -15
- package/src/components/shared/PageWidth.tsx +0 -22
- package/src/components/showcase/CommunityTab.tsx +0 -22
- package/src/components/showcase/CorporateTab.tsx +0 -38
- package/src/components/showcase/GeneralTab.tsx +0 -41
- package/src/components/showcase/MessagesTab.tsx +0 -26
- package/src/components/showcase/ProfileTab.tsx +0 -20
- package/src/components/showcase/ShopTab.tsx +0 -24
- package/src/components/showcase/SocialTab.tsx +0 -28
- package/src/context/AuthContext.tsx +0 -104
- package/src/context/CartContext.tsx +0 -93
- package/src/context/ChatContext.tsx +0 -32
- package/src/context/LayoutContext.tsx +0 -29
- package/src/context/SocketContext.tsx +0 -50
- package/src/context/ThemeContext.tsx +0 -52
- package/src/index.ts +0 -96
- package/src/lib/constants/educationData.ts +0 -124
- package/src/lib/constants/punishmentData.ts +0 -201
- package/src/lib/constants/seedData.ts +0 -758
- package/src/lib/constants/stationData.ts +0 -170
- package/src/lib/constants/surveyData.ts +0 -53
- package/src/lib/constants/teamData.ts +0 -69
- package/src/lib/utils/numberFormat.ts +0 -16
- package/src/lib/utils/odpUtils.ts +0 -51
- package/src/types/index.ts +0 -1
- package/src/types/stats.ts +0 -17
|
@@ -1,75 +1,94 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useContext, useState, useEffect } from 'react';
|
|
4
|
-
import { Session } from '@armoyu/core';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const [
|
|
9
|
-
const [
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
setSession(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useState, useEffect } from 'react';
|
|
4
|
+
import { Session, armoyu } from '@armoyu/core';
|
|
5
|
+
const AuthContext = createContext(undefined);
|
|
6
|
+
export function AuthProvider({ children }) {
|
|
7
|
+
const [user, setUser] = useState(null);
|
|
8
|
+
const [session, setSession] = useState(null);
|
|
9
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
10
|
+
const [isLoginModalOpen, setIsLoginModalOpen] = useState(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
async function restoreSession() {
|
|
13
|
+
// Check local storage for persistent token
|
|
14
|
+
const token = localStorage.getItem('armoyu_token');
|
|
15
|
+
if (token) {
|
|
16
|
+
try {
|
|
17
|
+
// Set token in core API client
|
|
18
|
+
armoyu.setToken(token);
|
|
19
|
+
// Request current user profile from real API
|
|
20
|
+
const me = await armoyu.auth.me();
|
|
21
|
+
if (me) {
|
|
22
|
+
setUser(me);
|
|
23
|
+
setSession(new Session({ user: me, token }));
|
|
24
|
+
console.log('[AuthContext] Session restored for:', me.username);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// Token might be expired or invalid
|
|
28
|
+
localStorage.removeItem('armoyu_token');
|
|
29
|
+
armoyu.setToken(null);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
console.error('[AuthContext] Failed to restore session:', e);
|
|
34
|
+
localStorage.removeItem('armoyu_token');
|
|
35
|
+
armoyu.setToken(null);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
setIsLoading(false);
|
|
39
|
+
}
|
|
40
|
+
restoreSession();
|
|
41
|
+
}, []);
|
|
42
|
+
const login = async (username, password) => {
|
|
43
|
+
try {
|
|
44
|
+
// Real API login via core library
|
|
45
|
+
const { user: loggedInUser, session: newSession } = await armoyu.auth.login(username, password);
|
|
46
|
+
setUser(loggedInUser);
|
|
47
|
+
setSession(newSession);
|
|
48
|
+
// Token is automatically stored in localStorage by armoyu.auth.login()
|
|
49
|
+
// but we ensure it matches our expectations
|
|
50
|
+
console.log('[AuthContext] Login successful for:', loggedInUser.username);
|
|
51
|
+
setIsLoginModalOpen(false);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
console.error('[AuthContext] Login failed:', error);
|
|
55
|
+
throw error; // Let the component handle the error UI
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const logout = () => {
|
|
59
|
+
armoyu.auth.logout(); // Clears internal state and localStorage
|
|
60
|
+
setUser(null);
|
|
61
|
+
setSession(null);
|
|
62
|
+
};
|
|
63
|
+
const updateUser = (updatedUser) => {
|
|
64
|
+
setUser(updatedUser);
|
|
65
|
+
if (session) {
|
|
66
|
+
setSession(new Session({ ...session, user: updatedUser }));
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const updateSession = (updatedSession) => {
|
|
70
|
+
setSession(updatedSession);
|
|
71
|
+
if (updatedSession.token) {
|
|
72
|
+
armoyu.setToken(updatedSession.token);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return (_jsx(AuthContext.Provider, { value: {
|
|
76
|
+
user,
|
|
77
|
+
session,
|
|
78
|
+
login,
|
|
79
|
+
logout,
|
|
80
|
+
isLoading,
|
|
81
|
+
isLoginModalOpen,
|
|
82
|
+
setIsLoginModalOpen,
|
|
83
|
+
updateUser,
|
|
84
|
+
updateSession
|
|
85
|
+
}, children: children }));
|
|
86
|
+
}
|
|
87
|
+
export function useAuth() {
|
|
88
|
+
const context = useContext(AuthContext);
|
|
89
|
+
if (context === undefined) {
|
|
90
|
+
throw new Error('useAuth must be used within an AuthProvider');
|
|
91
|
+
}
|
|
92
|
+
return context;
|
|
93
|
+
}
|
|
75
94
|
//# sourceMappingURL=AuthContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthContext.js","sourceRoot":"","sources":["../../src/context/AuthContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAQ,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AuthContext.js","sourceRoot":"","sources":["../../src/context/AuthContext.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAQ,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAcrD,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAE1E,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAiC;IACtE,MAAM,CAAC,IAAI,E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,aAAa,GAAG,CAAC,cAAuB,EAAE,EAAE;QAChD,UAAU,CAAC,cAAc,CAAC,CAAC;QAC3B,IAAI,cAAc,CAAC,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE;YAC3B,IAAI;YACJ,OAAO;YACP,KAAK;YACL,MAAM;YACN,SAAS;YACT,gBAAgB;YAChB,mBAAmB;YACnB,UAAU;YACV,aAAa;SACd,YACE,QAAQ,GACY,CACxB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACxC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Product, CartItem } from '@armoyu/core';
|
|
3
|
-
interface CartContextType {
|
|
4
|
-
cart: CartItem[];
|
|
5
|
-
addToCart: (product: Product, quantity?: number) => void;
|
|
6
|
-
removeFromCart: (productId: string) => void;
|
|
7
|
-
updateQuantity: (productId: string, quantity: number) => void;
|
|
8
|
-
clearCart: () => void;
|
|
9
|
-
totalItems: number;
|
|
10
|
-
totalPrice: number;
|
|
11
|
-
}
|
|
12
|
-
export declare function CartProvider({ children }: {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function useCart(): CartContextType;
|
|
16
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Product, CartItem } from '@armoyu/core';
|
|
3
|
+
interface CartContextType {
|
|
4
|
+
cart: CartItem[];
|
|
5
|
+
addToCart: (product: Product, quantity?: number) => void;
|
|
6
|
+
removeFromCart: (productId: string) => void;
|
|
7
|
+
updateQuantity: (productId: string, quantity: number) => void;
|
|
8
|
+
clearCart: () => void;
|
|
9
|
+
totalItems: number;
|
|
10
|
+
totalPrice: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function CartProvider({ children }: {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function useCart(): CartContextType;
|
|
16
|
+
export {};
|
|
17
17
|
//# sourceMappingURL=CartContext.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SocketEvent } from '@armoyu/core';
|
|
3
|
-
interface SocketContextType {
|
|
4
|
-
isConnected: boolean;
|
|
5
|
-
emit: (event: SocketEvent, data: any) => void;
|
|
6
|
-
on: (event: SocketEvent, callback: (data: any) => void) => () => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function SocketProvider({ children }: {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare function useSocket(): SocketContextType;
|
|
12
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SocketEvent } from '@armoyu/core';
|
|
3
|
+
interface SocketContextType {
|
|
4
|
+
isConnected: boolean;
|
|
5
|
+
emit: (event: SocketEvent, data: any) => void;
|
|
6
|
+
on: (event: SocketEvent, callback: (data: any) => void) => () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function SocketProvider({ children }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useSocket(): SocketContextType;
|
|
12
|
+
export {};
|
|
13
13
|
//# sourceMappingURL=SocketContext.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
export * from './components/Button';
|
|
2
|
-
export * from './components/Slider';
|
|
3
|
-
export * from './components/RollingNumber';
|
|
4
|
-
export * from './components/ViewModeToggle';
|
|
5
|
-
export * from './components/GenderStatsBar';
|
|
6
|
-
export * from './components/StatsGrid';
|
|
7
|
-
export * from './context/AuthContext';
|
|
8
|
-
export * from './context/CartContext';
|
|
9
|
-
export * from './context/ChatContext';
|
|
10
|
-
export * from './context/LayoutContext';
|
|
11
|
-
export * from './context/SocketContext';
|
|
12
|
-
export * from './context/ThemeContext';
|
|
13
|
-
export * from './types';
|
|
14
|
-
export * from './lib/constants/seedData';
|
|
15
|
-
export * from './lib/constants/educationData';
|
|
16
|
-
export * from './lib/constants/punishmentData';
|
|
17
|
-
export * from './lib/constants/stationData';
|
|
18
|
-
export * from './lib/constants/surveyData';
|
|
19
|
-
export * from './lib/constants/teamData';
|
|
20
|
-
export * from './lib/utils/odpUtils';
|
|
21
|
-
export { Header } from './components/shared/Header';
|
|
22
|
-
export { Footer } from './components/shared/Footer';
|
|
23
|
-
export { LoginModal } from './components/shared/LoginModal';
|
|
24
|
-
export { FloatingChatButton } from './components/shared/FloatingChatButton';
|
|
25
|
-
export { MainLayoutWrapper } from './components/shared/MainLayoutWrapper';
|
|
26
|
-
export { PageWidth } from './components/shared/PageWidth';
|
|
27
|
-
export { Dashboard as AuthDashboard } from './components/modules/auth/Dashboard';
|
|
28
|
-
export { Dashboard } from './components/modules/auth/Dashboard';
|
|
29
|
-
export { PostCard } from './components/modules/auth/PostCard';
|
|
30
|
-
export { PostInteractionsModal } from './components/modules/auth/PostInteractionsModal';
|
|
31
|
-
export { RepostModal } from './components/modules/auth/RepostModal';
|
|
32
|
-
export { SidebarLeft as AuthSidebarLeft } from './components/modules/auth/SidebarLeft';
|
|
33
|
-
export { Stories } from './components/modules/auth/Stories';
|
|
34
|
-
export { StoryViewer } from './components/modules/auth/StoryViewer';
|
|
35
|
-
export { MediaLightbox, type PostMedia } from './components/modules/auth/MediaLightbox';
|
|
36
|
-
export { ChatContainer } from './components/modules/chat/ChatContainer';
|
|
37
|
-
export { ChatInput } from './components/modules/chat/ChatInput';
|
|
38
|
-
export { ChatList } from './components/modules/chat/ChatList';
|
|
39
|
-
export { ChatMessage } from './components/modules/chat/ChatMessage';
|
|
40
|
-
export { ChatNotes } from './components/modules/chat/ChatNotes';
|
|
41
|
-
export { GroupHeader } from './components/modules/community/GroupHeader';
|
|
42
|
-
export { GroupMenu } from './components/modules/community/GroupMenu';
|
|
43
|
-
export { SchoolCard } from './components/modules/community/SchoolCard';
|
|
44
|
-
export { SurveyCard } from './components/modules/community/SurveyCard';
|
|
45
|
-
export { ForumBoard } from './components/modules/forum/ForumBoard';
|
|
46
|
-
export { ForumPost } from './components/modules/forum/ForumPost';
|
|
47
|
-
export { NewTopicModal } from './components/modules/forum/NewTopicModal';
|
|
48
|
-
export { TopicItem } from './components/modules/forum/TopicItem';
|
|
49
|
-
export { GalleryCard } from './components/modules/galleries/GalleryCard';
|
|
50
|
-
export { GiveawayCard } from './components/modules/giveaways/GiveawayCard';
|
|
51
|
-
export { GroupCard } from './components/modules/groups/GroupCard';
|
|
52
|
-
export { ApplicationModal as GroupApplicationModal } from './components/modules/groups/ApplicationModal';
|
|
53
|
-
export { Introduction } from './components/modules/guest/Introduction';
|
|
54
|
-
export { BackToStore } from './components/modules/magaza/BackToStore';
|
|
55
|
-
export { StoreHeader } from './components/modules/magaza/StoreHeader';
|
|
56
|
-
export { NewsCard } from './components/modules/news/NewsCard';
|
|
57
|
-
export { NewsComments } from './components/modules/news/NewsComments';
|
|
58
|
-
export { ProfileHeader } from './components/modules/profile/ProfileHeader';
|
|
59
|
-
export { ProfileStats } from './components/modules/profile/ProfileStats';
|
|
60
|
-
export { ProfileContent } from './components/modules/profile/ProfileContent';
|
|
61
|
-
export { EditProfileModal } from './components/modules/profile/EditProfileModal';
|
|
62
|
-
export { TeamSelectorModal } from './components/modules/profile/TeamSelectorModal';
|
|
63
|
-
export { CloudStorageModal } from './components/modules/profile/CloudStorageModal';
|
|
64
|
-
export { StationCard } from './components/modules/stations/StationCard';
|
|
65
|
-
export { StationQRModal } from './components/modules/stations/StationQRModal';
|
|
1
|
+
export * from './components/Button';
|
|
2
|
+
export * from './components/Slider';
|
|
3
|
+
export * from './components/RollingNumber';
|
|
4
|
+
export * from './components/ViewModeToggle';
|
|
5
|
+
export * from './components/GenderStatsBar';
|
|
6
|
+
export * from './components/StatsGrid';
|
|
7
|
+
export * from './context/AuthContext';
|
|
8
|
+
export * from './context/CartContext';
|
|
9
|
+
export * from './context/ChatContext';
|
|
10
|
+
export * from './context/LayoutContext';
|
|
11
|
+
export * from './context/SocketContext';
|
|
12
|
+
export * from './context/ThemeContext';
|
|
13
|
+
export * from './types';
|
|
14
|
+
export * from './lib/constants/seedData';
|
|
15
|
+
export * from './lib/constants/educationData';
|
|
16
|
+
export * from './lib/constants/punishmentData';
|
|
17
|
+
export * from './lib/constants/stationData';
|
|
18
|
+
export * from './lib/constants/surveyData';
|
|
19
|
+
export * from './lib/constants/teamData';
|
|
20
|
+
export * from './lib/utils/odpUtils';
|
|
21
|
+
export { Header } from './components/shared/Header';
|
|
22
|
+
export { Footer } from './components/shared/Footer';
|
|
23
|
+
export { LoginModal } from './components/shared/LoginModal';
|
|
24
|
+
export { FloatingChatButton } from './components/shared/FloatingChatButton';
|
|
25
|
+
export { MainLayoutWrapper } from './components/shared/MainLayoutWrapper';
|
|
26
|
+
export { PageWidth } from './components/shared/PageWidth';
|
|
27
|
+
export { Dashboard as AuthDashboard } from './components/modules/auth/Dashboard';
|
|
28
|
+
export { Dashboard } from './components/modules/auth/Dashboard';
|
|
29
|
+
export { PostCard } from './components/modules/auth/PostCard';
|
|
30
|
+
export { PostInteractionsModal } from './components/modules/auth/PostInteractionsModal';
|
|
31
|
+
export { RepostModal } from './components/modules/auth/RepostModal';
|
|
32
|
+
export { SidebarLeft as AuthSidebarLeft } from './components/modules/auth/SidebarLeft';
|
|
33
|
+
export { Stories } from './components/modules/auth/Stories';
|
|
34
|
+
export { StoryViewer } from './components/modules/auth/StoryViewer';
|
|
35
|
+
export { MediaLightbox, type PostMedia } from './components/modules/auth/MediaLightbox';
|
|
36
|
+
export { ChatContainer } from './components/modules/chat/ChatContainer';
|
|
37
|
+
export { ChatInput } from './components/modules/chat/ChatInput';
|
|
38
|
+
export { ChatList } from './components/modules/chat/ChatList';
|
|
39
|
+
export { ChatMessage } from './components/modules/chat/ChatMessage';
|
|
40
|
+
export { ChatNotes } from './components/modules/chat/ChatNotes';
|
|
41
|
+
export { GroupHeader } from './components/modules/community/GroupHeader';
|
|
42
|
+
export { GroupMenu } from './components/modules/community/GroupMenu';
|
|
43
|
+
export { SchoolCard } from './components/modules/community/SchoolCard';
|
|
44
|
+
export { SurveyCard } from './components/modules/community/SurveyCard';
|
|
45
|
+
export { ForumBoard } from './components/modules/forum/ForumBoard';
|
|
46
|
+
export { ForumPost } from './components/modules/forum/ForumPost';
|
|
47
|
+
export { NewTopicModal } from './components/modules/forum/NewTopicModal';
|
|
48
|
+
export { TopicItem } from './components/modules/forum/TopicItem';
|
|
49
|
+
export { GalleryCard } from './components/modules/galleries/GalleryCard';
|
|
50
|
+
export { GiveawayCard } from './components/modules/giveaways/GiveawayCard';
|
|
51
|
+
export { GroupCard } from './components/modules/groups/GroupCard';
|
|
52
|
+
export { ApplicationModal as GroupApplicationModal } from './components/modules/groups/ApplicationModal';
|
|
53
|
+
export { Introduction } from './components/modules/guest/Introduction';
|
|
54
|
+
export { BackToStore } from './components/modules/magaza/BackToStore';
|
|
55
|
+
export { StoreHeader } from './components/modules/magaza/StoreHeader';
|
|
56
|
+
export { NewsCard } from './components/modules/news/NewsCard';
|
|
57
|
+
export { NewsComments } from './components/modules/news/NewsComments';
|
|
58
|
+
export { ProfileHeader } from './components/modules/profile/ProfileHeader';
|
|
59
|
+
export { ProfileStats } from './components/modules/profile/ProfileStats';
|
|
60
|
+
export { ProfileContent } from './components/modules/profile/ProfileContent';
|
|
61
|
+
export { EditProfileModal } from './components/modules/profile/EditProfileModal';
|
|
62
|
+
export { TeamSelectorModal } from './components/modules/profile/TeamSelectorModal';
|
|
63
|
+
export { CloudStorageModal } from './components/modules/profile/CloudStorageModal';
|
|
64
|
+
export { StationCard } from './components/modules/stations/StationCard';
|
|
65
|
+
export { StationQRModal } from './components/modules/stations/StationQRModal';
|
|
66
66
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { School, Faculty, Classroom, SchoolTeam } from '@armoyu/core';
|
|
2
|
-
export declare const MOCK_EDUCATION_DATA: (userList: any[]) => {
|
|
3
|
-
schools: School[];
|
|
4
|
-
faculties: Faculty[];
|
|
5
|
-
teams: SchoolTeam[];
|
|
6
|
-
classrooms: Classroom[];
|
|
7
|
-
};
|
|
1
|
+
import { School, Faculty, Classroom, SchoolTeam } from '@armoyu/core';
|
|
2
|
+
export declare const MOCK_EDUCATION_DATA: (userList: any[]) => {
|
|
3
|
+
schools: School[];
|
|
4
|
+
faculties: Faculty[];
|
|
5
|
+
teams: SchoolTeam[];
|
|
6
|
+
classrooms: Classroom[];
|
|
7
|
+
};
|
|
8
8
|
//# sourceMappingURL=educationData.d.ts.map
|