@oneclick.dev/cms-core-modules 0.0.52 → 0.0.54
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/CalendarDate-CRT2Viyt.mjs +830 -0
- package/dist/CalendarDate-CWtpXgpD.js +1 -0
- package/dist/Components-D9yIIosM.mjs +623 -0
- package/dist/Components-DXbx0RLV.js +1 -0
- package/dist/ContentEditor-DRJFQKCv.mjs +34915 -0
- package/dist/ContentEditor-DzTi8fSZ.js +290 -0
- package/dist/Create-BP8TX6rj.js +1 -0
- package/dist/Create-Bwf1RXdG.mjs +1248 -0
- package/dist/DateFormatter-BbcSwTs4.js +1 -0
- package/dist/DateFormatter-CbO0PVUK.mjs +99 -0
- package/dist/Detail-B-PnkcXD.mjs +3473 -0
- package/dist/Detail-BVlGSjOq.mjs +380 -0
- package/dist/Detail-C4E1T87K.mjs +26 -0
- package/dist/Detail-CNfTDUE5.js +1 -0
- package/dist/Detail-Cd5CBVN0.js +1 -0
- package/dist/Detail-CpfOQChd.mjs +585 -0
- package/dist/Detail-CwagT6gQ.mjs +650 -0
- package/dist/Detail-DUo6qKqO.js +1 -0
- package/dist/Detail-Dd_OkpcN.js +1 -0
- package/dist/Detail-mvSGbnFU.js +1 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +1 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +55 -0
- package/dist/Entries-DcpPvlYj.js +1 -0
- package/dist/Entries-QLMtTYLX.mjs +713 -0
- package/dist/Find-BPR0uU-Z.mjs +229 -0
- package/dist/Find-BidEQJxT.js +1 -0
- package/dist/GlobalStyling-CMzPRd18.js +17 -0
- package/dist/GlobalStyling-DoLHUJeV.mjs +988 -0
- package/dist/Overview-BDlBCUI_.js +1 -0
- package/dist/Overview-BH3NwvNX.mjs +26 -0
- package/dist/Overview-BLsZMHNW.mjs +178 -0
- package/dist/Overview-BNMZ9MUK.js +1 -0
- package/dist/Overview-BbvfH1u-.js +1 -0
- package/dist/Overview-CDN88OSM.mjs +190 -0
- package/dist/Overview-CEPodGCn.mjs +311 -0
- package/dist/Overview-CvquDPhB.js +1 -0
- package/dist/Overview-D54pjmI6.mjs +633 -0
- package/dist/Overview-D67UjG6n.mjs +947 -0
- package/dist/Overview-KT2Mgfh5.js +1 -0
- package/dist/Overview-T-lsy3UZ.js +1 -0
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +1 -0
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +392 -0
- package/dist/TableView-CpO53xcX.js +111 -0
- package/dist/TableView-D9J5rUls.mjs +72921 -0
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +1 -0
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs +40 -0
- package/dist/View-DlHBZbFu.js +1 -0
- package/dist/View-Dv5QMrSn.mjs +25 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/agenda-B49oKGeh.mjs +706 -0
- package/dist/agenda-DipQ5IWP.js +1 -0
- package/dist/availability-C7q9tq6l.js +1 -0
- package/dist/availability-DeCkqiu8.mjs +613 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/countries-BTPvmrsb.mjs +4 -0
- package/dist/countries-CgZ081No.js +1 -0
- package/dist/exceptions-D3b18TiY.mjs +647 -0
- package/dist/exceptions-DJ9zWX3k.js +1 -0
- package/dist/floating-ui.dom-C82nbomj.js +1 -0
- package/dist/floating-ui.dom-ouSgPqty.mjs +1133 -0
- package/dist/google-CvtuJwgk.mjs +4 -0
- package/dist/google-D4N3gb01.js +1 -0
- package/dist/index--jjEzba7.mjs +24 -0
- package/dist/index-9HVlmvK3.js +1 -0
- package/dist/index-BEGU8Kme.mjs +12 -0
- package/dist/index-Bwi1mtkq.mjs +24 -0
- package/dist/index-BzuHN-r8.mjs +24 -0
- package/dist/index-CImCyE3L.mjs +24 -0
- package/dist/index-CKPshlZ8-BQiiP6r_.mjs +1264 -0
- package/dist/index-CKPshlZ8-CIz1tDwX.js +1 -0
- package/dist/index-CQiY-oTN.mjs +24 -0
- package/dist/index-CSxYBeVA.js +1 -0
- package/dist/index-CkiNvRzs.js +1 -0
- package/dist/index-Co4ON2Di.js +1 -0
- package/dist/index-CwqrAU-H.js +1 -0
- package/dist/index-Cz-baGax.js +1 -0
- package/dist/index-D2a6wEPh.js +1 -0
- package/dist/index-DFQGVHTs.js +1 -0
- package/dist/index-DI6mydpm.mjs +138 -0
- package/dist/index-DMoyoaks.mjs +22 -0
- package/dist/index-DT1wWnUk.mjs +24 -0
- package/dist/index-DUeFrD-B.js +1 -0
- package/dist/index-DsnoK4ia.mjs +579 -0
- package/dist/index-R2oUDsjx.js +1 -0
- package/dist/index-RLz1QPrf.mjs +203 -0
- package/dist/index-UtjLbLw-.js +1 -0
- package/dist/index-_mG-aU3Z.mjs +87 -0
- package/dist/index-_sQDF1pH.js +1 -0
- package/dist/index-ijdf0d9-.js +1 -0
- package/dist/index-klI238nT.mjs +24 -0
- package/dist/index.cjs.js +1 -357
- package/dist/index.mjs +287 -69281
- package/dist/interpolation-BNUjI7LH.js +1 -0
- package/dist/interpolation-BpGXqOz8.mjs +59 -0
- package/dist/payment-kTjsV0Jj.js +1 -0
- package/dist/payment-zpCM0LD-.mjs +981 -0
- package/dist/regular-C4_3YXqx.mjs +602 -0
- package/dist/regular-DFwPEbZO.js +1 -0
- package/dist/regular-slots-4ooEpICB.mjs +67 -0
- package/dist/regular-slots-BAVGbomI.js +1 -0
- package/dist/resources-MpQkSstv.mjs +563 -0
- package/dist/resources-iM28T3dD.js +1 -0
- package/dist/src/appointments/components/edit/PaymentAddons/Addon.vue.d.ts +12 -2
- package/dist/src/appointments/index.d.ts +4 -28
- package/dist/src/appointments/routes.d.ts +3 -9
- package/dist/src/content-manager/index.d.ts +5 -147
- package/dist/src/content-manager/routes.d.ts +4 -128
- package/dist/src/custom/index.d.ts +2 -2
- package/dist/src/custom/routes.d.ts +1 -1
- package/dist/src/lib/interpolation.d.ts +2 -2
- package/dist/src/mail-templates/index.d.ts +2 -30
- package/dist/src/mail-templates/routes.d.ts +1 -11
- package/dist/src/product-collections/index.d.ts +2 -30
- package/dist/src/product-collections/routes.d.ts +1 -11
- package/dist/src/products/index.d.ts +2 -30
- package/dist/src/products/routes.d.ts +1 -11
- package/dist/src/promo-codes/index.d.ts +2 -30
- package/dist/src/promo-codes/routes.d.ts +1 -11
- package/dist/src/shipping-options/index.d.ts +2 -30
- package/dist/src/shipping-options/routes.d.ts +1 -11
- package/dist/src/table/index.d.ts +2 -70
- package/dist/src/table/routes.d.ts +1 -51
- package/dist/utils-BVKy9S2J.mjs +29 -0
- package/dist/utils-D6CaKJbp.js +2 -0
- package/dist/vee-validate-zod-BPQyEfpF.js +1 -0
- package/dist/vee-validate-zod-IXkfh-6Q.mjs +4402 -0
- package/package.json +28 -29
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function k(e,t){return e-t*Math.floor(e/t)}const ee=1721426;function C(e,t,r,n){t=B(e,t);let a=t-1,c=-2;return r<=2?c=0:A(t)&&(c=-1),ee-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*r-362)/12+c+n)}function A(e){return e%4===0&&(e%100!==0||e%400===0)}function B(e,t){return e==="BC"?1-t:t}function te(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const me={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class m{fromJulianDay(t){let r=t,n=r-ee,a=Math.floor(n/146097),c=k(n,146097),o=Math.floor(c/36524),i=k(c,36524),f=Math.floor(i/1461),d=k(i,1461),x=Math.floor(d/365),w=a*400+o*100+f*4+x+(o!==4&&x!==4?1:0),[D,b]=te(w),y=r-C(D,b,1,1),Z=2;r<C(D,b,3,1)?Z=0:A(b)&&(Z=1);let j=Math.floor(((y+Z)*12+373)/367),be=r-C(D,b,j,1)+1;return new M(D,b,j,be)}toJulianDay(t){return C(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return me[A(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return A(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const pe={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function J(e,t){return t=l(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function re(e,t){return t=l(t,e.calendar),e=T(e),t=T(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function Me(e,t){return H(e.calendar,t.calendar)&&J(e,t)}function xe(e,t){return H(e.calendar,t.calendar)&&re(e,t)}function H(e,t){var r,n,a,c;return(c=(a=(r=e.isEqual)===null||r===void 0?void 0:r.call(e,t))!==null&&a!==void 0?a:(n=t.isEqual)===null||n===void 0?void 0:n.call(t,e))!==null&&c!==void 0?c:e.identifier===t.identifier}function we(e,t){return J(e,ne(t))}function De(e,t,r){let n=e.calendar.toJulianDay(e),a=Ee(t),c=Math.ceil(n+1-a)%7;return c<0&&(c+=7),c}function ge(e){return $(Date.now(),e)}function ne(e){return Ye(ge(e))}function ae(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Ie(e,t){return _(e)-_(t)}function _(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let R=null;function q(){return R==null&&(R=new Intl.DateTimeFormat().resolvedOptions().timeZone),R}function T(e){return e.subtract({days:e.day-1})}function ve(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}const z=new Map,L=new Map;function Se(e){if(Intl.Locale){let r=z.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&z.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function Ee(e){let t=L.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return L.set(e,t),t.firstDay}let r=Se(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&pe[r]||0};L.set(e,t)}return t.firstDay}function g(e){e=l(e,new m);let t=B(e.era,e.year);return ce(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function ce(e,t,r,n,a,c,o){let i=new Date;return i.setUTCHours(n,a,c,o),i.setUTCFullYear(e,t-1,r),i.getTime()}function F(e,t){if(t==="UTC")return 0;if(e>0&&t===q())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:a,hour:c,minute:o,second:i}=oe(e,t);return ce(r,n,a,c,o,i,0)-Math.floor(e/1e3)*1e3}const Q=new Map;function oe(e,t){let r=Q.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Q.set(t,r));let n=r.formatToParts(new Date(e)),a={};for(let c of n)c.type!=="literal"&&(a[c.type]=c.value);return{year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}const X=864e5;function Ce(e,t,r,n){return(r===n?[r]:[r,n]).filter(c=>Ae(e,t,c))}function Ae(e,t,r){let n=oe(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function h(e,t,r="compatible"){let n=I(e);if(t==="UTC")return g(n);if(t===q()&&r==="compatible"){n=l(n,new m);let f=new Date,d=B(n.era,n.year);return f.setFullYear(d,n.month-1,n.day),f.setHours(n.hour,n.minute,n.second,n.millisecond),f.getTime()}let a=g(n),c=F(a-X,t),o=F(a+X,t),i=Ce(n,t,a-c,a-o);if(i.length===1)return i[0];if(i.length>1)switch(r){case"compatible":case"earlier":return i[0];case"later":return i[i.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-c,a-o);case"compatible":case"later":return Math.max(a-c,a-o);case"reject":throw new RangeError("No such absolute time found")}}function ie(e,t,r="compatible"){return new Date(h(e,t,r))}function $(e,t){let r=F(e,t),n=new Date(e+r),a=n.getUTCFullYear(),c=n.getUTCMonth()+1,o=n.getUTCDate(),i=n.getUTCHours(),f=n.getUTCMinutes(),d=n.getUTCSeconds(),x=n.getUTCMilliseconds();return new S(a<1?"BC":"AD",a<1?-a+1:a,c,o,t,r,i,f,d,x)}function Ye(e){return new M(e.calendar,e.era,e.year,e.month,e.day)}function I(e,t){let r=0,n=0,a=0,c=0;if("timeZone"in e)({hour:r,minute:n,second:a,millisecond:c}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:a,millisecond:c}=t),new v(e.calendar,e.era,e.year,e.month,e.day,r,n,a,c)}function l(e,t){if(H(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,p(n),n}function ke(e,t,r){if(e instanceof S)return e.timeZone===t?e:Be(e,t);let n=h(e,t,r);return $(n,t)}function Ue(e){let t=g(e)-e.offset;return new Date(t)}function Be(e,t){let r=g(e)-e.offset;return l($(r,t),e.calendar)}const E=36e5;function O(e,t){let r=e.copy(),n="hour"in r?Le(r,t):0;N(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,W(r),fe(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,Oe(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let a=r.calendar.getYearsInEra(r);if(r.year>a){var c,o;let f=(c=(o=r.calendar).isInverseEra)===null||c===void 0?void 0:c.call(o,r);r.year=a,r.month=f?1:r.calendar.getMonthsInYear(r),r.day=f?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function N(e,t){var r,n;!((r=(n=e.calendar).isInverseEra)===null||r===void 0)&&r.call(n,e)&&(t=-t),e.year+=t}function W(e){for(;e.month<1;)N(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,N(e,1)}function Oe(e){for(;e.day<1;)e.month--,W(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,W(e)}function fe(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function p(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),fe(e)}function le(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function se(e,t){return O(e,le(t))}function P(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),p(r),r}function U(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),Re(r),r}function Ze(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Y(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Y(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Y(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Y(e.hour,24),t}function Re(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Y(e,t){let r=e%t;return r<0&&(r+=t),r}function Le(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Ze(e)}function V(e,t,r,n){let a=e.copy();switch(t){case"era":{let i=e.calendar.getEras(),f=i.indexOf(e.era);if(f<0)throw new Error("Invalid era: "+e.era);f=u(f,r,0,i.length-1,n?.round),a.era=i[f],p(a);break}case"year":var c,o;!((c=(o=a.calendar).isInverseEra)===null||c===void 0)&&c.call(o,a)&&(r=-r),a.year=u(e.year,r,-1/0,9999,n?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=u(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":a.day=u(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),p(a),a}function de(e,t,r,n){let a=e.copy();switch(t){case"hour":{let c=e.hour,o=0,i=23;if(n?.hourCycle===12){let f=c>=12;o=f?12:0,i=f?23:11}a.hour=u(c,r,o,i,n?.round);break}case"minute":a.minute=u(e.minute,r,0,59,n?.round);break;case"second":a.second=u(e.second,r,0,59,n?.round);break;case"millisecond":a.millisecond=u(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return a}function u(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let c=Math.abs(t);t>0?e=Math.ceil(e/c)*c:e=Math.floor(e/c)*c,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function he(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let a=O(I(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=h(a,e.timeZone)}else r=g(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=$(r,e.timeZone);return l(n,e.calendar)}function Te(e,t){return he(e,le(t))}function Fe(e,t,r,n){switch(t){case"hour":{let a=0,c=23;if(n?.hourCycle===12){let y=e.hour>=12;a=y?12:0,c=y?23:11}let o=I(e),i=l(U(o,{hour:a}),new m),f=[h(i,e.timeZone,"earlier"),h(i,e.timeZone,"later")].filter(y=>$(y,e.timeZone).day===i.day)[0],d=l(U(o,{hour:c}),new m),x=[h(d,e.timeZone,"earlier"),h(d,e.timeZone,"later")].filter(y=>$(y,e.timeZone).day===d.day).pop(),w=g(e)-e.offset,D=Math.floor(w/E),b=w%E;return w=u(D,r,Math.floor(f/E),Math.floor(x/E),n?.round)*E+b,l($(w,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return de(e,t,r,n);case"era":case"year":case"month":case"day":{let a=V(I(e),t,r,n),c=h(a,e.timeZone);return l($(c,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function Ne(e,t,r){let n=I(e),a=U(P(n,t),t);if(a.compare(n)===0)return e;let c=h(a,e.timeZone,r);return l($(c,e.timeZone),e.calendar)}const We=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Je=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,$e=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function He(e){let t=e.match(We);if(!t)throw $e.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new M(s(t[1],0,9999),s(t[2],1,12),1);return r.day=s(t[3],1,r.calendar.getDaysInMonth(r)),r}function qe(e){let t=e.match(Je);if(!t)throw $e.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=s(t[1],-9999,9999),n=r<1?"BC":"AD",a=new v(n,r<1?-r+1:r,s(t[2],1,12),1,t[4]?s(t[4],0,23):0,t[5]?s(t[5],0,59):0,t[6]?s(t[6],0,59):0,t[7]?s(t[7],0,1/0)*1e3:0);return a.day=s(t[3],0,a.calendar.getDaysInMonth(a)),a}function s(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function Pe(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function ue(e){let t=l(e,new m),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function ye(e){return`${ue(e)}T${Pe(e)}`}function Ve(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),c=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return a!==0&&(c+=`:${String(a).padStart(2,"0")}`),c}function Ge(e){return`${ye(e)}${Ve(e.offset)}[${e.timeZone}]`}function Ke(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function G(e,t,r){Ke(e,t),t.set(e,r)}function K(e){let t=typeof e[0]=="object"?e.shift():new m,r;if(typeof e[0]=="string")r=e.shift();else{let o=t.getEras();r=o[o.length-1]}let n=e.shift(),a=e.shift(),c=e.shift();return[t,r,n,a,c]}var je=new WeakMap;class M{copy(){return this.era?new M(this.calendar,this.era,this.year,this.month,this.day):new M(this.calendar,this.year,this.month,this.day)}add(t){return O(this,t)}subtract(t){return se(this,t)}set(t){return P(this,t)}cycle(t,r,n){return V(this,t,r,n)}toDate(t){return ie(this,t)}toString(){return ue(this)}compare(t){return ae(this,t)}constructor(...t){G(this,je,{writable:!0,value:void 0});let[r,n,a,c,o]=K(t);this.calendar=r,this.era=n,this.year=a,this.month=c,this.day=o,p(this)}}var _e=new WeakMap;class v{copy(){return this.era?new v(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new v(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return O(this,t)}subtract(t){return se(this,t)}set(t){return P(U(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return V(this,t,r,n);default:return de(this,t,r,n)}}toDate(t,r){return ie(this,t,r)}toString(){return ye(this)}compare(t){let r=ae(this,t);return r===0?Ie(this,I(t)):r}constructor(...t){G(this,_e,{writable:!0,value:void 0});let[r,n,a,c,o]=K(t);this.calendar=r,this.era=n,this.year=a,this.month=c,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,p(this)}}var ze=new WeakMap;class S{copy(){return this.era?new S(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new S(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return he(this,t)}subtract(t){return Te(this,t)}set(t,r){return Ne(this,t,r)}cycle(t,r,n){return Fe(this,t,r,n)}toDate(){return Ue(this)}toString(){return Ge(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-ke(t,this.timeZone).toDate().getTime()}constructor(...t){G(this,ze,{writable:!0,value:void 0});let[r,n,a,c,o]=K(t),i=t.shift(),f=t.shift();this.calendar=r,this.era=n,this.year=a,this.month=c,this.day=o,this.timeZone=i,this.offset=f,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,p(this)}}exports.$11d87f3f76e88657$export$b4a036af3fc0b032=l;exports.$14e0f24ef4ac5c92$export$2061056d06d7cdf7=De;exports.$14e0f24ef4ac5c92$export$5a8da0c44a3afdf2=xe;exports.$14e0f24ef4ac5c92$export$629b0a497aa65267=we;exports.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee=Me;exports.$14e0f24ef4ac5c92$export$a18c89cbd24170ff=re;exports.$14e0f24ef4ac5c92$export$a2258d9c4118825c=ve;exports.$14e0f24ef4ac5c92$export$a5a3b454ada2268e=T;exports.$14e0f24ef4ac5c92$export$aa8b41735afcabd2=q;exports.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3=ne;exports.$14e0f24ef4ac5c92$export$ea39ec197993aef0=J;exports.$2b4dce13dd5a17fa$export$842a2cf37af977e1=k;exports.$35ea8db9cb2ccb90$export$99faa760c7908e4f=M;exports.$35ea8db9cb2ccb90$export$ca871e8dbb80966f=v;exports.$35ea8db9cb2ccb90$export$d3b7288e7994edea=S;exports.$3b62074eb05584b2$export$4475b7e617eb123c=te;exports.$3b62074eb05584b2$export$553d7fa8e3805fc0=A;exports.$3b62074eb05584b2$export$80ee6245ec4f29ec=m;exports.$3b62074eb05584b2$export$c36e0ecb2d4fa69d=B;exports.$3b62074eb05584b2$export$f297eb839006d339=C;exports.$fae977aafc393c5c$export$588937bcd60ade55=qe;exports.$fae977aafc393c5c$export$6b862160d295c8e=He;
|
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
import { defineComponent as z, ref as w, resolveComponent as a, createBlock as p, openBlock as s, withCtx as i, createVNode as n, createElementVNode as t, createTextVNode as D, toDisplayString as L, normalizeClass as $, unref as g, createCommentVNode as T, createElementBlock as x, resolveDynamicComponent as X, computed as P, Fragment as H, renderList as M, useTemplateRef as ee, onMounted as te } from "vue";
|
|
2
|
+
import { Circle as U, CircleCheck as A, icons as oe, Baseline as le, LetterText as ne, Check as j, ChevronDown as se, ChevronLeft as ae, Plus as ie } from "lucide-vue-next";
|
|
3
|
+
import { useConfirmation as ue, useModuleStorage as de, useModuleRoute as re, useModuleBreadcrumbs as me } from "@oneclick.dev/cms-kit";
|
|
4
|
+
const ce = { class: "grid py-4" }, pe = { class: "flex gap-6 mb-6" }, ve = { class: "w-1/2" }, fe = { class: "w-1/2" }, xe = { class: "flex gap-6 mb-6" }, ge = { class: "w-1/2" }, ye = { class: "w-1/2" }, Ce = { class: "grid grid-cols-3 bg-input/30 rounded border divide-x divide-input/30 mb-6" }, be = /* @__PURE__ */ z({
|
|
5
|
+
__name: "ComponentDialog",
|
|
6
|
+
emits: ["add", "edit", "delete"],
|
|
7
|
+
setup(r, { expose: V, emit: b }) {
|
|
8
|
+
const { confirm: h } = ue(), c = b, m = w(!1), l = w("create"), d = w(""), v = w(""), C = w(""), _ = w(""), u = w(""), o = w("layout"), f = w([]), E = (k) => {
|
|
9
|
+
k ? (l.value = "edit", d.value = k.id, v.value = k.displayName || "", C.value = k.name || "", _.value = k.tint || "", u.value = k.icon || "", o.value = k.componentType || "layout", f.value = k.formLayout || []) : (l.value = "create", d.value = "", v.value = "", C.value = "", _.value = "", u.value = "", o.value = "layout", f.value = []), m.value = !0;
|
|
10
|
+
}, N = () => {
|
|
11
|
+
c("add", {
|
|
12
|
+
id: crypto.randomUUID(),
|
|
13
|
+
displayName: v.value,
|
|
14
|
+
name: C.value,
|
|
15
|
+
tint: _.value,
|
|
16
|
+
icon: u.value,
|
|
17
|
+
componentType: o.value,
|
|
18
|
+
formLayout: f.value
|
|
19
|
+
}), m.value = !1;
|
|
20
|
+
}, Z = () => {
|
|
21
|
+
c("edit", {
|
|
22
|
+
id: d.value,
|
|
23
|
+
displayName: v.value,
|
|
24
|
+
name: C.value,
|
|
25
|
+
tint: _.value,
|
|
26
|
+
icon: u.value,
|
|
27
|
+
componentType: o.value,
|
|
28
|
+
formLayout: f.value
|
|
29
|
+
}), m.value = !1;
|
|
30
|
+
}, S = async () => {
|
|
31
|
+
await h("Are you sure you want to delete this component? This action cannot be undone.", "Delete Component", "Delete") && (c("delete", d.value), m.value = !1);
|
|
32
|
+
};
|
|
33
|
+
return V({
|
|
34
|
+
openDialog: E
|
|
35
|
+
}), (k, e) => {
|
|
36
|
+
const B = a("DialogTitle"), q = a("DialogDescription"), G = a("DialogHeader"), O = a("Input"), R = a("TailwindColorPicker"), Y = a("LucideIconPicker"), J = a("FormBuilderSelect"), I = a("Button"), K = a("DialogFooter"), Q = a("DialogScrollContent"), W = a("Dialog");
|
|
37
|
+
return s(), p(W, {
|
|
38
|
+
open: m.value,
|
|
39
|
+
"onUpdate:open": e[8] || (e[8] = (y) => m.value = y)
|
|
40
|
+
}, {
|
|
41
|
+
default: i(() => [
|
|
42
|
+
n(Q, { class: "sm:max-w-2xl" }, {
|
|
43
|
+
default: i(() => [
|
|
44
|
+
n(G, null, {
|
|
45
|
+
default: i(() => [
|
|
46
|
+
n(B, null, {
|
|
47
|
+
default: i(() => [
|
|
48
|
+
D(L(l.value === "create" ? "Add New Component" : "Update Component"), 1)
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}),
|
|
52
|
+
n(q, null, {
|
|
53
|
+
default: i(() => [...e[9] || (e[9] = [
|
|
54
|
+
D(" Connect the components from your front-end to build pages with them. ", -1)
|
|
55
|
+
])]),
|
|
56
|
+
_: 1
|
|
57
|
+
})
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}),
|
|
61
|
+
t("div", ce, [
|
|
62
|
+
t("div", pe, [
|
|
63
|
+
t("div", ve, [
|
|
64
|
+
e[10] || (e[10] = t("label", {
|
|
65
|
+
for: "component-dialog-display-name",
|
|
66
|
+
class: "text-sm mb-1 block font-medium"
|
|
67
|
+
}, "Display Name", -1)),
|
|
68
|
+
n(O, {
|
|
69
|
+
modelValue: v.value,
|
|
70
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => v.value = y),
|
|
71
|
+
placeholder: "Display Name",
|
|
72
|
+
id: "component-dialog-display-name"
|
|
73
|
+
}, null, 8, ["modelValue"]),
|
|
74
|
+
e[11] || (e[11] = t("p", { class: "text-xs text-muted-foreground mt-2" }, " This is the name that the user will see in the component list. ", -1))
|
|
75
|
+
]),
|
|
76
|
+
t("div", fe, [
|
|
77
|
+
e[12] || (e[12] = t("label", {
|
|
78
|
+
for: "component-dialog-component-name",
|
|
79
|
+
class: "text-sm mb-1 block font-medium"
|
|
80
|
+
}, "Component Name", -1)),
|
|
81
|
+
n(O, {
|
|
82
|
+
modelValue: C.value,
|
|
83
|
+
"onUpdate:modelValue": e[1] || (e[1] = (y) => C.value = y),
|
|
84
|
+
placeholder: "Component Name",
|
|
85
|
+
id: "component-dialog-component-name"
|
|
86
|
+
}, null, 8, ["modelValue"]),
|
|
87
|
+
e[13] || (e[13] = t("p", { class: "text-xs text-muted-foreground mt-2" }, " How is the component called in your front-end? ", -1))
|
|
88
|
+
])
|
|
89
|
+
]),
|
|
90
|
+
t("div", xe, [
|
|
91
|
+
t("div", ge, [
|
|
92
|
+
e[14] || (e[14] = t("label", {
|
|
93
|
+
for: "component-dialog-display-name",
|
|
94
|
+
class: "text-sm mb-1 block font-medium"
|
|
95
|
+
}, "Tint", -1)),
|
|
96
|
+
n(R, {
|
|
97
|
+
modelValue: _.value,
|
|
98
|
+
"onUpdate:modelValue": e[2] || (e[2] = (y) => _.value = y),
|
|
99
|
+
"default-value": "white"
|
|
100
|
+
}, null, 8, ["modelValue"])
|
|
101
|
+
]),
|
|
102
|
+
t("div", ye, [
|
|
103
|
+
e[15] || (e[15] = t("label", {
|
|
104
|
+
for: "component-dialog-component-name",
|
|
105
|
+
class: "text-sm mb-1 block font-medium"
|
|
106
|
+
}, "Icon", -1)),
|
|
107
|
+
n(Y, {
|
|
108
|
+
modelValue: u.value,
|
|
109
|
+
"onUpdate:modelValue": e[3] || (e[3] = (y) => u.value = y)
|
|
110
|
+
}, null, 8, ["modelValue"])
|
|
111
|
+
])
|
|
112
|
+
]),
|
|
113
|
+
e[22] || (e[22] = t("p", { class: "text-sm mb-1 block font-medium" }, " Component Type ", -1)),
|
|
114
|
+
t("div", Ce, [
|
|
115
|
+
t("button", {
|
|
116
|
+
class: $(["flex flex-col p-6 hover:bg-input/30 transition-all duration-300", { "bg-input/50 hover:bg-input/50": o.value == "layout" }]),
|
|
117
|
+
onClick: e[4] || (e[4] = (y) => o.value = "layout")
|
|
118
|
+
}, [
|
|
119
|
+
e[16] || (e[16] = t("svg", {
|
|
120
|
+
width: "60",
|
|
121
|
+
height: "60",
|
|
122
|
+
viewBox: "0 0 60 60",
|
|
123
|
+
fill: "none",
|
|
124
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
125
|
+
class: "dark:invert dark:opacity-30 mx-auto mb-4"
|
|
126
|
+
}, [
|
|
127
|
+
t("path", {
|
|
128
|
+
"fill-rule": "evenodd",
|
|
129
|
+
"clip-rule": "evenodd",
|
|
130
|
+
d: "M10 6C7.79086 6 6 7.79086 6 10V15H0V10C0 4.47715 4.47715 0 10 0H15V6H10ZM35 6H25V0H35V6ZM50 6H45V0H50C55.5229 0 60 4.47715 60 10V15H54V10C54 7.79086 52.2091 6 50 6ZM6 25V35H0V25H6ZM54 35V25H60V35H54ZM6 45V50C6 52.2091 7.79086 54 10 54H15V60H10C4.47715 60 0 55.5228 0 50V45H6ZM54 50V45H60V50C60 55.5229 55.5228 60 50 60H45V54H50C52.2091 54 54 52.2091 54 50ZM25 54H35V60H25V54Z",
|
|
131
|
+
fill: "black"
|
|
132
|
+
})
|
|
133
|
+
], -1)),
|
|
134
|
+
e[17] || (e[17] = t("div", { class: "mb-auto" }, [
|
|
135
|
+
t("strong", { class: "text-sm mb-1" }, "Layout Component"),
|
|
136
|
+
t("p", { class: "text-xs text-muted-foreground" }, " Helps setting up the overall structure or layout of the page. (Examples: Section, 2 Column Grid, ...) ")
|
|
137
|
+
], -1)),
|
|
138
|
+
o.value != "layout" ? (s(), p(g(U), {
|
|
139
|
+
key: 0,
|
|
140
|
+
class: "size-4 mx-auto mt-4"
|
|
141
|
+
})) : (s(), p(g(A), {
|
|
142
|
+
key: 1,
|
|
143
|
+
class: "size-4 mx-auto mt-4"
|
|
144
|
+
}))
|
|
145
|
+
], 2),
|
|
146
|
+
t("button", {
|
|
147
|
+
class: $(["flex flex-col p-6 hover:bg-input/30 transition-all duration-300", { "bg-input/50 hover:bg-input/50": o.value == "content" }]),
|
|
148
|
+
onClick: e[5] || (e[5] = (y) => o.value = "content")
|
|
149
|
+
}, [
|
|
150
|
+
e[18] || (e[18] = t("svg", {
|
|
151
|
+
width: "60",
|
|
152
|
+
height: "60",
|
|
153
|
+
viewBox: "0 0 60 60",
|
|
154
|
+
fill: "none",
|
|
155
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
156
|
+
class: "dark:invert dark:opacity-30 mx-auto mb-4"
|
|
157
|
+
}, [
|
|
158
|
+
t("path", {
|
|
159
|
+
"fill-rule": "evenodd",
|
|
160
|
+
"clip-rule": "evenodd",
|
|
161
|
+
d: "M0 10C0 4.47715 4.47715 0 10 0H50C55.5229 0 60 4.47715 60 10V50C60 55.5229 55.5228 60 50 60H10C4.47715 60 0 55.5228 0 50V10ZM10 6C7.79086 6 6 7.79086 6 10V50C6 52.2091 7.79086 54 10 54H50C52.2091 54 54 52.2091 54 50V10C54 7.79086 52.2091 6 50 6H10Z",
|
|
162
|
+
fill: "black"
|
|
163
|
+
})
|
|
164
|
+
], -1)),
|
|
165
|
+
e[19] || (e[19] = t("div", { class: "mb-auto" }, [
|
|
166
|
+
t("strong", { class: "text-sm mb-1" }, "Content Component"),
|
|
167
|
+
t("p", { class: "text-xs text-muted-foreground" }, " Aimed at hosting and displaying unique content. (Examples: Text, Link, Image, ...) ")
|
|
168
|
+
], -1)),
|
|
169
|
+
o.value != "content" ? (s(), p(g(U), {
|
|
170
|
+
key: 0,
|
|
171
|
+
class: "size-4 mx-auto mt-4"
|
|
172
|
+
})) : (s(), p(g(A), {
|
|
173
|
+
key: 1,
|
|
174
|
+
class: "size-4 mx-auto mt-4"
|
|
175
|
+
}))
|
|
176
|
+
], 2),
|
|
177
|
+
t("button", {
|
|
178
|
+
class: $(["flex flex-col p-6 hover:bg-input/30 transition-all duration-300", { "bg-input/50 hover:bg-input/50": o.value == "hybrid" }]),
|
|
179
|
+
onClick: e[6] || (e[6] = (y) => o.value = "hybrid")
|
|
180
|
+
}, [
|
|
181
|
+
e[20] || (e[20] = t("svg", {
|
|
182
|
+
width: "60",
|
|
183
|
+
height: "60",
|
|
184
|
+
viewBox: "0 0 60 60",
|
|
185
|
+
fill: "none",
|
|
186
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
187
|
+
class: "dark:invert dark:opacity-30 mx-auto mb-4"
|
|
188
|
+
}, [
|
|
189
|
+
t("path", {
|
|
190
|
+
"fill-rule": "evenodd",
|
|
191
|
+
"clip-rule": "evenodd",
|
|
192
|
+
d: "M54 10C54 7.79086 52.2091 6 50 6L45 6L45 -6.55671e-07L50 -4.37114e-07C55.5228 -1.95703e-07 60 4.47715 60 10L60 15L54 15L54 10ZM54 50L54 15L60 15L60 50C60 55.5229 55.5228 60 50 60L15 60L15 54L50 54C52.2091 54 54 52.2091 54 50ZM35 6L25 6L25 -1.5299e-06L35 -1.09278e-06L35 6ZM15 6L10 6C7.79086 6 6 7.79086 6 10L6 15L-6.55671e-07 15L-4.37114e-07 10C-1.95703e-07 4.47715 4.47715 -2.42698e-06 10 -2.18557e-06L15 -1.96701e-06L15 6ZM10 54L15 54L15 60L10 60C4.47715 60 -2.42698e-06 55.5228 -2.18557e-06 50L-1.96701e-06 45L6 45L6 50C6 52.2091 7.79086 54 10 54ZM6 25L6 35L-1.5299e-06 35L-1.09278e-06 25L6 25Z",
|
|
193
|
+
fill: "black"
|
|
194
|
+
})
|
|
195
|
+
], -1)),
|
|
196
|
+
e[21] || (e[21] = t("div", { class: "mb-auto" }, [
|
|
197
|
+
t("strong", { class: "text-sm mb-1" }, "Hybrid Component"),
|
|
198
|
+
t("p", { class: "text-xs text-muted-foreground" }, " These serve as both layout and content components, unlocking complex layouts. ")
|
|
199
|
+
], -1)),
|
|
200
|
+
o.value != "hybrid" ? (s(), p(g(U), {
|
|
201
|
+
key: 0,
|
|
202
|
+
class: "size-4 mx-auto mt-4"
|
|
203
|
+
})) : (s(), p(g(A), {
|
|
204
|
+
key: 1,
|
|
205
|
+
class: "size-4 mx-auto mt-4"
|
|
206
|
+
}))
|
|
207
|
+
], 2)
|
|
208
|
+
]),
|
|
209
|
+
e[23] || (e[23] = t("p", { class: "text-sm mb-1 block font-medium" }, " Form Layout ", -1)),
|
|
210
|
+
e[24] || (e[24] = t("p", { class: "text-xs text-muted-foreground mb-2" }, " This will be the form that the client can fill in to populate this component. ", -1)),
|
|
211
|
+
t("div", null, [
|
|
212
|
+
n(J, {
|
|
213
|
+
modelValue: f.value,
|
|
214
|
+
"onUpdate:modelValue": e[7] || (e[7] = (y) => f.value = y),
|
|
215
|
+
buildText: "Edit Form Layout",
|
|
216
|
+
editText: "Edit Form Layout"
|
|
217
|
+
}, null, 8, ["modelValue"])
|
|
218
|
+
])
|
|
219
|
+
]),
|
|
220
|
+
n(K, null, {
|
|
221
|
+
default: i(() => [
|
|
222
|
+
l.value === "edit" ? (s(), p(I, {
|
|
223
|
+
key: 0,
|
|
224
|
+
variant: "destructive",
|
|
225
|
+
class: "mr-auto",
|
|
226
|
+
onClick: S
|
|
227
|
+
}, {
|
|
228
|
+
default: i(() => [...e[25] || (e[25] = [
|
|
229
|
+
D(" Delete Component ", -1)
|
|
230
|
+
])]),
|
|
231
|
+
_: 1
|
|
232
|
+
})) : T("", !0),
|
|
233
|
+
l.value === "create" ? (s(), p(I, {
|
|
234
|
+
key: 1,
|
|
235
|
+
type: "submit",
|
|
236
|
+
onClick: N
|
|
237
|
+
}, {
|
|
238
|
+
default: i(() => [...e[26] || (e[26] = [
|
|
239
|
+
D(" Add Component ", -1)
|
|
240
|
+
])]),
|
|
241
|
+
_: 1
|
|
242
|
+
})) : (s(), p(I, {
|
|
243
|
+
key: 2,
|
|
244
|
+
type: "submit",
|
|
245
|
+
onClick: Z
|
|
246
|
+
}, {
|
|
247
|
+
default: i(() => [...e[27] || (e[27] = [
|
|
248
|
+
D(" Edit Component ", -1)
|
|
249
|
+
])]),
|
|
250
|
+
_: 1
|
|
251
|
+
}))
|
|
252
|
+
]),
|
|
253
|
+
_: 1
|
|
254
|
+
})
|
|
255
|
+
]),
|
|
256
|
+
_: 1
|
|
257
|
+
})
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
}, 8, ["open"]);
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
}), _e = { class: "w-full truncate text-sm font-medium" }, ke = { class: "w-full truncate text-xs text-muted-foreground" }, F = /* @__PURE__ */ z({
|
|
264
|
+
__name: "ComponentGridItem",
|
|
265
|
+
props: {
|
|
266
|
+
component: {
|
|
267
|
+
type: Object,
|
|
268
|
+
required: !0
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
emits: ["edit"],
|
|
272
|
+
setup(r, { emit: V }) {
|
|
273
|
+
const b = V;
|
|
274
|
+
return (h, c) => {
|
|
275
|
+
const m = a("Skeleton"), l = a("Card");
|
|
276
|
+
return s(), x("button", {
|
|
277
|
+
onClick: c[0] || (c[0] = (d) => b("edit")),
|
|
278
|
+
class: "basis-[100px] max-w-[200px] @7xl:max-w-xs"
|
|
279
|
+
}, [
|
|
280
|
+
n(l, { class: "flex flex-col items-center px-4 py-4 gap-0 hover:bg-input/30" }, {
|
|
281
|
+
default: i(() => [
|
|
282
|
+
r.component.icon ? (s(), x("div", {
|
|
283
|
+
key: 0,
|
|
284
|
+
class: $(`${r.component.tint ? "bg-" + r.component.tint : "bg-input/50"} rounded-lg p-4 mb-2`)
|
|
285
|
+
}, [
|
|
286
|
+
(s(), p(X(g(oe)[r.component.icon]), { class: "size-16 @5xl:size-22 @7xl:size-28" }))
|
|
287
|
+
], 2)) : (s(), p(m, {
|
|
288
|
+
key: 1,
|
|
289
|
+
class: "size-24 @5xl:size-30 @7xl:size-36 mb-2"
|
|
290
|
+
})),
|
|
291
|
+
t("p", _e, L(r.component.displayName), 1),
|
|
292
|
+
t("p", ke, L(r.component.name), 1)
|
|
293
|
+
]),
|
|
294
|
+
_: 1
|
|
295
|
+
})
|
|
296
|
+
]);
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
}), we = { class: "flex flex-col gap-2 mb-12" }, Ve = { class: "flex items-start gap-4 overflow-hidden" }, he = { class: "flex flex-col text-left" }, Le = { class: "text-sm font-semibold" }, De = {
|
|
300
|
+
key: 0,
|
|
301
|
+
class: "text-xs text-muted-foreground/70 dark:text-muted-foreground/50 line-clamp-2 whitespace-normal mt-2"
|
|
302
|
+
}, $e = /* @__PURE__ */ z({
|
|
303
|
+
__name: "VerticalToggle",
|
|
304
|
+
props: {
|
|
305
|
+
modelValue: {
|
|
306
|
+
type: Array,
|
|
307
|
+
required: !0
|
|
308
|
+
},
|
|
309
|
+
options: {
|
|
310
|
+
type: Array,
|
|
311
|
+
required: !0
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
emits: ["update:modelValue"],
|
|
315
|
+
setup(r, { emit: V }) {
|
|
316
|
+
const b = r, h = V, c = P({
|
|
317
|
+
get() {
|
|
318
|
+
return b.modelValue;
|
|
319
|
+
},
|
|
320
|
+
set(d) {
|
|
321
|
+
h("update:modelValue", d);
|
|
322
|
+
}
|
|
323
|
+
}), m = w("full"), l = (d) => {
|
|
324
|
+
c.value.includes(d) ? c.value = c.value.filter((v) => v !== d) : c.value.push(d);
|
|
325
|
+
};
|
|
326
|
+
return (d, v) => {
|
|
327
|
+
const C = a("SegmentedControlButton"), _ = a("SegmentedControl"), u = a("Button");
|
|
328
|
+
return s(), x("div", null, [
|
|
329
|
+
n(_, {
|
|
330
|
+
modelValue: m.value,
|
|
331
|
+
"onUpdate:modelValue": v[0] || (v[0] = (o) => m.value = o),
|
|
332
|
+
class: "grid grid-cols-2 mb-4 w-28 scale-75 origin-left opacity-50 transition-all duration-300 hover:opacity-100"
|
|
333
|
+
}, {
|
|
334
|
+
default: i(() => [
|
|
335
|
+
n(C, { value: "minimal" }, {
|
|
336
|
+
default: i(() => [
|
|
337
|
+
n(g(le), { class: "size-5 mx-auto" })
|
|
338
|
+
]),
|
|
339
|
+
_: 1
|
|
340
|
+
}),
|
|
341
|
+
n(C, { value: "full" }, {
|
|
342
|
+
default: i(() => [
|
|
343
|
+
n(g(ne), { class: "size-5 mx-auto" })
|
|
344
|
+
]),
|
|
345
|
+
_: 1
|
|
346
|
+
})
|
|
347
|
+
]),
|
|
348
|
+
_: 1
|
|
349
|
+
}, 8, ["modelValue"]),
|
|
350
|
+
t("div", we, [
|
|
351
|
+
(s(!0), x(H, null, M(r.options, (o) => (s(), p(u, {
|
|
352
|
+
variant: "ghost",
|
|
353
|
+
key: o.value,
|
|
354
|
+
class: $(["flex-1 transition-all duration-300 active:scale-95 rounded-md justify-start w-full h-auto cursor-pointer border", r.modelValue.includes(o.value) ? "bg-white hover:bg-white dark:bg-input/30 dark:hover:bg-input/30 shadow-xs" : "hover:bg-transparent"]),
|
|
355
|
+
onClick: (f) => l(o.value)
|
|
356
|
+
}, {
|
|
357
|
+
default: i(() => [
|
|
358
|
+
t("div", Ve, [
|
|
359
|
+
n(g(j), {
|
|
360
|
+
class: $(["size-5 text-muted-foreground transition-opacity duration-300", r.modelValue.includes(o.value) ? "opacity-100" : "opacity-0"])
|
|
361
|
+
}, null, 8, ["class"]),
|
|
362
|
+
t("div", he, [
|
|
363
|
+
t("span", Le, L(o.text), 1),
|
|
364
|
+
m.value === "full" && o.description ? (s(), x("p", De, L(o.description), 1)) : T("", !0)
|
|
365
|
+
])
|
|
366
|
+
])
|
|
367
|
+
]),
|
|
368
|
+
_: 2
|
|
369
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
370
|
+
])
|
|
371
|
+
]);
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
}), He = {
|
|
375
|
+
key: 0,
|
|
376
|
+
class: "truncate"
|
|
377
|
+
}, Te = { key: 1 }, Me = { class: "p-6 overflow-y-auto" }, ze = { class: "flex flex-col gap-3" }, Be = { class: "flex items-start gap-4 overflow-hidden" }, Ee = { class: "flex flex-col text-left" }, Ne = { class: "text-sm font-semibold mb-2" }, Ze = { class: "text-xs text-muted-foreground line-clamp-2 whitespace-normal" }, Se = /* @__PURE__ */ z({
|
|
378
|
+
__name: "DrawerToggle",
|
|
379
|
+
props: {
|
|
380
|
+
modelValue: {
|
|
381
|
+
type: Array,
|
|
382
|
+
required: !0
|
|
383
|
+
},
|
|
384
|
+
options: {
|
|
385
|
+
type: Array,
|
|
386
|
+
required: !0
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
emits: ["update:modelValue"],
|
|
390
|
+
setup(r, { emit: V }) {
|
|
391
|
+
const b = r, h = V, c = P({
|
|
392
|
+
get() {
|
|
393
|
+
return b.modelValue;
|
|
394
|
+
},
|
|
395
|
+
set(l) {
|
|
396
|
+
h("update:modelValue", l);
|
|
397
|
+
}
|
|
398
|
+
}), m = (l) => {
|
|
399
|
+
c.value.includes(l) ? c.value = c.value.filter((d) => d !== l) : c.value.push(l);
|
|
400
|
+
};
|
|
401
|
+
return (l, d) => {
|
|
402
|
+
const v = a("Button"), C = a("DrawerTrigger"), _ = a("DrawerContent"), u = a("Drawer");
|
|
403
|
+
return s(), p(u, null, {
|
|
404
|
+
default: i(() => [
|
|
405
|
+
n(C, { "as-child": "" }, {
|
|
406
|
+
default: i(() => [
|
|
407
|
+
n(v, {
|
|
408
|
+
variant: "outline",
|
|
409
|
+
class: "mb-2"
|
|
410
|
+
}, {
|
|
411
|
+
default: i(() => [
|
|
412
|
+
r.modelValue.length < 4 ? (s(), x("p", He, L(r.modelValue.join(", ")), 1)) : (s(), x("p", Te, L(r.modelValue.slice(0, 3).join(", ")) + " + " + L(r.modelValue.length - 3) + " more ", 1)),
|
|
413
|
+
n(g(se), { class: "size-4 text-muted-foreground translate-y-0.25 ml-4" })
|
|
414
|
+
]),
|
|
415
|
+
_: 1
|
|
416
|
+
})
|
|
417
|
+
]),
|
|
418
|
+
_: 1
|
|
419
|
+
}),
|
|
420
|
+
n(_, null, {
|
|
421
|
+
default: i(() => [
|
|
422
|
+
t("div", Me, [
|
|
423
|
+
t("div", ze, [
|
|
424
|
+
(s(!0), x(H, null, M(r.options, (o) => (s(), p(v, {
|
|
425
|
+
key: o.value,
|
|
426
|
+
class: $(["justify-start w-full h-auto cursor-pointer flex-1 transition-all duration-300 active:scale-95 rounded-md border border-transparent", r.modelValue.includes(o.value) ? "bg-input/30 border-border" : ""]),
|
|
427
|
+
variant: "ghost",
|
|
428
|
+
onClick: (f) => m(o.value)
|
|
429
|
+
}, {
|
|
430
|
+
default: i(() => [
|
|
431
|
+
t("div", Be, [
|
|
432
|
+
n(g(j), {
|
|
433
|
+
class: $(["size-5 text-muted-foreground transition-opacity duration-300", r.modelValue.includes(o.value) ? "opacity-100" : "opacity-0"])
|
|
434
|
+
}, null, 8, ["class"]),
|
|
435
|
+
t("div", Ee, [
|
|
436
|
+
t("span", Ne, L(o.text), 1),
|
|
437
|
+
t("p", Ze, L(o.description), 1)
|
|
438
|
+
])
|
|
439
|
+
])
|
|
440
|
+
]),
|
|
441
|
+
_: 2
|
|
442
|
+
}, 1032, ["class", "onClick"]))), 128))
|
|
443
|
+
])
|
|
444
|
+
])
|
|
445
|
+
]),
|
|
446
|
+
_: 1
|
|
447
|
+
})
|
|
448
|
+
]),
|
|
449
|
+
_: 1
|
|
450
|
+
});
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
}), Ie = { class: "w-full" }, Ue = { class: "flex items-center justify-between gap-4 w-full my-4" }, Ae = { class: "flex flex-col space-y-8 @5xl:flex-row @5xl:space-x-12 @5xl:space-y-0" }, Fe = { class: "hidden @5xl:block @5xl:w-1/4 @7xl:w-1/5" }, Oe = { class: "flex-1" }, Pe = { class: "@5xl:hidden" }, je = { class: "flex items-center justify-between w-full" }, qe = { class: "flex items-start gap-8" }, Ge = {
|
|
454
|
+
key: 0,
|
|
455
|
+
class: "mb-8"
|
|
456
|
+
}, Re = { class: "flex flex-wrap gap-4" }, Ye = {
|
|
457
|
+
key: 1,
|
|
458
|
+
class: "mb-8"
|
|
459
|
+
}, Je = { class: "flex flex-wrap gap-4" }, Ke = {
|
|
460
|
+
key: 2,
|
|
461
|
+
class: "mb-8"
|
|
462
|
+
}, Qe = { class: "flex flex-wrap gap-4" }, tt = /* @__PURE__ */ z({
|
|
463
|
+
__name: "Components",
|
|
464
|
+
setup(r) {
|
|
465
|
+
const V = [
|
|
466
|
+
{
|
|
467
|
+
value: "hybrid",
|
|
468
|
+
text: "Hybrid Components",
|
|
469
|
+
icon: "",
|
|
470
|
+
description: "These serve as both layout and content components, unlocking complex layouts."
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
value: "layout",
|
|
474
|
+
text: "Layout Component",
|
|
475
|
+
icon: "",
|
|
476
|
+
description: "Helps setting up the overall structure or layout of the page. (Examples: Section, 2 Column Grid, ...)"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
value: "content",
|
|
480
|
+
text: "Content Component",
|
|
481
|
+
icon: "",
|
|
482
|
+
description: "Aimed at hosting and displaying unique content. (Examples: Text, Link, Image, ...)"
|
|
483
|
+
}
|
|
484
|
+
], { getModuleData: b, setModuleData: h } = de(), { navigateTo: c } = re();
|
|
485
|
+
me(() => [
|
|
486
|
+
{ text: "Components" }
|
|
487
|
+
]);
|
|
488
|
+
const m = ee("componentDialog"), l = w([]), d = w(["hybrid", "layout", "content"]), v = async (u) => {
|
|
489
|
+
l.value.push(u), l.value = await b("components") || [], l.value.push(u), h("components", l.value);
|
|
490
|
+
}, C = async (u) => {
|
|
491
|
+
let o = l.value.findIndex((f) => f.id === u.id);
|
|
492
|
+
o !== -1 && (l.value[o] = u), l.value = await b("components") || [], o = l.value.findIndex((f) => f.id === u.id), o !== -1 && (l.value[o] = u, h("components", l.value));
|
|
493
|
+
}, _ = async (u) => {
|
|
494
|
+
l.value = l.value.filter((o) => o.id !== u), l.value = await b("components") || [], l.value = l.value.filter((o) => o.id !== u), h("components", l.value);
|
|
495
|
+
};
|
|
496
|
+
return te(() => {
|
|
497
|
+
b("components").then((u) => {
|
|
498
|
+
l.value = u;
|
|
499
|
+
});
|
|
500
|
+
}), (u, o) => {
|
|
501
|
+
const f = a("Button"), E = a("CardTitle"), N = a("CardDescription"), Z = a("CardHeader"), S = a("CardContent"), k = a("Card");
|
|
502
|
+
return s(), x(H, null, [
|
|
503
|
+
t("div", Ie, [
|
|
504
|
+
t("div", Ue, [
|
|
505
|
+
n(f, {
|
|
506
|
+
onClick: o[0] || (o[0] = (e) => g(c)("/")),
|
|
507
|
+
variant: "link",
|
|
508
|
+
class: "!pl-0"
|
|
509
|
+
}, {
|
|
510
|
+
default: i(() => [
|
|
511
|
+
n(g(ae), { class: "size-4" }),
|
|
512
|
+
o[4] || (o[4] = D(" Collections ", -1))
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
})
|
|
516
|
+
]),
|
|
517
|
+
t("div", Ae, [
|
|
518
|
+
t("div", Fe, [
|
|
519
|
+
n($e, {
|
|
520
|
+
options: V,
|
|
521
|
+
modelValue: d.value,
|
|
522
|
+
"onUpdate:modelValue": o[1] || (o[1] = (e) => d.value = e)
|
|
523
|
+
}, null, 8, ["modelValue"])
|
|
524
|
+
]),
|
|
525
|
+
t("div", Oe, [
|
|
526
|
+
t("div", Pe, [
|
|
527
|
+
n(Se, {
|
|
528
|
+
options: V,
|
|
529
|
+
modelValue: d.value,
|
|
530
|
+
"onUpdate:modelValue": o[2] || (o[2] = (e) => d.value = e)
|
|
531
|
+
}, null, 8, ["modelValue"])
|
|
532
|
+
]),
|
|
533
|
+
n(k, null, {
|
|
534
|
+
default: i(() => [
|
|
535
|
+
n(Z, null, {
|
|
536
|
+
default: i(() => [
|
|
537
|
+
t("div", je, [
|
|
538
|
+
t("div", null, [
|
|
539
|
+
n(E, null, {
|
|
540
|
+
default: i(() => [...o[5] || (o[5] = [
|
|
541
|
+
D("Components", -1)
|
|
542
|
+
])]),
|
|
543
|
+
_: 1
|
|
544
|
+
}),
|
|
545
|
+
n(N, null, {
|
|
546
|
+
default: i(() => [...o[6] || (o[6] = [
|
|
547
|
+
D("Manage your components here.", -1)
|
|
548
|
+
])]),
|
|
549
|
+
_: 1
|
|
550
|
+
})
|
|
551
|
+
]),
|
|
552
|
+
n(f, {
|
|
553
|
+
onClick: o[3] || (o[3] = (e) => m.value.openDialog())
|
|
554
|
+
}, {
|
|
555
|
+
default: i(() => [
|
|
556
|
+
n(g(ie), { class: "size-4" }),
|
|
557
|
+
o[7] || (o[7] = D(" New Component ", -1))
|
|
558
|
+
]),
|
|
559
|
+
_: 1
|
|
560
|
+
})
|
|
561
|
+
])
|
|
562
|
+
]),
|
|
563
|
+
_: 1
|
|
564
|
+
}),
|
|
565
|
+
n(S, null, {
|
|
566
|
+
default: i(() => [
|
|
567
|
+
t("div", qe, [
|
|
568
|
+
t("div", null, [
|
|
569
|
+
d.value.includes("hybrid") ? (s(), x("div", Ge, [
|
|
570
|
+
o[8] || (o[8] = t("h3", { class: "font-medium mb-2" }, "Hybrid Components", -1)),
|
|
571
|
+
t("div", Re, [
|
|
572
|
+
(s(!0), x(H, null, M(l.value, (e) => (s(), p(F, {
|
|
573
|
+
key: e.name,
|
|
574
|
+
onEdit: (B) => m.value.openDialog(e),
|
|
575
|
+
component: e
|
|
576
|
+
}, null, 8, ["onEdit", "component"]))), 128))
|
|
577
|
+
])
|
|
578
|
+
])) : T("", !0),
|
|
579
|
+
d.value.includes("layout") ? (s(), x("div", Ye, [
|
|
580
|
+
o[9] || (o[9] = t("h3", { class: "font-medium mb-2" }, "Layout Components", -1)),
|
|
581
|
+
t("div", Je, [
|
|
582
|
+
(s(!0), x(H, null, M(l.value, (e) => (s(), p(F, {
|
|
583
|
+
key: e.name,
|
|
584
|
+
onEdit: (B) => m.value.openDialog(e),
|
|
585
|
+
component: e
|
|
586
|
+
}, null, 8, ["onEdit", "component"]))), 128))
|
|
587
|
+
])
|
|
588
|
+
])) : T("", !0),
|
|
589
|
+
d.value.includes("content") ? (s(), x("div", Ke, [
|
|
590
|
+
o[10] || (o[10] = t("h3", { class: "font-medium mb-2" }, "Content Components", -1)),
|
|
591
|
+
t("div", Qe, [
|
|
592
|
+
(s(!0), x(H, null, M(l.value, (e) => (s(), p(F, {
|
|
593
|
+
key: e.name,
|
|
594
|
+
onEdit: (B) => m.value.openDialog(e),
|
|
595
|
+
component: e
|
|
596
|
+
}, null, 8, ["onEdit", "component"]))), 128))
|
|
597
|
+
])
|
|
598
|
+
])) : T("", !0)
|
|
599
|
+
])
|
|
600
|
+
])
|
|
601
|
+
]),
|
|
602
|
+
_: 1
|
|
603
|
+
})
|
|
604
|
+
]),
|
|
605
|
+
_: 1
|
|
606
|
+
})
|
|
607
|
+
])
|
|
608
|
+
])
|
|
609
|
+
]),
|
|
610
|
+
n(be, {
|
|
611
|
+
ref_key: "componentDialog",
|
|
612
|
+
ref: m,
|
|
613
|
+
onAdd: v,
|
|
614
|
+
onEdit: C,
|
|
615
|
+
onDelete: _
|
|
616
|
+
}, null, 512)
|
|
617
|
+
], 64);
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
export {
|
|
622
|
+
tt as default
|
|
623
|
+
};
|