All Downloads are FREE. Search and download functionalities are using the official Maven repository.

admin.assets.index-nJVnxftO.js Maven / Gradle / Ivy

import{a as qe,N as Ge,b as Ke}from"./search-form.vue_vue_type_script_setup_true_lang-Csk6aNWf.js";import{d as W,al as f,aW as Ye,aX as Je,bt as Xe,bu as Ze,aY as Qe,bv as et,aZ as tt,bw as rt,bx as at,by as lt,bz as ne,b2 as ot,B as J,bA as nt,bB as st,bC as it,bD as dt,r as q,bE as ut,bF as ct,bG as fe,D as me,b8 as ft,b6 as pt,b5 as re,a as R,b0 as N,bk as G,bp as M,bj as Y,bH as mt,b1 as ye,b4 as se,b3 as ht,bq as E,bI as gt,bJ as bt,bK as vt,bb as ue,bl as xt,b7 as _t,Z as ae,a0 as he,z as St,A as ge,$ as g,p as Ct,i as yt,q as wt,o as F,c as B,w as _,f as d,g as j,t as K,h as l,b as le,a1 as pe,a6 as kt,a3 as oe,ai as te,bL as Rt,ab as we,bM as Tt,J as be,bN as zt,E as Pt,H as $t,I as Dt,Y as X,ac as Ft,bO as ke,e as Ot,l as Lt,L as Mt,ag as Vt,ah as Z,bP as Nt,aj as ve,bQ as Ut,bR as At,F as Bt,ak as It}from"./index-D2gfy4BV.js";import{_ as Ht,u as Et,a as jt}from"./table-CBd8wgyy.js";import{h as Wt}from"./group-CHo9Y09B.js";import{_ as qt,a as Gt,b as Kt}from"./Grid-DUVCwFN_.js";import{_ as Yt,a as Jt}from"./DescriptionsItem-LCBYJ9Xx.js";import{_ as Xt}from"./text-3T_RJBzJ.js";const Zt=W({name:"Search",render(){return f("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",style:"enable-background: new 0 0 512 512"},f("path",{d:`M443.5,420.2L336.7,312.4c20.9-26.2,33.5-59.4,33.5-95.5c0-84.5-68.5-153-153.1-153S64,132.5,64,217s68.5,153,153.1,153
  c36.6,0,70.1-12.8,96.5-34.2l106.1,107.1c3.2,3.4,7.6,5.1,11.9,5.1c4.1,0,8.2-1.5,11.3-4.5C449.5,437.2,449.7,426.8,443.5,420.2z
   M217.1,337.1c-32.1,0-62.3-12.5-85-35.2c-22.7-22.7-35.2-52.9-35.2-84.9c0-32.1,12.5-62.3,35.2-84.9c22.7-22.7,52.9-35.2,85-35.2
  c32.1,0,62.3,12.5,85,35.2c22.7,22.7,35.2,52.9,35.2,84.9c0,32.1-12.5,62.3-35.2,84.9C279.4,324.6,249.2,337.1,217.1,337.1z`}))}}),Qt=e=>{const{fontWeight:a,fontSizeLarge:t,fontSizeMedium:n,fontSizeSmall:o,heightLarge:s,heightMedium:m,borderRadius:r,cardColor:u,tableHeaderColor:b,textColor1:w,textColorDisabled:y,textColor2:V,textColor3:v,borderColor:O,hoverColor:P,closeColorHover:L,closeColorPressed:$,closeIconColor:D,closeIconColorHover:U,closeIconColorPressed:i}=e;return Object.assign(Object.assign({},rt),{itemHeightSmall:m,itemHeightMedium:m,itemHeightLarge:s,fontSizeSmall:o,fontSizeMedium:n,fontSizeLarge:t,borderRadius:r,dividerColor:O,borderColor:O,listColor:u,headerColor:at(u,b),titleTextColor:w,titleTextColorDisabled:y,extraTextColor:v,extraTextColorDisabled:y,itemTextColor:V,itemTextColorDisabled:y,itemColorPending:P,titleFontWeight:a,closeColorHover:L,closeColorPressed:$,closeIconColor:D,closeIconColorHover:U,closeIconColorPressed:i})},er=Ye({name:"Transfer",common:Je,peers:{Checkbox:Xe,Scrollbar:Ze,Input:Qe,Empty:et,Button:tt},self:Qt}),Q=lt("n-transfer"),xe=W({name:"TransferHeader",props:{size:{type:String,required:!0},selectAllText:String,clearText:String,source:Boolean,onCheckedAll:Function,onClearAll:Function,title:String},setup(e){const{targetOptionsRef:a,canNotSelectAnythingRef:t,canBeClearedRef:n,allCheckedRef:o,mergedThemeRef:s,disabledRef:m,mergedClsPrefixRef:r,srcOptionsLengthRef:u}=ne(Q),{localeRef:b}=ot("Transfer");return()=>{const{source:w,onClearAll:y,onCheckedAll:V,selectAllText:v,clearText:O}=e,{value:P}=s,{value:L}=r,{value:$}=b,D=e.size==="large"?"small":"tiny",{title:U}=e;return f("div",{class:`${L}-transfer-list-header`},U&&f("div",{class:`${L}-transfer-list-header__title`},U),w&&f(J,{class:`${L}-transfer-list-header__button`,theme:P.peers.Button,themeOverrides:P.peerOverrides.Button,size:D,tertiary:!0,onClick:o.value?y:V,disabled:t.value||m.value},{default:()=>o.value?O||$.unselectAll:v||$.selectAll}),!w&&n.value&&f(J,{class:`${L}-transfer-list-header__button`,theme:P.peers.Button,themeOverrides:P.peerOverrides.Button,size:D,tertiary:!0,onClick:y,disabled:m.value},{default:()=>$.clearAll}),f("div",{class:`${L}-transfer-list-header__extra`},w?$.total(u.value):$.selected(a.value.length)))}}}),_e=W({name:"NTransferListItem",props:{source:Boolean,label:{type:String,required:!0},value:{type:[String,Number],required:!0},disabled:Boolean,option:{type:Object,required:!0}},setup(e){const{targetValueSetRef:a,mergedClsPrefixRef:t,mergedThemeRef:n,handleItemCheck:o,renderSourceLabelRef:s,renderTargetLabelRef:m,showSelectedRef:r}=ne(Q),u=nt(()=>a.value.has(e.value));function b(){e.disabled||o(!u.value,e.value)}return{mergedClsPrefix:t,mergedTheme:n,checked:u,showSelected:r,renderSourceLabel:s,renderTargetLabel:m,handleClick:b}},render(){const{disabled:e,mergedTheme:a,mergedClsPrefix:t,label:n,checked:o,source:s,renderSourceLabel:m,renderTargetLabel:r}=this;return f("div",{class:[`${t}-transfer-list-item`,e&&`${t}-transfer-list-item--disabled`,s?`${t}-transfer-list-item--source`:`${t}-transfer-list-item--target`],onClick:s?this.handleClick:void 0},f("div",{class:`${t}-transfer-list-item__background`}),s&&this.showSelected&&f("div",{class:`${t}-transfer-list-item__checkbox`},f(dt,{theme:a.peers.Checkbox,themeOverrides:a.peerOverrides.Checkbox,disabled:e,checked:o})),f("div",{class:`${t}-transfer-list-item__label`,title:it(n)},s?m?m({option:this.option}):n:r?r({option:this.option}):n),!s&&!e&&f(st,{focusable:!1,class:`${t}-transfer-list-item__close`,clsPrefix:t,onClick:this.handleClick}))}}),Se=W({name:"TransferList",props:{virtualScroll:{type:Boolean,required:!0},itemSize:{type:Number,required:!0},options:{type:Array,required:!0},disabled:{type:Boolean,required:!0},source:Boolean},setup(){const{mergedThemeRef:e,mergedClsPrefixRef:a}=ne(Q),t=q(null),n=q(null);function o(){var r;(r=t.value)===null||r===void 0||r.sync()}function s(){const{value:r}=n;if(!r)return null;const{listElRef:u}=r;return u}function m(){const{value:r}=n;if(!r)return null;const{itemsElRef:u}=r;return u}return{mergedTheme:e,mergedClsPrefix:a,scrollerInstRef:t,vlInstRef:n,syncVLScroller:o,scrollContainer:s,scrollContent:m}},render(){const{mergedTheme:e,options:a}=this;if(a.length===0)return f(ut,{theme:e.peers.Empty,themeOverrides:e.peerOverrides.Empty});const{mergedClsPrefix:t,virtualScroll:n,source:o,disabled:s,syncVLScroller:m}=this;return f(fe,{ref:"scrollerInstRef",theme:e.peers.Scrollbar,themeOverrides:e.peerOverrides.Scrollbar,container:n?this.scrollContainer:void 0,content:n?this.scrollContent:void 0},{default:()=>n?f(ct,{ref:"vlInstRef",style:{height:"100%"},class:`${t}-transfer-list-content`,items:this.options,itemSize:this.itemSize,showScrollbar:!1,onResize:m,onScroll:m,keyField:"value"},{default:({item:r})=>{const{source:u,disabled:b}=this;return f(_e,{source:u,key:r.value,value:r.value,disabled:r.disabled||b,label:r.label,option:r})}}):f("div",{class:`${t}-transfer-list-content`},a.map(r=>f(_e,{source:o,key:r.value,value:r.value,disabled:r.disabled||s,label:r.label,option:r})))})}}),Ce=W({name:"TransferFilter",props:{value:String,placeholder:String,disabled:Boolean,onUpdateValue:{type:Function,required:!0}},setup(){const{mergedThemeRef:e,mergedClsPrefixRef:a}=ne(Q);return{mergedClsPrefix:a,mergedTheme:e}},render(){const{mergedTheme:e,mergedClsPrefix:a}=this;return f("div",{class:`${a}-transfer-filter`},f(me,{value:this.value,onUpdateValue:this.onUpdateValue,disabled:this.disabled,placeholder:this.placeholder,theme:e.peers.Input,themeOverrides:e.peerOverrides.Input,clearable:!0,size:"small"},{"clear-icon-placeholder":()=>f(ft,{clsPrefix:a},{default:()=>f(Zt,null)})}))}});function tr(e){const a=q(e.defaultValue),t=pt(re(e,"value"),a),n=R(()=>{const i=new Map;return(e.options||[]).forEach(x=>i.set(x.value,x)),i}),o=R(()=>new Set(t.value||[])),s=R(()=>{const i=n.value,x=[];return(t.value||[]).forEach(C=>{const p=i.get(C);p&&x.push(p)}),x}),m=q(""),r=q(""),u=R(()=>e.sourceFilterable||!!e.filterable),b=R(()=>{const{showSelected:i,options:x,filter:C}=e;return u.value?x.filter(p=>C(m.value,p,"source")&&(i||!o.value.has(p.value))):i?x:x.filter(p=>!o.value.has(p.value))}),w=R(()=>{if(!e.targetFilterable)return s.value;const{filter:i}=e;return s.value.filter(x=>i(r.value,x,"target"))}),y=R(()=>{const{value:i}=t;return i===null?new Set:new Set(i)}),V=R(()=>{const i=new Set(y.value);return b.value.forEach(x=>{!x.disabled&&!i.has(x.value)&&i.add(x.value)}),i}),v=R(()=>{const i=new Set(y.value);return b.value.forEach(x=>{!x.disabled&&i.has(x.value)&&i.delete(x.value)}),i}),O=R(()=>{const i=new Set(y.value);return w.value.forEach(x=>{x.disabled||i.delete(x.value)}),i}),P=R(()=>b.value.every(i=>i.disabled)),L=R(()=>{if(!b.value.length)return!1;const i=y.value;return b.value.every(x=>x.disabled||i.has(x.value))}),$=R(()=>w.value.some(i=>!i.disabled));function D(i){m.value=i??""}function U(i){r.value=i??""}return{uncontrolledValueRef:a,mergedValueRef:t,targetValueSetRef:o,valueSetForCheckAllRef:V,valueSetForUncheckAllRef:v,valueSetForClearRef:O,filteredTgtOptionsRef:w,filteredSrcOptionsRef:b,targetOptionsRef:s,canNotSelectAnythingRef:P,canBeClearedRef:$,allCheckedRef:L,srcPatternRef:m,tgtPatternRef:r,mergedSrcFilterableRef:u,handleSrcFilterUpdateValue:D,handleTgtFilterUpdateValue:U}}const rr=N("transfer",`
 width: 100%;
 font-size: var(--n-font-size);
 height: 300px;
 display: flex;
 flex-wrap: nowrap;
 word-break: break-word;
`,[G("disabled",[N("transfer-list",[N("transfer-list-header",[M("title",`
 color: var(--n-header-text-color-disabled);
 `),M("extra",`
 color: var(--n-header-extra-text-color-disabled);
 `)])])]),N("transfer-list",`
 flex: 1;
 min-width: 0;
 height: inherit;
 display: flex;
 flex-direction: column;
 background-clip: padding-box;
 position: relative;
 transition: background-color .3s var(--n-bezier);
 background-color: var(--n-list-color);
 `,[G("source",`
 border-top-left-radius: var(--n-border-radius);
 border-bottom-left-radius: var(--n-border-radius);
 `,[M("border","border-right: 1px solid var(--n-divider-color);")]),G("target",`
 border-top-right-radius: var(--n-border-radius);
 border-bottom-right-radius: var(--n-border-radius);
 `,[M("border","border-left: none;")]),M("border",`
 padding: 0 12px;
 border: 1px solid var(--n-border-color);
 transition: border-color .3s var(--n-bezier);
 pointer-events: none;
 border-radius: inherit;
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 `),N("transfer-list-header",`
 min-height: var(--n-header-height);
 box-sizing: border-box;
 display: flex;
 padding: 12px 12px 10px 12px;
 align-items: center;
 background-clip: padding-box;
 border-radius: inherit;
 border-bottom-left-radius: 0;
 border-bottom-right-radius: 0;
 line-height: 1.5;
 transition:
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 `,[Y("> *:not(:first-child)",`
 margin-left: 8px;
 `),M("title",`
 flex: 1;
 min-width: 0;
 line-height: 1.5;
 font-size: var(--n-header-font-size);
 font-weight: var(--n-header-font-weight);
 transition: color .3s var(--n-bezier);
 color: var(--n-header-text-color);
 `),M("button",`
 position: relative;
 `),M("extra",`
 transition: color .3s var(--n-bezier);
 font-size: var(--n-extra-font-size);
 margin-right: 0;
 white-space: nowrap;
 color: var(--n-header-extra-text-color);
 `)]),N("transfer-list-body",`
 flex-basis: 0;
 flex-grow: 1;
 box-sizing: border-box;
 position: relative;
 display: flex;
 flex-direction: column;
 border-radius: inherit;
 border-top-left-radius: 0;
 border-top-right-radius: 0;
 `,[N("transfer-filter",`
 padding: 4px 12px 8px 12px;
 box-sizing: border-box;
 transition:
 border-color .3s var(--n-bezier),
 background-color .3s var(--n-bezier);
 `),N("transfer-list-flex-container",`
 flex: 1;
 position: relative;
 `,[N("scrollbar",`
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 height: unset;
 `),N("empty",`
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translateY(-50%) translateX(-50%);
 `),N("transfer-list-content",`
 padding: 0;
 margin: 0;
 position: relative;
 `,[N("transfer-list-item",`
 padding: 0 12px;
 min-height: var(--n-item-height);
 display: flex;
 align-items: center;
 color: var(--n-item-text-color);
 position: relative;
 transition: color .3s var(--n-bezier);
 `,[M("background",`
 position: absolute;
 left: 4px;
 right: 4px;
 top: 0;
 bottom: 0;
 border-radius: var(--n-border-radius);
 transition: background-color .3s var(--n-bezier);
 `),M("checkbox",`
 position: relative;
 margin-right: 8px;
 `),M("close",`
 opacity: 0;
 pointer-events: none;
 position: relative;
 transition:
 opacity .3s var(--n-bezier),
 background-color .3s var(--n-bezier),
 color .3s var(--n-bezier);
 `),M("label",`
 position: relative;
 min-width: 0;
 flex-grow: 1;
 `),G("source","cursor: pointer;"),G("disabled",`
 cursor: not-allowed;
 color: var(--n-item-text-color-disabled);
 `),mt("disabled",[Y("&:hover",[M("background","background-color: var(--n-item-color-pending);"),M("close",`
 opacity: 1;
 pointer-events: all;
 `)])])])])])])])]),ar=Object.assign(Object.assign({},se.props),{value:Array,defaultValue:{type:Array,default:null},options:{type:Array,default:()=>[]},disabled:{type:Boolean,default:void 0},virtualScroll:Boolean,sourceTitle:String,selectAllText:String,clearText:String,targetTitle:String,filterable:{type:Boolean,default:void 0},sourceFilterable:Boolean,targetFilterable:Boolean,showSelected:{type:Boolean,default:!0},sourceFilterPlaceholder:String,targetFilterPlaceholder:String,filter:{type:Function,default:(e,a)=>e?~(""+a.label).toLowerCase().indexOf((""+e).toLowerCase()):!0},size:String,renderSourceLabel:Function,renderTargetLabel:Function,renderSourceList:Function,renderTargetList:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]}),lr=W({name:"Transfer",props:ar,setup(e){const{mergedClsPrefixRef:a}=ye(e),t=se("Transfer","-transfer",rr,er,e,a),n=ht(e),{mergedSizeRef:o,mergedDisabledRef:s}=n,m=R(()=>{const{value:T}=o,{self:{[E("itemHeight",T)]:A}}=t.value;return gt(A)}),{uncontrolledValueRef:r,mergedValueRef:u,targetValueSetRef:b,valueSetForCheckAllRef:w,valueSetForUncheckAllRef:y,valueSetForClearRef:V,filteredTgtOptionsRef:v,filteredSrcOptionsRef:O,targetOptionsRef:P,canNotSelectAnythingRef:L,canBeClearedRef:$,allCheckedRef:D,srcPatternRef:U,tgtPatternRef:i,mergedSrcFilterableRef:x,handleSrcFilterUpdateValue:C,handleTgtFilterUpdateValue:p}=tr(e);function c(T){const{onUpdateValue:A,"onUpdate:value":S,onChange:ee}=e,{nTriggerFormInput:ie,nTriggerFormChange:de}=n;A&&ue(A,T),S&&ue(S,T),ee&&ue(ee,T),r.value=T,ie(),de()}function h(){c([...w.value])}function k(){c([...y.value])}function I(){c([...V.value])}function H(T,A){c(T?(u.value||[]).concat(A):(u.value||[]).filter(S=>S!==A))}function z(T){c(T)}return bt(Q,{targetValueSetRef:b,mergedClsPrefixRef:a,disabledRef:s,mergedThemeRef:t,targetOptionsRef:P,canNotSelectAnythingRef:L,canBeClearedRef:$,allCheckedRef:D,srcOptionsLengthRef:R(()=>e.options.length),handleItemCheck:H,renderSourceLabelRef:re(e,"renderSourceLabel"),renderTargetLabelRef:re(e,"renderTargetLabel"),showSelectedRef:re(e,"showSelected")}),{mergedClsPrefix:a,mergedDisabled:s,itemSize:m,isMounted:vt(),mergedTheme:t,filteredSrcOpts:O,filteredTgtOpts:v,srcPattern:U,tgtPattern:i,mergedSize:o,mergedSrcFilterable:x,handleSrcFilterUpdateValue:C,handleTgtFilterUpdateValue:p,handleSourceCheckAll:h,handleSourceUncheckAll:k,handleTargetClearAll:I,handleItemCheck:H,handleChecked:z,cssVars:R(()=>{const{value:T}=o,{common:{cubicBezierEaseInOut:A},self:{borderRadius:S,borderColor:ee,listColor:ie,titleTextColor:de,titleTextColorDisabled:Re,extraTextColor:Te,itemTextColor:ze,itemColorPending:Pe,itemTextColorDisabled:$e,titleFontWeight:De,closeColorHover:Fe,closeColorPressed:Oe,closeIconColor:Le,closeIconColorHover:Me,closeIconColorPressed:Ve,closeIconSize:Ne,closeSize:Ue,dividerColor:Ae,extraTextColorDisabled:Be,[E("extraFontSize",T)]:Ie,[E("fontSize",T)]:He,[E("titleFontSize",T)]:Ee,[E("itemHeight",T)]:je,[E("headerHeight",T)]:We}}=t.value;return{"--n-bezier":A,"--n-border-color":ee,"--n-border-radius":S,"--n-extra-font-size":Ie,"--n-font-size":He,"--n-header-font-size":Ee,"--n-header-extra-text-color":Te,"--n-header-extra-text-color-disabled":Be,"--n-header-font-weight":De,"--n-header-text-color":de,"--n-header-text-color-disabled":Re,"--n-item-color-pending":Pe,"--n-item-height":je,"--n-item-text-color":ze,"--n-item-text-color-disabled":$e,"--n-list-color":ie,"--n-header-height":We,"--n-close-size":Ue,"--n-close-icon-size":Ne,"--n-close-color-hover":Fe,"--n-close-color-pressed":Oe,"--n-close-icon-color":Le,"--n-close-icon-color-hover":Me,"--n-close-icon-color-pressed":Ve,"--n-divider-color":Ae}})}},render(){const{mergedClsPrefix:e,renderSourceList:a,renderTargetList:t,mergedTheme:n,mergedSrcFilterable:o,targetFilterable:s}=this;return f("div",{class:[`${e}-transfer`,this.mergedDisabled&&`${e}-transfer--disabled`],style:this.cssVars},f("div",{class:`${e}-transfer-list ${e}-transfer-list--source`},f(xe,{source:!0,selectAllText:this.selectAllText,clearText:this.clearText,title:this.sourceTitle,onCheckedAll:this.handleSourceCheckAll,onClearAll:this.handleSourceUncheckAll,size:this.mergedSize}),f("div",{class:`${e}-transfer-list-body`},o?f(Ce,{onUpdateValue:this.handleSrcFilterUpdateValue,value:this.srcPattern,disabled:this.mergedDisabled,placeholder:this.sourceFilterPlaceholder}):null,f("div",{class:`${e}-transfer-list-flex-container`},a?f(fe,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar},{default:()=>a({onCheck:this.handleChecked,checkedOptions:this.filteredTgtOpts,pattern:this.srcPattern})}):f(Se,{source:!0,options:this.filteredSrcOpts,disabled:this.mergedDisabled,virtualScroll:this.virtualScroll,itemSize:this.itemSize}))),f("div",{class:`${e}-transfer-list__border`})),f("div",{class:`${e}-transfer-list ${e}-transfer-list--target`},f(xe,{onClearAll:this.handleTargetClearAll,size:this.mergedSize,title:this.targetTitle}),f("div",{class:`${e}-transfer-list-body`},s?f(Ce,{onUpdateValue:this.handleTgtFilterUpdateValue,value:this.tgtPattern,disabled:this.mergedDisabled,placeholder:this.sourceFilterPlaceholder}):null,f("div",{class:`${e}-transfer-list-flex-container`},t?f(fe,{theme:n.peers.Scrollbar,themeOverrides:n.peerOverrides.Scrollbar},{default:()=>t({onCheck:this.handleChecked,checkedOptions:this.filteredTgtOpts,pattern:this.tgtPattern})}):f(Se,{options:this.filteredTgtOpts,disabled:this.mergedDisabled,virtualScroll:this.virtualScroll,itemSize:this.itemSize}))),f("div",{class:`${e}-transfer-list__border`})))}}),or=N("h",`
 font-size: var(--n-font-size);
 font-weight: var(--n-font-weight);
 margin: var(--n-margin);
 transition: color .3s var(--n-bezier);
 color: var(--n-text-color);
`,[Y("&:first-child",{marginTop:0}),G("prefix-bar",{position:"relative",paddingLeft:"var(--n-prefix-width)"},[G("align-text",{paddingLeft:0},[Y("&::before",{left:"calc(-1 * var(--n-prefix-width))"})]),Y("&::before",`
 content: "";
 width: var(--n-bar-width);
 border-radius: calc(var(--n-bar-width) / 2);
 transition: background-color .3s var(--n-bezier);
 left: 0;
 top: 0;
 bottom: 0;
 position: absolute;
 `),Y("&::before",{backgroundColor:"var(--n-bar-color)"})])]),nr=Object.assign(Object.assign({},se.props),{type:{type:String,default:"default"},prefix:String,alignText:Boolean}),sr=e=>W({name:`H${e}`,props:nr,setup(a){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=ye(a),o=se("Typography","-h",or,xt,a,t),s=R(()=>{const{type:r}=a,{common:{cubicBezierEaseInOut:u},self:{headerFontWeight:b,headerTextColor:w,[E("headerPrefixWidth",e)]:y,[E("headerFontSize",e)]:V,[E("headerMargin",e)]:v,[E("headerBarWidth",e)]:O,[E("headerBarColor",r)]:P}}=o.value;return{"--n-bezier":u,"--n-font-size":V,"--n-margin":v,"--n-bar-color":P,"--n-bar-width":O,"--n-font-weight":b,"--n-text-color":w,"--n-prefix-width":y}}),m=n?_t(`h${e}`,R(()=>a.type[0]),s,a):void 0;return{mergedClsPrefix:t,cssVars:n?void 0:s,themeClass:m==null?void 0:m.themeClass,onRender:m==null?void 0:m.onRender}},render(){var a;const{prefix:t,alignText:n,mergedClsPrefix:o,cssVars:s,$slots:m}=this;return(a=this.onRender)===null||a===void 0||a.call(this),f(`h${e}`,{class:[`${o}-h`,`${o}-h${e}`,this.themeClass,{[`${o}-h--prefix-bar`]:t,[`${o}-h--align-text`]:n}],style:s},m)}}),ir=sr("5"),dr=W({name:"UserManagerOperateDrawer",__name:"user-manager-operate-drawer",props:ae({operateType:{},rowData:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:ae(["submitted"],["update:visible"]),setup(e,{emit:a}){const t=q(),n=q(),o=q(0),s=e,m=a,r=he(e,"visible"),{formRef:u,validate:b,restoreValidation:w}=St(),{defaultRequiredRule:y}=ge(),V=R(()=>({add:g("page.userManager.addUser"),edit:g("page.userManager.editUser")})[s.operateType]),v=Ct(O());function O(){return{username:"",password:"",checkPassword:"",role:1,permissions:[]}}const P=R(()=>{const{formRules:C,createConfirmPwdRule:p}=ge();return{username:[y],password:C.pwd,checkPassword:p(v.password),role:[y],permissions:[y]}});function L(){var C;if(s.operateType==="add"){t.value=[],o.value=1,Object.assign(v,O());return}s.operateType==="edit"&&s.rowData&&(o.value=0,t.value=(C=s.rowData.permissions)==null?void 0:C.map(p=>`${p.groupName}@${p.namespaceId}`),Object.assign(v,s.rowData))}function $(){r.value=!1}async function D(){var C,p;if(await b(),s.operateType==="add"){const{username:c,password:h,role:k,permissions:I}=v,{error:H}=await Tt({username:c,password:be(h),role:k,permissions:I});if(H)return;(C=window.$message)==null||C.success(g("common.addSuccess"))}if(s.operateType==="edit"){const{id:c,username:h,password:k,role:I,permissions:H}=v,{error:z}=await zt({id:c,username:h,password:o.value?be(k):null,role:I,permissions:H});if(z)return;(p=window.$message)==null||p.success(g("common.updateSuccess"))}$(),m("submitted")}const U=async()=>{var p;const C=await Wt([]);n.value=(p=C.data)==null?void 0:p.map(c=>({value:`${c.groupName}@${c.namespaceId}`,label:`${c.groupName}(${c.namespaceName})`}))};yt(()=>{U()}),wt(r,()=>{r.value&&(L(),w())});function i(C){return R(()=>{const[c,h]=C.split("@");return{groupName:c,namespaceId:h}}).value}function x(C){v.permissions=C==null?void 0:C.map(p=>i(p))}return(C,p)=>{const c=me,h=Pt,k=Gt,I=$t,H=qt,z=lr,T=Dt,A=J;return F(),B(we,{modelValue:r.value,"onUpdate:modelValue":p[6]||(p[6]=S=>r.value=S),title:V.value},{footer:_(()=>[d(I,{size:16},{default:_(()=>[d(A,{onClick:$},{default:_(()=>[j(K(l(g)("common.cancel")),1)]),_:1}),d(A,{type:"primary",onClick:D},{default:_(()=>[j(K(l(g)("common.save")),1)]),_:1})]),_:1})]),default:_(()=>[d(T,{ref_key:"formRef",ref:u,model:v,rules:P.value},{default:_(()=>[d(h,{label:l(g)("page.userManager.username"),path:"username"},{default:_(()=>[d(c,{value:v.username,"onUpdate:value":p[0]||(p[0]=S=>v.username=S),placeholder:l(g)("page.userManager.form.username")},null,8,["value","placeholder"])]),_:1},8,["label"]),s.operateType==="edit"?(F(),B(h,{key:0,label:l(g)("page.userManager.updatePassword")},{default:_(()=>[d(H,{value:o.value,"onUpdate:value":p[1]||(p[1]=S=>o.value=S)},{default:_(()=>[d(I,null,{default:_(()=>[(F(!0),le(oe,null,pe(l(kt),S=>(F(),B(k,{key:S.value,value:S.value,label:l(g)(S.label)},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])]),_:1},8,["label"])):te("",!0),o.value===1?(F(),B(h,{key:1,label:l(g)("page.userManager.password"),path:"password"},{default:_(()=>[d(c,{value:v.password,"onUpdate:value":p[2]||(p[2]=S=>v.password=S),type:"password","show-password-on":"click",placeholder:l(g)("page.userManager.form.password")},null,8,["value","placeholder"])]),_:1},8,["label"])):te("",!0),o.value===1?(F(),B(h,{key:2,label:l(g)("page.userManager.checkPassword"),path:"checkPassword"},{default:_(()=>[d(c,{value:v.checkPassword,"onUpdate:value":p[3]||(p[3]=S=>v.checkPassword=S),type:"password","show-password-on":"click",placeholder:l(g)("page.userManager.form.checkPassword")},null,8,["value","placeholder"])]),_:1},8,["label"])):te("",!0),d(h,{label:l(g)("page.userManager.role"),path:"role"},{default:_(()=>[d(H,{value:v.role,"onUpdate:value":p[4]||(p[4]=S=>v.role=S),name:"role"},{default:_(()=>[d(I,null,{default:_(()=>[(F(!0),le(oe,null,pe(l(Rt),S=>(F(),B(k,{key:S.value,value:S.value,label:l(g)(S.label),disabled:C.operateType==="edit"&&v.id=="1"},null,8,["value","label","disabled"]))),128))]),_:1})]),_:1},8,["value"])]),_:1},8,["label"]),v.role===1?(F(),B(h,{key:3,label:l(g)("page.userManager.permissions"),path:"permissions"},{default:_(()=>[d(z,{value:t.value,"onUpdate:value":p[5]||(p[5]=S=>t.value=S),"virtual-scroll":"",options:n.value,"target-filterable":"","source-filterable":"",onUpdateValue:x},null,8,["value","options"])]),_:1},8,["label"])):te("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"])}}}),ur=W({name:"UserCenterSearch",__name:"user-manager-search",props:{model:{required:!0},modelModifiers:{}},emits:ae(["reset","search"],["update:model"]),setup(e,{emit:a}){const t=a,n=he(e,"model");function o(){t("reset")}function s(){t("search")}return(m,r)=>{const u=me,b=Ht,w=qe;return F(),B(w,{model:n.value,onSearch:s,onReset:o},{default:_(()=>[d(b,{span:"24 s:12 m:6",label:l(g)("page.userManager.username"),path:"username",class:"pr-24px"},{default:_(()=>[d(u,{value:n.value.username,"onUpdate:value":r[0]||(r[0]=y=>n.value.username=y),placeholder:l(g)("page.userManager.form.username"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),cr={class:"title"},fr=W({name:"UserManagerDetailDrawer",__name:"user-manager-detail-drawer",props:ae({rowData:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(e){const a=he(e,"visible");return(t,n)=>{const o=Yt,s=Jt,m=we;return F(),B(m,{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=r=>a.value=r),title:l(g)("page.groupConfig.detail")},{default:_(()=>[d(s,{"label-placement":"top",bordered:"",column:2},{default:_(()=>{var r;return[d(o,{label:l(g)("page.userManager.username"),span:2},{default:_(()=>{var u;return[j(K((u=t.rowData)==null?void 0:u.username),1)]}),_:1},8,["label"]),d(o,{label:l(g)("page.userManager.role"),span:2},{default:_(()=>{var u;return[d(l(X),{type:l(Ft)((u=t.rowData)==null?void 0:u.role)},{default:_(()=>{var b;return[j(K(l(g)(l(ke)[(b=t.rowData)==null?void 0:b.role])),1)]}),_:1},8,["type"])]}),_:1},8,["label"]),((r=t.rowData)==null?void 0:r.permissions)!==void 0?(F(),B(o,{key:0,label:l(g)("page.userManager.permissionList"),span:2},{default:_(()=>{var u;return[(F(!0),le(oe,null,pe((u=t.rowData)==null?void 0:u.permissions,(b,w)=>(F(),B(l(X),{key:w,type:"info"},{default:_(()=>[Ot("span",cr,K(b.groupName),1),j(" ("+K(b.namespaceName)+") ",1)]),_:2},1024))),128))]}),_:1},8,["label"])):(F(),B(o,{key:1,label:l(g)("page.userManager.permissionList"),span:2},{default:_(()=>[d(l(X),{type:"info"},{default:_(()=>[j("ALL")]),_:1})]),_:1},8,["label"])),d(o,{label:l(g)("common.updateDt"),span:2},{default:_(()=>{var u;return[j(K((u=t.rowData)==null?void 0:u.updateDt),1)]}),_:1},8,["label"])]}),_:1})]),_:1},8,["modelValue","title"])}}}),pr=Lt(fr,[["__scopeId","data-v-0b6abe6f"]]),mr={class:"min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"};function ce(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!It(e)}const Cr=W({name:"user_manager",__name:"index",setup(e){const a=Mt(),t=q(),{bool:n,setTrue:o}=Vt(!1),{columns:s,columnChecks:m,data:r,getData:u,loading:b,mobilePagination:w,searchParams:y,resetSearchParams:V}=Et({apiFn:Nt,apiParams:{page:1,size:10,username:null},columns:()=>[{key:"permissions",align:"center",type:"expand",minWidth:36,renderExpand:c=>{var h;return d("div",null,[d(ir,{prefix:"bar",type:"warning"},{default:()=>[d(Xt,{type:"warning"},{default:()=>[g("page.userManager.permissionList"),j(":")]})]}),c.permissions?(h=c.permissions)==null?void 0:h.map(k=>d("span",null,[d(X,{type:"info"},{default:()=>[d("span",{style:"font-weight: bolder;"},[k.groupName]),j("("),k.namespaceName,j(")")]}),d(ve,{vertical:!0},null)])):d(X,{type:"info"},{default:()=>[j("ALL")]})])}},{type:"selection"},{key:"id",title:g("common.index"),align:"left",minWidth:50},{key:"username",title:g("page.userManager.username"),align:"left",minWidth:120,render:c=>{function h(){t.value=c||null,o()}return d(J,{text:!0,tag:"a",type:"primary",onClick:h,class:"ws-normal"},{default:()=>[c.username]})}},{key:"role",title:g("page.userManager.role"),align:"left",minWidth:50,render:c=>{if(c.role===null)return null;const h={1:"info",2:"warning"},k=g(ke[c.role]);return d(X,{type:h[c.role]},ce(k)?k:{default:()=>[k]})}},{key:"createDt",title:g("common.createDt"),align:"left",minWidth:50},{key:"updateDt",title:g("common.updateDt"),align:"left",minWidth:50},{key:"operate",title:g("common.operate"),align:"center",width:130,render:c=>{let h;return d("div",{class:"flex-center gap-8px"},[d(J,{type:"primary",ghost:!0,size:"small",text:!0,onClick:()=>p(c.id)},ce(h=g("common.edit"))?h:{default:()=>[h]}),c.id!==1?d(oe,null,[d(ve,{vertical:!0},null),d(Ge,{onPositiveClick:()=>x(c.id)},{default:()=>g("common.confirmDelete"),trigger:()=>{let k;return d(J,{type:"error",text:!0,ghost:!0,size:"small"},ce(k=g("common.delete"))?k:{default:()=>[k]})}})]):""])}}]}),{drawerVisible:v,operateType:O,editingData:P,handleAdd:L,handleEdit:$,checkedRowKeys:D,onDeleted:U,onBatchDeleted:i}=jt(r,u);async function x(c){const{error:h}=await Ut(c);h||U()}async function C(){const{error:c}=await At(D.value);c||i()}function p(c){$(c)}return(c,h)=>{const k=Ke,I=Kt,H=Bt;return F(),le("div",mr,[d(ur,{model:l(y),"onUpdate:model":h[0]||(h[0]=z=>Z(y)?y.value=z:null),onReset:l(V),onSearch:l(u)},null,8,["model","onReset","onSearch"]),d(H,{title:l(g)("page.userManager.title"),bordered:!1,size:"small",class:"sm:flex-1-hidden card-wrapper","header-class":"view-card-header"},{"header-extra":_(()=>[d(k,{columns:l(m),"onUpdate:columns":h[1]||(h[1]=z=>Z(m)?m.value=z:null),"disabled-delete":l(D).length===0,loading:l(b),onAdd:l(L),onDelete:C,onRefresh:l(u)},null,8,["columns","disabled-delete","loading","onAdd","onRefresh"])]),default:_(()=>[d(I,{"checked-row-keys":l(D),"onUpdate:checkedRowKeys":h[2]||(h[2]=z=>Z(D)?D.value=z:null),columns:l(s),data:l(r),"flex-height":!l(a).isMobile,"scroll-x":962,loading:l(b),remote:"","row-key":z=>z.id,pagination:l(w),class:"sm:h-full"},null,8,["checked-row-keys","columns","data","flex-height","loading","row-key","pagination"]),d(dr,{visible:l(v),"onUpdate:visible":h[3]||(h[3]=z=>Z(v)?v.value=z:null),"operate-type":l(O),"row-data":l(P),onSubmitted:l(u)},null,8,["visible","operate-type","row-data","onSubmitted"]),d(pr,{visible:l(n),"onUpdate:visible":h[4]||(h[4]=z=>Z(n)?n.value=z:null),"row-data":t.value},null,8,["visible","row-data"])]),_:1},8,["title"])])}}});export{Cr as default};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy