@eka-care/abdm-dashboard-stg 0.0.1
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 +73 -0
- package/eslint.config.js +23 -0
- package/index.html +27 -0
- package/package.json +46 -0
- package/postcss.config.js +6 -0
- package/public/headerImg.png +0 -0
- package/public/iphoneStep2.png +0 -0
- package/public/iphoneStep3.png +0 -0
- package/public/vite.svg +1 -0
- package/src/abdm-dashboard.tsx +18 -0
- package/src/app/store.ts +15 -0
- package/src/appointment-token-pdf/pdf-page1.tsx +324 -0
- package/src/appointment-token-pdf/pdf-page2.tsx +346 -0
- package/src/assets/react.svg +1 -0
- package/src/components/abha-metric.tsx +322 -0
- package/src/components/abha-workflows.tsx +225 -0
- package/src/components/automate-strip.tsx +29 -0
- package/src/components/cards/metric-card.tsx +75 -0
- package/src/components/cards/request-card.tsx +23 -0
- package/src/components/cards/request-cards.tsx +24 -0
- package/src/components/cards/workflow-card.tsx +55 -0
- package/src/components/custom/calendar.tsx +59 -0
- package/src/components/custom/switch.tsx +32 -0
- package/src/components/loader/abdm-dash-loader.tsx +21 -0
- package/src/components/loader/card-loader.tsx +20 -0
- package/src/components/modal/automateTaks-modal.tsx +110 -0
- package/src/components/modal/modal.tsx +67 -0
- package/src/components/modal/select-lang-modal.tsx +38 -0
- package/src/components/notification-header.tsx +11 -0
- package/src/features/api/baseApi.ts +23 -0
- package/src/features/cardApis/cardApi.ts +15 -0
- package/src/features/landingApi/landingApi.ts +20 -0
- package/src/features/slice/landingApiSlice.ts +49 -0
- package/src/features/tasksApis/taskGetApi.ts +12 -0
- package/src/features/tasksApis/taskUpdateApi.ts +15 -0
- package/src/home.tsx +132 -0
- package/src/index.css +297 -0
- package/src/main.tsx +107 -0
- package/src/tailwind-theme-config/pds2/border.ts +69 -0
- package/src/tailwind-theme-config/pds2/colors.ts +88 -0
- package/src/tailwind-theme-config/pds2/spacing.ts +1007 -0
- package/src/types/pagify-sdk.d.ts +17 -0
- package/src/utils/constants.ts +19 -0
- package/src/utils/helpers.ts +32 -0
- package/tailwind.config.ts +131 -0
- package/tsconfig.app.json +28 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +62 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare module '@eka-care/pagify-sdk' {
|
|
2
|
+
export interface RenderOptions {
|
|
3
|
+
body_html?: string;
|
|
4
|
+
header_html?: string;
|
|
5
|
+
footer_html?: string;
|
|
6
|
+
onPdfReady?: (blobUrl: string) => void;
|
|
7
|
+
onPdfError?: (error: any) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function render(opts: RenderOptions): Promise<void>;
|
|
11
|
+
|
|
12
|
+
const pagify: {
|
|
13
|
+
render: typeof render;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default pagify;
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export enum DATA_DATE_FILTERS {
|
|
2
|
+
YESTERDAY = "YESTERDAY",
|
|
3
|
+
CUSTOM = "CUSTOM",
|
|
4
|
+
MONTHLY = "MONTHLY",
|
|
5
|
+
}
|
|
6
|
+
export const switchList = [
|
|
7
|
+
{
|
|
8
|
+
label: 'Raise "Complete KYC" Requests',
|
|
9
|
+
key: "kyc",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: "Ask your patient's to create ABHA",
|
|
13
|
+
key: "abha",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "Raise Consent requests to view patient's medical history",
|
|
17
|
+
key: "consent",
|
|
18
|
+
},
|
|
19
|
+
] as const;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const formatDateToBackendISO = (selectedDate: string) => {
|
|
2
|
+
const now = new Date();
|
|
3
|
+
|
|
4
|
+
const merged = new Date(
|
|
5
|
+
`${selectedDate}T${now.getHours().toString().padStart(2, "0")}:${now
|
|
6
|
+
.getMinutes()
|
|
7
|
+
.toString()
|
|
8
|
+
.padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}`
|
|
9
|
+
);
|
|
10
|
+
return merged.toISOString();
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const getISTMidnightISO = (date: Date) => {
|
|
14
|
+
return new Date(
|
|
15
|
+
Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())
|
|
16
|
+
).toISOString();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const getYesterday = () => {
|
|
20
|
+
const today = new Date();
|
|
21
|
+
|
|
22
|
+
const end = new Date(today);
|
|
23
|
+
end.setHours(0, 0, 0, 0);
|
|
24
|
+
|
|
25
|
+
const start = new Date(end);
|
|
26
|
+
start.setDate(start.getDate() - 1);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
start: getISTMidnightISO(start),
|
|
30
|
+
end: getISTMidnightISO(end),
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { Config } from "tailwindcss";
|
|
2
|
+
import colors from "./src/tailwind-theme-config/pds2/colors";
|
|
3
|
+
import border from "./src/tailwind-theme-config/pds2/border";
|
|
4
|
+
import spacing from "./src/tailwind-theme-config/pds2/spacing";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
prefix: "abhaDash-",
|
|
8
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
9
|
+
theme: {
|
|
10
|
+
screens: {
|
|
11
|
+
sm: '640px',
|
|
12
|
+
md: '768px',
|
|
13
|
+
lg: '1024px',
|
|
14
|
+
xl: '1280px',
|
|
15
|
+
},
|
|
16
|
+
colors: {
|
|
17
|
+
transparent: "transparent",
|
|
18
|
+
...colors,
|
|
19
|
+
platformBgColor: "var(--platform-bg-color)",
|
|
20
|
+
platformTextColor: "var(--platform-text-color)",
|
|
21
|
+
platformBorderColor: "var(--platform-border-color)",
|
|
22
|
+
red: "#FF0000",
|
|
23
|
+
},
|
|
24
|
+
backgroundColor: ({ theme }) => ({
|
|
25
|
+
...theme("colors"),
|
|
26
|
+
inherit: "inherit",
|
|
27
|
+
}),
|
|
28
|
+
fill: ({ theme }) => ({ ...theme("colors"), current: "currentColor" }),
|
|
29
|
+
spacing: { ...spacing },
|
|
30
|
+
fontSize: ({ theme }) => ({ ...theme("spacing") }),
|
|
31
|
+
lineHeight: ({ theme }) => ({ ...theme("spacing") }),
|
|
32
|
+
padding: ({ theme }) => ({ ...theme("spacing") }),
|
|
33
|
+
borderWidth: {
|
|
34
|
+
...border,
|
|
35
|
+
},
|
|
36
|
+
borderRadius: ({ theme }) => ({ ...theme("borderWidth") }),
|
|
37
|
+
boxShadow: {
|
|
38
|
+
none: "none",
|
|
39
|
+
"elevation-5": "0px 1px 3px 0px rgba(0, 0, 0, 0.10)",
|
|
40
|
+
"elevation-10": "0px 3px 9px 0px rgba(0, 59, 168, 0.10)",
|
|
41
|
+
"elevation-50": "-4px 4px 8px 0px rgba(0, 0, 0, 0.12)",
|
|
42
|
+
"elevation-100": "0px 12px 36px 0px rgba(0, 0, 0, 0.25)",
|
|
43
|
+
"elevation-200": "0px 2px 8px 0px rgba(0, 0, 0, 0.16)",
|
|
44
|
+
"elevation-300": "12px 0px 50px 0px rgba(0, 0, 0, 0.15)",
|
|
45
|
+
"elevation-600": "0px -2px 4px 0px rgba(0, 0, 0, 0.16)",
|
|
46
|
+
"elevation-900": "0px 12px 50px 0px rgba(0, 0, 0, 0.15)",
|
|
47
|
+
"elevation-1000": "0px 0px 8px 0px rgba(0, 0, 0, 0.16)",
|
|
48
|
+
"elevation-1100": "0px 12px 16px 0px rgba(0, 0, 0, 0.16)",
|
|
49
|
+
"elevation-only-top": "0px -4px 14.8px 0px rgba(0, 0, 0, 0.05)",
|
|
50
|
+
"M3-1":
|
|
51
|
+
"0px 4px 4px 0px rgba(0, 0, 0, 0.25), 0px 1px 2px 0px rgba(0, 0, 0, 0.30)",
|
|
52
|
+
},
|
|
53
|
+
fontWeight: {
|
|
54
|
+
300: "300",
|
|
55
|
+
400: "400",
|
|
56
|
+
500: "500",
|
|
57
|
+
600: "600",
|
|
58
|
+
700: "700",
|
|
59
|
+
800: "800",
|
|
60
|
+
900: "900",
|
|
61
|
+
},
|
|
62
|
+
opacity: {
|
|
63
|
+
0: "0",
|
|
64
|
+
5: "0.05",
|
|
65
|
+
10: "0.1",
|
|
66
|
+
20: "0.2",
|
|
67
|
+
25: "0.25",
|
|
68
|
+
30: "0.3",
|
|
69
|
+
40: "0.4",
|
|
70
|
+
50: "0.5",
|
|
71
|
+
60: "0.6",
|
|
72
|
+
65: "0.65",
|
|
73
|
+
70: "0.7",
|
|
74
|
+
75: "0.75",
|
|
75
|
+
80: "0.8",
|
|
76
|
+
85: "0.85",
|
|
77
|
+
90: "0.9",
|
|
78
|
+
95: "0.95",
|
|
79
|
+
100: "1",
|
|
80
|
+
},
|
|
81
|
+
outlineWidth: ({ theme }) => ({ ...theme("spacing") }),
|
|
82
|
+
fontFamily: {
|
|
83
|
+
lato: ["Lato", "sans-serif"],
|
|
84
|
+
},
|
|
85
|
+
maxWidth: ({ theme, breakpoints }) => ({
|
|
86
|
+
none: "none",
|
|
87
|
+
"3/5": "60%",
|
|
88
|
+
half: "50%",
|
|
89
|
+
full: "100%",
|
|
90
|
+
min: "min-content",
|
|
91
|
+
max: "max-content",
|
|
92
|
+
...breakpoints(theme("screens")),
|
|
93
|
+
...theme("spacing"),
|
|
94
|
+
}),
|
|
95
|
+
minWidth: ({ theme }) => ({
|
|
96
|
+
...theme("spacing"),
|
|
97
|
+
half: "50%",
|
|
98
|
+
full: "100%",
|
|
99
|
+
screen: "100vw",
|
|
100
|
+
min: "min-content",
|
|
101
|
+
max: "max-content",
|
|
102
|
+
auto: "auto",
|
|
103
|
+
}),
|
|
104
|
+
keyframes: {
|
|
105
|
+
spin: {
|
|
106
|
+
to: {
|
|
107
|
+
transform: "rotate(360deg)",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
"fade-in": {
|
|
111
|
+
"0%": { opacity: "0" },
|
|
112
|
+
"100%": { opacity: "1" },
|
|
113
|
+
},
|
|
114
|
+
"slide-up": {
|
|
115
|
+
"0%": { transform: "translateY(10px)" },
|
|
116
|
+
"100%": { transform: "translateY(0)" },
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
animation: {
|
|
120
|
+
spin: "spin 1s linear infinite",
|
|
121
|
+
"fade-in": "fade-in 0.2s ease-out",
|
|
122
|
+
"slide-up": "slide-up 0.2s ease-out",
|
|
123
|
+
},
|
|
124
|
+
extend: {
|
|
125
|
+
maxHeight: {
|
|
126
|
+
"1/2": "50vh",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
plugins: [],
|
|
131
|
+
} satisfies Config;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"types": ["vite/client"],
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
|
|
19
|
+
/* Linting */
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noUnusedLocals": true,
|
|
22
|
+
"noUnusedParameters": true,
|
|
23
|
+
// "erasableSyntaxOnly": true,
|
|
24
|
+
"noFallthroughCasesInSwitch": true,
|
|
25
|
+
"noUncheckedSideEffectImports": true
|
|
26
|
+
},
|
|
27
|
+
"include": ["src"]
|
|
28
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"erasableSyntaxOnly": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["vite.config.ts"]
|
|
26
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// abdm/vite.config.ts
|
|
2
|
+
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
import react from "@vitejs/plugin-react";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [react()],
|
|
9
|
+
|
|
10
|
+
resolve: {
|
|
11
|
+
dedupe: [
|
|
12
|
+
"react",
|
|
13
|
+
"react-dom",
|
|
14
|
+
"react-dom/client",
|
|
15
|
+
"react/jsx-runtime"
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
build: {
|
|
20
|
+
cssCodeSplit: false, // bundle CSS into one file
|
|
21
|
+
|
|
22
|
+
rollupOptions: {
|
|
23
|
+
// ❌ DO NOT externalize React — bundle into SDK
|
|
24
|
+
external: [],
|
|
25
|
+
|
|
26
|
+
output: {
|
|
27
|
+
// 👇 Critical: Ensures your SDK is ONE executable file
|
|
28
|
+
inlineDynamicImports: true,
|
|
29
|
+
manualChunks: undefined,
|
|
30
|
+
|
|
31
|
+
// Final JS file name
|
|
32
|
+
entryFileNames: "sdk/abdm/js/abdm.js",
|
|
33
|
+
|
|
34
|
+
// Avoid multiple chunks
|
|
35
|
+
chunkFileNames: "sdk/abdm/js/[name]-[hash].js",
|
|
36
|
+
|
|
37
|
+
// Asset Output Rules
|
|
38
|
+
assetFileNames: (assetInfo) => {
|
|
39
|
+
const name = assetInfo.name || "";
|
|
40
|
+
const ext = path.extname(name).slice(1).toLowerCase();
|
|
41
|
+
|
|
42
|
+
if (ext === "css") return "sdk/abdm/css/abdm.css";
|
|
43
|
+
|
|
44
|
+
if (/(png|jpe?g|svg|gif|bmp|ico|webp|avif)/i.test(ext)) {
|
|
45
|
+
return "sdk/abdm/assets/img/[name]-[hash][extname]";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (/(woff2?|ttf|otf|eot)/i.test(ext)) {
|
|
49
|
+
return "sdk/abdm/assets/fonts/[name]-[hash][extname]";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return "sdk/abdm/assets/[name]-[hash][extname]";
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
server: {
|
|
59
|
+
port: 80,
|
|
60
|
+
host: "nishant.eka.care",
|
|
61
|
+
},
|
|
62
|
+
});
|