@appcorp/fusion-storybook 0.1.34 → 0.1.35
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/base-modules/discount-code/page.js +2 -3
- package/base-modules/family/page.js +2 -3
- package/base-modules/family-member/page.js +2 -3
- package/base-modules/section/page.js +2 -5
- package/base-modules/student-profile/page.js +2 -3
- package/base-modules/subject/page.js +2 -3
- package/base-modules/teacher/page.js +1 -2
- package/base-modules/user/page.js +2 -3
- package/base-modules/workspace-user/page.js +2 -3
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
|
-
import { useDiscountCodeModule, DiscountCodeProvider,
|
|
17
|
+
import { useDiscountCodeModule, DiscountCodeProvider, DISCOUNT_CODE_ACTION_TYPES, } from "./context";
|
|
18
18
|
import { DiscountCodeFilter } from "./filter";
|
|
19
19
|
import { DiscountCodeForm } from "./form";
|
|
20
20
|
import { DiscountCodeMoreActions } from "./more-actions";
|
|
@@ -42,7 +42,7 @@ const createComponentInstances = () => ({
|
|
|
42
42
|
moreActions: _jsx(DiscountCodeMoreActions, {}),
|
|
43
43
|
view: _jsx(DiscountCodeView, {}),
|
|
44
44
|
});
|
|
45
|
-
const createDiscountCodeConfig = ({ cancelLabel,
|
|
45
|
+
const createDiscountCodeConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelCode, labelDescription, labelDiscountType, labelDiscountValue, labelEnabled, labelId, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
46
46
|
const components = createComponentInstances();
|
|
47
47
|
return {
|
|
48
48
|
moduleName: "discountCode",
|
|
@@ -65,7 +65,6 @@ const createDiscountCodeConfig = ({ cancelLabel, drawer, dispatch, drawerTitle,
|
|
|
65
65
|
tableDescription,
|
|
66
66
|
tableTitle,
|
|
67
67
|
viewContent: components.view,
|
|
68
|
-
size: drawer === DISCOUNT_CODE_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
69
68
|
onClearFilters: () => {
|
|
70
69
|
dispatch({ type: DISCOUNT_CODE_ACTION_TYPES.RESET_FORM });
|
|
71
70
|
},
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
|
-
import { useFamilyModule, FamilyProvider, FAMILY_ACTION_TYPES,
|
|
17
|
+
import { useFamilyModule, FamilyProvider, FAMILY_ACTION_TYPES, } from "./context";
|
|
18
18
|
import { FamilyFilter } from "./filter";
|
|
19
19
|
import { FamilyForm } from "./form";
|
|
20
20
|
import { FamilyMoreActions } from "./more-actions";
|
|
@@ -42,7 +42,7 @@ const createComponentInstances = () => ({
|
|
|
42
42
|
moreActions: _jsx(FamilyMoreActions, {}),
|
|
43
43
|
view: _jsx(FamilyView, {}),
|
|
44
44
|
});
|
|
45
|
-
const createFamilyConfig = ({ cancelLabel, dispatch,
|
|
45
|
+
const createFamilyConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelAddress, labelCity, labelEnabled, labelFamilyCode, labelId, labelPrimaryEmail, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
46
46
|
const components = createComponentInstances();
|
|
47
47
|
return {
|
|
48
48
|
moduleName: "family",
|
|
@@ -65,7 +65,6 @@ const createFamilyConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, labelA
|
|
|
65
65
|
tableDescription,
|
|
66
66
|
tableTitle,
|
|
67
67
|
viewContent: components.view,
|
|
68
|
-
size: drawer === FAMILY_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
69
68
|
onClearFilters: () => {
|
|
70
69
|
dispatch({ type: FAMILY_ACTION_TYPES.RESET_FORM });
|
|
71
70
|
},
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
|
-
import { useFamilyMemberModule, FamilyMemberProvider,
|
|
17
|
+
import { useFamilyMemberModule, FamilyMemberProvider, FAMILY_MEMBER_ACTION_TYPES, } from "./context";
|
|
18
18
|
import { FamilyMemberFilter } from "./filter";
|
|
19
19
|
import { FamilyMemberForm } from "./form";
|
|
20
20
|
import { FamilyMemberMoreActions } from "./more-actions";
|
|
@@ -43,7 +43,7 @@ const createComponentInstances = () => ({
|
|
|
43
43
|
moreActions: _jsx(FamilyMemberMoreActions, {}),
|
|
44
44
|
view: _jsx(FamilyMemberView, {}),
|
|
45
45
|
});
|
|
46
|
-
const createFamilyMemberConfig = ({ cancelLabel,
|
|
46
|
+
const createFamilyMemberConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelEmail, labelEnabled, labelFirstName, labelId, labelPhone, labelPrimaryContact, labelRole, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
47
47
|
const components = createComponentInstances();
|
|
48
48
|
return {
|
|
49
49
|
moduleName: "familyMember",
|
|
@@ -67,7 +67,6 @@ const createFamilyMemberConfig = ({ cancelLabel, drawer, dispatch, drawerTitle,
|
|
|
67
67
|
tableDescription,
|
|
68
68
|
tableTitle,
|
|
69
69
|
viewContent: components.view,
|
|
70
|
-
size: drawer === FAMILY_MEMBER_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
71
70
|
onClearFilters: () => {
|
|
72
71
|
dispatch({ type: FAMILY_MEMBER_ACTION_TYPES.RESET_FORM });
|
|
73
72
|
},
|
|
@@ -12,14 +12,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
12
|
import { useMemo } from "react";
|
|
13
13
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
14
14
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
15
|
-
import { useSectionModule, SectionProvider, SECTION_ACTION_TYPES,
|
|
15
|
+
import { useSectionModule, SectionProvider, SECTION_ACTION_TYPES, } from "./context";
|
|
16
16
|
import { SectionFilter } from "./filter";
|
|
17
17
|
import { SectionForm } from "./form";
|
|
18
18
|
import { SectionMoreActions } from "./more-actions";
|
|
19
19
|
import { SectionView } from "./view";
|
|
20
20
|
import { resolveRbacPermissions } from "../../utils/resolve-rbac-permissions";
|
|
21
21
|
import { RbacNoAccess } from "../../components/rbac-no-access";
|
|
22
|
-
import { useTranslations } from "next-intl";
|
|
23
22
|
// ============================================================================
|
|
24
23
|
// TABLE COLUMN CONFIGURATION (static — no runtime deps)
|
|
25
24
|
// ============================================================================
|
|
@@ -40,7 +39,7 @@ const createComponentInstances = () => ({
|
|
|
40
39
|
moreActions: _jsx(SectionMoreActions, {}),
|
|
41
40
|
view: _jsx(SectionView, {}),
|
|
42
41
|
});
|
|
43
|
-
const createSectionConfig = ({ cancelLabel, dispatch,
|
|
42
|
+
const createSectionConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelCapacity, labelClass, labelEnabled, labelId, labelName, labelStatus, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
44
43
|
const components = createComponentInstances();
|
|
45
44
|
return {
|
|
46
45
|
moduleName: "section",
|
|
@@ -62,7 +61,6 @@ const createSectionConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, label
|
|
|
62
61
|
tableDescription,
|
|
63
62
|
tableTitle,
|
|
64
63
|
viewContent: components.view,
|
|
65
|
-
size: drawer === SECTION_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
66
64
|
onClearFilters: () => dispatch({ type: SECTION_ACTION_TYPES.RESET_FORM }),
|
|
67
65
|
};
|
|
68
66
|
};
|
|
@@ -74,7 +72,6 @@ const GenericSectionPage = createGenericModulePage();
|
|
|
74
72
|
// INNER PAGE (requires SectionProvider context)
|
|
75
73
|
// ============================================================================
|
|
76
74
|
const SectionPageInner = (props) => {
|
|
77
|
-
const t = useTranslations("section");
|
|
78
75
|
const context = useSectionModule();
|
|
79
76
|
// Memoize config creation - destructure props to avoid object reference changes
|
|
80
77
|
const sectionConfig = useMemo(() => createSectionConfig({
|
|
@@ -10,7 +10,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
12
12
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
13
|
-
import { useStudentProfileModule, StudentProfileProvider,
|
|
13
|
+
import { useStudentProfileModule, StudentProfileProvider, STUDENT_PROFILE_ACTION_TYPES, } from "./context";
|
|
14
14
|
import { StudentProfileFilter } from "./filter";
|
|
15
15
|
import { StudentProfileForm } from "./form";
|
|
16
16
|
import { StudentProfileMoreActions } from "./more-actions";
|
|
@@ -38,7 +38,7 @@ const createComponentInstances = () => ({
|
|
|
38
38
|
moreActions: _jsx(StudentProfileMoreActions, {}),
|
|
39
39
|
view: _jsx(StudentProfileView, {}),
|
|
40
40
|
});
|
|
41
|
-
const createStudentProfileConfig = ({ cancelLabel,
|
|
41
|
+
const createStudentProfileConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelEnabled, labelFirstName, labelId, labelLastName, labelStatus, labelStudentCode, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
42
42
|
const components = createComponentInstances();
|
|
43
43
|
return {
|
|
44
44
|
moduleName: "studentProfile",
|
|
@@ -61,7 +61,6 @@ const createStudentProfileConfig = ({ cancelLabel, drawer, dispatch, drawerTitle
|
|
|
61
61
|
tableDescription,
|
|
62
62
|
tableTitle,
|
|
63
63
|
viewContent: components.view,
|
|
64
|
-
size: drawer === STUDENT_PROFILE_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
65
64
|
onClearFilters: () => {
|
|
66
65
|
dispatch({ type: STUDENT_PROFILE_ACTION_TYPES.RESET_FORM });
|
|
67
66
|
},
|
|
@@ -12,7 +12,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
12
|
import { useMemo } from "react";
|
|
13
13
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
14
14
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
15
|
-
import { useSubjectModule, SubjectProvider, SUBJECT_ACTION_TYPES,
|
|
15
|
+
import { useSubjectModule, SubjectProvider, SUBJECT_ACTION_TYPES, } from "./context";
|
|
16
16
|
import { SubjectFilter } from "./filter";
|
|
17
17
|
import { SubjectForm } from "./form";
|
|
18
18
|
import { SubjectMoreActions } from "./more-actions";
|
|
@@ -39,7 +39,7 @@ const createComponentInstances = () => ({
|
|
|
39
39
|
moreActions: _jsx(SubjectMoreActions, {}),
|
|
40
40
|
view: _jsx(SubjectView, {}),
|
|
41
41
|
});
|
|
42
|
-
const createSubjectConfig = ({ cancelLabel, dispatch,
|
|
42
|
+
const createSubjectConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelCode, labelDescription, labelEnabled, labelId, labelName, labelStatus, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
43
43
|
const components = createComponentInstances();
|
|
44
44
|
return {
|
|
45
45
|
moduleName: "subject",
|
|
@@ -61,7 +61,6 @@ const createSubjectConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, label
|
|
|
61
61
|
tableDescription,
|
|
62
62
|
tableTitle,
|
|
63
63
|
viewContent: components.view,
|
|
64
|
-
size: drawer === SUBJECT_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
65
64
|
onClearFilters: () => dispatch({ type: SUBJECT_ACTION_TYPES.RESET_FORM }),
|
|
66
65
|
};
|
|
67
66
|
};
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
|
-
import { useTeacherModule, TeacherProvider,
|
|
17
|
+
import { useTeacherModule, TeacherProvider, TEACHER_ACTION_TYPES, } from "./context";
|
|
18
18
|
import { TeacherFilter } from "./filter";
|
|
19
19
|
import { TeacherForm } from "./form";
|
|
20
20
|
import { TeacherMoreActions } from "./more-actions";
|
|
@@ -81,7 +81,6 @@ const createTeacherConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, label
|
|
|
81
81
|
tableDescription,
|
|
82
82
|
tableTitle,
|
|
83
83
|
viewContent: components.view,
|
|
84
|
-
size: drawer === TEACHER_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
85
84
|
onClearFilters: () => {
|
|
86
85
|
dispatch({ type: TEACHER_ACTION_TYPES.RESET_FORM });
|
|
87
86
|
},
|
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMemo } from "react";
|
|
15
15
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
16
16
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
17
|
-
import { useUserModule, UserProvider,
|
|
17
|
+
import { useUserModule, UserProvider, USER_ACTION_TYPES } from "./context";
|
|
18
18
|
import { UserFilter } from "./filter";
|
|
19
19
|
import { UserForm } from "./form";
|
|
20
20
|
import { UserView } from "./view";
|
|
@@ -41,7 +41,7 @@ const createComponentInstances = () => ({
|
|
|
41
41
|
moreActions: _jsx(UserMoreActions, {}),
|
|
42
42
|
view: _jsx(UserView, {}),
|
|
43
43
|
});
|
|
44
|
-
const createUserConfig = ({ cancelLabel, dispatch,
|
|
44
|
+
const createUserConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelEmail, labelEnabled, labelId, labelName, labelPhone, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
45
45
|
const components = createComponentInstances();
|
|
46
46
|
return {
|
|
47
47
|
moduleName: "user",
|
|
@@ -63,7 +63,6 @@ const createUserConfig = ({ cancelLabel, dispatch, drawer, drawerTitle, labelAct
|
|
|
63
63
|
tableDescription,
|
|
64
64
|
tableTitle,
|
|
65
65
|
viewContent: components.view,
|
|
66
|
-
size: drawer === USER_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
67
66
|
onClearFilters: () => {
|
|
68
67
|
dispatch({ type: USER_ACTION_TYPES.RESET_FORM });
|
|
69
68
|
},
|
|
@@ -12,7 +12,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
12
|
import { useMemo } from "react";
|
|
13
13
|
import { COMPONENT_TYPE } from "@appcorp/shadcn/components/enhanced-table";
|
|
14
14
|
import { createGenericModulePage, } from "@react-pakistan/util-functions/factory/generic-component-factory";
|
|
15
|
-
import { useWorkspaceUserModule, WorkspaceUserProvider,
|
|
15
|
+
import { useWorkspaceUserModule, WorkspaceUserProvider, WORKSPACE_USER_ACTION_TYPES, } from "./context";
|
|
16
16
|
import { WorkspaceUserFilter } from "./filter";
|
|
17
17
|
import { WorkspaceUserForm } from "./form";
|
|
18
18
|
import { WorkspaceUserMoreActions } from "./more-actions";
|
|
@@ -34,7 +34,7 @@ const tableBodyCols = [
|
|
|
34
34
|
// GENERIC PAGE COMPONENT
|
|
35
35
|
// ============================================================================
|
|
36
36
|
const GenericWorkspaceUserPage = createGenericModulePage();
|
|
37
|
-
const createWorkspaceUserConfig = ({ cancelLabel, dispatch,
|
|
37
|
+
const createWorkspaceUserConfig = ({ cancelLabel, dispatch, drawerTitle, labelActions, labelId, labelRole, labelSystemRole, labelUser, labelWorkspace, saveLabel, searchPlaceholder, tableDescription, tableTitle, }) => {
|
|
38
38
|
return {
|
|
39
39
|
moduleName: "workspaceUser",
|
|
40
40
|
tableColumns: [
|
|
@@ -55,7 +55,6 @@ const createWorkspaceUserConfig = ({ cancelLabel, dispatch, drawer, drawerTitle,
|
|
|
55
55
|
tableDescription,
|
|
56
56
|
tableTitle,
|
|
57
57
|
viewContent: _jsx(WorkspaceUserView, {}),
|
|
58
|
-
size: drawer === WORKSPACE_USER_DRAWER.FORM_DRAWER ? "full" : "small",
|
|
59
58
|
onClearFilters: () => {
|
|
60
59
|
dispatch({ type: WORKSPACE_USER_ACTION_TYPES.RESET_FORM });
|
|
61
60
|
},
|