@oinone/kunlun-vue-widget 6.4.3 → 6.4.5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{instantiate as e,uniqueKeyGenerator as t,StringHelper as i,CastHelper as n,BooleanHelper as o}from"@oinone/kunlun-shared";import{BehaviorSubject as r,Subject as s}from"@oinone/kunlun-state";import{translateValueByKey as d,genStaticPath as a,RuntimeContextManager as c,ComputeContextManager as l,ROOT_HANDLE as u,ActiveRecordsOperator as p,ViewVM as h}from"@oinone/kunlun-engine";import{defineComponent as g,createVNode as v,Fragment as f,effectScope as y,computed as m,ref as W,watch as b,isRef as R,toRaw as D,nextTick as S,h as C,Suspense as w,withCtx as A,resolveDynamicComponent as $,provide as O,inject as M,reactive as j,onBeforeMount as P,onMounted as N,onUnmounted as V}from"vue";import{isNil as I,isBoolean as H,isString as _,intersection as E,isFunction as x}from"lodash-es";import{XMLTemplateParser as B,DEFAULT_SLOT_NAME as k,DslDefinitionHelper as U,DslSlotUtils as T,DslDefinitionType as F,UnknownDslDefinition as z}from"@oinone/kunlun-dsl";import{getMergeConfig as L}from"@oinone/kunlun-config";import{PropRecordHelper as G,StableSlotProp as K}from"@oinone/kunlun-vue-ui-common";import{isDev as
|
|
1
|
+
import{instantiate as e,uniqueKeyGenerator as t,StringHelper as i,CastHelper as n,BooleanHelper as o}from"@oinone/kunlun-shared";import{BehaviorSubject as r,Subject as s}from"@oinone/kunlun-state";import{translateValueByKey as d,genStaticPath as a,RuntimeContextManager as c,ComputeContextManager as l,ROOT_HANDLE as u,ActiveRecordsOperator as p,ViewVM as h}from"@oinone/kunlun-engine";import{defineComponent as g,createVNode as v,Fragment as f,effectScope as y,computed as m,ref as W,watch as b,isRef as R,toRaw as D,nextTick as S,h as C,Suspense as w,withCtx as A,resolveDynamicComponent as $,provide as O,inject as M,reactive as j,onBeforeMount as P,onMounted as N,onUnmounted as V}from"vue";import{isNil as I,isBoolean as H,isString as _,intersection as E,isFunction as x}from"lodash-es";import{XMLTemplateParser as B,DEFAULT_SLOT_NAME as k,DslDefinitionHelper as U,DslSlotUtils as T,DslDefinitionType as F,UnknownDslDefinition as z}from"@oinone/kunlun-dsl";import{getMergeConfig as L}from"@oinone/kunlun-config";import{PropRecordHelper as G,StableSlotProp as K,StyleHelper as Q}from"@oinone/kunlun-vue-ui-common";import{isDev as Z,useMatched as q}from"@oinone/kunlun-router";import{ViewType as J,createViewElement as X}from"@oinone/kunlun-meta";import{InjectionToken as Y,SPI as ee}from"@oinone/kunlun-spi";import{LifeCycleTypes as te}from"@oinone/kunlun-event";class Widget{constructor(e){this.subscriptionMap=new Map,this.childrenInstance=[],this.children=[],this.childrenWidget=[],this.config={},this.initialized=!1,this.parent=null,this.childrenInstance=[],this.handle=e||Widget.createHandle(this.constructor.name),this.name="default",this.self=this}static createHandle(e=""){return`${e||"oio-widget"}-${this.widgetCount++}`}static Attribute(e){return(t,i,n)=>{const o=t.constructor,r=this.attributeMap.get(o)||new Map;r.set(e&&e.displayName||i,i),this.attributeMap.set(o,r),n&&n.get&&(t[`$compute$${i}`]={get:n.get,set:n.set});const s=o.prototype.$$props||[];e&&!1===e.render||s.push(e&&e.displayName||i),t.$$props=s}}static Watch(e,t){return(i,n,o)=>{const r=i.constructor,s=Widget.watchMap.get(r)||[];s.push({path:e,handler:o.value,options:t}),Widget.watchMap.set(r,s)}}static Sub(e,t,i,n){return(o,r)=>{const s=this.nameContextMap.get(e);if(s)s&&!s.paramName_NameMap.get(r)&&s.paramName_NameMap.set(r,e);else{const o=new t(i),s=new Map;s.set(r,e),this.nameContextMap.set(e,{paramName_NameMap:s,subject:o,value:i,option:n})}const d=o.constructor.prototype.$$subNames||[];d.includes(r)||d.push(r),o.$$subNames=d}}static BehaviorSubContext(e,t,i){return Widget.Sub(e,r,t,i)}static SubContext(e,t,i){return Widget.Sub(e,s,t,i)}static Reactive(e){return Widget.Attribute(e)}static Method(e){return Widget.Attribute(e?{displayName:e}:void 0)}static select(e){return Widget.widgetMap.get(e)}static Inject(e){return(t,i)=>{let n=Reflect.get(t,"injection")||{name:this,list:new Map};if(n.name!==t.constructor){const e=n;n={name:t.constructor,list:new Map},e.list.forEach((e,t)=>n.list.set(t,e)),Reflect.set(t,"injection",n)}n.list.get(e||i)||n.list.set(e||i,i)}}static Provide(e){return(t,i)=>{let n=Reflect.get(t,"provider")||{name:this,list:new Map};if(n.name!==t.constructor){const e=n;n={name:t.constructor,list:new Map},e.list.forEach((e,t)=>n.list.set(t,e)),Reflect.set(t,"provider",n)}n.list.get(e||i)||n.list.set(e||i,i)}}getSelf(){return this.self}getOperator(){return this}initialize(e={}){if(this.initialized)throw new Error(`error: reInitializeWidget:${this.getWidgetType()}:${this.getHandle()}`);const t={},i=(Reflect.get(this,"injection")||{list:new Map}).list,n=this.getAttributes();if(i&&i.forEach((e,i)=>{if(void 0!==this.getShared(i).host){Reflect.set(t,e,{get:()=>this.getShared(i).value,configurable:!0});let o="";n.forEach((t,i)=>t===e?o=i:""),""!==o&&Reflect.set(this,`$compute$${e}`,{get:()=>this.getShared(i).value})}}),Object.defineProperties(this,t),this.initialized=!0,this.config=e,Widget.widgetMap.set(this.getHandle(),this),this.$$innerWidgetType){const e=this.getParentWidget();e&&e.$$innerWidgetType&&e.childrenWidget.push(this)}return this.startSubscription(),this}startSubscription(){var e,t;if(null===(e=this.$$subNames)||void 0===e?void 0:e.length)for(const[,e]of Widget.nameContextMap)for(const[i]of e.paramName_NameMap)(null===(t=this.$$subNames)||void 0===t?void 0:t.includes(i))&&(this[i]=this.createWidgetSubjection(e))}wrapSubjectWithScope(e,t){if(!t)return e;const i=e.next,n=this;e.next=function(t){i.call(e,t.__publisherWidget?t:{payload:t,__publisherWidget:n})};const o=e;if(o.getValue){const e=o.getValue;o.getValue=function(){const t=e.call(o);return t.__publisherWidget?t.payload:t}}return e}createWidgetSubjection(e){const{subject:t,option:i}=e;return{subscribe:e=>{const n=t.subscribe(t=>{(null==i?void 0:i.scope)&&(null==t?void 0:t.__publisherWidget)?this.isSameScopeWidget(t.__publisherWidget,null==i?void 0:i.scope)&&e(t.payload):e((null==i?void 0:i.scope)&&(null==t?void 0:t.__publisherWidget)?t.payload:t)});return this.subscriptionMap.set(Symbol("random"),n),n},subject:this.wrapSubjectWithScope(t,null==i?void 0:i.scope)}}isSameScopeWidget(e,t){const i=this.getParentWidgetByType(t),n=e.getParentWidgetByType(t);return i===n&&null!==i||this.getHandle()===(null==n?void 0:n.getHandle())}dispose(e=!1){var t,i;this.releaseInjection();const n=null===(t=this.parent)||void 0===t?void 0:t.children;if(n){const e=n.findIndex(e=>e.getHandle()===this.getHandle());-1!==e&&(n.splice(e,1),null===(i=this.parent)||void 0===i||i.childrenInstance.splice(e,1))}for(;this.children.length;)this.children[0].dispose(e);Widget.widgetMap.delete(this.getHandle()),this.subscriptionMap.forEach(e=>{e.unsubscribe()}),this.subscriptionMap.clear(),this.self=null,this.childrenInstance=[],this.children=[],this.childrenWidget=[],this.parent=null,e&&(this.$$props=void 0)}createWidget(t,i,n,o){const r=e(t);r.parent=this;const s=r.initialize(n),d=s&&s.getOperator();return void 0!==o&&o>=0?this.children[o]=d:this.children.push(d),i&&(r.name=i),d}getHandle(){return this.handle}deleteWidget(e){const{length:t}=this.children;return this.children.forEach((t,i)=>{t.getHandle()===e&&t.dispose()}),this.children.length!==t}moveChildWidget(e,t){this.parent&&(this.children[e]=this.children.splice(t,1,this.children[e])[0],this.childrenInstance[e]=this.childrenInstance.splice(t,1,this.childrenInstance[e])[0])}insertWidget(e,t){this.parent&&(this.children.splice(t,0,e),this.childrenInstance.splice(t,0,e))}deleteWidgetByIndex(e,t){const{length:i}=this.children,n=t||this.children[e].getHandle();return this.children.forEach((t,i)=>{t.getHandle()===n&&i===e&&t.dispose()}),this.children.length!==i}getConfig(e){return this.config[e]}getAllConfig(){return this.config}getSibling(){if(!this.$$innerWidgetType)return null;const e=this.getParentWidget();return e?e.getChildrenWidget():null}previousWidgetSibling(){const e=this.getSibling();if(!e)return null;const t=e.findIndex(e=>e.getHandle()===this.getHandle());return t>0?e[t-1]:null}nextWidgetSibling(){const e=this.getSibling();if(!e)return null;const t=e.findIndex(e=>e.getHandle()===this.getHandle());return t>=0&&t<e.length-1?e[t+1]:null}getParentWidget(){if(this.$$innerWidgetType){let e=this.parent;if(!e)return null;for(;e;){if(e.$$innerWidgetType)return e;e=e.parent}}return this.parent}getParentWidgetByType(e){let t=this.parent;for(;t;){if(t.$$innerWidgetType===e)return t;t=t.parent}return null}getChildrenWidget(){return this.childrenWidget.length?this.childrenWidget:this.getChildrenInstance()}getParent(){return this.parent}getName(){return this.name}getWidgetType(){return this.constructor.name}static getProtoChains(e){let t=Widget.protoChainsCache.get(e);if(t)return t;t=[];let i=e;for(;""!==i.name;)t.push(i),i=Object.getPrototypeOf(i);return Widget.protoChainsCache.set(e,t),t}getAttributes(){if(this.currentAttributeMapCache)return this.currentAttributeMapCache;const e=Widget.getProtoChains(this.constructor),t=new Map;return e.forEach(e=>{const i=Widget.attributeMap.get(e);i&&i.forEach((e,i)=>{t.set(i,e)})}),this.currentAttributeMapCache=t}getWatchers(){const e=[];return Widget.getProtoChains(this.constructor).forEach(t=>{const i=Widget.watchMap.get(t);i&&i.forEach(t=>e.push(t))}),e}getChildren(){return this.children}getChildrenInstance(){return this.childrenInstance}addChildrenInstance(e){this.childrenInstance.push(e)}getShared(e){let t=this.getParent(),i="";for(;t;){const n=(Reflect.get(t,"provider")||{list:new Map}).list;if(n&&n.get(e)){i=n.get(e);break}t=t.getParent()}if(t){let e=Reflect.get(t,i);return"function"==typeof e&&(e=e.bind(t)),{host:t,value:e}}return{}}releaseInjection(){const e=Reflect.get(this,"injection");e&&(e.list.forEach(e=>{const t=this.getSelf();t&&Reflect.deleteProperty(t,e)}),Reflect.set(this,"injection",null))}getComputeHandler(e){return Reflect.get(this,`$compute$${e}`)}getProps(){return this.$$props||[]}}
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
function te(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function ie(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function ne(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function d(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,d)}a((n=n.apply(e,t||[])).next())})}Widget.widgetCount=0,Widget.widgetMap=new Map,Widget.attributeMap=new Map,Widget.protoChainsCache=new WeakMap,Widget.watchMap=new Map,Widget.nameContextMap=new Map;var oe,re=g({name:"VueFragment",inheritAttrs:!1,render(){var e,t;return v(f,void 0,(null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))||[])}});re.__file="src/basic/VueFragment.vue",function(e){e.beforeCreated="beforeCreated",e.created="created",e.beforeMount="beforeMount",e.mounted="mounted",e.beforeUpdate="beforeUpdate",e.updated="updated",e.activated="activated",e.deactivated="deactivated",e.beforeUnmount="beforeUnmount",e.unmounted="unmounted"}(oe||(oe={}));class VueWidget extends Widget{constructor(){super(...arguments),this.behaviorGroup={},this.node_code=this.revolveNodeCode()}revolveNodeCode(){return t()}setup(e){return(t,i)=>{this.__scope&&(this.__scope.stop(),this.__scope=null),this.__scope=y();let n={};return this.__scope.run(()=>{const{opt:o}=this;this.getAttributes().forEach((e,t)=>{const i=this.getComputeHandler(t);if(i)i.get&&(i.set?Reflect.set(n,t,m({get:i.get.bind(o),set:i.set.bind(o)})):Reflect.set(n,t,m(i.get.bind(o))));else{const i=Reflect.get(this,e);"function"==typeof i?Reflect.set(n,t,i.bind(o)):Reflect.set(n,t,W(i))}});this.getWatchers().forEach(e=>{const t=e.path.split("."),i=n[t[0]];i&&(1===t.length?b(i,e.handler.bind(o),e.options):b(()=>{let e=i.value||{};for(let i=1;i<t.length&&(e=e[t[i]],e);i++);return e},e.handler.bind(o),e.options))});const r=e&&e(t,i,n);r&&(n=Object.assign(Object.assign({},n),r)),this.res=n}),n}}static HookHost(){return(e,t)=>{const i=VueWidget.hookHosts.get(e.constructor)||[];i.push(t),VueWidget.hookHosts.set(e.constructor,i)}}static getHookHosts(e){const t=[];return(()=>{const t=[];let i=e.constructor,{name:n}=i;for(;""!==n;)n=i.name,t.push(i),i=Object.getPrototypeOf(i);return t})().forEach(e=>{const i=VueWidget.hookHosts.get(e);i&&i.forEach(e=>t.push(e))}),t}static getHooks(e,t,i){const n=(e=>{const t=[];let i=e;for(;""!==i.name;)t.push(i.name),i=Object.getPrototypeOf(i);return t})(Widget.select(e).constructor),o=[];return n.forEach(e=>{let n;n="after"===i?VueWidget.afterHooks.get(e):VueWidget.beforeHooks.get(e);(n&&n.get(t)||[]).forEach(e=>o.push(e))}),o}static BeforeHook(e){return(t,i,n)=>{const o=VueWidget.beforeHooks.get(t.constructor.name)||new Map,r=o.get(e)||[];r.push(n.value),o.set(e,r),VueWidget.beforeHooks.set(t.constructor.name,o)}}static AfterHook(e){return(t,i,n)=>{const o=VueWidget.afterHooks.get(t.constructor.name)||new Map,r=o.get(e)||[];r.push(n.value),o.set(e,r),VueWidget.afterHooks.set(t.constructor.name,o)}}getNodeCode(){return this.node_code}getNodeCodeRef(){return this.res.node_code}getOperator(){const{opt:e}=this;return e||this}createWidget(e,t,i,n,o=!1){const r=this.getOperator(),s=super.createWidget.bind(r)(e,t,i||{},n);o&&(r.node_code=this.revolveNodeCode());const d=s&&s.getOperator();return void 0!==n&&n>=0?this.getChildrenInstance()[n]=s.getOperator():this.addChildrenInstance(d),d}deleteWidget(e){const t=super.deleteWidget(e);return this.getOperator().node_code=this.revolveNodeCode(),t}insertWidget(e,t){super.insertWidget(e,t);this.getOperator().node_code=this.revolveNodeCode()}moveChildWidget(e,t){super.moveChildWidget(e,t);this.getOperator().node_code=this.revolveNodeCode()}deleteWidgetByIndex(e,t){const i=super.deleteWidgetByIndex(e,t);return this.getOperator().node_code=this.revolveNodeCode(),i}initialize(e={}){return super.initialize(e),this.component=re,this.buildOperator(),this}buildOperator(){const e=new Proxy(this,{get:(e,t)=>{if("isProxy"===t)return!0;if("constructor"===t)return this.constructor;const i=this.res||{},n=Reflect.get(i,t);return n?R(n)?(n.value,n.value):n:Reflect.get(e,t)},set:(e,t,i)=>{const n=this.res||{},o=Reflect.get(n,t);return"function"==typeof o?Reflect.set(n,t,i):R(o)?(o.value=i,!0):Reflect.set(e,t,i)}});this.opt=e,this.initialize=this.initialize.bind(e);return VueWidget.getHookHosts(this).forEach(t=>{const i=Reflect.get(this,t);Reflect.set(this,t,(...n)=>{if("render"===t)return i.apply(e,n);const o=e.executeBeforeHooks(t,n),r=i.apply(e,o);return e.executeAfterHooks(t,r)})}),e}getWidgetComponent(e=!1){let t=this.widgetComponent;return!t&&e&&(t=this.buildWidgetComponent(),this.widgetComponent=t),t}setWidgetComponent(e){this.widgetComponent=e}renderExpandComponent(){}getMixinComponent(){return this.mixinComponent}setMixinComponent(e){e&&(e=Object.assign({inheritAttrs:!1},e)),this.mixinComponent=e}render(e,t){return this.widgetComponent||(this.widgetComponent=this.buildWidgetComponent()),this.widgetComponent?this.renderWidgetComponent(this.widgetComponent,e,t):[]}getWidgetComponentName(){const{name:e}=this.constructor;return e}buildWidgetComponent(){let e=this.getComponent();if(!e)return;e=D(e);const t=this.getOperator(),i=this.getUsingComponents();return g({name:this.getWidgetComponentName(),components:i,inheritAttrs:!1,setup:this.setup(this.setupHook.bind(this)),beforeMount:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.beforeMount])||void 0===i||i.call(e),this.$$beforeMount.call(t),this.beforeMount.call(t)},mounted:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.mounted])||void 0===i||i.call(e),this.$$mounted.call(t),this.mounted.call(t)},beforeUpdate:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.beforeUpdate])||void 0===i||i.call(e),this.$$beforeUpdate.call(t),this.beforeUpdate.call(t)},updated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.updated])||void 0===i||i.call(e),this.$$updated.call(t),this.updated.call(t)},activated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.activated])||void 0===i||i.call(e),this.$$activated.call(t),this.activated.call(t)},deactivated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.deactivated])||void 0===i||i.call(e),this.$$deactivated.call(t),this.deactivated.call(t)},beforeUnmount:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.beforeUnmount])||void 0===i||i.call(e),this.$$beforeUnmount.call(t),this.beforeUnmount.call(t)},unmounted:()=>{var e,i;null===(i=(e=this.behaviorGroup)[oe.unmounted])||void 0===i||i.call(e),this.unmounted.call(t),this.$$unmounted.call(t),this.$$unmountedAfterProperties.call(t)},render:t=>{const i=this.buildProps(t),{$slots:n}=t,o=this.resolveProps(e,i),r=n&&Object.keys(n).length?n:this.resolveChildren(),s=this.renderExpandComponent(),d={};if(s){const e=r.default?r.default():[];d.default=()=>[...e,s]}return this.renderMixinComponent(v(e,o,Object.assign(Object.assign({},r),d)),i)}})}resolveProps(e,t){return t}renderMixinComponent(e,t){const i=this.getMixinComponent();if(i){const n=e,o=this.resolveProps(i,t);e=v(i,o,{default:()=>n})}return e}renderWidgetComponent(e,t,i){return v(e,{},i)}buildProps(e){const t={},i=this.getAttributes(),n=this.getProps();return i.forEach((i,o)=>{n.includes(i)&&Reflect.set(t,i,Reflect.get(e,o))}),t["data-handle"]=this.getHandle(),t}buildPropsStrs(){const e=this.getProps(),t=[];return e.forEach(e=>t.push(e)),t}resolveChildren(){const e={},t=[],i=this.getChildren();return i.forEach(e=>{t.includes(e.getName())||t.push(e.getName())}),t.forEach(t=>{Reflect.set(e,t,(...e)=>i.filter(e=>e.getName()===t).map(t=>t.render(...e)))}),e}setupHook(e,t,i){var n,o,r,s;return null===(o=(n=this.behaviorGroup)[oe.beforeCreated])||void 0===o||o.call(n),this.$$beforeCreated(),this.beforeCreated(),null===(s=(r=this.behaviorGroup)[oe.created])||void 0===s||s.call(r),this.$$created(),this.created(),{}}setComponent(e){this.component=Object.assign({inheritAttrs:!1},e)}dispose(e=!1){super.dispose(e),this.opt=void 0;const t=null;this.__scope&&(this.__scope.stop(),this.__scope=t),this.component=t,this.mixinComponent=t,this.widgetComponent=t,e&&S(()=>{this.res={},this.__proto__=null})}getComponent(){const{name:e,__render__:t,__name__:i}=this.constructor;return t&&(this.component=g({name:i||e,props:this.buildPropsStrs(),render:t,components:this.getUsingComponents()})),this.component}getUsingComponents(){return{}}executeAfterHooks(e,t){const i=VueWidget.getHooks(this.getHandle(),e,"after");let n=0;const o={result:t},r=()=>{n<i.length&&i[n++].apply(this,[r,o])};return r(),o.result}executeBeforeHooks(e,...t){const i=VueWidget.getHooks(this.getHandle(),e,"before");let n=0;const o={args:t},r=()=>{n<i.length&&i[n++].apply(this,[r,o])};return r(),o.args}beforeCreated(){}$$beforeCreated(){}created(){}$$created(){}beforeMount(){}$$beforeMount(){}mounted(){}$$mounted(){}beforeUpdate(){}$$beforeUpdate(){}updated(){}$$updated(){}activated(){}$$activated(){}deactivated(){}$$deactivated(){}beforeUnmount(){}$$beforeUnmount(){}unmounted(){}$$unmounted(){}$$unmountedAfterProperties(){this.dispose()}registryBehavior(e,t){this.behaviorGroup[e]=t}reset(){this.widgetComponent=void 0,this.getParent().node_code=this.revolveNodeCode()}translate(e,t={}){const i=Reflect.get(window,"translate"),n=i?i(e):"";if(n===e||0===Object.keys(t).length)return n;return n.replace(/\{\s*([A-Z0-9_]+)\s*\}/gi,(e,i)=>t[i])}translateByI18n(e){return d(e)||e}genStaticPath(e){return a(e)}forceUpdate(){const e=this.getOperator();e&&(e.node_code=this.revolveNodeCode())}}VueWidget.beforeHooks=new Map,VueWidget.afterHooks=new Map,VueWidget.hookHosts=new Map,te([Widget.Reactive(),ie("design:type",String)],VueWidget.prototype,"node_code",void 0),te([VueWidget.HookHost(),ie("design:type",Function),ie("design:paramtypes",[Object,Object]),ie("design:returntype",Object)],VueWidget.prototype,"render",null),te([Widget.Reactive(),ie("design:type",Function),ie("design:paramtypes",[Object,Object]),ie("design:returntype",String)],VueWidget.prototype,"translate",null),te([Widget.Reactive(),ie("design:type",Function),ie("design:paramtypes",[String]),ie("design:returntype",String)],VueWidget.prototype,"translateByI18n",null),te([Widget.Method(),ie("design:type",Function),ie("design:paramtypes",[String]),ie("design:returntype",void 0)],VueWidget.prototype,"genStaticPath",null);class AsyncVueWidget extends VueWidget{setup(e){const t=super.setup();return(i,n)=>ne(this,void 0,void 0,function*(){const o=t(i,n),r=e&&(yield e(i,n))||{};for(const e in r)Reflect.set(o,e,Reflect.get(r,e));return o})}render(e){return C("div",C(w,super.render(e)))}setupHook(e,t,i){return ne(this,void 0,void 0,function*(){return yield this.beforeCreated(),yield this.created(),{}})}}class DslNodeWidget extends VueWidget{get widgetPath(){let e=this.parentPath||"";const{subPath:t,subIndex:i}=this;return t&&(e=e?`${e}.${t}`:t),null!=i&&(e=`${e}[${i}]`),e}get variables(){return B.resolveVariables(this.getDsl())}initialize(e){var t;super.initialize(e),this.dslNode=e.dslNode,this.metadataHandle=e.metadataHandle,this.rootHandle=e.rootHandle,this.template=e.template,this.slotName=e.slotName,this.widgetInline=e.widgetInline,this.currentHandle=this.getHandle();const{subPath:i,subIndex:n}=e;return this.subPath=i||(null===(t=this.template)||void 0===t?void 0:t.dslNodeType)||"",I(n)?this.subIndex=e.__index:this.subIndex=n,this}getDsl(){return this.dslNode||{}}getSlotName(){return this.slotName}getDslChildrenByLabel(e){return this.dslNode?(this.dslNode.children||[]).find(t=>t.tagName===e.toUpperCase()):null}get metadataRuntimeContext(){const{metadataHandle:e}=this;if(e)return c.get(e)}get rootRuntimeContext(){const{rootHandle:e}=this;if(e)return c.get(e)}}function se(e){const t=null==e?void 0:e.invisible;return!I(t)&&(H(t)?t:t())}function de(e){return!e||!e.length||e.every(e=>se(e))}te([Widget.Reactive(),ie("design:type",Object)],DslNodeWidget.prototype,"metadataHandle",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslNodeWidget.prototype,"rootHandle",void 0),te([Widget.Reactive(),ie("design:type",String)],DslNodeWidget.prototype,"currentHandle",void 0),te([Widget.Reactive({render:!1}),ie("design:type",Object)],DslNodeWidget.prototype,"dslNode",void 0),te([Widget.Reactive({render:!1}),ie("design:type",Object)],DslNodeWidget.prototype,"template",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslNodeWidget.prototype,"slotName",void 0),te([Widget.Reactive(),Widget.Inject("path"),ie("design:type",Object)],DslNodeWidget.prototype,"parentPath",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslNodeWidget.prototype,"subPath",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslNodeWidget.prototype,"subIndex",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Object),ie("design:paramtypes",[])],DslNodeWidget.prototype,"widgetPath",null),te([Widget.Reactive(),ie("design:type",Object)],DslNodeWidget.prototype,"widgetInline",void 0),te([Widget.Reactive(),ie("design:type",Object),ie("design:paramtypes",[])],DslNodeWidget.prototype,"variables",null);const ae="oinone",ce="__slots",le="__render__options",ue="slotContext",pe=["div","a","span","table","form","detail","ul","li","h1","h2","h3","h4","h5","h6","p","thead","tbody","tr","th","td"];function he(e,t,i){let n=e[t];if(delete e[t],!n&&i){n=i;const{dslDefinition:o}=e;o&&(o[t]=i)}return n}class DslRender{static render(e,t=k,i,n){const o=DslRender.fetchComponent(e);if(o)return DslRender.createVNodeWithDslDefinition(o,e,t,i,n)}static renderSlots(e){const t={};for(const i in e)t[i]=A(t=>{var n;return DslRender.createVNodeChildren(null===(n=e[i])||void 0===n?void 0:n.widgets,i,t)});return t}static fetchVNodeSlots(e,t){var i;if(!e)return;const n=e[ce];if(n)return n;if(!t){const n=[k];null===(i=e.widgets)||void 0===i||i.forEach(e=>{if(U.isTemplate(e)){let t=e.slot;t||(t=k),n.push(t)}}),t=[...new Set(n)]}const o=T.fetchSlotsBySlotNames(e,t);return DslRender.renderSlots(o)}static fetchComponent(e){let t,{dslNodeType:i}=e||{};switch(i||(i=F.ELEMENT),i){case F.VIEW:t=$(`${ae}-${e.dslNodeType}`);break;case F.PACK:{const i=e;t=DslRender.resolveWidgetComponent(`${i.widget||"group"}`),"string"==typeof t&&(t=DslRender.resolveWidgetComponent(`${e.dslNodeType}`));break}case F.ELEMENT:{const i=e;t=DslRender.resolveWidgetComponent(`${i.widget}`),"string"==typeof t&&(t=DslRender.resolveWidgetComponent(`${e.dslNodeType}`));break}case F.ACTION:case F.FIELD:t=DslRender.resolveWidgetComponent(`${e.dslNodeType}`);break;case F.UNKNOWN:case F.SLOT:case F.TEMPLATE:t=null;break;default:t=DslRender.resolveCommonWidgetComponent(i)}return t}static createVNodeChildren(e,t,i,n){const o=[];if(!e)return o;t||(t=k),I(n)&&(n=0);const{length:r}=e;for(let s=0;s<r;s++){const r=e[s],d=DslRender.fetchComponent(r);if(d)o.push(DslRender.createVNodeWithDslDefinition(d,r,t,_(d)?DslRender.fetchVNodeSlots(r):void 0,i?{slotContext:i}:void 0,s+n));else if(null===d){const{dslNodeType:e}=r;switch(e){case F.SLOT:{const e=DslRender.createVNodeChildren(r.widgets,t,i,s+n);n+=e.length,e.forEach(e=>o.push(e));break}case F.UNKNOWN:case F.TEMPLATE:continue;default:console.error("Invalid component.")}}}return o}static createVNodeWithDslDefinition(e,i,n,o,r,s){var d;I(s)||i.__index===s||(i.__index=s);const a=_(e),c=a?G.collectionBasicProps(i):Object.assign(Object.assign({},i),{dslDefinition:Object.assign({},i),slotName:n});let l;l=a&&i.__content||he(c,ce,o);const u=he(c,le,r),p=null==u?void 0:u.slotContext;if(p){const e=null==r?void 0:r.slotContext;e&&(u.slotContext=e),c.slotContext=p}if(DslRenderHelper.predictIsUpdateKey(i,u)){const e=t();i.key=e,c.key=e}DslRenderHelper.predictIsRecursion(u)&&!l&&(null===(d=i.widgets)||void 0===d?void 0:d.length)&&(l=DslRender.fetchVNodeSlots(i));let h=null==u?void 0:u.dynamicProps;return p&&(h=E(h||[],[ue])),v(e,c,l,null==u?void 0:u.patchFlag,h,null==u?void 0:u.isBlockNode)}static resolveCommonWidgetComponent(e){let t=DslRender.resolveCommonComponentCache[e];return t||(pe.includes(e)?e:(t=$(`${ae}-${i.camelCaseToKebabCase(e)}`),"string"==typeof t&&(t=$(e)),DslRender.resolveCommonComponentCache[e]=t,t))}static resolveWidgetComponent(e){let t=DslRender.resolveComponentCache[e];if(t)return t;if(pe.includes(e))return e;if(t=$(e),"string"==typeof t)for(const i of DslRender.resolveMethods){const n=i(e);if(n){const e=$(n);if("string"!=typeof e){t=e;break}}}return DslRender.resolveComponentCache[e]=t,t}}DslRender.resolveComponentCache={},DslRender.resolveCommonComponentCache={},DslRender.resolveMethods=[e=>{if(-1===e.indexOf("-")){const t=e.charCodeAt(0);if(t>=i.UPPER_A_ASCLL&&t<=i.UPPER_Z_ASCLL)return`${e[0].toLowerCase()}${e.substring(1)}`}},e=>{if(-1===e.indexOf("-")){const t=e.charCodeAt(0);if(t>=i.LOWER_A_ASCLL&&t<=i.LOWER_Z_ASCLL)return`${e[0].toUpperCase()}${e.substring(1)}`}},e=>i.camelCaseToKebabCase(e)];class DslRenderHelper{static predictIsUpdateKey(e,t){const i=(null==t?void 0:t.dynamicKey)||!1,n=(null==t?void 0:t.focusUpdate)||!1;if(e.key){if(n)return!0}else if(i)return!0;return!1}static predictIsRecursion(e){return(null==e?void 0:e.recursion)||!1}}function ge(e,t){t||(t=e.name);const i=c.createOrReplace().frameworkInstance;t?"string"==typeof t?i.component(t,e):t.forEach(t=>i.component(t,e)):Q()&&console.warn("component install error. reason: name is blank.",e)}function ve(e,t){c.createOrReplace().frameworkInstance.directive(t,e)}function fe(e,...t){c.createOrReplace().frameworkInstance.use(e,...t)}function ye(e,t,i){let n;const{length:o}=e;for(let r=o-1;r>=0;r--){const o=e[r];if(n){const e=Array.isArray(n)?n:[n];n=o.render(t,Object.assign({default:()=>e},K))}else n=o.render(t,Object.assign(Object.assign({},i),K))}return n}function me(){return new VueWidget}function We(e){return n.cast(Widget.select(e))}function be(e){return We(e)||me()}class DslRenderWidget extends VueWidget{constructor(){super(...arguments),this.internal=!1}initialize(e){return super.initialize(e),this.internal=e.internal||!1,this.template=e.template,this.slotName=e.slotName,this.supportedSlotNames=e.slotNames||[],this.template&&this.supportedSlotNames.length&&(this.dslSlots=T.fetchSlotsBySlotNames(this.template,this.supportedSlotNames)),this}getDsl(){return this.template||z}getSlotName(){return this.slotName}render(e,t){return this.template&&(void 0===this.slots&&(this.internal?this.slots=this.internalRender(t)||null:this.slots=this.commonRender(t)||null),this.slots)?this.rawRender(e,this.slots):this.rawRender(e,t)}rawRender(e,t){return super.render(e,t)}internalRender(e){return e&&Object.keys(e).length?e:this.dslSlots&&Object.keys(this.dslSlots).length?DslRender.renderSlots(this.dslSlots):void 0}commonRender(e){return this.dslSlots&&Object.keys(this.dslSlots).length?DslRender.renderSlots(this.dslSlots):e&&Object.keys(e).length?e:void 0}}te([Widget.Reactive(),ie("design:type",Object)],DslRenderWidget.prototype,"internal",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslRenderWidget.prototype,"template",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslRenderWidget.prototype,"slotName",void 0);class DslDefinitionWidget extends DslRenderWidget{constructor(e){super(e),this.automatic=!1,this.defaultAllInvisible=!1,this.invisibleState=!1,this.currentHandle=this.getHandle()}getMetadataHandle(){return this.metadataHandle}get class(){return this.getDsl().class}get style(){return this.getDsl().style}getRootHandle(){return this.rootHandle}getCurrentHandle(){return this.currentHandle}get allInvisible(){const{allInvisible:e}=this.getDsl();return I(e)?this.defaultAllInvisible:o.toBoolean(e)}get invisible(){let{invisible:e}=this.getDsl();return e=!I(e)&&this.invisibleProcess(e),e||!!this.allInvisible&&(this.invisibleState=this.childrenInvisibleProcess(),this.invisibleState)}get parentInvisibleProvider(){return this.parentInvisible||this.invisible}initialize(e){return super.initialize(e),this.metadataHandle=e.metadataHandle,this.rootHandle=e.rootHandle,this.automatic=e.automatic||!1,this.inline=e.inline,this}get metadataRuntimeContext(){const e=this.metadataRuntimeContextNullable;if(!e)throw new Error("Invalid metadata runtime context.");return e}get metadataRuntimeContextNullable(){const{metadataHandle:e}=this;let t;return e&&(t=c.get(e)),t}get rootRuntimeContext(){const e=this.rootRuntimeContextNullable;if(!e)throw new Error("Invalid root runtime context.");return e}get rootRuntimeContextNullable(){const{rootHandle:e}=this;let t;return e&&(t=c.get(e)),t}get rootComputeContext(){const{rootHandle:e}=this;let t;return e&&(t=l.get(e)),t}get rootViewRuntimeContext(){var e,t,i;const n=[];let o=this.rootRuntimeContext,r=null===(e=null==o?void 0:o.parentContext)||void 0===e?void 0:e.field;for(;r&&o;){n.push(r);const e=null===(t=null==o?void 0:o.parentContext)||void 0===t?void 0:t.handle;if(!e)throw new Error("Invalid field runtime context handle");const s=null===(i=Widget.select(e))||void 0===i?void 0:i.rootRuntimeContext,d=null==s?void 0:s.parentContext;if(!d||d.handle===u)break;r=d.field,o=s}return{runtimeContext:o,fields:n}}getMergeConfig(...e){if(this.cacheConfigProxy)return this.cacheConfigProxy;const t=L(e,{defaultValue:void 0});return this.cacheConfigProxy=new Proxy(this.getDsl(),{get:(e,i)=>i in e?e[i]:t[i]}),this.cacheConfigProxy}invisibleProcess(e){return o.toBoolean(e)}childrenInvisibleProcess(){return de(this.getChildren())}resetInvisible(){this.allInvisible&&(this.invisibleState=this.childrenInvisibleProcess())}resetParentInvisible(){var e,t;null===(t=null===(e=this.getParent())||void 0===e?void 0:e.resetInvisible)||void 0===t||t.call(e)}$$mounted(){super.$$mounted(),this.resetInvisible(),this.lastedInvisibleState=this.invisible}$$updated(){super.$$updated();const{lastedInvisibleState:e,invisible:t}=this;this.lastedInvisibleState=t,e!==t&&this.resetParentInvisible()}$$unmountedAfterProperties(){super.$$unmountedAfterProperties(),this.automatic||this.metadataHandle!==this.rootHandle||c.delete(this.metadataHandle)}allMounted(){this.resetInvisible()}}te([Widget.Reactive(),ie("design:type",Object)],DslDefinitionWidget.prototype,"automatic",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslDefinitionWidget.prototype,"metadataHandle",void 0),te([Widget.Reactive(),ie("design:type",Object),ie("design:paramtypes",[])],DslDefinitionWidget.prototype,"class",null),te([Widget.Reactive(),ie("design:type",Object),ie("design:paramtypes",[])],DslDefinitionWidget.prototype,"style",null),te([Widget.Reactive(),ie("design:type",Object)],DslDefinitionWidget.prototype,"rootHandle",void 0),te([Widget.Reactive(),ie("design:type",String)],DslDefinitionWidget.prototype,"currentHandle",void 0),te([Widget.Reactive(),ie("design:type",Object)],DslDefinitionWidget.prototype,"inline",void 0),te([Widget.Reactive(),ie("design:type",Object),ie("design:paramtypes",[])],DslDefinitionWidget.prototype,"allInvisible",null),te([Widget.Reactive(),ie("design:type",Object)],DslDefinitionWidget.prototype,"invisibleState",void 0),te([Widget.Reactive(),Widget.Inject(),ie("design:type",Object)],DslDefinitionWidget.prototype,"parentInvisible",void 0),te([Widget.Reactive(),ie("design:type",Boolean),ie("design:paramtypes",[])],DslDefinitionWidget.prototype,"invisible",null),te([Widget.Reactive(),Widget.Provide("parentInvisible"),ie("design:type",Object),ie("design:paramtypes",[])],DslDefinitionWidget.prototype,"parentInvisibleProvider",null),te([Widget.Method(),ie("design:type",Function),ie("design:paramtypes",[]),ie("design:returntype",void 0)],DslDefinitionWidget.prototype,"allMounted",null);class PathWidget extends DslDefinitionWidget{get path(){const{parentPath:e,subPath:t,subIndex:i,currentPath:n}=this;if(I(n)){let n=e||"";return this.internal||t&&(n=n?`${n}.${t}`:t,null!=i&&(n=`${n}[${i}]`)),n}return n}initialize(e){var t;super.initialize(e);const{subPath:i,subIndex:n,path:o}=e;return this.currentPath=o,this.subPath=i||(null===(t=this.template)||void 0===t?void 0:t.dslNodeType)||"",I(n)?this.subIndex=e.__index:this.subIndex=n,this}}function Re(e){return e.viewType===q.Table}function De(e){return e.viewType===q.Search}function Se(e){return e.viewType===q.Form}function Ce(e){return e.viewType===q.Detail}function we(e){return e.viewType===q.Gallery}function Ae(e){return e.viewType===q.Tree}function $e(e){return e.viewType===q.Table||e.viewType===q.Gallery}function Oe(e){return e.viewType===q.Form||e.viewType===q.Detail||e.viewType===q.Search}function Me(e){const{viewType:t}=e;return!!t&&(t===q.Table||t===q.Form||t===q.Detail)}function je(e){const{viewType:t}=e;return!!t&&t!==q.Search}function Pe(e){const{viewType:t}=e;return!!t&&(t===q.Table||t===q.Gallery)}te([Widget.Reactive(),Widget.Inject("path"),ie("design:type",Object)],PathWidget.prototype,"parentPath",void 0),te([Widget.Reactive(),ie("design:type",Object)],PathWidget.prototype,"subPath",void 0),te([Widget.Reactive(),ie("design:type",Object)],PathWidget.prototype,"subIndex",void 0),te([Widget.Reactive(),ie("design:type",Object)],PathWidget.prototype,"currentPath",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Object),ie("design:paramtypes",[])],PathWidget.prototype,"path",null);const Ne={viewType:m(()=>q.Form),model:m(()=>""),modelName:m(()=>""),module:m(()=>""),moduleName:m(()=>""),metadataHandle:m(()=>""),rootHandle:m(()=>""),parentHandle:m(()=>""),slotName:m(()=>{}),inline:m(()=>!1)},Ve=Symbol("MetaContext"),Ie=e=>{O(Ve,Object.assign(Object.assign({},Ne),e))},He=()=>M(Ve,Ne);const _e=j({fullscreen:!1});function Ee(e,t){var i;if(null==t){if(Me(e))return e}else if(we(e))return null===(i=e.cards)||void 0===i?void 0:i[t]}const xe={},Be={pushField:function(e,t){const i=Ee(this,t);if(!i)return;const{fields:n,fieldWidgets:o}=i;n&&(n.some(t=>t===e)||(n.push(e),i.fields=[...n]))},popField:function(e,t){const i=Ee(this,t);if(!i)return;const{fields:n}=i;if(!n)return;const o=n.findIndex(t=>t===e);-1!==o&&(n.splice(o,1),i.fields=[...n])},createActionBarState:function(e){const t=Object.assign({actions:[],visibleActions:[]},e);return Object.defineProperty(t,"visibleActions",{get(){return this.actions.filter(e=>{const t=Widget.select(e);return!!t&&!se(t)})}}),j(t)},getActionBarState:function(e){var t;if(null==e){const e=this.__position[this.__position.length-1];if(null==e)return console.warn("Please call getActionBarState method in the vue lifecycle."),this.actionBar;const{slotName:t}=e;if(t&&t!==k){if(je(this))return this.actionBars[t]}else if(je(this))return this.actionBar}else if(Pe(this))return null===(t=this.inlineActionBars)||void 0===t?void 0:t[e]},pushAction:function(e,t){const i=this.getActionBarState(t);if(!i)return;const{actions:n}=i;n&&(n.some(t=>t===e)||(n.push(e),i.actions=[...n]))},popAction:function(e,t){const i=this.getActionBarState(t);if(!i)return;const{actions:n}=i;if(!n)return;const o=n.findIndex(t=>t===e);-1!==o&&(n.splice(o,1),i.actions=[...n])}};function ke(e){const t={get handle(){return e},fullscreen:!1,__position:[]},i=j(t);for(const[e,n]of Object.entries(Be))t[e]=n.bind(i);return i}function Ue(e){var t;if(e||(e=null===(t=He())||void 0===t?void 0:t.rootHandle.value))return xe[e];console.warn("Invalid root handle.")}function Te(e){var t;if(!e&&!(e=null===(t=He())||void 0===t?void 0:t.rootHandle.value))return void console.warn("Invalid root handle.");const i=xe[e];return delete xe[e],i}function Fe(e){return e?{globalState:_e,viewState:Ue(e),createViewState:()=>{const t=ke(e);return function(e){xe[e.handle]=e}(t),t},getViewState:()=>Ue(e),clearViewState:()=>Te(e)}:{globalState:_e,viewState:Ue(),createViewState:ke,getViewState:Ue,clearViewState:Te}}class ActiveRecordsWidget extends PathWidget{getViewState(){return this.viewState}setViewState(e){this.viewState=e}initialize(e){super.initialize(e);const{dataSource:t,activeRecords:i}=e;return this.setCurrentDataSource(t),this.setCurrentActiveRecords(i),this}get submitCache(){var e;return null===(e=this.metadataRuntimeContext.field)||void 0===e?void 0:e.submitCache}get rootData(){return this.currentRootData||this.parentRootData}set rootData(e){this.currentRootData=e}getCurrentRootData(){return this.currentRootData}setCurrentRootData(e){this.currentRootData=p.repairRecordsNullable(e)}reloadRootData(e){this.parentReloadRootData&&void 0===this.currentRootData?this.parentReloadRootData(e):this.setCurrentRootData(e)}get dataSource(){return this.currentDataSource||this.parentDataSource}set dataSource(e){this.currentDataSource=e}getCurrentDataSource(){return this.currentDataSource}setCurrentDataSource(e){this.currentDataSource=p.repairRecordsNullable(e),this.parentRootData||(this.currentRootData=this.currentDataSource||void 0)}reloadDataSource(e){this.parentReloadDataSource&&void 0===this.getCurrentDataSource()?this.parentReloadDataSource(e):this.setCurrentDataSource(e)}pushDataSource(e,t,i){if(this.parentPushDataSource&&void 0===this.getCurrentDataSource())this.parentPushDataSource(e,t);else{let n=t;const{submitCache:o}=this;o&&!n&&(n=p.defaultPushPredict.bind(o));const r=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).push(e,n,i).get();o||this.setCurrentDataSource(r)}}updateDataSource(e){if(this.parentUpdateDataSource&&void 0===this.getCurrentDataSource())this.parentUpdateDataSource(e);else{const t=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).update(e).get();this.submitCache||this.setCurrentDataSource(t)}}updateDataSourceByEntity(e,t){if(this.parentUpdateDataSourceByEntity&&void 0===this.getCurrentDataSource())this.parentUpdateDataSourceByEntity(e,t);else{const i=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).updateByEntity(e,t).get();this.submitCache||this.setCurrentDataSource(i)}}deleteDataSource(e){if(this.parentDeleteDataSource&&void 0===this.getCurrentDataSource())this.parentDeleteDataSource(e);else{const t=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).delete(e).get();this.submitCache||this.setCurrentDataSource(t)}}deleteDataSourceByEntity(e,t){if(this.parentDeleteDataSourceByEntity&&void 0===this.getCurrentDataSource())this.parentDeleteDataSourceByEntity(e,t);else{const i=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).deleteByEntity(e,t).get();this.submitCache||this.setCurrentDataSource(i)}}flushDataSource(){var e;null===(e=this.parentFlushDataSource)||void 0===e||e.call(this)}get activeRecords(){return this.currentActiveRecords||this.parentActiveRecords}set activeRecords(e){this.currentActiveRecords=e}getCurrentActiveRecords(){return this.currentActiveRecords}setCurrentActiveRecords(e){e!==this.currentActiveRecords&&(this.currentActiveRecords=p.repairRecordsNullable(e))}reloadActiveRecords(e){this.parentReloadActiveRecords&&void 0===this.getCurrentDataSource()?this.parentReloadActiveRecords(e):this.setCurrentActiveRecords(e)}pushActiveRecords(e,t){this.parentPushActiveRecords&&void 0===this.getCurrentDataSource()?this.parentPushActiveRecords(e,t):this.currentActiveRecords=p.operator(this.currentActiveRecords).push(e,t).get()}updateActiveRecords(e){this.parentUpdateActiveRecords&&void 0===this.getCurrentDataSource()?this.parentUpdateActiveRecords(e):this.currentActiveRecords=p.operator(this.currentActiveRecords).update(e).get()}updateActiveRecordsByEntity(e,t){this.parentUpdateActiveRecordsByEntity&&void 0===this.getCurrentDataSource()?this.parentUpdateActiveRecordsByEntity(e,t):this.currentActiveRecords=p.operator(this.currentActiveRecords).updateByEntity(e,t).get()}deleteActiveRecords(e){this.parentDeleteActiveRecords&&void 0===this.getCurrentDataSource()?this.parentDeleteActiveRecords(e):this.currentActiveRecords=p.operator(this.currentActiveRecords).delete(e).get()}deleteActiveRecordsByEntity(e,t){this.parentDeleteActiveRecordsByEntity&&void 0===this.getCurrentDataSource()?this.parentDeleteActiveRecordsByEntity(e,t):this.currentActiveRecords=p.operator(this.currentActiveRecords).deleteByEntity(e,t).get()}flushActiveRecords(){this.parentFlushActiveRecords&&void 0===this.getCurrentDataSource()?this.parentFlushActiveRecords():this.currentActiveRecords=[]}$$initViewStatePosition(e){}$$clearViewStatePosition(e){}$$initViewState(e){}$$clearViewState(e){}$$beforeMount(){super.$$beforeMount();let e=!1;this.viewState||(this.viewState=Fe().viewState,this.viewState&&(e=!0,this.$$initViewStatePosition(this.viewState),this.$$initViewState(this.viewState))),this.viewState&&!e&&this.$$initViewStatePosition(this.viewState)}$$mounted(){super.$$mounted(),this.viewState&&(this.$$clearViewStatePosition(this.viewState),this.$$clearViewState(this.viewState))}$$beforeUnmount(){super.$$beforeUnmount(),this.viewState&&this.$$initViewStatePosition(this.viewState)}$$unmounted(){super.$$unmounted(),this.viewState&&this.$$clearViewStatePosition(this.viewState)}}te([Widget.Reactive(),Widget.Inject("rootData"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentRootData",void 0),te([Widget.Reactive(),ie("design:type",Object)],ActiveRecordsWidget.prototype,"currentRootData",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Object),ie("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"rootData",null),te([Widget.Method(),Widget.Inject("reloadRootData"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadRootData",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadRootData",null),te([Widget.Reactive(),Widget.Inject("dataSource"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentDataSource",void 0),te([Widget.Reactive(),ie("design:type",Object)],ActiveRecordsWidget.prototype,"currentDataSource",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Object),ie("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"dataSource",null),te([Widget.Method(),Widget.Inject("reloadDataSource"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadDataSource",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadDataSource",null),te([Widget.Method(),Widget.Inject("pushDataSource"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentPushDataSource",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object,Function,Number]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"pushDataSource",null),te([Widget.Method(),Widget.Inject("updateDataSource"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateDataSource",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Array]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateDataSource",null),te([Widget.Method(),Widget.Inject("updateDataSourceByEntity"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateDataSourceByEntity",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object,Function]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateDataSourceByEntity",null),te([Widget.Method(),Widget.Inject("deleteDataSource"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteDataSource",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Array]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteDataSource",null),te([Widget.Method(),Widget.Inject("deleteDataSourceByEntity"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteDataSourceByEntity",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object,Function]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteDataSourceByEntity",null),te([Widget.Method(),Widget.Inject("flushDataSource"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentFlushDataSource",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"flushDataSource",null),te([Widget.Reactive(),Widget.Inject("activeRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentActiveRecords",void 0),te([Widget.Reactive(),Widget.Inject("parentViewActiveRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentViewActiveRecords",void 0),te([Widget.Reactive(),ie("design:type",Object)],ActiveRecordsWidget.prototype,"currentActiveRecords",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Object),ie("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"activeRecords",null),te([Widget.Method(),Widget.Inject("reloadActiveRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadActiveRecords",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadActiveRecords",null),te([Widget.Method(),Widget.Inject("pushActiveRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentPushActiveRecords",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object,Function]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"pushActiveRecords",null),te([Widget.Method(),Widget.Inject("updateActiveRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateActiveRecords",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Array]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateActiveRecords",null),te([Widget.Method(),Widget.Inject("updateActiveRecordsByEntity"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateActiveRecordsByEntity",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object,Function]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateActiveRecordsByEntity",null),te([Widget.Method(),Widget.Inject("deleteActiveRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteActiveRecords",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Array]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteActiveRecords",null),te([Widget.Method(),Widget.Inject("deleteActiveRecordsByEntity"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteActiveRecordsByEntity",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[Object,Function]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteActiveRecordsByEntity",null),te([Widget.Method(),Widget.Inject("flushActiveRecords"),ie("design:type",Object)],ActiveRecordsWidget.prototype,"parentFlushActiveRecords",void 0),te([Widget.Method(),Widget.Provide(),ie("design:type",Function),ie("design:paramtypes",[]),ie("design:returntype",void 0)],ActiveRecordsWidget.prototype,"flushActiveRecords",null);const ze={reportBeforeMount:()=>{},reportMounted:()=>{},reportUnmounted:()=>{},reportAllBeforeMount:()=>{},reportAllMounted:()=>{},reportAllUnmounted:()=>{}},Le=Symbol("AllMountedContext"),Ge=e=>{O(Le,Object.assign(Object.assign({},ze),e))},Ke=()=>M(Le,ze);function Qe(e,t){return!!Object.values(e).every(e=>e)&&(t(),!0)}let Ze=0;function qe(e){if(!e)return void console.warn("all mounted method or object is required.");let t,i;x(e)?t=e:i=e;const{reportAllBeforeMount:n,reportAllMounted:o,reportAllUnmounted:r}=Ke(),s="all-mounted#"+Ze++,d={},a={};Ge({reportBeforeMount:e=>{const t=d[e];I(t)&&(d[e]=!1),null==n||n(s)},reportMounted:e=>{const n=d[e];I(n)||n||(d[e]=!0,Qe(d,(null==i?void 0:i.allMounted)||t||(()=>({})))&&(null==o||o(s)))},reportUnmounted:e=>{delete d[e],null==r||r(s)},reportAllBeforeMount:e=>{const t=a[e];I(t)&&(a[e]=!1)},reportAllMounted:e=>{const t=a[e];I(t)||t||(a[e]=!0,Qe(a,(null==i?void 0:i.allMountedUpdate)||(()=>({}))))},reportAllUnmounted:e=>{delete a[e]}})}let Je=0;function Xe(e){const{reportBeforeMount:t,reportMounted:i,reportUnmounted:n}=Ke(),o="mounted-#"+Je++;P(()=>{var i;const n=null===(i=null==e?void 0:e.onBeforeMount)||void 0===i?void 0:i.call(e);n instanceof Promise?n.then(()=>{null==t||t(o)}):null==t||t(o)}),N(()=>{var t;const n=null===(t=null==e?void 0:e.onMounted)||void 0===t?void 0:t.call(e);n instanceof Promise?n.then(()=>{null==i||i(o)}):null==i||i(o)}),V(()=>{var t;const i=null===(t=null==e?void 0:e.onUnmounted)||void 0===t?void 0:t.call(e);i instanceof Promise?i.then(()=>{null==n||n(o)}):null==n||n(o)}),Ge({})}const Ye=e=>X(`[vue-kunlun]: ${e}`),et={handle:{type:String},dslDefinition:{type:Object},slotName:{type:String},inline:{type:Boolean,default:void 0},slotContext:{type:Object}};var tt;!function(e){e.Action="Action",e.Field="Field",e.Element="Element",e.View="View",e.Mask="Mask"}(tt||(tt={}));let it=class ViewWidget extends DslNodeWidget{constructor(){super(...arguments),this.loading=!1,this.currentRoute={},this.domain="",this.isRootView=!0,this.isDialogView=!1,this.selfHandleStr="",this.model=null,this.type="UNKNOWN",this.initQueryParams=null}getVM(){return this.$$vm}setVM(e){this.$$vm=e}setBusy(e){this.getVM().setBusy(e)}getUrlParams(){const{page:e={}}=Z().matched.segmentParams;return e}getBusy(){return this.loading}initialize(e){return null==e.isRootView&&(e.isRootView=!0),super.initialize(e),this.isRootView=e.isRootView||!1,e.view&&(this.view=e.view),null==this.rootHandleStr&&e.isRootWidget&&(this.currentRootHandlerStr=this.getHandle()),this.selfHandleStr=this.getHandle(),this.isDialogView=e.isDialogView||!1,this.model=e.model,this.setVM(new h({view:e.view,dslNode:e.dslNode,model:e.model,isRootWidget:!1!==e.isRootWidget||e.isRootWidget,isDialogView:e.isDialogView||!1,isRootView:e.isRootView})),this.getVM().isRootWidget=this.isRoot,this.getVM().isDialogView=this.isDialogView,this}get rootHandleStr(){return this.currentRootHandlerStr||this.parentRootHandlerStr}on(e,t){this.getVM().on(e,t)}watch(e,t){this.getVM().watch(e,t)}filterWatchData(e,t,i){return this.getVM().filterWatchData(e,t,i)}get isRoot(){return this.rootHandleStr===this.getHandle()}get useConstruct(){return this.isRoot||this.isDialogView}get viewElement(){return J(this.dslNode)}resolveTemplate(){}fetchData(e,t,i){return{}}onRowsChange(e){}loadData(e,t){return{}}loadRootData(e){this.getVM().setRootData(e)}setRootDataByKey(e,t){const i=this.getVM().getRootData();i&&(i[e]=t,this.getVM().setRootData(i))}submit(){return{}}getData(){return this.getVM().getData()}setData(e){this.getVM().setData(e)}validator(){return ne(this,void 0,void 0,function*(){return[]})}loadMetadata(e,t,i,n){this.getVM().loadMetadata(e,t,i,n),this.model=this.getVM().getModel(),this.view=this.getVM().getView(),this.dslNode||(this.dslNode=t||this.getVM().getDslNode())}getActiveRecords(){return[]}setDomain(e){this.domain=e}getDomain(){return this.domain}setFilter(e){this.filter=e}getFilter(){return this.filter}getModel(){return this.getVM().getModel()}getView(){return this.getVM().getView()}getPath(){return this.path}notify(e){this.getVM().notify(e)}$$beforeCreated(){const{initQueryParams:e="{}"}=this.getUrlParams();try{const t=JSON.parse(e);this.initQueryParams=Object.keys(t).length?t:null}catch(e){this.initQueryParams=null}this.notify(ee.ON_VIEW_BEFORE_CREATED)}$$created(){this.notify(ee.ON_VIEW_CREATED)}$$beforeMount(){this.notify(ee.ON_VIEW_BEFORE_MOUNT)}$$mounted(){this.getVM().setPageViewState("mount"),this.getVM().watchLoading(e=>{this.loading=e});const{getMatched$:e}=Z();this.subjectRoute$=e().subscribe(e=>{this.currentRoute=e}),this.notify(ee.ON_VIEW_MOUNTED)}$$beforeUpdate(){this.notify(ee.ON_VIEW_BEFORE_UPDATE)}$$updated(){this.notify(ee.ON_VIEW_UPDATED)}$$beforeUnmount(){this.notify(ee.ON_VIEW_BEFORE_UNMOUNT)}$$unmounted(){this.getVM().setPageViewState("unmount");const e=setTimeout(()=>{"unmount"===this.getVM().getPageViewState()&&(this.notify(ee.ON_VIEW_UNMOUNTED),this.getVM().unsubscribe()),clearTimeout(e)})}};te([Widget.Reactive(),ie("design:type",Object)],it.prototype,"loading",void 0),te([Widget.Inject(),Widget.Reactive(),ie("design:type",String)],it.prototype,"filter",void 0),te([Widget.Reactive(),Widget.Inject("rootHandleStr"),ie("design:type",Object)],it.prototype,"parentRootHandlerStr",void 0),te([Widget.Reactive(),ie("design:type",Object)],it.prototype,"currentRootHandlerStr",void 0),te([Widget.Reactive(),Widget.Provide(),ie("design:type",Object),ie("design:paramtypes",[])],it.prototype,"rootHandleStr",null),te([Widget.Reactive(),ie("design:type",Object)],it.prototype,"isRootView",void 0),te([Widget.Reactive(),ie("design:type",Object),ie("design:paramtypes",[])],it.prototype,"isRoot",null),te([Widget.Reactive(),ie("design:type",Object),ie("design:paramtypes",[])],it.prototype,"useConstruct",null),te([Widget.Provide(),ie("design:type",Object)],it.prototype,"selfHandleStr",void 0),te([Widget.Reactive(),Widget.Provide("view"),ie("design:type",Object)],it.prototype,"view",void 0),te([Widget.Reactive(),Widget.Provide("viewModel"),ie("design:type",Object)],it.prototype,"model",void 0),te([Widget.Reactive(),ie("design:type",String)],it.prototype,"path",void 0),it=te([Y.Base("View",["id","name","type","model","widget","tagName"])],it);const nt=Symbol("view");export{ActiveRecordsWidget,AsyncVueWidget,ae as DEFAULT_TAG_PREFIX,DslDefinitionWidget,DslNodeWidget,DslRender,DslRenderWidget,tt as InnerWidgetType,PathWidget,le as RENDER_OPTIONS_KEY,ce as SLOTS_KEY,ue as SLOT_CONTEXT_KEY,nt as ViewSubSymbol,it as ViewWidget,VueWidget,Widget,et as WidgetTagProps,ge as componentInstall,Ne as defaultMetaContext,ve as directiveInstall,se as executeInvisible,Ye as genToken,We as getWidget,be as getWidgetNotNull,je as hasActionBarViewState,Me as hasFieldsViewState,Pe as hasRowActionBarViewState,de as isAllInvisible,Ce as isDetailViewState,Se as isFormViewState,we as isGalleryViewState,$e as isListViewState,Oe as isObjectViewState,De as isSearchViewState,Re as isTableViewState,Ae as isTreeViewState,me as newVueWidget,qe as onAllMounted,fe as pluginInstall,ye as renderWidgets,Xe as reportAllMounted,He as useInjectMetaContext,Fe as useOioState,Ie as useProviderMetaContext};
|
|
16
|
+
function ie(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function ne(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function oe(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function d(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,d)}a((n=n.apply(e,t||[])).next())})}Widget.widgetCount=0,Widget.widgetMap=new Map,Widget.attributeMap=new Map,Widget.protoChainsCache=new WeakMap,Widget.watchMap=new Map,Widget.nameContextMap=new Map;var re,se=g({name:"VueFragment",inheritAttrs:!1,render(){var e,t;return v(f,void 0,(null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))||[])}});se.__file="src/basic/VueFragment.vue",function(e){e.beforeCreated="beforeCreated",e.created="created",e.beforeMount="beforeMount",e.mounted="mounted",e.beforeUpdate="beforeUpdate",e.updated="updated",e.activated="activated",e.deactivated="deactivated",e.beforeUnmount="beforeUnmount",e.unmounted="unmounted"}(re||(re={}));class VueWidget extends Widget{constructor(){super(...arguments),this.behaviorGroup={},this.node_code=this.revolveNodeCode()}revolveNodeCode(){return t()}setup(e){return(t,i)=>{this.__scope&&(this.__scope.stop(),this.__scope=null),this.__scope=y();let n={};return this.__scope.run(()=>{const{opt:o}=this;this.getAttributes().forEach((e,t)=>{const i=this.getComputeHandler(t);if(i)i.get&&(i.set?Reflect.set(n,t,m({get:i.get.bind(o),set:i.set.bind(o)})):Reflect.set(n,t,m(i.get.bind(o))));else{const i=Reflect.get(this,e);"function"==typeof i?Reflect.set(n,t,i.bind(o)):Reflect.set(n,t,W(i))}});this.getWatchers().forEach(e=>{const t=e.path.split("."),i=n[t[0]];i&&(1===t.length?b(i,e.handler.bind(o),e.options):b(()=>{let e=i.value||{};for(let i=1;i<t.length&&(e=e[t[i]],e);i++);return e},e.handler.bind(o),e.options))});const r=e&&e(t,i,n);r&&(n=Object.assign(Object.assign({},n),r)),this.res=n}),n}}static HookHost(){return(e,t)=>{const i=VueWidget.hookHosts.get(e.constructor)||[];i.push(t),VueWidget.hookHosts.set(e.constructor,i)}}static getHookHosts(e){const t=[];return(()=>{const t=[];let i=e.constructor,{name:n}=i;for(;""!==n;)n=i.name,t.push(i),i=Object.getPrototypeOf(i);return t})().forEach(e=>{const i=VueWidget.hookHosts.get(e);i&&i.forEach(e=>t.push(e))}),t}static getHooks(e,t,i){const n=(e=>{const t=[];let i=e;for(;""!==i.name;)t.push(i.name),i=Object.getPrototypeOf(i);return t})(Widget.select(e).constructor),o=[];return n.forEach(e=>{let n;n="after"===i?VueWidget.afterHooks.get(e):VueWidget.beforeHooks.get(e);(n&&n.get(t)||[]).forEach(e=>o.push(e))}),o}static BeforeHook(e){return(t,i,n)=>{const o=VueWidget.beforeHooks.get(t.constructor.name)||new Map,r=o.get(e)||[];r.push(n.value),o.set(e,r),VueWidget.beforeHooks.set(t.constructor.name,o)}}static AfterHook(e){return(t,i,n)=>{const o=VueWidget.afterHooks.get(t.constructor.name)||new Map,r=o.get(e)||[];r.push(n.value),o.set(e,r),VueWidget.afterHooks.set(t.constructor.name,o)}}getNodeCode(){return this.node_code}getNodeCodeRef(){return this.res.node_code}getOperator(){const{opt:e}=this;return e||this}createWidget(e,t,i,n,o=!1){const r=this.getOperator(),s=super.createWidget.bind(r)(e,t,i||{},n);o&&(r.node_code=this.revolveNodeCode());const d=s&&s.getOperator();return void 0!==n&&n>=0?this.getChildrenInstance()[n]=s.getOperator():this.addChildrenInstance(d),d}deleteWidget(e){const t=super.deleteWidget(e);return this.getOperator().node_code=this.revolveNodeCode(),t}insertWidget(e,t){super.insertWidget(e,t);this.getOperator().node_code=this.revolveNodeCode()}moveChildWidget(e,t){super.moveChildWidget(e,t);this.getOperator().node_code=this.revolveNodeCode()}deleteWidgetByIndex(e,t){const i=super.deleteWidgetByIndex(e,t);return this.getOperator().node_code=this.revolveNodeCode(),i}initialize(e={}){return super.initialize(e),this.component=se,this.buildOperator(),this}buildOperator(){const e=new Proxy(this,{get:(e,t)=>{if("isProxy"===t)return!0;if("constructor"===t)return this.constructor;const i=this.res||{},n=Reflect.get(i,t);return n?R(n)?(n.value,n.value):n:Reflect.get(e,t)},set:(e,t,i)=>{const n=this.res||{},o=Reflect.get(n,t);return"function"==typeof o?Reflect.set(n,t,i):R(o)?(o.value=i,!0):Reflect.set(e,t,i)}});this.opt=e,this.initialize=this.initialize.bind(e);return VueWidget.getHookHosts(this).forEach(t=>{const i=Reflect.get(this,t);Reflect.set(this,t,(...n)=>{if("render"===t)return i.apply(e,n);const o=e.executeBeforeHooks(t,n),r=i.apply(e,o);return e.executeAfterHooks(t,r)})}),e}getWidgetComponent(e=!1){let t=this.widgetComponent;return!t&&e&&(t=this.buildWidgetComponent(),this.widgetComponent=t),t}setWidgetComponent(e){this.widgetComponent=e}renderExpandComponent(){}getMixinComponent(){return this.mixinComponent}setMixinComponent(e){e&&(e=Object.assign({inheritAttrs:!1},e)),this.mixinComponent=e}render(e,t){return this.widgetComponent||(this.widgetComponent=this.buildWidgetComponent()),this.widgetComponent?this.renderWidgetComponent(this.widgetComponent,e,t):[]}getWidgetComponentName(){const{name:e}=this.constructor;return e}buildWidgetComponent(){let e=this.getComponent();if(!e)return;e=D(e);const t=this.getOperator(),i=this.getUsingComponents();return g({name:this.getWidgetComponentName(),components:i,inheritAttrs:!1,setup:this.setup(this.setupHook.bind(this)),beforeMount:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.beforeMount])||void 0===i||i.call(e),this.$$beforeMount.call(t),this.beforeMount.call(t)},mounted:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.mounted])||void 0===i||i.call(e),this.$$mounted.call(t),this.mounted.call(t)},beforeUpdate:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.beforeUpdate])||void 0===i||i.call(e),this.$$beforeUpdate.call(t),this.beforeUpdate.call(t)},updated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.updated])||void 0===i||i.call(e),this.$$updated.call(t),this.updated.call(t)},activated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.activated])||void 0===i||i.call(e),this.$$activated.call(t),this.activated.call(t)},deactivated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.deactivated])||void 0===i||i.call(e),this.$$deactivated.call(t),this.deactivated.call(t)},beforeUnmount:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.beforeUnmount])||void 0===i||i.call(e),this.$$beforeUnmount.call(t),this.beforeUnmount.call(t)},unmounted:()=>{var e,i;null===(i=(e=this.behaviorGroup)[re.unmounted])||void 0===i||i.call(e),this.unmounted.call(t),this.$$unmounted.call(t),this.$$unmountedAfterProperties.call(t)},render:t=>{const i=this.buildProps(t),{$slots:n}=t,o=this.resolveProps(e,i),r=n&&Object.keys(n).length?n:this.resolveChildren(),s=this.renderExpandComponent(),d={};if(s){const e=r.default?r.default():[];d.default=()=>[...e,s]}return this.renderMixinComponent(v(e,o,Object.assign(Object.assign({},r),d)),i)}})}resolveProps(e,t){return t}renderMixinComponent(e,t){const i=this.getMixinComponent();if(i){const n=e,o=this.resolveProps(i,t);e=v(i,o,{default:()=>n})}return e}renderWidgetComponent(e,t,i){return v(e,{},i)}buildProps(e){const t={},i=this.getAttributes(),n=this.getProps();return i.forEach((i,o)=>{n.includes(i)&&Reflect.set(t,i,Reflect.get(e,o))}),t["data-handle"]=this.getHandle(),t}buildPropsStrs(){const e=this.getProps(),t=[];return e.forEach(e=>t.push(e)),t}resolveChildren(){const e={},t=[],i=this.getChildren();return i.forEach(e=>{t.includes(e.getName())||t.push(e.getName())}),t.forEach(t=>{Reflect.set(e,t,(...e)=>i.filter(e=>e.getName()===t).map(t=>t.render(...e)))}),e}setupHook(e,t,i){var n,o,r,s;return null===(o=(n=this.behaviorGroup)[re.beforeCreated])||void 0===o||o.call(n),this.$$beforeCreated(),this.beforeCreated(),null===(s=(r=this.behaviorGroup)[re.created])||void 0===s||s.call(r),this.$$created(),this.created(),{}}setComponent(e){this.component=Object.assign({inheritAttrs:!1},e)}dispose(e=!1){super.dispose(e),this.opt=void 0;const t=null;this.__scope&&(this.__scope.stop(),this.__scope=t),this.component=t,this.mixinComponent=t,this.widgetComponent=t,e&&S(()=>{this.res={},this.__proto__=null})}getComponent(){const{name:e,__render__:t,__name__:i}=this.constructor;return t&&(this.component=g({name:i||e,props:this.buildPropsStrs(),render:t,components:this.getUsingComponents()})),this.component}getUsingComponents(){return{}}executeAfterHooks(e,t){const i=VueWidget.getHooks(this.getHandle(),e,"after");let n=0;const o={result:t},r=()=>{n<i.length&&i[n++].apply(this,[r,o])};return r(),o.result}executeBeforeHooks(e,...t){const i=VueWidget.getHooks(this.getHandle(),e,"before");let n=0;const o={args:t},r=()=>{n<i.length&&i[n++].apply(this,[r,o])};return r(),o.args}beforeCreated(){}$$beforeCreated(){}created(){}$$created(){}beforeMount(){}$$beforeMount(){}mounted(){}$$mounted(){}beforeUpdate(){}$$beforeUpdate(){}updated(){}$$updated(){}activated(){}$$activated(){}deactivated(){}$$deactivated(){}beforeUnmount(){}$$beforeUnmount(){}unmounted(){}$$unmounted(){}$$unmountedAfterProperties(){this.dispose()}registryBehavior(e,t){this.behaviorGroup[e]=t}reset(){this.widgetComponent=void 0,this.getParent().node_code=this.revolveNodeCode()}translate(e,t={}){const i=Reflect.get(window,"translate"),n=i?i(e):"";if(n===e||0===Object.keys(t).length)return n;return n.replace(/\{\s*([A-Z0-9_]+)\s*\}/gi,(e,i)=>t[i])}translateByI18n(e){return d(e)||e}genStaticPath(e){return a(e)}forceUpdate(){const e=this.getOperator();e&&(e.node_code=this.revolveNodeCode())}}VueWidget.beforeHooks=new Map,VueWidget.afterHooks=new Map,VueWidget.hookHosts=new Map,ie([Widget.Reactive(),ne("design:type",String)],VueWidget.prototype,"node_code",void 0),ie([VueWidget.HookHost(),ne("design:type",Function),ne("design:paramtypes",[Object,Object]),ne("design:returntype",Object)],VueWidget.prototype,"render",null),ie([Widget.Reactive(),ne("design:type",Function),ne("design:paramtypes",[Object,Object]),ne("design:returntype",String)],VueWidget.prototype,"translate",null),ie([Widget.Reactive(),ne("design:type",Function),ne("design:paramtypes",[String]),ne("design:returntype",String)],VueWidget.prototype,"translateByI18n",null),ie([Widget.Method(),ne("design:type",Function),ne("design:paramtypes",[String]),ne("design:returntype",void 0)],VueWidget.prototype,"genStaticPath",null);class AsyncVueWidget extends VueWidget{setup(e){const t=super.setup();return(i,n)=>oe(this,void 0,void 0,function*(){const o=t(i,n),r=e&&(yield e(i,n))||{};for(const e in r)Reflect.set(o,e,Reflect.get(r,e));return o})}render(e){return C("div",C(w,super.render(e)))}setupHook(e,t,i){return oe(this,void 0,void 0,function*(){return yield this.beforeCreated(),yield this.created(),{}})}}class DslNodeWidget extends VueWidget{get widgetPath(){let e=this.parentPath||"";const{subPath:t,subIndex:i}=this;return t&&(e=e?`${e}.${t}`:t),null!=i&&(e=`${e}[${i}]`),e}get variables(){return B.resolveVariables(this.getDsl())}initialize(e){var t;super.initialize(e),this.dslNode=e.dslNode,this.metadataHandle=e.metadataHandle,this.rootHandle=e.rootHandle,this.template=e.template,this.slotName=e.slotName,this.widgetInline=e.widgetInline,this.currentHandle=this.getHandle();const{subPath:i,subIndex:n}=e;return this.subPath=i||(null===(t=this.template)||void 0===t?void 0:t.dslNodeType)||"",I(n)?this.subIndex=e.__index:this.subIndex=n,this}getDsl(){return this.dslNode||{}}getSlotName(){return this.slotName}getDslChildrenByLabel(e){return this.dslNode?(this.dslNode.children||[]).find(t=>t.tagName===e.toUpperCase()):null}get metadataRuntimeContext(){const{metadataHandle:e}=this;if(e)return c.get(e)}get rootRuntimeContext(){const{rootHandle:e}=this;if(e)return c.get(e)}}function de(e){const t=null==e?void 0:e.invisible;return!I(t)&&(H(t)?t:t())}function ae(e){return!e||!e.length||e.every(e=>de(e))}ie([Widget.Reactive(),ne("design:type",Object)],DslNodeWidget.prototype,"metadataHandle",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslNodeWidget.prototype,"rootHandle",void 0),ie([Widget.Reactive(),ne("design:type",String)],DslNodeWidget.prototype,"currentHandle",void 0),ie([Widget.Reactive({render:!1}),ne("design:type",Object)],DslNodeWidget.prototype,"dslNode",void 0),ie([Widget.Reactive({render:!1}),ne("design:type",Object)],DslNodeWidget.prototype,"template",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslNodeWidget.prototype,"slotName",void 0),ie([Widget.Reactive(),Widget.Inject("path"),ne("design:type",Object)],DslNodeWidget.prototype,"parentPath",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslNodeWidget.prototype,"subPath",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslNodeWidget.prototype,"subIndex",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Object),ne("design:paramtypes",[])],DslNodeWidget.prototype,"widgetPath",null),ie([Widget.Reactive(),ne("design:type",Object)],DslNodeWidget.prototype,"widgetInline",void 0),ie([Widget.Reactive(),ne("design:type",Object),ne("design:paramtypes",[])],DslNodeWidget.prototype,"variables",null);const ce="oinone",le="__slots",ue="__render__options",pe="slotContext",he=["div","a","span","table","form","detail","ul","li","h1","h2","h3","h4","h5","h6","p","thead","tbody","tr","th","td"];function ge(e,t,i){let n=e[t];if(delete e[t],!n&&i){n=i;const{dslDefinition:o}=e;o&&(o[t]=i)}return n}class DslRender{static render(e,t=k,i,n){const o=DslRender.fetchComponent(e);if(o)return DslRender.createVNodeWithDslDefinition(o,e,t,i,n)}static renderSlots(e){const t={};for(const i in e)t[i]=A(t=>{var n;return DslRender.createVNodeChildren(null===(n=e[i])||void 0===n?void 0:n.widgets,i,t)});return t}static fetchVNodeSlots(e,t){var i;if(!e)return;const n=e[le];if(n)return n;if(!t){const n=[k];null===(i=e.widgets)||void 0===i||i.forEach(e=>{if(U.isTemplate(e)){let t=e.slot;t||(t=k),n.push(t)}}),t=[...new Set(n)]}const o=T.fetchSlotsBySlotNames(e,t);return DslRender.renderSlots(o)}static fetchComponent(e){let t,{dslNodeType:i}=e||{};switch(i||(i=F.ELEMENT),i){case F.VIEW:t=$(`${ce}-${e.dslNodeType}`);break;case F.PACK:{const i=e;t=DslRender.resolveWidgetComponent(`${i.widget||"group"}`),"string"==typeof t&&(t=DslRender.resolveWidgetComponent(`${e.dslNodeType}`));break}case F.ELEMENT:{const i=e;t=DslRender.resolveWidgetComponent(`${i.widget}`),"string"==typeof t&&(t=DslRender.resolveWidgetComponent(`${e.dslNodeType}`));break}case F.ACTION:case F.FIELD:t=DslRender.resolveWidgetComponent(`${e.dslNodeType}`);break;case F.UNKNOWN:case F.SLOT:case F.TEMPLATE:t=null;break;default:t=DslRender.resolveCommonWidgetComponent(i)}return t}static createVNodeChildren(e,t,i,n){const o=[];if(!e)return o;t||(t=k),I(n)&&(n=0);const{length:r}=e;for(let s=0;s<r;s++){const r=e[s],d=DslRender.fetchComponent(r);if(d)o.push(DslRender.createVNodeWithDslDefinition(d,r,t,_(d)?DslRender.fetchVNodeSlots(r):void 0,i?{slotContext:i}:void 0,s+n));else if(null===d){const{dslNodeType:e}=r;switch(e){case F.SLOT:{const e=DslRender.createVNodeChildren(r.widgets,t,i,s+n);n+=e.length,e.forEach(e=>o.push(e));break}case F.UNKNOWN:case F.TEMPLATE:continue;default:console.error("Invalid component.")}}}return o}static createVNodeWithDslDefinition(e,i,n,o,r,s){var d;I(s)||i.__index===s||(i.__index=s);const a=_(e),c=a?G.collectionBasicProps(i):Object.assign(Object.assign({},i),{dslDefinition:Object.assign({},i),slotName:n});let l;l=a&&i.__content||ge(c,le,o);const u=ge(c,ue,r),p=null==u?void 0:u.slotContext;if(p){const e=null==r?void 0:r.slotContext;e&&(u.slotContext=e),c.slotContext=p}if(DslRenderHelper.predictIsUpdateKey(i,u)){const e=t();i.key=e,c.key=e}DslRenderHelper.predictIsRecursion(u)&&!l&&(null===(d=i.widgets)||void 0===d?void 0:d.length)&&(l=DslRender.fetchVNodeSlots(i));let h=null==u?void 0:u.dynamicProps;return p&&(h=E(h||[],[pe])),v(e,c,l,null==u?void 0:u.patchFlag,h,null==u?void 0:u.isBlockNode)}static resolveCommonWidgetComponent(e){let t=DslRender.resolveCommonComponentCache[e];return t||(he.includes(e)?e:(t=$(`${ce}-${i.camelCaseToKebabCase(e)}`),"string"==typeof t&&(t=$(e)),DslRender.resolveCommonComponentCache[e]=t,t))}static resolveWidgetComponent(e){let t=DslRender.resolveComponentCache[e];if(t)return t;if(he.includes(e))return e;if(t=$(e),"string"==typeof t)for(const i of DslRender.resolveMethods){const n=i(e);if(n){const e=$(n);if("string"!=typeof e){t=e;break}}}return DslRender.resolveComponentCache[e]=t,t}}DslRender.resolveComponentCache={},DslRender.resolveCommonComponentCache={},DslRender.resolveMethods=[e=>{if(-1===e.indexOf("-")){const t=e.charCodeAt(0);if(t>=i.UPPER_A_ASCLL&&t<=i.UPPER_Z_ASCLL)return`${e[0].toLowerCase()}${e.substring(1)}`}},e=>{if(-1===e.indexOf("-")){const t=e.charCodeAt(0);if(t>=i.LOWER_A_ASCLL&&t<=i.LOWER_Z_ASCLL)return`${e[0].toUpperCase()}${e.substring(1)}`}},e=>i.camelCaseToKebabCase(e)];class DslRenderHelper{static predictIsUpdateKey(e,t){const i=(null==t?void 0:t.dynamicKey)||!1,n=(null==t?void 0:t.focusUpdate)||!1;if(e.key){if(n)return!0}else if(i)return!0;return!1}static predictIsRecursion(e){return(null==e?void 0:e.recursion)||!1}}function ve(e,t){t||(t=e.name);const i=c.createOrReplace().frameworkInstance;t?"string"==typeof t?i.component(t,e):t.forEach(t=>i.component(t,e)):Z()&&console.warn("component install error. reason: name is blank.",e)}function fe(e,t){c.createOrReplace().frameworkInstance.directive(t,e)}function ye(e,...t){c.createOrReplace().frameworkInstance.use(e,...t)}function me(e,t,i){let n;const{length:o}=e;for(let r=o-1;r>=0;r--){const o=e[r];if(n){const e=Array.isArray(n)?n:[n];n=o.render(t,Object.assign({default:()=>e},K))}else n=o.render(t,Object.assign(Object.assign({},i),K))}return n}function We(){return new VueWidget}function be(e){return n.cast(Widget.select(e))}function Re(e){return be(e)||We()}class DslRenderWidget extends VueWidget{constructor(){super(...arguments),this.internal=!1}initialize(e){return super.initialize(e),this.internal=e.internal||!1,this.template=e.template,this.slotName=e.slotName,this.supportedSlotNames=e.slotNames||[],this.template&&this.supportedSlotNames.length&&(this.dslSlots=T.fetchSlotsBySlotNames(this.template,this.supportedSlotNames)),this}getDsl(){return this.template||z}getSlotName(){return this.slotName}render(e,t){return this.template&&(void 0===this.slots&&(this.internal?this.slots=this.internalRender(t)||null:this.slots=this.commonRender(t)||null),this.slots)?this.rawRender(e,this.slots):this.rawRender(e,t)}rawRender(e,t){return super.render(e,t)}internalRender(e){return e&&Object.keys(e).length?e:this.dslSlots&&Object.keys(this.dslSlots).length?DslRender.renderSlots(this.dslSlots):void 0}commonRender(e){return this.dslSlots&&Object.keys(this.dslSlots).length?DslRender.renderSlots(this.dslSlots):e&&Object.keys(e).length?e:void 0}}ie([Widget.Reactive(),ne("design:type",Object)],DslRenderWidget.prototype,"internal",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslRenderWidget.prototype,"template",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslRenderWidget.prototype,"slotName",void 0);class DslDefinitionWidget extends DslRenderWidget{constructor(e){super(e),this.automatic=!1,this.defaultAllInvisible=!1,this.invisibleState=!1,this.currentHandle=this.getHandle()}getMetadataHandle(){return this.metadataHandle}get class(){return this.getDsl().class}get style(){return Q.convertStyleByDslDefinition(this.getDsl())}getRootHandle(){return this.rootHandle}getCurrentHandle(){return this.currentHandle}get allInvisible(){const{allInvisible:e}=this.getDsl();return I(e)?this.defaultAllInvisible:o.toBoolean(e)}get invisible(){let{invisible:e}=this.getDsl();return e=!I(e)&&this.invisibleProcess(e),e||!!this.allInvisible&&(this.invisibleState=this.childrenInvisibleProcess(),this.invisibleState)}get parentInvisibleProvider(){return this.parentInvisible||this.invisible}initialize(e){return super.initialize(e),this.metadataHandle=e.metadataHandle,this.rootHandle=e.rootHandle,this.automatic=e.automatic||!1,this.inline=e.inline,this}get metadataRuntimeContext(){const e=this.metadataRuntimeContextNullable;if(!e)throw new Error("Invalid metadata runtime context.");return e}get metadataRuntimeContextNullable(){const{metadataHandle:e}=this;let t;return e&&(t=c.get(e)),t}get rootRuntimeContext(){const e=this.rootRuntimeContextNullable;if(!e)throw new Error("Invalid root runtime context.");return e}get rootRuntimeContextNullable(){const{rootHandle:e}=this;let t;return e&&(t=c.get(e)),t}get rootComputeContext(){const{rootHandle:e}=this;let t;return e&&(t=l.get(e)),t}get rootViewRuntimeContext(){var e,t,i;const n=[];let o=this.rootRuntimeContext,r=null===(e=null==o?void 0:o.parentContext)||void 0===e?void 0:e.field;for(;r&&o;){n.push(r);const e=null===(t=null==o?void 0:o.parentContext)||void 0===t?void 0:t.handle;if(!e)throw new Error("Invalid field runtime context handle");const s=null===(i=Widget.select(e))||void 0===i?void 0:i.rootRuntimeContext,d=null==s?void 0:s.parentContext;if(!d||d.handle===u)break;r=d.field,o=s}return{runtimeContext:o,fields:n}}getMergeConfig(...e){if(this.cacheConfigProxy)return this.cacheConfigProxy;const t=L(e,{defaultValue:void 0});return this.cacheConfigProxy=new Proxy(this.getDsl(),{get:(e,i)=>i in e?e[i]:t[i]}),this.cacheConfigProxy}invisibleProcess(e){return o.toBoolean(e)}childrenInvisibleProcess(){return ae(this.getChildren())}resetInvisible(){this.allInvisible&&(this.invisibleState=this.childrenInvisibleProcess())}resetParentInvisible(){var e,t;null===(t=null===(e=this.getParent())||void 0===e?void 0:e.resetInvisible)||void 0===t||t.call(e)}$$mounted(){super.$$mounted(),this.resetInvisible(),this.lastedInvisibleState=this.invisible}$$updated(){super.$$updated();const{lastedInvisibleState:e,invisible:t}=this;this.lastedInvisibleState=t,e!==t&&this.resetParentInvisible()}$$unmountedAfterProperties(){super.$$unmountedAfterProperties(),this.automatic||this.metadataHandle!==this.rootHandle||c.delete(this.metadataHandle)}allMounted(){this.resetInvisible()}}ie([Widget.Reactive(),ne("design:type",Object)],DslDefinitionWidget.prototype,"automatic",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslDefinitionWidget.prototype,"metadataHandle",void 0),ie([Widget.Reactive(),ne("design:type",Object),ne("design:paramtypes",[])],DslDefinitionWidget.prototype,"class",null),ie([Widget.Reactive(),ne("design:type",Object),ne("design:paramtypes",[])],DslDefinitionWidget.prototype,"style",null),ie([Widget.Reactive(),ne("design:type",Object)],DslDefinitionWidget.prototype,"rootHandle",void 0),ie([Widget.Reactive(),ne("design:type",String)],DslDefinitionWidget.prototype,"currentHandle",void 0),ie([Widget.Reactive(),ne("design:type",Object)],DslDefinitionWidget.prototype,"inline",void 0),ie([Widget.Reactive(),ne("design:type",Object),ne("design:paramtypes",[])],DslDefinitionWidget.prototype,"allInvisible",null),ie([Widget.Reactive(),ne("design:type",Object)],DslDefinitionWidget.prototype,"invisibleState",void 0),ie([Widget.Reactive(),Widget.Inject(),ne("design:type",Object)],DslDefinitionWidget.prototype,"parentInvisible",void 0),ie([Widget.Reactive(),ne("design:type",Boolean),ne("design:paramtypes",[])],DslDefinitionWidget.prototype,"invisible",null),ie([Widget.Reactive(),Widget.Provide("parentInvisible"),ne("design:type",Object),ne("design:paramtypes",[])],DslDefinitionWidget.prototype,"parentInvisibleProvider",null),ie([Widget.Method(),ne("design:type",Function),ne("design:paramtypes",[]),ne("design:returntype",void 0)],DslDefinitionWidget.prototype,"allMounted",null);class PathWidget extends DslDefinitionWidget{get path(){const{parentPath:e,subPath:t,subIndex:i,currentPath:n}=this;if(I(n)){let n=e||"";return this.internal||t&&(n=n?`${n}.${t}`:t,null!=i&&(n=`${n}[${i}]`)),n}return n}initialize(e){var t;super.initialize(e);const{subPath:i,subIndex:n,path:o}=e;return this.currentPath=o,this.subPath=i||(null===(t=this.template)||void 0===t?void 0:t.dslNodeType)||"",I(n)?this.subIndex=e.__index:this.subIndex=n,this}}function De(e){return e.viewType===J.Table}function Se(e){return e.viewType===J.Search}function Ce(e){return e.viewType===J.Form}function we(e){return e.viewType===J.Detail}function Ae(e){return e.viewType===J.Gallery}function $e(e){return e.viewType===J.Tree}function Oe(e){return e.viewType===J.Table||e.viewType===J.Gallery}function Me(e){return e.viewType===J.Form||e.viewType===J.Detail||e.viewType===J.Search}function je(e){const{viewType:t}=e;return!!t&&(t===J.Table||t===J.Form||t===J.Detail)}function Pe(e){const{viewType:t}=e;return!!t&&t!==J.Search}function Ne(e){const{viewType:t}=e;return!!t&&(t===J.Table||t===J.Gallery)}ie([Widget.Reactive(),Widget.Inject("path"),ne("design:type",Object)],PathWidget.prototype,"parentPath",void 0),ie([Widget.Reactive(),ne("design:type",Object)],PathWidget.prototype,"subPath",void 0),ie([Widget.Reactive(),ne("design:type",Object)],PathWidget.prototype,"subIndex",void 0),ie([Widget.Reactive(),ne("design:type",Object)],PathWidget.prototype,"currentPath",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Object),ne("design:paramtypes",[])],PathWidget.prototype,"path",null);const Ve={viewType:m(()=>J.Form),model:m(()=>""),modelName:m(()=>""),module:m(()=>""),moduleName:m(()=>""),metadataHandle:m(()=>""),rootHandle:m(()=>""),parentHandle:m(()=>""),slotName:m(()=>{}),inline:m(()=>!1)},Ie=Symbol("MetaContext"),He=e=>{O(Ie,Object.assign(Object.assign({},Ve),e))},_e=()=>M(Ie,Ve);const Ee=j({fullscreen:!1});function xe(e,t){var i;if(null==t){if(je(e))return e}else if(Ae(e))return null===(i=e.cards)||void 0===i?void 0:i[t]}const Be={},ke={pushField:function(e,t){const i=xe(this,t);if(!i)return;const{fields:n,fieldWidgets:o}=i;n&&(n.some(t=>t===e)||(n.push(e),i.fields=[...n]))},popField:function(e,t){const i=xe(this,t);if(!i)return;const{fields:n}=i;if(!n)return;const o=n.findIndex(t=>t===e);-1!==o&&(n.splice(o,1),i.fields=[...n])},createActionBarState:function(e){const t=Object.assign({actions:[],visibleActions:[]},e);return Object.defineProperty(t,"visibleActions",{get(){return this.actions.filter(e=>{const t=Widget.select(e);return!!t&&!de(t)})}}),j(t)},getActionBarState:function(e){var t;if(null==e){const e=this.__position[this.__position.length-1];if(null==e)return console.warn("Please call getActionBarState method in the vue lifecycle."),this.actionBar;const{slotName:t}=e;if(t&&t!==k){if(Pe(this))return this.actionBars[t]}else if(Pe(this))return this.actionBar}else if(Ne(this))return null===(t=this.inlineActionBars)||void 0===t?void 0:t[e]},pushAction:function(e,t){const i=this.getActionBarState(t);if(!i)return;const{actions:n}=i;n&&(n.some(t=>t===e)||(n.push(e),i.actions=[...n]))},popAction:function(e,t){const i=this.getActionBarState(t);if(!i)return;const{actions:n}=i;if(!n)return;const o=n.findIndex(t=>t===e);-1!==o&&(n.splice(o,1),i.actions=[...n])}};function Ue(e){const t={get handle(){return e},fullscreen:!1,__position:[]},i=j(t);for(const[e,n]of Object.entries(ke))t[e]=n.bind(i);return i}function Te(e){var t;if(e||(e=null===(t=_e())||void 0===t?void 0:t.rootHandle.value))return Be[e];console.warn("Invalid root handle.")}function Fe(e){var t;if(!e&&!(e=null===(t=_e())||void 0===t?void 0:t.rootHandle.value))return void console.warn("Invalid root handle.");const i=Be[e];return delete Be[e],i}function ze(e){return e?{globalState:Ee,viewState:Te(e),createViewState:()=>{const t=Ue(e);return function(e){Be[e.handle]=e}(t),t},getViewState:()=>Te(e),clearViewState:()=>Fe(e)}:{globalState:Ee,viewState:Te(),createViewState:Ue,getViewState:Te,clearViewState:Fe}}class ActiveRecordsWidget extends PathWidget{getViewState(){return this.viewState}setViewState(e){this.viewState=e}initialize(e){super.initialize(e);const{dataSource:t,activeRecords:i}=e;return this.setCurrentDataSource(t),this.setCurrentActiveRecords(i),this}get submitCache(){var e;return null===(e=this.metadataRuntimeContext.field)||void 0===e?void 0:e.submitCache}get rootData(){return this.currentRootData||this.parentRootData}set rootData(e){this.currentRootData=e}getCurrentRootData(){return this.currentRootData}setCurrentRootData(e){this.currentRootData=p.repairRecordsNullable(e)}reloadRootData(e){this.parentReloadRootData&&void 0===this.currentRootData?this.parentReloadRootData(e):this.setCurrentRootData(e)}get dataSource(){return this.currentDataSource||this.parentDataSource}set dataSource(e){this.currentDataSource=e}getCurrentDataSource(){return this.currentDataSource}setCurrentDataSource(e){this.currentDataSource=p.repairRecordsNullable(e),this.parentRootData||(this.currentRootData=this.currentDataSource||void 0)}reloadDataSource(e){this.parentReloadDataSource&&void 0===this.getCurrentDataSource()?this.parentReloadDataSource(e):this.setCurrentDataSource(e)}pushDataSource(e,t,i){if(this.parentPushDataSource&&void 0===this.getCurrentDataSource())this.parentPushDataSource(e,t);else{let n=t;const{submitCache:o}=this;o&&!n&&(n=p.defaultPushPredict.bind(o));const r=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).push(e,n,i).get();o||this.setCurrentDataSource(r)}}updateDataSource(e){if(this.parentUpdateDataSource&&void 0===this.getCurrentDataSource())this.parentUpdateDataSource(e);else{const t=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).update(e).get();this.submitCache||this.setCurrentDataSource(t)}}updateDataSourceByEntity(e,t){if(this.parentUpdateDataSourceByEntity&&void 0===this.getCurrentDataSource())this.parentUpdateDataSourceByEntity(e,t);else{const i=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).updateByEntity(e,t).get();this.submitCache||this.setCurrentDataSource(i)}}deleteDataSource(e){if(this.parentDeleteDataSource&&void 0===this.getCurrentDataSource())this.parentDeleteDataSource(e);else{const t=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).delete(e).get();this.submitCache||this.setCurrentDataSource(t)}}deleteDataSourceByEntity(e,t){if(this.parentDeleteDataSourceByEntity&&void 0===this.getCurrentDataSource())this.parentDeleteDataSourceByEntity(e,t);else{const i=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).deleteByEntity(e,t).get();this.submitCache||this.setCurrentDataSource(i)}}flushDataSource(){var e;null===(e=this.parentFlushDataSource)||void 0===e||e.call(this)}get activeRecords(){return this.currentActiveRecords||this.parentActiveRecords}set activeRecords(e){this.currentActiveRecords=e}getCurrentActiveRecords(){return this.currentActiveRecords}setCurrentActiveRecords(e){e!==this.currentActiveRecords&&(this.currentActiveRecords=p.repairRecordsNullable(e))}reloadActiveRecords(e){this.parentReloadActiveRecords&&void 0===this.getCurrentDataSource()?this.parentReloadActiveRecords(e):this.setCurrentActiveRecords(e)}pushActiveRecords(e,t){this.parentPushActiveRecords&&void 0===this.getCurrentDataSource()?this.parentPushActiveRecords(e,t):this.currentActiveRecords=p.operator(this.currentActiveRecords).push(e,t).get()}updateActiveRecords(e){this.parentUpdateActiveRecords&&void 0===this.getCurrentDataSource()?this.parentUpdateActiveRecords(e):this.currentActiveRecords=p.operator(this.currentActiveRecords).update(e).get()}updateActiveRecordsByEntity(e,t){this.parentUpdateActiveRecordsByEntity&&void 0===this.getCurrentDataSource()?this.parentUpdateActiveRecordsByEntity(e,t):this.currentActiveRecords=p.operator(this.currentActiveRecords).updateByEntity(e,t).get()}deleteActiveRecords(e){this.parentDeleteActiveRecords&&void 0===this.getCurrentDataSource()?this.parentDeleteActiveRecords(e):this.currentActiveRecords=p.operator(this.currentActiveRecords).delete(e).get()}deleteActiveRecordsByEntity(e,t){this.parentDeleteActiveRecordsByEntity&&void 0===this.getCurrentDataSource()?this.parentDeleteActiveRecordsByEntity(e,t):this.currentActiveRecords=p.operator(this.currentActiveRecords).deleteByEntity(e,t).get()}flushActiveRecords(){this.parentFlushActiveRecords&&void 0===this.getCurrentDataSource()?this.parentFlushActiveRecords():this.currentActiveRecords=[]}$$initViewStatePosition(e){}$$clearViewStatePosition(e){}$$initViewState(e){}$$clearViewState(e){}$$beforeMount(){super.$$beforeMount();let e=!1;this.viewState||(this.viewState=ze().viewState,this.viewState&&(e=!0,this.$$initViewStatePosition(this.viewState),this.$$initViewState(this.viewState))),this.viewState&&!e&&this.$$initViewStatePosition(this.viewState)}$$mounted(){super.$$mounted(),this.viewState&&(this.$$clearViewStatePosition(this.viewState),this.$$clearViewState(this.viewState))}$$beforeUnmount(){super.$$beforeUnmount(),this.viewState&&this.$$initViewStatePosition(this.viewState)}$$unmounted(){super.$$unmounted(),this.viewState&&this.$$clearViewStatePosition(this.viewState)}}ie([Widget.Reactive(),Widget.Inject("rootData"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentRootData",void 0),ie([Widget.Reactive(),ne("design:type",Object)],ActiveRecordsWidget.prototype,"currentRootData",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Object),ne("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"rootData",null),ie([Widget.Method(),Widget.Inject("reloadRootData"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadRootData",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadRootData",null),ie([Widget.Reactive(),Widget.Inject("dataSource"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentDataSource",void 0),ie([Widget.Reactive(),ne("design:type",Object)],ActiveRecordsWidget.prototype,"currentDataSource",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Object),ne("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"dataSource",null),ie([Widget.Method(),Widget.Inject("reloadDataSource"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadDataSource",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadDataSource",null),ie([Widget.Method(),Widget.Inject("pushDataSource"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentPushDataSource",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object,Function,Number]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"pushDataSource",null),ie([Widget.Method(),Widget.Inject("updateDataSource"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateDataSource",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Array]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateDataSource",null),ie([Widget.Method(),Widget.Inject("updateDataSourceByEntity"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateDataSourceByEntity",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object,Function]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateDataSourceByEntity",null),ie([Widget.Method(),Widget.Inject("deleteDataSource"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteDataSource",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Array]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteDataSource",null),ie([Widget.Method(),Widget.Inject("deleteDataSourceByEntity"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteDataSourceByEntity",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object,Function]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteDataSourceByEntity",null),ie([Widget.Method(),Widget.Inject("flushDataSource"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentFlushDataSource",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"flushDataSource",null),ie([Widget.Reactive(),Widget.Inject("activeRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentActiveRecords",void 0),ie([Widget.Reactive(),Widget.Inject("parentViewActiveRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentViewActiveRecords",void 0),ie([Widget.Reactive(),ne("design:type",Object)],ActiveRecordsWidget.prototype,"currentActiveRecords",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Object),ne("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"activeRecords",null),ie([Widget.Method(),Widget.Inject("reloadActiveRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadActiveRecords",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadActiveRecords",null),ie([Widget.Method(),Widget.Inject("pushActiveRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentPushActiveRecords",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object,Function]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"pushActiveRecords",null),ie([Widget.Method(),Widget.Inject("updateActiveRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateActiveRecords",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Array]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateActiveRecords",null),ie([Widget.Method(),Widget.Inject("updateActiveRecordsByEntity"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateActiveRecordsByEntity",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object,Function]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateActiveRecordsByEntity",null),ie([Widget.Method(),Widget.Inject("deleteActiveRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteActiveRecords",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Array]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteActiveRecords",null),ie([Widget.Method(),Widget.Inject("deleteActiveRecordsByEntity"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteActiveRecordsByEntity",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[Object,Function]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteActiveRecordsByEntity",null),ie([Widget.Method(),Widget.Inject("flushActiveRecords"),ne("design:type",Object)],ActiveRecordsWidget.prototype,"parentFlushActiveRecords",void 0),ie([Widget.Method(),Widget.Provide(),ne("design:type",Function),ne("design:paramtypes",[]),ne("design:returntype",void 0)],ActiveRecordsWidget.prototype,"flushActiveRecords",null);const Le={reportBeforeMount:()=>{},reportMounted:()=>{},reportUnmounted:()=>{},reportAllBeforeMount:()=>{},reportAllMounted:()=>{},reportAllUnmounted:()=>{}},Ge=Symbol("AllMountedContext"),Ke=e=>{O(Ge,Object.assign(Object.assign({},Le),e))},Qe=()=>M(Ge,Le);function Ze(e,t){return!!Object.values(e).every(e=>e)&&(t(),!0)}let qe=0;function Je(e){if(!e)return void console.warn("all mounted method or object is required.");let t,i;x(e)?t=e:i=e;const{reportAllBeforeMount:n,reportAllMounted:o,reportAllUnmounted:r}=Qe(),s="all-mounted#"+qe++,d={},a={};Ke({reportBeforeMount:e=>{const t=d[e];I(t)&&(d[e]=!1),null==n||n(s)},reportMounted:e=>{const n=d[e];I(n)||n||(d[e]=!0,Ze(d,(null==i?void 0:i.allMounted)||t||(()=>({})))&&(null==o||o(s)))},reportUnmounted:e=>{delete d[e],null==r||r(s)},reportAllBeforeMount:e=>{const t=a[e];I(t)&&(a[e]=!1)},reportAllMounted:e=>{const t=a[e];I(t)||t||(a[e]=!0,Ze(a,(null==i?void 0:i.allMountedUpdate)||(()=>({}))))},reportAllUnmounted:e=>{delete a[e]}})}let Xe=0;function Ye(e){const{reportBeforeMount:t,reportMounted:i,reportUnmounted:n}=Qe(),o="mounted-#"+Xe++;P(()=>{var i;const n=null===(i=null==e?void 0:e.onBeforeMount)||void 0===i?void 0:i.call(e);n instanceof Promise?n.then(()=>{null==t||t(o)}):null==t||t(o)}),N(()=>{var t;const n=null===(t=null==e?void 0:e.onMounted)||void 0===t?void 0:t.call(e);n instanceof Promise?n.then(()=>{null==i||i(o)}):null==i||i(o)}),V(()=>{var t;const i=null===(t=null==e?void 0:e.onUnmounted)||void 0===t?void 0:t.call(e);i instanceof Promise?i.then(()=>{null==n||n(o)}):null==n||n(o)}),Ke({})}const et=e=>Y(`[vue-kunlun]: ${e}`),tt={handle:{type:String},dslDefinition:{type:Object},slotName:{type:String},inline:{type:Boolean,default:void 0},slotContext:{type:Object}};var it;!function(e){e.Action="Action",e.Field="Field",e.Element="Element",e.View="View",e.Mask="Mask"}(it||(it={}));let nt=class ViewWidget extends DslNodeWidget{constructor(){super(...arguments),this.loading=!1,this.currentRoute={},this.domain="",this.isRootView=!0,this.isDialogView=!1,this.selfHandleStr="",this.model=null,this.type="UNKNOWN",this.initQueryParams=null}getVM(){return this.$$vm}setVM(e){this.$$vm=e}setBusy(e){this.getVM().setBusy(e)}getUrlParams(){const{page:e={}}=q().matched.segmentParams;return e}getBusy(){return this.loading}initialize(e){return null==e.isRootView&&(e.isRootView=!0),super.initialize(e),this.isRootView=e.isRootView||!1,e.view&&(this.view=e.view),null==this.rootHandleStr&&e.isRootWidget&&(this.currentRootHandlerStr=this.getHandle()),this.selfHandleStr=this.getHandle(),this.isDialogView=e.isDialogView||!1,this.model=e.model,this.setVM(new h({view:e.view,dslNode:e.dslNode,model:e.model,isRootWidget:!1!==e.isRootWidget||e.isRootWidget,isDialogView:e.isDialogView||!1,isRootView:e.isRootView})),this.getVM().isRootWidget=this.isRoot,this.getVM().isDialogView=this.isDialogView,this}get rootHandleStr(){return this.currentRootHandlerStr||this.parentRootHandlerStr}on(e,t){this.getVM().on(e,t)}watch(e,t){this.getVM().watch(e,t)}filterWatchData(e,t,i){return this.getVM().filterWatchData(e,t,i)}get isRoot(){return this.rootHandleStr===this.getHandle()}get useConstruct(){return this.isRoot||this.isDialogView}get viewElement(){return X(this.dslNode)}resolveTemplate(){}fetchData(e,t,i){return{}}onRowsChange(e){}loadData(e,t){return{}}loadRootData(e){this.getVM().setRootData(e)}setRootDataByKey(e,t){const i=this.getVM().getRootData();i&&(i[e]=t,this.getVM().setRootData(i))}submit(){return{}}getData(){return this.getVM().getData()}setData(e){this.getVM().setData(e)}validator(){return oe(this,void 0,void 0,function*(){return[]})}loadMetadata(e,t,i,n){this.getVM().loadMetadata(e,t,i,n),this.model=this.getVM().getModel(),this.view=this.getVM().getView(),this.dslNode||(this.dslNode=t||this.getVM().getDslNode())}getActiveRecords(){return[]}setDomain(e){this.domain=e}getDomain(){return this.domain}setFilter(e){this.filter=e}getFilter(){return this.filter}getModel(){return this.getVM().getModel()}getView(){return this.getVM().getView()}getPath(){return this.path}notify(e){this.getVM().notify(e)}$$beforeCreated(){const{initQueryParams:e="{}"}=this.getUrlParams();try{const t=JSON.parse(e);this.initQueryParams=Object.keys(t).length?t:null}catch(e){this.initQueryParams=null}this.notify(te.ON_VIEW_BEFORE_CREATED)}$$created(){this.notify(te.ON_VIEW_CREATED)}$$beforeMount(){this.notify(te.ON_VIEW_BEFORE_MOUNT)}$$mounted(){this.getVM().setPageViewState("mount"),this.getVM().watchLoading(e=>{this.loading=e});const{getMatched$:e}=q();this.subjectRoute$=e().subscribe(e=>{this.currentRoute=e}),this.notify(te.ON_VIEW_MOUNTED)}$$beforeUpdate(){this.notify(te.ON_VIEW_BEFORE_UPDATE)}$$updated(){this.notify(te.ON_VIEW_UPDATED)}$$beforeUnmount(){this.notify(te.ON_VIEW_BEFORE_UNMOUNT)}$$unmounted(){this.getVM().setPageViewState("unmount");const e=setTimeout(()=>{"unmount"===this.getVM().getPageViewState()&&(this.notify(te.ON_VIEW_UNMOUNTED),this.getVM().unsubscribe()),clearTimeout(e)})}};ie([Widget.Reactive(),ne("design:type",Object)],nt.prototype,"loading",void 0),ie([Widget.Inject(),Widget.Reactive(),ne("design:type",String)],nt.prototype,"filter",void 0),ie([Widget.Reactive(),Widget.Inject("rootHandleStr"),ne("design:type",Object)],nt.prototype,"parentRootHandlerStr",void 0),ie([Widget.Reactive(),ne("design:type",Object)],nt.prototype,"currentRootHandlerStr",void 0),ie([Widget.Reactive(),Widget.Provide(),ne("design:type",Object),ne("design:paramtypes",[])],nt.prototype,"rootHandleStr",null),ie([Widget.Reactive(),ne("design:type",Object)],nt.prototype,"isRootView",void 0),ie([Widget.Reactive(),ne("design:type",Object),ne("design:paramtypes",[])],nt.prototype,"isRoot",null),ie([Widget.Reactive(),ne("design:type",Object),ne("design:paramtypes",[])],nt.prototype,"useConstruct",null),ie([Widget.Provide(),ne("design:type",Object)],nt.prototype,"selfHandleStr",void 0),ie([Widget.Reactive(),Widget.Provide("view"),ne("design:type",Object)],nt.prototype,"view",void 0),ie([Widget.Reactive(),Widget.Provide("viewModel"),ne("design:type",Object)],nt.prototype,"model",void 0),ie([Widget.Reactive(),ne("design:type",String)],nt.prototype,"path",void 0),nt=ie([ee.Base("View",["id","name","type","model","widget","tagName"])],nt);const ot=Symbol("view");export{ActiveRecordsWidget,AsyncVueWidget,ce as DEFAULT_TAG_PREFIX,DslDefinitionWidget,DslNodeWidget,DslRender,DslRenderWidget,it as InnerWidgetType,PathWidget,ue as RENDER_OPTIONS_KEY,le as SLOTS_KEY,pe as SLOT_CONTEXT_KEY,ot as ViewSubSymbol,nt as ViewWidget,VueWidget,Widget,tt as WidgetTagProps,ve as componentInstall,Ve as defaultMetaContext,fe as directiveInstall,de as executeInvisible,et as genToken,be as getWidget,Re as getWidgetNotNull,Pe as hasActionBarViewState,je as hasFieldsViewState,Ne as hasRowActionBarViewState,ae as isAllInvisible,we as isDetailViewState,Ce as isFormViewState,Ae as isGalleryViewState,Oe as isListViewState,Me as isObjectViewState,Se as isSearchViewState,De as isTableViewState,$e as isTreeViewState,We as newVueWidget,Je as onAllMounted,ye as pluginInstall,me as renderWidgets,Ye as reportAllMounted,_e as useInjectMetaContext,ze as useOioState,He as useProviderMetaContext};
|
|
@@ -31,7 +31,7 @@ export declare class DslDefinitionWidget<Props extends DslDefinitionWidgetProps
|
|
|
31
31
|
protected metadataHandle: string | undefined;
|
|
32
32
|
getMetadataHandle(): string | undefined;
|
|
33
33
|
protected get class(): CSSClass | undefined;
|
|
34
|
-
protected get style():
|
|
34
|
+
protected get style(): CSSStyle | undefined;
|
|
35
35
|
protected rootHandle: string | undefined;
|
|
36
36
|
getRootHandle(): string | undefined;
|
|
37
37
|
protected readonly currentHandle: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-widget",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.5",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf dist",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"x-postpublish": "node ../../scripts/postpublish.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@oinone/kunlun-vue-ui-common": "6.4.
|
|
14
|
+
"@oinone/kunlun-vue-ui-common": "6.4.5"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@oinone/kunlun-config": "~6.4.0",
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
RuntimeModelField
|
|
9
9
|
} from '@oinone/kunlun-engine';
|
|
10
10
|
import { BooleanHelper, CSSClass, CSSStyle } from '@oinone/kunlun-shared';
|
|
11
|
+
import { StyleHelper } from '@oinone/kunlun-vue-ui-common';
|
|
11
12
|
import { isNil } from 'lodash-es';
|
|
12
13
|
import { Widget } from '../basic';
|
|
13
14
|
import { InvisibleSupported, isAllInvisible } from '../feature';
|
|
@@ -58,8 +59,8 @@ export class DslDefinitionWidget<Props extends DslDefinitionWidgetProps = DslDef
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
@Widget.Reactive()
|
|
61
|
-
protected get style():
|
|
62
|
-
return this.getDsl()
|
|
62
|
+
protected get style(): CSSStyle | undefined {
|
|
63
|
+
return StyleHelper.convertStyleByDslDefinition(this.getDsl());
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
@Widget.Reactive()
|