@oinone/kunlun-vue-widget 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/oinone-kunlun-vue-widget.esm.js +16 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/basic/AsyncVueWidget.d.ts +7 -0
- package/dist/types/src/basic/VueFragment.vue.d.ts +2 -0
- package/dist/types/src/basic/VueWidget.d.ts +331 -0
- package/dist/types/src/basic/Widget.d.ts +234 -0
- package/dist/types/src/basic/index.d.ts +3 -0
- package/dist/types/src/data/ActiveRecordsWidget.d.ts +246 -0
- package/dist/types/src/data/PathWidget.d.ts +34 -0
- package/dist/types/src/data/index.d.ts +2 -0
- package/dist/types/src/dsl/DslDefinitionWidget.d.ts +61 -0
- package/dist/types/src/dsl/DslNodeWidget.d.ts +42 -0
- package/dist/types/src/dsl/DslRenderWidget.d.ts +44 -0
- package/dist/types/src/dsl/index.d.ts +3 -0
- package/dist/types/src/feature/index.d.ts +1 -0
- package/dist/types/src/feature/invisible-supported.d.ts +11 -0
- package/dist/types/src/hooks/all-mounted.d.ts +20 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/index.d.ts +9 -0
- package/dist/types/src/token/index.d.ts +2 -0
- package/dist/types/src/typing/WidgetTagContext.d.ts +39 -0
- package/dist/types/src/typing/WidgetTagProps.d.ts +23 -0
- package/dist/types/src/typing/index.d.ts +3 -0
- package/dist/types/src/typing/typing.d.ts +7 -0
- package/dist/types/src/util/dsl-render.d.ts +106 -0
- package/dist/types/src/util/index.d.ts +4 -0
- package/dist/types/src/util/install.d.ts +4 -0
- package/dist/types/src/util/render.d.ts +7 -0
- package/dist/types/src/util/widget-manager.d.ts +4 -0
- package/dist/types/src/view/index.d.ts +161 -0
- package/index.ts +1 -0
- package/package.json +34 -0
- package/rollup.config.js +21 -0
- package/src/basic/AsyncVueWidget.ts +31 -0
- package/src/basic/VueFragment.vue +11 -0
- package/src/basic/VueWidget.ts +997 -0
- package/src/basic/Widget.ts +675 -0
- package/src/basic/index.ts +3 -0
- package/src/data/ActiveRecordsWidget.ts +572 -0
- package/src/data/PathWidget.ts +82 -0
- package/src/data/index.ts +2 -0
- package/src/dsl/DslDefinitionWidget.ts +235 -0
- package/src/dsl/DslNodeWidget.ts +130 -0
- package/src/dsl/DslRenderWidget.ts +106 -0
- package/src/dsl/index.ts +3 -0
- package/src/feature/index.ts +1 -0
- package/src/feature/invisible-supported.ts +29 -0
- package/src/hooks/all-mounted.ts +179 -0
- package/src/hooks/index.ts +1 -0
- package/src/index.ts +9 -0
- package/src/shim-translate.d.ts +7 -0
- package/src/shim-vue.d.ts +6 -0
- package/src/token/index.ts +8 -0
- package/src/typing/WidgetTagContext.ts +53 -0
- package/src/typing/WidgetTagProps.ts +24 -0
- package/src/typing/index.ts +3 -0
- package/src/typing/typing.ts +7 -0
- package/src/util/dsl-render.ts +464 -0
- package/src/util/index.ts +4 -0
- package/src/util/install.ts +29 -0
- package/src/util/render.ts +21 -0
- package/src/util/widget-manager.ts +14 -0
- package/src/view/index.ts +416 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{instantiate as e,uniqueKeyGenerator as t,StringHelper as i,CastHelper as o,BooleanHelper as n}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 y,effectScope as m,computed as f,ref as W,watch as R,isRef as b,toRaw as D,nextTick as C,h as S,Suspense as A,withCtx as M,resolveDynamicComponent as O,inject as j,onBeforeMount as $,onMounted as P,onUnmounted as w,provide as N}from"vue";import{isNil as E,isBoolean as I,isString as V,intersection as H,isFunction as _}from"lodash-es";import{XMLTemplateParser as x,DEFAULT_SLOT_NAME as B,DslDefinitionHelper as k,DslSlotUtils as U,DslDefinitionType as F,UnknownDslDefinition as T}from"@oinone/kunlun-dsl";import{PropRecordHelper as z,StableSlotProp as L}from"@oinone/kunlun-vue-ui-common";import{isDev as G,useMatched as K}from"@oinone/kunlun-router";import{InjectionToken as Q,SPI as Z}from"@oinone/kunlun-spi";import{LifeCycleTypes as q}from"@oinone/kunlun-event";import{createViewElement as J}from"@oinone/kunlun-meta";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,o)=>{const n=t.constructor,r=this.attributeMap.get(n)||new Map;r.set(e&&e.displayName||i,i),this.attributeMap.set(n,r),o&&o.get&&(t[`$compute$${i}`]={get:o.get,set:o.set});const s=n.prototype.$$props||[];e&&!1===e.render||s.push(e&&e.displayName||i),t.$$props=s}}static Watch(e,t){return(i,o,n)=>{const r=i.constructor,s=Widget.watchMap.get(r)||[];s.push({path:e,handler:n.value,options:t}),Widget.watchMap.set(r,s)}}static Sub(e,t,i){return(o,n)=>{const r=this.nameContextMap.get(e);if(r)r&&!r.paramName_NameMap.get(n)&&r.paramName_NameMap.set(n,e);else{const o=new t(i),r=new Map;r.set(n,e),this.nameContextMap.set(e,{paramName_NameMap:r,subject:o,value:i})}}}static BehaviorSubContext(e,t){return Widget.Sub(e,r,t)}static SubContext(e,t){return Widget.Sub(e,s,t)}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 o=Reflect.get(t,"injection")||{name:this,list:new Map};if(o.name!==t.constructor){const e=o;o={name:t.constructor,list:new Map},e.list.forEach(((e,t)=>o.list.set(t,e))),Reflect.set(t,"injection",o)}o.list.get(e||i)||o.list.set(e||i,i)}}static Provide(e){return(t,i)=>{let o=Reflect.get(t,"provider")||{name:this,list:new Map};if(o.name!==t.constructor){const e=o;o={name:t.constructor,list:new Map},e.list.forEach(((e,t)=>o.list.set(t,e))),Reflect.set(t,"provider",o)}o.list.get(e||i)||o.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,o=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 n="";o.forEach(((t,i)=>t===e?n=i:"")),""!==n&&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),Widget.nameContextMap.forEach((e=>{const{subject:t,paramName_NameMap:i}=e,o={subscribe:e=>{const i=t.subscribe((t=>{e(t)}));return this.subscriptionMap.set(Symbol("random"),i),i},subject:t};i.forEach(((e,t)=>{this[t]=o}))})),this.$$innerWidgetType){const e=this.getParentWidget();e&&e.$$innerWidgetType&&e.childrenWidget.push(this)}return this}dispose(e=!1){var t,i;this.releaseInjection();const o=null===(t=this.parent)||void 0===t?void 0:t.children;if(o){const e=o.findIndex((e=>e.getHandle()===this.getHandle()));-1!==e&&(o.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,o,n){const r=e(t);r.parent=this;const s=r.initialize(o),d=s&&s.getOperator();return void 0!==n&&n>=0?this.children[n]=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,o=t||this.children[e].getHandle();return this.children.forEach(((t,i)=>{t.getHandle()===o&&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}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 o=(Reflect.get(t,"provider")||{list:new Map}).list;if(o&&o.get(e)){i=o.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
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */
|
|
16
|
+
function X(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}function Y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function ee(e,t,i,o){return new(i||(i=Promise))((function(n,r){function s(e){try{a(o.next(e))}catch(e){r(e)}}function d(e){try{a(o.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,d)}a((o=o.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 te,ie=g({name:"VueFragment",inheritAttrs:!1,render(){var e,t;return v(y,void 0,(null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e))||[])}});ie.__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"}(te||(te={}));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=m();let o={};return this.__scope.run((()=>{const{opt:n}=this;this.getAttributes().forEach(((e,t)=>{const i=this.getComputeHandler(t);if(i)i.get&&(i.set?Reflect.set(o,t,f({get:i.get.bind(n),set:i.set.bind(n)})):Reflect.set(o,t,f(i.get.bind(n))));else{const i=Reflect.get(this,e);"function"==typeof i?Reflect.set(o,t,i.bind(n)):Reflect.set(o,t,W(i))}}));this.getWatchers().forEach((e=>{const t=e.path.split("."),i=o[t[0]];i&&(1===t.length?R(i,e.handler.bind(n),e.options):R((()=>{let e=i.value||{};for(let i=1;i<t.length&&(e=e[t[i]],e);i++);return e}),e.handler.bind(n),e.options))}));const r=e&&e(t,i,o);r&&(o=Object.assign(Object.assign({},o),r)),this.res=o})),o}}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:o}=i;for(;""!==o;)o=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 o=(e=>{const t=[];let i=e;for(;""!==i.name;)t.push(i.name),i=Object.getPrototypeOf(i);return t})(Widget.select(e).constructor),n=[];return o.forEach((e=>{let o;o="after"===i?VueWidget.afterHooks.get(e):VueWidget.beforeHooks.get(e);(o&&o.get(t)||[]).forEach((e=>n.push(e)))})),n}static BeforeHook(e){return(t,i,o)=>{const n=VueWidget.beforeHooks.get(t.constructor.name)||new Map,r=n.get(e)||[];r.push(o.value),n.set(e,r),VueWidget.beforeHooks.set(t.constructor.name,n)}}static AfterHook(e){return(t,i,o)=>{const n=VueWidget.afterHooks.get(t.constructor.name)||new Map,r=n.get(e)||[];r.push(o.value),n.set(e,r),VueWidget.afterHooks.set(t.constructor.name,n)}}getNodeCode(){return this.node_code}getNodeCodeRef(){return this.res.node_code}getOperator(){const{opt:e}=this;return e||this}createWidget(e,t,i,o,n=!1){const r=this.getOperator(),s=super.createWidget.bind(r)(e,t,i||{},o);n&&(r.node_code=this.revolveNodeCode());const d=s&&s.getOperator();return void 0!==o&&o>=0?this.getChildrenInstance()[o]=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=ie,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||{},o=Reflect.get(i,t);return o?b(o)?(o.value,o.value):o:Reflect.get(e,t)},set:(e,t,i)=>{const o=this.res||{},n=Reflect.get(o,t);return"function"==typeof n?Reflect.set(o,t,i):b(n)?(n.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,((...o)=>{if("render"===t)return i.apply(e,o);const n=e.executeBeforeHooks(t,o),r=i.apply(e,n);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)[te.beforeMount])||void 0===i||i.call(e),this.$$beforeMount.call(t),this.beforeMount.call(t)},mounted:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.mounted])||void 0===i||i.call(e),this.$$mounted.call(t),this.mounted.call(t)},beforeUpdate:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.beforeUpdate])||void 0===i||i.call(e),this.$$beforeUpdate.call(t),this.beforeUpdate.call(t)},updated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.updated])||void 0===i||i.call(e),this.$$updated.call(t),this.updated.call(t)},activated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.activated])||void 0===i||i.call(e),this.$$activated.call(t),this.activated.call(t)},deactivated:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.deactivated])||void 0===i||i.call(e),this.$$deactivated.call(t),this.deactivated.call(t)},beforeUnmount:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.beforeUnmount])||void 0===i||i.call(e),this.$$beforeUnmount.call(t),this.beforeUnmount.call(t)},unmounted:()=>{var e,i;null===(i=(e=this.behaviorGroup)[te.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:o}=t,n=this.resolveProps(e,i),r=o&&Object.keys(o).length?o:this.resolveChildren(),s=this.renderExpandComponent(),d={};if(s){const e=r.default?r.default():[];d.default=()=>[...e,s]}return this.renderMixinComponent(v(e,n,Object.assign(Object.assign({},r),d)),i)}})}resolveProps(e,t){return t}renderMixinComponent(e,t){const i=this.getMixinComponent();if(i){const o=e,n=this.resolveProps(i,t);e=v(i,n,{default:()=>o})}return e}renderWidgetComponent(e,t,i){return v(e,{},i)}buildProps(e){const t={},i=this.getAttributes(),o=this.getProps();return i.forEach(((i,n)=>{o.includes(i)&&Reflect.set(t,i,Reflect.get(e,n))})),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 o,n,r,s;return null===(n=(o=this.behaviorGroup)[te.beforeCreated])||void 0===n||n.call(o),this.$$beforeCreated(),this.beforeCreated(),null===(s=(r=this.behaviorGroup)[te.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&&C((()=>{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 o=0;const n={result:t},r=()=>{o<i.length&&i[o++].apply(this,[r,n])};return r(),n.result}executeBeforeHooks(e,...t){const i=VueWidget.getHooks(this.getHandle(),e,"before");let o=0;const n={args:t},r=()=>{o<i.length&&i[o++].apply(this,[r,n])};return r(),n.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"),o=i?i(e):"";if(o===e||0===Object.keys(t).length)return o;return o.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,X([Widget.Reactive(),Y("design:type",String)],VueWidget.prototype,"node_code",void 0),X([VueWidget.HookHost(),Y("design:type",Function),Y("design:paramtypes",[Object,Object]),Y("design:returntype",Object)],VueWidget.prototype,"render",null),X([Widget.Reactive(),Y("design:type",Function),Y("design:paramtypes",[Object,Object]),Y("design:returntype",String)],VueWidget.prototype,"translate",null),X([Widget.Reactive(),Y("design:type",Function),Y("design:paramtypes",[String]),Y("design:returntype",String)],VueWidget.prototype,"translateByI18n",null),X([Widget.Method(),Y("design:type",Function),Y("design:paramtypes",[String]),Y("design:returntype",void 0)],VueWidget.prototype,"genStaticPath",null);class AsyncVueWidget extends VueWidget{setup(e){const t=super.setup();return(i,o)=>ee(this,void 0,void 0,(function*(){const n=t(i,o),r=e&&(yield e(i,o))||{};for(const e in r)Reflect.set(n,e,Reflect.get(r,e));return n}))}render(e){return S("div",S(A,super.render(e)))}setupHook(e,t,i){return ee(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 x.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:o}=e;return this.subPath=i||(null===(t=this.template)||void 0===t?void 0:t.dslNodeType)||"",E(o)?this.subIndex=e.__index:this.subIndex=o,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 oe(e){const t=null==e?void 0:e.invisible;return!E(t)&&(I(t)?t:t())}function ne(e){return!e||!e.length||e.every((e=>oe(e)))}X([Widget.Reactive(),Y("design:type",Object)],DslNodeWidget.prototype,"metadataHandle",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslNodeWidget.prototype,"rootHandle",void 0),X([Widget.Reactive(),Y("design:type",String)],DslNodeWidget.prototype,"currentHandle",void 0),X([Widget.Reactive({render:!1}),Y("design:type",Object)],DslNodeWidget.prototype,"dslNode",void 0),X([Widget.Reactive({render:!1}),Y("design:type",Object)],DslNodeWidget.prototype,"template",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslNodeWidget.prototype,"slotName",void 0),X([Widget.Reactive(),Widget.Inject("path"),Y("design:type",Object)],DslNodeWidget.prototype,"parentPath",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslNodeWidget.prototype,"subPath",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslNodeWidget.prototype,"subIndex",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Object),Y("design:paramtypes",[])],DslNodeWidget.prototype,"widgetPath",null),X([Widget.Reactive(),Y("design:type",Object)],DslNodeWidget.prototype,"widgetInline",void 0),X([Widget.Reactive(),Y("design:type",Object),Y("design:paramtypes",[])],DslNodeWidget.prototype,"variables",null);const re="oinone",se="__slots",de="__render__options",ae="slotContext",ce=["div","a","span","table","form","detail","ul","li","h1","h2","h3","h4","h5","h6","p","thead","tbody","tr","th","td"];function le(e,t,i){let o=e[t];if(delete e[t],!o&&i){o=i;const{dslDefinition:n}=e;n&&(n[t]=i)}return o}class DslRender{static render(e,t=B,i,o){const n=DslRender.fetchComponent(e);if(n)return DslRender.createVNodeWithDslDefinition(n,e,t,i,o)}static renderSlots(e){const t={};for(const i in e)t[i]=M((t=>{var o;return DslRender.createVNodeChildren(null===(o=e[i])||void 0===o?void 0:o.widgets,i,t)}));return t}static fetchVNodeSlots(e,t){var i;if(!e)return;const o=e[se];if(o)return o;if(!t){const o=[B];null===(i=e.widgets)||void 0===i||i.forEach((e=>{if(k.isTemplate(e)){let t=e.slot;t||(t=B),o.push(t)}})),t=[...new Set(o)]}const n=U.fetchSlotsBySlotNames(e,t);return DslRender.renderSlots(n)}static fetchComponent(e){let t,{dslNodeType:i}=e||{};switch(i||(i=F.ELEMENT),i){case F.VIEW:t=O(`${re}-${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,o){const n=[];if(!e)return n;t||(t=B),E(o)&&(o=0);const{length:r}=e;for(let s=0;s<r;s++){const r=e[s],d=DslRender.fetchComponent(r);if(d)n.push(DslRender.createVNodeWithDslDefinition(d,r,t,V(d)?DslRender.fetchVNodeSlots(r):void 0,i?{slotContext:i}:void 0,s+o));else if(null===d){const{dslNodeType:e}=r;switch(e){case F.SLOT:{const e=DslRender.createVNodeChildren(r.widgets,t,i,s+o);o+=e.length,e.forEach((e=>n.push(e)));break}case F.UNKNOWN:case F.TEMPLATE:continue;default:console.error("Invalid component.")}}}return n}static createVNodeWithDslDefinition(e,i,o,n,r,s){var d;E(s)||i.__index===s||(i.__index=s);const a=V(e),c=a?z.collectionBasicProps(i):Object.assign(Object.assign({},i),{dslDefinition:Object.assign({},i),slotName:o});let l;l=a&&i.__content||le(c,se,n);const u=le(c,de,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=H(h||[],[ae])),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||(ce.includes(e)?e:(t=O(`${re}-${i.camelCaseToKebabCase(e)}`),"string"==typeof t&&(t=O(e)),DslRender.resolveCommonComponentCache[e]=t,t))}static resolveWidgetComponent(e){let t=DslRender.resolveComponentCache[e];if(t)return t;if(ce.includes(e))return e;if(t=O(e),"string"==typeof t)for(const i of DslRender.resolveMethods){const o=i(e);if(o){const e=O(o);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,o=(null==t?void 0:t.focusUpdate)||!1;if(e.key){if(o)return!0}else if(i)return!0;return!1}static predictIsRecursion(e){return(null==e?void 0:e.recursion)||!1}}function ue(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))):G()&&console.warn("component install error. reason: name is blank.",e)}function pe(e,t){c.createOrReplace().frameworkInstance.directive(t,e)}function he(e,...t){c.createOrReplace().frameworkInstance.use(e,...t)}function ge(e,t,i){let o;const{length:n}=e;for(let r=n-1;r>=0;r--){const n=e[r];if(o){const e=Array.isArray(o)?o:[o];o=n.render(t,Object.assign({default:()=>e},L))}else o=n.render(t,Object.assign(Object.assign({},i),L))}return o}function ve(){return new VueWidget}function ye(e){return o.cast(Widget.select(e))}function me(e){return ye(e)||ve()}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=U.fetchSlotsBySlotNames(this.template,this.supportedSlotNames)),this}getDsl(){return this.template||T}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}}X([Widget.Reactive(),Y("design:type",Object)],DslRenderWidget.prototype,"internal",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslRenderWidget.prototype,"template",void 0),X([Widget.Reactive(),Y("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}getRootHandle(){return this.rootHandle}getCurrentHandle(){return this.currentHandle}get allInvisible(){const{allInvisible:e}=this.getDsl();return E(e)?this.defaultAllInvisible:n.toBoolean(e)}get invisible(){let{invisible:e}=this.getDsl();return e=!E(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{metadataHandle:e}=this;let t;if(e&&(t=c.get(e)),!t)throw new Error("Invalid metadata runtime context.");return t}get rootRuntimeContext(){const{rootHandle:e}=this;let t;if(e&&(t=c.get(e)),!t)throw new Error("Invalid root runtime context.");return t}get rootComputeContext(){const{rootHandle:e}=this;let t;return e&&(t=l.get(e)),t}get rootViewRuntimeContext(){var e,t,i;const o=[];let n=this.rootRuntimeContext,r=null===(e=null==n?void 0:n.parentContext)||void 0===e?void 0:e.field;for(;r&&n;){o.push(r);const e=null===(t=null==n?void 0:n.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,n=s}return{runtimeContext:n,fields:o}}invisibleProcess(e){return n.toBoolean(e)}childrenInvisibleProcess(){return ne(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()}}X([Widget.Reactive(),Y("design:type",Object)],DslDefinitionWidget.prototype,"automatic",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslDefinitionWidget.prototype,"metadataHandle",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslDefinitionWidget.prototype,"rootHandle",void 0),X([Widget.Reactive(),Y("design:type",String)],DslDefinitionWidget.prototype,"currentHandle",void 0),X([Widget.Reactive(),Y("design:type",Object)],DslDefinitionWidget.prototype,"inline",void 0),X([Widget.Reactive(),Y("design:type",Object),Y("design:paramtypes",[])],DslDefinitionWidget.prototype,"allInvisible",null),X([Widget.Reactive(),Y("design:type",Object)],DslDefinitionWidget.prototype,"invisibleState",void 0),X([Widget.Reactive(),Widget.Inject(),Y("design:type",Object)],DslDefinitionWidget.prototype,"parentInvisible",void 0),X([Widget.Reactive(),Y("design:type",Boolean),Y("design:paramtypes",[])],DslDefinitionWidget.prototype,"invisible",null),X([Widget.Reactive(),Widget.Provide("parentInvisible"),Y("design:type",Object),Y("design:paramtypes",[])],DslDefinitionWidget.prototype,"parentInvisibleProvider",null),X([Widget.Method(),Y("design:type",Function),Y("design:paramtypes",[]),Y("design:returntype",void 0)],DslDefinitionWidget.prototype,"allMounted",null);class PathWidget extends DslDefinitionWidget{get path(){const{parentPath:e,subPath:t,subIndex:i,currentPath:o}=this;if(E(o)){let o=e||"";return this.internal||t&&(o=o?`${o}.${t}`:t,null!=i&&(o=`${o}[${i}]`)),o}return o}initialize(e){var t;super.initialize(e);const{subPath:i,subIndex:o,path:n}=e;return this.currentPath=n,this.subPath=i||(null===(t=this.template)||void 0===t?void 0:t.dslNodeType)||"",E(o)?this.subIndex=e.__index:this.subIndex=o,this}}X([Widget.Reactive(),Widget.Inject("path"),Y("design:type",Object)],PathWidget.prototype,"parentPath",void 0),X([Widget.Reactive(),Y("design:type",Object)],PathWidget.prototype,"subPath",void 0),X([Widget.Reactive(),Y("design:type",Object)],PathWidget.prototype,"subIndex",void 0),X([Widget.Reactive(),Y("design:type",Object)],PathWidget.prototype,"currentPath",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Object),Y("design:paramtypes",[])],PathWidget.prototype,"path",null);class ActiveRecordsWidget extends PathWidget{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){if(this.parentPushDataSource&&void 0===this.getCurrentDataSource())this.parentPushDataSource(e,t);else{let i=t;const{submitCache:o}=this;o&&!i&&(i=p.defaultPushPredict.bind(o));const n=p.operator(this.getCurrentDataSource()||void 0,this.submitCache).push(e,i).get();o||this.setCurrentDataSource(n)}}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)}}createDataSourceByEntity(e,t){if(this.parentCreateDataSourceByEntity&&void 0===this.getCurrentDataSource())this.parentCreateDataSourceByEntity(e,t);else{const t=Array.isArray(e)?e:[e],i=this.getCurrentDataSource()||[];this.setCurrentDataSource([...t,...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=[]}}X([Widget.Reactive(),Widget.Inject("rootData"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentRootData",void 0),X([Widget.Reactive(),Y("design:type",Object)],ActiveRecordsWidget.prototype,"currentRootData",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Object),Y("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"rootData",null),X([Widget.Method(),Widget.Inject("reloadRootData"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadRootData",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadRootData",null),X([Widget.Reactive(),Widget.Inject("dataSource"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentDataSource",void 0),X([Widget.Reactive(),Y("design:type",Object)],ActiveRecordsWidget.prototype,"currentDataSource",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Object),Y("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"dataSource",null),X([Widget.Method(),Widget.Inject("reloadDataSource"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadDataSource",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadDataSource",null),X([Widget.Method(),Widget.Inject("pushDataSource"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentPushDataSource",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"pushDataSource",null),X([Widget.Method(),Widget.Inject("updateDataSource"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateDataSource",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Array]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateDataSource",null),X([Widget.Method(),Widget.Inject("updateDataSourceByEntity"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateDataSourceByEntity",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateDataSourceByEntity",null),X([Widget.Method(),Widget.Inject("deleteDataSource"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteDataSource",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Array]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteDataSource",null),X([Widget.Method(),Widget.Inject("deleteDataSourceByEntity"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteDataSourceByEntity",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteDataSourceByEntity",null),X([Widget.Method(),Widget.Inject("createDataSourceByEntity"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentCreateDataSourceByEntity",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"createDataSourceByEntity",null),X([Widget.Method(),Widget.Inject("flushDataSource"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentFlushDataSource",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"flushDataSource",null),X([Widget.Reactive(),Widget.Inject("activeRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentActiveRecords",void 0),X([Widget.Reactive(),Widget.Inject("parentViewActiveRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentViewActiveRecords",void 0),X([Widget.Reactive(),Y("design:type",Object)],ActiveRecordsWidget.prototype,"currentActiveRecords",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Object),Y("design:paramtypes",[Object])],ActiveRecordsWidget.prototype,"activeRecords",null),X([Widget.Method(),Widget.Inject("reloadActiveRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentReloadActiveRecords",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"reloadActiveRecords",null),X([Widget.Method(),Widget.Inject("pushActiveRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentPushActiveRecords",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"pushActiveRecords",null),X([Widget.Method(),Widget.Inject("updateActiveRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateActiveRecords",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Array]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateActiveRecords",null),X([Widget.Method(),Widget.Inject("updateActiveRecordsByEntity"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentUpdateActiveRecordsByEntity",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"updateActiveRecordsByEntity",null),X([Widget.Method(),Widget.Inject("deleteActiveRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteActiveRecords",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Array]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteActiveRecords",null),X([Widget.Method(),Widget.Inject("deleteActiveRecordsByEntity"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentDeleteActiveRecordsByEntity",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[Object,Function]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"deleteActiveRecordsByEntity",null),X([Widget.Method(),Widget.Inject("flushActiveRecords"),Y("design:type",Object)],ActiveRecordsWidget.prototype,"parentFlushActiveRecords",void 0),X([Widget.Method(),Widget.Provide(),Y("design:type",Function),Y("design:paramtypes",[]),Y("design:returntype",void 0)],ActiveRecordsWidget.prototype,"flushActiveRecords",null);const fe={reportBeforeMount:()=>{},reportMounted:()=>{},reportUnmounted:()=>{},reportAllBeforeMount:()=>{},reportAllMounted:()=>{},reportAllUnmounted:()=>{}},We=Symbol("AllMountedContext"),Re=e=>{N(We,Object.assign(Object.assign({},fe),e))},be=()=>j(We,fe);function De(e,t){return!!Object.values(e).every((e=>e))&&(t(),!0)}let Ce=0;function Se(e){if(!e)return void console.warn("all mounted method or object is required.");let t,i;_(e)?t=e:i=e;const{reportAllBeforeMount:o,reportAllMounted:n,reportAllUnmounted:r}=be(),s="all-mounted#"+Ce++,d={},a={};Re({reportBeforeMount:e=>{const t=d[e];E(t)&&(d[e]=!1),null==o||o(s)},reportMounted:e=>{const o=d[e];E(o)||o||(d[e]=!0,De(d,(null==i?void 0:i.allMounted)||t||(()=>({})))&&(null==n||n(s)))},reportUnmounted:e=>{delete d[e],null==r||r(s)},reportAllBeforeMount:e=>{const t=a[e];E(t)&&(a[e]=!1)},reportAllMounted:e=>{const t=a[e];E(t)||t||(a[e]=!0,De(a,(null==i?void 0:i.allMountedUpdate)||(()=>({}))))},reportAllUnmounted:e=>{delete a[e]}})}let Ae=0;function Me(e){const{reportBeforeMount:t,reportMounted:i,reportUnmounted:o}=be(),n="mounted-#"+Ae++;$((()=>{var i;const o=null===(i=null==e?void 0:e.onBeforeMount)||void 0===i?void 0:i.call(e);o instanceof Promise?o.then((()=>{null==t||t(n)})):null==t||t(n)})),P((()=>{var t;const o=null===(t=null==e?void 0:e.onMounted)||void 0===t?void 0:t.call(e);o instanceof Promise?o.then((()=>{null==i||i(n)})):null==i||i(n)})),w((()=>{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==o||o(n)})):null==o||o(n)})),Re({})}const Oe=e=>Q(`[vue-kunlun]: ${e}`),je={handle:{type:String},dslDefinition:{type:Object},slotName:{type:String},inline:{type:Boolean,default:void 0},slotContext:{type:Object}};var $e;!function(e){e.Action="Action",e.Field="Field",e.Element="Element",e.View="View",e.Mask="Mask"}($e||($e={}));let Pe=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={}}=K().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 ee(this,void 0,void 0,(function*(){return[]}))}loadMetadata(e,t,i,o){this.getVM().loadMetadata(e,t,i,o),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(q.ON_VIEW_BEFORE_CREATED)}$$created(){this.notify(q.ON_VIEW_CREATED)}$$beforeMount(){this.notify(q.ON_VIEW_BEFORE_MOUNT)}$$mounted(){this.getVM().setPageViewState("mount"),this.getVM().watchLoading((e=>{this.loading=e}));const{getMatched$:e}=K();this.subjectRoute$=e().subscribe((e=>{this.currentRoute=e})),this.notify(q.ON_VIEW_MOUNTED)}$$beforeUpdate(){this.notify(q.ON_VIEW_BEFORE_UPDATE)}$$updated(){this.notify(q.ON_VIEW_UPDATED)}$$beforeUnmount(){this.notify(q.ON_VIEW_BEFORE_UNMOUNT)}$$unmounted(){this.getVM().setPageViewState("unmount");const e=setTimeout((()=>{"unmount"===this.getVM().getPageViewState()&&(this.notify(q.ON_VIEW_UNMOUNTED),this.getVM().unsubscribe()),clearTimeout(e)}))}};X([Widget.Reactive(),Y("design:type",Object)],Pe.prototype,"loading",void 0),X([Widget.Inject(),Widget.Reactive(),Y("design:type",String)],Pe.prototype,"filter",void 0),X([Widget.Reactive(),Widget.Inject("rootHandleStr"),Y("design:type",Object)],Pe.prototype,"parentRootHandlerStr",void 0),X([Widget.Reactive(),Y("design:type",Object)],Pe.prototype,"currentRootHandlerStr",void 0),X([Widget.Reactive(),Widget.Provide(),Y("design:type",Object),Y("design:paramtypes",[])],Pe.prototype,"rootHandleStr",null),X([Widget.Reactive(),Y("design:type",Object)],Pe.prototype,"isRootView",void 0),X([Widget.Reactive(),Y("design:type",Object),Y("design:paramtypes",[])],Pe.prototype,"isRoot",null),X([Widget.Reactive(),Y("design:type",Object),Y("design:paramtypes",[])],Pe.prototype,"useConstruct",null),X([Widget.Provide(),Y("design:type",Object)],Pe.prototype,"selfHandleStr",void 0),X([Widget.Reactive(),Widget.Provide("view"),Y("design:type",Object)],Pe.prototype,"view",void 0),X([Widget.Reactive(),Widget.Provide("viewModel"),Y("design:type",Object)],Pe.prototype,"model",void 0),X([Widget.Reactive(),Y("design:type",String)],Pe.prototype,"path",void 0),Pe=X([Z.Base("View",["id","name","type","model","widget","tagName"])],Pe);const we=Symbol("view");export{ActiveRecordsWidget,AsyncVueWidget,re as DEFAULT_TAG_PREFIX,DslDefinitionWidget,DslNodeWidget,DslRender,DslRenderWidget,$e as InnerWidgetType,PathWidget,de as RENDER_OPTIONS_KEY,se as SLOTS_KEY,ae as SLOT_CONTEXT_KEY,we as ViewSubSymbol,Pe as ViewWidget,VueWidget,Widget,je as WidgetTagProps,ue as componentInstall,pe as directiveInstall,oe as executeInvisible,Oe as genToken,ye as getWidget,me as getWidgetNotNull,ne as isAllInvisible,ve as newVueWidget,Se as onAllMounted,he as pluginInstall,ge as renderWidgets,Me as reportAllMounted};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VNode, SetupContext } from 'vue';
|
|
2
|
+
import { SetupHook, VueWidget } from './VueWidget';
|
|
3
|
+
export declare class AsyncVueWidget extends VueWidget {
|
|
4
|
+
setup(setupHook?: SetupHook): (ctx: void, props?: unknown) => Promise<{}>;
|
|
5
|
+
render(ctx?: SetupContext | any): VNode;
|
|
6
|
+
setupHook(_ctx: void, _props: unknown, _result: unknown): Promise<unknown>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { WidgetConstructor, WidgetProps } from '@oinone/kunlun-engine';
|
|
2
|
+
import { Component, ComponentOptions, DefineComponent, Ref, Slot, Slots, VNode } from 'vue';
|
|
3
|
+
import { Widget } from './Widget';
|
|
4
|
+
declare enum BehaviorName {
|
|
5
|
+
'beforeCreated' = "beforeCreated",
|
|
6
|
+
'created' = "created",
|
|
7
|
+
'beforeMount' = "beforeMount",
|
|
8
|
+
'mounted' = "mounted",
|
|
9
|
+
'beforeUpdate' = "beforeUpdate",
|
|
10
|
+
'updated' = "updated",
|
|
11
|
+
'activated' = "activated",
|
|
12
|
+
'deactivated' = "deactivated",
|
|
13
|
+
'beforeUnmount' = "beforeUnmount",
|
|
14
|
+
'unmounted' = "unmounted"
|
|
15
|
+
}
|
|
16
|
+
export declare type WidgetComponent = string | ComponentOptions | DefineComponent | Component | Record<string, unknown>;
|
|
17
|
+
export declare type SetupHook = ((ctx?: void, props?: unknown, result?: unknown) => void) | ((ctx?: void, props?: unknown, result?: unknown) => unknown) | ((ctx?: void, props?: unknown, result?: unknown) => Promise<void>) | ((ctx?: void, props?: unknown, result?: unknown) => Promise<unknown>);
|
|
18
|
+
export declare class VueWidget<Props extends WidgetProps = WidgetProps> extends Widget<Props, VNode | VNode[]> {
|
|
19
|
+
protected behaviorGroup: {};
|
|
20
|
+
private __render__?;
|
|
21
|
+
private static beforeHooks;
|
|
22
|
+
private static afterHooks;
|
|
23
|
+
private static hookHosts;
|
|
24
|
+
/**
|
|
25
|
+
* 通过该属性可以直接拿到Widget下Component内的属性
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
private opt?;
|
|
29
|
+
/**
|
|
30
|
+
* vue实例内属性(props、computed、data)的集合
|
|
31
|
+
*/
|
|
32
|
+
private res?;
|
|
33
|
+
revolveNodeCode(): string;
|
|
34
|
+
private __scope;
|
|
35
|
+
/**
|
|
36
|
+
* vue组件setup
|
|
37
|
+
* @param setupHook
|
|
38
|
+
*/
|
|
39
|
+
setup(setupHook?: SetupHook): (ctx: void, props?: unknown) => {};
|
|
40
|
+
/**
|
|
41
|
+
* 标记一个方法为可被钩子注入,注解使用
|
|
42
|
+
* @constructor
|
|
43
|
+
* @protected
|
|
44
|
+
*/
|
|
45
|
+
protected static HookHost(): <T extends Widget<WidgetProps, unknown>>(target: T, name: string) => void;
|
|
46
|
+
/**
|
|
47
|
+
* 获得组件中注册的所有钩子
|
|
48
|
+
* @param widget
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
private static getHookHosts;
|
|
52
|
+
/**
|
|
53
|
+
* 获得指定组件内方法的前/后置钩子
|
|
54
|
+
* @param widgetName
|
|
55
|
+
* @param hook
|
|
56
|
+
* @param beforeOrAfter
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
private static getHooks;
|
|
60
|
+
/**
|
|
61
|
+
* 标记一个方法为后置钩子
|
|
62
|
+
* @param host
|
|
63
|
+
* @constructor
|
|
64
|
+
* @protected
|
|
65
|
+
*/
|
|
66
|
+
protected static BeforeHook(host: string): <T extends Widget<WidgetProps, unknown>>(target: T, _name: string, description: TypedPropertyDescriptor<() => boolean> | TypedPropertyDescriptor<() => void>) => void;
|
|
67
|
+
/**
|
|
68
|
+
* 标记一个方法为前置钩子
|
|
69
|
+
* @param host
|
|
70
|
+
* @constructor
|
|
71
|
+
* @protected
|
|
72
|
+
*/
|
|
73
|
+
protected static AfterHook(host: string): <T extends Widget<WidgetProps, unknown>>(target: T, _name: string, description: TypedPropertyDescriptor<(next: never, ...args: unknown[]) => boolean> | TypedPropertyDescriptor<(next: unknown, ...args: unknown[]) => void>) => void;
|
|
74
|
+
private component;
|
|
75
|
+
private node_code;
|
|
76
|
+
getNodeCode(): string;
|
|
77
|
+
getNodeCodeRef(): Ref<number>;
|
|
78
|
+
/**
|
|
79
|
+
* 获取当前组件的响应式对象
|
|
80
|
+
*/
|
|
81
|
+
getOperator<T extends VueWidget>(): T;
|
|
82
|
+
/**
|
|
83
|
+
* 在当前组件节点下创建子节点
|
|
84
|
+
* @param constructor widget
|
|
85
|
+
* @param slotName slotName
|
|
86
|
+
* @param initConfig widget中initialize函数接受的参数
|
|
87
|
+
* @param specifiedIndex 指定该widget的在父节点中的位置,默认是最后一位
|
|
88
|
+
* @param resolveNewCode 是否更新node_code
|
|
89
|
+
*/
|
|
90
|
+
createWidget<T extends Widget>(constructor: WidgetConstructor<T['config'], T>, slotName?: string, initConfig?: T['config'], specifiedIndex?: number, resolveNewCode?: boolean): T;
|
|
91
|
+
/**
|
|
92
|
+
* 在当前组件节点下删除子节点树
|
|
93
|
+
* @param name
|
|
94
|
+
*/
|
|
95
|
+
deleteWidget(name: string): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* 给指定的下标插入widget
|
|
98
|
+
*
|
|
99
|
+
* 如果要在最后一位插入,可以用createWidget
|
|
100
|
+
*
|
|
101
|
+
* @param {Widget} widget
|
|
102
|
+
* @param {number} index
|
|
103
|
+
*/
|
|
104
|
+
insertWidget(widget: Widget, index: number): void;
|
|
105
|
+
/**
|
|
106
|
+
* 移动widget, 将widget从 A 下标移动到 B 下标
|
|
107
|
+
*
|
|
108
|
+
* @param {number} index1
|
|
109
|
+
* @param {number} index2
|
|
110
|
+
*/
|
|
111
|
+
moveChildWidget(index1: number, index2: number): void;
|
|
112
|
+
/**
|
|
113
|
+
* 根据下标删除对应的child widget, 如果当前 children中有重复的handler,那么会删除匹配的第一个
|
|
114
|
+
*
|
|
115
|
+
* @param {number} index
|
|
116
|
+
* @param {string} handle?
|
|
117
|
+
*/
|
|
118
|
+
deleteWidgetByIndex(index: number, handle?: string): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* 初始化当前组件
|
|
121
|
+
* @param props
|
|
122
|
+
*/
|
|
123
|
+
initialize(props?: Props): VueWidget;
|
|
124
|
+
private buildOperator;
|
|
125
|
+
/**
|
|
126
|
+
* Class Component Vue组件
|
|
127
|
+
* @private
|
|
128
|
+
*/
|
|
129
|
+
private widgetComponent;
|
|
130
|
+
/**
|
|
131
|
+
* 获取Class Component Vue组件
|
|
132
|
+
*/
|
|
133
|
+
getWidgetComponent(isBuild?: boolean): Component | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* 设置Class Component Vue组件
|
|
136
|
+
* @param component Vue组件
|
|
137
|
+
*/
|
|
138
|
+
setWidgetComponent(component: Component | undefined): void;
|
|
139
|
+
/**
|
|
140
|
+
* 扩展组件
|
|
141
|
+
*/
|
|
142
|
+
renderExpandComponent(): Component | VNode | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* 混入组件
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
private mixinComponent;
|
|
148
|
+
/**
|
|
149
|
+
* 获取混入组件
|
|
150
|
+
*/
|
|
151
|
+
getMixinComponent(): Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* 设置混入组件
|
|
154
|
+
* @param component Vue组件
|
|
155
|
+
* @protected
|
|
156
|
+
*/
|
|
157
|
+
setMixinComponent(component: Component | undefined): void;
|
|
158
|
+
/**
|
|
159
|
+
* 渲染当前组件
|
|
160
|
+
* @param context 渲染上下文
|
|
161
|
+
* @param slots 插槽
|
|
162
|
+
*/
|
|
163
|
+
render(context?: Record<string, unknown>, slots?: Slots): VNode | VNode[];
|
|
164
|
+
protected getWidgetComponentName(): string;
|
|
165
|
+
/**
|
|
166
|
+
* 构造Vue组件
|
|
167
|
+
* @protected
|
|
168
|
+
*/
|
|
169
|
+
protected buildWidgetComponent(): Component | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* 只获取vue 组件需要的props
|
|
172
|
+
*
|
|
173
|
+
*/
|
|
174
|
+
protected resolveProps(component: any, props: any): any;
|
|
175
|
+
/**
|
|
176
|
+
* 渲染混入组件
|
|
177
|
+
* @param vNode 当前Vue组件渲染节点
|
|
178
|
+
* @param props 当前Vue组件渲染属性
|
|
179
|
+
* @protected
|
|
180
|
+
*/
|
|
181
|
+
protected renderMixinComponent(vNode: VNode, props: Record<string, unknown>): VNode | VNode[];
|
|
182
|
+
/**
|
|
183
|
+
* 渲染当前组件
|
|
184
|
+
* @param widgetComponent 当前组件
|
|
185
|
+
* @param context 组件上下文
|
|
186
|
+
* @param slots 组件插槽
|
|
187
|
+
* @protected
|
|
188
|
+
*/
|
|
189
|
+
protected renderWidgetComponent(widgetComponent: Component, context?: Record<string, unknown>, slots?: Slots): VNode;
|
|
190
|
+
/**
|
|
191
|
+
* 构建当前组件渲染vue组件传递时的props
|
|
192
|
+
* @param result
|
|
193
|
+
* @protected
|
|
194
|
+
*/
|
|
195
|
+
protected buildProps(result: Record<string, unknown>): Record<string, unknown>;
|
|
196
|
+
protected buildPropsStrs(): string[];
|
|
197
|
+
/**
|
|
198
|
+
* 将当前组件的子组件树解析为Vue Slots树
|
|
199
|
+
* @protected
|
|
200
|
+
*/
|
|
201
|
+
protected resolveChildren(): Record<string, Slot>;
|
|
202
|
+
/**
|
|
203
|
+
* Vue组件setup方法钩子
|
|
204
|
+
* @param _ctx
|
|
205
|
+
* @param _props
|
|
206
|
+
* @param _result
|
|
207
|
+
* @protected
|
|
208
|
+
*/
|
|
209
|
+
protected setupHook(_ctx: void, _props: unknown, _result: unknown): unknown;
|
|
210
|
+
/**
|
|
211
|
+
* 绑定一个标准的Vue组件或者一个html标签用于当前组件的渲染
|
|
212
|
+
* @param component
|
|
213
|
+
*/
|
|
214
|
+
setComponent(component: WidgetComponent): void;
|
|
215
|
+
/**
|
|
216
|
+
* 销毁当前组件
|
|
217
|
+
*/
|
|
218
|
+
dispose(force?: boolean): void;
|
|
219
|
+
/**
|
|
220
|
+
* 获取当前组件渲染时使用的Vue组件
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
getComponent(): WidgetComponent;
|
|
224
|
+
/**
|
|
225
|
+
* 获取当前组件引用的其他Vue组件
|
|
226
|
+
* @protected
|
|
227
|
+
*/
|
|
228
|
+
protected getUsingComponents(): Record<string, Component>;
|
|
229
|
+
private executeAfterHooks;
|
|
230
|
+
private executeBeforeHooks;
|
|
231
|
+
/**
|
|
232
|
+
* Vue钩子
|
|
233
|
+
* @protected
|
|
234
|
+
*/
|
|
235
|
+
protected beforeCreated(): void;
|
|
236
|
+
/**
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
protected $$beforeCreated(): void;
|
|
240
|
+
/**
|
|
241
|
+
* Vue钩子
|
|
242
|
+
* @protected
|
|
243
|
+
*/
|
|
244
|
+
protected created(): void;
|
|
245
|
+
/**
|
|
246
|
+
* @internal
|
|
247
|
+
*/
|
|
248
|
+
protected $$created(): void;
|
|
249
|
+
/**
|
|
250
|
+
* Vue钩子
|
|
251
|
+
* @protected
|
|
252
|
+
*/
|
|
253
|
+
protected beforeMount(): void;
|
|
254
|
+
/**
|
|
255
|
+
* @internal
|
|
256
|
+
*/
|
|
257
|
+
protected $$beforeMount(): void;
|
|
258
|
+
/**
|
|
259
|
+
* Vue钩子
|
|
260
|
+
* @protected
|
|
261
|
+
*/
|
|
262
|
+
protected mounted(): void;
|
|
263
|
+
/**
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
protected $$mounted(): void;
|
|
267
|
+
/**
|
|
268
|
+
* Vue钩子
|
|
269
|
+
* @protected
|
|
270
|
+
*/
|
|
271
|
+
protected beforeUpdate(): void;
|
|
272
|
+
/**
|
|
273
|
+
* @internal
|
|
274
|
+
*/
|
|
275
|
+
protected $$beforeUpdate(): void;
|
|
276
|
+
/**
|
|
277
|
+
* Vue钩子
|
|
278
|
+
* @protected
|
|
279
|
+
*/
|
|
280
|
+
protected updated(): void;
|
|
281
|
+
/**
|
|
282
|
+
* @internal
|
|
283
|
+
*/
|
|
284
|
+
protected $$updated(): void;
|
|
285
|
+
/**
|
|
286
|
+
* Vue钩子
|
|
287
|
+
* @protected
|
|
288
|
+
*/
|
|
289
|
+
protected activated(): void;
|
|
290
|
+
/**
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
protected $$activated(): void;
|
|
294
|
+
/**
|
|
295
|
+
* Vue钩子
|
|
296
|
+
* @protected
|
|
297
|
+
*/
|
|
298
|
+
protected deactivated(): void;
|
|
299
|
+
/**
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
protected $$deactivated(): void;
|
|
303
|
+
/**
|
|
304
|
+
* Vue钩子
|
|
305
|
+
* @protected
|
|
306
|
+
*/
|
|
307
|
+
protected beforeUnmount(): void;
|
|
308
|
+
/**
|
|
309
|
+
* @internal
|
|
310
|
+
*/
|
|
311
|
+
protected $$beforeUnmount(): void;
|
|
312
|
+
/**
|
|
313
|
+
* Vue钩子
|
|
314
|
+
* @protected
|
|
315
|
+
*/
|
|
316
|
+
protected unmounted(): void;
|
|
317
|
+
/**
|
|
318
|
+
* @internal
|
|
319
|
+
*/
|
|
320
|
+
protected $$unmounted(): void;
|
|
321
|
+
protected $$unmountedAfterProperties(): void;
|
|
322
|
+
registryBehavior(name: keyof typeof BehaviorName, cb: () => void): void;
|
|
323
|
+
protected reset(): void;
|
|
324
|
+
protected translate(key: any, values?: {
|
|
325
|
+
[key: string]: any;
|
|
326
|
+
}): string;
|
|
327
|
+
protected translateByI18n(key: string): string;
|
|
328
|
+
protected genStaticPath(resourceName: string): string;
|
|
329
|
+
forceUpdate(): void;
|
|
330
|
+
}
|
|
331
|
+
export {};
|