@ibiz-template/vue3-util 0.5.3-beta.5 → 0.5.3-beta.6
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/index.mjs +1 -0
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +1 -0
- package/es/panel-component/panel-item-render/index.d.ts +25 -0
- package/es/panel-component/panel-item-render/index.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/index.mjs +19 -0
- package/es/panel-component/panel-item-render/panel-item-render.controller.d.ts +32 -0
- package/es/panel-component/panel-item-render/panel-item-render.controller.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/panel-item-render.controller.mjs +29 -0
- package/es/panel-component/panel-item-render/panel-item-render.d.ts +27 -0
- package/es/panel-component/panel-item-render/panel-item-render.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/panel-item-render.mjs +47 -0
- package/es/panel-component/panel-item-render/panel-item-render.provider.d.ts +17 -0
- package/es/panel-component/panel-item-render/panel-item-render.provider.d.ts.map +1 -0
- package/es/panel-component/panel-item-render/panel-item-render.provider.mjs +15 -0
- package/lib/index.cjs +17 -15
- package/package.json +3 -3
- package/src/panel-component/index.ts +1 -0
- package/src/panel-component/panel-item-render/index.ts +18 -0
- package/src/panel-component/panel-item-render/panel-item-render.controller.ts +52 -0
- package/src/panel-component/panel-item-render/panel-item-render.provider.ts +30 -0
- package/src/panel-component/panel-item-render/panel-item-render.tsx +50 -0
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-view-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-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-panel-
|
|
1
|
+
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-view-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-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-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.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-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);width:100%;height:100%}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-nav-pos{width:100%;height:100%}.ibiz-single-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-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-multi-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-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/core","ramda","qx-util","vue-router","qs","@ibiz-template/runtime","pinia","dayjs","lodash-es"],(function(t){"use strict";var e,n,o,a,s,r,i,l,c,u,d,h,p,m,f,v,g,y,w,C,b,I,P,D,N,O,E,A,x,S,R,z,T,B,j,V,L,M,k,_,G,W,q,$,F,U,K,H,X,Q,Y,J,Z,tt,et,nt,ot,at,st,rt,it,lt,ct,ut,dt,ht,pt,mt,ft,vt,gt,yt,wt,Ct,bt,It,Pt,Dt,Nt,Ot,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,h=t.h,p=t.resolveComponent,m=t.computed,f=t.onUnmounted,v=t.provide,g=t.defineComponent,y=t.createVNode,w=t.withDirectives,C=t.resolveDirective,b=t.isVNode,I=t.onMounted,P=t.createTextVNode},function(t){D=t.onClickOutside,N=t.NOOP,O=t.listenJSEvent,E=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.getMatchResPath,H=t.calcDeCodeNameById,X=t.getControlProvider,Q=t.convertNavData,Y=t.getControl,J=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,ht=t.execDELogicById,pt=t.toLocalOpenWFRedirectView,mt=t.ViewController,ft=t.getControlsByView,vt=t.registerViewProvider,gt=t.getDERedirectToView,yt=t.ViewLayoutPanelController,wt=t.registerControlProvider,Ct=t.ControlType,bt=t.PanelController,It=t.RemotePluginItem},function(t){Pt=t.defineStore,Dt=t.createPinia},function(t){Nt=t.default},function(t){Ot=t.isNumber,Et=t.isNil}],execute:function(){function At(t,o,a={}){let s=N,r=N,i=N;const l=()=>{s(),s=N,r=N,i=N};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!==N&&l()})),{stop:()=>s(),pause:()=>r(),proceed:()=>i()}}function xt(){return a().proxy.$props}function St(t){return s(t)?r(t):t}function Rt(){const t=a().proxy;return e=>{t.$forceUpdate(),e&&M(e)&&t.$nextTick((()=>{e()}))}}t({calcResRoutePath:Gt,createOverlayView:Ut,generateRoutePath:async function(t,e,n,o){const a=Lt(e);let s=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(s=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:kt(n),params:o}),2===s&&(await Gt(a,n,t.appDataEntityId,t.appId),_t.includes(t.viewType))){const e=H(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:Mt(a)}},getArrayProps:qn,getAutoCompleteProps:kn,getCascaderProps:$n,getCheckboxListProps:Nn,getCheckboxProps:On,getCodeProps:_n,getColorPickerProps:Fn,getDataPickerProps:En,getDatePickerProps:An,getDateRangeProps:xn,getDrawerPlacement:function(t){return Kt[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{...Nn(),...wn()}},getGridCheckboxProps:function(){return{...On(),...wn()}},getGridCodeProps:function(){return{..._n(),...wn()}},getGridColorPickerProps:function(){return{...Fn(),...wn()}},getGridDataPickerProps:function(){return{...En(),...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:Wt,getNumberRangeProps:Rn,getOrigin:St,getOwnRouteContext:kt,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===zt;return 1===t.length&&t[0]===zt},onRouteChange:function(t,n){const o=q();if(!o)throw new A("无法正确获取route,可能是依赖问题");e((()=>null==o?void 0:o.path),(()=>{const e=Wt(o,n);t({currentKey:e,fullPath:o.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Ut(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Ut(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Ut(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Ut(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e){var n;const o=Lt(t);let a=o.pathNodes[e-1].viewName;if(!a)throw new A("第".concat(e,"级路由不存在视图标识"));"index"===a&&(a=ibiz.hub.defaultAppIndexViewName);const s=await ibiz.hub.getAppView(a);if(!s)throw new A("找不到视图".concat(a));const r={};(null==(n=ibiz.appData)?void 0:n.context)&&Object.assign(r,ibiz.appData.context);o.appContext&&Object.assign(r,o.appContext);if(1!==e)for(let t=0;t<e;t++){const e=o.pathNodes[t];k(e.context)&&Object.assign(r,e.context)}const{params:i,srfnav:l}=o.pathNodes[e-1];return{viewModel:s,context:r,params:i,srfnav:l}},prepareControl:function(t){const e=Vt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=Vt("control-".concat(s)),l=[e.b(),e.b(s),e.m(a)];r&&l.push(r);return{controlClass:l,ns:i}},renderString:function(t){if(B(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:Lt,routePath2string:Mt,useClickOutside:At,useControlController:Bt,useController:function(t){t.force=Rt()},useCtx:Tt,useEventListener:jt,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 jt(n,"click",(e=>{o.value||(a=At(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Rt,useForceTogether:function(t,e){const n=e.force,o=Rt();e.force=t=>{n(t),o()}},useMobCtx:function(){return i("ctx")},useNamespace:Vt,useProps:xt,usePropsWatch:function(t,n,o){const a=xt();Object.prototype.hasOwnProperty.call(a,t)&&(e((()=>a[t]),((t,e)=>{n(St(t),St(e))}),o),n(St(a[t]),void 0))},useRouteKey:function(t,n,o){o||(o=d(""));o.value=t.value;const a=new qt(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:Qt});const zt=t("EmptyVNode",o("EmptyVNode"));function Tt(){return i("ctx")}function Bt(t,o){const s=Tt(),r=xt();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=Rt();const h=a().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),h.$emit("controllerAppear",d),d.created(),n((()=>d.destroyed())),d}function jt(t,o,a,s={}){let r=N;return e(t,((t,e)=>{t!==e&&(B(t)?(r(),r=N):r=O((null==t?void 0:t.$el)||t,o,a,s))}),{immediate:!0}),n((()=>{r!==N&&r()})),()=>{r()}}function Vt(t){return new E(t,ibiz.env.namespace)}function Lt(t){const e=t.matched.length,n=[];for(let o=1;o<=e;o++){const e=t.path.split("/")[2*o],a=t.params["params".concat(o)];let s,r,i;s=a&&a!==ibiz.env.routePlaceholder?F.parse(a,{strictNullHandling:!0,delimiter:";"}):void 0,s&&(1===o?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(decodeURIComponent(s.srfnavctx)),delete s.srfnavctx),s.srfnav&&(i=s.srfnav,delete s.srfnav))),n.push({viewName:e,context:r,params:s,srfnav:i})}let o;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(o=F.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:o,pathNodes:n}}function Mt(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 kt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const _t=t("excludeViewTypes",[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 Gt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=K(e,a);if(s||(s={path:"",keys:[a.codeName.toLowerCase()]}),s){const n=t.pathNodes[1].context,o={};s.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Wt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Lt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,Mt(o))}class qt{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",qt);const $t=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Ft{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new _,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=Ft.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>h(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",Ft);function Ut(t){return e=>{const n=p("IBizViewShell");return h(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Ft{present(t){return this.modal.present(t)}});const Kt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Ht{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e){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 Ht(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)}});function Xt(t){if(["begintime","endtime","createdate","updatedate"].forEach((e=>{Ot(t[e])&&(t[e]=Nt(t[e]).format("YYYY-MM-DD HH:mm:ss"))})),!Et(t.actionresult))try{const e=JSON.parse(t.actionresult);t.actionresult=e}catch(t){}return t}t("useAppStore",Pt("appStore",(()=>{const{allAsyncActions:t,recentAsyncActions:e}=function(){const t=d([]),e=d(0),n=m((()=>t.value.filter(((t,n)=>n<e.value)))),o=n=>{if(!n.data||"ASYNCACTION"!==n.subtype)return;const o=Xt(n.data),a=t.value.findIndex((t=>t.asyncacitonid===o.asyncacitonid));-1!==a?(t.value.unshift(o),e.value+=1):a>=e.value?(t.value.splice(a,1),t.value.unshift(o),e.value+=1):t.value.splice(a,1,o)};return(async()=>{const e=await ibiz.asyncAction.fetch();e.data.forEach(Xt),t.value=e.data})(),ibiz.mc.command.asyncAction.on(o),f((()=>{ibiz.mc.command.asyncAction.off(o)})),{allAsyncActions:t,recentAsyncActions:n}}();return{appStore:l({allAsyncActions:t,get recentAsyncActions(){return e.value}})}})));t("useUIStore",Pt("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",Dt());function Qt(t){const o=xt(),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),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),v("ctx",d.ctx),d.state=l(d.state),d.slotProps=l(d.slotProps),o.modal&&(d.modal=o.modal),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=Rt();const h=a().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),d.created(),n((()=>d.destroyed())),d}t("IBizIcon",g({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Vt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=m((()=>function(t){if(t){if(t.htmlStr)return y("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?y("i",{class:[e.b(),t.cssClass]},null):y("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return x(t.imagePath)?y("img",{class:e.b(),src:t.imagePath},null):S(t.imagePath)?y("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return S(t.rawContent)?y("div",{class:e.b(),innerHTML:t.rawContent},null):y("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",g({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=h(e.type,{...a,...n,key:t.manualKey});return o.vNode=s,s}}}},render(){return y(p("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",g({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Vt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,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=p("IBizControlShell");return h(e,{modelData:t,...o})}}));const n=s[a.name];r=h(p(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return y("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",g({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();X(t.modelData).then((t=>{t?o.value=t:n.value="未找到对应部件的适配器",e.value=!0})).catch((t=>{ibiz.log.error(t),n.value=t.message,e.value=!0}));return{ns:Vt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?h(p(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizViewShell",g({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Vt("view-shell"),n=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.appViewNavContexts;let o={};k(n)&&(o=Q(n,t.params||{},t.context));const a=e.appViewNavParams;let r={};k(a)&&(r=Q(a,t.params||{},t.context));const{xdataControlName:i}=e;if(i){const n=Y(e,i);if(!n)throw new A("未找到数据控件");{const e=H(n.appDataEntityId);if(o[e]||t.context[e]){const e=W();if(B(t.context.srfsessionid)||V(t.context.srfsessionid)){const t=ibiz.uiDomainManager.create(e);o.srfsessionid=t.id}const a=ibiz.hub.getApp(n.appId),s=await a.deService.getService(t.context,n.appDataEntityId),i=await s.get({...t.context,...o,srfsessionid:e},t.params||{});if(i.ok&&i.data){const{data:t}=i,{srfwftag:e}=t;e&&(r.srfwftag=e)}ibiz.uiDomainManager.destroy(e)}}}s.value=await ibiz.hub.loadAppView(e.appId,e.id,{...t.context,...o,...r})}else s.value=e;try{a.value=await J(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?h(p(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizCodeList",g({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=Vt("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 y("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,y("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&&y(p("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",g({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}));class Yt extends Z{}t("PanelContainerState",Yt);class Jt extends tt{createState(){var t;return new Yt(null==(t=this.parent)?void 0:t.state)}}function Zt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerController",Jt);const te=g({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Jt,required:!0}},setup(t){const e=Vt("panel-container"),{id:n}=t.modelData,o=m((()=>{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=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},Zt(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Zt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class ee{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Jt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",$t(te,(function(t){t.component(te.name,te),et("CONTAINER",(()=>new ee)),et("CONTAINER_DEFAULT",(()=>new ee))})));const ne=g({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:Vt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),y("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 oe 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",oe);class ae{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",$t(ne,(function(t){t.component(ne.name,ne),et("CTRLPOS",(()=>new ae))})));class se extends tt{}function re(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("ScrollContainerItemController",se);const ie=t("ScrollContainerItem",g({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:se,required:!0}},setup(t){const e=Vt("scroll-container-item"),{id:n}=t.modelData,o=m((()=>[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 y(p("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},re(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},re(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class le{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new se(t,e,n);return await o.init(),o}}class ce extends tt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",ce);const ue=t("ScrollContainer",g({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:ce,required:!0}},setup(t){const e=Vt("scroll-container"),{id:n}=t.modelData,o=m((()=>[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 y("div",{class:this.classArr},[y("div",{class:[this.ns.e("header")],style:i.top},[o]),y("div",{class:[this.ns.b("content")]},[y("div",{class:this.ns.be("content","left"),style:i.left},[n]),y("div",{class:this.ns.be("content","center")},[r]),y("div",{class:this.ns.be("content","right"),style:i.right},[a])]),y("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class de{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new ce(t,e,n);return await o.init(),o}}t("IBizScrollContainer",$t(ue,(function(t){t.component(ue.name,ue),t.component(ie.name,ie),et("CONTAINER_CONTAINER_SCROLL",(()=>new de)),et("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new le)),et("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new le)),et("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new le)),et("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new le)),et("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new le))})));class he extends Z{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",he);const pe=["is404","isRoutePushed"];class me 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 he(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),pe.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new 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=Wt(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){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=Wt(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 fe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("NavPosController",me);const ve=g({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:me,required:!0}},setup(t){const n=t.controller,o=Vt("nav-pos"),a=$(),s=q();if(n.setRouter(a),n.routeDepth){const t=Wt(s,n.routeDepth);e((()=>s.fullPath),(()=>{const e=Wt(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=y(p("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?y(t,null,null):null;return s?y(p("keepAlive"),{include:o,max:30,isKey:!0},fe(e)?e:{default:()=>[e]}):e}});else{const t=n?h(p("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?y(p("keepAlive"),{include:o,max:30,isKey:!0},fe(t)?t:{default:()=>[t]}):t}return y("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class ge{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new me(t,e,n);return await o.init(),o}}t("IBizNavPos",$t(ve,(function(t){t.component(ve.name,ve),et("RAWITEM_NAV_POS",(()=>new ge))})));class ye extends Z{}class we 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 ye(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",we);const Ce=g({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(t){const e=Vt("panel-field"),n=m((()=>{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=p(this.controller.editorProvider.formEditor);t=h(n,{...e})}else t=y(p("not-supported-editor"),{modelData:this.modelData.editor},null)}return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class be{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new we(t,e,n);return await o.init(),o}}t("IBizPanelField",$t(Ce,(function(t){t.component(Ce.name,Ce),et("FIELD",(()=>new be))})));class Ie extends tt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",Ie);const Pe=g({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Ie,required:!0}},setup(t){const e=Vt("panel-rawitem"),n=m((()=>{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 y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[y(p("iBizRawItem"),{rawItem:this.modelData},null)])}});class De{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new Ie(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",$t(Pe,(function(t){t.component(Pe.name,Pe),et("RAWITEM",(()=>new De)),et("RAWITEM_STATIC_IMAGE",(()=>new De)),et("RAWITEM_STATIC_LABEL",(()=>new De)),et("RAWITEM_STATIC_TEXT",(()=>new De))})));class Ne extends Z{constructor(){super(...arguments),this.data={}}}class Oe{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new Ne,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 Ee extends Z{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Ee);class Ae extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Ee(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 Oe(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 ht(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",Ae);const xe=g({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ae,required:!0}},setup(t){const n=Vt("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=m((()=>[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 y(p("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 y(p("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)&&!b(a)?e:{default:()=>[e]});var a}))]}})})),y("div",{class:this.classArr},[t])}});class Se{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Ae(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",$t(xe,(function(t){t.component(xe.name,xe),et("CONTAINER_CONTAINER_MULTIDATA",(()=>new Se))})));class Re extends Z{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Re);class ze extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Re(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 ht(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",ze);const Te=g({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:ze,required:!0}},setup(t){const e=Vt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=l(n.state)}));const o=i("renderPanelItem"),a=m((()=>[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():y(p("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 y(p("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)&&!b(o)?e:{default:()=>[e]});var o}))]}}),y("div",{class:this.classArr},[t])}});class Be{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new ze(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",$t(Te,(function(t){t.component(Te.name,Te),et("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Be))})));class je extends Z{}t("GridContainerState",je);class Ve extends tt{createState(){var t;return new je(null==(t=this.parent)?void 0:t.state)}}function Le(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("GridContainerController",Ve);const Me=g({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ve,required:!0}},setup(t){const e=Vt("grid-container"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=m((()=>({...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 y(p("iBizRow"),{class:this.classArr,layout:this.layoutModel},Le(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Le(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class ke{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Ve(t,e,n);return await o.init(),o}}t("IBizGridContainer",$t(Me,(function(t){t.component(Me.name,Me),et("CONTAINER_CONTAINER_GRID",(()=>new ke))})));class _e extends Z{}t("PanelContainerImageState",_e);class Ge extends tt{createState(){var t;return new _e(null==(t=this.parent)?void 0:t.state)}}function We(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerImageController",Ge);const qe=g({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:Ge,required:!0}},setup(t){const e=Vt("panel-container-image"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=m((()=>{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=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},We(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},We(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class $e{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new Ge(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",$t(qe,(function(t){t.component(qe.name,qe),et("CONTAINER_CONTAINER_IMAGE",(()=>new $e))})));class Fe extends Z{}t("PanelContainerGroupState",Fe);class Ue extends tt{createState(){var t;return new Fe(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",Ue);class Ke{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Ue(t,e,n);return await o.init(),o}}function He(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Xe=g({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Ue,required:!0}},setup(t){const e=Vt("panel-container-group"),n=d(!t.controller.defaultExpansion);return{ns:e,captionText:m((()=>{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=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},He(n=a.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},He(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=y("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[y("div",{class:[this.ns.be("header","left")]},[y("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),y("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?y("ion-icon",{name:"caret-forward-sharp"},null):y("ion-icon",{name:"caret-down-sharp"},null))])])),y("div",{class:o},[r,y("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",$t(Xe,(function(t){t.component(Xe.name,Xe),et("CONTAINER_CONTAINER_GROUP",(()=>new Ke))})));function Qe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Ye=g({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:tt,required:!0}},setup(t){const e=Vt("panel-tab-page"),n=m((()=>{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 y(p("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Qe(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return y(p("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Qe(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class Je{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new tt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",$t(Ye,(function(t){t.component(Ye.name,Ye),et("TABPAGE",(()=>new Je))}))),t("AppRedirectView",g({setup(){var t;const e=T.create((null==(t=ibiz.appData)?void 0:t.context)||{});f((()=>{e.destroy()}));const{href:n}=window.location;I((()=>ibiz.util.hiddenAppLoading())),async function(){await pt(e,n)}()},render:()=>y("div",null,[P("重定向跳转中")])}));class Ze{constructor(){this.component="IBizView"}}const tn=g({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(){const t=Vt("view"),e=Qt(((...t)=>new mt(...t))),n=ft(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=m((()=>[t.b(),t.b(r),t.m(s),i,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""])),c=d(null),u=W(),h=window.devtool;I((()=>{h&&h.registerView(u,e,c)})),f((()=>{h&&h.unRegisterView(u)}));return{c:e,controls:n,viewClassNames:l,container:c,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 y(p("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=p(s.component);return h(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=y("span",{style:"color:red;"},[P("视图类型"),this.modelData.viewType,P("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=h(p(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return w(y("div",{ref:"container",class:this.viewClassNames},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[C("loading"),this.c.state.isLoading]])}});t("IBizView",$t(tn,(function(t){t.component(tn.name,tn),vt("DEFAULT",(()=>new Ze))}))),t("TodoRedirect",g({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:()=>y("div",null,[P("待办列表重定向")])}));class en{constructor(){this.component="IBizPortalView"}}const nn=g({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=Vt("view"),n=Qt(((...t)=>new mt(...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=p(s.component);return h(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return y("div",{class:this.viewClassNames},[e])}}),on=(t("IBizPortalView",$t(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))}))),g({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Qt(((...t)=>new mt(...t))),n=d(),o=d(),a=d();return e.evt.on("onCreated",(()=>{gt(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?h(p("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):w(y("div",{style:"width: 100%; height: 100%;"},null),[[C("loading"),!this.toViewId]])}}));class an{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",$t(on,(function(t){t.component(on.name,on);const e=new an;vt(U.DE_REDIRECT_VIEW,(()=>e))})));const sn=g({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=Bt(((...e)=>new yt(...e,t.container))),a=Vt("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 y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const u=p(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)))),h(u,{modelData:t,controller:l[t.id],key:t.id},d)};return v("renderPanelItem",s),{c:o,ns:a,renderPanelItem:s}},render(){const{state:t,model:e}=this.c;return y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("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",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class rn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",$t(sn,(function(t){t.component(sn.name,sn),wt(Ct.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 y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const l=p(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)))),h(l,{modelData:t,controller:r[t.id],key:t.id},c)}const cn=g({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=Bt(((...e)=>new bt(...e,t.container))),o=Vt("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 y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("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",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=ln(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class un{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",$t(cn,(function(t){t.component(cn.name,cn),wt(Ct.PANEL,(()=>new un))})));function dn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function hn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function pn(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),hn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=pn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(hn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=pn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return hn(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];hn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":mn.normalize(t)},relative:function(t,e){if(hn(t),hn(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(hn(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');hn(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){hn(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){hn(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,vn=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 It(t,e,n);if(o){if(o.config["systemjs-importmap"]){const t=this.handleSystemImportMap(o.config["systemjs-importmap"]);t&&System.addImportMap(t)}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(vn.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}handleSystemImportMap(t){if(t){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 gn{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 gn(Object),data:new gn(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 Nn(){return{...yn(),value:[String,Number]}}function On(){return{...yn(),value:[String,Number]}}function En(){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",gn)}}}));
|
|
1
|
+
System.register(["vue","@ibiz-template/core","ramda","qx-util","vue-router","qs","@ibiz-template/runtime","pinia","dayjs","lodash-es"],(function(t){"use strict";var e,n,o,a,s,r,i,l,c,u,d,h,p,m,f,v,g,y,w,C,b,I,P,D,N,E,O,A,x,R,S,z,B,T,j,V,L,M,k,_,G,W,q,$,F,U,K,H,X,Q,Y,J,Z,tt,et,nt,ot,at,st,rt,it,lt,ct,ut,dt,ht,pt,mt,ft,vt,gt,yt,wt,Ct,bt,It,Pt,Dt,Nt,Et,Ot,At;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,h=t.h,p=t.resolveComponent,m=t.computed,f=t.onUnmounted,v=t.provide,g=t.defineComponent,y=t.createVNode,w=t.withDirectives,C=t.resolveDirective,b=t.isVNode,I=t.onMounted,P=t.createTextVNode},function(t){D=t.onClickOutside,N=t.NOOP,E=t.listenJSEvent,O=t.Namespace,A=t.RuntimeError,x=t.isBase64Image,R=t.isSvg,S=t.ModelError,z=t.RuntimeModelError,B=t.IBizContext},function(t){T=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.getMatchResPath,H=t.calcDeCodeNameById,X=t.getControlProvider,Q=t.convertNavData,Y=t.getControl,J=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,ht=t.execDELogicById,pt=t.ScriptFactory,mt=t.toLocalOpenWFRedirectView,ft=t.ViewController,vt=t.getControlsByView,gt=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,Nt=t.createPinia},function(t){Et=t.default},function(t){Ot=t.isNumber,At=t.isNil}],execute:function(){function xt(t,o,a={}){let s=N,r=N,i=N;const l=()=>{s(),s=N,r=N,i=N};return e(t,((t,e)=>{if(t!==e)if(T(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!==N&&l()})),{stop:()=>s(),pause:()=>r(),proceed:()=>i()}}function Rt(){return a().proxy.$props}function St(t){return s(t)?r(t):t}function zt(){const t=a().proxy;return e=>{t.$forceUpdate(),e&&M(e)&&t.$nextTick((()=>{e()}))}}t({calcResRoutePath:Wt,createOverlayView:Kt,generateRoutePath:async function(t,e,n,o){const a=Mt(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:_t(n),params:o}),2===s&&(await Wt(a,n,t.appDataEntityId,t.appId),Gt.includes(t.viewType))){const e=H(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:kt(a)}},getArrayProps:Kn,getAutoCompleteProps:qn,getCascaderProps:Hn,getCheckboxListProps:xn,getCheckboxProps:Rn,getCodeProps:$n,getColorPickerProps:Xn,getDataPickerProps:Sn,getDatePickerProps:zn,getDateRangeProps:Bn,getDrawerPlacement:function(t){return Ht[t]||"right"},getDropdownProps:An,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:In,getGridArrayProps:function(){return{...Kn(),...Pn()}},getGridAutoCompleteProps:function(){return{...qn(),...Pn()}},getGridCascaderProps:function(){return{...Hn(),...Pn()}},getGridCheckboxListProps:function(){return{...xn(),...Pn()}},getGridCheckboxProps:function(){return{...Rn(),...Pn()}},getGridCodeProps:function(){return{...$n(),...Pn()}},getGridColorPickerProps:function(){return{...Xn(),...Pn()}},getGridDataPickerProps:function(){return{...Sn(),...Pn()}},getGridDatePickerProps:function(){return{...zn(),...Pn()}},getGridDateRangeProps:function(){return{...Bn(),...Pn()}},getGridDropdownProps:function(){return{...An(),...Pn()}},getGridEditorCommonProps:Pn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Fn(),...Pn()}},getGridInputIpProps:function(){return{...En(),...Pn()}},getGridInputNumberProps:function(){return{...Nn(),...Pn()}},getGridInputProps:function(){return{...Dn(),...Pn()}},getGridListBoxProps:function(){return{...Tn(),...Pn()}},getGridMarkDownProps:function(){return{...Un(),...Pn()}},getGridNumberRangeProps:function(){return{...jn(),...Pn()}},getGridRadioProps:function(){return{...Vn(),...Pn()}},getGridRateProps:function(){return{...Ln(),...Pn()}},getGridRawProps:function(){return{...Mn(),...Pn()}},getGridSliderProps:function(){return{...kn(),...Pn()}},getGridSpanProps:function(){return{...On(),...Pn()}},getGridStepperProps:function(){return{..._n(),...Pn()}},getGridSwitchProps:function(){return{...Gn(),...Pn()}},getGridUploadProps:function(){return{...Wn(),...Pn()}},getHtmlProps:Fn,getInputIpProps:En,getInputNumberProps:Nn,getInputProps:Dn,getListBoxProps:Tn,getMarkDownProps:Un,getNestedRoutePath:qt,getNumberRangeProps:jn,getOrigin:St,getOwnRouteContext:_t,getRadioProps:Vn,getRateProps:Ln,getRawProps:Mn,getSliderProps:kn,getSpanProps:On,getStepperProps:_n,getSwitchProps:Gn,getUploadProps:Wn,isEmptyVNode:function(t){if(!Array.isArray(t))return t===Bt;return 1===t.length&&t[0]===Bt},onRouteChange:function(t,n){const o=q();if(!o)throw new A("无法正确获取route,可能是依赖问题");e((()=>null==o?void 0:o.path),(()=>{const e=qt(o,n);t({currentKey:e,fullPath:o.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Kt(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Kt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Kt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Kt(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e){var n;const o=Mt(t);let a=o.pathNodes[e-1].viewName;if(!a)throw new A("第".concat(e,"级路由不存在视图标识"));"index"===a&&(a=ibiz.hub.defaultAppIndexViewName);const s=await ibiz.hub.getAppView(a);if(!s)throw new A("找不到视图".concat(a));const r={};(null==(n=ibiz.appData)?void 0:n.context)&&Object.assign(r,ibiz.appData.context);o.appContext&&Object.assign(r,o.appContext);if(1!==e)for(let t=0;t<e;t++){const e=o.pathNodes[t];k(e.context)&&Object.assign(r,e.context)}const{params:i,srfnav:l}=o.pathNodes[e-1];return{viewModel:s,context:r,params:i,srfnav:l}},prepareControl:function(t){const e=Lt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=Lt("control-".concat(s)),l=[e.b(),e.b(s),e.m(a)];r&&l.push(r);return{controlClass:l,ns:i}},renderString:function(t){if(T(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:Mt,routePath2string:kt,useClickOutside:xt,useControlController:jt,useController:function(t){t.force=zt()},useCtx:Tt,useEventListener:Vt,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 Vt(n,"click",(e=>{o.value||(a=xt(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:zt,useForceTogether:function(t,e){const n=e.force,o=zt();e.force=t=>{n(t),o()}},useMobCtx:function(){return i("ctx")},useNamespace:Lt,useProps:Rt,usePropsWatch:function(t,n,o){const a=Rt();Object.prototype.hasOwnProperty.call(a,t)&&(e((()=>a[t]),((t,e)=>{n(St(t),St(e))}),o),n(St(a[t]),void 0))},useRouteKey:function(t,n,o){o||(o=d(""));o.value=t.value;const a=new $t(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:Yt});const Bt=t("EmptyVNode",o("EmptyVNode"));function Tt(){return i("ctx")}function jt(t,o){const s=Tt(),r=Rt();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=zt();const h=a().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),h.$emit("controllerAppear",d),d.created(),n((()=>d.destroyed())),d}function Vt(t,o,a,s={}){let r=N;return e(t,((t,e)=>{t!==e&&(T(t)?(r(),r=N):r=E((null==t?void 0:t.$el)||t,o,a,s))}),{immediate:!0}),n((()=>{r!==N&&r()})),()=>{r()}}function Lt(t){return new O(t,ibiz.env.namespace)}function Mt(t){const e=t.matched.length,n=[];for(let o=1;o<=e;o++){const e=t.path.split("/")[2*o],a=t.params["params".concat(o)];let s,r,i;s=a&&a!==ibiz.env.routePlaceholder?F.parse(a,{strictNullHandling:!0,delimiter:";"}):void 0,s&&(1===o?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(decodeURIComponent(s.srfnavctx)),delete s.srfnavctx),s.srfnav&&(i=s.srfnav,delete s.srfnav))),n.push({viewName:e,context:r,params:s,srfnav:i})}let o;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(o=F.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:o,pathNodes:n}}function kt(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 _t(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const Gt=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 Wt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=K(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 qt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Mt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,kt(o))}class $t{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",$t);const Ft=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Ut{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=Ut.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>h(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",Ut);function Kt(t){return e=>{const n=p("IBizViewShell");return h(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Ut{present(t){return this.modal.present(t)}});const Ht={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class Xt{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 Xt(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)}});function Qt(t){if(["begintime","endtime","createdate","updatedate"].forEach((e=>{Ot(t[e])&&(t[e]=Et(t[e]).format("YYYY-MM-DD HH:mm:ss"))})),!At(t.actionresult))try{const e=JSON.parse(t.actionresult);t.actionresult=e}catch(t){}return t}t("useAppStore",Dt("appStore",(()=>{const{allAsyncActions:t,recentAsyncActions:e}=function(){const t=d([]),e=d(0),n=m((()=>t.value.filter(((t,n)=>n<e.value)))),o=n=>{if(!n.data||"ASYNCACTION"!==n.subtype)return;const o=Qt(n.data),a=t.value.findIndex((t=>t.asyncacitonid===o.asyncacitonid));-1!==a?(t.value.unshift(o),e.value+=1):a>=e.value?(t.value.splice(a,1),t.value.unshift(o),e.value+=1):t.value.splice(a,1,o)};return(async()=>{const e=await ibiz.asyncAction.fetch();e.data.forEach(Qt),t.value=e.data})(),ibiz.mc.command.asyncAction.on(o),f((()=>{ibiz.mc.command.asyncAction.off(o)})),{allAsyncActions:t,recentAsyncActions:n}}();return{appStore:l({allAsyncActions:t,get recentAsyncActions(){return e.value}})}})));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",Nt());function Yt(t){const o=Rt(),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),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),v("ctx",d.ctx),d.state=l(d.state),d.slotProps=l(d.slotProps),o.modal&&(d.modal=o.modal),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=zt();const h=a().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),d.created(),n((()=>d.destroyed())),d}t("IBizIcon",g({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Lt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=m((()=>function(t){if(t){if(t.htmlStr)return y("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?y("i",{class:[e.b(),t.cssClass]},null):y("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return x(t.imagePath)?y("img",{class:e.b(),src:t.imagePath},null):R(t.imagePath)?y("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return R(t.rawContent)?y("div",{class:e.b(),innerHTML:t.rawContent},null):y("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",g({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=h(e.type,{...a,...n,key:t.manualKey});return o.vNode=s,s}}}},render(){return y(p("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",g({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Lt("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")&&(T(i.width)||(u.width="".concat(i.width,"px")),T(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=p("IBizControlShell");return h(e,{modelData:t,...o})}}));const n=s[a.name];r=h(p(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return y("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",g({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();X(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:Lt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?h(p(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizViewShell",g({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Lt("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.appViewNavContexts;let o={};k(n)&&(o=Q(n,t.params||{},t.context));const a=e.appViewNavParams;let r={};k(a)&&(r=Q(a,t.params||{},t.context));const{xdataControlName:i}=e;if(i){const n=Y(e,i);if(!n)throw new A("未找到数据控件");{const e=H(n.appDataEntityId);if(o[e]||t.context[e]){const e=W();if(T(t.context.srfsessionid)||V(t.context.srfsessionid)){const t=ibiz.uiDomainManager.create(e);o.srfsessionid=t.id}const a=ibiz.hub.getApp(n.appId),s=await a.deService.getService(t.context,n.appDataEntityId),i=await s.get({...t.context,...o,srfsessionid:e},t.params||{});if(i.ok&&i.data){const{data:t}=i,{srfwftag:e}=t;e&&(r.srfwftag=e)}ibiz.uiDomainManager.destroy(e)}}}s.value=await ibiz.hub.loadAppView(e.appId,e.id,{...t.context,...o,...r})}else s.value=e;try{a.value=await J(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?h(p(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizCodeList",g({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=Lt("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(T(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 y("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,y("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&&y(p("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",g({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}));class Jt extends Z{}t("PanelContainerState",Jt);class Zt extends tt{createState(){var t;return new Jt(null==(t=this.parent)?void 0:t.state)}}function te(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerController",Zt);const ee=g({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Zt,required:!0}},setup(t){const e=Lt("panel-container"),{id:n}=t.modelData,o=m((()=>{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=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},te(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},te(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class ne{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Zt(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Ft(ee,(function(t){t.component(ee.name,ee),et("CONTAINER",(()=>new ne)),et("CONTAINER_DEFAULT",(()=>new ne))})));const oe=g({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:Lt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),y("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 ae 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",ae);class se{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new ae(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Ft(oe,(function(t){t.component(oe.name,oe),et("CTRLPOS",(()=>new se))})));class re extends tt{}function ie(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("ScrollContainerItemController",re);const le=t("ScrollContainerItem",g({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:re,required:!0}},setup(t){const e=Lt("scroll-container-item"),{id:n}=t.modelData,o=m((()=>[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 y(p("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},ie(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ie(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class ce{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new re(t,e,n);return await o.init(),o}}class ue extends tt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",ue);const de=t("ScrollContainer",g({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:ue,required:!0}},setup(t){const e=Lt("scroll-container"),{id:n}=t.modelData,o=m((()=>[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 y("div",{class:this.classArr},[y("div",{class:[this.ns.e("header")],style:i.top},[o]),y("div",{class:[this.ns.b("content")]},[y("div",{class:this.ns.be("content","left"),style:i.left},[n]),y("div",{class:this.ns.be("content","center")},[r]),y("div",{class:this.ns.be("content","right"),style:i.right},[a])]),y("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class he{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Ft(de,(function(t){t.component(de.name,de),t.component(le.name,le),et("CONTAINER_CONTAINER_SCROLL",(()=>new he)),et("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new ce)),et("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new ce)),et("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new ce)),et("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new ce)),et("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new ce))})));class pe extends Z{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",pe);const me=["is404","isRoutePushed"];class fe 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 pe(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),me.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=qt(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=qt(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 ve(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("NavPosController",fe);const ge=g({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:fe,required:!0}},setup(t){const n=t.controller,o=Lt("nav-pos"),a=$(),s=q();if(n.setRouter(a),n.routeDepth){const t=qt(s,n.routeDepth);e((()=>s.fullPath),(()=>{const e=qt(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=y(p("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?y(t,null,null):null;return s?y(p("keepAlive"),{include:o,max:30,isKey:!0},ve(e)?e:{default:()=>[e]}):e}});else{const t=n?h(p("IBizViewShell"),{context:a[n].context,params:a[n].params,key:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?y(p("keepAlive"),{include:o,max:30,isKey:!0},ve(t)?t:{default:()=>[t]}):t}return y("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class ye{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new fe(t,e,n);return await o.init(),o}}t("IBizNavPos",Ft(ge,(function(t){t.component(ge.name,ge),et("RAWITEM_NAV_POS",(()=>new ye))})));class we extends Z{}class Ce 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 we(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",Ce);const be=g({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:Ce,required:!0}},setup(t){const e=Lt("panel-field"),n=m((()=>{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=p(this.controller.editorProvider.formEditor);t=h(n,{...e})}else t=y(p("not-supported-editor"),{modelData:this.modelData.editor},null)}return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class Ie{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new Ce(t,e,n);return await o.init(),o}}t("IBizPanelField",Ft(be,(function(t){t.component(be.name,be),et("FIELD",(()=>new Ie))})));class Pe extends tt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",Pe);const De=g({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Pe,required:!0}},setup(t){const e=Lt("panel-rawitem"),n=m((()=>{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 y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[y(p("iBizRawItem"),{rawItem:this.modelData},null)])}});class Ne{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new Pe(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Ft(De,(function(t){t.component(De.name,De),et("RAWITEM",(()=>new Ne)),et("RAWITEM_STATIC_IMAGE",(()=>new Ne)),et("RAWITEM_STATIC_LABEL",(()=>new Ne)),et("RAWITEM_STATIC_TEXT",(()=>new Ne))})));class Ee extends Z{constructor(){super(...arguments),this.data={}}}class Oe{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new Ee,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 Ae extends Z{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Ae);class xe extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Ae(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 S(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 Oe(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 ht(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",xe);const Re=g({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:xe,required:!0}},setup(t){const n=Lt("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=m((()=>[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 y(p("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 y(p("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)&&!b(a)?e:{default:()=>[e]});var a}))]}})})),y("div",{class:this.classArr},[t])}});class Se{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new xe(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Ft(Re,(function(t){t.component(Re.name,Re),et("CONTAINER_CONTAINER_MULTIDATA",(()=>new Se))})));class ze extends Z{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",ze);class Be extends tt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new ze(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 S(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 ht(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",Be);const Te=g({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Be,required:!0}},setup(t){const e=Lt("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=m((()=>[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():y(p("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 y(p("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)&&!b(o)?e:{default:()=>[e]});var o}))]}}),y("div",{class:this.classArr},[t])}});class je{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Be(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Ft(Te,(function(t){t.component(Te.name,Te),et("CONTAINER_CONTAINER_SINGLEDATA",(()=>new je))})));class Ve extends Z{}t("GridContainerState",Ve);class Le extends tt{createState(){var t;return new Ve(null==(t=this.parent)?void 0:t.state)}}function Me(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("GridContainerController",Le);const ke=g({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Le,required:!0}},setup(t){const e=Lt("grid-container"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=m((()=>({...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 y(p("iBizRow"),{class:this.classArr,layout:this.layoutModel},Me(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Me(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class _e{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Le(t,e,n);return await o.init(),o}}t("IBizGridContainer",Ft(ke,(function(t){t.component(ke.name,ke),et("CONTAINER_CONTAINER_GRID",(()=>new _e))})));class Ge extends Z{}t("PanelContainerImageState",Ge);class We extends tt{createState(){var t;return new Ge(null==(t=this.parent)?void 0:t.state)}}function qe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerImageController",We);const $e=g({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:We,required:!0}},setup(t){const e=Lt("panel-container-image"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=m((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=R(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=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},qe(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},qe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Fe{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new We(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Ft($e,(function(t){t.component($e.name,$e),et("CONTAINER_CONTAINER_IMAGE",(()=>new Fe))})));class Ue extends Z{}t("PanelContainerGroupState",Ue);class Ke extends tt{createState(){var t;return new Ue(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",Ke);class He{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Ke(t,e,n);return await o.init(),o}}function Xe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Qe=g({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Ke,required:!0}},setup(t){const e=Lt("panel-container-group"),n=d(!t.controller.defaultExpansion);return{ns:e,captionText:m((()=>{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=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},Xe(n=a.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Xe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=y("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[y("div",{class:[this.ns.be("header","left")]},[y("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),y("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?y("ion-icon",{name:"caret-forward-sharp"},null):y("ion-icon",{name:"caret-down-sharp"},null))])])),y("div",{class:o},[r,y("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",Ft(Qe,(function(t){t.component(Qe.name,Qe),et("CONTAINER_CONTAINER_GROUP",(()=>new He))})));function Ye(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Je=g({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:tt,required:!0}},setup(t){const e=Lt("panel-tab-page"),n=m((()=>{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 y(p("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Ye(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return y(p("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Ye(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class Ze{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new tt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Ft(Je,(function(t){t.component(Je.name,Je),et("TABPAGE",(()=>new Ze))})));class tn extends tt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?pt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const en=g({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:tn,required:!0}},setup(t){var e;const n=Lt("panel-item-render"),o=Lt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,s=m((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=m((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:s,htmlCode:r}},render(){return y("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class nn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new tn(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Ft(en,(function(t){t.component(en.name,en),et("PREDEFINE_RENDER",(()=>new nn))}))),t("AppRedirectView",g({setup(){var t;const e=B.create((null==(t=ibiz.appData)?void 0:t.context)||{});f((()=>{e.destroy()}));const{href:n}=window.location;I((()=>ibiz.util.hiddenAppLoading())),async function(){await mt(e,n)}()},render:()=>y("div",null,[P("重定向跳转中")])}));class on{constructor(){this.component="IBizView"}}const an=g({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=Lt("view"),e=Yt(((...t)=>new ft(...t))),n=vt(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=m((()=>[t.b(),t.b(r),t.m(s),i,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""])),c=d(null),u=W(),h=window.devtool;I((()=>{h&&h.registerView(u,e,c)})),f((()=>{h&&h.unRegisterView(u)}));return{c:e,controls:n,viewClassNames:l,container:c,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 y(p("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=p(s.component);return h(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=y("span",{style:"color:red;"},[P("视图类型"),this.modelData.viewType,P("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=h(p(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return w(y("div",{ref:"container",class:this.viewClassNames},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[C("loading"),this.c.state.isLoading]])}});t("IBizView",Ft(an,(function(t){t.component(an.name,an),gt("DEFAULT",(()=>new on))}))),t("TodoRedirect",g({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:()=>y("div",null,[P("待办列表重定向")])}));class sn{constructor(){this.component="IBizPortalView"}}const rn=g({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=Lt("view"),n=Yt(((...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=p(s.component);return h(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return y("div",{class:this.viewClassNames},[e])}}),ln=(t("IBizPortalView",Ft(rn,(function(t){t.component(rn.name,rn),gt(U.APP_PORTAL_VIEW,(()=>new sn)),gt(U.DE_PORTAL_VIEW,(()=>new sn)),gt(U.DE_PORTAL_VIEW9,(()=>new sn))}))),g({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Yt(((...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?h(p("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):w(y("div",{style:"width: 100%; height: 100%;"},null),[[C("loading"),!this.toViewId]])}}));class cn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Ft(ln,(function(t){t.component(ln.name,ln);const e=new cn;gt(U.DE_REDIRECT_VIEW,(()=>e))})));const un=g({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=jt(((...e)=>new wt(...e,t.container))),a=Lt("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 y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const u=p(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)))),h(u,{modelData:t,controller:l[t.id],key:t.id},d)};return v("renderPanelItem",s),{c:o,ns:a,renderPanelItem:s}},render(){const{state:t,model:e}=this.c;return y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("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",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class dn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Ft(un,(function(t){t.component(un.name,un),Ct(bt.VIEW_LAYOUT_PANEL,(()=>new dn))})));function hn(t,e,n){var o,a;if(t.hidden)return;const{providers:s,panelItems:r}=e,i=s[t.id];if(!i)return y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const l=p(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=>hn(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>hn(t,e,n)))),h(l,{modelData:t,controller:r[t.id],key:t.id},c)}const pn=g({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=jt(((...e)=>new It(...e,t.container))),o=Lt("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 y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("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",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=hn(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class mn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Ft(pn,(function(t){t.component(pn.name,pn),Ct(bt.PANEL,(()=>new mn))})));function fn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function gn(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 yn={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),vn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=gn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(vn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=gn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return vn(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];vn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":yn.normalize(t)},relative:function(t,e){if(vn(t),vn(e),t===e)return"";if((t=yn.resolve(t))===(e=yn.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(vn(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');vn(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){vn(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){vn(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};yn.posix=yn;var wn=yn,Cn=fn(wn);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(wn.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){if(o.config["systemjs-importmap"]){const t=this.handleSystemImportMap(o.config["systemjs-importmap"]);t&&System.addImportMap(t)}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=wn.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(Cn.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(wn.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}handleSystemImportMap(t){if(t){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 bn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function In(){return{value:String,controller:new bn(Object),data:new bn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function Pn(){return{hasError:{type:Boolean}}}function Dn(){return{...In(),value:[String,Number]}}function Nn(){return{...In(),value:Number}}function En(){return{...In(),value:String}}function On(){return{...In(),value:[String,Number,Object,Array]}}function An(){return{...In(),value:[String,Number]}}function xn(){return{...In(),value:[String,Number]}}function Rn(){return{...In(),value:[String,Number]}}function Sn(){return{...In(),value:[String,Array,Object,Number]}}function zn(){return{...In(),value:[String,Number]}}function Bn(){return{...In(),value:[String,Number]}}function Tn(){return{...In(),value:[String,Number]}}function jn(){return{...In(),value:[String,Number]}}function Vn(){return{...In(),value:[String,Number]}}function Ln(){return{...In(),value:[String,Number]}}function Mn(){return{...In(),value:[String,Number,Array]}}function kn(){return{...In(),value:[String,Number]}}function _n(){return{...In(),value:[String,Number]}}function Gn(){return{...In(),value:[String,Number]}}function Wn(){return{...In(),value:String}}function qn(){return{...In(),value:[String,Number]}}function $n(){return{...In(),value:String,language:{type:String},theme:{type:String}}}function Fn(){return{...In(),value:String}}function Un(){return{...In(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function Kn(){return{...In(),value:[Array,Array]}}function Hn(){return{...In(),value:String}}function Xn(){return{...In(),value:String}}t("RequiredProp",bn)}}}));
|
package/es/index.mjs
CHANGED
|
@@ -47,6 +47,7 @@ export { PanelContainerGroupState } from './panel-component/panel-container-grou
|
|
|
47
47
|
export { PanelContainerGroupController } from './panel-component/panel-container-group/panel-container-group.controller.mjs';
|
|
48
48
|
export { IBizPanelContainerGroup } from './panel-component/panel-container-group/index.mjs';
|
|
49
49
|
export { IBizPanelTabPage } from './panel-component/panel-tab-page/index.mjs';
|
|
50
|
+
export { IBizPanelItemRender } from './panel-component/panel-item-render/index.mjs';
|
|
50
51
|
export { AppRedirectView } from './view/app-redirect-view/app-redirect-view.mjs';
|
|
51
52
|
export { IBizView } from './view/common/index.mjs';
|
|
52
53
|
export { TodoRedirect } from './view/todo-redirect/todo-redirect.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/panel-component/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/panel-component/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { IBizGridContainer } from './grid-container/index.mjs';
|
|
|
10
10
|
export { IBizPanelContainerImage } from './panel-container-image/index.mjs';
|
|
11
11
|
export { IBizPanelContainerGroup } from './panel-container-group/index.mjs';
|
|
12
12
|
export { IBizPanelTabPage } from './panel-tab-page/index.mjs';
|
|
13
|
+
export { IBizPanelItemRender } from './panel-item-render/index.mjs';
|
|
13
14
|
export { PanelContainerState } from './panel-container/panel-container.state.mjs';
|
|
14
15
|
export { PanelContainerController } from './panel-container/panel-container.controller.mjs';
|
|
15
16
|
export { PanelCtrlPosController } from './panel-ctrl-pos/panel-ctrl-pos.controller.mjs';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const IBizPanelItemRender: import("../../util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelData: {
|
|
3
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
controller: {
|
|
7
|
+
type: typeof import("./panel-item-render.controller").PanelItemRenderController;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
13
|
+
htmlCode: import("vue").ComputedRef<string | undefined>;
|
|
14
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
modelData: {
|
|
16
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
controller: {
|
|
20
|
+
type: typeof import("./panel-item-render.controller").PanelItemRenderController;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
}>>, {}, {}>>;
|
|
24
|
+
export default IBizPanelItemRender;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;aAS/B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import '../../util/index.mjs';
|
|
3
|
+
import { PanelItemRender } from './panel-item-render.mjs';
|
|
4
|
+
import { PanelItemRenderProvider } from './panel-item-render.provider.mjs';
|
|
5
|
+
import { withInstall } from '../../util/install.mjs';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizPanelItemRender = withInstall(
|
|
9
|
+
PanelItemRender,
|
|
10
|
+
function(v) {
|
|
11
|
+
v.component(PanelItemRender.name, PanelItemRender);
|
|
12
|
+
registerPanelItemProvider(
|
|
13
|
+
"PREDEFINE_RENDER",
|
|
14
|
+
() => new PanelItemRenderProvider()
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export { IBizPanelItemRender, IBizPanelItemRender as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IControlRender, IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PanelItemController, ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
3
|
+
/**
|
|
4
|
+
* 面板绘制器控制器
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2024-01-15 06:01:08
|
|
8
|
+
* @export
|
|
9
|
+
* @class PanelItemRenderController
|
|
10
|
+
* @extends {PanelItemController<IPanelContainer>}
|
|
11
|
+
*/
|
|
12
|
+
export declare class PanelItemRenderController extends PanelItemController<IPanelContainer> {
|
|
13
|
+
/**
|
|
14
|
+
* 面板控制器
|
|
15
|
+
*
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2022-08-24 22:08:59
|
|
18
|
+
* @type {PanelController}
|
|
19
|
+
*/
|
|
20
|
+
panel: ViewLayoutPanelController;
|
|
21
|
+
/**
|
|
22
|
+
* 获取面板绘制器自定义html
|
|
23
|
+
*
|
|
24
|
+
* @author zk
|
|
25
|
+
* @date 2024-01-15 01:01:11
|
|
26
|
+
* @export
|
|
27
|
+
* @param {IControlRender[]} controlRenders
|
|
28
|
+
* @return {*} {(string | undefined)}
|
|
29
|
+
*/
|
|
30
|
+
getPanelItemCustomHtml(controlRenders: IControlRender[], data: IData | undefined): string | undefined;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=panel-item-render.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-item-render.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,mBAAmB,EAEnB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;GAQG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,eAAe,CAAC;IACjF;;;;;;OAMG;IACK,KAAK,EAAE,yBAAyB,CAAC;IAEzC;;;;;;;;OAQG;IACH,sBAAsB,CACpB,cAAc,EAAE,cAAc,EAAE,EAChC,IAAI,EAAE,KAAK,GAAG,SAAS,GACtB,MAAM,GAAG,SAAS;CAatB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PanelItemController, ScriptFactory } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class PanelItemRenderController extends PanelItemController {
|
|
5
|
+
/**
|
|
6
|
+
* 获取面板绘制器自定义html
|
|
7
|
+
*
|
|
8
|
+
* @author zk
|
|
9
|
+
* @date 2024-01-15 01:01:11
|
|
10
|
+
* @export
|
|
11
|
+
* @param {IControlRender[]} controlRenders
|
|
12
|
+
* @return {*} {(string | undefined)}
|
|
13
|
+
*/
|
|
14
|
+
getPanelItemCustomHtml(controlRenders, data) {
|
|
15
|
+
if (controlRenders.length === 0) {
|
|
16
|
+
return void 0;
|
|
17
|
+
}
|
|
18
|
+
const controlRender = controlRenders[0];
|
|
19
|
+
if (controlRender.layoutPanelModel) {
|
|
20
|
+
return ScriptFactory.execScriptFn(
|
|
21
|
+
{ data: data || {} },
|
|
22
|
+
controlRender.layoutPanelModel,
|
|
23
|
+
{ singleRowReturn: true, isAsync: false }
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { PanelItemRenderController };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { PanelItemRenderController } from './panel-item-render.controller';
|
|
4
|
+
export declare const PanelItemRender: import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: PropType<IPanelContainer>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof PanelItemRenderController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
15
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
16
|
+
htmlCode: import("vue").ComputedRef<string | undefined>;
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
modelData: {
|
|
19
|
+
type: PropType<IPanelContainer>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
controller: {
|
|
23
|
+
type: typeof PanelItemRenderController;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}>>, {}, {}>;
|
|
27
|
+
//# sourceMappingURL=panel-item-render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-item-render.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAA6B,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;YA4C1B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { computed, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import '../../use/index.mjs';
|
|
3
|
+
import { PanelItemRenderController } from './panel-item-render.controller.mjs';
|
|
4
|
+
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const PanelItemRender = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizPanelItemRender",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: PanelItemRenderController,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
var _a;
|
|
21
|
+
const ns = useNamespace("panel-item-render");
|
|
22
|
+
const nsType = useNamespace("panel-".concat((_a = props.modelData.itemType) == null ? void 0 : _a.toLowerCase()));
|
|
23
|
+
const {
|
|
24
|
+
id
|
|
25
|
+
} = props.modelData;
|
|
26
|
+
const classArr = computed(() => {
|
|
27
|
+
const result = [ns.b(), ns.m(id), nsType.b(), ns.is("hidden", !props.controller.state.visible)];
|
|
28
|
+
return result;
|
|
29
|
+
});
|
|
30
|
+
const htmlCode = computed(() => {
|
|
31
|
+
return props.controller.getPanelItemCustomHtml(props.modelData.controlRenders, props.controller.data);
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
ns,
|
|
35
|
+
classArr,
|
|
36
|
+
htmlCode
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
render() {
|
|
40
|
+
return createVNode("div", {
|
|
41
|
+
"class": this.classArr,
|
|
42
|
+
"innerHTML": this.htmlCode
|
|
43
|
+
}, null);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { PanelItemRender };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
3
|
+
import { PanelItemRenderController } from './panel-item-render.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 面板绘制器适配器
|
|
6
|
+
*
|
|
7
|
+
* @author zk
|
|
8
|
+
* @date 2024-01-15 06:01:32
|
|
9
|
+
* @export
|
|
10
|
+
* @class PanelItemRenderProvider
|
|
11
|
+
* @implements {IPanelItemProvider}
|
|
12
|
+
*/
|
|
13
|
+
export declare class PanelItemRenderProvider implements IPanelItemProvider {
|
|
14
|
+
component: string;
|
|
15
|
+
createController(panelItem: IPanelContainer, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemRenderController>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=panel-item-render.provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-item-render.provider.d.ts","sourceRoot":"","sources":["../../../src/panel-component/panel-item-render/panel-item-render.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,YAAW,kBAAkB;IAChE,SAAS,EAAE,MAAM,CAAyB;IAEpC,gBAAgB,CACpB,SAAS,EAAE,eAAe,EAC1B,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACtC,OAAO,CAAC,yBAAyB,CAAC;CAKtC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PanelItemRenderController } from './panel-item-render.controller.mjs';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
class PanelItemRenderProvider {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.component = "IBizPanelItemRender";
|
|
7
|
+
}
|
|
8
|
+
async createController(panelItem, panel, parent) {
|
|
9
|
+
const c = new PanelItemRenderController(panelItem, panel, parent);
|
|
10
|
+
await c.init();
|
|
11
|
+
return c;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { PanelItemRenderProvider };
|
package/lib/index.cjs
CHANGED
|
@@ -49,13 +49,14 @@ var panelContainerGroup_state = require('./panel-component/panel-container-group
|
|
|
49
49
|
var panelContainerGroup_controller = require('./panel-component/panel-container-group/panel-container-group.controller.cjs');
|
|
50
50
|
var index$a = require('./panel-component/panel-container-group/index.cjs');
|
|
51
51
|
var index$b = require('./panel-component/panel-tab-page/index.cjs');
|
|
52
|
+
var index$c = require('./panel-component/panel-item-render/index.cjs');
|
|
52
53
|
var appRedirectView = require('./view/app-redirect-view/app-redirect-view.cjs');
|
|
53
|
-
var index$
|
|
54
|
+
var index$d = require('./view/common/index.cjs');
|
|
54
55
|
var todoRedirect = require('./view/todo-redirect/todo-redirect.cjs');
|
|
55
|
-
var index$
|
|
56
|
-
var index$
|
|
57
|
-
var index$
|
|
58
|
-
var index$
|
|
56
|
+
var index$e = require('./view/portal-view/index.cjs');
|
|
57
|
+
var index$f = require('./view/de-redirect-view/index.cjs');
|
|
58
|
+
var index$g = require('./control/panel/view-layout-panel/index.cjs');
|
|
59
|
+
var index$h = require('./control/panel/panel/index.cjs');
|
|
59
60
|
var pluginFactory = require('./plugin/plugin-factory/plugin-factory.cjs');
|
|
60
61
|
var clickOutside = require('./use/click-outside/click-outside.cjs');
|
|
61
62
|
var useControlController = require('./use/control/use-control-controller/use-control-controller.cjs');
|
|
@@ -63,7 +64,7 @@ var event = require('./use/event/event.cjs');
|
|
|
63
64
|
var focusBlur = require('./use/focus-blur/focus-blur.cjs');
|
|
64
65
|
var namespace = require('./use/namespace/namespace.cjs');
|
|
65
66
|
var route = require('./use/route/route.cjs');
|
|
66
|
-
var index$
|
|
67
|
+
var index$i = require('./use/util/index.cjs');
|
|
67
68
|
var useViewController = require('./use/view/use-view-controller/use-view-controller.cjs');
|
|
68
69
|
var vue = require('./use/vue/vue.cjs');
|
|
69
70
|
var overlayContainer = require('./util/overlay-container/overlay-container.cjs');
|
|
@@ -77,7 +78,7 @@ var render = require('./util/render/render.cjs');
|
|
|
77
78
|
var overlayViewUtil = require('./util/overlay-view-util/overlay-view-util.cjs');
|
|
78
79
|
var appStore = require('./util/store/app-store/app-store.cjs');
|
|
79
80
|
var uiStore = require('./util/store/ui-store/ui-store.cjs');
|
|
80
|
-
var index$
|
|
81
|
+
var index$j = require('./util/store/index.cjs');
|
|
81
82
|
var common = require('./props/common.cjs');
|
|
82
83
|
var textBox = require('./props/editor/text-box.cjs');
|
|
83
84
|
var span = require('./props/editor/span.cjs');
|
|
@@ -147,13 +148,14 @@ exports.PanelContainerGroupState = panelContainerGroup_state.PanelContainerGroup
|
|
|
147
148
|
exports.PanelContainerGroupController = panelContainerGroup_controller.PanelContainerGroupController;
|
|
148
149
|
exports.IBizPanelContainerGroup = index$a.IBizPanelContainerGroup;
|
|
149
150
|
exports.IBizPanelTabPage = index$b.IBizPanelTabPage;
|
|
151
|
+
exports.IBizPanelItemRender = index$c.IBizPanelItemRender;
|
|
150
152
|
exports.AppRedirectView = appRedirectView.AppRedirectView;
|
|
151
|
-
exports.IBizView = index$
|
|
153
|
+
exports.IBizView = index$d.IBizView;
|
|
152
154
|
exports.TodoRedirect = todoRedirect.TodoRedirect;
|
|
153
|
-
exports.IBizPortalView = index$
|
|
154
|
-
exports.IBizDeRedirectView = index$
|
|
155
|
-
exports.IBizViewLayoutPanelControl = index$
|
|
156
|
-
exports.IBizPanelControl = index$
|
|
155
|
+
exports.IBizPortalView = index$e.IBizPortalView;
|
|
156
|
+
exports.IBizDeRedirectView = index$f.IBizDeRedirectView;
|
|
157
|
+
exports.IBizViewLayoutPanelControl = index$g.IBizViewLayoutPanelControl;
|
|
158
|
+
exports.IBizPanelControl = index$h.IBizPanelControl;
|
|
157
159
|
exports.PluginFactory = pluginFactory.PluginFactory;
|
|
158
160
|
exports.useClickOutside = clickOutside.useClickOutside;
|
|
159
161
|
exports.useControlController = useControlController.useControlController;
|
|
@@ -162,8 +164,8 @@ exports.useFocusAndBlur = focusBlur.useFocusAndBlur;
|
|
|
162
164
|
exports.useNamespace = namespace.useNamespace;
|
|
163
165
|
exports.useRouteKey = route.useRouteKey;
|
|
164
166
|
exports.useRouterQuery = route.useRouterQuery;
|
|
165
|
-
exports.useCtx = index$
|
|
166
|
-
exports.useMobCtx = index$
|
|
167
|
+
exports.useCtx = index$i.useCtx;
|
|
168
|
+
exports.useMobCtx = index$i.useMobCtx;
|
|
167
169
|
exports.useViewController = useViewController.useViewController;
|
|
168
170
|
exports.EmptyVNode = vue.EmptyVNode;
|
|
169
171
|
exports.getOrigin = vue.getOrigin;
|
|
@@ -197,7 +199,7 @@ exports.openViewModal = overlayViewUtil.openViewModal;
|
|
|
197
199
|
exports.openViewPopover = overlayViewUtil.openViewPopover;
|
|
198
200
|
exports.useAppStore = appStore.useAppStore;
|
|
199
201
|
exports.useUIStore = uiStore.useUIStore;
|
|
200
|
-
exports.piniaInstance = index$
|
|
202
|
+
exports.piniaInstance = index$j.piniaInstance;
|
|
201
203
|
exports.RequiredProp = common.RequiredProp;
|
|
202
204
|
exports.getGridInputIpProps = textBox.getGridInputIpProps;
|
|
203
205
|
exports.getGridInputNumberProps = textBox.getGridInputNumberProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.5.3-beta.
|
|
3
|
+
"version": "0.5.3-beta.6",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@ibiz-template/cli": "^0.3.10",
|
|
34
34
|
"@ibiz-template/core": "^0.5.2",
|
|
35
|
-
"@ibiz-template/runtime": "^0.5.3-beta.
|
|
35
|
+
"@ibiz-template/runtime": "^0.5.3-beta.6",
|
|
36
36
|
"@ibiz-template/theme": "^0.5.0",
|
|
37
37
|
"@ibiz/model-core": "^0.1.3",
|
|
38
38
|
"@types/path-browserify": "^1.0.2",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"vue": "^3.3.4",
|
|
62
62
|
"vue-router": "^4.2.4"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "fd9a03832183acb0fbdfc3592b1ff820257c2783"
|
|
65
65
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { withInstall } from '../../util';
|
|
4
|
+
import { PanelItemRender } from './panel-item-render';
|
|
5
|
+
import { PanelItemRenderProvider } from './panel-item-render.provider';
|
|
6
|
+
|
|
7
|
+
export const IBizPanelItemRender = withInstall(
|
|
8
|
+
PanelItemRender,
|
|
9
|
+
function (v: App) {
|
|
10
|
+
v.component(PanelItemRender.name, PanelItemRender);
|
|
11
|
+
registerPanelItemProvider(
|
|
12
|
+
'PREDEFINE_RENDER',
|
|
13
|
+
() => new PanelItemRenderProvider(),
|
|
14
|
+
);
|
|
15
|
+
},
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default IBizPanelItemRender;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IControlRender, IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import {
|
|
3
|
+
PanelItemController,
|
|
4
|
+
ScriptFactory,
|
|
5
|
+
ViewLayoutPanelController,
|
|
6
|
+
} from '@ibiz-template/runtime';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 面板绘制器控制器
|
|
10
|
+
*
|
|
11
|
+
* @author zk
|
|
12
|
+
* @date 2024-01-15 06:01:08
|
|
13
|
+
* @export
|
|
14
|
+
* @class PanelItemRenderController
|
|
15
|
+
* @extends {PanelItemController<IPanelContainer>}
|
|
16
|
+
*/
|
|
17
|
+
export class PanelItemRenderController extends PanelItemController<IPanelContainer> {
|
|
18
|
+
/**
|
|
19
|
+
* 面板控制器
|
|
20
|
+
*
|
|
21
|
+
* @author lxm
|
|
22
|
+
* @date 2022-08-24 22:08:59
|
|
23
|
+
* @type {PanelController}
|
|
24
|
+
*/
|
|
25
|
+
declare panel: ViewLayoutPanelController;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 获取面板绘制器自定义html
|
|
29
|
+
*
|
|
30
|
+
* @author zk
|
|
31
|
+
* @date 2024-01-15 01:01:11
|
|
32
|
+
* @export
|
|
33
|
+
* @param {IControlRender[]} controlRenders
|
|
34
|
+
* @return {*} {(string | undefined)}
|
|
35
|
+
*/
|
|
36
|
+
getPanelItemCustomHtml(
|
|
37
|
+
controlRenders: IControlRender[],
|
|
38
|
+
data: IData | undefined,
|
|
39
|
+
): string | undefined {
|
|
40
|
+
if (controlRenders.length === 0) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const controlRender = controlRenders[0];
|
|
44
|
+
if (controlRender.layoutPanelModel) {
|
|
45
|
+
return ScriptFactory.execScriptFn(
|
|
46
|
+
{ data: data || {} },
|
|
47
|
+
controlRender.layoutPanelModel,
|
|
48
|
+
{ singleRowReturn: true, isAsync: false },
|
|
49
|
+
) as string;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IPanelItemProvider,
|
|
3
|
+
PanelController,
|
|
4
|
+
PanelItemController,
|
|
5
|
+
} from '@ibiz-template/runtime';
|
|
6
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
7
|
+
import { PanelItemRenderController } from './panel-item-render.controller';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 面板绘制器适配器
|
|
11
|
+
*
|
|
12
|
+
* @author zk
|
|
13
|
+
* @date 2024-01-15 06:01:32
|
|
14
|
+
* @export
|
|
15
|
+
* @class PanelItemRenderProvider
|
|
16
|
+
* @implements {IPanelItemProvider}
|
|
17
|
+
*/
|
|
18
|
+
export class PanelItemRenderProvider implements IPanelItemProvider {
|
|
19
|
+
component: string = 'IBizPanelItemRender';
|
|
20
|
+
|
|
21
|
+
async createController(
|
|
22
|
+
panelItem: IPanelContainer,
|
|
23
|
+
panel: PanelController,
|
|
24
|
+
parent: PanelItemController | undefined,
|
|
25
|
+
): Promise<PanelItemRenderController> {
|
|
26
|
+
const c = new PanelItemRenderController(panelItem, panel, parent);
|
|
27
|
+
await c.init();
|
|
28
|
+
return c;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IPanelContainer } from '@ibiz/model-core';
|
|
2
|
+
import { computed, defineComponent, PropType } from 'vue';
|
|
3
|
+
import { useNamespace } from '../../use';
|
|
4
|
+
import { PanelItemRenderController } from './panel-item-render.controller';
|
|
5
|
+
|
|
6
|
+
export const PanelItemRender = defineComponent({
|
|
7
|
+
name: 'IBizPanelItemRender',
|
|
8
|
+
props: {
|
|
9
|
+
modelData: {
|
|
10
|
+
type: Object as PropType<IPanelContainer>,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
controller: {
|
|
14
|
+
type: PanelItemRenderController,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
setup(props) {
|
|
19
|
+
const ns = useNamespace('panel-item-render');
|
|
20
|
+
|
|
21
|
+
const nsType = useNamespace(
|
|
22
|
+
`panel-${props.modelData.itemType?.toLowerCase()}`,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const { id } = props.modelData;
|
|
26
|
+
|
|
27
|
+
// 类名控制
|
|
28
|
+
const classArr = computed(() => {
|
|
29
|
+
const result: Array<string | false> = [
|
|
30
|
+
ns.b(),
|
|
31
|
+
ns.m(id),
|
|
32
|
+
nsType.b(),
|
|
33
|
+
ns.is('hidden', !props.controller.state.visible),
|
|
34
|
+
];
|
|
35
|
+
return result;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const htmlCode = computed(() => {
|
|
39
|
+
return props.controller.getPanelItemCustomHtml(
|
|
40
|
+
props.modelData.controlRenders!,
|
|
41
|
+
props.controller.data,
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return { ns, classArr, htmlCode };
|
|
46
|
+
},
|
|
47
|
+
render() {
|
|
48
|
+
return <div class={this.classArr} v-html={this.htmlCode}></div>;
|
|
49
|
+
},
|
|
50
|
+
});
|