@appcorp/fusion-storybook 0.1.4
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/README.md +147 -0
- package/base-modules/admission/cache.d.ts +14 -0
- package/base-modules/admission/cache.js +31 -0
- package/base-modules/admission/constants.d.ts +32 -0
- package/base-modules/admission/constants.js +37 -0
- package/base-modules/admission/context.d.ts +369 -0
- package/base-modules/admission/context.js +755 -0
- package/base-modules/admission/filter.d.ts +1 -0
- package/base-modules/admission/filter.js +31 -0
- package/base-modules/admission/form.d.ts +1 -0
- package/base-modules/admission/form.js +86 -0
- package/base-modules/admission/more-actions.d.ts +1 -0
- package/base-modules/admission/more-actions.js +5 -0
- package/base-modules/admission/page.d.ts +16 -0
- package/base-modules/admission/page.js +128 -0
- package/base-modules/admission/validate.d.ts +38 -0
- package/base-modules/admission/validate.js +70 -0
- package/base-modules/admission/view.d.ts +1 -0
- package/base-modules/admission/view.js +40 -0
- package/base-modules/discount-code/cache.d.ts +27 -0
- package/base-modules/discount-code/cache.js +46 -0
- package/base-modules/discount-code/constants.d.ts +19 -0
- package/base-modules/discount-code/constants.js +26 -0
- package/base-modules/discount-code/context.d.ts +154 -0
- package/base-modules/discount-code/context.js +416 -0
- package/base-modules/discount-code/filter.d.ts +9 -0
- package/base-modules/discount-code/filter.js +14 -0
- package/base-modules/discount-code/form.d.ts +1 -0
- package/base-modules/discount-code/form.js +44 -0
- package/base-modules/discount-code/more-actions.d.ts +9 -0
- package/base-modules/discount-code/more-actions.js +13 -0
- package/base-modules/discount-code/page.d.ts +16 -0
- package/base-modules/discount-code/page.js +120 -0
- package/base-modules/discount-code/validate.d.ts +19 -0
- package/base-modules/discount-code/validate.js +38 -0
- package/base-modules/discount-code/view.d.ts +1 -0
- package/base-modules/discount-code/view.js +26 -0
- package/base-modules/family/cache.d.ts +14 -0
- package/base-modules/family/cache.js +31 -0
- package/base-modules/family/constants.d.ts +22 -0
- package/base-modules/family/constants.js +26 -0
- package/base-modules/family/context.d.ts +173 -0
- package/base-modules/family/context.js +441 -0
- package/base-modules/family/filter.d.ts +1 -0
- package/base-modules/family/filter.js +28 -0
- package/base-modules/family/form.d.ts +1 -0
- package/base-modules/family/form.js +12 -0
- package/base-modules/family/more-actions.d.ts +1 -0
- package/base-modules/family/more-actions.js +5 -0
- package/base-modules/family/page.d.ts +16 -0
- package/base-modules/family/page.js +120 -0
- package/base-modules/family/validate.d.ts +15 -0
- package/base-modules/family/validate.js +18 -0
- package/base-modules/family/view.d.ts +1 -0
- package/base-modules/family/view.js +18 -0
- package/base-modules/family-member/cache.d.ts +14 -0
- package/base-modules/family-member/cache.js +31 -0
- package/base-modules/family-member/constants.d.ts +22 -0
- package/base-modules/family-member/constants.js +26 -0
- package/base-modules/family-member/context.d.ts +215 -0
- package/base-modules/family-member/context.js +486 -0
- package/base-modules/family-member/filter.d.ts +1 -0
- package/base-modules/family-member/filter.js +28 -0
- package/base-modules/family-member/form.d.ts +1 -0
- package/base-modules/family-member/form.js +17 -0
- package/base-modules/family-member/more-actions.d.ts +1 -0
- package/base-modules/family-member/more-actions.js +5 -0
- package/base-modules/family-member/page.d.ts +16 -0
- package/base-modules/family-member/page.js +122 -0
- package/base-modules/family-member/validate.d.ts +24 -0
- package/base-modules/family-member/validate.js +27 -0
- package/base-modules/family-member/view.d.ts +1 -0
- package/base-modules/family-member/view.js +40 -0
- package/base-modules/student-profile/cache.d.ts +14 -0
- package/base-modules/student-profile/cache.js +31 -0
- package/base-modules/student-profile/constants.d.ts +105 -0
- package/base-modules/student-profile/constants.js +132 -0
- package/base-modules/student-profile/context.d.ts +290 -0
- package/base-modules/student-profile/context.js +583 -0
- package/base-modules/student-profile/filter.d.ts +1 -0
- package/base-modules/student-profile/filter.js +26 -0
- package/base-modules/student-profile/form.d.ts +1 -0
- package/base-modules/student-profile/form.js +19 -0
- package/base-modules/student-profile/more-actions.d.ts +1 -0
- package/base-modules/student-profile/more-actions.js +5 -0
- package/base-modules/student-profile/page.d.ts +9 -0
- package/base-modules/student-profile/page.js +86 -0
- package/base-modules/student-profile/validate.d.ts +23 -0
- package/base-modules/student-profile/validate.js +34 -0
- package/base-modules/student-profile/view.d.ts +1 -0
- package/base-modules/student-profile/view.js +29 -0
- package/base-modules/workspace/cache.d.ts +9 -0
- package/base-modules/workspace/cache.js +28 -0
- package/base-modules/workspace/constants.d.ts +10 -0
- package/base-modules/workspace/constants.js +18 -0
- package/base-modules/workspace/context.d.ts +187 -0
- package/base-modules/workspace/context.js +293 -0
- package/base-modules/workspace/drawer.d.ts +1 -0
- package/base-modules/workspace/drawer.js +24 -0
- package/base-modules/workspace/filter.d.ts +1 -0
- package/base-modules/workspace/filter.js +13 -0
- package/base-modules/workspace/form.d.ts +1 -0
- package/base-modules/workspace/form.js +40 -0
- package/base-modules/workspace/more-actions.d.ts +1 -0
- package/base-modules/workspace/more-actions.js +13 -0
- package/base-modules/workspace/page.d.ts +1 -0
- package/base-modules/workspace/page.js +31 -0
- package/base-modules/workspace/validate.d.ts +9 -0
- package/base-modules/workspace/validate.js +8 -0
- package/base-modules/workspace/view.d.ts +1 -0
- package/base-modules/workspace/view.js +52 -0
- package/components/rbac-no-access.d.ts +6 -0
- package/components/rbac-no-access.js +4 -0
- package/constants.d.ts +81 -0
- package/constants.js +81 -0
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +5 -0
- package/package.json +104 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/type.d.ts +1141 -0
- package/type.js +427 -0
- package/utils/admission-pdf.d.ts +78 -0
- package/utils/admission-pdf.js +73 -0
- package/utils/clear-cache.d.ts +1 -0
- package/utils/clear-cache.js +8 -0
- package/utils/format-value.d.ts +1 -0
- package/utils/format-value.js +1 -0
- package/utils/pdf-generator.d.ts +41 -0
- package/utils/pdf-generator.js +107 -0
- package/utils/resolve-rbac-permissions.d.ts +11 -0
- package/utils/resolve-rbac-permissions.js +251 -0
package/constants.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const supabasePrivateStorageUrl: string;
|
|
2
|
+
export declare const supabasePublicStorageUrl: string;
|
|
3
|
+
export declare const basePageLimit: number;
|
|
4
|
+
export declare const AUTH_API_ROUTES: {
|
|
5
|
+
WORKSPACE: string;
|
|
6
|
+
PLAN: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const REPORTS_API_ROUTES: {
|
|
9
|
+
GENERATE: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const DASHBOARD_ROUTES: {
|
|
12
|
+
ACADEMIC_OPERATIONS: string;
|
|
13
|
+
ACADEMIC_STRUCTURE: string;
|
|
14
|
+
ACCOUNT_RBAC: string;
|
|
15
|
+
SCHOOL: string;
|
|
16
|
+
ADMISSION: string;
|
|
17
|
+
AI_ASSISTANT: string;
|
|
18
|
+
AI_ATTENDANCE: string;
|
|
19
|
+
ATTENDANCE: string;
|
|
20
|
+
CLASS: string;
|
|
21
|
+
COMMUNICATION: string;
|
|
22
|
+
COURSE: string;
|
|
23
|
+
DASHBOARD: string;
|
|
24
|
+
DISCOUNT_CODE: string;
|
|
25
|
+
ENROLLMENT: string;
|
|
26
|
+
EXPENSE: string;
|
|
27
|
+
FAMILY_MEMBER: string;
|
|
28
|
+
FAMILY: string;
|
|
29
|
+
FEE_STRUCTURE: string;
|
|
30
|
+
FEE_AGENT: string;
|
|
31
|
+
FINANCIAL_MANAGEMENT: string;
|
|
32
|
+
GRADE: string;
|
|
33
|
+
INVOICE: string;
|
|
34
|
+
OFFERS: string;
|
|
35
|
+
OPERATIONAL_TRACKING: string;
|
|
36
|
+
PAYMENT: string;
|
|
37
|
+
PEOPLE_MANAGEMENT: string;
|
|
38
|
+
REPORTS: string;
|
|
39
|
+
SCHEDULE: string;
|
|
40
|
+
SECTION: string;
|
|
41
|
+
STUDENT_FEE: string;
|
|
42
|
+
STUDENT_PROFILE: string;
|
|
43
|
+
SUBJECT: string;
|
|
44
|
+
TEACHER: string;
|
|
45
|
+
USER_MANAGEMENT: string;
|
|
46
|
+
USER: string;
|
|
47
|
+
WHATSAPP_BROADCAST: string;
|
|
48
|
+
WORKSPACE_USER: string;
|
|
49
|
+
WORKSPACE: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const LS_KEYS: {
|
|
52
|
+
ACCOUNT_SCHOOL: string;
|
|
53
|
+
ADMISSIONS: string;
|
|
54
|
+
ATTENDANCES: string;
|
|
55
|
+
CAMPAIGNS: string;
|
|
56
|
+
CLASSES: string;
|
|
57
|
+
COURSES: string;
|
|
58
|
+
DISCOUNT_CODES: string;
|
|
59
|
+
ENROLLMENTS: string;
|
|
60
|
+
EXPENSES: string;
|
|
61
|
+
FAMILIES: string;
|
|
62
|
+
FAMILY_MEMBERS: string;
|
|
63
|
+
FEE_STRUCTURES: string;
|
|
64
|
+
FEE_AGENT_CONVERSATIONS: string;
|
|
65
|
+
GRADES: string;
|
|
66
|
+
INVOICES: string;
|
|
67
|
+
PAYMENTS: string;
|
|
68
|
+
PERMISSIONS: string;
|
|
69
|
+
REFERRALS: string;
|
|
70
|
+
ROLES: string;
|
|
71
|
+
SCHEDULES: string;
|
|
72
|
+
SECTIONS: string;
|
|
73
|
+
STUDENT_FEES: string;
|
|
74
|
+
STUDENT_PROFILES: string;
|
|
75
|
+
SUBJECTS: string;
|
|
76
|
+
TEACHERS: string;
|
|
77
|
+
TOKEN_KEY: string;
|
|
78
|
+
USERS: string;
|
|
79
|
+
WORKSPACE_USERS: string;
|
|
80
|
+
WORKSPACE: string;
|
|
81
|
+
};
|
package/constants.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export const supabasePrivateStorageUrl = `${process.env.NEXT_PUBLIC_SUPABASE_STORAGE_URL}/authenticated/${process.env.NEXT_PUBLIC_SUPABASE_PRIVATE_BUCKET}`;
|
|
2
|
+
export const supabasePublicStorageUrl = `${process.env.NEXT_PUBLIC_SUPABASE_STORAGE_URL}/public/${process.env.NEXT_PUBLIC_SUPABASE_PUBLIC_BUCKET}`;
|
|
3
|
+
export const basePageLimit = Number(process.env.NEXT_PUBLIC_PAGE_LIMIT);
|
|
4
|
+
export const AUTH_API_ROUTES = {
|
|
5
|
+
WORKSPACE: "/api/v1/workspace",
|
|
6
|
+
PLAN: "/api/v1/plan",
|
|
7
|
+
};
|
|
8
|
+
export const REPORTS_API_ROUTES = {
|
|
9
|
+
GENERATE: "/api/v1/reports/generate",
|
|
10
|
+
};
|
|
11
|
+
export const DASHBOARD_ROUTES = {
|
|
12
|
+
ACADEMIC_OPERATIONS: "/academic-operations",
|
|
13
|
+
ACADEMIC_STRUCTURE: "/academic-structure",
|
|
14
|
+
ACCOUNT_RBAC: "/account/rbac",
|
|
15
|
+
SCHOOL: "/account/school",
|
|
16
|
+
ADMISSION: "/admission",
|
|
17
|
+
AI_ASSISTANT: "/tools/ai-assistant",
|
|
18
|
+
AI_ATTENDANCE: "/tools/ai-attendance",
|
|
19
|
+
ATTENDANCE: "/operational-tracking/attendance",
|
|
20
|
+
CLASS: "/academic-structure/class",
|
|
21
|
+
COMMUNICATION: "/communication",
|
|
22
|
+
COURSE: "/academic-operations/course",
|
|
23
|
+
DASHBOARD: "/dashboard",
|
|
24
|
+
DISCOUNT_CODE: "/account/discount-codes",
|
|
25
|
+
ENROLLMENT: "/academic-operations/enrollment",
|
|
26
|
+
EXPENSE: "/financial-management/expense",
|
|
27
|
+
FAMILY_MEMBER: "/people-management/family-member",
|
|
28
|
+
FAMILY: "/people-management/family",
|
|
29
|
+
FEE_STRUCTURE: "/financial-management/fee-structure",
|
|
30
|
+
FEE_AGENT: "/financial-management/fee-agent",
|
|
31
|
+
FINANCIAL_MANAGEMENT: "/financial-management",
|
|
32
|
+
GRADE: "/operational-tracking/grade",
|
|
33
|
+
INVOICE: "/financial-management/invoice",
|
|
34
|
+
OFFERS: "/offers",
|
|
35
|
+
OPERATIONAL_TRACKING: "/operational-tracking",
|
|
36
|
+
PAYMENT: "/financial-management/payment",
|
|
37
|
+
PEOPLE_MANAGEMENT: "/people-management",
|
|
38
|
+
REPORTS: "/tools/reports",
|
|
39
|
+
SCHEDULE: "/academic-operations/schedule",
|
|
40
|
+
SECTION: "/academic-structure/section",
|
|
41
|
+
STUDENT_FEE: "/financial-management/student-fee",
|
|
42
|
+
STUDENT_PROFILE: "/people-management/student-profile",
|
|
43
|
+
SUBJECT: "/academic-structure/subject",
|
|
44
|
+
TEACHER: "/people-management/teacher",
|
|
45
|
+
USER_MANAGEMENT: "/user-management",
|
|
46
|
+
USER: "/user-management/user",
|
|
47
|
+
WHATSAPP_BROADCAST: "/communication/whatsapp-broadcast",
|
|
48
|
+
WORKSPACE_USER: "/user-management/workspace-user",
|
|
49
|
+
WORKSPACE: "/account/workspace",
|
|
50
|
+
};
|
|
51
|
+
export const LS_KEYS = {
|
|
52
|
+
ACCOUNT_SCHOOL: "fusion_account_school",
|
|
53
|
+
ADMISSIONS: "fusion_admissions",
|
|
54
|
+
ATTENDANCES: "fusion_attendances",
|
|
55
|
+
CAMPAIGNS: "fusion_campaigns",
|
|
56
|
+
CLASSES: "fusion_classes",
|
|
57
|
+
COURSES: "fusion_courses",
|
|
58
|
+
DISCOUNT_CODES: "fusion_discount_codes",
|
|
59
|
+
ENROLLMENTS: "fusion_enrollments",
|
|
60
|
+
EXPENSES: "fusion_expenses",
|
|
61
|
+
FAMILIES: "fusion_families",
|
|
62
|
+
FAMILY_MEMBERS: "fusion_family_members",
|
|
63
|
+
FEE_STRUCTURES: "fusion_fee_structures",
|
|
64
|
+
FEE_AGENT_CONVERSATIONS: "fusion_fee_agent_conversations",
|
|
65
|
+
GRADES: "fusion_grades",
|
|
66
|
+
INVOICES: "fusion_invoices",
|
|
67
|
+
PAYMENTS: "fusion_payments",
|
|
68
|
+
PERMISSIONS: "fusion_permissions",
|
|
69
|
+
REFERRALS: "fusion_referrals",
|
|
70
|
+
ROLES: "fusion_roles",
|
|
71
|
+
SCHEDULES: "fusion_schedules",
|
|
72
|
+
SECTIONS: "fusion_sections",
|
|
73
|
+
STUDENT_FEES: "fusion_student_fees",
|
|
74
|
+
STUDENT_PROFILES: "fusion_student_profiles",
|
|
75
|
+
SUBJECTS: "fusion_subjects",
|
|
76
|
+
TEACHERS: "fusion_teachers",
|
|
77
|
+
TOKEN_KEY: "fusion_access_token",
|
|
78
|
+
USERS: "fusion_users",
|
|
79
|
+
WORKSPACE_USERS: "fusion_workspace_users",
|
|
80
|
+
WORKSPACE: "fusion_workspace",
|
|
81
|
+
};
|
package/lib/utils.d.ts
ADDED
package/lib/utils.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appcorp/fusion-storybook",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build-storybook": "storybook build",
|
|
6
|
+
"build:next": "next build",
|
|
7
|
+
"build:ts": "tsc --project tsconfig.build.json",
|
|
8
|
+
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
|
|
9
|
+
"clean": "yarn rimraf ./lib",
|
|
10
|
+
"dev": "next dev",
|
|
11
|
+
"format:check": "prettier --check .",
|
|
12
|
+
"format": "prettier --write .",
|
|
13
|
+
"lint:fix": "eslint --fix",
|
|
14
|
+
"lint": "eslint",
|
|
15
|
+
"major": "npm version major",
|
|
16
|
+
"minor": "npm version minor",
|
|
17
|
+
"patch": "npm version patch",
|
|
18
|
+
"prepare": "husky",
|
|
19
|
+
"publish:npm": "yarn build && cd lib/ && npm publish --access public && cd ..",
|
|
20
|
+
"start": "next start",
|
|
21
|
+
"storybook": "storybook dev -p 6006",
|
|
22
|
+
"test:ci": "jest --ci --coverage",
|
|
23
|
+
"test:e2e:report": "playwright show-report",
|
|
24
|
+
"test:e2e:ui": "playwright test --ui",
|
|
25
|
+
"test:e2e": "playwright test",
|
|
26
|
+
"test:watch": "jest --watch",
|
|
27
|
+
"test": "jest --watchAll=false"
|
|
28
|
+
},
|
|
29
|
+
"lint-staged": {
|
|
30
|
+
"*.{js,jsx,ts,tsx}": [
|
|
31
|
+
"eslint --fix",
|
|
32
|
+
"prettier --write"
|
|
33
|
+
],
|
|
34
|
+
"*.{json,css,md,mdx}": [
|
|
35
|
+
"prettier --write"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@appcorp/app-corp-vista": "^1.0.0",
|
|
40
|
+
"@appcorp/shadcn": "^1.1.59",
|
|
41
|
+
"@chromatic-com/storybook": "^5.1.1",
|
|
42
|
+
"@commitlint/cli": "^20.5.0",
|
|
43
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
44
|
+
"@pdfme/common": "^6.0.6",
|
|
45
|
+
"@pdfme/generator": "^6.0.6",
|
|
46
|
+
"@pdfme/schemas": "^6.0.6",
|
|
47
|
+
"@playwright/test": "^1.59.1",
|
|
48
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
49
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
50
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
51
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
52
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
53
|
+
"@radix-ui/react-toast": "^1.2.15",
|
|
54
|
+
"@react-pakistan/util-functions": "^1.25.63",
|
|
55
|
+
"@storybook/addon-a11y": "^10.3.4",
|
|
56
|
+
"@storybook/addon-docs": "^10.3.4",
|
|
57
|
+
"@storybook/addon-onboarding": "^10.3.4",
|
|
58
|
+
"@storybook/addon-vitest": "^10.3.4",
|
|
59
|
+
"@storybook/nextjs-vite": "^10.3.4",
|
|
60
|
+
"@supabase/supabase-js": "^2.103.0",
|
|
61
|
+
"@tailwindcss/postcss": "^4",
|
|
62
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
63
|
+
"@testing-library/react": "^16.3.2",
|
|
64
|
+
"@testing-library/user-event": "^14.6.1",
|
|
65
|
+
"@types/jest": "^30.0.0",
|
|
66
|
+
"@types/node": "^20",
|
|
67
|
+
"@types/react": "^19",
|
|
68
|
+
"@types/react-dom": "^19",
|
|
69
|
+
"@vitest/browser-playwright": "^4.1.2",
|
|
70
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
71
|
+
"class-variance-authority": "^0.7.1",
|
|
72
|
+
"clsx": "^2.1.1",
|
|
73
|
+
"eslint": "^9",
|
|
74
|
+
"eslint-config-next": "16.2.2",
|
|
75
|
+
"eslint-config-prettier": "^10.1.8",
|
|
76
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
77
|
+
"husky": "^9.1.7",
|
|
78
|
+
"jest": "^30.3.0",
|
|
79
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
80
|
+
"lint-staged": "^16.4.0",
|
|
81
|
+
"lucide-react": "^1.8.0",
|
|
82
|
+
"next": "^16.2.3",
|
|
83
|
+
"next-intl": "^4.9.1",
|
|
84
|
+
"playwright": "^1.59.1",
|
|
85
|
+
"prettier": "^3.8.1",
|
|
86
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
87
|
+
"react": "^19.2.5",
|
|
88
|
+
"react-dom": "^19.2.5",
|
|
89
|
+
"rimraf": "^6.1.3",
|
|
90
|
+
"storybook": "^10.3.4",
|
|
91
|
+
"tailwind-merge": "^3.5.0",
|
|
92
|
+
"tailwindcss": "^4",
|
|
93
|
+
"ts-jest": "^29.4.9",
|
|
94
|
+
"typescript": "^5",
|
|
95
|
+
"uuid": "^13.0.0",
|
|
96
|
+
"vite": "^8.0.5",
|
|
97
|
+
"vitest": "^4.1.2"
|
|
98
|
+
},
|
|
99
|
+
"packageManager": "yarn@4.12.0",
|
|
100
|
+
"engines": {
|
|
101
|
+
"node": "24",
|
|
102
|
+
"npm": "10"
|
|
103
|
+
}
|
|
104
|
+
}
|