@oktis-works/admin 0.23.2 → 0.24.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.
Files changed (90) hide show
  1. package/dist/client/_astro/{ActivityWidget.Dzoi-bq3.js → ActivityWidget.ZVWCvrxL.js} +1 -1
  2. package/dist/client/_astro/{AdminBar.eT1ch_B6.js → AdminBar.Cp3-f-Na.js} +1 -1
  3. package/dist/client/_astro/{ApiKeysManager.kbTE1CPk.js → ApiKeysManager.CpgNjjZm.js} +1 -1
  4. package/dist/client/_astro/{AtGlanceWidget.w23IIv06.js → AtGlanceWidget.B4v1yrwI.js} +1 -1
  5. package/dist/client/_astro/BaseLayout.Ceb72bti.css +1 -0
  6. package/dist/client/_astro/{CommentsManager.BN7i1RHa.js → CommentsManager.Da4veAPJ.js} +1 -1
  7. package/dist/client/_astro/ContentEditor.CSin5EHw.js +1 -0
  8. package/dist/client/_astro/ContentTypeWorkspace.CjOEvGzy.js +1 -0
  9. package/dist/client/_astro/{DashboardHome.DXzu_IXZ.js → DashboardHome.C40YVSiB.js} +1 -1
  10. package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.DmNSzErX.js → DashboardLayout.astro_astro_type_script_index_0_lang.DEsBqJww.js} +1 -1
  11. package/dist/client/_astro/{FieldGroupEditor.DsqphEgt.js → FieldGroupEditor.9WZ-czWM.js} +3 -3
  12. package/dist/client/_astro/{FieldGroupList.pW2Um9om.js → FieldGroupList.BG9Wq5_L.js} +1 -1
  13. package/dist/client/_astro/FieldRenderer.DrX12H8L.js +3 -0
  14. package/dist/client/_astro/{Footer.5Lcn2VXz.js → Footer.D7L9WAh7.js} +1 -1
  15. package/dist/client/_astro/{GeneralSettings.B-H8Rzy7.js → GeneralSettings.udEZdv-v.js} +1 -1
  16. package/dist/client/_astro/{LogsManager.Crd8q2te.js → LogsManager.B5TC9xQ_.js} +1 -1
  17. package/dist/client/_astro/{MediaLibrary.Cv6Ry3u9.js → MediaLibrary.D2v__yUO.js} +1 -1
  18. package/dist/client/_astro/{MenuManager.D25ika09.js → MenuManager.glKVLQiP.js} +1 -1
  19. package/dist/client/_astro/{Modal.572hmVvb.js → Modal.DijYhpj_.js} +1 -1
  20. package/dist/client/_astro/PluginManager.BGdxyG-e.js +112 -0
  21. package/dist/client/_astro/PluginPageHost.CEDOBtUT.js +1 -0
  22. package/dist/client/_astro/{PostTypesManager.C3RbmOZT.js → PostTypesManager.DTbeJSyc.js} +1 -1
  23. package/dist/client/_astro/{QuickDraftWidget.BtSGzhKq.js → QuickDraftWidget.wRkEcf8k.js} +1 -1
  24. package/dist/client/_astro/{ReadingSettings.ZFDaeo5U.js → ReadingSettings.CD8voAVk.js} +1 -1
  25. package/dist/client/_astro/{ResourceHubs.Cx9fbCv1.js → ResourceHubs.Cpu4lcaN.js} +1 -1
  26. package/dist/client/_astro/{TaxonomiesManager.BLsvmjaL.js → TaxonomiesManager.gPoogAar.js} +1 -1
  27. package/dist/client/_astro/TaxonomyTermsManager.B3TphEaE.js +1 -0
  28. package/dist/client/_astro/{ThemeCustomizer.BrDHVXLk.js → ThemeCustomizer.BKKTlRC5.js} +1 -1
  29. package/dist/client/_astro/{ThemeManager.BpS3m7Qc.js → ThemeManager.KDwxbVIq.js} +1 -1
  30. package/dist/client/_astro/{UserCreateForm.BYwgAqKk.js → UserCreateForm.IAFj7Afs.js} +1 -1
  31. package/dist/client/_astro/{UsersManager.DODMr48D.js → UsersManager.BfVYX6D5.js} +1 -1
  32. package/dist/client/_astro/{WebhooksManager.DmWIW272.js → WebhooksManager.Bp3Zp4vO.js} +1 -1
  33. package/dist/client/_astro/{api.53l1ob4Z.js → api.C1uUawnK.js} +1 -1
  34. package/dist/client/_astro/extensions.XVI9Kud6.js +1 -0
  35. package/dist/client/_astro/i18n.TTF80CEw.js +1 -0
  36. package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.BLf2Iun3.js → login.astro_astro_type_script_index_0_lang.C_Lrwk3I.js} +1 -1
  37. package/dist/client/_astro/{pt-BR.zZcF2v3X.js → pt-BR.C041vzOT.js} +1 -1
  38. package/dist/client/_astro/slots.CSARb9TW.js +1 -0
  39. package/dist/client/_astro/{src.CYKGYEyR.js → src.DoHIZU0i.js} +1 -1
  40. package/dist/client/_astro/store.BUgA6DSh.js +1 -0
  41. package/dist/server/chunks/{404_BAOD9OCa.mjs → 404_CouGE9Mj.mjs} +1 -1
  42. package/dist/server/chunks/{BaseLayout_BE8O-LS4.mjs → BaseLayout_DRJ6-Y9z.mjs} +5 -5
  43. package/dist/server/chunks/ContentEditor_DIjqVt5v.mjs +324 -0
  44. package/dist/server/chunks/{DashboardLayout_D6zphdT0.mjs → DashboardLayout_Bz8ZBDme.mjs} +102 -17
  45. package/dist/server/chunks/{FieldRenderer_D4dcZjgt.mjs → FieldRenderer_RlFoxao4.mjs} +574 -66
  46. package/dist/server/chunks/{MediaLibrary_DGmYSSZH.mjs → MediaLibrary_Dh6dBT17.mjs} +2 -2
  47. package/dist/server/chunks/{Modal_BmuvdwoB.mjs → Modal_CpojFoyP.mjs} +1 -1
  48. package/dist/server/chunks/_.._C1o1V5X_.mjs +76 -0
  49. package/dist/server/chunks/{_id__XEnJ5nS2.mjs → _id__BKZ7vD0U.mjs} +4 -4
  50. package/dist/server/chunks/{access_B5npG273.mjs → access_COyC7DxO.mjs} +3 -3
  51. package/dist/server/chunks/{api-keys_Bs6zIXYm.mjs → api-keys_D2TJYRAW.mjs} +3 -3
  52. package/dist/server/chunks/{comments_zJrnFEjl.mjs → comments_CySyBx_l.mjs} +2 -2
  53. package/dist/server/chunks/{custom-fields_C5EBkR02.mjs → custom-fields_Clivf3ew.mjs} +2 -2
  54. package/dist/server/chunks/{customize_CKqMX14y.mjs → customize_XWQyyFCl.mjs} +3 -3
  55. package/dist/server/chunks/{edit_QKBYgFkJ.mjs → edit_CYlskXjG.mjs} +2 -2
  56. package/dist/server/chunks/{i18n_C-sgJSi1.mjs → i18n_Bp0_xO2v.mjs} +27 -8
  57. package/dist/server/chunks/{index_CDwohy44.mjs → index_BufAjUfw.mjs} +2 -2
  58. package/dist/server/chunks/{index_DenKi4a3.mjs → index_CJOIvqZF.mjs} +2 -2
  59. package/dist/server/chunks/{index_BM_-WBYo.mjs → index_DBmNvPut.mjs} +2 -2
  60. package/dist/server/chunks/{index_BletZ9T6.mjs → index_Z5USLJCo.mjs} +3 -3
  61. package/dist/server/chunks/{index_Btvmuytk.mjs → index_pSSu8X0A.mjs} +2 -2
  62. package/dist/server/chunks/{login_CtIWLqC2.mjs → login_BbReGd7a.mjs} +1 -1
  63. package/dist/server/chunks/{logs_DlTldv5b.mjs → logs_D_xRW_Dm.mjs} +2 -2
  64. package/dist/server/chunks/{menus_z2d_K44p.mjs → menus_t0aZuQCI.mjs} +2 -2
  65. package/dist/server/chunks/{new_CYvLScge.mjs → new_CkSJ-S3h.mjs} +2 -2
  66. package/dist/server/chunks/{new_Cxp8Mdw4.mjs → new_DFA50r2h.mjs} +2 -2
  67. package/dist/server/chunks/{plugins_4g6EEkCb.mjs → plugins_rehiATzz.mjs} +13 -5
  68. package/dist/server/chunks/{post-types_7cW4BLBV.mjs → post-types_Dx4bmkB7.mjs} +2 -2
  69. package/dist/server/chunks/{pt-BR_AVNE88MZ.mjs → pt-BR_B8bZo1Id.mjs} +7 -1
  70. package/dist/server/chunks/{reading_2DqfBhj_.mjs → reading_DVMggOZa.mjs} +2 -2
  71. package/dist/server/chunks/{taxonomies_D7mMKpNX.mjs → taxonomies_BKVuy-kF.mjs} +2 -2
  72. package/dist/server/chunks/{taxonomy_64ggDTF9.mjs → taxonomy_CsnDSlD1.mjs} +31 -18
  73. package/dist/server/chunks/{themes_Dscq-5uk.mjs → themes_c2vDYHy-.mjs} +2 -2
  74. package/dist/server/chunks/{upload_B-DdqpaQ.mjs → upload_DYFOxmHE.mjs} +2 -2
  75. package/dist/server/chunks/{webhooks_D05B4_Rs.mjs → webhooks_CjBMAJt2.mjs} +2 -2
  76. package/dist/server/entry.mjs +43 -43
  77. package/dist/server/virtual_astro_middleware.mjs +1 -1
  78. package/package.json +5 -5
  79. package/dist/client/_astro/BaseLayout.Rpr86VwM.css +0 -1
  80. package/dist/client/_astro/ContentEditor.BlsJ2bwD.js +0 -1
  81. package/dist/client/_astro/ContentTypeWorkspace.BPVuQgzA.js +0 -1
  82. package/dist/client/_astro/FieldRenderer.AYtSBfHZ.js +0 -3
  83. package/dist/client/_astro/PluginManager.DLfgQFPF.js +0 -112
  84. package/dist/client/_astro/TaxonomyTermsManager.C_xEh8Ab.js +0 -1
  85. package/dist/client/_astro/extensions.DzQcQsO9.js +0 -1
  86. package/dist/client/_astro/i18n.A82w5XQu.js +0 -1
  87. package/dist/client/_astro/preload-helper.oCYlU9a4.js +0 -1
  88. package/dist/client/_astro/store.DLCqLxBR.js +0 -1
  89. package/dist/server/chunks/ContentEditor_DPy3I4HM.mjs +0 -690
  90. package/dist/server/chunks/_slug__BkXrukGe.mjs +0 -34
