@oktis-works/admin 0.6.5 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/_astro/{ActivityWidget.CLFjbNJf.js → ActivityWidget.CPGVx0TQ.js} +1 -1
- package/dist/client/_astro/{AdminBar.CKYNoMCz.js → AdminBar.DCHk_5ca.js} +2 -2
- package/dist/client/_astro/{AtGlanceWidget.DYA_zGAc.js → AtGlanceWidget.BeKcaW5Z.js} +1 -1
- package/dist/client/_astro/BaseLayout.Bf1iwXRF.css +1 -0
- package/dist/client/_astro/ContentEditor.D2Pzxrmx.js +1 -0
- package/dist/client/_astro/{ContentEditor.Gs5qWVc5.js → ContentEditor.oK1k6X8U.js} +1 -1
- package/dist/client/_astro/{ContentTypeWorkspace.0pObGhBc.js → ContentTypeWorkspace.C44tlgPI.js} +1 -1
- package/dist/client/_astro/{DashboardHome.DCz0EiH2.js → DashboardHome.BO_rm7Uf.js} +1 -1
- package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.DdRNBOsR.js → DashboardLayout.astro_astro_type_script_index_0_lang.CJ39grFK.js} +1 -1
- package/dist/client/_astro/{FieldGroupEditor.Bdm2FW0L.js → FieldGroupEditor.BeI58rW-.js} +4 -4
- package/dist/client/_astro/{FieldGroupList.BaNTs6an.js → FieldGroupList.ahbjUfLG.js} +1 -1
- package/dist/client/_astro/{Footer.xmwTsnTw.js → Footer.gPJXMxjE.js} +1 -1
- package/dist/client/_astro/GeneralSettings.BpkMdYlo.js +1 -0
- package/dist/client/_astro/{LogsManager.1c_AlgX8.js → LogsManager.B4n86e4G.js} +1 -1
- package/dist/client/_astro/{MediaLibrary.DCQs3bwq.js → MediaLibrary.Bj4WH-vM.js} +1 -1
- package/dist/client/_astro/{MenuManager.CLPv5Ths.js → MenuManager.8HZJSEQE.js} +1 -1
- package/dist/client/_astro/{PluginManager.BD3pUiUf.js → PluginManager.chYe_Wjc.js} +1 -1
- package/dist/client/_astro/{PostTypesManager.XE7f2dd_.js → PostTypesManager.2yuiIqth.js} +1 -1
- package/dist/client/_astro/{QuickDraftWidget.Brw0_WNU.js → QuickDraftWidget.Cv1ifqkz.js} +1 -1
- package/dist/client/_astro/{ResourceHubs.CL3KxW6a.js → ResourceHubs.Cj4GS6P8.js} +1 -1
- package/dist/client/_astro/{TaxonomiesManager.l-VE1kOd.js → TaxonomiesManager.ly7pMtHQ.js} +1 -1
- package/dist/client/_astro/{TaxonomyTermsManager.DWljfgZH.js → TaxonomyTermsManager.rTnyCMmS.js} +1 -1
- package/dist/client/_astro/{ThemeManager.Dke-fCUr.js → ThemeManager.4UHfA_xy.js} +1 -1
- package/dist/client/_astro/{UserCreateForm.wCOVD_YS.js → UserCreateForm.BgcqPitU.js} +1 -1
- package/dist/client/_astro/{UsersManager.DBICZF7i.js → UsersManager.iKH5HmkO.js} +1 -1
- package/dist/client/_astro/{WebhooksManager.VZx9QiC8.js → WebhooksManager.ljJo1uYf.js} +1 -1
- package/dist/client/_astro/i18n.DVVsFXMk.js +1 -0
- package/dist/client/_astro/{version.lZrIkhBt.js → version.B5csjCMd.js} +1 -1
- package/dist/server/chunks/{ContentEditor_B0QsSK0Y.mjs → ContentEditor_D1zPgg8f.mjs} +1 -1
- package/dist/server/chunks/{DashboardLayout_B7wgVOsP.mjs → DashboardLayout_BZ4LWho6.mjs} +2 -2
- package/dist/server/chunks/{MediaLibrary_BRvGJP4_.mjs → MediaLibrary_BXk-5dLz.mjs} +1 -1
- package/dist/server/chunks/{_id__eIvJe3jk.mjs → _id__CjWeQUUi.mjs} +41 -14
- package/dist/server/chunks/{_slug__B3uNlhkH.mjs → _slug__CKXEkOFL.mjs} +1 -1
- package/dist/server/chunks/{access_CmSXok1b.mjs → access_GMt-wpAX.mjs} +1 -1
- package/dist/server/chunks/{custom-fields_wJMsqvio.mjs → custom-fields_BdHovhJ4.mjs} +1 -1
- package/dist/server/chunks/{edit_DEWBHahs.mjs → edit_IcUsknZl.mjs} +2 -2
- package/dist/server/chunks/general_53vJSCpD.mjs +328 -0
- package/dist/server/chunks/{index_Kh_9UzSS.mjs → index_BMVTF3gi.mjs} +2 -2
- package/dist/server/chunks/{index_DH2T5ddj.mjs → index_Bfi-lRDz.mjs} +2 -2
- package/dist/server/chunks/{index_mi4MQPom.mjs → index_DODEgUGx.mjs} +1 -1
- package/dist/server/chunks/{index_zMr2y_Xv.mjs → index_DzULGte9.mjs} +1 -1
- package/dist/server/chunks/{index_CMVpb3BU.mjs → index_uf6alr0f.mjs} +1 -1
- package/dist/server/chunks/{login_CahiWhMF.mjs → login_Dv3Z0TBw.mjs} +1 -1
- package/dist/server/chunks/{logs_CXM-Wlpl.mjs → logs_Ccpi63Rb.mjs} +1 -1
- package/dist/server/chunks/{menus_itAu4aJ_.mjs → menus_h36cMPl0.mjs} +1 -1
- package/dist/server/chunks/{new_B-LSBq7q.mjs → new_BBqq38OJ.mjs} +2 -2
- package/dist/server/chunks/{new_BkC0clUd.mjs → new_Bm9t7ncH.mjs} +1 -1
- package/dist/server/chunks/{plugins_B2xwMKbg.mjs → plugins_B4Wx-LHv.mjs} +1 -1
- package/dist/server/chunks/{post-types_B-PvFTjs.mjs → post-types_DHazERhG.mjs} +1 -1
- package/dist/server/chunks/{taxonomies_BVrBDATA.mjs → taxonomies_bCqkXIvp.mjs} +1 -1
- package/dist/server/chunks/{taxonomy_Cb8bxAVL.mjs → taxonomy_B43sWexw.mjs} +1 -1
- package/dist/server/chunks/{themes_DtBvkP9Q.mjs → themes_C8xkE82D.mjs} +1 -1
- package/dist/server/chunks/{upload_DBbmWxIZ.mjs → upload_DvypHxj6.mjs} +2 -2
- package/dist/server/chunks/{webhooks_B93sIe_X.mjs → webhooks_B8LTedHJ.mjs} +1 -1
- package/dist/server/entry.mjs +24 -24
- package/package.json +1 -1
- package/dist/client/_astro/BaseLayout.U2UJ2Gu_.css +0 -1
- package/dist/client/_astro/ContentEditor.Dowvd-VB.js +0 -1
- package/dist/client/_astro/GeneralSettings.DLGEYL2s.js +0 -1
- package/dist/client/_astro/i18n.3zKFZ7KU.js +0 -1
- package/dist/server/chunks/general_BhERUCtP.mjs +0 -191
- /package/dist/server/chunks/{BaseLayout_Bt2DGycD.mjs → BaseLayout_rswPjbGh.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,d as t,i as n,p as r,r as i,s as a,v as o}from"./solid.8gBSxpeo.js";import{a as s,c,d as l,f as u,h as d,i as f,m as p,r as m,s as h,u as g}from"./web.DwNv8rLL.js";import{n as _}from"./i18n.3zKFZ7KU.js";import{t as v}from"./api.CGA0D2A2.js";var y=p(`<div class=webhook-event-select__dropdown role=listbox><input class=input><div class=webhook-event-select__options>`),b=p(`<div class=webhook-event-select><button type=button class="input webhook-event-select__trigger"aria-haspopup=listbox><span></span><span aria-hidden=true>⌄</span></button><!$><!/><div class=webhook-event-select__chips>`),x=p(`<span class=muted>`),S=p(`<label class=webhook-event-option><input type=checkbox><span><!$><!/><small>`),C=p(`<button type=button class=webhook-event-chip><!$><!/> ×`),w=p(`<div class="notice notice--error">`),T=p(`<div class=table-scroll><table class=table><thead><tr><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),E=p(`<div class="resource-hub webhooks-manager"><!$><!/><div class=card-header-row><div><h3></h3></div><button class="btn btn-primary"type=button></button></div><!$><!/><section class=card></section><style>.webhook-event-select{position:relative}.webhook-event-select__trigger{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer}.webhook-event-select__dropdown{position:absolute;z-index:20;top:calc(100% + .25rem);left:0;right:0;background:var(--color-surface,#fff);border:1px solid var(--color-border,#dcdcde);box-shadow:0 8px 22px rgba(0,0,0,.14);padding:.6rem}.webhook-event-select__options{max-height:240px;overflow:auto;margin-top:.5rem;display:grid;gap:.2rem}.webhook-event-option{display:flex!important;align-items:flex-start;gap:.5rem!important;padding:.45rem;border-radius:4px;cursor:pointer}.webhook-event-option:hover{background:var(--color-surface-muted,#f5f5f5)}.webhook-event-option span{display:grid;gap:.12rem}.webhook-event-option small{color:var(--color-muted);font-size:.75rem}.webhook-event-select__chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.4rem}.webhook-event-chip{border:1px solid var(--color-border,#dcdcde);background:var(--color-surface-muted,#f5f5f5);border-radius:999px;padding:.2rem .55rem;cursor:pointer;font-size:.78rem}`),D=p(`<label><!$><!/><input class=input type=password>`),O=p(`<div class=form-grid><label><!$><!/><input class=input></label><label><!$><!/><input class=input type=password>`),k=p(`<div class=form-grid><label><!$><!/><input class=input type=password></label><label><!$><!/><input class=input>`),A=p(`<section class=card><h3></h3><form class=resource-form><label><!$><!/><input class=input required type=url></label><label><!$><!/><!$><!/></label><label><!$><!/><select class=input><option value=none></option><option value=bearer></option><option value=basic></option><option value=api_key></option><option value=hmac_sha256></option></select></label><!$><!/><!$><!/><!$><!/><!$><!/><label class=checkbox-label><input type=checkbox> <!$><!/></label><div><button class="btn btn-primary"type=submit></button> <button class=btn type=button>`),j=p(`<p>`),M=p(`<tr><td></td><td></td><td></td><td></td><td><button class=btn type=button></button> <button class="btn btn-danger"type=button>`),N=()=>({url:``,events:[],active:!0,auth_type:`hmac_sha256`,auth_config:{signatureHeader:`X-Webhook-Signature`}});function ee(p){let[m,_]=r(!1),[v,w]=r(``),T;o(()=>{let t=e=>{T&&!T.contains(e.target)&&_(!1)};document.addEventListener(`mousedown`,t),e(()=>document.removeEventListener(`mousedown`,t))});let E=()=>p.options.filter(e=>`${e.label} ${e.value}`.toLowerCase().includes(v().toLowerCase())),D=e=>p.onChange(p.value.includes(e)?p.value.filter(t=>t!==e):[...p.value,e]);return(()=>{var e=f(b),r=e.firstChild,o=r.firstChild,O=r.nextSibling,[k,A]=s(O.nextSibling),j=k.nextSibling,M=T;return typeof M==`function`?d(M,e):T=e,r.$$click=()=>_(!m()),h(o,(()=>{var e=c(()=>p.value.length>0);return()=>e()?`${p.value.length} selecionado(s)`:p.placeholder})()),h(e,a(n,{get when(){return m()},get children(){var e=f(y),r=e.firstChild,o=r.nextSibling;return r.$$input=e=>w(e.currentTarget.value),h(o,a(n,{get when(){return E().length>0},get fallback(){return(()=>{var e=f(x);return h(e,()=>p.empty),e})()},get children(){return a(i,{get each(){return E()},children:e=>(()=>{var n=f(S),r=n.firstChild,i=r.nextSibling,a=i.firstChild,[o,c]=s(a.nextSibling),l=o.nextSibling;return r.addEventListener(`change`,()=>D(e.value)),h(i,()=>e.label,o,c),h(l,()=>e.value),t(()=>u(r,`checked`,p.value.includes(e.value))),n})()})}})),t(()=>l(r,`placeholder`,p.searchPlaceholder)),t(()=>u(r,`value`,v())),g(),e}}),k,A),h(j,a(i,{get each(){return p.value},children:e=>(()=>{var t=f(C),n=t.firstChild,[r,i]=s(n.nextSibling);return r.nextSibling,t.$$click=()=>D(e),h(t,()=>p.options.find(t=>t.value===e)?.label??e,r,i),g(),t})()})),t(()=>l(r,`aria-expanded`,m())),g(),e})()}function P(){let{t:e}=_(),[d,p]=r([]),[m,y]=r([]),[b,x]=r(null),[S,C]=r(``),[P,F]=r(!0),I=async()=>{F(!0);try{let[e,t]=await Promise.all([v.getWebhooks(),v.getWebhookEvents()]);p(e),y(t)}catch(e){C(e instanceof Error?e.message:String(e))}finally{F(!1)}};o(I);let L=e=>{if(!e){x(N());return}x({...e,events:[...e.events??[]],auth_type:e.auth_type??`hmac_sha256`,auth_config:{...e.auth_config??{}}})},R=(t,n)=>{let r=b();if(r){if(!r.events||r.events.length===0){C(e(`webhooks.eventsRequired`));return}x({...r,auth_config:{...r.auth_config,[t]:n}})}},te=async e=>{e.preventDefault();let t=b();if(!t)return;let n=Object.fromEntries(Object.entries(t.auth_config).filter(([,e])=>e));try{t.id?await v.updateWebhook(t.id,{...t,auth_config:n}):await v.createWebhook({...t,auth_config:n}),x(null),await I()}catch(e){C(e instanceof Error?e.message:String(e))}};return(()=>{var r=f(E),o=r.firstChild,[p,_]=s(o.nextSibling),y=p.nextSibling,C=y.firstChild,N=C.firstChild,F=C.nextSibling,z=y.nextSibling,[B,V]=s(z.nextSibling),H=B.nextSibling;return h(r,a(n,{get when(){return S()},get children(){var e=f(w);return h(e,S),e}}),p,_),h(N,()=>e(`webhooks.listTitle`)),F.$$click=()=>L(),h(F,()=>e(`webhooks.new`)),h(r,a(n,{get when(){return b()},children:r=>(()=>{var i=f(A),o=i.firstChild,d=o.nextSibling,p=d.firstChild,_=p.firstChild,[v,y]=s(_.nextSibling),b=v.nextSibling,S=p.nextSibling,C=S.firstChild,[w,T]=s(C.nextSibling),E=w.nextSibling,[j,M]=s(E.nextSibling),N=S.nextSibling,P=N.firstChild,[F,I]=s(P.nextSibling),L=F.nextSibling,z=L.firstChild,B=z.nextSibling,V=B.nextSibling,H=V.nextSibling,U=H.nextSibling,ne=N.nextSibling,[W,re]=s(ne.nextSibling),ie=W.nextSibling,[G,ae]=s(ie.nextSibling),K=G.nextSibling,[q,oe]=s(K.nextSibling),se=q.nextSibling,[J,ce]=s(se.nextSibling),Y=J.nextSibling,X=Y.firstChild,Z=X.nextSibling.nextSibling,[le,ue]=s(Z.nextSibling),Q=Y.nextSibling.firstChild,$=Q.nextSibling.nextSibling;return h(o,(()=>{var t=c(()=>!!r().id);return()=>t()?e(`webhooks.edit`):e(`webhooks.create`)})()),d.addEventListener(`submit`,te),h(p,()=>e(`webhooks.url`),v,y),b.$$input=e=>x({...r(),url:e.currentTarget.value}),h(S,()=>e(`webhooks.events`),w,T),h(S,a(ee,{get options(){return m()},get value(){return r().events??[]},onChange:e=>x({...r(),events:e}),get placeholder(){return e(`webhooks.selectEvents`)},get searchPlaceholder(){return e(`webhooks.searchEvents`)},get empty(){return e(`webhooks.noEvents`)}}),j,M),h(N,()=>e(`webhooks.authentication`),F,I),L.addEventListener(`change`,e=>x({...r(),auth_type:e.currentTarget.value,auth_config:{}})),h(z,()=>e(`webhooks.auth.none`)),h(B,()=>e(`webhooks.auth.bearer`)),h(V,()=>e(`webhooks.auth.basic`)),h(H,()=>e(`webhooks.auth.apiKey`)),h(U,()=>e(`webhooks.auth.hmac_sha256`)),h(d,a(n,{get when(){return r().auth_type===`bearer`},get children(){var n=f(D),i=n.firstChild,[a,o]=s(i.nextSibling),c=a.nextSibling;return h(n,()=>e(`webhooks.token`),a,o),c.$$input=e=>R(`token`,e.currentTarget.value),t(()=>l(c,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(c,`value`,r().auth_config.token??``)),g(),n}}),W,re),h(d,a(n,{get when(){return r().auth_type===`basic`},get children(){var n=f(O),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.username`),o,c),d.$$input=e=>R(`username`,e.currentTarget.value),h(p,()=>e(`webhooks.password`),_,v),y.$$input=e=>R(`password`,e.currentTarget.value),t(()=>l(y,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(d,`value`,r().auth_config.username??``)),t(()=>u(y,`value`,r().auth_config.password??``)),g(),n}}),G,ae),h(d,a(n,{get when(){return r().auth_type===`api_key`},get children(){var n=f(O),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.headerName`),o,c),d.$$input=e=>R(`headerName`,e.currentTarget.value),h(p,()=>e(`webhooks.apiKeyValue`),_,v),y.$$input=e=>R(`value`,e.currentTarget.value),t(()=>l(y,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(d,`value`,r().auth_config.headerName??``)),t(()=>u(y,`value`,r().auth_config.value??``)),g(),n}}),q,oe),h(d,a(n,{get when(){return r().auth_type===`hmac_sha256`},get children(){var n=f(k),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.secret`),o,c),d.$$input=e=>R(`secret`,e.currentTarget.value),h(p,()=>e(`webhooks.signatureHeader`),_,v),y.$$input=e=>R(`signatureHeader`,e.currentTarget.value),t(t=>{var n=!r().id,i=r().id?e(`webhooks.keepExisting`):``;return n!==t.e&&u(d,`required`,t.e=n),i!==t.t&&l(d,`placeholder`,t.t=i),t},{e:void 0,t:void 0}),t(()=>u(d,`value`,r().auth_config.secret??``)),t(()=>u(y,`value`,r().auth_config.signatureHeader??`X-Webhook-Signature`)),g(),n}}),J,ce),X.addEventListener(`change`,e=>x({...r(),active:e.currentTarget.checked})),h(Y,()=>e(`webhooks.active`),le,ue),h(Q,()=>e(`common.save`)),$.$$click=()=>x(null),h($,()=>e(`common.cancel`)),t(()=>u(b,`value`,r().url??``)),t(()=>u(L,`value`,r().auth_type)),t(()=>u(X,`checked`,r().active??!0)),g(),i})()}),B,V),h(H,a(n,{get when(){return!P()},get fallback(){return(()=>{var t=f(j);return h(t,()=>e(`webhooks.loading`)),t})()},get children(){return a(n,{get when(){return d().length>0},get fallback(){return(()=>{var t=f(j);return h(t,()=>e(`webhooks.empty`)),t})()},get children(){var t=f(T),n=t.firstChild.firstChild,r=n.firstChild.firstChild,o=r.nextSibling,s=o.nextSibling,l=s.nextSibling,u=l.nextSibling,p=n.nextSibling;return h(r,()=>e(`webhooks.url`)),h(o,()=>e(`webhooks.events`)),h(s,()=>e(`webhooks.authentication`)),h(l,()=>e(`webhooks.active`)),h(u,()=>e(`common.actions`)),h(p,a(i,{get each(){return d()},children:t=>(()=>{var n=f(M),r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=a.nextSibling,s=o.nextSibling.firstChild,l=s.nextSibling.nextSibling;return h(r,()=>t.url),h(i,()=>(t.events??[]).join(`, `)),h(a,()=>e(`webhooks.auth.${t.auth_type??`hmac_sha256`}`)),h(o,(()=>{var n=c(()=>!!t.active);return()=>n()?e(`common.yes`):e(`common.no`)})()),s.$$click=()=>L(t),h(s,()=>e(`common.edit`)),l.$$click=()=>t.id&&void v.deleteWebhook(t.id).then(I),h(l,()=>e(`common.delete`)),g(),n})()})),t}})}})),g(),r})()}m([`click`,`input`]);export{P as WebhooksManager};
|
|
1
|
+
import{_ as e,d as t,i as n,p as r,r as i,s as a,v as o}from"./solid.8gBSxpeo.js";import{a as s,c,d as l,f as u,h as d,i as f,m as p,r as m,s as h,u as g}from"./web.DwNv8rLL.js";import{n as _}from"./i18n.DVVsFXMk.js";import{t as v}from"./api.CGA0D2A2.js";var y=p(`<div class=webhook-event-select__dropdown role=listbox><input class=input><div class=webhook-event-select__options>`),b=p(`<div class=webhook-event-select><button type=button class="input webhook-event-select__trigger"aria-haspopup=listbox><span></span><span aria-hidden=true>⌄</span></button><!$><!/><div class=webhook-event-select__chips>`),x=p(`<span class=muted>`),S=p(`<label class=webhook-event-option><input type=checkbox><span><!$><!/><small>`),C=p(`<button type=button class=webhook-event-chip><!$><!/> ×`),w=p(`<div class="notice notice--error">`),T=p(`<div class=table-scroll><table class=table><thead><tr><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),E=p(`<div class="resource-hub webhooks-manager"><!$><!/><div class=card-header-row><div><h3></h3></div><button class="btn btn-primary"type=button></button></div><!$><!/><section class=card></section><style>.webhook-event-select{position:relative}.webhook-event-select__trigger{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer}.webhook-event-select__dropdown{position:absolute;z-index:20;top:calc(100% + .25rem);left:0;right:0;background:var(--color-surface,#fff);border:1px solid var(--color-border,#dcdcde);box-shadow:0 8px 22px rgba(0,0,0,.14);padding:.6rem}.webhook-event-select__options{max-height:240px;overflow:auto;margin-top:.5rem;display:grid;gap:.2rem}.webhook-event-option{display:flex!important;align-items:flex-start;gap:.5rem!important;padding:.45rem;border-radius:4px;cursor:pointer}.webhook-event-option:hover{background:var(--color-surface-muted,#f5f5f5)}.webhook-event-option span{display:grid;gap:.12rem}.webhook-event-option small{color:var(--color-muted);font-size:.75rem}.webhook-event-select__chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.4rem}.webhook-event-chip{border:1px solid var(--color-border,#dcdcde);background:var(--color-surface-muted,#f5f5f5);border-radius:999px;padding:.2rem .55rem;cursor:pointer;font-size:.78rem}`),D=p(`<label><!$><!/><input class=input type=password>`),O=p(`<div class=form-grid><label><!$><!/><input class=input></label><label><!$><!/><input class=input type=password>`),k=p(`<div class=form-grid><label><!$><!/><input class=input type=password></label><label><!$><!/><input class=input>`),A=p(`<section class=card><h3></h3><form class=resource-form><label><!$><!/><input class=input required type=url></label><label><!$><!/><!$><!/></label><label><!$><!/><select class=input><option value=none></option><option value=bearer></option><option value=basic></option><option value=api_key></option><option value=hmac_sha256></option></select></label><!$><!/><!$><!/><!$><!/><!$><!/><label class=checkbox-label><input type=checkbox> <!$><!/></label><div><button class="btn btn-primary"type=submit></button> <button class=btn type=button>`),j=p(`<p>`),M=p(`<tr><td></td><td></td><td></td><td></td><td><button class=btn type=button></button> <button class="btn btn-danger"type=button>`),N=()=>({url:``,events:[],active:!0,auth_type:`hmac_sha256`,auth_config:{signatureHeader:`X-Webhook-Signature`}});function ee(p){let[m,_]=r(!1),[v,w]=r(``),T;o(()=>{let t=e=>{T&&!T.contains(e.target)&&_(!1)};document.addEventListener(`mousedown`,t),e(()=>document.removeEventListener(`mousedown`,t))});let E=()=>p.options.filter(e=>`${e.label} ${e.value}`.toLowerCase().includes(v().toLowerCase())),D=e=>p.onChange(p.value.includes(e)?p.value.filter(t=>t!==e):[...p.value,e]);return(()=>{var e=f(b),r=e.firstChild,o=r.firstChild,O=r.nextSibling,[k,A]=s(O.nextSibling),j=k.nextSibling,M=T;return typeof M==`function`?d(M,e):T=e,r.$$click=()=>_(!m()),h(o,(()=>{var e=c(()=>p.value.length>0);return()=>e()?`${p.value.length} selecionado(s)`:p.placeholder})()),h(e,a(n,{get when(){return m()},get children(){var e=f(y),r=e.firstChild,o=r.nextSibling;return r.$$input=e=>w(e.currentTarget.value),h(o,a(n,{get when(){return E().length>0},get fallback(){return(()=>{var e=f(x);return h(e,()=>p.empty),e})()},get children(){return a(i,{get each(){return E()},children:e=>(()=>{var n=f(S),r=n.firstChild,i=r.nextSibling,a=i.firstChild,[o,c]=s(a.nextSibling),l=o.nextSibling;return r.addEventListener(`change`,()=>D(e.value)),h(i,()=>e.label,o,c),h(l,()=>e.value),t(()=>u(r,`checked`,p.value.includes(e.value))),n})()})}})),t(()=>l(r,`placeholder`,p.searchPlaceholder)),t(()=>u(r,`value`,v())),g(),e}}),k,A),h(j,a(i,{get each(){return p.value},children:e=>(()=>{var t=f(C),n=t.firstChild,[r,i]=s(n.nextSibling);return r.nextSibling,t.$$click=()=>D(e),h(t,()=>p.options.find(t=>t.value===e)?.label??e,r,i),g(),t})()})),t(()=>l(r,`aria-expanded`,m())),g(),e})()}function P(){let{t:e}=_(),[d,p]=r([]),[m,y]=r([]),[b,x]=r(null),[S,C]=r(``),[P,F]=r(!0),I=async()=>{F(!0);try{let[e,t]=await Promise.all([v.getWebhooks(),v.getWebhookEvents()]);p(e),y(t)}catch(e){C(e instanceof Error?e.message:String(e))}finally{F(!1)}};o(I);let L=e=>{if(!e){x(N());return}x({...e,events:[...e.events??[]],auth_type:e.auth_type??`hmac_sha256`,auth_config:{...e.auth_config??{}}})},R=(t,n)=>{let r=b();if(r){if(!r.events||r.events.length===0){C(e(`webhooks.eventsRequired`));return}x({...r,auth_config:{...r.auth_config,[t]:n}})}},te=async e=>{e.preventDefault();let t=b();if(!t)return;let n=Object.fromEntries(Object.entries(t.auth_config).filter(([,e])=>e));try{t.id?await v.updateWebhook(t.id,{...t,auth_config:n}):await v.createWebhook({...t,auth_config:n}),x(null),await I()}catch(e){C(e instanceof Error?e.message:String(e))}};return(()=>{var r=f(E),o=r.firstChild,[p,_]=s(o.nextSibling),y=p.nextSibling,C=y.firstChild,N=C.firstChild,F=C.nextSibling,z=y.nextSibling,[B,V]=s(z.nextSibling),H=B.nextSibling;return h(r,a(n,{get when(){return S()},get children(){var e=f(w);return h(e,S),e}}),p,_),h(N,()=>e(`webhooks.listTitle`)),F.$$click=()=>L(),h(F,()=>e(`webhooks.new`)),h(r,a(n,{get when(){return b()},children:r=>(()=>{var i=f(A),o=i.firstChild,d=o.nextSibling,p=d.firstChild,_=p.firstChild,[v,y]=s(_.nextSibling),b=v.nextSibling,S=p.nextSibling,C=S.firstChild,[w,T]=s(C.nextSibling),E=w.nextSibling,[j,M]=s(E.nextSibling),N=S.nextSibling,P=N.firstChild,[F,I]=s(P.nextSibling),L=F.nextSibling,z=L.firstChild,B=z.nextSibling,V=B.nextSibling,H=V.nextSibling,U=H.nextSibling,ne=N.nextSibling,[W,re]=s(ne.nextSibling),ie=W.nextSibling,[G,ae]=s(ie.nextSibling),K=G.nextSibling,[q,oe]=s(K.nextSibling),se=q.nextSibling,[J,ce]=s(se.nextSibling),Y=J.nextSibling,X=Y.firstChild,Z=X.nextSibling.nextSibling,[le,ue]=s(Z.nextSibling),Q=Y.nextSibling.firstChild,$=Q.nextSibling.nextSibling;return h(o,(()=>{var t=c(()=>!!r().id);return()=>t()?e(`webhooks.edit`):e(`webhooks.create`)})()),d.addEventListener(`submit`,te),h(p,()=>e(`webhooks.url`),v,y),b.$$input=e=>x({...r(),url:e.currentTarget.value}),h(S,()=>e(`webhooks.events`),w,T),h(S,a(ee,{get options(){return m()},get value(){return r().events??[]},onChange:e=>x({...r(),events:e}),get placeholder(){return e(`webhooks.selectEvents`)},get searchPlaceholder(){return e(`webhooks.searchEvents`)},get empty(){return e(`webhooks.noEvents`)}}),j,M),h(N,()=>e(`webhooks.authentication`),F,I),L.addEventListener(`change`,e=>x({...r(),auth_type:e.currentTarget.value,auth_config:{}})),h(z,()=>e(`webhooks.auth.none`)),h(B,()=>e(`webhooks.auth.bearer`)),h(V,()=>e(`webhooks.auth.basic`)),h(H,()=>e(`webhooks.auth.apiKey`)),h(U,()=>e(`webhooks.auth.hmac_sha256`)),h(d,a(n,{get when(){return r().auth_type===`bearer`},get children(){var n=f(D),i=n.firstChild,[a,o]=s(i.nextSibling),c=a.nextSibling;return h(n,()=>e(`webhooks.token`),a,o),c.$$input=e=>R(`token`,e.currentTarget.value),t(()=>l(c,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(c,`value`,r().auth_config.token??``)),g(),n}}),W,re),h(d,a(n,{get when(){return r().auth_type===`basic`},get children(){var n=f(O),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.username`),o,c),d.$$input=e=>R(`username`,e.currentTarget.value),h(p,()=>e(`webhooks.password`),_,v),y.$$input=e=>R(`password`,e.currentTarget.value),t(()=>l(y,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(d,`value`,r().auth_config.username??``)),t(()=>u(y,`value`,r().auth_config.password??``)),g(),n}}),G,ae),h(d,a(n,{get when(){return r().auth_type===`api_key`},get children(){var n=f(O),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.headerName`),o,c),d.$$input=e=>R(`headerName`,e.currentTarget.value),h(p,()=>e(`webhooks.apiKeyValue`),_,v),y.$$input=e=>R(`value`,e.currentTarget.value),t(()=>l(y,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(d,`value`,r().auth_config.headerName??``)),t(()=>u(y,`value`,r().auth_config.value??``)),g(),n}}),q,oe),h(d,a(n,{get when(){return r().auth_type===`hmac_sha256`},get children(){var n=f(k),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.secret`),o,c),d.$$input=e=>R(`secret`,e.currentTarget.value),h(p,()=>e(`webhooks.signatureHeader`),_,v),y.$$input=e=>R(`signatureHeader`,e.currentTarget.value),t(t=>{var n=!r().id,i=r().id?e(`webhooks.keepExisting`):``;return n!==t.e&&u(d,`required`,t.e=n),i!==t.t&&l(d,`placeholder`,t.t=i),t},{e:void 0,t:void 0}),t(()=>u(d,`value`,r().auth_config.secret??``)),t(()=>u(y,`value`,r().auth_config.signatureHeader??`X-Webhook-Signature`)),g(),n}}),J,ce),X.addEventListener(`change`,e=>x({...r(),active:e.currentTarget.checked})),h(Y,()=>e(`webhooks.active`),le,ue),h(Q,()=>e(`common.save`)),$.$$click=()=>x(null),h($,()=>e(`common.cancel`)),t(()=>u(b,`value`,r().url??``)),t(()=>u(L,`value`,r().auth_type)),t(()=>u(X,`checked`,r().active??!0)),g(),i})()}),B,V),h(H,a(n,{get when(){return!P()},get fallback(){return(()=>{var t=f(j);return h(t,()=>e(`webhooks.loading`)),t})()},get children(){return a(n,{get when(){return d().length>0},get fallback(){return(()=>{var t=f(j);return h(t,()=>e(`webhooks.empty`)),t})()},get children(){var t=f(T),n=t.firstChild.firstChild,r=n.firstChild.firstChild,o=r.nextSibling,s=o.nextSibling,l=s.nextSibling,u=l.nextSibling,p=n.nextSibling;return h(r,()=>e(`webhooks.url`)),h(o,()=>e(`webhooks.events`)),h(s,()=>e(`webhooks.authentication`)),h(l,()=>e(`webhooks.active`)),h(u,()=>e(`common.actions`)),h(p,a(i,{get each(){return d()},children:t=>(()=>{var n=f(M),r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=a.nextSibling,s=o.nextSibling.firstChild,l=s.nextSibling.nextSibling;return h(r,()=>t.url),h(i,()=>(t.events??[]).join(`, `)),h(a,()=>e(`webhooks.auth.${t.auth_type??`hmac_sha256`}`)),h(o,(()=>{var n=c(()=>!!t.active);return()=>n()?e(`common.yes`):e(`common.no`)})()),s.$$click=()=>L(t),h(s,()=>e(`common.edit`)),l.$$click=()=>t.id&&void v.deleteWebhook(t.id).then(I),h(l,()=>e(`common.delete`)),g(),n})()})),t}})}})),g(),r})()}m([`click`,`input`]);export{P as WebhooksManager};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime.BpQH8Ho1.js";import{p as t,v as n}from"./solid.8gBSxpeo.js";import{t as r}from"./api.CGA0D2A2.js";var i=[`pt-BR`,`en`,`es-ES`,`ru`,`uk`,`tr`,`he`,`it`,`pl`,`zh-CN`,`ja`,`ar`,`sw`,`yo`,`zu`,`am`,`ha`,`ig`],a={"pt-BR":`Português (Brasil)`,en:`English`,"es-ES":`Español`,ru:`Русский`,uk:`Українська`,tr:`Türkçe`,he:`עברית`,it:`Italiano`,pl:`Polski`,"zh-CN":`中文 (简体)`,ja:`日本語`,ar:`العربية`,sw:`Kiswahili`,yo:`Yorùbá`,zu:`isiZulu`,am:`አማርኛ`,ha:`Hausa`,ig:`Igbo`},o={"pt-BR":`🇧🇷`,en:`🇺🇸`,"es-ES":`🇪🇸`,ru:`🇷🇺`,uk:`🇺🇦`,tr:`🇹🇷`,he:`🇮🇱`,it:`🇮🇹`,pl:`🇵🇱`,"zh-CN":`🇨🇳`,ja:`🇯🇵`,ar:`🇸🇦`,sw:`🇹🇿`,yo:`🇳🇬`,zu:`🇿🇦`,am:`🇪🇹`,ha:`🇳🇬`,ig:`🇳🇬`};function s(e){return i.includes(e)}var ee=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},te=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),ne=function(e){return`/`+e},c={},l=function(e){return e.pathname.endsWith(`.css`)},u=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=ne(t,n);let r=s(t);if(r.href in c)return;c[r.href]=!0;let i=l(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:te,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},d=new Map;async function f(e){if(d.has(e))return d.get(e);try{let t=await ee(Object.assign({"./locales/ar.json":()=>u(()=>import(`./ar.9BcNkJMI.js`),[]),"./locales/en.json":()=>u(()=>Promise.resolve().then(()=>b),void 0),"./locales/es-ES.json":()=>u(()=>import(`./es-ES.DgqDFCmG.js`),[]),"./locales/he.json":()=>u(()=>import(`./he.11dIJHQw.js`),[]),"./locales/it.json":()=>u(()=>import(`./it.yCdgk3Xj.js`),[]),"./locales/ja.json":()=>u(()=>import(`./ja.BIm7Hwe_.js`),[]),"./locales/pl.json":()=>u(()=>import(`./pl.dUwrcITB.js`),[]),"./locales/pt-BR.json":()=>u(()=>import(`./pt-BR.dxAFMMtn.js`),[]),"./locales/ru.json":()=>u(()=>import(`./ru.lmDiQaSu.js`),[]),"./locales/sw.json":()=>u(()=>import(`./sw._qHdoFbp.js`),[]),"./locales/tr.json":()=>u(()=>import(`./tr.Do-lr98T.js`),[]),"./locales/uk.json":()=>u(()=>import(`./uk.DTUX-N1c.js`),[]),"./locales/yo.json":()=>u(()=>import(`./yo.BIYG0J7I.js`),[]),"./locales/zh-CN.json":()=>u(()=>import(`./zh-CN.C7Iod1E1.js`),[])}),`./locales/${e}.json`,3),n=t.default??t;return d.set(e,n),n}catch{return e===`en`?{}:f(`en`)}}var p=`admin_locale`;function m(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|; )${p}=([^;]+)`));return e?.[1]&&i.includes(e[1])?e[1]:null}function h(e){typeof document<`u`&&(document.cookie=`${p}=${e}; path=/; max-age=31536000; SameSite=Lax`)}function g(){if(typeof navigator>`u`)return`en`;let e=navigator.language?.split(`-`)[0]?.toLowerCase(),t=navigator.language?.toLowerCase();for(let n of i)if(n.toLowerCase()===t||n.split(`-`)[0]===e)return n;return`en`}async function _(){try{let e=await r.getUserLocale();if(e&&i.includes(e))return e}catch{}return null}async function v(e){await r.setUserLocale(e)}async function re(){return m()||await _()||g()||`en`}async function y(e){h(e);try{await v(e)}catch{}}var b=e({access:()=>k,activity:()=>I,adminBar:()=>L,common:()=>F,content:()=>C,dashboard:()=>S,default:()=>V,footer:()=>R,helpTabs:()=>z,layout:()=>x,login:()=>P,logs:()=>A,media:()=>w,menus:()=>D,plugins:()=>M,resources:()=>O,screenOptions:()=>B,settings:()=>E,themes:()=>N,users:()=>T,webhooks:()=>j}),x={appName:`OkCMS`,admin:`Admin`,nav:{dashboard:`Dashboard`,content:`Content`,media:`Media`,users:`Users`,menus:`Menus`,settings:`Settings`,plugins:`Plugins`,themes:`Themes`},actions:{logout:`Logout`,newPost:`New Post`,uploadMedia:`Upload Media`,addUser:`Add User`,openSettings:`Settings`}},S={title:`Dashboard`,stats:{totalContent:`Total Content`,published:`Published`,drafts:`Drafts`,mediaFiles:`Media Files`,users:`Users`},recent:{title:`Recent Content`,viewAll:`View All`,empty:`No content yet — create your first!`,columns:{title:`Title`,type:`Type`,status:`Status`,updated:`Updated`}},widgets:{atGlance:`At a Glance`,posts:`Posts`,postsDesc:`Published / Drafts / Trash`,pages:`Pages`,pagesDesc:`Published / Drafts / Trash`,media:`Media`,mediaDesc:`Files in the library`,users:`Users`,usersDesc:`Total / Active / Inactive`,version:`Version`,storage:`Storage`,quickDraft:{title:`Quick Draft`,heading:`Title`,headingPlaceholder:`Give your draft a title`,content:`Content`,contentPlaceholder:`What's on your mind?`,save:`Save Draft`,yourDrafts:`Your Drafts`,noDrafts:`No drafts yet.`},activity:{title:`Activity`,empty:`No activity yet.`}}},C={list:{title:`Content`,description:`Search, filter, edit and publish your content.`,typeNotFound:`This content type was not found.`,columns:{title:`Title`,type:`Type`,status:`Status`,updated:`Updated`},actions:{edit:`Edit`,publish:`Publish`,unpublish:`Unpublish`,delete:`Delete`},filters:{search:`Search content…`,allTypes:`All types`,allStatus:`All status`},buttons:{new:`+ New content`,addNew:`+ Add new`,search:`Search`},all:`All content`,empty:`No content found.`,statuses:{draft:`Draft`,published:`Published`,archived:`Archived`},confirmDelete:`Delete "{title}"?`,toasts:{published:`Content published ✓`,unpublished:`Content unpublished ✓`}},editor:{type:`Type`,adding:`Add new`,editing:`Edit`,backToList:`Back to list`,saving:`Saving…`,title:`Title`,titlePlaceholder:`Add title`,slug:`Slug`,slugPlaceholder:`auto-generated-from-title`,toolbar:`Editor toolbar`,bodyPlaceholder:`Start writing…`,linkPrompt:`Enter the URL:`,excerpt:`Excerpt`,featuredImage:`Featured Image (media ID)`,mediaIdPlaceholder:`Media ID`,featuredImageHint:`Choose a media item from the Media library.`,pageAttributes:`Page attributes`,publishPanel:`Publish`,status:`Status`,statusOptions:{draft:`Draft`,published:`Published`,archived:`Archived`},layout:`Layout`,layoutAuto:`Automatic (theme hierarchy)`,customFields:`Custom Fields`,inspectTypes:`Inspect available types`,save:`Save`,saved:`Content saved successfully.`},taxonomy:{title:`Taxonomy terms`,back:`← Back to content`,choose:`Choose a taxonomy from the content menu.`,notFound:`Taxonomy not found.`,addTerm:`Add new term`,editTerm:`Edit term`,name:`Name`,slug:`Slug`,description:`Description`,descriptionHint:`Manage the terms used by this content type.`,attachedTo:`Attached to`,add:`Add term`,delete:`Delete`,empty:`No terms yet.`,confirmDelete:`Delete "{name}"?`}},w={title:`Media Library`,description:"Upload and manage images, videos and documents. Files are stored in `uploads/` and served publicly.",upload:{dropzone:`Drop files here or`,select:`Select files`,uploading:`Uploading…`,hint:`Images, videos, audio and documents · up to 25MB per file`},toolbar:{search:`Search by name or alt…`,allTypes:`All types`,searchBtn:`Search`},mimeTypes:{png:`PNG`,jpeg:`JPEG`,gif:`GIF`,webp:`WebP`,svg:`SVG`,pdf:`PDF`,mp4:`MP4`,mp3:`MP3`},empty:`No files yet. Upload the first one!`,details:{title:`Details`,titleField:`Title`,file:`File`,type:`Type`,size:`Size`,dimensions:`Dimensions`,uploaded:`Uploaded`,url:`URL`,copy:`Copy`,alt:`Alt text`,caption:`Caption`,description:`Description`,save:`Save details`,replace:`Replace file`,replacing:`Replacing…`,replaceHint:`Keeps this attachment and its metadata.`,delete:`Delete`,close:`Close`,confirmDelete:`Delete "{filename}"? The file will be removed from disk.`,saved:`Details saved ✓`,copied:`URL copied ✓`,copyError:`Could not copy URL`,replaced:`File replaced ✓`},toasts:{uploaded:`{count} file(s) uploaded ✓`}},T={title:`Users`,description:`Manage accounts, roles and project access.`,new:`New User`,toolbar:{search:`Search by name or email…`,allStatus:`All status`,active:`Active`,inactive:`Inactive`,newBtn:`+ New user`,searchBtn:`Search`},table:{name:`Name`,email:`Email`,role:`Role`,status:`Status`,lastAccess:`Last access`,actions:{manage:`Manage`,delete:`Delete`}},empty:`No users found.`,noRole:`No role`,detail:{title:`Manage user`,fields:{name:`Name`,email:`Email`,status:`Status`,role:`Role`,password:`Password`},statusOptions:{active:`Active`,inactive:`Inactive`},rolePlaceholder:`— no role —`,meta:`Created on {created} · last access {lastAccess}`,actions:{save:`Save`,resetPassword:`Reset password`,close:`Close`},passwordPrompt:`New password for {email} (minimum 8 chars):`,passwordError:`Password must be at least 8 characters`,toasts:{roleUpdated:`Role for {name} updated ✓`,passwordChanged:`Password for {name} changed ✓`,saved:`User {name} saved ✓`,deleted:`User {name} deleted ✓`},confirmDelete:`Delete user {email}?`}},E={general:{title:`General`,description:`Basic information displayed on the site.`,back:`← All settings`,fields:{siteTitle:`Site Title`,siteTitlePlaceholder:`My Site`,siteDescription:`Description`,siteDescriptionPlaceholder:`A new site built with OkCMS`,language:`Language`,timezone:`Timezone`,timezonePlaceholder:`America/Sao_Paulo`},saved:`Settings saved ✓`,loading:`Loading…`,save:`Save`},postTypes:{title:`Content Types`,description:`Create custom content types (CPTs) beyond Posts and Pages.`,form:{title:`Create Content Type`,slug:`Slug (singular, e.g.: portfolio)`,slugHint:`Only lowercase letters, numbers and underscore`,singular:`Singular name`,plural:`Plural name`,supports:`Supports`,supportsOptions:{title:`Title`,editor:`Editor`,thumbnail:`Featured Image`,excerpt:`Excerpt`,revisions:`Revisions`},hasArchive:`Has public archive (/slug)`,singleton:`Singleton (only one content entry)`,icon:`Sidebar icon (Lucide name)`,iconHint:`Examples: box, package, shopping-bag, file-text`,editTitle:`Edit Content Type`,update:`Update`,cancel:`Cancel`,create:`Create`},table:{slug:`Slug`,singular:`Singular`,plural:`Plural`,source:`Source`,supports:`Supports`,archive:`Archive`,mode:`Mode`,singleton:`Singleton`,collection:`Collection`,icon:`Icon`,actions:{edit:`Edit`,remove:`Remove`}},sources:{admin:`Admin`,core:`Core`}},taxonomies:{title:`Taxonomies`,description:`Create custom taxonomies and link them to content types.`,form:{title:`Create Taxonomy`,name:`Name (e.g.: Genre)`,slug:`Slug (optional, generated from name)`,slugHint:`Only lowercase letters, numbers and underscore`,hierarchical:`Hierarchical (allows parent/child terms)`,attachTo:`Link to content types`,create:`Create`},table:{taxonomy:`Taxonomy`,hierarchical:`Hierarchical`,attachedTypes:`Linked content types`,actions:{remove:`Remove`}}},customFields:{title:`Custom Fields`,description:`Create field groups, arrange fields and choose which standard fields are visible for each content type.`,contentType:`Content type`,location:{title:`Location rules`,description:`Choose where this field group appears. Rules in the same group use AND; groups use OR.`,parameter:`Location parameter`,operator:`Operator`,chooseValue:`Choose a value`,valuePlaceholder:`Enter a value or slug`,showIf:`Show if`,removeRule:`Remove rule`,required:`Add a value to every location rule.`,addRule:`Add condition`,addGroup:`Add OR group`,remove:`Remove`,and:`AND`,or:`OR`,params:{content_type:`Post type`,content_slug:`Post slug`,taxonomy:`Taxonomy`,term:`Term slug`,user_role:`User role`,page_template:`Page template`,post_status:`Post status`},operators:{eq:`is`,neq:`is not`}},standard:{title:`Standard fields`,description:`Title and slug are required. The other standard fields can be enabled or disabled.`,enabled:`Enabled`,locked:`Required`,fields:{title:`Title`,slug:`Slug`,content:`Content`,excerpt:`Excerpt`,featured_image:`Featured image`,seo_title:`SEO title`,seo_description:`SEO description`,status:`Status`,author:`Author`}},groups:{title:`Field groups`,new:`New field group`,empty:`No custom field groups yet.`,emptyHint:`Create your first group to start modelling your content.`,search:`Search groups…`,groupName:`Group`,status:`Status`,fields:`fields`,appliesTo:`Applies to`,allContentTypes:`All content types`,edit:`Edit`,active:`Active`,inactive:`Inactive`},form:{createTitle:`Create field group`,editTitle:`Edit field group`,title:`Group name`,titlePlaceholder:`Example: Product details`,displayTitle:`Display title`,active:`Active`,backToGroups:`Back to groups`,editorEyebrow:`Field builder`,groupTitleHint:`This name identifies the field set inside the content editor.`,fieldsTitle:`Fields`,fieldsDescription:`Add, configure and order fields. Use the six-dot handle to drag without losing their position.`,noFields:`This group has no fields yet.`,settingsTitle:`Group settings`,settingsDescription:`Presentation and panel visibility options for this panel.`,description:`Description`,labelPlacement:`Label placement`,instructionPlacement:`Instruction placement`,menuOrder:`Menu order`,hideOnScreen:`Hide on edit screen`,hide:{permalink:`Permalink`,content:`Content editor`,excerpt:`Excerpt`,featured_image:`Featured image`,author:`Author`,revisions:`Revisions`,comments:`Comments`},assignTitle:`Location`,assignDescription:`Choose the content type where this field group will be available.`,contentType:`Content type`,position:`Position`,positions:{normal:`Normal`,side:`Sidebar`,after_title:`After title`},displayStyle:`Display style`,displayStyles:{standard:`Standard`,seamless:`Seamless`,grouped:`Grouped`},field:`Field`,fieldName:`Name/key`,fieldNamePlaceholder:`product_code`,fieldLabel:`Label`,fieldLabelPlaceholder:`Product code`,fieldType:`Type`,instructions:`Instructions`,instructionsPlaceholder:`Optional help text for editors`,required:`Required`,options:`Options`,optionsHint:`One option per line: value|Label`,addField:`Add field`,removeField:`Remove`,dragHint:`Drag to reorder`,editField:`Edit`,duplicateField:`Duplicate`,copySuffix:`(copy)`,selectFieldType:`Select field type`,searchFieldTypes:`Search field types…`,popularFields:`Popular`,noMatchingFieldTypes:`No field types found.`,fieldTypeHint:`Choose the type that best represents the value editors will enter in this field.`,selectField:`Select field`,save:`Save group`,cancel:`Cancel`,newFieldDefault:`New field`,saved:`Field group saved.`,deleted:`Field group deleted.`},listEyebrow:`Content structure`,validation:{titleRequired:`Group name is required.`},tabs:{locationRules:`Location rules`,presentation:`Presentation`,groupSettings:`Group settings`},fieldSettings:{general:`General`,fieldLabel:`Field label`,fieldName:`Field name`,instructions:`Instructions`,required:`Required`,defaultValue:`Default value`,placeholder:`Placeholder`,presentation:`Presentation`,wrapperWidth:`Wrapper width (%)`,labelPlacement:`Label`,instructionPlacement:`Instructions`,top:`Above`,left:`Left`,above:`Before field`,below:`After field`,textSettings:`Text`,prepend:`Prepend`,append:`Append`,minLength:`Minimum length`,maxLength:`Maximum length`,rows:`Rows`,newLines:`New lines`,wpautop:`Automatic paragraphs`,none:`None`,numberSettings:`Number`,min:`Minimum`,max:`Maximum`,step:`Step`,choiceSettings:`Choices`,choices:`Choices`,layout:`Layout`,vertical:`Vertical`,horizontal:`Horizontal`,multiple:`Multiple choice`,allowNull:`Allow empty`,mediaSettings:`Media`,returnFormat:`Return format`,array:`Array`,id:`ID`,previewSize:`Preview size`,library:`Library`,all:`All`,uploadedToPost:`Uploaded to this post`,allowedTypes:`Allowed types`,minWidth:`Minimum width`,maxWidth:`Maximum width`,minHeight:`Minimum height`,maxHeight:`Maximum height`,wysiwygSettings:`WYSIWYG`,tabs:`Tabs`,toolbar:`Toolbar`,mediaUpload:`Allow media upload`,dateSettings:`Date and time`,displayFormat:`Display format`,firstDay:`First day`,colorSettings:`Color`,enableOpacity:`Allow opacity`,mapSettings:`Map`,center:`Center`,zoom:`Zoom`,height:`Height`,relationSettings:`Relationship`,postType:`Post type`,taxonomy:`Taxonomy`,booleanSettings:`True/False`,message:`Message`,defaultChecked:`Checked by default`,linkSettings:`Link`,cloneSettings:`Clone`,cloneFields:`Fields to clone`,cloneHint:`One field name per line`,containerSettings:`Structure`,buttonLabel:`Button label`,collapsed:`Collapsed row title field`,subFields:`Subfields`,layouts:`Layouts`,addLayout:`Add layout`,newLayout:`New layout`,layoutName:`Layout name`,layoutLabel:`Layout label`,layoutDisplay:`Layout display`,conditionalLogic:`Conditional logic`,conditionalHint:`Show this field only when the rules match.`,chooseField:`Choose a field`,conditionValue:`Value`,addCondition:`Add condition`,addConditionGroup:`Add OR group`,conditionsAnd:`Conditions in this group use AND.`,choicesHint:`One choice per line in the format value|Label.`,cloneSource:`Source group or field`,cloneSourceHint:`Field group key or field name to copy fields from.`,requiredOn:`Required`,requiredOff:`Not required`,libraryAll:`All`,libraryUploaded:`Uploaded to this post`,ui:`Enhanced UI`,uiHint:`Use enhanced styling for the dropdown.`,wrapperClass:`Wrapper class`,wrapperWidthHint:`CSS width of the field wrapper, e.g. 50%.`,collapsedHint:`Name of the sub-field used as the row title.`,conditionalActive:`Active`,showIf:`Show if`,removeRule:`Remove rule`,and:`AND`,or:`OR`,noLayouts:`No layouts yet.`,validation:`Validation`,advanced:`Advanced`,fieldType:`Type`,fieldNameHint:`Letters, numbers and underscores only.`,ariaLabel:`Field settings`,operators:{eq:`equals`,neq:`does not equal`,gt:`is greater than`,lt:`is less than`,contains:`contains`,hasAny:`has any value`,hasNone:`is empty`}},actions:{delete:`Delete`,confirmDelete:`Delete this field group?`,edit:`Edit`,duplicate:`Duplicate`,activate:`Activate`,deactivate:`Deactivate`,export:`Export`,import:`Import`},import:{description:`Import field groups from a JSON file. The file must contain a field group object or an array of field group objects. Existing groups with the same key will be updated; new groups will be created.`,dropzone:`Click to select a .json file, or drag and drop here`,hint:`File selected. Click Import to proceed.`},loading:`Loading custom fields…`,loadError:`Could not load custom fields.`}},D={title:`Menus`,description:`Create and manage the navigation menus used by your site.`,hint:`Menus are independent from content types and can be rendered by your theme.`,new:`New menu`,create:`Create menu`,edit:`Edit menu`,name:`Name`,slug:`Slug`,items:`Items`,back:`Back to menus`,nameRequired:`Enter a menu name.`,editor:{eyebrow:`Navigation structure`,addItems:`Add menu items`,search:`Search…`,addSelected:`Add selected`,addToMenu:`Add to menu`,structure:`Menu structure`,structureHint:`Drag items to reorder. Use the arrows to create nested submenus.`,empty:`Add items from the panels on the left.`,emptyLevel:`No submenu items.`,drag:`Drag to reorder`,untitled:`Untitled item`,noUrl:`No URL`,up:`Move up`,down:`Move down`,indent:`Make submenu`,outdent:`Move to parent level`,itemSettings:`Item settings`,navigationLabel:`Navigation label`,url:`URL`,titleAttribute:`Title attribute`,cssClasses:`CSS classes`,target:`Open link in`,sameWindow:`Same window`,newWindow:`New window`,xfn:`Link relationship (XFN)`,description:`Description`,remove:`Remove`,settings:`Menu settings`,autoAddPages:`Automatically add new top-level pages to this menu`,autoAddPagesHint:`This setting is saved with the menu and can be used by the active theme.`},sources:{pages:`Pages`,posts:`Posts`,custom:`Custom Links`,customHint:`Add any internal or external URL.`,home:`Home`,contentTypes:`Content type items`,archives:`Content type archives`,taxonomies:`Taxonomy terms`},saved:`Menu saved.`,deleted:`Menu deleted.`,empty:`No menus yet.`,confirmDelete:`Delete menu "{name}"?`},O={title:`Content Resources`,description:`Description`,tabs:{category:`Categories`,tag:`Tags`,menu:`Menus`},new:`New resource`,name:`Name`,slug:`Slug`,items:`Menu items (JSON)`,saved:`Resource saved.`,confirmDelete:`Delete this resource?`,form:{new:`Create resource`,edit:`Edit resource`},terms:{title:`Taxonomy terms`,choose:`Choose a taxonomy`,new:`New term`}},k={title:`Access`,description:`Manage roles, permissions and tenants.`,roles:`Roles`,tenants:`Tenants`,permissions:`Permissions (comma separated)`,domain:`Domain`},A={title:`Logs`,description:`Complete audit history of actions performed in the CMS.`,retentionTitle:`Log retention`,retentionDescription:`Logs older than this period are removed automatically.`,retentionDays:`Keep logs for (days)`,retentionSaved:`Log retention updated.`,historyTitle:`Audit history`,actionFilter:`Filter by action`,resourceFilter:`Filter by resource`,loading:`Loading logs…`,empty:`No actions recorded yet.`,system:`System`,columns:{date:`Date`,action:`Action`,resource:`Resource`,user:`User`,status:`Status`,ip:`IP`}},j={title:`Webhooks`,description:`Send CMS events to external services with configurable authentication.`,listTitle:`Configured webhooks`,new:`New webhook`,create:`Create webhook`,edit:`Edit webhook`,url:`Endpoint URL`,events:`Events`,selectEvents:`Select one or more events`,searchEvents:`Search events…`,noEvents:`No events found.`,eventsRequired:`Select at least one event.`,authentication:`Authentication`,active:`Active`,token:`Bearer token`,username:`Username`,password:`Password`,headerName:`Header name`,apiKeyValue:`API key value`,secret:`HMAC secret`,signatureHeader:`Signature header`,keepExisting:`Leave blank to keep current value`,loading:`Loading webhooks…`,empty:`No webhooks configured.`,auth:{none:`None`,bearer:`Bearer token`,basic:`Basic authentication`,apiKey:`API key`,hmac_sha256:`HMAC SHA-256`}},M={title:`Plugins`,description:`Manage installed plugins.`,directoryHint:`Detected automatically from the project's plugins/ directory. Use the CLI or deploy files to add extensions.`,columns:{name:`Name`,version:`Version`,status:`Status`,actions:`Actions`},status:{active:`Active`,installed:`Installed`,inactive:`Inactive`},activate:`Activate`,deactivate:`Deactivate`,install:`Install plugin`,uninstall:`Uninstall`,confirmUninstall:`Uninstall {name}?`,name:`Plugin name`,version:`Version`,manifest:`Manifest (JSON)`,loadError:`Could not load plugins.`,activateError:`Could not activate the plugin.`,deactivateError:`Could not deactivate the plugin.`,installError:`Could not install the plugin.`,uninstallError:`Could not uninstall the plugin.`,empty:`No plugins installed.`},N={title:`Themes`,description:`Manage installed themes.`,directoryHint:`Detected automatically from the project's themes/ directory. Use the CLI or deploy files to add themes.`,version:`Version`,active:`Active`,status:{active:`Active`,installed:`Installed`,inactive:`Inactive`},activate:`Activate`,deactivate:`Deactivate`,install:`Install theme`,uninstall:`Uninstall`,confirmUninstall:`Uninstall {name}?`,name:`Theme name`,manifest:`Manifest (JSON)`,loadError:`Could not load themes.`,activateError:`Could not activate the theme.`,deactivateError:`Could not deactivate the theme.`,installError:`Could not install the theme.`,uninstallError:`Could not uninstall the theme.`,empty:`No themes installed.`},P={title:`Login`,subtitle:`Sign in to your account`,email:`Email`,password:`Password`,submit:`Sign In`,failed:`Invalid email or password`},F={save:`Save`,cancel:`Cancel`,delete:`Delete`,edit:`Edit`,close:`Close`,confirm:`Confirm`,loading:`Loading…`,yes:`Yes`,no:`No`,search:`Search`,filter:`Filter`,create:`Create`,update:`Update`,remove:`Remove`,viewAll:`View All`,back:`Back`,next:`Next`,previous:`Previous`,page:`Page`,of:`of`,items:`items`,item:`item`,empty:`No {items} found.`,toast:{success:`✓`,error:`Error: {message}`},status:{active:`Active`,inactive:`Inactive`,draft:`Draft`,published:`Published`,archived:`Archived`,locked:`Locked`},language:`Language`,refresh:`Refresh`,actions:`Actions`},I={justNow:`just now`,minAgo:`minutes ago`,ago:`ago`,published:`Published`,updated:`Updated`,newUser:`New user: {name}`},L={mainMenu:`Main menu`,notifications:`Notifications`,notificationsEmpty:`No recent activity`,settings:`Settings`,toggleSidebar:`Toggle sidebar`,userMenu:`User menu`},R={copyright:`© 2026 OkCMS. All rights reserved.`,links:`Links`,website:`Website`,github:`GitHub`,docs:`Documentation`,community:`Community`,poweredBy:`Powered by Oktis Works`},z={title:`Help`,label:`Help`,tabs:`Help topics`,topics:{overview:{label:`Overview`,content:`<h4>Welcome to the OkCMS Dashboard</h4><p>This dashboard gives you an overview of your site's content and activity.</p><h4>Available Widgets</h4><ul><li><strong>At a Glance:</strong> overview of posts, pages, media, and users</li><li><strong>Quick Draft:</strong> save drafts quickly from the dashboard</li><li><strong>Activity:</strong> recent site activity and updates</li></ul>`},content:{label:`Content Management`,content:`<h4>Managing Content</h4><p>Create, edit, and publish content from the Content section.</p><h4>Quick Actions</h4><ul><li>Click "New Content" to create a new post or page</li><li>Use filters to find specific content</li><li>Bulk actions available for multiple items</li></ul>`},media:{label:`Media Library`,content:`<h4>Managing Media</h4><p>Upload and manage images, videos, and documents.</p><h4>Tips</h4><ul><li>Drag and drop files to upload</li><li>Add alt text for accessibility</li><li>Organize with folders (coming soon)</li></ul>`}}},B={title:`Screen Options`,label:`Screen Options`,showOnScreen:`Show on screen`},V={layout:x,dashboard:S,content:C,media:w,users:T,settings:E,menus:D,resources:O,access:k,logs:A,webhooks:j,plugins:M,themes:N,login:P,common:F,activity:I,adminBar:L,footer:R,helpTabs:z,screenOptions:B},H=new Map,U=V,[W,G]=t(0),K=null;function q(e){return(e.split(`.`).at(-1)??e).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).replace(/\s+/g,` `).trim().replace(/^\w/,e=>e.toUpperCase())}function J(e,t){return function(n,r){let i=n.split(`.`),a=e;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else{a=t;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else return q(n);break}return typeof a==`string`?r?a.replace(/\{(\w+)\}/g,(e,t)=>String(r[t]??``)):a:q(n)}}async function Y(e){if(H.has(e))return H.get(e);let[t,n]=await Promise.all([f(e),f(`en`)]),r=J(t,n);return H.set(e,r),r}var X=J(U,U),Z=`en`,Q=!0,ie=`okcms:locale-changed`;function $(){typeof window<`u`&&window.dispatchEvent(new CustomEvent(ie,{detail:{locale:Z}}))}function ae(e){return n(async()=>{Q&&(K||=(async()=>{let t=e??await re();Z=t,X=await Y(t),Q=!1,G(e=>e+1),$()})(),await K)}),{t:(e,t)=>(W(),X(e,t)),locale:()=>(W(),Z),changeLocale:async e=>{Q=!0,Z=e,X=await Y(e),Q=!1,G(e=>e+1),$(),await y(e)},get loading(){return Q}}}export{a,o as i,ae as n,i as o,h as r,s,Y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={name:`okcms`,version:`0.6.3`,private:!0,description:`Hybrid, modular, API-first CMS`,engines:{node:`>=20.0.0`,bun:`>=1.3.0`},workspaces:[`apps/*`,`packages/*`,`plugins/*`,`themes/*`],overrides:{ioredis:`5.3.0`},scripts:{dev:`bun run --filter '@oktis-works/*' dev`,build:`bun run --filter '@oktis-works/*' build`,test:`vitest`,"test:run":`vitest run`,lint:`eslint .`,typecheck:`tsc --noEmit`,clean:`rm -rf node_modules apps/*/node_modules packages/*/node_modules`,changeset:`changeset`,"version-packages":`changeset version && node scripts/sync-version.mjs --write`,"sync-version":`node scripts/sync-version.mjs`,"publish:all":`node scripts/prepare-publish.mjs && for pkg in packages/* apps/api apps/admin apps/web apps/worker; do [ -f "$pkg/package.json" ] || continue; echo "→ publishing $pkg"; (cd "$pkg" && npm publish --access public) || exit 1; done`},devDependencies:{"@oktis-works/cms":`^0.
|
|
1
|
+
var e={name:`okcms`,version:`0.6.3`,private:!0,description:`Hybrid, modular, API-first CMS`,engines:{node:`>=20.0.0`,bun:`>=1.3.0`},workspaces:[`apps/*`,`packages/*`,`plugins/*`,`themes/*`],overrides:{ioredis:`5.3.0`},scripts:{dev:`bun run --filter '@oktis-works/*' dev`,build:`bun run --filter '@oktis-works/*' build`,test:`vitest`,"test:run":`vitest run`,lint:`eslint .`,typecheck:`tsc --noEmit`,clean:`rm -rf node_modules apps/*/node_modules packages/*/node_modules`,changeset:`changeset`,"version-packages":`changeset version && node scripts/sync-version.mjs --write`,"sync-version":`node scripts/sync-version.mjs`,"publish:all":`node scripts/prepare-publish.mjs && for pkg in packages/* apps/api apps/admin apps/web apps/worker; do [ -f "$pkg/package.json" ] || continue; echo "→ publishing $pkg"; (cd "$pkg" && npm publish --access public) || exit 1; done`},devDependencies:{"@oktis-works/cms":`^0.7.0`,"@changesets/changelog-github":`^1.0.1`,"@changesets/cli":`^3.0.3`,"@types/node":`22.0.0`,"@types/semver":`7.7.0`,"@typescript-eslint/eslint-plugin":`^8.71.0`,"@typescript-eslint/parser":`8.0.0`,autoprefixer:`^10.6.1`,eslint:`9.0.0`,playwright:`1.59.1`,"playwright-core":`1.59.1`,postcss:`^8.5.28`,sass:`^1.105.1`,tailwindcss:`^4.3.3`,typescript:`5.7.3`,"typescript-eslint":`8.31.0`,vitest:`3.0.0`},packageManager:`bun@1.3.14`}.version;export{e as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
2
|
-
import { a as For2, f as createMemo$1, p as createSignal$1, u as Show2 } from "./
|
|
2
|
+
import { a as For2, f as createMemo$1, p as createSignal$1, u as Show2 } from "./DashboardLayout_BZ4LWho6.mjs";
|
|
3
3
|
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
4
4
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
|
5
5
|
//#region ../../packages/validation/dist/client-validate.js
|
|
@@ -1,7 +1,7 @@
|
|
|
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 "./
|
|
4
|
+
import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_rswPjbGh.mjs";
|
|
5
5
|
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
6
6
|
import { t as require_semver } from "./semver_WbqCUY_o.mjs";
|
|
7
7
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyle } from "solid-js/web";
|
|
@@ -641,7 +641,7 @@ var APP_VERSION = {
|
|
|
641
641
|
"publish:all": "node scripts/prepare-publish.mjs && for pkg in packages/* apps/api apps/admin apps/web apps/worker; do [ -f \"$pkg/package.json\" ] || continue; echo \"→ publishing $pkg\"; (cd \"$pkg\" && npm publish --access public) || exit 1; done"
|
|
642
642
|
},
|
|
643
643
|
devDependencies: {
|
|
644
|
-
"@oktis-works/cms": "^0.
|
|
644
|
+
"@oktis-works/cms": "^0.7.0",
|
|
645
645
|
"@changesets/changelog-github": "^1.0.1",
|
|
646
646
|
"@changesets/cli": "^3.0.3",
|
|
647
647
|
"@types/node": "22.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
2
|
-
import { a as For2, c as Pagination, l as Select, m as onMount, o as Input, p as createSignal, r as Button, s as Modal, u as Show2 } from "./
|
|
2
|
+
import { a as For2, c as Pagination, l as Select, m as onMount, o as Input, p as createSignal, r as Button, s as Modal, u as Show2 } from "./DashboardLayout_BZ4LWho6.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$ = [
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_BZ4LWho6.mjs";
|
|
6
6
|
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
7
7
|
import { t as FbIcon } from "./FbIcon_D0f6QiFJ.mjs";
|
|
8
8
|
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
@@ -6166,13 +6166,23 @@ var _tmpl$20 = [
|
|
|
6166
6166
|
"<!--/--></label>"
|
|
6167
6167
|
];
|
|
6168
6168
|
/**
|
|
6169
|
+
* Memória de aba por field: o patch de settings recria o objeto do field e o
|
|
6170
|
+
* `<For>` remonta a linha — sem isso a aba voltava para General a cada clique
|
|
6171
|
+
* (ex.: marcar "required" na aba Validation). Chaveada por clientId.
|
|
6172
|
+
*/
|
|
6173
|
+
var tabMemory = /* @__PURE__ */ new Map();
|
|
6174
|
+
/**
|
|
6169
6175
|
* Field settings editor: the five canonical tabs (General, Validation,
|
|
6170
6176
|
* Presentation, Conditional Logic, Advanced). Type-specific settings are
|
|
6171
6177
|
* injected into the correct tab. Uses the shared `config` JSON bag, matching
|
|
6172
6178
|
* the backend field model.
|
|
6173
6179
|
*/
|
|
6174
6180
|
function FieldSettingsEditor(props) {
|
|
6175
|
-
const [tab, setTab] = createSignal("general");
|
|
6181
|
+
const [tab, setTab] = createSignal(tabMemory.get(props.field.clientId) ?? "general");
|
|
6182
|
+
const selectTab = (id) => {
|
|
6183
|
+
tabMemory.set(props.field.clientId, id);
|
|
6184
|
+
setTab(id);
|
|
6185
|
+
};
|
|
6176
6186
|
const { t, field } = props;
|
|
6177
6187
|
const cfg = (key, fallback = "") => String(props.field.config[key] ?? fallback);
|
|
6178
6188
|
const bool = (key, fallback = false) => {
|
|
@@ -6760,7 +6770,7 @@ function FieldSettingsEditor(props) {
|
|
|
6760
6770
|
get active() {
|
|
6761
6771
|
return tab();
|
|
6762
6772
|
},
|
|
6763
|
-
onChange:
|
|
6773
|
+
onChange: selectTab,
|
|
6764
6774
|
get tabs() {
|
|
6765
6775
|
return [
|
|
6766
6776
|
{
|
|
@@ -7051,17 +7061,34 @@ function FieldListEditor(props) {
|
|
|
7051
7061
|
const { t } = props;
|
|
7052
7062
|
const [modalOpen, setModalOpen] = createSignal(false);
|
|
7053
7063
|
const patchField = (id, patch) => {
|
|
7054
|
-
const walk = (fields) =>
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7064
|
+
const walk = (fields) => {
|
|
7065
|
+
let changed = false;
|
|
7066
|
+
const next = fields.map((field) => {
|
|
7067
|
+
if (field.clientId === id) {
|
|
7068
|
+
changed = true;
|
|
7069
|
+
return {
|
|
7070
|
+
...field,
|
|
7071
|
+
...patch
|
|
7072
|
+
};
|
|
7073
|
+
}
|
|
7074
|
+
const subFields = walk(field.subFields);
|
|
7075
|
+
const layouts = field.layouts.map((layout) => {
|
|
7076
|
+
const layoutSubFields = walk(layout.subFields);
|
|
7077
|
+
return layoutSubFields === layout.subFields ? layout : {
|
|
7078
|
+
...layout,
|
|
7079
|
+
subFields: layoutSubFields
|
|
7080
|
+
};
|
|
7081
|
+
});
|
|
7082
|
+
if (subFields === field.subFields && layouts === field.layouts) return field;
|
|
7083
|
+
changed = true;
|
|
7084
|
+
return {
|
|
7085
|
+
...field,
|
|
7086
|
+
subFields,
|
|
7087
|
+
layouts
|
|
7088
|
+
};
|
|
7089
|
+
});
|
|
7090
|
+
return changed ? next : fields;
|
|
7091
|
+
};
|
|
7065
7092
|
props.onChange(walk(props.fields));
|
|
7066
7093
|
};
|
|
7067
7094
|
const duplicate = (field) => {
|
|
@@ -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, p as addAttribute, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
3
3
|
import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_BZ4LWho6.mjs";
|
|
5
5
|
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
6
6
|
//#region src/pages/plugins/[slug].astro
|
|
7
7
|
var _slug__exports = /* @__PURE__ */ __exportAll({
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_BZ4LWho6.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";
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
5
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_BZ4LWho6.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,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 } from "./compiler_O7J1rlsi.mjs";
|
|
4
|
-
import { t as $$DashboardLayout } from "./
|
|
5
|
-
import { t as ContentEditor } from "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_BZ4LWho6.mjs";
|
|
5
|
+
import { t as ContentEditor } from "./ContentEditor_D1zPgg8f.mjs";
|
|
6
6
|
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
7
7
|
//#region src/pages/content/[type]/edit.astro
|
|
8
8
|
var edit_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
|
|
2
|
+
import { S as createAstro, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
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_B-Vk5esc.mjs";
|
|
5
|
+
import { f as createMemo$1, i as Card, l as Select, m as onMount$1, o as Input, p as createSignal$1, r as Button, t as $$DashboardLayout, u as Show2 } from "./DashboardLayout_BZ4LWho6.mjs";
|
|
6
|
+
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
7
|
+
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
8
|
+
import { For, Show, createMemo, createSignal, onCleanup, onMount } from "solid-js";
|
|
9
|
+
//#region src/components/apps/settings/TimezoneSelect.tsx
|
|
10
|
+
var _tmpl$$1 = [
|
|
11
|
+
"<div",
|
|
12
|
+
" class=\"tz-select__panel\" role=\"listbox\"><input type=\"search\" class=\"input tz-select__search\"",
|
|
13
|
+
" autofocus><div class=\"tz-select__options\">",
|
|
14
|
+
"</div></div>"
|
|
15
|
+
];
|
|
16
|
+
var _tmpl$2$1 = [
|
|
17
|
+
"<div",
|
|
18
|
+
" class=\"tz-select\"><button type=\"button\" class=\"input tz-select__trigger\" aria-haspopup=\"listbox\"",
|
|
19
|
+
"><span class=\"tz-select__value\">",
|
|
20
|
+
"</span><span aria-hidden=\"true\">",
|
|
21
|
+
"</span></button><!--$-->",
|
|
22
|
+
"<!--/--></div>"
|
|
23
|
+
];
|
|
24
|
+
var _tmpl$3$1 = ["<p", " class=\"tz-select__empty\">—</p>"];
|
|
25
|
+
var _tmpl$4$1 = [
|
|
26
|
+
"<button",
|
|
27
|
+
" type=\"button\" role=\"option\"",
|
|
28
|
+
" class=\"",
|
|
29
|
+
"\">",
|
|
30
|
+
"</button>"
|
|
31
|
+
];
|
|
32
|
+
var formatterCache = /* @__PURE__ */ new Map();
|
|
33
|
+
/** Offset atual da zona: `{ label: 'UTC-03:00', minutes: -180 }`. */
|
|
34
|
+
function offsetInfo(tz) {
|
|
35
|
+
let dtf = formatterCache.get(tz);
|
|
36
|
+
if (!dtf) {
|
|
37
|
+
dtf = new Intl.DateTimeFormat("en-US", {
|
|
38
|
+
timeZone: tz,
|
|
39
|
+
timeZoneName: "longOffset"
|
|
40
|
+
});
|
|
41
|
+
formatterCache.set(tz, dtf);
|
|
42
|
+
}
|
|
43
|
+
const match = (dtf.formatToParts(/* @__PURE__ */ new Date()).find((part) => part.type === "timeZoneName")?.value ?? "GMT").match(/GMT([+-])(\d{2}):(\d{2})/);
|
|
44
|
+
if (!match) return {
|
|
45
|
+
label: "UTC+00:00",
|
|
46
|
+
minutes: 0
|
|
47
|
+
};
|
|
48
|
+
const minutes = (match[1] === "-" ? -1 : 1) * (Number(match[2]) * 60 + Number(match[3]));
|
|
49
|
+
return {
|
|
50
|
+
label: `UTC${match[1]}${match[2]}:${match[3]}`,
|
|
51
|
+
minutes
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Lista completa: UTC no topo + zonas IANA ordenadas por offset e nome. */
|
|
55
|
+
function buildTimezoneOptions() {
|
|
56
|
+
const intl = Intl;
|
|
57
|
+
const options = (typeof intl.supportedValuesOf === "function" ? intl.supportedValuesOf("timeZone") : ["UTC"]).map((tz) => {
|
|
58
|
+
const { label, minutes } = offsetInfo(tz);
|
|
59
|
+
return {
|
|
60
|
+
tz,
|
|
61
|
+
label: `(UTC${label.slice(3)}) ${tz}`,
|
|
62
|
+
minutes
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
options.sort((a, b) => a.minutes - b.minutes || a.tz.localeCompare(b.tz));
|
|
66
|
+
return [{
|
|
67
|
+
tz: "UTC",
|
|
68
|
+
label: "(UTC+00:00) UTC",
|
|
69
|
+
minutes: 0
|
|
70
|
+
}, ...options];
|
|
71
|
+
}
|
|
72
|
+
/** Normaliza para busca: sem caixa, `/` e `_` viram espaço. */
|
|
73
|
+
var normalize = (text) => text.toLowerCase().replace(/[/_\-]/g, " ");
|
|
74
|
+
function TimezoneSelect(props) {
|
|
75
|
+
const [open, setOpen] = createSignal(false);
|
|
76
|
+
const [query, setQuery] = createSignal("");
|
|
77
|
+
const options = createMemo(() => buildTimezoneOptions());
|
|
78
|
+
const selected = createMemo(() => options().find((option) => option.tz === props.value));
|
|
79
|
+
const filtered = createMemo(() => {
|
|
80
|
+
const q = normalize(query().trim());
|
|
81
|
+
if (!q) return options();
|
|
82
|
+
return options().filter((option) => normalize(option.label).includes(q));
|
|
83
|
+
});
|
|
84
|
+
onMount(() => {
|
|
85
|
+
const close = (event) => {};
|
|
86
|
+
const onKey = (event) => {
|
|
87
|
+
if (event.key === "Escape") setOpen(false);
|
|
88
|
+
};
|
|
89
|
+
document.addEventListener("mousedown", close);
|
|
90
|
+
document.addEventListener("keydown", onKey);
|
|
91
|
+
onCleanup(() => {
|
|
92
|
+
document.removeEventListener("mousedown", close);
|
|
93
|
+
document.removeEventListener("keydown", onKey);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
return ssr(_tmpl$2$1, ssrHydrationKey(), ssrAttribute("aria-expanded", escape(open(), true), false), escape(selected()?.label ?? props.placeholder ?? ""), open() ? "▴" : "▾", escape(createComponent(Show, {
|
|
97
|
+
get when() {
|
|
98
|
+
return open();
|
|
99
|
+
},
|
|
100
|
+
get children() {
|
|
101
|
+
return ssr(_tmpl$$1, ssrHydrationKey(), ssrAttribute("placeholder", escape(props.searchPlaceholder ?? props.placeholder ?? "", true), false) + ssrAttribute("value", escape(query(), true), false), escape(createComponent(Show, {
|
|
102
|
+
get when() {
|
|
103
|
+
return filtered().length > 0;
|
|
104
|
+
},
|
|
105
|
+
get fallback() {
|
|
106
|
+
return ssr(_tmpl$3$1, ssrHydrationKey());
|
|
107
|
+
},
|
|
108
|
+
get children() {
|
|
109
|
+
return createComponent(For, {
|
|
110
|
+
get each() {
|
|
111
|
+
return filtered();
|
|
112
|
+
},
|
|
113
|
+
children: (option) => ssr(_tmpl$4$1, ssrHydrationKey(), ssrAttribute("aria-selected", escape(props.value, true) === escape(option.tz, true), false), `tz-select__option ${props.value === option.tz ? "is-selected" : ""}`, escape(option.label))
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
})));
|
|
117
|
+
}
|
|
118
|
+
})));
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/components/apps/settings/GeneralSettings.tsx
|
|
122
|
+
var _tmpl$ = [
|
|
123
|
+
"<div",
|
|
124
|
+
" class=\"notice notice--error\">",
|
|
125
|
+
"</div>"
|
|
126
|
+
];
|
|
127
|
+
var _tmpl$2 = [
|
|
128
|
+
"<div",
|
|
129
|
+
" class=\"notice\">",
|
|
130
|
+
"</div>"
|
|
131
|
+
];
|
|
132
|
+
var _tmpl$3 = [
|
|
133
|
+
"<form",
|
|
134
|
+
"><div class=\"form-grid\">",
|
|
135
|
+
"</div><div class=\"media-details__actions\">",
|
|
136
|
+
"</div></form>"
|
|
137
|
+
];
|
|
138
|
+
var _tmpl$4 = [
|
|
139
|
+
"<div",
|
|
140
|
+
" class=\"general-settings\"><!--$-->",
|
|
141
|
+
"<!--/--><!--$-->",
|
|
142
|
+
"<!--/--><!--$-->",
|
|
143
|
+
"<!--/--></div>"
|
|
144
|
+
];
|
|
145
|
+
var _tmpl$5 = [
|
|
146
|
+
"<p",
|
|
147
|
+
" class=\"muted\">",
|
|
148
|
+
"</p>"
|
|
149
|
+
];
|
|
150
|
+
var _tmpl$6 = [
|
|
151
|
+
"<label",
|
|
152
|
+
" class=\"general-settings__tz\"><!--$-->",
|
|
153
|
+
"<!--/--><!--$-->",
|
|
154
|
+
"<!--/--></label>"
|
|
155
|
+
];
|
|
156
|
+
function GeneralSettings() {
|
|
157
|
+
const { t } = useTranslation();
|
|
158
|
+
const [values, setValues] = createSignal$1({});
|
|
159
|
+
const [loadedLanguage, setLoadedLanguage] = createSignal$1("");
|
|
160
|
+
const [loaded, setLoaded] = createSignal$1(false);
|
|
161
|
+
const [error, setError] = createSignal$1("");
|
|
162
|
+
const [info, setInfo] = createSignal$1("");
|
|
163
|
+
const [saving, setSaving] = createSignal$1(false);
|
|
164
|
+
const languageOptions = createMemo$1(() => SUPPORTED_LOCALES.map((locale) => ({
|
|
165
|
+
value: locale,
|
|
166
|
+
label: `${LOCALE_FLAGS[locale]} ${LOCALE_LABELS[locale]}`
|
|
167
|
+
})));
|
|
168
|
+
const fields = createMemo$1(() => [
|
|
169
|
+
{
|
|
170
|
+
key: "siteTitle",
|
|
171
|
+
label: t("settings.general.fields.siteTitle"),
|
|
172
|
+
type: "text",
|
|
173
|
+
placeholder: t("settings.general.fields.siteTitlePlaceholder")
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
key: "siteDescription",
|
|
177
|
+
label: t("settings.general.fields.siteDescription"),
|
|
178
|
+
type: "text",
|
|
179
|
+
placeholder: t("settings.general.fields.siteDescriptionPlaceholder")
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
key: "language",
|
|
183
|
+
label: t("settings.general.fields.language"),
|
|
184
|
+
type: "select",
|
|
185
|
+
options: languageOptions()
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
key: "timezone",
|
|
189
|
+
label: t("settings.general.fields.timezone"),
|
|
190
|
+
type: "timezone",
|
|
191
|
+
placeholder: t("settings.general.fields.timezonePlaceholder")
|
|
192
|
+
}
|
|
193
|
+
]);
|
|
194
|
+
onMount$1(async () => {
|
|
195
|
+
try {
|
|
196
|
+
const rows = await apiClient.getSettings("general");
|
|
197
|
+
const map = {};
|
|
198
|
+
for (const row of rows) map[row.key] = typeof row.value === "string" ? row.value : JSON.stringify(row.value ?? "");
|
|
199
|
+
for (const field of fields()) if (map[field.key] === void 0) map[field.key] = "";
|
|
200
|
+
if (!map["timezone"]) try {
|
|
201
|
+
map["timezone"] = Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
202
|
+
} catch {
|
|
203
|
+
map["timezone"] = "UTC";
|
|
204
|
+
}
|
|
205
|
+
setLoadedLanguage(map["language"] ?? "");
|
|
206
|
+
setValues(map);
|
|
207
|
+
setLoaded(true);
|
|
208
|
+
} catch (err) {
|
|
209
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
return ssr(_tmpl$4, ssrHydrationKey(), escape(createComponent(Show2, {
|
|
213
|
+
get when() {
|
|
214
|
+
return error();
|
|
215
|
+
},
|
|
216
|
+
get children() {
|
|
217
|
+
return ssr(_tmpl$, ssrHydrationKey(), escape(error()));
|
|
218
|
+
}
|
|
219
|
+
})), escape(createComponent(Show2, {
|
|
220
|
+
get when() {
|
|
221
|
+
return info();
|
|
222
|
+
},
|
|
223
|
+
get children() {
|
|
224
|
+
return ssr(_tmpl$2, ssrHydrationKey(), escape(info()));
|
|
225
|
+
}
|
|
226
|
+
})), escape(createComponent(Show2, {
|
|
227
|
+
get when() {
|
|
228
|
+
return loaded();
|
|
229
|
+
},
|
|
230
|
+
get fallback() {
|
|
231
|
+
return ssr(_tmpl$5, ssrHydrationKey(), escape(t("settings.general.loading")));
|
|
232
|
+
},
|
|
233
|
+
get children() {
|
|
234
|
+
return createComponent(Card, { get children() {
|
|
235
|
+
return ssr(_tmpl$3, ssrHydrationKey(), escape(fields().map((field) => field.type === "select" ? createComponent(Select, {
|
|
236
|
+
get name() {
|
|
237
|
+
return field.key;
|
|
238
|
+
},
|
|
239
|
+
get label() {
|
|
240
|
+
return field.label;
|
|
241
|
+
},
|
|
242
|
+
get value() {
|
|
243
|
+
return values()[field.key] ?? "";
|
|
244
|
+
},
|
|
245
|
+
get options() {
|
|
246
|
+
return field.options ?? [];
|
|
247
|
+
},
|
|
248
|
+
onChange: (value) => setValues({
|
|
249
|
+
...values(),
|
|
250
|
+
[field.key]: value
|
|
251
|
+
})
|
|
252
|
+
}) : field.type === "timezone" ? ssr(_tmpl$6, ssrHydrationKey(), escape(field.label), escape(createComponent(TimezoneSelect, {
|
|
253
|
+
get value() {
|
|
254
|
+
return values()[field.key] ?? "";
|
|
255
|
+
},
|
|
256
|
+
get placeholder() {
|
|
257
|
+
return field.placeholder ?? "";
|
|
258
|
+
},
|
|
259
|
+
get searchPlaceholder() {
|
|
260
|
+
return field.placeholder ?? "";
|
|
261
|
+
},
|
|
262
|
+
onChange: (value) => setValues({
|
|
263
|
+
...values(),
|
|
264
|
+
[field.key]: value
|
|
265
|
+
})
|
|
266
|
+
}))) : createComponent(Input, {
|
|
267
|
+
get name() {
|
|
268
|
+
return field.key;
|
|
269
|
+
},
|
|
270
|
+
get label() {
|
|
271
|
+
return field.label;
|
|
272
|
+
},
|
|
273
|
+
get placeholder() {
|
|
274
|
+
return memo(() => "placeholder" in field)() ? field.placeholder : "";
|
|
275
|
+
},
|
|
276
|
+
get value() {
|
|
277
|
+
return values()[field.key] ?? "";
|
|
278
|
+
},
|
|
279
|
+
onInput: (value) => setValues({
|
|
280
|
+
...values(),
|
|
281
|
+
[field.key]: value
|
|
282
|
+
})
|
|
283
|
+
}))), escape(createComponent(Button, {
|
|
284
|
+
variant: "primary",
|
|
285
|
+
type: "submit",
|
|
286
|
+
get disabled() {
|
|
287
|
+
return saving();
|
|
288
|
+
},
|
|
289
|
+
get loading() {
|
|
290
|
+
return saving();
|
|
291
|
+
},
|
|
292
|
+
get children() {
|
|
293
|
+
return t("settings.general.save");
|
|
294
|
+
}
|
|
295
|
+
})));
|
|
296
|
+
} });
|
|
297
|
+
}
|
|
298
|
+
})));
|
|
299
|
+
}
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region src/pages/settings/general.astro
|
|
302
|
+
var general_exports = /* @__PURE__ */ __exportAll({
|
|
303
|
+
default: () => $$General,
|
|
304
|
+
file: () => $$file,
|
|
305
|
+
url: () => $$url
|
|
306
|
+
});
|
|
307
|
+
createAstro("https://astro.build");
|
|
308
|
+
var $$General = createComponent$1(($$result, $$props, $$slots) => {
|
|
309
|
+
const Astro = $$result.createAstro($$props, $$slots);
|
|
310
|
+
Astro.self = $$General;
|
|
311
|
+
const { t } = Astro.locals;
|
|
312
|
+
return renderTemplate`${renderComponent($$result, "DashboardLayout", $$DashboardLayout, { "title": t("settings.general.title") }, { "default": ($$result) => renderTemplate`${renderComponent($$result, "PageHeader", PageHeader, {
|
|
313
|
+
"title": t("settings.general.title"),
|
|
314
|
+
"description": t("settings.general.description")
|
|
315
|
+
})}${renderComponent($$result, "GeneralSettings", GeneralSettings, {
|
|
316
|
+
"client:load": true,
|
|
317
|
+
"client:component-hydration": "load",
|
|
318
|
+
"client:component-path": "/home/runner/work/cms/cms/apps/admin/src/components/apps/settings/GeneralSettings.tsx",
|
|
319
|
+
"client:component-export": "GeneralSettings"
|
|
320
|
+
})}` })}`;
|
|
321
|
+
}, "/home/runner/work/cms/cms/apps/admin/src/pages/settings/general.astro", void 0);
|
|
322
|
+
var $$file = "/home/runner/work/cms/cms/apps/admin/src/pages/settings/general.astro";
|
|
323
|
+
var $$url = "/settings/general";
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region \0virtual:astro:page:src/pages/settings/general@_@astro
|
|
326
|
+
var page = () => general_exports;
|
|
327
|
+
//#endregion
|
|
328
|
+
export { page };
|
|
@@ -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 "./
|
|
4
|
+
import { t as $$DashboardLayout } from "./DashboardLayout_BZ4LWho6.mjs";
|
|
5
5
|
import { t as PageHeader } from "./PageHeader_CBOioOjo.mjs";
|
|
6
|
-
import { t as MediaLibrary } from "./
|
|
6
|
+
import { t as MediaLibrary } from "./MediaLibrary_BXk-5dLz.mjs";
|
|
7
7
|
//#region src/pages/media/index.astro
|
|
8
8
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
default: () => $$Index,
|