@appcorp/fusion-storybook 0.2.12 → 0.2.14

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.
Files changed (173) hide show
  1. package/base-modules/admission/context/use-admission-module.d.ts +88 -0
  2. package/base-modules/admission/context/use-admission-module.js +771 -0
  3. package/base-modules/admission/context.d.ts +1 -87
  4. package/base-modules/admission/context.js +3 -769
  5. package/base-modules/admission/filter.d.ts +1 -1
  6. package/base-modules/admission/form.d.ts +1 -1
  7. package/base-modules/admission/more-actions.d.ts +1 -1
  8. package/base-modules/admission/page.d.ts +8 -1
  9. package/base-modules/admission/page.js +25 -4
  10. package/base-modules/admission/view.d.ts +1 -1
  11. package/base-modules/attendance/form.d.ts +1 -1
  12. package/base-modules/attendance/page.d.ts +8 -1
  13. package/base-modules/attendance/page.js +25 -4
  14. package/base-modules/attendance/view.d.ts +1 -1
  15. package/base-modules/campus/filter.d.ts +1 -1
  16. package/base-modules/campus/form.d.ts +1 -1
  17. package/base-modules/campus/more-actions.d.ts +1 -1
  18. package/base-modules/campus/more-actions.js +0 -1
  19. package/base-modules/campus/page.d.ts +8 -1
  20. package/base-modules/campus/page.js +25 -4
  21. package/base-modules/campus/view.d.ts +1 -1
  22. package/base-modules/class/filter.d.ts +1 -1
  23. package/base-modules/class/form.d.ts +1 -1
  24. package/base-modules/class/more-actions.d.ts +1 -1
  25. package/base-modules/class/more-actions.js +1 -6
  26. package/base-modules/class/page.d.ts +8 -1
  27. package/base-modules/class/page.js +25 -4
  28. package/base-modules/class/view.d.ts +1 -1
  29. package/base-modules/course/filter.d.ts +1 -1
  30. package/base-modules/course/form.d.ts +1 -1
  31. package/base-modules/course/more-actions.d.ts +1 -1
  32. package/base-modules/course/page.d.ts +8 -1
  33. package/base-modules/course/page.js +25 -4
  34. package/base-modules/course/view.d.ts +1 -1
  35. package/base-modules/discount-code/filter.d.ts +2 -1
  36. package/base-modules/discount-code/form.d.ts +1 -1
  37. package/base-modules/discount-code/page.d.ts +8 -1
  38. package/base-modules/discount-code/page.js +25 -4
  39. package/base-modules/discount-code/view.d.ts +1 -1
  40. package/base-modules/enrollment/filter.d.ts +1 -1
  41. package/base-modules/enrollment/form.d.ts +1 -1
  42. package/base-modules/enrollment/more-actions.d.ts +1 -1
  43. package/base-modules/enrollment/page.d.ts +8 -1
  44. package/base-modules/enrollment/page.js +25 -4
  45. package/base-modules/enrollment/view.d.ts +1 -1
  46. package/base-modules/expense/filter.d.ts +1 -1
  47. package/base-modules/expense/form.d.ts +1 -1
  48. package/base-modules/expense/more-actions.d.ts +1 -1
  49. package/base-modules/expense/more-actions.js +1 -6
  50. package/base-modules/expense/page.d.ts +8 -1
  51. package/base-modules/expense/page.js +25 -4
  52. package/base-modules/expense/view.d.ts +1 -1
  53. package/base-modules/family/filter.d.ts +1 -1
  54. package/base-modules/family/form.d.ts +1 -1
  55. package/base-modules/family/more-actions.d.ts +1 -1
  56. package/base-modules/family/page.d.ts +8 -1
  57. package/base-modules/family/page.js +25 -4
  58. package/base-modules/family/view.d.ts +1 -1
  59. package/base-modules/family-member/filter.d.ts +1 -1
  60. package/base-modules/family-member/form.d.ts +1 -1
  61. package/base-modules/family-member/more-actions.d.ts +1 -1
  62. package/base-modules/family-member/page.d.ts +8 -1
  63. package/base-modules/family-member/page.js +25 -4
  64. package/base-modules/family-member/view.d.ts +1 -1
  65. package/base-modules/fee-structure/filter.d.ts +1 -1
  66. package/base-modules/fee-structure/form.d.ts +1 -1
  67. package/base-modules/fee-structure/more-actions.d.ts +1 -1
  68. package/base-modules/fee-structure/more-actions.js +1 -6
  69. package/base-modules/fee-structure/page.d.ts +8 -1
  70. package/base-modules/fee-structure/page.js +25 -4
  71. package/base-modules/fee-structure/view.d.ts +1 -1
  72. package/base-modules/rbac/assign-permissions.d.ts +1 -1
  73. package/base-modules/rbac/filter.d.ts +1 -1
  74. package/base-modules/rbac/form.d.ts +1 -1
  75. package/base-modules/rbac/more-actions.d.ts +1 -1
  76. package/base-modules/rbac/page.d.ts +8 -1
  77. package/base-modules/rbac/page.js +25 -4
  78. package/base-modules/rbac/view.d.ts +7 -1
  79. package/base-modules/school/drawer.d.ts +1 -1
  80. package/base-modules/school/filter.d.ts +1 -1
  81. package/base-modules/school/form.d.ts +1 -1
  82. package/base-modules/school/more-actions.d.ts +1 -1
  83. package/base-modules/school/view.d.ts +1 -1
  84. package/base-modules/section/filter.d.ts +1 -1
  85. package/base-modules/section/form.d.ts +1 -1
  86. package/base-modules/section/more-actions.d.ts +1 -1
  87. package/base-modules/section/page.d.ts +8 -1
  88. package/base-modules/section/page.js +25 -4
  89. package/base-modules/section/view.d.ts +1 -1
  90. package/base-modules/student-fee/context/shared.d.ts +178 -0
  91. package/base-modules/student-fee/context/shared.js +59 -0
  92. package/base-modules/student-fee/context/use-student-fee-module.d.ts +64 -0
  93. package/base-modules/student-fee/context/use-student-fee-module.js +610 -0
  94. package/base-modules/student-fee/context.d.ts +21 -235
  95. package/base-modules/student-fee/context.js +2 -674
  96. package/base-modules/student-fee/filter.d.ts +1 -1
  97. package/base-modules/student-fee/form.d.ts +1 -1
  98. package/base-modules/student-fee/more-actions.d.ts +1 -1
  99. package/base-modules/student-fee/more-actions.js +1 -6
  100. package/base-modules/student-fee/page.d.ts +8 -1
  101. package/base-modules/student-fee/page.js +25 -4
  102. package/base-modules/student-fee/view.d.ts +1 -1
  103. package/base-modules/student-profile/context/module-base.d.ts +187 -0
  104. package/base-modules/student-profile/context/module-base.js +50 -0
  105. package/base-modules/student-profile/context/use-student-profile-module.d.ts +70 -0
  106. package/base-modules/student-profile/context/use-student-profile-module.js +506 -0
  107. package/base-modules/student-profile/context.d.ts +20 -256
  108. package/base-modules/student-profile/context.js +2 -601
  109. package/base-modules/student-profile/filter.d.ts +1 -1
  110. package/base-modules/student-profile/form.d.ts +1 -1
  111. package/base-modules/student-profile/more-actions.d.ts +1 -1
  112. package/base-modules/student-profile/page.d.ts +8 -1
  113. package/base-modules/student-profile/page.js +25 -4
  114. package/base-modules/student-profile/view.d.ts +1 -1
  115. package/base-modules/subject/filter.d.ts +1 -1
  116. package/base-modules/subject/form.d.ts +1 -1
  117. package/base-modules/subject/more-actions.d.ts +1 -1
  118. package/base-modules/subject/page.d.ts +8 -1
  119. package/base-modules/subject/page.js +25 -4
  120. package/base-modules/subject/view.d.ts +1 -1
  121. package/base-modules/teacher/avatar-upload.js +1 -4
  122. package/base-modules/teacher/filter.d.ts +1 -1
  123. package/base-modules/teacher/form.d.ts +1 -1
  124. package/base-modules/teacher/more-actions.d.ts +1 -1
  125. package/base-modules/teacher/more-actions.js +1 -6
  126. package/base-modules/teacher/page.d.ts +8 -1
  127. package/base-modules/teacher/page.js +25 -4
  128. package/base-modules/teacher/view.d.ts +1 -1
  129. package/base-modules/user/context/use-user-module.d.ts +53 -0
  130. package/base-modules/user/context/use-user-module.js +546 -0
  131. package/base-modules/user/context.d.ts +1 -52
  132. package/base-modules/user/context.js +5 -547
  133. package/base-modules/user/drawer.d.ts +1 -1
  134. package/base-modules/user/filter.d.ts +1 -1
  135. package/base-modules/user/form.d.ts +1 -1
  136. package/base-modules/user/more-actions.d.ts +1 -1
  137. package/base-modules/user/page.d.ts +8 -1
  138. package/base-modules/user/page.js +25 -4
  139. package/base-modules/user/view.d.ts +1 -1
  140. package/base-modules/workspace/context.d.ts +1 -1
  141. package/base-modules/workspace/drawer.d.ts +1 -1
  142. package/base-modules/workspace/filter.d.ts +1 -1
  143. package/base-modules/workspace/form.d.ts +1 -1
  144. package/base-modules/workspace/more-actions.d.ts +1 -1
  145. package/base-modules/workspace/view.d.ts +1 -1
  146. package/base-modules/workspace-user/filter.d.ts +1 -1
  147. package/base-modules/workspace-user/form.d.ts +1 -1
  148. package/base-modules/workspace-user/more-actions.d.ts +1 -1
  149. package/base-modules/workspace-user/more-actions.js +1 -6
  150. package/base-modules/workspace-user/page.d.ts +8 -1
  151. package/base-modules/workspace-user/page.js +25 -4
  152. package/base-modules/workspace-user/view.d.ts +1 -1
  153. package/components/module-error.d.ts +9 -0
  154. package/components/module-error.js +3 -0
  155. package/components/timeline.d.ts +1 -1
  156. package/package.json +6 -5
  157. package/tsconfig.build.tsbuildinfo +1 -1
  158. package/type.d.ts +3 -1242
  159. package/type.js +3 -445
  160. package/types/academics.d.ts +264 -0
  161. package/types/academics.js +8 -0
  162. package/types/admission.d.ts +85 -0
  163. package/types/admission.js +6 -0
  164. package/types/communication.d.ts +165 -0
  165. package/types/communication.js +7 -0
  166. package/types/enums.d.ts +411 -0
  167. package/types/enums.js +442 -0
  168. package/types/finance.d.ts +126 -0
  169. package/types/finance.js +7 -0
  170. package/types/index.d.ts +12 -0
  171. package/types/index.js +12 -0
  172. package/types/user-management.d.ts +236 -0
  173. package/types/user-management.js +7 -0
