adminizer 4.4.0-build.159 → 4.4.0-build.161
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/assets/app.js +2 -2
- package/assets/{home-CeGqFqaa.js → home-BZQ-WlHq.js} +2 -2
- package/assets/{list-BI8WFUxC.js → list-DxFdOkRH.js} +1 -1
- package/assets/{list-table-BnxHpCFW.js → list-table-Do8_doRe.js} +1 -1
- package/assets/manifest.json +3 -3
- package/helpers/accessRightsHelper.js +5 -5
- package/helpers/configHelper.d.ts +9 -1
- package/helpers/configHelper.js +36 -1
- package/lib/Adminizer.js +2 -21
- package/package.json +1 -1
package/assets/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group--iy-V9oU.js","./app-layout-gAiczU39.js","./app-shell-C8Cnr5Hy.js","./monaco-ICtx6xoc.js","./vendor-wzZzN_Jv.js","./jsoneditor-D95dIAP2.js","./handsontable-PVakPtJV.js","./app-sidebar-CNGEOOHu.js","./nav-main-BqKm87JZ.js","./material-icon-DwkE6wKL.js","./app-sidebar-header-Bcpas2Np.js","./breadcrumbs-DSMzNYiS.js","./nav-user-DuCZNsZX.js","./user-info-BGQvqBmO.js","./user-menu-content-BDm88xaM.js","./theme-switcher-cgyA7_cO.js","./icon-DpkedrXG.js","./add-group-form-DMz0_Oo9.js","./add-user-BhIeyfat.js","./add-user-form-izlXhv2-.js","./input-error-CmXZF6xy.js","./add-BPcciwvU.js","./add-form-VLJ6QSu3.js","./field-renderer-CjsyUnNE.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./catalog-CZ251XUK.js","./del-modal-DyIWFflP.js","./catalog-D4n6dpGl.css","./dashboard-BlhABz32.js","./dashboard-BOltB2Hq.css","./form-wqN7nuKC.js","./form-5bcLbjFf.js","./home-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./add-group--iy-V9oU.js","./app-layout-gAiczU39.js","./app-shell-C8Cnr5Hy.js","./monaco-ICtx6xoc.js","./vendor-wzZzN_Jv.js","./jsoneditor-D95dIAP2.js","./handsontable-PVakPtJV.js","./app-sidebar-CNGEOOHu.js","./nav-main-BqKm87JZ.js","./material-icon-DwkE6wKL.js","./app-sidebar-header-Bcpas2Np.js","./breadcrumbs-DSMzNYiS.js","./nav-user-DuCZNsZX.js","./user-info-BGQvqBmO.js","./user-menu-content-BDm88xaM.js","./theme-switcher-cgyA7_cO.js","./icon-DpkedrXG.js","./add-group-form-DMz0_Oo9.js","./add-user-BhIeyfat.js","./add-user-form-izlXhv2-.js","./input-error-CmXZF6xy.js","./add-BPcciwvU.js","./add-form-VLJ6QSu3.js","./field-renderer-CjsyUnNE.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./catalog-CZ251XUK.js","./del-modal-DyIWFflP.js","./catalog-D4n6dpGl.css","./dashboard-BlhABz32.js","./dashboard-BOltB2Hq.css","./form-wqN7nuKC.js","./form-5bcLbjFf.js","./home-BZQ-WlHq.js","./init-user-DaOvt0vG.js","./list-DxFdOkRH.js","./list-table-Do8_doRe.js","./pagination-render-io0M2m2O.js","./login-DR6fvKtm.js","./module-B3jhuqbE.js","./notification-B-57JQl_.js","./tabs-BhkFoerH.js","./register-hJD1ETdf.js","./welcome-CkCufpDB.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{g as Ju,s as ai,c as xd,i as kV,h as _Q,e as SQ,f as CQ,t as LQ,_ as yn}from"./jsoneditor-D95dIAP2.js";import{b as NQ,c as VP,r as vV,a as IQ}from"./vendor-wzZzN_Jv.js";import{r as g,e as ke,R as gV,F as AQ}from"./monaco-ICtx6xoc.js";import{r as AA,R as e2,F as sa,a as la,b as da,c as ua,d as ha,e as pa,f as fa,g as ya,h as ma,i as ka,j as va,k as ga,l as Ma,m as xa,n as ba,o as wa,p as _a,q as Sa,s as Ca,t as La,u as Na,v as Ia,w as Aa,x as Ea,y as Ta,z as Ra,A as ja,B as Da,C as qa,D as za,E as $a,G as Oa,H as Pa,I as Ha,J as Ba,K as Va,L as Fa,M as Ua,N as Ga,O as Za,P as Wa,Q as Xa,S as Ka,T as Ya,U as Qa,V as Ja,W as eo,X as to,Y as no,Z as ao,_ as oo,$ as ro,a0 as io,a1 as co,a2 as so,a3 as lo,a4 as uo,a5 as ho,a6 as po,a7 as fo,a8 as yo,a9 as mo,aa as ko,ab as vo,ac as go,ad as Mo,ae as xo,af as bo,ag as wo,ah as _o,ai as So,aj as Co,ak as Ed,al as Td,am as Rd,an as EQ,ao as TQ,ap as RQ,aq as jQ,ar as DQ,as as qQ,at as zQ,au as $Q}from"./handsontable-PVakPtJV.js";var xR={exports:{}},$u={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -8062,4 +8062,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
|
|
|
8062
8062
|
* Last updated: Mar 09, 2023
|
|
8063
8063
|
*
|
|
8064
8064
|
* Description: Definition file for Chinese - China language-country.
|
|
8065
|
-
*/const vqe={languageCode:"zh-CN",[Co]:"上方插入行",[So]:"下方插入行",[_o]:"左方插入列",[wo]:"右方插入列",[bo]:["移除该行","移除多行"],[xo]:["移除该列","移除多列"],[Mo]:"撤销",[go]:"恢复",[vo]:"只读",[ko]:"清空该列",[mo]:"对齐",[yo]:"左对齐",[fo]:"水平居中",[po]:"右对齐",[ho]:"两端对齐",[uo]:"顶端对齐",[lo]:"垂直居中",[so]:"底端对齐",[co]:"冻结该列",[io]:"取消冻结",[ro]:"边框",[oo]:"上",[ao]:"右",[no]:"下",[to]:"左",[eo]:"移除边框",[Ja]:"插入批注",[Qa]:"编辑批注",[Ya]:"删除批注",[Ka]:"只读批注",[Xa]:"合并",[Wa]:"取消合并",[Za]:"复制",[Rd]:"带标题的复制",[Td]:"带标题组的复制",[Ed]:"仅复制标题",[Ga]:"剪切",[Ua]:"插入子行",[Fa]:"与母行分离",[Va]:["隐藏该列","隐藏多列"],[Ba]:["显示该列","显示多列"],[Ha]:["隐藏该行","隐藏多行"],[Pa]:["显示该行","显示多行"],[Oa]:"无",[$a]:"为空",[za]:"不为空",[qa]:"等于",[Da]:"不等于",[ja]:"开头是",[Ra]:"结尾是",[Ta]:"包含",[Ea]:"不包含",[Aa]:"大于",[Ia]:"大于或等于",[Na]:"小于",[La]:"小于或等于",[Ca]:"在此范围",[Sa]:"不在此范围",[_a]:"之后",[wa]:"之前",[ba]:"今天",[xa]:"明天",[Ma]:"昨天",[ga]:"空白单元格",[va]:"按条件过滤",[ka]:"按值过滤",[ma]:"且",[ya]:"或",[fa]:"全选",[pa]:"清除",[ha]:"确认",[ua]:"取消",[da]:"搜索",[la]:"值",[sa]:"第二值"};jQ();const yV={de:sqe,en:zQ,es:lqe,fr:dqe,it:uqe,ja:hqe,ko:pqe,nl:fqe,pl:yqe,pt:mqe,ru:kqe,zh:vqe},gqe=document.documentElement.lang,pK=yV[gqe]??yV.en;DQ(pK);const fK=({config:e,data:n=[],onChange:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("ht-theme-main"),h=g.useCallback((k,m)=>{var x,b;if(m==="loadData")return;const y=(b=(x=f.current)==null?void 0:x.hotInstance)==null?void 0:b.getSourceData();o(y)},[]),f=g.useRef(null);return g.useEffect(()=>{const k=setTimeout(()=>{var m;(m=f.current)!=null&&m.hotInstance&&f.current.hotInstance.loadData(n)},100);return()=>clearTimeout(k)},[n]),g.useEffect(()=>{u(c==="dark"?"ht-theme-main-dark":"ht-theme-main")},[c]),M.jsx(qQ,{className:r?"pointer-events-none opacity-50":"",themeName:d,language:pK.languageCode,ref:f,...e,afterChange:h,children:e.columns.map(k=>M.jsx($Q,{data:k.data,...k},k.data))})},nze=Object.freeze(Object.defineProperty({__proto__:null,default:fK},Symbol.toStringTag,{value:"Module"})),Mqe=()=>{const[e,n]=g.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768});return g.useEffect(()=>{if(typeof window>"u")return;const o=()=>{n({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},yK=({onChange:e,value:n,options:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("light"),h=g.useRef(null),f=g.useRef(null),{width:k}=Mqe(),m=k<768,y=k>=768&&k<1024,x=_=>{e(_)},b=_=>{h.current=_,w()},w=()=>{var C;if(!h.current)return;const _={minimap:{enabled:!m},fontSize:m?12:y?13:14,lineNumbers:m?"off":"on",lineDecorationsWidth:m?5:10,scrollBeyondLastLine:!m,wordWrap:m?"on":"bounded",renderWhitespace:m?"none":"selection",padding:{top:m?8:16,bottom:m?8:16}};h.current.updateOptions(_),(C=f.current)==null||C.classList.add("overflow-hidden"),setTimeout(()=>{var N,A;(N=h.current)==null||N.layout(),(A=f.current)==null||A.classList.remove("overflow-hidden")},100)};g.useEffect(()=>{u(c==="dark"?"vs-dark":"light")},[c]),g.useEffect(()=>{w()},[k]);const S=m?"300px":y?"400px":"500px";return M.jsx("div",{className:`border rounded-lg ${m?"p-1":"p-2"}`,ref:f,children:M.jsx(AQ,{height:S,language:o.language,value:n,theme:d,options:{automaticLayout:!0,...m&&{wordWrap:"on"},minimap:{enabled:!m}},onChange:x,onMount:b,className:`transition-all duration-200 ease-in-out ${r?"pointer-events-none opacity-50 cursor-not-allowed":""}`})})},aze=Object.freeze(Object.defineProperty({__proto__:null,default:yK},Symbol.toStringTag,{value:"Module"})),mV=OA("m-1 flex items-center border rounded-sm px-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),cz=g.forwardRef(({options:e,onValueChange:n,variant:o,processing:r,disabled:c,defaultValue:d=[],placeholder:u="",notFound:h="",search:f="",animation:k=0,maxCount:m=3,modalPopover:y=!1,asChild:x=!1,className:b,mode:w="multiple",...S},_)=>{const[C,N]=g.useState(d),[A,T]=g.useState(!1),[q,$]=g.useState(!1),z=V=>{if(V.key==="Enter")T(!0);else if(V.key==="Backspace"&&!V.currentTarget.value){const se=[...C];se.pop(),N(se),n(se)}},P=V=>{let se;w==="single"?se=C.includes(V)?[]:[V]:se=C.includes(V)?C.filter(le=>le!==V):[...C,V],N(se),n(se),w==="single"&&T(!1)},ae=()=>{N([]),n([])},re=()=>{T(V=>!V)},he=()=>{const V=C.slice(0,m);N(V),n(V)};return M.jsxs(FW,{open:A,onOpenChange:T,modal:y,children:[M.jsx(UW,{asChild:!0,children:M.jsx(PA,{ref:_,...S,onClick:re,disabled:c,className:K("flex w-full p-1 rounded-md border-input border-1 min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",b),children:C.length>0?M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsxs("div",{className:"flex flex-wrap items-center",children:[C.slice(0,m).map(V=>{const se=e.find(ye=>ye.value===V),le=se==null?void 0:se.icon;return M.jsxs("div",{className:K(q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[le&&M.jsx(le,{className:"h-4 w-4 mr-2"}),se==null?void 0:se.label,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:ye=>{ye.stopPropagation(),r||P(V)}})]},V)}),w==="multiple"&&C.length>m&&M.jsxs("div",{className:K("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[`+ ${C.length-m} more`,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:V=>{V.stopPropagation(),he()}})]})]}),M.jsxs("div",{className:"flex items-center justify-between",children:[C.length>0&&M.jsxs(M.Fragment,{children:[M.jsx(ri,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:V=>{V.stopPropagation(),ae()}}),M.jsx(tz,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),M.jsx(oi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):M.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[M.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:u}),M.jsx(oi,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),M.jsx(GW,{className:"w-auto p-0 z-[1003]",align:"start",onEscapeKeyDown:()=>T(!1),children:M.jsxs(mq,{children:[M.jsx(vG,{placeholder:f,onKeyDown:z}),M.jsxs(gG,{children:[M.jsx(MG,{children:h}),M.jsx(xG,{children:e.map(V=>{const se=C.includes(V.value);return M.jsxs(wG,{onSelect:()=>P(V.value),className:"cursor-pointer",children:[M.jsx("div",{className:K("mr-2 flex h-5 w-5 items-center justify-center rounded border border-primary",se?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:M.jsx(Uo,{className:"h-4 w-4 text-primary-foreground"})}),V.icon&&M.jsx(V.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsx("span",{children:V.label})]},V.value)})}),M.jsx(bG,{})]})]})}),k>0&&C.length>0&&w==="multiple"&&M.jsx(ti,{className:K("cursor-pointer my-2 text-foreground bg-background w-3 h-3",q?"":"text-muted-foreground"),onClick:()=>$(!q)})]})});cz.displayName="MultiSelect";const oze=Object.freeze(Object.defineProperty({__proto__:null,default:cz},Symbol.toStringTag,{value:"Module"}));function xqe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),window.axios=wt,window.sonner=PDe,Object.assign(window.UIComponents,{Avatar:bae,AvatarImage:wae,AvatarFallback:_ae,Badge:Cae,Breadcrumb:N9e,BreadcrumbList:I9e,BreadcrumbItem:A9e,BreadcrumbLink:E9e,BreadcrumbPage:T9e,BreadcrumbSeparator:R9e,BreadcrumbEllipsis:j9e,Button:PA,Calendar:xSe,Card:bSe,CardHeader:wSe,CardFooter:NSe,CardTitle:_Se,CardAction:CSe,CardDescription:SSe,CardContent:LSe,Checkbox:OSe,Collapsible:GSe,CollapsibleTrigger:ZSe,CollapsibleContent:WSe,Command:mq,CommandDialog:RLe,CommandInput:vG,CommandList:gG,CommandEmpty:MG,CommandGroup:xG,CommandItem:wG,CommandShortcut:jLe,CommandSeparator:bG,ContextMenu:uAe,ContextMenuTrigger:hAe,ContextMenuContent:gAe,ContextMenuItem:MAe,ContextMenuCheckboxItem:xAe,ContextMenuRadioItem:bAe,ContextMenuLabel:wAe,ContextMenuSeparator:_Ae,ContextMenuShortcut:SAe,ContextMenuGroup:pAe,ContextMenuPortal:fAe,ContextMenuSub:yAe,ContextMenuSubContent:vAe,ContextMenuSubTrigger:kAe,ContextMenuRadioGroup:mAe,Dialog:uG,DialogClose:ELe,DialogContent:fG,DialogDescription:kG,DialogFooter:TLe,DialogHeader:yG,DialogOverlay:pG,DialogPortal:hG,DialogTitle:mG,DialogTrigger:ALe,DialogStack:VZ,DialogStackTrigger:CAe,DialogStackOverlay:LAe,DialogStackBody:NAe,DialogStackContent:IAe,DialogStackTitle:AAe,DialogStackDescription:EAe,DialogStackHeader:TAe,DialogStackFooter:RAe,DialogStackNext:jAe,DialogStackPrevious:DAe,DropdownMenu:uEe,DropdownMenuPortal:hEe,DropdownMenuTrigger:pEe,DropdownMenuContent:fEe,DropdownMenuGroup:yEe,DropdownMenuLabel:MEe,DropdownMenuItem:mEe,DropdownMenuCheckboxItem:kEe,DropdownMenuRadioGroup:vEe,DropdownMenuRadioItem:gEe,DropdownMenuSeparator:xEe,DropdownMenuShortcut:bEe,DropdownMenuSub:wEe,DropdownMenuSubTrigger:_Ee,DropdownMenuSubContent:SEe,Input:lW,Label:NEe,Menubar:sTe,MenubarPortal:TW,MenubarMenu:lTe,MenubarTrigger:hTe,MenubarContent:pTe,MenubarGroup:dTe,MenubarSeparator:vTe,MenubarLabel:kTe,MenubarItem:fTe,MenubarShortcut:gTe,MenubarCheckboxItem:yTe,MenubarRadioGroup:uTe,MenubarRadioItem:mTe,MenubarSub:MTe,MenubarSubTrigger:xTe,MenubarSubContent:bTe,Pagination:wTe,PaginationContent:_Te,PaginationLink:Qq,PaginationItem:STe,PaginationPrevious:CTe,PaginationNext:LTe,PaginationEllipsis:NTe,Popover:FW,PopoverTrigger:UW,PopoverContent:GW,PopoverAnchor:VTe,Select:LRe,SelectContent:ERe,SelectGroup:NRe,SelectItem:RRe,SelectLabel:TRe,SelectScrollDownButton:SX,SelectScrollUpButton:_X,SelectSeparator:jRe,SelectTrigger:ARe,SelectValue:IRe,Separator:tz,Sheet:LX,SheetTrigger:ORe,SheetClose:PRe,SheetContent:NX,SheetHeader:IX,SheetFooter:VRe,SheetTitle:AX,SheetDescription:EX,Sidebar:gje,SidebarContent:Lje,SidebarFooter:Sje,SidebarGroup:Nje,SidebarGroupAction:Aje,SidebarGroupContent:Eje,SidebarGroupLabel:Ije,SidebarHeader:_je,SidebarInput:wje,SidebarInset:bje,SidebarMenu:Tje,SidebarMenuAction:qje,SidebarMenuBadge:zje,SidebarMenuButton:Dje,SidebarMenuItem:Rje,SidebarMenuSkeleton:$je,SidebarMenuSub:Oje,SidebarMenuSubButton:Hje,SidebarMenuSubItem:Pje,SidebarProvider:vje,SidebarRail:xje,SidebarSeparator:Cje,SidebarTrigger:Mje,useSidebar:E2,Skeleton:ID,Slider:cDe,Toaster:HDe,Switch:WDe,Table:XDe,TableHeader:KDe,TableBody:YDe,TableFooter:QDe,TableHead:eqe,TableRow:JDe,TableCell:tqe,TableCaption:nqe,Textarea:aqe,Tooltip:HX,TooltipTrigger:BX,TooltipContent:VX,TooltipProvider:oz,VanillaJSONEditor:qD}),Object.assign(window.JSComponents,{VanillaJSONEditor:qD,HandsonTable:fK,MonacoEditor:yK,MultiSelect:cz})}const{createInertiaApp:bqe}=LF;window.React=ke;window.ReactDOM=e2;window.InertiajsReact=LF;window.LucideReact=L9e;xqe();async function wqe(e,n){for(const o of Array.isArray(e)?e:[e]){const r=n[o];if(!(typeof r>"u"))return typeof r=="function"?r():r}throw new Error(`Page not found: ${e}`)}bqe({title:e=>`${e}`,resolve:e=>wqe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>yn(()=>import("./add-group--iy-V9oU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),"./pages/add-user.tsx":()=>yn(()=>import("./add-user-BhIeyfat.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,20]),import.meta.url),"./pages/add.tsx":()=>yn(()=>import("./add-BPcciwvU.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,23,24,25,20]),import.meta.url),"./pages/catalog.tsx":()=>yn(()=>import("./catalog-CZ251XUK.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,27,22,23,24,25,20,28]),import.meta.url),"./pages/dashboard.tsx":()=>yn(()=>import("./dashboard-BlhABz32.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,30]),import.meta.url),"./pages/form.tsx":()=>yn(()=>import("./form-wqN7nuKC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,32,22,23,24,25,20]),import.meta.url),"./pages/home.tsx":()=>yn(()=>import("./home-CeGqFqaa.js"),__vite__mapDeps([33,5,4,3,6]),import.meta.url),"./pages/init-user.tsx":()=>yn(()=>import("./init-user-DaOvt0vG.js"),__vite__mapDeps([34,3,4,20,5,6]),import.meta.url),"./pages/list.tsx":()=>yn(()=>import("./list-BI8WFUxC.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,36,27,37]),import.meta.url),"./pages/login.tsx":()=>yn(()=>import("./login-DR6fvKtm.js"),__vite__mapDeps([38,16,5,4,3,6,20]),import.meta.url),"./pages/module.tsx":()=>yn(()=>import("./module-B3jhuqbE.js"),__vite__mapDeps([39,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),"./pages/notification.tsx":()=>yn(()=>import("./notification-B-57JQl_.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,41]),import.meta.url),"./pages/register.tsx":()=>yn(()=>import("./register-hJD1ETdf.js"),__vite__mapDeps([42,3,4,20,5,6]),import.meta.url),"./pages/welcome.tsx":()=>yn(()=>import("./welcome-CkCufpDB.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)})),setup({el:e,App:n,props:o}){bne.createRoot(e).render(M.jsx(n,{...o}))},progress:{color:"#0f4898"}});export{En as $,MAe as A,PA as B,Go as C,VZ as D,j5 as E,bSe as F,wSe as G,_Se as H,lW as I,NSe as J,oz as K,Cs as L,HX as M,BX as N,VX as O,nw as P,WDe as Q,CAe as R,LRe as S,HDe as T,AAe as U,une as V,pne as W,xF as X,Yqe as Y,cI as Z,K as _,T5 as a,wU as a$,Rx as a0,Ap as a1,XDe as a2,KDe as a3,JDe as a4,eqe as a5,YDe as a6,tqe as a7,Ji as a8,uG as a9,KG as aA,YG as aB,ge as aC,xn as aD,lb as aE,P8 as aF,vje as aG,uEe as aH,Uf as aI,mEe as aJ,xEe as aK,Mje as aL,gje as aM,_je as aN,Tje as aO,Rje as aP,sTe as aQ,lTe as aR,hTe as aS,Dje as aT,_4 as aU,pTe as aV,MTe as aW,xTe as aX,bTe as aY,fTe as aZ,Nje as a_,fG as aa,yG as ab,mG as ac,bje as ad,Mqe as ae,iz as af,R7 as ag,y8 as ah,Vw as ai,Uo as aj,kN as ak,nl as al,ri as am,TLe as an,ELe as ao,Pp as ap,bp as aq,Cp as ar,ALe as as,ys as at,g2 as au,dn as av,Jt as aw,bt as ax,be as ay,oE as az,NEe as b,ZSe as b0,CU as b1,Oje as b2,Pje as b3,Hje as b4,Lje as b5,Sje as b6,N9e as b7,I9e as b8,A9e as b9,cz as bA,cDe as bB,aqe as bC,Xqe as bD,jp as bE,Yu as bF,H1 as bG,Kw as bH,wTe as bI,_Te as bJ,STe as bK,Qq as bL,CTe as bM,LTe as bN,tze as bO,nze as bP,aze as bQ,oze as bR,T9e as ba,E9e as bb,R9e as bc,FW as bd,UW as be,Il as bf,Dm as bg,GW as bh,xSe as bi,Ije as bj,Eje as bk,GSe as bl,WSe as bm,E2 as bn,FRe as bo,XC as bp,Wx as bq,YC as br,bae as bs,wae as bt,_ae as bu,MEe as bv,c7 as bw,eze as bx,Jqe as by,Qqe as bz,ARe as c,IRe as d,ERe as e,RRe as f,OSe as g,wt as h,LAe as i,M as j,NAe as k,IAe as l,ID as m,w9 as n,yf as o,UZ as p,pEe as q,CF as r,Ki as s,NDe as t,gF as u,fEe as v,yEe as w,uAe as x,hAe as y,gAe as z};
|
|
8065
|
+
*/const vqe={languageCode:"zh-CN",[Co]:"上方插入行",[So]:"下方插入行",[_o]:"左方插入列",[wo]:"右方插入列",[bo]:["移除该行","移除多行"],[xo]:["移除该列","移除多列"],[Mo]:"撤销",[go]:"恢复",[vo]:"只读",[ko]:"清空该列",[mo]:"对齐",[yo]:"左对齐",[fo]:"水平居中",[po]:"右对齐",[ho]:"两端对齐",[uo]:"顶端对齐",[lo]:"垂直居中",[so]:"底端对齐",[co]:"冻结该列",[io]:"取消冻结",[ro]:"边框",[oo]:"上",[ao]:"右",[no]:"下",[to]:"左",[eo]:"移除边框",[Ja]:"插入批注",[Qa]:"编辑批注",[Ya]:"删除批注",[Ka]:"只读批注",[Xa]:"合并",[Wa]:"取消合并",[Za]:"复制",[Rd]:"带标题的复制",[Td]:"带标题组的复制",[Ed]:"仅复制标题",[Ga]:"剪切",[Ua]:"插入子行",[Fa]:"与母行分离",[Va]:["隐藏该列","隐藏多列"],[Ba]:["显示该列","显示多列"],[Ha]:["隐藏该行","隐藏多行"],[Pa]:["显示该行","显示多行"],[Oa]:"无",[$a]:"为空",[za]:"不为空",[qa]:"等于",[Da]:"不等于",[ja]:"开头是",[Ra]:"结尾是",[Ta]:"包含",[Ea]:"不包含",[Aa]:"大于",[Ia]:"大于或等于",[Na]:"小于",[La]:"小于或等于",[Ca]:"在此范围",[Sa]:"不在此范围",[_a]:"之后",[wa]:"之前",[ba]:"今天",[xa]:"明天",[Ma]:"昨天",[ga]:"空白单元格",[va]:"按条件过滤",[ka]:"按值过滤",[ma]:"且",[ya]:"或",[fa]:"全选",[pa]:"清除",[ha]:"确认",[ua]:"取消",[da]:"搜索",[la]:"值",[sa]:"第二值"};jQ();const yV={de:sqe,en:zQ,es:lqe,fr:dqe,it:uqe,ja:hqe,ko:pqe,nl:fqe,pl:yqe,pt:mqe,ru:kqe,zh:vqe},gqe=document.documentElement.lang,pK=yV[gqe]??yV.en;DQ(pK);const fK=({config:e,data:n=[],onChange:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("ht-theme-main"),h=g.useCallback((k,m)=>{var x,b;if(m==="loadData")return;const y=(b=(x=f.current)==null?void 0:x.hotInstance)==null?void 0:b.getSourceData();o(y)},[]),f=g.useRef(null);return g.useEffect(()=>{const k=setTimeout(()=>{var m;(m=f.current)!=null&&m.hotInstance&&f.current.hotInstance.loadData(n)},100);return()=>clearTimeout(k)},[n]),g.useEffect(()=>{u(c==="dark"?"ht-theme-main-dark":"ht-theme-main")},[c]),M.jsx(qQ,{className:r?"pointer-events-none opacity-50":"",themeName:d,language:pK.languageCode,ref:f,...e,afterChange:h,children:e.columns.map(k=>M.jsx($Q,{data:k.data,...k},k.data))})},nze=Object.freeze(Object.defineProperty({__proto__:null,default:fK},Symbol.toStringTag,{value:"Module"})),Mqe=()=>{const[e,n]=g.useState({width:typeof window<"u"?window.innerWidth:1024,height:typeof window<"u"?window.innerHeight:768});return g.useEffect(()=>{if(typeof window>"u")return;const o=()=>{n({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),e},yK=({onChange:e,value:n,options:o,disabled:r})=>{const{appearance:c}=iz(),[d,u]=g.useState("light"),h=g.useRef(null),f=g.useRef(null),{width:k}=Mqe(),m=k<768,y=k>=768&&k<1024,x=_=>{e(_)},b=_=>{h.current=_,w()},w=()=>{var C;if(!h.current)return;const _={minimap:{enabled:!m},fontSize:m?12:y?13:14,lineNumbers:m?"off":"on",lineDecorationsWidth:m?5:10,scrollBeyondLastLine:!m,wordWrap:m?"on":"bounded",renderWhitespace:m?"none":"selection",padding:{top:m?8:16,bottom:m?8:16}};h.current.updateOptions(_),(C=f.current)==null||C.classList.add("overflow-hidden"),setTimeout(()=>{var N,A;(N=h.current)==null||N.layout(),(A=f.current)==null||A.classList.remove("overflow-hidden")},100)};g.useEffect(()=>{u(c==="dark"?"vs-dark":"light")},[c]),g.useEffect(()=>{w()},[k]);const S=m?"300px":y?"400px":"500px";return M.jsx("div",{className:`border rounded-lg ${m?"p-1":"p-2"}`,ref:f,children:M.jsx(AQ,{height:S,language:o.language,value:n,theme:d,options:{automaticLayout:!0,...m&&{wordWrap:"on"},minimap:{enabled:!m}},onChange:x,onMount:b,className:`transition-all duration-200 ease-in-out ${r?"pointer-events-none opacity-50 cursor-not-allowed":""}`})})},aze=Object.freeze(Object.defineProperty({__proto__:null,default:yK},Symbol.toStringTag,{value:"Module"})),mV=OA("m-1 flex items-center border rounded-sm px-1",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),cz=g.forwardRef(({options:e,onValueChange:n,variant:o,processing:r,disabled:c,defaultValue:d=[],placeholder:u="",notFound:h="",search:f="",animation:k=0,maxCount:m=3,modalPopover:y=!1,asChild:x=!1,className:b,mode:w="multiple",...S},_)=>{const[C,N]=g.useState(d),[A,T]=g.useState(!1),[q,$]=g.useState(!1),z=V=>{if(V.key==="Enter")T(!0);else if(V.key==="Backspace"&&!V.currentTarget.value){const se=[...C];se.pop(),N(se),n(se)}},P=V=>{let se;w==="single"?se=C.includes(V)?[]:[V]:se=C.includes(V)?C.filter(le=>le!==V):[...C,V],N(se),n(se),w==="single"&&T(!1)},ae=()=>{N([]),n([])},re=()=>{T(V=>!V)},he=()=>{const V=C.slice(0,m);N(V),n(V)};return M.jsxs(FW,{open:A,onOpenChange:T,modal:y,children:[M.jsx(UW,{asChild:!0,children:M.jsx(PA,{ref:_,...S,onClick:re,disabled:c,className:K("flex w-full p-1 rounded-md border-input border-1 min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto",b),children:C.length>0?M.jsxs("div",{className:"flex justify-between items-center w-full",children:[M.jsxs("div",{className:"flex flex-wrap items-center",children:[C.slice(0,m).map(V=>{const se=e.find(ye=>ye.value===V),le=se==null?void 0:se.icon;return M.jsxs("div",{className:K(q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[le&&M.jsx(le,{className:"h-4 w-4 mr-2"}),se==null?void 0:se.label,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:ye=>{ye.stopPropagation(),r||P(V)}})]},V)}),w==="multiple"&&C.length>m&&M.jsxs("div",{className:K("bg-transparent text-foreground border-foreground/1 hover:bg-transparent",q?"animate-bounce":"",mV({variant:o})),style:{animationDuration:`${k}s`},children:[`+ ${C.length-m} more`,M.jsx(Mr,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:V=>{V.stopPropagation(),he()}})]})]}),M.jsxs("div",{className:"flex items-center justify-between",children:[C.length>0&&M.jsxs(M.Fragment,{children:[M.jsx(ri,{className:"h-4 mx-2 cursor-pointer text-muted-foreground",onClick:V=>{V.stopPropagation(),ae()}}),M.jsx(tz,{orientation:"vertical",className:"flex min-h-6 h-full"})]}),M.jsx(oi,{className:"h-4 mx-2 cursor-pointer text-muted-foreground"})]})]}):M.jsxs("div",{className:"flex items-center justify-between w-full mx-auto",children:[M.jsx("span",{className:"text-sm text-muted-foreground mx-3",children:u}),M.jsx(oi,{className:"h-4 cursor-pointer text-muted-foreground mx-2"})]})})}),M.jsx(GW,{className:"w-auto p-0 z-[1003]",align:"start",onEscapeKeyDown:()=>T(!1),children:M.jsxs(mq,{children:[M.jsx(vG,{placeholder:f,onKeyDown:z}),M.jsxs(gG,{children:[M.jsx(MG,{children:h}),M.jsx(xG,{children:e.map(V=>{const se=C.includes(V.value);return M.jsxs(wG,{onSelect:()=>P(V.value),className:"cursor-pointer",children:[M.jsx("div",{className:K("mr-2 flex h-5 w-5 items-center justify-center rounded border border-primary",se?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:M.jsx(Uo,{className:"h-4 w-4 text-primary-foreground"})}),V.icon&&M.jsx(V.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsx("span",{children:V.label})]},V.value)})}),M.jsx(bG,{})]})]})}),k>0&&C.length>0&&w==="multiple"&&M.jsx(ti,{className:K("cursor-pointer my-2 text-foreground bg-background w-3 h-3",q?"":"text-muted-foreground"),onClick:()=>$(!q)})]})});cz.displayName="MultiSelect";const oze=Object.freeze(Object.defineProperty({__proto__:null,default:cz},Symbol.toStringTag,{value:"Module"}));function xqe(){window.UIComponents??(window.UIComponents={}),window.JSComponents??(window.JSComponents={}),window.axios=wt,window.sonner=PDe,Object.assign(window.UIComponents,{Avatar:bae,AvatarImage:wae,AvatarFallback:_ae,Badge:Cae,Breadcrumb:N9e,BreadcrumbList:I9e,BreadcrumbItem:A9e,BreadcrumbLink:E9e,BreadcrumbPage:T9e,BreadcrumbSeparator:R9e,BreadcrumbEllipsis:j9e,Button:PA,Calendar:xSe,Card:bSe,CardHeader:wSe,CardFooter:NSe,CardTitle:_Se,CardAction:CSe,CardDescription:SSe,CardContent:LSe,Checkbox:OSe,Collapsible:GSe,CollapsibleTrigger:ZSe,CollapsibleContent:WSe,Command:mq,CommandDialog:RLe,CommandInput:vG,CommandList:gG,CommandEmpty:MG,CommandGroup:xG,CommandItem:wG,CommandShortcut:jLe,CommandSeparator:bG,ContextMenu:uAe,ContextMenuTrigger:hAe,ContextMenuContent:gAe,ContextMenuItem:MAe,ContextMenuCheckboxItem:xAe,ContextMenuRadioItem:bAe,ContextMenuLabel:wAe,ContextMenuSeparator:_Ae,ContextMenuShortcut:SAe,ContextMenuGroup:pAe,ContextMenuPortal:fAe,ContextMenuSub:yAe,ContextMenuSubContent:vAe,ContextMenuSubTrigger:kAe,ContextMenuRadioGroup:mAe,Dialog:uG,DialogClose:ELe,DialogContent:fG,DialogDescription:kG,DialogFooter:TLe,DialogHeader:yG,DialogOverlay:pG,DialogPortal:hG,DialogTitle:mG,DialogTrigger:ALe,DialogStack:VZ,DialogStackTrigger:CAe,DialogStackOverlay:LAe,DialogStackBody:NAe,DialogStackContent:IAe,DialogStackTitle:AAe,DialogStackDescription:EAe,DialogStackHeader:TAe,DialogStackFooter:RAe,DialogStackNext:jAe,DialogStackPrevious:DAe,DropdownMenu:uEe,DropdownMenuPortal:hEe,DropdownMenuTrigger:pEe,DropdownMenuContent:fEe,DropdownMenuGroup:yEe,DropdownMenuLabel:MEe,DropdownMenuItem:mEe,DropdownMenuCheckboxItem:kEe,DropdownMenuRadioGroup:vEe,DropdownMenuRadioItem:gEe,DropdownMenuSeparator:xEe,DropdownMenuShortcut:bEe,DropdownMenuSub:wEe,DropdownMenuSubTrigger:_Ee,DropdownMenuSubContent:SEe,Input:lW,Label:NEe,Menubar:sTe,MenubarPortal:TW,MenubarMenu:lTe,MenubarTrigger:hTe,MenubarContent:pTe,MenubarGroup:dTe,MenubarSeparator:vTe,MenubarLabel:kTe,MenubarItem:fTe,MenubarShortcut:gTe,MenubarCheckboxItem:yTe,MenubarRadioGroup:uTe,MenubarRadioItem:mTe,MenubarSub:MTe,MenubarSubTrigger:xTe,MenubarSubContent:bTe,Pagination:wTe,PaginationContent:_Te,PaginationLink:Qq,PaginationItem:STe,PaginationPrevious:CTe,PaginationNext:LTe,PaginationEllipsis:NTe,Popover:FW,PopoverTrigger:UW,PopoverContent:GW,PopoverAnchor:VTe,Select:LRe,SelectContent:ERe,SelectGroup:NRe,SelectItem:RRe,SelectLabel:TRe,SelectScrollDownButton:SX,SelectScrollUpButton:_X,SelectSeparator:jRe,SelectTrigger:ARe,SelectValue:IRe,Separator:tz,Sheet:LX,SheetTrigger:ORe,SheetClose:PRe,SheetContent:NX,SheetHeader:IX,SheetFooter:VRe,SheetTitle:AX,SheetDescription:EX,Sidebar:gje,SidebarContent:Lje,SidebarFooter:Sje,SidebarGroup:Nje,SidebarGroupAction:Aje,SidebarGroupContent:Eje,SidebarGroupLabel:Ije,SidebarHeader:_je,SidebarInput:wje,SidebarInset:bje,SidebarMenu:Tje,SidebarMenuAction:qje,SidebarMenuBadge:zje,SidebarMenuButton:Dje,SidebarMenuItem:Rje,SidebarMenuSkeleton:$je,SidebarMenuSub:Oje,SidebarMenuSubButton:Hje,SidebarMenuSubItem:Pje,SidebarProvider:vje,SidebarRail:xje,SidebarSeparator:Cje,SidebarTrigger:Mje,useSidebar:E2,Skeleton:ID,Slider:cDe,Toaster:HDe,Switch:WDe,Table:XDe,TableHeader:KDe,TableBody:YDe,TableFooter:QDe,TableHead:eqe,TableRow:JDe,TableCell:tqe,TableCaption:nqe,Textarea:aqe,Tooltip:HX,TooltipTrigger:BX,TooltipContent:VX,TooltipProvider:oz,VanillaJSONEditor:qD}),Object.assign(window.JSComponents,{VanillaJSONEditor:qD,HandsonTable:fK,MonacoEditor:yK,MultiSelect:cz})}const{createInertiaApp:bqe}=LF;window.React=ke;window.ReactDOM=e2;window.InertiajsReact=LF;window.LucideReact=L9e;xqe();async function wqe(e,n){for(const o of Array.isArray(e)?e:[e]){const r=n[o];if(!(typeof r>"u"))return typeof r=="function"?r():r}throw new Error(`Page not found: ${e}`)}bqe({title:e=>`${e}`,resolve:e=>wqe(`./pages/${e}.tsx`,Object.assign({"./pages/add-group.tsx":()=>yn(()=>import("./add-group--iy-V9oU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url),"./pages/add-user.tsx":()=>yn(()=>import("./add-user-BhIeyfat.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,19,20]),import.meta.url),"./pages/add.tsx":()=>yn(()=>import("./add-BPcciwvU.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,22,23,24,25,20]),import.meta.url),"./pages/catalog.tsx":()=>yn(()=>import("./catalog-CZ251XUK.js"),__vite__mapDeps([26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,27,22,23,24,25,20,28]),import.meta.url),"./pages/dashboard.tsx":()=>yn(()=>import("./dashboard-BlhABz32.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,30]),import.meta.url),"./pages/form.tsx":()=>yn(()=>import("./form-wqN7nuKC.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,32,22,23,24,25,20]),import.meta.url),"./pages/home.tsx":()=>yn(()=>import("./home-BZQ-WlHq.js"),__vite__mapDeps([33,5,4,3,6]),import.meta.url),"./pages/init-user.tsx":()=>yn(()=>import("./init-user-DaOvt0vG.js"),__vite__mapDeps([34,3,4,20,5,6]),import.meta.url),"./pages/list.tsx":()=>yn(()=>import("./list-DxFdOkRH.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,36,27,37]),import.meta.url),"./pages/login.tsx":()=>yn(()=>import("./login-DR6fvKtm.js"),__vite__mapDeps([38,16,5,4,3,6,20]),import.meta.url),"./pages/module.tsx":()=>yn(()=>import("./module-B3jhuqbE.js"),__vite__mapDeps([39,3,4,1,2,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),"./pages/notification.tsx":()=>yn(()=>import("./notification-B-57JQl_.js"),__vite__mapDeps([40,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,41]),import.meta.url),"./pages/register.tsx":()=>yn(()=>import("./register-hJD1ETdf.js"),__vite__mapDeps([42,3,4,20,5,6]),import.meta.url),"./pages/welcome.tsx":()=>yn(()=>import("./welcome-CkCufpDB.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)})),setup({el:e,App:n,props:o}){bne.createRoot(e).render(M.jsx(n,{...o}))},progress:{color:"#0f4898"}});export{En as $,MAe as A,PA as B,Go as C,VZ as D,j5 as E,bSe as F,wSe as G,_Se as H,lW as I,NSe as J,oz as K,Cs as L,HX as M,BX as N,VX as O,nw as P,WDe as Q,CAe as R,LRe as S,HDe as T,AAe as U,une as V,pne as W,xF as X,Yqe as Y,cI as Z,K as _,T5 as a,wU as a$,Rx as a0,Ap as a1,XDe as a2,KDe as a3,JDe as a4,eqe as a5,YDe as a6,tqe as a7,Ji as a8,uG as a9,KG as aA,YG as aB,ge as aC,xn as aD,lb as aE,P8 as aF,vje as aG,uEe as aH,Uf as aI,mEe as aJ,xEe as aK,Mje as aL,gje as aM,_je as aN,Tje as aO,Rje as aP,sTe as aQ,lTe as aR,hTe as aS,Dje as aT,_4 as aU,pTe as aV,MTe as aW,xTe as aX,bTe as aY,fTe as aZ,Nje as a_,fG as aa,yG as ab,mG as ac,bje as ad,Mqe as ae,iz as af,R7 as ag,y8 as ah,Vw as ai,Uo as aj,kN as ak,nl as al,ri as am,TLe as an,ELe as ao,Pp as ap,bp as aq,Cp as ar,ALe as as,ys as at,g2 as au,dn as av,Jt as aw,bt as ax,be as ay,oE as az,NEe as b,ZSe as b0,CU as b1,Oje as b2,Pje as b3,Hje as b4,Lje as b5,Sje as b6,N9e as b7,I9e as b8,A9e as b9,cz as bA,cDe as bB,aqe as bC,Xqe as bD,jp as bE,Yu as bF,H1 as bG,Kw as bH,wTe as bI,_Te as bJ,STe as bK,Qq as bL,CTe as bM,LTe as bN,tze as bO,nze as bP,aze as bQ,oze as bR,T9e as ba,E9e as bb,R9e as bc,FW as bd,UW as be,Il as bf,Dm as bg,GW as bh,xSe as bi,Ije as bj,Eje as bk,GSe as bl,WSe as bm,E2 as bn,FRe as bo,XC as bp,Wx as bq,YC as br,bae as bs,wae as bt,_ae as bu,MEe as bv,c7 as bw,eze as bx,Jqe as by,Qqe as bz,ARe as c,IRe as d,ERe as e,RRe as f,OSe as g,wt as h,LAe as i,M as j,NAe as k,IAe as l,ID as m,w9 as n,yf as o,UZ as p,pEe as q,CF as r,Ki as s,NDe as t,gF as u,fEe as v,yEe as w,uAe as x,hAe as y,gAe as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-D95dIAP2.js","./vendor-wzZzN_Jv.js","./monaco-ICtx6xoc.js","./handsontable-PVakPtJV.js","./app-ByR7F4XX.css","./add-form-VLJ6QSu3.js","./icon-DpkedrXG.js","./field-renderer-CjsyUnNE.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./input-error-CmXZF6xy.js","./add-group-form-DMz0_Oo9.js","./add-user-form-izlXhv2-.js","./material-icon-DwkE6wKL.js","./app-shell-C8Cnr5Hy.js","./app-sidebar-header-Bcpas2Np.js","./breadcrumbs-DSMzNYiS.js","./nav-user-DuCZNsZX.js","./user-info-BGQvqBmO.js","./user-menu-content-BDm88xaM.js","./theme-switcher-cgyA7_cO.js","./app-sidebar-CNGEOOHu.js","./nav-main-BqKm87JZ.js","./date-picker-kW3wZQr_.js","./form-5bcLbjFf.js","./geo-json-YeWQOYnT.js","./list-table-
|
|
2
|
-
import{_ as t}from"./jsoneditor-D95dIAP2.js";import{u as x,j as o,V as v,W as P}from"./app.js";import{r as l}from"./monaco-ICtx6xoc.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function T(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bO),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-VLJ6QSu3.js"),__vite__mapDeps([6,0,1,2,3,4,5,7,8,9,10,11]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-DMz0_Oo9.js"),__vite__mapDeps([12,0,1,2,3,4,5,7]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-izlXhv2-.js"),__vite__mapDeps([13,0,1,2,3,4,5,7,11,14]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-C8Cnr5Hy.js"),__vite__mapDeps([15,0,1,2,3,4,5]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-Bcpas2Np.js").then(e=>e.a),__vite__mapDeps([16,0,1,2,3,4,5,17,18,19,20,21,7,14]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-CNGEOOHu.js"),__vite__mapDeps([22,0,1,2,3,4,5,23,14]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-DSMzNYiS.js"),__vite__mapDeps([17,0,1,2,3,4,5]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-kW3wZQr_.js"),__vite__mapDeps([24,0,1,2,3,4,5]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-BOYmRX_z.js"),__vite__mapDeps([9,0,1,2,3,4,5]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-CjsyUnNE.js").then(e=>e.f),__vite__mapDeps([8,1,2,0,3,4,5,9,10]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-5bcLbjFf.js"),__vite__mapDeps([25,0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-YeWQOYnT.js"),__vite__mapDeps([26,0,1,2,3,4,5]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.bP),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DpkedrXG.js"),__vite__mapDeps([7,0,1,2,3,4,5]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error-CmXZF6xy.js"),__vite__mapDeps([11,0,1,2,3,4,5]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-D95dIAP2.js","./vendor-wzZzN_Jv.js","./monaco-ICtx6xoc.js","./handsontable-PVakPtJV.js","./app-ByR7F4XX.css","./add-form-VLJ6QSu3.js","./icon-DpkedrXG.js","./field-renderer-CjsyUnNE.js","./dynamic-controls-BOYmRX_z.js","./field-renderer-CRNLShJD.css","./input-error-CmXZF6xy.js","./add-group-form-DMz0_Oo9.js","./add-user-form-izlXhv2-.js","./material-icon-DwkE6wKL.js","./app-shell-C8Cnr5Hy.js","./app-sidebar-header-Bcpas2Np.js","./breadcrumbs-DSMzNYiS.js","./nav-user-DuCZNsZX.js","./user-info-BGQvqBmO.js","./user-menu-content-BDm88xaM.js","./theme-switcher-cgyA7_cO.js","./app-sidebar-CNGEOOHu.js","./nav-main-BqKm87JZ.js","./date-picker-kW3wZQr_.js","./form-5bcLbjFf.js","./geo-json-YeWQOYnT.js","./list-table-Do8_doRe.js","./del-modal-DyIWFflP.js","./pagination-render-io0M2m2O.js","./nav-footer-B85HLj-j.js","./toast-editor-DwRk6WqT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t}from"./jsoneditor-D95dIAP2.js";import{u as x,j as o,V as v,W as P}from"./app.js";import{r as l}from"./monaco-ICtx6xoc.js";import"./vendor-wzZzN_Jv.js";import"./handsontable-PVakPtJV.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function T(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bO),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./add-form-VLJ6QSu3.js"),__vite__mapDeps([6,0,1,2,3,4,5,7,8,9,10,11]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-DMz0_Oo9.js"),__vite__mapDeps([12,0,1,2,3,4,5,7]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-izlXhv2-.js"),__vite__mapDeps([13,0,1,2,3,4,5,7,11,14]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-C8Cnr5Hy.js"),__vite__mapDeps([15,0,1,2,3,4,5]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-Bcpas2Np.js").then(e=>e.a),__vite__mapDeps([16,0,1,2,3,4,5,17,18,19,20,21,7,14]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-CNGEOOHu.js"),__vite__mapDeps([22,0,1,2,3,4,5,23,14]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-DSMzNYiS.js"),__vite__mapDeps([17,0,1,2,3,4,5]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-kW3wZQr_.js"),__vite__mapDeps([24,0,1,2,3,4,5]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-BOYmRX_z.js"),__vite__mapDeps([9,0,1,2,3,4,5]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./field-renderer-CjsyUnNE.js").then(e=>e.f),__vite__mapDeps([8,1,2,0,3,4,5,9,10]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-5bcLbjFf.js"),__vite__mapDeps([25,0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-YeWQOYnT.js"),__vite__mapDeps([26,0,1,2,3,4,5]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.bP),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DpkedrXG.js"),__vite__mapDeps([7,0,1,2,3,4,5]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error-CmXZF6xy.js"),__vite__mapDeps([11,0,1,2,3,4,5]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-Do8_doRe.js"),__vite__mapDeps([27,0,1,2,3,4,5,7,14,28,29]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-DwkE6wKL.js"),__vite__mapDeps([14,0,1,2,3,4,5]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.bQ),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.bR),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-B85HLj-j.js"),__vite__mapDeps([30,0,1,2,3,4,5,7]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-BqKm87JZ.js"),__vite__mapDeps([23,0,1,2,3,4,5,14]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-DuCZNsZX.js"),__vite__mapDeps([18,0,1,2,3,4,5,19,20]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-io0M2m2O.js"),__vite__mapDeps([29,0,1,2,3,4,5]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-cgyA7_cO.js"),__vite__mapDeps([21,0,1,2,3,4,5,7]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-DwRk6WqT.js"),__vite__mapDeps([31,0,1,2,3,4,5]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-BGQvqBmO.js"),__vite__mapDeps([19,0,1,2,3,4,5]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-BDm88xaM.js"),__vite__mapDeps([20,0,1,2,3,4,5,19]),import.meta.url)}),`../components/${s}.tsx`,3)).default;_(o.jsx(E,{...a}))},d=async()=>{const{component:s}=m[1],u=(await import(s)).default;p(o.jsx(u,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),n||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:d,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./app.js";import{A as r}from"./app-layout-gAiczU39.js";import t from"./list-table-
|
|
1
|
+
import{j as o}from"./app.js";import{A as r}from"./app-layout-gAiczU39.js";import t from"./list-table-Do8_doRe.js";import"./jsoneditor-D95dIAP2.js";import"./vendor-wzZzN_Jv.js";import"./monaco-ICtx6xoc.js";import"./handsontable-PVakPtJV.js";import"./app-shell-C8Cnr5Hy.js";import"./app-sidebar-CNGEOOHu.js";import"./nav-main-BqKm87JZ.js";import"./material-icon-DwkE6wKL.js";import"./app-sidebar-header-Bcpas2Np.js";import"./breadcrumbs-DSMzNYiS.js";import"./nav-user-DuCZNsZX.js";import"./user-info-BGQvqBmO.js";import"./user-menu-content-BDm88xaM.js";import"./theme-switcher-cgyA7_cO.js";import"./icon-DpkedrXG.js";import"./del-modal-DyIWFflP.js";import"./pagination-render-io0M2m2O.js";const m=[],E=()=>o.jsx(r,{breadcrumbs:m,className:"overflow-auto h-[calc(100svh-16px)]",children:o.jsx(t,{})});export{E as default};
|
|
@@ -19,4 +19,4 @@ import{bD as Ue,j as f,B as G,ap as Ke,aq as Xe,bE as Je,I as Qe,bF as Ee,a2 as
|
|
|
19
19
|
* LICENSE.md file in the root directory of this source tree.
|
|
20
20
|
*
|
|
21
21
|
* @license MIT
|
|
22
|
-
*/function De(e,o){return e?sn(e)?_.createElement(e,o):e:null}function sn(e){return ln(e)||typeof e=="function"||un(e)}function ln(e){return typeof e=="function"&&(()=>{const o=Object.getPrototypeOf(e);return o.prototype&&o.prototype.isReactComponent})()}function un(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function an(e){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=_.useState(()=>({current:en(o)})),[n,r]=_.useState(()=>t.current.initialState);return t.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:s=>{r(s),e.onStateChange==null||e.onStateChange(s)}})),t.current}function gn({columns:e,data:o,notFoundContent:t,globalSearch:n=!1,onGlobalSearch:r,searchValue:i,handleSearch:s,searchTxt:l}){var d;const u=_.useRef(null);_.useEffect(()=>{n&&u.current&&u.current.focus()});const a=an({data:o,columns:e,getCoreRowModel:tn(),getPaginationRowModel:on(),getSortedRowModel:rn(),enableSorting:!1,manualPagination:!0});return f.jsxs("div",{className:"rounded-md border",children:[n&&r&&f.jsxs("div",{className:"flex gap-2 p-2",children:[f.jsx(Qe,{ref:u,type:"text",value:i,placeholder:l,className:"w-full max-w-[200px] p-2 border rounded",onChange:p=>{r(p.target.value)},onKeyDown:p=>{p.key==="Enter"&&s&&s()}}),f.jsx(G,{variant:"outline",size:"icon",onClick:s,children:f.jsx(O,{iconNode:Ee,className:"size-5"})})]}),f.jsxs(We,{wrapperHeight:"max-h-[65vh]",children:[f.jsx(Ye,{className:"sticky top-0 z-10 bg-background shadow",children:a.getHeaderGroups().map(p=>f.jsx(re,{children:p.headers.map(c=>f.jsx(Ze,{children:c.isPlaceholder?null:De(c.column.columnDef.header,c.getContext())},c.id))},p.id))}),f.jsx(be,{children:(d=a.getRowModel().rows)!=null&&d.length?a.getRowModel().rows.map(p=>f.jsx(re,{"data-state":p.getIsSelected()&&"selected",children:p.getVisibleCells().map(c=>f.jsx(xe,{className:c.column.getIndex()===0?"sticky left-0 bg-background":"",children:De(c.column.columnDef.cell,c.getContext())},c.id))},p.id)):f.jsx(re,{children:f.jsx(xe,{colSpan:e.length,className:"h-24 text-center",children:t})})})]})]})}function dn(e,o,t,n){const r=Math.ceil(e/o),i=(t-1)*o+1,s=Math.min(t*o,e),l=[];l.push({label:"Previous",active:!1});let u=Math.max(1,t-Math.floor(n/2)),a=Math.min(r,u+n-1);a-u+1<n&&(u=Math.max(1,a-n+1));for(let d=u;d<=a;d++)l.push({label:d.toString(),active:d===t});return l.push({label:"Next",active:!1}),{total:e,per_page:o,current_page:t,last_page:r,next_page_url:t<r?!0:null,prev_page_url:t>1?!0:null,from:i,to:s,links:l,showPages:n}}const Rn=()=>{var ve;const e=et(),o=e.props.data,[t,n]=_.useState(!1),[r,i]=_.useState(""),[s,l]=_.useState(!1),[u,a]=_.useState(1),[d,p]=_.useState("5"),[c,g]=_.useState("1"),[m,h]=_.useState("desc"),R=_.useRef([]);_.useEffect(()=>{const w=new URLSearchParams(window.location.search);i(w.get("globalSearch")||""),l(!!w.get("globalSearch")),a(parseInt(w.get("page")||"1")),p(w.get("count")||"5"),g(w.get("column")||"1"),h(w.get("direction")||"desc");const F=w.getAll("searchColumn"),E=w.getAll("searchColumnValue");R.current=F.map((A,N)=>({key:A,value:E[N]}))},[]),_.useEffect(()=>{document.body.removeAttribute("style")},[o]);const v=_.useMemo(()=>dn(o.recordsFiltered,parseInt(d),u,5),[o.recordsFiltered,d,u,r]);_.useEffect(()=>{e.props.flash&&(e.props.flash.success&&_e.success(e.props.flash.success),e.props.flash.error&&_e.error(e.props.flash.error))},[e.props.flash]);const $=_.useCallback(w=>{p(w),a(1),n(!0),B.visit(`${e.props.header.entity.uri}?count=${w}&page=1`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[o]),x=_.useCallback((w,F,E,A)=>{const N=w!==void 0?w:u,P=F!==void 0?F:m,Y=E!==void 0?E:c,k=A!==void 0?A:r,ke=`count=${d}&page=${N}&column=${Y}&direction=${P}`,Be=k?`&globalSearch=${k}`:"",qe=R.current.map(Re=>`&searchColumn=${Re.key}&searchColumnValue=${Re.value}`).join("");return`${ke}${Be}${qe}`},[o,d,u,c,m,r]),y=_.useCallback(w=>{a(w),n(!0),B.visit(`${e.props.header.entity.uri}?${x(w)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[x,e.props.header.entity.uri]),V=_.useCallback((w,F)=>{g(w),h(F),n(!0),B.visit(`${e.props.header.entity.uri}?${x(void 0,F,w)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[d,u,r]),H=_.useCallback(w=>{i(w),a(1)},[]),T=_.useCallback(()=>{n(!0),B.visit(`${e.props.header.entity.uri}?${x(1)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[e.props.header.entity.uri,x]),J=_.useCallback((w,F)=>{a(1);const E=R.current.findIndex(A=>A.key===w);E>=0&&R.current.splice(E,1),F&&R.current.push({key:w,value:F})},[o]),oe=()=>{l(!1),i(""),R.current=[],a(1),g("1"),h("desc"),B.visit(`${e.props.header.entity.uri}?count=${d}&page=1`,{preserveState:!0,preserveScroll:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},Q=pt(e.props.columns,V,J,T,s),W=_.useMemo(()=>[...[{accessorKey:"actions",header:()=>f.jsx("div",{className:"text-center",children:e.props.header.thActionsTitle}),cell:({row:F})=>{var E,A,N;return f.jsx("div",{className:"text-center",children:["deleteTitle","viewsTitle","editTitle"].some(P=>{var Y,k;return((Y=e.props.header.crudActions)==null?void 0:Y[P])&&((k=e.props.header.crudActions)==null?void 0:k[P].trim())!==""})&&f.jsxs($e,{children:[f.jsx(Fe,{asChild:!0,className:"cursor-pointer",children:f.jsx(G,{variant:"outline",size:"icon",children:f.jsx(Me,{})})}),f.jsxs(Ve,{className:"w-46",side:"right",align:"start",children:[f.jsxs(Pe,{children:[((E=e.props.header.crudActions)==null?void 0:E.editTitle)&&f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:f.jsxs(q,{href:`${e.props.header.entity.uri}/edit/${F.original.id}`,onClick:()=>{localStorage.setItem("backUrl",window.location.pathname+window.location.search)},children:[f.jsx(O,{iconNode:at}),e.props.header.crudActions.editTitle]})}),((A=e.props.header.crudActions)==null?void 0:A.viewsTitle)&&f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:f.jsxs(q,{href:`${e.props.header.entity.uri}/view/${F.original.id}`,children:[f.jsx(O,{iconNode:gt}),e.props.header.crudActions.viewsTitle]})}),((N=e.props.header.crudActions)==null?void 0:N.deleteTitle)&&f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:f.jsx(ct,{btnTitle:e.props.header.crudActions.deleteTitle,delModal:e.props.header.delModal,btnCLass:"font-normal text-destructive hover:text-destructive w-full cursor-pointer justify-start",link:`${e.props.header.entity.uri}/remove/${F.original.id}?referTo=${encodeURIComponent(window.location.search)}`})})]}),e.props.header.inlineActions&&e.props.header.inlineActions.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(dt,{}),e.props.header.inlineActions.map(P=>f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:P.type==="blank"?f.jsxs("a",{target:"_blank",href:P.link,children:[P.icon&&f.jsx(U,{name:P.icon,className:"!text-[18px] mr-2"}),f.jsx("span",{children:P.title})]}):f.jsxs(q,{href:`${P.link}/${F.original.id}?id=${F.original.id}&entity=${e.props.header.entity.name}`,children:[P.icon&&f.jsx(U,{name:P.icon,className:"!text-[18px] mr-2"}),f.jsx("span",{children:P.title})]})},P.id))]})]})]})})}}],...Q],[e.props.header.thActionsTitle,e.props.header.crudActions,e.props.header.inlineActions,e.props.header.entity.uri,e.props.header.entity.name,e.props.header.delModal,Q]);return f.jsxs(f.Fragment,{children:[f.jsx(tt,{position:"top-center",richColors:!0,closeButton:!0}),f.jsxs("div",{className:`flex h-auto flex-1 flex-col gap-4 rounded-xl p-4 ${t?"opacity-50":""}`,children:[f.jsxs("div",{className:"flex gap-2 sticky top-0 z-10 bg-background py-3",children:[((ve=e.props.header.crudActions)==null?void 0:ve.createTitle)&&f.jsx(G,{asChild:!0,children:f.jsxs(q,{href:`${e.props.header.entity.uri}/add`,children:[f.jsx(O,{iconNode:nt}),e.props.header.crudActions.createTitle]})}),f.jsxs(G,{className:"transition-none cursor-pointer",variant:s?"destructive":"outline",onClick:()=>{s?oe():l(!0)},children:[f.jsx(O,{iconNode:s?ot:Ee}),s?e.props.header.resetBtn:e.props.header.searchBtn]}),e.props.header.actions.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"gap-2 ml-6 hidden lg:flex",children:e.props.header.actions.map(w=>f.jsx(G,{asChild:!0,variant:"outline",children:w.type==="blank"?f.jsxs("a",{href:w.link,target:"_blank",children:[w.icon&&f.jsx(U,{name:w.icon,className:"!text-[18px]"}),w.title]}):f.jsxs(q,{href:w.link,children:[w.icon&&f.jsx(U,{name:w.icon,className:"!text-[18px]"}),w.title]})},w.id))||null}),f.jsx("div",{className:"block lg:hidden ml-6",children:f.jsxs($e,{children:[f.jsx(Fe,{asChild:!0,children:f.jsx(G,{variant:"outline",size:"icon",children:f.jsx(Me,{})})}),f.jsx(Ve,{className:"w-fit",side:"right",align:"start",children:f.jsx(Pe,{className:"grid gap-2",children:e.props.header.actions.map(w=>f.jsx(G,{asChild:!0,variant:"outline",children:f.jsxs("a",{href:w.link,target:"_blank",children:[f.jsx(U,{name:w.icon,className:"!text-[18px]"}),w.title]})},w.id))||null})})]})})]})]}),f.jsx(gn,{columns:W,data:o.data,searchValue:r,searchTxt:e.props.header.searchBtn,notFoundContent:e.props.header.notFoundContent,globalSearch:s,onGlobalSearch:H,handleSearch:T}),f.jsxs("div",{className:"mt-4 flex flex-wrap justify-center md:justify-between gap-4 items-end",children:[f.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-1 gap-4 items-center justify-items-center md:justify-items-normal",children:[f.jsxs("p",{className:"text-sm text-foreground/70",children:["Show ",v.from," - ",v.to," of ",v.total]}),f.jsx("div",{className:"max-w-fit",children:f.jsxs(rt,{onValueChange:w=>$(w),value:d,children:[f.jsx(it,{className:"w-full cursor-pointer",children:f.jsx(st,{placeholder:d})}),f.jsx(lt,{children:["5","10","50"].map(w=>f.jsx(ut,{value:w,children:w},w))})]})})]}),f.jsx("div",{children:o.data.length>0&&f.jsx(ft,{pagination:v,pageChange:y,currentPage:u})})]})]})]})};export{Rn as default};
|
|
22
|
+
*/function De(e,o){return e?sn(e)?_.createElement(e,o):e:null}function sn(e){return ln(e)||typeof e=="function"||un(e)}function ln(e){return typeof e=="function"&&(()=>{const o=Object.getPrototypeOf(e);return o.prototype&&o.prototype.isReactComponent})()}function un(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function an(e){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=_.useState(()=>({current:en(o)})),[n,r]=_.useState(()=>t.current.initialState);return t.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:s=>{r(s),e.onStateChange==null||e.onStateChange(s)}})),t.current}function gn({columns:e,data:o,notFoundContent:t,globalSearch:n=!1,onGlobalSearch:r,searchValue:i,handleSearch:s,searchTxt:l}){var d;const u=_.useRef(null);_.useEffect(()=>{n&&u.current&&u.current.focus()});const a=an({data:o,columns:e,getCoreRowModel:tn(),getPaginationRowModel:on(),getSortedRowModel:rn(),enableSorting:!1,manualPagination:!0});return f.jsxs("div",{className:"rounded-md border",children:[n&&r&&f.jsxs("div",{className:"flex gap-2 p-2",children:[f.jsx(Qe,{ref:u,type:"text",value:i,placeholder:l,className:"w-full max-w-[200px] p-2 border rounded",onChange:p=>{r(p.target.value)},onKeyDown:p=>{p.key==="Enter"&&s&&s()}}),f.jsx(G,{variant:"outline",size:"icon",onClick:s,children:f.jsx(O,{iconNode:Ee,className:"size-5"})})]}),f.jsxs(We,{wrapperHeight:"max-h-[65vh]",children:[f.jsx(Ye,{className:"sticky top-0 z-10 bg-background shadow",children:a.getHeaderGroups().map(p=>f.jsx(re,{children:p.headers.map(c=>f.jsx(Ze,{children:c.isPlaceholder?null:De(c.column.columnDef.header,c.getContext())},c.id))},p.id))}),f.jsx(be,{children:(d=a.getRowModel().rows)!=null&&d.length?a.getRowModel().rows.map(p=>f.jsx(re,{"data-state":p.getIsSelected()&&"selected",children:p.getVisibleCells().map(c=>f.jsx(xe,{className:c.column.getIndex()===0?"sticky left-0 bg-background":"",children:De(c.column.columnDef.cell,c.getContext())},c.id))},p.id)):f.jsx(re,{children:f.jsx(xe,{colSpan:e.length,className:"h-24 text-center",children:t})})})]})]})}function dn(e,o,t,n){const r=Math.ceil(e/o),i=(t-1)*o+1,s=Math.min(t*o,e),l=[];l.push({label:"Previous",active:!1});let u=Math.max(1,t-Math.floor(n/2)),a=Math.min(r,u+n-1);a-u+1<n&&(u=Math.max(1,a-n+1));for(let d=u;d<=a;d++)l.push({label:d.toString(),active:d===t});return l.push({label:"Next",active:!1}),{total:e,per_page:o,current_page:t,last_page:r,next_page_url:t<r?!0:null,prev_page_url:t>1?!0:null,from:i,to:s,links:l,showPages:n}}const Rn=()=>{var ve;const e=et(),o=e.props.data,[t,n]=_.useState(!1),[r,i]=_.useState(""),[s,l]=_.useState(!1),[u,a]=_.useState(1),[d,p]=_.useState("5"),[c,g]=_.useState("1"),[m,h]=_.useState("desc"),R=_.useRef([]);_.useEffect(()=>{const w=new URLSearchParams(window.location.search);console.log(e.props),i(w.get("globalSearch")||""),l(!!w.get("globalSearch")),a(parseInt(w.get("page")||"1")),p(w.get("count")||"5"),g(w.get("column")||"1"),h(w.get("direction")||"desc");const F=w.getAll("searchColumn"),E=w.getAll("searchColumnValue");R.current=F.map((A,N)=>({key:A,value:E[N]}))},[]),_.useEffect(()=>{document.body.removeAttribute("style")},[o]);const v=_.useMemo(()=>dn(o.recordsFiltered,parseInt(d),u,5),[o.recordsFiltered,d,u,r]);_.useEffect(()=>{e.props.flash&&(e.props.flash.success&&_e.success(e.props.flash.success),e.props.flash.error&&_e.error(e.props.flash.error))},[e.props.flash]);const $=_.useCallback(w=>{p(w),a(1),n(!0),B.visit(`${e.props.header.entity.uri}?count=${w}&page=1`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[o]),x=_.useCallback((w,F,E,A)=>{const N=w!==void 0?w:u,P=F!==void 0?F:m,Y=E!==void 0?E:c,k=A!==void 0?A:r,ke=`count=${d}&page=${N}&column=${Y}&direction=${P}`,Be=k?`&globalSearch=${k}`:"",qe=R.current.map(Re=>`&searchColumn=${Re.key}&searchColumnValue=${Re.value}`).join("");return`${ke}${Be}${qe}`},[o,d,u,c,m,r]),y=_.useCallback(w=>{a(w),n(!0),B.visit(`${e.props.header.entity.uri}?${x(w)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[x,e.props.header.entity.uri]),V=_.useCallback((w,F)=>{g(w),h(F),n(!0),B.visit(`${e.props.header.entity.uri}?${x(void 0,F,w)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[d,u,r]),H=_.useCallback(w=>{i(w),a(1)},[]),T=_.useCallback(()=>{n(!0),B.visit(`${e.props.header.entity.uri}?${x(1)}`,{preserveState:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},[e.props.header.entity.uri,x]),J=_.useCallback((w,F)=>{a(1);const E=R.current.findIndex(A=>A.key===w);E>=0&&R.current.splice(E,1),F&&R.current.push({key:w,value:F})},[o]),oe=()=>{l(!1),i(""),R.current=[],a(1),g("1"),h("desc"),B.visit(`${e.props.header.entity.uri}?count=${d}&page=1`,{preserveState:!0,preserveScroll:!0,only:["data","columns","header"],onSuccess:()=>n(!1)})},Q=pt(e.props.columns,V,J,T,s),W=_.useMemo(()=>[...[{accessorKey:"actions",header:()=>f.jsx("div",{className:"text-center",children:e.props.header.thActionsTitle}),cell:({row:F})=>{var E,A,N;return f.jsx("div",{className:"text-center",children:["deleteTitle","viewsTitle","editTitle"].some(P=>{var Y,k;return((Y=e.props.header.crudActions)==null?void 0:Y[P])&&((k=e.props.header.crudActions)==null?void 0:k[P].trim())!==""})&&f.jsxs($e,{children:[f.jsx(Fe,{asChild:!0,className:"cursor-pointer",children:f.jsx(G,{variant:"outline",size:"icon",children:f.jsx(Me,{})})}),f.jsxs(Ve,{className:"w-46",side:"right",align:"start",children:[f.jsxs(Pe,{children:[((E=e.props.header.crudActions)==null?void 0:E.editTitle)&&f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:f.jsxs(q,{href:`${e.props.header.entity.uri}/edit/${F.original.id}`,onClick:()=>{localStorage.setItem("backUrl",window.location.pathname+window.location.search)},children:[f.jsx(O,{iconNode:at}),e.props.header.crudActions.editTitle]})}),((A=e.props.header.crudActions)==null?void 0:A.viewsTitle)&&f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:f.jsxs(q,{href:`${e.props.header.entity.uri}/view/${F.original.id}`,children:[f.jsx(O,{iconNode:gt}),e.props.header.crudActions.viewsTitle]})}),((N=e.props.header.crudActions)==null?void 0:N.deleteTitle)&&f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:f.jsx(ct,{btnTitle:e.props.header.crudActions.deleteTitle,delModal:e.props.header.delModal,btnCLass:"font-normal text-destructive hover:text-destructive w-full cursor-pointer justify-start",link:`${e.props.header.entity.uri}/remove/${F.original.id}?referTo=${encodeURIComponent(window.location.search)}`})})]}),e.props.header.inlineActions&&e.props.header.inlineActions.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(dt,{}),e.props.header.inlineActions.map(P=>f.jsx(Z,{asChild:!0,className:"cursor-pointer",children:P.type==="blank"?f.jsxs("a",{target:"_blank",href:P.link,children:[P.icon&&f.jsx(U,{name:P.icon,className:"!text-[18px] mr-2"}),f.jsx("span",{children:P.title})]}):f.jsxs(q,{href:`${P.link}/${F.original.id}?id=${F.original.id}&entity=${e.props.header.entity.name}`,children:[P.icon&&f.jsx(U,{name:P.icon,className:"!text-[18px] mr-2"}),f.jsx("span",{children:P.title})]})},P.id))]})]})]})})}}],...Q],[e.props.header.thActionsTitle,e.props.header.crudActions,e.props.header.inlineActions,e.props.header.entity.uri,e.props.header.entity.name,e.props.header.delModal,Q]);return f.jsxs(f.Fragment,{children:[f.jsx(tt,{position:"top-center",richColors:!0,closeButton:!0}),f.jsxs("div",{className:`flex h-auto flex-1 flex-col gap-4 rounded-xl p-4 ${t?"opacity-50":""}`,children:[f.jsxs("div",{className:"flex gap-2 sticky top-0 z-10 bg-background py-3",children:[((ve=e.props.header.crudActions)==null?void 0:ve.createTitle)&&f.jsx(G,{asChild:!0,children:f.jsxs(q,{href:`${e.props.header.entity.uri}/add`,children:[f.jsx(O,{iconNode:nt}),e.props.header.crudActions.createTitle]})}),f.jsxs(G,{className:"transition-none cursor-pointer",variant:s?"destructive":"outline",onClick:()=>{s?oe():l(!0)},children:[f.jsx(O,{iconNode:s?ot:Ee}),s?e.props.header.resetBtn:e.props.header.searchBtn]}),e.props.header.actions.length>0&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"gap-2 ml-6 hidden lg:flex",children:e.props.header.actions.map(w=>f.jsx(G,{asChild:!0,variant:"outline",children:w.type==="blank"?f.jsxs("a",{href:w.link,target:"_blank",children:[w.icon&&f.jsx(U,{name:w.icon,className:"!text-[18px]"}),w.title]}):f.jsxs(q,{href:w.link,children:[w.icon&&f.jsx(U,{name:w.icon,className:"!text-[18px]"}),w.title]})},w.id))||null}),f.jsx("div",{className:"block lg:hidden ml-6",children:f.jsxs($e,{children:[f.jsx(Fe,{asChild:!0,children:f.jsx(G,{variant:"outline",size:"icon",children:f.jsx(Me,{})})}),f.jsx(Ve,{className:"w-fit",side:"right",align:"start",children:f.jsx(Pe,{className:"grid gap-2",children:e.props.header.actions.map(w=>f.jsx(G,{asChild:!0,variant:"outline",children:f.jsxs("a",{href:w.link,target:"_blank",children:[f.jsx(U,{name:w.icon,className:"!text-[18px]"}),w.title]})},w.id))||null})})]})})]})]}),f.jsx(gn,{columns:W,data:o.data,searchValue:r,searchTxt:e.props.header.searchBtn,notFoundContent:e.props.header.notFoundContent,globalSearch:s,onGlobalSearch:H,handleSearch:T}),f.jsxs("div",{className:"mt-4 flex flex-wrap justify-center md:justify-between gap-4 items-end",children:[f.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-1 gap-4 items-center justify-items-center md:justify-items-normal",children:[f.jsxs("p",{className:"text-sm text-foreground/70",children:["Show ",v.from," - ",v.to," of ",v.total]}),f.jsx("div",{className:"max-w-fit",children:f.jsxs(rt,{onValueChange:w=>$(w),value:d,children:[f.jsx(it,{className:"w-full cursor-pointer",children:f.jsx(st,{placeholder:d})}),f.jsx(lt,{children:["5","10","50"].map(w=>f.jsx(ut,{value:w,children:w},w))})]})})]}),f.jsx("div",{children:o.data.length>0&&f.jsx(ft,{pagination:v,pageChange:y,currentPage:u})})]})]})]})};export{Rn as default};
|
package/assets/manifest.json
CHANGED
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
]
|
|
359
359
|
},
|
|
360
360
|
"src/assets/js/components/list-table.tsx": {
|
|
361
|
-
"file": "list-table-
|
|
361
|
+
"file": "list-table-Do8_doRe.js",
|
|
362
362
|
"name": "list-table",
|
|
363
363
|
"src": "src/assets/js/components/list-table.tsx",
|
|
364
364
|
"isDynamicEntry": true,
|
|
@@ -690,7 +690,7 @@
|
|
|
690
690
|
]
|
|
691
691
|
},
|
|
692
692
|
"src/assets/js/pages/home.tsx": {
|
|
693
|
-
"file": "home-
|
|
693
|
+
"file": "home-BZQ-WlHq.js",
|
|
694
694
|
"name": "home",
|
|
695
695
|
"src": "src/assets/js/pages/home.tsx",
|
|
696
696
|
"isDynamicEntry": true,
|
|
@@ -747,7 +747,7 @@
|
|
|
747
747
|
]
|
|
748
748
|
},
|
|
749
749
|
"src/assets/js/pages/list.tsx": {
|
|
750
|
-
"file": "list-
|
|
750
|
+
"file": "list-DxFdOkRH.js",
|
|
751
751
|
"name": "list",
|
|
752
752
|
"src": "src/assets/js/pages/list.tsx",
|
|
753
753
|
"isDynamicEntry": true,
|
|
@@ -44,17 +44,17 @@ export class AccessRightsHelper {
|
|
|
44
44
|
return tokens.some((token) => this.hasPermission(token, user));
|
|
45
45
|
}
|
|
46
46
|
hasPermission(tokenId, user) {
|
|
47
|
-
if (!tokenId) {
|
|
48
|
-
Adminizer.log.warn(`AccessRightsHelper > hasPermission no tokenId: ${tokenId}`);
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
tokenId = tokenId.toLowerCase();
|
|
52
47
|
if (!this.adminizer.config.auth.enable) {
|
|
53
48
|
return true;
|
|
54
49
|
}
|
|
55
50
|
if (user.isAdministrator) {
|
|
56
51
|
return true;
|
|
57
52
|
}
|
|
53
|
+
tokenId = tokenId.toLowerCase();
|
|
54
|
+
if (!tokenId) {
|
|
55
|
+
Adminizer.log.warn(`AccessRightsHelper > hasPermission no tokenId: ${tokenId}`);
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
58
|
const tokenIsValid = this._tokens.some((token) => token.id === tokenId);
|
|
59
59
|
if (!tokenIsValid) {
|
|
60
60
|
Adminizer.log.error("Adminpanel > Token is not valid", tokenId, user.login);
|
|
@@ -21,7 +21,7 @@ export declare class ConfigHelper {
|
|
|
21
21
|
* Get configured `identifierField` from adminpanel configuration.
|
|
22
22
|
*
|
|
23
23
|
* If not configured and model passed try to guess it using `primaryKey` field in model.
|
|
24
|
-
* If system couldn't guess will return 'id
|
|
24
|
+
* If system couldn't guess will return 'id'.
|
|
25
25
|
* Model could be object or just name (string).
|
|
26
26
|
*
|
|
27
27
|
* **Warning** If you will pass record - method will return 'id'
|
|
@@ -46,4 +46,12 @@ export declare class ConfigHelper {
|
|
|
46
46
|
* @returns Normalized field configuration or `false` if the field should be hidden
|
|
47
47
|
*/
|
|
48
48
|
normalizeFieldConfig(adminizer: Adminizer, config: string | boolean | BaseFieldConfig, key: string, modelField: Attribute): false | BaseFieldConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Normalizes the entire adminpanel configuration.
|
|
51
|
+
* Merges custom config with default config and handles normalization.
|
|
52
|
+
*
|
|
53
|
+
* @param config The custom config object
|
|
54
|
+
* @returns The normalized and merged config
|
|
55
|
+
*/
|
|
56
|
+
static normalizeConfig(config: AdminpanelConfig): AdminpanelConfig;
|
|
49
57
|
}
|
package/helpers/configHelper.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getDefaultConfig } from "../system/defaults.js";
|
|
1
2
|
export class ConfigHelper {
|
|
2
3
|
adminizer;
|
|
3
4
|
constructor(adminizer) {
|
|
@@ -20,7 +21,7 @@ export class ConfigHelper {
|
|
|
20
21
|
* Get configured `identifierField` from adminpanel configuration.
|
|
21
22
|
*
|
|
22
23
|
* If not configured and model passed try to guess it using `primaryKey` field in model.
|
|
23
|
-
* If system couldn't guess will return 'id
|
|
24
|
+
* If system couldn't guess will return 'id'.
|
|
24
25
|
* Model could be object or just name (string).
|
|
25
26
|
*
|
|
26
27
|
* **Warning** If you will pass record - method will return 'id'
|
|
@@ -115,6 +116,40 @@ export class ConfigHelper {
|
|
|
115
116
|
}
|
|
116
117
|
return false;
|
|
117
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Normalizes the entire adminpanel configuration.
|
|
121
|
+
* Merges custom config with default config and handles normalization.
|
|
122
|
+
*
|
|
123
|
+
* @param config The custom config object
|
|
124
|
+
* @returns The normalized and merged config
|
|
125
|
+
*/
|
|
126
|
+
static normalizeConfig(config) {
|
|
127
|
+
const defaultConfig = getDefaultConfig();
|
|
128
|
+
const { forms: configForms = {}, ...restConfig } = config;
|
|
129
|
+
const { forms: defaultForms = {}, } = defaultConfig;
|
|
130
|
+
const mergedConfig = {
|
|
131
|
+
...defaultConfig,
|
|
132
|
+
...restConfig,
|
|
133
|
+
models: {
|
|
134
|
+
...defaultConfig.models,
|
|
135
|
+
...config.models
|
|
136
|
+
},
|
|
137
|
+
forms: {
|
|
138
|
+
path: configForms.path ?? defaultForms.path,
|
|
139
|
+
data: {
|
|
140
|
+
...defaultForms.data,
|
|
141
|
+
...configForms.data
|
|
142
|
+
},
|
|
143
|
+
get: configForms.get ?? defaultForms.get,
|
|
144
|
+
set: configForms.set ?? defaultForms.set
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
// Normalize auth config if it's a boolean
|
|
148
|
+
if (typeof mergedConfig.auth === 'boolean') {
|
|
149
|
+
mergedConfig.auth = { enable: mergedConfig.auth };
|
|
150
|
+
}
|
|
151
|
+
return mergedConfig;
|
|
152
|
+
}
|
|
118
153
|
}
|
|
119
154
|
/**
|
|
120
155
|
* function to determine the display field for associations.
|
package/lib/Adminizer.js
CHANGED
|
@@ -157,27 +157,8 @@ export class Adminizer {
|
|
|
157
157
|
if (this.config && Object.keys(this.config).length > 0) {
|
|
158
158
|
throw new Error("Config has already been initialized");
|
|
159
159
|
}
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
const { forms: configForms = {}, ...restConfig } = config;
|
|
163
|
-
const { forms: defaultForms = {}, } = defaultConfig;
|
|
164
|
-
this.config = {
|
|
165
|
-
...defaultConfig,
|
|
166
|
-
...restConfig,
|
|
167
|
-
models: {
|
|
168
|
-
...defaultConfig.models,
|
|
169
|
-
...config.models
|
|
170
|
-
},
|
|
171
|
-
forms: {
|
|
172
|
-
path: configForms.path ?? defaultForms.path,
|
|
173
|
-
data: {
|
|
174
|
-
...defaultForms.data,
|
|
175
|
-
...configForms.data
|
|
176
|
-
},
|
|
177
|
-
get: configForms.get ?? defaultForms.get,
|
|
178
|
-
set: configForms.set ?? defaultForms.set
|
|
179
|
-
}
|
|
180
|
-
};
|
|
160
|
+
// Normalize and merge config
|
|
161
|
+
this.config = ConfigHelper.normalizeConfig(config);
|
|
181
162
|
// Bind cors
|
|
182
163
|
bindCors(this);
|
|
183
164
|
// set cookie parser
|