@middag-io/react 0.32.0 → 0.34.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/README.md +2 -2
- package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
- package/dist-lib/base/shell/AuthShell.js +39 -0
- package/dist-lib/base/shell/BasicShell.js +207 -0
- package/dist-lib/base/shell/ImmersiveShell.js +55 -0
- package/dist-lib/base/shell/partials/InspectorContext.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/InspectorContext.js +60 -0
- package/dist-lib/base/shell/partials/InspectorPanel.js +22 -0
- package/dist-lib/base/shell/partials/NavErrorBoundary.js +66 -0
- package/dist-lib/base/shell/partials/OverlayScreen.js +36 -0
- package/dist-lib/base/shell/partials/PageActionButton.js +4 -0
- package/dist-lib/base/theme/appearance.js +39 -0
- package/dist-lib/base/theme/host-layout-detector.js +39 -0
- package/dist-lib/base/theme/host-theme-detector.js +131 -0
- package/dist-lib/base/theme/sidebar-safelist.txt +20 -0
- package/dist-lib/base/theme/theme-bridge.css +164 -0
- package/dist-lib/base/theme/theme-context.js +103 -0
- package/dist-lib/base/theme/themes/classic.css +174 -0
- package/dist-lib/base/theme/tokens.css +290 -0
- package/dist-lib/base/theme/useHostTheme.js +34 -0
- package/dist-lib/base/utils/clipboard.js +16 -0
- package/dist-lib/base/utils/conditions.js +13 -0
- package/dist-lib/base/utils/icon-registry.js +16 -0
- package/dist-lib/base/utils/icons.js +11 -0
- package/dist-lib/base/utils/interpolate.js +6 -0
- package/dist-lib/base/utils/register-default-icons.js +9 -0
- package/dist-lib/base/utils/storage.js +30 -0
- package/dist-lib/base/utils/time.js +59 -0
- package/dist-lib/chunks/subpath-BD_PKGUX.js +146 -0
- package/dist-lib/chunks/subpath-DLFO_UGQ.js +604 -0
- package/dist-lib/components/reui/accordion.js +43 -0
- package/dist-lib/components/reui/alert-dialog.js +101 -0
- package/dist-lib/components/reui/alert.js +55 -0
- package/dist-lib/components/reui/aspect-ratio.js +11 -0
- package/dist-lib/components/reui/autocomplete.js +170 -0
- package/dist-lib/components/reui/avatar.js +51 -0
- package/dist-lib/components/reui/badge.js +64 -0
- package/dist-lib/components/reui/breadcrumb.js +69 -0
- package/dist-lib/components/reui/button-group.js +38 -0
- package/dist-lib/components/reui/button.js +47 -0
- package/dist-lib/components/reui/calendar.js +89 -0
- package/dist-lib/components/reui/card.js +55 -0
- package/dist-lib/components/reui/carousel.js +110 -0
- package/dist-lib/components/reui/chart.js +130 -0
- package/dist-lib/components/reui/checkbox.js +20 -0
- package/dist-lib/components/reui/collapsible.js +23 -0
- package/dist-lib/components/reui/combobox.js +166 -0
- package/dist-lib/components/reui/command.js +85 -0
- package/dist-lib/components/reui/context-menu.js +121 -0
- package/dist-lib/components/reui/data-grid/data-grid-column-filter.js +108 -0
- package/dist-lib/components/reui/data-grid/data-grid-column-header.js +217 -0
- package/dist-lib/components/reui/data-grid/data-grid-column-visibility.js +25 -0
- package/dist-lib/components/reui/data-grid/data-grid-pagination.js +132 -0
- package/dist-lib/components/reui/data-grid/data-grid-scroll-area.js +183 -0
- package/dist-lib/components/reui/data-grid/data-grid-table-dnd-rows.js +125 -0
- package/dist-lib/components/reui/data-grid/data-grid-table-dnd.js +130 -0
- package/dist-lib/components/reui/data-grid/data-grid-table-virtual.js +156 -0
- package/dist-lib/components/reui/data-grid/data-grid-table.js +546 -0
- package/dist-lib/components/reui/data-grid/data-grid.js +113 -0
- package/dist-lib/components/reui/data-grid-pagination.js +131 -0
- package/dist-lib/components/reui/date-selector.js +642 -0
- package/dist-lib/components/reui/dialog.js +94 -0
- package/dist-lib/components/reui/drawer.js +77 -0
- package/dist-lib/components/reui/dropdown-menu.js +123 -0
- package/dist-lib/components/reui/empty.js +59 -0
- package/dist-lib/components/reui/field.js +115 -0
- package/dist-lib/components/reui/filters.js +873 -0
- package/dist-lib/components/reui/frame.js +97 -0
- package/dist-lib/components/reui/hover-card.js +31 -0
- package/dist-lib/components/reui/icon-placeholder.js +14 -0
- package/dist-lib/components/reui/index.js +18 -0
- package/dist-lib/components/reui/input-group.js +78 -0
- package/dist-lib/components/reui/input-otp.js +44 -0
- package/dist-lib/components/reui/input.js +14 -0
- package/dist-lib/components/reui/item.js +116 -0
- package/dist-lib/components/reui/kanban.js +316 -0
- package/dist-lib/components/reui/kbd.js +19 -0
- package/dist-lib/components/reui/label.js +14 -0
- package/dist-lib/components/reui/menubar.js +132 -0
- package/dist-lib/components/reui/native-select.js +37 -0
- package/dist-lib/components/reui/navigation-menu.js +80 -0
- package/dist-lib/components/reui/number-field.js +126 -0
- package/dist-lib/components/reui/pagination.js +78 -0
- package/dist-lib/components/reui/phone-input.js +124 -0
- package/dist-lib/components/reui/popover.js +55 -0
- package/dist-lib/components/reui/progress.js +20 -0
- package/dist-lib/components/reui/radio-group.js +27 -0
- package/dist-lib/components/reui/rating.js +81 -0
- package/dist-lib/components/reui/resizable.js +31 -0
- package/dist-lib/components/reui/scroll-area.js +36 -0
- package/dist-lib/components/reui/scrollspy.js +104 -0
- package/dist-lib/components/reui/select.js +97 -0
- package/dist-lib/components/reui/separator.js +17 -0
- package/dist-lib/components/reui/sheet.js +81 -0
- package/dist-lib/components/reui/sidebar.js +350 -0
- package/dist-lib/components/reui/skeleton.js +12 -0
- package/dist-lib/components/reui/slider.js +35 -0
- package/dist-lib/components/reui/sonner.js +28 -0
- package/dist-lib/components/reui/sortable.js +172 -0
- package/dist-lib/components/reui/spinner.js +14 -0
- package/dist-lib/components/reui/stepper.js +193 -0
- package/dist-lib/components/reui/svgs/claudeAiIcon.js +13 -0
- package/dist-lib/components/reui/svgs/gemini.js +257 -0
- package/dist-lib/components/reui/svgs/openai.js +10 -0
- package/dist-lib/components/reui/svgs/openaiDark.js +13 -0
- package/dist-lib/components/reui/switch.js +19 -0
- package/dist-lib/components/reui/table.js +66 -0
- package/dist-lib/components/reui/tabs.js +47 -0
- package/dist-lib/components/reui/textarea.js +13 -0
- package/dist-lib/components/reui/timeline.js +84 -0
- package/dist-lib/components/reui/toggle-group.js +48 -0
- package/dist-lib/components/reui/toggle.js +36 -0
- package/dist-lib/components/reui/tooltip.js +35 -0
- package/dist-lib/components/reui/tree.js +102 -0
- 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/i18n/I18nProvider.js +23 -0
- package/dist-lib/i18n/host-resolver.js +10 -0
- package/dist-lib/i18n/instance.js +2 -0
- package/dist-lib/i18n/locales/en/ui.json +266 -0
- package/dist-lib/i18n/locales/en/validators.json +13 -0
- package/dist-lib/i18n/locales/pt-BR/ui.json +266 -0
- package/dist-lib/i18n/locales/pt-BR/validators.json +13 -0
- package/dist-lib/i18n/register-strings.js +7 -0
- package/dist-lib/i18n/render-label.js +13 -0
- package/dist-lib/i18n/resolve-field-error.js +10 -0
- package/dist-lib/i18n/useHostString.js +31 -0
- package/dist-lib/i18n/useTranslation.js +48 -0
- package/dist-lib/lib/actions/resolve-action-target.js +48 -0
- package/dist-lib/lib/hooks/use-copy-to-clipboard.js +18 -0
- package/dist-lib/lib/hooks/use-file-upload.js +171 -0
- package/dist-lib/lib/hooks/use-mobile.js +18 -0
- package/dist-lib/lib/portal-container.js +7 -0
- package/dist-lib/lib/utils.js +8 -0
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +26 -5
- package/package.json +39 -7
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middag-io/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MIDDAG shared React UI library for Moodle, WordPress and other Inertia hosts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,15 +24,47 @@
|
|
|
24
24
|
},
|
|
25
25
|
"./style.css": "./dist-lib/middag-react.css",
|
|
26
26
|
"./theme.css": "./src/theme.css",
|
|
27
|
-
"./reui/*":
|
|
28
|
-
|
|
27
|
+
"./reui/*": {
|
|
28
|
+
"types": "./dist-lib/components/reui/*.d.ts",
|
|
29
|
+
"import": "./dist-lib/components/reui/*.js",
|
|
30
|
+
"default": "./dist-lib/components/reui/*.js"
|
|
31
|
+
},
|
|
32
|
+
"./reui/*.tsx": {
|
|
33
|
+
"types": "./dist-lib/components/reui/*.d.ts",
|
|
34
|
+
"import": "./dist-lib/components/reui/*.js",
|
|
35
|
+
"default": "./dist-lib/components/reui/*.js"
|
|
36
|
+
},
|
|
37
|
+
"./i18n/*": {
|
|
38
|
+
"types": "./dist-lib/i18n/*.d.ts",
|
|
39
|
+
"import": "./dist-lib/i18n/*.js",
|
|
40
|
+
"default": "./dist-lib/i18n/*.js"
|
|
41
|
+
},
|
|
42
|
+
"./i18n/locales/*.json": "./dist-lib/i18n/locales/*.json",
|
|
29
43
|
"./blocks/*": "./src/base/blocks/*",
|
|
30
44
|
"./form/*": "./src/base/form/*",
|
|
31
45
|
"./partials/*": "./src/base/partials/*",
|
|
32
|
-
"./lib/*":
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
46
|
+
"./lib/*": {
|
|
47
|
+
"types": "./dist-lib/lib/*.d.ts",
|
|
48
|
+
"import": "./dist-lib/lib/*.js",
|
|
49
|
+
"default": "./dist-lib/lib/*.js"
|
|
50
|
+
},
|
|
51
|
+
"./shell/*": {
|
|
52
|
+
"types": "./dist-lib/base/shell/*.d.ts",
|
|
53
|
+
"import": "./dist-lib/base/shell/*.js",
|
|
54
|
+
"default": "./dist-lib/base/shell/*.js"
|
|
55
|
+
},
|
|
56
|
+
"./utils/*": {
|
|
57
|
+
"types": "./dist-lib/base/utils/*.d.ts",
|
|
58
|
+
"import": "./dist-lib/base/utils/*.js",
|
|
59
|
+
"default": "./dist-lib/base/utils/*.js"
|
|
60
|
+
},
|
|
61
|
+
"./theme/*": {
|
|
62
|
+
"types": "./dist-lib/base/theme/*.d.ts",
|
|
63
|
+
"import": "./dist-lib/base/theme/*.js",
|
|
64
|
+
"default": "./dist-lib/base/theme/*.js"
|
|
65
|
+
},
|
|
66
|
+
"./theme/*.css": "./dist-lib/base/theme/*.css",
|
|
67
|
+
"./theme/*.txt": "./dist-lib/base/theme/*.txt",
|
|
36
68
|
"./themes/classic.css": "./src/base/theme/themes/classic.css"
|
|
37
69
|
},
|
|
38
70
|
"files": [
|
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
|
-
}
|