@ibiz-template/vue3-util 0.2.11-beta.0 → 0.2.11-beta.1
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/dist/index.system.min.js.map +1 -1
- package/es/index.mjs +13 -0
- package/es/panel-component/index.d.ts +3 -1
- package/es/panel-component/index.d.ts.map +1 -1
- package/es/panel-component/index.mjs +12 -0
- package/es/util/index.d.ts +1 -0
- package/es/util/index.d.ts.map +1 -1
- package/es/util/index.mjs +1 -0
- package/lib/index.cjs +40 -9
- package/package.json +1 -1
- package/src/panel-component/index.ts +3 -1
- package/src/util/index.ts +1 -0
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-
|
|
1
|
+
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);background:red}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-panel-container{width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-nav-pos{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-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);width:100%;height:100%}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-single-data-container{width:100%;height:100%}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/core","ramda","qx-util","vue-router","qs","@ibiz-template/runtime","pinia"],function(d,Ht){"use strict";var b,G,Ae,M,Re,Se,z,_,I,E,Be,C,S,h,v,K,H,L,X,Oe,xe,ze,_e,Fe,N,ke,Te,B,Le,Ve,je,F,$e,Ge,Me,k,Ue,We,J,se,V,y,qe,Ke,He,Xe,Q,O,D,Je,oe,Qe,Ze,Ye,ie,et,U,tt,ae,rt;return{setters:[function(u){b=u.watch,G=u.onBeforeUnmount,Ae=u.createCommentVNode,M=u.getCurrentInstance,Re=u.isReactive,Se=u.toRaw,z=u.inject,_=u.reactive,I=u.ref,E=u.h,Be=u.provide,C=u.defineComponent,S=u.computed,h=u.createVNode,v=u.resolveComponent,K=u.withDirectives,H=u.resolveDirective,L=u.createTextVNode,X=u.isVNode,Oe=u.onUnmounted,xe=u.onMounted,ze=u.onActivated,_e=u.onDeactivated},function(u){Fe=u.onClickOutside,N=u.NOOP,ke=u.listenJSEvent,Te=u.Namespace,B=u.RuntimeError,Le=u.isSvg,Ve=u.IBizContext,je=u.RuntimeModelError},function(u){F=u.isNil,$e=u.isNotNil,Ge=u.mergeLeft},function(u){Me=u.isFunc,k=u.notNilEmpty,Ue=u.QXEvent,We=u.clearAll},function(u){J=u.useRoute,se=u.useRouter},function(u){V=u.default},function(u){y=u.ViewType,qe=u.getMatchResPath,Ke=u.calcDeCodeNameById,He=u.getControlProvider,Xe=u.getViewProvider,Q=u.PanelItemState,O=u.PanelItemController,D=u.registerPanelItemProvider,Je=u.Modal,oe=u.ViewMode,Qe=u.OpenAppViewCommand,Ze=u.getEditorProvider,Ye=u.toLocalOpenWFRedirectView,ie=u.ViewController,et=u.getControlsByView,U=u.registerViewProvider,tt=u.RemotePluginItem},function(u){ae=u.defineStore,rt=u.createPinia}],execute:function(){d({calcResRoutePath:at,generateRoutePath:or,getArrayProps:Wt,getAutoCompleteProps:$t,getCascaderProps:qt,getCheckboxListProps:At,getCheckboxProps:Rt,getCodeProps:Gt,getColorPickerProps:Kt,getDataPickerProps:St,getDatePickerProps:Bt,getDateRangeProps:Ot,getDropdownProps:Nt,getEditorEmits:Ir,getEditorProps:m,getGridArrayProps:Hr,getGridAutoCompleteProps:Ur,getGridCascaderProps:Xr,getGridCheckboxListProps:Br,getGridCheckboxProps:Or,getGridCodeProps:Wr,getGridColorPickerProps:Jr,getGridDataPickerProps:xr,getGridDatePickerProps:zr,getGridDateRangeProps:_r,getGridDropdownProps:Sr,getGridEditorCommonProps:g,getGridEditorEmits:Dr,getGridHtmlProps:qr,getGridInputIpProps:Ar,getGridInputNumberProps:Nr,getGridInputProps:Er,getGridListBoxProps:Fr,getGridMarkDownProps:Kr,getGridNumberRangeProps:kr,getGridRadioProps:Tr,getGridRateProps:Lr,getGridRawProps:Vr,getGridSliderProps:jr,getGridSpanProps:Rr,getGridStepperProps:$r,getGridSwitchProps:Gr,getGridUploadProps:Mr,getHtmlProps:Mt,getInputIpProps:Dt,getInputNumberProps:It,getInputProps:bt,getListBoxProps:xt,getMarkDownProps:Ut,getNestedRoutePath:te,getNumberRangeProps:zt,getOrigin:Y,getOwnRouteContext:it,getRadioProps:_t,getRateProps:Ft,getRawProps:kt,getSliderProps:Tt,getSpanProps:Et,getStepperProps:Lt,getSwitchProps:Vt,getUploadProps:jt,isEmptyVNode:Zt,onRouteChange:ar,parseRouteViewData:ir,prepareControl:lr,renderString:ur,route2routePath:ee,routePath2string:le,useClickOutside:u,useControlController:rr,useController:Qt,useCtx:st,useEventListener:ot,useFocusAndBlur:nr,useForce:W,useForceTogether:Jt,useMobCtx:Yt,useNamespace:w,useProps:Z,usePropsWatch:Xt,useRouteKey:mr,useRouterQuery:fr,useViewController:ue});function u(r,e,t={}){let s=N,n=N,o=N;const i=()=>{s(),s=N,n=N,o=N};return b(r,(a,l)=>{if(a!==l)if(F(a))i();else{const c=Fe(a?.$el||a,e,t);s=c.stop,n=c.pause,o=c.proceed}},{immediate:!0}),G(()=>{s!==N&&i()}),{stop:()=>s(),pause:()=>n(),proceed:()=>o()}}function Z(){return M().proxy.$props}function Y(r){return Re(r)?Se(r):r}function Xt(r,e,t){const s=Z();Object.prototype.hasOwnProperty.call(s,r)&&(b(()=>s[r],(n,o)=>{e(Y(n),Y(o))},t),e(Y(s[r]),void 0))}function W(){const r=M().proxy;return e=>{r.$forceUpdate(),e&&Me(e)&&r.$nextTick(()=>{e()})}}function Jt(r,e){const t=e.force,s=W();e.force=n=>{t(n),s()}}function Qt(r){r.force=W()}const nt=d("EmptyVNode",Ae("EmptyVNode"));function Zt(r){return Array.isArray(r)?r.length===1&&r[0]===nt:r===nt}function st(){return z("ctx")}function Yt(){return z("ctx")}function er(r,e){b(()=>({context:r.context,params:r.params}),t=>{e.updateContextParams({...t}),ibiz.log.debug(`${e.model.id}\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A`,t)})}function tr(r,e){const t=["context","params","modelData"];b(()=>{const s={};return Object.keys(r).forEach(n=>{t.includes(n)||(s[n]=r[n])}),s},(s,n)=>{const o={};Object.keys(s).forEach(i=>{s[i]!==(n||{})[i]&&(o[i]=s[i])}),ibiz.log.debug(`\u90E8\u4EF6 [${e.model.name}] state \u53D8\u66F4`,o),Object.keys(o).forEach(i=>{o[i]!==void 0&&(e.state[i]=o[i])})},{immediate:!0})}function rr(r){const e=st(),t=Z();e.evt.emit("onForecast",t.modelData.name);const s=t.provider;let n;s?.createController?n=s.createController(t.modelData,t.context,t.params,e):n=r(t.modelData,t.context,t.params,e),er(t,n),tr(t,n),n.state=_(n.state),n.force=W();const o=M().proxy;return n.evt.onAll((i,a)=>{o.$emit(i.slice(2),a)}),o.$emit("controllerAppear",n),n.created(),G(()=>n.destroyed()),n}function ot(r,e,t,s={}){let n=N;return b(r,(o,i)=>{o!==i&&(F(o)?(n(),n=N):n=ke(o?.$el||o,e,t,s))},{immediate:!0}),G(()=>{n!==N&&n()}),()=>{n()}}function nr(r,e){const t=I(),s=I(!1);let n;const o=()=>{s.value||ibiz.log.debug("\u6CA1\u6709\u805A\u7126\uFF0C\u4E0D\u89E6\u53D1\u5931\u7126"),e(),n.stop(),s.value=!1},i=()=>{n&&n.pause()},a=()=>{n&&n.stop()};return ot(t,"click",l=>{s.value||(n=u(t,()=>{o()}),s.value=!0,r())},{capture:!0}),{componentRef:t,isFocus:s,doBlur:o,pause:i,stop:a}}function w(r){return new Te(r,ibiz.env.namespace)}function ee(r){const e=r.matched.length,t=[];for(let n=1;n<=e;n++){const o=r.path.split("/")[n*2],i=r.params[`params${n}`];let a,l,c;!i||i===ibiz.env.routePlaceholder?a=void 0:a=V.parse(i,{strictNullHandling:!0,delimiter:";"}),a&&(n===1?(l=a,a=void 0):(a.srfnavctx&&(l=JSON.parse(decodeURIComponent(a.srfnavctx)),delete a.srfnavctx),a.srfnav&&(c=a.srfnav,delete a.srfnav))),t.push({viewName:o,context:l,params:a,srfnav:c})}let s;return r.params.appContext&&r.params.appContext!==ibiz.env.routePlaceholder&&(s=V.parse(r.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:t}}function le(r){let e="";return r.appContext?e+=`/${V.stringify(r.appContext,{delimiter:";",strictNullHandling:!0})}`:e+=`/${ibiz.env.routePlaceholder}`,r.pathNodes.forEach((t,s)=>{e+=`/${t.viewName}/`;let n={};if(s===0)k(t.context)&&(n=t.context);else{if(n=k(t.params)?t.params:{},k(t.context)){const i=JSON.stringify(t.context);i!=="{}"&&(n.srfnavctx=encodeURIComponent(i))}t.srfnav&&(n.srfnav=t.srfnav)}const o=V.stringify(n,{delimiter:";",strictNullHandling:!0,skipNulls:!0});k(o)?e+=o:e+=ibiz.env.routePlaceholder}),e}function it(r){const e=r.getOwnContext(),t=["srfsessionid","srfappid"];return Object.keys(e).forEach(s=>{t.includes(s)&&delete e[s]}),e}const sr=d("excludeViewTypes",[y.DE_GRID_VIEW,y.DE_GRID_EXP_VIEW,y.DE_LIST_VIEW,y.DE_LIST_EXP_VIEW,y.DE_DATA_VIEW,y.DE_DATAVIEW_EXP_VIEW,y.DE_CALENDAR_VIEW,y.DE_CALENDAR_EXP_VIEW,y.DE_CHART_VIEW,y.DE_CHART_EXP_VIEW,y.DE_KANBAN_VIEW]);async function at(r,e,t){if(!t)r.pathNodes[0].context=void 0;else{const s=await ibiz.hub.getAppDataEntity(t);let n=qe(e,s);if(n||(n={path:"",keys:[s.codeName.toLowerCase()]}),n){const o=r.pathNodes[1].context,i={};n.keys.forEach(a=>{e&&Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=e[a],o&&delete o[a])}),r.pathNodes[0].context=i}}}async function or(r,e,t,s){const n=ee(e);let o=2;if(t.toRouteDepth?(o=t.toRouteDepth,delete t.toRouteDepth):ibiz.env.isMob&&(n.pathNodes[0]={viewName:"home"}),n.pathNodes.splice(o-1,n.pathNodes.length-o+1),t.currentSrfNav){const i=n.pathNodes[n.pathNodes.length-1];i.params=i.params||{},i.srfnav=t.currentSrfNav,delete t.currentSrfNav}if(e.fullPath.startsWith("/appredirectview")&&(s?.srfindexname?(n.pathNodes[0].viewName=s.srfindexname,delete s.srfindexname):n.pathNodes[0].viewName="index"),n.pathNodes.push({viewName:r.codeName.toLowerCase(),context:it(t),params:s}),o===2&&(await at(n,t,r.appDataEntityId),sr.includes(r.viewType))){const i=Ke(r.appDataEntityId);delete n.pathNodes[0].context[i]}return{path:le(n)}}async function ir(r,e){var t;const s=ee(r);let n=s.pathNodes[e-1].viewName;if(!n)throw new B(`\u7B2C${e}\u7EA7\u8DEF\u7531\u4E0D\u5B58\u5728\u89C6\u56FE\u6807\u8BC6`);n==="index"&&(n=ibiz.hub.defaultAppIndexViewName);const o=await ibiz.hub.getAppView(n);if(!o)throw new B(`\u627E\u4E0D\u5230\u89C6\u56FE${n}`);const i={};if((t=ibiz.appData)!=null&&t.context&&Object.assign(i,ibiz.appData.context),s.appContext&&Object.assign(i,s.appContext),e!==1)for(let c=0;c<e;c++){const f=s.pathNodes[c];k(f.context)&&Object.assign(i,f.context)}const{params:a,srfnav:l}=s.pathNodes[e-1];return{viewModel:o,context:i,params:a,srfnav:l}}function te(r,e,t=!0){if(r.matched.length<e)return"";if(r.name)return r.path;const s=ee(r);return s.pathNodes.length<e?r.path:(s.pathNodes.length>e&&(s.pathNodes=s.pathNodes.slice(0,e)),t&&delete s.pathNodes[e-1].srfnav,le(s))}function ar(r,e){const t=J();if(!t)throw new B("\u65E0\u6CD5\u6B63\u786E\u83B7\u53D6route,\u53EF\u80FD\u662F\u4F9D\u8D56\u95EE\u9898");b(()=>t?.path,()=>{const s=te(t,e);r({currentKey:s,fullPath:t.fullPath})},{immediate:!0})}class lt{constructor(e,t){this.callbacks=[],this.timers=[],this.wait=500,t&&(this.wait=t),b(()=>e.path,(s,n)=>{if(s!==n){if(this.callbacks.length)for(let o=0;o<this.callbacks.length;o++){const i=this.callbacks[o];i()}if(this.callbacks=[],this.timers.length)for(let o=0;o<this.timers.length;o++){const i=this.timers[o];clearTimeout(i)}this.timers=[]}})}nextChange(e){e&&(this.timers.push(setTimeout(()=>{e();const t=this.callbacks.findIndex(s=>s===e);this.callbacks.splice(t,1)},this.wait)),this.callbacks.push(e))}}d("RouteListener",lt);const x=d("withInstall",(r,e)=>(r.install=t=>{e(t)},r));function lr(r){const e=w("control"),{controlType:t,sysCss:s,codeName:n}=r.model,o=t.toLowerCase(),i=s?.cssName,a=w(`control-${o}`),l=[e.b(),e.b(o),e.m(n)];return i&&l.push(i),{controlClass:l,ns:a}}function ur(r){if(F(r))return"";if(typeof r=="string")return r;try{return r.toString()}catch(e){ibiz.log.error(r,"\u8F6C\u6362\u6210\u5B57\u7B26\u4E32\u5931\u8D25",e)}return""}class re{constructor(e,t,s){this.component=e,this.render=t,this.opts=s,this.evt=new Ue,this.init()}static createVueApp(e,t){throw new B("\u6CA1\u6709\u6CE8\u5165createVueApp\u65B9\u6CD5")}init(){const e=this,{render:t,opts:s}=this,n=document.createElement("div");document.body.appendChild(n);const o=re.createVueApp({mounted(){e.modal=this.$refs.root},unmounted(){document.body.removeChild(n),e.evt.emit("dismiss",e.result)},render(){return E(e.component,{ref:"root",opts:s,onDismiss(i){e.result=i,o.unmount()}},{default:t})}});ibiz.plugin.register(o),o.mount(n),this.vm=o}async present(){return this.modal.present()}async dismiss(e){this.modal.dismiss(e)}async onWillDismiss(){return new Promise(e=>{const t=s=>{e(s),this.evt.off("dismiss",t)};this.evt.on("dismiss",t)})}}d("OverlayContainer",re);class cr extends re{present(e){return this.modal.present(e)}}d("OverlayPopoverContainer",cr);class dr{constructor(e,t){this.from=e,this.to=t,this.isActivated=!1,ibiz.log.debug("openRouter: ",e,t)}onWillDismiss(){return this.promise||(this.promise=new Promise(e=>{this.resolve=e})),this.promise.then(e=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,e),e))}close(e){ibiz.log.debug("closeRouter: ",this.from,this.to,e),this.resolve&&(this.resolve(e),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)}}class hr{constructor(){this.map=new Map}async open(e,t){const s=e.currentRoute.value.fullPath;e.push({path:t});const n=t;if(this.map.has(n))return this.map.get(n).onWillDismiss();const o=new dr(s,n);return this.map.set(n,o),this.scheduledDestruction(o),o.onWillDismiss()}close(e,t){const s=this.map.get(e);s&&(s.close(t),this.map.delete(e))}active(e){const t=this.map.get(e);t&&(window.clearTimeout(t.timeout),t.timeout=void 0,t.active())}scheduledDestruction(e){e.timeout=window.setTimeout(()=>{e.timeout=void 0,e.destroy(),this.map.delete(e.to)},10*1e3)}}const Qr=d("routerCallback",new hr),Zr=d("useAppStore",ae("appStore",()=>({appStore:_({})})));function pr(){const t=I(500);function s(){return t.value+=1,t.value}function n(){t.value-=1}return{zIndex:t,increment:s,decrement:n}}const Yr=d("useUIStore",ae("uiStore",()=>{const r=pr();return{UIStore:_({zIndex:r.zIndex,theme:"light"}),zIndex:r}})),en=d("piniaInstance",rt());function fr(){const r=J(),{query:e}=r;return e}function mr(r,e,t){t||(t=I("")),t.value=r.value;const s=new lt(e);return b(r,(n,o)=>{n!==o&&s.nextChange(()=>{t.value=n})}),t}function gr(r,e){b(()=>({context:r.context,params:r.params}),t=>{e.context.reset({},t.context),We(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(`${e.model.id}\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A`,t)})}function vr(r,e){b(()=>r.state?{...r.state}:{},(t,s)=>{const n={};Object.keys(t).forEach(o=>{t[o]!==(s||{})[o]&&(n[o]=t[o])}),ibiz.log.debug(`\u89C6\u56FE [${e.model.name}] state \u53D8\u66F4`,n),Object.keys(n).forEach(o=>{e.state[o]=n[o]})},{immediate:!0})}function ue(r){const e=Z(),t=z("ctx",void 0);t?.evt.emit("onForecast",e.modelData.name);const s=e.provider;let n;s?.createController?n=s.createController(e.modelData,e.context,e.params,t):n=r(e.modelData,e.context,e.params,t),gr(e,n),vr(e,n),Be("ctx",n.ctx),n.state=_(n.state),n.slotProps=_(n.slotProps),e.modal&&(n.modal=e.modal),n.force=W();const o=M().proxy;return n.evt.onAll((i,a)=>{o.$emit(i.slice(2),a)}),n.created(),G(()=>n.destroyed()),n}const tn=d("IBizIcon",C({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(r){const e=w("icon"),t=`${ibiz.env.assetsUrl}/${r.baseDir}/`;function s(o){if(o){if(o.htmlStr)return h("span",{class:e.b(),innerHTML:o.htmlStr},null);if(o.cssClass)return o.cssClass.indexOf("fa-")!==-1?h("i",{class:[e.b(),o.cssClass]},null):h("ion-icon",{class:e.b(),name:o.cssClass},null);if(o.imagePath)return o.imagePath.endsWith("svg")?o.imagePath.startsWith("http")?h("img",{class:e.b(),src:o.imagePath},null):h("ion-icon",{src:t+o.imagePath,class:e.b()},null):o.imagePath.startsWith("http")?h("img",{class:e.b(),src:o.imagePath},null):h("img",{class:e.b(),src:t+o.imagePath},null);if(o.rawContent)return Le(o.rawContent)?h("div",{class:e.b(),innerHTML:o.rawContent},null):h("img",{class:e.b(),src:o.rawContent},null)}return null}const n=S(()=>s(r.icon));return()=>n.value}})),rn=d("IBizRouterView",C({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(r,{attrs:e}){const t={};let s=!0;return b(()=>r.manualKey,(o,i)=>{$e(o)&&o!==i&&(s=!0)}),{renderComp:(o,i)=>{if(!s)return t.vNode;if(s=!1,o){const a={...o.props};delete a.onVnodeUnmounted,delete a.ref;const l=E(o.type,{...a,...e,key:r.manualKey});return t.vNode=l,l}}}},render(){return h(v("router-view"),{name:this.name,route:this.route},{default:({Component:r,route:e})=>{const t=this.renderComp(r,e);return this.$slots.default?this.$slots.default({Component:t,route:e}):t}})}})),nn=d("IBizControlBase",C({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(r){const e=w("control"),{controlType:t,sysCss:s,codeName:n}=r.controller.model,o=t.toLowerCase(),i=s?.cssName,a=r.controller.model,l=r.controller.model.controls,c=p=>{r.controller.setLayoutPanel(p)},f=_({});return a.controlType.endsWith("EXPBAR")===!1&&(F(a.width)||(f.width=`${a.width}px`),F(a.height)||(f.height=`${a.height}px`)),{ns:e,typeClass:o,sysCssName:i,inlineStyle:f,codeName:n,controls:l,onLayoutPanelCreated:c}},render(){var r,e,t;const{state:s,controlPanel:n,providers:o}=this.controller;let i=null;if(s.isCreated&&n){const a={...this.$slots};(r=this.controls)!=null&&r.length&&this.controls.forEach(c=>{const f=c.name,p={context:this.controller.context,params:this.controller.params},P=a[f];P?a[f]=()=>P(p):a[f]=()=>{const R=v("IBizControlShell");return E(R,{modelData:c,...p})}});const l=o[n.name];i=E(v(l.component),{modelData:n,context:this.controller.context,params:this.controller.params,provider:l,onControllerAppear:this.onLayoutPanelCreated},a)}return h("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[i||((t=(e=this.$slots).default)==null?void 0:t.call(e))])}})),sn=d("IBizControlShell",C({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(r){z("ctx").evt.emit("onForecast",r.modelData.name);const t=I(!1),s=I(""),n=I();return He(r.modelData).then(i=>{i?n.value=i:s.value="\u672A\u627E\u5230\u5BF9\u5E94\u90E8\u4EF6\u7684\u9002\u914D\u5668",t.value=!0}).catch(i=>{ibiz.log.error(i),s.value=i.message,t.value=!0}),{ns:w("control-shell"),isComplete:t,errMsg:s,provider:n}},render(){return this.isComplete&&this.provider?E(v(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):K(h("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[H("loading"),!this.isComplete]])}})),on=d("IBizViewShell",C({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(r){const e=w("view-shell"),t=I(!1),s=I(""),n=I(),o=I();return(async()=>{let a;if(r.modelData?a=r.modelData:a=await ibiz.hub.getAppView(r.viewId),!a)throw new B("\u672A\u627E\u5230\u89C6\u56FE\u6A21\u578B");o.value=a;try{n.value=await Xe(a)}catch(l){ibiz.log.error(l),s.value=l.message}finally{t.value=!0}})(),{ns:e,isComplete:t,errMsg:s,viewModelData:o,provider:n}},render(){return this.isComplete&&this.provider?E(v(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):K(h("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[H("loading"),!this.isComplete]])}})),an=d("IBizCodeList",C({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},setup(r){const e=w("code-list"),t=I([]),s=(o,i)=>{if(o){const a=o.find(l=>l.value==i);if(a)return a;for(let l=0;l<o.length;l++){const c=s(o[l].children,i);if(c)return c}}};b(()=>r.value,(o,i)=>{if(o!==i)if(F(o)||o==="")t.value=[];else{let a;typeof o=="string"?a=o.split(","):a=[o],t.value=a.map(l=>{const c=s(r.codeListItems,l);return{text:c?.text||l,color:c?.color,textCls:c?.textCls}})}},{immediate:!0});const n=r.codeList.emptyText==="\u672A\u5B9A\u4E49"?"- - -":r.codeList.emptyText;return{items:t,ns:e,emptyText:n}},render(){return h("span",{class:this.ns.b()},[L("vue3-util:"),this.items.length===0?this.emptyText:this.items.map((r,e)=>{var t;return[e!==0?(t=this.codeList)==null?void 0:t.textSeparator:null,h("span",{class:[this.ns.e("item"),r.textCls?r.textCls:null],style:this.ns.cssVarBlock({"item-color":`${r.color}`})},[r.text])]})])}})),ln=d("ControlLoadingPlaceholder",C({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(r){return z("ctx").evt.emit("onForecast",r.modelData.name),{}},render(){return null}}));class ut extends Q{}d("PanelContainerState",ut);class ce extends O{createState(){var e;return new ut((e=this.parent)==null?void 0:e.state)}}d("PanelContainerController",ce);function ct(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!X(r)}const de=C({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:ce,required:!0}},setup(r){const e=w("panel-container"),{id:t}=r.modelData,s=S(()=>{let n=[e.b(),e.m(t)];return n=[...n,...r.controller.containerClass,e.is("hidden",!r.controller.state.visible)],n});return{ns:e,classArr:s}},render(){var r,e;let t;const s=((e=(r=this.$slots).default)==null?void 0:e.call(r))||[],n=h(v("iBizRow"),{slot:"content",layout:this.modelData.layout},ct(t=s.map(o=>{const i=o.props;return!i||!i.controller?o:h(v("iBizCol"),{layoutPos:i.modelData.layoutPos,state:i.controller.state},ct(o)?o:{default:()=>[o]})}))?t:{default:()=>[t]});return h("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?h("style",{type:"text/css"},[this.controller.model.cssStyle]):null,n])}});class he{constructor(){this.component="IBizPanelContainer"}async createController(e,t,s){const n=new ce(e,t,s);return await n.init(),n}}d("PanelContainerProvider",he);const un=d("IBizPanelContainer",x(de,function(r){r.component(de.name,de),D("CONTAINER",()=>new he),D("CONTAINER_DEFAULT",()=>new he)})),pe=C({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(r){return z("ctx").evt.on("onRegister",(s,n)=>{s===r.modelData.id&&r.controller.bindControl(n)}),{ns:w("panel-ctrl-pos")}},render(){const{state:r}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),h("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!r.visible)]},[e||(ibiz.env.dev?`\u672A\u63D0\u4F9B${this.modelData.id}\u63D2\u69FD`:"")])}});class dt extends O{bindControl(e){this.control=e,e.evt.onAll((t,s)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:s})})}}d("PanelCtrlPosController",dt);class ht{constructor(){this.component="IBizPanelCtrlPos"}async createController(e,t,s){const n=new dt(e,t,s);return await n.init(),n}}d("PanelCtrlPosProvider",ht);const cn=d("IBizPanelCtrlPos",x(pe,function(r){r.component(pe.name,pe),D("CTRLPOS",()=>new ht)}));class fe extends O{}d("ScrollContainerItemController",fe);function pt(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!X(r)}const ft=d("ScrollContainerItem",C({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:fe,required:!0}},setup(r){const e=w("scroll-container-item"),{id:t}=r.modelData,s=S(()=>[e.b(),e.m(t),e.is("hidden",!r.controller.state.visible)]);return{ns:e,classArr:s}},render(){var r,e;let t;const s=((e=(r=this.$slots).default)==null?void 0:e.call(r))||[];return h(v("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},pt(t=s.map(n=>{const o=n.props;return!o||!o.controller?n:(o.modelData.layoutPos.layout="FLEX",h(v("iBizCol"),{layoutPos:o.modelData.layoutPos,state:o.controller.state},pt(n)?n:{default:()=>[n]}))}))?t:{default:()=>[t]})}}));class j{constructor(){this.component="IBizScrollContainerItem"}async createController(e,t,s){const n=new fe(e,t,s);return await n.init(),n}}d("ScrollContainerItemProvider",j);class me extends O{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}d("ScrollContainerController",me);const ge=d("ScrollContainer",C({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:me,required:!0}},setup(r){const e=w("scroll-container"),{id:t}=r.modelData,s=S(()=>[e.b(),e.m(t),...r.controller.containerClass,e.is("hidden",!r.controller.state.visible)]);return{ns:e,classArr:s}},render(){var r,e;let t=null,s=null,n=null,o=null,i=null;const a={};(((e=(r=this.$slots).default)==null?void 0:e.call(r))||[]).forEach(c=>{const f=c.props;if(!f||!f.controller)return;const{width:p,height:P}=f.controller.state.layout;switch(f.modelData.layoutPos.layoutPos){case"WEST":t=c,a.left={width:p};break;case"EAST":n=c,a.right={width:p};break;case"NORTH":s=c,a.top={height:P};break;case"SOUTH":o=c,a.bottom={height:P};break;case"CENTER":i=c;break;default:ibiz.log.debug(`\u672A\u9002\u914D\u7684\u5E03\u5C40\u5360\u4F4D${f.modelData.layoutPos.layoutPos}`);break}});for(const c in a)(a[c].width||a[c].height)&&(a[c].flexShrink=0);return h("div",{class:this.classArr},[h("div",{class:[this.ns.e("header")],style:a.top},[s]),h("div",{class:[this.ns.b("content")]},[h("div",{class:this.ns.be("content","left"),style:a.left},[t]),h("div",{class:this.ns.be("content","center")},[i]),h("div",{class:this.ns.be("content","right"),style:a.right},[n])]),h("div",{class:[this.ns.e("footer")],style:a.bottom},[o])])}}));class mt{constructor(){this.component="IBizScrollContainer"}async createController(e,t,s){const n=new me(e,t,s);return await n.init(),n}}d("ScrollContainerProvider",mt);const dn=d("IBizScrollContainer",x(ge,function(r){r.component(ge.name,ge),r.component(ft.name,ft),D("CONTAINER_CONTAINER_SCROLL",()=>new mt),D("CONTAINER_CONTAINER_SCROLL_LEFT",()=>new j),D("CONTAINER_CONTAINER_SCROLL_HEADER",()=>new j),D("CONTAINER_CONTAINER_SCROLL_RIGHT",()=>new j),D("CONTAINER_CONTAINER_SCROLL_BOTTOM",()=>new j),D("CONTAINER_CONTAINER_SCROLL_MAIN",()=>new j)}));class gt extends Q{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}d("NavPosState",gt);class ve extends O{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}get route(){return this.router.currentRoute.value}getExpItemIsCache(e){return this.rawItemParams.expcache==="CACHE"?!0:this.rawItemParams.expcache==="NO_CACHE"?!1:e.isCache}setRouter(e){this.router=e}async onInit(){var e;await super.onInit(),this.handleRawItemParams(),(e=this.model.rawItem)!=null&&e.rawItemParams&&this.model.rawItem.rawItemParams.find(s=>s.key==="REFCTRL"&&s.value?(this.refCtrlKeys=s.value.split(";").map(n=>n.toLowerCase()),!0):!1),this.panel.evt.on("onControlEvent",s=>{if((this.refCtrlKeys.length===0||this.refCtrlKeys.includes(s.triggerControlName))&&s.triggerEventName==="onNavViewChange"){const o=s.triggerEvent;this.openView(o.navViewMsg)}});const t=this.rawItemParams.expmode||this.panel.view.params.expmode;t==="ROUTE"&&this.routeDepth?this.state.routeOpen=!0:t==="NO_ROUTE"?this.state.routeOpen=!1:this.state.routeOpen=!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var e;return new gt((e=this.parent)==null?void 0:e.state)}get routeDepth(){return this.panel.view.modal.routeDepth}onRouteChange(e){this.curNavViewMsg&&(this.state.currentKey=this.curNavViewMsg.key,this.state.navViewMsgs[this.curNavViewMsg.key].fullPath=e.fullPath)}setNavViewMsgs(e){this.state.navViewMsgs[e.key]?Ge(this.state.navViewMsgs[e.key],e):(this.state.navViewMsgs[e.key]=e,this.getExpItemIsCache(e)&&this.state.cacheKeys.push(e.key),this.viewModals[e.key]=new Je({mode:this.routeDepth?oe.ROUTE:oe.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e.key)}})),this.curNavViewMsg=this.state.navViewMsgs[e.key]}dismiss(e){ibiz.log.debug(this.constructor.name,"dismiss",e)}onViewCreated(e){ibiz.log.debug(this.constructor.name,"onViewCreated",e)}openView(e){if(!e.key){this.state.currentKey=e.key;return}this.routeDepth&&this.state.routeOpen?this.openViewByPath(e):this.openViewByModel(e)}openViewByPath(e){const t=Object.values(this.state.navViewMsgs).length===0;if(this.setNavViewMsgs(e),t&&this.route.matched.length>this.routeDepth){this.state.currentKey=e.key,this.state.navViewMsgs[this.curNavViewMsg.key].fullPath=this.route.fullPath;return}if(this.state.navViewMsgs[e.key].fullPath&&this.getExpItemIsCache(e))this.router.push(this.state.navViewMsgs[e.key].fullPath);else{const s=Object.assign(e.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(e)&&this.state.cacheKeys.push(e.key),ibiz.commands.execute(Qe.TAG,e.viewId,s,e.params,{openMode:"INDEXVIEWTAB"})}}openViewByModel(e){this.setNavViewMsgs(e),this.state.currentKey=e.key}handleRawItemParams(){var e;let t={};const s=(e=this.model.rawItem)==null?void 0:e.rawItemParams;k(s)&&(t=s.reduce((n,o)=>(n[o.key.toLowerCase()]=o.value,n),{})),Object.assign(this.rawItemParams,t)}}d("NavPosController",ve);function vt(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!X(r)}const Ce=C({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:ve,required:!0}},setup(r){const e=r.controller,t=w("nav-pos"),s=i=>{e.onViewCreated(i)},n=se(),o=J();if(e.setRouter(n),e.routeDepth){const i=te(o,e.routeDepth);b(()=>o.fullPath,()=>{const a=te(o,e.routeDepth);i===a&&o.matched.length>e.routeDepth&&e.onRouteChange(o)},{immediate:!0})}return{ns:t,c:e,onViewCreated:s}},render(){const{viewModals:r,state:e}=this.c,{currentKey:t,cacheKeys:s,navViewMsgs:n,cache:o}=e;let i=null;if(e.routeOpen)i=h(v("iBizRouterView"),{manualKey:t,modal:r[t],onCreated:this.onViewCreated},{default:({Component:a})=>{const l=t===""||!a?null:h(a,null,null);return o?h(v("keepAlive"),{include:s,max:30,isKey:!0},vt(l)?l:{default:()=>[l]}):l}});else{const a=t?E(v("IBizViewShell"),{context:n[t].context,params:n[t].params,key:n[t].key,viewId:n[t].viewId,onCreated:this.onViewCreated}):null;i=o?h(v("keepAlive"),{include:s,max:30,isKey:!0},vt(a)?a:{default:()=>[a]}):a}return h("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[i])}});class Ct{constructor(){this.component="IBizNavPos"}async createController(e,t,s){const n=new ve(e,t,s);return await n.init(),n}}d("NavPosProvider",Ct);const hn=d("IBizNavPos",x(Ce,function(r){r.component(Ce.name,Ce),D("RAWITEM_NAV_POS",()=>new Ct)}));class Cr extends Q{}class Pe extends O{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 e;return new Cr((e=this.parent)==null?void 0:e.state)}async onInit(){await super.onInit(),this.state.required=!this.model.allowEmpty,this.model.editor&&this.model.editor.editorType!=="HIDDEN"&&(this.editorProvider=await Ze(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(e,t){const{id:s}=this.model;t=t||s,this.dataParent.setDataValue&&await this.dataParent.setDataValue(t,e)}}d("PanelFieldController",Pe);const we=C({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:Pe,required:!0}},setup(r){const e=w("panel-field"),t=S(()=>{const{id:n}=r.modelData,o=[e.b(),e.m(n)];return o.push(...r.controller.containerClass),o});return{ns:e,classArr:t,onValueChange:(n,o)=>{r.controller.setDataValue(n,o)}}},render(){let r=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};if(this.$slots.default)r=this.$slots.default(e);else if(this.controller.editorProvider){const t=v(this.controller.editorProvider.formEditor);r=E(t,{...e})}else r=h(v("not-supported-editor"),{modelData:this.modelData.editor},null)}return h("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[r])}});class Pt{constructor(){this.component="IBizPanelField"}async createController(e,t,s){const n=new Pe(e,t,s);return await n.init(),n}}d("PanelFieldProvider",Pt);const pn=d("IBizPanelField",x(we,function(r){r.component(we.name,we),D("FIELD",()=>new Pt)}));class ye extends O{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}d("PanelRawItemController",ye);const be=C({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:ye,required:!0}},setup(r){const e=w("panel-rawitem"),t=S(()=>{const{id:s}=r.modelData,n=[e.b(),e.m(s)];return n.push(...r.controller.containerClass),n});return{ns:e,classArr:t}},render(){if(this.controller.state.visible)return h("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[h(v("iBizRawItem"),{rawItem:this.modelData},null)])}});class Ie{constructor(){this.component="IBizPanelRawItem"}async createController(e,t,s){const n=new ye(e,t,s);return await n.init(),n}}d("PanelRawItemProvider",Ie);const fn=d("IBizPanelRawItem",x(be,function(r){r.component(be.name,be),D("RAWITEM",()=>new Ie),D("RAWITEM_STATIC_IMAGE",()=>new Ie)})),mn=d("AppRedirectView",C({setup(){var r;const e=Ve.create(((r=ibiz.appData)==null?void 0:r.context)||{});Oe(()=>{e.destroy()});const{href:t}=window.location;async function s(){await Ye(e,t)}xe(()=>ibiz.util.hiddenAppLoading()),s()},render(){return h("div",null,[L("\u91CD\u5B9A\u5411\u8DF3\u8F6C\u4E2D")])}}));class wt{constructor(){this.component="IBizView"}}d("ViewProvider",wt);const De=C({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 r=w("view"),e=ue((...P)=>new ie(...P)),t=et(e.model),{viewType:s,sysCss:n,codeName:o}=e.model,i=s.toLowerCase(),a=n?.cssName,l=S(()=>[r.b(),r.b(i),r.m(o),a,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""]),c=P=>{e.setLayoutPanel(P)},f=I(null);return ze(()=>e.onActivated()),_e(()=>e.onDeactivated()),{c:e,controls:t,viewClassNames:l,container:f,onLayoutPanelCreated:c,renderViewMessage:P=>{if(e.state.isCreated){const R=e.state.viewMessages[P];if(R?.length)return h(v("view-message"),{class:[r.e(`${P.toLowerCase()}-message`)],messages:R},null)}return null}}},render(){var r;let e=null;if(this.c.state.isCreated){const t={...this.$slots};if((r=this.controls)!=null&&r.length&&this.controls.forEach(s=>{const n=s.name||s.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[n]&&Object.assign(o,this.c.slotProps[n]);const i=t[n];if(i){t[n]=()=>i(o);return}const a=this.c.providers[n];a&&(t[n]=()=>{const l=v(a.component);return E(l,{modelData:s,...o,provider:a})})}),this.c.engines.length===0)e=h("span",{style:"color:red;"},[L("\u89C6\u56FE\u7C7B\u578B"),this.modelData.viewType,L("\u6682\u672A\u652F\u6301")]);else{const s=this.c.model.viewLayoutPanel,n=this.c.providers[s.name];e=E(v(n.component),{modelData:s,context:this.c.context,params:this.c.params,provider:n,onControllerAppear:this.onLayoutPanelCreated},t)}}return K(h("div",{ref:"container",class:this.viewClassNames},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[H("loading"),this.c.state.isLoading]])}}),gn=d("IBizView",x(De,function(r){r.component(De.name,De),U("DEFAULT",()=>new wt)})),vn=d("TodoRedirect",C({setup(){const r=se(),{href:e}=window.location,t=e.lastIndexOf("?"),s=decodeURIComponent(e.substring(t+1,e.length));if(!s)throw new Error("\u91CD\u5B9A\u5411\u53C2\u6570\u4E0D\u8DB3\u65E0\u6CD5\u8DF3\u8F6C");const n=V.parse(s,{delimiter:";"}),{apptype:o,todotype:i,todoid:a}=n,l={srfapptype:"pc",srfapp:""};o||(l.todourltype="RouterUrl");async function c(){let p=(await ibiz.net.post(`/systodos/${a}/getlinkurl`,l)).data.linkurl;o?window.location.href=p:(p.indexOf("/")!==0&&(p=`/${p}`),p+=`;srfwf=${i}`,r.push(`/index${p}`))}c()},render(){return h("div",null,[L("\u5F85\u529E\u5217\u8868\u91CD\u5B9A\u5411")])}}));class ne{constructor(){this.component="IBizPortalView"}}d("PortalViewProvider",ne);const Ee=C({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var r;const e=w("view"),t=ue((...f)=>new ie(...f)),s=((r=t.model.viewLayoutPanel)==null?void 0:r.controls)||t.model.controls,{viewType:n,sysCss:o,codeName:i}=t.model,a=n.toLowerCase(),l=o?.cssName,c=[e.b(),e.b(a),e.m(i),l];return{c:t,ns:e,controls:s,viewClassNames:c}},render(){var r;let e=null;if(this.c.state.isCreated){const t={...this.$slots};(r=this.controls)!=null&&r.length&&this.controls.forEach(s=>{const n=s.name||s.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[n]&&Object.assign(o,this.c.slotProps[n]);const i=t[n];if(i){t[n]=()=>i(o);return}const a=this.c.providers[n];a&&(t[n]=()=>{const l=v(a.component);return E(l,{modelData:s,...o})})}),t.dashboard&&(e=t.dashboard())}return h("div",{class:this.viewClassNames},[e])}}),Cn=d("IBizPortalView",x(Ee,function(r){r.component(Ee.name,Ee),U(y.APP_PORTAL_VIEW,()=>new ne),U(y.DE_PORTAL_VIEW,()=>new ne),U(y.DE_PORTAL_VIEW9,()=>new ne)}));function Pr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function A(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function yt(r,e){for(var t="",s=0,n=-1,o=0,i,a=0;a<=r.length;++a){if(a<r.length)i=r.charCodeAt(a);else{if(i===47)break;i=47}if(i===47){if(!(n===a-1||o===1))if(n!==a-1&&o===2){if(t.length<2||s!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",s=0):(t=t.slice(0,l),s=t.length-1-t.lastIndexOf("/")),n=a,o=0;continue}}else if(t.length===2||t.length===1){t="",s=0,n=a,o=0;continue}}e&&(t.length>0?t+="/..":t="..",s=2)}else t.length>0?t+="/"+r.slice(n+1,a):t=r.slice(n+1,a),s=a-n-1;n=a,o=0}else i===46&&o!==-1?++o:o=-1}return t}function wr(r,e){var t=e.dir||e.root,s=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+s:t+r+s:s}var $={resolve:function(){for(var e="",t=!1,s,n=arguments.length-1;n>=-1&&!t;n--){var o;n>=0?o=arguments[n]:(s===void 0&&(s=process.cwd()),o=s),A(o),o.length!==0&&(e=o+"/"+e,t=o.charCodeAt(0)===47)}return e=yt(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(A(e),e.length===0)return".";var t=e.charCodeAt(0)===47,s=e.charCodeAt(e.length-1)===47;return e=yt(e,!t),e.length===0&&!t&&(e="."),e.length>0&&s&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return A(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var s=arguments[t];A(s),s.length>0&&(e===void 0?e=s:e+="/"+s)}return e===void 0?".":$.normalize(e)},relative:function(e,t){if(A(e),A(t),e===t||(e=$.resolve(e),t=$.resolve(t),e===t))return"";for(var s=1;s<e.length&&e.charCodeAt(s)===47;++s);for(var n=e.length,o=n-s,i=1;i<t.length&&t.charCodeAt(i)===47;++i);for(var a=t.length,l=a-i,c=o<l?o:l,f=-1,p=0;p<=c;++p){if(p===c){if(l>c){if(t.charCodeAt(i+p)===47)return t.slice(i+p+1);if(p===0)return t.slice(i+p)}else o>c&&(e.charCodeAt(s+p)===47?f=p:p===0&&(f=0));break}var P=e.charCodeAt(s+p),R=t.charCodeAt(i+p);if(P!==R)break;P===47&&(f=p)}var q="";for(p=s+f+1;p<=n;++p)(p===n||e.charCodeAt(p)===47)&&(q.length===0?q+="..":q+="/..");return q.length>0?q+t.slice(i+f):(i+=f,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(A(e),e.length===0)return".";for(var t=e.charCodeAt(0),s=t===47,n=-1,o=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!o){n=i;break}}else o=!1;return n===-1?s?"/":".":s&&n===1?"//":e.slice(0,n)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');A(e);var s=0,n=-1,o=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(c===47){if(!o){s=i+1;break}}else l===-1&&(o=!1,l=i+1),a>=0&&(c===t.charCodeAt(a)?--a===-1&&(n=i):(a=-1,n=l))}return s===n?n=l:n===-1&&(n=e.length),e.slice(s,n)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!o){s=i+1;break}}else n===-1&&(o=!1,n=i+1);return n===-1?"":e.slice(s,n)}},extname:function(e){A(e);for(var t=-1,s=0,n=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(l===47){if(!o){s=a+1;break}continue}n===-1&&(o=!1,n=a+1),l===46?t===-1?t=a:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||n===-1||i===0||i===1&&t===n-1&&t===s+1?"":e.slice(t,n)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return wr("/",e)},parse:function(e){A(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var s=e.charCodeAt(0),n=s===47,o;n?(t.root="/",o=1):o=0;for(var i=-1,a=0,l=-1,c=!0,f=e.length-1,p=0;f>=o;--f){if(s=e.charCodeAt(f),s===47){if(!c){a=f+1;break}continue}l===-1&&(c=!1,l=f+1),s===46?i===-1?i=f:p!==1&&(p=1):i!==-1&&(p=-1)}return i===-1||l===-1||p===0||p===1&&i===l-1&&i===a+1?l!==-1&&(a===0&&n?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(a,l)):(a===0&&n?(t.name=e.slice(1,i),t.base=e.slice(1,l)):(t.name=e.slice(a,i),t.base=e.slice(a,l)),t.ext=e.slice(i,l)),a>0?t.dir=e.slice(0,a-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};$.posix=$;var T=$,yr=Pr(T);class br{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.devPackages=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map}registerPredefinedPlugin(e){this.predefinedPlugins.set(e.name,e)}register(e){this.pluginCodes.forEach(t=>{e.use(t)})}async loadPredefinedPlugin(e){if(this.predefinedPlugins.has(e)){const t=this.predefinedPlugins.get(e);t&&await this.loadPluginRef(t.name,t.path)}}setPluginCode(e){this.pluginCodes.push(e),window.vueInstances.forEach(t=>{t.use(e)})}setDevPlugin(e,t){this.devPackages.set(e,t)}async loadPlugin(e){if(e.runtimeObject===!0){const t=e;if(t)try{await this.loadPluginRef(t.rtobjectName,t.rtobjectRepo)}catch{throw new je(t,"\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25")}}return!1}async loadPluginRef(e,t){if(this.pluginCache.has(e))return!0;let s=null;const n=this.devPackages.get(e);if(n)s=await n();else{const i=t,a=this.urlReg.test(i)?`${i}/package.json`:`${ibiz.env.pluginBaseUrl}/${T.join(i,"package.json")}`,l=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:a});if(l.status!==200)throw new Error("\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25");s=l.data}const o=new tt(e,t,s);if(o)try{return await this.loadScript(o),this.pluginCache.set(e,o),!0}catch(i){ibiz.log.error(i)}return!1}async loadScript(e){const t=e.repo,{name:s,version:n,system:o,module:i,styles:a}=e.config;let l="";if(this.devPackages.has(s)?l=T.join(`${s}@${n}`,i):ibiz.env.dev?l=this.urlReg.test(t)?`${t}/${T.join(i)}`:`${ibiz.env.pluginBaseUrl}/${t}/${T.join(i)}`:l=T.join(t,o),l){if(this.cache.has(l))return;let c=null;const f=this.parseUrl(l),p=(typeof a=="string"?[a]:a).map(P=>this.parseUrl(yr.join(t,P)));if(this.devPackages.has(s)){const R=await this.devPackages.get(s)();this.setPluginCode(R.default),this.cache.set(l,!0)}else ibiz.env.dev?c=await Ht.import(l):(System.addImportMap({imports:{[s]:f},styles:{[s]:p}}),c=await System.import(s));if(c){if(c.default)this.setPluginCode(c.default);else throw new B("\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u8FDC\u7A0B\u63D2\u4EF6\u672A\u627E\u5230[default]\u9ED8\u8BA4\u5BFC\u51FA");this.cache.set(l,!0)}else throw new B("\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u672A\u627E\u5230\u6587\u4EF6\u6216\u6587\u4EF6\u5185\u5BB9\u683C\u5F0F\u4E0D\u6B63\u786E")}}parseUrl(e){if(this.urlReg.test(e))return e;let t="";this.urlReg.test(ibiz.env.pluginBaseUrl)?e.startsWith("/")?t=ibiz.env.pluginBaseUrl+e:t=`${ibiz.env.pluginBaseUrl}/${e}`:t=`${T.join(ibiz.env.pluginBaseUrl,e)}`;const{origin:s,pathname:n}=window.location;return n.endsWith("/")&&t.startsWith("/")&&(t=t.substring(1)),t=`${s}${n}${t}`,t}}d("PluginFactory",br);class Ne{constructor(e,t,s){this.required=!0,t&&(this.default=t),s&&(this.validator=s),this.type=e}}d("RequiredProp",Ne);function m(){return{value:String,controller:new Ne(Object),data:new Ne(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}}}function Ir(){return{change:(r,e)=>!0,blur:()=>!0,focus:()=>!0}}function Dr(){return{change:(r,e)=>!0,rowSave:()=>!0}}function g(){return{hasError:{type:Boolean}}}function bt(){return{...m(),value:[String,Number]}}function Er(){return{...bt(),...g()}}function It(){return{...m(),value:Number}}function Nr(){return{...It(),...g()}}function Dt(){return{...m(),value:String}}function Ar(){return{...Dt(),...g()}}function Et(){return{...m(),value:[String,Number,Object,Array]}}function Rr(){return{...Et(),...g()}}function Nt(){return{...m(),value:[String,Number]}}function Sr(){return{...Nt(),...g()}}function At(){return{...m(),value:[String,Number]}}function Br(){return{...At(),...g()}}function Rt(){return{...m(),value:[String,Number]}}function Or(){return{...Rt(),...g()}}function St(){return{...m(),value:[String,Array,Object,Number]}}function xr(){return{...St(),...g()}}function Bt(){return{...m(),value:[String,Number]}}function zr(){return{...Bt(),...g()}}function Ot(){return{...m(),value:[String,Number]}}function _r(){return{...Ot(),...g()}}function xt(){return{...m(),value:[String,Number]}}function Fr(){return{...xt(),...g()}}function zt(){return{...m(),value:[String,Number]}}function kr(){return{...zt(),...g()}}function _t(){return{...m(),value:[String,Number]}}function Tr(){return{..._t(),...g()}}function Ft(){return{...m(),value:[String,Number]}}function Lr(){return{...Ft(),...g()}}function kt(){return{...m(),value:[String,Number,Array]}}function Vr(){return{...kt(),...g()}}function Tt(){return{...m(),value:[String,Number]}}function jr(){return{...Tt(),...g()}}function Lt(){return{...m(),value:[String,Number]}}function $r(){return{...Lt(),...g()}}function Vt(){return{...m(),value:[String,Number]}}function Gr(){return{...Vt(),...g()}}function jt(){return{...m(),value:String}}function Mr(){return{...jt(),...g()}}function $t(){return{...m(),value:[String,Number]}}function Ur(){return{...$t(),...g()}}function Gt(){return{...m(),value:String,language:{type:String},theme:{type:String}}}function Wr(){return{...Gt(),...g()}}function Mt(){return{...m(),value:String}}function qr(){return{...Mt(),...g()}}function Ut(){return{...m(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function Kr(){return{...Ut(),...g()}}function Wt(){return{...m(),value:[Array,Array]}}function Hr(){return{...Wt(),...g()}}function qt(){return{...m(),value:String}}function Xr(){return{...qt(),...g()}}function Kt(){return{...m(),value:String}}function Jr(){return{...Kt(),...g()}}}}});
|
|
1
|
+
System.register(["vue","@ibiz-template/core","ramda","qx-util","vue-router","qs","@ibiz-template/runtime","pinia"],function(d,mr){"use strict";var b,U,$t,q,Gt,Wt,_,O,D,A,m,Ut,C,S,h,Q,Z,M,L,qt,Kt,Ht,Xt,Jt,N,Qt,Zt,z,Yt,lt,I,te,k,ee,re,ne,V,se,oe,Y,ut,$,E,ie,ae,le,ue,x,B,w,ce,ct,de,he,tt,et,dt,ht,pt,ft,pe,mt,fe,K,me,gt,ge;return{setters:[function(u){b=u.watch,U=u.onBeforeUnmount,$t=u.createCommentVNode,q=u.getCurrentInstance,Gt=u.isReactive,Wt=u.toRaw,_=u.inject,O=u.reactive,D=u.ref,A=u.h,m=u.resolveComponent,Ut=u.provide,C=u.defineComponent,S=u.computed,h=u.createVNode,Q=u.withDirectives,Z=u.resolveDirective,M=u.createTextVNode,L=u.isVNode,qt=u.onUnmounted,Kt=u.onMounted,Ht=u.onActivated,Xt=u.onDeactivated},function(u){Jt=u.onClickOutside,N=u.NOOP,Qt=u.listenJSEvent,Zt=u.Namespace,z=u.RuntimeError,Yt=u.isSvg,lt=u.ModelError,I=u.RuntimeModelError,te=u.IBizContext},function(u){k=u.isNil,ee=u.isNotNil,re=u.mergeLeft},function(u){ne=u.isFunc,V=u.notNilEmpty,se=u.QXEvent,oe=u.clearAll},function(u){Y=u.useRoute,ut=u.useRouter},function(u){$=u.default},function(u){E=u.ViewType,ie=u.getMatchResPath,ae=u.calcDeCodeNameById,le=u.getControlProvider,ue=u.getViewProvider,x=u.PanelItemState,B=u.PanelItemController,w=u.registerPanelItemProvider,ce=u.Modal,ct=u.ViewMode,de=u.OpenAppViewCommand,he=u.getEditorProvider,tt=u.getAllPanelField,et=u.isDataContainer,dt=u.getPanelItemProvider,ht=u.PanelData,pt=u.PanelNotifyState,ft=u.execDELogicById,pe=u.toLocalOpenWFRedirectView,mt=u.ViewController,fe=u.getControlsByView,K=u.registerViewProvider,me=u.RemotePluginItem},function(u){gt=u.defineStore,ge=u.createPinia}],execute:function(){d({calcResRoutePath:we,createOverlayView:X,generateRoutePath:Ar,getArrayProps:hr,getAutoCompleteProps:lr,getCascaderProps:pr,getCheckboxListProps:He,getCheckboxProps:Xe,getCodeProps:ur,getColorPickerProps:fr,getDataPickerProps:Je,getDatePickerProps:Qe,getDateRangeProps:Ze,getDrawerPlacement:Lr,getDropdownProps:Ke,getEditorEmits:tn,getEditorProps:g,getGridArrayProps:An,getGridAutoCompleteProps:Dn,getGridCascaderProps:Sn,getGridCheckboxListProps:ln,getGridCheckboxProps:un,getGridCodeProps:bn,getGridColorPickerProps:Nn,getGridDataPickerProps:cn,getGridDatePickerProps:dn,getGridDateRangeProps:hn,getGridDropdownProps:an,getGridEditorCommonProps:v,getGridEditorEmits:en,getGridHtmlProps:En,getGridInputIpProps:sn,getGridInputNumberProps:nn,getGridInputProps:rn,getGridListBoxProps:pn,getGridMarkDownProps:In,getGridNumberRangeProps:fn,getGridRadioProps:mn,getGridRateProps:gn,getGridRawProps:vn,getGridSliderProps:Cn,getGridSpanProps:on,getGridStepperProps:Pn,getGridSwitchProps:yn,getGridUploadProps:wn,getHtmlProps:cr,getInputIpProps:Ue,getInputNumberProps:We,getInputProps:Ge,getListBoxProps:Ye,getMarkDownProps:dr,getNestedRoutePath:ot,getNumberRangeProps:tr,getOrigin:nt,getOwnRouteContext:ye,getRadioProps:er,getRateProps:rr,getRawProps:nr,getSliderProps:sr,getSpanProps:qe,getStepperProps:or,getSwitchProps:ir,getUploadProps:ar,isEmptyVNode:Pr,onRouteChange:Nr,openViewDrawer:_r,openViewFloatWindow:Fr,openViewModal:zr,openViewPopover:Tr,parseRouteViewData:Sr,prepareControl:Br,renderString:Rr,route2routePath:st,routePath2string:vt,useClickOutside:u,useControlController:br,useController:Cr,useCtx:Ce,useEventListener:Pe,useFocusAndBlur:Er,useForce:H,useForceTogether:vr,useMobCtx:yr,useNamespace:P,useProps:rt,usePropsWatch:gr,useRouteKey:$r,useRouterQuery:Mr,useViewController:Ct});function u(n,t,e={}){let s=N,r=N,o=N;const i=()=>{s(),s=N,r=N,o=N};return b(n,(a,l)=>{if(a!==l)if(k(a))i();else{const c=Jt(a?.$el||a,t,e);s=c.stop,r=c.pause,o=c.proceed}},{immediate:!0}),U(()=>{s!==N&&i()}),{stop:()=>s(),pause:()=>r(),proceed:()=>o()}}function rt(){return q().proxy.$props}function nt(n){return Gt(n)?Wt(n):n}function gr(n,t,e){const s=rt();Object.prototype.hasOwnProperty.call(s,n)&&(b(()=>s[n],(r,o)=>{t(nt(r),nt(o))},e),t(nt(s[n]),void 0))}function H(){const n=q().proxy;return t=>{n.$forceUpdate(),t&&ne(t)&&n.$nextTick(()=>{t()})}}function vr(n,t){const e=t.force,s=H();t.force=r=>{e(r),s()}}function Cr(n){n.force=H()}const ve=d("EmptyVNode",$t("EmptyVNode"));function Pr(n){return Array.isArray(n)?n.length===1&&n[0]===ve:n===ve}function Ce(){return _("ctx")}function yr(){return _("ctx")}function wr(n,t){b(()=>({context:n.context,params:n.params}),e=>{t.updateContextParams({...e}),ibiz.log.debug(`${t.model.id}\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A`,e)})}function Dr(n,t){const e=["context","params","modelData"];b(()=>{const s={};return Object.keys(n).forEach(r=>{e.includes(r)||(s[r]=n[r])}),s},(s,r)=>{const o={};Object.keys(s).forEach(i=>{s[i]!==(r||{})[i]&&(o[i]=s[i])}),ibiz.log.debug(`\u90E8\u4EF6 [${t.model.name}] state \u53D8\u66F4`,o),Object.keys(o).forEach(i=>{o[i]!==void 0&&(t.state[i]=o[i])})},{immediate:!0})}function br(n){const t=Ce(),e=rt();t.evt.emit("onForecast",e.modelData.name);const s=e.provider;let r;s?.createController?r=s.createController(e.modelData,e.context,e.params,t):r=n(e.modelData,e.context,e.params,t),wr(e,r),Dr(e,r),r.state=O(r.state),r.force=H();const o=q().proxy;return r.evt.onAll((i,a)=>{o.$emit(i.slice(2),a)}),o.$emit("controllerAppear",r),r.created(),U(()=>r.destroyed()),r}function Pe(n,t,e,s={}){let r=N;return b(n,(o,i)=>{o!==i&&(k(o)?(r(),r=N):r=Qt(o?.$el||o,t,e,s))},{immediate:!0}),U(()=>{r!==N&&r()}),()=>{r()}}function Er(n,t){const e=D(),s=D(!1);let r;const o=()=>{s.value||ibiz.log.debug("\u6CA1\u6709\u805A\u7126\uFF0C\u4E0D\u89E6\u53D1\u5931\u7126"),t(),r.stop(),s.value=!1},i=()=>{r&&r.pause()},a=()=>{r&&r.stop()};return Pe(e,"click",l=>{s.value||(r=u(e,()=>{o()}),s.value=!0,n())},{capture:!0}),{componentRef:e,isFocus:s,doBlur:o,pause:i,stop:a}}function P(n){return new Zt(n,ibiz.env.namespace)}function st(n){const t=n.matched.length,e=[];for(let r=1;r<=t;r++){const o=n.path.split("/")[r*2],i=n.params[`params${r}`];let a,l,c;!i||i===ibiz.env.routePlaceholder?a=void 0:a=$.parse(i,{strictNullHandling:!0,delimiter:";"}),a&&(r===1?(l=a,a=void 0):(a.srfnavctx&&(l=JSON.parse(decodeURIComponent(a.srfnavctx)),delete a.srfnavctx),a.srfnav&&(c=a.srfnav,delete a.srfnav))),e.push({viewName:o,context:l,params:a,srfnav:c})}let s;return n.params.appContext&&n.params.appContext!==ibiz.env.routePlaceholder&&(s=$.parse(n.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:s,pathNodes:e}}function vt(n){let t="";return n.appContext?t+=`/${$.stringify(n.appContext,{delimiter:";",strictNullHandling:!0})}`:t+=`/${ibiz.env.routePlaceholder}`,n.pathNodes.forEach((e,s)=>{t+=`/${e.viewName}/`;let r={};if(s===0)V(e.context)&&(r=e.context);else{if(r=V(e.params)?e.params:{},V(e.context)){const i=JSON.stringify(e.context);i!=="{}"&&(r.srfnavctx=encodeURIComponent(i))}e.srfnav&&(r.srfnav=e.srfnav)}const o=$.stringify(r,{delimiter:";",strictNullHandling:!0,skipNulls:!0});V(o)?t+=o:t+=ibiz.env.routePlaceholder}),t}function ye(n){const t=n.getOwnContext(),e=["srfsessionid","srfappid"];return Object.keys(t).forEach(s=>{e.includes(s)&&delete t[s]}),t}const Ir=d("excludeViewTypes",[E.DE_GRID_VIEW,E.DE_GRID_EXP_VIEW,E.DE_LIST_VIEW,E.DE_LIST_EXP_VIEW,E.DE_DATA_VIEW,E.DE_DATAVIEW_EXP_VIEW,E.DE_CALENDAR_VIEW,E.DE_CALENDAR_EXP_VIEW,E.DE_CHART_VIEW,E.DE_CHART_EXP_VIEW,E.DE_KANBAN_VIEW]);async function we(n,t,e){if(!e)n.pathNodes[0].context=void 0;else{const s=await ibiz.hub.getAppDataEntity(e);let r=ie(t,s);if(r||(r={path:"",keys:[s.codeName.toLowerCase()]}),r){const o=n.pathNodes[1].context,i={};r.keys.forEach(a=>{t&&Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a],o&&delete o[a])}),n.pathNodes[0].context=i}}}async function Ar(n,t,e,s){const r=st(t);let o=2;if(e.toRouteDepth?(o=e.toRouteDepth,delete e.toRouteDepth):ibiz.env.isMob&&(r.pathNodes[0]={viewName:"home"}),r.pathNodes.splice(o-1,r.pathNodes.length-o+1),e.currentSrfNav){const i=r.pathNodes[r.pathNodes.length-1];i.params=i.params||{},i.srfnav=e.currentSrfNav,delete e.currentSrfNav}if(t.fullPath.startsWith("/appredirectview")&&(s?.srfindexname?(r.pathNodes[0].viewName=s.srfindexname,delete s.srfindexname):r.pathNodes[0].viewName="index"),r.pathNodes.push({viewName:n.codeName.toLowerCase(),context:ye(e),params:s}),o===2&&(await we(r,e,n.appDataEntityId),Ir.includes(n.viewType))){const i=ae(n.appDataEntityId);delete r.pathNodes[0].context[i]}return{path:vt(r)}}async function Sr(n,t){var e;const s=st(n);let r=s.pathNodes[t-1].viewName;if(!r)throw new z(`\u7B2C${t}\u7EA7\u8DEF\u7531\u4E0D\u5B58\u5728\u89C6\u56FE\u6807\u8BC6`);r==="index"&&(r=ibiz.hub.defaultAppIndexViewName);const o=await ibiz.hub.getAppView(r);if(!o)throw new z(`\u627E\u4E0D\u5230\u89C6\u56FE${r}`);const i={};if((e=ibiz.appData)!=null&&e.context&&Object.assign(i,ibiz.appData.context),s.appContext&&Object.assign(i,s.appContext),t!==1)for(let c=0;c<t;c++){const f=s.pathNodes[c];V(f.context)&&Object.assign(i,f.context)}const{params:a,srfnav:l}=s.pathNodes[t-1];return{viewModel:o,context:i,params:a,srfnav:l}}function ot(n,t,e=!0){if(n.matched.length<t)return"";if(n.name)return n.path;const s=st(n);return s.pathNodes.length<t?n.path:(s.pathNodes.length>t&&(s.pathNodes=s.pathNodes.slice(0,t)),e&&delete s.pathNodes[t-1].srfnav,vt(s))}function Nr(n,t){const e=Y();if(!e)throw new z("\u65E0\u6CD5\u6B63\u786E\u83B7\u53D6route,\u53EF\u80FD\u662F\u4F9D\u8D56\u95EE\u9898");b(()=>e?.path,()=>{const s=ot(e,t);n({currentKey:s,fullPath:e.fullPath})},{immediate:!0})}class De{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),b(()=>t.path,(s,r)=>{if(s!==r){if(this.callbacks.length)for(let o=0;o<this.callbacks.length;o++){const i=this.callbacks[o];i()}if(this.callbacks=[],this.timers.length)for(let o=0;o<this.timers.length;o++){const i=this.timers[o];clearTimeout(i)}this.timers=[]}})}nextChange(t){t&&(this.timers.push(setTimeout(()=>{t();const e=this.callbacks.findIndex(s=>s===t);this.callbacks.splice(e,1)},this.wait)),this.callbacks.push(t))}}d("RouteListener",De);const R=d("withInstall",(n,t)=>(n.install=e=>{t(e)},n));function Br(n){const t=P("control"),{controlType:e,sysCss:s,codeName:r}=n.model,o=e.toLowerCase(),i=s?.cssName,a=P(`control-${o}`),l=[t.b(),t.b(o),t.m(r)];return i&&l.push(i),{controlClass:l,ns:a}}function Rr(n){if(k(n))return"";if(typeof n=="string")return n;try{return n.toString()}catch(t){ibiz.log.error(n,"\u8F6C\u6362\u6210\u5B57\u7B26\u4E32\u5931\u8D25",t)}return""}class it{constructor(t,e,s){this.component=t,this.render=e,this.opts=s,this.evt=new se,this.init()}static createVueApp(t,e){throw new z("\u6CA1\u6709\u6CE8\u5165createVueApp\u65B9\u6CD5")}init(){const t=this,{render:e,opts:s}=this,r=document.createElement("div");document.body.appendChild(r);const o=it.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(r),t.evt.emit("dismiss",t.result)},render(){return A(t.component,{ref:"root",opts:s,onDismiss(i){t.result=i,o.unmount()}},{default:e})}});ibiz.plugin.register(o),o.mount(r),this.vm=o}async present(){return this.modal.present()}async dismiss(t){this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const e=s=>{t(s),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)})}}d("OverlayContainer",it);class Or extends it{present(t){return this.modal.present(t)}}d("OverlayPopoverContainer",Or);function X(n){return t=>{const e=m("IBizViewShell");return A(e,{...n,modal:t})}}async function zr(n,t){const e=ibiz.overlay.createModal(X(n),void 0,t);return e.present(),await e.onWillDismiss()||{ok:!1}}async function Fr(n,t){const e=ibiz.overlay.createFloatWindow(X(n),void 0,t);return e.present(),await e.onWillDismiss()||{ok:!1}}async function _r(n,t){const e=ibiz.overlay.createDrawer(X(n),void 0,t);return await e.present(),await e.onWillDismiss()||{ok:!1}}async function Tr(n,t,e){const s=ibiz.overlay.createPopover(X(t),void 0,e);return s.present(n.target),await s.onWillDismiss()||{ok:!1}}const xr={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};function Lr(n){return xr[n]||"right"}class kr{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)}}class Vr{constructor(){this.map=new Map}async open(t,e){const s=t.currentRoute.value.fullPath;t.push({path:e});const r=e;if(this.map.has(r))return this.map.get(r).onWillDismiss();const o=new kr(s,r);return this.map.set(r,o),this.scheduledDestruction(o),o.onWillDismiss()}close(t,e){const s=this.map.get(t);s&&(s.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)},10*1e3)}}const Bn=d("routerCallback",new Vr),Rn=d("useAppStore",gt("appStore",()=>({appStore:O({})})));function jr(){const e=D(500);function s(){return e.value+=1,e.value}function r(){e.value-=1}return{zIndex:e,increment:s,decrement:r}}const On=d("useUIStore",gt("uiStore",()=>{const n=jr();return{UIStore:O({zIndex:n.zIndex,theme:"light"}),zIndex:n}})),zn=d("piniaInstance",ge());function Mr(){const n=Y(),{query:t}=n;return t}function $r(n,t,e){e||(e=D("")),e.value=n.value;const s=new De(t);return b(n,(r,o)=>{r!==o&&s.nextChange(()=>{e.value=r})}),e}function Gr(n,t){b(()=>({context:n.context,params:n.params}),e=>{t.context.reset({},e.context),oe(t.params),Object.assign(t.params,e.params),t.handleContextParams(),ibiz.log.debug(`${t.model.id}\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A`,e)})}function Wr(n,t){b(()=>n.state?{...n.state}:{},(e,s)=>{const r={};Object.keys(e).forEach(o=>{e[o]!==(s||{})[o]&&(r[o]=e[o])}),ibiz.log.debug(`\u89C6\u56FE [${t.model.name}] state \u53D8\u66F4`,r),Object.keys(r).forEach(o=>{t.state[o]=r[o]})},{immediate:!0})}function Ct(n){const t=rt(),e=_("ctx",void 0);e?.evt.emit("onForecast",t.modelData.name);const s=t.provider;let r;s?.createController?r=s.createController(t.modelData,t.context,t.params,e):r=n(t.modelData,t.context,t.params,e),Gr(t,r),Wr(t,r),Ut("ctx",r.ctx),r.state=O(r.state),r.slotProps=O(r.slotProps),t.modal&&(r.modal=t.modal),r.force=H();const o=q().proxy;return r.evt.onAll((i,a)=>{o.$emit(i.slice(2),a)}),r.created(),U(()=>r.destroyed()),r}const Fn=d("IBizIcon",C({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(n){const t=P("icon"),e=`${ibiz.env.assetsUrl}/${n.baseDir}/`;function s(o){if(o){if(o.htmlStr)return h("span",{class:t.b(),innerHTML:o.htmlStr},null);if(o.cssClass)return o.cssClass.indexOf("fa-")!==-1?h("i",{class:[t.b(),o.cssClass]},null):h("ion-icon",{class:t.b(),name:o.cssClass},null);if(o.imagePath)return o.imagePath.endsWith("svg")?o.imagePath.startsWith("http")?h("img",{class:t.b(),src:o.imagePath},null):h("ion-icon",{src:e+o.imagePath,class:t.b()},null):o.imagePath.startsWith("http")?h("img",{class:t.b(),src:o.imagePath},null):h("img",{class:t.b(),src:e+o.imagePath},null);if(o.rawContent)return Yt(o.rawContent)?h("div",{class:t.b(),innerHTML:o.rawContent},null):h("img",{class:t.b(),src:o.rawContent},null)}return null}const r=S(()=>s(n.icon));return()=>r.value}})),_n=d("IBizRouterView",C({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(n,{attrs:t}){const e={};let s=!0;return b(()=>n.manualKey,(o,i)=>{ee(o)&&o!==i&&(s=!0)}),{renderComp:(o,i)=>{if(!s)return e.vNode;if(s=!1,o){const a={...o.props};delete a.onVnodeUnmounted,delete a.ref;const l=A(o.type,{...a,...t,key:n.manualKey});return e.vNode=l,l}}}},render(){return h(m("router-view"),{name:this.name,route:this.route},{default:({Component:n,route:t})=>{const e=this.renderComp(n,t);return this.$slots.default?this.$slots.default({Component:e,route:t}):e}})}})),Tn=d("IBizControlBase",C({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(n){const t=P("control"),{controlType:e,sysCss:s,codeName:r}=n.controller.model,o=e.toLowerCase(),i=s?.cssName,a=n.controller.model,l=n.controller.model.controls,c=p=>{n.controller.setLayoutPanel(p)},f=O({});return a.controlType.endsWith("EXPBAR")===!1&&(k(a.width)||(f.width=`${a.width}px`),k(a.height)||(f.height=`${a.height}px`)),{ns:t,typeClass:o,sysCssName:i,inlineStyle:f,codeName:r,controls:l,onLayoutPanelCreated:c}},render(){var n,t,e;const{state:s,controlPanel:r,providers:o}=this.controller;let i=null;if(s.isCreated&&r){const a={...this.$slots};(n=this.controls)!=null&&n.length&&this.controls.forEach(c=>{const f=c.name,p={context:this.controller.context,params:this.controller.params},y=a[f];y?a[f]=()=>y(p):a[f]=()=>{const T=m("IBizControlShell");return A(T,{modelData:c,...p})}});const l=o[r.name];i=A(m(l.component),{modelData:r,context:this.controller.context,params:this.controller.params,provider:l,onControllerAppear:this.onLayoutPanelCreated},a)}return h("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[i||((e=(t=this.$slots).default)==null?void 0:e.call(t))])}})),xn=d("IBizControlShell",C({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(n){_("ctx").evt.emit("onForecast",n.modelData.name);const e=D(!1),s=D(""),r=D();return le(n.modelData).then(i=>{i?r.value=i:s.value="\u672A\u627E\u5230\u5BF9\u5E94\u90E8\u4EF6\u7684\u9002\u914D\u5668",e.value=!0}).catch(i=>{ibiz.log.error(i),s.value=i.message,e.value=!0}),{ns:P("control-shell"),isComplete:e,errMsg:s,provider:r}},render(){return this.isComplete&&this.provider?A(m(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):Q(h("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[Z("loading"),!this.isComplete]])}})),Ln=d("IBizViewShell",C({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(n){const t=P("view-shell"),e=D(!1),s=D(""),r=D(),o=D();return(async()=>{let a;if(n.modelData?a=n.modelData:a=await ibiz.hub.getAppView(n.viewId),!a)throw new z("\u672A\u627E\u5230\u89C6\u56FE\u6A21\u578B");o.value=a;try{r.value=await ue(a)}catch(l){ibiz.log.error(l),s.value=l.message}finally{e.value=!0}})(),{ns:t,isComplete:e,errMsg:s,viewModelData:o,provider:r}},render(){return this.isComplete&&this.provider?A(m(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):Q(h("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[Z("loading"),!this.isComplete]])}})),kn=d("IBizCodeList",C({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},setup(n){const t=P("code-list"),e=D([]),s=(o,i)=>{if(o){const a=o.find(l=>l.value==i);if(a)return a;for(let l=0;l<o.length;l++){const c=s(o[l].children,i);if(c)return c}}};b(()=>n.value,(o,i)=>{if(o!==i)if(k(o)||o==="")e.value=[];else{let a;typeof o=="string"?a=o.split(","):a=[o],e.value=a.map(l=>{const c=s(n.codeListItems,l);return{text:c?.text||l,color:c?.color,textCls:c?.textCls}})}},{immediate:!0});const r=n.codeList.emptyText==="\u672A\u5B9A\u4E49"?"- - -":n.codeList.emptyText;return{items:e,ns:t,emptyText:r}},render(){return h("span",{class:this.ns.b()},[M("vue3-util:"),this.items.length===0?this.emptyText:this.items.map((n,t)=>{var e;return[t!==0?(e=this.codeList)==null?void 0:e.textSeparator:null,h("span",{class:[this.ns.e("item"),n.textCls?n.textCls:null],style:this.ns.cssVarBlock({"item-color":`${n.color}`})},[n.text])]})])}})),Vn=d("ControlLoadingPlaceholder",C({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup(n){return _("ctx").evt.emit("onForecast",n.modelData.name),{}},render(){return null}}));class be extends x{}d("PanelContainerState",be);class Pt extends B{createState(){var t;return new be((t=this.parent)==null?void 0:t.state)}}d("PanelContainerController",Pt);function Ee(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!L(n)}const yt=C({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Pt,required:!0}},setup(n){const t=P("panel-container"),{id:e}=n.modelData,s=S(()=>{let r=[t.b(),t.m(e)];return r=[...r,...n.controller.containerClass,t.is("hidden",!n.controller.state.visible)],r});return{ns:t,classArr:s}},render(){var n,t;let e;const s=((t=(n=this.$slots).default)==null?void 0:t.call(n))||[],r=h(m("iBizRow"),{slot:"content",layout:this.modelData.layout},Ee(e=s.map(o=>{const i=o.props;return!i||!i.controller?o:h(m("iBizCol"),{layoutPos:i.modelData.layoutPos,state:i.controller.state},Ee(o)?o:{default:()=>[o]})}))?e:{default:()=>[e]});return h("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?h("style",{type:"text/css"},[this.controller.model.cssStyle]):null,r])}});class wt{constructor(){this.component="IBizPanelContainer"}async createController(t,e,s){const r=new Pt(t,e,s);return await r.init(),r}}d("PanelContainerProvider",wt);const jn=d("IBizPanelContainer",R(yt,function(n){n.component(yt.name,yt),w("CONTAINER",()=>new wt),w("CONTAINER_DEFAULT",()=>new wt)})),Dt=C({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(n){return _("ctx").evt.on("onRegister",(s,r)=>{s===n.modelData.id&&n.controller.bindControl(r)}),{ns:P("panel-ctrl-pos")}},render(){const{state:n}=this.controller;let t;return this.$slots.default&&(t=this.$slots.default()),h("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!n.visible)]},[t||(ibiz.env.dev?`\u672A\u63D0\u4F9B${this.modelData.id}\u63D2\u69FD`:"")])}});class Ie extends B{bindControl(t){this.control=t,t.evt.onAll((e,s)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:e,triggerEvent:s})})}}d("PanelCtrlPosController",Ie);class Ae{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,s){const r=new Ie(t,e,s);return await r.init(),r}}d("PanelCtrlPosProvider",Ae);const Mn=d("IBizPanelCtrlPos",R(Dt,function(n){n.component(Dt.name,Dt),w("CTRLPOS",()=>new Ae)}));class bt extends B{}d("ScrollContainerItemController",bt);function Se(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!L(n)}const Ne=d("ScrollContainerItem",C({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:bt,required:!0}},setup(n){const t=P("scroll-container-item"),{id:e}=n.modelData,s=S(()=>[t.b(),t.m(e),t.is("hidden",!n.controller.state.visible)]);return{ns:t,classArr:s}},render(){var n,t;let e;const s=((t=(n=this.$slots).default)==null?void 0:t.call(n))||[];return h(m("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},Se(e=s.map(r=>{const o=r.props;return!o||!o.controller?r:(o.modelData.layoutPos.layout="FLEX",h(m("iBizCol"),{layoutPos:o.modelData.layoutPos,state:o.controller.state},Se(r)?r:{default:()=>[r]}))}))?e:{default:()=>[e]})}}));class G{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,s){const r=new bt(t,e,s);return await r.init(),r}}d("ScrollContainerItemProvider",G);class Et extends B{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}d("ScrollContainerController",Et);const It=d("ScrollContainer",C({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:Et,required:!0}},setup(n){const t=P("scroll-container"),{id:e}=n.modelData,s=S(()=>[t.b(),t.m(e),...n.controller.containerClass,t.is("hidden",!n.controller.state.visible)]);return{ns:t,classArr:s}},render(){var n,t;let e=null,s=null,r=null,o=null,i=null;const a={};(((t=(n=this.$slots).default)==null?void 0:t.call(n))||[]).forEach(c=>{const f=c.props;if(!f||!f.controller)return;const{width:p,height:y}=f.controller.state.layout;switch(f.modelData.layoutPos.layoutPos){case"WEST":e=c,a.left={width:p};break;case"EAST":r=c,a.right={width:p};break;case"NORTH":s=c,a.top={height:y};break;case"SOUTH":o=c,a.bottom={height:y};break;case"CENTER":i=c;break;default:ibiz.log.debug(`\u672A\u9002\u914D\u7684\u5E03\u5C40\u5360\u4F4D${f.modelData.layoutPos.layoutPos}`);break}});for(const c in a)(a[c].width||a[c].height)&&(a[c].flexShrink=0);return h("div",{class:this.classArr},[h("div",{class:[this.ns.e("header")],style:a.top},[s]),h("div",{class:[this.ns.b("content")]},[h("div",{class:this.ns.be("content","left"),style:a.left},[e]),h("div",{class:this.ns.be("content","center")},[i]),h("div",{class:this.ns.be("content","right"),style:a.right},[r])]),h("div",{class:[this.ns.e("footer")],style:a.bottom},[o])])}}));class Be{constructor(){this.component="IBizScrollContainer"}async createController(t,e,s){const r=new Et(t,e,s);return await r.init(),r}}d("ScrollContainerProvider",Be);const $n=d("IBizScrollContainer",R(It,function(n){n.component(It.name,It),n.component(Ne.name,Ne),w("CONTAINER_CONTAINER_SCROLL",()=>new Be),w("CONTAINER_CONTAINER_SCROLL_LEFT",()=>new G),w("CONTAINER_CONTAINER_SCROLL_HEADER",()=>new G),w("CONTAINER_CONTAINER_SCROLL_RIGHT",()=>new G),w("CONTAINER_CONTAINER_SCROLL_BOTTOM",()=>new G),w("CONTAINER_CONTAINER_SCROLL_MAIN",()=>new G)}));class Re extends x{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}d("NavPosState",Re);class At extends B{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return this.rawItemParams.expcache==="CACHE"?!0:this.rawItemParams.expcache==="NO_CACHE"?!1:t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(t=this.model.rawItem)!=null&&t.rawItemParams&&this.model.rawItem.rawItemParams.find(s=>s.key==="REFCTRL"&&s.value?(this.refCtrlKeys=s.value.split(";").map(r=>r.toLowerCase()),!0):!1),this.panel.evt.on("onControlEvent",s=>{if((this.refCtrlKeys.length===0||this.refCtrlKeys.includes(s.triggerControlName))&&s.triggerEventName==="onNavViewChange"){const o=s.triggerEvent;this.openView(o.navViewMsg)}});const e=this.rawItemParams.expmode||this.panel.view.params.expmode;e==="ROUTE"&&this.routeDepth?this.state.routeOpen=!0:e==="NO_ROUTE"?this.state.routeOpen=!1:this.state.routeOpen=!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new Re((t=this.parent)==null?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}onRouteChange(t){this.curNavViewMsg&&(this.state.currentKey=this.curNavViewMsg.key,this.state.navViewMsgs[this.curNavViewMsg.key].fullPath=t.fullPath)}setNavViewMsgs(t){this.state.navViewMsgs[t.key]?re(this.state.navViewMsgs[t.key],t):(this.state.navViewMsgs[t.key]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(t.key),this.viewModals[t.key]=new ce({mode:this.routeDepth?ct.ROUTE:ct.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(t.key)}})),this.curNavViewMsg=this.state.navViewMsgs[t.key]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}openView(t){if(!t.key){this.state.currentKey=t.key;return}this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){const e=Object.values(this.state.navViewMsgs).length===0;if(this.setNavViewMsgs(t),e&&this.route.matched.length>this.routeDepth){this.state.currentKey=t.key,this.state.navViewMsgs[this.curNavViewMsg.key].fullPath=this.route.fullPath;return}if(this.state.navViewMsgs[t.key].fullPath&&this.getExpItemIsCache(t))this.router.push(this.state.navViewMsgs[t.key].fullPath);else{const s=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(t.key),ibiz.commands.execute(de.TAG,t.viewId,s,t.params,{openMode:"INDEXVIEWTAB"})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=t.key}handleRawItemParams(){var t;let e={};const s=(t=this.model.rawItem)==null?void 0:t.rawItemParams;V(s)&&(e=s.reduce((r,o)=>(r[o.key.toLowerCase()]=o.value,r),{})),Object.assign(this.rawItemParams,e)}}d("NavPosController",At);function Oe(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!L(n)}const St=C({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:At,required:!0}},setup(n){const t=n.controller,e=P("nav-pos"),s=i=>{t.onViewCreated(i)},r=ut(),o=Y();if(t.setRouter(r),t.routeDepth){const i=ot(o,t.routeDepth);b(()=>o.fullPath,()=>{const a=ot(o,t.routeDepth);i===a&&o.matched.length>t.routeDepth&&t.onRouteChange(o)},{immediate:!0})}return{ns:e,c:t,onViewCreated:s}},render(){const{viewModals:n,state:t}=this.c,{currentKey:e,cacheKeys:s,navViewMsgs:r,cache:o}=t;let i=null;if(t.routeOpen)i=h(m("iBizRouterView"),{manualKey:e,modal:n[e],onCreated:this.onViewCreated},{default:({Component:a})=>{const l=e===""||!a?null:h(a,null,null);return o?h(m("keepAlive"),{include:s,max:30,isKey:!0},Oe(l)?l:{default:()=>[l]}):l}});else{const a=e?A(m("IBizViewShell"),{context:r[e].context,params:r[e].params,key:r[e].key,viewId:r[e].viewId,onCreated:this.onViewCreated}):null;i=o?h(m("keepAlive"),{include:s,max:30,isKey:!0},Oe(a)?a:{default:()=>[a]}):a}return h("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[i])}});class ze{constructor(){this.component="IBizNavPos"}async createController(t,e,s){const r=new At(t,e,s);return await r.init(),r}}d("NavPosProvider",ze);const Gn=d("IBizNavPos",R(St,function(n){n.component(St.name,St),w("RAWITEM_NAV_POS",()=>new ze)}));class Ur extends x{}class Nt extends B{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 Ur((t=this.parent)==null?void 0:t.state)}async onInit(){await super.onInit(),this.state.required=!this.model.allowEmpty,this.model.editor&&this.model.editor.editorType!=="HIDDEN"&&(this.editorProvider=await he(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:s}=this.model;e=e||s,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t)}}d("PanelFieldController",Nt);const Bt=C({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:Nt,required:!0}},setup(n){const t=P("panel-field"),e=S(()=>{const{id:r}=n.modelData,o=[t.b(),t.m(r)];return o.push(...n.controller.containerClass),o});return{ns:t,classArr:e,onValueChange:(r,o)=>{n.controller.setDataValue(r,o)}}},render(){let n=null;if(this.controller.data){const t={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};if(this.$slots.default)n=this.$slots.default(t);else if(this.controller.editorProvider){const e=m(this.controller.editorProvider.formEditor);n=A(e,{...t})}else n=h(m("not-supported-editor"),{modelData:this.modelData.editor},null)}return h("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[n])}});class Fe{constructor(){this.component="IBizPanelField"}async createController(t,e,s){const r=new Nt(t,e,s);return await r.init(),r}}d("PanelFieldProvider",Fe);const Wn=d("IBizPanelField",R(Bt,function(n){n.component(Bt.name,Bt),w("FIELD",()=>new Fe)}));class Rt extends B{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}d("PanelRawItemController",Rt);const Ot=C({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Rt,required:!0}},setup(n){const t=P("panel-rawitem"),e=S(()=>{const{id:s}=n.modelData,r=[t.b(),t.m(s)];return r.push(...n.controller.containerClass),r});return{ns:t,classArr:e}},render(){if(this.controller.state.visible)return h("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[h(m("iBizRawItem"),{rawItem:this.modelData},null)])}});class zt{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,s){const r=new Rt(t,e,s);return await r.init(),r}}d("PanelRawItemProvider",zt);const Un=d("IBizPanelRawItem",R(Ot,function(n){n.component(Ot.name,Ot),w("RAWITEM",()=>new zt),w("RAWITEM_STATIC_IMAGE",()=>new zt)}));class qr extends x{constructor(){super(...arguments),this.data={}}}class Kr{constructor(t,e,s,r){this.model=t,this.panel=e,this.parent=s,this.state=new qr,this.isDataContainer=!0,this.panelItems={},this.state.data=r;const i=tt(this.model).map(a=>a.id);r._evt.on("change",a=>{i.includes(a)&&this.childDataChangeNotify([a])})}get data(){return this.state.data}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,s=this){t&&await Promise.all(t.map(async r=>{var o,i;const a=this.parent.providers[r.id];if(!a)return;const l=await a.createController(r,e,s);this.panelItems[r.id]=l,(o=r.panelItems)!=null&&o.length&&!et(r)?await this.initChildrenController(r.panelItems,e,l):(i=r.panelTabPages)!=null&&i.length&&await this.initChildrenController(r.panelTabPages,e,l)}))}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;(e=(t=this.data).destroy)==null||e.call(t),Object.values(this.panelItems).forEach(s=>{s.destroy()})}}class _e extends x{constructor(){super(...arguments),this.items=[]}}d("MultiDataContainerState",_e);class Ft extends B{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new _e((t=this.parent)==null?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 e=>{var s,r;const o=await dt(e);o&&(this.providers[e.id]=o,(s=e.panelItems)!=null&&s.length&&!et(e)&&await this.initPanelItemProviders(e.panelItems),(r=e.panelTabPages)!=null&&r.length&&await this.initPanelItemProviders(e.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 I(this.model,"\u6CA1\u6709\u914D\u7F6E\u6570\u636E\u5BF9\u8C61\u540D\u79F0");this.bindViewData(this.panel.getTopView(),e);break}case"VIEWSESSIONPARAM":{if(!e)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u6570\u636E\u5BF9\u8C61\u540D\u79F0");this.bindViewData(this.panel.view,e);break}default:throw new lt(this.model,`\u6570\u636E\u6E90\u7C7B\u578B${t}\u6682\u672A\u652F\u6301`)}}childrenStateNotify(t){this.dataItems.forEach(e=>{e.panelStateNotify(t)})}async setData(t){const e=tt(this.model),s=t.map(r=>new ht(e,r));this.dataItems=s.map(r=>new Kr(this.model,this.panel,this,r)),this.dataItems.length&&await Promise.all(this.dataItems.map(r=>r.init())),this.state.items=s,this.childrenStateNotify(pt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");if(!t)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");const s=await ft(e,t,this.panel.context,[],this.panel.params);if(!s)throw new z(`\u5B9E\u4F53\u903B\u8F91${e}\u6CA1\u6709\u8FD4\u56DE\u503C`);this.setData(s)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(`\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709${t}\u5C5E\u6027`)}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A");if(!e)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");const r=await ibiz.hub.getApp(this.panel.context.srfappid).deService.exec(e,t,this.panel.context,[],this.panel.params);r.ok&&r.data&&this.setData(r.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e)){ibiz.log.error(`\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728${e}`);return}const s=()=>{const r=t.state[e];r?this.setData(r):ibiz.log.error(`\u89C6\u56FEstate\u91CC\u6CA1\u6709${e}\u5C5E\u6027`)};s(),t.evt.on("onDataChange",()=>{s()})}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach(t=>{t.destroy()})}}d("MultiDataContainerController",Ft);function Hr(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!L(n)}const _t=C({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ft,required:!0}},setup(n){const t=P("multi-data-container"),{id:e}=n.modelData;b(()=>n.controller.state.items,()=>{n.controller.dataItems.forEach(o=>{o.state=O(o.state),Object.keys(o.panelItems).forEach(a=>{const l=o.panelItems[a];l.state=O(l.state)})})},{immediate:!0});const s=_("renderPanelItem"),r=S(()=>[t.b(),t.m(e),...n.controller.containerClass]);return{ns:t,classArr:r,renderPanelItem:s}},render(){let n;return this.$slots.default?n=this.$slots.default():n=this.controller.state.items.map((t,e)=>{const s=this.controller.dataItems[e];return h(m("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var r;return[(r=this.modelData.panelItems)==null?void 0:r.map(o=>{let i;const a=s.panelItems[o.id];return h(m("iBizCol"),{layoutPos:o.layoutPos,state:a.state},Hr(i=this.renderPanelItem(o,{providers:this.controller.providers,panelItems:s.panelItems}))?i:{default:()=>[i]})})]}})}),h("div",{class:this.classArr},[n])}});class Te{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,s){const r=new Ft(t,e,s);return await r.init(),r}}d("MultiDataContainerProvider",Te);const qn=d("IBizMultiDataContainer",R(_t,function(n){n.component(_t.name,_t),w("CONTAINER_CONTAINER_MULTIDATA",()=>new Te)}));class xe extends x{constructor(){super(...arguments),this.data={}}}d("SingleDataContainerState",xe);class Tt extends B{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new xe((t=this.parent)==null?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,s=this){t&&await Promise.all(t.map(async r=>{var o,i;const a=await dt(r);if(!a)return;this.providers[r.id]=a;const l=await a.createController(r,e,s);this.panelItems[r.id]=l,(o=r.panelItems)!=null&&o.length&&!et(r)&&await this.initPanelItemControllers(r.panelItems,e,l),(i=r.panelTabPages)!=null&&i.length&&await this.initPanelItemControllers(r.panelTabPages,e,l)}))}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 I(this.model,"\u6CA1\u6709\u914D\u7F6E\u6570\u636E\u5BF9\u8C61\u540D\u79F0");this.bindViewData(this.panel.getTopView(),e);break}case"VIEWSESSIONPARAM":{if(!e)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u6570\u636E\u5BF9\u8C61\u540D\u79F0");this.bindViewData(this.panel.view,e);break}default:throw new lt(this.model,`\u6570\u636E\u6E90\u7C7B\u578B${t}\u6682\u672A\u652F\u6301`)}}childrenStateNotify(t){Object.values(this.panelItems).forEach(e=>{e.panelStateNotify(t)})}async setData(t){var e,s;const r=tt(this.model),o=r.map(a=>a.id),i=new ht(r,t);i._evt.on("change",a=>{o.includes(a)&&this.childDataChangeNotify([a])}),(s=(e=this.data).destroy)==null||s.call(e),this.state.data=i,this.childrenStateNotify(pt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");if(!t)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");const s=await ft(e,t,this.panel.context,[],this.panel.params);if(!s)throw new z(`\u5B9E\u4F53\u903B\u8F91${e}\u6CA1\u6709\u8FD4\u56DE\u503C`);this.setData(s)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(`\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709${t}\u5C5E\u6027`)}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A");if(!e)throw new I(this.model,"\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");const r=await ibiz.hub.getApp(this.panel.context.srfappid).deService.exec(e,t,this.panel.context,[],this.panel.params);r.ok&&r.data&&this.setData(r.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e)){ibiz.log.error(`\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728${e}`);return}const s=()=>{const r=t.state[e];r?this.setData(r):ibiz.log.error(`\u89C6\u56FEstate\u91CC\u6CA1\u6709${e}\u5C5E\u6027`)};s(),t.evt.on("onDataChange",()=>{s()})}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(),(e=(t=this.data).destroy)==null||e.call(t),Object.values(this.panelItems).forEach(s=>{s.destroy()})}}d("SingleDataContainerController",Tt);function Xr(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!L(n)}const xt=C({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Tt,required:!0}},setup(n){const t=P("single-data-container"),{id:e}=n.modelData;Object.keys(n.controller.panelItems).forEach(i=>{const a=n.controller.panelItems[i];a.state=O(a.state)});const r=_("renderPanelItem"),o=S(()=>[t.b(),t.m(e),...n.controller.containerClass]);return{ns:t,classArr:o,renderPanelItem:r}},render(){let n;return this.$slots.default?n=this.$slots.default():n=h(m("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[(t=this.modelData.panelItems)==null?void 0:t.map(e=>{let s;const r=this.controller.panelItems[e.id];return h(m("iBizCol"),{layoutPos:e.layoutPos,state:r.state},Xr(s=this.renderPanelItem(e,{providers:this.controller.providers,panelItems:this.controller.panelItems}))?s:{default:()=>[s]})})]}}),h("div",{class:this.classArr},[n])}});class Le{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,s){const r=new Tt(t,e,s);return await r.init(),r}}d("SingleDataContainerProvider",Le);const Kn=d("IBizSingleDataContainer",R(xt,function(n){n.component(xt.name,xt),w("CONTAINER_CONTAINER_SINGLEDATA",()=>new Le)}));class ke extends x{}d("GridContainerState",ke);class Lt extends B{createState(){var t;return new ke((t=this.parent)==null?void 0:t.state)}}d("GridContainerController",Lt);function Ve(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!L(n)}const kt=C({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Lt,required:!0}},setup(n){const t=P("grid-container"),{id:e}=n.modelData,s=S(()=>{let l=[t.b(),t.m(e)];return l=[...l,...n.controller.containerClass,t.is("hidden",!n.controller.state.visible)],l}),r=S(()=>({...n.modelData.layout,layout:"TABLE_12COL"})),o=(l,c)=>{const f={...l,layout:"TABLE_12COL",colXS:l.grow||c,colSM:l.grow||c,colMD:l.grow||c,colLG:l.grow||c};return delete f.grow,f},i=D(void 0),a=D(12);return{ns:t,classArr:s,layoutModel:r,convertLayoutPos:o,adaptGrow:a,adaptCols:i}},render(){var n,t;let e;const s=((t=(n=this.$slots).default)==null?void 0:t.call(n))||[];if(this.adaptCols===void 0){let r=0,o=0;s.forEach(a=>{const l=a.props;l&&l.modelData&&l.modelData.layoutPos&&(typeof l.modelData.layoutPos.grow=="number"?r+=l.modelData.layoutPos.grow:typeof l.modelData.layoutPos.grow>"u"&&(o+=1))});let i=12;o>0&&(i=(12-r)/o),this.adaptCols=o,this.adaptGrow=i}return h(m("iBizRow"),{class:this.classArr,layout:this.layoutModel},Ve(e=s.map(r=>{const o=r.props;return!o||!o.controller?r:h(m("iBizCol"),{layoutPos:this.convertLayoutPos(o.modelData.layoutPos,this.adaptGrow),state:o.controller.state},Ve(r)?r:{default:()=>[r]})}))?e:{default:()=>[e]})}});class je{constructor(){this.component="IBizGridContainer"}async createController(t,e,s){const r=new Lt(t,e,s);return await r.init(),r}}d("GridContainerProvider",je);const Hn=d("IBizGridContainer",R(kt,function(n){n.component(kt.name,kt),w("CONTAINER_CONTAINER_GRID",()=>new je)})),Xn=d("AppRedirectView",C({setup(){var n;const t=te.create(((n=ibiz.appData)==null?void 0:n.context)||{});qt(()=>{t.destroy()});const{href:e}=window.location;async function s(){await pe(t,e)}Kt(()=>ibiz.util.hiddenAppLoading()),s()},render(){return h("div",null,[M("\u91CD\u5B9A\u5411\u8DF3\u8F6C\u4E2D")])}}));class Me{constructor(){this.component="IBizView"}}d("ViewProvider",Me);const Vt=C({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 n=P("view"),t=Ct((...y)=>new mt(...y)),e=fe(t.model),{viewType:s,sysCss:r,codeName:o}=t.model,i=s.toLowerCase(),a=r?.cssName,l=S(()=>[n.b(),n.b(i),n.m(o),a,t.state.viewMessages.TOP?"has-top-message":"",t.state.viewMessages.BOTTOM?"has-bottom-message":""]),c=y=>{t.setLayoutPanel(y)},f=D(null);return Ht(()=>t.onActivated()),Xt(()=>t.onDeactivated()),{c:t,controls:e,viewClassNames:l,container:f,onLayoutPanelCreated:c,renderViewMessage:y=>{if(t.state.isCreated){const T=t.state.viewMessages[y];if(T?.length)return h(m("view-message"),{class:[n.e(`${y.toLowerCase()}-message`)],messages:T},null)}return null}}},render(){var n;let t=null;if(this.c.state.isCreated){const e={...this.$slots};if((n=this.controls)!=null&&n.length&&this.controls.forEach(s=>{const r=s.name||s.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[r]&&Object.assign(o,this.c.slotProps[r]);const i=e[r];if(i){e[r]=()=>i(o);return}const a=this.c.providers[r];a&&(e[r]=()=>{const l=m(a.component);return A(l,{modelData:s,...o,provider:a})})}),this.c.engines.length===0)t=h("span",{style:"color:red;"},[M("\u89C6\u56FE\u7C7B\u578B"),this.modelData.viewType,M("\u6682\u672A\u652F\u6301")]);else{const s=this.c.model.viewLayoutPanel,r=this.c.providers[s.name];t=A(m(r.component),{modelData:s,context:this.c.context,params:this.c.params,provider:r,onControllerAppear:this.onLayoutPanelCreated},e)}}return Q(h("div",{ref:"container",class:this.viewClassNames},[this.renderViewMessage("TOP"),t,this.renderViewMessage("BOTTOM")]),[[Z("loading"),this.c.state.isLoading]])}}),Jn=d("IBizView",R(Vt,function(n){n.component(Vt.name,Vt),K("DEFAULT",()=>new Me)})),Qn=d("TodoRedirect",C({setup(){const n=ut(),{href:t}=window.location,e=t.lastIndexOf("?"),s=decodeURIComponent(t.substring(e+1,t.length));if(!s)throw new Error("\u91CD\u5B9A\u5411\u53C2\u6570\u4E0D\u8DB3\u65E0\u6CD5\u8DF3\u8F6C");const r=$.parse(s,{delimiter:";"}),{apptype:o,todotype:i,todoid:a}=r,l={srfapptype:"pc",srfapp:""};o||(l.todourltype="RouterUrl");async function c(){let p=(await ibiz.net.post(`/systodos/${a}/getlinkurl`,l)).data.linkurl;o?window.location.href=p:(p.indexOf("/")!==0&&(p=`/${p}`),p+=`;srfwf=${i}`,n.push(`/index${p}`))}c()},render(){return h("div",null,[M("\u5F85\u529E\u5217\u8868\u91CD\u5B9A\u5411")])}}));class at{constructor(){this.component="IBizPortalView"}}d("PortalViewProvider",at);const jt=C({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var n;const t=P("view"),e=Ct((...f)=>new mt(...f)),s=((n=e.model.viewLayoutPanel)==null?void 0:n.controls)||e.model.controls,{viewType:r,sysCss:o,codeName:i}=e.model,a=r.toLowerCase(),l=o?.cssName,c=[t.b(),t.b(a),t.m(i),l];return{c:e,ns:t,controls:s,viewClassNames:c}},render(){var n;let t=null;if(this.c.state.isCreated){const e={...this.$slots};(n=this.controls)!=null&&n.length&&this.controls.forEach(s=>{const r=s.name||s.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[r]&&Object.assign(o,this.c.slotProps[r]);const i=e[r];if(i){e[r]=()=>i(o);return}const a=this.c.providers[r];a&&(e[r]=()=>{const l=m(a.component);return A(l,{modelData:s,...o})})}),e.dashboard&&(t=e.dashboard())}return h("div",{class:this.viewClassNames},[t])}}),Zn=d("IBizPortalView",R(jt,function(n){n.component(jt.name,jt),K(E.APP_PORTAL_VIEW,()=>new at),K(E.DE_PORTAL_VIEW,()=>new at),K(E.DE_PORTAL_VIEW9,()=>new at)}));function Jr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function F(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function $e(n,t){for(var e="",s=0,r=-1,o=0,i,a=0;a<=n.length;++a){if(a<n.length)i=n.charCodeAt(a);else{if(i===47)break;i=47}if(i===47){if(!(r===a-1||o===1))if(r!==a-1&&o===2){if(e.length<2||s!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){var l=e.lastIndexOf("/");if(l!==e.length-1){l===-1?(e="",s=0):(e=e.slice(0,l),s=e.length-1-e.lastIndexOf("/")),r=a,o=0;continue}}else if(e.length===2||e.length===1){e="",s=0,r=a,o=0;continue}}t&&(e.length>0?e+="/..":e="..",s=2)}else e.length>0?e+="/"+n.slice(r+1,a):e=n.slice(r+1,a),s=a-r-1;r=a,o=0}else i===46&&o!==-1?++o:o=-1}return e}function Qr(n,t){var e=t.dir||t.root,s=t.base||(t.name||"")+(t.ext||"");return e?e===t.root?e+s:e+n+s:s}var W={resolve:function(){for(var t="",e=!1,s,r=arguments.length-1;r>=-1&&!e;r--){var o;r>=0?o=arguments[r]:(s===void 0&&(s=process.cwd()),o=s),F(o),o.length!==0&&(t=o+"/"+t,e=o.charCodeAt(0)===47)}return t=$e(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(F(t),t.length===0)return".";var e=t.charCodeAt(0)===47,s=t.charCodeAt(t.length-1)===47;return t=$e(t,!e),t.length===0&&!e&&(t="."),t.length>0&&s&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return F(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var s=arguments[e];F(s),s.length>0&&(t===void 0?t=s:t+="/"+s)}return t===void 0?".":W.normalize(t)},relative:function(t,e){if(F(t),F(e),t===e||(t=W.resolve(t),e=W.resolve(e),t===e))return"";for(var s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var r=t.length,o=r-s,i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,l=a-i,c=o<l?o:l,f=-1,p=0;p<=c;++p){if(p===c){if(l>c){if(e.charCodeAt(i+p)===47)return e.slice(i+p+1);if(p===0)return e.slice(i+p)}else o>c&&(t.charCodeAt(s+p)===47?f=p:p===0&&(f=0));break}var y=t.charCodeAt(s+p),T=e.charCodeAt(i+p);if(y!==T)break;y===47&&(f=p)}var J="";for(p=s+f+1;p<=r;++p)(p===r||t.charCodeAt(p)===47)&&(J.length===0?J+="..":J+="/..");return J.length>0?J+e.slice(i+f):(i+=f,e.charCodeAt(i)===47&&++i,e.slice(i))},_makeLong:function(t){return t},dirname:function(t){if(F(t),t.length===0)return".";for(var e=t.charCodeAt(0),s=e===47,r=-1,o=!0,i=t.length-1;i>=1;--i)if(e=t.charCodeAt(i),e===47){if(!o){r=i;break}}else o=!1;return r===-1?s?"/":".":s&&r===1?"//":t.slice(0,r)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');F(t);var s=0,r=-1,o=!0,i;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,l=-1;for(i=t.length-1;i>=0;--i){var c=t.charCodeAt(i);if(c===47){if(!o){s=i+1;break}}else l===-1&&(o=!1,l=i+1),a>=0&&(c===e.charCodeAt(a)?--a===-1&&(r=i):(a=-1,r=l))}return s===r?r=l:r===-1&&(r=t.length),t.slice(s,r)}else{for(i=t.length-1;i>=0;--i)if(t.charCodeAt(i)===47){if(!o){s=i+1;break}}else r===-1&&(o=!1,r=i+1);return r===-1?"":t.slice(s,r)}},extname:function(t){F(t);for(var e=-1,s=0,r=-1,o=!0,i=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(l===47){if(!o){s=a+1;break}continue}r===-1&&(o=!1,r=a+1),l===46?e===-1?e=a:i!==1&&(i=1):e!==-1&&(i=-1)}return e===-1||r===-1||i===0||i===1&&e===r-1&&e===s+1?"":t.slice(e,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return Qr("/",t)},parse:function(t){F(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var s=t.charCodeAt(0),r=s===47,o;r?(e.root="/",o=1):o=0;for(var i=-1,a=0,l=-1,c=!0,f=t.length-1,p=0;f>=o;--f){if(s=t.charCodeAt(f),s===47){if(!c){a=f+1;break}continue}l===-1&&(c=!1,l=f+1),s===46?i===-1?i=f:p!==1&&(p=1):i!==-1&&(p=-1)}return i===-1||l===-1||p===0||p===1&&i===l-1&&i===a+1?l!==-1&&(a===0&&r?e.base=e.name=t.slice(1,l):e.base=e.name=t.slice(a,l)):(a===0&&r?(e.name=t.slice(1,i),e.base=t.slice(1,l)):(e.name=t.slice(a,i),e.base=t.slice(a,l)),e.ext=t.slice(i,l)),a>0?e.dir=t.slice(0,a-1):r&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};W.posix=W;var j=W,Zr=Jr(j);class Yr{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.devPackages=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map}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)})}setDevPlugin(t,e){this.devPackages.set(t,e)}async loadPlugin(t){if(t.runtimeObject===!0){const e=t;if(e)try{await this.loadPluginRef(e.rtobjectName,e.rtobjectRepo)}catch{throw new I(e,"\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25")}}return!1}async loadPluginRef(t,e){if(this.pluginCache.has(t))return!0;let s=null;const r=this.devPackages.get(t);if(r)s=await r();else{const i=e,a=this.urlReg.test(i)?`${i}/package.json`:`${ibiz.env.pluginBaseUrl}/${j.join(i,"package.json")}`,l=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:a});if(l.status!==200)throw new Error("\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25");s=l.data}const o=new me(t,e,s);if(o)try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(i){ibiz.log.error(i)}return!1}async loadScript(t){const e=t.repo,{name:s,version:r,system:o,module:i,styles:a}=t.config;let l="";if(this.devPackages.has(s)?l=j.join(`${s}@${r}`,i):ibiz.env.dev?l=this.urlReg.test(e)?`${e}/${j.join(i)}`:`${ibiz.env.pluginBaseUrl}/${e}/${j.join(i)}`:l=j.join(e,o),l){if(this.cache.has(l))return;let c=null;const f=this.parseUrl(l),p=(typeof a=="string"?[a]:a).map(y=>this.parseUrl(Zr.join(e,y)));if(this.devPackages.has(s)){const T=await this.devPackages.get(s)();this.setPluginCode(T.default),this.cache.set(l,!0)}else ibiz.env.dev?c=await mr.import(l):(System.addImportMap({imports:{[s]:f},styles:{[s]:p}}),c=await System.import(s));if(c){if(c.default)this.setPluginCode(c.default);else throw new z("\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u8FDC\u7A0B\u63D2\u4EF6\u672A\u627E\u5230[default]\u9ED8\u8BA4\u5BFC\u51FA");this.cache.set(l,!0)}else throw new z("\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u672A\u627E\u5230\u6587\u4EF6\u6216\u6587\u4EF6\u5185\u5BB9\u683C\u5F0F\u4E0D\u6B63\u786E")}}parseUrl(t){if(this.urlReg.test(t))return t;let e="";this.urlReg.test(ibiz.env.pluginBaseUrl)?t.startsWith("/")?e=ibiz.env.pluginBaseUrl+t:e=`${ibiz.env.pluginBaseUrl}/${t}`:e=`${j.join(ibiz.env.pluginBaseUrl,t)}`;const{origin:s,pathname:r}=window.location;return r.endsWith("/")&&e.startsWith("/")&&(e=e.substring(1)),e=`${s}${r}${e}`,e}}d("PluginFactory",Yr);class Mt{constructor(t,e,s){this.required=!0,e&&(this.default=e),s&&(this.validator=s),this.type=t}}d("RequiredProp",Mt);function g(){return{value:String,controller:new Mt(Object),data:new Mt(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1}}}function tn(){return{change:(n,t)=>!0,blur:()=>!0,focus:()=>!0}}function en(){return{change:(n,t)=>!0,rowSave:()=>!0}}function v(){return{hasError:{type:Boolean}}}function Ge(){return{...g(),value:[String,Number]}}function rn(){return{...Ge(),...v()}}function We(){return{...g(),value:Number}}function nn(){return{...We(),...v()}}function Ue(){return{...g(),value:String}}function sn(){return{...Ue(),...v()}}function qe(){return{...g(),value:[String,Number,Object,Array]}}function on(){return{...qe(),...v()}}function Ke(){return{...g(),value:[String,Number]}}function an(){return{...Ke(),...v()}}function He(){return{...g(),value:[String,Number]}}function ln(){return{...He(),...v()}}function Xe(){return{...g(),value:[String,Number]}}function un(){return{...Xe(),...v()}}function Je(){return{...g(),value:[String,Array,Object,Number]}}function cn(){return{...Je(),...v()}}function Qe(){return{...g(),value:[String,Number]}}function dn(){return{...Qe(),...v()}}function Ze(){return{...g(),value:[String,Number]}}function hn(){return{...Ze(),...v()}}function Ye(){return{...g(),value:[String,Number]}}function pn(){return{...Ye(),...v()}}function tr(){return{...g(),value:[String,Number]}}function fn(){return{...tr(),...v()}}function er(){return{...g(),value:[String,Number]}}function mn(){return{...er(),...v()}}function rr(){return{...g(),value:[String,Number]}}function gn(){return{...rr(),...v()}}function nr(){return{...g(),value:[String,Number,Array]}}function vn(){return{...nr(),...v()}}function sr(){return{...g(),value:[String,Number]}}function Cn(){return{...sr(),...v()}}function or(){return{...g(),value:[String,Number]}}function Pn(){return{...or(),...v()}}function ir(){return{...g(),value:[String,Number]}}function yn(){return{...ir(),...v()}}function ar(){return{...g(),value:String}}function wn(){return{...ar(),...v()}}function lr(){return{...g(),value:[String,Number]}}function Dn(){return{...lr(),...v()}}function ur(){return{...g(),value:String,language:{type:String},theme:{type:String}}}function bn(){return{...ur(),...v()}}function cr(){return{...g(),value:String}}function En(){return{...cr(),...v()}}function dr(){return{...g(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function In(){return{...dr(),...v()}}function hr(){return{...g(),value:[Array,Array]}}function An(){return{...hr(),...v()}}function pr(){return{...g(),value:String}}function Sn(){return{...pr(),...v()}}function fr(){return{...g(),value:String}}function Nn(){return{...fr(),...v()}}}}});
|
|
2
2
|
//# sourceMappingURL=index.system.min.js.map
|