@appcorp/fusion-storybook 0.1.28 → 0.1.29

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.
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides localStorage-based caching for classes using generic cache system.
5
5
  */
6
- import { ClassBE } from "@/type";
6
+ import { ClassBE } from "../../type";
7
7
  export declare const getCachedClassesSync: () => import("@react-pakistan/util-functions").ListResponse<ClassBE>;
8
8
  export declare const getCachedClasses: ({ params, }: {
9
9
  params: Record<string, unknown>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides localStorage-based caching for classes using generic cache system.
5
5
  */
6
- import { LS_KEYS } from "@/constants";
6
+ import { LS_KEYS } from "../../constants";
7
7
  import { CLASS_API_ROUTES } from "./constants";
8
8
  import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
9
9
  // ============================================================================
@@ -1,4 +1,4 @@
1
- import { ClassBE } from "@/type";
1
+ import { ClassBE } from "../../type";
2
2
  import { type RowAction, type TableRow } from "@appcorp/shadcn/components/enhanced-table";
3
3
  export declare const CLASS_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { API_METHODS, downloadFromUrl } from "@react-pakistan/util-functions";
9
9
  import { getCachedWorkspaceSync } from "../workspace/cache";
10
10
  import converter from "json-2-csv";
11
- import { Timeline } from "@/components/timeline";
11
+ import { Timeline } from "../../components/timeline";
12
12
  import { useTranslations } from "next-intl";
13
13
  export const ClassMoreActions = () => {
14
14
  const t = useTranslations("class");
@@ -11,10 +11,10 @@ import { Separator } from "@appcorp/shadcn/components/ui/separator";
11
11
  import { GraduationCap, CheckCircle2, XCircle } from "lucide-react";
12
12
  import { useClassModule } from "./context";
13
13
  import { useTranslations } from "next-intl";
14
- import { formatValue } from "@/utils/format-value";
14
+ import { formatValue } from "../../utils/format-value";
15
15
  export const ClassView = () => {
16
16
  const { state } = useClassModule();
17
17
  const { code, description, enabled, name } = state;
18
18
  const t = useTranslations("class");
19
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "flex h-24 w-24 items-center justify-center rounded-full bg-primary/10", children: _jsx(GraduationCap, { className: "h-12 w-12 text-primary" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("code"), ": ", code] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("classDetails") })] }), _jsx(CardDescription, { children: t("completeClassInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("className") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("classCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("description") }), _jsx("p", { className: "text-base", children: formatValue(description) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
19
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(GraduationCap, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("code"), ": ", code] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("classDetails") })] }), _jsx(CardDescription, { children: t("completeClassInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("className") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("classCode") }), _jsx("p", { className: "text-base", children: formatValue(code) })] }), _jsxs("div", { className: "space-y-1 md:col-span-2", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("description") }), _jsx("p", { className: "text-base", children: formatValue(description) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
20
20
  };
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides localStorage-based caching for sections using generic cache system.
5
5
  */
6
- import { SectionBE } from "@/type";
6
+ import { SectionBE } from "../../type";
7
7
  export declare const getCachedSectionsSync: () => import("@react-pakistan/util-functions").ListResponse<SectionBE>;
8
8
  export declare const getCachedSections: ({ params, }: {
9
9
  params?: Record<string, unknown>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides localStorage-based caching for sections using generic cache system.
5
5
  */
6
- import { LS_KEYS } from "@/constants";
6
+ import { LS_KEYS } from "../../constants";
7
7
  import { SECTION_API_ROUTES } from "./constants";
8
8
  import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
9
9
  // ============================================================================
@@ -1,4 +1,4 @@
1
- import { SectionBE } from "@/type";
1
+ import { SectionBE } from "../../type";
2
2
  import { type RowAction, type TableRow } from "@appcorp/shadcn/components/enhanced-table";
3
3
  export declare const SECTION_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { API_METHODS, downloadFromUrl } from "@react-pakistan/util-functions";
9
9
  import { getCachedWorkspaceSync } from "../workspace/cache";
10
10
  import converter from "json-2-csv";
11
- import { Timeline } from "@/components/timeline";
11
+ import { Timeline } from "../../components/timeline";
12
12
  import { useTranslations } from "next-intl";
13
13
  export const SectionMoreActions = () => {
14
14
  const t = useTranslations("section");
@@ -11,7 +11,7 @@ import { Separator } from "@appcorp/shadcn/components/ui/separator";
11
11
  import { GraduationCap, CheckCircle2, XCircle, Users } from "lucide-react";
12
12
  import { useSectionModule } from "./context";
13
13
  import { useTranslations } from "next-intl";
14
- import { formatValue } from "@/utils/format-value";
14
+ import { formatValue } from "../../utils/format-value";
15
15
  import { getCachedClassesSync } from "../class/cache";
16
16
  export const SectionView = () => {
17
17
  const { state } = useSectionModule();
@@ -22,5 +22,5 @@ export const SectionView = () => {
22
22
  const className = selectedClass
23
23
  ? `${selectedClass.name} (${selectedClass.code})`
24
24
  : "—";
25
- return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "flex h-24 w-24 items-center justify-center rounded-full bg-primary/10", children: _jsx(Users, { className: "h-12 w-12 text-primary" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("class"), ": ", className] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "h-5 w-5 text-primary" }), _jsx(CardTitle, { className: "text-lg", children: t("sectionDetails") })] }), _jsx(CardDescription, { children: t("completeSectionInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("sectionName") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("class") }), _jsx("p", { className: "text-base", children: className })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("capacity") }), _jsxs("p", { className: "text-base", children: [formatValue(capacity), " ", capacity !== null ? t("students") : ""] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-sm font-medium text-muted-foreground", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
25
+ return (_jsxs("div", { className: "space-y-4", children: [_jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "flex items-center gap-6", children: [_jsx("div", { className: "bg-primary/10 flex h-24 w-24 items-center justify-center rounded-full", children: _jsx(Users, { className: "text-primary h-12 w-12" }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("h2", { className: "text-2xl font-bold", children: name }), enabled ? (_jsx(CheckCircle2, { className: "h-5 w-5 text-green-500" })) : (_jsx(XCircle, { className: "h-5 w-5 text-red-500" }))] }), _jsxs("p", { className: "text-muted-foreground mt-1", children: [t("class"), ": ", className] })] })] }) }) }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "pb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(GraduationCap, { className: "text-primary h-5 w-5" }), _jsx(CardTitle, { className: "text-lg", children: t("sectionDetails") })] }), _jsx(CardDescription, { children: t("completeSectionInformation") })] }), _jsx(Separator, {}), _jsx(CardContent, { className: "pt-6", children: _jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("sectionName") }), _jsx("p", { className: "text-base", children: formatValue(name) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("class") }), _jsx("p", { className: "text-base", children: className })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("capacity") }), _jsxs("p", { className: "text-base", children: [formatValue(capacity), " ", capacity !== null ? t("students") : ""] })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("p", { className: "text-muted-foreground text-sm font-medium", children: t("status") }), _jsx(Badge, { variant: enabled ? "default" : "secondary", children: enabled ? t("statusActive") : t("statusInactive") })] })] }) })] })] }));
26
26
  };
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides localStorage-based caching for subjects using generic cache system.
5
5
  */
6
- import { SubjectBE } from "@/type";
6
+ import { SubjectBE } from "../../type";
7
7
  export declare const getCachedSubjectsSync: () => import("@react-pakistan/util-functions").ListResponse<SubjectBE>;
8
8
  export declare const getCachedSubjects: ({ params, }: {
9
9
  params?: Record<string, unknown>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provides localStorage-based caching for subjects using generic cache system.
5
5
  */
6
- import { LS_KEYS } from "@/constants";
6
+ import { LS_KEYS } from "../../constants";
7
7
  import { SUBJECT_API_ROUTES } from "./constants";
8
8
  import { getCachedData, getCachedDataSync, getCachedItemById, invalidateCache, isCacheStale, preloadCache, } from "@react-pakistan/util-functions";
9
9
  // ============================================================================
@@ -1,4 +1,4 @@
1
- import { SubjectBE } from "@/type";
1
+ import { SubjectBE } from "../../type";
2
2
  import { type RowAction, type TableRow } from "@appcorp/shadcn/components/enhanced-table";
3
3
  export declare const SUBJECT_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { API_METHODS, downloadFromUrl } from "@react-pakistan/util-functions";
9
9
  import { getCachedWorkspaceSync } from "../workspace/cache";
10
10
  import converter from "json-2-csv";
11
- import { Timeline } from "@/components/timeline";
11
+ import { Timeline } from "../../components/timeline";
12
12
  import { useTranslations } from "next-intl";
13
13
  export const SubjectMoreActions = () => {
14
14
  const t = useTranslations("subject");
@@ -11,7 +11,7 @@ import { Separator } from "@appcorp/shadcn/components/ui/separator";
11
11
  import { BookOpen, CheckCircle2, XCircle } from "lucide-react";
12
12
  import { useSubjectModule } from "./context";
13
13
  import { useTranslations } from "next-intl";
14
- import { formatValue } from "@/utils/format-value";
14
+ import { formatValue } from "../../utils/format-value";
15
15
  export const SubjectView = () => {
16
16
  const { state } = useSubjectModule();
17
17
  const { code, description, enabled, name } = state;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/fusion-storybook",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "scripts": {
5
5
  "build-storybook": "storybook build",
6
6
  "build:next": "next build",