@ibiz-template/vue3-util 0.6.2-dev.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-badge{display:inline-block;padding:3px 6px;line-height:1rem;color:#fff;background-color:var(--ibiz-badge-bg-color);border-radius:10px}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-
|
|
1
|
+
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-badge{display:inline-block;padding:3px 6px;line-height:1rem;color:#fff;background-color:var(--ibiz-badge-bg-color);border-radius:10px}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-panel-container{width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-nav-pos{width:100%;height:100%}.ibiz-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);width:100%;height:100%}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-single-data-container{width:100%;height:100%}.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["qx-util","vue","@ibiz-template/core","ramda","vue-router","qs","@ibiz-template/runtime","pinia"],(function(t){"use strict";var e,n,o,a,s,r,i,l,c,u,d,p,h,m,f,g,v,y,w,C,b,I,P,D,E,N,O,A,x,S,R,z,T,B,j,V,L,k,M,_,G,W,q,$,F,U,K,H,X,Q,J,Y,Z,tt,et,nt,ot,at,st,rt,it,lt,ct,ut,dt,pt,ht,mt,ft,gt,vt,yt,wt,Ct,bt,It,Pt,Dt,Et,Nt;return{setters:[function(t){e=t.SyncSeriesHook,n=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,s=t.clearAll,r=t.createUUID},function(t){i=t.watch,l=t.onBeforeUnmount,c=t.createCommentVNode,u=t.getCurrentInstance,d=t.isReactive,p=t.toRaw,h=t.inject,m=t.reactive,f=t.onActivated,g=t.onDeactivated,v=t.ref,y=t.h,w=t.resolveComponent,C=t.provide,b=t.defineComponent,I=t.computed,P=t.createVNode,D=t.withDirectives,E=t.resolveDirective,N=t.isVNode,O=t.onUnmounted,A=t.onMounted,x=t.createTextVNode},function(t){S=t.onClickOutside,R=t.NOOP,z=t.listenJSEvent,T=t.Namespace,B=t.RuntimeError,j=t.isBase64Image,V=t.isSvg,L=t.ModelError,k=t.RuntimeModelError,M=t.IBizContext},function(t){_=t.isNil,G=t.isNotNil,W=t.isEmpty,q=t.mergeLeft},function(t){$=t.useRoute,F=t.useRouter},function(t){U=t.default},function(t){K=t.ViewType,H=t.RouteConst,X=t.getMatchResPath,Q=t.calcDeCodeNameById,J=t.getControlProvider,Y=t.calcDynaSysParams,Z=t.getViewProvider,tt=t.PanelItemState,et=t.PanelItemController,nt=t.registerPanelItemProvider,ot=t.Modal,at=t.ViewMode,st=t.OpenAppViewCommand,rt=t.getEditorProvider,it=t.PanelItemEventName,lt=t.getAllPanelField,ct=t.isDataContainer,ut=t.getPanelItemProvider,dt=t.PanelData,pt=t.PanelNotifyState,ht=t.execDELogicById,mt=t.ScriptFactory,ft=t.toLocalOpenWFRedirectView,gt=t.ViewController,vt=t.getControlsByView,yt=t.registerViewProvider,wt=t.getDERedirectToView,Ct=t.ViewLayoutPanelController,bt=t.registerControlProvider,It=t.ControlType,Pt=t.PanelController,Dt=t.RemotePluginItem},function(t){Et=t.defineStore,Nt=t.createPinia}],execute:function(){t({calcResRoutePath:Gt,createOverlayView:Ut,generateRoutePath:async function(t,e,n,o){const a=Lt(e);let s=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:Mt(n),params:o}),2===s&&(await Gt(a,n,t.appDataEntityId,t.appId),_t.includes(t.viewType))){const e=Q(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:kt(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=Lt(e),s=a.pathNodes.findIndex((t=>t.viewName===H.ROUTE_MODAL_TAG));-1!==s&&(a.pathNodes=a.pathNodes.slice(0,s));if(n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return a.pathNodes.push({viewName:"".concat(H.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Mt(n),params:o}),{path:kt(a)}},getArrayProps:Fn,getAutoCompleteProps:Gn,getCascaderProps:Un,getCheckboxListProps:On,getCheckboxProps:An,getCodeProps:Wn,getColorPickerProps:Kn,getDataPickerProps:xn,getDatePickerProps:Sn,getDateRangeProps:Rn,getDrawerPlacement:function(t){return Kt[t]||"right"},getDropdownProps:Nn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:Cn,getGridArrayProps:function(){return{...Fn(),...bn()}},getGridAutoCompleteProps:function(){return{...Gn(),...bn()}},getGridCascaderProps:function(){return{...Un(),...bn()}},getGridCheckboxListProps:function(){return{...On(),...bn()}},getGridCheckboxProps:function(){return{...An(),...bn()}},getGridCodeProps:function(){return{...Wn(),...bn()}},getGridColorPickerProps:function(){return{...Kn(),...bn()}},getGridDataPickerProps:function(){return{...xn(),...bn()}},getGridDatePickerProps:function(){return{...Sn(),...bn()}},getGridDateRangeProps:function(){return{...Rn(),...bn()}},getGridDropdownProps:function(){return{...Nn(),...bn()}},getGridEditorCommonProps:bn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...qn(),...bn()}},getGridInputIpProps:function(){return{...Dn(),...bn()}},getGridInputNumberProps:function(){return{...Pn(),...bn()}},getGridInputProps:function(){return{...In(),...bn()}},getGridListBoxProps:function(){return{...zn(),...bn()}},getGridMarkDownProps:function(){return{...$n(),...bn()}},getGridNumberRangeProps:function(){return{...Tn(),...bn()}},getGridRadioProps:function(){return{...Bn(),...bn()}},getGridRateProps:function(){return{...jn(),...bn()}},getGridRawProps:function(){return{...Vn(),...bn()}},getGridSliderProps:function(){return{...Ln(),...bn()}},getGridSpanProps:function(){return{...En(),...bn()}},getGridStepperProps:function(){return{...kn(),...bn()}},getGridSwitchProps:function(){return{...Mn(),...bn()}},getGridUploadProps:function(){return{..._n(),...bn()}},getHtmlProps:qn,getInputIpProps:Dn,getInputNumberProps:Pn,getInputProps:In,getListBoxProps:zn,getMarkDownProps:$n,getNestedRoutePath:Wt,getNumberRangeProps:Tn,getOrigin:St,getOwnRouteContext:Mt,getRadioProps:Bn,getRateProps:jn,getRawProps:Vn,getSliderProps:Ln,getSpanProps:En,getStepperProps:kn,getSwitchProps:Mn,getUploadProps:_n,isEmptyVNode:function(t){if(!Array.isArray(t))return t===zt;return 1===t.length&&t[0]===zt},onRouteChange:function(t,e){const n=$();if(!n)throw new B("无法正确获取route,可能是依赖问题");i((()=>null==n?void 0:n.path),(()=>{const o=Wt(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Ut(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Ut(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Ut(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Ut(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var a;const s=Lt(t,n);let r=s.pathNodes[e-1].viewName;if(!r)throw new B("第".concat(e,"级路由不存在视图标识"));r===H.ROUTE_MODAL_TAG&&(r=s.pathNodes[e].viewName);"index"===r&&(r=ibiz.hub.defaultAppIndexViewName);const i=await ibiz.hub.config.view.get(r);if(!i)throw new B("找不到视图".concat(r));const l={};(null==(a=ibiz.appData)?void 0:a.context)&&Object.assign(l,ibiz.appData.context);s.appContext&&Object.assign(l,s.appContext);if(1!==e)for(let t=0;t<e;t++){const e=s.pathNodes[t];o(e.context)&&Object.assign(l,e.context)}const{params:c,srfnav:u}=s.pathNodes[e-1];return{viewConfig:i,context:l,params:c,srfnav:u}},prepareControl:function(t){const e=Vt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=Vt("control-".concat(s)),l=[e.b(),e.b(s),e.m(a)];r&&l.push(r);return{controlClass:l,ns:i}},renderString:function(t){if(_(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:Lt,routePath2string:kt,useClickOutside:At,useControlController:Bt,useController:function(t){t.force=Rt()},useCtx:Tt,useEventListener:jt,useFocusAndBlur:function(t,e){const n=v(),o=v(!1);let a;const s=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return jt(n,"click",(e=>{o.value||(a=At(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Rt,useForceTogether:function(t,e){const n=e.force,o=Rt();e.force=t=>{n(t),o()}},useMobCtx:function(){return h("ctx")},useNamespace:Vt,useProps:xt,usePropsWatch:function(t,e,n){const o=xt();Object.prototype.hasOwnProperty.call(o,t)&&(i((()=>o[t]),((t,n)=>{e(St(t),St(n))}),n),e(St(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=v(""));n.value=t.value;const o=new qt(e);return i(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=$(),{query:e}=t;return e},useViewController:Xt});class Ot{}function At(t,e,n={}){let o=R,a=R,s=R;const r=()=>{o(),o=R,a=R,s=R};return i(t,((t,i)=>{if(t!==i)if(_(t))r();else{const r=S((null==t?void 0:t.$el)||t,e,n);o=r.stop,a=r.pause,s=r.proceed}}),{immediate:!0}),l((()=>{o!==R&&r()})),{stop:()=>o(),pause:()=>a(),proceed:()=>s()}}function xt(){return u().proxy.$props}function St(t){return d(t)?p(t):t}function Rt(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&n(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",Ot),Ot.createApp=new e,Ot.useComponent=new e;const zt=t("EmptyVNode",c("EmptyVNode"));function Tt(){return h("ctx")}function Bt(t,e){const n=Tt(),o=xt();n.evt.emit("onForecast",o.modelData.name);const a=o.provider;let s;s=(null==a?void 0:a.createController)?a.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),function(t,e){i((()=>({context:t.context,params:t.params})),((t,n)=>{if(t===n)return;const o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(o,s),function(t,e,n=[]){const o=["context","params","modelData",...n];i((()=>{const e={};return Object.keys(t).forEach((n=>{o.includes(n)||(e[n]=t[n])})),e}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug("部件 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,s,null==e?void 0:e.excludePropsKeys),s.state=m(s.state),f((()=>s.onActivated())),g((()=>s.onDeactivated())),s.force=Rt();const r=u().proxy;return s.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),r.$emit("controllerAppear",s),s.created(),l((()=>s.destroyed())),s}function jt(t,e,n,o={}){let a=R;return i(t,((t,s)=>{t!==s&&(_(t)?(a(),a=R):a=z((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),l((()=>{a!==R&&a()})),()=>{a()}}function Vt(t){return new T(t,ibiz.env.namespace)}function Lt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(H.ROUTE_MODAL_TAG),"g"),""));const a=o.split("/"),s=[];for(let e=1;e<=n;e++){const n=a[2*e],o=t.params["params".concat(e)];let r,i,l;r=o&&o!==ibiz.env.routePlaceholder?U.parse(o,{strictNullHandling:!0,delimiter:";"}):void 0,r&&(1===e?(i=r,r=void 0):(r.srfnavctx&&(i=JSON.parse(decodeURIComponent(r.srfnavctx)),delete r.srfnavctx),r.srfnav&&(l=r.srfnav,delete r.srfnav))),s.push({viewName:n,context:i,params:r,srfnav:l})}let r;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(r=U.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:r,pathNodes:s}}function kt(t){let e="";return t.appContext?e+="/".concat(U.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let a={};if(0===n)o(t.context)&&(a=t.context);else{if(a=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(a.srfnavctx=encodeURIComponent(e))}t.srfnav&&(a.srfnav=t.srfnav)}const s=U.stringify(a,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(s)?e+=s:e+=ibiz.env.routePlaceholder})),e}function Mt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const _t=t("excludeViewTypes",[K.DE_GRID_VIEW,K.DE_GRID_EXP_VIEW,K.DE_LIST_VIEW,K.DE_LIST_EXP_VIEW,K.DE_DATA_VIEW,K.DE_DATAVIEW_EXP_VIEW,K.DE_CALENDAR_VIEW,K.DE_CALENDAR_EXP_VIEW,K.DE_CHART_VIEW,K.DE_CHART_EXP_VIEW,K.DE_KANBAN_VIEW]);async function Gt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=X(e,a);if(s||(s={path:"",keys:[a.codeName.toLowerCase()]}),s){const n=t.pathNodes[1].context,o={};s.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Wt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Lt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,kt(o))}class qt{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),i((()=>t.path),((t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}}))}nextChange(t){t&&(this.timers.push(setTimeout((()=>{t();const e=this.callbacks.findIndex((e=>e===t));this.callbacks.splice(e,1)}),this.wait)),this.callbacks.push(t))}}t("RouteListener",qt);const $t=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Ft{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new B("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Ft.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>y(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise((t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)}))}}t("OverlayContainer",Ft);function Ut(t){return e=>{const n=w("IBizViewShell");return y(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Ft{present(t){return this.modal.present(t)}});const Kt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Ht{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const a=e;if(this.map.has(a)){return this.map.get(a).onWillDismiss()}const s=new Ht(o,a);return this.map.set(a,s),this.scheduledDestruction(s),s.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout((()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)}),1e4)}}),t("useAppStore",Et("appStore",(()=>({appStore:m({})}))));t("useUIStore",Et("uiStore",(()=>{const t=function(){const t=v(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:m({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Nt());function Xt(t){const e=xt(),n=h("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let a;a=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(a.id,a),function(t,e){i((()=>({context:t.context,params:t.params})),(t=>{e.context.reset({},t.context),s(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(e,a),function(t,e){i((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug("视图 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,a),C("ctx",a.ctx),a.state=m(a.state),a.slotProps=m(a.slotProps),e.modal&&(a.modal=e.modal),f((()=>{a.onActivated(),ibiz.util.viewStack.active(a.id)})),g((()=>{a.onDeactivated(),ibiz.util.viewStack.deactivate(a.id)})),a.force=Rt();const r=u().proxy;return a.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),a.created(),l((()=>{a.destroyed(),ibiz.util.viewStack.remove(a.id)})),a}t("IBizIcon",b({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Vt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=I((()=>function(t){if(t){if(t.htmlStr)return P("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?P("i",{class:[e.b(),t.cssClass]},null):P("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return j(t.imagePath)?P("img",{class:e.b(),src:t.imagePath},null):V(t.imagePath)?P("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?P("img",{class:e.b(),src:t.imagePath},null):P("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?P("img",{class:e.b(),src:t.imagePath},null):P("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return V(t.rawContent)?P("div",{class:e.b(),innerHTML:t.rawContent},null):P("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",b({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;i((()=>t.manualKey),((t,e)=>{G(t)&&t!==e&&(o=!0)}));return{renderComp:(a,s)=>{if(!o)return n.vNode;if(o=!1,a){const o={...a.props};delete o.onVnodeUnmounted,delete o.ref;const s=y(a.type,{...o,...e,key:t.manualKey});return n.vNode=s,s}}}},render(){return P(w("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",b({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Vt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,l=t.controller.model.controls,c=m({});return!1===i.controlType.endsWith("EXPBAR")&&(_(i.width)||(c.width="".concat(i.width,"px")),_(i.height)||(c.height="".concat(i.height,"px"))),{ns:e,typeClass:s,sysCssName:r,inlineStyle:c,codeName:a,controls:l,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:s}=this.controller;let r=null;if(o.isCreated&&a){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},a=e[n];e[n]=a?()=>a(o):()=>{const e=w("IBizControlShell");return y(e,{modelData:t,...o})}}));const n=s[a.name];r=y(w(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return P("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[r||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",b({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){h("ctx").evt.emit("onForecast",t.modelData.name);const e=v(!1),n=v(""),o=v();J(t.modelData).then((t=>{t?o.value=t:n.value="未找到对应部件的适配器",e.value=!0})).catch((t=>{ibiz.log.error(t),n.value=t.message,e.value=!0}));return{ns:Vt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):D(P("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[E("loading"),!this.isComplete]])}})),t("IBizViewShell",b({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Vt("view-shell"),n=v(!1),o=v(""),a=v(),s=v();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new B("未找到视图模型");if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new B("".concat(e.codeName,"无实体,暂不支持加载动态模型"));const o=t.params||{},a=await Y(n,t.context,{viewParams:o,appId:e.appId});if(o.srfdatatype&&(a.srfdatatype=o.srfdatatype),o.srfwftag)a.srfwftag=o.srfwftag;else if(n&&e.enableWF){const o={...t.context};if(a.srfkey){const s=_(t.context.srfsessionid)||W(t.context.srfsessionid),i=r();if(s){const t=ibiz.uiDomainManager.create(i);o.srfsessionid=t.id}const l=ibiz.hub.getApp(e.appId),c=await l.deService.getService(t.context,n),u=await c.get(o,t.params||{});if(u.ok&&u.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:s}=u.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;_(e.processDefinitionKey)&&(e.processDefinitionKey=o),_(e.taskDefinitionKey)&&(e.taskDefinitionKey=s)}}s&&ibiz.uiDomainManager.destroy(i)}}s.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else s.value=e;try{a.value=await Z(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:s,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):D(P("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[E("loading"),!this.isComplete]])}})),t("IBizCodeList",b({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const a=Vt("code-list"),s=v([]),r=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",l=(null==(o=t.codeList)?void 0:o.valueSeparator)||",";i(s,(t=>{let n="";t.length>0&&(n=t.map((t=>t.text)).join(r)),e("infoTextChange",n)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};i((()=>t.value),((e,n)=>{if(e!==n)if(_(e)||""===e)s.value=[];else{let n;n="string"==typeof e?e.split(l):[e],s.value=n.map((e=>{const n=c(t.codeListItems,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u="未定义"===t.codeList.emptyText?"- - -":t.codeList.emptyText;return{items:s,ns:a,emptyText:u,textSeparator:r}},render(){return P("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,P("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&P(w("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",b({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(h("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",b({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"}},setup:()=>({ns:Vt("badge")}),render(){return P("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class Qt extends tt{}t("PanelContainerState",Qt);class Jt extends et{createState(){var t;return new Qt(null==(t=this.parent)?void 0:t.state)}}function Yt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("PanelContainerController",Jt);const Zt=b({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Jt,required:!0}},setup(t){const e=Vt("panel-container"),{id:n}=t.modelData,o=I((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=P(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Yt(n=o.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Yt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return P("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?P("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class te{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Jt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",$t(Zt,(function(t){t.component(Zt.name,Zt),nt("CONTAINER",(()=>new te)),nt("CONTAINER_DEFAULT",(()=>new te))})));const ee=b({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){h("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Vt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),P("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?"未提供".concat(this.modelData.id,"插槽"):"")])}});class ne extends et{bindControl(t){this.control=t,t.evt.onAll(((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})}))}}t("PanelCtrlPosController",ne);class oe{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new ne(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",$t(ee,(function(t){t.component(ee.name,ee),nt("CTRLPOS",(()=>new oe))})));class ae extends et{}function se(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("ScrollContainerItemController",ae);const re=t("ScrollContainerItem",b({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=Vt("scroll-container-item"),{id:n}=t.modelData,o=I((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return P(w("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},se(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},se(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class ie{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ae(t,e,n);return await o.init(),o}}class le extends et{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",le);const ce=t("ScrollContainer",b({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:le,required:!0}},setup(t){const e=Vt("scroll-container"),{id:n}=t.modelData,o=I((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,a=null,s=null,r=null;const i={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach((t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,i.left={width:l};break;case"EAST":a=t,i.right={width:l};break;case"NORTH":o=t,i.top={height:c};break;case"SOUTH":s=t,i.bottom={height:c};break;case"CENTER":r=t;break;default:ibiz.log.debug("未适配的布局占位".concat(e.modelData.layoutPos.layoutPos))}}));for(const t in i)(i[t].width||i[t].height)&&(i[t].flexShrink=0);return P("div",{class:this.classArr},[P("div",{class:[this.ns.e("header")],style:i.top},[o]),P("div",{class:[this.ns.b("content")]},[P("div",{class:this.ns.be("content","left"),style:i.left},[n]),P("div",{class:this.ns.be("content","center")},[r]),P("div",{class:this.ns.be("content","right"),style:i.right},[a])]),P("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class ue{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new le(t,e,n);return await o.init(),o}}t("IBizScrollContainer",$t(ce,(function(t){t.component(ce.name,ce),t.component(re.name,re),nt("CONTAINER_CONTAINER_SCROLL",(()=>new ue)),nt("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new ie))})));class de extends tt{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",de);const pe=["is404","isRoutePushed"];class he extends et{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find((t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map((t=>t.toLowerCase())),!0))),this.panel.evt.on("onControlEvent",(t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}}));const e=this.rawItemParams.expmode||this.panel.view.params.expmode;"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new de(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(q(this.state.navViewMsgs[e],t),pe.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new ot({mode:this.routeDepth?at.ROUTE:at.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Wt(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){var e,n;const o=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=o,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Wt(this.route,this.routeDepth,!1);(null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/404")):this.router.push("".concat(n,"/404"))}else if(this.state.navViewMsgs[o].fullPath&&this.getExpItemIsCache(t))(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[o].fullPath):this.router.push(this.state.navViewMsgs[o].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(o),ibiz.commands.execute(st.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",replace:!this.state.currentKey,...t.modalOptions})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function me(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("NavPosController",he);const fe=b({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:he,required:!0}},setup(t){const e=t.controller,n=Vt("nav-pos"),o=F(),a=$();if(e.setRouter(o),e.routeDepth){const t=Wt(a,e.routeDepth);i((()=>a.fullPath),(()=>{const n=Wt(a,e.routeDepth);t===n&&a.matched.length>e.routeDepth&&e.onRouteChange(a)}),{immediate:!0})}return{ns:n,c:e,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:s}=e;let r=null;if(e.routeOpen)r=P(w("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?P(t,null,null):null;return s?P(w("keepAlive"),{include:o,max:30,isKey:!0},me(e)?e:{default:()=>[e]}):e}});else{const t=n?y(w("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?P(w("keepAlive"),{include:o,max:30,isKey:!0},me(t)?t:{default:()=>[t]}):t}return P("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class ge{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new he(t,e,n);return await o.init(),o}}t("IBizNavPos",$t(fe,(function(t){t.component(fe.name,fe),nt("RAWITEM_NAV_POS",(()=>new ge))})));class ve extends tt{}class ye extends et{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new ve(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.state.required=!this.model.allowEmpty,this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await rt(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.ENTER,event:t})}}t("PanelFieldController",ye);const we=b({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:ye,required:!0}},setup(t){const e=Vt("panel-field"),n=I((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.model.editor.readOnly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t)};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=w(this.controller.editorProvider.formEditor);t=y(n,{...e})}else t=P(w("not-supported-editor"),{modelData:this.modelData.editor},null)}return P("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class Ce{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new ye(t,e,n);return await o.init(),o}}t("IBizPanelField",$t(we,(function(t){t.component(we.name,we),nt("FIELD",(()=>new Ce))})));class be extends et{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",be);const Ie=b({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:be,required:!0}},setup(t){const e=Vt("panel-rawitem"),n=v(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=I((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:a,tempStyle:n}},render(){if(this.controller.state.visible)return P("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[P(w("iBizRawItem"),{rawItem:this.modelData},null)])}});class Pe{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new be(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",$t(Ie,(function(t){t.component(Ie.name,Ie),nt("RAWITEM",(()=>new Pe)),nt("RAWITEM_STATIC_IMAGE",(()=>new Pe)),nt("RAWITEM_STATIC_LABEL",(()=>new Pe)),nt("RAWITEM_STATIC_TEXT",(()=>new Pe))})));class De extends tt{constructor(){super(...arguments),this.data={}}}class Ee{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new De,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=lt(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const s=this.parent.providers[t.id];if(!s)return;const r=await s.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!ct(t)?await this.initChildrenController(t.panelItems,e,r):(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initChildrenController(t.panelTabPages,e,r)})))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async panelStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}class Ne extends tt{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Ne);class Oe extends et{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Ne(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await ut(t);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!ct(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new L(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=lt(this.model),n=t.map((t=>new dt(e,t)));this.dataItems=n.map((t=>new Ee(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(pt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new k(this.model,"没有配置实体逻辑");if(!t)throw new k(this.model,"没有配置实体");const n=await ht(e,t,this.panel.context,[],this.panel.params);if(!n)throw new B("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new k(this.model,"没有配置实体行为");if(!e)throw new k(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",Oe);const Ae=b({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Oe,required:!0}},setup(t){const e=Vt("multi-data-container"),{id:n}=t.modelData;i((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=m(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=m(n.state)}))}))}),{immediate:!0});const o=h("renderPanelItem"),a=I((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map(((t,e)=>{const n=this.controller.dataItems[e];return P(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return P(w("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!N(a)?e:{default:()=>[e]});var a}))]}})})),P("div",{class:this.classArr},[t])}});class xe{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Oe(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",$t(Ae,(function(t){t.component(Ae.name,Ae),nt("CONTAINER_CONTAINER_MULTIDATA",(()=>new xe))})));class Se extends tt{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Se);class Re extends et{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Se(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const s=await ut(t);if(!s)return;this.providers[t.id]=s;const r=await s.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!ct(t)&&await this.initPanelItemControllers(t.panelItems,e,r),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,r)})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new L(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=lt(this.model),a=o.map((t=>t.id)),s=new dt(o,t);s._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=s,this.childrenStateNotify(pt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new k(this.model,"没有配置实体逻辑");if(!t)throw new k(this.model,"没有配置实体");const n=await ht(e,t,this.panel.context,[],this.panel.params);if(!n)throw new B("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new k(this.model,"没有配置实体行为");if(!e)throw new k(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}t("SingleDataContainerController",Re);const ze=b({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Re,required:!0}},setup(t){const e=Vt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=m(n.state)}));const o=h("renderPanelItem"),a=I((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():P(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const n=this.controller.panelItems[t.id];return P(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!N(o)?e:{default:()=>[e]});var o}))]}}),P("div",{class:this.classArr},[t])}});class Te{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Re(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",$t(ze,(function(t){t.component(ze.name,ze),nt("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Te))})));class Be extends tt{}t("GridContainerState",Be);class je extends et{createState(){var t;return new Be(null==(t=this.parent)?void 0:t.state)}}function Ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("GridContainerController",je);const Le=b({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:je,required:!0}},setup(t){const e=Vt("grid-container"),{id:n}=t.modelData,o=I((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=I((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),s=v(void 0),r=v(12);return{ns:e,classArr:o,layoutModel:a,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:r,adaptCols:s}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return P(w("iBizRow"),{class:this.classArr,layout:this.layoutModel},Ve(n=o.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Ve(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class ke{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new je(t,e,n);return await o.init(),o}}t("IBizGridContainer",$t(Le,(function(t){t.component(Le.name,Le),nt("CONTAINER_CONTAINER_GRID",(()=>new ke))})));class Me extends tt{}t("PanelContainerImageState",Me);class _e extends et{createState(){var t;return new Me(null==(t=this.parent)?void 0:t.state)}}function Ge(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("PanelContainerImageController",_e);const We=b({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:_e,required:!0}},setup(t){const e=Vt("panel-container-image"),{id:n}=t.modelData,o=I((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=I((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=V(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=P(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ge(n=o.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ge(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return P("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?P("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class qe{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new _e(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",$t(We,(function(t){t.component(We.name,We),nt("CONTAINER_CONTAINER_IMAGE",(()=>new qe))})));class $e extends tt{}t("PanelContainerGroupState",$e);class Fe extends et{createState(){var t;return new $e(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Fe);class Ue{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Fe(t,e,n);return await o.init(),o}}function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}const He=b({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Fe,required:!0}},setup(t){const e=Vt("panel-container-group"),n=v(!t.controller.defaultExpansion);return{ns:e,captionText:I((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],s=P(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ke(n=a.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ke(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=P("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[P("div",{class:[this.ns.be("header","left")]},[P("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),P("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?P("ion-icon",{name:"caret-forward-sharp"},null):P("ion-icon",{name:"caret-down-sharp"},null))])])),P("div",{class:o},[r,P("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",$t(He,(function(t){t.component(He.name,He),nt("CONTAINER_CONTAINER_GROUP",(()=>new Ue))})));function Xe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}const Qe=b({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:et,required:!0}},setup(t){const e=Vt("panel-tab-page"),n=I((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return P(w("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Xe(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return P(w("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Xe(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class Je{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new et(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",$t(Qe,(function(t){t.component(Qe.name,Qe),nt("TABPAGE",(()=>new Je))})));class Ye extends et{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?mt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const Ze=b({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:Ye,required:!0}},setup(t){var e;const n=Vt("panel-item-render"),o=Vt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,s=I((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=I((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:s,htmlCode:r}},render(){return P("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class tn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new Ye(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",$t(Ze,(function(t){t.component(Ze.name,Ze),nt("PREDEFINE_RENDER",(()=>new tn))}))),t("AppRedirectView",b({setup(){var t;const e=M.create((null==(t=ibiz.appData)?void 0:t.context)||{});O((()=>{e.destroy()}));const{href:n}=window.location;A((()=>ibiz.util.hiddenAppLoading())),async function(){await ft(e,n)}()},render:()=>P("div",null,[x("重定向跳转中")])}));class en{constructor(){this.component="IBizView"}}const nn=b({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(){const t=Vt("view"),e=Xt(((...t)=>new gt(...t))),n=vt(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=I((()=>[t.b(),t.b(r),t.m(s),i,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""]));return{c:e,controls:n,viewClassNames:l,onLayoutPanelCreated:t=>{e.setLayoutPanel(t)},renderViewMessage:n=>{if(e.state.isCreated){const o=e.state.viewMessages[n];if(null==o?void 0:o.length)return P(w("view-message"),{class:[t.e("".concat(n.toLowerCase(),"-message"))],messages:o},null)}return null}}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};if((null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a({modelData:t,...o}));const s=this.c.providers[e];s&&(n[e]=()=>{const e=w(s.component);return y(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=P("span",{style:"color:red;"},[x("视图类型"),this.modelData.viewType,x("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=y(w(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return D(P("div",{class:this.viewClassNames,id:this.c.id},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[E("loading"),this.c.state.isLoading]])}});t("IBizView",$t(nn,(function(t){t.component(nn.name,nn),yt("DEFAULT",(()=>new en))}))),t("TodoRedirect",b({setup(){const t=F(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=U.parse(o,{delimiter:";"}),{apptype:s,todotype:r,todoid:i}=a,l={srfapptype:"pc",srfapp:""};s||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(i,"/getlinkurl"),l)).data.linkurl;s?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(r),t.push("/index".concat(e)))}()},render:()=>P("div",null,[x("待办列表重定向")])}));class on{constructor(){this.component="IBizPortalView"}}const an=b({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=Vt("view"),n=Xt(((...t)=>new gt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:s,codeName:r}=n.model,i=a.toLowerCase(),l=null==s?void 0:s.cssName,c=[e.b(),e.b(i),e.m(r),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a(o));const s=this.c.providers[e];s&&(n[e]=()=>{const e=w(s.component);return y(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return P("div",{class:this.viewClassNames},[e])}}),sn=(t("IBizPortalView",$t(an,(function(t){t.component(an.name,an),yt(K.APP_PORTAL_VIEW,(()=>new on)),yt(K.DE_PORTAL_VIEW,(()=>new on)),yt(K.DE_PORTAL_VIEW9,(()=>new on))}))),b({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Xt(((...t)=>new gt(...t))),n=v(),o=v(),a=v();return e.evt.on("onCreated",(()=>{wt(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new B("嵌入重定向视图不支持url跳转");n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?y(w("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):D(P("div",{style:"width: 100%; height: 100%;"},null),[[E("loading"),!this.toViewId]])}}));class rn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",$t(sn,(function(t){t.component(sn.name,sn);const e=new rn;yt(K.DE_REDIRECT_VIEW,(()=>e))})));const ln=b({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:e}){const n=Bt(((...e)=>new Ct(...e,t.container))),o=Vt("control-".concat(n.model.controlType.toLowerCase()));i((()=>t.data),(t=>{t&&(n.setInputData(t),n.load())}),{immediate:!0}),n.evt.on("onCreated",(()=>{Object.keys(n.panelItems).forEach((t=>{const e=n.panelItems[t];e.state=m(e.state)}))}));const a=(t,o)=>{var s,r;if(t.hidden)return null;const{providers:i,panelItems:l}=o||n,c=i[t.id];if(!c)return P("div",null,[x("暂未支持的面板项: "),t.id,x(" - "),t.itemType]);const u=w(c.component);let d;"CTRLPOS"===t.itemType&&e[t.id]?d=()=>e[t.id]():"TABPANEL"===t.itemType&&(null==(s=t.panelTabPages)?void 0:s.length)?d=()=>t.panelTabPages.map((t=>a(t,o))):ct(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>a(t,o))));let p="";return t.cssStyle&&(p=t.cssStyle),y(u,{modelData:t,controller:l[t.id],key:t.id,style:p},d)};return C("renderPanelItem",a),{c:n,ns:o,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return P(w("iBizControlBase"),{controller:this.c},{default:()=>[P(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",P(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!N(o)?e:{default:()=>[e]});var o})))]}})]})}});class cn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",$t(ln,(function(t){t.component(ln.name,ln),bt(It.VIEW_LAYOUT_PANEL,(()=>new cn))})));function un(t,e,n){var o,a;if(t.hidden)return;const{providers:s,panelItems:r}=e,i=s[t.id];if(!i)return P("div",null,[x("暂未支持的面板项: "),t.id,x(" - "),t.itemType]);const l=w(i.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>un(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>un(t,e,n))));let u="";return t.cssStyle&&(u=t.cssStyle),y(l,{modelData:t,controller:r[t.id],key:t.id,style:u},c)}const dn=b({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const e=Bt(((...e)=>new Pt(...e,t.container))),n=Vt("control-".concat(e.model.controlType.toLowerCase()));return i((()=>t.data),(t=>{t&&(e.setInputData(t),e.load())}),{immediate:!0}),e.evt.on("onCreated",(()=>{Object.keys(e.panelItems).forEach((t=>{const n=e.panelItems[t];n.state=m(n.state)}))})),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return P(w("iBizControlBase"),{controller:this.c},{default:()=>[P(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",P(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=un(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!N(o)?e:{default:()=>[e]});var o})))]}})]})}});class pn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",$t(dn,(function(t){t.component(dn.name,dn),bt(It.PANEL,(()=>new pn))})));function hn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function mn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function fn(t,e){for(var n,o="",a=0,s=-1,r=0,i=0;i<=t.length;++i){if(i<t.length)n=t.charCodeAt(i);else{if(47===n)break;n=47}if(47===n){if(s===i-1||1===r);else if(s!==i-1&&2===r){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),s=i,r=0;continue}}else if(2===o.length||1===o.length){o="",a=0,s=i,r=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(s+1,i):o=t.slice(s+1,i),a=i-s-1;s=i,r=0}else 46===n&&-1!==r?++r:r=-1}return o}var gn={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),mn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=fn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(mn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=fn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return mn(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];mn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":gn.normalize(t)},relative:function(t,e){if(mn(t),mn(e),t===e)return"";if((t=gn.resolve(t))===(e=gn.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var r=e.length-s,i=a<r?a:r,l=-1,c=0;c<=i;++c){if(c===i){if(r>i){if(47===e.charCodeAt(s+c))return e.slice(s+c+1);if(0===c)return e.slice(s+c)}else a>i&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(s+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(s+l):(s+=l,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(mn(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!a){o=s;break}}else a=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');mn(t);var n,o=0,a=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var r=e.length-1,i=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!s){o=n+1;break}}else-1===i&&(s=!1,i=n+1),r>=0&&(l===e.charCodeAt(r)?-1==--r&&(a=n):(r=-1,a=i))}return o===a?a=i:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){o=n+1;break}}else-1===a&&(s=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){mn(t);for(var e=-1,n=0,o=-1,a=!0,s=0,r=t.length-1;r>=0;--r){var i=t.charCodeAt(r);if(47!==i)-1===o&&(a=!1,o=r+1),46===i?-1===e?e=r:1!==s&&(s=1):-1!==e&&(s=-1);else if(!a){n=r+1;break}}return-1===e||-1===o||0===s||1===s&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){mn(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var s=-1,r=0,i=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===i&&(l=!1,i=c+1),46===o?-1===s?s=c:1!==u&&(u=1):-1!==s&&(u=-1);else if(!l){r=c+1;break}return-1===s||-1===i||0===u||1===u&&s===i-1&&s===r+1?-1!==i&&(e.base=e.name=0===r&&a?t.slice(1,i):t.slice(r,i)):(0===r&&a?(e.name=t.slice(1,s),e.base=t.slice(1,i)):(e.name=t.slice(r,s),e.base=t.slice(r,i)),e.ext=t.slice(s,i)),r>0?e.dir=t.slice(0,r-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};gn.posix=gn;var vn=gn,yn=hn(vn);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some((e=>"string"==typeof e?t===e:e.test(t)))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach((e=>{t.use(e)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),Ot.useComponent.callSync(null,t)}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new k(e,"配置加载失败")}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(vn.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error("配置加载失败");n=a.data}const o=new Dt(t,e,n);if(o){await this.loadPluginExternal(o.config);try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let s="";if(s=vn.join(e,o),s){if(this.cache.has(s))return;let t=null;const o=this.parseUrl(s),r=("string"==typeof a?[a]:a).map((t=>this.parseUrl(yn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new B("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new B("远程插件加载失败, 远程插件未找到[default]默认导出");this.setPluginCode(t.default),this.cache.set(s,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(vn.join(e,t));const{origin:o,pathname:a}=window.location;return a.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(a).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"]);if(e.packages){const t=e.packages;for(const e in t){const n=t[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:n});if(200!==o.status)throw new Error("配置加载失败");await this.loadPluginExternal(o.data)}}System.addImportMap(e)}handleSystemImportMap(t){if(t){if(t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map((e=>this.parseUrl(e,t.baseUrl)))}}return t}return null}});class wn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Cn(){return{value:String,controller:new wn(Object),data:new wn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function bn(){return{hasError:{type:Boolean}}}function In(){return{...Cn(),value:[String,Number]}}function Pn(){return{...Cn(),value:Number}}function Dn(){return{...Cn(),value:String}}function En(){return{...Cn(),value:[String,Number,Object,Array]}}function Nn(){return{...Cn(),value:[String,Number]}}function On(){return{...Cn(),value:[String,Number]}}function An(){return{...Cn(),value:[String,Number]}}function xn(){return{...Cn(),value:[String,Array,Object,Number]}}function Sn(){return{...Cn(),value:[String,Number]}}function Rn(){return{...Cn(),value:[String,Number]}}function zn(){return{...Cn(),value:[String,Number]}}function Tn(){return{...Cn(),value:[String,Number]}}function Bn(){return{...Cn(),value:[String,Number]}}function jn(){return{...Cn(),value:[String,Number]}}function Vn(){return{...Cn(),value:[String,Number,Array]}}function Ln(){return{...Cn(),value:[String,Number]}}function kn(){return{...Cn(),value:[String,Number]}}function Mn(){return{...Cn(),value:[String,Number]}}function _n(){return{...Cn(),value:String}}function Gn(){return{...Cn(),value:[String,Number]}}function Wn(){return{...Cn(),value:String,language:{type:String},theme:{type:String}}}function qn(){return{...Cn(),value:String}}function $n(){return{...Cn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function Fn(){return{...Cn(),value:[Array,Array]}}function Un(){return{...Cn(),value:String}}function Kn(){return{...Cn(),value:String}}t("RequiredProp",wn)}}}));
|
|
1
|
+
System.register(["qx-util","vue","@ibiz-template/core","ramda","vue-router","qs","@ibiz-template/runtime","pinia"],(function(t){"use strict";var e,n,o,a,s,r,i,l,c,u,d,p,h,m,f,g,v,y,w,C,b,I,P,D,E,N,O,A,x,S,R,z,T,B,j,V,L,k,M,_,G,W,q,$,F,U,K,H,X,Q,J,Y,Z,tt,et,nt,ot,at,st,rt,it,lt,ct,ut,dt,pt,ht,mt,ft,gt,vt,yt,wt,Ct,bt,It,Pt,Dt,Et,Nt;return{setters:[function(t){e=t.SyncSeriesHook,n=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,s=t.clearAll,r=t.createUUID},function(t){i=t.watch,l=t.onBeforeUnmount,c=t.createCommentVNode,u=t.getCurrentInstance,d=t.isReactive,p=t.toRaw,h=t.inject,m=t.reactive,f=t.onActivated,g=t.onDeactivated,v=t.ref,y=t.h,w=t.resolveComponent,C=t.provide,b=t.defineComponent,I=t.computed,P=t.createVNode,D=t.withDirectives,E=t.resolveDirective,N=t.isVNode,O=t.onUnmounted,A=t.onMounted,x=t.createTextVNode},function(t){S=t.onClickOutside,R=t.NOOP,z=t.listenJSEvent,T=t.Namespace,B=t.RuntimeError,j=t.isBase64Image,V=t.isSvg,L=t.ModelError,k=t.RuntimeModelError,M=t.IBizContext},function(t){_=t.isNil,G=t.isNotNil,W=t.isEmpty,q=t.mergeLeft},function(t){$=t.useRoute,F=t.useRouter},function(t){U=t.default},function(t){K=t.ViewType,H=t.RouteConst,X=t.getMatchResPath,Q=t.calcDeCodeNameById,J=t.getControlProvider,Y=t.calcDynaSysParams,Z=t.getViewProvider,tt=t.PanelItemState,et=t.PanelItemController,nt=t.registerPanelItemProvider,ot=t.Modal,at=t.ViewMode,st=t.OpenAppViewCommand,rt=t.getEditorProvider,it=t.PanelItemEventName,lt=t.getAllPanelField,ct=t.isDataContainer,ut=t.getPanelItemProvider,dt=t.PanelData,pt=t.PanelNotifyState,ht=t.execDELogicById,mt=t.ScriptFactory,ft=t.toLocalOpenWFRedirectView,gt=t.ViewController,vt=t.getControlsByView,yt=t.registerViewProvider,wt=t.getDERedirectToView,Ct=t.ViewLayoutPanelController,bt=t.registerControlProvider,It=t.ControlType,Pt=t.PanelController,Dt=t.RemotePluginItem},function(t){Et=t.defineStore,Nt=t.createPinia}],execute:function(){t({calcResRoutePath:Gt,createOverlayView:Ut,generateRoutePath:async function(t,e,n,o){const a=Lt(e);let s=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:Mt(n),params:o}),2===s&&(await Gt(a,n,t.appDataEntityId,t.appId),_t.includes(t.viewType))){const e=Q(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:kt(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=Lt(e),s=a.pathNodes.findIndex((t=>t.viewName===H.ROUTE_MODAL_TAG));-1!==s&&(a.pathNodes=a.pathNodes.slice(0,s));if(n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return a.pathNodes.push({viewName:"".concat(H.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Mt(n),params:o}),{path:kt(a)}},getArrayProps:Fn,getAutoCompleteProps:Gn,getCascaderProps:Un,getCheckboxListProps:On,getCheckboxProps:An,getCodeProps:Wn,getColorPickerProps:Kn,getDataPickerProps:xn,getDatePickerProps:Sn,getDateRangeProps:Rn,getDrawerPlacement:function(t){return Kt[t]||"right"},getDropdownProps:Nn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:Cn,getGridArrayProps:function(){return{...Fn(),...bn()}},getGridAutoCompleteProps:function(){return{...Gn(),...bn()}},getGridCascaderProps:function(){return{...Un(),...bn()}},getGridCheckboxListProps:function(){return{...On(),...bn()}},getGridCheckboxProps:function(){return{...An(),...bn()}},getGridCodeProps:function(){return{...Wn(),...bn()}},getGridColorPickerProps:function(){return{...Kn(),...bn()}},getGridDataPickerProps:function(){return{...xn(),...bn()}},getGridDatePickerProps:function(){return{...Sn(),...bn()}},getGridDateRangeProps:function(){return{...Rn(),...bn()}},getGridDropdownProps:function(){return{...Nn(),...bn()}},getGridEditorCommonProps:bn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...qn(),...bn()}},getGridInputIpProps:function(){return{...Dn(),...bn()}},getGridInputNumberProps:function(){return{...Pn(),...bn()}},getGridInputProps:function(){return{...In(),...bn()}},getGridListBoxProps:function(){return{...zn(),...bn()}},getGridMarkDownProps:function(){return{...$n(),...bn()}},getGridNumberRangeProps:function(){return{...Tn(),...bn()}},getGridRadioProps:function(){return{...Bn(),...bn()}},getGridRateProps:function(){return{...jn(),...bn()}},getGridRawProps:function(){return{...Vn(),...bn()}},getGridSliderProps:function(){return{...Ln(),...bn()}},getGridSpanProps:function(){return{...En(),...bn()}},getGridStepperProps:function(){return{...kn(),...bn()}},getGridSwitchProps:function(){return{...Mn(),...bn()}},getGridUploadProps:function(){return{..._n(),...bn()}},getHtmlProps:qn,getInputIpProps:Dn,getInputNumberProps:Pn,getInputProps:In,getListBoxProps:zn,getMarkDownProps:$n,getNestedRoutePath:Wt,getNumberRangeProps:Tn,getOrigin:St,getOwnRouteContext:Mt,getRadioProps:Bn,getRateProps:jn,getRawProps:Vn,getSliderProps:Ln,getSpanProps:En,getStepperProps:kn,getSwitchProps:Mn,getUploadProps:_n,isEmptyVNode:function(t){if(!Array.isArray(t))return t===zt;return 1===t.length&&t[0]===zt},onRouteChange:function(t,e){const n=$();if(!n)throw new B("无法正确获取route,可能是依赖问题");i((()=>null==n?void 0:n.path),(()=>{const o=Wt(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Ut(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Ut(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Ut(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Ut(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var a;const s=Lt(t,n);let r=s.pathNodes[e-1].viewName;if(!r)throw new B("第".concat(e,"级路由不存在视图标识"));r===H.ROUTE_MODAL_TAG&&(r=s.pathNodes[e].viewName);"index"===r&&(r=ibiz.hub.defaultAppIndexViewName);const i=await ibiz.hub.config.view.get(r);if(!i)throw new B("找不到视图".concat(r));const l={};(null==(a=ibiz.appData)?void 0:a.context)&&Object.assign(l,ibiz.appData.context);s.appContext&&Object.assign(l,s.appContext);if(1!==e)for(let t=0;t<e;t++){const e=s.pathNodes[t];o(e.context)&&Object.assign(l,e.context)}const{params:c,srfnav:u}=s.pathNodes[e-1];return{viewConfig:i,context:l,params:c,srfnav:u}},prepareControl:function(t){const e=Vt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=Vt("control-".concat(s)),l=[e.b(),e.b(s),e.m(a)];r&&l.push(r);return{controlClass:l,ns:i}},renderString:function(t){if(_(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:Lt,routePath2string:kt,useClickOutside:At,useControlController:Bt,useController:function(t){t.force=Rt()},useCtx:Tt,useEventListener:jt,useFocusAndBlur:function(t,e){const n=v(),o=v(!1);let a;const s=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return jt(n,"click",(e=>{o.value||(a=At(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Rt,useForceTogether:function(t,e){const n=e.force,o=Rt();e.force=t=>{n(t),o()}},useMobCtx:function(){return h("ctx")},useNamespace:Vt,useProps:xt,usePropsWatch:function(t,e,n){const o=xt();Object.prototype.hasOwnProperty.call(o,t)&&(i((()=>o[t]),((t,n)=>{e(St(t),St(n))}),n),e(St(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=v(""));n.value=t.value;const o=new qt(e);return i(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=$(),{query:e}=t;return e},useViewController:Xt});class Ot{}function At(t,e,n={}){let o=R,a=R,s=R;const r=()=>{o(),o=R,a=R,s=R};return i(t,((t,i)=>{if(t!==i)if(_(t))r();else{const r=S((null==t?void 0:t.$el)||t,e,n);o=r.stop,a=r.pause,s=r.proceed}}),{immediate:!0}),l((()=>{o!==R&&r()})),{stop:()=>o(),pause:()=>a(),proceed:()=>s()}}function xt(){return u().proxy.$props}function St(t){return d(t)?p(t):t}function Rt(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&n(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",Ot),Ot.createApp=new e,Ot.useComponent=new e;const zt=t("EmptyVNode",c("EmptyVNode"));function Tt(){return h("ctx")}function Bt(t,e){const n=Tt(),o=xt();n.evt.emit("onForecast",o.modelData.name);const a=o.provider;let s;s=(null==a?void 0:a.createController)?a.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),function(t,e){i((()=>({context:t.context,params:t.params})),((t,n)=>{if(t===n)return;const o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(o,s),function(t,e,n=[]){const o=["context","params","modelData",...n];i((()=>{const e={};return Object.keys(t).forEach((n=>{o.includes(n)||(e[n]=t[n])})),e}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug("部件 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,s,null==e?void 0:e.excludePropsKeys),s.state=m(s.state),f((()=>s.onActivated())),g((()=>s.onDeactivated())),s.force=Rt();const r=u().proxy;return s.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),r.$emit("controllerAppear",s),s.created(),l((()=>s.destroyed())),s}function jt(t,e,n,o={}){let a=R;return i(t,((t,s)=>{t!==s&&(_(t)?(a(),a=R):a=z((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),l((()=>{a!==R&&a()})),()=>{a()}}function Vt(t){return new T(t,ibiz.env.namespace)}function Lt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(H.ROUTE_MODAL_TAG),"g"),""));const a=o.split("/"),s=[];for(let e=1;e<=n;e++){const n=a[2*e],o=t.params["params".concat(e)];let r,i,l;r=o&&o!==ibiz.env.routePlaceholder?U.parse(o,{strictNullHandling:!0,delimiter:";"}):void 0,r&&(1===e?(i=r,r=void 0):(r.srfnavctx&&(i=JSON.parse(decodeURIComponent(r.srfnavctx)),delete r.srfnavctx),r.srfnav&&(l=r.srfnav,delete r.srfnav))),s.push({viewName:n,context:i,params:r,srfnav:l})}let r;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(r=U.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:r,pathNodes:s}}function kt(t){let e="";return t.appContext?e+="/".concat(U.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let a={};if(0===n)o(t.context)&&(a=t.context);else{if(a=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(a.srfnavctx=encodeURIComponent(e))}t.srfnav&&(a.srfnav=t.srfnav)}const s=U.stringify(a,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(s)?e+=s:e+=ibiz.env.routePlaceholder})),e}function Mt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const _t=t("excludeViewTypes",[K.DE_GRID_VIEW,K.DE_GRID_EXP_VIEW,K.DE_LIST_VIEW,K.DE_LIST_EXP_VIEW,K.DE_DATA_VIEW,K.DE_DATAVIEW_EXP_VIEW,K.DE_CALENDAR_VIEW,K.DE_CALENDAR_EXP_VIEW,K.DE_CHART_VIEW,K.DE_CHART_EXP_VIEW,K.DE_KANBAN_VIEW]);async function Gt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=X(e,a);if(s||(s={path:"",keys:[a.codeName.toLowerCase()]}),s){const n=t.pathNodes[1].context,o={};s.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Wt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Lt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,kt(o))}class qt{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),i((()=>t.path),((t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}}))}nextChange(t){t&&(this.timers.push(setTimeout((()=>{t();const e=this.callbacks.findIndex((e=>e===t));this.callbacks.splice(e,1)}),this.wait)),this.callbacks.push(t))}}t("RouteListener",qt);const $t=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Ft{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new B("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Ft.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>y(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise((t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)}))}}t("OverlayContainer",Ft);function Ut(t){return e=>{const n=w("IBizViewShell");return y(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Ft{present(t){return this.modal.present(t)}});const Kt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Ht{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const a=e;if(this.map.has(a)){return this.map.get(a).onWillDismiss()}const s=new Ht(o,a);return this.map.set(a,s),this.scheduledDestruction(s),s.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout((()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)}),1e4)}}),t("useAppStore",Et("appStore",(()=>({appStore:m({})}))));t("useUIStore",Et("uiStore",(()=>{const t=function(){const t=v(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:m({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Nt());function Xt(t){const e=xt(),n=h("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let a;a=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(a.id,a),function(t,e){i((()=>({context:t.context,params:t.params})),(t=>{e.context.reset({},t.context),s(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug("".concat(e.model.id,"的上下文或视图参数变更:"),t)}))}(e,a),function(t,e){i((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug("视图 [".concat(e.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,a),C("ctx",a.ctx),a.state=m(a.state),a.slotProps=m(a.slotProps),e.modal&&(a.modal=e.modal),f((()=>{a.onActivated(),ibiz.util.viewStack.active(a.id)})),g((()=>{a.onDeactivated(),ibiz.util.viewStack.deactivate(a.id)})),a.force=Rt();const r=u().proxy;return a.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),a.created(),l((()=>{a.destroyed(),ibiz.util.viewStack.remove(a.id)})),a}t("IBizIcon",b({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Vt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=I((()=>function(t){if(t){if(t.htmlStr)return P("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?P("i",{class:[e.b(),t.cssClass]},null):P("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return j(t.imagePath)?P("img",{class:e.b(),src:t.imagePath},null):V(t.imagePath)?P("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?P("img",{class:e.b(),src:t.imagePath},null):P("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?P("img",{class:e.b(),src:t.imagePath},null):P("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return V(t.rawContent)?P("div",{class:e.b(),innerHTML:t.rawContent},null):P("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",b({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;i((()=>t.manualKey),((t,e)=>{G(t)&&t!==e&&(o=!0)}));return{renderComp:(a,s)=>{if(!o)return n.vNode;if(o=!1,a){const o={...a.props};delete o.onVnodeUnmounted,delete o.ref;const s=y(a.type,{...o,...e,key:t.manualKey});return n.vNode=s,s}}}},render(){return P(w("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",b({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Vt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,l=t.controller.model.controls,c=m({});return!1===i.controlType.endsWith("EXPBAR")&&(_(i.width)||(i.width>0&&i.width<=1?c.width="".concat(100*i.width,"%"):c.width="".concat(i.width,"px")),_(i.height)||(i.height>0&&i.height<=1?c.width="".concat(100*i.height,"%"):c.height="".concat(i.height,"px"))),{ns:e,typeClass:s,sysCssName:r,inlineStyle:c,codeName:a,controls:l,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:s}=this.controller;let r=null;if(o.isCreated&&a){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},a=e[n];e[n]=a?()=>a(o):()=>{const e=w("IBizControlShell");return y(e,{modelData:t,...o})}}));const n=s[a.name];r=y(w(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return P("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[r||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",b({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){h("ctx").evt.emit("onForecast",t.modelData.name);const e=v(!1),n=v(""),o=v();J(t.modelData).then((t=>{t?o.value=t:n.value="未找到对应部件的适配器",e.value=!0})).catch((t=>{ibiz.log.error(t),n.value=t.message,e.value=!0}));return{ns:Vt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):D(P("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[E("loading"),!this.isComplete]])}})),t("IBizViewShell",b({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Vt("view-shell"),n=v(!1),o=v(""),a=v(),s=v();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new B("未找到视图模型");if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new B("".concat(e.codeName,"无实体,暂不支持加载动态模型"));const o=t.params||{},a=await Y(n,t.context,{viewParams:o,appId:e.appId});if(o.srfdatatype&&(a.srfdatatype=o.srfdatatype),o.srfwftag)a.srfwftag=o.srfwftag;else if(n&&e.enableWF){const o={...t.context};if(a.srfkey){const s=_(t.context.srfsessionid)||W(t.context.srfsessionid),i=r();if(s){const t=ibiz.uiDomainManager.create(i);o.srfsessionid=t.id}const l=ibiz.hub.getApp(e.appId),c=await l.deService.getService(t.context,n),u=await c.get(o,t.params||{});if(u.ok&&u.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:s}=u.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;_(e.processDefinitionKey)&&(e.processDefinitionKey=o),_(e.taskDefinitionKey)&&(e.taskDefinitionKey=s)}}s&&ibiz.uiDomainManager.destroy(i)}}s.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else s.value=e;try{a.value=await Z(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:s,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):D(P("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[E("loading"),!this.isComplete]])}})),t("IBizCodeList",b({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const a=Vt("code-list"),s=v([]),r=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",l=(null==(o=t.codeList)?void 0:o.valueSeparator)||",";i(s,(t=>{let n="";t.length>0&&(n=t.map((t=>t.text)).join(r)),e("infoTextChange",n)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};i((()=>t.value),((e,n)=>{if(e!==n)if(_(e)||""===e)s.value=[];else{let n;n="string"==typeof e?e.split(l):[e],s.value=n.map((e=>{const n=c(t.codeListItems,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u="未定义"===t.codeList.emptyText?"- - -":t.codeList.emptyText;return{items:s,ns:a,emptyText:u,textSeparator:r}},render(){return P("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,P("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&P(w("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",b({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(h("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",b({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"}},setup:()=>({ns:Vt("badge")}),render(){return P("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class Qt extends tt{}t("PanelContainerState",Qt);class Jt extends et{createState(){var t;return new Qt(null==(t=this.parent)?void 0:t.state)}}function Yt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("PanelContainerController",Jt);const Zt=b({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Jt,required:!0}},setup(t){const e=Vt("panel-container"),{id:n}=t.modelData,o=I((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=P(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Yt(n=o.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Yt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return P("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?P("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class te{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Jt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",$t(Zt,(function(t){t.component(Zt.name,Zt),nt("CONTAINER",(()=>new te)),nt("CONTAINER_DEFAULT",(()=>new te))})));const ee=b({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){h("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Vt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),P("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?"未提供".concat(this.modelData.id,"插槽"):"")])}});class ne extends et{bindControl(t){this.control=t,t.evt.onAll(((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})}))}}t("PanelCtrlPosController",ne);class oe{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new ne(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",$t(ee,(function(t){t.component(ee.name,ee),nt("CTRLPOS",(()=>new oe))})));class ae extends et{}function se(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("ScrollContainerItemController",ae);const re=t("ScrollContainerItem",b({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=Vt("scroll-container-item"),{id:n}=t.modelData,o=I((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return P(w("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},se(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},se(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class ie{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ae(t,e,n);return await o.init(),o}}class le extends et{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",le);const ce=t("ScrollContainer",b({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:le,required:!0}},setup(t){const e=Vt("scroll-container"),{id:n}=t.modelData,o=I((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,a=null,s=null,r=null;const i={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach((t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,i.left={width:l};break;case"EAST":a=t,i.right={width:l};break;case"NORTH":o=t,i.top={height:c};break;case"SOUTH":s=t,i.bottom={height:c};break;case"CENTER":r=t;break;default:ibiz.log.debug("未适配的布局占位".concat(e.modelData.layoutPos.layoutPos))}}));for(const t in i)(i[t].width||i[t].height)&&(i[t].flexShrink=0);return P("div",{class:this.classArr},[P("div",{class:[this.ns.e("header")],style:i.top},[o]),P("div",{class:[this.ns.b("content")]},[P("div",{class:this.ns.be("content","left"),style:i.left},[n]),P("div",{class:this.ns.be("content","center")},[r]),P("div",{class:this.ns.be("content","right"),style:i.right},[a])]),P("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class ue{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new le(t,e,n);return await o.init(),o}}t("IBizScrollContainer",$t(ce,(function(t){t.component(ce.name,ce),t.component(re.name,re),nt("CONTAINER_CONTAINER_SCROLL",(()=>new ue)),nt("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new ie)),nt("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new ie))})));class de extends tt{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",de);const pe=["is404","isRoutePushed"];class he extends et{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find((t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map((t=>t.toLowerCase())),!0))),this.panel.evt.on("onControlEvent",(t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}}));const e=this.rawItemParams.expmode||this.panel.view.params.expmode;"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new de(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(q(this.state.navViewMsgs[e],t),pe.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new ot({mode:this.routeDepth?at.ROUTE:at.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Wt(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){var e,n;const o=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=o,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Wt(this.route,this.routeDepth,!1);(null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/404")):this.router.push("".concat(n,"/404"))}else if(this.state.navViewMsgs[o].fullPath&&this.getExpItemIsCache(t))(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[o].fullPath):this.router.push(this.state.navViewMsgs[o].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(o),ibiz.commands.execute(st.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",replace:!this.state.currentKey,...t.modalOptions})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function me(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("NavPosController",he);const fe=b({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:he,required:!0}},setup(t){const e=t.controller,n=Vt("nav-pos"),o=F(),a=$();if(e.setRouter(o),e.routeDepth){const t=Wt(a,e.routeDepth);i((()=>a.fullPath),(()=>{const n=Wt(a,e.routeDepth);t===n&&a.matched.length>e.routeDepth&&e.onRouteChange(a)}),{immediate:!0})}return{ns:n,c:e,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:s}=e;let r=null;if(e.routeOpen)r=P(w("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?P(t,null,null):null;return s?P(w("keepAlive"),{include:o,max:30,isKey:!0},me(e)?e:{default:()=>[e]}):e}});else{const t=n?y(w("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?P(w("keepAlive"),{include:o,max:30,isKey:!0},me(t)?t:{default:()=>[t]}):t}return P("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class ge{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new he(t,e,n);return await o.init(),o}}t("IBizNavPos",$t(fe,(function(t){t.component(fe.name,fe),nt("RAWITEM_NAV_POS",(()=>new ge))})));class ve extends tt{}class ye extends et{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new ve(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.state.required=!this.model.allowEmpty,this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await rt(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:it.ENTER,event:t})}}t("PanelFieldController",ye);const we=b({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:ye,required:!0}},setup(t){const e=Vt("panel-field"),n=I((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.model.editor.readOnly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t)};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=w(this.controller.editorProvider.formEditor);t=y(n,{...e})}else t=P(w("not-supported-editor"),{modelData:this.modelData.editor},null)}return P("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class Ce{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new ye(t,e,n);return await o.init(),o}}t("IBizPanelField",$t(we,(function(t){t.component(we.name,we),nt("FIELD",(()=>new Ce))})));class be extends et{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",be);const Ie=b({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:be,required:!0}},setup(t){const e=Vt("panel-rawitem"),n=v(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=I((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:a,tempStyle:n}},render(){if(this.controller.state.visible)return P("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[P(w("iBizRawItem"),{rawItem:this.modelData},null)])}});class Pe{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new be(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",$t(Ie,(function(t){t.component(Ie.name,Ie),nt("RAWITEM",(()=>new Pe)),nt("RAWITEM_STATIC_IMAGE",(()=>new Pe)),nt("RAWITEM_STATIC_LABEL",(()=>new Pe)),nt("RAWITEM_STATIC_TEXT",(()=>new Pe))})));class De extends tt{constructor(){super(...arguments),this.data={}}}class Ee{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new De,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=lt(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const s=this.parent.providers[t.id];if(!s)return;const r=await s.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!ct(t)?await this.initChildrenController(t.panelItems,e,r):(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initChildrenController(t.panelTabPages,e,r)})))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async panelStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}class Ne extends tt{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Ne);class Oe extends et{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Ne(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await ut(t);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!ct(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new L(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=lt(this.model),n=t.map((t=>new dt(e,t)));this.dataItems=n.map((t=>new Ee(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(pt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new k(this.model,"没有配置实体逻辑");if(!t)throw new k(this.model,"没有配置实体");const n=await ht(e,t,this.panel.context,[],this.panel.params);if(!n)throw new B("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new k(this.model,"没有配置实体行为");if(!e)throw new k(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",Oe);const Ae=b({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Oe,required:!0}},setup(t){const e=Vt("multi-data-container"),{id:n}=t.modelData;i((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=m(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=m(n.state)}))}))}),{immediate:!0});const o=h("renderPanelItem"),a=I((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map(((t,e)=>{const n=this.controller.dataItems[e];return P(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return P(w("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!N(a)?e:{default:()=>[e]});var a}))]}})})),P("div",{class:this.classArr},[t])}});class xe{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Oe(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",$t(Ae,(function(t){t.component(Ae.name,Ae),nt("CONTAINER_CONTAINER_MULTIDATA",(()=>new xe))})));class Se extends tt{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Se);class Re extends et{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Se(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const s=await ut(t);if(!s)return;this.providers[t.id]=s;const r=await s.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!ct(t)&&await this.initPanelItemControllers(t.panelItems,e,r),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,r)})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new k(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new L(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=lt(this.model),a=o.map((t=>t.id)),s=new dt(o,t);s._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=s,this.childrenStateNotify(pt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new k(this.model,"没有配置实体逻辑");if(!t)throw new k(this.model,"没有配置实体");const n=await ht(e,t,this.panel.context,[],this.panel.params);if(!n)throw new B("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new k(this.model,"没有配置实体行为");if(!e)throw new k(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}t("SingleDataContainerController",Re);const ze=b({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Re,required:!0}},setup(t){const e=Vt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=m(n.state)}));const o=h("renderPanelItem"),a=I((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():P(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const n=this.controller.panelItems[t.id];return P(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!N(o)?e:{default:()=>[e]});var o}))]}}),P("div",{class:this.classArr},[t])}});class Te{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Re(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",$t(ze,(function(t){t.component(ze.name,ze),nt("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Te))})));class Be extends tt{}t("GridContainerState",Be);class je extends et{createState(){var t;return new Be(null==(t=this.parent)?void 0:t.state)}}function Ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("GridContainerController",je);const Le=b({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:je,required:!0}},setup(t){const e=Vt("grid-container"),{id:n}=t.modelData,o=I((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=I((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),s=v(void 0),r=v(12);return{ns:e,classArr:o,layoutModel:a,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:r,adaptCols:s}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return P(w("iBizRow"),{class:this.classArr,layout:this.layoutModel},Ve(n=o.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Ve(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class ke{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new je(t,e,n);return await o.init(),o}}t("IBizGridContainer",$t(Le,(function(t){t.component(Le.name,Le),nt("CONTAINER_CONTAINER_GRID",(()=>new ke))})));class Me extends tt{}t("PanelContainerImageState",Me);class _e extends et{createState(){var t;return new Me(null==(t=this.parent)?void 0:t.state)}}function Ge(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}t("PanelContainerImageController",_e);const We=b({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:_e,required:!0}},setup(t){const e=Vt("panel-container-image"),{id:n}=t.modelData,o=I((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=I((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=V(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=P(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ge(n=o.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ge(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return P("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?P("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class qe{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new _e(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",$t(We,(function(t){t.component(We.name,We),nt("CONTAINER_CONTAINER_IMAGE",(()=>new qe))})));class $e extends tt{}t("PanelContainerGroupState",$e);class Fe extends et{createState(){var t;return new $e(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Fe);class Ue{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Fe(t,e,n);return await o.init(),o}}function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}const He=b({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Fe,required:!0}},setup(t){const e=Vt("panel-container-group"),n=v(!t.controller.defaultExpansion);return{ns:e,captionText:I((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],s=P(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ke(n=a.map((t=>{const e=t.props;return e&&e.controller?P(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ke(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=P("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[P("div",{class:[this.ns.be("header","left")]},[P("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),P("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?P("ion-icon",{name:"caret-forward-sharp"},null):P("ion-icon",{name:"caret-down-sharp"},null))])])),P("div",{class:o},[r,P("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",$t(He,(function(t){t.component(He.name,He),nt("CONTAINER_CONTAINER_GROUP",(()=>new Ue))})));function Xe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!N(t)}const Qe=b({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:et,required:!0}},setup(t){const e=Vt("panel-tab-page"),n=I((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return P(w("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Xe(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return P(w("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Xe(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class Je{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new et(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",$t(Qe,(function(t){t.component(Qe.name,Qe),nt("TABPAGE",(()=>new Je))})));class Ye extends et{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?mt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const Ze=b({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:Ye,required:!0}},setup(t){var e;const n=Vt("panel-item-render"),o=Vt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,s=I((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=I((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:s,htmlCode:r}},render(){return P("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class tn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new Ye(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",$t(Ze,(function(t){t.component(Ze.name,Ze),nt("PREDEFINE_RENDER",(()=>new tn))}))),t("AppRedirectView",b({setup(){var t;const e=M.create((null==(t=ibiz.appData)?void 0:t.context)||{});O((()=>{e.destroy()}));const{href:n}=window.location;A((()=>ibiz.util.hiddenAppLoading())),async function(){await ft(e,n)}()},render:()=>P("div",null,[x("重定向跳转中")])}));class en{constructor(){this.component="IBizView"}}const nn=b({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(){const t=Vt("view"),e=Xt(((...t)=>new gt(...t))),n=vt(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=I((()=>[t.b(),t.b(r),t.m(s),i,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""]));return{c:e,controls:n,viewClassNames:l,onLayoutPanelCreated:t=>{e.setLayoutPanel(t)},renderViewMessage:n=>{if(e.state.isCreated){const o=e.state.viewMessages[n];if(null==o?void 0:o.length)return P(w("view-message"),{class:[t.e("".concat(n.toLowerCase(),"-message"))],messages:o},null)}return null}}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};if((null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a({modelData:t,...o}));const s=this.c.providers[e];s&&(n[e]=()=>{const e=w(s.component);return y(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=P("span",{style:"color:red;"},[x("视图类型"),this.modelData.viewType,x("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=y(w(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return D(P("div",{class:this.viewClassNames,id:this.c.id},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[E("loading"),this.c.state.isLoading]])}});t("IBizView",$t(nn,(function(t){t.component(nn.name,nn),yt("DEFAULT",(()=>new en))}))),t("TodoRedirect",b({setup(){const t=F(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=U.parse(o,{delimiter:";"}),{apptype:s,todotype:r,todoid:i}=a,l={srfapptype:"pc",srfapp:""};s||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(i,"/getlinkurl"),l)).data.linkurl;s?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(r),t.push("/index".concat(e)))}()},render:()=>P("div",null,[x("待办列表重定向")])}));class on{constructor(){this.component="IBizPortalView"}}const an=b({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=Vt("view"),n=Xt(((...t)=>new gt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:s,codeName:r}=n.model,i=a.toLowerCase(),l=null==s?void 0:s.cssName,c=[e.b(),e.b(i),e.m(r),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a(o));const s=this.c.providers[e];s&&(n[e]=()=>{const e=w(s.component);return y(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return P("div",{class:this.viewClassNames},[e])}}),sn=(t("IBizPortalView",$t(an,(function(t){t.component(an.name,an),yt(K.APP_PORTAL_VIEW,(()=>new on)),yt(K.DE_PORTAL_VIEW,(()=>new on)),yt(K.DE_PORTAL_VIEW9,(()=>new on))}))),b({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Xt(((...t)=>new gt(...t))),n=v(),o=v(),a=v();return e.evt.on("onCreated",(()=>{wt(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new B("嵌入重定向视图不支持url跳转");n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?y(w("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):D(P("div",{style:"width: 100%; height: 100%;"},null),[[E("loading"),!this.toViewId]])}}));class rn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",$t(sn,(function(t){t.component(sn.name,sn);const e=new rn;yt(K.DE_REDIRECT_VIEW,(()=>e))})));const ln=b({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:e}){const n=Bt(((...e)=>new Ct(...e,t.container))),o=Vt("control-".concat(n.model.controlType.toLowerCase()));i((()=>t.data),(t=>{t&&(n.setInputData(t),n.load())}),{immediate:!0}),n.evt.on("onCreated",(()=>{Object.keys(n.panelItems).forEach((t=>{const e=n.panelItems[t];e.state=m(e.state)}))}));const a=(t,o)=>{var s,r;if(t.hidden)return null;const{providers:i,panelItems:l}=o||n,c=i[t.id];if(!c)return P("div",null,[x("暂未支持的面板项: "),t.id,x(" - "),t.itemType]);const u=w(c.component);let d;"CTRLPOS"===t.itemType&&e[t.id]?d=()=>e[t.id]():"TABPANEL"===t.itemType&&(null==(s=t.panelTabPages)?void 0:s.length)?d=()=>t.panelTabPages.map((t=>a(t,o))):ct(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>a(t,o))));let p="";return t.cssStyle&&(p=t.cssStyle),y(u,{modelData:t,controller:l[t.id],key:t.id,style:p},d)};return C("renderPanelItem",a),{c:n,ns:o,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return P(w("iBizControlBase"),{controller:this.c},{default:()=>[P(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",P(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!N(o)?e:{default:()=>[e]});var o})))]}})]})}});class cn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",$t(ln,(function(t){t.component(ln.name,ln),bt(It.VIEW_LAYOUT_PANEL,(()=>new cn))})));function un(t,e,n){var o,a;if(t.hidden)return;const{providers:s,panelItems:r}=e,i=s[t.id];if(!i)return P("div",null,[x("暂未支持的面板项: "),t.id,x(" - "),t.itemType]);const l=w(i.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>un(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>un(t,e,n))));let u="";return t.cssStyle&&(u=t.cssStyle),y(l,{modelData:t,controller:r[t.id],key:t.id,style:u},c)}const dn=b({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const e=Bt(((...e)=>new Pt(...e,t.container))),n=Vt("control-".concat(e.model.controlType.toLowerCase()));return i((()=>t.data),(t=>{t&&(e.setInputData(t),e.load())}),{immediate:!0}),e.evt.on("onCreated",(()=>{Object.keys(e.panelItems).forEach((t=>{const n=e.panelItems[t];n.state=m(n.state)}))})),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return P(w("iBizControlBase"),{controller:this.c},{default:()=>[P(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",P(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=un(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!N(o)?e:{default:()=>[e]});var o})))]}})]})}});class pn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",$t(dn,(function(t){t.component(dn.name,dn),bt(It.PANEL,(()=>new pn))})));function hn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function mn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function fn(t,e){for(var n,o="",a=0,s=-1,r=0,i=0;i<=t.length;++i){if(i<t.length)n=t.charCodeAt(i);else{if(47===n)break;n=47}if(47===n){if(s===i-1||1===r);else if(s!==i-1&&2===r){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),s=i,r=0;continue}}else if(2===o.length||1===o.length){o="",a=0,s=i,r=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(s+1,i):o=t.slice(s+1,i),a=i-s-1;s=i,r=0}else 46===n&&-1!==r?++r:r=-1}return o}var gn={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),mn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=fn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(mn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=fn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return mn(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];mn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":gn.normalize(t)},relative:function(t,e){if(mn(t),mn(e),t===e)return"";if((t=gn.resolve(t))===(e=gn.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var r=e.length-s,i=a<r?a:r,l=-1,c=0;c<=i;++c){if(c===i){if(r>i){if(47===e.charCodeAt(s+c))return e.slice(s+c+1);if(0===c)return e.slice(s+c)}else a>i&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(s+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(s+l):(s+=l,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(mn(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!a){o=s;break}}else a=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');mn(t);var n,o=0,a=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var r=e.length-1,i=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!s){o=n+1;break}}else-1===i&&(s=!1,i=n+1),r>=0&&(l===e.charCodeAt(r)?-1==--r&&(a=n):(r=-1,a=i))}return o===a?a=i:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){o=n+1;break}}else-1===a&&(s=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){mn(t);for(var e=-1,n=0,o=-1,a=!0,s=0,r=t.length-1;r>=0;--r){var i=t.charCodeAt(r);if(47!==i)-1===o&&(a=!1,o=r+1),46===i?-1===e?e=r:1!==s&&(s=1):-1!==e&&(s=-1);else if(!a){n=r+1;break}}return-1===e||-1===o||0===s||1===s&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){mn(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var s=-1,r=0,i=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===i&&(l=!1,i=c+1),46===o?-1===s?s=c:1!==u&&(u=1):-1!==s&&(u=-1);else if(!l){r=c+1;break}return-1===s||-1===i||0===u||1===u&&s===i-1&&s===r+1?-1!==i&&(e.base=e.name=0===r&&a?t.slice(1,i):t.slice(r,i)):(0===r&&a?(e.name=t.slice(1,s),e.base=t.slice(1,i)):(e.name=t.slice(r,s),e.base=t.slice(r,i)),e.ext=t.slice(s,i)),r>0?e.dir=t.slice(0,r-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};gn.posix=gn;var vn=gn,yn=hn(vn);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some((e=>"string"==typeof e?t===e:e.test(t)))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach((e=>{t.use(e)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),Ot.useComponent.callSync(null,t)}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new k(e,"配置加载失败")}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(vn.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error("配置加载失败");n=a.data}const o=new Dt(t,e,n);if(o){await this.loadPluginExternal(o.config);try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let s="";if(s=vn.join(e,o),s){if(this.cache.has(s))return;let t=null;const o=this.parseUrl(s),r=("string"==typeof a?[a]:a).map((t=>this.parseUrl(yn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new B("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new B("远程插件加载失败, 远程插件未找到[default]默认导出");this.setPluginCode(t.default),this.cache.set(s,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(vn.join(e,t));const{origin:o,pathname:a}=window.location;return a.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(a).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"]);if(e.packages){const t=e.packages;for(const e in t){const n=t[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:n});if(200!==o.status)throw new Error("配置加载失败");await this.loadPluginExternal(o.data)}}System.addImportMap(e)}handleSystemImportMap(t){if(t){if(t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map((e=>this.parseUrl(e,t.baseUrl)))}}return t}return null}});class wn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Cn(){return{value:String,controller:new wn(Object),data:new wn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function bn(){return{hasError:{type:Boolean}}}function In(){return{...Cn(),value:[String,Number]}}function Pn(){return{...Cn(),value:Number}}function Dn(){return{...Cn(),value:String}}function En(){return{...Cn(),value:[String,Number,Object,Array]}}function Nn(){return{...Cn(),value:[String,Number]}}function On(){return{...Cn(),value:[String,Number]}}function An(){return{...Cn(),value:[String,Number]}}function xn(){return{...Cn(),value:[String,Array,Object,Number]}}function Sn(){return{...Cn(),value:[String,Number]}}function Rn(){return{...Cn(),value:[String,Number]}}function zn(){return{...Cn(),value:[String,Number]}}function Tn(){return{...Cn(),value:[String,Number]}}function Bn(){return{...Cn(),value:[String,Number]}}function jn(){return{...Cn(),value:[String,Number]}}function Vn(){return{...Cn(),value:[String,Number,Array]}}function Ln(){return{...Cn(),value:[String,Number]}}function kn(){return{...Cn(),value:[String,Number]}}function Mn(){return{...Cn(),value:[String,Number]}}function _n(){return{...Cn(),value:String}}function Gn(){return{...Cn(),value:[String,Number]}}function Wn(){return{...Cn(),value:String,language:{type:String},theme:{type:String}}}function qn(){return{...Cn(),value:String}}function $n(){return{...Cn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function Fn(){return{...Cn(),value:[Array,Array]}}function Un(){return{...Cn(),value:String}}function Kn(){return{...Cn(),value:String}}t("RequiredProp",wn)}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-base.d.ts","sourceRoot":"","sources":["../../../src/common/control-base/control-base.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"control-base.d.ts","sourceRoot":"","sources":["../../../src/common/control-base/control-base.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,eAAe,EAAE,GAsH5B,CAAC"}
|
|
@@ -29,10 +29,18 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
const inlineStyle = reactive({});
|
|
30
30
|
if (model.controlType.endsWith("EXPBAR") === false) {
|
|
31
31
|
if (!isNil(model.width)) {
|
|
32
|
-
|
|
32
|
+
if (model.width > 0 && model.width <= 1) {
|
|
33
|
+
inlineStyle.width = "".concat(model.width * 100, "%");
|
|
34
|
+
} else {
|
|
35
|
+
inlineStyle.width = "".concat(model.width, "px");
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
if (!isNil(model.height)) {
|
|
35
|
-
|
|
39
|
+
if (model.height > 0 && model.height <= 1) {
|
|
40
|
+
inlineStyle.width = "".concat(model.height * 100, "%");
|
|
41
|
+
} else {
|
|
42
|
+
inlineStyle.height = "".concat(model.height, "px");
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
45
|
}
|
|
38
46
|
return {
|
|
@@ -31,10 +31,18 @@ const IBizControlBase = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
const inlineStyle = vue.reactive({});
|
|
32
32
|
if (model.controlType.endsWith("EXPBAR") === false) {
|
|
33
33
|
if (!ramda.isNil(model.width)) {
|
|
34
|
-
|
|
34
|
+
if (model.width > 0 && model.width <= 1) {
|
|
35
|
+
inlineStyle.width = "".concat(model.width * 100, "%");
|
|
36
|
+
} else {
|
|
37
|
+
inlineStyle.width = "".concat(model.width, "px");
|
|
38
|
+
}
|
|
35
39
|
}
|
|
36
40
|
if (!ramda.isNil(model.height)) {
|
|
37
|
-
|
|
41
|
+
if (model.height > 0 && model.height <= 1) {
|
|
42
|
+
inlineStyle.width = "".concat(model.height * 100, "%");
|
|
43
|
+
} else {
|
|
44
|
+
inlineStyle.height = "".concat(model.height, "px");
|
|
45
|
+
}
|
|
38
46
|
}
|
|
39
47
|
}
|
|
40
48
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.6.2
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@ibiz-template/cli": "^0.3.10",
|
|
42
|
-
"@ibiz-template/core": "^0.6.2
|
|
43
|
-
"@ibiz-template/runtime": "^0.6.2
|
|
42
|
+
"@ibiz-template/core": "^0.6.2",
|
|
43
|
+
"@ibiz-template/runtime": "^0.6.2",
|
|
44
44
|
"@ibiz-template/theme": "^0.6.0",
|
|
45
45
|
"@ibiz/model-core": "^0.1.14",
|
|
46
46
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -68,5 +68,6 @@
|
|
|
68
68
|
"ramda": "^0.29.0",
|
|
69
69
|
"vue": "^3.3.4",
|
|
70
70
|
"vue-router": "^4.2.4"
|
|
71
|
-
}
|
|
71
|
+
},
|
|
72
|
+
"gitHead": "edf5b925447f63e6a51c9bf5449241bea5ed9a41"
|
|
72
73
|
}
|