@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.
Files changed (131) hide show
  1. package/README.md +147 -0
  2. package/base-modules/admission/cache.d.ts +14 -0
  3. package/base-modules/admission/cache.js +31 -0
  4. package/base-modules/admission/constants.d.ts +32 -0
  5. package/base-modules/admission/constants.js +37 -0
  6. package/base-modules/admission/context.d.ts +369 -0
  7. package/base-modules/admission/context.js +755 -0
  8. package/base-modules/admission/filter.d.ts +1 -0
  9. package/base-modules/admission/filter.js +31 -0
  10. package/base-modules/admission/form.d.ts +1 -0
  11. package/base-modules/admission/form.js +86 -0
  12. package/base-modules/admission/more-actions.d.ts +1 -0
  13. package/base-modules/admission/more-actions.js +5 -0
  14. package/base-modules/admission/page.d.ts +16 -0
  15. package/base-modules/admission/page.js +128 -0
  16. package/base-modules/admission/validate.d.ts +38 -0
  17. package/base-modules/admission/validate.js +70 -0
  18. package/base-modules/admission/view.d.ts +1 -0
  19. package/base-modules/admission/view.js +40 -0
  20. package/base-modules/discount-code/cache.d.ts +27 -0
  21. package/base-modules/discount-code/cache.js +46 -0
  22. package/base-modules/discount-code/constants.d.ts +19 -0
  23. package/base-modules/discount-code/constants.js +26 -0
  24. package/base-modules/discount-code/context.d.ts +154 -0
  25. package/base-modules/discount-code/context.js +416 -0
  26. package/base-modules/discount-code/filter.d.ts +9 -0
  27. package/base-modules/discount-code/filter.js +14 -0
  28. package/base-modules/discount-code/form.d.ts +1 -0
  29. package/base-modules/discount-code/form.js +44 -0
  30. package/base-modules/discount-code/more-actions.d.ts +9 -0
  31. package/base-modules/discount-code/more-actions.js +13 -0
  32. package/base-modules/discount-code/page.d.ts +16 -0
  33. package/base-modules/discount-code/page.js +120 -0
  34. package/base-modules/discount-code/validate.d.ts +19 -0
  35. package/base-modules/discount-code/validate.js +38 -0
  36. package/base-modules/discount-code/view.d.ts +1 -0
  37. package/base-modules/discount-code/view.js +26 -0
  38. package/base-modules/family/cache.d.ts +14 -0
  39. package/base-modules/family/cache.js +31 -0
  40. package/base-modules/family/constants.d.ts +22 -0
  41. package/base-modules/family/constants.js +26 -0
  42. package/base-modules/family/context.d.ts +173 -0
  43. package/base-modules/family/context.js +441 -0
  44. package/base-modules/family/filter.d.ts +1 -0
  45. package/base-modules/family/filter.js +28 -0
  46. package/base-modules/family/form.d.ts +1 -0
  47. package/base-modules/family/form.js +12 -0
  48. package/base-modules/family/more-actions.d.ts +1 -0
  49. package/base-modules/family/more-actions.js +5 -0
  50. package/base-modules/family/page.d.ts +16 -0
  51. package/base-modules/family/page.js +120 -0
  52. package/base-modules/family/validate.d.ts +15 -0
  53. package/base-modules/family/validate.js +18 -0
  54. package/base-modules/family/view.d.ts +1 -0
  55. package/base-modules/family/view.js +18 -0
  56. package/base-modules/family-member/cache.d.ts +14 -0
  57. package/base-modules/family-member/cache.js +31 -0
  58. package/base-modules/family-member/constants.d.ts +22 -0
  59. package/base-modules/family-member/constants.js +26 -0
  60. package/base-modules/family-member/context.d.ts +215 -0
  61. package/base-modules/family-member/context.js +486 -0
  62. package/base-modules/family-member/filter.d.ts +1 -0
  63. package/base-modules/family-member/filter.js +28 -0
  64. package/base-modules/family-member/form.d.ts +1 -0
  65. package/base-modules/family-member/form.js +17 -0
  66. package/base-modules/family-member/more-actions.d.ts +1 -0
  67. package/base-modules/family-member/more-actions.js +5 -0
  68. package/base-modules/family-member/page.d.ts +16 -0
  69. package/base-modules/family-member/page.js +122 -0
  70. package/base-modules/family-member/validate.d.ts +24 -0
  71. package/base-modules/family-member/validate.js +27 -0
  72. package/base-modules/family-member/view.d.ts +1 -0
  73. package/base-modules/family-member/view.js +40 -0
  74. package/base-modules/student-profile/cache.d.ts +14 -0
  75. package/base-modules/student-profile/cache.js +31 -0
  76. package/base-modules/student-profile/constants.d.ts +105 -0
  77. package/base-modules/student-profile/constants.js +132 -0
  78. package/base-modules/student-profile/context.d.ts +290 -0
  79. package/base-modules/student-profile/context.js +583 -0
  80. package/base-modules/student-profile/filter.d.ts +1 -0
  81. package/base-modules/student-profile/filter.js +26 -0
  82. package/base-modules/student-profile/form.d.ts +1 -0
  83. package/base-modules/student-profile/form.js +19 -0
  84. package/base-modules/student-profile/more-actions.d.ts +1 -0
  85. package/base-modules/student-profile/more-actions.js +5 -0
  86. package/base-modules/student-profile/page.d.ts +9 -0
  87. package/base-modules/student-profile/page.js +86 -0
  88. package/base-modules/student-profile/validate.d.ts +23 -0
  89. package/base-modules/student-profile/validate.js +34 -0
  90. package/base-modules/student-profile/view.d.ts +1 -0
  91. package/base-modules/student-profile/view.js +29 -0
  92. package/base-modules/workspace/cache.d.ts +9 -0
  93. package/base-modules/workspace/cache.js +28 -0
  94. package/base-modules/workspace/constants.d.ts +10 -0
  95. package/base-modules/workspace/constants.js +18 -0
  96. package/base-modules/workspace/context.d.ts +187 -0
  97. package/base-modules/workspace/context.js +293 -0
  98. package/base-modules/workspace/drawer.d.ts +1 -0
  99. package/base-modules/workspace/drawer.js +24 -0
  100. package/base-modules/workspace/filter.d.ts +1 -0
  101. package/base-modules/workspace/filter.js +13 -0
  102. package/base-modules/workspace/form.d.ts +1 -0
  103. package/base-modules/workspace/form.js +40 -0
  104. package/base-modules/workspace/more-actions.d.ts +1 -0
  105. package/base-modules/workspace/more-actions.js +13 -0
  106. package/base-modules/workspace/page.d.ts +1 -0
  107. package/base-modules/workspace/page.js +31 -0
  108. package/base-modules/workspace/validate.d.ts +9 -0
  109. package/base-modules/workspace/validate.js +8 -0
  110. package/base-modules/workspace/view.d.ts +1 -0
  111. package/base-modules/workspace/view.js +52 -0
  112. package/components/rbac-no-access.d.ts +6 -0
  113. package/components/rbac-no-access.js +4 -0
  114. package/constants.d.ts +81 -0
  115. package/constants.js +81 -0
  116. package/lib/utils.d.ts +2 -0
  117. package/lib/utils.js +5 -0
  118. package/package.json +104 -0
  119. package/tsconfig.build.tsbuildinfo +1 -0
  120. package/type.d.ts +1141 -0
  121. package/type.js +427 -0
  122. package/utils/admission-pdf.d.ts +78 -0
  123. package/utils/admission-pdf.js +73 -0
  124. package/utils/clear-cache.d.ts +1 -0
  125. package/utils/clear-cache.js +8 -0
  126. package/utils/format-value.d.ts +1 -0
  127. package/utils/format-value.js +1 -0
  128. package/utils/pdf-generator.d.ts +41 -0
  129. package/utils/pdf-generator.js +107 -0
  130. package/utils/resolve-rbac-permissions.d.ts +11 -0
  131. package/utils/resolve-rbac-permissions.js +251 -0
