@ibiz-template/vue3-util 0.7.24-alpha.1 → 0.7.25-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/common/code-list/code-list.d.ts +23 -1
- package/es/common/code-list/code-list.d.ts.map +1 -1
- package/es/common/code-list/code-list.mjs +37 -1
- package/es/locale/en/index.d.ts +1 -0
- package/es/locale/en/index.d.ts.map +1 -1
- package/es/locale/en/index.mjs +6 -5
- package/es/locale/zh-CN/index.d.ts +1 -0
- package/es/locale/zh-CN/index.d.ts.map +1 -1
- package/es/locale/zh-CN/index.mjs +1 -0
- package/es/panel-component/multi-data-container/multi-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +33 -2
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +4 -2
- package/es/panel-component/nav-pos/nav-pos.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.state.d.ts +7 -0
- package/es/panel-component/nav-pos/nav-pos.state.d.ts.map +1 -1
- package/es/panel-component/nav-pos/nav-pos.state.mjs +7 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts.map +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +33 -2
- package/lib/common/code-list/code-list.cjs +37 -1
- package/lib/locale/en/index.cjs +6 -5
- package/lib/locale/zh-CN/index.cjs +1 -0
- package/lib/panel-component/multi-data-container/multi-data-container.controller.cjs +32 -1
- package/lib/panel-component/nav-pos/nav-pos.controller.cjs +4 -2
- package/lib/panel-component/nav-pos/nav-pos.state.cjs +7 -0
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +32 -1
- package/package.json +5 -5
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-
|
|
1
|
+
.ibiz-badge{display:inline-block;width:var(--ibiz-width-icon-large);height:var(--ibiz-width-icon-large);line-height:var(--ibiz-width-icon-large);color:var(--ibiz-color-danger-text);background-color:var(--ibiz-badge-bg-color);border-radius:var(--ibiz-border-radius-circle)}.ibiz-badge--danger{--ibiz-badge-bg-color:var(--ibiz-color-danger)}.ibiz-badge--success{--ibiz-badge-bg-color:var(--ibiz-color-success)}.ibiz-badge--warning{--ibiz-badge-bg-color:var(--ibiz-color-warning)}.ibiz-badge--info{--ibiz-badge-bg-color:var(--ibiz-color-info)}.ibiz-badge--primary{--ibiz-badge-bg-color:var(--ibiz-color-primary)}.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-code-list{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap}.ibiz-code-list__item{color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-panel-container{width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-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%;position:relative}.ibiz-panel-field__error{left:0;top:100%;line-height:1;font-size:var(--ibiz-font-size-small);padding-top:var(--ibiz-spacing-super-tight);position:absolute;color:var(--ibiz-color-danger)}.ibiz-panel-field.is-error .el-input__wrapper{box-shadow:0 0 0 1px var(--ibiz-color-danger) inset}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-nav-pos{width:100%;height:100%}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-single-data-container{width:100%;height:100%}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-panel-container-tabs{position:relative}.ibiz-panel-container-tabs .el-tabs{--el-tabs-header-height: 52px}.ibiz-panel-container-tabs .el-tabs__nav-wrap::after{display:none}.ibiz-panel-container-tabs::after{position:absolute;bottom:0;left:0;z-index:var(--el-index-normal);width:100%;height:"--ibiz-spacing-super-tight";content:"";background-color:var(--el-border-color-light)}.ibiz-teleport-placeholder{width:auto;height:auto}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["qx-util","vue","@ibiz-template/core","ramda","vue-router","qs","@ibiz-template/runtime","pinia"],(function(t){"use strict";var e,n,o,a,i,r,s,l,c,u,d,p,h,m,f,v,g,y,w,C,b,I,P,D,E,N,O,A,S,z,T,x,R,B,V,j,L,M,k,U,_,F,G,W,q,$,K,H,X,Q,J,Y,Z,tt,et,nt,ot,at,it,rt,st,lt,ct,ut,dt,pt,ht,mt,ft,vt,gt,yt,wt,Ct,bt,It,Pt,Dt,Et,Nt,Ot,At,St,zt,Tt;return{setters:[function(t){e=t.SyncSeriesHook,n=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,i=t.clearAll,r=t.createUUID},function(t){s=t.watch,l=t.onBeforeUnmount,c=t.createCommentVNode,u=t.getCurrentInstance,d=t.isReactive,p=t.toRaw,h=t.inject,m=t.reactive,f=t.onActivated,v=t.onDeactivated,g=t.ref,y=t.h,w=t.resolveComponent,C=t.provide,b=t.onMounted,I=t.onUnmounted,P=t.defineComponent,D=t.computed,E=t.createVNode,N=t.withDirectives,O=t.resolveDirective,A=t.isVNode,S=t.Teleport,z=t.renderSlot},function(t){T=t.onClickOutside,x=t.NOOP,R=t.listenJSEvent,B=t.Namespace,V=t.RuntimeError,j=t.isBase64Image,L=t.isSvg,M=t.IBizContext,k=t.ModelError,U=t.RuntimeModelError},function(t){_=t.isNil,F=t.isNotNil,G=t.isEmpty,W=t.mergeLeft},function(t){q=t.useRoute,$=t.useRouter,K=t.RouterView},function(t){H=t.default},function(t){X=t.ViewType,Q=t.RouteConst,J=t.getMatchResPath,Y=t.calcDeCodeNameById,Z=t.ViewController,tt=t.getControlProvider,et=t.getErrorViewProvider,nt=t.calcDynaSysParams,ot=t.getViewProvider,at=t.PanelItemState,it=t.PanelItemController,rt=t.registerPanelItemProvider,st=t.Modal,lt=t.ViewMode,ct=t.OpenAppViewCommand,ut=t.getEditorProvider,dt=t.PanelItemEventName,pt=t.getAllPanelField,ht=t.isDataContainer,mt=t.getPanelItemProvider,ft=t.PanelData,vt=t.PanelNotifyState,gt=t.execDELogicById,yt=t.ScriptFactory,wt=t.toLocalOpenWFRedirectView,Ct=t.getControlsByView,bt=t.getCtrlTeleportParams,It=t.AppDataUploadViewController,Pt=t.registerViewProvider,Dt=t.getDERedirectToView,Et=t.ViewLayoutPanelController,Nt=t.registerControlProvider,Ot=t.ControlType,At=t.PanelController,St=t.RemotePluginItem},function(t){zt=t.defineStore,Tt=t.createPinia}],execute:function(){t({calcResRoutePath:Kt,createOverlayView:Yt,generateRoutePath:async function(t,e,n,o){const a=Ft(e);let i=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(i=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(i-1,a.pathNodes.length-i+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}qt(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:Wt(n),params:o}),2===i&&(await Kt(a,n,t.appDataEntityId,t.appId),$t.includes(t.viewType))){const e=Y(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:Gt(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=Ft(e),i=a.pathNodes.findIndex((t=>t.viewName===Q.ROUTE_MODAL_TAG));-1!==i&&(a.pathNodes=a.pathNodes.slice(0,i));if(n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return qt(n,a.pathNodes),a.pathNodes.push({viewName:"".concat(Q.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:Wt(n),params:o}),{path:Gt(a)}},getArrayProps:ro,getAutoCompleteProps:no,getCascaderProps:so,getCheckboxListProps:Fn,getCheckboxProps:Gn,getCodeProps:oo,getColorPickerProps:lo,getDataPickerProps:Wn,getDatePickerProps:qn,getDateRangeProps:$n,getDrawerPlacement:function(t){return Zt[t]||"right"},getDropdownProps:_n,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:Vn,getGridArrayProps:function(){return{...ro(),...jn()}},getGridAutoCompleteProps:function(){return{...no(),...jn()}},getGridCascaderProps:function(){return{...so(),...jn()}},getGridCheckboxListProps:function(){return{...Fn(),...jn()}},getGridCheckboxProps:function(){return{...Gn(),...jn()}},getGridCodeProps:function(){return{...oo(),...jn()}},getGridColorPickerProps:function(){return{...lo(),...jn()}},getGridDataPickerProps:function(){return{...Wn(),...jn()}},getGridDatePickerProps:function(){return{...qn(),...jn()}},getGridDateRangeProps:function(){return{...$n(),...jn()}},getGridDropdownProps:function(){return{..._n(),...jn()}},getGridEditorCommonProps:jn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...ao(),...jn()}},getGridInputIpProps:function(){return{...kn(),...jn()}},getGridInputNumberProps:function(){return{...Mn(),...jn()}},getGridInputProps:function(){return{...Ln(),...jn()}},getGridListBoxProps:function(){return{...Kn(),...jn()}},getGridMarkDownProps:function(){return{...io(),...jn()}},getGridNumberRangeProps:function(){return{...Hn(),...jn()}},getGridRadioProps:function(){return{...Xn(),...jn()}},getGridRateProps:function(){return{...Qn(),...jn()}},getGridRawProps:function(){return{...Jn(),...jn()}},getGridSliderProps:function(){return{...Yn(),...jn()}},getGridSpanProps:function(){return{...Un(),...jn()}},getGridStepperProps:function(){return{...Zn(),...jn()}},getGridSwitchProps:function(){return{...to(),...jn()}},getGridUploadProps:function(){return{...eo(),...jn()}},getHtmlProps:ao,getInputIpProps:kn,getInputNumberProps:Mn,getInputProps:Ln,getListBoxProps:Kn,getMarkDownProps:io,getNestedRoutePath:Ht,getNumberRangeProps:Hn,getOrigin:Vt,getOwnRouteContext:Wt,getRadioProps:Xn,getRateProps:Qn,getRawProps:Jn,getSliderProps:Yn,getSpanProps:Un,getStepperProps:Zn,getSwitchProps:to,getUploadProps:eo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===Lt;return 1===t.length&&t[0]===Lt},onRouteChange:function(t,e){const n=q();if(!n)throw new V(ibiz.i18n.t("vue3Util.util.routeCorrectly"));s((()=>null==n?void 0:n.path),(()=>{const o=Ht(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Yt(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Yt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Yt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Yt(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var a;const i=Ft(t,n);let r=i.pathNodes[e-1].viewName;if(!r)throw new V(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));r===Q.ROUTE_MODAL_TAG&&(r=i.pathNodes[e].viewName);"index"===r&&(r=ibiz.hub.defaultAppIndexViewName);const s=await ibiz.hub.config.view.get(r);if(!s)throw new V(ibiz.i18n.t("vue3Util.util.noFoundView",{viewCodeName:r}));const l={};(null==(a=ibiz.appData)?void 0:a.context)&&Object.assign(l,ibiz.appData.context);i.appContext&&Object.assign(l,i.appContext);if(1!==e)for(let t=0;t<e;t++){const e=i.pathNodes[t];o(e.context)&&Object.assign(l,e.context)}const{params:c,srfnav:u}=i.pathNodes[e-1];return{viewConfig:s,context:l,params:c,srfnav:u}},prepareControl:function(t){const e=_t("control"),{controlType:n,sysCss:o,codeName:a}=t.model,i=n.toLowerCase(),r=null==o?void 0:o.cssName,s=_t("control-".concat(i)),l=[e.b(),e.b(i),e.m(a)];r&&l.push(r);return{controlClass:l,ns:s}},renderString:function(t){if(_(t))return"";if("string"==typeof t)return t;if("object"==typeof t)return JSON.stringify(t);try{return t.toString()}catch(e){ibiz.log.error(t,ibiz.i18n.t("vue3Util.util.convertString"),e)}return""},route2routePath:Ft,routePath2string:Gt,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:Rt,useCodeListListen:function(t,e,n){let o;b((async()=>{if(t){const a=await ibiz.hub.getApp(e);o=await a.codeList.getCodeListInstance(t),o&&o.onChange(n)}})),I((()=>{o&&o.offChange(n)}))},useControlController:kt,useController:function(t){t.force=jt()},useCtx:Mt,useEventListener:Ut,useFocusAndBlur:function(t,e){const n=g(),o=g(!1);let a;const i=()=>{o.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),a.stop(),o.value=!1};return Ut(n,"click",(e=>{o.value||(a=Rt(n,(()=>{i()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:i,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:jt,useForceTogether:function(t,e){const n=e.force,o=jt();e.force=t=>{n(t),o()}},useLocalCacheKey:function(t,e,n,o="@"){const a=$();return()=>{if(!a)return;const i=t.srfuserid,r=Ft(a.currentRoute.value);if(n=t.srfdefaulttoroutedepth||n,i&&n&&r.pathNodes[n-2]){r.pathNodes=r.pathNodes.slice(0,n-1),r.pathNodes.forEach((t=>{t.context&&delete t.context.srfpaginationviewid}));const t=Gt(r);return"".concat(e).concat(o).concat(i).concat(o).concat(t)}}},useMobCtx:function(){return h("ctx")},useNamespace:_t,useProps:Bt,usePropsWatch:function(t,e,n){const o=Bt();Object.prototype.hasOwnProperty.call(o,t)&&(s((()=>o[t]),((t,n)=>{e(Vt(t),Vt(n))}),n),e(Vt(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=g(""));n.value=t.value;const o=new Xt(e);return s(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=q(),{query:e}=t;return e},useViewController:ee});class xt{}function Rt(t,e,n={}){let o=x,a=x,i=x;const r=()=>{o(),o=x,a=x,i=x};return s(t,((t,s)=>{if(t!==s)if(_(t))r();else{const r=T((null==t?void 0:t.$el)||t,e,n);o=r.stop,a=r.pause,i=r.proceed}}),{immediate:!0}),l((()=>{o!==x&&r()})),{stop:()=>o(),pause:()=>a(),proceed:()=>i()}}function Bt(){return u().proxy.$props}function Vt(t){return d(t)?p(t):t}function jt(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&n(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",xt),xt.createApp=new e,xt.useComponent=new e;const Lt=t("EmptyVNode",c("EmptyVNode"));function Mt(){return h("ctx")}function kt(t,e){const n=Mt(),o=Bt();n.evt.emit("onForecast",o.modelData.name);const a=o.provider;let i;i=(null==a?void 0:a.createController)?a.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),function(t,e){s((()=>({context:t.context,params:t.params})),((t,n)=>{if(t===n)return;const o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)}))}(o,i),function(t,e,n=[]){const o=["context","params","modelData",...n];s((()=>{const e={};return Object.keys(t).forEach((n=>{o.includes(n)||(e[n]=t[n])})),e}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,i,null==e?void 0:e.excludePropsKeys),i.state=m(i.state),f((()=>i.onActivated())),v((()=>i.onDeactivated())),i.force=jt();const r=u().proxy;return i.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),r.$emit("controllerAppear",i),i.created(),l((()=>i.destroyed())),i}function Ut(t,e,n,o={}){let a=x;return s(t,((t,i)=>{t!==i&&(_(t)?(a(),a=x):a=R((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),l((()=>{a!==x&&a()})),()=>{a()}}function _t(t){return new B(t,ibiz.env.namespace)}function Ft(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(Q.ROUTE_MODAL_TAG),"g"),""));const a=o.split("/"),i=[];for(let e=1;e<=n;e++){const n=a[2*e],o=t.params["params".concat(e)];let r,s,l;r=o&&o!==ibiz.env.routePlaceholder?H.parse(o,{strictNullHandling:!0,delimiter:";"}):void 0,r&&(1===e?(s=r,r=void 0):(r.srfnavctx&&(s=JSON.parse(decodeURIComponent(r.srfnavctx)),delete r.srfnavctx),r.srfnav&&(l=r.srfnav,delete r.srfnav))),i.push({viewName:n,context:s,params:r,srfnav:l})}let r;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(r=H.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:r,pathNodes:i}}function Gt(t){let e="";return t.appContext?e+="/".concat(H.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let a={};if(0===n)o(t.context)&&(a=t.context);else{if(a=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(a.srfnavctx=encodeURIComponent(e))}t.srfnav&&(a.srfnav=t.srfnav)}const i=H.stringify(a,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(i)?e+=i:e+=ibiz.env.routePlaceholder})),e}function Wt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}function qt(t,e){let n=-1;e&&e.length>0&&(n=e.findIndex((t=>{var e;return!0===(null==(e=t.context)?void 0:e.srfreadonly)}))),t.srfreadonly&&!t.getOwnContext().srfreadonly&&-1===n&&(t.srfreadonly=!0)}const $t=t("excludeViewTypes",[X.DE_GRID_VIEW,X.DE_GRID_EXP_VIEW,X.DE_LIST_VIEW,X.DE_LIST_EXP_VIEW,X.DE_DATA_VIEW,X.DE_DATAVIEW_EXP_VIEW,X.DE_CALENDAR_VIEW,X.DE_CALENDAR_EXP_VIEW,X.DE_CHART_VIEW,X.DE_CHART_EXP_VIEW,X.DE_KANBAN_VIEW]);async function Kt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let i=J(e,a);if(i||(i={path:"",keys:[a.codeName.toLowerCase()]}),i){const n=t.pathNodes[1].context,o={};i.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Ht(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Ft(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const a=o.pathNodes[e-1];return n&&delete a.srfnav,a.context&&delete a.context.srfpaginationviewid,Gt(o)}class Xt{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),s((()=>t.path),((t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}}))}nextChange(t){t&&(this.timers.push(setTimeout((()=>{t();const e=this.callbacks.findIndex((e=>e===t));this.callbacks.splice(e,1)}),this.wait)),this.callbacks.push(t))}}t("RouteListener",Xt);const Qt=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Jt{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new V(ibiz.i18n.t("vue3Util.util.noInjected"))}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Jt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>y(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise((t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)}))}}t("OverlayContainer",Jt);function Yt(t){return e=>{const n=w("IBizViewShell");return y(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Jt{present(t){return this.modal.present(t)}});const Zt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class te{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const a=e;if(this.map.has(a)){return this.map.get(a).onWillDismiss()}const i=new te(o,a);return this.map.set(a,i),this.scheduledDestruction(i),i.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(window.clearTimeout(n.timeout),n.timeout=void 0,n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout((()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)}),6e5)}}),t("useAppStore",zt("appStore",(()=>({appStore:m({})}))));t("useUIStore",zt("uiStore",(()=>{const t=function(){const t=g(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:m({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",Tt());function ee(t){const e=Bt(),n=h("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let a;a=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(a.id,a),function(t,e){s((()=>({context:t.context,params:t.params})),(t=>{e.context.reset({},t.context),i(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)}))}(e,a),function(t,e){s((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,a),C("ctx",a.ctx),a.state=m(a.state),a.slotProps=m(a.slotProps),e.modal&&(a.modal=e.modal),f((()=>{a.onActivated(),ibiz.util.viewStack.active(a.id)})),v((()=>{a.onDeactivated(),ibiz.util.viewStack.deactivate(a.id)})),a.force=jt();const r=u().proxy;return a.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),a.created(),l((()=>{a.destroyed(),ibiz.util.viewStack.remove(a.id)})),a}t("IBizIcon",P({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=_t("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=D((()=>function(t){if(t){if(t.htmlStr)return E("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?E("i",{class:[e.b(),t.cssClass]},null):E("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return j(t.imagePath)?E("img",{class:e.b(),src:t.imagePath},null):L(t.imagePath)?E("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return L(t.rawContent)?E("div",{class:e.b(),innerHTML:t.rawContent},null):E("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",P({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;s((()=>t.manualKey),((t,e)=>{F(t)&&t!==e&&(o=!0)}));return{renderComp:(a,i)=>{if(!o)return n.vNode;if(o=!1,a){const o={...a.props};delete o.onVnodeUnmounted,delete o.ref;const i=y(a.type,{...o,...e,key:t.manualKey});return n.vNode=i,i}}}},render(){return E(w("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",P({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=_t("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,i=n.toLowerCase(),r=null==o?void 0:o.cssName,s=t.controller.model,l=t.controller.model.controls,c=m({});return!1===s.controlType.endsWith("EXPBAR")&&(_(s.width)||(s.width>0&&s.width<=1?c.width="".concat(100*s.width,"%"):c.width="".concat(s.width,"px")),_(s.height)||(s.height>0&&s.height<=1?c.width="".concat(100*s.height,"%"):c.height="".concat(s.height,"px"))),{ns:e,typeClass:i,sysCssName:r,inlineStyle:c,codeName:a,controls:l,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:i}=this.controller;let r=null;if(o.isCreated&&a){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},a=e[n];e[n]=a?()=>a(o):()=>{const e=w("IBizControlShell");return y(e,{modelData:t,...o})}}));const n=i[a.name];r=y(w(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return E("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[r||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",P({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=h("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:X.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new Z(t,M.create({})).ctx)}const n=g(!1),o=g(""),a=g();tt(t.modelData).then((t=>{t?a.value=t:o.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0})).catch((t=>{ibiz.log.error(t),o.value=t.message,n.value=!0}));return{ns:_t("control-shell"),isComplete:n,errMsg:o,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):N(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[O("loading"),!this.isComplete]])}})),t("IBizViewShell",P({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=_t("view-shell"),n=g(!1),o=g(""),a=g(),i=g(),s=g(!0);return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new V(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));if(s.value=await(async e=>{let n=!0;const{accUserMode:o,accessKey:a}=e,i=ibiz.auth.getAuthInfo();if(void 0!==o)switch(o){case 1:i&&(n=!1);break;case 2:i||(n=!1);break;case 4:a&&((await ibiz.hub.getApp(t.context.srfappid)).authority.calcByResCode(a)||(n=!1))}return n})(e),s.value){if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new V(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic",{codeName:e.codeName}));const o=t.params||{},a=await nt(n,t.context,{viewParams:o,appId:e.appId});if(o.srfdatatype&&(a.srfdatatype=o.srfdatatype),o.srfwftag)a.srfwftag=o.srfwftag;else if(n&&e.enableWF){const o={...t.context};if(a.srfkey){const i=_(t.context.srfsessionid)||G(t.context.srfsessionid),s=r();if(i){const t=ibiz.uiDomainManager.create(s);o.srfsessionid=t.id}const l=ibiz.hub.getApp(e.appId),c=await l.deService.getService(t.context,n),u=await c.get(o,t.params||{});if(u.ok&&u.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:i}=u.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;_(e.processDefinitionKey)&&(e.processDefinitionKey=o),_(e.taskDefinitionKey)&&(e.taskDefinitionKey=i)}}i&&ibiz.uiDomainManager.destroy(s)}}i.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else i.value=e;try{a.value=await ot(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:i,hasAuthority:s,provider:a}},render(){if(this.isComplete&&this.provider&&this.hasAuthority)return y(w(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots);if(!this.hasAuthority){const t=et("403");if(t)return"string"==typeof t.component?y(w(t.component)):y(t.component)}return N(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[O("loading"),!this.isComplete]])}})),t("IBizCodeList",P({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const a=_t("code-list"),i=g([]),r=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",l=(null==(o=t.codeList)?void 0:o.valueSeparator)||",";s(i,(t=>{let n="";t.length>0&&(n=t.map((t=>t.text)).join(r)),e("infoTextChange",n)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};s([()=>t.codeListItems,()=>t.value],(([t,e],[n,o])=>{if(_(e)||""===e)i.value=[];else{const n="string"==typeof e?e.split(l):[e];i.value=n.map((e=>{const n=c(t,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u=t.codeList.emptyText===ibiz.i18n.t("vue3Util.common.undefined")?"- - -":t.codeList.emptyText;return{items:i,ns:a,emptyText:u,textSeparator:r}},render(){return E("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,E("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&E(w("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",P({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(h("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",P({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},counterMode:{type:Number}},setup:()=>({ns:_t("badge")}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return E("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class ne extends at{}t("PanelContainerState",ne);class oe extends it{createState(){var t;return new ne(null==(t=this.parent)?void 0:t.state)}}function ae(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerController",oe);const ie=P({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup(t){const e=_t("panel-container"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},ae(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ae(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class re{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Qt(ie,(function(t){t.component(ie.name,ie),rt("CONTAINER",(()=>new re)),rt("CONTAINER_DEFAULT",(()=>new re))})));const se=P({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){h("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:_t("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class le extends it{bindControl(t){this.control=t,t.evt.onAll(((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})}))}}t("PanelCtrlPosController",le);class ce{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new le(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Qt(se,(function(t){t.component(se.name,se),rt("CTRLPOS",(()=>new ce))})));class ue extends it{}function de(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("ScrollContainerItemController",ue);const pe=t("ScrollContainerItem",P({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ue,required:!0}},setup(t){const e=_t("scroll-container-item"),{id:n}=t.modelData,o=D((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return E(w("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},de(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},de(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class he{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}class me extends it{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",me);const fe=t("ScrollContainer",P({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:me,required:!0}},setup(t){const e=_t("scroll-container"),{id:n}=t.modelData,o=D((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,a=null,i=null,r=null;const s={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach((t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,s.left={width:l};break;case"EAST":a=t,s.right={width:l};break;case"NORTH":o=t,s.top={height:c};break;case"SOUTH":i=t,s.bottom={height:c};break;case"CENTER":r=t;break;default:ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.unadaptedLayout",{layoutPos:e.modelData.layoutPos.layoutPos}))}}));for(const t in s)(s[t].width||s[t].height)&&(s[t].flexShrink=0);return E("div",{class:this.classArr},[E("div",{class:[this.ns.e("header")],style:s.top},[o]),E("div",{class:[this.ns.b("content")]},[E("div",{class:this.ns.be("content","left"),style:s.left},[n]),E("div",{class:this.ns.be("content","center")},[r]),E("div",{class:this.ns.be("content","right"),style:s.right},[a])]),E("div",{class:[this.ns.e("footer")],style:s.bottom},[i])])}}));class ve{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new me(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Qt(fe,(function(t){t.component(fe.name,fe),t.component(pe.name,pe),rt("CONTAINER_CONTAINER_SCROLL",(()=>new ve)),rt("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new he)),rt("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new he)),rt("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new he)),rt("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new he)),rt("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new he))})));class ge extends at{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",ge);const ye=["is404","isRoutePushed"];class we extends it{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={},this.ignoreEmbedKey=!1}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find((t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map((t=>t.toLowerCase())),!0))),this.panel.evt.on("onControlEvent",(t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}}));const e=this.rawItemParams.expmode||this.panel.view.params.expmode,n=this.rawItemParams.ignoreembedkey||this.panel.view.params.ignoreembedkey||"";this.ignoreEmbedKey=Object.is(n.toLowerCase(),"true"),"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new ge(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(W(this.state.navViewMsgs[e],t),ye.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new st({mode:this.routeDepth?lt.ROUTE:lt.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Ht(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){var e,n,o;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Ht(this.route,this.routeDepth,!1);(null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404"))}else if(a===this.state.currentKey&&this.state.navViewMsgs[a].fullPath)(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else if(this.state.navViewMsgs[a].fullPath&&this.getExpItemIsCache(t))(null==(o=t.modalOptions)?void 0:o.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),ibiz.commands.execute(ct.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",replace:!this.state.currentKey,...t.modalOptions})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function Ce(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("NavPosController",we);const be=P({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:we,required:!0}},setup(t){const e=t.controller,n=_t("nav-pos"),o=$(),a=q(),i=g(!1);if(e.setRouter(o),e.routeDepth){const t=Ht(a,e.routeDepth);s((()=>a.fullPath),(()=>{const n=Ht(a,e.routeDepth);if(t===n&&a.matched.length>e.routeDepth){if(a.matched.length===e.routeDepth+1&&(i.value=!!a.name,i.value))return;e.onRouteChange(a)}}),{immediate:!0})}return{ns:n,c:e,isPresetView:i,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:i}=e;let r=null;if(e.routeOpen){if(this.isPresetView)return E(K,null,null);r=E(w("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?E(t,null,null):null;return i?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ce(e)?e:{default:()=>[e]}):e}})}else{const t=n?y(w("IBizViewShell"),{context:a[n].context,params:a[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=i?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ce(t)?t:{default:()=>[t]}):t}return E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class Ie{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new we(t,e,n);return await o.init(),o}}t("IBizNavPos",Qt(be,(function(t){t.component(be.name,be),rt("RAWITEM_NAV_POS",(()=>new Ie))})));class Pe extends at{constructor(){super(...arguments),this.error=null}}class De extends it{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 Pe(null==(t=this.parent)?void 0:t.state)}async validate(){var t;return!this.state.visible||this.model.allowEmpty||this.value?(this.state.error=null,!0):(this.state.error=(null==(t=this.editor)?void 0:t.model.placeHolder)||ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty",{caption:this.model.caption}),!1)}async onInit(){var t,e;await super.onInit(),this.state.required=!this.model.allowEmpty,!0!==this.context.srfreadonly&&"true"!==this.context.srfreadonly&&(null==(t=this.model.editor)?void 0:t.readOnly)&&(this.state.readonly=(null==(e=this.model.editor)?void 0:e.readOnly)||!1),this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await ut(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),await this.validate(),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:dt.ENTER,event:t})}}t("PanelFieldController",De);const Ee=P({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:De,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=_t("panel-field"),n=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("error",!!t.controller.state.error)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.state.readonly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t),...this.attrs};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=w(this.controller.editorProvider.formEditor);t=y(n,{...e})}else t=E(w("not-supported-editor"),{modelData:this.modelData.editor},null)}return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t,this.controller.state.error&&E("div",{class:this.ns.e("error")},[this.controller.state.error])])}});class Ne{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new De(t,e,n);return await o.init(),o}}t("IBizPanelField",Qt(Ee,(function(t){t.component(Ee.name,Ee),rt("FIELD",(()=>new Ne))})));class Oe extends it{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",Oe);const Ae=P({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Oe,required:!0}},setup(t){const e=_t("panel-rawitem"),n=t.controller,o=g(""),a=g(""),{rawItem:i}=t.modelData;i&&i.cssStyle&&(a.value=i.cssStyle);const r=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return s((()=>n.data),(async t=>{if(t){const e=n.model.rawItem;if(!e)return;let a;const i={...t};"RAW"===e.contentType?a=e.caption:"HTML"===e.contentType&&(a=e.content),a&&e.templateMode&&(a=await ibiz.util.hbs.render(a.replace("//n","\n"),Object.assign(i,{data:{...t}}))),o.value=a}}),{immediate:!0}),{ns:e,classArr:r,tempStyle:a,content:o}},render(){if(this.controller.state.visible)return E("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[E(w("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class Se{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new Oe(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Qt(Ae,(function(t){t.component(Ae.name,Ae),rt("RAWITEM",(()=>new Se)),rt("RAWITEM_STATIC_IMAGE",(()=>new Se)),rt("RAWITEM_STATIC_LABEL",(()=>new Se)),rt("RAWITEM_STATIC_TEXT",(()=>new Se))})));class ze extends at{constructor(){super(...arguments),this.data={}}}class Te{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new ze,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=pt(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}async validate(){return(await Promise.all(Object.values(this.panelItems).map((t=>t.validate())))).every((t=>t))}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const i=this.parent.providers[t.id];if(!i)return;const r=await i.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!ht(t)?await this.initChildrenController(t.panelItems,e,r):(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initChildrenController(t.panelTabPages,e,r)})))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async panelStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}class xe extends at{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",xe);class Re extends it{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new xe(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await mt(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!ht(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;default:throw new k(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async validate(){return(await Promise.all(this.dataItems.map((t=>t.validate())))).every((t=>t))}async setData(t){const e=pt(this.model),n=t.map((t=>new ft(e,t)));this.dataItems=n.map((t=>new Te(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(vt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=await gt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new V(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",Re);const Be=P({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Re,required:!0}},setup(t){const e=_t("multi-data-container"),{id:n}=t.modelData;s((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=m(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=m(n.state)}))}))}),{immediate:!0});const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map(((t,e)=>{const n=this.controller.dataItems[e];return E(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return E(w("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!A(a)?e:{default:()=>[e]});var a}))]}})})),E("div",{class:this.classArr},[t])}});class Ve{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Re(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Qt(Be,(function(t){t.component(Be.name,Be),rt("CONTAINER_CONTAINER_MULTIDATA",(()=>new Ve))})));class je extends at{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",je);class Le extends it{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new je(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const i=await mt(t,e.model,e.view.model);if(!i)return;this.providers[t.id]=i;const r=await i.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!ht(t)&&await this.initPanelItemControllers(t.panelItems,e,r),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,r)})))}initContainerData(){const{dataSourceType:t,dataName:e,dataRegionType:n}=this.model;if("LOGINFORM"!==n)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 U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;default:throw new k(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}else this.setLoginForm()}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=pt(this.model),a=o.map((t=>t.id)),i=new ft(o,t);i._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=i,this.childrenStateNotify(vt.LOAD)}setLoginForm(){this.setData({})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=await gt(e,t,this.panel.context,this.panel.data,this.panel.params);if(!n)throw new V(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",(()=>{n()}))}childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}t("SingleDataContainerController",Le);const Me=P({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Le,required:!0}},setup(t){const e=_t("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=m(n.state)}));const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():E(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const n=this.controller.panelItems[t.id];return E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o}))]}}),E("div",{class:this.classArr},[t])}});class ke{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Le(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Qt(Me,(function(t){t.component(Me.name,Me),rt("CONTAINER_CONTAINER_SINGLEDATA",(()=>new ke))})));class Ue extends at{}t("GridContainerState",Ue);class _e extends it{createState(){var t;return new Ue(null==(t=this.parent)?void 0:t.state)}}function Fe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("GridContainerController",_e);const Ge=P({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:_e,required:!0}},setup(t){const e=_t("grid-container"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),i=g(void 0),r=g(12);return{ns:e,classArr:o,layoutModel:a,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:r,adaptCols:i}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return E(w("iBizRow"),{class:this.classArr,layout:this.layoutModel},Fe(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Fe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class We{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new _e(t,e,n);return await o.init(),o}}t("IBizGridContainer",Qt(Ge,(function(t){t.component(Ge.name,Ge),rt("CONTAINER_CONTAINER_GRID",(()=>new We))})));class qe extends at{}t("PanelContainerImageState",qe);class $e extends it{createState(){var t;return new qe(null==(t=this.parent)?void 0:t.state)}}function Ke(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerImageController",$e);const He=P({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:$e,required:!0}},setup(t){const e=_t("panel-container-image"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=L(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ke(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ke(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Xe{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new $e(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Qt(He,(function(t){t.component(He.name,He),rt("CONTAINER_CONTAINER_IMAGE",(()=>new Xe))})));class Qe extends at{}t("PanelContainerGroupState",Qe);class Je extends it{createState(){var t;return new Qe(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Je);class Ye{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Je(t,e,n);return await o.init(),o}}function Ze(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const tn=P({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Je,required:!0}},setup(t){const e=_t("panel-container-group"),n=g(!t.controller.defaultExpansion);return{ns:e,captionText:D((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],i=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Ze(n=a.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Ze(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=E("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[E("div",{class:[this.ns.be("header","left")]},[E("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),E("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?E("ion-icon",{name:"caret-forward-sharp"},null):E("ion-icon",{name:"caret-down-sharp"},null))])])),E("div",{class:o},[r,E("div",{class:[this.ns.b("content")]},[i])])}});t("IBizPanelContainerGroup",Qt(tn,(function(t){t.component(tn.name,tn),rt("CONTAINER_CONTAINER_GROUP",(()=>new Ye))})));function en(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const nn=P({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:it,required:!0}},setup(t){const e=_t("panel-tab-page"),n=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return E(w("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},en(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return E(w("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},en(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class on{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new it(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Qt(nn,(function(t){t.component(nn.name,nn),rt("TABPAGE",(()=>new on))})));class an extends it{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?yt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const rn=P({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:an,required:!0}},setup(t){var e;const n=_t("panel-item-render"),o=_t("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,i=D((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=D((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:i,htmlCode:r}},render(){return E("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class sn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new an(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Qt(rn,(function(t){t.component(rn.name,rn),rt("PREDEFINE_RENDER",(()=>new sn))})));const ln=P({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=_t("teleport-placeholder"),n=g(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:a,tempStyle:n}},render(){if(this.controller.state.visible)return E("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class cn extends at{constructor(){super(...arguments),this.teleportTag=""}}class un extends it{createState(){var t;return new cn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let o="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const a=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find((t=>"TeleportTag"===t.key));a&&a.value&&(o=a.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),o),this.state.teleportTag=o}}class dn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new un(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",dn);t("IBizTeleportPlaceholder",Qt(ln,(function(t){t.component(ln.name,ln),rt("RAWITEM_TELEPORT_PLACEHOLDER",(()=>new dn))})));const pn=P({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:oe,required:!0}},setup:()=>({ns:_t("panel-container-tabs")}),render(){return y(w("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class hn{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new oe(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Qt(pn,(function(t){t.component(pn.name,pn),rt("CONTAINER_TABS",(()=>new hn))}))),t("AppRedirectView",P({setup(){var t;const e=M.create((null==(t=ibiz.appData)?void 0:t.context)||{});I((()=>{e.destroy()}));const{href:n}=window.location;b((()=>ibiz.util.hiddenAppLoading())),async function(){await wt(e,n)}()},render:()=>E("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class mn{constructor(){this.component="IBizView"}}const fn=P({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(t,{slots:e}){const n=_t("view"),o=ee(((...t)=>new Z(...t))),a=Ct(o.model),i=[],r=new Map,s=[];a.forEach((t=>{const{teleportFlag:e,teleportTag:n}=bt(t);n||e?(i.push(t),r.set(t.id,n||"")):s.push(t)}));const{viewType:l,sysCss:c,codeName:u}=o.model,d=l.toLowerCase(),p=null==c?void 0:c.cssName,h=D((()=>[n.b(),n.b(d),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":""])),m=t=>{const e=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[e]||{}}};return{c:o,ns:n,controls:s,teleportControls:i,viewClassNames:h,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:m,renderControl:t=>{const n=t.name||t.id,a=m(t);if(e[n])return z(e,n,a);const i=o.providers[n],r=w((null==i?void 0:i.component)||"IBizControlShell");return i&&(a.provider=i),y(r,a)},getCtrlTeleportTag:t=>{var e,n;const a=r.get(t.id);if(a)return a;const i=null==(n=null==(e=o.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return i?"#".concat(i.state.teleportTag):void 0},getControlStyle:()=>{const t={};return Object.assign(t,{display:o.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=E("span",{style:"color:red;"},[ibiz.i18n.t("vue3Util.view.viewType",{viewType:this.modelData.viewType})]);else{const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name||t.id;e[n]=()=>this.renderControl(t)}));const o=this.c.model.viewLayoutPanel,a=this.c.providers[o.name];n=y(w(a.component),{modelData:o,context:this.c.context,params:this.c.params,provider:a,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let o=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(o=this.teleportControls.map((t=>{let e;const n=this.getCtrlTeleportTag(t);return n?E("div",{style:this.getControlStyle()},[E(S,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var o})));let a=null;if(this.c.state.hasError&&this.c.error.status){const t=et(this.c.error.status);t&&("string"==typeof t.component&&(a=y(w(t.component))),a=y(t.component))}return N(E("div",{class:this.viewClassNames,id:this.c.id},[n,o,a]),[[O("loading"),this.c.state.isLoading]])}});class vn{constructor(){this.component="IBizView"}createController(t,e,n,o){return new It(t,e,n,o)}}t("IBizView",Qt(fn,(function(t){t.component(fn.name,fn),Pt("DEFAULT",(()=>new mn)),Pt("APPDATAUPLOADVIEW",(()=>new vn))}))),t("TodoRedirect",P({setup(){const t=$(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const a=H.parse(o,{delimiter:";"}),{apptype:i,todotype:r,todoid:s}=a,l={srfapptype:"pc",srfapp:""};i||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(s,"/getlinkurl"),l)).data.linkurl;i?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(r),t.push("/index".concat(e)))}()},render:()=>E("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class gn{constructor(){this.component="IBizPortalView"}}const yn=P({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=_t("view"),n=ee(((...t)=>new Z(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:i,codeName:r}=n.model,s=a.toLowerCase(),l=null==i?void 0:i.cssName,c=[e.b(),e.b(s),e.m(r),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a({modelData:t,...o}));const i=this.c.providers[e];i&&(n[e]=()=>{const e=w(i.component);return y(e,{modelData:t,...o,provider:i})})})),n.dashboard&&(e=n.dashboard())}return E("div",{class:this.viewClassNames},[e])}}),wn=(t("IBizPortalView",Qt(yn,(function(t){t.component(yn.name,yn),Pt(X.APP_PORTAL_VIEW,(()=>new gn)),Pt(X.DE_PORTAL_VIEW,(()=>new gn)),Pt(X.DE_PORTAL_VIEW9,(()=>new gn))}))),P({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=ee(((...t)=>new Z(...t))),n=g(),o=g(),a=g();return e.evt.on("onCreated",(()=>{Dt(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new V(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?y(w("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):N(E("div",{style:"width: 100%; height: 100%;"},null),[[O("loading"),!this.toViewId]])}}));class Cn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Qt(wn,(function(t){t.component(wn.name,wn);const e=new Cn;Pt(X.DE_REDIRECT_VIEW,(()=>e))})));function bn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=yt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}const In=P({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:e}){const n=kt(((...e)=>new Et(...e,t.container))),o=_t("control-".concat(n.model.controlType.toLowerCase()));s((()=>t.data),(t=>{t&&(n.setInputData(t),n.load())}),{immediate:!0}),n.evt.on("onCreated",(()=>{Object.keys(n.panelItems).forEach((t=>{const e=n.panelItems[t];e.state=m(e.state)}))}));const a=(t,o)=>{var i,r;if(t.hidden)return null;const{providers:s,panelItems:l}=o||n,c=s[t.id];if(!c)return E("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return z(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const u=w(c.component);let d;"CTRLPOS"===t.itemType&&e[t.id]?d=()=>e[t.id]():"TABPANEL"===t.itemType&&(null==(i=t.panelTabPages)?void 0:i.length)?d=()=>t.panelTabPages.map((t=>a(t,o))):ht(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>a(t,o))));let p="";t.cssStyle&&(p=t.cssStyle);const h=l[t.id];return y(u,{modelData:t,controller:h,key:t.id,style:p,attrs:bn(t,h)},d)};return C("renderPanelItem",a),{c:n,ns:o,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class Pn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Qt(In,(function(t){t.component(In.name,In),Nt(Ot.VIEW_LAYOUT_PANEL,(()=>new Pn))})));function Dn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=yt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}function En(t,e,n){var o,a;if(t.hidden)return;const{providers:i,panelItems:r}=e,s=i[t.id];if(!s)return E("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=w(s.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>En(t,e,n))):ht(t)?c=void 0:(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>En(t,e,n))));let u="";t.cssStyle&&(u=t.cssStyle);const d=r[t.id];return y(l,{modelData:t,controller:d,key:t.id,style:u,attrs:Dn(t,d)},c)}const Nn=P({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const e=kt(((...e)=>new At(...e,t.container))),n=_t("control-".concat(e.model.controlType.toLowerCase()));return s((()=>t.data),(t=>{t&&(e.setInputData(t),e.load())}),{immediate:!0}),e.evt.on("onCreated",(()=>{Object.keys(e.panelItems).forEach((t=>{const n=e.panelItems[t];n.state=m(n.state)}))})),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=En(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class On{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Qt(Nn,(function(t){t.component(Nn.name,Nn),Nt(Ot.PANEL,(()=>new On))})));function An(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function zn(t,e){for(var n,o="",a=0,i=-1,r=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===r);else if(i!==s-1&&2===r){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),i=s,r=0;continue}}else if(2===o.length||1===o.length){o="",a=0,i=s,r=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(i+1,s):o=t.slice(i+1,s),a=s-i-1;i=s,r=0}else 46===n&&-1!==r?++r:r=-1}return o}var Tn={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),Sn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=zn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Sn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=zn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Sn(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];Sn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Tn.normalize(t)},relative:function(t,e){if(Sn(t),Sn(e),t===e)return"";if((t=Tn.resolve(t))===(e=Tn.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var r=e.length-i,s=a<r?a:r,l=-1,c=0;c<=s;++c){if(c===s){if(r>s){if(47===e.charCodeAt(i+c))return e.slice(i+c+1);if(0===c)return e.slice(i+c)}else a>s&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(i+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(i+l):(i+=l,47===e.charCodeAt(i)&&++i,e.slice(i))},_makeLong:function(t){return t},dirname:function(t){if(Sn(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!a){o=i;break}}else a=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Sn(t);var n,o=0,a=-1,i=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var r=e.length-1,s=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!i){o=n+1;break}}else-1===s&&(i=!1,s=n+1),r>=0&&(l===e.charCodeAt(r)?-1==--r&&(a=n):(r=-1,a=s))}return o===a?a=s:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!i){o=n+1;break}}else-1===a&&(i=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){Sn(t);for(var e=-1,n=0,o=-1,a=!0,i=0,r=t.length-1;r>=0;--r){var s=t.charCodeAt(r);if(47!==s)-1===o&&(a=!1,o=r+1),46===s?-1===e?e=r:1!==i&&(i=1):-1!==e&&(i=-1);else if(!a){n=r+1;break}}return-1===e||-1===o||0===i||1===i&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){Sn(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var i=-1,r=0,s=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===s&&(l=!1,s=c+1),46===o?-1===i?i=c:1!==u&&(u=1):-1!==i&&(u=-1);else if(!l){r=c+1;break}return-1===i||-1===s||0===u||1===u&&i===s-1&&i===r+1?-1!==s&&(e.base=e.name=0===r&&a?t.slice(1,s):t.slice(r,s)):(0===r&&a?(e.name=t.slice(1,i),e.base=t.slice(1,s)):(e.name=t.slice(r,i),e.base=t.slice(r,s)),e.ext=t.slice(i,s)),r>0?e.dir=t.slice(0,r-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Tn.posix=Tn;var xn=Tn,Rn=An(xn);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some((e=>"string"==typeof e?t===e:e.test(t)))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach((e=>{t.use(e)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),xt.useComponent.callSync(null,t)}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new U(e,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(xn.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));n=a.data}const o=new St(t,e,n);if(o){await this.loadPluginExternal(o.config);try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let i="";if(i=xn.join(e,o),i){if(this.cache.has(i))return;let t=null;const o=this.parseUrl(i),r=("string"==typeof a?[a]:a).map((t=>this.parseUrl(Rn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new V(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!t.default)throw new V(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(t.default),this.cache.set(i,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(xn.join(e,t));const{origin:o,pathname:a}=window.location;return a.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(a).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"]);if(e.packages){const t=e.packages;for(const e in t){const n=t[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:n});if(200!==o.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));await this.loadPluginExternal(o.data)}}System.addImportMap(e)}handleSystemImportMap(t){if(t){if(t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map((e=>this.parseUrl(e,t.baseUrl)))}}return t}return null}});class Bn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Vn(){return{value:String,controller:new Bn(Object),data:new Bn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function jn(){return{hasError:{type:Boolean}}}function Ln(){return{...Vn(),value:[String,Number]}}function Mn(){return{...Vn(),value:Number}}function kn(){return{...Vn(),value:String}}function Un(){return{...Vn(),value:[String,Number,Object,Array]}}function _n(){return{...Vn(),value:[String,Number]}}function Fn(){return{...Vn(),value:[String,Number]}}function Gn(){return{...Vn(),value:[String,Number]}}function Wn(){return{...Vn(),value:[String,Array,Object,Number]}}function qn(){return{...Vn(),value:[String,Number]}}function $n(){return{...Vn(),value:[String,Number]}}function Kn(){return{...Vn(),value:[String,Number]}}function Hn(){return{...Vn(),value:[String,Number]}}function Xn(){return{...Vn(),value:[String,Number]}}function Qn(){return{...Vn(),value:[String,Number]}}function Jn(){return{...Vn(),value:[String,Number,Array]}}function Yn(){return{...Vn(),value:[String,Number]}}function Zn(){return{...Vn(),value:[String,Number]}}function to(){return{...Vn(),value:[String,Number]}}function eo(){return{...Vn(),value:String}}function no(){return{...Vn(),value:[String,Number]}}function oo(){return{...Vn(),value:String,language:{type:String},theme:{type:String}}}function ao(){return{...Vn(),value:String}}function io(){return{...Vn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function ro(){return{...Vn(),value:[Array,Array]}}function so(){return{...Vn(),value:String}}function lo(){return{...Vn(),value:String}}t("RequiredProp",Bn);t("en",{vue3Util:{common:{undefined:"undefined",onFoundCorrespondingPart:"Undefined adapter with no corresponding part found",noFoundViewModel:"View model not found",noSupportLoadingDynamic:"{codeName}No entity, do not support loading dynamic models at this time"},control:{unsupportedPanel:"Unsupported panel items: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"No data object name configured",noSupportedDataSourceType:"The data source type {dataSourceType} is not supported yet.",noConfiguredEntityLogic:"No entity logic configured",noConfiguredEntity:"No entity configured",noReturnValue:"The entity logic {appDELogicId} has no return value",noAttribute:"There is no {dataName} attribute in the global variable.",noConfiguerdEntityBehanior:"No entity behavior configured",sessionView:"The session to which the view is bound does not exist {dataName}",viewStateAttribute:"There is no {dataName} attribute in the view state",noImplementMethod:"Method not implemented.",noProvidedSlot:"No {id} slot provided",cannotEmpty:"{caption} cannot be empty",unadaptedLayout:"Unadapted layout placeholder {layoutPos}",placeholderIdentifier:"The placeholder identifier for panel member {id} of view {viewCodeName} is:"},plugin:{failureConfigurationLoad:"Configuration load failure",failedRemotePluginLoad:"Remote Plugin failed to load, Remote Plugin did not find [default] Default Export",fileContentFormat:"Remote plugin failed to load, file not found or file content format is incorrect"},use:{control:{parameterChanges:"Context or view parameter changes for {id}:",stateChange:"Part [{name}] state change"},focusBlur:{noFocus:"No focus, no out-of-focus triggering"},view:{stateChange:"View [{{name}] state change"}},util:{noInjected:"The createVueApp method is not injected.",convertString:"Failed to convert to string",viewIdentifiers:"View identifiers do not exist for {depth} level routes",noFoundView:"View not found {viewCodeName}",routeCorrectly:"Cannot get the route correctly, could be a dependency issue."},view:{redirectionProgress:"Redirection in progress",viewType:"View type {viewType} is not supported yet.",noTeleportTag:"No teleportTag was found for part {name}.",embeddedRedirectionView:"Embedded redirection view does not support url jumping",insufficientRedirection:"Insufficient redirection parameters to jump",toDoList:"To-Do List Redirection"}}}),t("zhCn",{vue3Util:{common:{undefined:"未定义",onFoundCorrespondingPart:"未定义未找到对应部件的适配器",noFoundViewModel:"未找到视图模型",noSupportLoadingDynamic:"{codeName}无实体,暂不支持加载动态模型"},control:{unsupportedPanel:"暂未支持的面板项: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"没有配置数据对象名称",noSupportedDataSourceType:"数据源类型{dataSourceType}暂未支持",noConfiguredEntityLogic:"没有配置实体逻辑",noConfiguredEntity:"没有配置实体",noReturnValue:"实体逻辑{appDELogicId}没有返回值",noAttribute:"全局变量里没有{dataName}属性",noConfiguerdEntityBehanior:"没有配置实体行为",sessionView:"绑定视图的会话不存在{dataName}",viewStateAttribute:"视图state里没有{dataName}属性",noImplementMethod:"未执行的方法",noProvidedSlot:"未提供{id}插槽",cannotEmpty:"{caption} 不能为空",unadaptedLayout:"未适配的布局占位{layoutPos}",placeholderIdentifier:"视图{viewCodeName}的面板成员{id}的占位标识是:"},plugin:{failureConfigurationLoad:"配置加载失败",failedRemotePluginLoad:"远程插件加载失败, 远程插件未找到[default]默认导出",fileContentFormat:"远程插件加载失败, 未找到文件或文件内容格式不正确"},use:{control:{parameterChanges:"{id}的上下文或视图参数变更:",stateChange:"部件 [{name}] state 变更"},focusBlur:{noFocus:"没有聚焦,不触发失焦"},view:{stateChange:"视图 [{name}] state 变更"}},util:{noInjected:"没有注入createVueApp方法",convertString:"转换成字符串失败",viewIdentifiers:"第{depth}级路由不存在视图标识",noFoundView:"找不到视图{viewCodeName}",routeCorrectly:"无法正确获取route,可能是依赖问题"},view:{redirectionProgress:"重定向跳转中",viewType:"视图类型{viewType}暂未支持",noTeleportTag:"没有找到部件{name}的teleportTag",embeddedRedirectionView:"嵌入重定向视图不支持url跳转",insufficientRedirection:"重定向参数不足无法跳转",toDoList:"待办列表重定向"}}})}}}));
|
|
1
|
+
System.register(["qx-util","vue","@ibiz-template/core","ramda","vue-router","qs","@ibiz-template/runtime","pinia","lodash-es"],(function(t){"use strict";var e,n,o,a,i,r,s,l,c,u,d,p,h,m,f,v,g,y,w,C,b,I,P,D,E,N,O,A,S,z,T,x,R,B,V,j,L,M,k,U,_,F,G,W,q,$,K,H,X,Q,J,Y,Z,tt,et,nt,ot,at,it,rt,st,lt,ct,ut,dt,pt,ht,mt,ft,vt,gt,yt,wt,Ct,bt,It,Pt,Dt,Et,Nt,Ot,At,St,zt,Tt,xt,Rt;return{setters:[function(t){e=t.SyncSeriesHook,n=t.isFunc,o=t.notNilEmpty,a=t.QXEvent,i=t.clearAll,r=t.createUUID},function(t){s=t.watch,l=t.onBeforeUnmount,c=t.createCommentVNode,u=t.getCurrentInstance,d=t.isReactive,p=t.toRaw,h=t.inject,m=t.reactive,f=t.onActivated,v=t.onDeactivated,g=t.ref,y=t.h,w=t.resolveComponent,C=t.provide,b=t.onMounted,I=t.onUnmounted,P=t.defineComponent,D=t.computed,E=t.createVNode,N=t.withDirectives,O=t.resolveDirective,A=t.isVNode,S=t.Teleport,z=t.renderSlot},function(t){T=t.onClickOutside,x=t.NOOP,R=t.listenJSEvent,B=t.Namespace,V=t.RuntimeError,j=t.isBase64Image,L=t.isSvg,M=t.IBizContext,k=t.ModelError,U=t.RuntimeModelError},function(t){_=t.isNil,F=t.isNotNil,G=t.isEmpty,W=t.mergeLeft},function(t){q=t.useRoute,$=t.useRouter,K=t.RouterView},function(t){H=t.default},function(t){X=t.ViewType,Q=t.RouteConst,J=t.getMatchResPath,Y=t.calcDeCodeNameById,Z=t.ViewController,tt=t.getControlProvider,et=t.getErrorViewProvider,nt=t.calcDynaSysParams,ot=t.getViewProvider,at=t.calcThresholdRange,it=t.PanelItemState,rt=t.PanelItemController,st=t.registerPanelItemProvider,lt=t.Modal,ct=t.ViewMode,ut=t.OpenAppViewCommand,dt=t.getEditorProvider,pt=t.PanelItemEventName,ht=t.getAllPanelField,mt=t.isDataContainer,ft=t.getPanelItemProvider,vt=t.ScriptFactory,gt=t.PanelData,yt=t.PanelNotifyState,wt=t.execDELogicById,Ct=t.toLocalOpenWFRedirectView,bt=t.getControlsByView,It=t.getCtrlTeleportParams,Pt=t.AppDataUploadViewController,Dt=t.registerViewProvider,Et=t.getDERedirectToView,Nt=t.ViewLayoutPanelController,Ot=t.registerControlProvider,At=t.ControlType,St=t.PanelController,zt=t.RemotePluginItem},function(t){Tt=t.defineStore,xt=t.createPinia},function(t){Rt=t.isNumber}],execute:function(){t({calcResRoutePath:Xt,createOverlayView:te,generateRoutePath:async function(t,e,n,o){const a=Wt(e);let i=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(i=n.toRouteDepth,n.toRouteDepth=void 0):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(i-1,a.pathNodes.length-i+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}Kt(n,a.pathNodes),e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:$t(n),params:o}),2===i&&(await Xt(a,n,t.appDataEntityId,t.appId),Ht.includes(t.viewType))){const e=Y(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:qt(a)}},generateRoutePathByModal:async function(t,e,n,o){const a=Wt(e),i=a.pathNodes.findIndex((t=>t.viewName===Q.ROUTE_MODAL_TAG));-1!==i&&(a.pathNodes=a.pathNodes.slice(0,i));if(n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,n.currentSrfNav=void 0}return Kt(n,a.pathNodes),a.pathNodes.push({viewName:"".concat(Q.ROUTE_MODAL_TAG,"/").concat(t.codeName.toLowerCase()),context:$t(n),params:o}),{path:qt(a)}},getArrayProps:lo,getAutoCompleteProps:ao,getCascaderProps:co,getCheckboxListProps:Wn,getCheckboxProps:qn,getCodeProps:io,getColorPickerProps:uo,getDataPickerProps:$n,getDatePickerProps:Kn,getDateRangeProps:Hn,getDrawerPlacement:function(t){return ee[t]||"right"},getDropdownProps:Gn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:Ln,getGridArrayProps:function(){return{...lo(),...Mn()}},getGridAutoCompleteProps:function(){return{...ao(),...Mn()}},getGridCascaderProps:function(){return{...co(),...Mn()}},getGridCheckboxListProps:function(){return{...Wn(),...Mn()}},getGridCheckboxProps:function(){return{...qn(),...Mn()}},getGridCodeProps:function(){return{...io(),...Mn()}},getGridColorPickerProps:function(){return{...uo(),...Mn()}},getGridDataPickerProps:function(){return{...$n(),...Mn()}},getGridDatePickerProps:function(){return{...Kn(),...Mn()}},getGridDateRangeProps:function(){return{...Hn(),...Mn()}},getGridDropdownProps:function(){return{...Gn(),...Mn()}},getGridEditorCommonProps:Mn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...ro(),...Mn()}},getGridInputIpProps:function(){return{..._n(),...Mn()}},getGridInputNumberProps:function(){return{...Un(),...Mn()}},getGridInputProps:function(){return{...kn(),...Mn()}},getGridListBoxProps:function(){return{...Xn(),...Mn()}},getGridMarkDownProps:function(){return{...so(),...Mn()}},getGridNumberRangeProps:function(){return{...Qn(),...Mn()}},getGridRadioProps:function(){return{...Jn(),...Mn()}},getGridRateProps:function(){return{...Yn(),...Mn()}},getGridRawProps:function(){return{...Zn(),...Mn()}},getGridSliderProps:function(){return{...to(),...Mn()}},getGridSpanProps:function(){return{...Fn(),...Mn()}},getGridStepperProps:function(){return{...eo(),...Mn()}},getGridSwitchProps:function(){return{...no(),...Mn()}},getGridUploadProps:function(){return{...oo(),...Mn()}},getHtmlProps:ro,getInputIpProps:_n,getInputNumberProps:Un,getInputProps:kn,getListBoxProps:Xn,getMarkDownProps:so,getNestedRoutePath:Qt,getNumberRangeProps:Qn,getOrigin:Lt,getOwnRouteContext:$t,getRadioProps:Jn,getRateProps:Yn,getRawProps:Zn,getSliderProps:to,getSpanProps:Fn,getStepperProps:eo,getSwitchProps:no,getUploadProps:oo,isEmptyVNode:function(t){if(!Array.isArray(t))return t===kt;return 1===t.length&&t[0]===kt},onRouteChange:function(t,e){const n=q();if(!n)throw new V(ibiz.i18n.t("vue3Util.util.routeCorrectly"));s((()=>null==n?void 0:n.path),(()=>{const o=Qt(n,e);t({currentKey:o,fullPath:n.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(te(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(te(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(te(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(te(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e,n=!1){var a;const i=Wt(t,n);let r=i.pathNodes[e-1].viewName;if(!r)throw new V(ibiz.i18n.t("vue3Util.util.viewIdentifiers",{depth:e}));r===Q.ROUTE_MODAL_TAG&&(r=i.pathNodes[e].viewName);"index"===r&&(r=ibiz.hub.defaultAppIndexViewName);const s=await ibiz.hub.config.view.get(r);if(!s)throw new V(ibiz.i18n.t("vue3Util.util.noFoundView",{viewCodeName:r}));const l={};(null==(a=ibiz.appData)?void 0:a.context)&&Object.assign(l,ibiz.appData.context);i.appContext&&Object.assign(l,i.appContext);if(1!==e)for(let t=0;t<e;t++){const e=i.pathNodes[t];o(e.context)&&Object.assign(l,e.context)}const{params:c,srfnav:u}=i.pathNodes[e-1];return{viewConfig:s,context:l,params:c,srfnav:u}},prepareControl:function(t){const e=Gt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,i=n.toLowerCase(),r=null==o?void 0:o.cssName,s=Gt("control-".concat(i)),l=[e.b(),e.b(i),e.m(a)];r&&l.push(r);return{controlClass:l,ns:s}},renderString:function(t){if(_(t))return"";if("string"==typeof t)return t;if("object"==typeof t)return JSON.stringify(t);try{return t.toString()}catch(e){ibiz.log.error(t,ibiz.i18n.t("vue3Util.util.convertString"),e)}return""},route2routePath:Wt,routePath2string:qt,useAutoFocusBlur:function(t,e){return{useInFocusAndBlur:()=>{t.autoFocus||e("blur")},useInValueChange:()=>{t.autoFocus&&e("blur")}}},useClickOutside:Vt,useCodeListListen:function(t,e,n){let o;b((async()=>{if(t){const a=await ibiz.hub.getApp(e);o=await a.codeList.getCodeListInstance(t),o&&o.onChange(n)}})),I((()=>{o&&o.offChange(n)}))},useControlController:_t,useController:function(t){t.force=Mt()},useCtx:Ut,useEventListener:Ft,useFocusAndBlur:function(t,e){const n=g(),o=g(!1);let a;const i=()=>{o.value||ibiz.log.debug(ibiz.i18n.t("vue3Util.use.focusBlur.noFocus")),e(),a.stop(),o.value=!1};return Ft(n,"click",(e=>{o.value||(a=Vt(n,(()=>{i()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:i,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Mt,useForceTogether:function(t,e){const n=e.force,o=Mt();e.force=t=>{n(t),o()}},useLocalCacheKey:function(t,e,n,o="@"){const a=$();return()=>{if(!a)return;const i=t.srfuserid,r=Wt(a.currentRoute.value);if(n=t.srfdefaulttoroutedepth||n,i&&n&&r.pathNodes[n-2]){r.pathNodes=r.pathNodes.slice(0,n-1),r.pathNodes.forEach((t=>{t.context&&delete t.context.srfpaginationviewid}));const t=qt(r);return"".concat(e).concat(o).concat(i).concat(o).concat(t)}}},useMobCtx:function(){return h("ctx")},useNamespace:Gt,useProps:jt,usePropsWatch:function(t,e,n){const o=jt();Object.prototype.hasOwnProperty.call(o,t)&&(s((()=>o[t]),((t,n)=>{e(Lt(t),Lt(n))}),n),e(Lt(o[t]),void 0))},useRouteKey:function(t,e,n){n||(n=g(""));n.value=t.value;const o=new Jt(e);return s(t,((t,e)=>{t!==e&&o.nextChange((()=>{n.value=t}))})),n},useRouterQuery:function(){const t=q(),{query:e}=t;return e},useViewController:oe});class Bt{}function Vt(t,e,n={}){let o=x,a=x,i=x;const r=()=>{o(),o=x,a=x,i=x};return s(t,((t,s)=>{if(t!==s)if(_(t))r();else{const r=T((null==t?void 0:t.$el)||t,e,n);o=r.stop,a=r.pause,i=r.proceed}}),{immediate:!0}),l((()=>{o!==x&&r()})),{stop:()=>o(),pause:()=>a(),proceed:()=>i()}}function jt(){return u().proxy.$props}function Lt(t){return d(t)?p(t):t}function Mt(){const t=u().proxy;return e=>{t.$forceUpdate(),e&&n(e)&&t.$nextTick((()=>{e()}))}}t("AppHooks",Bt),Bt.createApp=new e,Bt.useComponent=new e;const kt=t("EmptyVNode",c("EmptyVNode"));function Ut(){return h("ctx")}function _t(t,e){const n=Ut(),o=jt();n.evt.emit("onForecast",o.modelData.name);const a=o.provider;let i;i=(null==a?void 0:a.createController)?a.createController(o.modelData,o.context,o.params,n):t(o.modelData,o.context,o.params,n),function(t,e){s((()=>({context:t.context,params:t.params})),((t,n)=>{if(t===n)return;const o={...t};t.context===n.context&&delete o.context,t.params===n.params&&delete o.params,e.updateContextParams(o),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)}))}(o,i),function(t,e,n=[]){const o=["context","params","modelData",...n];s((()=>{const e={};return Object.keys(t).forEach((n=>{o.includes(n)||(e[n]=t[n])})),e}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(e.state[t]=o[t])}))}),{immediate:!0})}(o,i,null==e?void 0:e.excludePropsKeys),i.state=m(i.state),f((()=>i.onActivated())),v((()=>i.onDeactivated())),i.force=Mt();const r=u().proxy;return i.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),r.$emit("controllerAppear",i),i.created(),l((()=>i.destroyed())),i}function Ft(t,e,n,o={}){let a=x;return s(t,((t,i)=>{t!==i&&(_(t)?(a(),a=x):a=R((null==t?void 0:t.$el)||t,e,n,o))}),{immediate:!0}),l((()=>{a!==x&&a()})),()=>{a()}}function Gt(t){return new B(t,ibiz.env.namespace)}function Wt(t,e=!1){const n=t.matched.length;let o=t.path;e&&(o=o.replace(new RegExp("/".concat(Q.ROUTE_MODAL_TAG),"g"),""));const a=o.split("/"),i=[];for(let e=1;e<=n;e++){const n=a[2*e],o=t.params["params".concat(e)];let r,s,l;r=o&&o!==ibiz.env.routePlaceholder?H.parse(o,{strictNullHandling:!0,delimiter:";"}):void 0,r&&(1===e?(s=r,r=void 0):(r.srfnavctx&&(s=JSON.parse(decodeURIComponent(r.srfnavctx)),delete r.srfnavctx),r.srfnav&&(l=r.srfnav,delete r.srfnav))),i.push({viewName:n,context:s,params:r,srfnav:l})}let r;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(r=H.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:r,pathNodes:i}}function qt(t){let e="";return t.appContext?e+="/".concat(H.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let a={};if(0===n)o(t.context)&&(a=t.context);else{if(a=o(t.params)?t.params:{},o(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(a.srfnavctx=encodeURIComponent(e))}t.srfnav&&(a.srfnav=t.srfnav)}const i=H.stringify(a,{delimiter:";",strictNullHandling:!0,skipNulls:!0});o(i)?e+=i:e+=ibiz.env.routePlaceholder})),e}function $t(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid","currentSrfNav","toRouteDepth"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}function Kt(t,e){let n=-1;e&&e.length>0&&(n=e.findIndex((t=>{var e;return!0===(null==(e=t.context)?void 0:e.srfreadonly)}))),t.srfreadonly&&!t.getOwnContext().srfreadonly&&-1===n&&(t.srfreadonly=!0)}const Ht=t("excludeViewTypes",[X.DE_GRID_VIEW,X.DE_GRID_EXP_VIEW,X.DE_LIST_VIEW,X.DE_LIST_EXP_VIEW,X.DE_DATA_VIEW,X.DE_DATAVIEW_EXP_VIEW,X.DE_CALENDAR_VIEW,X.DE_CALENDAR_EXP_VIEW,X.DE_CHART_VIEW,X.DE_CHART_EXP_VIEW,X.DE_KANBAN_VIEW]);async function Xt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let i=J(e,a);if(i||(i={path:"",keys:[a.codeName.toLowerCase()]}),i){const n=t.pathNodes[1].context,o={};i.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Qt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Wt(t);if(o.pathNodes.length<e)return t.path;o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e));const a=o.pathNodes[e-1];return n&&delete a.srfnav,a.context&&delete a.context.srfpaginationviewid,qt(o)}class Jt{constructor(t,e){this.callbacks=[],this.timers=[],this.wait=500,e&&(this.wait=e),s((()=>t.path),((t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}}))}nextChange(t){t&&(this.timers.push(setTimeout((()=>{t();const e=this.callbacks.findIndex((e=>e===t));this.callbacks.splice(e,1)}),this.wait)),this.callbacks.push(t))}}t("RouteListener",Jt);const Yt=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Zt{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new a,this.init()}static createVueApp(t,e){throw new V(ibiz.i18n.t("vue3Util.util.noInjected"))}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Zt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>y(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise((t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)}))}}t("OverlayContainer",Zt);function te(t){return e=>{const n=w("IBizViewShell");return y(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Zt{present(t){return this.modal.present(t)}});const ee={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class ne{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e,n={}){const o=t.currentRoute.value.fullPath;n.replace?t.replace({path:e}):t.push({path:e});const a=e;if(this.map.has(a)){return this.map.get(a).onWillDismiss()}const i=new ne(o,a);return this.map.set(a,i),this.scheduledDestruction(i),i.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(window.clearTimeout(n.timeout),n.timeout=void 0,n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout((()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)}),6e5)}}),t("useAppStore",Tt("appStore",(()=>({appStore:m({})}))));t("useUIStore",Tt("uiStore",(()=>{const t=function(){const t=g(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:m({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",xt());function oe(t){const e=jt(),n=h("ctx",void 0);null==n||n.evt.emit("onForecast",e.modelData.name);const o=e.provider;let a;a=(null==o?void 0:o.createController)?o.createController(e.modelData,e.context,e.params,n):t(e.modelData,e.context,e.params,n),ibiz.util.viewStack.add(a.id,a),function(t,e){s((()=>({context:t.context,params:t.params})),(t=>{e.context.reset({},t.context),i(e.params),Object.assign(e.params,t.params),e.handleContextParams(),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.control.parameterChanges",{id:e.model.id}),t)}))}(e,a),function(t,e){s((()=>t.state?{...t.state}:{}),((t,n)=>{const o={};Object.keys(t).forEach((e=>{t[e]!==(n||{})[e]&&(o[e]=t[e])})),ibiz.log.debug(ibiz.i18n.t("vue3Util.use.view.stateChange",{name:e.model.name}),o),Object.keys(o).forEach((t=>{e.state[t]=o[t]}))}),{immediate:!0})}(e,a),C("ctx",a.ctx),a.state=m(a.state),a.slotProps=m(a.slotProps),e.modal&&(a.modal=e.modal),f((()=>{a.onActivated(),ibiz.util.viewStack.active(a.id)})),v((()=>{a.onDeactivated(),ibiz.util.viewStack.deactivate(a.id)})),a.force=Mt();const r=u().proxy;return a.evt.onAll(((t,e)=>{r.$emit(t.slice(2),e)})),a.created(),l((()=>{a.destroyed(),ibiz.util.viewStack.remove(a.id)})),a}t("IBizIcon",P({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=Gt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=D((()=>function(t){if(t){if(t.htmlStr)return E("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?E("i",{class:[e.b(),t.cssClass]},null):E("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return j(t.imagePath)?E("img",{class:e.b(),src:t.imagePath},null):L(t.imagePath)?E("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?E("img",{class:e.b(),src:t.imagePath},null):E("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return L(t.rawContent)?E("div",{class:e.b(),innerHTML:t.rawContent},null):E("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",P({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:e}){const n={};let o=!0;s((()=>t.manualKey),((t,e)=>{F(t)&&t!==e&&(o=!0)}));return{renderComp:(a,i)=>{if(!o)return n.vNode;if(o=!1,a){const o={...a.props};delete o.onVnodeUnmounted,delete o.ref;const i=y(a.type,{...o,...e,key:t.manualKey});return n.vNode=i,i}}}},render(){return E(w("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",P({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=Gt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,i=n.toLowerCase(),r=null==o?void 0:o.cssName,s=t.controller.model,l=t.controller.model.controls,c=m({});return!1===s.controlType.endsWith("EXPBAR")&&(_(s.width)||(s.width>0&&s.width<=1?c.width="".concat(100*s.width,"%"):c.width="".concat(s.width,"px")),_(s.height)||(s.height>0&&s.height<=1?c.width="".concat(100*s.height,"%"):c.height="".concat(s.height,"px"))),{ns:e,typeClass:i,sysCssName:r,inlineStyle:c,codeName:a,controls:l,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:i}=this.controller;let r=null;if(o.isCreated&&a){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},a=e[n];e[n]=a?()=>a(o):()=>{const e=w("IBizControlShell");return y(e,{modelData:t,...o})}}));const n=i[a.name];r=y(w(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return E("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[r||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",P({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){const e=h("ctx");if(e)e.evt.emit("onForecast",t.modelData.name);else{const t={name:"AppView",id:"AppView",viewType:X.DE_CUSTOM_VIEW,appId:ibiz.env.appId};C("ctx",new Z(t,M.create({})).ctx)}const n=g(!1),o=g(""),a=g();tt(t.modelData).then((t=>{t?a.value=t:o.value=ibiz.i18n.t("vue3Util.common.onFoundCorrespondingPart"),n.value=!0})).catch((t=>{ibiz.log.error(t),o.value=t.message,n.value=!0}));return{ns:Gt("control-shell"),isComplete:n,errMsg:o,provider:a}},render(){return this.isComplete&&this.provider?y(w(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):N(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[O("loading"),!this.isComplete]])}})),t("IBizViewShell",P({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=Gt("view-shell"),n=g(!1),o=g(""),a=g(),i=g(),s=g(!0);return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new V(ibiz.i18n.t("vue3Util.common.noFoundViewModel"));if(s.value=await(async e=>{let n=!0;const{accUserMode:o,accessKey:a}=e,i=ibiz.auth.getAuthInfo();if(void 0!==o)switch(o){case 1:i&&(n=!1);break;case 2:i||(n=!1);break;case 4:a&&((await ibiz.hub.getApp(t.context.srfappid)).authority.calcByResCode(a)||(n=!1))}return n})(e),s.value){if(1===e.dynaSysMode){const n=e.appDataEntityId;if(!n)throw new V(ibiz.i18n.t("vue3Util.common.noSupportLoadingDynamic",{codeName:e.codeName}));const o=t.params||{},a=await nt(n,t.context,{viewParams:o,appId:e.appId});if(o.srfdatatype&&(a.srfdatatype=o.srfdatatype),o.srfwftag)a.srfwftag=o.srfwftag;else if(n&&e.enableWF){const o={...t.context};if(a.srfkey){const i=_(t.context.srfsessionid)||G(t.context.srfsessionid),s=r();if(i){const t=ibiz.uiDomainManager.create(s);o.srfsessionid=t.id}const l=ibiz.hub.getApp(e.appId),c=await l.deService.getService(t.context,n),u=await c.get(o,t.params||{});if(u.ok&&u.data){const{srfwftag:n,processdefinitionkey:o,taskdefinitionkey:i}=u.data;if(n&&(a.srfwftag=n),["DEWFDYNAEDITVIEW3","DEWFDYNAEDITVIEW"].includes(e.viewType)){const e=t.params;_(e.processDefinitionKey)&&(e.processDefinitionKey=o),_(e.taskDefinitionKey)&&(e.taskDefinitionKey=i)}}i&&ibiz.uiDomainManager.destroy(s)}}i.value=await ibiz.hub.loadAppView(e.appId,e.id,a)}else i.value=e;try{a.value=await ot(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:i,hasAuthority:s,provider:a}},render(){if(this.isComplete&&this.provider&&this.hasAuthority)return y(w(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots);if(!this.hasAuthority){const t=et("403");if(t)return"string"==typeof t.component?y(w(t.component)):y(t.component)}return N(E("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[O("loading"),!this.isComplete]])}})),t("IBizCodeList",P({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]},convertToCodeItemText:{type:Boolean,default:!0},valueFormat:{type:String},unitName:{type:String}},emits:{infoTextChange:t=>!0},setup(t,{emit:e}){var n,o;const a=Gt("code-list"),i=g([]),r=(null==(n=t.codeList)?void 0:n.textSeparator)||"、",l=(null==(o=t.codeList)?void 0:o.valueSeparator)||",";s(i,(t=>{let n="";t.length>0&&(n=t.map((t=>t.text)).join(r)),e("infoTextChange",n)}));const c=(e,n)=>{if(e){const{thresholdGroup:o}=t.codeList;if(o&&Rt(Number(n))){const t=at(e,Number(n));if(t)return t}const a=e.find((t=>t.value==n));if(a)return a;for(let t=0;t<e.length;t++){const o=c(e[t].children,n);if(o)return o}}};s([()=>t.codeListItems,()=>t.value],(([e,n],[o,a])=>{if(_(n)||""===n)i.value=[];else{const o="string"==typeof n?n.split(l):[n];i.value=o.map((n=>{const o=c(e,n);let a=n;if(t.convertToCodeItemText&&(null==o?void 0:o.text))a=o.text;else{const{valueFormat:e,unitName:n}=t;e&&(a=ibiz.util.text.format("".concat(a),e)),n&&(a+=n)}return{text:a,color:null==o?void 0:o.color,textCls:null==o?void 0:o.textCls,sysImage:null==o?void 0:o.sysImage}}))}}),{immediate:!0});const u=t.codeList.emptyText===ibiz.i18n.t("vue3Util.common.undefined")?"- - -":t.codeList.emptyText;return{items:i,ns:a,emptyText:u,textSeparator:r}},render(){return E("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,E("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&E(w("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",P({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(h("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null})),t("IBizBadge",P({name:"IBizBadge",props:{value:{type:Number,required:!0},type:{type:String,default:"danger"},counterMode:{type:Number}},setup:()=>({ns:Gt("badge")}),render(){if((this.value||0===this.value)&&!(1===this.counterMode&&this.value<=0))return E("div",{class:[this.ns.b(),this.ns.m(this.type)]},[this.value])}}));class ae extends it{}t("PanelContainerState",ae);class ie extends rt{createState(){var t;return new ae(null==(t=this.parent)?void 0:t.state)}}function re(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerController",ie);const se=P({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:ie,required:!0}},setup(t){const e=Gt("panel-container"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},re(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},re(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class le{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new ie(t,e,n);return await o.init(),o}}t("IBizPanelContainer",Yt(se,(function(t){t.component(se.name,se),st("CONTAINER",(()=>new le)),st("CONTAINER_DEFAULT",(()=>new le))})));const ce=P({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){h("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:Gt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?ibiz.i18n.t("vue3Util.panelComponent.noProvidedSlot",{id:this.modelData.id}):"")])}});class ue extends rt{bindControl(t){this.control=t,t.evt.onAll(((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})}))}}t("PanelCtrlPosController",ue);class de{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",Yt(ce,(function(t){t.component(ce.name,ce),st("CTRLPOS",(()=>new de))})));class pe extends rt{}function he(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("ScrollContainerItemController",pe);const me=t("ScrollContainerItem",P({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:pe,required:!0}},setup(t){const e=Gt("scroll-container-item"),{id:n}=t.modelData,o=D((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return E(w("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},he(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},he(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class fe{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new pe(t,e,n);return await o.init(),o}}class ve extends rt{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",ve);const ge=t("ScrollContainer",P({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:ve,required:!0}},setup(t){const e=Gt("scroll-container"),{id:n}=t.modelData,o=D((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,a=null,i=null,r=null;const s={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach((t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,s.left={width:l};break;case"EAST":a=t,s.right={width:l};break;case"NORTH":o=t,s.top={height:c};break;case"SOUTH":i=t,s.bottom={height:c};break;case"CENTER":r=t;break;default:ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.unadaptedLayout",{layoutPos:e.modelData.layoutPos.layoutPos}))}}));for(const t in s)(s[t].width||s[t].height)&&(s[t].flexShrink=0);return E("div",{class:this.classArr},[E("div",{class:[this.ns.e("header")],style:s.top},[o]),E("div",{class:[this.ns.b("content")]},[E("div",{class:this.ns.be("content","left"),style:s.left},[n]),E("div",{class:this.ns.be("content","center")},[r]),E("div",{class:this.ns.be("content","right"),style:s.right},[a])]),E("div",{class:[this.ns.e("footer")],style:s.bottom},[i])])}}));class ye{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new ve(t,e,n);return await o.init(),o}}t("IBizScrollContainer",Yt(ge,(function(t){t.component(ge.name,ge),t.component(me.name,me),st("CONTAINER_CONTAINER_SCROLL",(()=>new ye)),st("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new fe)),st("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new fe)),st("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new fe)),st("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new fe)),st("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new fe))})));class we extends it{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={},this.isLoading=!1}}t("NavPosState",we);const Ce=["is404","isRoutePushed"];class be extends rt{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={},this.ignoreEmbedKey=!1}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find((t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map((t=>t.toLowerCase())),!0))),this.panel.evt.on("onControlEvent",(t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}}));const e=this.rawItemParams.expmode||this.panel.view.params.expmode,n=this.rawItemParams.ignoreembedkey||this.panel.view.params.ignoreembedkey||"";this.ignoreEmbedKey=Object.is(n.toLowerCase(),"true"),"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new we(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(W(this.state.navViewMsgs[e],t),Ce.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new lt({mode:this.routeDepth?ct.ROUTE:ct.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Qt(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}async openViewByPath(t){var e,n,o;const a=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=a,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const n=Qt(this.route,this.routeDepth,!1);(null==(e=t.modalOptions)?void 0:e.replace)?this.router.replace("".concat(n,"/error/404")):this.router.push("".concat(n,"/error/404"))}else if(a===this.state.currentKey&&this.state.navViewMsgs[a].fullPath)(null==(n=t.modalOptions)?void 0:n.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else if(this.state.navViewMsgs[a].fullPath&&this.getExpItemIsCache(t))(null==(o=t.modalOptions)?void 0:o.replace)?this.router.replace(this.state.navViewMsgs[a].fullPath):this.router.push(this.state.navViewMsgs[a].fullPath);else{const e=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(a),this.state.isLoading=!0,await ibiz.commands.execute(ut.TAG,t.viewId,e,t.params,{openMode:"INDEXVIEWTAB",replace:!this.state.currentKey,...t.modalOptions}),this.state.isLoading=!1}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;o(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function Ie(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("NavPosController",be);const Pe=P({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:be,required:!0}},setup(t){const e=t.controller,n=Gt("nav-pos"),o=$(),a=q(),i=g(!1);if(e.setRouter(o),e.routeDepth){const t=Qt(a,e.routeDepth);s((()=>a.fullPath),(()=>{const n=Qt(a,e.routeDepth);if(t===n&&a.matched.length>e.routeDepth){if(a.matched.length===e.routeDepth+1&&(i.value=!!a.name,i.value))return;e.onRouteChange(a)}}),{immediate:!0})}return{ns:n,c:e,isPresetView:i,onViewCreated:t=>{e.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:i}=e;let r=null;if(e.routeOpen){if(this.isPresetView)return E(K,null,null);r=E(w("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?E(t,null,null):null;return i?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ie(e)?e:{default:()=>[e]}):e}})}else{const t=n?y(w("IBizViewShell"),{context:a[n].context,params:a[n].params,key:this.c.ignoreEmbedKey?void 0:n,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=i?E(w("keepAlive"),{include:o,max:30,isKey:!0},Ie(t)?t:{default:()=>[t]}):t}return E("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class De{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new be(t,e,n);return await o.init(),o}}t("IBizNavPos",Yt(Pe,(function(t){t.component(Pe.name,Pe),st("RAWITEM_NAV_POS",(()=>new De))})));class Ee extends it{constructor(){super(...arguments),this.error=null}}class Ne extends rt{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 Ee(null==(t=this.parent)?void 0:t.state)}async validate(){var t;return!this.state.visible||this.model.allowEmpty||this.value?(this.state.error=null,!0):(this.state.error=(null==(t=this.editor)?void 0:t.model.placeHolder)||ibiz.i18n.t("vue3Util.panelComponent.cannotEmpty",{caption:this.model.caption}),!1)}async onInit(){var t,e;await super.onInit(),this.state.required=!this.model.allowEmpty,!0!==this.context.srfreadonly&&"true"!==this.context.srfreadonly&&(null==(t=this.model.editor)?void 0:t.readOnly)&&(this.state.readonly=(null==(e=this.model.editor)?void 0:e.readOnly)||!1),this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await dt(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),await this.validate(),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:pt.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:pt.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:pt.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:pt.ENTER,event:t})}}t("PanelFieldController",Ne);const Oe=P({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:Ne,required:!0},attrs:{type:Object,require:!1}},setup(t){const e=Gt("panel-field"),n=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n),e.is("error",!!t.controller.state.error)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.state.readonly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t),...this.attrs};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=w(this.controller.editorProvider.formEditor);t=y(n,{...e})}else t=E(w("not-supported-editor"),{modelData:this.modelData.editor},null)}return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t,this.controller.state.error&&E("div",{class:this.ns.e("error")},[this.controller.state.error])])}});class Ae{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new Ne(t,e,n);return await o.init(),o}}t("IBizPanelField",Yt(Oe,(function(t){t.component(Oe.name,Oe),st("FIELD",(()=>new Ae))})));class Se extends rt{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",Se);const ze=P({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:Se,required:!0}},setup(t){const e=Gt("panel-rawitem"),n=t.controller,o=g(""),a=g(""),{rawItem:i}=t.modelData;i&&i.cssStyle&&(a.value=i.cssStyle);const r=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return s((()=>n.data),(async t=>{if(t){const e=n.model.rawItem;if(!e)return;let a;const i={...t};"RAW"===e.contentType?a=e.caption:"HTML"===e.contentType&&(a=e.content),a&&e.templateMode&&(a=await ibiz.util.hbs.render(a.replace("//n","\n"),Object.assign(i,{data:{...t}}))),o.value=a}}),{immediate:!0}),{ns:e,classArr:r,tempStyle:a,content:o}},render(){if(this.controller.state.visible)return E("div",{class:this.classArr,style:this.tempStyle,onClick:()=>{this.controller.onClick()}},[E(w("iBizRawItem"),{rawItem:this.modelData,content:this.content},null)])}});class Te{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new Se(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",Yt(ze,(function(t){t.component(ze.name,ze),st("RAWITEM",(()=>new Te)),st("RAWITEM_STATIC_IMAGE",(()=>new Te)),st("RAWITEM_STATIC_LABEL",(()=>new Te)),st("RAWITEM_STATIC_TEXT",(()=>new Te))})));class xe extends it{constructor(){super(...arguments),this.data={}}}class Re{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new xe,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=ht(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}async validate(){return(await Promise.all(Object.values(this.panelItems).map((t=>t.validate())))).every((t=>t))}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const i=this.parent.providers[t.id];if(!i)return;const r=await i.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!mt(t)?await this.initChildrenController(t.panelItems,e,r):(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initChildrenController(t.panelTabPages,e,r)})))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async panelStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}class Be extends it{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Be);class Ve extends rt{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Be(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await ft(t,this.panel.model,this.panel.view.model);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!mt(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e,scriptCode:n}=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 U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!n)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=vt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},n,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new k(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async validate(){return(await Promise.all(this.dataItems.map((t=>t.validate())))).every((t=>t))}async setData(t){const e=ht(this.model),n=t.map((t=>new gt(e,t)));this.dataItems=n.map((t=>new Re(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(yt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=await wt(e,t,this.panel.context,[],this.panel.params);if(!n)throw new V(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error(ibiz.i18n.t("vue3Util.panelComponent.noImplementMethod"))}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",Ve);const je=P({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ve,required:!0}},setup(t){const e=Gt("multi-data-container"),{id:n}=t.modelData;s((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=m(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=m(n.state)}))}))}),{immediate:!0});const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map(((t,e)=>{const n=this.controller.dataItems[e];return E(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return E(w("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!A(a)?e:{default:()=>[e]});var a}))]}})})),E("div",{class:this.classArr},[t])}});class Le{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new Ve(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",Yt(je,(function(t){t.component(je.name,je),st("CONTAINER_CONTAINER_MULTIDATA",(()=>new Le))})));class Me extends it{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Me);class ke extends rt{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Me(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const i=await ft(t,e.model,e.view.model);if(!i)return;this.providers[t.id]=i;const r=await i.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!mt(t)&&await this.initPanelItemControllers(t.panelItems,e,r),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,r)})))}initContainerData(){const{dataSourceType:t,dataName:e,dataRegionType:n,scriptCode:o}=this.model;if("LOGINFORM"!==n)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 U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.bindViewData(this.panel.view,e);break;case"ACTIVEDATAPARAM":if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject"));this.setData(this.dataParent.data[e]);break;case"CUSTOM":{if(!o)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript"));const t=vt.execScriptFn({...this.panel.getEventArgs(),data:this.dataParent.data},o,{isAsync:!1,singleRowReturn:!0});this.setData(t);break}default:throw new k(this.model,ibiz.i18n.t("vue3Util.panelComponent.noSupportedDataSourceType",{dataSourceType:t}))}else this.setLoginForm()}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=ht(this.model),a=o.map((t=>t.id)),i=new gt(o,t);i._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=i,this.childrenStateNotify(yt.LOAD)}setLoginForm(){this.setData({})}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntityLogic"));if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=await wt(e,t,this.panel.context,this.panel.data,this.panel.params);if(!n)throw new V(ibiz.i18n.t("vue3Util.panelComponent.noReturnValue",{appDELogicId:e}));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.noAttribute",{dataName:t}))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguerdEntityBehanior"));if(!e)throw new U(this.model,ibiz.i18n.t("vue3Util.panelComponent.noConfiguredEntity"));const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.sessionView",{dataName:e}));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(ibiz.i18n.t("vue3Util.panelComponent.viewStateAttribute",{dataName:e}))};n(),t.evt.on("onDataChange",(()=>{n()}))}childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}t("SingleDataContainerController",ke);const Ue=P({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:ke,required:!0}},setup(t){const e=Gt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=m(n.state)}));const o=h("renderPanelItem"),a=D((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():E(w("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const n=this.controller.panelItems[t.id];return E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o}))]}}),E("div",{class:this.classArr},[t])}});class _e{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new ke(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",Yt(Ue,(function(t){t.component(Ue.name,Ue),st("CONTAINER_CONTAINER_SINGLEDATA",(()=>new _e))})));class Fe extends it{}t("GridContainerState",Fe);class Ge extends rt{createState(){var t;return new Fe(null==(t=this.parent)?void 0:t.state)}}function We(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("GridContainerController",Ge);const qe=P({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ge,required:!0}},setup(t){const e=Gt("grid-container"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),i=g(void 0),r=g(12);return{ns:e,classArr:o,layoutModel:a,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:r,adaptCols:i}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return E(w("iBizRow"),{class:this.classArr,layout:this.layoutModel},We(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},We(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class $e{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new Ge(t,e,n);return await o.init(),o}}t("IBizGridContainer",Yt(qe,(function(t){t.component(qe.name,qe),st("CONTAINER_CONTAINER_GRID",(()=>new $e))})));class Ke extends it{}t("PanelContainerImageState",Ke);class He extends rt{createState(){var t;return new Ke(null==(t=this.parent)?void 0:t.state)}}function Xe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}t("PanelContainerImageController",He);const Qe=P({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:He,required:!0}},setup(t){const e=Gt("panel-container-image"),{id:n}=t.modelData,o=D((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=D((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=L(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},Xe(n=o.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Xe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return E("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?E("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Je{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new He(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",Yt(Qe,(function(t){t.component(Qe.name,Qe),st("CONTAINER_CONTAINER_IMAGE",(()=>new Je))})));class Ye extends it{}t("PanelContainerGroupState",Ye);class Ze extends rt{createState(){var t;return new Ye(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Ze);class tn{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Ze(t,e,n);return await o.init(),o}}function en(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const nn=P({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Ze,required:!0}},setup(t){const e=Gt("panel-container-group"),n=g(!t.controller.defaultExpansion);return{ns:e,captionText:D((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],i=E(w("iBizRow"),{slot:"content",layout:this.modelData.layout},en(n=a.map((t=>{const e=t.props;return e&&e.controller?E(w("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},en(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=E("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[E("div",{class:[this.ns.be("header","left")]},[E("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),E("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?E("ion-icon",{name:"caret-forward-sharp"},null):E("ion-icon",{name:"caret-down-sharp"},null))])])),E("div",{class:o},[r,E("div",{class:[this.ns.b("content")]},[i])])}});t("IBizPanelContainerGroup",Yt(nn,(function(t){t.component(nn.name,nn),st("CONTAINER_CONTAINER_GROUP",(()=>new tn))})));function on(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!A(t)}const an=P({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:rt,required:!0}},setup(t){const e=Gt("panel-tab-page"),n=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return E(w("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},on(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return E(w("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},on(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class rn{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new rt(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",Yt(an,(function(t){t.component(an.name,an),st("TABPAGE",(()=>new rn))})));class sn extends rt{getPanelItemCustomHtml(t,e){if(0===t.length)return;const n=t[0];return n.layoutPanelModel?vt.execScriptFn({data:e||{}},n.layoutPanelModel,{singleRowReturn:!0,isAsync:!1}):void 0}}const ln=P({name:"IBizPanelItemRender",props:{modelData:{type:Object,required:!0},controller:{type:sn,required:!0}},setup(t){var e;const n=Gt("panel-item-render"),o=Gt("panel-".concat(null==(e=t.modelData.itemType)?void 0:e.toLowerCase())),{id:a}=t.modelData,i=D((()=>[n.b(),n.m(a),o.b(),n.is("hidden",!t.controller.state.visible)])),r=D((()=>t.controller.getPanelItemCustomHtml(t.modelData.controlRenders,t.controller.data)));return{ns:n,classArr:i,htmlCode:r}},render(){return E("div",{class:this.classArr,innerHTML:this.htmlCode},null)}});class cn{constructor(){this.component="IBizPanelItemRender"}async createController(t,e,n){const o=new sn(t,e,n);return await o.init(),o}}t("IBizPanelItemRender",Yt(ln,(function(t){t.component(ln.name,ln),st("PREDEFINE_RENDER",(()=>new cn))})));const un=P({name:"IBizTeleportPlaceholder",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){const e=Gt("teleport-placeholder"),n=g(""),{rawItem:o}=t.modelData;o&&o.cssStyle&&(n.value=o.cssStyle);const a=D((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:a,tempStyle:n}},render(){if(this.controller.state.visible)return E("div",{id:this.controller.state.teleportTag,class:this.classArr,style:this.tempStyle},null)}});class dn extends it{constructor(){super(...arguments),this.teleportTag=""}}class pn extends rt{createState(){var t;return new dn(null==(t=this.parent)?void 0:t.state)}async onInit(){var t,e;await super.onInit();const n=this.panel.view.model.codeName;let o="".concat(null==n?void 0:n.toLowerCase(),"-").concat(this.model.id);const a=null==(e=null==(t=this.model.rawItem)?void 0:t.rawItemParams)?void 0:e.find((t=>"TeleportTag"===t.key));a&&a.value&&(o=a.value),ibiz.log.debug(ibiz.i18n.t("vue3Util.panelComponent.placeholderIdentifier",{viewCodeName:n,id:this.model.id}),o),this.state.teleportTag=o}}class hn{constructor(){this.component="IBizTeleportPlaceholder"}async createController(t,e,n){const o=new pn(t,e,n);return await o.init(),o}}t("TeleportPlaceholderProvider",hn);t("IBizTeleportPlaceholder",Yt(un,(function(t){t.component(un.name,un),st("RAWITEM_TELEPORT_PLACEHOLDER",(()=>new hn))})));const mn=P({name:"IBizPanelContainerTabs",props:{modelData:{type:Object,required:!0},controller:{type:ie,required:!0}},setup:()=>({ns:Gt("panel-container-tabs")}),render(){return y(w("IBizPanelContainer"),{...this.$props,...this.$attrs,class:this.ns.b()},this.$slots)}});class fn{constructor(){this.component="IBizPanelContainerTabs"}async createController(t,e,n){const o=new ie(t,e,n);return await o.init(),o}}t("IBizPanelContainerTabs",Yt(mn,(function(t){t.component(mn.name,mn),st("CONTAINER_TABS",(()=>new fn))}))),t("AppRedirectView",P({setup(){var t;const e=M.create((null==(t=ibiz.appData)?void 0:t.context)||{});I((()=>{e.destroy()}));const{href:n}=window.location;b((()=>ibiz.util.hiddenAppLoading())),async function(){await Ct(e,n)}()},render:()=>E("div",null,[ibiz.i18n.t("vue3Util.view.redirectionProgress")])}));class vn{constructor(){this.component="IBizView"}}const gn=P({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(t,{slots:e}){const n=Gt("view"),o=oe(((...t)=>new Z(...t))),a=bt(o.model),i=[],r=new Map,s=[];a.forEach((t=>{const{teleportFlag:e,teleportTag:n}=It(t);n||e?(i.push(t),r.set(t.id,n||"")):s.push(t)}));const{viewType:l,sysCss:c,codeName:u}=o.model,d=l.toLowerCase(),p=null==c?void 0:c.cssName,h=D((()=>[n.b(),n.b(d),n.m(u),p,o.state.viewMessages.TOP?"has-top-message":"",o.state.viewMessages.BOTTOM?"has-bottom-message":""])),m=t=>{const e=t.name||t.id;return{context:o.context,params:o.params,modelData:t,...o.slotProps[e]||{}}};return{c:o,ns:n,controls:s,teleportControls:i,viewClassNames:h,onLayoutPanelCreated:t=>{o.setLayoutPanel(t)},getCtrlProps:m,renderControl:t=>{const n=t.name||t.id,a=m(t);if(e[n])return z(e,n,a);const i=o.providers[n],r=w((null==i?void 0:i.component)||"IBizControlShell");return i&&(a.provider=i),y(r,a)},getCtrlTeleportTag:t=>{var e,n;const a=r.get(t.id);if(a)return a;const i=null==(n=null==(e=o.parentView)?void 0:e.layoutPanel)?void 0:n.panelItems[t.name];return i?"#".concat(i.state.teleportTag):void 0},getControlStyle:()=>{const t={};return Object.assign(t,{display:o.state.hasError?"none":"initial"}),t}}},render(){var t,e;let n=null;if(this.c.state.isCreated)if(0===this.c.engines.length)n=E("span",{style:"color:red;"},[ibiz.i18n.t("vue3Util.view.viewType",{viewType:this.modelData.viewType})]);else{const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name||t.id;e[n]=()=>this.renderControl(t)}));const o=this.c.model.viewLayoutPanel,a=this.c.providers[o.name];n=y(w(a.component),{modelData:o,context:this.c.context,params:this.c.params,provider:a,container:this.c,style:this.getControlStyle(),onControllerAppear:this.onLayoutPanelCreated},e)}let o=null;this.c.state.isCreated&&(null==(e=this.teleportControls)?void 0:e.length)&&(o=this.teleportControls.map((t=>{let e;const n=this.getCtrlTeleportTag(t);return n?E("div",{style:this.getControlStyle()},[E(S,{to:n,disabled:!this.c.state.activated},(o=e=this.renderControl(t),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]}))]):(ibiz.log.error(ibiz.i18n.t("vue3Util.view.noTeleportTag",{name:t.name})),null);var o})));let a=null;if(this.c.state.hasError&&this.c.error.status){const t=et(this.c.error.status);t&&("string"==typeof t.component&&(a=y(w(t.component))),a=y(t.component))}return N(E("div",{class:this.viewClassNames,id:this.c.id},[n,o,a]),[[O("loading"),this.c.state.isLoading]])}});class yn{constructor(){this.component="IBizView"}createController(t,e,n,o){return new Pt(t,e,n,o)}}t("IBizView",Yt(gn,(function(t){t.component(gn.name,gn),Dt("DEFAULT",(()=>new vn)),Dt("APPDATAUPLOADVIEW",(()=>new yn))}))),t("TodoRedirect",P({setup(){const t=$(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error(ibiz.i18n.t("vue3Util.view.insufficientRedirection"));const a=H.parse(o,{delimiter:";"}),{apptype:i,todotype:r,todoid:s}=a,l={srfapptype:"pc",srfapp:""};i||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(s,"/getlinkurl"),l)).data.linkurl;i?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(r),t.push("/index".concat(e)))}()},render:()=>E("div",null,[ibiz.i18n.t("vue3Util.view.toDoList")])}));class wn{constructor(){this.component="IBizPortalView"}}const Cn=P({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=Gt("view"),n=oe(((...t)=>new Z(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:i,codeName:r}=n.model,s=a.toLowerCase(),l=null==i?void 0:i.cssName,c=[e.b(),e.b(s),e.m(r),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a({modelData:t,...o}));const i=this.c.providers[e];i&&(n[e]=()=>{const e=w(i.component);return y(e,{modelData:t,...o,provider:i})})})),n.dashboard&&(e=n.dashboard())}return E("div",{class:this.viewClassNames},[e])}}),bn=(t("IBizPortalView",Yt(Cn,(function(t){t.component(Cn.name,Cn),Dt(X.APP_PORTAL_VIEW,(()=>new wn)),Dt(X.DE_PORTAL_VIEW,(()=>new wn)),Dt(X.DE_PORTAL_VIEW9,(()=>new wn))}))),P({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=oe(((...t)=>new Z(...t))),n=g(),o=g(),a=g();return e.evt.on("onCreated",(()=>{Et(p(t.modelData),p(e.context),p(e.params)).then((async t=>{if("view"!==t.type)throw new V(ibiz.i18n.t("vue3Util.view.embeddedRedirectionView"));n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?y(w("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):N(E("div",{style:"width: 100%; height: 100%;"},null),[[O("loading"),!this.toViewId]])}}));class In{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",Yt(bn,(function(t){t.component(bn.name,bn);const e=new In;Dt(X.DE_REDIRECT_VIEW,(()=>e))})));function Pn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=vt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}const Dn=P({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:e}){const n=_t(((...e)=>new Nt(...e,t.container))),o=Gt("control-".concat(n.model.controlType.toLowerCase()));s((()=>t.data),(t=>{t&&(n.setInputData(t),n.load())}),{immediate:!0}),n.evt.on("onCreated",(()=>{Object.keys(n.panelItems).forEach((t=>{const e=n.panelItems[t];e.state=m(e.state)}))}));const a=(t,o)=>{var i,r;if(t.hidden)return null;const{providers:s,panelItems:l}=o||n,c=s[t.id];if(!c)return E("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);if("CTRLPOS"!==t.itemType&&e[t.id])return z(e,t.id,{model:t,data:n.data,value:n.data[t.id]});const u=w(c.component);let d;"CTRLPOS"===t.itemType&&e[t.id]?d=()=>e[t.id]():"TABPANEL"===t.itemType&&(null==(i=t.panelTabPages)?void 0:i.length)?d=()=>t.panelTabPages.map((t=>a(t,o))):mt(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>a(t,o))));let p="";t.cssStyle&&(p=t.cssStyle);const h=l[t.id];return y(u,{modelData:t,controller:h,key:t.id,style:p,attrs:Pn(t,h)},d)};return C("renderPanelItem",a),{c:n,ns:o,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class En{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",Yt(Dn,(function(t){t.component(Dn.name,Dn),Ot(At.VIEW_LAYOUT_PANEL,(()=>new En))})));function Nn(t,e){var n;const o={};return null==(n=t.controlAttributes)||n.forEach((t=>{t.attrName&&t.attrValue&&(o[t.attrName]=vt.execSingleLine(t.attrValue,{...e.panel.getEventArgs(),data:e.data}))})),o}function On(t,e,n){var o,a;if(t.hidden)return;const{providers:i,panelItems:r}=e,s=i[t.id];if(!s)return E("div",null,[ibiz.i18n.t("vue3Util.control.unsupportedPanel",{id:t.id,itemType:t.itemType})]);const l=w(s.component);let c;"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>On(t,e,n))):mt(t)?c=void 0:(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>On(t,e,n))));let u="";t.cssStyle&&(u=t.cssStyle);const d=r[t.id];return y(l,{modelData:t,controller:d,key:t.id,style:u,attrs:Nn(t,d)},c)}const An=P({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const e=_t(((...e)=>new St(...e,t.container))),n=Gt("control-".concat(e.model.controlType.toLowerCase()));return s((()=>t.data),(t=>{t&&(e.setInputData(t),e.load())}),{immediate:!0}),e.evt.on("onCreated",(()=>{Object.keys(e.panelItems).forEach((t=>{const n=e.panelItems[t];n.state=m(n.state)}))})),{c:e,ns:n}},render(){const{state:t,model:e}=this.c;return E(w("iBizControlBase"),{controller:this.c},{default:()=>[E(w("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",E(w("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=On(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!A(o)?e:{default:()=>[e]});var o})))]}})]})}});class Sn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",Yt(An,(function(t){t.component(An.name,An),Ot(At.PANEL,(()=>new Sn))})));function zn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Tn(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function xn(t,e){for(var n,o="",a=0,i=-1,r=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===r);else if(i!==s-1&&2===r){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),i=s,r=0;continue}}else if(2===o.length||1===o.length){o="",a=0,i=s,r=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(i+1,s):o=t.slice(i+1,s),a=s-i-1;i=s,r=0}else 46===n&&-1!==r?++r:r=-1}return o}var Rn={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),Tn(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=xn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(Tn(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=xn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Tn(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];Tn(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":Rn.normalize(t)},relative:function(t,e){if(Tn(t),Tn(e),t===e)return"";if((t=Rn.resolve(t))===(e=Rn.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var r=e.length-i,s=a<r?a:r,l=-1,c=0;c<=s;++c){if(c===s){if(r>s){if(47===e.charCodeAt(i+c))return e.slice(i+c+1);if(0===c)return e.slice(i+c)}else a>s&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(i+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(i+l):(i+=l,47===e.charCodeAt(i)&&++i,e.slice(i))},_makeLong:function(t){return t},dirname:function(t){if(Tn(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!a){o=i;break}}else a=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');Tn(t);var n,o=0,a=-1,i=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var r=e.length-1,s=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!i){o=n+1;break}}else-1===s&&(i=!1,s=n+1),r>=0&&(l===e.charCodeAt(r)?-1==--r&&(a=n):(r=-1,a=s))}return o===a?a=s:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!i){o=n+1;break}}else-1===a&&(i=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){Tn(t);for(var e=-1,n=0,o=-1,a=!0,i=0,r=t.length-1;r>=0;--r){var s=t.charCodeAt(r);if(47!==s)-1===o&&(a=!1,o=r+1),46===s?-1===e?e=r:1!==i&&(i=1):-1!==e&&(i=-1);else if(!a){n=r+1;break}}return-1===e||-1===o||0===i||1===i&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){Tn(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var i=-1,r=0,s=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===s&&(l=!1,s=c+1),46===o?-1===i?i=c:1!==u&&(u=1):-1!==i&&(u=-1);else if(!l){r=c+1;break}return-1===i||-1===s||0===u||1===u&&i===s-1&&i===r+1?-1!==s&&(e.base=e.name=0===r&&a?t.slice(1,s):t.slice(r,s)):(0===r&&a?(e.name=t.slice(1,i),e.base=t.slice(1,s)):(e.name=t.slice(r,i),e.base=t.slice(r,s)),e.ext=t.slice(i,s)),r>0?e.dir=t.slice(0,r-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Rn.posix=Rn;var Bn=Rn,Vn=zn(Bn);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some((e=>"string"==typeof e?t===e:e.test(t)))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach((e=>{t.use(e)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),Bt.useComponent.callSync(null,t)}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new U(e,ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"))}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(Bn.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));n=a.data}const o=new zt(t,e,n);if(o){await this.loadPluginExternal(o.config);try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let i="";if(i=Bn.join(e,o),i){if(this.cache.has(i))return;let t=null;const o=this.parseUrl(i),r=("string"==typeof a?[a]:a).map((t=>this.parseUrl(Vn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new V(ibiz.i18n.t("vue3Util.plugin.fileContentFormat"));if(!t.default)throw new V(ibiz.i18n.t("vue3Util.plugin.failedRemotePluginLoad"));this.setPluginCode(t.default),this.cache.set(i,!0)}}parseUrl(t,e=ibiz.env.pluginBaseUrl){if(this.urlReg.test(t))return t;let n="";n=this.urlReg.test(e)?t.startsWith("/")?e+t:"".concat(e,"/").concat(t):"".concat(Bn.join(e,t));const{origin:o,pathname:a}=window.location;return a.endsWith("/")&&n.startsWith("/")&&(n=n.substring(1)),!1===this.urlReg.test(n)&&(n="".concat(o).concat(a).concat(n)),n}async loadPluginExternal(t){if(!t["systemjs-importmap"])return;const e=this.handleSystemImportMap(t["systemjs-importmap"]);if(e.packages){const t=e.packages;for(const e in t){const n=t[e],o=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:n});if(200!==o.status)throw new Error(ibiz.i18n.t("vue3Util.plugin.failureConfigurationLoad"));await this.loadPluginExternal(o.data)}}System.addImportMap(e)}handleSystemImportMap(t){if(t){if(t.packages){const e=t.packages;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.imports){const e=t.imports;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]=this.parseUrl(o,t.baseUrl)}}if(t.styles){const e=t.styles;for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=e[n];e[n]="string"==typeof o?this.parseUrl(o,t.baseUrl):o.map((e=>this.parseUrl(e,t.baseUrl)))}}return t}return null}});class jn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function Ln(){return{value:String,controller:new jn(Object),data:new jn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function Mn(){return{hasError:{type:Boolean}}}function kn(){return{...Ln(),value:[String,Number]}}function Un(){return{...Ln(),value:Number}}function _n(){return{...Ln(),value:String}}function Fn(){return{...Ln(),value:[String,Number,Object,Array]}}function Gn(){return{...Ln(),value:[String,Number]}}function Wn(){return{...Ln(),value:[String,Number]}}function qn(){return{...Ln(),value:[String,Number]}}function $n(){return{...Ln(),value:[String,Array,Object,Number]}}function Kn(){return{...Ln(),value:[String,Number]}}function Hn(){return{...Ln(),value:[String,Number]}}function Xn(){return{...Ln(),value:[String,Number]}}function Qn(){return{...Ln(),value:[String,Number]}}function Jn(){return{...Ln(),value:[String,Number]}}function Yn(){return{...Ln(),value:[String,Number]}}function Zn(){return{...Ln(),value:[String,Number,Array]}}function to(){return{...Ln(),value:[String,Number]}}function eo(){return{...Ln(),value:[String,Number]}}function no(){return{...Ln(),value:[String,Number]}}function oo(){return{...Ln(),value:String}}function ao(){return{...Ln(),value:[String,Number]}}function io(){return{...Ln(),value:String,language:{type:String},theme:{type:String}}}function ro(){return{...Ln(),value:String}}function so(){return{...Ln(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function lo(){return{...Ln(),value:[Array,Array]}}function co(){return{...Ln(),value:String}}function uo(){return{...Ln(),value:String}}t("RequiredProp",jn);t("en",{vue3Util:{common:{undefined:"undefined",onFoundCorrespondingPart:"Undefined adapter with no corresponding part found",noFoundViewModel:"View model not found",noSupportLoadingDynamic:"{codeName}No entity, do not support loading dynamic models at this time"},control:{unsupportedPanel:"Unsupported panel items: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"No data object name config",noSupportedDataSourceType:"The data source type {dataSourceType} is not supported",noConfiguredEntityLogic:"No entity logic config",noConfiguredEntity:"No entity config",noReturnValue:"The entity logic {appDELogicId} has no return value",noAttribute:"There is no {dataName} attribute in the global variable.",noConfiguredScript:"No javaScript config",noConfiguerdEntityBehanior:"No entity behavior config",sessionView:"The session to which the view is bound does not exist {dataName}",viewStateAttribute:"There is no {dataName} attribute in the view state",noImplementMethod:"Method not implemented.",noProvidedSlot:"No {id} slot provided",cannotEmpty:"{caption} cannot be empty",unadaptedLayout:"Unadapted layout placeholder {layoutPos}",placeholderIdentifier:"The placeholder identifier for panel member {id} of view {viewCodeName} is:"},plugin:{failureConfigurationLoad:"Configuration load failure",failedRemotePluginLoad:"Remote Plugin failed to load, Remote Plugin did not find [default] Default Export",fileContentFormat:"Remote plugin failed to load, file not found or file content format is incorrect"},use:{control:{parameterChanges:"Context or view parameter changes for {id}:",stateChange:"Part [{name}] state change"},focusBlur:{noFocus:"No focus, no out-of-focus triggering"},view:{stateChange:"View [{{name}] state change"}},util:{noInjected:"The createVueApp method is not injected.",convertString:"Failed to convert to string",viewIdentifiers:"View identifiers do not exist for {depth} level routes",noFoundView:"View not found {viewCodeName}",routeCorrectly:"Cannot get the route correctly, could be a dependency issue."},view:{redirectionProgress:"Redirection in progress",viewType:"View type {viewType} is not supported yet.",noTeleportTag:"No teleportTag was found for part {name}.",embeddedRedirectionView:"Embedded redirection view does not support url jumping",insufficientRedirection:"Insufficient redirection parameters to jump",toDoList:"To-Do List Redirection"}}}),t("zhCn",{vue3Util:{common:{undefined:"未定义",onFoundCorrespondingPart:"未定义未找到对应部件的适配器",noFoundViewModel:"未找到视图模型",noSupportLoadingDynamic:"{codeName}无实体,暂不支持加载动态模型"},control:{unsupportedPanel:"暂未支持的面板项: {id} - {itemType}"},panelComponent:{noConfiguardDataObject:"没有配置数据对象名称",noSupportedDataSourceType:"数据源类型{dataSourceType}暂未支持",noConfiguredEntityLogic:"没有配置实体逻辑",noConfiguredEntity:"没有配置实体",noReturnValue:"实体逻辑{appDELogicId}没有返回值",noAttribute:"全局变量里没有{dataName}属性",noConfiguredScript:"没有配置脚本代码",noConfiguerdEntityBehanior:"没有配置实体行为",sessionView:"绑定视图的会话不存在{dataName}",viewStateAttribute:"视图state里没有{dataName}属性",noImplementMethod:"未执行的方法",noProvidedSlot:"未提供{id}插槽",cannotEmpty:"{caption} 不能为空",unadaptedLayout:"未适配的布局占位{layoutPos}",placeholderIdentifier:"视图{viewCodeName}的面板成员{id}的占位标识是:"},plugin:{failureConfigurationLoad:"配置加载失败",failedRemotePluginLoad:"远程插件加载失败, 远程插件未找到[default]默认导出",fileContentFormat:"远程插件加载失败, 未找到文件或文件内容格式不正确"},use:{control:{parameterChanges:"{id}的上下文或视图参数变更:",stateChange:"部件 [{name}] state 变更"},focusBlur:{noFocus:"没有聚焦,不触发失焦"},view:{stateChange:"视图 [{name}] state 变更"}},util:{noInjected:"没有注入createVueApp方法",convertString:"转换成字符串失败",viewIdentifiers:"第{depth}级路由不存在视图标识",noFoundView:"找不到视图{viewCodeName}",routeCorrectly:"无法正确获取route,可能是依赖问题"},view:{redirectionProgress:"重定向跳转中",viewType:"视图类型{viewType}暂未支持",noTeleportTag:"没有找到部件{name}的teleportTag",embeddedRedirectionView:"嵌入重定向视图不支持url跳转",insufficientRedirection:"重定向参数不足无法跳转",toDoList:"待办列表重定向"}}})}}}));
|
|
@@ -26,6 +26,16 @@ export declare const IBizCodeList: import("vue").DefineComponent<{
|
|
|
26
26
|
value: {
|
|
27
27
|
type: (StringConstructor | NumberConstructor)[];
|
|
28
28
|
};
|
|
29
|
+
convertToCodeItemText: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
valueFormat: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
unitName: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
29
39
|
}, {
|
|
30
40
|
items: import("vue").Ref<IData[]>;
|
|
31
41
|
ns: import("@ibiz-template/core").Namespace;
|
|
@@ -57,7 +67,19 @@ export declare const IBizCodeList: import("vue").DefineComponent<{
|
|
|
57
67
|
value: {
|
|
58
68
|
type: (StringConstructor | NumberConstructor)[];
|
|
59
69
|
};
|
|
70
|
+
convertToCodeItemText: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
valueFormat: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
};
|
|
77
|
+
unitName: {
|
|
78
|
+
type: StringConstructor;
|
|
79
|
+
};
|
|
60
80
|
}>> & {
|
|
61
81
|
onInfoTextChange?: ((_text: string) => any) | undefined;
|
|
62
|
-
}, {
|
|
82
|
+
}, {
|
|
83
|
+
convertToCodeItemText: boolean;
|
|
84
|
+
}, {}>;
|
|
63
85
|
//# sourceMappingURL=code-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-list.d.ts","sourceRoot":"","sources":["../../../src/common/code-list/code-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"code-list.d.ts","sourceRoot":"","sources":["../../../src/common/code-list/code-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAsB,MAAM,wBAAwB,CAAC;AAE1E,OAAO,EAAmB,QAAQ,EAAc,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,kBAAkB,CAAC;AAG1B,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAyBG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuHhC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { calcThresholdRange } from '@ibiz-template/runtime';
|
|
2
3
|
import { isNil } from 'ramda';
|
|
4
|
+
import { isNumber } from 'lodash-es';
|
|
3
5
|
import './code-list.css';
|
|
4
6
|
import '../../use/index.mjs';
|
|
5
7
|
import { useNamespace } from '../../use/namespace/namespace.mjs';
|
|
@@ -17,6 +19,16 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
17
19
|
},
|
|
18
20
|
value: {
|
|
19
21
|
type: [String, Number]
|
|
22
|
+
},
|
|
23
|
+
convertToCodeItemText: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
27
|
+
valueFormat: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
unitName: {
|
|
31
|
+
type: String
|
|
20
32
|
}
|
|
21
33
|
},
|
|
22
34
|
emits: {
|
|
@@ -39,6 +51,15 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
39
51
|
});
|
|
40
52
|
const findCodeListItem = (codelist, value) => {
|
|
41
53
|
if (codelist) {
|
|
54
|
+
const {
|
|
55
|
+
thresholdGroup
|
|
56
|
+
} = props.codeList;
|
|
57
|
+
if (thresholdGroup && isNumber(Number(value))) {
|
|
58
|
+
const findItem2 = calcThresholdRange(codelist, Number(value));
|
|
59
|
+
if (findItem2) {
|
|
60
|
+
return findItem2;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
42
63
|
const findItem = codelist.find((item) => item.value == value);
|
|
43
64
|
if (findItem) {
|
|
44
65
|
return findItem;
|
|
@@ -58,8 +79,23 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
58
79
|
const values = typeof value === "string" ? value.split(valueSeparator) : [value];
|
|
59
80
|
items.value = values.map((val) => {
|
|
60
81
|
const findItem = findCodeListItem(codeListItems, val);
|
|
82
|
+
let codeValue = val;
|
|
83
|
+
if (props.convertToCodeItemText && (findItem == null ? void 0 : findItem.text)) {
|
|
84
|
+
codeValue = findItem.text;
|
|
85
|
+
} else {
|
|
86
|
+
const {
|
|
87
|
+
valueFormat,
|
|
88
|
+
unitName
|
|
89
|
+
} = props;
|
|
90
|
+
if (valueFormat) {
|
|
91
|
+
codeValue = ibiz.util.text.format("".concat(codeValue), valueFormat);
|
|
92
|
+
}
|
|
93
|
+
if (unitName) {
|
|
94
|
+
codeValue += unitName;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
61
97
|
return {
|
|
62
|
-
text:
|
|
98
|
+
text: codeValue,
|
|
63
99
|
color: findItem == null ? void 0 : findItem.color,
|
|
64
100
|
textCls: findItem == null ? void 0 : findItem.textCls,
|
|
65
101
|
sysImage: findItem == null ? void 0 : findItem.sysImage
|
package/es/locale/en/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/en/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEd,CAAC"}
|
package/es/locale/en/index.mjs
CHANGED
|
@@ -11,13 +11,14 @@ const en = {
|
|
|
11
11
|
unsupportedPanel: "Unsupported panel items: {id} - {itemType}"
|
|
12
12
|
},
|
|
13
13
|
panelComponent: {
|
|
14
|
-
noConfiguardDataObject: "No data object name
|
|
15
|
-
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported
|
|
16
|
-
noConfiguredEntityLogic: "No entity logic
|
|
17
|
-
noConfiguredEntity: "No entity
|
|
14
|
+
noConfiguardDataObject: "No data object name config",
|
|
15
|
+
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported",
|
|
16
|
+
noConfiguredEntityLogic: "No entity logic config",
|
|
17
|
+
noConfiguredEntity: "No entity config",
|
|
18
18
|
noReturnValue: "The entity logic {appDELogicId} has no return value",
|
|
19
19
|
noAttribute: "There is no {dataName} attribute in the global variable.",
|
|
20
|
-
|
|
20
|
+
noConfiguredScript: "No javaScript config",
|
|
21
|
+
noConfiguerdEntityBehanior: "No entity behavior config",
|
|
21
22
|
sessionView: "The session to which the view is bound does not exist {dataName}",
|
|
22
23
|
viewStateAttribute: "There is no {dataName} attribute in the view state",
|
|
23
24
|
noImplementMethod: "Method not implemented.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/locale/zh-CN/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DhB,CAAC"}
|
|
@@ -17,6 +17,7 @@ const zhCn = {
|
|
|
17
17
|
noConfiguredEntity: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53",
|
|
18
18
|
noReturnValue: "\u5B9E\u4F53\u903B\u8F91{appDELogicId}\u6CA1\u6709\u8FD4\u56DE\u503C",
|
|
19
19
|
noAttribute: "\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
20
|
+
noConfiguredScript: "\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801",
|
|
20
21
|
noConfiguerdEntityBehanior: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A",
|
|
21
22
|
sessionView: "\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728{dataName}",
|
|
22
23
|
viewStateAttribute: "\u89C6\u56FEstate\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container/multi-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,6BAA6B,EAC7B,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"multi-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/multi-data-container/multi-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,6BAA6B,EAC7B,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;;GAMG;AACH,qBAAa,4BACX,SAAQ,mBAAmB,CAAC,eAAe,CAC3C,YAAW,6BAA6B;IAEhC,KAAK,EAAE,uBAAuB,CAAC;IAEvC,QAAQ,CAAC,eAAe,QAAQ;IAEhC;;;;;;OAMG;IACH,SAAS,EAAE,gCAAgC,EAAE,CAAM;IAEnD;;;;;;OAMG;IACH,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAA;KAAE,CAAM;IAEtD;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,KAAK,CAEhB;IAED,SAAS,CAAC,WAAW,IAAI,uBAAuB;cAIhC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAMvC;;;;;;OAMG;cACa,sBAAsB,CACpC,UAAU,GAAE,UAAU,EAAE,GAAG,SAAiC,GAC3D,OAAO,CAAC,IAAI,CAAC;IAkChB;;;;;OAKG;IACH,SAAS,CAAC,iBAAiB,IAAI,IAAI;IA0EnC;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAMlD;;;;;OAKG;IACG,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IAOlC;;;;;OAKG;IACG,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB5C;;;;;;OAMG;cACa,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCjD;;;;;OAKG;IACH,SAAS,CAAC,uBAAuB,IAAI,IAAI;IAYzC;;;;;;OAMG;cACa,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BlD;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IA2BrE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelError, RuntimeModelError, RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { PanelItemController, getPanelItemProvider, isDataContainer, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelItemController, getPanelItemProvider, isDataContainer, ScriptFactory, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
3
3
|
import { MultiDataContainerItemController } from './multi-data-container-item.controller.mjs';
|
|
4
4
|
import { MultiDataContainerState } from './multi-data-container.state.mjs';
|
|
5
5
|
|
|
@@ -87,7 +87,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
87
87
|
* @protected
|
|
88
88
|
*/
|
|
89
89
|
initContainerData() {
|
|
90
|
-
const { dataSourceType, dataName } = this.model;
|
|
90
|
+
const { dataSourceType, dataName, scriptCode } = this.model;
|
|
91
91
|
switch (dataSourceType) {
|
|
92
92
|
case "DEACTION":
|
|
93
93
|
case "DEDATASET":
|
|
@@ -119,6 +119,37 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
119
119
|
this.bindViewData(this.panel.view, dataName);
|
|
120
120
|
break;
|
|
121
121
|
}
|
|
122
|
+
case "ACTIVEDATAPARAM": {
|
|
123
|
+
if (!dataName) {
|
|
124
|
+
throw new RuntimeModelError(
|
|
125
|
+
this.model,
|
|
126
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
this.setData(this.dataParent.data[dataName]);
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case "CUSTOM": {
|
|
133
|
+
if (!scriptCode) {
|
|
134
|
+
throw new RuntimeModelError(
|
|
135
|
+
this.model,
|
|
136
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
const computeData = ScriptFactory.execScriptFn(
|
|
140
|
+
{
|
|
141
|
+
...this.panel.getEventArgs(),
|
|
142
|
+
data: this.dataParent.data
|
|
143
|
+
},
|
|
144
|
+
scriptCode,
|
|
145
|
+
{
|
|
146
|
+
isAsync: false,
|
|
147
|
+
singleRowReturn: true
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
this.setData(computeData);
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
122
153
|
default:
|
|
123
154
|
throw new ModelError(
|
|
124
155
|
this.model,
|
|
@@ -159,7 +159,7 @@ export declare class NavPosController extends PanelItemController<IPanelRawItem>
|
|
|
159
159
|
* @param {INavViewMsg} openViewMsg
|
|
160
160
|
* @memberof NavPosController
|
|
161
161
|
*/
|
|
162
|
-
openViewByPath(openViewMsg: INavViewMsg): void
|
|
162
|
+
openViewByPath(openViewMsg: INavViewMsg): Promise<void>;
|
|
163
163
|
/**
|
|
164
164
|
* 通过模型绘制视图
|
|
165
165
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAIrC,YAAY,IAAI,IAAI;IAKpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAiBxC;;;;;OAKG;
|
|
1
|
+
{"version":3,"file":"nav-pos.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EAGN,0BAA0B,EAE1B,WAAW,EAEX,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK9C;;;;;;GAMG;AACH,qBAAa,gBACX,SAAQ,mBAAmB,CAAC,aAAa,CACzC,YAAW,0BAA0B;IAErC;;;;;OAKG;IACK,KAAK,EAAE,WAAW,CAAC;IAE3B;;;;;OAKG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C;;;;;OAKG;IACH,aAAa,EAAG,WAAW,CAAC;IAE5B;;;;;OAKG;IACH,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,EAAE,CAAM;IAE3B;;;;;;;OAOG;IACH,aAAa,EAAE,KAAK,CAAM;IAE1B;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAS;IAEhC;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,6BAA6B,CAEzC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO;IAUnD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;cAIf,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAoDvC;;;;;;OAMG;IACH,SAAS,CAAC,WAAW,IAAI,WAAW;IAIpC;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,MAAM;IAOhD;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,6BAA6B,GAAG,IAAI;IAazD;;;;;;;OAOG;IACH,cAAc,CAAC,UAAU,EAAE,WAAW,GAAG,IAAI;IAiC7C;;;;;OAKG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAIrC,YAAY,IAAI,IAAI;IAKpB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAiBxC;;;;;OAKG;IACG,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAwE7D;;;;;OAKG;IACH,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAM/C;;;;;;;OAOG;IACH,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAWtC"}
|
|
@@ -242,7 +242,7 @@ class NavPosController extends PanelItemController {
|
|
|
242
242
|
* @param {INavViewMsg} openViewMsg
|
|
243
243
|
* @memberof NavPosController
|
|
244
244
|
*/
|
|
245
|
-
openViewByPath(openViewMsg) {
|
|
245
|
+
async openViewByPath(openViewMsg) {
|
|
246
246
|
var _a, _b, _c;
|
|
247
247
|
const cacheKey = this.calcCacheKey(openViewMsg);
|
|
248
248
|
this.setNavViewMsgs(openViewMsg);
|
|
@@ -285,7 +285,8 @@ class NavPosController extends PanelItemController {
|
|
|
285
285
|
if (this.getExpItemIsCache(openViewMsg)) {
|
|
286
286
|
this.state.cacheKeys.push(cacheKey);
|
|
287
287
|
}
|
|
288
|
-
|
|
288
|
+
this.state.isLoading = true;
|
|
289
|
+
await ibiz.commands.execute(
|
|
289
290
|
OpenAppViewCommand.TAG,
|
|
290
291
|
openViewMsg.viewId,
|
|
291
292
|
tempContext,
|
|
@@ -296,6 +297,7 @@ class NavPosController extends PanelItemController {
|
|
|
296
297
|
...openViewMsg.modalOptions
|
|
297
298
|
}
|
|
298
299
|
);
|
|
300
|
+
this.state.isLoading = false;
|
|
299
301
|
}
|
|
300
302
|
}
|
|
301
303
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAKT,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;2BAee,SAAS,KAAG,IAAI;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"nav-pos.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EAKT,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,CAAC;AAIxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;2BAee,SAAS,KAAG,IAAI;;;;;;;;;;YAuGhD,CAAC"}
|
|
@@ -46,5 +46,12 @@ export declare class NavPosState extends PanelItemState {
|
|
|
46
46
|
navViewMsgs: {
|
|
47
47
|
[p: string]: INavViewMsg;
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* 视图是否正在加载
|
|
51
|
+
*
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @memberof NavPosState
|
|
54
|
+
*/
|
|
55
|
+
isLoading: boolean;
|
|
49
56
|
}
|
|
50
57
|
//# sourceMappingURL=nav-pos.state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-pos.state.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,cAAc;IAC7C;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAQ;IAEtB;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAQ;IAE1B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAM;IAExB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAmB;IAEtC;;;;;OAKG;IACH,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAM;
|
|
1
|
+
{"version":3,"file":"nav-pos.state.d.ts","sourceRoot":"","sources":["../../../src/panel-component/nav-pos/nav-pos.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAErE;;;;;;GAMG;AACH,qBAAa,WAAY,SAAQ,cAAc;IAC7C;;;;;OAKG;IACH,KAAK,EAAE,OAAO,CAAQ;IAEtB;;;;;;;OAOG;IACH,SAAS,EAAE,OAAO,CAAQ;IAE1B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAM;IAExB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAmB;IAEtC;;;;;OAKG;IACH,WAAW,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;KAAE,CAAM;IAE/C;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAS;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"single-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/single-data-container/single-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"single-data-container.controller.d.ts","sourceRoot":"","sources":["../../../src/panel-component/single-data-container/single-data-container.controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,gBAAgB,EAChB,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAElB,eAAe,EAEf,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;GAMG;AACH,qBAAa,6BACX,SAAQ,mBAAmB,CAAC,eAAe,CAC3C,YAAW,6BAA6B;IAEhC,KAAK,EAAE,wBAAwB,CAAC;IAExC,QAAQ,CAAC,eAAe,QAAQ;IAEhC;;;;;;OAMG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAAE,CAAM;IAEzD;;;;;;OAMG;IACH,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAA;KAAE,CAAM;IAEtD;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,KAAK,CAEhB;IAED,SAAS,CAAC,WAAW,IAAI,wBAAwB;cAIjC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAMvC;;;;;;OAMG;cACa,wBAAwB,CACtC,UAAU,GAAE,UAAU,EAAE,GAAG,SAAiC,EAC5D,KAAK,GAAE,gBAA6B,EACpC,MAAM,GAAE,6BAA6B,GAAG,SAAgB,GACvD,OAAO,CAAC,IAAI,CAAC;IA4ChB;;;;;OAKG;IACH,SAAS,CAAC,iBAAiB,IAAI,IAAI;IA+EnC;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAMlD;;;;;OAKG;IACG,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBzC;;;;;OAKG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI;IAI9B;;;;;;OAMG;cACa,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCjD;;;;;OAKG;IACH,SAAS,CAAC,uBAAuB,IAAI,IAAI;IAYzC;;;;;;OAMG;cACa,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BlD;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IA2BrE;;;;;;OAMG;IACH,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAM5C;;;;;OAKG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAa/D,OAAO,IAAI,IAAI;CAOhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelError, RuntimeModelError, RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { PanelItemController, getPanelItemProvider, isDataContainer, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelItemController, getPanelItemProvider, isDataContainer, ScriptFactory, getAllPanelField, PanelData, PanelNotifyState, execDELogicById } from '@ibiz-template/runtime';
|
|
3
3
|
import { SingleDataContainerState } from './single-data-container.state.mjs';
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
@@ -96,7 +96,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
96
96
|
* @protected
|
|
97
97
|
*/
|
|
98
98
|
initContainerData() {
|
|
99
|
-
const { dataSourceType, dataName, dataRegionType } = this.model;
|
|
99
|
+
const { dataSourceType, dataName, dataRegionType, scriptCode } = this.model;
|
|
100
100
|
if (dataRegionType === "LOGINFORM") {
|
|
101
101
|
this.setLoginForm();
|
|
102
102
|
return;
|
|
@@ -132,6 +132,37 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
132
132
|
this.bindViewData(this.panel.view, dataName);
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
|
+
case "ACTIVEDATAPARAM": {
|
|
136
|
+
if (!dataName) {
|
|
137
|
+
throw new RuntimeModelError(
|
|
138
|
+
this.model,
|
|
139
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
this.setData(this.dataParent.data[dataName]);
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
case "CUSTOM": {
|
|
146
|
+
if (!scriptCode) {
|
|
147
|
+
throw new RuntimeModelError(
|
|
148
|
+
this.model,
|
|
149
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
const computeData = ScriptFactory.execScriptFn(
|
|
153
|
+
{
|
|
154
|
+
...this.panel.getEventArgs(),
|
|
155
|
+
data: this.dataParent.data
|
|
156
|
+
},
|
|
157
|
+
scriptCode,
|
|
158
|
+
{
|
|
159
|
+
isAsync: false,
|
|
160
|
+
singleRowReturn: true
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
this.setData(computeData);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
135
166
|
default:
|
|
136
167
|
throw new ModelError(
|
|
137
168
|
this.model,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
|
+
var runtime = require('@ibiz-template/runtime');
|
|
4
5
|
var ramda = require('ramda');
|
|
6
|
+
var lodashEs = require('lodash-es');
|
|
5
7
|
require('./code-list.css');
|
|
6
8
|
require('../../use/index.cjs');
|
|
7
9
|
var namespace = require('../../use/namespace/namespace.cjs');
|
|
@@ -19,6 +21,16 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
19
21
|
},
|
|
20
22
|
value: {
|
|
21
23
|
type: [String, Number]
|
|
24
|
+
},
|
|
25
|
+
convertToCodeItemText: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
valueFormat: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
unitName: {
|
|
33
|
+
type: String
|
|
22
34
|
}
|
|
23
35
|
},
|
|
24
36
|
emits: {
|
|
@@ -41,6 +53,15 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
41
53
|
});
|
|
42
54
|
const findCodeListItem = (codelist, value) => {
|
|
43
55
|
if (codelist) {
|
|
56
|
+
const {
|
|
57
|
+
thresholdGroup
|
|
58
|
+
} = props.codeList;
|
|
59
|
+
if (thresholdGroup && lodashEs.isNumber(Number(value))) {
|
|
60
|
+
const findItem2 = runtime.calcThresholdRange(codelist, Number(value));
|
|
61
|
+
if (findItem2) {
|
|
62
|
+
return findItem2;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
44
65
|
const findItem = codelist.find((item) => item.value == value);
|
|
45
66
|
if (findItem) {
|
|
46
67
|
return findItem;
|
|
@@ -60,8 +81,23 @@ const IBizCodeList = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
81
|
const values = typeof value === "string" ? value.split(valueSeparator) : [value];
|
|
61
82
|
items.value = values.map((val) => {
|
|
62
83
|
const findItem = findCodeListItem(codeListItems, val);
|
|
84
|
+
let codeValue = val;
|
|
85
|
+
if (props.convertToCodeItemText && (findItem == null ? void 0 : findItem.text)) {
|
|
86
|
+
codeValue = findItem.text;
|
|
87
|
+
} else {
|
|
88
|
+
const {
|
|
89
|
+
valueFormat,
|
|
90
|
+
unitName
|
|
91
|
+
} = props;
|
|
92
|
+
if (valueFormat) {
|
|
93
|
+
codeValue = ibiz.util.text.format("".concat(codeValue), valueFormat);
|
|
94
|
+
}
|
|
95
|
+
if (unitName) {
|
|
96
|
+
codeValue += unitName;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
63
99
|
return {
|
|
64
|
-
text:
|
|
100
|
+
text: codeValue,
|
|
65
101
|
color: findItem == null ? void 0 : findItem.color,
|
|
66
102
|
textCls: findItem == null ? void 0 : findItem.textCls,
|
|
67
103
|
sysImage: findItem == null ? void 0 : findItem.sysImage
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -13,13 +13,14 @@ const en = {
|
|
|
13
13
|
unsupportedPanel: "Unsupported panel items: {id} - {itemType}"
|
|
14
14
|
},
|
|
15
15
|
panelComponent: {
|
|
16
|
-
noConfiguardDataObject: "No data object name
|
|
17
|
-
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported
|
|
18
|
-
noConfiguredEntityLogic: "No entity logic
|
|
19
|
-
noConfiguredEntity: "No entity
|
|
16
|
+
noConfiguardDataObject: "No data object name config",
|
|
17
|
+
noSupportedDataSourceType: "The data source type {dataSourceType} is not supported",
|
|
18
|
+
noConfiguredEntityLogic: "No entity logic config",
|
|
19
|
+
noConfiguredEntity: "No entity config",
|
|
20
20
|
noReturnValue: "The entity logic {appDELogicId} has no return value",
|
|
21
21
|
noAttribute: "There is no {dataName} attribute in the global variable.",
|
|
22
|
-
|
|
22
|
+
noConfiguredScript: "No javaScript config",
|
|
23
|
+
noConfiguerdEntityBehanior: "No entity behavior config",
|
|
23
24
|
sessionView: "The session to which the view is bound does not exist {dataName}",
|
|
24
25
|
viewStateAttribute: "There is no {dataName} attribute in the view state",
|
|
25
26
|
noImplementMethod: "Method not implemented.",
|
|
@@ -19,6 +19,7 @@ const zhCn = {
|
|
|
19
19
|
noConfiguredEntity: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53",
|
|
20
20
|
noReturnValue: "\u5B9E\u4F53\u903B\u8F91{appDELogicId}\u6CA1\u6709\u8FD4\u56DE\u503C",
|
|
21
21
|
noAttribute: "\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
22
|
+
noConfiguredScript: "\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801",
|
|
22
23
|
noConfiguerdEntityBehanior: "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u884C\u4E3A",
|
|
23
24
|
sessionView: "\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728{dataName}",
|
|
24
25
|
viewStateAttribute: "\u89C6\u56FEstate\u91CC\u6CA1\u6709{dataName}\u5C5E\u6027",
|
|
@@ -89,7 +89,7 @@ class MultiDataContainerController extends runtime.PanelItemController {
|
|
|
89
89
|
* @protected
|
|
90
90
|
*/
|
|
91
91
|
initContainerData() {
|
|
92
|
-
const { dataSourceType, dataName } = this.model;
|
|
92
|
+
const { dataSourceType, dataName, scriptCode } = this.model;
|
|
93
93
|
switch (dataSourceType) {
|
|
94
94
|
case "DEACTION":
|
|
95
95
|
case "DEDATASET":
|
|
@@ -121,6 +121,37 @@ class MultiDataContainerController extends runtime.PanelItemController {
|
|
|
121
121
|
this.bindViewData(this.panel.view, dataName);
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
|
+
case "ACTIVEDATAPARAM": {
|
|
125
|
+
if (!dataName) {
|
|
126
|
+
throw new core.RuntimeModelError(
|
|
127
|
+
this.model,
|
|
128
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
this.setData(this.dataParent.data[dataName]);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case "CUSTOM": {
|
|
135
|
+
if (!scriptCode) {
|
|
136
|
+
throw new core.RuntimeModelError(
|
|
137
|
+
this.model,
|
|
138
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
142
|
+
{
|
|
143
|
+
...this.panel.getEventArgs(),
|
|
144
|
+
data: this.dataParent.data
|
|
145
|
+
},
|
|
146
|
+
scriptCode,
|
|
147
|
+
{
|
|
148
|
+
isAsync: false,
|
|
149
|
+
singleRowReturn: true
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
this.setData(computeData);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
124
155
|
default:
|
|
125
156
|
throw new core.ModelError(
|
|
126
157
|
this.model,
|
|
@@ -244,7 +244,7 @@ class NavPosController extends runtime.PanelItemController {
|
|
|
244
244
|
* @param {INavViewMsg} openViewMsg
|
|
245
245
|
* @memberof NavPosController
|
|
246
246
|
*/
|
|
247
|
-
openViewByPath(openViewMsg) {
|
|
247
|
+
async openViewByPath(openViewMsg) {
|
|
248
248
|
var _a, _b, _c;
|
|
249
249
|
const cacheKey = this.calcCacheKey(openViewMsg);
|
|
250
250
|
this.setNavViewMsgs(openViewMsg);
|
|
@@ -287,7 +287,8 @@ class NavPosController extends runtime.PanelItemController {
|
|
|
287
287
|
if (this.getExpItemIsCache(openViewMsg)) {
|
|
288
288
|
this.state.cacheKeys.push(cacheKey);
|
|
289
289
|
}
|
|
290
|
-
|
|
290
|
+
this.state.isLoading = true;
|
|
291
|
+
await ibiz.commands.execute(
|
|
291
292
|
runtime.OpenAppViewCommand.TAG,
|
|
292
293
|
openViewMsg.viewId,
|
|
293
294
|
tempContext,
|
|
@@ -298,6 +299,7 @@ class NavPosController extends runtime.PanelItemController {
|
|
|
298
299
|
...openViewMsg.modalOptions
|
|
299
300
|
}
|
|
300
301
|
);
|
|
302
|
+
this.state.isLoading = false;
|
|
301
303
|
}
|
|
302
304
|
}
|
|
303
305
|
/**
|
|
@@ -98,7 +98,7 @@ class SingleDataContainerController extends runtime.PanelItemController {
|
|
|
98
98
|
* @protected
|
|
99
99
|
*/
|
|
100
100
|
initContainerData() {
|
|
101
|
-
const { dataSourceType, dataName, dataRegionType } = this.model;
|
|
101
|
+
const { dataSourceType, dataName, dataRegionType, scriptCode } = this.model;
|
|
102
102
|
if (dataRegionType === "LOGINFORM") {
|
|
103
103
|
this.setLoginForm();
|
|
104
104
|
return;
|
|
@@ -134,6 +134,37 @@ class SingleDataContainerController extends runtime.PanelItemController {
|
|
|
134
134
|
this.bindViewData(this.panel.view, dataName);
|
|
135
135
|
break;
|
|
136
136
|
}
|
|
137
|
+
case "ACTIVEDATAPARAM": {
|
|
138
|
+
if (!dataName) {
|
|
139
|
+
throw new core.RuntimeModelError(
|
|
140
|
+
this.model,
|
|
141
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguardDataObject")
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
this.setData(this.dataParent.data[dataName]);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
case "CUSTOM": {
|
|
148
|
+
if (!scriptCode) {
|
|
149
|
+
throw new core.RuntimeModelError(
|
|
150
|
+
this.model,
|
|
151
|
+
ibiz.i18n.t("vue3Util.panelComponent.noConfiguredScript")
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
const computeData = runtime.ScriptFactory.execScriptFn(
|
|
155
|
+
{
|
|
156
|
+
...this.panel.getEventArgs(),
|
|
157
|
+
data: this.dataParent.data
|
|
158
|
+
},
|
|
159
|
+
scriptCode,
|
|
160
|
+
{
|
|
161
|
+
isAsync: false,
|
|
162
|
+
singleRowReturn: true
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
this.setData(computeData);
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
137
168
|
default:
|
|
138
169
|
throw new core.ModelError(
|
|
139
170
|
this.model,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.25-alpha.0",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@ibiz-template/cli": "^0.3.10",
|
|
42
42
|
"@ibiz-template/core": "^0.7.18",
|
|
43
|
-
"@ibiz-template/runtime": "^0.7.
|
|
43
|
+
"@ibiz-template/runtime": "^0.7.25-alpha.0",
|
|
44
44
|
"@ibiz-template/theme": "^0.7.0",
|
|
45
|
-
"@ibiz/model-core": "^0.1.
|
|
45
|
+
"@ibiz/model-core": "^0.1.34",
|
|
46
46
|
"@types/path-browserify": "^1.0.2",
|
|
47
47
|
"@types/qs": "^6.9.11",
|
|
48
48
|
"@types/systemjs": "^6.13.5",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@ibiz-template/core": "^0.6.0",
|
|
61
61
|
"@ibiz-template/runtime": "^0.6.0",
|
|
62
|
-
"@ibiz/model-core": "^0.1.
|
|
62
|
+
"@ibiz/model-core": "^0.1.34",
|
|
63
63
|
"dayjs": "^1.11.10",
|
|
64
64
|
"path-browserify": "^1.0.1",
|
|
65
65
|
"pinia": "^2.1.7",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"vue": "^3.3.8",
|
|
70
70
|
"vue-router": "^4.2.4"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "6849e36564276de05a3b0ec9f616e8adf11c4d1b"
|
|
73
73
|
}
|