@@ -1 +1 @@
1
- export declare const WorkspaceForm: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceForm: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- export declare const WorkspaceMoreActions: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceMoreActions: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- export declare const WorkspaceView: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceView: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- export declare const WorkspaceUserFilter: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceUserFilter: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- export declare const WorkspaceUserForm: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceUserForm: () => import("react").JSX.Element;
@@ -1 +1 @@
1
- export declare const WorkspaceUserMoreActions: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceUserMoreActions: () => import("react").JSX.Element;
@@ -28,7 +28,6 @@ export const WorkspaceUserMoreActions = () => {
28
28
  {
29
29
  id: "3",
30
30
  title: t("uploadTheCompletedCsvToTheSystem"),
31
- handleOnClick: () => console.log("clicked"),
32
31
  },
33
32
  ];
34
33
  const update = [
@@ -41,11 +40,7 @@ export const WorkspaceUserMoreActions = () => {
41
40
  },
42
41
  },
43
42
  { id: "2", title: t("updateYourDataInTheCsv") },
44
- {
45
- id: "3",
46
- title: t("uploadTheCompletedCsvToTheSystem"),
47
- handleOnClick: () => console.log("clicked"),
48
- },
43
+ { id: "3", title: t("uploadTheCompletedCsvToTheSystem") },
49
44
  ];