@@ -1,5 +1,5 @@
1
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
2
- import { c as Button, d as Input, f as Modal, h as Show2, m as Select, p as Pagination, u as For2, v as createSignal, y as onMount } from "./DashboardLayout_D6zphdT0.mjs";
1
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
2
+ import { b as onMount, d as For2, f as Input, g as Show2, h as Select, l as Button, m as Pagination, p as Modal, y as createSignal } from "./DashboardLayout_Bz8ZBDme.mjs";
3
3
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
4
4
  //#region src/components/media/MediaLibrary.tsx
5
5
  var _tmpl$ = [
@@ -1,4 +1,4 @@
1
- import { n as useTranslation } from "./i18n_C-sgJSi1.mjs";
1
+ import { n as useTranslation } from "./i18n_Bp0_xO2v.mjs";
2
2
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
3
3
  import { Show, createEffect, onCleanup } from "solid-js";
4
4
  //#region src/components/ui/Modal.tsx
@@ -0,0 +1,76 @@
1
+ import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
+ import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, u as renderTemplate } from "./server_B5N27szj.mjs";
3
+ import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
+ import { o as PluginComponentHost, r as loadExtensions, t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
5
+ import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
6
+ import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
7
+ import { Show, createSignal, onMount } from "solid-js";
8
+ //#region src/ext/PluginPageHost.tsx
9
+ var _tmpl$ = [
10
+ "<span",
11
+ " class=\"muted\"",
12
+ ">",
13
+ "</span>"
14
+ ];
15
+ function PluginPageHost(props) {
16
+ const [componentId, setComponentId] = createSignal(null);
17
+ const [error, setError] = createSignal(null);
18
+ onMount(async () => {
19
+ const state = await loadExtensions();
20
+ const menu = state.menuPages.find((page) => page.slug === props.slug);
21
+ const submenu = state.submenuPages.find((page) => page.slug === props.slug);
22
+ const component = menu?.componentId ?? submenu?.componentId;
23
+ if (component) setComponentId(component);
24
+ else setError(`No component is registered for plugin page "${props.slug}"`);
25
+ });
26
+ return createComponent(Show, {
27
+ get when() {
28
+ return componentId();
29
+ },
30
+ get fallback() {
31
+ return ssr(_tmpl$, ssrHydrationKey(), ssrAttribute("data-plugin-component-error", escape(props.slug, true), false), escape(error() ?? "Loading plugin page…"));
32
+ },
33
+ get children() {
34
+ return createComponent(PluginComponentHost, { get componentId() {
35
+ return componentId();
36
+ } });
37
+ }
38
+ });
39
+ }
40
+ //#endregion
41
+ //#region src/pages/plugins/[...slug].astro
42
+ var ____slug__exports = /* @__PURE__ */ __exportAll({
43
+ default: () => $$Component,
44
+ file: () => $$file,
45
+ url: () => $$url
46
+ });
47
+ createAstro("https://astro.build");
48
+ var $$Component = createComponent$1(($$result, $$props, $$slots) => {
49
+ const Astro = $$result.createAstro($$props, $$slots);
50
+ Astro.self = $$Component;
51
+ const slug = String(Astro.params.slug ?? "");
52
+ const pluginSlug = slug.split("/")[0] ?? "";
53
+ const pageTitle = slug.split("/").at(-1) || "Plugin";
54
+ return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, {
55
+ "title": pageTitle,
56
+ "data-astro-cid-humdomfa": true
57
+ }, { "default": ($$result) => renderTemplate`${renderComponent($$result, "PageHeader", PageHeader, {
58
+ "title": pageTitle,
59
+ "description": `Plugin extension page for ${pluginSlug}`,
60
+ "data-astro-cid-humdomfa": true
61
+ })}${maybeRenderHead($$result)}<div class="plugin-page"${addAttribute(pluginSlug, "data-plugin")}${addAttribute(slug, "data-plugin-page")} data-astro-cid-humdomfa><div class="card plugin-page__container" data-astro-cid-humdomfa><div class="plugin-page__mount"${addAttribute(pluginSlug, "data-plugin")} data-astro-cid-humdomfa>${renderComponent($$result, "PluginPageHost", PluginPageHost, {
62
+ "client:load": true,
63
+ "slug": slug,
64
+ "data-astro-cid-humdomfa": true,
65
+ "client:component-hydration": "load",
66
+ "client:component-path": "/home/runner/work/cms/cms/apps/admin/src/ext/PluginPageHost.tsx",
67
+ "client:component-export": "PluginPageHost"
68
+ })}</div></div></div>` })}`;
69
+ }, "/home/runner/work/cms/cms/apps/admin/src/pages/plugins/[...slug].astro", void 0);
70
+ var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/plugins/[...slug].astro";
71
+ var $$url = "/plugins/[...slug]";
72
+ //#endregion
73
+ //#region \0virtual:astro:page:src/pages/plugins/[...slug]@_@astro
74
+ var page = () => ____slug__exports;
75
+ //#endregion
76
+ export { page };
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { s as loadPluginComponent, t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { t as FloatingPanel } from "./FloatingPanel_DI2CdUZK.mjs";
8
8
  import { t as FbIcon } from "./FbIcon_D0f6QiFJ.mjs";
@@ -6099,8 +6099,8 @@ function PluginFieldConfig(props) {
6099
6099
  const [loading, setLoading] = createSignal(true);
6100
6100
  onMount(async () => {
6101
6101
  try {
6102
- const module = await import(props.adminComponentPath);
6103
- const Comp = module.default || module.PluginFieldConfig || Object.values(module)[0];
6102
+ const module = await loadPluginComponent(props.adminComponentPath);
6103
+ const Comp = module["default"] || module["PluginFieldConfig"];
6104
6104
  if (Comp) setComponent(Comp);
6105
6105
  else setError("Componente de configuração não encontrado no módulo");
6106
6106
  } catch (_e) {
@@ -1,10 +1,10 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
- import { t as Modal } from "./Modal_BmuvdwoB.mjs";
7
+ import { t as Modal } from "./Modal_CpojFoyP.mjs";
8
8
  import { t as FloatingPanel } from "./FloatingPanel_DI2CdUZK.mjs";
9
9
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
10
10
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
@@ -1,10 +1,10 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
- import { t as Modal } from "./Modal_BmuvdwoB.mjs";
7
+ import { t as Modal } from "./Modal_CpojFoyP.mjs";
8
8
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
9
9
  import { For, Show, createSignal, onMount } from "solid-js";
10
10
  //#region src/components/apps/settings/ApiKeysManager.tsx
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
8
8
  import { For, Show, createSignal, onMount } from "solid-js";
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as FbIcon } from "./FbIcon_D0f6QiFJ.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
8
8
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
@@ -1,9 +1,9 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
6
- import { n as isFieldVisible } from "./FieldRenderer_D4dcZjgt.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
+ import { n as isFieldVisible } from "./FieldRenderer_RlFoxao4.mjs";
7
7
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
8
8
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
9
9
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
@@ -1,9 +1,9 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
5
5
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
6
- import { t as ContentEditor } from "./ContentEditor_DPy3I4HM.mjs";
6
+ import { t as ContentEditor } from "./ContentEditor_DIjqVt5v.mjs";
7
7
  //#region src/pages/content/[type]/edit.astro
8
8
  var edit_exports = /* @__PURE__ */ __exportAll({
9
9
  default: () => $$Edit,
@@ -90,7 +90,7 @@ async function loadLocale(locale) {
90
90
  "./locales/it.json": () => import("./it_CgOxhoxy.mjs"),
91
91
  "./locales/ja.json": () => import("./ja_0swn1wUm.mjs"),
92
92
  "./locales/pl.json": () => import("./pl_eLBKfEwP.mjs"),
93
- "./locales/pt-BR.json": () => import("./pt-BR_AVNE88MZ.mjs"),
93
+ "./locales/pt-BR.json": () => import("./pt-BR_B8bZo1Id.mjs"),
94
94
  "./locales/ru.json": () => import("./ru_Dt3fMzac.mjs"),
95
95
  "./locales/sw.json": () => import("./sw_oPyQwKSK.mjs"),
96
96
  "./locales/tr.json": () => import("./tr_DG1ipiJ0.mjs"),
@@ -605,12 +605,10 @@ var ApiClient = class {
605
605
  await this.request("DELETE", `/api/v1/menus/${id}`);
606
606
  }
607
607
  async getFieldGroups(context) {
608
- if (context?.type) {
609
- const qs = new URLSearchParams({ type: context.type });
610
- for (const [key, value] of Object.entries(context)) if (key !== "type" && value) qs.set(key, value);
611
- return this.request("GET", `/api/v1/field-groups?${qs.toString()}`);
612
- }
613
- return this.request("GET", "/api/v1/field-groups");
608
+ if (!context || Object.values(context).every((value) => !value)) return this.request("GET", "/api/v1/field-groups");
609
+ const qs = new URLSearchParams();
610
+ for (const [key, value] of Object.entries(context)) if (value) qs.set(key, value);
611
+ return this.request("GET", `/api/v1/field-groups?${qs.toString()}`);
614
612
  }
615
613
  async getFieldGroup(id) {
616
614
  return this.request("GET", `/api/v1/field-groups/${id}`);
@@ -809,6 +807,21 @@ var ApiClient = class {
809
807
  async getAdminExtensions() {
810
808
  return this.request("GET", "/api/v1/plugins/extensions");
811
809
  }
810
+ async getBlocks() {
811
+ return (await this.request("GET", "/api/v1/blocks")).blocks ?? [];
812
+ }
813
+ async getPatterns() {
814
+ return (await this.request("GET", "/api/v1/patterns")).patterns ?? [];
815
+ }
816
+ async activatePlugin(id, tenantId) {
817
+ return this.request("POST", `/api/v1/plugins/${encodeURIComponent(id)}/activate`, { tenantId });
818
+ }
819
+ async deactivatePlugin(id, tenantId) {
820
+ return this.request("POST", `/api/v1/plugins/${encodeURIComponent(id)}/deactivate`, { tenantId });
821
+ }
822
+ async uninstallPlugin(id) {
823
+ return this.request("DELETE", `/api/v1/plugins/${encodeURIComponent(id)}`);
824
+ }
812
825
  /** Estado de runtime dos plugins (WP2) — por escopo platform/tenant. */
813
826
  async getPluginsRuntime() {
814
827
  return this.request("GET", "/api/v1/plugins/runtime");
@@ -1404,7 +1417,8 @@ var plugins = {
1404
1417
  "name": "Name",
1405
1418
  "version": "Version",
1406
1419
  "status": "Status",
1407
- "enabled": "Enabled for tenant"
1420
+ "enabled": "Enabled for tenant",
1421
+ "actions": "Actions"
1408
1422
  },
1409
1423
  "status": {
1410
1424
  "active": "Active",
@@ -1421,6 +1435,11 @@ var plugins = {
1421
1435
  "version": "Version",
1422
1436
  "manifest": "Manifest (JSON)",
1423
1437
  "loadError": "Could not load plugins.",
1438
+ "actionError": "Could not update the plugin.",
1439
+ "actions": {
1440
+ "activate": "Activate",
1441
+ "deactivate": "Deactivate"
1442
+ },
1424
1443
  "installError": "Could not install the plugin.",
1425
1444
  "uninstallError": "Could not uninstall the plugin.",
1426
1445
  "empty": "No plugins installed.",
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { c as Button, d as Input, h as Show2, m as Select, p as Pagination, s as Badge, t as $$DashboardLayout, u as For2, v as createSignal, y as onMount } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { b as onMount, c as Badge, d as For2, f as Input, g as Show2, h as Select, l as Button, m as Pagination, t as $$DashboardLayout, y as createSignal } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
8
8
  //#region src/components/apps/users/UsersManager.tsx
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { _ as createMemo, c as Button, d as Input, h as Show2, l as Card, m as Select, t as $$DashboardLayout, v as createSignal, y as onMount } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { b as onMount, f as Input, g as Show2, h as Select, l as Button, t as $$DashboardLayout, u as Card, v as createMemo, y as createSignal } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { t as TimezoneSelect } from "./TimezoneSelect_D6o-2_7b.mjs";
8
8
  import { createComponent, escape, memo, ssr, ssrHydrationKey } from "solid-js/web";
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
7
7
  import { For, Show, createSignal, onMount } from "solid-js";
8
8
  //#region src/components/apps/dashboard/DashboardHome.tsx
@@ -1,10 +1,10 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { c as Button, d as Input, g as Table, i as ActionLinksSlot, l as Card, m as Select, n as emptyExtensionsState, o as PluginComponentHost, p as Pagination, r as loadExtensions, s as Badge, t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { _ as Table, c as Badge, f as Input, h as Select, i as ActionLinksSlot, l as Button, m as Pagination, n as emptyExtensionsState, o as PluginComponentHost, r as loadExtensions, t as $$DashboardLayout, u as Card } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
- import { t as ContentEditor } from "./ContentEditor_DPy3I4HM.mjs";
7
+ import { t as ContentEditor } from "./ContentEditor_DIjqVt5v.mjs";
8
8
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
9
9
  import { Show, createMemo, createSignal, onMount } from "solid-js";
10
10
  //#region src/components/content/ContentList.tsx
@@ -1,9 +1,9 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
5
5
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
6
- import { t as MediaLibrary } from "./MediaLibrary_DGmYSSZH.mjs";
6
+ import { t as MediaLibrary } from "./MediaLibrary_Dh6dBT17.mjs";
7
7
  //#region src/pages/media/index.astro
8
8
  var media_exports = /* @__PURE__ */ __exportAll({
9
9
  default: () => $$Index,
@@ -1,7 +1,7 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_BE8O-LS4.mjs";
4
+ import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_DRJ6-Y9z.mjs";
5
5
  //#region src/pages/login.astro
6
6
  var login_exports = /* @__PURE__ */ __exportAll({
7
7
  default: () => $$Login,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
8
8
  import { For, Show, createSignal, onMount } from "solid-js";
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
7
7
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
8
8
  //#region src/components/apps/menus/MenuManager.tsx
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
8
8
  import { For, Show, createSignal, onMount } from "solid-js";
@@ -1,9 +1,9 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
5
5
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
6
- import { t as ContentEditor } from "./ContentEditor_DPy3I4HM.mjs";
6
+ import { t as ContentEditor } from "./ContentEditor_DIjqVt5v.mjs";
7
7
  //#region src/pages/content/[type]/new.astro
8
8
  var new_exports = /* @__PURE__ */ __exportAll({
9
9
  default: () => $$New,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
8
8
  import { For, createSignal, onMount } from "solid-js";
@@ -27,6 +27,7 @@ var _tmpl$4 = [
27
27
  "</th><th>",
28
28
  "</th><th>",
29
29
  "</th><th>",
30
+ "</th><th>",
30
31
  "</th></tr></thead><tbody>",
31
32
  "</tbody></table><!--$-->",
32
33
  "<!--/--></div>"
@@ -39,7 +40,8 @@ var _tmpl$5 = [
39
40
  "<!--/--></td><td>",
40
41
  "</td><td><span class=\"",
41
42
  "\">",
42
- "</span></td><td>",
43
+ "</span></td><td><button type=\"button\">",
44
+ "</button></td><td>",
43
45
  "</td></tr>"
44
46
  ];
45
47
  var _tmpl$6 = [
@@ -72,7 +74,13 @@ function PluginManager() {
72
74
  const [plugins, setPlugins] = createSignal([]);
73
75
  const [loading, setLoading] = createSignal(true);
74
76
  const [error, setError] = createSignal(null);
77
+ const [tenantId, setTenantId] = createSignal(null);
75
78
  onMount(async () => {
79
+ try {
80
+ setTenantId((await apiClient.getMe()).tenantId ?? null);
81
+ } catch {
82
+ setTenantId(null);
83
+ }
76
84
  await loadPlugins();
77
85
  });
78
86
  async function loadPlugins() {
@@ -112,11 +120,11 @@ function PluginManager() {
112
120
  default: return "";
113
121
  }
114
122
  };
115
- return ssr(_tmpl$, ssrHydrationKey(), escape(t("plugins.directoryHint")), error() && ssr(_tmpl$2, ssrHydrationKey(), escape(error())), loading() && _tmpl$3[0] + ssrHydrationKey() + _tmpl$3[1], !loading() && !error() && ssr(_tmpl$4, ssrHydrationKey(), escape(t("plugins.columns.name")), escape(t("plugins.columns.version")), escape(t("plugins.columns.status")), escape(t("plugins.columns.enabled")), escape(createComponent(For, {
123
+ return ssr(_tmpl$, ssrHydrationKey(), escape(t("plugins.directoryHint")), error() && ssr(_tmpl$2, ssrHydrationKey(), escape(error())), loading() && _tmpl$3[0] + ssrHydrationKey() + _tmpl$3[1], !loading() && !error() && ssr(_tmpl$4, ssrHydrationKey(), escape(t("plugins.columns.name")), escape(t("plugins.columns.version")), escape(t("plugins.columns.status")), escape(t("plugins.columns.enabled")), escape(t("plugins.columns.actions")), escape(createComponent(For, {
116
124
  get each() {
117
125
  return plugins();
118
126
  },
119
- children: (plugin) => ssr(_tmpl$5, ssrHydrationKey(), escape(plugin.name), plugin.manifest?.description && ssr(_tmpl$6, ssrHydrationKey(), escape(plugin.manifest.description)), plugin.enabled && ssr(_tmpl$7, ssrHydrationKey(), escape(t("plugins.enabledForTenant"))), escape(plugin.version), `status-badge ${escape(getStatusClass(plugin.status), true)}`, escape(getStatusLabel(plugin.status)), plugin.enabled ? ssr(_tmpl$8, ssrHydrationKey(), escape(t("plugins.enabledYes"))) : ssr(_tmpl$9, ssrHydrationKey(), escape(t("plugins.enabledNo"))))
127
+ children: (plugin) => ssr(_tmpl$5, ssrHydrationKey(), escape(plugin.name), plugin.manifest?.description && ssr(_tmpl$6, ssrHydrationKey(), escape(plugin.manifest.description)), plugin.enabled && ssr(_tmpl$7, ssrHydrationKey(), escape(t("plugins.enabledForTenant"))), escape(plugin.version), `status-badge ${escape(getStatusClass(plugin.status), true)}`, escape(getStatusLabel(plugin.status)), plugin.enabled ? escape(t("plugins.actions.deactivate")) : escape(t("plugins.actions.activate")), plugin.enabled ? ssr(_tmpl$8, ssrHydrationKey(), escape(t("plugins.enabledYes"))) : ssr(_tmpl$9, ssrHydrationKey(), escape(t("plugins.enabledNo"))))
120
128
  })), plugins().length === 0 && ssr(_tmpl$0, ssrHydrationKey(), escape(t("plugins.empty")))));
121
129
  }
122
130
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { t as FloatingPanel } from "./FloatingPanel_DI2CdUZK.mjs";
8
8
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
@@ -506,7 +506,8 @@ var plugins = {
506
506
  "name": "Nome",
507
507
  "version": "Versão",
508
508
  "status": "Status",
509
- "enabled": "Ativo no tenant"
509
+ "enabled": "Ativo no tenant",
510
+ "actions": "Ações"
510
511
  },
511
512
  "status": {
512
513
  "active": "Ativo",
@@ -523,6 +524,11 @@ var plugins = {
523
524
  "version": "Versão",
524
525
  "manifest": "Manifesto (JSON)",
525
526
  "loadError": "Não foi possível carregar os plugins.",
527
+ "actionError": "Não foi possível atualizar o plugin.",
528
+ "actions": {
529
+ "activate": "Ativar",
530
+ "deactivate": "Desativar"
531
+ },
526
532
  "installError": "Não foi possível instalar o plugin.",
527
533
  "uninstallError": "Não foi possível desinstalar o plugin.",
528
534
  "empty": "Nenhum plugin instalado.",
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { c as Button, d as Input, h as Show2, l as Card, m as Select, t as $$DashboardLayout, v as createSignal, y as onMount } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { b as onMount, f as Input, g as Show2, h as Select, l as Button, t as $$DashboardLayout, u as Card, y as createSignal } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { t as TimezoneSelect } from "./TimezoneSelect_D6o-2_7b.mjs";
8
8
  import { createComponent, escape, ssr, ssrHydrationKey } from "solid-js/web";
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
6
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
8
8
  import { For, Show, createSignal, onMount } from "solid-js";
@@ -1,9 +1,9 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_C-sgJSi1.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_D6zphdT0.mjs";
6
- import { t as FieldRenderer } from "./FieldRenderer_D4dcZjgt.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_Bp0_xO2v.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_Bz8ZBDme.mjs";
6
+ import { t as FieldRenderer } from "./FieldRenderer_RlFoxao4.mjs";
7
7
  import { t as expandCloneFields } from "./clone_FT3Zf-Bf.mjs";
8
8
  import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
9
9
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
@@ -59,11 +59,17 @@ var _tmpl$6 = [
59
59
  "<!--/--></div>"
60
60
  ];
61
61
  var _tmpl$7 = [
62
+ "<section",
63
+ "><h5>",
64
+ "</h5><!--$-->",
65
+ "<!--/--></section>"
66
+ ];
67
+ var _tmpl$8 = [
62
68
  "<p",
63
69
  " class=\"muted\">",
64
70
  "</p>"
65
71
  ];
66
- var _tmpl$8 = [
72
+ var _tmpl$9 = [
67
73
  "<tr",
68
74
  "><td>",
69
75
  "</td><td>",
@@ -97,8 +103,10 @@ function TaxonomyTermsManager(props) {
97
103
  if (!props.taxonomySlug) return;
98
104
  try {
99
105
  const resolved = await apiClient.getFieldGroups({ taxonomy: props.taxonomySlug });
100
- const full = await Promise.all(resolved.filter((group) => group.active).map(async (group) => apiClient.getFieldGroup(group.id)));
101
- setMetaFields(expandCloneFields(full.flatMap((group) => group.fields ?? [])));
106
+ setMetaFields(resolved.filter((group) => group.active !== false).map((group) => ({
107
+ ...group,
108
+ fields: expandCloneFields(group.fields ?? [])
109
+ })));
102
110
  } catch {
103
111
  setMetaFields([]);
104
112
  }
@@ -135,17 +143,22 @@ function TaxonomyTermsManager(props) {
135
143
  get each() {
136
144
  return metaFields();
137
145
  },
138
- children: (field) => createComponent(FieldRenderer, {
139
- field,
140
- get values() {
141
- return metaValues();
146
+ children: (group) => ssr(_tmpl$7, ssrHydrationKey() + ssrAttribute("data-field-group", escape(group.key, true), false), escape(group.title), escape(createComponent(For, {
147
+ get each() {
148
+ return group.fields;
142
149
  },
143
- onChange: (fieldName, value) => setMetaValues({
144
- ...metaValues(),
145
- [fieldName]: value
146
- }),
147
- t
148
- })
150
+ children: (field) => createComponent(FieldRenderer, {
151
+ field,
152
+ get values() {
153
+ return metaValues();
154
+ },
155
+ onChange: (fieldName, value) => setMetaValues({
156
+ ...metaValues(),
157
+ [fieldName]: value
158
+ }),
159
+ t
160
+ })
161
+ })))
149
162
  })));
150
163
  }
151
164
  })), ssrAttribute("disabled", saving(), true), editingId() ? escape(t("common.save")) : escape(t("content.taxonomy.add")), escape(createComponent(Show, {
@@ -160,14 +173,14 @@ function TaxonomyTermsManager(props) {
160
173
  return terms().length > 0;
161
174
  },
162
175
  get fallback() {
163
- return ssr(_tmpl$7, ssrHydrationKey(), escape(t("content.taxonomy.empty")));
176
+ return ssr(_tmpl$8, ssrHydrationKey(), escape(t("content.taxonomy.empty")));
164
177
  },
165
178
  get children() {
166
179
  return ssr(_tmpl$4, ssrHydrationKey(), escape(t("content.taxonomy.name")), escape(t("content.taxonomy.slug")), escape(createComponent(For, {
167
180
  get each() {
168
181
  return terms();
169
182
  },
170
- children: (term) => ssr(_tmpl$8, ssrHydrationKey(), escape(term.name), escape(term.slug), escape(t("common.edit")), escape(t("content.taxonomy.delete")))
183
+ children: (term) => ssr(_tmpl$9, ssrHydrationKey(), escape(term.name), escape(term.slug), escape(t("common.edit")), escape(t("content.taxonomy.delete")))
171
184
  })));
172
185
  }
173
186
  })));