@middag-io/react 0.32.0 → 0.33.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-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/InspectorContext.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/data-display.d.ts +8 -0
- package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +26 -5
- package/package.json +1 -1
- package/dist-lib/_redirects +0 -1
- package/dist-lib/api/example/moodle/get/books.json +0 -209
- package/dist-lib/api/example/moodle/get/dashboard.json +0 -203
- package/dist-lib/api/example/wordpress/get/products.json +0 -165
- package/dist-lib/api/index.json +0 -66
- package/dist-lib/api/inspector/connectors/canvas.json +0 -18
- package/dist-lib/api/inspector/connectors/moodle.json +0 -18
- package/dist-lib/api/inspector/connectors/n8n.json +0 -18
- package/dist-lib/api/inspector/connectors/open-edx.json +0 -18
- package/dist-lib/api/inspector/offerings/off-1.json +0 -18
- package/dist-lib/api/inspector/offerings/off-2.json +0 -18
- package/dist-lib/api/inspector/offerings/off-3.json +0 -18
- package/dist-lib/api/inspector/offerings/off-4.json +0 -18
- package/dist-lib/api/inspector/offerings/off-5.json +0 -18
- package/dist-lib/api/inspector/offerings/off-6.json +0 -17
- package/dist-lib/lottie/calendar/schedule-1.json +0 -1
- package/dist-lib/lottie/calendar/schedule-2.json +0 -1
- package/dist-lib/lottie/celebration/confetti-1.json +0 -1
- package/dist-lib/lottie/celebration/confetti-2.json +0 -1
- package/dist-lib/lottie/celebration/confetti-3.json +0 -1
- package/dist-lib/lottie/cloud/cloud-1.json +0 -1
- package/dist-lib/lottie/cloud/cloud-2.json +0 -1
- package/dist-lib/lottie/connection/network-1.json +0 -1
- package/dist-lib/lottie/connection/network-2.json +0 -1
- package/dist-lib/lottie/connection/network-3.json +0 -1
- package/dist-lib/lottie/dashboard/analytics-1.json +0 -1
- package/dist-lib/lottie/dashboard/analytics-2.json +0 -1
- package/dist-lib/lottie/dashboard/analytics-3.json +0 -1
- package/dist-lib/lottie/email/mail-1.json +0 -1
- package/dist-lib/lottie/email/mail-2.json +0 -1
- package/dist-lib/lottie/email/mail-3.json +0 -1
- package/dist-lib/lottie/empty-state/empty-1.json +0 -1
- package/dist-lib/lottie/empty-state/empty-2.json +0 -1
- package/dist-lib/lottie/empty-state/empty-3.json +0 -1
- package/dist-lib/lottie/error/warning-1.json +0 -1
- package/dist-lib/lottie/error/warning-2.json +0 -1
- package/dist-lib/lottie/error/warning-3.json +0 -1
- package/dist-lib/lottie/index.ts +0 -49
- package/dist-lib/lottie/loading/spinner-1.json +0 -1
- package/dist-lib/lottie/loading/spinner-2.json +0 -1
- package/dist-lib/lottie/loading/spinner-3.json +0 -1
- package/dist-lib/lottie/maintenance/construction-1.json +0 -1
- package/dist-lib/lottie/maintenance/construction-2.json +0 -1
- package/dist-lib/lottie/maintenance/construction-3.json +0 -1
- package/dist-lib/lottie/not-found/404-1.json +0 -1
- package/dist-lib/lottie/not-found/404-2.json +0 -1
- package/dist-lib/lottie/not-found/404-3.json +0 -1
- package/dist-lib/lottie/notification/bell-1.json +0 -1
- package/dist-lib/lottie/notification/bell-2.json +0 -1
- package/dist-lib/lottie/notification/bell-3.json +0 -1
- package/dist-lib/lottie/onboarding/welcome-1.json +0 -1
- package/dist-lib/lottie/onboarding/welcome-2.json +0 -1
- package/dist-lib/lottie/onboarding/welcome-3.json +0 -1
- package/dist-lib/lottie/payment/wallet-1.json +0 -1
- package/dist-lib/lottie/payment/wallet-2.json +0 -1
- package/dist-lib/lottie/payment/wallet-3.json +0 -1
- package/dist-lib/lottie/search/search-1.json +0 -1
- package/dist-lib/lottie/search/search-2.json +0 -1
- package/dist-lib/lottie/search/search-3.json +0 -1
- package/dist-lib/lottie/security/lock-1.json +0 -1
- package/dist-lib/lottie/security/lock-2.json +0 -1
- package/dist-lib/lottie/security/lock-3.json +0 -1
- package/dist-lib/lottie/settings/gear-1.json +0 -1
- package/dist-lib/lottie/settings/gear-2.json +0 -1
- package/dist-lib/lottie/settings/gear-3.json +0 -1
- package/dist-lib/lottie/success/check-1.json +0 -1
- package/dist-lib/lottie/success/check-2.json +0 -1
- package/dist-lib/lottie/success/check-3.json +0 -1
- package/dist-lib/lottie/upload/upload-1.json +0 -1
- package/dist-lib/lottie/upload/upload-2.json +0 -1
- package/dist-lib/lottie/upload/upload-3.json +0 -1
- package/dist-lib/lottie/user/profile-1.json +0 -1
- package/dist-lib/lottie/user/profile-2.json +0 -1
- package/dist-lib/lottie/user/profile-3.json +0 -1
package/dist-lib/middag-react.js
CHANGED
|
@@ -5154,7 +5154,13 @@ var of = {
|
|
|
5154
5154
|
neutral: "bg-muted"
|
|
5155
5155
|
};
|
|
5156
5156
|
function sf({ block: e }) {
|
|
5157
|
-
let { t, locale: n } = I(), { meta: r, key: i } = e, a = Vr().props[i] ?? e.data, o = r?.loading === !0, [s, c] = W(!1), l = () => {
|
|
5157
|
+
let { t, locale: n } = I(), { meta: r, key: i } = e, a = Vr().props[i] ?? e.data, o = r?.loading === !0, [s, c] = W(!1), [l, u] = W(/* @__PURE__ */ new Set()), d = (e, t) => {
|
|
5158
|
+
u((e) => new Set(e).add(t)), G.post(e, {}, {
|
|
5159
|
+
preserveState: !0,
|
|
5160
|
+
preserveScroll: !0,
|
|
5161
|
+
only: [i]
|
|
5162
|
+
});
|
|
5163
|
+
}, f = () => {
|
|
5158
5164
|
a.loadMoreHref && (c(!0), G.get(a.loadMoreHref, {}, {
|
|
5159
5165
|
preserveState: !0,
|
|
5160
5166
|
preserveScroll: !0,
|
|
@@ -5197,9 +5203,9 @@ function sf({ block: e }) {
|
|
|
5197
5203
|
size: 14,
|
|
5198
5204
|
className: "text-white"
|
|
5199
5205
|
})
|
|
5200
|
-
}), /* @__PURE__ */
|
|
5206
|
+
}), /* @__PURE__ */ J("div", {
|
|
5201
5207
|
className: "min-w-0 flex-1",
|
|
5202
|
-
children: /* @__PURE__ */ J("div", {
|
|
5208
|
+
children: [/* @__PURE__ */ J("div", {
|
|
5203
5209
|
className: "flex items-baseline justify-between gap-2",
|
|
5204
5210
|
children: [/* @__PURE__ */ J("p", {
|
|
5205
5211
|
className: "text-sm",
|
|
@@ -5221,7 +5227,16 @@ function sf({ block: e }) {
|
|
|
5221
5227
|
title: rf(e.timestamp),
|
|
5222
5228
|
children: nf(e.timestamp, n)
|
|
5223
5229
|
})]
|
|
5224
|
-
})
|
|
5230
|
+
}), e.markReadHref && (e.read || l.has(e.id) ? /* @__PURE__ */ q("span", {
|
|
5231
|
+
className: "text-muted-foreground mt-1 inline-block text-xs",
|
|
5232
|
+
children: t("middag.ui.activity.read")
|
|
5233
|
+
}) : /* @__PURE__ */ q(F, {
|
|
5234
|
+
variant: "ghost",
|
|
5235
|
+
size: "sm",
|
|
5236
|
+
className: "mt-1 h-auto px-2 py-0.5 text-xs",
|
|
5237
|
+
onClick: () => d(e.markReadHref, e.id),
|
|
5238
|
+
children: t("middag.ui.activity.mark_read")
|
|
5239
|
+
}))]
|
|
5225
5240
|
})]
|
|
5226
5241
|
}, e.id))
|
|
5227
5242
|
})] }, e.label)), a.hasMore && /* @__PURE__ */ q("li", {
|
|
@@ -5229,7 +5244,7 @@ function sf({ block: e }) {
|
|
|
5229
5244
|
children: /* @__PURE__ */ q(F, {
|
|
5230
5245
|
variant: "ghost",
|
|
5231
5246
|
size: "sm",
|
|
5232
|
-
onClick:
|
|
5247
|
+
onClick: f,
|
|
5233
5248
|
disabled: s,
|
|
5234
5249
|
"aria-label": t("middag.ui.activity.load_more_label"),
|
|
5235
5250
|
children: t(s ? "middag.ui.loading" : "middag.ui.load_more")
|
|
@@ -14471,7 +14486,9 @@ var pS = {
|
|
|
14471
14486
|
"middag.ui.actionbar.selected_one": "{count} selected",
|
|
14472
14487
|
"middag.ui.actionbar.selected_other": "{count} selected",
|
|
14473
14488
|
"middag.ui.activity.load_more_label": "Load more activities",
|
|
14489
|
+
"middag.ui.activity.mark_read": "Mark as read",
|
|
14474
14490
|
"middag.ui.activity.no_activity": "No activity recorded",
|
|
14491
|
+
"middag.ui.activity.read": "Read",
|
|
14475
14492
|
"middag.ui.activity.system_actor": "System",
|
|
14476
14493
|
"middag.ui.activity.timeline_label": "Activity timeline",
|
|
14477
14494
|
"middag.ui.appearance.dark": "Dark",
|
|
@@ -14633,6 +14650,7 @@ var pS = {
|
|
|
14633
14650
|
"middag.ui.inspector.close": "Close inspector",
|
|
14634
14651
|
"middag.ui.inspector.error": "Could not load details.",
|
|
14635
14652
|
"middag.ui.inspector.favorite": "Favorite",
|
|
14653
|
+
"middag.ui.inspector.label": "Inspector",
|
|
14636
14654
|
"middag.ui.inspector.tab_activity": "Activity",
|
|
14637
14655
|
"middag.ui.inspector.tab_config": "Config",
|
|
14638
14656
|
"middag.ui.inspector.tab_overview": "Overview",
|
|
@@ -14745,7 +14763,9 @@ var pS = {
|
|
|
14745
14763
|
"middag.ui.actionbar.selected_one": "{count} selecionado",
|
|
14746
14764
|
"middag.ui.actionbar.selected_other": "{count} selecionados",
|
|
14747
14765
|
"middag.ui.activity.load_more_label": "Carregar mais atividades",
|
|
14766
|
+
"middag.ui.activity.mark_read": "Marcar como lida",
|
|
14748
14767
|
"middag.ui.activity.no_activity": "Nenhuma atividade registrada",
|
|
14768
|
+
"middag.ui.activity.read": "Lida",
|
|
14749
14769
|
"middag.ui.activity.system_actor": "Sistema",
|
|
14750
14770
|
"middag.ui.activity.timeline_label": "Linha do tempo de atividades",
|
|
14751
14771
|
"middag.ui.appearance.dark": "Escuro",
|
|
@@ -14907,6 +14927,7 @@ var pS = {
|
|
|
14907
14927
|
"middag.ui.inspector.close": "Fechar inspetor",
|
|
14908
14928
|
"middag.ui.inspector.error": "Não foi possível carregar os detalhes.",
|
|
14909
14929
|
"middag.ui.inspector.favorite": "Favoritar",
|
|
14930
|
+
"middag.ui.inspector.label": "Inspetor",
|
|
14910
14931
|
"middag.ui.inspector.tab_activity": "Atividade",
|
|
14911
14932
|
"middag.ui.inspector.tab_config": "Configuração",
|
|
14912
14933
|
"middag.ui.inspector.tab_overview": "Detalhes",
|
package/package.json
CHANGED
package/dist-lib/_redirects
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/* /index.html 200
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "Example: GET /api/books -- Returns a list of books for the Moodle admin panel. Demonstrates a stack layout with a dense_table block including sortable columns, pagination, filters, row actions, and bulk actions.",
|
|
3
|
-
"host": "moodle",
|
|
4
|
-
"method": "GET",
|
|
5
|
-
"contract": {
|
|
6
|
-
"version": "1",
|
|
7
|
-
"shell": "admin",
|
|
8
|
-
"page": {
|
|
9
|
-
"key": "books-list",
|
|
10
|
-
"title": "Books",
|
|
11
|
-
"breadcrumbs": [
|
|
12
|
-
{ "label": "Site Administration", "href": "/admin" },
|
|
13
|
-
{ "label": "Plugins", "href": "/admin/plugins" },
|
|
14
|
-
{ "label": "Books" }
|
|
15
|
-
],
|
|
16
|
-
"actions": [
|
|
17
|
-
{
|
|
18
|
-
"id": "add-book",
|
|
19
|
-
"label": "Add Book",
|
|
20
|
-
"intent": "primary",
|
|
21
|
-
"href": "/admin/books/new",
|
|
22
|
-
"icon": "plus"
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"filterTabs": [
|
|
26
|
-
{ "key": "all", "label": "All", "badge": 12 },
|
|
27
|
-
{ "key": "published", "label": "Published", "badge": 9 },
|
|
28
|
-
{ "key": "draft", "label": "Draft", "badge": 2 },
|
|
29
|
-
{ "key": "archived", "label": "Archived", "badge": 1 }
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"layout": {
|
|
33
|
-
"template": "stack",
|
|
34
|
-
"meta": { "fullBleed": true },
|
|
35
|
-
"regions": {
|
|
36
|
-
"content": [
|
|
37
|
-
{
|
|
38
|
-
"type": "dense_table",
|
|
39
|
-
"key": "books-table",
|
|
40
|
-
"data": {
|
|
41
|
-
"columns": [
|
|
42
|
-
{ "key": "title", "label": "Title", "variant": "text", "sortable": true, "searchable": true },
|
|
43
|
-
{ "key": "author", "label": "Author", "variant": "text", "sortable": true },
|
|
44
|
-
{ "key": "course", "label": "Course", "variant": "text", "sortable": true },
|
|
45
|
-
{ "key": "chapters", "label": "Chapters", "variant": "text", "sortable": true },
|
|
46
|
-
{ "key": "status", "label": "Status", "variant": "status", "sortable": true },
|
|
47
|
-
{ "key": "updated_at", "label": "Last Updated", "variant": "timestamp", "sortable": true }
|
|
48
|
-
],
|
|
49
|
-
"rows": [
|
|
50
|
-
{
|
|
51
|
-
"id": "book-1",
|
|
52
|
-
"title": "Introduction to Machine Learning",
|
|
53
|
-
"author": "Dr. Sarah Chen",
|
|
54
|
-
"course": "CS 301 - Artificial Intelligence",
|
|
55
|
-
"chapters": "14",
|
|
56
|
-
"status": "Published",
|
|
57
|
-
"updated_at": 1746057600,
|
|
58
|
-
"href": "/admin/books/book-1"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"id": "book-2",
|
|
62
|
-
"title": "Workplace Safety Handbook",
|
|
63
|
-
"author": "Mark Johnson",
|
|
64
|
-
"course": "NR-10 Safety Compliance",
|
|
65
|
-
"chapters": "8",
|
|
66
|
-
"status": "Published",
|
|
67
|
-
"updated_at": 1745971200,
|
|
68
|
-
"href": "/admin/books/book-2"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"id": "book-3",
|
|
72
|
-
"title": "Data Privacy & LGPD Guide",
|
|
73
|
-
"author": "Ana Costa",
|
|
74
|
-
"course": "Compliance Training",
|
|
75
|
-
"chapters": "11",
|
|
76
|
-
"status": "Published",
|
|
77
|
-
"updated_at": 1745884800,
|
|
78
|
-
"href": "/admin/books/book-3"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"id": "book-4",
|
|
82
|
-
"title": "Leadership Fundamentals",
|
|
83
|
-
"author": "Carlos Mendes",
|
|
84
|
-
"course": "Management Track",
|
|
85
|
-
"chapters": "6",
|
|
86
|
-
"status": "Draft",
|
|
87
|
-
"updated_at": 1745798400,
|
|
88
|
-
"href": "/admin/books/book-4"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"id": "book-5",
|
|
92
|
-
"title": "Onboarding Procedures v2",
|
|
93
|
-
"author": "HR Team",
|
|
94
|
-
"course": "Employee Onboarding",
|
|
95
|
-
"chapters": "5",
|
|
96
|
-
"status": "Draft",
|
|
97
|
-
"updated_at": 1745712000,
|
|
98
|
-
"href": "/admin/books/book-5"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"id": "book-6",
|
|
102
|
-
"title": "Advanced Excel for Finance",
|
|
103
|
-
"author": "Julia Ferreira",
|
|
104
|
-
"course": "Finance Skills",
|
|
105
|
-
"chapters": "18",
|
|
106
|
-
"status": "Published",
|
|
107
|
-
"updated_at": 1745625600,
|
|
108
|
-
"href": "/admin/books/book-6"
|
|
109
|
-
}
|
|
110
|
-
],
|
|
111
|
-
"pagination": {
|
|
112
|
-
"page": 1,
|
|
113
|
-
"perPage": 20,
|
|
114
|
-
"total": 12,
|
|
115
|
-
"lastPage": 1
|
|
116
|
-
},
|
|
117
|
-
"sort": {
|
|
118
|
-
"column": "title",
|
|
119
|
-
"direction": "asc"
|
|
120
|
-
},
|
|
121
|
-
"filters": {
|
|
122
|
-
"available": [
|
|
123
|
-
{
|
|
124
|
-
"key": "status",
|
|
125
|
-
"label": "Status",
|
|
126
|
-
"type": "select",
|
|
127
|
-
"options": [
|
|
128
|
-
{ "value": "Published", "label": "Published" },
|
|
129
|
-
{ "value": "Draft", "label": "Draft" },
|
|
130
|
-
{ "value": "Archived", "label": "Archived" }
|
|
131
|
-
]
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"key": "course",
|
|
135
|
-
"label": "Course",
|
|
136
|
-
"type": "select",
|
|
137
|
-
"options": [
|
|
138
|
-
{ "value": "cs301", "label": "CS 301 - Artificial Intelligence" },
|
|
139
|
-
{ "value": "nr10", "label": "NR-10 Safety Compliance" },
|
|
140
|
-
{ "value": "compliance", "label": "Compliance Training" },
|
|
141
|
-
{ "value": "management", "label": "Management Track" }
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
"applied": {}
|
|
146
|
-
},
|
|
147
|
-
"rowActions": [
|
|
148
|
-
{
|
|
149
|
-
"id": "edit",
|
|
150
|
-
"label": "Edit",
|
|
151
|
-
"icon": "edit",
|
|
152
|
-
"method": "get",
|
|
153
|
-
"href": "/admin/books/${id}/edit"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"id": "duplicate",
|
|
157
|
-
"label": "Duplicate",
|
|
158
|
-
"icon": "copy",
|
|
159
|
-
"method": "post",
|
|
160
|
-
"requiresConfirmation": true,
|
|
161
|
-
"confirmation": {
|
|
162
|
-
"title": "Duplicate Book",
|
|
163
|
-
"message": "A copy of this book will be created as a draft. Continue?",
|
|
164
|
-
"intent": "default",
|
|
165
|
-
"confirmLabel": "Duplicate",
|
|
166
|
-
"cancelLabel": "Cancel"
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"id": "delete",
|
|
171
|
-
"label": "Delete",
|
|
172
|
-
"icon": "trash",
|
|
173
|
-
"intent": "danger",
|
|
174
|
-
"method": "delete",
|
|
175
|
-
"requiresConfirmation": true,
|
|
176
|
-
"confirmation": {
|
|
177
|
-
"title": "Delete Book",
|
|
178
|
-
"message": "This will permanently delete the book and all its chapters. This action cannot be undone.",
|
|
179
|
-
"intent": "danger",
|
|
180
|
-
"confirmLabel": "Delete",
|
|
181
|
-
"cancelLabel": "Cancel"
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
"bulkActions": [
|
|
186
|
-
{
|
|
187
|
-
"id": "publish",
|
|
188
|
-
"label": "Publish Selected",
|
|
189
|
-
"href": "/admin/books/bulk/publish",
|
|
190
|
-
"method": "post"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"id": "archive",
|
|
194
|
-
"label": "Archive Selected",
|
|
195
|
-
"href": "/admin/books/bulk/archive",
|
|
196
|
-
"method": "post",
|
|
197
|
-
"intent": "danger",
|
|
198
|
-
"requiresConfirmation": true,
|
|
199
|
-
"confirmationMessage": "Archive all selected books? They will no longer be visible to students."
|
|
200
|
-
}
|
|
201
|
-
],
|
|
202
|
-
"searchPlaceholder": "Search books by title or author..."
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "Example: GET /api/dashboard -- Returns the admin dashboard for Moodle. Demonstrates a dashboard layout with metric_card blocks in the metrics region and a dense_table in the content region.",
|
|
3
|
-
"host": "moodle",
|
|
4
|
-
"method": "GET",
|
|
5
|
-
"contract": {
|
|
6
|
-
"version": "1",
|
|
7
|
-
"shell": "admin",
|
|
8
|
-
"page": {
|
|
9
|
-
"key": "admin-dashboard",
|
|
10
|
-
"title": "Dashboard",
|
|
11
|
-
"favoritable": false,
|
|
12
|
-
"breadcrumbs": [
|
|
13
|
-
{ "label": "Site Administration" }
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"layout": {
|
|
17
|
-
"template": "dashboard",
|
|
18
|
-
"regions": {
|
|
19
|
-
"metrics": [
|
|
20
|
-
{
|
|
21
|
-
"type": "metric_card",
|
|
22
|
-
"key": "metric-active-users",
|
|
23
|
-
"data": {
|
|
24
|
-
"value": 3842,
|
|
25
|
-
"delta": "+12% this month",
|
|
26
|
-
"deltaDirection": "positive",
|
|
27
|
-
"label": "Active Users",
|
|
28
|
-
"icon": "users",
|
|
29
|
-
"href": "/admin/users"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"type": "metric_card",
|
|
34
|
-
"key": "metric-courses",
|
|
35
|
-
"data": {
|
|
36
|
-
"value": 127,
|
|
37
|
-
"delta": "+5 new",
|
|
38
|
-
"deltaDirection": "positive",
|
|
39
|
-
"label": "Active Courses",
|
|
40
|
-
"icon": "graduation-cap",
|
|
41
|
-
"href": "/admin/courses"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"type": "metric_card",
|
|
46
|
-
"key": "metric-completions",
|
|
47
|
-
"data": {
|
|
48
|
-
"value": 1893,
|
|
49
|
-
"delta": "+8% vs last month",
|
|
50
|
-
"deltaDirection": "positive",
|
|
51
|
-
"label": "Course Completions",
|
|
52
|
-
"icon": "chart",
|
|
53
|
-
"href": "/admin/reports/completions"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "metric_card",
|
|
58
|
-
"key": "metric-storage",
|
|
59
|
-
"data": {
|
|
60
|
-
"value": "42.7 GB",
|
|
61
|
-
"delta": "68% of quota",
|
|
62
|
-
"deltaDirection": "neutral",
|
|
63
|
-
"label": "Storage Used",
|
|
64
|
-
"icon": "hard-drive"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"type": "metric_card",
|
|
69
|
-
"key": "metric-enrollments",
|
|
70
|
-
"data": {
|
|
71
|
-
"value": 562,
|
|
72
|
-
"delta": "+89 this week",
|
|
73
|
-
"deltaDirection": "positive",
|
|
74
|
-
"label": "New Enrollments",
|
|
75
|
-
"icon": "user-plus",
|
|
76
|
-
"href": "/admin/enrolments"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"type": "metric_card",
|
|
81
|
-
"key": "metric-compliance",
|
|
82
|
-
"data": {
|
|
83
|
-
"value": "91.3%",
|
|
84
|
-
"delta": "-0.5%",
|
|
85
|
-
"deltaDirection": "negative",
|
|
86
|
-
"label": "Compliance Rate",
|
|
87
|
-
"icon": "shield",
|
|
88
|
-
"href": "/admin/compliance"
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"type": "metric_card",
|
|
93
|
-
"key": "metric-pending-tasks",
|
|
94
|
-
"data": {
|
|
95
|
-
"value": 18,
|
|
96
|
-
"delta": "3 overdue",
|
|
97
|
-
"deltaDirection": "negative",
|
|
98
|
-
"label": "Pending Tasks",
|
|
99
|
-
"icon": "clock",
|
|
100
|
-
"href": "/admin/tasks"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"type": "metric_card",
|
|
105
|
-
"key": "metric-certificates",
|
|
106
|
-
"data": {
|
|
107
|
-
"value": 234,
|
|
108
|
-
"delta": "+42 issued this month",
|
|
109
|
-
"deltaDirection": "positive",
|
|
110
|
-
"label": "Certificates Issued",
|
|
111
|
-
"icon": "file-export",
|
|
112
|
-
"href": "/admin/certificates"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
"content": [
|
|
117
|
-
{
|
|
118
|
-
"type": "dense_table",
|
|
119
|
-
"key": "recent-activity-table",
|
|
120
|
-
"title": "Recent Activity",
|
|
121
|
-
"data": {
|
|
122
|
-
"columns": [
|
|
123
|
-
{ "key": "user", "label": "User", "variant": "text", "searchable": true },
|
|
124
|
-
{ "key": "action", "label": "Action", "variant": "text" },
|
|
125
|
-
{ "key": "target", "label": "Target", "variant": "text" },
|
|
126
|
-
{ "key": "status", "label": "Status", "variant": "status" },
|
|
127
|
-
{ "key": "timestamp", "label": "When", "variant": "timestamp", "sortable": true }
|
|
128
|
-
],
|
|
129
|
-
"rows": [
|
|
130
|
-
{
|
|
131
|
-
"id": "act-1",
|
|
132
|
-
"user": "Maria Santos",
|
|
133
|
-
"action": "Completed course",
|
|
134
|
-
"target": "NR-10 Safety Compliance",
|
|
135
|
-
"status": "Success",
|
|
136
|
-
"timestamp": 1746057600
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"id": "act-2",
|
|
140
|
-
"user": "System (Cron)",
|
|
141
|
-
"action": "Backup completed",
|
|
142
|
-
"target": "Full site backup",
|
|
143
|
-
"status": "Success",
|
|
144
|
-
"timestamp": 1746054000
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"id": "act-3",
|
|
148
|
-
"user": "Pedro Oliveira",
|
|
149
|
-
"action": "Enrolled in course",
|
|
150
|
-
"target": "Leadership Fundamentals",
|
|
151
|
-
"status": "Pending",
|
|
152
|
-
"timestamp": 1746050400
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"id": "act-4",
|
|
156
|
-
"user": "SAP Connector",
|
|
157
|
-
"action": "User sync failed",
|
|
158
|
-
"target": "SAP SuccessFactors",
|
|
159
|
-
"status": "Error",
|
|
160
|
-
"timestamp": 1746046800
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"id": "act-5",
|
|
164
|
-
"user": "Admin",
|
|
165
|
-
"action": "Published course",
|
|
166
|
-
"target": "Data Privacy & LGPD Guide",
|
|
167
|
-
"status": "Success",
|
|
168
|
-
"timestamp": 1746043200
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"pagination": {
|
|
172
|
-
"page": 1,
|
|
173
|
-
"perPage": 10,
|
|
174
|
-
"total": 48,
|
|
175
|
-
"lastPage": 5
|
|
176
|
-
},
|
|
177
|
-
"sort": {
|
|
178
|
-
"column": "timestamp",
|
|
179
|
-
"direction": "desc"
|
|
180
|
-
},
|
|
181
|
-
"filters": {
|
|
182
|
-
"available": [
|
|
183
|
-
{
|
|
184
|
-
"key": "status",
|
|
185
|
-
"label": "Status",
|
|
186
|
-
"type": "select",
|
|
187
|
-
"options": [
|
|
188
|
-
{ "value": "Success", "label": "Success" },
|
|
189
|
-
{ "value": "Pending", "label": "Pending" },
|
|
190
|
-
{ "value": "Error", "label": "Error" }
|
|
191
|
-
]
|
|
192
|
-
}
|
|
193
|
-
],
|
|
194
|
-
"applied": {}
|
|
195
|
-
},
|
|
196
|
-
"searchPlaceholder": "Search activity..."
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|