50
45
  return (_jsxs("div", { className: "space-y-4", children: [_jsx(Timeline, { events: create, heading: t("bulkCreate") }), _jsx(Timeline, { events: update, heading: t("bulkUpdate") })] }));
51
46
  };
@@ -11,7 +11,14 @@ import { FC } from "react";
11
11
  import { USER_ROLE } from "../../type";
12
12
  interface Props {
13
13
  cancelLabel: string;
14
- drawerTitle: string;
14
+ drawerFilterDescription: string;
15
+ drawerFilterTitle: string;
16
+ drawerFormDescription: string;
17
+ drawerFormTitle: string;
18
+ drawerMoreActionsDescription: string;
19
+ drawerMoreActionsTitle: string;
20
+ drawerViewDescription: string;
21
+ drawerViewTitle: string;
15
22
  labelActions: string;
16
23
  labelId: string;
17
24
  labelRole: string;
@@ -39,7 +39,7 @@ const createComponentInstances = () => ({
39
39
  moreActions: _jsx(WorkspaceUserMoreActions, {}),
40
40
  view: _jsx(WorkspaceUserView, {}),
41
41
  });
42
- const createWorkspaceUserConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelId, labelRole, labelSystemRole, labelUser, labelWorkspace, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
42
+ const createWorkspaceUserConfig = ({ cancelLabel, dispatch, drawerFilterDescription, drawerFilterTitle, drawerFormDescription, drawerFormTitle, drawerMoreActionsDescription, drawerMoreActionsTitle, drawerViewDescription, drawerViewTitle, labelActions, labelId, labelRole, labelSystemRole, labelUser, labelWorkspace, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
43
43
  const components = createComponentInstances();
44
44
  return {
45
45
  moduleName: "workspaceUser",
@@ -52,7 +52,14 @@ const createWorkspaceUserConfig = ({ cancelLabel, dispatch, drawerTitle, labelAc
52
52
  { label: labelActions, width: "5%" },
53
53
  ],
54
54
  cancelLabel,
55
- drawerTitle,
55
+ drawerFilterDescription,
56
+ drawerFilterTitle,
57
+ drawerFormDescription,
58
+ drawerFormTitle,
59
+ drawerMoreActionsDescription,
60
+ drawerMoreActionsTitle,
61
+ drawerViewDescription,
62
+ drawerViewTitle,
56
63
  filterContent: components.filter,
57
64
  formContent: components.form,
58
65
  moreActionsContent: components.moreActions,
@@ -78,7 +85,14 @@ const WorkspaceUserPageInner = (props) => {
78
85
  const workspaceUserConfig = useMemo(() => createWorkspaceUserConfig({
79
86
  cancelLabel: props.cancelLabel,
80
87
  dispatch: context.dispatch,
81
- drawerTitle: props.drawerTitle,
88
+ drawerFormTitle: props.drawerFormTitle,
89
+ drawerFormDescription: props.drawerFormDescription,
90
+ drawerViewTitle: props.drawerViewTitle,
91
+ drawerViewDescription: props.drawerViewDescription,
92
+ drawerFilterTitle: props.drawerFilterTitle,
93
+ drawerFilterDescription: props.drawerFilterDescription,
94
+ drawerMoreActionsTitle: props.drawerMoreActionsTitle,
95
+ drawerMoreActionsDescription: props.drawerMoreActionsDescription,
82
96
  labelActions: props.labelActions,
83
97
  labelId: props.labelId,
84
98
  labelRole: props.labelRole,
@@ -92,7 +106,14 @@ const WorkspaceUserPageInner = (props) => {
92
106
  }), [
93
107
  context.dispatch,
94
108
  props.cancelLabel,
95
- props.drawerTitle,
109
+ props.drawerFormTitle,
110
+ props.drawerFormDescription,
111
+ props.drawerViewTitle,
112
+ props.drawerViewDescription,
113
+ props.drawerFilterTitle,
114
+ props.drawerFilterDescription,
115
+ props.drawerMoreActionsTitle,
116
+ props.drawerMoreActionsDescription,
96
117
  props.labelActions,
97
118
  props.labelId,
98
119
  props.labelRole,
@@ -1 +1 @@
1
- export declare const WorkspaceUserView: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const WorkspaceUserView: () => import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ interface ModuleErrorProps {
3
+ error: Error & {
4
+ digest?: string;
5
+ };
6
+ reset: () => void;
7
+ }
8
+ export declare const ModuleError: FC<ModuleErrorProps>;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ export const ModuleError = ({ error, reset }) => (_jsxs("div", { className: "flex min-h-[400px] flex-col items-center justify-center gap-4 p-8", children: [_jsx("div", { className: "text-destructive text-6xl", children: "!" }), _jsx("h2", { className: "text-foreground text-2xl font-semibold", children: "Something went wrong" }), _jsx("p", { className: "text-muted-foreground max-w-md text-center text-sm", children: error.message || "An unexpected error occurred. Please try again." }), _jsx("button", { onClick: reset, className: "bg-primary text-primary-foreground hover:bg-primary/90 rounded-lg px-4 py-2 text-sm font-medium transition-colors", children: "Try again" })] }));
@@ -8,4 +8,4 @@ export interface TimelineProps {
8
8
  events: TimelineEvent[];
9
9
  heading: string;
10
10
  }
11
- export declare const Timeline: ({ heading, events }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Timeline: ({ heading, events }: TimelineProps) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",
@@ -24,7 +24,8 @@
24
24
  "test:e2e:ui": "playwright test --ui",
25
25
  "test:e2e": "playwright test",
26
26
  "test:watch": "jest --watch",
27
- "test": "jest --watchAll=false"
27
+ "test": "jest --watchAll=false",
28
+ "typecheck": "tsc --noEmit"
28
29
  },
29
30
  "lint-staged": {
30
31
  "*.{js,jsx,ts,tsx}": [
@@ -37,7 +38,7 @@
37
38
  },
38
39
  "devDependencies": {
39
40
  "@appcorp/app-corp-vista": "^1.0.0",
40
- "@appcorp/shadcn": "^1.1.83",
41
+ "@appcorp/shadcn": "^1.1.90",
41
42
  "@chromatic-com/storybook": "^5.1.2",
42
43
  "@commitlint/cli": "^20.5.0",
43
44
  "@commitlint/config-conventional": "^20.5.0",
@@ -58,7 +59,7 @@
58
59
  "@radix-ui/react-slider": "^1.3.6",
59
60
  "@radix-ui/react-slot": "^1.2.4",
60
61
  "@radix-ui/react-toast": "^1.2.15",
61
- "@react-pakistan/util-functions": "^1.25.82",
62
+ "@react-pakistan/util-functions": "^1.25.87",
62
63
  "@storybook/addon-a11y": "^10.3.4",
63
64
  "@storybook/addon-docs": "^10.3.4",
64
65
  "@storybook/addon-onboarding": "^10.3.4",
@@ -100,7 +101,6 @@
100
101
  "react": "^19.2.5",
101
102
  "react-dom": "^19.2.5",
102
103
  "react-dropzone": "^15.0.0",
103
- "react-easy-crop": "^5.5.7",
104
104
  "rimraf": "^6.1.3",
105
105
  "sonner": "^2.0.7",
106
106
  "storybook": "^10.3.4",
@@ -115,6 +115,7 @@
115
115
  "vitest": "^4.1.2",
116
116
  "webp-converter-browser": "^1.0.4"
117
117
  },
118
+ "license": "MIT",
118
119
  "packageManager": "yarn@4.14.1",
119
120
  "engines": {
120
121
  "node": "24",