@oktis-works/admin 0.23.1 → 0.23.3
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/client/_astro/{ActivityWidget.Dzoi-bq3.js → ActivityWidget.C8vh6xAH.js} +1 -1
- package/dist/client/_astro/{AdminBar.eT1ch_B6.js → AdminBar.D4zIDpRx.js} +1 -1
- package/dist/client/_astro/{ApiKeysManager.kbTE1CPk.js → ApiKeysManager.Bkuipo9h.js} +1 -1
- package/dist/client/_astro/{AtGlanceWidget.w23IIv06.js → AtGlanceWidget.BwnpX_nn.js} +1 -1
- package/dist/client/_astro/{CommentsManager.BN7i1RHa.js → CommentsManager.B7eut49M.js} +1 -1
- package/dist/client/_astro/ContentEditor.CTopdn_8.js +1 -0
- package/dist/client/_astro/ContentTypeWorkspace.xXST4b7L.js +1 -0
- package/dist/client/_astro/{DashboardHome.DXzu_IXZ.js → DashboardHome.DD8QG8ZW.js} +1 -1
- package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.DmNSzErX.js → DashboardLayout.astro_astro_type_script_index_0_lang.DPDlXZ5o.js} +1 -1
- package/dist/client/_astro/{FieldGroupEditor.DsqphEgt.js → FieldGroupEditor.BBEN5r2U.js} +3 -3
- package/dist/client/_astro/{FieldGroupList.pW2Um9om.js → FieldGroupList.BatiQHnf.js} +1 -1
- package/dist/client/_astro/FieldRenderer.BeF5CSJf.js +3 -0
- package/dist/client/_astro/{Footer.5Lcn2VXz.js → Footer.BdwB3qmM.js} +1 -1
- package/dist/client/_astro/{GeneralSettings.B-H8Rzy7.js → GeneralSettings.BCfrxm6Z.js} +1 -1
- package/dist/client/_astro/{LogsManager.Crd8q2te.js → LogsManager.Bs5CSVoj.js} +1 -1
- package/dist/client/_astro/{MediaLibrary.Cv6Ry3u9.js → MediaLibrary.CHn5f4-T.js} +1 -1
- package/dist/client/_astro/{MenuManager.D25ika09.js → MenuManager.C6SrDqdC.js} +1 -1
- package/dist/client/_astro/{Modal.572hmVvb.js → Modal.DdoTYkUe.js} +1 -1
- package/dist/client/_astro/PluginManager.BLpO1lc5.js +112 -0
- package/dist/client/_astro/PluginPageHost.CuXn-tn7.js +1 -0
- package/dist/client/_astro/{PostTypesManager.C3RbmOZT.js → PostTypesManager.B6XdeNQH.js} +1 -1
- package/dist/client/_astro/{QuickDraftWidget.BtSGzhKq.js → QuickDraftWidget.COnmqwEP.js} +1 -1
- package/dist/client/_astro/{ReadingSettings.ZFDaeo5U.js → ReadingSettings.dAD5fTqQ.js} +1 -1
- package/dist/client/_astro/{ResourceHubs.Cx9fbCv1.js → ResourceHubs.B6txFjmO.js} +1 -1
- package/dist/client/_astro/{TaxonomiesManager.BLsvmjaL.js → TaxonomiesManager.CUiXA1--.js} +1 -1
- package/dist/client/_astro/{TaxonomyTermsManager.C_xEh8Ab.js → TaxonomyTermsManager.egxIFsFi.js} +1 -1
- package/dist/client/_astro/{ThemeCustomizer.yx8rEKcL.js → ThemeCustomizer.Bh3Gj0ud.js} +10 -10
- package/dist/client/_astro/{ThemeManager.BpS3m7Qc.js → ThemeManager.UG7ieOYF.js} +1 -1
- package/dist/client/_astro/{UserCreateForm.BYwgAqKk.js → UserCreateForm.CTbVVXjg.js} +1 -1
- package/dist/client/_astro/{UsersManager.DODMr48D.js → UsersManager.Dk2kJsYG.js} +1 -1
- package/dist/client/_astro/{WebhooksManager.DmWIW272.js → WebhooksManager.DTMl6Bm7.js} +1 -1
- package/dist/client/_astro/{api.53l1ob4Z.js → api.fpBzBw4U.js} +1 -1
- package/dist/client/_astro/extensions.DZ7iomLj.js +1 -0
- package/dist/client/_astro/i18n.DQYU1D_P.js +1 -0
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.BLf2Iun3.js → login.astro_astro_type_script_index_0_lang.DA827d72.js} +1 -1
- package/dist/client/_astro/{pt-BR.zZcF2v3X.js → pt-BR.C041vzOT.js} +1 -1
- package/dist/client/_astro/slots.CSARb9TW.js +1 -0
- package/dist/client/_astro/store.CjNcmZUB.js +1 -0
- package/dist/server/chunks/{404_BjHJCErQ.mjs → 404_vQwudBEj.mjs} +1 -1
- package/dist/server/chunks/{BaseLayout_DrIrAANk.mjs → BaseLayout_CJGULIpb.mjs} +3 -3
- package/dist/server/chunks/{ContentEditor_BhXk6xd0.mjs → ContentEditor_D3hp0Gyo.mjs} +49 -11
- package/dist/server/chunks/{DashboardLayout_DxMWAFCu.mjs → DashboardLayout_DvfGK5S9.mjs} +20 -17
- package/dist/server/chunks/{FieldRenderer_CD8prpXz.mjs → FieldRenderer_hN7BJpMp.mjs} +6 -6
- package/dist/server/chunks/{MediaLibrary_BY9b_CPa.mjs → MediaLibrary_BP42MRyJ.mjs} +2 -2
- package/dist/server/chunks/{Modal_BmuvdwoB.mjs → Modal_Ch2TxBxO.mjs} +1 -1
- package/dist/server/chunks/_.._DuD24v6o.mjs +76 -0
- package/dist/server/chunks/{_id__BeIHLdfs.mjs → _id__DK_jXL1Q.mjs} +4 -4
- package/dist/server/chunks/{access_ClmMoH40.mjs → access_pGLFLBaE.mjs} +3 -3
- package/dist/server/chunks/{api-keys_DLbrSM4U.mjs → api-keys_BPiWCywt.mjs} +3 -3
- package/dist/server/chunks/{comments_Cg1jrxti.mjs → comments_HtxLK4Vu.mjs} +2 -2
- package/dist/server/chunks/{custom-fields_CVJsfyk6.mjs → custom-fields_CLqVsj2N.mjs} +2 -2
- package/dist/server/chunks/{customize_BW-P44BY.mjs → customize_C8xbYnPi.mjs} +123 -43
- package/dist/server/chunks/{edit_DdmQd4K3.mjs → edit_CHln4Kd_.mjs} +2 -2
- package/dist/server/chunks/{i18n_C-sgJSi1.mjs → i18n_BlAR9yiz.mjs} +23 -2
- package/dist/server/chunks/{index_BSQio-Py.mjs → index_BiKJEUK6.mjs} +2 -2
- package/dist/server/chunks/{index_Bv2fgBnE.mjs → index_CNk9hfS_.mjs} +3 -3
- package/dist/server/chunks/{index_DxNPNwIw.mjs → index_COr5MHJ7.mjs} +2 -2
- package/dist/server/chunks/{index_BktteRMy.mjs → index_DK_fTf2_.mjs} +2 -2
- package/dist/server/chunks/{index_Bw0pBVRv.mjs → index_T7SwCQJ9.mjs} +2 -2
- package/dist/server/chunks/{login_BCRPUCQz.mjs → login_4_AiN3uA.mjs} +1 -1
- package/dist/server/chunks/{logs_DlzM1kpI.mjs → logs_BnmhxL0Y.mjs} +2 -2
- package/dist/server/chunks/{menus_pMKatAHX.mjs → menus_CnlArgBT.mjs} +2 -2
- package/dist/server/chunks/{new_C9JrPY2y.mjs → new_BLx19-Ni.mjs} +2 -2
- package/dist/server/chunks/{new_B3cNZZO2.mjs → new_CtlziJrk.mjs} +2 -2
- package/dist/server/chunks/{plugins_BTPNe18c.mjs → plugins_CgMxXTGS.mjs} +13 -5
- package/dist/server/chunks/{post-types_DIYWDXCR.mjs → post-types_cQc2Msvm.mjs} +2 -2
- package/dist/server/chunks/{pt-BR_AVNE88MZ.mjs → pt-BR_B8bZo1Id.mjs} +7 -1
- package/dist/server/chunks/{reading_BBV5Dsg0.mjs → reading_0A4laJFd.mjs} +2 -2
- package/dist/server/chunks/{taxonomies_G6ROt7Dn.mjs → taxonomies_CiAk4uQu.mjs} +2 -2
- package/dist/server/chunks/{taxonomy_B59mViQc.mjs → taxonomy_C1yrRsga.mjs} +3 -3
- package/dist/server/chunks/{themes_CygkZJbP.mjs → themes_C8eP1zzS.mjs} +2 -2
- package/dist/server/chunks/{upload_BOPk3diJ.mjs → upload_BNO83SEC.mjs} +2 -2
- package/dist/server/chunks/{webhooks_BiHf1cMk.mjs → webhooks_BQe0fs4j.mjs} +2 -2
- package/dist/server/entry.mjs +43 -43
- package/dist/server/virtual_astro_middleware.mjs +1 -1
- package/package.json +3 -3
- package/dist/client/_astro/ContentEditor.BlsJ2bwD.js +0 -1
- package/dist/client/_astro/ContentTypeWorkspace.BPVuQgzA.js +0 -1
- package/dist/client/_astro/FieldRenderer.AYtSBfHZ.js +0 -3
- package/dist/client/_astro/PluginManager.DLfgQFPF.js +0 -112
- package/dist/client/_astro/extensions.DzQcQsO9.js +0 -1
- package/dist/client/_astro/i18n.A82w5XQu.js +0 -1
- package/dist/client/_astro/preload-helper.oCYlU9a4.js +0 -1
- package/dist/client/_astro/store.DLCqLxBR.js +0 -1
- package/dist/server/chunks/_slug__Dsz2U4cu.mjs +0 -34
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
2
|
-
import { a as MetaBoxesSlot, n as emptyExtensionsState, o as PluginComponentHost, r as loadExtensions } from "./
|
|
3
|
-
import { t as FieldRenderer } from "./
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
2
|
+
import { a as MetaBoxesSlot, n as emptyExtensionsState, o as PluginComponentHost, r as loadExtensions } from "./DashboardLayout_DvfGK5S9.mjs";
|
|
3
|
+
import { t as FieldRenderer } from "./FieldRenderer_hN7BJpMp.mjs";
|
|
4
4
|
import { t as expandCloneFields } from "./clone_FT3Zf-Bf.mjs";
|
|
5
5
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
6
6
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
|
@@ -381,6 +381,12 @@ var _tmpl$9 = [
|
|
|
381
381
|
"<!--/--></select></label></section>"
|
|
382
382
|
];
|
|
383
383
|
var _tmpl$0 = [
|
|
384
|
+
"<section",
|
|
385
|
+
" class=\"card classic-editor__panel plugin-catalog-panel\"><h3>Plugin blocks and patterns</h3><!--$-->",
|
|
386
|
+
"<!--/--><!--$-->",
|
|
387
|
+
"<!--/--></section>"
|
|
388
|
+
];
|
|
389
|
+
var _tmpl$1 = [
|
|
384
390
|
"<form",
|
|
385
391
|
" class=\"content-editor classic-editor\"><!--$-->",
|
|
386
392
|
"<!--/--><!--$-->",
|
|
@@ -409,25 +415,31 @@ var _tmpl$0 = [
|
|
|
409
415
|
"</button></section><!--$-->",
|
|
410
416
|
"<!--/--><!--$-->",
|
|
411
417
|
"<!--/--><!--$-->",
|
|
418
|
+
"<!--/--><!--$-->",
|
|
412
419
|
"<!--/--></aside></div><!--$-->",
|
|
413
420
|
"<!--/--></form>"
|
|
414
421
|
];
|
|
415
|
-
var _tmpl$
|
|
422
|
+
var _tmpl$10 = [
|
|
416
423
|
"<div",
|
|
417
424
|
" class=\"notice notice--error\">",
|
|
418
425
|
"</div>"
|
|
419
426
|
];
|
|
420
|
-
var _tmpl$
|
|
427
|
+
var _tmpl$11 = [
|
|
421
428
|
"<div",
|
|
422
429
|
" class=\"plugin-editor\"",
|
|
423
430
|
">",
|
|
424
431
|
"</div>"
|
|
425
432
|
];
|
|
426
|
-
var _tmpl$
|
|
433
|
+
var _tmpl$12 = [
|
|
427
434
|
"<option",
|
|
428
435
|
">",
|
|
429
436
|
"</option>"
|
|
430
437
|
];
|
|
438
|
+
var _tmpl$13 = [
|
|
439
|
+
"<button",
|
|
440
|
+
" type=\"button\" class=\"btn btn-secondary\">+ <!--$-->",
|
|
441
|
+
"<!--/--></button>"
|
|
442
|
+
];
|
|
431
443
|
/**
|
|
432
444
|
* Normalizes content body: parses string (double-encoded) to object.
|
|
433
445
|
* Ensures `content` key exists for classic editor (falls back to `html`).
|
|
@@ -458,6 +470,8 @@ function ContentEditor(props) {
|
|
|
458
470
|
const [saving, setSaving] = createSignal(false);
|
|
459
471
|
const [message, setMessage] = createSignal("");
|
|
460
472
|
const [extensions, setExtensions] = createSignal(emptyExtensionsState());
|
|
473
|
+
const [blocks, setBlocks] = createSignal([]);
|
|
474
|
+
const [patterns, setPatterns] = createSignal([]);
|
|
461
475
|
const [draft, setDraft] = createSignal({
|
|
462
476
|
type: props.initialType || "post",
|
|
463
477
|
title: "",
|
|
@@ -502,10 +516,17 @@ function ContentEditor(props) {
|
|
|
502
516
|
loadExtensions().then(setExtensions);
|
|
503
517
|
let typeList = [];
|
|
504
518
|
try {
|
|
505
|
-
const [typeCatalog, themeList] = await Promise.all([
|
|
519
|
+
const [typeCatalog, themeList, blockCatalog, patternCatalog] = await Promise.all([
|
|
520
|
+
apiClient.getContentTypes(),
|
|
521
|
+
apiClient.getThemes().catch(() => []),
|
|
522
|
+
apiClient.getBlocks().catch(() => []),
|
|
523
|
+
apiClient.getPatterns().catch(() => [])
|
|
524
|
+
]);
|
|
506
525
|
typeList = typeCatalog;
|
|
507
526
|
setTypes(typeCatalog);
|
|
508
527
|
setThemes(themeList);
|
|
528
|
+
setBlocks(blockCatalog);
|
|
529
|
+
setPatterns(patternCatalog);
|
|
509
530
|
} catch (err) {
|
|
510
531
|
setErrors([err instanceof Error ? err.message : String(err)]);
|
|
511
532
|
}
|
|
@@ -548,7 +569,7 @@ function ContentEditor(props) {
|
|
|
548
569
|
const value = data()["content"];
|
|
549
570
|
return typeof value === "string" ? value : "";
|
|
550
571
|
};
|
|
551
|
-
return ssr(_tmpl$
|
|
572
|
+
return ssr(_tmpl$1, ssrHydrationKey(), escape(createComponent(Show, {
|
|
552
573
|
get when() {
|
|
553
574
|
return errors().length > 0;
|
|
554
575
|
},
|
|
@@ -557,7 +578,7 @@ function ContentEditor(props) {
|
|
|
557
578
|
get each() {
|
|
558
579
|
return errors();
|
|
559
580
|
},
|
|
560
|
-
children: (err) => ssr(_tmpl$
|
|
581
|
+
children: (err) => ssr(_tmpl$10, ssrHydrationKey(), escape(err))
|
|
561
582
|
});
|
|
562
583
|
}
|
|
563
584
|
})), escape(createComponent(Show, {
|
|
@@ -584,7 +605,7 @@ function ContentEditor(props) {
|
|
|
584
605
|
return activeEditor()?.mode !== "replace-body";
|
|
585
606
|
},
|
|
586
607
|
get fallback() {
|
|
587
|
-
return ssr(_tmpl$
|
|
608
|
+
return ssr(_tmpl$11, ssrHydrationKey(), ssrAttribute("data-plugin-editor", escape(activeEditor().id, true), false), escape(createComponent(PluginComponentHost, {
|
|
588
609
|
get componentId() {
|
|
589
610
|
return activeEditor().componentId;
|
|
590
611
|
},
|
|
@@ -665,7 +686,24 @@ function ContentEditor(props) {
|
|
|
665
686
|
get each() {
|
|
666
687
|
return availableLayouts();
|
|
667
688
|
},
|
|
668
|
-
children: (layout) => ssr(_tmpl$
|
|
689
|
+
children: (layout) => ssr(_tmpl$12, ssrHydrationKey() + ssrAttribute("value", escape(layout, true), false), escape(layout))
|
|
690
|
+
})));
|
|
691
|
+
}
|
|
692
|
+
})), escape(createComponent(Show, {
|
|
693
|
+
get when() {
|
|
694
|
+
return blocks().length > 0 || patterns().length > 0;
|
|
695
|
+
},
|
|
696
|
+
get children() {
|
|
697
|
+
return ssr(_tmpl$0, ssrHydrationKey(), escape(createComponent(For, {
|
|
698
|
+
get each() {
|
|
699
|
+
return blocks();
|
|
700
|
+
},
|
|
701
|
+
children: (block) => ssr(_tmpl$13, ssrHydrationKey(), escape(block.label))
|
|
702
|
+
})), escape(createComponent(For, {
|
|
703
|
+
get each() {
|
|
704
|
+
return patterns();
|
|
705
|
+
},
|
|
706
|
+
children: (pattern) => ssr(_tmpl$13, ssrHydrationKey(), escape(pattern.label))
|
|
669
707
|
})));
|
|
670
708
|
}
|
|
671
709
|
})), escape(createComponent(MetaBoxesSlot, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { n as renderScript, t as $$BaseLayout } from "./
|
|
5
|
-
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./
|
|
4
|
+
import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_CJGULIpb.mjs";
|
|
5
|
+
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
6
6
|
import { t as require_semver } from "./semver_WbqCUY_o.mjs";
|
|
7
7
|
import { Dynamic, createComponent, escape, memo, mergeProps, ssr, ssrAttribute, ssrHydrationKey, ssrStyle, ssrStyleProperty } from "solid-js/web";
|
|
8
8
|
import { For, For as For2, Match, Show, Show as Show2, Switch, createEffect, createMemo as createMemo$1, createSignal, createSignal as createSignal$1, onCleanup, onMount, onMount as onMount$1 } from "solid-js";
|
|
@@ -396,6 +396,8 @@ var _tmpl$12 = [
|
|
|
396
396
|
" class=\"action-link\">",
|
|
397
397
|
"</a>"
|
|
398
398
|
];
|
|
399
|
+
var PLUGIN_ROOT = "../../../plugins";
|
|
400
|
+
var pluginModules = /* #__PURE__ */ Object.assign({});
|
|
399
401
|
/**
|
|
400
402
|
* Resolve o componentId declarado num caminho de import dinâmico (alias Vite
|
|
401
403
|
* `@/plugins/` aponta para a raiz dos plugins; o componente vive em
|
|
@@ -406,18 +408,26 @@ var _tmpl$12 = [
|
|
|
406
408
|
* - `plugin` explícito tem prioridade sobre o prefixo do componentId.
|
|
407
409
|
*/
|
|
408
410
|
function resolvePluginComponentPath(componentId, plugin) {
|
|
409
|
-
if (componentId.startsWith("
|
|
411
|
+
if (!componentId || componentId.includes("..") || componentId.includes("://") || componentId.startsWith("/")) throw new Error(`Invalid plugin component reference: ${componentId}`);
|
|
412
|
+
if (componentId.startsWith("@/plugins/")) return `${PLUGIN_ROOT}/${componentId.slice(10)}`;
|
|
410
413
|
const separator = componentId.indexOf(":");
|
|
411
414
|
if (separator === -1) {
|
|
412
415
|
const owner = plugin ?? "";
|
|
416
|
+
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(owner)) throw new Error(`Invalid plugin name: ${owner}`);
|
|
413
417
|
const relative = componentId.replace(/^\/+/, "");
|
|
414
|
-
return owner ?
|
|
418
|
+
return owner ? `${PLUGIN_ROOT}/${owner}/${relative}` : componentId;
|
|
415
419
|
}
|
|
416
420
|
const owner = plugin ?? componentId.slice(0, separator);
|
|
421
|
+
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(owner)) throw new Error(`Invalid plugin name: ${owner}`);
|
|
417
422
|
const rest = componentId.slice(separator + 1);
|
|
418
|
-
if (rest.startsWith("@/")) return rest
|
|
419
|
-
if (rest.includes("/")) return
|
|
420
|
-
return
|
|
423
|
+
if (rest.startsWith("@/plugins/")) return `${PLUGIN_ROOT}/${rest.slice(10)}`;
|
|
424
|
+
if (rest.includes("/")) return `${PLUGIN_ROOT}/${owner}/${rest.replace(/^\/+/, "")}`;
|
|
425
|
+
return `${PLUGIN_ROOT}/${owner}/admin/components/${rest}.tsx`;
|
|
426
|
+
}
|
|
427
|
+
async function loadPluginComponent(componentId, plugin) {
|
|
428
|
+
const loader = pluginModules[resolvePluginComponentPath(componentId, plugin)];
|
|
429
|
+
if (!loader) throw new Error(`Plugin component is not included in the admin build: ${componentId}`);
|
|
430
|
+
return loader();
|
|
421
431
|
}
|
|
422
432
|
/**
|
|
423
433
|
* Monta um componente de plugin via import dinâmico (lazy — chunk separado).
|
|
@@ -430,11 +440,7 @@ function PluginComponentHost(props) {
|
|
|
430
440
|
const [loading, setLoading] = createSignal(true);
|
|
431
441
|
onMount(async () => {
|
|
432
442
|
try {
|
|
433
|
-
const
|
|
434
|
-
/* @vite-ignore */
|
|
435
|
-
resolvePluginComponentPath(props.componentId, props.plugin)
|
|
436
|
-
);
|
|
437
|
-
const candidate = module["default"] ?? Object.values(module).find((value) => typeof value === "function");
|
|
443
|
+
const candidate = (await loadPluginComponent(props.componentId, props.plugin))["default"];
|
|
438
444
|
if (!candidate) throw new Error("componente default ausente no módulo");
|
|
439
445
|
setComponent(() => candidate);
|
|
440
446
|
} catch (err) {
|
|
@@ -610,10 +616,7 @@ function prefetchPluginChunks(state) {
|
|
|
610
616
|
if (!componentId || prefetchedChunks.has(componentId)) continue;
|
|
611
617
|
prefetchedChunks.add(componentId);
|
|
612
618
|
schedule(() => {
|
|
613
|
-
|
|
614
|
-
/* @vite-ignore */
|
|
615
|
-
resolvePluginComponentPath(componentId)
|
|
616
|
-
).catch(() => {});
|
|
619
|
+
loadPluginComponent(componentId).catch(() => {});
|
|
617
620
|
});
|
|
618
621
|
}
|
|
619
622
|
}
|
|
@@ -1299,4 +1302,4 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1299
1302
|
})}</div>` })}${renderScript($$result, "/home/runner/work/cms/cms/apps/admin/src/layouts/DashboardLayout.astro?astro&type=script&index=0&lang.ts")}`;
|
|
1300
1303
|
}, "/home/runner/work/cms/cms/apps/admin/src/layouts/DashboardLayout.astro", void 0);
|
|
1301
1304
|
//#endregion
|
|
1302
|
-
export {
|
|
1305
|
+
export { Table as _, MetaBoxesSlot as a, onMount$1 as b, Badge as c, For2 as d, Input as f, Show2 as g, Select as h, ActionLinksSlot as i, Button as l, Pagination as m, emptyExtensionsState as n, PluginComponentHost as o, Modal as p, loadExtensions as r, loadPluginComponent as s, $$DashboardLayout as t, Card as u, createMemo$1 as v, createSignal$1 as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
1
|
+
import "./i18n_BlAR9yiz.mjs";
|
|
2
|
+
import { d as For2, g as Show2, s as loadPluginComponent, v as createMemo$1, y as createSignal$1 } from "./DashboardLayout_DvfGK5S9.mjs";
|
|
3
3
|
import { Dynamic, createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
4
4
|
import { For, Match, Show, Switch, createMemo, createSignal, onMount } from "solid-js";
|
|
5
5
|
//#region ../../packages/validation/dist/client-validate.js
|
|
@@ -596,8 +596,8 @@ function PluginFieldRenderer(props) {
|
|
|
596
596
|
onMount(async () => {
|
|
597
597
|
const pathsToTry = [props.adminRendererPath, props.adminComponentPath].filter(Boolean);
|
|
598
598
|
for (const path of pathsToTry) try {
|
|
599
|
-
const module = await
|
|
600
|
-
const Comp = module
|
|
599
|
+
const module = await loadPluginComponent(path);
|
|
600
|
+
const Comp = module["default"] || module["PluginFieldRenderer"] || module["PluginFieldConfig"];
|
|
601
601
|
if (Comp) {
|
|
602
602
|
setComponent(Comp);
|
|
603
603
|
setLoading(false);
|
|
@@ -646,7 +646,7 @@ function PluginFieldRenderer(props) {
|
|
|
646
646
|
get disabled() {
|
|
647
647
|
return props.disabled;
|
|
648
648
|
},
|
|
649
|
-
get
|
|
649
|
+
get t() {
|
|
650
650
|
return props._t;
|
|
651
651
|
}
|
|
652
652
|
})));
|
|
@@ -669,7 +669,7 @@ function PluginFieldRenderer(props) {
|
|
|
669
669
|
get disabled() {
|
|
670
670
|
return props.disabled;
|
|
671
671
|
},
|
|
672
|
-
get
|
|
672
|
+
get t() {
|
|
673
673
|
return props._t;
|
|
674
674
|
}
|
|
675
675
|
})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
2
|
-
import {
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.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_DvfGK5S9.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 "./
|
|
1
|
+
import { n as useTranslation } from "./i18n_BlAR9yiz.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_DvfGK5S9.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 "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
5
|
+
import { s as loadPluginComponent, t as $$DashboardLayout } from "./DashboardLayout_DvfGK5S9.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
|
|
6103
|
-
const Comp = module
|
|
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 "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_DvfGK5S9.mjs";
|
|
6
6
|
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
7
|
-
import { t as Modal } from "./
|
|
7
|
+
import { t as Modal } from "./Modal_Ch2TxBxO.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 "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_DvfGK5S9.mjs";
|
|
6
6
|
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
7
|
-
import { t as Modal } from "./
|
|
7
|
+
import { t as Modal } from "./Modal_Ch2TxBxO.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 "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_DvfGK5S9.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 "./
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { n as useTranslation, r as apiClient } from "./i18n_BlAR9yiz.mjs";
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_DvfGK5S9.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";
|