@baseplate-dev/project-builder-web 0.2.5 → 0.3.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/assets/-constants-C0cnDlAn.js +4 -0
- package/dist/assets/-constants-C0cnDlAn.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BCejYgPM.js +2 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-dPVRSC8L.js.map → web-BCejYgPM.js.map} +1 -1
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-BxDAWgq7.js +2 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-BxDAWgq7.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/ui-components-D6OnTPTN.js +46 -0
- package/dist/assets/__federation_shared_@baseplate-dev/ui-components-D6OnTPTN.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/utils-DvvrgoSE.js +5 -0
- package/dist/assets/__federation_shared_@baseplate-dev/utils-DvvrgoSE.js.map +1 -0
- package/dist/assets/__federation_shared_@tanstack/react-router-B5c6YNeC.js +19 -0
- package/dist/assets/__federation_shared_@tanstack/react-router-B5c6YNeC.js.map +1 -0
- package/dist/assets/__federation_shared_react-WURrSs1p.js +2 -0
- package/dist/assets/{__federation_shared_react-CTQ9xfiH.js.map → __federation_shared_react-WURrSs1p.js.map} +1 -1
- package/dist/assets/__federation_shared_react-dom-CWagDEjd.js +2 -0
- package/dist/assets/{__federation_shared_react-dom-DPv53nVg.js.map → __federation_shared_react-dom-CWagDEjd.js.map} +1 -1
- package/dist/assets/_commonjsHelpers-CqkleIqs.js +2 -0
- package/dist/assets/_commonjsHelpers-CqkleIqs.js.map +1 -0
- package/dist/assets/_virtual___federation_fn_import-DXu2m-ZE.js +2 -0
- package/dist/assets/{_virtual___federation_fn_import-DK_YYIlv.js.map → _virtual___federation_fn_import-DXu2m-ZE.js.map} +1 -1
- package/dist/assets/admin-Bw70Pql0.js +2 -0
- package/dist/assets/admin-Bw70Pql0.js.map +1 -0
- package/dist/assets/backend-CoqSwiCt.js +2 -0
- package/dist/assets/{backend-B_UhUC1z.js.map → backend-CoqSwiCt.js.map} +1 -1
- package/dist/assets/badge-with-type-label-BXoSRTRE.js +2 -0
- package/dist/assets/{badge-with-type-label-Cvf-Kq7s.js.map → badge-with-type-label-BXoSRTRE.js.map} +1 -1
- package/dist/assets/edit._key-CtMMGDWu.js +2 -0
- package/dist/assets/edit._key-CtMMGDWu.js.map +1 -0
- package/dist/assets/edit._sectionKey-CTX9L0j4.js +3 -0
- package/dist/assets/edit._sectionKey-CTX9L0j4.js.map +1 -0
- package/dist/assets/enum-info-form-D5bAsvPH.js +2 -0
- package/dist/assets/{enum-info-form-CfQbLUQ3.js.map → enum-info-form-D5bAsvPH.js.map} +1 -1
- package/dist/assets/graphql-BmA-sAqU.js +2 -0
- package/dist/assets/{graphql-DTRjqtIq.js.map → graphql-BmA-sAqU.js.map} +1 -1
- package/dist/assets/hierarchy-CZorhmS7.js +2 -0
- package/dist/assets/{hierarchy-BDu76BxG.js.map → hierarchy-CZorhmS7.js.map} +1 -1
- package/dist/assets/immer-B7fdkLVi.js +2 -0
- package/dist/assets/immer-B7fdkLVi.js.map +1 -0
- package/dist/assets/index-BABen-rU.js +2 -0
- package/dist/assets/index-BABen-rU.js.map +1 -0
- package/dist/assets/index-BGLRovL6.js +2 -0
- package/dist/assets/index-BGLRovL6.js.map +1 -0
- package/dist/assets/index-BPzqpd9P.js +2 -0
- package/dist/assets/{index-CKCJuR7p.js.map → index-BPzqpd9P.js.map} +1 -1
- package/dist/assets/index-BUYA3Tes.js +40 -0
- package/dist/assets/index-BUYA3Tes.js.map +1 -0
- package/dist/assets/index-Bl_iRlKL.js +2 -0
- package/dist/assets/index-Bl_iRlKL.js.map +1 -0
- package/dist/assets/index-BpDkQSTy.js +2 -0
- package/dist/assets/{index-01LAxHjt.js.map → index-BpDkQSTy.js.map} +1 -1
- package/dist/assets/index-CaiaVpxa.js +2 -0
- package/dist/assets/index-CaiaVpxa.js.map +1 -0
- package/dist/assets/index-CsGKSjOd.js +2 -0
- package/dist/assets/index-CsGKSjOd.js.map +1 -0
- package/dist/assets/index-D-dbw3Qx.js +2 -0
- package/dist/assets/{index-DITwAD5X.js.map → index-D-dbw3Qx.js.map} +1 -1
- package/dist/assets/index-DCiH936w.js +2 -0
- package/dist/assets/{index-D8LleqeK.js.map → index-DCiH936w.js.map} +1 -1
- package/dist/assets/index-DDivWD4R.js +2 -0
- package/dist/assets/index-DDivWD4R.js.map +1 -0
- package/dist/assets/index-DpJKJe06.js +2 -0
- package/dist/assets/index-DpJKJe06.js.map +1 -0
- package/dist/assets/{index-B0D_rfGi.js → index-DqHVrEeL.js} +2 -2
- package/dist/assets/{index-B0D_rfGi.js.map → index-DqHVrEeL.js.map} +1 -1
- package/dist/assets/index-PlVWOW99.css +1 -0
- package/dist/assets/index-_mf2naQd.js +2 -0
- package/dist/assets/index-_mf2naQd.js.map +1 -0
- package/dist/assets/{index-9Ra4Lmds.js → index-c0qeY2gs.js} +3 -3
- package/dist/assets/{index-9Ra4Lmds.js.map → index-c0qeY2gs.js.map} +1 -1
- package/dist/assets/index-p--SDqro.js +2 -0
- package/dist/assets/{index-DhWOhNFS.js.map → index-p--SDqro.js.map} +1 -1
- package/dist/assets/index.esm-CTDJ8Wko.js +2 -0
- package/dist/assets/index.esm-CTDJ8Wko.js.map +1 -0
- package/dist/assets/jsx-runtime-D_zvdyIk.js +10 -0
- package/dist/assets/jsx-runtime-D_zvdyIk.js.map +1 -0
- package/dist/assets/model-info-form-pKQBCJu4.js +2 -0
- package/dist/assets/{model-info-form-tJoD-VwE.js.map → model-info-form-pKQBCJu4.js.map} +1 -1
- package/dist/assets/model-merger-vEOkdVdS.js +2 -0
- package/dist/assets/model-merger-vEOkdVdS.js.map +1 -0
- package/dist/assets/new-admin-section-dialog-F58HZ0yO.js +2 -0
- package/dist/assets/new-admin-section-dialog-F58HZ0yO.js.map +1 -0
- package/dist/assets/new-app-dialog-DPQv-mvi.js +2 -0
- package/dist/assets/new-app-dialog-DPQv-mvi.js.map +1 -0
- package/dist/assets/new-enum-dialog-xVvneRQN.js +2 -0
- package/dist/assets/{new-enum-dialog-BxDxXwX_.js.map → new-enum-dialog-xVvneRQN.js.map} +1 -1
- package/dist/assets/new-model-dialog-ApenxGWq.js +2 -0
- package/dist/assets/{new-model-dialog-D4pnLGR_.js.map → new-model-dialog-ApenxGWq.js.map} +1 -1
- package/dist/assets/route-1RLqcpwJ.js +2 -0
- package/dist/assets/{route-DYHQ0t6P.js.map → route-1RLqcpwJ.js.map} +1 -1
- package/dist/assets/route-9nRSk82v.js +2 -0
- package/dist/assets/route-9nRSk82v.js.map +1 -0
- package/dist/assets/route-B5_zLW88.js +2 -0
- package/dist/assets/{route-DSICQIL3.js.map → route-B5_zLW88.js.map} +1 -1
- package/dist/assets/route-BPsno3Cl.js +2 -0
- package/dist/assets/route-BPsno3Cl.js.map +1 -0
- package/dist/assets/route-BW0F_EH4.js +2 -0
- package/dist/assets/{route-BGYla1q4.js.map → route-BW0F_EH4.js.map} +1 -1
- package/dist/assets/route-C1hyfOXp.js +2 -0
- package/dist/assets/route-C1hyfOXp.js.map +1 -0
- package/dist/assets/route-CH7VQVwb.js +2 -0
- package/dist/assets/route-CH7VQVwb.js.map +1 -0
- package/dist/assets/route-CpoiDvOD.js +2 -0
- package/dist/assets/route-CpoiDvOD.js.map +1 -0
- package/dist/assets/route-Dq2UgkxS.js +2 -0
- package/dist/assets/{route-CO2y2T3j.js.map → route-Dq2UgkxS.js.map} +1 -1
- package/dist/assets/route-z54yq2nP.js +2 -0
- package/dist/assets/route-z54yq2nP.js.map +1 -0
- package/dist/assets/service-Cv-U7NUv.js +2 -0
- package/dist/assets/service-Cv-U7NUv.js.map +1 -0
- package/dist/assets/sortBy-C9bvycg5.js +2 -0
- package/dist/assets/sortBy-C9bvycg5.js.map +1 -0
- package/dist/assets/template-extractor-ElrbBsVj.js +2 -0
- package/dist/assets/{template-extractor-1dzSeRMo.js.map → template-extractor-ElrbBsVj.js.map} +1 -1
- package/dist/assets/{theme-builder-NSOA1xIw.js → theme-builder-Butjmy7L.js} +6 -6
- package/dist/assets/{theme-builder-NSOA1xIw.js.map → theme-builder-Butjmy7L.js.map} +1 -1
- package/dist/assets/{use-definition-schema-DOTr2MSB.js → use-definition-schema-e7us6WfR.js} +2 -2
- package/dist/assets/{use-definition-schema-DOTr2MSB.js.map → use-definition-schema-e7us6WfR.js.map} +1 -1
- package/dist/assets/use-enum-form-CEyTBPQn.js +2 -0
- package/dist/assets/{use-enum-form-Bon-b8Oc.js.map → use-enum-form-CEyTBPQn.js.map} +1 -1
- package/dist/assets/use-model-form-Ch_tz0Rd.js +2 -0
- package/dist/assets/{use-model-form-Bjm8n0m8.js.map → use-model-form-Ch_tz0Rd.js.map} +1 -1
- package/dist/assets/words-Cs2RBKRm.js +2 -0
- package/dist/assets/words-Cs2RBKRm.js.map +1 -0
- package/dist/index.html +11 -8
- package/package.json +11 -11
- package/dist/assets/-constants-CyTNHADu.js +0 -4
- package/dist/assets/-constants-CyTNHADu.js.map +0 -1
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-dPVRSC8L.js +0 -2
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-DnM8acZf.js +0 -5
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-DnM8acZf.js.map +0 -1
- package/dist/assets/__federation_shared_@baseplate-dev/ui-components-z-HwX7Wv.js +0 -46
- package/dist/assets/__federation_shared_@baseplate-dev/ui-components-z-HwX7Wv.js.map +0 -1
- package/dist/assets/__federation_shared_react-CTQ9xfiH.js +0 -2
- package/dist/assets/__federation_shared_react-dom-DPv53nVg.js +0 -2
- package/dist/assets/_virtual___federation_fn_import-DK_YYIlv.js +0 -2
- package/dist/assets/backend-B_UhUC1z.js +0 -2
- package/dist/assets/badge-with-type-label-Cvf-Kq7s.js +0 -2
- package/dist/assets/edit._id-TYAWf8Zb.js +0 -2
- package/dist/assets/edit._id-TYAWf8Zb.js.map +0 -1
- package/dist/assets/enum-info-form-CfQbLUQ3.js +0 -2
- package/dist/assets/graphql-DTRjqtIq.js +0 -2
- package/dist/assets/hierarchy-BDu76BxG.js +0 -2
- package/dist/assets/immer-BOh2djD_.js +0 -2
- package/dist/assets/immer-BOh2djD_.js.map +0 -1
- package/dist/assets/index-01LAxHjt.js +0 -2
- package/dist/assets/index-B7G2CMwL.js +0 -58
- package/dist/assets/index-B7G2CMwL.js.map +0 -1
- package/dist/assets/index-B9Di1LKs.css +0 -1
- package/dist/assets/index-BgFEd-vA.js +0 -2
- package/dist/assets/index-BgFEd-vA.js.map +0 -1
- package/dist/assets/index-BkkIaDrq.js +0 -2
- package/dist/assets/index-BkkIaDrq.js.map +0 -1
- package/dist/assets/index-CKCJuR7p.js +0 -2
- package/dist/assets/index-Cg4QKyV6.js +0 -2
- package/dist/assets/index-Cg4QKyV6.js.map +0 -1
- package/dist/assets/index-D8LleqeK.js +0 -2
- package/dist/assets/index-DITwAD5X.js +0 -2
- package/dist/assets/index-DhWOhNFS.js +0 -2
- package/dist/assets/index-PWrncK3R.js +0 -2
- package/dist/assets/index-PWrncK3R.js.map +0 -1
- package/dist/assets/index-tLZ1b0Gc.js +0 -2
- package/dist/assets/index-tLZ1b0Gc.js.map +0 -1
- package/dist/assets/index.esm-Bvv3vNQh.js +0 -10
- package/dist/assets/index.esm-Bvv3vNQh.js.map +0 -1
- package/dist/assets/model-info-form-tJoD-VwE.js +0 -2
- package/dist/assets/model-merger-DuBMgrZ3.js +0 -2
- package/dist/assets/model-merger-DuBMgrZ3.js.map +0 -1
- package/dist/assets/new-app-dialog-CFhp6QLe.js +0 -2
- package/dist/assets/new-app-dialog-CFhp6QLe.js.map +0 -1
- package/dist/assets/new-enum-dialog-BxDxXwX_.js +0 -2
- package/dist/assets/new-model-dialog-D4pnLGR_.js +0 -2
- package/dist/assets/route-BGYla1q4.js +0 -2
- package/dist/assets/route-BILZA_nq.js +0 -2
- package/dist/assets/route-BILZA_nq.js.map +0 -1
- package/dist/assets/route-BLMjDHl_.js +0 -2
- package/dist/assets/route-BLMjDHl_.js.map +0 -1
- package/dist/assets/route-CO2y2T3j.js +0 -2
- package/dist/assets/route-DSICQIL3.js +0 -2
- package/dist/assets/route-DYHQ0t6P.js +0 -2
- package/dist/assets/route-DvbGaH6v.js +0 -2
- package/dist/assets/route-DvbGaH6v.js.map +0 -1
- package/dist/assets/route-MA2rDgPd.js +0 -2
- package/dist/assets/route-MA2rDgPd.js.map +0 -1
- package/dist/assets/route-rzAviP-P.js +0 -2
- package/dist/assets/route-rzAviP-P.js.map +0 -1
- package/dist/assets/sections-BSA71xrl.js +0 -2
- package/dist/assets/sections-BSA71xrl.js.map +0 -1
- package/dist/assets/sections._sectionKey-DSatzih8.js +0 -2
- package/dist/assets/sections._sectionKey-DSatzih8.js.map +0 -1
- package/dist/assets/service-C0mRE7Wd.js +0 -2
- package/dist/assets/service-C0mRE7Wd.js.map +0 -1
- package/dist/assets/template-extractor-1dzSeRMo.js +0 -2
- package/dist/assets/use-enum-form-Bon-b8Oc.js +0 -2
- package/dist/assets/use-model-form-Bjm8n0m8.js +0 -2
- package/dist/assets/utils-BGrwv_U7.js +0 -2
- package/dist/assets/utils-BGrwv_U7.js.map +0 -1
- package/dist/assets/web-B598C4Bq.js +0 -2
- package/dist/assets/web-B598C4Bq.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const U="[0-9A-Za-z-]+",C=`(?:\\+(${U}(?:\\.${U})*))`,b="0|[1-9]\\d*",w="[0-9]+",F="\\d*[a-zA-Z-][a-zA-Z0-9-]*",X=`(?:${w}|${F})`,D=`(?:-?(${X}(?:\\.${X})*))`,q=`(?:${b}|${F})`,k=`(?:-(${q}(?:\\.${q})*))`,T=`${b}|x|X|\\*`,_=`[v=\\s]*(${T})(?:\\.(${T})(?:\\.(${T})(?:${k})?${C}?)?)?`,J=`^\\s*(${_})\\s+-\\s+(${_})\\s*$`,Q=`(${w})\\.(${w})\\.(${w})`,W=`[v=\\s]*${Q}${D}?${C}?`,P="((?:<|>)?=?)",Y=`(\\s*)${P}\\s*(${W}|${_})`,B="(?:~>?)",j=`(\\s*)${B}\\s+`,G="(?:\\^)",A=`(\\s*)${G}\\s+`,m="(<|>)?=?\\s*\\*",ee=`^${G}${_}$`,re=`(${b})\\.(${b})\\.(${b})`,te=`v?${re}${k}?${C}?`,ne=`^${B}${_}$`,se=`^${P}\\s*${_}$`,ie=`^${P}\\s*(${te})$|^$`,ue="^\\s*>=\\s*0.0.0\\s*$";function o(e){return new RegExp(e)}function $(e){return!e||e.toLowerCase()==="x"||e==="*"}function H(...e){return n=>e.reduce((i,r)=>r(i),n)}function E(e){return e.match(o(ie))}function S(e,n,i,r){const t=`${e}.${n}.${i}`;return r?`${t}-${r}`:t}function $e(e){return e.replace(o(J),(n,i,r,t,s,u,c,a,f,l,R,p)=>($(r)?i="":$(t)?i=`>=${r}.0.0`:$(s)?i=`>=${r}.${t}.0`:i=`>=${i}`,$(f)?a="":$(l)?a=`<${+f+1}.0.0-0`:$(R)?a=`<${f}.${+l+1}.0-0`:p?a=`<=${f}.${l}.${R}-${p}`:a=`<=${a}`,`${i} ${a}`.trim()))}function ce(e){return e.replace(o(Y),"$1$2$3")}function ae(e){return e.replace(o(j),"$1~")}function fe(e){return e.replace(o(A),"$1^")}function le(e){return e.trim().split(/\s+/).map(n=>n.replace(o(ee),(i,r,t,s,u)=>$(r)?"":$(t)?`>=${r}.0.0 <${+r+1}.0.0-0`:$(s)?r==="0"?`>=${r}.${t}.0 <${r}.${+t+1}.0-0`:`>=${r}.${t}.0 <${+r+1}.0.0-0`:u?r==="0"?t==="0"?`>=${r}.${t}.${s}-${u} <${r}.${t}.${+s+1}-0`:`>=${r}.${t}.${s}-${u} <${r}.${+t+1}.0-0`:`>=${r}.${t}.${s}-${u} <${+r+1}.0.0-0`:r==="0"?t==="0"?`>=${r}.${t}.${s} <${r}.${t}.${+s+1}-0`:`>=${r}.${t}.${s} <${r}.${+t+1}.0-0`:`>=${r}.${t}.${s} <${+r+1}.0.0-0`)).join(" ")}function oe(e){return e.trim().split(/\s+/).map(n=>n.replace(o(ne),(i,r,t,s,u)=>$(r)?"":$(t)?`>=${r}.0.0 <${+r+1}.0.0-0`:$(s)?`>=${r}.${t}.0 <${r}.${+t+1}.0-0`:u?`>=${r}.${t}.${s}-${u} <${r}.${+t+1}.0-0`:`>=${r}.${t}.${s} <${r}.${+t+1}.0-0`)).join(" ")}function pe(e){return e.split(/\s+/).map(n=>n.trim().replace(o(se),(i,r,t,s,u,c)=>{const a=$(t),f=a||$(s),l=f||$(u);return r==="="&&l&&(r=""),c="",a?r===">"||r==="<"?"<0.0.0-0":"*":r&&l?(f&&(s=0),u=0,r===">"?(r=">=",f?(t=+t+1,s=0,u=0):(s=+s+1,u=0)):r==="<="&&(r="<",f?t=+t+1:s=+s+1),r==="<"&&(c="-0"),`${r+t}.${s}.${u}${c}`):f?`>=${t}.0.0${c} <${+t+1}.0.0-0`:l?`>=${t}.${s}.0${c} <${t}.${+s+1}.0-0`:i})).join(" ")}function de(e){return e.trim().replace(o(m),"")}function _e(e){return e.trim().replace(o(ue),"")}function h(e,n){return e=+e||e,n=+n||n,e>n?1:e===n?0:-1}function be(e,n){const{preRelease:i}=e,{preRelease:r}=n;if(i===void 0&&r)return 1;if(i&&r===void 0)return-1;if(i===void 0&&r===void 0)return 0;for(let t=0,s=i.length;t<=s;t++){const u=i[t],c=r[t];if(u!==c)return u===void 0&&c===void 0?0:u?c?h(u,c):-1:1}return 0}function v(e,n){return h(e.major,n.major)||h(e.minor,n.minor)||h(e.patch,n.patch)||be(e,n)}function V(e,n){return e.version===n.version}function Re(e,n){switch(e.operator){case"":case"=":return V(e,n);case">":return v(e,n)<0;case">=":return V(e,n)||v(e,n)<0;case"<":return v(e,n)>0;case"<=":return V(e,n)||v(e,n)>0;case void 0:return!0;default:return!1}}function ve(e){return H(le,oe,pe,de)(e)}function we(e){return H($e,ce,ae,fe)(e.trim()).split(/\s+/).join(" ")}function he(e,n){if(!e)return!1;const t=we(n).split(" ").map(p=>ve(p)).join(" ").split(/\s+/).map(p=>_e(p)),s=E(e);if(!s)return!1;const[,u,,c,a,f,l]=s,R={version:S(c,a,f,l),major:c,minor:a,patch:f,preRelease:l?.split(".")};for(const p of t){const y=E(p);if(!y)return!1;const[,M,,I,O,z,L]=y,N={operator:M,version:S(I,O,z,L),major:I,minor:O,patch:z,preRelease:L?.split(".")};if(!Re(N,R))return!1}return!0}const Z={},g={react:{get:()=>()=>d(new URL("__federation_shared_react-CTQ9xfiH.js",import.meta.url).href),import:!0},"react-dom":{get:()=>()=>d(new URL("__federation_shared_react-dom-DPv53nVg.js",import.meta.url).href),import:!0},zod:{get:()=>()=>d(new URL("__federation_shared_zod-DQ8g46gT.js",import.meta.url).href),import:!0},"@baseplate-dev/project-builder-lib":{get:()=>()=>d(new URL("__federation_shared_@baseplate-dev/project-builder-lib-DnM8acZf.js",import.meta.url).href),import:!0},"@baseplate-dev/project-builder-lib/web":{get:()=>()=>d(new URL("__federation_shared_@baseplate-dev/project-builder-lib/web-dPVRSC8L.js",import.meta.url).href),import:!0},"@baseplate-dev/ui-components":{get:()=>()=>d(new URL("__federation_shared_@baseplate-dev/ui-components-z-HwX7Wv.js",import.meta.url).href),import:!0}},x=Object.create(null);async function Le(e,n="default"){return x[e]?new Promise(i=>i(x[e])):await ge(e,n)||xe(e)}async function d(e){return Z[e]??=import(e),Z[e]}async function ge(e,n){let i=null;if(globalThis?.__federation_shared__?.[n]?.[e]){const r=globalThis.__federation_shared__[n][e],t=Object.keys(r)[0],s=Object.values(r)[0];g[e]?.requiredVersion?he(t,g[e].requiredVersion)?i=await(await s.get())():console.log(`provider support ${e}(${t}) is not satisfied requiredVersion(\${moduleMap[name].requiredVersion})`):i=await(await s.get())()}if(i)return K(i,e)}async function xe(e){if(g[e]?.import){let n=await(await g[e].get())();return K(n,e)}else console.error("consumer config import=false,so cant use callback shared module")}function K(e,n){return typeof e.default=="function"?(Object.keys(e).forEach(i=>{i!=="default"&&(e.default[i]=e[i])}),x[n]=e.default,e.default):(e.default&&(e=Object.assign({},e.default,e)),x[n]=e,e)}export{Le as i};
|
|
2
|
-
//# sourceMappingURL=_virtual___federation_fn_import-DK_YYIlv.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as s}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{j as e}from"./index.esm-Bvv3vNQh.js";import{h as k,s as g}from"./index-B7G2CMwL.js";import{u as v}from"./use-definition-schema-DOTr2MSB.js";const{createBackendAppSchema:L}=await s("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:E,useProjectDefinition:B,useResettableForm:P}=await s("@baseplate-dev/project-builder-lib/web"),{FormActionBar:w,InputFieldController:l,SectionList:y,SectionListSection:p,SectionListSectionContent:d,SectionListSectionDescription:b,SectionListSectionHeader:m,SectionListSectionTitle:u,SwitchFieldController:i}=await s("@baseplate-dev/ui-components"),N=function(){const{saveDefinitionWithFeedback:x}=B(),{backendDefinition:n}=k.useLoaderData(),j=v(L),o=P({resolver:g(j),values:n}),{control:a,handleSubmit:h,reset:S}=o,t=h(f=>x(r=>{r.apps=r.apps.map(c=>c.id===n.id?f:c)}));return E({control:a,reset:S,onSubmit:t}),e.jsxs("form",{className:"w-full max-w-7xl space-y-4 px-4",onSubmit:t,children:[e.jsxs(y,{children:[e.jsxs(p,{children:[e.jsxs(m,{children:[e.jsx(u,{children:"General"}),e.jsx(b,{children:"Basic configuration for your backend application."})]}),e.jsxs(d,{className:"space-y-6",children:[e.jsx(l,{label:"Name",control:a,name:"name"}),e.jsx(l,{label:"Package Location (optional)",placeholder:"e.g. packages/backend",control:a,name:"packageLocation"})]})]}),e.jsxs(p,{children:[e.jsxs(m,{children:[e.jsx(u,{children:"Configuration"}),e.jsx(b,{children:"Enable or disable external services and features for your backend application."})]}),e.jsx(d,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(i,{control:a,name:"enableStripe",label:"Stripe",description:"Enable Stripe for payment processing"}),e.jsx(i,{control:a,name:"enablePostmark",label:"Postmark",description:"Enable Postmark for email delivery"}),e.jsx(i,{control:a,name:"enableRedis",label:"Redis",description:"Enable Redis for caching and session storage"}),e.jsx(i,{control:a,name:"enableBullQueue",label:"Bull Queue",description:"Enable Bull Queue for background job processing"}),e.jsx(i,{control:a,name:"enableSubscriptions",label:"GraphQL Subscriptions",description:"Enable GraphQL Subscriptions for real-time updates"}),e.jsx(i,{control:a,name:"enableAxios",label:"Axios",description:"Enable Axios for HTTP requests"})]})})]})]}),e.jsx(w,{form:o})]})};export{N as component};
|
|
2
|
-
//# sourceMappingURL=backend-B_UhUC1z.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as d}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{j as o}from"./index.esm-Bvv3vNQh.js";import{c as f}from"./index-BgFEd-vA.js";function g(e){const t=/([_\s-]*[A-Z]+(?![^\s\-_A-Z])|[_\s-]*[A-Z]*[^\s\-_A-Z]+)/g;return e.match(t)??[]}function a(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-3))}...`}function p(e,t=20){if(e.length<=t)return e;if(e.length<=3)return"...";const n=g(e);if(n.length===1)return a(e,t);const s=n[0],l=(n.at(-1)??"").replace(/^[_\s-]+/,""),c=l.length;if(s.length+c+3>t)return a(e,t);let i=s;for(let r=1;r<n.length-1;r++){const u=n[r].length;if(i.length+u+c+3>t)break;i+=n[r]}return`${i}...${l}`}const{Badge:m}=await d("@baseplate-dev/ui-components");function b({className:e,children:t,type:n}){return o.jsxs("div",{className:f("flex h-8 w-full items-center justify-between gap-4 rounded-md border bg-muted px-3 text-sm",e),children:[o.jsx("div",{children:t}),o.jsx(m,{variant:"outline",className:"text-muted-foreground",children:p(n,20)})]})}export{b as B};
|
|
2
|
-
//# sourceMappingURL=badge-with-type-label-Cvf-Kq7s.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as o}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{j as e}from"./index.esm-Bvv3vNQh.js";import{R as c,c as w,N as P,e as D,l as f}from"./index-B7G2CMwL.js";import{l as v}from"./utils-BGrwv_U7.js";const{pluginEntityType:S,PluginUtils:y,webConfigSpec:m}=await o("@baseplate-dev/project-builder-lib"),{useProjectDefinition:N}=await o("@baseplate-dev/project-builder-lib/web"),{Button:M,DropdownMenu:F,DropdownMenuContent:W,DropdownMenuGroup:A,DropdownMenuItem:E,DropdownMenuTrigger:I,useConfirmDialog:R}=await o("@baseplate-dev/ui-components"),{useMemo:T}=await o("react"),H=function(){const{definitionContainer:s,pluginContainer:u,schemaParserContext:d,saveDefinitionWithFeedbackSync:x,isSavingDefinition:h}=N(),{id:n}=c.useParams(),{requestConfirm:b}=R(),p=w({from:c.fullPath}),{plugin:a}=c.useLoaderData(),l=y.byId(s.definition,n),g=T(()=>{if(!n)return;const t=u.getPluginSpec(m).getWebConfigComponent(n);return t||v(d.pluginStore,a.metadata,s.definition).getPluginSpec(m).getWebConfigComponent(n)},[n,d,s,u,a]),{metadata:i}=a;if(!g)return e.jsx(P,{});function C(){x(r=>{r.plugins=(r.plugins??[]).filter(t=>t.id!==S.idFromKey(i.id))},{successMessage:`Disabled ${i.displayName}!`,onSuccess:()=>{p({to:"/plugins"}).catch(f)}})}function j(){l||p({to:"/plugins"}).catch(f)}return e.jsx("div",{className:"relative flex h-full flex-1 flex-col gap-4 overflow-hidden",children:e.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h1",{children:[i.displayName," Plugin"]}),l&&e.jsxs(F,{children:[e.jsx(I,{asChild:!0,children:e.jsx(M,{variant:"ghost",size:"icon",children:e.jsx(D,{"aria-label":"More Actions"})})}),e.jsx(W,{children:e.jsx(A,{children:e.jsx(E,{disabled:h,onSelect:()=>{b({title:"Disable Plugin",content:`Are you sure you want to disable the ${i.displayName} plugin?`,onConfirm:C})},children:"Disable Plugin"})})})]})]}),e.jsx(g,{definition:l,metadata:i,onSave:j})]})})};export{H as component};
|
|
2
|
-
//# sourceMappingURL=edit._id-TYAWf8Zb.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edit._id-TYAWf8Zb.js","sources":["../../src/routes/plugins/edit.$id.tsx?tsr-split=component"],"sourcesContent":["import type React from 'react';\n\nimport {\n pluginEntityType,\n PluginUtils,\n webConfigSpec,\n} from '@baseplate-dev/project-builder-lib';\nimport { useProjectDefinition } from '@baseplate-dev/project-builder-lib/web';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuTrigger,\n useConfirmDialog,\n} from '@baseplate-dev/ui-components';\nimport { createFileRoute, notFound, useNavigate } from '@tanstack/react-router';\nimport { useMemo } from 'react';\nimport { HiDotsVertical } from 'react-icons/hi';\n\nimport { NotFoundCard } from '#src/components/index.js';\nimport { logAndFormatError } from '#src/services/error-formatter.js';\n\nimport { loadPluginImplementationStoreWithNewPlugin } from './-components/utils.js';\n\nexport const Route = createFileRoute('/plugins/edit/$id')({\n component: PluginConfigPage,\n beforeLoad: ({ params: { id }, context: { schemaParserContext } }) => {\n const { availablePlugins } = schemaParserContext.pluginStore;\n const plugin = availablePlugins.find((p) => p.metadata.id === id);\n if (!plugin) return {};\n return {\n getTitle: () => plugin.metadata.displayName,\n plugin,\n };\n },\n loader: ({ context: { plugin } }) => {\n if (!plugin) throw notFound();\n return { plugin };\n },\n});\n\nfunction PluginConfigPage(): React.JSX.Element {\n const {\n definitionContainer,\n pluginContainer,\n schemaParserContext,\n saveDefinitionWithFeedbackSync,\n isSavingDefinition,\n } = useProjectDefinition();\n const { id } = Route.useParams();\n const { requestConfirm } = useConfirmDialog();\n const navigate = useNavigate({ from: Route.fullPath });\n const { plugin } = Route.useLoaderData();\n\n const pluginDefinition = PluginUtils.byId(definitionContainer.definition, id);\n\n const Container = useMemo(() => {\n if (!id) {\n return;\n }\n\n const pluginSpec = pluginContainer.getPluginSpec(webConfigSpec);\n const webConfigComponent = pluginSpec.getWebConfigComponent(id);\n if (webConfigComponent) {\n return webConfigComponent;\n }\n const newPluginContainer = loadPluginImplementationStoreWithNewPlugin(\n schemaParserContext.pluginStore,\n plugin.metadata,\n definitionContainer.definition,\n );\n\n return newPluginContainer\n .getPluginSpec(webConfigSpec)\n .getWebConfigComponent(id);\n }, [id, schemaParserContext, definitionContainer, pluginContainer, plugin]);\n\n const { metadata } = plugin;\n\n if (!Container) {\n return <NotFoundCard />;\n }\n\n function onDisablePlugin(): void {\n saveDefinitionWithFeedbackSync(\n (draft) => {\n draft.plugins = (draft.plugins ?? []).filter(\n (p) => p.id !== pluginEntityType.idFromKey(metadata.id),\n );\n },\n {\n successMessage: `Disabled ${metadata.displayName}!`,\n onSuccess: () => {\n navigate({ to: '/plugins' }).catch(logAndFormatError);\n },\n },\n );\n }\n\n function onSave(): void {\n if (!pluginDefinition) {\n navigate({ to: '/plugins' }).catch(logAndFormatError);\n }\n }\n\n return (\n <div className=\"relative flex h-full flex-1 flex-col gap-4 overflow-hidden\">\n <div className=\"flex flex-1 flex-col gap-4 overflow-y-auto p-4\">\n <div className=\"flex items-center justify-between\">\n <h1>{metadata.displayName} Plugin</h1>\n {pluginDefinition && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\">\n <HiDotsVertical aria-label=\"More Actions\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuGroup>\n <DropdownMenuItem\n disabled={isSavingDefinition}\n onSelect={() => {\n requestConfirm({\n title: 'Disable Plugin',\n content: `Are you sure you want to disable the ${metadata.displayName} plugin?`,\n onConfirm: onDisablePlugin,\n });\n }}\n >\n Disable Plugin\n </DropdownMenuItem>\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n <Container\n definition={pluginDefinition}\n metadata={metadata}\n onSave={onSave}\n />\n </div>\n </div>\n );\n}\n"],"names":["pluginEntityType","PluginUtils","webConfigSpec","importShared","useProjectDefinition","Button","DropdownMenu","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuTrigger","useConfirmDialog","useMemo","SplitComponent","definitionContainer","pluginContainer","schemaParserContext","saveDefinitionWithFeedbackSync","isSavingDefinition","id","Route","useParams","requestConfirm","navigate","useNavigate","from","fullPath","plugin","useLoaderData","pluginDefinition","byId","definition","Container","webConfigComponent","getPluginSpec","getWebConfigComponent","loadPluginImplementationStoreWithNewPlugin","pluginStore","metadata","NotFoundCard","onDisablePlugin","draft","plugins","filter","p","idFromKey","successMessage","displayName","onSuccess","to","catch","logAndFormatError","onSave","jsxs","jsx","HiDotsVertical","title","content","onConfirm"],"mappings":"0NAEA,KAAA,CAAA,iBAAAA,EAAA,YAAAC,EAAA,cAAAC,CAAA,EAAA,MAAAC,EAAA,oCAAA,EAKA,CAAA,qBAAAC,CAAA,EAAA,MAAAD,EAAA,wCAAA,EACA,CAAA,OAAAE,EAAA,aAAAC,EAAA,oBAAAC,EAAA,kBAAAC,EAAA,iBAAAC,EAAA,oBAAAC,EAAA,iBAAAC,CAAA,EAAA,MAAAR,EAAA,8BAAA,EAUA,CAAA,QAAAS,CAAA,EAAA,MAAAT,EAAA,OAAA,EAMoFU,EAAA,UAmBrC,CACvC,KAAA,CACJC,oBAAAA,EACAC,gBAAAA,EACAC,oBAAAA,EACAC,+BAAAA,EACAC,mBAAAA,GACEd,EAAqB,EACnB,CAAEe,GAAAA,CAAAA,EAAOC,EAAMC,UAAU,EACzB,CAAEC,eAAAA,GAAmBX,EAAiB,EACtCY,EAAWC,EAAY,CAAEC,KAAML,EAAMM,QAAAA,CAAU,EAC/C,CAAEC,OAAAA,CAAAA,EAAWP,EAAMQ,cAAc,EAEjCC,EAAmB5B,EAAY6B,KA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A,IAAC/C,GACC,SAAC+C,EAAAA,IAAA9C,EAAA,CACC,eAACC,EACC,CAAA,SAAUS,EACV,SAAU,IAAM,CACCI,EAAA,CACbkC,MAAO,iBACPC,QAAS,wCAAwCnB,EAASS,WAAW,WACrEW,UAAWlB,CAAAA,CACZ,CACH,EAAE,SAGJ,iBAAA,CAAA,CACF,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,EACCc,EAAA,IAAAtB,EAAA,CACC,WAAYH,EACZ,SAAAS,EACA,OAAAc,CAAe,CAAA,CAAA,CAAA,CAEnB,CACF,CAAA,CAEJ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as t}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{j as e}from"./index.esm-Bvv3vNQh.js";import{c as r}from"./index-BgFEd-vA.js";const{FeatureComboboxFieldController:s}=await t("@baseplate-dev/project-builder-lib/web"),{InputFieldController:n}=await t("@baseplate-dev/ui-components");function c({className:o,control:a}){return e.jsxs("div",{className:r("max-w-md space-y-4",o),children:[e.jsx(n,{label:"Name",control:a,name:"name",description:"The name of the enum (PascalCase)"}),e.jsx(s,{label:"Feature",control:a,name:"featureRef",description:"The feature this enum belongs to (dash-case)",canCreate:!0})]})}export{c as E};
|
|
2
|
-
//# sourceMappingURL=enum-info-form-CfQbLUQ3.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as o}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{e as m,j as e,u as v}from"./index.esm-Bvv3vNQh.js";import{u as y,S as V,E as K}from"./-constants-CyTNHADu.js";import{u as W}from"./use-model-form-Bjm8n0m8.js";import{L as Z,x as Y}from"./index-B7G2CMwL.js";import{E as I,G as P}from"./index-BgFEd-vA.js";import{B as w}from"./badge-with-type-label-Cvf-Kq7s.js";const{authConfigSpec:J}=await o("@baseplate-dev/project-builder-lib"),{useProjectDefinition:X}=await o("@baseplate-dev/project-builder-lib/web"),{Alert:ee,AlertDescription:te,AlertTitle:ie,MultiSwitchField:N,SectionListSection:se,SectionListSectionContent:ne,SectionListSectionDescription:le,SectionListSectionHeader:ae,SectionListSectionTitle:oe,SwitchFieldController:R}=await o("@baseplate-dev/ui-components");function ce({control:t,modelKey:a}){const{definition:d,pluginContainer:l}=X(),i=l.getPluginSpecOptional(J)?.getAuthRoles(d).map(b=>({label:b.name,value:b.id})),n=m({control:t,name:"graphql.objectType.enabled"}),c=y(b=>b.service??{}),p=m({control:t,name:"graphql.mutations.create.enabled"}),h=c.create?.enabled,j=m({control:t,name:"graphql.mutations.update.enabled"}),g=c.update?.enabled,u=m({control:t,name:"graphql.mutations.delete.enabled"}),x=c.delete?.enabled;return e.jsxs(se,{children:[e.jsx("div",{children:e.jsxs(ae,{className:"sticky top-2",children:[e.jsx(oe,{children:"Mutations"}),e.jsx(le,{children:"Configure the GraphQL mutations that can be performed on this model."})]})}),e.jsxs(ne,{className:"space-y-8",children:[(!h||!g||!x)&&e.jsxs(ee,{className:"max-w-md",children:[e.jsx(I,{}),e.jsxs(ie,{children:["Service methods disabled (",[!h&&"Create",!g&&"Update",!x&&"Delete"].filter(Boolean).join(", "),")"]}),e.jsxs(te,{children:["Enable the appropriate methods on the"," ",e.jsx(Z,{to:"/data/models/edit/$key/service",params:{key:a},className:"font-semibold",children:"the service tab"})," ","to expose mutations"]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(R,{control:t,name:"graphql.mutations.create.enabled",disabled:!n||!h,label:"Create Mutation",description:"Expose the create method in the GraphQL schema, e.g. createUser(input: $input)."}),p&&i&&e.jsx(N.Controller,{control:t,name:"graphql.mutations.create.roles",label:"Allowed Roles",options:i,className:"ml-[52px]"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(R,{control:t,name:"graphql.mutations.update.enabled",label:"Update Mutation",disabled:!n||!g,description:"Expose the update method in the GraphQL schema, e.g. updateUser(id: $id, input: $input)."}),j&&i&&e.jsx(N.Controller,{control:t,name:"graphql.mutations.update.roles",label:"Allowed Roles",options:i,className:"ml-[52px]"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{control:t,name:"graphql.mutations.delete.enabled",label:"Delete Mutation",disabled:!n||!x,description:"Expose the delete method in the GraphQL schema, e.g. deleteUser(id: $id)."}),u&&i&&e.jsx(N.Controller,{control:t,name:"graphql.mutations.delete.roles",label:"Allowed Roles",options:i,className:"ml-[52px]"})]})]})]})}function E(t){return P({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"},child:[]}]})(t)}function q(t){return P({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",clipRule:"evenodd"},child:[]}]})(t)}const{ModelUtils:de}=await o("@baseplate-dev/project-builder-lib"),{useProjectDefinition:re}=await o("@baseplate-dev/project-builder-lib/web"),{Badge:$,Button:T,Label:D,SectionListSection:pe,SectionListSectionContent:he,SectionListSectionDescription:me,SectionListSectionHeader:ue,SectionListSectionTitle:xe,Switch:F,SwitchFieldController:je}=await o("@baseplate-dev/ui-components"),{useState:M}=await o("react"),be="border-collapse text-left [&_td]:py-1 [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-10 [&_th]:py-2";function k(t,a,d,l){return d?t.filter(i=>a.includes(i.id)||i.id===l).map(i=>i.id):a.filter(i=>i!==l)}function ge({control:t}){const{definitionContainer:a,definition:d}=re(),l=y(s=>s.id),i=m({control:t,name:"graphql.objectType.enabled"}),n=y(s=>s.model.fields),{field:{value:c=[],onChange:p}}=v({control:t,name:"graphql.objectType.fields"}),h=n.length>10,[j,g]=M(h),u=y(s=>s.model.relations)??[],{field:{value:x=[],onChange:b}}=v({control:t,name:"graphql.objectType.localRelations"}),A=u.length>4,[S,U]=M(A),f=de.getRelationsToModel(d,l),{field:{value:L=[],onChange:B}}=v({control:t,name:"graphql.objectType.foreignRelations"}),O=f.length>4,[C,_]=M(O);return e.jsxs(pe,{children:[e.jsx("div",{children:e.jsxs(ue,{className:"sticky top-2",children:[e.jsx(xe,{children:"Object Type"}),e.jsx(me,{children:"Configure the object type that will be exposed in the GraphQL schema for this model."})]})}),e.jsxs(he,{className:"space-y-4",children:[e.jsx(je,{control:t,name:"graphql.objectType.enabled",label:"Enable Object Type",description:"Must be enabled for queries, mutations, and any relations to this model"}),e.jsxs("table",{className:be,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:e.jsxs("div",{className:"flex w-80 items-center gap-1",children:[e.jsx(D,{children:"Exposed Fields"}),e.jsxs($,{variant:"outline",className:"mr-5 font-medium text-muted-foreground",children:[c.length,"/",n.length," active"]}),h?e.jsx(T,{onClick:()=>{g(!j)},className:"flex items-center gap-4",title:j?"Expand fields":"Collapse fields",type:"button",variant:"ghost",size:"icon",children:j?e.jsx(E,{}):e.jsx(q,{})}):null]})}),e.jsx("th",{className:"pl-8"})]})}),e.jsxs("tbody",{children:[!j&&n.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(w,{type:s.type==="enum"&&s.options?.enumRef?a.nameFromId(s.options.enumRef):V[s.type].label,children:s.name})}),e.jsx("td",{className:"pl-8",children:e.jsx(F,{"aria-label":`Expose ${s.name} field`,disabled:!i,checked:c.includes(s.id),onCheckedChange:r=>{p(k(n,c,r,s.id))}})})]},s.id)),u.length>0?e.jsxs("tr",{children:[e.jsx("th",{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(D,{children:"Exposed Local Relations"}),e.jsxs($,{variant:"outline",className:"mr-5 font-medium text-muted-foreground",children:[x.length,"/",u.length," ","active"]}),A?e.jsx(T,{onClick:()=>{U(!S)},className:"flex items-center gap-4",title:S?"Expand fields":"Collapse fields",type:"button",variant:"ghost",size:"icon",children:S?e.jsx(E,{}):e.jsx(q,{})}):null]})}),e.jsx("th",{})]}):null,!S&&u.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(w,{type:a.nameFromId(s.modelRef),children:s.name})}),e.jsx("td",{className:"pl-8",children:e.jsx(F,{"aria-label":`Expose ${s.name} relation`,disabled:!i,checked:x.includes(s.id),onCheckedChange:r=>{b(k(u,x,r,s.id))}})})]},s.id)),f.length>0?e.jsxs("tr",{children:[e.jsx("th",{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(D,{children:"Exposed Foreign Relations"}),e.jsxs($,{variant:"outline",className:"mr-5 font-medium text-muted-foreground",children:[L.length,"/",f.length," ","active"]}),O?e.jsx(T,{onClick:()=>{_(!C)},className:"flex items-center gap-4",title:C?"Expand fields":"Collapse fields",type:"button",variant:"ghost",size:"icon",children:C?e.jsx(E,{}):e.jsx(q,{})}):null]})}),e.jsx("th",{})]}):null,!C&&f.map(({model:s,relation:r})=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(w,{type:s.name,children:r.foreignRelationName})}),e.jsx("td",{className:"pl-8",children:e.jsx(F,{"aria-label":`Expose ${r.foreignRelationName} relation`,disabled:!i,checked:L.includes(r.foreignId),onCheckedChange:H=>{B(k(f.map(({relation:z})=>({id:z.foreignId})),L,H,r.foreignId))}})})]},r.id))]})]})]})]})}const{authConfigSpec:fe}=await o("@baseplate-dev/project-builder-lib"),{useProjectDefinition:Se}=await o("@baseplate-dev/project-builder-lib/web"),{Alert:Ce,AlertDescription:ye,AlertTitle:Le,MultiSwitchField:G,SectionListSection:ve,SectionListSectionContent:we,SectionListSectionDescription:Ne,SectionListSectionHeader:Re,SectionListSectionTitle:Ee,SwitchFieldController:Q}=await o("@baseplate-dev/ui-components");function qe({control:t}){const{definition:a,pluginContainer:d}=Se(),l=m({control:t,name:"graphql.objectType.enabled"}),i=d.getPluginSpecOptional(fe)?.getAuthRoles(a).map(p=>({label:p.name,value:p.id})),n=m({control:t,name:"graphql.queries.get.enabled"}),c=m({control:t,name:"graphql.queries.list.enabled"});return e.jsxs(ve,{children:[e.jsx("div",{children:e.jsxs(Re,{className:"sticky top-2",children:[e.jsx(Ee,{children:"Queries"}),e.jsx(Ne,{children:"Configure the GraphQL queries that can be performed on this model."})]})}),e.jsxs(we,{className:"space-y-8",children:[!l&&e.jsxs(Ce,{className:"max-w-md",children:[e.jsx(I,{}),e.jsx(Le,{children:"Object type missing"}),e.jsx(ye,{children:"Enable the object type to expose queries and mutations"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(Q,{control:t,name:"graphql.queries.get.enabled",label:"Get By ID Query",disabled:!l,description:"Expose method for querying a single instance of this model by its ID, e.g. user(id: $id)."}),n&&i&&e.jsx(G.Controller,{control:t,name:"graphql.queries.get.roles",label:"Allowed Roles",options:i,className:"ml-[52px]"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(Q,{control:t,name:"graphql.queries.list.enabled",disabled:!l,label:"List Query",description:"Expose method for querying a list of instances of this model, e.g. users."}),c&&i&&e.jsx(G.Controller,{control:t,name:"graphql.queries.list.roles",label:"Allowed Roles",options:i,className:"ml-[52px]"})]})]})]})}const{useBlockUnsavedChangesNavigate:$e}=await o("@baseplate-dev/project-builder-lib/web"),{FormActionBar:Te,SectionList:De}=await o("@baseplate-dev/ui-components"),Ie=function(){const{key:a}=Y.useParams(),{form:d,onSubmit:l,originalModel:i}=W({omit:["name","featureRef"],modelKey:a}),{control:n,watch:c,getValues:p,reset:h}=d;return $e({control:n,reset:h,onSubmit:l}),e.jsx(K,{originalModel:i,getValues:p,watch:c,children:e.jsx("form",{onSubmit:l,className:"space-y-4 p-4",children:e.jsxs(De,{children:[e.jsx(ge,{control:n}),e.jsx(qe,{control:n}),e.jsx(ce,{control:n,modelKey:a}),e.jsx(Te,{form:d})]})})})};export{Ie as component};
|
|
2
|
-
//# sourceMappingURL=graphql-DTRjqtIq.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as r}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{b as $,j as e}from"./index.esm-Bvv3vNQh.js";import{G as S,I as E,B as z,J as I}from"./index-BgFEd-vA.js";import{s as M,U as A,d as B}from"./index-B7G2CMwL.js";import{s as P}from"./immer-BOh2djD_.js";function T(t){return S({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 10 20 15 15 20"},child:[]},{tag:"path",attr:{d:"M4 4v7a4 4 0 0 0 4 4h12"},child:[]}]})(t)}const{useProjectDefinition:H}=await r("@baseplate-dev/project-builder-lib/web"),{Button:D,ComboboxFieldController:U,Dialog:V,DialogContent:W,DialogFooter:G,DialogHeader:L,DialogTitle:O,InputFieldController:q}=await r("@baseplate-dev/ui-components"),{useEffect:J,useMemo:K}=await r("react"),{z:j}=await r("zod"),Q=j.object({id:j.string(),childName:j.string().min(1).regex(/^[a-z0-9-]+$/,"Must be lowercase, numbers, and dashes only"),parentRef:j.string().optional()});function X({feature:t,open:i,onClose:a}){const{definitionContainer:{definition:p},saveDefinitionWithFeedback:d}=H(),l=K(()=>({id:t?.id??"",childName:t?.name.split("/").pop()??"",parentRef:t?.parentRef}),[t]),{control:f,handleSubmit:w,reset:m,formState:{isSubmitting:v}}=$({resolver:M(Q),values:l});J(()=>{i&&m(l)},[i,l,m]);const y=w(n=>d(c=>{const x=c.features.find(s=>s.id===n.parentRef)?.name,h=n.parentRef?`${x}/${n.childName}`:n.childName;if(c.features.some(s=>s.id!==n.id&&s.name===h))throw new A("Feature with this name already exists");const b=[...c.features.filter(s=>s.id!==n.id),{id:n.id,name:h,parentRef:n.parentRef}];function F(s){const R=b.filter(u=>s?new RegExp(`^${s.name}/[^/]+$`).exec(u.name):!u.name.includes("/"));for(const u of R){const g=u.name.split("/").pop();if(!g)throw new Error("Invalid feature name");u.name=s?`${s.name}/${g}`:g,F(u)}}F(),c.features=P(b,[s=>s.name])},{onSuccess:()=>{a?.()}})),o=[{label:"None",value:void 0},...p.features.filter(n=>n.id!==t?.id).map(n=>({label:n.name,value:n.id}))];return e.jsx(V,{open:i,onOpenChange:n=>{n||a?.()},children:e.jsx(W,{children:e.jsxs("form",{className:"space-y-4",onSubmit:y,children:[e.jsx(L,{children:e.jsxs(O,{children:[t?.name?"Edit":"Add"," Feature"]})}),e.jsx(q,{control:f,name:"childName",label:"Name",autoComplete:"off","data-1p-ignore":!0}),e.jsx(U,{control:f,name:"parentRef",label:"Parent Feature",options:o}),e.jsxs(G,{children:[e.jsx(D,{onClick:a,variant:"secondary",children:"Cancel"}),e.jsx(D,{type:"submit",disabled:v,children:"Save"})]})]})})})}const{featureEntityType:C}=await r("@baseplate-dev/project-builder-lib"),{useProjectDefinition:Y}=await r("@baseplate-dev/project-builder-lib/web"),{Button:N,buttonVariants:Z,cn:_,useConfirmDialog:ee}=await r("@baseplate-dev/ui-components"),{useState:k}=await r("react");function te({feature:t,setFeatureToEdit:i,setShowFeatureForm:a,handleRemoveFeature:p}){const d=t.name.split("/").pop()??"";return e.jsxs("div",{className:"flex space-x-1",children:[e.jsx("button",{className:"mr-1 flex w-full flex-row items-center space-x-3",onClick:()=>{i(t),a(!0)},children:e.jsxs("div",{className:"flex w-full items-center space-x-1 truncate",title:d,children:[t.name.includes("/")&&e.jsxs(e.Fragment,{children:[t.name.split("/").slice(0,-2).map(l=>e.jsx("div",{className:"w-8 shrink-0"},l)),e.jsx(T,{className:"size-8 shrink-0 p-2"})]}),e.jsxs("div",{className:_(Z({variant:"secondary",size:"sm"}),"group w-full"),style:{justifyContent:"flex-start"},children:[d,e.jsx("div",{className:"flex-1"}),e.jsx(E,{className:"opacity-0 transition-opacity group-hover:opacity-100"})]})]})}),e.jsx(N,{className:"shrink-0",variant:"ghost",onClick:()=>{i({id:C.generateNewId(),name:"",parentRef:t.id}),a(!0)},size:"icon",title:`Add Sub-Feature to ${t.name}`,children:e.jsx(z,{})}),e.jsx(N,{className:"shrink-0",variant:"ghost",onClick:()=>{p(t)},size:"icon",title:`Delete ${t.name}`,children:e.jsx(I,{})})]})}const re=function(){const{definitionContainer:i,saveDefinitionWithFeedbackSync:a}=Y(),{requestConfirm:p}=ee(),{showRefIssues:d}=B(),[l,f]=k(),[w,m]=k(!1),{features:v}=i.definition,y=o=>{function n(x){const h=x.features.findIndex(b=>b.id===o.id);if(h===-1)throw new Error("Feature not found");x.features.splice(h,1)}const c=i.fixRefDeletions(n);if(c.type==="failure"){d({issues:c.issues});return}p({title:"Delete Feature",content:`Are you sure you want to delete ${o.name}?`,onConfirm:()=>{a(n,{successMessage:`Feature ${o.name} removed`})}})};return e.jsx("div",{className:"relative h-full max-h-full pb-(--action-bar-height)",children:e.jsxs("div",{className:"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6",children:[e.jsxs("div",{className:"sticky top-0 space-y-2 border-b bg-background py-6",children:[e.jsx("h1",{children:"Hierarchy"}),e.jsx("p",{className:"max-w-3xl text-muted-foreground",children:"All business logic and features are organized in a hierarchy. The structure of the features in the list below is the way the folder structure will be created in your backend/admin applications."})]}),e.jsxs("div",{className:"py-6",children:[e.jsx("div",{className:"mb-4 flex max-w-md flex-col gap-1",children:v.map(o=>e.jsx(te,{feature:o,setFeatureToEdit:f,setShowFeatureForm:m,handleRemoveFeature:y},o.id))}),e.jsx(N,{onClick:()=>{f({id:C.generateNewId(),name:"",parentRef:void 0}),m(!0)},variant:"secondary",size:"sm",children:"Add Feature"}),e.jsx(X,{feature:l,open:w,onClose:()=>{m(!1)}})]})]})})};export{re as component};
|
|
2
|
-
//# sourceMappingURL=hierarchy-BDu76BxG.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function Z(e,t,r){return e<t?r==="asc"?-1:1:e>t?r==="asc"?1:-1:0}function L(e,t,r){return e.slice().sort((n,i)=>{const o=r.length;for(let c=0;c<t.length;c++){const f=o>c?r[c]:r[o-1],s=t[c],g=typeof s=="function",C=g?s(n):n[s],Y=g?s(i):i[s],B=Z(C,Y,f);if(B!==0)return B}return 0})}function ue(e,t){return L(e,t,["asc"])}var H=Symbol.for("immer-nothing"),K=Symbol.for("immer-draftable"),u=Symbol.for("immer-state");function l(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var h=Object.getPrototypeOf;function p(e){return!!e&&!!e[u]}function y(e){return e?X(e)||Array.isArray(e)||!!e[K]||!!e.constructor?.[K]||A(e)||O(e):!1}var V=Object.prototype.constructor.toString();function X(e){if(!e||typeof e!="object")return!1;const t=h(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===V}function w(e,t){F(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function F(e){const t=e[u];return t?t.type_:Array.isArray(e)?1:A(e)?2:O(e)?3:0}function k(e,t){return F(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $(e,t,r){const n=F(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ee(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function A(e){return e instanceof Map}function O(e){return e instanceof Set}function _(e){return e.copy_||e.base_}function E(e,t){if(A(e))return new Map(e);if(O(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=X(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[u];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const c=i[o],f=n[c];f.writable===!1&&(f.writable=!0,f.configurable=!0),(f.get||f.set)&&(n[c]={configurable:!0,writable:!0,enumerable:f.enumerable,value:e[c]})}return Object.create(h(e),n)}else{const n=h(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function T(e,t=!1){return D(e)||p(e)||!y(e)||(F(e)>1&&(e.set=e.add=e.clear=e.delete=te),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>T(n,!0))),e}function te(){l(2)}function D(e){return Object.isFrozen(e)}var re={};function d(e){const t=re[e];return t||l(0,e),t}var m;function q(){return m}function ne(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function W(e,t){t&&(d("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function R(e){M(e),e.drafts_.forEach(ie),e.drafts_=null}function M(e){e===m&&(m=e.parent_)}function U(e){return m=ne(m,e)}function ie(e){const t=e[u];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function j(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[u].modified_&&(R(t),l(4)),y(e)&&(e=z(t,e),t.parent_||S(t,e)),t.patches_&&d("Patches").generateReplacementPatches_(r[u].base_,e,t.patches_,t.inversePatches_)):e=z(t,r,[]),R(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==H?e:void 0}function z(e,t,r){if(D(t))return t;const n=t[u];if(!n)return w(t,(i,o)=>G(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return S(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let o=i,c=!1;n.type_===3&&(o=new Set(i),i.clear(),c=!0),w(o,(f,s)=>G(e,n,i,f,s,r,c)),S(e,i,!1),r&&e.patches_&&d("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function G(e,t,r,n,i,o,c){if(p(i)){const f=o&&t&&t.type_!==3&&!k(t.assigned_,n)?o.concat(n):void 0,s=z(e,i,f);if($(r,n,s),p(s))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(y(i)&&!D(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;z(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&S(e,i)}}function S(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&T(t,r)}function oe(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:q(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=x;r&&(i=[n],o=P);const{revoke:c,proxy:f}=Proxy.revocable(i,o);return n.draft_=f,n.revoke_=c,f}var x={get(e,t){if(t===u)return e;const r=_(e);if(!k(r,t))return ce(e,r,t);const n=r[t];return e.finalized_||!y(n)?n:n===b(e.base_,t)?(v(e),e.copy_[t]=N(n,e)):n},has(e,t){return t in _(e)},ownKeys(e){return Reflect.ownKeys(_(e))},set(e,t,r){const n=J(_(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=b(_(e),t),o=i?.[u];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ee(r,i)&&(r!==void 0||k(e.base_,t)))return!0;v(e),I(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return b(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,v(e),I(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=_(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){l(11)},getPrototypeOf(e){return h(e.base_)},setPrototypeOf(){l(12)}},P={};w(x,(e,t)=>{P[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});P.deleteProperty=function(e,t){return P.set.call(this,e,t,void 0)};P.set=function(e,t,r){return x.set.call(this,e[0],t,r,e[0])};function b(e,t){const r=e[u];return(r?_(r):e)[t]}function ce(e,t,r){const n=J(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function J(e,t){if(!(t in e))return;let r=h(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=h(r)}}function I(e){e.modified_||(e.modified_=!0,e.parent_&&I(e.parent_))}function v(e){e.copy_||(e.copy_=E(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const c=this;return function(s=o,...g){return c.produce(s,C=>r.call(this,C,...g))}}typeof r!="function"&&l(6),n!==void 0&&typeof n!="function"&&l(7);let i;if(y(t)){const o=U(this),c=N(t,void 0);let f=!0;try{i=r(c),f=!1}finally{f?R(o):M(o)}return W(o,n),j(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===H&&(i=void 0),this.autoFreeze_&&T(i,!0),n){const o=[],c=[];d("Patches").generateReplacementPatches_(t,i,o,c),n(o,c)}return i}else l(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...f)=>this.produceWithPatches(c,s=>t(s,...f));let n,i;return[this.produce(t,r,(c,f)=>{n=c,i=f}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){y(e)||l(8),p(e)&&(e=se(e));const t=U(this),r=N(e,void 0);return r[u].isManual_=!0,M(t),r}finishDraft(e,t){const r=e&&e[u];(!r||!r.isManual_)&&l(9);const{scope_:n}=r;return W(n,t),j(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=d("Patches").applyPatches_;return p(e)?n(e,t):this.produce(e,i=>n(i,t))}};function N(e,t){const r=A(e)?d("MapSet").proxyMap_(e,t):O(e)?d("MapSet").proxySet_(e,t):oe(e,t);return(t?t.scope_:q()).drafts_.push(r),r}function se(e){return p(e)||l(10,e),Q(e)}function Q(e){if(!y(e)||D(e))return e;const t=e[u];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=E(e,t.scope_.immer_.useStrictShallowCopy_)}else r=E(e,!0);return w(r,(n,i)=>{$(r,n,Q(i))}),t&&(t.finalized_=!1),r}var a=new fe,ae=a.produce;a.produceWithPatches.bind(a);a.setAutoFreeze.bind(a);a.setUseStrictShallowCopy.bind(a);a.applyPatches.bind(a);a.createDraft.bind(a);a.finishDraft.bind(a);export{L as o,ae as p,ue as s};
|
|
2
|
-
//# sourceMappingURL=immer-BOh2djD_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"immer-BOh2djD_.js","sources":["../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs","../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/array/orderBy.mjs","../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/array/sortBy.mjs","../../../../node_modules/.pnpm/immer@10.1.1/node_modules/immer/dist/immer.mjs"],"sourcesContent":["function compareValues(a, b, order) {\n if (a < b) {\n return order === 'asc' ? -1 : 1;\n }\n if (a > b) {\n return order === 'asc' ? 1 : -1;\n }\n return 0;\n}\n\nexport { compareValues };\n","import { compareValues } from '../_internal/compareValues.mjs';\n\nfunction orderBy(arr, criteria, orders) {\n return arr.slice().sort((a, b) => {\n const ordersLength = orders.length;\n for (let i = 0; i < criteria.length; i++) {\n const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];\n const criterion = criteria[i];\n const criterionIsFunction = typeof criterion === 'function';\n const valueA = criterionIsFunction ? criterion(a) : a[criterion];\n const valueB = criterionIsFunction ? criterion(b) : b[criterion];\n const result = compareValues(valueA, valueB, order);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n}\n\nexport { orderBy };\n","import { orderBy } from './orderBy.mjs';\n\nfunction sortBy(arr, criteria) {\n return orderBy(arr, criteria, ['asc']);\n}\n\nexport { sortBy };\n","// src/utils/env.ts\nvar NOTHING = Symbol.for(\"immer-nothing\");\nvar DRAFTABLE = Symbol.for(\"immer-draftable\");\nvar DRAFT_STATE = Symbol.for(\"immer-state\");\n\n// src/utils/errors.ts\nvar errors = process.env.NODE_ENV !== \"production\" ? [\n // All error codes, starting by 0:\n function(plugin) {\n return `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \\`enable${plugin}()\\` when initializing your application.`;\n },\n function(thing) {\n return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`;\n },\n \"This object has been frozen and should not be mutated\",\n function(data) {\n return \"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + data;\n },\n \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",\n \"Immer forbids circular references\",\n \"The first or second argument to `produce` must be a function\",\n \"The third argument to `produce` must be a function or undefined\",\n \"First argument to `createDraft` must be a plain object, an array, or an immerable object\",\n \"First argument to `finishDraft` must be a draft returned by `createDraft`\",\n function(thing) {\n return `'current' expects a draft, got: ${thing}`;\n },\n \"Object.defineProperty() cannot be used on an Immer draft\",\n \"Object.setPrototypeOf() cannot be used on an Immer draft\",\n \"Immer only supports deleting array indices\",\n \"Immer only supports setting array indices and the 'length' property\",\n function(thing) {\n return `'original' expects a draft, got: ${thing}`;\n }\n // Note: if more errors are added, the errorOffset in Patches.ts should be increased\n // See Patches.ts for additional errors\n] : [];\nfunction die(error, ...args) {\n if (process.env.NODE_ENV !== \"production\") {\n const e = errors[error];\n const msg = typeof e === \"function\" ? e.apply(null, args) : e;\n throw new Error(`[Immer] ${msg}`);\n }\n throw new Error(\n `[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`\n );\n}\n\n// src/utils/common.ts\nvar getPrototypeOf = Object.getPrototypeOf;\nfunction isDraft(value) {\n return !!value && !!value[DRAFT_STATE];\n}\nfunction isDraftable(value) {\n if (!value)\n return false;\n return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);\n}\nvar objectCtorString = Object.prototype.constructor.toString();\nfunction isPlainObject(value) {\n if (!value || typeof value !== \"object\")\n return false;\n const proto = getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n const Ctor = Object.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n if (Ctor === Object)\n return true;\n return typeof Ctor == \"function\" && Function.toString.call(Ctor) === objectCtorString;\n}\nfunction original(value) {\n if (!isDraft(value))\n die(15, value);\n return value[DRAFT_STATE].base_;\n}\nfunction each(obj, iter) {\n if (getArchtype(obj) === 0 /* Object */) {\n Reflect.ownKeys(obj).forEach((key) => {\n iter(key, obj[key], obj);\n });\n } else {\n obj.forEach((entry, index) => iter(index, entry, obj));\n }\n}\nfunction getArchtype(thing) {\n const state = thing[DRAFT_STATE];\n return state ? state.type_ : Array.isArray(thing) ? 1 /* Array */ : isMap(thing) ? 2 /* Map */ : isSet(thing) ? 3 /* Set */ : 0 /* Object */;\n}\nfunction has(thing, prop) {\n return getArchtype(thing) === 2 /* Map */ ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);\n}\nfunction get(thing, prop) {\n return getArchtype(thing) === 2 /* Map */ ? thing.get(prop) : thing[prop];\n}\nfunction set(thing, propOrOldValue, value) {\n const t = getArchtype(thing);\n if (t === 2 /* Map */)\n thing.set(propOrOldValue, value);\n else if (t === 3 /* Set */) {\n thing.add(value);\n } else\n thing[propOrOldValue] = value;\n}\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\nfunction isMap(target) {\n return target instanceof Map;\n}\nfunction isSet(target) {\n return target instanceof Set;\n}\nfunction latest(state) {\n return state.copy_ || state.base_;\n}\nfunction shallowCopy(base, strict) {\n if (isMap(base)) {\n return new Map(base);\n }\n if (isSet(base)) {\n return new Set(base);\n }\n if (Array.isArray(base))\n return Array.prototype.slice.call(base);\n const isPlain = isPlainObject(base);\n if (strict === true || strict === \"class_only\" && !isPlain) {\n const descriptors = Object.getOwnPropertyDescriptors(base);\n delete descriptors[DRAFT_STATE];\n let keys = Reflect.ownKeys(descriptors);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const desc = descriptors[key];\n if (desc.writable === false) {\n desc.writable = true;\n desc.configurable = true;\n }\n if (desc.get || desc.set)\n descriptors[key] = {\n configurable: true,\n writable: true,\n // could live with !!desc.set as well here...\n enumerable: desc.enumerable,\n value: base[key]\n };\n }\n return Object.create(getPrototypeOf(base), descriptors);\n } else {\n const proto = getPrototypeOf(base);\n if (proto !== null && isPlain) {\n return { ...base };\n }\n const obj = Object.create(proto);\n return Object.assign(obj, base);\n }\n}\nfunction freeze(obj, deep = false) {\n if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))\n return obj;\n if (getArchtype(obj) > 1) {\n obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections;\n }\n Object.freeze(obj);\n if (deep)\n Object.entries(obj).forEach(([key, value]) => freeze(value, true));\n return obj;\n}\nfunction dontMutateFrozenCollections() {\n die(2);\n}\nfunction isFrozen(obj) {\n return Object.isFrozen(obj);\n}\n\n// src/utils/plugins.ts\nvar plugins = {};\nfunction getPlugin(pluginKey) {\n const plugin = plugins[pluginKey];\n if (!plugin) {\n die(0, pluginKey);\n }\n return plugin;\n}\nfunction loadPlugin(pluginKey, implementation) {\n if (!plugins[pluginKey])\n plugins[pluginKey] = implementation;\n}\n\n// src/core/scope.ts\nvar currentScope;\nfunction getCurrentScope() {\n return currentScope;\n}\nfunction createScope(parent_, immer_) {\n return {\n drafts_: [],\n parent_,\n immer_,\n // Whenever the modified draft contains a draft from another scope, we\n // need to prevent auto-freezing so the unowned draft can be finalized.\n canAutoFreeze_: true,\n unfinalizedDrafts_: 0\n };\n}\nfunction usePatchesInScope(scope, patchListener) {\n if (patchListener) {\n getPlugin(\"Patches\");\n scope.patches_ = [];\n scope.inversePatches_ = [];\n scope.patchListener_ = patchListener;\n }\n}\nfunction revokeScope(scope) {\n leaveScope(scope);\n scope.drafts_.forEach(revokeDraft);\n scope.drafts_ = null;\n}\nfunction leaveScope(scope) {\n if (scope === currentScope) {\n currentScope = scope.parent_;\n }\n}\nfunction enterScope(immer2) {\n return currentScope = createScope(currentScope, immer2);\n}\nfunction revokeDraft(draft) {\n const state = draft[DRAFT_STATE];\n if (state.type_ === 0 /* Object */ || state.type_ === 1 /* Array */)\n state.revoke_();\n else\n state.revoked_ = true;\n}\n\n// src/core/finalize.ts\nfunction processResult(result, scope) {\n scope.unfinalizedDrafts_ = scope.drafts_.length;\n const baseDraft = scope.drafts_[0];\n const isReplaced = result !== void 0 && result !== baseDraft;\n if (isReplaced) {\n if (baseDraft[DRAFT_STATE].modified_) {\n revokeScope(scope);\n die(4);\n }\n if (isDraftable(result)) {\n result = finalize(scope, result);\n if (!scope.parent_)\n maybeFreeze(scope, result);\n }\n if (scope.patches_) {\n getPlugin(\"Patches\").generateReplacementPatches_(\n baseDraft[DRAFT_STATE].base_,\n result,\n scope.patches_,\n scope.inversePatches_\n );\n }\n } else {\n result = finalize(scope, baseDraft, []);\n }\n revokeScope(scope);\n if (scope.patches_) {\n scope.patchListener_(scope.patches_, scope.inversePatches_);\n }\n return result !== NOTHING ? result : void 0;\n}\nfunction finalize(rootScope, value, path) {\n if (isFrozen(value))\n return value;\n const state = value[DRAFT_STATE];\n if (!state) {\n each(\n value,\n (key, childValue) => finalizeProperty(rootScope, state, value, key, childValue, path)\n );\n return value;\n }\n if (state.scope_ !== rootScope)\n return value;\n if (!state.modified_) {\n maybeFreeze(rootScope, state.base_, true);\n return state.base_;\n }\n if (!state.finalized_) {\n state.finalized_ = true;\n state.scope_.unfinalizedDrafts_--;\n const result = state.copy_;\n let resultEach = result;\n let isSet2 = false;\n if (state.type_ === 3 /* Set */) {\n resultEach = new Set(result);\n result.clear();\n isSet2 = true;\n }\n each(\n resultEach,\n (key, childValue) => finalizeProperty(rootScope, state, result, key, childValue, path, isSet2)\n );\n maybeFreeze(rootScope, result, false);\n if (path && rootScope.patches_) {\n getPlugin(\"Patches\").generatePatches_(\n state,\n path,\n rootScope.patches_,\n rootScope.inversePatches_\n );\n }\n }\n return state.copy_;\n}\nfunction finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {\n if (process.env.NODE_ENV !== \"production\" && childValue === targetObject)\n die(5);\n if (isDraft(childValue)) {\n const path = rootPath && parentState && parentState.type_ !== 3 /* Set */ && // Set objects are atomic since they have no keys.\n !has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;\n const res = finalize(rootScope, childValue, path);\n set(targetObject, prop, res);\n if (isDraft(res)) {\n rootScope.canAutoFreeze_ = false;\n } else\n return;\n } else if (targetIsSet) {\n targetObject.add(childValue);\n }\n if (isDraftable(childValue) && !isFrozen(childValue)) {\n if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {\n return;\n }\n finalize(rootScope, childValue);\n if ((!parentState || !parentState.scope_.parent_) && typeof prop !== \"symbol\" && Object.prototype.propertyIsEnumerable.call(targetObject, prop))\n maybeFreeze(rootScope, childValue);\n }\n}\nfunction maybeFreeze(scope, value, deep = false) {\n if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {\n freeze(value, deep);\n }\n}\n\n// src/core/proxy.ts\nfunction createProxyProxy(base, parent) {\n const isArray = Array.isArray(base);\n const state = {\n type_: isArray ? 1 /* Array */ : 0 /* Object */,\n // Track which produce call this is associated with.\n scope_: parent ? parent.scope_ : getCurrentScope(),\n // True for both shallow and deep changes.\n modified_: false,\n // Used during finalization.\n finalized_: false,\n // Track which properties have been assigned (true) or deleted (false).\n assigned_: {},\n // The parent draft state.\n parent_: parent,\n // The base state.\n base_: base,\n // The base proxy.\n draft_: null,\n // set below\n // The base copy with any updated values.\n copy_: null,\n // Called by the `produce` function.\n revoke_: null,\n isManual_: false\n };\n let target = state;\n let traps = objectTraps;\n if (isArray) {\n target = [state];\n traps = arrayTraps;\n }\n const { revoke, proxy } = Proxy.revocable(target, traps);\n state.draft_ = proxy;\n state.revoke_ = revoke;\n return proxy;\n}\nvar objectTraps = {\n get(state, prop) {\n if (prop === DRAFT_STATE)\n return state;\n const source = latest(state);\n if (!has(source, prop)) {\n return readPropFromProto(state, source, prop);\n }\n const value = source[prop];\n if (state.finalized_ || !isDraftable(value)) {\n return value;\n }\n if (value === peek(state.base_, prop)) {\n prepareCopy(state);\n return state.copy_[prop] = createProxy(value, state);\n }\n return value;\n },\n has(state, prop) {\n return prop in latest(state);\n },\n ownKeys(state) {\n return Reflect.ownKeys(latest(state));\n },\n set(state, prop, value) {\n const desc = getDescriptorFromProto(latest(state), prop);\n if (desc?.set) {\n desc.set.call(state.draft_, value);\n return true;\n }\n if (!state.modified_) {\n const current2 = peek(latest(state), prop);\n const currentState = current2?.[DRAFT_STATE];\n if (currentState && currentState.base_ === value) {\n state.copy_[prop] = value;\n state.assigned_[prop] = false;\n return true;\n }\n if (is(value, current2) && (value !== void 0 || has(state.base_, prop)))\n return true;\n prepareCopy(state);\n markChanged(state);\n }\n if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'\n (value !== void 0 || prop in state.copy_) || // special case: NaN\n Number.isNaN(value) && Number.isNaN(state.copy_[prop]))\n return true;\n state.copy_[prop] = value;\n state.assigned_[prop] = true;\n return true;\n },\n deleteProperty(state, prop) {\n if (peek(state.base_, prop) !== void 0 || prop in state.base_) {\n state.assigned_[prop] = false;\n prepareCopy(state);\n markChanged(state);\n } else {\n delete state.assigned_[prop];\n }\n if (state.copy_) {\n delete state.copy_[prop];\n }\n return true;\n },\n // Note: We never coerce `desc.value` into an Immer draft, because we can't make\n // the same guarantee in ES5 mode.\n getOwnPropertyDescriptor(state, prop) {\n const owner = latest(state);\n const desc = Reflect.getOwnPropertyDescriptor(owner, prop);\n if (!desc)\n return desc;\n return {\n writable: true,\n configurable: state.type_ !== 1 /* Array */ || prop !== \"length\",\n enumerable: desc.enumerable,\n value: owner[prop]\n };\n },\n defineProperty() {\n die(11);\n },\n getPrototypeOf(state) {\n return getPrototypeOf(state.base_);\n },\n setPrototypeOf() {\n die(12);\n }\n};\nvar arrayTraps = {};\neach(objectTraps, (key, fn) => {\n arrayTraps[key] = function() {\n arguments[0] = arguments[0][0];\n return fn.apply(this, arguments);\n };\n});\narrayTraps.deleteProperty = function(state, prop) {\n if (process.env.NODE_ENV !== \"production\" && isNaN(parseInt(prop)))\n die(13);\n return arrayTraps.set.call(this, state, prop, void 0);\n};\narrayTraps.set = function(state, prop, value) {\n if (process.env.NODE_ENV !== \"production\" && prop !== \"length\" && isNaN(parseInt(prop)))\n die(14);\n return objectTraps.set.call(this, state[0], prop, value, state[0]);\n};\nfunction peek(draft, prop) {\n const state = draft[DRAFT_STATE];\n const source = state ? latest(state) : draft;\n return source[prop];\n}\nfunction readPropFromProto(state, source, prop) {\n const desc = getDescriptorFromProto(source, prop);\n return desc ? `value` in desc ? desc.value : (\n // This is a very special case, if the prop is a getter defined by the\n // prototype, we should invoke it with the draft as context!\n desc.get?.call(state.draft_)\n ) : void 0;\n}\nfunction getDescriptorFromProto(source, prop) {\n if (!(prop in source))\n return void 0;\n let proto = getPrototypeOf(source);\n while (proto) {\n const desc = Object.getOwnPropertyDescriptor(proto, prop);\n if (desc)\n return desc;\n proto = getPrototypeOf(proto);\n }\n return void 0;\n}\nfunction markChanged(state) {\n if (!state.modified_) {\n state.modified_ = true;\n if (state.parent_) {\n markChanged(state.parent_);\n }\n }\n}\nfunction prepareCopy(state) {\n if (!state.copy_) {\n state.copy_ = shallowCopy(\n state.base_,\n state.scope_.immer_.useStrictShallowCopy_\n );\n }\n}\n\n// src/core/immerClass.ts\nvar Immer2 = class {\n constructor(config) {\n this.autoFreeze_ = true;\n this.useStrictShallowCopy_ = false;\n /**\n * The `produce` function takes a value and a \"recipe function\" (whose\n * return value often depends on the base state). The recipe function is\n * free to mutate its first argument however it wants. All mutations are\n * only ever applied to a __copy__ of the base state.\n *\n * Pass only a function to create a \"curried producer\" which relieves you\n * from passing the recipe function every time.\n *\n * Only plain objects and arrays are made mutable. All other objects are\n * considered uncopyable.\n *\n * Note: This function is __bound__ to its `Immer` instance.\n *\n * @param {any} base - the initial state\n * @param {Function} recipe - function that receives a proxy of the base state as first argument and which can be freely modified\n * @param {Function} patchListener - optional function that will be called with all the patches produced here\n * @returns {any} a new state, or the initial state if nothing was modified\n */\n this.produce = (base, recipe, patchListener) => {\n if (typeof base === \"function\" && typeof recipe !== \"function\") {\n const defaultBase = recipe;\n recipe = base;\n const self = this;\n return function curriedProduce(base2 = defaultBase, ...args) {\n return self.produce(base2, (draft) => recipe.call(this, draft, ...args));\n };\n }\n if (typeof recipe !== \"function\")\n die(6);\n if (patchListener !== void 0 && typeof patchListener !== \"function\")\n die(7);\n let result;\n if (isDraftable(base)) {\n const scope = enterScope(this);\n const proxy = createProxy(base, void 0);\n let hasError = true;\n try {\n result = recipe(proxy);\n hasError = false;\n } finally {\n if (hasError)\n revokeScope(scope);\n else\n leaveScope(scope);\n }\n usePatchesInScope(scope, patchListener);\n return processResult(result, scope);\n } else if (!base || typeof base !== \"object\") {\n result = recipe(base);\n if (result === void 0)\n result = base;\n if (result === NOTHING)\n result = void 0;\n if (this.autoFreeze_)\n freeze(result, true);\n if (patchListener) {\n const p = [];\n const ip = [];\n getPlugin(\"Patches\").generateReplacementPatches_(base, result, p, ip);\n patchListener(p, ip);\n }\n return result;\n } else\n die(1, base);\n };\n this.produceWithPatches = (base, recipe) => {\n if (typeof base === \"function\") {\n return (state, ...args) => this.produceWithPatches(state, (draft) => base(draft, ...args));\n }\n let patches, inversePatches;\n const result = this.produce(base, recipe, (p, ip) => {\n patches = p;\n inversePatches = ip;\n });\n return [result, patches, inversePatches];\n };\n if (typeof config?.autoFreeze === \"boolean\")\n this.setAutoFreeze(config.autoFreeze);\n if (typeof config?.useStrictShallowCopy === \"boolean\")\n this.setUseStrictShallowCopy(config.useStrictShallowCopy);\n }\n createDraft(base) {\n if (!isDraftable(base))\n die(8);\n if (isDraft(base))\n base = current(base);\n const scope = enterScope(this);\n const proxy = createProxy(base, void 0);\n proxy[DRAFT_STATE].isManual_ = true;\n leaveScope(scope);\n return proxy;\n }\n finishDraft(draft, patchListener) {\n const state = draft && draft[DRAFT_STATE];\n if (!state || !state.isManual_)\n die(9);\n const { scope_: scope } = state;\n usePatchesInScope(scope, patchListener);\n return processResult(void 0, scope);\n }\n /**\n * Pass true to automatically freeze all copies created by Immer.\n *\n * By default, auto-freezing is enabled.\n */\n setAutoFreeze(value) {\n this.autoFreeze_ = value;\n }\n /**\n * Pass true to enable strict shallow copy.\n *\n * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.\n */\n setUseStrictShallowCopy(value) {\n this.useStrictShallowCopy_ = value;\n }\n applyPatches(base, patches) {\n let i;\n for (i = patches.length - 1; i >= 0; i--) {\n const patch = patches[i];\n if (patch.path.length === 0 && patch.op === \"replace\") {\n base = patch.value;\n break;\n }\n }\n if (i > -1) {\n patches = patches.slice(i + 1);\n }\n const applyPatchesImpl = getPlugin(\"Patches\").applyPatches_;\n if (isDraft(base)) {\n return applyPatchesImpl(base, patches);\n }\n return this.produce(\n base,\n (draft) => applyPatchesImpl(draft, patches)\n );\n }\n};\nfunction createProxy(value, parent) {\n const draft = isMap(value) ? getPlugin(\"MapSet\").proxyMap_(value, parent) : isSet(value) ? getPlugin(\"MapSet\").proxySet_(value, parent) : createProxyProxy(value, parent);\n const scope = parent ? parent.scope_ : getCurrentScope();\n scope.drafts_.push(draft);\n return draft;\n}\n\n// src/core/current.ts\nfunction current(value) {\n if (!isDraft(value))\n die(10, value);\n return currentImpl(value);\n}\nfunction currentImpl(value) {\n if (!isDraftable(value) || isFrozen(value))\n return value;\n const state = value[DRAFT_STATE];\n let copy;\n if (state) {\n if (!state.modified_)\n return state.base_;\n state.finalized_ = true;\n copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);\n } else {\n copy = shallowCopy(value, true);\n }\n each(copy, (key, childValue) => {\n set(copy, key, currentImpl(childValue));\n });\n if (state) {\n state.finalized_ = false;\n }\n return copy;\n}\n\n// src/plugins/patches.ts\nfunction enablePatches() {\n const errorOffset = 16;\n if (process.env.NODE_ENV !== \"production\") {\n errors.push(\n 'Sets cannot have \"replace\" patches.',\n function(op) {\n return \"Unsupported patch operation: \" + op;\n },\n function(path) {\n return \"Cannot apply patch, path doesn't resolve: \" + path;\n },\n \"Patching reserved attributes like __proto__, prototype and constructor is not allowed\"\n );\n }\n const REPLACE = \"replace\";\n const ADD = \"add\";\n const REMOVE = \"remove\";\n function generatePatches_(state, basePath, patches, inversePatches) {\n switch (state.type_) {\n case 0 /* Object */:\n case 2 /* Map */:\n return generatePatchesFromAssigned(\n state,\n basePath,\n patches,\n inversePatches\n );\n case 1 /* Array */:\n return generateArrayPatches(state, basePath, patches, inversePatches);\n case 3 /* Set */:\n return generateSetPatches(\n state,\n basePath,\n patches,\n inversePatches\n );\n }\n }\n function generateArrayPatches(state, basePath, patches, inversePatches) {\n let { base_, assigned_ } = state;\n let copy_ = state.copy_;\n if (copy_.length < base_.length) {\n ;\n [base_, copy_] = [copy_, base_];\n [patches, inversePatches] = [inversePatches, patches];\n }\n for (let i = 0; i < base_.length; i++) {\n if (assigned_[i] && copy_[i] !== base_[i]) {\n const path = basePath.concat([i]);\n patches.push({\n op: REPLACE,\n path,\n // Need to maybe clone it, as it can in fact be the original value\n // due to the base/copy inversion at the start of this function\n value: clonePatchValueIfNeeded(copy_[i])\n });\n inversePatches.push({\n op: REPLACE,\n path,\n value: clonePatchValueIfNeeded(base_[i])\n });\n }\n }\n for (let i = base_.length; i < copy_.length; i++) {\n const path = basePath.concat([i]);\n patches.push({\n op: ADD,\n path,\n // Need to maybe clone it, as it can in fact be the original value\n // due to the base/copy inversion at the start of this function\n value: clonePatchValueIfNeeded(copy_[i])\n });\n }\n for (let i = copy_.length - 1; base_.length <= i; --i) {\n const path = basePath.concat([i]);\n inversePatches.push({\n op: REMOVE,\n path\n });\n }\n }\n function generatePatchesFromAssigned(state, basePath, patches, inversePatches) {\n const { base_, copy_ } = state;\n each(state.assigned_, (key, assignedValue) => {\n const origValue = get(base_, key);\n const value = get(copy_, key);\n const op = !assignedValue ? REMOVE : has(base_, key) ? REPLACE : ADD;\n if (origValue === value && op === REPLACE)\n return;\n const path = basePath.concat(key);\n patches.push(op === REMOVE ? { op, path } : { op, path, value });\n inversePatches.push(\n op === ADD ? { op: REMOVE, path } : op === REMOVE ? { op: ADD, path, value: clonePatchValueIfNeeded(origValue) } : { op: REPLACE, path, value: clonePatchValueIfNeeded(origValue) }\n );\n });\n }\n function generateSetPatches(state, basePath, patches, inversePatches) {\n let { base_, copy_ } = state;\n let i = 0;\n base_.forEach((value) => {\n if (!copy_.has(value)) {\n const path = basePath.concat([i]);\n patches.push({\n op: REMOVE,\n path,\n value\n });\n inversePatches.unshift({\n op: ADD,\n path,\n value\n });\n }\n i++;\n });\n i = 0;\n copy_.forEach((value) => {\n if (!base_.has(value)) {\n const path = basePath.concat([i]);\n patches.push({\n op: ADD,\n path,\n value\n });\n inversePatches.unshift({\n op: REMOVE,\n path,\n value\n });\n }\n i++;\n });\n }\n function generateReplacementPatches_(baseValue, replacement, patches, inversePatches) {\n patches.push({\n op: REPLACE,\n path: [],\n value: replacement === NOTHING ? void 0 : replacement\n });\n inversePatches.push({\n op: REPLACE,\n path: [],\n value: baseValue\n });\n }\n function applyPatches_(draft, patches) {\n patches.forEach((patch) => {\n const { path, op } = patch;\n let base = draft;\n for (let i = 0; i < path.length - 1; i++) {\n const parentType = getArchtype(base);\n let p = path[i];\n if (typeof p !== \"string\" && typeof p !== \"number\") {\n p = \"\" + p;\n }\n if ((parentType === 0 /* Object */ || parentType === 1 /* Array */) && (p === \"__proto__\" || p === \"constructor\"))\n die(errorOffset + 3);\n if (typeof base === \"function\" && p === \"prototype\")\n die(errorOffset + 3);\n base = get(base, p);\n if (typeof base !== \"object\")\n die(errorOffset + 2, path.join(\"/\"));\n }\n const type = getArchtype(base);\n const value = deepClonePatchValue(patch.value);\n const key = path[path.length - 1];\n switch (op) {\n case REPLACE:\n switch (type) {\n case 2 /* Map */:\n return base.set(key, value);\n case 3 /* Set */:\n die(errorOffset);\n default:\n return base[key] = value;\n }\n case ADD:\n switch (type) {\n case 1 /* Array */:\n return key === \"-\" ? base.push(value) : base.splice(key, 0, value);\n case 2 /* Map */:\n return base.set(key, value);\n case 3 /* Set */:\n return base.add(value);\n default:\n return base[key] = value;\n }\n case REMOVE:\n switch (type) {\n case 1 /* Array */:\n return base.splice(key, 1);\n case 2 /* Map */:\n return base.delete(key);\n case 3 /* Set */:\n return base.delete(patch.value);\n default:\n return delete base[key];\n }\n default:\n die(errorOffset + 1, op);\n }\n });\n return draft;\n }\n function deepClonePatchValue(obj) {\n if (!isDraftable(obj))\n return obj;\n if (Array.isArray(obj))\n return obj.map(deepClonePatchValue);\n if (isMap(obj))\n return new Map(\n Array.from(obj.entries()).map(([k, v]) => [k, deepClonePatchValue(v)])\n );\n if (isSet(obj))\n return new Set(Array.from(obj).map(deepClonePatchValue));\n const cloned = Object.create(getPrototypeOf(obj));\n for (const key in obj)\n cloned[key] = deepClonePatchValue(obj[key]);\n if (has(obj, DRAFTABLE))\n cloned[DRAFTABLE] = obj[DRAFTABLE];\n return cloned;\n }\n function clonePatchValueIfNeeded(obj) {\n if (isDraft(obj)) {\n return deepClonePatchValue(obj);\n } else\n return obj;\n }\n loadPlugin(\"Patches\", {\n applyPatches_,\n generatePatches_,\n generateReplacementPatches_\n });\n}\n\n// src/plugins/mapset.ts\nfunction enableMapSet() {\n class DraftMap extends Map {\n constructor(target, parent) {\n super();\n this[DRAFT_STATE] = {\n type_: 2 /* Map */,\n parent_: parent,\n scope_: parent ? parent.scope_ : getCurrentScope(),\n modified_: false,\n finalized_: false,\n copy_: void 0,\n assigned_: void 0,\n base_: target,\n draft_: this,\n isManual_: false,\n revoked_: false\n };\n }\n get size() {\n return latest(this[DRAFT_STATE]).size;\n }\n has(key) {\n return latest(this[DRAFT_STATE]).has(key);\n }\n set(key, value) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (!latest(state).has(key) || latest(state).get(key) !== value) {\n prepareMapCopy(state);\n markChanged(state);\n state.assigned_.set(key, true);\n state.copy_.set(key, value);\n state.assigned_.set(key, true);\n }\n return this;\n }\n delete(key) {\n if (!this.has(key)) {\n return false;\n }\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareMapCopy(state);\n markChanged(state);\n if (state.base_.has(key)) {\n state.assigned_.set(key, false);\n } else {\n state.assigned_.delete(key);\n }\n state.copy_.delete(key);\n return true;\n }\n clear() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (latest(state).size) {\n prepareMapCopy(state);\n markChanged(state);\n state.assigned_ = /* @__PURE__ */ new Map();\n each(state.base_, (key) => {\n state.assigned_.set(key, false);\n });\n state.copy_.clear();\n }\n }\n forEach(cb, thisArg) {\n const state = this[DRAFT_STATE];\n latest(state).forEach((_value, key, _map) => {\n cb.call(thisArg, this.get(key), key, this);\n });\n }\n get(key) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n const value = latest(state).get(key);\n if (state.finalized_ || !isDraftable(value)) {\n return value;\n }\n if (value !== state.base_.get(key)) {\n return value;\n }\n const draft = createProxy(value, state);\n prepareMapCopy(state);\n state.copy_.set(key, draft);\n return draft;\n }\n keys() {\n return latest(this[DRAFT_STATE]).keys();\n }\n values() {\n const iterator = this.keys();\n return {\n [Symbol.iterator]: () => this.values(),\n next: () => {\n const r = iterator.next();\n if (r.done)\n return r;\n const value = this.get(r.value);\n return {\n done: false,\n value\n };\n }\n };\n }\n entries() {\n const iterator = this.keys();\n return {\n [Symbol.iterator]: () => this.entries(),\n next: () => {\n const r = iterator.next();\n if (r.done)\n return r;\n const value = this.get(r.value);\n return {\n done: false,\n value: [r.value, value]\n };\n }\n };\n }\n [(DRAFT_STATE, Symbol.iterator)]() {\n return this.entries();\n }\n }\n function proxyMap_(target, parent) {\n return new DraftMap(target, parent);\n }\n function prepareMapCopy(state) {\n if (!state.copy_) {\n state.assigned_ = /* @__PURE__ */ new Map();\n state.copy_ = new Map(state.base_);\n }\n }\n class DraftSet extends Set {\n constructor(target, parent) {\n super();\n this[DRAFT_STATE] = {\n type_: 3 /* Set */,\n parent_: parent,\n scope_: parent ? parent.scope_ : getCurrentScope(),\n modified_: false,\n finalized_: false,\n copy_: void 0,\n base_: target,\n draft_: this,\n drafts_: /* @__PURE__ */ new Map(),\n revoked_: false,\n isManual_: false\n };\n }\n get size() {\n return latest(this[DRAFT_STATE]).size;\n }\n has(value) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (!state.copy_) {\n return state.base_.has(value);\n }\n if (state.copy_.has(value))\n return true;\n if (state.drafts_.has(value) && state.copy_.has(state.drafts_.get(value)))\n return true;\n return false;\n }\n add(value) {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (!this.has(value)) {\n prepareSetCopy(state);\n markChanged(state);\n state.copy_.add(value);\n }\n return this;\n }\n delete(value) {\n if (!this.has(value)) {\n return false;\n }\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareSetCopy(state);\n markChanged(state);\n return state.copy_.delete(value) || (state.drafts_.has(value) ? state.copy_.delete(state.drafts_.get(value)) : (\n /* istanbul ignore next */\n false\n ));\n }\n clear() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n if (latest(state).size) {\n prepareSetCopy(state);\n markChanged(state);\n state.copy_.clear();\n }\n }\n values() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareSetCopy(state);\n return state.copy_.values();\n }\n entries() {\n const state = this[DRAFT_STATE];\n assertUnrevoked(state);\n prepareSetCopy(state);\n return state.copy_.entries();\n }\n keys() {\n return this.values();\n }\n [(DRAFT_STATE, Symbol.iterator)]() {\n return this.values();\n }\n forEach(cb, thisArg) {\n const iterator = this.values();\n let result = iterator.next();\n while (!result.done) {\n cb.call(thisArg, result.value, result.value, this);\n result = iterator.next();\n }\n }\n }\n function proxySet_(target, parent) {\n return new DraftSet(target, parent);\n }\n function prepareSetCopy(state) {\n if (!state.copy_) {\n state.copy_ = /* @__PURE__ */ new Set();\n state.base_.forEach((value) => {\n if (isDraftable(value)) {\n const draft = createProxy(value, state);\n state.drafts_.set(value, draft);\n state.copy_.add(draft);\n } else {\n state.copy_.add(value);\n }\n });\n }\n }\n function assertUnrevoked(state) {\n if (state.revoked_)\n die(3, JSON.stringify(latest(state)));\n }\n loadPlugin(\"MapSet\", { proxyMap_, proxySet_ });\n}\n\n// src/immer.ts\nvar immer = new Immer2();\nvar produce = immer.produce;\nvar produceWithPatches = immer.produceWithPatches.bind(\n immer\n);\nvar setAutoFreeze = immer.setAutoFreeze.bind(immer);\nvar setUseStrictShallowCopy = immer.setUseStrictShallowCopy.bind(immer);\nvar applyPatches = immer.applyPatches.bind(immer);\nvar createDraft = immer.createDraft.bind(immer);\nvar finishDraft = immer.finishDraft.bind(immer);\nfunction castDraft(value) {\n return value;\n}\nfunction castImmutable(value) {\n return value;\n}\nexport {\n Immer2 as Immer,\n applyPatches,\n castDraft,\n castImmutable,\n createDraft,\n current,\n enableMapSet,\n enablePatches,\n finishDraft,\n freeze,\n DRAFTABLE as immerable,\n isDraft,\n isDraftable,\n NOTHING as nothing,\n original,\n produce,\n produceWithPatches,\n setAutoFreeze,\n setUseStrictShallowCopy\n};\n//# sourceMappingURL=immer.mjs.map"],"names":["compareValues","a","b","order","orderBy","arr","criteria","orders","ordersLength","i","criterion","criterionIsFunction","valueA","valueB","result","sortBy","NOTHING","DRAFTABLE","DRAFT_STATE","die","error","args","getPrototypeOf","isDraft","value","isDraftable","isPlainObject","isMap","isSet","objectCtorString","proto","Ctor","each","obj","iter","getArchtype","key","entry","index","thing","state","has","prop","set","propOrOldValue","t","is","x","y","target","latest","shallowCopy","base","strict","isPlain","descriptors","keys","desc","freeze","deep","isFrozen","dontMutateFrozenCollections","plugins","getPlugin","pluginKey","plugin","currentScope","getCurrentScope","createScope","parent_","immer_","usePatchesInScope","scope","patchListener","revokeScope","leaveScope","revokeDraft","enterScope","immer2","draft","processResult","baseDraft","finalize","maybeFreeze","rootScope","path","childValue","finalizeProperty","resultEach","isSet2","parentState","targetObject","rootPath","targetIsSet","res","createProxyProxy","parent","isArray","traps","objectTraps","arrayTraps","revoke","proxy","source","readPropFromProto","peek","prepareCopy","createProxy","getDescriptorFromProto","current2","currentState","markChanged","owner","fn","Immer2","config","recipe","defaultBase","self","base2","hasError","p","ip","patches","inversePatches","current","patch","applyPatchesImpl","currentImpl","copy","immer","produce"],"mappings":"AAAA,SAASA,EAAcC,EAAGC,EAAGC,EAAO,CAChC,OAAIF,EAAIC,EACGC,IAAU,MAAQ,GAAK,EAE9BF,EAAIC,EACGC,IAAU,MAAQ,EAAI,GAE1B,CACX,CCNA,SAASC,EAAQC,EAAKC,EAAUC,EAAQ,CACpC,OAAOF,EAAI,MAAO,EAAC,KAAK,CAACJ,EAAGC,IAAM,CAC9B,MAAMM,EAAeD,EAAO,OAC5B,QAASE,EAAI,EAAGA,EAAIH,EAAS,OAAQG,IAAK,CACtC,MAAMN,EAAQK,EAAeC,EAAIF,EAAOE,CAAC,EAAIF,EAAOC,EAAe,CAAC,EAC9DE,EAAYJ,EAASG,CAAC,EACtBE,EAAsB,OAAOD,GAAc,WAC3CE,EAASD,EAAsBD,EAAUT,CAAC,EAAIA,EAAES,CAAS,EACzDG,EAASF,EAAsBD,EAAUR,CAAC,EAAIA,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,EAAI,GAAIK,CAAK,EACRwG,EAAYxG,CAAK,CAC1B,CACA,SAASwG,EAAYxG,EAAO,CAC1B,GAAI,CAACC,EAAYD,CAAK,GAAKoC,EAASpC,CAAK,EAChC,OAAAA,EACH,MAAAgB,EAAQhB,EAAMN,CAAW,EAC3B,IAAA+G,EACJ,GAAIzF,EAAO,CACT,GAAI,CAACA,EAAM,UACT,OAAOA,EAAM,MACfA,EAAM,WAAa,GACnByF,EAAO9E,EAAY3B,EAAOgB,EAAM,OAAO,OAAO,qBAAqB,CAAA,MAE5DyF,EAAA9E,EAAY3B,EAAO,EAAI,EAE3B,OAAAQ,EAAAiG,EAAM,CAAC7F,EAAKkD,IAAe,CAC9B3C,EAAIsF,EAAM7F,EAAK4F,EAAY1C,CAAU,CAAC,CAAA,CACvC,EACG9C,IACFA,EAAM,WAAa,IAEdyF,CACT,CAyeA,IAAIC,EAAQ,IAAIhB,GACZiB,GAAUD,EAAM,QACKA,EAAM,mBAAmB,KAChDA,CACF,EACoBA,EAAM,cAAc,KAAKA,CAAK,EACpBA,EAAM,wBAAwB,KAAKA,CAAK,EACnDA,EAAM,aAAa,KAAKA,CAAK,EAC9BA,EAAM,YAAY,KAAKA,CAAK,EAC5BA,EAAM,YAAY,KAAKA,CAAK","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as s}from"./_virtual___federation_fn_import-DK_YYIlv.js";import{j as e}from"./index.esm-Bvv3vNQh.js";import{H as r}from"./index-B7G2CMwL.js";import{N as o}from"./new-model-dialog-D4pnLGR_.js";const{useProjectDefinition:a}=await s("@baseplate-dev/project-builder-lib/web"),{Button:t,EmptyDisplay:n}=await s("@baseplate-dev/ui-components"),h=function(){const{definition:i}=a();return i.models.length===0?e.jsx(n,{icon:r,header:"No Models",subtitle:"Create a model to get started",actions:e.jsx(o,{children:e.jsx(t,{children:"New Model"})})}):e.jsxs("div",{className:"max-w-4xl space-y-4 p-4 text-style-prose",children:[e.jsx("h1",{children:"Models"}),e.jsx("p",{children:"Models are the building blocks of your app. They define the data structure of your app."}),e.jsxs("p",{children:["Choose a model to edit from the sidebar or"," ",e.jsx(o,{children:e.jsx(t,{variant:"link",size:"none",children:"create a new model"})}),"."]})]})};export{h as component};
|
|
2
|
-
//# sourceMappingURL=index-01LAxHjt.js.map
|