@@ -0,0 +1,290 @@
1
+ import { StudentProfileBE } from "@/type";
2
+ import { type RowAction } from "@appcorp/shadcn/components/enhanced-table";
3
+ export declare const STUDENT_PROFILE_DRAWER: {
4
+ readonly FILTER_DRAWER: string;
5
+ readonly FORM_DRAWER: string;
6
+ readonly MORE_ACTIONS_DRAWER: string;
7
+ readonly VIEW_DRAWER: string;
8
+ };
9
+ export declare const STUDENT_PROFILE_ACTION_TYPES: {
10
+ readonly RESET_FORM: "RESET_FORM";
11
+ readonly SET_CURRENT_PAGE: "SET_CURRENT_PAGE";
12
+ readonly SET_PAGE_LIMIT: "SET_PAGE_LIMIT";
13
+ readonly SET_SEARCH_QUERY: "SET_SEARCH_QUERY";
14
+ readonly SET_DRAWER: "SET_DRAWER";
15
+ readonly SET_ITEMS: "SET_ITEMS";
16
+ readonly SET_FORM_DATA: "SET_FORM_DATA";
17
+ readonly SET_DISABLE_SAVE_BUTTON: "SET_DISABLE_SAVE_BUTTON";
18
+ readonly SET_INPUT_FIELD: "SET_INPUT_FIELD";
19
+ readonly SET_ERRORS: "SET_ERRORS";
20
+ readonly SET_FILTERS: "SET_FILTERS";
21
+ }, studentProfileModuleConfig: import("@react-pakistan/util-functions/factory/generic-module-factory").ModuleConfig<{
22
+ items: StudentProfileBE[];
23
+ count: number;
24
+ currentPage: number;
25
+ pageLimit: number;
26
+ searchQuery: string;
27
+ filterStatus: undefined;
28
+ filterGender: undefined;
29
+ filterEnabled: boolean | undefined;
30
+ disableSaveButton: boolean;
31
+ drawer: string | null;
32
+ id: string;
33
+ familyMemberId: string;
34
+ studentCode: string;
35
+ status: string;
36
+ enabled: boolean;
37
+ remarks: string | null;
38
+ firstName: string;
39
+ lastName: string;
40
+ dateOfBirth: string | Date | null;
41
+ gender: string | null;
42
+ bloodGroup: string | null;
43
+ phone: string | null;
44
+ email: string | null;
45
+ emergencyPhone: string | null;
46
+ avatar: string | null;
47
+ familyId: string;
48
+ address: string | null;
49
+ city: string | null;
50
+ state: string | null;
51
+ country: string | null;
52
+ postalCode: string | null;
53
+ errors: Record<string, string>;
54
+ }>, initialStudentProfileState: {
55
+ items: StudentProfileBE[];
56
+ count: number;
57
+ currentPage: number;
58
+ pageLimit: number;
59
+ searchQuery: string;
60
+ filterStatus: undefined;
61
+ filterGender: undefined;
62
+ filterEnabled: boolean | undefined;
63
+ disableSaveButton: boolean;
64
+ drawer: string | null;
65
+ id: string;
66
+ familyMemberId: string;
67
+ studentCode: string;
68
+ status: string;
69
+ enabled: boolean;
70
+ remarks: string | null;
71
+ firstName: string;
72
+ lastName: string;
73
+ dateOfBirth: string | Date | null;
74
+ gender: string | null;
75
+ bloodGroup: string | null;
76
+ phone: string | null;
77
+ email: string | null;
78
+ emergencyPhone: string | null;
79
+ avatar: string | null;
80
+ familyId: string;
81
+ address: string | null;
82
+ city: string | null;
83
+ state: string | null;
84
+ country: string | null;
85
+ postalCode: string | null;
86
+ errors: Record<string, string>;
87
+ }, StudentProfileProvider: import("react").FC<{
88
+ children: React.ReactNode;
89
+ }>, studentProfileReducer: (state: {
90
+ items: StudentProfileBE[];
91
+ count: number;
92
+ currentPage: number;
93
+ pageLimit: number;
94
+ searchQuery: string;
95
+ filterStatus: undefined;
96
+ filterGender: undefined;
97
+ filterEnabled: boolean | undefined;
98
+ disableSaveButton: boolean;
99
+ drawer: string | null;
100
+ id: string;
101
+ familyMemberId: string;
102
+ studentCode: string;
103
+ status: string;
104
+ enabled: boolean;
105
+ remarks: string | null;
106
+ firstName: string;
107
+ lastName: string;
108
+ dateOfBirth: string | Date | null;
109
+ gender: string | null;
110
+ bloodGroup: string | null;
111
+ phone: string | null;
112
+ email: string | null;
113
+ emergencyPhone: string | null;
114
+ avatar: string | null;
115
+ familyId: string;
116
+ address: string | null;
117
+ city: string | null;
118
+ state: string | null;
119
+ country: string | null;
120
+ postalCode: string | null;
121
+ errors: Record<string, string>;
122
+ }, action: any) => {
123
+ items: StudentProfileBE[];
124
+ count: number;
125
+ currentPage: number;
126
+ pageLimit: number;
127
+ searchQuery: string;
128
+ filterStatus: undefined;
129
+ filterGender: undefined;
130
+ filterEnabled: boolean | undefined;
131
+ disableSaveButton: boolean;
132
+ drawer: string | null;
133
+ id: string;
134
+ familyMemberId: string;
135
+ studentCode: string;
136
+ status: string;
137
+ enabled: boolean;
138
+ remarks: string | null;
139
+ firstName: string;
140
+ lastName: string;
141
+ dateOfBirth: string | Date | null;
142
+ gender: string | null;
143
+ bloodGroup: string | null;
144
+ phone: string | null;
145
+ email: string | null;
146
+ emergencyPhone: string | null;
147
+ avatar: string | null;
148
+ familyId: string;
149
+ address: string | null;
150
+ city: string | null;
151
+ state: string | null;
152
+ country: string | null;
153
+ postalCode: string | null;
154
+ errors: Record<string, string>;
155
+ }, useStudentProfileContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContext<{
156
+ items: StudentProfileBE[];
157
+ count: number;
158
+ currentPage: number;
159
+ pageLimit: number;
160
+ searchQuery: string;
161
+ filterStatus: undefined;
162
+ filterGender: undefined;
163
+ filterEnabled: boolean | undefined;
164
+ disableSaveButton: boolean;
165
+ drawer: string | null;
166
+ id: string;
167
+ familyMemberId: string;
168
+ studentCode: string;
169
+ status: string;
170
+ enabled: boolean;
171
+ remarks: string | null;
172
+ firstName: string;
173
+ lastName: string;
174
+ dateOfBirth: string | Date | null;
175
+ gender: string | null;
176
+ bloodGroup: string | null;
177
+ phone: string | null;
178
+ email: string | null;
179
+ emergencyPhone: string | null;
180
+ avatar: string | null;
181
+ familyId: string;
182
+ address: string | null;
183
+ city: string | null;
184
+ state: string | null;
185
+ country: string | null;
186
+ postalCode: string | null;
187
+ errors: Record<string, string>;
188
+ }>;
189
+ export declare const StudentProfileStateContextProvider: import("react").FC<{
190
+ children: React.ReactNode;
191
+ }>;
192
+ export declare const useStudentProfileStateContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContext<{
193
+ items: StudentProfileBE[];
194
+ count: number;
195
+ currentPage: number;
196
+ pageLimit: number;
197
+ searchQuery: string;
198
+ filterStatus: undefined;
199
+ filterGender: undefined;
200
+ filterEnabled: boolean | undefined;
201
+ disableSaveButton: boolean;
202
+ drawer: string | null;
203
+ id: string;
204
+ familyMemberId: string;
205
+ studentCode: string;
206
+ status: string;
207
+ enabled: boolean;
208
+ remarks: string | null;
209
+ firstName: string;
210
+ lastName: string;
211
+ dateOfBirth: string | Date | null;
212
+ gender: string | null;
213
+ bloodGroup: string | null;
214
+ phone: string | null;
215
+ email: string | null;
216
+ emergencyPhone: string | null;
217
+ avatar: string | null;
218
+ familyId: string;
219
+ address: string | null;
220
+ city: string | null;
221
+ state: string | null;
222
+ country: string | null;
223
+ postalCode: string | null;
224
+ errors: Record<string, string>;
225
+ }>;
226
+ export declare const useStudentProfileModule: () => {
227
+ applyFilters: () => void;
228
+ byIdLoading: boolean;
229
+ clearFilters: () => void;
230
+ deleteLoading: boolean;
231
+ handleChange: (field: string, value: string | number | boolean | undefined | null) => void;
232
+ handleCloseDrawer: () => void;
233
+ handleCreate: () => void;
234
+ handleDelete: (row?: unknown) => void;
235
+ handleEdit: (row?: unknown) => void;
236
+ handleFilters: () => void;
237
+ handleMoreActions: () => void;
238
+ handlePageChange: (page: number) => void;
239
+ handlePageLimitChange: (limit: number) => void;
240
+ handleReAdmitStudent: (row?: unknown) => Promise<void>;
241
+ handleSearch: (query: string) => void;
242
+ handleSubmit: () => void;
243
+ handleView: (row?: unknown) => void;
244
+ handleWithdrawStudent: (row?: unknown) => Promise<void>;
245
+ headerActions: {
246
+ enabled: boolean;
247
+ handleOnClick: () => void;
248
+ label: string;
249
+ order: number;
250
+ icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
251
+ }[];
252
+ listLoading: boolean;
253
+ rowActions: RowAction[];
254
+ updateLoading: boolean;
255
+ state: {
256
+ items: StudentProfileBE[];
257
+ count: number;
258
+ currentPage: number;
259
+ pageLimit: number;
260
+ searchQuery: string;
261
+ filterStatus: undefined;
262
+ filterGender: undefined;
263
+ filterEnabled: boolean | undefined;
264
+ disableSaveButton: boolean;
265
+ drawer: string | null;
266
+ id: string;
267
+ familyMemberId: string;
268
+ studentCode: string;
269
+ status: string;
270
+ enabled: boolean;
271
+ remarks: string | null;
272
+ firstName: string;
273
+ lastName: string;
274
+ dateOfBirth: string | Date | null;
275
+ gender: string | null;
276
+ bloodGroup: string | null;
277
+ phone: string | null;
278
+ email: string | null;
279
+ emergencyPhone: string | null;
280
+ avatar: string | null;
281
+ familyId: string;
282
+ address: string | null;
283
+ city: string | null;
284
+ state: string | null;
285
+ country: string | null;
286
+ postalCode: string | null;
287
+ errors: Record<string, string>;
288
+ };
289
+ dispatch: React.Dispatch<any>;
290
+ };