@ibiz-template/vue3-util 0.5.7-alpha.7 → 0.5.7-alpha.9
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 +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/control/panel/panel/panel.d.ts.map +1 -1
- package/es/control/panel/panel/panel.mjs +6 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts.map +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +6 -1
- package/es/panel-component/panel-rawitem/index.d.ts +1 -0
- package/es/panel-component/panel-rawitem/index.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts +1 -0
- package/es/panel-component/panel-rawitem/panel-rawitem.d.ts.map +1 -1
- package/es/panel-component/panel-rawitem/panel-rawitem.mjs +11 -2
- package/es/util/route/route.d.ts.map +1 -1
- package/es/util/route/route.mjs +6 -0
- package/package.json +4 -4
- package/src/control/panel/panel/panel.tsx +6 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +6 -0
- package/src/panel-component/panel-rawitem/panel-rawitem.tsx +11 -1
- package/src/util/route/route.ts +9 -0
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-shell{position:relative;width:100%;height:100%}.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-view-shell{position:relative;width:100%;height:100%}.ibiz-
|
|
1
|
+
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-code-list__item{display:flex;align-items:center;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-view-shell{position:relative;width:100%;height:100%}.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-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.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-multi-data-container{width:100%;height:100%}.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-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-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-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/core","ramda","qx-util","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;return{setters:[function(t){e=t.watch,n=t.onBeforeUnmount,o=t.createCommentVNode,a=t.getCurrentInstance,s=t.isReactive,r=t.toRaw,i=t.inject,l=t.reactive,c=t.onActivated,u=t.onDeactivated,d=t.ref,p=t.h,h=t.resolveComponent,m=t.provide,f=t.defineComponent,g=t.computed,v=t.createVNode,y=t.withDirectives,w=t.resolveDirective,C=t.isVNode,b=t.onUnmounted,I=t.onMounted,P=t.createTextVNode},function(t){D=t.onClickOutside,E=t.NOOP,N=t.listenJSEvent,O=t.Namespace,A=t.RuntimeError,x=t.isBase64Image,S=t.isSvg,R=t.ModelError,z=t.RuntimeModelError,T=t.IBizContext},function(t){B=t.isNil,j=t.isNotNil,V=t.isEmpty,L=t.mergeLeft},function(t){k=t.isFunc,M=t.notNilEmpty,_=t.QXEvent,G=t.clearAll,W=t.createUUID},function(t){q=t.useRoute,$=t.useRouter},function(t){F=t.default},function(t){U=t.ViewType,K=t.RouteConst,H=t.getMatchResPath,X=t.calcDeCodeNameById,Q=t.getControlProvider,J=t.calcDynaSysParams,Y=t.getViewProvider,Z=t.PanelItemState,tt=t.PanelItemController,et=t.registerPanelItemProvider,nt=t.Modal,ot=t.ViewMode,at=t.OpenAppViewCommand,st=t.getEditorProvider,rt=t.PanelItemEventName,it=t.getAllPanelField,lt=t.isDataContainer,ct=t.getPanelItemProvider,ut=t.PanelData,dt=t.PanelNotifyState,pt=t.execDELogicById,ht=t.ScriptFactory,mt=t.toLocalOpenWFRedirectView,ft=t.ViewController,gt=t.getControlsByView,vt=t.registerViewProvider,yt=t.getDERedirectToView,wt=t.ViewLayoutPanelController,Ct=t.registerControlProvider,bt=t.ControlType,It=t.PanelController,Pt=t.RemotePluginItem},function(t){Dt=t.defineStore,Et=t.createPinia}],execute:function(){function Nt(t,o,a={}){let s=E,r=E,i=E;const l=()=>{s(),s=E,r=E,i=E};return e(t,((t,e)=>{if(t!==e)if(B(t))l();else{const e=D((null==t?void 0:t.$el)||t,o,a);s=e.stop,r=e.pause,i=e.proceed}}),{immediate:!0}),n((()=>{s!==E&&l()})),{stop:()=>s(),pause:()=>r(),proceed:()=>i()}}function Ot(){return a().proxy.$props}function At(t){return s(t)?r(t):t}function xt(){const t=a().proxy;return e=>{t.$forceUpdate(),e&&k(e)&&t.$nextTick((()=>{e()}))}}t({calcResRoutePath:Mt,createOverlayView:$t,generateRoutePath:async function(t,e,n,o){const a=jt(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:Lt(n),params:o}),2===s&&(await Mt(a,n,t.appDataEntityId,t.appId),kt.includes(t.viewType))){const e=X(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:Vt(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=jt(e);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(K.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Lt(n),params:o}),{path:Vt(a)}},getArrayProps:qn,getAutoCompleteProps:Mn,getCascaderProps:$n,getCheckboxListProps:En,getCheckboxProps:Nn,getCodeProps:_n,getColorPickerProps:Fn,getDataPickerProps:On,getDatePickerProps:An,getDateRangeProps:xn,getDrawerPlacement:function(t){return Ft[t]||"right"},getDropdownProps:Dn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:yn,getGridArrayProps:function(){return{...qn(),...wn()}},getGridAutoCompleteProps:function(){return{...Mn(),...wn()}},getGridCascaderProps:function(){return{...$n(),...wn()}},getGridCheckboxListProps:function(){return{...En(),...wn()}},getGridCheckboxProps:function(){return{...Nn(),...wn()}},getGridCodeProps:function(){return{..._n(),...wn()}},getGridColorPickerProps:function(){return{...Fn(),...wn()}},getGridDataPickerProps:function(){return{...On(),...wn()}},getGridDatePickerProps:function(){return{...An(),...wn()}},getGridDateRangeProps:function(){return{...xn(),...wn()}},getGridDropdownProps:function(){return{...Dn(),...wn()}},getGridEditorCommonProps:wn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Gn(),...wn()}},getGridInputIpProps:function(){return{...In(),...wn()}},getGridInputNumberProps:function(){return{...bn(),...wn()}},getGridInputProps:function(){return{...Cn(),...wn()}},getGridListBoxProps:function(){return{...Sn(),...wn()}},getGridMarkDownProps:function(){return{...Wn(),...wn()}},getGridNumberRangeProps:function(){return{...Rn(),...wn()}},getGridRadioProps:function(){return{...zn(),...wn()}},getGridRateProps:function(){return{...Tn(),...wn()}},getGridRawProps:function(){return{...Bn(),...wn()}},getGridSliderProps:function(){return{...jn(),...wn()}},getGridSpanProps:function(){return{...Pn(),...wn()}},getGridStepperProps:function(){return{...Vn(),...wn()}},getGridSwitchProps:function(){return{...Ln(),...wn()}},getGridUploadProps:function(){return{...kn(),...wn()}},getHtmlProps:Gn,getInputIpProps:In,getInputNumberProps:bn,getInputProps:Cn,getListBoxProps:Sn,getMarkDownProps:Wn,getNestedRoutePath:_t,getNumberRangeProps:Rn,getOrigin:At,getOwnRouteContext:Lt,getRadioProps:zn,getRateProps:Tn,getRawProps:Bn,getSliderProps:jn,getSpanProps:Pn,getStepperProps:Vn,getSwitchProps:Ln,getUploadProps:kn,isEmptyVNode:function(t){if(!Array.isArray(t))return t===St;return 1===t.length&&t[0]===St},onRouteChange:function(t,n){const o=q();if(!o)throw new A("无法正确获取route,可能是依赖问题");e((()=>null==o?void 0:o.path),(()=>{const e=_t(o,n);t({currentKey:e,fullPath:o.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer($t(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow($t(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal($t(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover($t(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var o;const a=jt(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new A("第".concat(e,"级路由不存在视图标识"));s===K.ROUTE_MODAL_TAG&&(s=a.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const r=await ibiz.hub.getAppView(s);if(!r)throw new A("找不到视图".concat(s));const i={};(null==(o=ibiz.appData)?void 0:o.context)&&Object.assign(i,ibiz.appData.context);a.appContext&&Object.assign(i,a.appContext);if(1!==e)for(let t=0;t<e;t++){const e=a.pathNodes[t];M(e.context)&&Object.assign(i,e.context)}const{params:l,srfnav:c}=a.pathNodes[e-1];return{viewModel:r,context:i,params:l,srfnav:c}},prepareControl:function(t){const e=Bt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=Bt("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(B(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:jt,routePath2string:Vt,useClickOutside:Nt,useControlController:zt,useController:function(t){t.force=xt()},useCtx:Rt,useEventListener:Tt,useFocusAndBlur:function(t,e){const n=d(),o=d(!1);let a;const s=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return Tt(n,"click",(e=>{o.value||(a=Nt(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:xt,useForceTogether:function(t,e){const n=e.force,o=xt();e.force=t=>{n(t),o()}},useMobCtx:function(){return i("ctx")},useNamespace:Bt,useProps:Ot,usePropsWatch:function(t,n,o){const a=Ot();Object.prototype.hasOwnProperty.call(a,t)&&(e((()=>a[t]),((t,e)=>{n(At(t),At(e))}),o),n(At(a[t]),void 0))},useRouteKey:function(t,n,o){o||(o=d(""));o.value=t.value;const a=new Gt(n);return e(t,((t,e)=>{t!==e&&a.nextChange((()=>{o.value=t}))})),o},useRouterQuery:function(){const t=q(),{query:e}=t;return e},useViewController:Kt});const St=t("EmptyVNode",o("EmptyVNode"));function Rt(){return i("ctx")}function zt(t,o){const s=Rt(),r=Ot();s.evt.emit("onForecast",r.modelData.name);const i=r.provider;let d;d=(null==i?void 0:i.createController)?i.createController(r.modelData,r.context,r.params,s):t(r.modelData,r.context,r.params,s),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.updateContextParams({...t}),ibiz.log.debug("".concat(n.model.id,"的上下文或视图参数变更:"),t)}))}(r,d),function(t,n,o=[]){const a=["context","params","modelData",...o];e((()=>{const e={};return Object.keys(t).forEach((n=>{a.includes(n)||(e[n]=t[n])})),e}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug("部件 [".concat(n.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(n.state[t]=o[t])}))}),{immediate:!0})}(r,d,null==o?void 0:o.excludePropsKeys),d.state=l(d.state),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=xt();const p=a().proxy;return d.evt.onAll(((t,e)=>{p.$emit(t.slice(2),e)})),p.$emit("controllerAppear",d),d.created(),n((()=>d.destroyed())),d}function Tt(t,o,a,s={}){let r=E;return e(t,((t,e)=>{t!==e&&(B(t)?(r(),r=E):r=N((null==t?void 0:t.$el)||t,o,a,s))}),{immediate:!0}),n((()=>{r!==E&&r()})),()=>{r()}}function Bt(t){return new O(t,ibiz.env.namespace)}function jt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(K.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?F.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=F.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:r,pathNodes:s}}function Vt(t){let e="";return t.appContext?e+="/".concat(F.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)M(t.context)&&(o=t.context);else{if(o=M(t.params)?t.params:{},M(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=F.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});M(a)?e+=a:e+=ibiz.env.routePlaceholder})),e}function Lt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const kt=t("excludeViewTypes",[U.DE_GRID_VIEW,U.DE_GRID_EXP_VIEW,U.DE_LIST_VIEW,U.DE_LIST_EXP_VIEW,U.DE_DATA_VIEW,U.DE_DATAVIEW_EXP_VIEW,U.DE_CALENDAR_VIEW,U.DE_CALENDAR_EXP_VIEW,U.DE_CHART_VIEW,U.DE_CHART_EXP_VIEW,U.DE_KANBAN_VIEW]);async function Mt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=H(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 _t(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=jt(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,Vt(o))}class Gt{constructor(t,n){this.callbacks=[],this.timers=[],this.wait=500,n&&(this.wait=n),e((()=>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",Gt);const Wt=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class qt{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new _,this.init()}static createVueApp(t,e){throw new A("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=qt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>p(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){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",qt);function $t(t){return e=>{const n=h("IBizViewShell");return p(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends qt{present(t){return this.modal.present(t)}});const Ft={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Ut{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){const n=t.currentRoute.value.fullPath;t.push({path:e});const o=e;if(this.map.has(o)){return this.map.get(o).onWillDismiss()}const a=new Ut(n,o);return this.map.set(o,a),this.scheduledDestruction(a),a.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",Dt("appStore",(()=>({appStore:l({})}))));t("useUIStore",Dt("uiStore",(()=>{const t=function(){const t=d(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:l({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Et());function Kt(t){const o=Ot(),s=i("ctx",void 0);null==s||s.evt.emit("onForecast",o.modelData.name);const r=o.provider;let d;d=(null==r?void 0:r.createController)?r.createController(o.modelData,o.context,o.params,s):t(o.modelData,o.context,o.params,s),ibiz.util.viewStack.add(d.id,d),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.context.reset({},t.context),G(n.params),Object.assign(n.params,t.params),n.handleContextParams(),ibiz.log.debug("".concat(n.model.id,"的上下文或视图参数变更:"),t)}))}(o,d),function(t,n){e((()=>t.state?{...t.state}:{}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug("视图 [".concat(n.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{n.state[t]=o[t]}))}),{immediate:!0})}(o,d),m("ctx",d.ctx),d.state=l(d.state),d.slotProps=l(d.slotProps),o.modal&&(d.modal=o.modal),c((()=>{d.onActivated(),ibiz.util.viewStack.active(d.id)})),u((()=>{d.onDeactivated(),ibiz.util.viewStack.deactivate(d.id)})),d.force=xt();const p=a().proxy;return d.evt.onAll(((t,e)=>{p.$emit(t.slice(2),e)})),d.created(),n((()=>{d.destroyed(),ibiz.util.viewStack.remove(d.id)})),d}t("IBizIcon",f({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Bt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=g((()=>function(t){if(t){if(t.htmlStr)return v("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?v("i",{class:[e.b(),t.cssClass]},null):v("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return x(t.imagePath)?v("img",{class:e.b(),src:t.imagePath},null):S(t.imagePath)?v("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?v("img",{class:e.b(),src:t.imagePath},null):v("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?v("img",{class:e.b(),src:t.imagePath},null):v("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return S(t.rawContent)?v("div",{class:e.b(),innerHTML:t.rawContent},null):v("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",f({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:n}){const o={};let a=!0;e((()=>t.manualKey),((t,e)=>{j(t)&&t!==e&&(a=!0)}));return{renderComp:(e,s)=>{if(!a)return o.vNode;if(a=!1,e){const a={...e.props};delete a.onVnodeUnmounted,delete a.ref;const s=p(e.type,{...a,...n,key:t.manualKey});return o.vNode=s,s}}}},render(){return v(h("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",f({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Bt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,c=t.controller.model.controls,u=l({});return!1===i.controlType.endsWith("EXPBAR")&&(B(i.width)||(u.width="".concat(i.width,"px")),B(i.height)||(u.height="".concat(i.height,"px"))),{ns:e,typeClass:s,sysCssName:r,inlineStyle:u,codeName:a,controls:c,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=h("IBizControlShell");return p(e,{modelData:t,...o})}}));const n=s[a.name];r=p(h(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return v("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",f({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){i("ctx").evt.emit("onForecast",t.modelData.name);const e=d(!1),n=d(""),o=d();Q(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:Bt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?p(h(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):y(v("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[w("loading"),!this.isComplete]])}})),t("IBizViewShell",f({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Bt("view-shell"),n=d(!1),o=d(""),a=d(),s=d();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new A("未找到视图模型");if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new A("".concat(e.codeName,"无实体,暂不支持加载动态模型"));const o=t.params||{},a=await J(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=B(t.context.srfsessionid)||V(t.context.srfsessionid),r=W();if(s){const t=ibiz.uiDomainManager.create(r);o.srfsessionid=t.id}const i=ibiz.hub.getApp(e.appId),l=await i.deService.getService(t.context,n),c=await l.get(o,t.params||{});if(c.ok&&c.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:s}=c.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;B(e.processDefinitionKey)&&(e.processDefinitionKey=o),B(e.taskDefinitionKey)&&(e.taskDefinitionKey=s)}}s&&ibiz.uiDomainManager.destroy(r)}}s.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else s.value=e;try{a.value=await Y(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?p(h(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):y(v("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[w("loading"),!this.isComplete]])}})),t("IBizCodeList",f({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:n}){var o,a;const s=Bt("code-list"),r=d([]),i=(null==(o=t.codeList)?void 0:o.textSeparator)||"、",l=(null==(a=t.codeList)?void 0:a.valueSeparator)||",";e(r,(t=>{let e="";t.length>0&&(e=t.map((t=>t.text)).join(i)),n("infoTextChange",e)}));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}}};e((()=>t.value),((e,n)=>{if(e!==n)if(B(e)||""===e)r.value=[];else{let n;n="string"==typeof e?e.split(l):[e],r.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:r,ns:s,emptyText:u,textSeparator:i}},render(){return v("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,v("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&&v(h("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",f({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(i("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",f({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"}},setup:()=>({ns:Bt("badge")}),render(){return v("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class Ht extends Z{}t("PanelContainerState",Ht);class Xt extends tt{createState(){var t;return new Ht(null==(t=this.parent)?void 0:t.state)}}function Qt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("PanelContainerController",Xt);const Jt=f({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Xt,required:!0}},setup(t){const e=Bt("panel-container"),{id:n}=t.modelData,o=g((()=>{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=v(h("iBizRow"),{slot:"content",layout:this.modelData.layout},Qt(n=o.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Qt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?v("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Yt{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Xt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Wt(Jt,(function(t){t.component(Jt.name,Jt),et("CONTAINER",(()=>new Yt)),et("CONTAINER_DEFAULT",(()=>new Yt))})));const Zt=f({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){i("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Bt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),v("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 te extends tt{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",te);class ee{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new te(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Wt(Zt,(function(t){t.component(Zt.name,Zt),et("CTRLPOS",(()=>new ee))})));class ne extends tt{}function oe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("ScrollContainerItemController",ne);const ae=t("ScrollContainerItem",f({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ne,required:!0}},setup(t){const e=Bt("scroll-container-item"),{id:n}=t.modelData,o=g((()=>[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 v(h("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},oe(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},oe(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class se{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ne(t,e,n);return await o.init(),o}}class re extends tt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",re);const ie=t("ScrollContainer",f({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:re,required:!0}},setup(t){const e=Bt("scroll-container"),{id:n}=t.modelData,o=g((()=>[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 v("div",{class:this.classArr},[v("div",{class:[this.ns.e("header")],style:i.top},[o]),v("div",{class:[this.ns.b("content")]},[v("div",{class:this.ns.be("content","left"),style:i.left},[n]),v("div",{class:this.ns.be("content","center")},[r]),v("div",{class:this.ns.be("content","right"),style:i.right},[a])]),v("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class le{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new re(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Wt(ie,(function(t){t.component(ie.name,ie),t.component(ae.name,ae),et("CONTAINER_CONTAINER_SCROLL",(()=>new le)),et("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new se))})));class ce extends Z{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",ce);const ue=["is404","isRoutePushed"];class de extends tt{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 ce(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]?(L(this.state.navViewMsgs[e],t),ue.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 nt({mode:this.routeDepth?ot.ROUTE:ot.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=_t(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){const e=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=e,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const t=_t(this.route,this.routeDepth,!1);this.router.push("".concat(t,"/404"))}else if(this.state.navViewMsgs[e].fullPath&&this.getExpItemIsCache(t))this.router.push(this.state.navViewMsgs[e].fullPath);else{const n=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),ibiz.commands.execute(at.TAG,t.viewId,n,t.params,{openMode:"INDEXVIEWTAB"})}}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;M(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function pe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("NavPosController",de);const he=f({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:de,required:!0}},setup(t){const n=t.controller,o=Bt("nav-pos"),a=$(),s=q();if(n.setRouter(a),n.routeDepth){const t=_t(s,n.routeDepth);e((()=>s.fullPath),(()=>{const e=_t(s,n.routeDepth);t===e&&s.matched.length>n.routeDepth&&n.onRouteChange(s)}),{immediate:!0})}return{ns:o,c:n,onViewCreated:t=>{n.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=v(h("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?v(t,null,null):null;return s?v(h("keepAlive"),{include:o,max:30,isKey:!0},pe(e)?e:{default:()=>[e]}):e}});else{const t=n?p(h("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?v(h("keepAlive"),{include:o,max:30,isKey:!0},pe(t)?t:{default:()=>[t]}):t}return v("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class me{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new de(t,e,n);return await o.init(),o}}t("IBizNavPos",Wt(he,(function(t){t.component(he.name,he),et("RAWITEM_NAV_POS",(()=>new me))})));class fe extends Z{}class ge extends tt{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 fe(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 st(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:rt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:rt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:rt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:rt.ENTER,event:t})}}t("PanelFieldController",ge);const ve=f({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:ge,required:!0}},setup(t){const e=Bt("panel-field"),n=g((()=>{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=h(this.controller.editorProvider.formEditor);t=p(n,{...e})}else t=v(h("not-supported-editor"),{modelData:this.modelData.editor},null)}return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class ye{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new ge(t,e,n);return await o.init(),o}}t("IBizPanelField",Wt(ve,(function(t){t.component(ve.name,ve),et("FIELD",(()=>new ye))})));class we extends tt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",we);const Ce=f({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(t){const e=Bt("panel-rawitem"),n=g((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){if(this.controller.state.visible)return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[v(h("iBizRawItem"),{rawItem:this.modelData},null)])}});class be{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new we(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Wt(Ce,(function(t){t.component(Ce.name,Ce),et("RAWITEM",(()=>new be)),et("RAWITEM_STATIC_IMAGE",(()=>new be)),et("RAWITEM_STATIC_LABEL",(()=>new be)),et("RAWITEM_STATIC_TEXT",(()=>new be))})));class Ie extends Z{constructor(){super(...arguments),this.data={}}}class Pe{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new Ie,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=it(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)&&!lt(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 De extends Z{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",De);class Ee extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new De(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 ct(t);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!lt(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 z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new R(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=it(this.model),n=t.map((t=>new ut(e,t)));this.dataItems=n.map((t=>new Pe(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(dt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await pt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A("实体逻辑".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 z(this.model,"没有配置实体行为");if(!e)throw new z(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",Ee);const Ne=f({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ee,required:!0}},setup(t){const n=Bt("multi-data-container"),{id:o}=t.modelData;e((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=l(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=l(n.state)}))}))}),{immediate:!0});const a=i("renderPanelItem"),s=g((()=>[n.b(),n.m(o),...t.controller.containerClass]));return{ns:n,classArr:s,renderPanelItem:a}},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 v(h("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 v(h("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)&&!C(a)?e:{default:()=>[e]});var a}))]}})})),v("div",{class:this.classArr},[t])}});class Oe{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Ee(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Wt(Ne,(function(t){t.component(Ne.name,Ne),et("CONTAINER_CONTAINER_MULTIDATA",(()=>new Oe))})));class Ae extends Z{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Ae);class xe extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Ae(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 ct(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)&&!lt(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 z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new R(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=it(this.model),a=o.map((t=>t.id)),s=new ut(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(dt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await pt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A("实体逻辑".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 z(this.model,"没有配置实体行为");if(!e)throw new z(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",xe);const Se=f({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:xe,required:!0}},setup(t){const e=Bt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=l(n.state)}));const o=i("renderPanelItem"),a=g((()=>[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():v(h("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 v(h("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)&&!C(o)?e:{default:()=>[e]});var o}))]}}),v("div",{class:this.classArr},[t])}});class Re{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new xe(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Wt(Se,(function(t){t.component(Se.name,Se),et("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Re))})));class ze extends Z{}t("GridContainerState",ze);class Te extends tt{createState(){var t;return new ze(null==(t=this.parent)?void 0:t.state)}}function Be(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("GridContainerController",Te);const je=f({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Te,required:!0}},setup(t){const e=Bt("grid-container"),{id:n}=t.modelData,o=g((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=g((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),s=d(void 0),r=d(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 v(h("iBizRow"),{class:this.classArr,layout:this.layoutModel},Be(n=o.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Be(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class Ve{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Te(t,e,n);return await o.init(),o}}t("IBizGridContainer",Wt(je,(function(t){t.component(je.name,je),et("CONTAINER_CONTAINER_GRID",(()=>new Ve))})));class Le extends Z{}t("PanelContainerImageState",Le);class ke extends tt{createState(){var t;return new Le(null==(t=this.parent)?void 0:t.state)}}function Me(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("PanelContainerImageController",ke);const _e=f({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:ke,required:!0}},setup(t){const e=Bt("panel-container-image"),{id:n}=t.modelData,o=g((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=g((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=S(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=v(h("iBizRow"),{slot:"content",layout:this.modelData.layout},Me(n=o.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Me(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?v("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Ge{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new ke(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Wt(_e,(function(t){t.component(_e.name,_e),et("CONTAINER_CONTAINER_IMAGE",(()=>new Ge))})));class We extends Z{}t("PanelContainerGroupState",We);class qe extends tt{createState(){var t;return new We(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",qe);class $e{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new qe(t,e,n);return await o.init(),o}}function Fe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}const Ue=f({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:qe,required:!0}},setup(t){const e=Bt("panel-container-group"),n=d(!t.controller.defaultExpansion);return{ns:e,captionText:g((()=>{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=v(h("iBizRow"),{slot:"content",layout:this.modelData.layout},Fe(n=a.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Fe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=v("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[v("div",{class:[this.ns.be("header","left")]},[v("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),v("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?v("ion-icon",{name:"caret-forward-sharp"},null):v("ion-icon",{name:"caret-down-sharp"},null))])])),v("div",{class:o},[r,v("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",Wt(Ue,(function(t){t.component(Ue.name,Ue),et("CONTAINER_CONTAINER_GROUP",(()=>new $e))})));function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}const He=f({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:tt,required:!0}},setup(t){const e=Bt("panel-tab-page"),n=g((()=>{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 v(h("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Ke(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return v(h("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Ke(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class Xe{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new tt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Wt(He,(function(t){t.component(He.name,He),et("TABPAGE",(()=>new Xe))})));class Qe extends tt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?ht.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const Je=f({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:Qe,required:!0}},setup(t){var e;const n=Bt("panel-item-render"),o=Bt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,s=g((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=g((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:s,htmlCode:r}},render(){return v("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class Ye{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new Qe(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Wt(Je,(function(t){t.component(Je.name,Je),et("PREDEFINE_RENDER",(()=>new Ye))}))),t("AppRedirectView",f({setup(){var t;const e=T.create((null==(t=ibiz.appData)?void 0:t.context)||{});b((()=>{e.destroy()}));const{href:n}=window.location;I((()=>ibiz.util.hiddenAppLoading())),async function(){await mt(e,n)}()},render:()=>v("div",null,[P("重定向跳转中")])}));class Ze{constructor(){this.component="IBizView"}}const tn=f({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=Bt("view"),e=Kt(((...t)=>new ft(...t))),n=gt(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=g((()=>[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 v(h("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(o));const s=this.c.providers[e];s&&(n[e]=()=>{const e=h(s.component);return p(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=v("span",{style:"color:red;"},[P("视图类型"),this.modelData.viewType,P("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=p(h(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return y(v("div",{class:this.viewClassNames,id:this.c.id},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[w("loading"),this.c.state.isLoading]])}});t("IBizView",Wt(tn,(function(t){t.component(tn.name,tn),vt("DEFAULT",(()=>new Ze))}))),t("TodoRedirect",f({setup(){const t=$(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=F.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:()=>v("div",null,[P("待办列表重定向")])}));class en{constructor(){this.component="IBizPortalView"}}const nn=f({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=Bt("view"),n=Kt(((...t)=>new ft(...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=h(s.component);return p(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return v("div",{class:this.viewClassNames},[e])}}),on=(t("IBizPortalView",Wt(nn,(function(t){t.component(nn.name,nn),vt(U.APP_PORTAL_VIEW,(()=>new en)),vt(U.DE_PORTAL_VIEW,(()=>new en)),vt(U.DE_PORTAL_VIEW9,(()=>new en))}))),f({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Kt(((...t)=>new ft(...t))),n=d(),o=d(),a=d();return e.evt.on("onCreated",(()=>{yt(r(t.modelData),r(e.context),r(e.params)).then((async t=>{if("view"!==t.type)throw new A("嵌入重定向视图不支持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?p(h("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):y(v("div",{style:"width: 100%; height: 100%;"},null),[[w("loading"),!this.toViewId]])}}));class an{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Wt(on,(function(t){t.component(on.name,on);const e=new an;vt(U.DE_REDIRECT_VIEW,(()=>e))})));const sn=f({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:n}){const o=zt(((...e)=>new wt(...e,t.container))),a=Bt("control-".concat(o.model.controlType.toLowerCase()));e((()=>t.data),(t=>{t&&(o.setInputData(t),o.load())}),{immediate:!0}),o.evt.on("onCreated",(()=>{Object.keys(o.panelItems).forEach((t=>{const e=o.panelItems[t];e.state=l(e.state)}))}));const s=(t,e)=>{var a,r;if(t.hidden)return null;const{providers:i,panelItems:l}=e||o,c=i[t.id];if(!c)return v("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const u=h(c.component);let d;return"CTRLPOS"===t.itemType&&n[t.id]?d=()=>n[t.id]():"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?d=()=>t.panelTabPages.map((t=>s(t,e))):lt(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>s(t,e)))),p(u,{modelData:t,controller:l[t.id],key:t.id},d)};return m("renderPanelItem",s),{c:o,ns:a,renderPanelItem:s}},render(){const{state:t,model:e}=this.c;return v(h("iBizControlBase"),{controller:this.c},{default:()=>[v(h("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",v(h("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!C(o)?e:{default:()=>[e]});var o})))]}})]})}});class rn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Wt(sn,(function(t){t.component(sn.name,sn),Ct(bt.VIEW_LAYOUT_PANEL,(()=>new rn))})));function ln(t,e,n){var o,a;if(t.hidden)return;const{providers:s,panelItems:r}=e,i=s[t.id];if(!i)return v("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const l=h(i.component);let c;return"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=>ln(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>ln(t,e,n)))),p(l,{modelData:t,controller:r[t.id],key:t.id},c)}const cn=f({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 n=zt(((...e)=>new It(...e,t.container))),o=Bt("control-".concat(n.model.controlType.toLowerCase()));return e((()=>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=l(e.state)}))})),{c:n,ns:o}},render(){const{state:t,model:e}=this.c;return v(h("iBizControlBase"),{controller:this.c},{default:()=>[v(h("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",v(h("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=ln(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!C(o)?e:{default:()=>[e]});var o})))]}})]})}});class un{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Wt(cn,(function(t){t.component(cn.name,cn),Ct(bt.PANEL,(()=>new un))})));function dn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function hn(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 mn={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),pn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=hn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(pn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=hn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return pn(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];pn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":mn.normalize(t)},relative:function(t,e){if(pn(t),pn(e),t===e)return"";if((t=mn.resolve(t))===(e=mn.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(pn(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');pn(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){pn(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){pn(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};mn.posix=mn;var fn=mn,gn=dn(fn);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),window.vueInstances.forEach((e=>{e.use(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 z(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(fn.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 Pt(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=fn.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(gn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new A("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new A("远程插件加载失败, 远程插件未找到[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(fn.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 vn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function yn(){return{value:String,controller:new vn(Object),data:new vn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function wn(){return{hasError:{type:Boolean}}}function Cn(){return{...yn(),value:[String,Number]}}function bn(){return{...yn(),value:Number}}function In(){return{...yn(),value:String}}function Pn(){return{...yn(),value:[String,Number,Object,Array]}}function Dn(){return{...yn(),value:[String,Number]}}function En(){return{...yn(),value:[String,Number]}}function Nn(){return{...yn(),value:[String,Number]}}function On(){return{...yn(),value:[String,Array,Object,Number]}}function An(){return{...yn(),value:[String,Number]}}function xn(){return{...yn(),value:[String,Number]}}function Sn(){return{...yn(),value:[String,Number]}}function Rn(){return{...yn(),value:[String,Number]}}function zn(){return{...yn(),value:[String,Number]}}function Tn(){return{...yn(),value:[String,Number]}}function Bn(){return{...yn(),value:[String,Number,Array]}}function jn(){return{...yn(),value:[String,Number]}}function Vn(){return{...yn(),value:[String,Number]}}function Ln(){return{...yn(),value:[String,Number]}}function kn(){return{...yn(),value:String}}function Mn(){return{...yn(),value:[String,Number]}}function _n(){return{...yn(),value:String,language:{type:String},theme:{type:String}}}function Gn(){return{...yn(),value:String}}function Wn(){return{...yn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function qn(){return{...yn(),value:[Array,Array]}}function $n(){return{...yn(),value:String}}function Fn(){return{...yn(),value:String}}t("RequiredProp",vn)}}}));
|
|
1
|
+
System.register(["vue","@ibiz-template/core","ramda","qx-util","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,M,k,_,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;return{setters:[function(t){e=t.watch,n=t.onBeforeUnmount,o=t.createCommentVNode,a=t.getCurrentInstance,s=t.isReactive,r=t.toRaw,i=t.inject,l=t.reactive,c=t.onActivated,u=t.onDeactivated,d=t.ref,p=t.h,h=t.resolveComponent,m=t.provide,f=t.defineComponent,g=t.computed,v=t.createVNode,y=t.withDirectives,w=t.resolveDirective,C=t.isVNode,b=t.onUnmounted,I=t.onMounted,P=t.createTextVNode},function(t){D=t.onClickOutside,E=t.NOOP,N=t.listenJSEvent,O=t.Namespace,A=t.RuntimeError,x=t.isBase64Image,S=t.isSvg,R=t.ModelError,z=t.RuntimeModelError,T=t.IBizContext},function(t){B=t.isNil,j=t.isNotNil,V=t.isEmpty,L=t.mergeLeft},function(t){M=t.isFunc,k=t.notNilEmpty,_=t.QXEvent,G=t.clearAll,W=t.createUUID},function(t){q=t.useRoute,$=t.useRouter},function(t){F=t.default},function(t){U=t.ViewType,K=t.RouteConst,H=t.getMatchResPath,X=t.calcDeCodeNameById,Q=t.getControlProvider,J=t.calcDynaSysParams,Y=t.getViewProvider,Z=t.PanelItemState,tt=t.PanelItemController,et=t.registerPanelItemProvider,nt=t.Modal,ot=t.ViewMode,at=t.OpenAppViewCommand,st=t.getEditorProvider,rt=t.PanelItemEventName,it=t.getAllPanelField,lt=t.isDataContainer,ct=t.getPanelItemProvider,ut=t.PanelData,dt=t.PanelNotifyState,pt=t.execDELogicById,ht=t.ScriptFactory,mt=t.toLocalOpenWFRedirectView,ft=t.ViewController,gt=t.getControlsByView,vt=t.registerViewProvider,yt=t.getDERedirectToView,wt=t.ViewLayoutPanelController,Ct=t.registerControlProvider,bt=t.ControlType,It=t.PanelController,Pt=t.RemotePluginItem},function(t){Dt=t.defineStore,Et=t.createPinia}],execute:function(){function Nt(t,o,a={}){let s=E,r=E,i=E;const l=()=>{s(),s=E,r=E,i=E};return e(t,((t,e)=>{if(t!==e)if(B(t))l();else{const e=D((null==t?void 0:t.$el)||t,o,a);s=e.stop,r=e.pause,i=e.proceed}}),{immediate:!0}),n((()=>{s!==E&&l()})),{stop:()=>s(),pause:()=>r(),proceed:()=>i()}}function Ot(){return a().proxy.$props}function At(t){return s(t)?r(t):t}function xt(){const t=a().proxy;return e=>{t.$forceUpdate(),e&&M(e)&&t.$nextTick((()=>{e()}))}}t({calcResRoutePath:kt,createOverlayView:$t,generateRoutePath:async function(t,e,n,o){const a=jt(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:Lt(n),params:o}),2===s&&(await kt(a,n,t.appDataEntityId,t.appId),Mt.includes(t.viewType))){const e=X(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:Vt(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=jt(e),s=a.pathNodes.findIndex((t=>t.viewName===K.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(K.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Lt(n),params:o}),{path:Vt(a)}},getArrayProps:qn,getAutoCompleteProps:kn,getCascaderProps:$n,getCheckboxListProps:En,getCheckboxProps:Nn,getCodeProps:_n,getColorPickerProps:Fn,getDataPickerProps:On,getDatePickerProps:An,getDateRangeProps:xn,getDrawerPlacement:function(t){return Ft[t]||"right"},getDropdownProps:Dn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:yn,getGridArrayProps:function(){return{...qn(),...wn()}},getGridAutoCompleteProps:function(){return{...kn(),...wn()}},getGridCascaderProps:function(){return{...$n(),...wn()}},getGridCheckboxListProps:function(){return{...En(),...wn()}},getGridCheckboxProps:function(){return{...Nn(),...wn()}},getGridCodeProps:function(){return{..._n(),...wn()}},getGridColorPickerProps:function(){return{...Fn(),...wn()}},getGridDataPickerProps:function(){return{...On(),...wn()}},getGridDatePickerProps:function(){return{...An(),...wn()}},getGridDateRangeProps:function(){return{...xn(),...wn()}},getGridDropdownProps:function(){return{...Dn(),...wn()}},getGridEditorCommonProps:wn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Gn(),...wn()}},getGridInputIpProps:function(){return{...In(),...wn()}},getGridInputNumberProps:function(){return{...bn(),...wn()}},getGridInputProps:function(){return{...Cn(),...wn()}},getGridListBoxProps:function(){return{...Sn(),...wn()}},getGridMarkDownProps:function(){return{...Wn(),...wn()}},getGridNumberRangeProps:function(){return{...Rn(),...wn()}},getGridRadioProps:function(){return{...zn(),...wn()}},getGridRateProps:function(){return{...Tn(),...wn()}},getGridRawProps:function(){return{...Bn(),...wn()}},getGridSliderProps:function(){return{...jn(),...wn()}},getGridSpanProps:function(){return{...Pn(),...wn()}},getGridStepperProps:function(){return{...Vn(),...wn()}},getGridSwitchProps:function(){return{...Ln(),...wn()}},getGridUploadProps:function(){return{...Mn(),...wn()}},getHtmlProps:Gn,getInputIpProps:In,getInputNumberProps:bn,getInputProps:Cn,getListBoxProps:Sn,getMarkDownProps:Wn,getNestedRoutePath:_t,getNumberRangeProps:Rn,getOrigin:At,getOwnRouteContext:Lt,getRadioProps:zn,getRateProps:Tn,getRawProps:Bn,getSliderProps:jn,getSpanProps:Pn,getStepperProps:Vn,getSwitchProps:Ln,getUploadProps:Mn,isEmptyVNode:function(t){if(!Array.isArray(t))return t===St;return 1===t.length&&t[0]===St},onRouteChange:function(t,n){const o=q();if(!o)throw new A("无法正确获取route,可能是依赖问题");e((()=>null==o?void 0:o.path),(()=>{const e=_t(o,n);t({currentKey:e,fullPath:o.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer($t(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow($t(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal($t(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover($t(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var o;const a=jt(t,n);let s=a.pathNodes[e-1].viewName;if(!s)throw new A("第".concat(e,"级路由不存在视图标识"));s===K.ROUTE_MODAL_TAG&&(s=a.pathNodes[e].viewName);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const r=await ibiz.hub.getAppView(s);if(!r)throw new A("找不到视图".concat(s));const i={};(null==(o=ibiz.appData)?void 0:o.context)&&Object.assign(i,ibiz.appData.context);a.appContext&&Object.assign(i,a.appContext);if(1!==e)for(let t=0;t<e;t++){const e=a.pathNodes[t];k(e.context)&&Object.assign(i,e.context)}const{params:l,srfnav:c}=a.pathNodes[e-1];return{viewModel:r,context:i,params:l,srfnav:c}},prepareControl:function(t){const e=Bt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=Bt("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(B(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:jt,routePath2string:Vt,useClickOutside:Nt,useControlController:zt,useController:function(t){t.force=xt()},useCtx:Rt,useEventListener:Tt,useFocusAndBlur:function(t,e){const n=d(),o=d(!1);let a;const s=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return Tt(n,"click",(e=>{o.value||(a=Nt(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:xt,useForceTogether:function(t,e){const n=e.force,o=xt();e.force=t=>{n(t),o()}},useMobCtx:function(){return i("ctx")},useNamespace:Bt,useProps:Ot,usePropsWatch:function(t,n,o){const a=Ot();Object.prototype.hasOwnProperty.call(a,t)&&(e((()=>a[t]),((t,e)=>{n(At(t),At(e))}),o),n(At(a[t]),void 0))},useRouteKey:function(t,n,o){o||(o=d(""));o.value=t.value;const a=new Gt(n);return e(t,((t,e)=>{t!==e&&a.nextChange((()=>{o.value=t}))})),o},useRouterQuery:function(){const t=q(),{query:e}=t;return e},useViewController:Kt});const St=t("EmptyVNode",o("EmptyVNode"));function Rt(){return i("ctx")}function zt(t,o){const s=Rt(),r=Ot();s.evt.emit("onForecast",r.modelData.name);const i=r.provider;let d;d=(null==i?void 0:i.createController)?i.createController(r.modelData,r.context,r.params,s):t(r.modelData,r.context,r.params,s),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.updateContextParams({...t}),ibiz.log.debug("".concat(n.model.id,"的上下文或视图参数变更:"),t)}))}(r,d),function(t,n,o=[]){const a=["context","params","modelData",...o];e((()=>{const e={};return Object.keys(t).forEach((n=>{a.includes(n)||(e[n]=t[n])})),e}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug("部件 [".concat(n.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(n.state[t]=o[t])}))}),{immediate:!0})}(r,d,null==o?void 0:o.excludePropsKeys),d.state=l(d.state),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=xt();const p=a().proxy;return d.evt.onAll(((t,e)=>{p.$emit(t.slice(2),e)})),p.$emit("controllerAppear",d),d.created(),n((()=>d.destroyed())),d}function Tt(t,o,a,s={}){let r=E;return e(t,((t,e)=>{t!==e&&(B(t)?(r(),r=E):r=N((null==t?void 0:t.$el)||t,o,a,s))}),{immediate:!0}),n((()=>{r!==E&&r()})),()=>{r()}}function Bt(t){return new O(t,ibiz.env.namespace)}function jt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(K.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?F.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=F.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:r,pathNodes:s}}function Vt(t){let e="";return t.appContext?e+="/".concat(F.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)k(t.context)&&(o=t.context);else{if(o=k(t.params)?t.params:{},k(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=F.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});k(a)?e+=a:e+=ibiz.env.routePlaceholder})),e}function Lt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const Mt=t("excludeViewTypes",[U.DE_GRID_VIEW,U.DE_GRID_EXP_VIEW,U.DE_LIST_VIEW,U.DE_LIST_EXP_VIEW,U.DE_DATA_VIEW,U.DE_DATAVIEW_EXP_VIEW,U.DE_CALENDAR_VIEW,U.DE_CALENDAR_EXP_VIEW,U.DE_CHART_VIEW,U.DE_CHART_EXP_VIEW,U.DE_KANBAN_VIEW]);async function kt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=H(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 _t(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=jt(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,Vt(o))}class Gt{constructor(t,n){this.callbacks=[],this.timers=[],this.wait=500,n&&(this.wait=n),e((()=>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",Gt);const Wt=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class qt{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new _,this.init()}static createVueApp(t,e){throw new A("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=qt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>p(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){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",qt);function $t(t){return e=>{const n=h("IBizViewShell");return p(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends qt{present(t){return this.modal.present(t)}});const Ft={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Ut{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){const n=t.currentRoute.value.fullPath;t.push({path:e});const o=e;if(this.map.has(o)){return this.map.get(o).onWillDismiss()}const a=new Ut(n,o);return this.map.set(o,a),this.scheduledDestruction(a),a.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",Dt("appStore",(()=>({appStore:l({})}))));t("useUIStore",Dt("uiStore",(()=>{const t=function(){const t=d(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:l({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Et());function Kt(t){const o=Ot(),s=i("ctx",void 0);null==s||s.evt.emit("onForecast",o.modelData.name);const r=o.provider;let d;d=(null==r?void 0:r.createController)?r.createController(o.modelData,o.context,o.params,s):t(o.modelData,o.context,o.params,s),ibiz.util.viewStack.add(d.id,d),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.context.reset({},t.context),G(n.params),Object.assign(n.params,t.params),n.handleContextParams(),ibiz.log.debug("".concat(n.model.id,"的上下文或视图参数变更:"),t)}))}(o,d),function(t,n){e((()=>t.state?{...t.state}:{}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug("视图 [".concat(n.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{n.state[t]=o[t]}))}),{immediate:!0})}(o,d),m("ctx",d.ctx),d.state=l(d.state),d.slotProps=l(d.slotProps),o.modal&&(d.modal=o.modal),c((()=>{d.onActivated(),ibiz.util.viewStack.active(d.id)})),u((()=>{d.onDeactivated(),ibiz.util.viewStack.deactivate(d.id)})),d.force=xt();const p=a().proxy;return d.evt.onAll(((t,e)=>{p.$emit(t.slice(2),e)})),d.created(),n((()=>{d.destroyed(),ibiz.util.viewStack.remove(d.id)})),d}t("IBizIcon",f({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Bt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=g((()=>function(t){if(t){if(t.htmlStr)return v("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?v("i",{class:[e.b(),t.cssClass]},null):v("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return x(t.imagePath)?v("img",{class:e.b(),src:t.imagePath},null):S(t.imagePath)?v("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?v("img",{class:e.b(),src:t.imagePath},null):v("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?v("img",{class:e.b(),src:t.imagePath},null):v("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return S(t.rawContent)?v("div",{class:e.b(),innerHTML:t.rawContent},null):v("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",f({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:n}){const o={};let a=!0;e((()=>t.manualKey),((t,e)=>{j(t)&&t!==e&&(a=!0)}));return{renderComp:(e,s)=>{if(!a)return o.vNode;if(a=!1,e){const a={...e.props};delete a.onVnodeUnmounted,delete a.ref;const s=p(e.type,{...a,...n,key:t.manualKey});return o.vNode=s,s}}}},render(){return v(h("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",f({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Bt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,c=t.controller.model.controls,u=l({});return!1===i.controlType.endsWith("EXPBAR")&&(B(i.width)||(u.width="".concat(i.width,"px")),B(i.height)||(u.height="".concat(i.height,"px"))),{ns:e,typeClass:s,sysCssName:r,inlineStyle:u,codeName:a,controls:c,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=h("IBizControlShell");return p(e,{modelData:t,...o})}}));const n=s[a.name];r=p(h(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return v("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",f({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){i("ctx").evt.emit("onForecast",t.modelData.name);const e=d(!1),n=d(""),o=d();Q(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:Bt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?p(h(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):y(v("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[w("loading"),!this.isComplete]])}})),t("IBizViewShell",f({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Bt("view-shell"),n=d(!1),o=d(""),a=d(),s=d();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new A("未找到视图模型");if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new A("".concat(e.codeName,"无实体,暂不支持加载动态模型"));const o=t.params||{},a=await J(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=B(t.context.srfsessionid)||V(t.context.srfsessionid),r=W();if(s){const t=ibiz.uiDomainManager.create(r);o.srfsessionid=t.id}const i=ibiz.hub.getApp(e.appId),l=await i.deService.getService(t.context,n),c=await l.get(o,t.params||{});if(c.ok&&c.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:s}=c.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;B(e.processDefinitionKey)&&(e.processDefinitionKey=o),B(e.taskDefinitionKey)&&(e.taskDefinitionKey=s)}}s&&ibiz.uiDomainManager.destroy(r)}}s.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else s.value=e;try{a.value=await Y(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?p(h(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):y(v("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[w("loading"),!this.isComplete]])}})),t("IBizCodeList",f({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:n}){var o,a;const s=Bt("code-list"),r=d([]),i=(null==(o=t.codeList)?void 0:o.textSeparator)||"、",l=(null==(a=t.codeList)?void 0:a.valueSeparator)||",";e(r,(t=>{let e="";t.length>0&&(e=t.map((t=>t.text)).join(i)),n("infoTextChange",e)}));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}}};e((()=>t.value),((e,n)=>{if(e!==n)if(B(e)||""===e)r.value=[];else{let n;n="string"==typeof e?e.split(l):[e],r.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:r,ns:s,emptyText:u,textSeparator:i}},render(){return v("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,v("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&&v(h("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",f({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(i("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",f({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"}},setup:()=>({ns:Bt("badge")}),render(){return v("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class Ht extends Z{}t("PanelContainerState",Ht);class Xt extends tt{createState(){var t;return new Ht(null==(t=this.parent)?void 0:t.state)}}function Qt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("PanelContainerController",Xt);const Jt=f({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Xt,required:!0}},setup(t){const e=Bt("panel-container"),{id:n}=t.modelData,o=g((()=>{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=v(h("iBizRow"),{slot:"content",layout:this.modelData.layout},Qt(n=o.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Qt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?v("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Yt{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Xt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Wt(Jt,(function(t){t.component(Jt.name,Jt),et("CONTAINER",(()=>new Yt)),et("CONTAINER_DEFAULT",(()=>new Yt))})));const Zt=f({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){i("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Bt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),v("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 te extends tt{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",te);class ee{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new te(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Wt(Zt,(function(t){t.component(Zt.name,Zt),et("CTRLPOS",(()=>new ee))})));class ne extends tt{}function oe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("ScrollContainerItemController",ne);const ae=t("ScrollContainerItem",f({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ne,required:!0}},setup(t){const e=Bt("scroll-container-item"),{id:n}=t.modelData,o=g((()=>[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 v(h("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},oe(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},oe(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class se{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ne(t,e,n);return await o.init(),o}}class re extends tt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",re);const ie=t("ScrollContainer",f({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:re,required:!0}},setup(t){const e=Bt("scroll-container"),{id:n}=t.modelData,o=g((()=>[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 v("div",{class:this.classArr},[v("div",{class:[this.ns.e("header")],style:i.top},[o]),v("div",{class:[this.ns.b("content")]},[v("div",{class:this.ns.be("content","left"),style:i.left},[n]),v("div",{class:this.ns.be("content","center")},[r]),v("div",{class:this.ns.be("content","right"),style:i.right},[a])]),v("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class le{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new re(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Wt(ie,(function(t){t.component(ie.name,ie),t.component(ae.name,ae),et("CONTAINER_CONTAINER_SCROLL",(()=>new le)),et("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new se)),et("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new se))})));class ce extends Z{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",ce);const ue=["is404","isRoutePushed"];class de extends tt{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 ce(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]?(L(this.state.navViewMsgs[e],t),ue.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 nt({mode:this.routeDepth?ot.ROUTE:ot.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=_t(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){const e=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=e,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const t=_t(this.route,this.routeDepth,!1);this.router.push("".concat(t,"/404"))}else if(this.state.navViewMsgs[e].fullPath&&this.getExpItemIsCache(t))this.router.push(this.state.navViewMsgs[e].fullPath);else{const n=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),ibiz.commands.execute(at.TAG,t.viewId,n,t.params,{openMode:"INDEXVIEWTAB"})}}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;k(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function pe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("NavPosController",de);const he=f({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:de,required:!0}},setup(t){const n=t.controller,o=Bt("nav-pos"),a=$(),s=q();if(n.setRouter(a),n.routeDepth){const t=_t(s,n.routeDepth);e((()=>s.fullPath),(()=>{const e=_t(s,n.routeDepth);t===e&&s.matched.length>n.routeDepth&&n.onRouteChange(s)}),{immediate:!0})}return{ns:o,c:n,onViewCreated:t=>{n.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=v(h("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?v(t,null,null):null;return s?v(h("keepAlive"),{include:o,max:30,isKey:!0},pe(e)?e:{default:()=>[e]}):e}});else{const t=n?p(h("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?v(h("keepAlive"),{include:o,max:30,isKey:!0},pe(t)?t:{default:()=>[t]}):t}return v("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class me{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new de(t,e,n);return await o.init(),o}}t("IBizNavPos",Wt(he,(function(t){t.component(he.name,he),et("RAWITEM_NAV_POS",(()=>new me))})));class fe extends Z{}class ge extends tt{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 fe(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 st(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:rt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:rt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:rt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:rt.ENTER,event:t})}}t("PanelFieldController",ge);const ve=f({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:ge,required:!0}},setup(t){const e=Bt("panel-field"),n=g((()=>{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=h(this.controller.editorProvider.formEditor);t=p(n,{...e})}else t=v(h("not-supported-editor"),{modelData:this.modelData.editor},null)}return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class ye{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new ge(t,e,n);return await o.init(),o}}t("IBizPanelField",Wt(ve,(function(t){t.component(ve.name,ve),et("FIELD",(()=>new ye))})));class we extends tt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",we);const Ce=f({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(t){const e=Bt("panel-rawitem"),n=d(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=g((()=>{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 v("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[v(h("iBizRawItem"),{rawItem:this.modelData},null)])}});class be{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new we(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Wt(Ce,(function(t){t.component(Ce.name,Ce),et("RAWITEM",(()=>new be)),et("RAWITEM_STATIC_IMAGE",(()=>new be)),et("RAWITEM_STATIC_LABEL",(()=>new be)),et("RAWITEM_STATIC_TEXT",(()=>new be))})));class Ie extends Z{constructor(){super(...arguments),this.data={}}}class Pe{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new Ie,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=it(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)&&!lt(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 De extends Z{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",De);class Ee extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new De(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 ct(t);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!lt(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 z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new R(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=it(this.model),n=t.map((t=>new ut(e,t)));this.dataItems=n.map((t=>new Pe(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(dt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await pt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A("实体逻辑".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 z(this.model,"没有配置实体行为");if(!e)throw new z(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",Ee);const Ne=f({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ee,required:!0}},setup(t){const n=Bt("multi-data-container"),{id:o}=t.modelData;e((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=l(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=l(n.state)}))}))}),{immediate:!0});const a=i("renderPanelItem"),s=g((()=>[n.b(),n.m(o),...t.controller.containerClass]));return{ns:n,classArr:s,renderPanelItem:a}},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 v(h("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 v(h("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)&&!C(a)?e:{default:()=>[e]});var a}))]}})})),v("div",{class:this.classArr},[t])}});class Oe{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Ee(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Wt(Ne,(function(t){t.component(Ne.name,Ne),et("CONTAINER_CONTAINER_MULTIDATA",(()=>new Oe))})));class Ae extends Z{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Ae);class xe extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Ae(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 ct(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)&&!lt(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 z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new R(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=it(this.model),a=o.map((t=>t.id)),s=new ut(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(dt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await pt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A("实体逻辑".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 z(this.model,"没有配置实体行为");if(!e)throw new z(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",xe);const Se=f({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:xe,required:!0}},setup(t){const e=Bt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=l(n.state)}));const o=i("renderPanelItem"),a=g((()=>[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():v(h("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 v(h("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)&&!C(o)?e:{default:()=>[e]});var o}))]}}),v("div",{class:this.classArr},[t])}});class Re{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new xe(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Wt(Se,(function(t){t.component(Se.name,Se),et("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Re))})));class ze extends Z{}t("GridContainerState",ze);class Te extends tt{createState(){var t;return new ze(null==(t=this.parent)?void 0:t.state)}}function Be(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("GridContainerController",Te);const je=f({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Te,required:!0}},setup(t){const e=Bt("grid-container"),{id:n}=t.modelData,o=g((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=g((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),s=d(void 0),r=d(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 v(h("iBizRow"),{class:this.classArr,layout:this.layoutModel},Be(n=o.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Be(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class Ve{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Te(t,e,n);return await o.init(),o}}t("IBizGridContainer",Wt(je,(function(t){t.component(je.name,je),et("CONTAINER_CONTAINER_GRID",(()=>new Ve))})));class Le extends Z{}t("PanelContainerImageState",Le);class Me extends tt{createState(){var t;return new Le(null==(t=this.parent)?void 0:t.state)}}function ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}t("PanelContainerImageController",Me);const _e=f({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:Me,required:!0}},setup(t){const e=Bt("panel-container-image"),{id:n}=t.modelData,o=g((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=g((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=S(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=v(h("iBizRow"),{slot:"content",layout:this.modelData.layout},ke(n=o.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ke(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return v("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?v("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Ge{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new Me(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Wt(_e,(function(t){t.component(_e.name,_e),et("CONTAINER_CONTAINER_IMAGE",(()=>new Ge))})));class We extends Z{}t("PanelContainerGroupState",We);class qe extends tt{createState(){var t;return new We(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",qe);class $e{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new qe(t,e,n);return await o.init(),o}}function Fe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}const Ue=f({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:qe,required:!0}},setup(t){const e=Bt("panel-container-group"),n=d(!t.controller.defaultExpansion);return{ns:e,captionText:g((()=>{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=v(h("iBizRow"),{slot:"content",layout:this.modelData.layout},Fe(n=a.map((t=>{const e=t.props;return e&&e.controller?v(h("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Fe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=v("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[v("div",{class:[this.ns.be("header","left")]},[v("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),v("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?v("ion-icon",{name:"caret-forward-sharp"},null):v("ion-icon",{name:"caret-down-sharp"},null))])])),v("div",{class:o},[r,v("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",Wt(Ue,(function(t){t.component(Ue.name,Ue),et("CONTAINER_CONTAINER_GROUP",(()=>new $e))})));function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!C(t)}const He=f({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:tt,required:!0}},setup(t){const e=Bt("panel-tab-page"),n=g((()=>{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 v(h("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Ke(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return v(h("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Ke(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class Xe{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new tt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Wt(He,(function(t){t.component(He.name,He),et("TABPAGE",(()=>new Xe))})));class Qe extends tt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?ht.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const Je=f({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:Qe,required:!0}},setup(t){var e;const n=Bt("panel-item-render"),o=Bt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,s=g((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=g((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:s,htmlCode:r}},render(){return v("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class Ye{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new Qe(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Wt(Je,(function(t){t.component(Je.name,Je),et("PREDEFINE_RENDER",(()=>new Ye))}))),t("AppRedirectView",f({setup(){var t;const e=T.create((null==(t=ibiz.appData)?void 0:t.context)||{});b((()=>{e.destroy()}));const{href:n}=window.location;I((()=>ibiz.util.hiddenAppLoading())),async function(){await mt(e,n)}()},render:()=>v("div",null,[P("重定向跳转中")])}));class Ze{constructor(){this.component="IBizView"}}const tn=f({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=Bt("view"),e=Kt(((...t)=>new ft(...t))),n=gt(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=g((()=>[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 v(h("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(o));const s=this.c.providers[e];s&&(n[e]=()=>{const e=h(s.component);return p(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=v("span",{style:"color:red;"},[P("视图类型"),this.modelData.viewType,P("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=p(h(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return y(v("div",{class:this.viewClassNames,id:this.c.id},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[w("loading"),this.c.state.isLoading]])}});t("IBizView",Wt(tn,(function(t){t.component(tn.name,tn),vt("DEFAULT",(()=>new Ze))}))),t("TodoRedirect",f({setup(){const t=$(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=F.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:()=>v("div",null,[P("待办列表重定向")])}));class en{constructor(){this.component="IBizPortalView"}}const nn=f({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=Bt("view"),n=Kt(((...t)=>new ft(...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=h(s.component);return p(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return v("div",{class:this.viewClassNames},[e])}}),on=(t("IBizPortalView",Wt(nn,(function(t){t.component(nn.name,nn),vt(U.APP_PORTAL_VIEW,(()=>new en)),vt(U.DE_PORTAL_VIEW,(()=>new en)),vt(U.DE_PORTAL_VIEW9,(()=>new en))}))),f({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Kt(((...t)=>new ft(...t))),n=d(),o=d(),a=d();return e.evt.on("onCreated",(()=>{yt(r(t.modelData),r(e.context),r(e.params)).then((async t=>{if("view"!==t.type)throw new A("嵌入重定向视图不支持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?p(h("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):y(v("div",{style:"width: 100%; height: 100%;"},null),[[w("loading"),!this.toViewId]])}}));class an{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Wt(on,(function(t){t.component(on.name,on);const e=new an;vt(U.DE_REDIRECT_VIEW,(()=>e))})));const sn=f({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:n}){const o=zt(((...e)=>new wt(...e,t.container))),a=Bt("control-".concat(o.model.controlType.toLowerCase()));e((()=>t.data),(t=>{t&&(o.setInputData(t),o.load())}),{immediate:!0}),o.evt.on("onCreated",(()=>{Object.keys(o.panelItems).forEach((t=>{const e=o.panelItems[t];e.state=l(e.state)}))}));const s=(t,e)=>{var a,r;if(t.hidden)return null;const{providers:i,panelItems:l}=e||o,c=i[t.id];if(!c)return v("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const u=h(c.component);let d;"CTRLPOS"===t.itemType&&n[t.id]?d=()=>n[t.id]():"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?d=()=>t.panelTabPages.map((t=>s(t,e))):lt(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>s(t,e))));let m="";return t.cssStyle&&(m=t.cssStyle),p(u,{modelData:t,controller:l[t.id],key:t.id,style:m},d)};return m("renderPanelItem",s),{c:o,ns:a,renderPanelItem:s}},render(){const{state:t,model:e}=this.c;return v(h("iBizControlBase"),{controller:this.c},{default:()=>[v(h("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",v(h("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!C(o)?e:{default:()=>[e]});var o})))]}})]})}});class rn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Wt(sn,(function(t){t.component(sn.name,sn),Ct(bt.VIEW_LAYOUT_PANEL,(()=>new rn))})));function ln(t,e,n){var o,a;if(t.hidden)return;const{providers:s,panelItems:r}=e,i=s[t.id];if(!i)return v("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const l=h(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=>ln(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>ln(t,e,n))));let u="";return t.cssStyle&&(u=t.cssStyle),p(l,{modelData:t,controller:r[t.id],key:t.id,style:u},c)}const cn=f({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 n=zt(((...e)=>new It(...e,t.container))),o=Bt("control-".concat(n.model.controlType.toLowerCase()));return e((()=>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=l(e.state)}))})),{c:n,ns:o}},render(){const{state:t,model:e}=this.c;return v(h("iBizControlBase"),{controller:this.c},{default:()=>[v(h("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",v(h("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=ln(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!C(o)?e:{default:()=>[e]});var o})))]}})]})}});class un{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Wt(cn,(function(t){t.component(cn.name,cn),Ct(bt.PANEL,(()=>new un))})));function dn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function hn(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 mn={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),pn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=hn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(pn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=hn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return pn(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];pn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":mn.normalize(t)},relative:function(t,e){if(pn(t),pn(e),t===e)return"";if((t=mn.resolve(t))===(e=mn.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(pn(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');pn(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){pn(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){pn(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};mn.posix=mn;var fn=mn,gn=dn(fn);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),window.vueInstances.forEach((e=>{e.use(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 z(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(fn.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 Pt(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=fn.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(gn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new A("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new A("远程插件加载失败, 远程插件未找到[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(fn.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 vn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function yn(){return{value:String,controller:new vn(Object),data:new vn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function wn(){return{hasError:{type:Boolean}}}function Cn(){return{...yn(),value:[String,Number]}}function bn(){return{...yn(),value:Number}}function In(){return{...yn(),value:String}}function Pn(){return{...yn(),value:[String,Number,Object,Array]}}function Dn(){return{...yn(),value:[String,Number]}}function En(){return{...yn(),value:[String,Number]}}function Nn(){return{...yn(),value:[String,Number]}}function On(){return{...yn(),value:[String,Array,Object,Number]}}function An(){return{...yn(),value:[String,Number]}}function xn(){return{...yn(),value:[String,Number]}}function Sn(){return{...yn(),value:[String,Number]}}function Rn(){return{...yn(),value:[String,Number]}}function zn(){return{...yn(),value:[String,Number]}}function Tn(){return{...yn(),value:[String,Number]}}function Bn(){return{...yn(),value:[String,Number,Array]}}function jn(){return{...yn(),value:[String,Number]}}function Vn(){return{...yn(),value:[String,Number]}}function Ln(){return{...yn(),value:[String,Number]}}function Mn(){return{...yn(),value:String}}function kn(){return{...yn(),value:[String,Number]}}function _n(){return{...yn(),value:String,language:{type:String},theme:{type:String}}}function Gn(){return{...yn(),value:String}}function Wn(){return{...yn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function qn(){return{...yn(),value:[Array,Array]}}function $n(){return{...yn(),value:String}}function Fn(){return{...yn(),value:String}}t("RequiredProp",vn)}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/panel/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAOT,MAAM,KAAK,CAAC;AACb,OAAO,EACL,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EAChB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/panel/panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAOT,MAAM,KAAK,CAAC;AACb,OAAO,EACL,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAuEhC;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqEvB,CAAC"}
|
|
@@ -41,10 +41,15 @@ function renderPanelItem(panelItem, c, ins) {
|
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
+
let tempStyle = "";
|
|
45
|
+
if (panelItem.cssStyle) {
|
|
46
|
+
tempStyle = panelItem.cssStyle;
|
|
47
|
+
}
|
|
44
48
|
return h(component, {
|
|
45
49
|
modelData: panelItem,
|
|
46
50
|
controller: panelItems[panelItem.id],
|
|
47
|
-
key: panelItem.id
|
|
51
|
+
key: panelItem.id,
|
|
52
|
+
style: tempStyle
|
|
48
53
|
}, children);
|
|
49
54
|
}
|
|
50
55
|
const PanelControl = /* @__PURE__ */ defineComponent({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAIN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAElB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAGhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iCAiDlB,UAAU;;;;;;;sBASpB,KAAK,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"view-layout-panel.d.ts","sourceRoot":"","sources":["../../../../src/control/panel/view-layout-panel/view-layout-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAGR,KAAK,EAIN,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,UAAU,EAEV,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAElB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAGhC;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;iCAiDlB,UAAU;;;;;;;sBASpB,KAAK,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;MAwFjB,CAAC"}
|
|
@@ -86,10 +86,15 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
+
let tempStyle = "";
|
|
90
|
+
if (panelItem.cssStyle) {
|
|
91
|
+
tempStyle = panelItem.cssStyle;
|
|
92
|
+
}
|
|
89
93
|
return h(component, {
|
|
90
94
|
modelData: panelItem,
|
|
91
95
|
controller: panelItems[panelItem.id],
|
|
92
|
-
key: panelItem.id
|
|
96
|
+
key: panelItem.id,
|
|
97
|
+
style: tempStyle
|
|
93
98
|
}, children);
|
|
94
99
|
};
|
|
95
100
|
provide("renderPanelItem", renderPanelItem);
|
|
@@ -11,6 +11,7 @@ export declare const IBizPanelRawItem: import("../../util").TypeWithInstall<impo
|
|
|
11
11
|
}, {
|
|
12
12
|
ns: import("@ibiz-template/core").Namespace;
|
|
13
13
|
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
14
|
+
tempStyle: import("vue").Ref<string>;
|
|
14
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
16
|
modelData: {
|
|
16
17
|
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/index.ts"],"names":[],"mappings":"AAMA,cAAc,4BAA4B,CAAC;AAE3C,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/index.ts"],"names":[],"mappings":"AAMA,cAAc,4BAA4B,CAAC;AAE3C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;aAe3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -14,6 +14,7 @@ export declare const PanelRawItem: import("vue").DefineComponent<{
|
|
|
14
14
|
}, {
|
|
15
15
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
16
|
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
17
|
+
tempStyle: import("vue").Ref<string>;
|
|
17
18
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
19
|
modelData: {
|
|
19
20
|
type: PropType<IPanelRawItem>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-rawitem.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/panel-rawitem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA6B,QAAQ,
|
|
1
|
+
{"version":3,"file":"panel-rawitem.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-rawitem/panel-rawitem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAA6B,QAAQ,EAAO,MAAM,KAAK,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;YAsDvB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createVNode, resolveComponent } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, createVNode, resolveComponent } from 'vue';
|
|
2
2
|
import '../../use/index.mjs';
|
|
3
3
|
import { PanelRawItemController } from './panel-rawitem.controller.mjs';
|
|
4
4
|
import './panel-rawitem.css';
|
|
@@ -19,6 +19,13 @@ const PanelRawItem = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
},
|
|
20
20
|
setup(props) {
|
|
21
21
|
const ns = useNamespace("panel-rawitem");
|
|
22
|
+
const tempStyle = ref("");
|
|
23
|
+
const {
|
|
24
|
+
rawItem
|
|
25
|
+
} = props.modelData;
|
|
26
|
+
if (rawItem && rawItem.cssStyle) {
|
|
27
|
+
tempStyle.value = rawItem.cssStyle;
|
|
28
|
+
}
|
|
22
29
|
const classArr = computed(() => {
|
|
23
30
|
const {
|
|
24
31
|
id
|
|
@@ -29,7 +36,8 @@ const PanelRawItem = /* @__PURE__ */ defineComponent({
|
|
|
29
36
|
});
|
|
30
37
|
return {
|
|
31
38
|
ns,
|
|
32
|
-
classArr
|
|
39
|
+
classArr,
|
|
40
|
+
tempStyle
|
|
33
41
|
};
|
|
34
42
|
},
|
|
35
43
|
render() {
|
|
@@ -38,6 +46,7 @@ const PanelRawItem = /* @__PURE__ */ defineComponent({
|
|
|
38
46
|
}
|
|
39
47
|
return createVNode("div", {
|
|
40
48
|
"class": this.classArr,
|
|
49
|
+
"style": this.tempStyle,
|
|
41
50
|
"onClick": () => {
|
|
42
51
|
this.controller.onClick();
|
|
43
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/util/route/route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,IAAI,KAAK,EAAY,MAAM,YAAY,CAAC;AAE9E,OAAO,EAGL,WAAW,EAGZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,OAAe,GAC5B,UAAU,CAqEZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAuD9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAc7D;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAYpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,QAAQ,EACjB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6D3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../src/util/route/route.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,6BAA6B,IAAI,KAAK,EAAY,MAAM,YAAY,CAAC;AAE9E,OAAO,EAGL,WAAW,EAGZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,OAAe,GAC5B,UAAU,CAqEZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAuD9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAc7D;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAYpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,UAAU,EACrB,OAAO,EAAE,QAAQ,EACjB,eAAe,CAAC,EAAE,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6D3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA+B3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,GAAE,OAAe,GAC5B,OAAO,CAAC,cAAc,CAAC,CAwDzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,OAAc,GACvB,MAAM,CAwBR;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,EAClE,KAAK,EAAE,MAAM,GACZ,IAAI,CAaN"}
|
package/es/util/route/route.mjs
CHANGED
|
@@ -195,6 +195,12 @@ async function generateRoutePath(appView, route, context, params) {
|
|
|
195
195
|
}
|
|
196
196
|
async function generateRoutePathByModal(appView, route, context, params) {
|
|
197
197
|
const routePath = route2routePath(route);
|
|
198
|
+
const findIndex = routePath.pathNodes.findIndex(
|
|
199
|
+
(item) => item.viewName === RouteConst.ROUTE_MODAL_TAG
|
|
200
|
+
);
|
|
201
|
+
if (findIndex !== -1) {
|
|
202
|
+
routePath.pathNodes = routePath.pathNodes.slice(0, findIndex);
|
|
203
|
+
}
|
|
198
204
|
if (context.currentSrfNav) {
|
|
199
205
|
const currentNode = routePath.pathNodes[routePath.pathNodes.length - 1];
|
|
200
206
|
currentNode.params = currentNode.params || {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.5.7-alpha.
|
|
3
|
+
"version": "0.5.7-alpha.9",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@ibiz-template/cli": "^0.3.10",
|
|
35
|
-
"@ibiz-template/core": "^0.5.7-alpha.
|
|
36
|
-
"@ibiz-template/runtime": "^0.5.7-alpha.
|
|
35
|
+
"@ibiz-template/core": "^0.5.7-alpha.9",
|
|
36
|
+
"@ibiz-template/runtime": "^0.5.7-alpha.9",
|
|
37
37
|
"@ibiz-template/theme": "^0.5.7-alpha.0",
|
|
38
38
|
"@ibiz/model-core": "^0.1.9",
|
|
39
39
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"vue": "^3.3.4",
|
|
63
63
|
"vue-router": "^4.2.4"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "733e1918e2e640661bb99dd1c79cf19e0a25ada9"
|
|
66
66
|
}
|
|
@@ -74,12 +74,18 @@ function renderPanelItem(
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// 直接样式
|
|
78
|
+
let tempStyle = '';
|
|
79
|
+
if (panelItem.cssStyle) {
|
|
80
|
+
tempStyle = panelItem.cssStyle;
|
|
81
|
+
}
|
|
77
82
|
return h(
|
|
78
83
|
component,
|
|
79
84
|
{
|
|
80
85
|
modelData: panelItem,
|
|
81
86
|
controller: panelItems[panelItem.id!],
|
|
82
87
|
key: panelItem.id,
|
|
88
|
+
style: tempStyle,
|
|
83
89
|
},
|
|
84
90
|
children,
|
|
85
91
|
);
|
|
@@ -128,12 +128,18 @@ export const ViewLayoutPanelControl = defineComponent({
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
// 直接样式
|
|
132
|
+
let tempStyle = '';
|
|
133
|
+
if (panelItem.cssStyle) {
|
|
134
|
+
tempStyle = panelItem.cssStyle;
|
|
135
|
+
}
|
|
131
136
|
return h(
|
|
132
137
|
component,
|
|
133
138
|
{
|
|
134
139
|
modelData: panelItem,
|
|
135
140
|
controller: panelItems[panelItem.id!],
|
|
136
141
|
key: panelItem.id,
|
|
142
|
+
style: tempStyle,
|
|
137
143
|
},
|
|
138
144
|
children,
|
|
139
145
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IPanelRawItem } from '@ibiz/model-core';
|
|
2
|
-
import { computed, defineComponent, PropType } from 'vue';
|
|
2
|
+
import { computed, defineComponent, PropType, ref } from 'vue';
|
|
3
3
|
import { useNamespace } from '../../use';
|
|
4
4
|
import { PanelRawItemController } from './panel-rawitem.controller';
|
|
5
5
|
import './panel-rawitem.scss';
|
|
@@ -19,6 +19,14 @@ export const PanelRawItem = defineComponent({
|
|
|
19
19
|
setup(props) {
|
|
20
20
|
const ns = useNamespace('panel-rawitem');
|
|
21
21
|
|
|
22
|
+
const tempStyle = ref('');
|
|
23
|
+
|
|
24
|
+
const { rawItem } = props.modelData;
|
|
25
|
+
|
|
26
|
+
if (rawItem && rawItem.cssStyle) {
|
|
27
|
+
tempStyle.value = rawItem.cssStyle;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
// 类名控制
|
|
23
31
|
const classArr = computed(() => {
|
|
24
32
|
const { id } = props.modelData;
|
|
@@ -30,6 +38,7 @@ export const PanelRawItem = defineComponent({
|
|
|
30
38
|
return {
|
|
31
39
|
ns,
|
|
32
40
|
classArr,
|
|
41
|
+
tempStyle,
|
|
33
42
|
};
|
|
34
43
|
},
|
|
35
44
|
render() {
|
|
@@ -40,6 +49,7 @@ export const PanelRawItem = defineComponent({
|
|
|
40
49
|
return (
|
|
41
50
|
<div
|
|
42
51
|
class={this.classArr}
|
|
52
|
+
style={this.tempStyle}
|
|
43
53
|
onClick={() => {
|
|
44
54
|
this.controller.onClick();
|
|
45
55
|
}}
|
package/src/util/route/route.ts
CHANGED
|
@@ -351,6 +351,15 @@ export async function generateRoutePathByModal(
|
|
|
351
351
|
): Promise<{ path: string }> {
|
|
352
352
|
const routePath = route2routePath(route);
|
|
353
353
|
|
|
354
|
+
// 特殊处理 RouteConst.ROUTE_MODAL_TAG,因为只能有一级避免多次或重复点击,导致路由计算错误。再次点击时把之前的modal路由删除
|
|
355
|
+
const findIndex = routePath.pathNodes.findIndex(
|
|
356
|
+
item => item.viewName === RouteConst.ROUTE_MODAL_TAG,
|
|
357
|
+
);
|
|
358
|
+
|
|
359
|
+
if (findIndex !== -1) {
|
|
360
|
+
routePath.pathNodes = routePath.pathNodes.slice(0, findIndex);
|
|
361
|
+
}
|
|
362
|
+
|
|
354
363
|
// 导航视图的导航参数,加在目标层级之前的一个层级的视图参数里
|
|
355
364
|
if (context.currentSrfNav) {
|
|
356
365
|
const currentNode = routePath.pathNodes[routePath.pathNodes.length - 1];
|