@gtcx/templates 0.1.0
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/dist/components/audit-trail.d.ts +19 -0
- package/dist/components/audit-trail.d.ts.map +1 -0
- package/dist/components/bulk-actions.d.ts +16 -0
- package/dist/components/bulk-actions.d.ts.map +1 -0
- package/dist/components/kpi-card.d.ts +15 -0
- package/dist/components/kpi-card.d.ts.map +1 -0
- package/dist/components/page-header.d.ts +9 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/section-card.d.ts +10 -0
- package/dist/components/section-card.d.ts.map +1 -0
- package/dist/index.cjs +757 -0
- package/dist/index.d.cts +282 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1433 -0
- package/dist/index.mjs +1386 -0
- package/dist/template-frame.d.ts +19 -0
- package/dist/template-frame.d.ts.map +1 -0
- package/dist/templates/activity.d.ts +24 -0
- package/dist/templates/activity.d.ts.map +1 -0
- package/dist/templates/auth-shell.d.ts +11 -0
- package/dist/templates/auth-shell.d.ts.map +1 -0
- package/dist/templates/billing.d.ts +35 -0
- package/dist/templates/billing.d.ts.map +1 -0
- package/dist/templates/dashboard.d.ts +37 -0
- package/dist/templates/dashboard.d.ts.map +1 -0
- package/dist/templates/detail.d.ts +33 -0
- package/dist/templates/detail.d.ts.map +1 -0
- package/dist/templates/error.d.ts +12 -0
- package/dist/templates/error.d.ts.map +1 -0
- package/dist/templates/invite.d.ts +22 -0
- package/dist/templates/invite.d.ts.map +1 -0
- package/dist/templates/list.d.ts +48 -0
- package/dist/templates/list.d.ts.map +1 -0
- package/dist/templates/members.d.ts +28 -0
- package/dist/templates/members.d.ts.map +1 -0
- package/dist/templates/notifications.d.ts +24 -0
- package/dist/templates/notifications.d.ts.map +1 -0
- package/dist/templates/profile.d.ts +31 -0
- package/dist/templates/profile.d.ts.map +1 -0
- package/dist/templates/projects.d.ts +27 -0
- package/dist/templates/projects.d.ts.map +1 -0
- package/dist/templates/security.d.ts +34 -0
- package/dist/templates/security.d.ts.map +1 -0
- package/dist/templates/settings.d.ts +19 -0
- package/dist/templates/settings.d.ts.map +1 -0
- package/dist/templates/wizard.d.ts +22 -0
- package/dist/templates/wizard.d.ts.map +1 -0
- package/dist/types.d.ts +52 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +44 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1433 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
ActivityTemplate: () => ActivityTemplate,
|
|
24
|
+
AuditTrail: () => AuditTrail,
|
|
25
|
+
AuthShell: () => AuthShell,
|
|
26
|
+
BillingTemplate: () => BillingTemplate,
|
|
27
|
+
BulkActionsBar: () => BulkActionsBar,
|
|
28
|
+
DashboardTemplate: () => DashboardTemplate,
|
|
29
|
+
DetailTemplate: () => DetailTemplate,
|
|
30
|
+
ErrorPageTemplate: () => ErrorPageTemplate,
|
|
31
|
+
InviteTemplate: () => InviteTemplate,
|
|
32
|
+
KpiCard: () => KpiCard,
|
|
33
|
+
ListTemplate: () => ListTemplate,
|
|
34
|
+
MembersTemplate: () => MembersTemplate,
|
|
35
|
+
NotificationsTemplate: () => NotificationsTemplate,
|
|
36
|
+
ProfileTemplate: () => ProfileTemplate,
|
|
37
|
+
ProjectsTemplate: () => ProjectsTemplate,
|
|
38
|
+
SectionCard: () => SectionCard,
|
|
39
|
+
SecurityTemplate: () => SecurityTemplate,
|
|
40
|
+
SettingsTemplate: () => SettingsTemplate,
|
|
41
|
+
TemplateFrame: () => TemplateFrame,
|
|
42
|
+
WizardTemplate: () => WizardTemplate,
|
|
43
|
+
templateActionsToPageHeaderActions: () => templateActionsToPageHeaderActions
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(index_exports);
|
|
46
|
+
|
|
47
|
+
// src/types.ts
|
|
48
|
+
function templateActionsToPageHeaderActions(actions) {
|
|
49
|
+
return actions.map((action) => ({
|
|
50
|
+
key: action.key,
|
|
51
|
+
label: action.label,
|
|
52
|
+
onClick: action.onAction,
|
|
53
|
+
kind: action.kind,
|
|
54
|
+
disabled: action.disabled,
|
|
55
|
+
ariaLabel: action.ariaLabel,
|
|
56
|
+
icon: action.icon
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// src/template-frame.tsx
|
|
61
|
+
var import_antd2 = require("antd");
|
|
62
|
+
|
|
63
|
+
// src/components/page-header.tsx
|
|
64
|
+
var import_antd = require("antd");
|
|
65
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
66
|
+
var { Title, Text } = import_antd.Typography;
|
|
67
|
+
function PageHeader({ title, subtitle, breadcrumbs, actions }) {
|
|
68
|
+
const { token } = import_antd.theme.useToken();
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("header", { style: { marginBottom: token.marginLG }, children: [
|
|
70
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
import_antd.Breadcrumb,
|
|
72
|
+
{
|
|
73
|
+
style: { marginBottom: token.marginSM },
|
|
74
|
+
items: breadcrumbs.map((item) => ({
|
|
75
|
+
title: item.href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: item.href, style: { color: token.colorText }, children: item.label }) : item.label
|
|
76
|
+
}))
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, { level: 3, style: { margin: 0 }, children: title }),
|
|
82
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { style: { marginTop: token.marginXXS, color: token.colorTextSecondary }, children: subtitle })
|
|
83
|
+
] }),
|
|
84
|
+
actions && actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
import_antd.Button,
|
|
86
|
+
{
|
|
87
|
+
type: action.kind === "primary" ? "primary" : action.kind === "link" ? "link" : "default",
|
|
88
|
+
danger: action.kind === "danger",
|
|
89
|
+
disabled: action.disabled,
|
|
90
|
+
icon: action.icon,
|
|
91
|
+
onClick: action.onClick,
|
|
92
|
+
"aria-label": action.ariaLabel,
|
|
93
|
+
children: action.label
|
|
94
|
+
},
|
|
95
|
+
action.key
|
|
96
|
+
)) })
|
|
97
|
+
] })
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/template-frame.tsx
|
|
102
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
103
|
+
var { Text: Text2 } = import_antd2.Typography;
|
|
104
|
+
function TemplateFrame({
|
|
105
|
+
title,
|
|
106
|
+
subtitle,
|
|
107
|
+
breadcrumbs,
|
|
108
|
+
data: _data,
|
|
109
|
+
actions,
|
|
110
|
+
filters,
|
|
111
|
+
audit,
|
|
112
|
+
layout,
|
|
113
|
+
children
|
|
114
|
+
}) {
|
|
115
|
+
const { token } = import_antd2.theme.useToken();
|
|
116
|
+
const showBreadcrumbs = layout?.showBreadcrumbs ?? true;
|
|
117
|
+
const contentPadding = layout?.contentPadding ?? void 0;
|
|
118
|
+
const pageHeaderActions = actions ? templateActionsToPageHeaderActions(actions) : void 0;
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { padding: contentPadding }, children: [
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
121
|
+
PageHeader,
|
|
122
|
+
{
|
|
123
|
+
title,
|
|
124
|
+
subtitle,
|
|
125
|
+
breadcrumbs: showBreadcrumbs ? breadcrumbs : void 0,
|
|
126
|
+
actions: pageHeaderActions
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
filters?.content && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: { marginBottom: token.marginLG }, children: filters.content }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("main", { children }),
|
|
131
|
+
audit && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
132
|
+
import_antd2.Card,
|
|
133
|
+
{
|
|
134
|
+
size: "small",
|
|
135
|
+
style: { marginTop: token.marginXL },
|
|
136
|
+
styles: { body: { padding: token.paddingSM } },
|
|
137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_antd2.Space, { direction: "vertical", size: 4, children: [
|
|
138
|
+
audit.summary && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text2, { style: { color: token.colorTextSecondary }, children: audit.summary }),
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_antd2.Space, { size: "large", wrap: true, children: [
|
|
140
|
+
audit.lastUpdatedAt && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text2, { style: { fontSize: token.fontSizeSM, color: token.colorTextSecondary }, children: [
|
|
141
|
+
"Updated: ",
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("time", { dateTime: audit.lastUpdatedAt, children: audit.lastUpdatedAt })
|
|
143
|
+
] }),
|
|
144
|
+
audit.lastUpdatedBy && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text2, { style: { fontSize: token.fontSizeSM, color: token.colorTextSecondary }, children: [
|
|
145
|
+
"By: ",
|
|
146
|
+
audit.lastUpdatedBy
|
|
147
|
+
] }),
|
|
148
|
+
audit.sourceSystem && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text2, { style: { fontSize: token.fontSizeSM, color: token.colorTextSecondary }, children: [
|
|
149
|
+
"Source: ",
|
|
150
|
+
audit.sourceSystem
|
|
151
|
+
] }),
|
|
152
|
+
audit.evidenceUrl && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
153
|
+
"a",
|
|
154
|
+
{
|
|
155
|
+
href: audit.evidenceUrl,
|
|
156
|
+
target: "_blank",
|
|
157
|
+
rel: "noopener noreferrer",
|
|
158
|
+
style: { fontSize: token.fontSizeSM, color: token.colorPrimary },
|
|
159
|
+
children: "View Evidence"
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
] })
|
|
163
|
+
] })
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
] });
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// src/components/kpi-card.tsx
|
|
170
|
+
var import_icons = require("@ant-design/icons");
|
|
171
|
+
var import_antd3 = require("antd");
|
|
172
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
173
|
+
var { Text: Text3, Title: Title2 } = import_antd3.Typography;
|
|
174
|
+
function KpiCard({
|
|
175
|
+
label,
|
|
176
|
+
value,
|
|
177
|
+
delta,
|
|
178
|
+
trend,
|
|
179
|
+
helpText,
|
|
180
|
+
icon,
|
|
181
|
+
onClick,
|
|
182
|
+
"aria-label": ariaLabel
|
|
183
|
+
}) {
|
|
184
|
+
const { token } = import_antd3.theme.useToken();
|
|
185
|
+
const trendColor = trend === "up" ? token.colorSuccess : trend === "down" ? token.colorError : token.colorTextSecondary;
|
|
186
|
+
const TrendIcon = trend === "up" ? import_icons.ArrowUpOutlined : trend === "down" ? import_icons.ArrowDownOutlined : import_icons.MinusOutlined;
|
|
187
|
+
const isInteractive = !!onClick;
|
|
188
|
+
const handleKeyDown = (e) => {
|
|
189
|
+
if (isInteractive && (e.key === "Enter" || e.key === " ")) {
|
|
190
|
+
e.preventDefault();
|
|
191
|
+
onClick?.();
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
195
|
+
import_antd3.Card,
|
|
196
|
+
{
|
|
197
|
+
size: "small",
|
|
198
|
+
hoverable: isInteractive,
|
|
199
|
+
onClick,
|
|
200
|
+
tabIndex: isInteractive ? 0 : void 0,
|
|
201
|
+
role: isInteractive ? "button" : void 0,
|
|
202
|
+
onKeyDown: isInteractive ? handleKeyDown : void 0,
|
|
203
|
+
"aria-label": ariaLabel ?? label,
|
|
204
|
+
styles: { body: { padding: token.paddingMD } },
|
|
205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_antd3.Space, { direction: "vertical", size: 4, style: { width: "100%" }, children: [
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_antd3.Space, { size: "small", children: [
|
|
207
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { color: token.colorTextSecondary }, children: icon }),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text3, { type: "secondary", style: { fontSize: token.fontSizeSM }, children: label })
|
|
209
|
+
] }),
|
|
210
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Title2, { level: 3, style: { margin: 0 }, children: value }),
|
|
211
|
+
(delta || helpText) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_antd3.Space, { size: "small", children: [
|
|
212
|
+
delta && trend && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text3, { style: { color: trendColor, fontSize: token.fontSizeSM }, children: [
|
|
213
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TrendIcon, { style: { marginRight: 4 } }),
|
|
214
|
+
delta
|
|
215
|
+
] }),
|
|
216
|
+
helpText && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text3, { type: "secondary", style: { fontSize: token.fontSizeSM }, children: helpText })
|
|
217
|
+
] })
|
|
218
|
+
] })
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// src/components/section-card.tsx
|
|
224
|
+
var import_antd4 = require("antd");
|
|
225
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
226
|
+
var { Title: Title3 } = import_antd4.Typography;
|
|
227
|
+
function SectionCard({ title, subtitle, extra, children, noPadding }) {
|
|
228
|
+
const { token } = import_antd4.theme.useToken();
|
|
229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
230
|
+
import_antd4.Card,
|
|
231
|
+
{
|
|
232
|
+
role: "region",
|
|
233
|
+
"aria-label": title,
|
|
234
|
+
styles: { body: noPadding ? { padding: 0 } : void 0 },
|
|
235
|
+
children: [
|
|
236
|
+
(title || extra) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
style: {
|
|
240
|
+
display: "flex",
|
|
241
|
+
justifyContent: "space-between",
|
|
242
|
+
alignItems: "flex-start",
|
|
243
|
+
marginBottom: token.marginMD
|
|
244
|
+
},
|
|
245
|
+
children: [
|
|
246
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
|
|
247
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Title3, { level: 4, style: { margin: 0 }, children: title }),
|
|
248
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { color: token.colorTextSecondary, fontSize: token.fontSizeSM }, children: subtitle })
|
|
249
|
+
] }),
|
|
250
|
+
extra && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { children: extra })
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
children
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// src/components/bulk-actions.tsx
|
|
261
|
+
var import_antd5 = require("antd");
|
|
262
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
263
|
+
var { Text: Text4 } = import_antd5.Typography;
|
|
264
|
+
function BulkActionsBar({
|
|
265
|
+
selectedCount,
|
|
266
|
+
selectedRowKeys,
|
|
267
|
+
actions,
|
|
268
|
+
onClear
|
|
269
|
+
}) {
|
|
270
|
+
const { token } = import_antd5.theme.useToken();
|
|
271
|
+
if (selectedCount === 0) return null;
|
|
272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
role: "toolbar",
|
|
276
|
+
"aria-label": "Bulk actions",
|
|
277
|
+
style: {
|
|
278
|
+
display: "flex",
|
|
279
|
+
alignItems: "center",
|
|
280
|
+
justifyContent: "space-between",
|
|
281
|
+
padding: `${token.paddingSM}px ${token.paddingMD}px`,
|
|
282
|
+
background: token.colorBgContainer,
|
|
283
|
+
border: `1px solid ${token.colorPrimaryBorder ?? token.colorPrimary}`,
|
|
284
|
+
borderRadius: token.borderRadius,
|
|
285
|
+
marginBottom: token.marginMD
|
|
286
|
+
},
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_antd5.Space, { children: [
|
|
289
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text4, { strong: true, "aria-live": "polite", children: [
|
|
290
|
+
selectedCount,
|
|
291
|
+
" selected"
|
|
292
|
+
] }),
|
|
293
|
+
onClear && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_antd5.Button, { type: "text", size: "small", onClick: onClear, children: "Clear" })
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_antd5.Space, { children: actions.map((action) => {
|
|
296
|
+
const isDanger = action.kind === "danger";
|
|
297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
298
|
+
import_antd5.Button,
|
|
299
|
+
{
|
|
300
|
+
type: isDanger ? "default" : action.kind === "primary" ? "primary" : action.kind === "link" ? "link" : "default",
|
|
301
|
+
danger: isDanger,
|
|
302
|
+
size: "small",
|
|
303
|
+
disabled: action.disabled,
|
|
304
|
+
onClick: () => action.onAction(selectedRowKeys),
|
|
305
|
+
children: action.label
|
|
306
|
+
},
|
|
307
|
+
action.key
|
|
308
|
+
);
|
|
309
|
+
}) })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// src/components/audit-trail.tsx
|
|
316
|
+
var import_icons2 = require("@ant-design/icons");
|
|
317
|
+
var import_antd6 = require("antd");
|
|
318
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
319
|
+
var { Text: Text5, Title: Title4 } = import_antd6.Typography;
|
|
320
|
+
function AuditTrail({
|
|
321
|
+
title = "Audit Trail",
|
|
322
|
+
events,
|
|
323
|
+
loading,
|
|
324
|
+
onLoadMore
|
|
325
|
+
}) {
|
|
326
|
+
const { token } = import_antd6.theme.useToken();
|
|
327
|
+
const timelineItems = events.map((event) => ({
|
|
328
|
+
key: event.key,
|
|
329
|
+
dot: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons2.ClockCircleOutlined, { style: { fontSize: 14 } }),
|
|
330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_antd6.Space, { direction: "vertical", size: 2, children: [
|
|
331
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_antd6.Space, { size: "small", wrap: true, children: [
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text5, { strong: true, children: event.action }),
|
|
333
|
+
event.by && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text5, { type: "secondary", children: [
|
|
334
|
+
"by ",
|
|
335
|
+
event.by
|
|
336
|
+
] })
|
|
337
|
+
] }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text5, { type: "secondary", style: { fontSize: token.fontSizeSM }, children: [
|
|
339
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("time", { dateTime: event.at, children: event.at }),
|
|
340
|
+
event.sourceSystem && ` \xB7 ${event.sourceSystem}`
|
|
341
|
+
] }),
|
|
342
|
+
event.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: event.description }),
|
|
343
|
+
event.evidenceUrl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
344
|
+
"a",
|
|
345
|
+
{
|
|
346
|
+
href: event.evidenceUrl,
|
|
347
|
+
target: "_blank",
|
|
348
|
+
rel: "noopener noreferrer",
|
|
349
|
+
style: { fontSize: token.fontSizeSM },
|
|
350
|
+
children: "View Evidence"
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
] })
|
|
354
|
+
}));
|
|
355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_antd6.Card, { children: [
|
|
356
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Title4, { level: 5, style: { marginBottom: token.marginMD }, children: title }),
|
|
357
|
+
loading && events.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { textAlign: "center", padding: token.paddingLG }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_antd6.Spin, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { role: "log", "aria-label": title, children: [
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_antd6.Timeline, { items: timelineItems }),
|
|
359
|
+
onLoadMore && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_antd6.Button, { type: "link", onClick: onLoadMore, loading, children: "Load more" }) })
|
|
360
|
+
] })
|
|
361
|
+
] });
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// src/templates/dashboard.tsx
|
|
365
|
+
var import_antd7 = require("antd");
|
|
366
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
367
|
+
function DashboardTemplate({
|
|
368
|
+
title,
|
|
369
|
+
subtitle,
|
|
370
|
+
breadcrumbs,
|
|
371
|
+
data,
|
|
372
|
+
actions,
|
|
373
|
+
filters,
|
|
374
|
+
audit,
|
|
375
|
+
layout
|
|
376
|
+
}) {
|
|
377
|
+
const { token } = import_antd7.theme.useToken();
|
|
378
|
+
const kpis = data?.kpis ?? [];
|
|
379
|
+
const panels = data?.panels ?? [];
|
|
380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
381
|
+
TemplateFrame,
|
|
382
|
+
{
|
|
383
|
+
title,
|
|
384
|
+
subtitle,
|
|
385
|
+
breadcrumbs,
|
|
386
|
+
data,
|
|
387
|
+
actions,
|
|
388
|
+
filters,
|
|
389
|
+
audit,
|
|
390
|
+
layout,
|
|
391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_antd7.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
392
|
+
kpis.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_antd7.Row, { gutter: [token.marginMD, token.marginMD], children: kpis.map((kpi) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_antd7.Col, { xs: 24, sm: 12, lg: 6, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
393
|
+
KpiCard,
|
|
394
|
+
{
|
|
395
|
+
label: kpi.label,
|
|
396
|
+
value: kpi.value,
|
|
397
|
+
delta: kpi.delta,
|
|
398
|
+
trend: kpi.trend,
|
|
399
|
+
helpText: kpi.helpText,
|
|
400
|
+
icon: kpi.icon,
|
|
401
|
+
onClick: kpi.onClick
|
|
402
|
+
}
|
|
403
|
+
) }, kpi.key)) }),
|
|
404
|
+
panels.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_antd7.Row, { gutter: [token.marginMD, token.marginMD], children: panels.map((panel) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_antd7.Col, { xs: 24, lg: panel.span ?? 12, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SectionCard, { title: panel.title, subtitle: panel.subtitle, extra: panel.extra, children: panel.content }) }, panel.key)) })
|
|
405
|
+
] })
|
|
406
|
+
}
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// src/templates/list.tsx
|
|
411
|
+
var import_icons3 = require("@ant-design/icons");
|
|
412
|
+
var import_antd8 = require("antd");
|
|
413
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
414
|
+
function ListTemplate({
|
|
415
|
+
title,
|
|
416
|
+
subtitle,
|
|
417
|
+
breadcrumbs,
|
|
418
|
+
data,
|
|
419
|
+
actions,
|
|
420
|
+
filters,
|
|
421
|
+
audit,
|
|
422
|
+
layout,
|
|
423
|
+
table,
|
|
424
|
+
selection,
|
|
425
|
+
exports: exportSpecs,
|
|
426
|
+
tools
|
|
427
|
+
}) {
|
|
428
|
+
const { token } = import_antd8.theme.useToken();
|
|
429
|
+
const items = data?.items ?? [];
|
|
430
|
+
const loading = data?.loading ?? false;
|
|
431
|
+
const selectedRowKeys = selection?.selectedRowKeys;
|
|
432
|
+
const selectedCount = selectedRowKeys?.length ?? 0;
|
|
433
|
+
const bulkActions = selection?.bulkActions?.map((action) => ({
|
|
434
|
+
key: action.key,
|
|
435
|
+
label: action.label,
|
|
436
|
+
kind: action.kind,
|
|
437
|
+
disabled: action.disabled,
|
|
438
|
+
onAction: (keys) => action.onAction(keys)
|
|
439
|
+
})) ?? [];
|
|
440
|
+
const rowSelection = selection?.enabled ? {
|
|
441
|
+
...selectedRowKeys !== void 0 ? { selectedRowKeys } : {},
|
|
442
|
+
onChange: (keys) => selection.onSelectionChange?.(keys),
|
|
443
|
+
getCheckboxProps: (record, index) => {
|
|
444
|
+
if (selection.getAriaLabel) {
|
|
445
|
+
const label = selection.getAriaLabel(record, index);
|
|
446
|
+
return { name: label, "aria-label": `Select ${label}` };
|
|
447
|
+
}
|
|
448
|
+
const fallback = record?.name ?? record?.title ?? record?.key ?? "row";
|
|
449
|
+
return {
|
|
450
|
+
name: String(fallback),
|
|
451
|
+
"aria-label": `Select ${fallback}`
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
} : void 0;
|
|
455
|
+
const hasToolbar = exportSpecs && exportSpecs.length > 0 || tools;
|
|
456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
457
|
+
TemplateFrame,
|
|
458
|
+
{
|
|
459
|
+
title,
|
|
460
|
+
subtitle,
|
|
461
|
+
breadcrumbs,
|
|
462
|
+
data,
|
|
463
|
+
actions,
|
|
464
|
+
filters,
|
|
465
|
+
audit,
|
|
466
|
+
layout,
|
|
467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_antd8.Space, { direction: "vertical", size: "middle", style: { width: "100%" }, children: [
|
|
468
|
+
hasToolbar && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
469
|
+
"div",
|
|
470
|
+
{
|
|
471
|
+
style: {
|
|
472
|
+
display: "flex",
|
|
473
|
+
justifyContent: "flex-end",
|
|
474
|
+
gap: token.marginSM,
|
|
475
|
+
flexWrap: "wrap"
|
|
476
|
+
},
|
|
477
|
+
children: [
|
|
478
|
+
exportSpecs?.map((exp) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
479
|
+
import_antd8.Button,
|
|
480
|
+
{
|
|
481
|
+
icon: exp.icon ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.DownloadOutlined, {}),
|
|
482
|
+
onClick: exp.onExport,
|
|
483
|
+
disabled: exp.disabled,
|
|
484
|
+
children: exp.label
|
|
485
|
+
},
|
|
486
|
+
exp.key
|
|
487
|
+
)),
|
|
488
|
+
tools
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
selection?.enabled && selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
493
|
+
BulkActionsBar,
|
|
494
|
+
{
|
|
495
|
+
selectedCount,
|
|
496
|
+
selectedRowKeys: selectedRowKeys ?? [],
|
|
497
|
+
actions: bulkActions,
|
|
498
|
+
onClear: () => selection.onSelectionChange?.([])
|
|
499
|
+
}
|
|
500
|
+
),
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_antd8.Card, { styles: { body: { padding: 0 } }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_antd8.Table, { ...table, dataSource: items, loading, rowSelection }) })
|
|
502
|
+
] })
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// src/templates/detail.tsx
|
|
508
|
+
var import_antd9 = require("antd");
|
|
509
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
510
|
+
function DetailTemplate({
|
|
511
|
+
title,
|
|
512
|
+
subtitle,
|
|
513
|
+
breadcrumbs,
|
|
514
|
+
data,
|
|
515
|
+
actions,
|
|
516
|
+
audit,
|
|
517
|
+
layout
|
|
518
|
+
}) {
|
|
519
|
+
const summary = data?.summary;
|
|
520
|
+
const sections = data?.sections ?? [];
|
|
521
|
+
const auditTrail = data?.auditTrail;
|
|
522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
523
|
+
TemplateFrame,
|
|
524
|
+
{
|
|
525
|
+
title,
|
|
526
|
+
subtitle,
|
|
527
|
+
breadcrumbs,
|
|
528
|
+
data,
|
|
529
|
+
actions,
|
|
530
|
+
audit,
|
|
531
|
+
layout,
|
|
532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_antd9.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
533
|
+
summary && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SectionCard, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
534
|
+
import_antd9.Descriptions,
|
|
535
|
+
{
|
|
536
|
+
items: summary.items,
|
|
537
|
+
column: summary.columns ?? { xs: 1, sm: 2, lg: 3 },
|
|
538
|
+
size: "small",
|
|
539
|
+
bordered: true
|
|
540
|
+
}
|
|
541
|
+
) }),
|
|
542
|
+
sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SectionCard, { title: section.title, extra: section.extra, children: section.content }, section.key)),
|
|
543
|
+
auditTrail && (auditTrail.events.length > 0 || auditTrail.loading) && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
544
|
+
AuditTrail,
|
|
545
|
+
{
|
|
546
|
+
title: auditTrail.title,
|
|
547
|
+
events: auditTrail.events,
|
|
548
|
+
loading: auditTrail.loading,
|
|
549
|
+
onLoadMore: auditTrail.onLoadMore
|
|
550
|
+
}
|
|
551
|
+
)
|
|
552
|
+
] })
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
// src/templates/error.tsx
|
|
558
|
+
var import_antd10 = require("antd");
|
|
559
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
560
|
+
var defaultTitles = {
|
|
561
|
+
401: "Unauthorized",
|
|
562
|
+
403: "Access Denied",
|
|
563
|
+
404: "Page Not Found",
|
|
564
|
+
500: "Server Error"
|
|
565
|
+
};
|
|
566
|
+
var defaultMessages = {
|
|
567
|
+
401: "You need to sign in to access this page.",
|
|
568
|
+
403: "You don't have permission to access this resource.",
|
|
569
|
+
404: "The page you're looking for doesn't exist or has been moved.",
|
|
570
|
+
500: "Something went wrong on our end. Please try again later."
|
|
571
|
+
};
|
|
572
|
+
var statusToResultStatus = {
|
|
573
|
+
401: "warning",
|
|
574
|
+
403: "error",
|
|
575
|
+
404: "404",
|
|
576
|
+
500: "500"
|
|
577
|
+
};
|
|
578
|
+
function ErrorPageTemplate({
|
|
579
|
+
status,
|
|
580
|
+
title,
|
|
581
|
+
message,
|
|
582
|
+
actions,
|
|
583
|
+
extra
|
|
584
|
+
}) {
|
|
585
|
+
const { token } = import_antd10.theme.useToken();
|
|
586
|
+
const resolvedTitle = title ?? defaultTitles[status];
|
|
587
|
+
const resolvedMessage = message ?? defaultMessages[status];
|
|
588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
589
|
+
"div",
|
|
590
|
+
{
|
|
591
|
+
style: {
|
|
592
|
+
minHeight: "100vh",
|
|
593
|
+
display: "flex",
|
|
594
|
+
alignItems: "center",
|
|
595
|
+
justifyContent: "center",
|
|
596
|
+
padding: token.paddingLG,
|
|
597
|
+
background: token.colorBgLayout
|
|
598
|
+
},
|
|
599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
600
|
+
import_antd10.Result,
|
|
601
|
+
{
|
|
602
|
+
status: statusToResultStatus[status],
|
|
603
|
+
title: resolvedTitle,
|
|
604
|
+
subTitle: resolvedMessage,
|
|
605
|
+
extra: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_antd10.Space, { direction: "vertical", size: "middle", align: "center", children: [
|
|
606
|
+
actions && actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_antd10.Space, { children: actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
607
|
+
import_antd10.Button,
|
|
608
|
+
{
|
|
609
|
+
type: action.kind === "primary" ? "primary" : action.kind === "link" ? "link" : "default",
|
|
610
|
+
danger: action.kind === "danger",
|
|
611
|
+
disabled: action.disabled,
|
|
612
|
+
icon: action.icon,
|
|
613
|
+
onClick: action.onAction,
|
|
614
|
+
"aria-label": action.ariaLabel,
|
|
615
|
+
children: action.label
|
|
616
|
+
},
|
|
617
|
+
action.key
|
|
618
|
+
)) }),
|
|
619
|
+
extra
|
|
620
|
+
] })
|
|
621
|
+
}
|
|
622
|
+
)
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// src/templates/wizard.tsx
|
|
628
|
+
var import_antd11 = require("antd");
|
|
629
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
630
|
+
function WizardTemplate({
|
|
631
|
+
title,
|
|
632
|
+
subtitle,
|
|
633
|
+
breadcrumbs,
|
|
634
|
+
actions,
|
|
635
|
+
data,
|
|
636
|
+
filters,
|
|
637
|
+
audit,
|
|
638
|
+
layout,
|
|
639
|
+
onStepChange
|
|
640
|
+
}) {
|
|
641
|
+
const steps = data?.steps ?? [];
|
|
642
|
+
const currentStep = data?.currentStep ?? 0;
|
|
643
|
+
const activeStep = steps[currentStep];
|
|
644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
645
|
+
TemplateFrame,
|
|
646
|
+
{
|
|
647
|
+
title,
|
|
648
|
+
subtitle,
|
|
649
|
+
breadcrumbs,
|
|
650
|
+
actions,
|
|
651
|
+
data,
|
|
652
|
+
filters,
|
|
653
|
+
audit,
|
|
654
|
+
layout,
|
|
655
|
+
children: steps.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd11.Empty, { description: "No steps configured" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_antd11.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
656
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
657
|
+
import_antd11.Steps,
|
|
658
|
+
{
|
|
659
|
+
current: currentStep,
|
|
660
|
+
onChange: onStepChange,
|
|
661
|
+
items: steps.map((step) => ({
|
|
662
|
+
key: step.key,
|
|
663
|
+
title: step.title,
|
|
664
|
+
description: step.description
|
|
665
|
+
}))
|
|
666
|
+
}
|
|
667
|
+
),
|
|
668
|
+
activeStep && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SectionCard, { title: activeStep.title, subtitle: activeStep.description, children: activeStep.content })
|
|
669
|
+
] })
|
|
670
|
+
}
|
|
671
|
+
);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
// src/templates/settings.tsx
|
|
675
|
+
var import_antd12 = require("antd");
|
|
676
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
677
|
+
function SettingsTemplate({
|
|
678
|
+
title,
|
|
679
|
+
subtitle,
|
|
680
|
+
breadcrumbs,
|
|
681
|
+
actions,
|
|
682
|
+
data,
|
|
683
|
+
filters,
|
|
684
|
+
audit,
|
|
685
|
+
layout
|
|
686
|
+
}) {
|
|
687
|
+
const sections = data?.sections ?? [];
|
|
688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
689
|
+
TemplateFrame,
|
|
690
|
+
{
|
|
691
|
+
title,
|
|
692
|
+
subtitle,
|
|
693
|
+
breadcrumbs,
|
|
694
|
+
actions,
|
|
695
|
+
data,
|
|
696
|
+
filters,
|
|
697
|
+
audit,
|
|
698
|
+
layout,
|
|
699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_antd12.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SectionCard, { title: section.title, subtitle: section.subtitle, children: section.content }, section.key)) })
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
// src/templates/auth-shell.tsx
|
|
705
|
+
var import_antd13 = require("antd");
|
|
706
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
707
|
+
var { Title: Title5, Text: Text6 } = import_antd13.Typography;
|
|
708
|
+
function AuthShell({
|
|
709
|
+
brand,
|
|
710
|
+
title,
|
|
711
|
+
subtitle,
|
|
712
|
+
footer,
|
|
713
|
+
children,
|
|
714
|
+
maxWidth = 420
|
|
715
|
+
}) {
|
|
716
|
+
const { token } = import_antd13.theme.useToken();
|
|
717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
718
|
+
"div",
|
|
719
|
+
{
|
|
720
|
+
style: {
|
|
721
|
+
minHeight: "100vh",
|
|
722
|
+
display: "flex",
|
|
723
|
+
flexDirection: "column",
|
|
724
|
+
alignItems: "center",
|
|
725
|
+
justifyContent: "center",
|
|
726
|
+
padding: token.paddingLG,
|
|
727
|
+
background: token.colorBgLayout
|
|
728
|
+
},
|
|
729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { style: { width: "100%", maxWidth }, children: [
|
|
730
|
+
brand && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { textAlign: "center", marginBottom: token.marginLG }, children: brand }),
|
|
731
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_antd13.Card, { styles: { body: { padding: token.paddingXL } }, children: [
|
|
732
|
+
(title || subtitle) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { style: { textAlign: "center", marginBottom: token.marginLG }, children: [
|
|
733
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Title5, { level: 3, style: { margin: 0 }, children: title }),
|
|
734
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
735
|
+
Text6,
|
|
736
|
+
{
|
|
737
|
+
style: {
|
|
738
|
+
marginTop: token.marginXS,
|
|
739
|
+
display: "block",
|
|
740
|
+
color: token.colorTextSecondary
|
|
741
|
+
},
|
|
742
|
+
children: subtitle
|
|
743
|
+
}
|
|
744
|
+
)
|
|
745
|
+
] }),
|
|
746
|
+
children
|
|
747
|
+
] }),
|
|
748
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
749
|
+
"div",
|
|
750
|
+
{
|
|
751
|
+
style: {
|
|
752
|
+
textAlign: "center",
|
|
753
|
+
marginTop: token.marginLG,
|
|
754
|
+
color: token.colorTextSecondary,
|
|
755
|
+
fontSize: token.fontSizeSM
|
|
756
|
+
},
|
|
757
|
+
children: footer
|
|
758
|
+
}
|
|
759
|
+
)
|
|
760
|
+
] })
|
|
761
|
+
}
|
|
762
|
+
);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// src/templates/profile.tsx
|
|
766
|
+
var import_antd14 = require("antd");
|
|
767
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
768
|
+
function ProfileTemplate({
|
|
769
|
+
title,
|
|
770
|
+
breadcrumbs,
|
|
771
|
+
actions,
|
|
772
|
+
data,
|
|
773
|
+
filters: _filters,
|
|
774
|
+
audit,
|
|
775
|
+
layout
|
|
776
|
+
}) {
|
|
777
|
+
const { token } = import_antd14.theme.useToken();
|
|
778
|
+
const profile = data ?? {};
|
|
779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
780
|
+
TemplateFrame,
|
|
781
|
+
{
|
|
782
|
+
title: title ?? profile.name ?? "Profile",
|
|
783
|
+
breadcrumbs,
|
|
784
|
+
actions,
|
|
785
|
+
audit,
|
|
786
|
+
layout,
|
|
787
|
+
children: [
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { style: { display: "flex", gap: 24, flexWrap: "wrap", marginBottom: 24 }, children: [
|
|
789
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
790
|
+
import_antd14.Avatar,
|
|
791
|
+
{
|
|
792
|
+
size: 96,
|
|
793
|
+
src: profile.avatar ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("img", { src: profile.avatar, alt: profile.name ?? "Profile avatar" }) : void 0,
|
|
794
|
+
children: profile.name?.[0]
|
|
795
|
+
}
|
|
796
|
+
),
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { style: { flex: 1 }, children: [
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Typography.Title, { level: 3, style: { margin: 0 }, children: profile.name }),
|
|
799
|
+
profile.role && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Typography.Text, { style: { color: token.colorTextSecondary }, children: profile.role }),
|
|
800
|
+
profile.bio && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Typography.Paragraph, { style: { marginTop: 8 }, children: profile.bio }),
|
|
801
|
+
profile.tags && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Space, { wrap: true, children: profile.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Tag, { children: tag }, tag)) })
|
|
802
|
+
] })
|
|
803
|
+
] }),
|
|
804
|
+
profile.stats && profile.stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
805
|
+
"div",
|
|
806
|
+
{
|
|
807
|
+
style: {
|
|
808
|
+
display: "flex",
|
|
809
|
+
gap: 32,
|
|
810
|
+
padding: "16px 0",
|
|
811
|
+
borderTop: `1px solid ${token.colorBorderSecondary}`,
|
|
812
|
+
borderBottom: `1px solid ${token.colorBorderSecondary}`,
|
|
813
|
+
marginBottom: 24
|
|
814
|
+
},
|
|
815
|
+
children: profile.stats.map((stat) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { style: { textAlign: "center" }, children: [
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: { fontSize: 24, fontWeight: 600 }, children: stat.value }),
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: { fontSize: 13, color: token.colorTextSecondary }, children: stat.label })
|
|
818
|
+
] }, stat.label))
|
|
819
|
+
}
|
|
820
|
+
),
|
|
821
|
+
profile.details && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Descriptions, { column: 2, style: { marginBottom: 24 }, children: profile.details.map((d) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_antd14.Descriptions.Item, { label: d.label, children: d.value }, d.label)) }),
|
|
822
|
+
profile.tabs && profile.tabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
823
|
+
import_antd14.Tabs,
|
|
824
|
+
{
|
|
825
|
+
items: profile.tabs.map((tab) => ({
|
|
826
|
+
key: tab.key,
|
|
827
|
+
label: tab.label,
|
|
828
|
+
children: tab.content
|
|
829
|
+
}))
|
|
830
|
+
}
|
|
831
|
+
)
|
|
832
|
+
]
|
|
833
|
+
}
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// src/templates/billing.tsx
|
|
838
|
+
var import_antd15 = require("antd");
|
|
839
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
840
|
+
function BillingTemplate({
|
|
841
|
+
title = "Billing",
|
|
842
|
+
breadcrumbs,
|
|
843
|
+
actions,
|
|
844
|
+
data,
|
|
845
|
+
audit,
|
|
846
|
+
layout,
|
|
847
|
+
onChangePlan: _onChangePlan,
|
|
848
|
+
onAddPaymentMethod: _onAddPaymentMethod
|
|
849
|
+
}) {
|
|
850
|
+
const { token } = import_antd15.theme.useToken();
|
|
851
|
+
const billing = data ?? {};
|
|
852
|
+
const invoiceColumns = [
|
|
853
|
+
{ title: "Invoice", dataIndex: "id", key: "id" },
|
|
854
|
+
{ title: "Date", dataIndex: "date", key: "date" },
|
|
855
|
+
{ title: "Amount", dataIndex: "amount", key: "amount" },
|
|
856
|
+
{
|
|
857
|
+
title: "Status",
|
|
858
|
+
dataIndex: "status",
|
|
859
|
+
key: "status",
|
|
860
|
+
render: (status) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
861
|
+
import_antd15.Tag,
|
|
862
|
+
{
|
|
863
|
+
color: status === "paid" ? "#166534" : status === "pending" ? "#92400e" : "#991b1b",
|
|
864
|
+
style: { color: "#ffffff", borderColor: "transparent" },
|
|
865
|
+
children: status
|
|
866
|
+
}
|
|
867
|
+
)
|
|
868
|
+
}
|
|
869
|
+
];
|
|
870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
871
|
+
TemplateFrame,
|
|
872
|
+
{
|
|
873
|
+
title,
|
|
874
|
+
breadcrumbs,
|
|
875
|
+
actions,
|
|
876
|
+
audit,
|
|
877
|
+
layout,
|
|
878
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_antd15.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
879
|
+
billing.currentPlan && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SectionCard, { title: "Current Plan", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_antd15.Descriptions, { column: 2, children: [
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_antd15.Descriptions.Item, { label: "Plan", children: billing.currentPlan.name }),
|
|
881
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_antd15.Descriptions.Item, { label: "Price", children: [
|
|
882
|
+
billing.currentPlan.price,
|
|
883
|
+
billing.currentPlan.interval && ` / ${billing.currentPlan.interval}`
|
|
884
|
+
] })
|
|
885
|
+
] }) }),
|
|
886
|
+
billing.paymentMethods && billing.paymentMethods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SectionCard, { title: "Payment Methods", children: billing.paymentMethods.map((pm, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
style: {
|
|
890
|
+
display: "flex",
|
|
891
|
+
justifyContent: "space-between",
|
|
892
|
+
padding: "8px 0",
|
|
893
|
+
borderBottom: `1px solid ${token.colorBorderSecondary}`
|
|
894
|
+
},
|
|
895
|
+
children: [
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
897
|
+
pm.type,
|
|
898
|
+
" ending in ",
|
|
899
|
+
pm.last4
|
|
900
|
+
] }),
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
902
|
+
pm.expiry && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_antd15.Typography.Text, { style: { color: token.colorTextSecondary }, children: [
|
|
903
|
+
"Expires ",
|
|
904
|
+
pm.expiry
|
|
905
|
+
] }),
|
|
906
|
+
pm.isDefault && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
907
|
+
import_antd15.Tag,
|
|
908
|
+
{
|
|
909
|
+
color: "#1d4ed8",
|
|
910
|
+
style: { marginLeft: 8, color: "#ffffff", borderColor: "transparent" },
|
|
911
|
+
children: "Default"
|
|
912
|
+
}
|
|
913
|
+
)
|
|
914
|
+
] })
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
i
|
|
918
|
+
)) }),
|
|
919
|
+
billing.invoices && billing.invoices.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SectionCard, { title: "Invoice History", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
920
|
+
import_antd15.Table,
|
|
921
|
+
{
|
|
922
|
+
dataSource: billing.invoices,
|
|
923
|
+
columns: invoiceColumns,
|
|
924
|
+
rowKey: "id",
|
|
925
|
+
pagination: false,
|
|
926
|
+
size: "small"
|
|
927
|
+
}
|
|
928
|
+
) })
|
|
929
|
+
] })
|
|
930
|
+
}
|
|
931
|
+
);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
// src/templates/security.tsx
|
|
935
|
+
var import_antd16 = require("antd");
|
|
936
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
937
|
+
function SecurityTemplate({
|
|
938
|
+
title = "Security",
|
|
939
|
+
breadcrumbs,
|
|
940
|
+
actions,
|
|
941
|
+
data,
|
|
942
|
+
audit,
|
|
943
|
+
layout
|
|
944
|
+
}) {
|
|
945
|
+
const security = data ?? {};
|
|
946
|
+
const sessionColumns = [
|
|
947
|
+
{ title: "Device", dataIndex: "device", key: "device" },
|
|
948
|
+
{ title: "Location", dataIndex: "location", key: "location" },
|
|
949
|
+
{ title: "Last Active", dataIndex: "lastActive", key: "lastActive" },
|
|
950
|
+
{
|
|
951
|
+
title: "Current Session",
|
|
952
|
+
key: "current",
|
|
953
|
+
render: (_, record) => record.isCurrent ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd16.Tag, { color: "#166534", style: { color: "#ffffff", borderColor: "transparent" }, children: "Current" }) : null
|
|
954
|
+
}
|
|
955
|
+
];
|
|
956
|
+
const logColumns = [
|
|
957
|
+
{ title: "Time", dataIndex: "timestamp", key: "timestamp" },
|
|
958
|
+
{ title: "Action", dataIndex: "action", key: "action" },
|
|
959
|
+
{ title: "IP", dataIndex: "ip", key: "ip" },
|
|
960
|
+
{
|
|
961
|
+
title: "Status",
|
|
962
|
+
dataIndex: "status",
|
|
963
|
+
key: "status",
|
|
964
|
+
render: (status) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
965
|
+
import_antd16.Tag,
|
|
966
|
+
{
|
|
967
|
+
color: status === "success" ? "#166534" : status === "warning" ? "#92400e" : "#991b1b",
|
|
968
|
+
style: { color: "#ffffff", borderColor: "transparent" },
|
|
969
|
+
children: status
|
|
970
|
+
}
|
|
971
|
+
)
|
|
972
|
+
}
|
|
973
|
+
];
|
|
974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
975
|
+
TemplateFrame,
|
|
976
|
+
{
|
|
977
|
+
title,
|
|
978
|
+
breadcrumbs,
|
|
979
|
+
actions,
|
|
980
|
+
audit,
|
|
981
|
+
layout,
|
|
982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_antd16.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
983
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SectionCard, { title: "Overview", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_antd16.Descriptions, { column: 2, children: [
|
|
984
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd16.Descriptions.Item, { label: "Two-Factor Authentication", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
985
|
+
import_antd16.Tag,
|
|
986
|
+
{
|
|
987
|
+
color: security.twoFactorEnabled ? "#166534" : "#525252",
|
|
988
|
+
style: { color: "#ffffff", borderColor: "transparent" },
|
|
989
|
+
children: security.twoFactorEnabled ? "Enabled" : "Disabled"
|
|
990
|
+
}
|
|
991
|
+
) }),
|
|
992
|
+
security.passwordLastChanged && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_antd16.Descriptions.Item, { label: "Password Last Changed", children: security.passwordLastChanged })
|
|
993
|
+
] }) }),
|
|
994
|
+
security.sessions && security.sessions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SectionCard, { title: "Active Sessions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
995
|
+
import_antd16.Table,
|
|
996
|
+
{
|
|
997
|
+
dataSource: security.sessions,
|
|
998
|
+
columns: sessionColumns,
|
|
999
|
+
rowKey: "id",
|
|
1000
|
+
pagination: false,
|
|
1001
|
+
size: "small"
|
|
1002
|
+
}
|
|
1003
|
+
) }),
|
|
1004
|
+
security.securityLog && security.securityLog.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SectionCard, { title: "Security Log", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1005
|
+
import_antd16.Table,
|
|
1006
|
+
{
|
|
1007
|
+
dataSource: security.securityLog,
|
|
1008
|
+
columns: logColumns,
|
|
1009
|
+
rowKey: "timestamp",
|
|
1010
|
+
pagination: { pageSize: 10 },
|
|
1011
|
+
size: "small"
|
|
1012
|
+
}
|
|
1013
|
+
) })
|
|
1014
|
+
] })
|
|
1015
|
+
}
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
// src/templates/members.tsx
|
|
1020
|
+
var import_antd17 = require("antd");
|
|
1021
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1022
|
+
function MembersTemplate({
|
|
1023
|
+
title = "Team Members",
|
|
1024
|
+
breadcrumbs,
|
|
1025
|
+
actions,
|
|
1026
|
+
data,
|
|
1027
|
+
audit,
|
|
1028
|
+
layout
|
|
1029
|
+
}) {
|
|
1030
|
+
const { token } = import_antd17.theme.useToken();
|
|
1031
|
+
const members = data ?? {};
|
|
1032
|
+
const memberColumns = [
|
|
1033
|
+
{
|
|
1034
|
+
title: "Member",
|
|
1035
|
+
key: "member",
|
|
1036
|
+
render: (_, record) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_antd17.Space, { children: [
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd17.Avatar, { size: "small", src: record.avatar, children: record.name[0] }),
|
|
1038
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontWeight: 500 }, children: record.name }),
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd17.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: record.email })
|
|
1041
|
+
] })
|
|
1042
|
+
] })
|
|
1043
|
+
},
|
|
1044
|
+
{ title: "Role", dataIndex: "role", key: "role", render: (role) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_antd17.Tag, { children: role }) },
|
|
1045
|
+
{
|
|
1046
|
+
title: "Status",
|
|
1047
|
+
dataIndex: "status",
|
|
1048
|
+
key: "status",
|
|
1049
|
+
render: (status) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1050
|
+
import_antd17.Tag,
|
|
1051
|
+
{
|
|
1052
|
+
color: status === "active" ? "#166534" : status === "invited" ? "#92400e" : "#525252",
|
|
1053
|
+
style: { color: "#ffffff", borderColor: "transparent" },
|
|
1054
|
+
children: status
|
|
1055
|
+
}
|
|
1056
|
+
)
|
|
1057
|
+
},
|
|
1058
|
+
{ title: "Joined", dataIndex: "joinedAt", key: "joinedAt" }
|
|
1059
|
+
];
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1061
|
+
TemplateFrame,
|
|
1062
|
+
{
|
|
1063
|
+
title,
|
|
1064
|
+
breadcrumbs,
|
|
1065
|
+
actions,
|
|
1066
|
+
audit,
|
|
1067
|
+
layout,
|
|
1068
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_antd17.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
1069
|
+
members.roles && members.roles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SectionCard, { title: "Roles", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", gap: 16, flexWrap: "wrap" }, children: members.roles.map((role) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1070
|
+
"div",
|
|
1071
|
+
{
|
|
1072
|
+
style: {
|
|
1073
|
+
padding: "12px 16px",
|
|
1074
|
+
border: `1px solid ${token.colorBorderSecondary}`,
|
|
1075
|
+
borderRadius: 8,
|
|
1076
|
+
minWidth: 150
|
|
1077
|
+
},
|
|
1078
|
+
children: [
|
|
1079
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontWeight: 600 }, children: role.name }),
|
|
1080
|
+
role.description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontSize: 12, color: token.colorTextSecondary }, children: role.description }),
|
|
1081
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { fontSize: 13, marginTop: 4 }, children: [
|
|
1082
|
+
role.memberCount,
|
|
1083
|
+
" members"
|
|
1084
|
+
] })
|
|
1085
|
+
]
|
|
1086
|
+
},
|
|
1087
|
+
role.name
|
|
1088
|
+
)) }) }),
|
|
1089
|
+
members.members && members.members.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SectionCard, { title: `Members${members.totalMembers ? ` (${members.totalMembers})` : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1090
|
+
import_antd17.Table,
|
|
1091
|
+
{
|
|
1092
|
+
dataSource: members.members,
|
|
1093
|
+
columns: memberColumns,
|
|
1094
|
+
rowKey: "id",
|
|
1095
|
+
pagination: { pageSize: 10 },
|
|
1096
|
+
size: "small"
|
|
1097
|
+
}
|
|
1098
|
+
) })
|
|
1099
|
+
] })
|
|
1100
|
+
}
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
// src/templates/notifications.tsx
|
|
1105
|
+
var import_antd18 = require("antd");
|
|
1106
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1107
|
+
function NotificationsTemplate({
|
|
1108
|
+
title = "Notifications",
|
|
1109
|
+
breadcrumbs,
|
|
1110
|
+
actions,
|
|
1111
|
+
data,
|
|
1112
|
+
audit,
|
|
1113
|
+
layout,
|
|
1114
|
+
onToggle
|
|
1115
|
+
}) {
|
|
1116
|
+
const { token } = import_antd18.theme.useToken();
|
|
1117
|
+
const notifications = data ?? {};
|
|
1118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1119
|
+
TemplateFrame,
|
|
1120
|
+
{
|
|
1121
|
+
title,
|
|
1122
|
+
breadcrumbs,
|
|
1123
|
+
actions,
|
|
1124
|
+
audit,
|
|
1125
|
+
layout,
|
|
1126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_antd18.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: notifications.groups?.map((group) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SectionCard, { title: group.title, children: group.channels.map((channel) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1127
|
+
"div",
|
|
1128
|
+
{
|
|
1129
|
+
style: {
|
|
1130
|
+
display: "flex",
|
|
1131
|
+
justifyContent: "space-between",
|
|
1132
|
+
alignItems: "center",
|
|
1133
|
+
padding: "12px 0",
|
|
1134
|
+
borderBottom: `1px solid ${token.colorBorderSecondary}`
|
|
1135
|
+
},
|
|
1136
|
+
children: [
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
1138
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { fontWeight: 500, color: token.colorText }, children: channel.label }),
|
|
1139
|
+
channel.description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_antd18.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: channel.description })
|
|
1140
|
+
] }),
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_antd18.Space, { size: "large", children: [
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_antd18.Space, { direction: "vertical", align: "center", size: 0, children: [
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_antd18.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Email" }),
|
|
1144
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1145
|
+
import_antd18.Switch,
|
|
1146
|
+
{
|
|
1147
|
+
size: "small",
|
|
1148
|
+
checked: channel.email,
|
|
1149
|
+
"aria-label": `${channel.label}: email notifications`,
|
|
1150
|
+
onChange: (v) => onToggle?.(channel.key, "email", v)
|
|
1151
|
+
}
|
|
1152
|
+
)
|
|
1153
|
+
] }),
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_antd18.Space, { direction: "vertical", align: "center", size: 0, children: [
|
|
1155
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_antd18.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "Push" }),
|
|
1156
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1157
|
+
import_antd18.Switch,
|
|
1158
|
+
{
|
|
1159
|
+
size: "small",
|
|
1160
|
+
checked: channel.push,
|
|
1161
|
+
"aria-label": `${channel.label}: push notifications`,
|
|
1162
|
+
onChange: (v) => onToggle?.(channel.key, "push", v)
|
|
1163
|
+
}
|
|
1164
|
+
)
|
|
1165
|
+
] }),
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_antd18.Space, { direction: "vertical", align: "center", size: 0, children: [
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_antd18.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: "SMS" }),
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1169
|
+
import_antd18.Switch,
|
|
1170
|
+
{
|
|
1171
|
+
size: "small",
|
|
1172
|
+
checked: channel.sms,
|
|
1173
|
+
"aria-label": `${channel.label}: sms notifications`,
|
|
1174
|
+
onChange: (v) => onToggle?.(channel.key, "sms", v)
|
|
1175
|
+
}
|
|
1176
|
+
)
|
|
1177
|
+
] })
|
|
1178
|
+
] })
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1181
|
+
channel.key
|
|
1182
|
+
)) }, group.title)) })
|
|
1183
|
+
}
|
|
1184
|
+
);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
// src/templates/activity.tsx
|
|
1188
|
+
var import_antd19 = require("antd");
|
|
1189
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1190
|
+
var colorMap = {
|
|
1191
|
+
info: "#1d4ed8",
|
|
1192
|
+
success: "#166534",
|
|
1193
|
+
warning: "#92400e",
|
|
1194
|
+
error: "#991b1b"
|
|
1195
|
+
};
|
|
1196
|
+
function ActivityTemplate({
|
|
1197
|
+
title = "Activity",
|
|
1198
|
+
breadcrumbs,
|
|
1199
|
+
actions,
|
|
1200
|
+
data,
|
|
1201
|
+
audit,
|
|
1202
|
+
layout
|
|
1203
|
+
}) {
|
|
1204
|
+
const { token } = import_antd19.theme.useToken();
|
|
1205
|
+
const activity = data ?? {};
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1207
|
+
TemplateFrame,
|
|
1208
|
+
{
|
|
1209
|
+
title,
|
|
1210
|
+
breadcrumbs,
|
|
1211
|
+
actions,
|
|
1212
|
+
audit,
|
|
1213
|
+
layout,
|
|
1214
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1215
|
+
import_antd19.Timeline,
|
|
1216
|
+
{
|
|
1217
|
+
items: activity.events?.map((event) => ({
|
|
1218
|
+
color: colorMap[event.type ?? "info"],
|
|
1219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_antd19.Space, { align: "start", children: [
|
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd19.Avatar, { size: "small", src: event.actor.avatar, children: event.actor.name[0] }),
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd19.Typography.Text, { strong: true, children: event.actor.name }),
|
|
1224
|
+
" ",
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd19.Typography.Text, { children: event.action }),
|
|
1226
|
+
event.target && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_antd19.Typography.Text, { strong: true, children: [
|
|
1227
|
+
" ",
|
|
1228
|
+
event.target
|
|
1229
|
+
] })
|
|
1230
|
+
] }),
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd19.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: event.timestamp }),
|
|
1232
|
+
event.detail && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { marginTop: 4 }, children: event.detail })
|
|
1233
|
+
] })
|
|
1234
|
+
] }) }, event.id)
|
|
1235
|
+
}))
|
|
1236
|
+
}
|
|
1237
|
+
)
|
|
1238
|
+
}
|
|
1239
|
+
);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
// src/templates/invite.tsx
|
|
1243
|
+
var import_antd20 = require("antd");
|
|
1244
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1245
|
+
function InviteTemplate({
|
|
1246
|
+
title = "Invite a Friend",
|
|
1247
|
+
breadcrumbs,
|
|
1248
|
+
actions,
|
|
1249
|
+
data,
|
|
1250
|
+
audit,
|
|
1251
|
+
layout,
|
|
1252
|
+
onCopyLink
|
|
1253
|
+
}) {
|
|
1254
|
+
const { token } = import_antd20.theme.useToken();
|
|
1255
|
+
const invite = data ?? {};
|
|
1256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1257
|
+
TemplateFrame,
|
|
1258
|
+
{
|
|
1259
|
+
title,
|
|
1260
|
+
breadcrumbs,
|
|
1261
|
+
actions,
|
|
1262
|
+
audit,
|
|
1263
|
+
layout,
|
|
1264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd20.Space, { direction: "vertical", size: "large", style: { width: "100%" }, children: [
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SectionCard, { title: "Your Referral Link", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd20.Space, { direction: "vertical", style: { width: "100%" }, children: [
|
|
1266
|
+
invite.referralLink && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1267
|
+
import_antd20.Input.Search,
|
|
1268
|
+
{
|
|
1269
|
+
value: invite.referralLink,
|
|
1270
|
+
readOnly: true,
|
|
1271
|
+
enterButton: "Copy",
|
|
1272
|
+
"aria-label": "Referral link",
|
|
1273
|
+
onSearch: onCopyLink
|
|
1274
|
+
}
|
|
1275
|
+
),
|
|
1276
|
+
invite.referralCode && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd20.Typography.Text, { style: { color: token.colorTextSecondary }, children: [
|
|
1277
|
+
"Referral code: ",
|
|
1278
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd20.Typography.Text, { code: true, children: invite.referralCode })
|
|
1279
|
+
] })
|
|
1280
|
+
] }) }),
|
|
1281
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", gap: 16, flexWrap: "wrap" }, children: [
|
|
1282
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd20.Card, { size: "small", style: { flex: 1, minWidth: 150, textAlign: "center" }, children: [
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 28, fontWeight: 700 }, children: invite.totalInvites ?? 0 }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: token.colorTextSecondary, fontSize: 13 }, children: "Invites Sent" })
|
|
1285
|
+
] }),
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd20.Card, { size: "small", style: { flex: 1, minWidth: 150, textAlign: "center" }, children: [
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 28, fontWeight: 700 }, children: invite.acceptedInvites ?? 0 }),
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { color: token.colorTextSecondary, fontSize: 13 }, children: "Accepted" })
|
|
1289
|
+
] })
|
|
1290
|
+
] }),
|
|
1291
|
+
invite.rewards && invite.rewards.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SectionCard, { title: "Rewards", children: invite.rewards.map((reward) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1292
|
+
"div",
|
|
1293
|
+
{
|
|
1294
|
+
style: {
|
|
1295
|
+
display: "flex",
|
|
1296
|
+
alignItems: "center",
|
|
1297
|
+
gap: 12,
|
|
1298
|
+
padding: "12px 0",
|
|
1299
|
+
borderBottom: `1px solid ${token.colorBorderSecondary}`
|
|
1300
|
+
},
|
|
1301
|
+
children: [
|
|
1302
|
+
reward.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: reward.icon }),
|
|
1303
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
1304
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontWeight: 500 }, children: reward.label }),
|
|
1305
|
+
reward.description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd20.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: reward.description })
|
|
1306
|
+
] })
|
|
1307
|
+
]
|
|
1308
|
+
},
|
|
1309
|
+
reward.label
|
|
1310
|
+
)) })
|
|
1311
|
+
] })
|
|
1312
|
+
}
|
|
1313
|
+
);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// src/templates/projects.tsx
|
|
1317
|
+
var import_antd21 = require("antd");
|
|
1318
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1319
|
+
var statusColor = {
|
|
1320
|
+
active: "#1d4ed8",
|
|
1321
|
+
completed: "#166534",
|
|
1322
|
+
"on-hold": "#92400e",
|
|
1323
|
+
archived: "#525252"
|
|
1324
|
+
};
|
|
1325
|
+
function ProjectsTemplate({
|
|
1326
|
+
title = "Projects",
|
|
1327
|
+
breadcrumbs,
|
|
1328
|
+
actions,
|
|
1329
|
+
data,
|
|
1330
|
+
audit,
|
|
1331
|
+
layout,
|
|
1332
|
+
onProjectClick
|
|
1333
|
+
}) {
|
|
1334
|
+
const { token } = import_antd21.theme.useToken();
|
|
1335
|
+
const projects = data ?? {};
|
|
1336
|
+
const cols = projects.columns ?? 3;
|
|
1337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1338
|
+
TemplateFrame,
|
|
1339
|
+
{
|
|
1340
|
+
title,
|
|
1341
|
+
breadcrumbs,
|
|
1342
|
+
actions,
|
|
1343
|
+
audit,
|
|
1344
|
+
layout,
|
|
1345
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1346
|
+
"div",
|
|
1347
|
+
{
|
|
1348
|
+
style: {
|
|
1349
|
+
display: "grid",
|
|
1350
|
+
gridTemplateColumns: `repeat(${cols}, 1fr)`,
|
|
1351
|
+
gap: 16
|
|
1352
|
+
},
|
|
1353
|
+
children: projects.projects?.map((project) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1354
|
+
import_antd21.Card,
|
|
1355
|
+
{
|
|
1356
|
+
hoverable: true,
|
|
1357
|
+
size: "small",
|
|
1358
|
+
onClick: () => onProjectClick?.(project),
|
|
1359
|
+
style: { cursor: "pointer" },
|
|
1360
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_antd21.Space, { direction: "vertical", style: { width: "100%" }, children: [
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1362
|
+
"div",
|
|
1363
|
+
{
|
|
1364
|
+
style: { display: "flex", justifyContent: "space-between", alignItems: "start" },
|
|
1365
|
+
children: [
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_antd21.Typography.Text, { strong: true, children: project.title }),
|
|
1367
|
+
project.status && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1368
|
+
import_antd21.Tag,
|
|
1369
|
+
{
|
|
1370
|
+
color: statusColor[project.status],
|
|
1371
|
+
style: { color: "#ffffff", borderColor: "transparent" },
|
|
1372
|
+
children: project.status
|
|
1373
|
+
}
|
|
1374
|
+
)
|
|
1375
|
+
]
|
|
1376
|
+
}
|
|
1377
|
+
),
|
|
1378
|
+
project.description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_antd21.Typography.Text, { style: { fontSize: 13, color: token.colorTextSecondary }, children: project.description }),
|
|
1379
|
+
project.progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1380
|
+
import_antd21.Progress,
|
|
1381
|
+
{
|
|
1382
|
+
percent: project.progress,
|
|
1383
|
+
size: "small",
|
|
1384
|
+
"aria-label": `${project.title} completion ${project.progress}%`
|
|
1385
|
+
}
|
|
1386
|
+
),
|
|
1387
|
+
project.tags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_antd21.Space, { wrap: true, size: 4, children: project.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_antd21.Tag, { style: { fontSize: 11 }, children: tag }, tag)) }),
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1389
|
+
"div",
|
|
1390
|
+
{
|
|
1391
|
+
style: { display: "flex", justifyContent: "space-between", alignItems: "center" },
|
|
1392
|
+
children: [
|
|
1393
|
+
project.members && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_antd21.Avatar.Group, { size: "small", max: { count: 3 }, children: project.members.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_antd21.Avatar, { size: "small", src: m.avatar, alt: m.name, children: m.name[0] }, i)) }),
|
|
1394
|
+
project.dueDate && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_antd21.Typography.Text, { style: { fontSize: 12, color: token.colorTextSecondary }, children: [
|
|
1395
|
+
"Due ",
|
|
1396
|
+
project.dueDate
|
|
1397
|
+
] })
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
)
|
|
1401
|
+
] })
|
|
1402
|
+
},
|
|
1403
|
+
project.id
|
|
1404
|
+
))
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
}
|
|
1408
|
+
);
|
|
1409
|
+
}
|
|
1410
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1411
|
+
0 && (module.exports = {
|
|
1412
|
+
ActivityTemplate,
|
|
1413
|
+
AuditTrail,
|
|
1414
|
+
AuthShell,
|
|
1415
|
+
BillingTemplate,
|
|
1416
|
+
BulkActionsBar,
|
|
1417
|
+
DashboardTemplate,
|
|
1418
|
+
DetailTemplate,
|
|
1419
|
+
ErrorPageTemplate,
|
|
1420
|
+
InviteTemplate,
|
|
1421
|
+
KpiCard,
|
|
1422
|
+
ListTemplate,
|
|
1423
|
+
MembersTemplate,
|
|
1424
|
+
NotificationsTemplate,
|
|
1425
|
+
ProfileTemplate,
|
|
1426
|
+
ProjectsTemplate,
|
|
1427
|
+
SectionCard,
|
|
1428
|
+
SecurityTemplate,
|
|
1429
|
+
SettingsTemplate,
|
|
1430
|
+
TemplateFrame,
|
|
1431
|
+
WizardTemplate,
|
|
1432
|
+
templateActionsToPageHeaderActions
|
|
1433
|
+
});
|