glass-easel-miniprogram-adapter 0.1.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/README.md +49 -0
- package/dist/glass_easel_miniprogram_adapter.d.ts +1 -0
- package/dist/glass_easel_miniprogram_adapter.js +2 -0
- package/dist/glass_easel_miniprogram_adapter.js.map +1 -0
- package/dist/types/src/backend.d.ts +51 -0
- package/dist/types/src/backend.d.ts.map +1 -0
- package/dist/types/src/behavior.d.ts +35 -0
- package/dist/types/src/behavior.d.ts.map +1 -0
- package/dist/types/src/component.d.ts +160 -0
- package/dist/types/src/component.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +58 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/selector_query.d.ts +98 -0
- package/dist/types/src/selector_query.d.ts.map +1 -0
- package/dist/types/src/space.d.ts +369 -0
- package/dist/types/src/space.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +77 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/utils.d.ts +2 -0
- package/dist/types/src/utils.d.ts.map +1 -0
- package/dist/types/tests/base/env.d.ts +3 -0
- package/dist/types/tests/base/env.d.ts.map +1 -0
- package/dist/types/tests/data_update.test.d.ts +2 -0
- package/dist/types/tests/data_update.test.d.ts.map +1 -0
- package/dist/types/tests/env.test.d.ts +2 -0
- package/dist/types/tests/env.test.d.ts.map +1 -0
- package/dist/types/tests/selector.test.d.ts +2 -0
- package/dist/types/tests/selector.test.d.ts.map +1 -0
- package/dist/types/tests/space.test.d.ts +2 -0
- package/dist/types/tests/space.test.d.ts.map +1 -0
- package/dist/types/tests/trait_behavior.test.d.ts +2 -0
- package/dist/types/tests/trait_behavior.test.d.ts.map +1 -0
- package/jest.config.js +13 -0
- package/package.json +32 -0
- package/src/backend.ts +106 -0
- package/src/behavior.ts +101 -0
- package/src/component.ts +476 -0
- package/src/index.ts +82 -0
- package/src/selector_query.ts +356 -0
- package/src/space.ts +1514 -0
- package/src/types.ts +85 -0
- package/src/utils.ts +3 -0
- package/tests/base/env.ts +20 -0
- package/tests/data_update.test.ts +92 -0
- package/tests/env.test.ts +141 -0
- package/tests/selector.test.ts +407 -0
- package/tests/space.test.ts +953 -0
- package/tests/trait_behavior.test.ts +141 -0
- package/tsconfig.json +11 -0
- package/webpack.config.js +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# glass-easel-miniprogram-adapter
|
|
2
|
+
|
|
3
|
+
An MiniProgram interface adapter for glass-easel, which exports a mini-program-like API, such as `Component` and `Behavior` .
|
|
4
|
+
|
|
5
|
+
Refer to the [glass-easel](https://github.com/wechat-miniprogram/glass-easel) project for further details.
|
|
6
|
+
|
|
7
|
+
## Build
|
|
8
|
+
|
|
9
|
+
`nodejs` toolchain should be globally installed.
|
|
10
|
+
|
|
11
|
+
Install dependencies:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Build:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Build Doc:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npm run doc
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Test:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm test
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Test coverage:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npm run coverage
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Limitations
|
|
42
|
+
|
|
43
|
+
Supported component API is a subset of mini-program API. See `docs` and mini-program docs for details.
|
|
44
|
+
|
|
45
|
+
Style isolation support is also limited.
|
|
46
|
+
|
|
47
|
+
* The `component: true` in JSON files should only be used in components, not pages (this influences the default style isolation settings).
|
|
48
|
+
* The `styleIsolation` options should be specified in JSON files, not JS `Component` options.
|
|
49
|
+
* Please work with [glass-easel-miniprogram-webpack-plugin](../glass-easel-miniprogram-webpack-plugin/) so that WXSS content can be correctly handled.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/src/index"
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{"use strict";var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AssociatedBackend:()=>p,BaseBehaviorBuilder:()=>b,BehaviorBuilder:()=>C,CodeSpace:()=>S,ComponentBuilder:()=>w,MiniProgramEnv:()=>O,Root:()=>s,StyleIsolation:()=>a,component:()=>o,glassEasel:()=>i,types:()=>n});var o={};t.r(o),t.d(o,{ComponentCaller:()=>_,ComponentProto:()=>m});var n={};t.r(n),t.d(n,{StyleIsolation:()=>a,utils:()=>i.typeUtils});const i=require("glass-easel");var r,a,p=function(){function t(t,e){this._$env=t,this._$=e}return t.prototype.registerStyleSheetContent=function(t,e){this._$.registerStyleSheetContent(t,e)},t.prototype.createRoot=function(t,e,o,n){if(this._$env!==e._$env)throw new Error("The code space is not in the same environment as the backend");return new s(this._$,t,e,o,n)},t}(),s=function(){function t(t,e,o,n,i){if(this._$comp=o.getComponentSpace().createComponentByUrl(e,n,i||null,t),o.isMainSpace()){var r=o.getStyleSheet("app");if(void 0!==r){var a=o._$styleIsolationMap[this._$comp.is];"isolated"!==a&&"apply-shared"!==a&&"shared"!==a||t.appendStyleSheetPath(r,o._$sharedStyleScope)}}var p=function(e){var n=e.getComponentOptions().styleScope,i=o.getStyleSheet(e.is);void 0!==i&&t.appendStyleSheetPath(i,n)};this._$comp.getRootBehavior().getComponentDependencies().forEach(p),p(this._$comp.getComponentDefinition())}return t.prototype.getComponent=function(){return this._$comp},t.prototype.attach=function(t,e){i.Element.replaceDocumentElement(this._$comp,t,e)},t}(),l=function(){return Math.floor(4294967296*(1+Math.random())).toString(16).slice(1)},c=function(t,e,o){if(this._$=t,void 0!==o){var n=e.map((function(t){var e;return null!==(e=t._$bindedDefinitionFilter)&&void 0!==e?e:null}));this._$bindedDefinitionFilter=function(t){o(t,n)}}},u=function(t){this._$=t},h=function(t){this._$=t},d=function(t,e){var o=!1,n=t.length,i=new Array(n);t.forEach((function(t,r){t((function(t){i[r]=t,0==(n-=1)&&o&&e(i)}))})),o=!0,0===n&&setTimeout((function(){e(i)}),0)},f=function(){function t(t,e,o,n){this._$sq=t,this._$comp=e,this._$sel=o,this._$single=n}return t.prototype.fields=function(t,e){return void 0===e&&(e=function(){}),this._$sq._$push(this._$sel,this._$comp,this._$single,t,e),this._$sq},t.prototype.boundingClientRect=function(t){return void 0===t&&(t=function(){}),this._$sq._$push(this._$sel,this._$comp,this._$single,{id:!0,dataset:!0,rect:!0,size:!0},t),this._$sq},t.prototype.scrollOffset=function(t){return void 0===t&&(t=function(){}),this._$sq._$push(this._$sel,this._$comp,this._$single,{id:!0,dataset:!0,scrollOffset:!0},t),this._$sq},t}(),y=function(){function t(t){this._$comp=t,this._$queue=[]}return t.prototype.in=function(t){return this._$comp=t,this},t.prototype.select=function(t){return new f(this,this._$comp,t,!0)},t.prototype.selectAll=function(t){return new f(this,this._$comp,t,!1)},t.prototype.selectViewport=function(){return new f(this,this._$comp,null,!0)},t.prototype._$push=function(t,e,o,n,i){this._$queue.push({component:e,selector:t,single:o,fields:n,cb:i})},t.prototype.exec=function(t){void 0===t&&(t=function(){});var e=this._$queue;d(e.map((function(t){return function(e){var o=t.component,n=t.selector,r=t.single,a=t.fields,p=t.cb;if(null===n){var s={};d([function(t){var e=o._$.getBackendContext(),n=e.getWindowWidth(),i=e.getWindowHeight();if(a.id&&(s.id=""),a.dataset&&(s.dataset={}),a.mark&&(s.mark={}),a.rect&&(s.left=0,s.top=0,s.right=n,s.bottom=i),a.size&&(s.width=n,s.height=i),a.scrollOffset){for(var r=o._$.general();r.ownerShadowRoot;)r=r.ownerShadowRoot.getHostNode();r.getBoundingClientRect((function(e){var o=e.left,n=e.top,i=e.width,r=e.height;s.scrollLeft=o,s.scrollTop=n,s.scrollWidth=i,s.scrollHeight=r,t(void 0)}))}else t(void 0)}],(function(){p(s),e(s)}))}else{var l=function(t,e){var o={};a.id&&(o.id=t.id),a.dataset&&(o.dataset=t.dataset),a.mark&&(o.mark=t.collectMarks()),d([function(e){a.rect||a.size?t.getBoundingClientRect((function(t){a.rect&&(o.left=t.left,o.top=t.top,o.right=t.left+t.width,o.bottom=t.top+t.height),a.size&&(o.width=t.width,o.height=t.height),e(void 0)})):e(void 0)},function(e){a.scrollOffset?t.getScrollOffset((function(t){o.scrollLeft=t.scrollLeft,o.scrollTop=t.scrollTop,o.scrollWidth=t.scrollWidth,o.scrollHeight=t.scrollHeight,e(void 0)})):e(void 0)}],(function(){a.properties&&t instanceof i.Component&&a.properties.forEach((function(e){if(i.Component.hasProperty(t,e)){var n=t.getComponentOptions().propertyPassingDeepCopy,r=t.data[e];n===i.DeepCopyKind.None?o[e]=r:n===i.DeepCopyKind.Simple?o[e]=i.dataUtils.simpleDeepCopy(r):n===i.DeepCopyKind.SimpleWithRecursion&&(o[e]=i.dataUtils.deepCopy(r,!0))}})),e(o)}))};if(r){var c=o._$.getShadowRoot().querySelector(n);c?l(c,(function(t){p(t),e(t)})):setTimeout((function(){p(null),e(null)}),0)}else{var u=o._$.getShadowRoot().querySelectorAll(n);d(u.map((function(t){return function(e){l(t,(function(t){e(t)}))}})),(function(t){p(t),e(t)}))}}}})),t)},t}(),v=function(t,e,o){var n,i=e.asInstanceOf(o._$);if(null!==i){var r=i.getRootBehavior().ownerSpace,a=i.getMethodCaller(),p=a instanceof _?a:null,s=t._$.getRootBehavior().ownerSpace,l=r!==s?null:p,c=null===(n=null==p?void 0:p._$export)||void 0===n?void 0:n.call(p,r!==s?null:t);return void 0===c?l:c}},g=function(t,e){var o;if(e instanceof i.Component){var n=e.getRootBehavior().ownerSpace,r=e.getMethodCaller(),a=r instanceof _?r:null,p=t._$.getRootBehavior().ownerSpace,s=n!==p?null:a,l=null===(o=null==a?void 0:a._$export)||void 0===o?void 0:o.call(a,n!==p?null:t);return void 0===l?s:l}},_=function(){function t(){}return Object.defineProperty(t.prototype,"is",{get:function(){return this._$.is},set:function(t){Object.defineProperty(this,"is",{value:t,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._$.id},set:function(t){Object.defineProperty(this,"id",{value:t,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataset",{get:function(){return this._$.dataset},set:function(t){Object.defineProperty(this,"dataset",{value:t,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this._$.data},set:function(t){Object.defineProperty(this,"data",{value:t,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._$.data},set:function(t){Object.defineProperty(this,"properties",{value:t,writable:!0,enumerable:!0,configurable:!0})},enumerable:!1,configurable:!0}),t.prototype.groupSetData=function(t){t()},t.prototype.setData=function(t,e){this._$.setData(t),e&&i.triggerRender(this._$,(function(){e()}))},t.prototype.updateData=function(t){this._$.updateData(t)},t.prototype.replaceDataOnPath=function(t,e){this._$.replaceDataOnPath(t,e)},t.prototype.spliceArrayDataOnPath=function(t,e,o,n){this._$.spliceArrayDataOnPath(t,e,o,n)},t.prototype.applyDataUpdates=function(){this._$.applyDataUpdates()},t.prototype.groupUpdates=function(t){return this._$.groupUpdates(t)},t.prototype.hasBehavior=function(t){return this._$.hasBehavior(t._$)},t.prototype.traitBehavior=function(t){return this._$.traitBehavior(t._$)},t.prototype.triggerEvent=function(t,e,o){return this._$.triggerEvent(t,e,o)},t.prototype.createSelectorQuery=function(){return new y(this)},t.prototype.selectComponent=function(t,e){var o,n,i=this._$.getShadowRoot().querySelector(t);return null===i?null:e?null!==(o=v(this,i,e))&&void 0!==o?o:null:null!==(n=g(this,i))&&void 0!==n?n:null},t.prototype.selectAllComponents=function(t,e){var o=this,n=this._$.getShadowRoot().querySelectorAll(t),i=[];return n.forEach((function(t){var n=e?v(o,t,e):g(o,t);void 0!==n&&i.push(n)})),i},t.prototype.selectOwnerComponent=function(t){var e,o,n,i=null===(e=this._$.ownerShadowRoot)||void 0===e?void 0:e.getHostNode();return void 0===i?null:t?null!==(o=v(this,i,t))&&void 0!==o?o:null:null!==(n=g(this,i))&&void 0!==n?n:null},t.prototype.getRelationNodes=function(t){return this._$.getRelationNodes(t).map((function(t){return t.getMethodCaller()}))},t.prototype.general=function(){return this},t.prototype.asInstanceOf=function(t){return this._$.asInstanceOf(t._$)?this:null},t}(),m=function(){function t(t,e){this.proto=Object.create(_.prototype),Object.assign(this.proto,t),this.proto._$export=e}return t.prototype.derive=function(){return Object.create(this.proto)},t}(),$=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),S=function(){function t(t,e,o,n){var r=this;this._$overallBehavior=null,this._$env=t,this._$isMainSpace=e,this.space=new i.ComponentSpace("",null==n?void 0:n.space,null==n?void 0:n.space.styleScopeManager),this.styleScopeManager=this.space.styleScopeManager,this.staticConfigMap=Object.create(null),this.styleSheetMap=Object.create(null),this.compiledTemplateMap=Object.create(null),this.waitingAliasMap=Object.create(null),Object.keys(o).forEach((function(t){var e=o[t];r.waitingAliasMap[e]?r.waitingAliasMap[e].push(t):r.waitingAliasMap[e]=[t]})),this._$sharedStyleScope=this.styleScopeManager.register(""),this._$styleIsolationMap=Object.create(null)}return t.prototype.isMainSpace=function(){return this._$isMainSpace},t.prototype.getComponentSpace=function(){return this.space},t.prototype.setOverallBehavior=function(t){this._$overallBehavior=t},t.prototype.importCodeSpace=function(t,e,o){void 0===o&&(o=!1);var n=this._$env.getCodeSpace(t);if(!n)throw new Error('There is no space "'.concat(t,'" in the environment'));e&&this.space.importSpace("plugin://".concat(e),n.space,!1),o&&this.space.importSpace("plugin-private://".concat(t),n.space,!0)},t.prototype.addStyleSheet=function(t,e,o){this.styleSheetMap[t]={url:e,styleScopeName:o}},t.prototype.getStyleSheet=function(t){var e;return null===(e=this.styleSheetMap[t])||void 0===e?void 0:e.url},t.prototype.getStyleScopeName=function(t){var e;return null===(e=this.styleSheetMap[t])||void 0===e?void 0:e.styleScopeName},t.prototype.addCompiledTemplate=function(t,e){this.compiledTemplateMap[t]=e},t.prototype.getCompiledTemplate=function(t){return this.compiledTemplateMap[t]},t.prototype.addComponentStaticConfig=function(t,e){this.staticConfigMap[t]=e},t.prototype.getComponentStaticConfig=function(t){return this.staticConfigMap[t]},t.prototype.prepareComponentOptions=function(t,e){var o,n,i=this.staticConfigMap[t],r=null==i?void 0:i.pureDataPattern,a=r?new RegExp(r):null==e?void 0:e.pureDataPattern,p=null==i?void 0:i.addGlobalClass,s=null==i?void 0:i.styleIsolation;return void 0===s&&(s=(null==i?void 0:i.component)?p?"apply-shared":"isolated":"shared"),"apply-shared"===s||"page-apply-shared"===s?(o=this.styleScopeManager.register(this.getStyleScopeName(t)||"__".concat(l())),n=this._$sharedStyleScope):o="shared"!==s&&"page-shared"!==s||!this._$isMainSpace?this.styleScopeManager.register(this.getStyleScopeName(t)||"__".concat(l())):this._$sharedStyleScope,[{idPrefixGenerator:l,multipleSlots:null==e?void 0:e.multipleSlots,pureDataPattern:a,virtualHost:null==e?void 0:e.virtualHost,styleScope:o,extraStyleScope:n,dataDeepCopy:null==e?void 0:e.dataDeepCopy,propertyPassingDeepCopy:null==e?void 0:e.propertyPassingDeepCopy,propertyEarlyInit:null==e?void 0:e.propertyEarlyInit},s]},t.prototype.globalComponentEnv=function(t,e,o){return this.componentEnv(e,(function(e){var n=e.Page,i=e.Component,r=e.Behavior,a=t.Page,p=t.Component,s=t.Behavior;t.Page=n,t.Component=i,t.Behavior=r;var l=o();return t.Page=a,t.Component=p,t.Behavior=s,l}))},t.prototype.componentEnv=function(t,e){var o=this;function n(t){return void 0!==t?o.behavior().definition(t).register():o.behavior()}return n.trait=o.traitBehavior.bind(o),e({Page:function(e){return o.component(t).pageDefinition(e).register()},Component:function(e){return void 0!==e?o.component(t).definition(e).register():o.component(t)},Behavior:n})},t.prototype.component=function(t){return w.create(this,t,this.waitingAliasMap[t])},t.prototype.behavior=function(){return C.create(this)},t.prototype.traitBehavior=function(t){return new h(void 0===t?this.space.defineTraitBehavior():this.space.defineTraitBehavior(t))},t}(),b=function(){function t(){this._$parents=[]}return t.prototype.implement=function(t,e){return this._$.implement(t._$,e),this},t.prototype.externalClasses=function(t){return this._$.externalClasses(t),this},t.prototype.data=function(t){return this._$.data(t),this},t.prototype.property=function(t,e){return this._$.property(t,e),this},t.prototype.methods=function(t){return this._$.methods(t),this},t.prototype.observer=function(t,e,o){return void 0===o&&(o=!1),this._$.observer(t,e,o),this},t.prototype.lifetime=function(t,e,o){return void 0===o&&(o=!1),this._$.lifetime(t,e,o),this},t.prototype.pageLifetime=function(t,e,o){return void 0===o&&(o=!1),this._$.pageLifetime(t,e,o),this},t.prototype.relation=function(t,e){var o=e.target instanceof c||e.target instanceof u?e.target._$:e.target;return this._$.relation(t,{target:o,type:e.type,linked:e.linked,linkChanged:e.linkChanged,unlinked:e.unlinked,linkFailed:e.linkFailed}),this},t.prototype.init=function(t){return this._$.init((function(e){var o=e.data,n=e.setData,r=e.implement,a=e.relation,p=e.observer,s=e.lifetime,l=e.pageLifetime,d=e.method,f=this;t.call(f,{self:f,data:o,setData:function(t,e){n(t),e&&i.triggerRender(f._$,(function(){e()}))},implement:function(t,e){r(t._$,e)},relation:function(t){if(t.target instanceof h)return a({target:t.target._$,type:t.type,linked:t.linked,linkChanged:t.linkChanged,unlinked:t.unlinked,linkFailed:t.linkFailed});var e=t.target instanceof c||t.target instanceof u?t.target._$:t.target;return a({target:e,type:t.type,linked:t.linked,linkChanged:t.linkChanged,unlinked:t.unlinked,linkFailed:t.linkFailed})},observer:p,lifetime:s,pageLifetime:l,method:d})})),this},t.prototype.definition=function(t){var e,o=this;null===(e=t.behaviors)||void 0===e||e.forEach((function(e){var o;return null===(o=e._$bindedDefinitionFilter)||void 0===o?void 0:o.call(e,t)}));var n=this._$,i=t.behaviors,r=t.properties,a=t.data,p=t.observers,s=t.methods,l=t.created,c=t.attached,u=t.ready,h=t.moved,d=t.detached,f=t.lifetimes,y=t.pageLifetimes,v=t.relations,g=t.externalClasses;if(null==i||i.forEach((function(t){o._$parents.push(t),n.behavior(t._$)})),void 0!==a&&("function"==typeof a?n.data(a):n.staticData(a)),void 0!==r)for(var _=Object.keys(r),m=0;m<_.length;m+=1){var $=_[m];n.property($,r[$])}if(void 0!==p)if(Array.isArray(p))for(m=0;m<p.length;m+=1){var S=p[m],b=S.fields,C=S.observer;n.observer(b||"**",C)}else for(_=Object.keys(p),m=0;m<_.length;m+=1)C=p[b=_[m]],n.observer(b,C);if(s&&n.methods(s),l&&void 0===(null==f?void 0:f.created)&&n.lifetime("created",l,!0),c&&void 0===(null==f?void 0:f.attached)&&n.lifetime("attached",c,!0),u&&void 0===(null==f?void 0:f.ready)&&n.lifetime("ready",u,!0),h&&void 0===(null==f?void 0:f.moved)&&n.lifetime("moved",h,!0),d&&void 0===(null==f?void 0:f.detached)&&n.lifetime("detached",d,!0),f)for(_=Object.keys(f),m=0;m<_.length;m+=1){var w=_[m],O=f[w];n.lifetime(w,O,!0)}if(y)for(_=Object.keys(y),m=0;m<_.length;m+=1){var M=_[m];O=y[M],n.pageLifetime(M,O,!0)}if(v)for(_=Object.keys(v),m=0;m<_.length;m+=1){var k=_[m],P=v[k];n.relation(k,P)}return g&&n.externalClasses(g),this},t}(),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $(e,t),e.create=function(t){var o=new e;return o._$codeSpace=t,o._$=t.getComponentSpace().defineWithMethodCaller(),o},e.prototype.chainingFilter=function(t){return this._$.chainingFilter(t),this},e.prototype.behavior=function(t){return this._$parents.push(t),this._$=this._$.behavior(t._$),this},e.prototype.data=function(e){return t.prototype.data.call(this,e)},e.prototype.property=function(e,o){return t.prototype.property.call(this,e,o)},e.prototype.methods=function(e){return t.prototype.methods.call(this,e)},e.prototype.init=function(e){return t.prototype.init.call(this,e)},e.prototype.definition=function(e){return t.prototype.definition.call(this,e),e.definitionFilter&&(this._$definitionFilter=e.definitionFilter),this},e.prototype.register=function(){return new c(this._$.registerBehavior(),this._$parents,this._$definitionFilter)},e}(b),w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return $(e,t),e.create=function(t,o,n){var i=new e,r=t._$overallBehavior;return i._$codeSpace=t,i._$=t.getComponentSpace().defineWithMethodCaller(o||""),i._$is=o||"",i._$alias=n,i._$.methodCallerInit((function(){var t=i._$proto;if(void 0===t){var e=this.getComponentDefinition().behavior.getMethods();t=i._$proto=new m(e)}var o=t.derive();return o._$=this,o._$export=i._$export,o})),r&&i._$.behavior(r),i},e.prototype.options=function(t){return this._$options=t,this},e.prototype.behavior=function(t){return this._$parents.push(t),this._$=this._$.behavior(t._$),this},e.prototype.export=function(t){return this._$export=t,this},e.prototype.data=function(e){return t.prototype.data.call(this,e)},e.prototype.property=function(e,o){return t.prototype.property.call(this,e,o)},e.prototype.methods=function(e){return t.prototype.methods.call(this,e)},e.prototype.init=function(e){return t.prototype.init.call(this,e)},e.prototype.definition=function(e){return t.prototype.definition.call(this,e),e.options&&this.options(e.options),this},e.prototype.pageDefinition=function(t){for(var e=Object.create(null),o={methods:{}},n=Object.keys(t),r=0;r<n.length;r+=1){var a=n[r];"data"===a||"options"===a||"behaviors"===a?o[a]=t[a]:"function"==typeof t[a]?o.methods[a]=t[a]:e[a]=t[a]}return this.definition(o),this._$.init((function(){Object.assign(this,i.dataUtils.simpleDeepCopy(e))})),this},e.prototype.register=function(){var t,e=this,o=this._$is,n=this._$codeSpace,i=n.prepareComponentOptions(o,this._$options),r=i[0],a=i[1];this._$.options(r);var p=n.getComponentStaticConfig(o),s=null==p?void 0:p.usingComponents,l=null==p?void 0:p.generics,c=null==p?void 0:p.placeholder;s&&this._$.usingComponents(s),l&&this._$.generics(l),c&&this._$.placeholders(c);var h=n.getCompiledTemplate(o);h&&this._$.template(h),n._$styleIsolationMap[o]=a;var d=this._$.registerComponent();return null===(t=this._$alias)||void 0===t||t.forEach((function(t){e._$codeSpace.getComponentSpace().exportComponent(t,e._$is)})),new u(d)},e}(b);!function(t){t.Isolated="isolated",t.ApplyShared="apply-shared",t.Shared="shared",t.PageIsolated="page-isolated",t.PageApplyShared="page-apply-shared",t.PageShared="page-shared"}(a||(a={}));var O=function(){function t(){this.codeSpaceMap=Object.create(null),this.globalCodeSpace=new S(this,!1,{})}return t.prototype.getGlobalCodeSpace=function(){return this.globalCodeSpace},t.prototype.associateBackend=function(t){var e=null!=t?t:new i.domlikeBackend.CurrentWindowBackendContext;return new p(this,e)},t.prototype.createCodeSpace=function(t,e,o){void 0===o&&(o=Object.create(null));var n=new S(this,e,o,this.globalCodeSpace);return this.codeSpaceMap[t]=n,n},t.prototype.getCodeSpace=function(t){return this.codeSpaceMap[t]},t}();module.exports=e})();
|
|
2
|
+
//# sourceMappingURL=glass_easel_miniprogram_adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glass_easel_miniprogram_adapter.js","mappings":"mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,E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JnCI,ICrsBF,SAAWlQ,GACPA,EAAyB,SAAI,WAC7BA,EAA4B,YAAI,eAChCA,EAAuB,OAAI,SAC3BA,EAA6B,aAAI,gBACjCA,EAAgC,gBAAI,oBACpCA,EAA2B,WAAI,aAClC,CAPD,CAOGA,IAAmBA,EAAiB,CAAC,IKWxC,IAAI8U,EAAgC,WAIhC,SAASA,IACL1U,KAAK2U,aAAe7V,OAAO0M,OAAO,MAClCxL,KAAKsM,gBAAkB,IAAIF,EAAUpM,MAAM,EAAO,CAAC,EACvD,CA2CA,OApCA0U,EAAetV,UAAUwV,mBAAqB,WAC1C,OAAO5U,KAAKsM,eAChB,EAQAoI,EAAetV,UAAUyV,iBAAmB,SAAUC,GAClD,IAAI9O,EAAM8O,QAAuDA,EAAiB,IAAI,6CACtF,OAAO,IAAIjV,EAAkBG,KAAMgG,EACvC,EAWA0O,EAAetV,UAAU2V,gBAAkB,SAAUjQ,EAAI/D,EAAasL,QACzC,IAArBA,IAA+BA,EAAmBvN,OAAO0M,OAAO,OACpE,IAAI8B,EAAK,IAAIlB,EAAUpM,KAAMe,EAAasL,EAAkBrM,KAAKsM,iBAEjE,OADAtM,KAAK2U,aAAa7P,GAAMwI,EACjBA,CACX,EAIAoH,EAAetV,UAAUmO,aAAe,SAAUzI,GAC9C,OAAO9E,KAAK2U,aAAa7P,EAC7B,EACO4P,CACX,CAnDmC,G","sources":["webpack://glass-easel-miniprogram-adapter/webpack/bootstrap","webpack://glass-easel-miniprogram-adapter/webpack/runtime/define property getters","webpack://glass-easel-miniprogram-adapter/webpack/runtime/hasOwnProperty shorthand","webpack://glass-easel-miniprogram-adapter/webpack/runtime/make namespace object","webpack://glass-easel-miniprogram-adapter/external commonjs2 \"glass-easel\"","webpack://glass-easel-miniprogram-adapter/./src/backend.ts","webpack://glass-easel-miniprogram-adapter/./src/space.ts","webpack://glass-easel-miniprogram-adapter/./src/types.ts","webpack://glass-easel-miniprogram-adapter/./src/utils.ts","webpack://glass-easel-miniprogram-adapter/./src/behavior.ts","webpack://glass-easel-miniprogram-adapter/./src/selector_query.ts","webpack://glass-easel-miniprogram-adapter/./src/component.ts","webpack://glass-easel-miniprogram-adapter/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"glass-easel\");","import * as glassEasel from 'glass-easel';\n/**\n * A backend context that has been associated to an environment\n */\nvar AssociatedBackend = /** @class */ (function () {\n /** @internal */\n function AssociatedBackend(env, backendContext) {\n this._$env = env;\n this._$ = backendContext;\n }\n /**\n * Register a style sheet resource\n *\n * Some backend cannot load style sheet URL.\n * In this cases, the content should be registered here.\n */\n AssociatedBackend.prototype.registerStyleSheetContent = function (url, content) {\n this._$.registerStyleSheetContent(url, content);\n };\n /**\n * Create a root component in specified backend\n *\n * The component is searched in the `codeSpace` with `url` .\n * If `url` contains \"?\" params, it will be parsed and try to set to component properties.\n */\n AssociatedBackend.prototype.createRoot = function (tagName, codeSpace, url, genericTargets) {\n if (this._$env !== codeSpace._$env)\n throw new Error('The code space is not in the same environment as the backend');\n return new Root(this._$, tagName, codeSpace, url, genericTargets);\n };\n return AssociatedBackend;\n}());\nexport { AssociatedBackend };\n/**\n * A root component\n */\nvar Root = /** @class */ (function () {\n /** @internal */\n function Root(backendContext, tagName, codeSpace, url, genericTargets) {\n this._$comp = codeSpace.getComponentSpace().createComponentByUrl(tagName, url, genericTargets || null, backendContext);\n if (codeSpace.isMainSpace()) {\n var globalStyleSheet = codeSpace.getStyleSheet('app');\n if (globalStyleSheet !== undefined) {\n var styleIsolation = codeSpace._$styleIsolationMap[this._$comp.is];\n if (styleIsolation === \"isolated\" /* StyleIsolation.Isolated */\n || styleIsolation === \"apply-shared\" /* StyleIsolation.ApplyShared */\n || styleIsolation === \"shared\" /* StyleIsolation.Shared */) {\n backendContext.appendStyleSheetPath(globalStyleSheet, codeSpace._$sharedStyleScope);\n }\n }\n }\n var addStyleSheet = function (comp) {\n var styleScope = comp.getComponentOptions().styleScope;\n var path = codeSpace.getStyleSheet(comp.is);\n if (path !== undefined) {\n backendContext.appendStyleSheetPath(path, styleScope);\n }\n };\n this._$comp.getRootBehavior().getComponentDependencies().forEach(addStyleSheet);\n addStyleSheet(this._$comp.getComponentDefinition());\n }\n /**\n * Get the underlying component\n */\n Root.prototype.getComponent = function () {\n return this._$comp;\n };\n /**\n * Attach the root component to the backend\n *\n * This component, the `parent` and the `placeholder` MUST be in the same context.\n * The `parent` MUST be a parent node of the `placeholder` .\n */\n Root.prototype.attach = function (parent, placeholder) {\n glassEasel.Element.replaceDocumentElement(this._$comp, parent, placeholder);\n };\n return Root;\n}());\nexport { Root };\n","/* eslint-disable @typescript-eslint/no-unsafe-return */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as glassEasel from 'glass-easel';\nimport { guid, } from './utils';\nimport { Behavior, ComponentType, TraitBehavior, } from './behavior';\nimport { ComponentProto, } from './component';\n/**\n * A component space with mini-program code manager\n */\nvar CodeSpace = /** @class */ (function () {\n /** @internal */\n function CodeSpace(env, isMainSpace, publicComponents, globalCodeSpace) {\n var _this = this;\n /** @internal */\n this._$overallBehavior = null;\n this._$env = env;\n this._$isMainSpace = isMainSpace;\n this.space = new glassEasel.ComponentSpace('', globalCodeSpace === null || globalCodeSpace === void 0 ? void 0 : globalCodeSpace.space, globalCodeSpace === null || globalCodeSpace === void 0 ? void 0 : globalCodeSpace.space.styleScopeManager);\n this.styleScopeManager = this.space.styleScopeManager;\n this.staticConfigMap = Object.create(null);\n this.styleSheetMap = Object.create(null);\n this.compiledTemplateMap = Object.create(null);\n this.waitingAliasMap = Object.create(null);\n Object.keys(publicComponents).forEach(function (alias) {\n var is = publicComponents[alias];\n if (_this.waitingAliasMap[is])\n _this.waitingAliasMap[is].push(alias);\n else\n _this.waitingAliasMap[is] = [alias];\n });\n this._$sharedStyleScope = this.styleScopeManager.register('');\n this._$styleIsolationMap = Object.create(null);\n }\n CodeSpace.prototype.isMainSpace = function () {\n return this._$isMainSpace;\n };\n /**\n * Get the underlying component space\n */\n CodeSpace.prototype.getComponentSpace = function () {\n return this.space;\n };\n /**\n * Add a behavior for all components\n *\n * Must be called before any component registration so that the component will use this behavior.\n * Set to `null` to disable this behavior.\n */\n CodeSpace.prototype.setOverallBehavior = function (behavior) {\n this._$overallBehavior = behavior;\n };\n /**\n * Import another component space as a plugin (must be in the same environment)\n *\n * Components from the imported `codeSpace` can be used with URLs.\n * If `domainAlias` is provided, the URL format is `plugin://DOMAIN_ALIAS/COMPONENT_SPACE_EXPORT_ALIAS` .\n * If `privateImport` is enabled, another URL format is `plugin-private://DOMAIN/COMPONENT_IS` .\n */\n CodeSpace.prototype.importCodeSpace = function (id, domainAlias, privateImport) {\n if (privateImport === void 0) { privateImport = false; }\n var cs = this._$env.getCodeSpace(id);\n if (!cs) {\n throw new Error(\"There is no space \\\"\".concat(id, \"\\\" in the environment\"));\n }\n if (domainAlias)\n this.space.importSpace(\"plugin://\".concat(domainAlias), cs.space, false);\n if (privateImport)\n this.space.importSpace(\"plugin-private://\".concat(id), cs.space, true);\n };\n /**\n * Add a style sheet URL with style scope name\n *\n * The URL should be recognized by the target backend.\n * The `path` should not contain the `.wxss` suffix.\n */\n CodeSpace.prototype.addStyleSheet = function (path, styleSheetUrl, styleScopeName) {\n this.styleSheetMap[path] = { url: styleSheetUrl, styleScopeName: styleScopeName };\n };\n /**\n * Get a style sheet URL\n *\n * The URL should be recognized by the target backend.\n * The `path` should not contain the `.wxss` suffix.\n */\n CodeSpace.prototype.getStyleSheet = function (path) {\n var _a;\n return (_a = this.styleSheetMap[path]) === null || _a === void 0 ? void 0 : _a.url;\n };\n CodeSpace.prototype.getStyleScopeName = function (path) {\n var _a;\n return (_a = this.styleSheetMap[path]) === null || _a === void 0 ? void 0 : _a.styleScopeName;\n };\n /**\n * Add a compiled template\n *\n * The content is the execution result of the generated string of the template compiler.\n * The `path` should not contain the `.wxml` suffix.\n */\n CodeSpace.prototype.addCompiledTemplate = function (path, content) {\n this.compiledTemplateMap[path] = content;\n };\n /**\n * Get a compiled template\n *\n * The content is the execution result of the generated string of the template compiler.\n * The `path` should not contain the `.wxml` suffix.\n */\n CodeSpace.prototype.getCompiledTemplate = function (path) {\n return this.compiledTemplateMap[path];\n };\n /**\n * Add a static JSON config\n *\n * The `path` should not contain the `.json` suffix.\n */\n CodeSpace.prototype.addComponentStaticConfig = function (path, content) {\n this.staticConfigMap[path] = content;\n };\n /**\n * Get a static JSON config\n *\n * The `path` should not contain the `.json` suffix.\n */\n CodeSpace.prototype.getComponentStaticConfig = function (path) {\n return this.staticConfigMap[path];\n };\n /** @internal */\n CodeSpace.prototype.prepareComponentOptions = function (is, options) {\n // accept some fields from static JSON config\n var staticConfig = this.staticConfigMap[is];\n var pureDataPatternString = staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.pureDataPattern;\n var pureDataPattern = pureDataPatternString\n ? new RegExp(pureDataPatternString)\n : options === null || options === void 0 ? void 0 : options.pureDataPattern;\n // calculate style scope\n var addGlobalClass = staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.addGlobalClass;\n var styleIsolation = staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.styleIsolation;\n if (styleIsolation === undefined) {\n if (staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.component) {\n styleIsolation = addGlobalClass ? \"apply-shared\" /* StyleIsolation.ApplyShared */ : \"isolated\" /* StyleIsolation.Isolated */;\n }\n else {\n styleIsolation = \"shared\" /* StyleIsolation.Shared */;\n }\n }\n var styleScope;\n var extraStyleScope;\n if (styleIsolation === \"apply-shared\" /* StyleIsolation.ApplyShared */\n || styleIsolation === \"page-apply-shared\" /* StyleIsolation.PageApplyShared */) {\n styleScope = this.styleScopeManager.register(this.getStyleScopeName(is) || \"__\".concat(guid()));\n extraStyleScope = this._$sharedStyleScope;\n }\n else if ((styleIsolation === \"shared\" /* StyleIsolation.Shared */ || styleIsolation === \"page-shared\" /* StyleIsolation.PageShared */)\n && this._$isMainSpace) {\n styleScope = this._$sharedStyleScope;\n }\n else {\n styleScope = this.styleScopeManager.register(this.getStyleScopeName(is) || \"__\".concat(guid()));\n }\n // construct component options\n var ret = {\n idPrefixGenerator: guid,\n multipleSlots: options === null || options === void 0 ? void 0 : options.multipleSlots,\n pureDataPattern: pureDataPattern,\n virtualHost: options === null || options === void 0 ? void 0 : options.virtualHost,\n styleScope: styleScope,\n extraStyleScope: extraStyleScope,\n dataDeepCopy: options === null || options === void 0 ? void 0 : options.dataDeepCopy,\n propertyPassingDeepCopy: options === null || options === void 0 ? void 0 : options.propertyPassingDeepCopy,\n propertyEarlyInit: options === null || options === void 0 ? void 0 : options.propertyEarlyInit,\n };\n return [ret, styleIsolation];\n };\n /**\n * Create a component definition environment\n *\n * During the sync execution of `cb` , `Component` and `Behavior` global vars will be available.\n * `globalObject` should be the JavaScript global object, a.k.a. `window` in DOM.\n * Some global variables, a.k.a `Component` `Behavior` `Page` ,\n * will be written into `globalObject` .\n * `path` should be the component path (without \".js\" extension).\n */\n CodeSpace.prototype.globalComponentEnv = function (globalObject, path, cb) {\n return this.componentEnv(path, function (_a) {\n var Page = _a.Page, Component = _a.Component, Behavior = _a.Behavior;\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n /* eslint-disable @typescript-eslint/no-unsafe-assignment */\n var oldPage = globalObject.Page;\n var oldComponent = globalObject.Component;\n var oldBehavior = globalObject.Behavior;\n globalObject.Page = Page;\n globalObject.Component = Component;\n globalObject.Behavior = Behavior;\n var ret = cb();\n globalObject.Page = oldPage;\n globalObject.Component = oldComponent;\n globalObject.Behavior = oldBehavior;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n /* eslint-enable @typescript-eslint/no-unsafe-assignment */\n return ret;\n });\n };\n /**\n * Create a component definition environment\n *\n * Like `globalComponentEnv` , but the global variables are given as callback arguments.\n */\n CodeSpace.prototype.componentEnv = function (path, cb) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var self = this;\n // The page constructor\n function pageConstructor(definition) {\n return self.component(path).pageDefinition(definition).register();\n }\n function componentConstructor(definition) {\n if (definition !== undefined) {\n return self.component(path).definition(definition).register();\n }\n return self.component(path);\n }\n function behaviorConstructor(definition) {\n if (definition !== undefined) {\n return self.behavior().definition(definition).register();\n }\n return self.behavior();\n }\n behaviorConstructor.trait = self.traitBehavior.bind(self);\n // prepare global vars and execute\n return cb({\n Page: pageConstructor,\n Component: componentConstructor,\n Behavior: behaviorConstructor,\n });\n };\n /**\n * Build a component outside of a definition environment\n *\n * The method do not need a definition environment, so the global object pollution is avoided.\n * `path` should be the component path (without \".js\" extension).\n */\n CodeSpace.prototype.component = function (path) {\n return ComponentBuilder.create(this, path, this.waitingAliasMap[path]);\n };\n /**\n * Build a behavior outside of a definition environment\n *\n * The method do not need a definition environment, so the global object pollution is avoided.\n * `path` should be the component path (without \".js\" extension).\n */\n CodeSpace.prototype.behavior = function () {\n return BehaviorBuilder.create(this);\n };\n CodeSpace.prototype.traitBehavior = function (trans) {\n if (trans === undefined) {\n return new TraitBehavior(this.space.defineTraitBehavior());\n }\n return new TraitBehavior(this.space.defineTraitBehavior(trans));\n };\n return CodeSpace;\n}());\nexport { CodeSpace };\nvar BaseBehaviorBuilder = /** @class */ (function () {\n function BaseBehaviorBuilder() {\n this._$parents = [];\n }\n /** Implement a trait behavior */\n BaseBehaviorBuilder.prototype.implement = function (traitBehavior, impl) {\n this._$.implement(traitBehavior._$, impl);\n return this;\n };\n /** Add external classes */\n BaseBehaviorBuilder.prototype.externalClasses = function (list) {\n this._$.externalClasses(list);\n return this;\n };\n BaseBehaviorBuilder.prototype.data = function (gen) {\n this._$.data(gen);\n return this;\n };\n BaseBehaviorBuilder.prototype.property = function (name, def) {\n this._$.property(name, def);\n return this;\n };\n /**\n * Add some public methods\n *\n * The public method can be used as an event handler, and can be visited in component instance.\n */\n BaseBehaviorBuilder.prototype.methods = function (funcs) {\n this._$.methods(funcs);\n return this;\n };\n BaseBehaviorBuilder.prototype.observer = function (paths, func, once) {\n if (once === void 0) { once = false; }\n this._$.observer(paths, func, once);\n return this;\n };\n /**\n * Add a lifetime callback\n */\n BaseBehaviorBuilder.prototype.lifetime = function (name, func, once) {\n if (once === void 0) { once = false; }\n this._$.lifetime(name, func, once);\n return this;\n };\n /**\n * Add a page-lifetime callback\n */\n BaseBehaviorBuilder.prototype.pageLifetime = function (name, func, once) {\n if (once === void 0) { once = false; }\n this._$.pageLifetime(name, func, once);\n return this;\n };\n /**\n * Add a relation\n */\n BaseBehaviorBuilder.prototype.relation = function (name, rel) {\n var target = (rel.target instanceof Behavior || rel.target instanceof ComponentType)\n ? rel.target._$\n : rel.target;\n this._$.relation(name, {\n target: target,\n type: rel.type,\n linked: rel.linked,\n linkChanged: rel.linkChanged,\n unlinked: rel.unlinked,\n linkFailed: rel.linkFailed,\n });\n return this;\n };\n BaseBehaviorBuilder.prototype.init = function (func) {\n this._$.init(function (_a) {\n var data = _a.data, setData = _a.setData, implement = _a.implement, relation = _a.relation, observer = _a.observer, lifetime = _a.lifetime, pageLifetime = _a.pageLifetime, method = _a.method;\n var relationInit = (function (rel) {\n if (rel.target instanceof TraitBehavior) {\n return relation({\n target: rel.target._$,\n type: rel.type,\n linked: rel.linked,\n linkChanged: rel.linkChanged,\n unlinked: rel.unlinked,\n linkFailed: rel.linkFailed,\n });\n }\n var target = (rel.target instanceof Behavior || rel.target instanceof ComponentType)\n ? rel.target._$\n : rel.target;\n return relation({\n target: target,\n type: rel.type,\n linked: rel.linked,\n linkChanged: rel.linkChanged,\n unlinked: rel.unlinked,\n linkFailed: rel.linkFailed,\n });\n });\n var implementInit = (function (traitBehavior, impl) {\n implement(traitBehavior._$, impl);\n });\n var methodCaller = this;\n func.call(methodCaller, {\n self: methodCaller,\n data: data,\n setData: function (newData, callback) {\n setData(newData);\n if (callback) {\n glassEasel.triggerRender(methodCaller._$, function () {\n callback();\n });\n }\n },\n implement: implementInit,\n relation: relationInit,\n observer: observer,\n lifetime: lifetime,\n pageLifetime: pageLifetime,\n method: method,\n });\n });\n return this;\n };\n BaseBehaviorBuilder.prototype.definition = function (def) {\n var _this = this;\n var _a;\n (_a = def.behaviors) === null || _a === void 0 ? void 0 : _a.forEach(function (beh) { var _a; return (_a = beh._$bindedDefinitionFilter) === null || _a === void 0 ? void 0 : _a.call(beh, def); });\n var inner = this._$;\n var behaviors = def.behaviors, rawProperties = def.properties, rawData = def.data, rawObservers = def.observers, methods = def.methods, created = def.created, attached = def.attached, ready = def.ready, moved = def.moved, detached = def.detached, rawLifetimes = def.lifetimes, rawPageLifetimes = def.pageLifetimes, rawRelations = def.relations, externalClasses = def.externalClasses;\n behaviors === null || behaviors === void 0 ? void 0 : behaviors.forEach(function (beh) {\n _this._$parents.push(beh);\n inner.behavior(beh._$);\n });\n if (rawData !== undefined) {\n if (typeof rawData === 'function') {\n inner.data(rawData);\n }\n else {\n inner.staticData(rawData);\n }\n }\n if (rawProperties !== undefined) {\n var keys = Object.keys(rawProperties);\n for (var i = 0; i < keys.length; i += 1) {\n var name_1 = keys[i];\n inner.property(name_1, rawProperties[name_1]);\n }\n }\n if (rawObservers !== undefined) {\n if (Array.isArray(rawObservers)) {\n for (var i = 0; i < rawObservers.length; i += 1) {\n var _b = rawObservers[i], fields = _b.fields, observer = _b.observer;\n inner.observer(fields || '**', observer);\n }\n }\n else {\n var keys = Object.keys(rawObservers);\n for (var i = 0; i < keys.length; i += 1) {\n var fields = keys[i];\n var observer = rawObservers[fields];\n inner.observer(fields, observer);\n }\n }\n }\n if (methods)\n inner.methods(methods);\n if (created && (rawLifetimes === null || rawLifetimes === void 0 ? void 0 : rawLifetimes.created) === undefined)\n inner.lifetime('created', created, true);\n if (attached && (rawLifetimes === null || rawLifetimes === void 0 ? void 0 : rawLifetimes.attached) === undefined)\n inner.lifetime('attached', attached, true);\n if (ready && (rawLifetimes === null || rawLifetimes === void 0 ? void 0 : rawLifetimes.ready) === undefined)\n inner.lifetime('ready', ready, true);\n if (moved && (rawLifetimes === null || rawLifetimes === void 0 ? void 0 : rawLifetimes.moved) === undefined)\n inner.lifetime('moved', moved, true);\n if (detached && (rawLifetimes === null || rawLifetimes === void 0 ? void 0 : rawLifetimes.detached) === undefined)\n inner.lifetime('detached', detached, true);\n if (rawLifetimes) {\n var keys = Object.keys(rawLifetimes);\n for (var i = 0; i < keys.length; i += 1) {\n var name_2 = keys[i];\n var func = rawLifetimes[name_2];\n inner.lifetime(name_2, func, true);\n }\n }\n if (rawPageLifetimes) {\n var keys = Object.keys(rawPageLifetimes);\n for (var i = 0; i < keys.length; i += 1) {\n var name_3 = keys[i];\n var func = rawPageLifetimes[name_3];\n inner.pageLifetime(name_3, func, true);\n }\n }\n if (rawRelations) {\n var keys = Object.keys(rawRelations);\n for (var i = 0; i < keys.length; i += 1) {\n var name_4 = keys[i];\n var rel = rawRelations[name_4];\n inner.relation(name_4, rel);\n }\n }\n if (externalClasses)\n inner.externalClasses(externalClasses);\n return this;\n };\n return BaseBehaviorBuilder;\n}());\nexport { BaseBehaviorBuilder };\nvar BehaviorBuilder = /** @class */ (function (_super) {\n __extends(BehaviorBuilder, _super);\n function BehaviorBuilder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /** @internal */\n BehaviorBuilder.create = function (codeSpace) {\n var ret = new BehaviorBuilder();\n ret._$codeSpace = codeSpace;\n ret._$ = codeSpace.getComponentSpace()\n .defineWithMethodCaller();\n return ret;\n };\n /** Define a chaining filter */\n BehaviorBuilder.prototype.chainingFilter = function (func) {\n this._$.chainingFilter(func);\n return this;\n };\n /** Use another behavior */\n BehaviorBuilder.prototype.behavior = function (behavior) {\n this._$parents.push(behavior);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this._$ = this._$.behavior(behavior._$);\n return this;\n };\n /**\n * Add some template data fields\n *\n * It does not support raw data, but a `gen` function which returns the new data fields.\n * The `gen` function executes once during component creation.\n */\n BehaviorBuilder.prototype.data = function (gen) {\n return _super.prototype.data.call(this, gen);\n };\n /**\n * Add a single property\n *\n * The property name should be different from other properties.\n */\n BehaviorBuilder.prototype.property = function (name, def) {\n return _super.prototype.property.call(this, name, def);\n };\n /**\n * Add some public methods\n *\n * The public method can be used as an event handler, and can be visited in component instance.\n */\n BehaviorBuilder.prototype.methods = function (funcs) {\n return _super.prototype.methods.call(this, funcs);\n };\n /**\n * Execute a function while component instance creation\n *\n * A `BuilderContext` is provided to tweak the component creation progress.\n * The return value is used as the \"export\" value of the behavior,\n * which can be imported by other behaviors.\n */\n BehaviorBuilder.prototype.init = function (func) {\n return _super.prototype.init.call(this, func);\n };\n /** Apply a classic definition object */\n BehaviorBuilder.prototype.definition = function (def) {\n _super.prototype.definition.call(this, def);\n if (def.definitionFilter)\n this._$definitionFilter = def.definitionFilter;\n return this;\n };\n /**\n * Finish the behavior definition process\n */\n BehaviorBuilder.prototype.register = function () {\n return new Behavior(this._$.registerBehavior(), this._$parents, this._$definitionFilter);\n };\n return BehaviorBuilder;\n}(BaseBehaviorBuilder));\nexport { BehaviorBuilder };\n/**\n * A direct way to create a component\n */\nvar ComponentBuilder = /** @class */ (function (_super) {\n __extends(ComponentBuilder, _super);\n function ComponentBuilder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /** @internal */\n ComponentBuilder.create = function (codeSpace, is, alias) {\n var ret = new ComponentBuilder();\n var overallBehavior = codeSpace._$overallBehavior;\n ret._$codeSpace = codeSpace;\n ret._$ = codeSpace.getComponentSpace()\n .defineWithMethodCaller(is || '');\n ret._$is = is || '';\n ret._$alias = alias;\n ret._$.methodCallerInit(function () {\n var originalCaller = this;\n var proto = ret._$proto;\n if (proto === undefined) {\n var methods = originalCaller.getComponentDefinition().behavior.getMethods();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n proto = ret._$proto = new ComponentProto(methods);\n }\n var caller = proto.derive();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n caller._$ = originalCaller;\n caller._$export = ret._$export;\n return caller;\n });\n if (overallBehavior)\n ret._$.behavior(overallBehavior);\n return ret;\n };\n /**\n * Set the component options\n *\n * If called multiple times, only the latest call is valid.\n */\n ComponentBuilder.prototype.options = function (options) {\n this._$options = options;\n return this;\n };\n /** Use another behavior */\n ComponentBuilder.prototype.behavior = function (behavior) {\n this._$parents.push(behavior);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this._$ = this._$.behavior(behavior._$);\n return this;\n };\n /** Set the export value when the component is being selected */\n ComponentBuilder.prototype.export = function (f) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this._$export = f;\n return this;\n };\n /**\n * Add some template data fields\n *\n * It does not support raw data, but a `gen` function which returns the new data fields.\n * The `gen` function executes once during component creation.\n */\n ComponentBuilder.prototype.data = function (gen) {\n return _super.prototype.data.call(this, gen);\n };\n /**\n * Add a single property\n *\n * The property name should be different from other properties.\n */\n ComponentBuilder.prototype.property = function (name, def) {\n return _super.prototype.property.call(this, name, def);\n };\n /**\n * Add some public methods\n *\n * The public method can be used as an event handler, and can be visited in component instance.\n */\n ComponentBuilder.prototype.methods = function (funcs) {\n return _super.prototype.methods.call(this, funcs);\n };\n /**\n * Execute a function while component instance creation\n *\n * A `BuilderContext` is provided to tweak the component creation progress.\n * The return value is used as the \"export\" value of the behavior,\n * which can be imported by other behaviors.\n */\n ComponentBuilder.prototype.init = function (func) {\n return _super.prototype.init.call(this, func);\n };\n /** Apply a classic definition object */\n ComponentBuilder.prototype.definition = function (def) {\n _super.prototype.definition.call(this, def);\n if (def.options)\n this.options(def.options);\n return this;\n };\n ComponentBuilder.prototype.pageDefinition = function (def) {\n var freeData = Object.create(null);\n var compDef = {\n methods: {},\n };\n var keys = Object.keys(def);\n for (var i = 0; i < keys.length; i += 1) {\n var k = keys[i];\n if (k === 'data' || k === 'options' || k === 'behaviors') {\n compDef[k] = def[k];\n }\n else if (typeof def[k] === 'function') {\n compDef.methods[k] = def[k];\n }\n else {\n freeData[k] = def[k];\n }\n }\n this.definition(compDef);\n this._$.init(function () {\n Object.assign(this, glassEasel.dataUtils.simpleDeepCopy(freeData));\n });\n return this;\n };\n /**\n * Finish the component definition process\n */\n ComponentBuilder.prototype.register = function () {\n var _this = this;\n var _a;\n var is = this._$is;\n var codeSpace = this._$codeSpace;\n // processing common fields\n var _b = codeSpace.prepareComponentOptions(is, this._$options), options = _b[0], styleIsolation = _b[1];\n this._$.options(options);\n var staticConfig = codeSpace.getComponentStaticConfig(is);\n var using = staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.usingComponents;\n var generics = staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.generics;\n var placeholder = staticConfig === null || staticConfig === void 0 ? void 0 : staticConfig.placeholder;\n if (using)\n this._$.usingComponents(using);\n if (generics)\n this._$.generics(generics);\n if (placeholder)\n this._$.placeholders(placeholder);\n var template = codeSpace.getCompiledTemplate(is);\n if (template)\n this._$.template(template);\n // do registration\n codeSpace._$styleIsolationMap[is] = styleIsolation;\n var compDef = this._$.registerComponent();\n (_a = this._$alias) === null || _a === void 0 ? void 0 : _a.forEach(function (alias) {\n _this._$codeSpace.getComponentSpace().exportComponent(alias, _this._$is);\n });\n return new ComponentType(compDef);\n };\n return ComponentBuilder;\n}(BaseBehaviorBuilder));\nexport { ComponentBuilder };\n","export { typeUtils as utils } from 'glass-easel';\nexport var StyleIsolation;\n(function (StyleIsolation) {\n StyleIsolation[\"Isolated\"] = \"isolated\";\n StyleIsolation[\"ApplyShared\"] = \"apply-shared\";\n StyleIsolation[\"Shared\"] = \"shared\";\n StyleIsolation[\"PageIsolated\"] = \"page-isolated\";\n StyleIsolation[\"PageApplyShared\"] = \"page-apply-shared\";\n StyleIsolation[\"PageShared\"] = \"page-shared\";\n})(StyleIsolation || (StyleIsolation = {}));\n","export var guid = function () { return Math.floor((1 + Math.random()) * 0x100000000)\n .toString(16)\n .slice(1); };\n","var Behavior = /** @class */ (function () {\n /** @internal */\n function Behavior(inner, parents, definitionFilter) {\n this._$ = inner;\n // processing definition filter\n if (definitionFilter !== undefined) {\n var definitionFilterArgs_1 = parents.map(function (p) { var _a; return (_a = p._$bindedDefinitionFilter) !== null && _a !== void 0 ? _a : null; });\n this._$bindedDefinitionFilter = function (childDef) {\n definitionFilter(childDef, definitionFilterArgs_1);\n };\n }\n }\n return Behavior;\n}());\nexport { Behavior };\nvar ComponentType = /** @class */ (function () {\n /** @internal */\n function ComponentType(inner) {\n this._$ = inner;\n }\n return ComponentType;\n}());\nexport { ComponentType };\nvar TraitBehavior = /** @class */ (function () {\n function TraitBehavior(inner) {\n this._$ = inner;\n }\n return TraitBehavior;\n}());\nexport { TraitBehavior };\n","import * as glassEasel from 'glass-easel';\nvar joinAsync = function (inits, cb) {\n var initDone = false;\n var jobCount = inits.length;\n var rets = new Array(jobCount);\n inits.forEach(function (init, index) {\n init(function (ret) {\n rets[index] = ret;\n jobCount -= 1;\n if (jobCount === 0 && initDone) {\n cb(rets);\n }\n });\n });\n initDone = true;\n if (jobCount === 0) {\n setTimeout(function () {\n cb(rets);\n }, 0);\n }\n};\nvar NodesRef = /** @class */ (function () {\n function NodesRef(selectorQuery, component, selector, selectSingle) {\n this._$sq = selectorQuery;\n this._$comp = component;\n this._$sel = selector;\n this._$single = selectSingle;\n }\n NodesRef.prototype.fields = function (fields, cb) {\n if (cb === void 0) { cb = function () { }; }\n this._$sq._$push(this._$sel, this._$comp, this._$single, fields, cb);\n return this._$sq;\n };\n NodesRef.prototype.boundingClientRect = function (cb) {\n if (cb === void 0) { cb = function () { }; }\n this._$sq._$push(this._$sel, this._$comp, this._$single, {\n id: true,\n dataset: true,\n rect: true,\n size: true,\n }, cb);\n return this._$sq;\n };\n NodesRef.prototype.scrollOffset = function (cb) {\n if (cb === void 0) { cb = function () { }; }\n this._$sq._$push(this._$sel, this._$comp, this._$single, {\n id: true,\n dataset: true,\n scrollOffset: true,\n }, cb);\n return this._$sq;\n };\n return NodesRef;\n}());\n// main class\nvar SelectorQuery = /** @class */ (function () {\n /** @internal */\n function SelectorQuery(component) {\n this._$comp = component;\n this._$queue = [];\n }\n /** Change where the node should be selected from */\n SelectorQuery.prototype.in = function (component) {\n this._$comp = component;\n return this;\n };\n /** Select the first node that matches the selector */\n SelectorQuery.prototype.select = function (selector) {\n return new NodesRef(this, this._$comp, selector, true);\n };\n /** Select all nodes that match the selector */\n SelectorQuery.prototype.selectAll = function (selector) {\n return new NodesRef(this, this._$comp, selector, false);\n };\n /**\n * Select the viewport of the component\n *\n * Only the size and the scroll position is meaningful when the viewport is selected.\n */\n SelectorQuery.prototype.selectViewport = function () {\n return new NodesRef(this, this._$comp, null, true);\n };\n /** @internal */\n SelectorQuery.prototype._$push = function (selector, component, single, fields, cb) {\n this._$queue.push({\n component: component,\n selector: selector,\n single: single,\n fields: fields,\n cb: cb,\n });\n };\n /**\n * Execute all queries\n *\n * The `cb` is called after all queries done.\n */\n SelectorQuery.prototype.exec = function (cb) {\n if (cb === void 0) { cb = function () { }; }\n var q = this._$queue;\n joinAsync(q.map(function (req) { return (function (done) {\n var component = req.component, selector = req.selector, single = req.single, fields = req.fields, cb = req.cb;\n if (selector === null) {\n // for the viewport selection, return available fields\n var res_1 = {};\n joinAsync([\n function (done) {\n var ctx = component._$.getBackendContext();\n var width = ctx.getWindowWidth();\n var height = ctx.getWindowHeight();\n if (fields.id)\n res_1.id = '';\n if (fields.dataset)\n res_1.dataset = {};\n if (fields.mark)\n res_1.mark = {};\n if (fields.rect) {\n res_1.left = 0;\n res_1.top = 0;\n res_1.right = width;\n res_1.bottom = height;\n }\n if (fields.size) {\n res_1.width = width;\n res_1.height = height;\n }\n if (fields.scrollOffset) {\n var rootComp = component._$.general();\n while (rootComp.ownerShadowRoot) {\n rootComp = rootComp.ownerShadowRoot.getHostNode();\n }\n rootComp.getBoundingClientRect(function (_a) {\n var left = _a.left, top = _a.top, width = _a.width, height = _a.height;\n res_1.scrollLeft = left;\n res_1.scrollTop = top;\n res_1.scrollWidth = width;\n res_1.scrollHeight = height;\n done(undefined);\n });\n }\n else {\n done(undefined);\n }\n },\n ], function () {\n cb(res_1);\n done(res_1);\n });\n }\n else {\n // for common node selection, return specified fields\n var constructSingleRes_1 = function (elem, cb) {\n var res = {};\n if (fields.id)\n res.id = elem.id;\n if (fields.dataset)\n res.dataset = elem.dataset;\n if (fields.mark)\n res.mark = elem.collectMarks();\n joinAsync([\n function (done) {\n if (fields.rect || fields.size) {\n elem.getBoundingClientRect(function (rect) {\n if (fields.rect) {\n res.left = rect.left;\n res.top = rect.top;\n res.right = rect.left + rect.width;\n res.bottom = rect.top + rect.height;\n }\n if (fields.size) {\n res.width = rect.width;\n res.height = rect.height;\n }\n done(undefined);\n });\n }\n else {\n done(undefined);\n }\n },\n function (done) {\n if (fields.scrollOffset) {\n elem.getScrollOffset(function (rect) {\n res.scrollLeft = rect.scrollLeft;\n res.scrollTop = rect.scrollTop;\n res.scrollWidth = rect.scrollWidth;\n res.scrollHeight = rect.scrollHeight;\n done(undefined);\n });\n }\n else {\n done(undefined);\n }\n },\n ], function () {\n if (fields.properties) {\n if (elem instanceof glassEasel.Component) {\n fields.properties.forEach(function (propName) {\n if (glassEasel.Component.hasProperty(elem, propName)) {\n var ds = elem.getComponentOptions().propertyPassingDeepCopy;\n var v = elem.data[propName];\n if (ds === glassEasel.DeepCopyKind.None) {\n res[propName] = v;\n }\n else if (ds === glassEasel.DeepCopyKind.Simple) {\n res[propName] = glassEasel.dataUtils.simpleDeepCopy(v);\n }\n else if (ds === glassEasel.DeepCopyKind.SimpleWithRecursion) {\n res[propName] = glassEasel.dataUtils.deepCopy(v, true);\n }\n }\n });\n }\n }\n cb(res);\n });\n };\n if (single) {\n // select single node\n var node = component._$.getShadowRoot().querySelector(selector);\n if (node) {\n constructSingleRes_1(node, function (res) {\n cb(res);\n done(res);\n });\n }\n else {\n setTimeout(function () {\n cb(null);\n done(null);\n }, 0);\n }\n }\n else {\n // select multiple nodes\n var nodes = component._$.getShadowRoot().querySelectorAll(selector);\n joinAsync(nodes.map(function (node) { return (function (done) {\n constructSingleRes_1(node, function (res) {\n done(res);\n });\n }); }), function (resList) {\n cb(resList);\n done(resList);\n });\n }\n }\n }); }), cb);\n };\n return SelectorQuery;\n}());\nexport { SelectorQuery };\n","import * as glassEasel from 'glass-easel';\nimport { SelectorQuery } from './selector_query';\nvar filterComponentExportWithType = function (source, elem, componentType) {\n var _a;\n var comp = elem.asInstanceOf(componentType._$);\n if (comp === null)\n return undefined;\n var selectedSpace = comp.getRootBehavior().ownerSpace;\n var uncheckedCaller = comp.getMethodCaller();\n var caller = uncheckedCaller instanceof ComponentCaller ? uncheckedCaller : null;\n var sourceSpace = source._$.getRootBehavior().ownerSpace;\n var defaultResult = selectedSpace !== sourceSpace ? null : caller;\n var ret = (_a = caller === null || caller === void 0 ? void 0 : caller._$export) === null || _a === void 0 ? void 0 : _a.call(caller, selectedSpace !== sourceSpace ? null : source);\n if (ret === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return defaultResult;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return ret;\n};\nvar filterComponentExport = function (source, elem) {\n var _a;\n if (elem instanceof glassEasel.Component) {\n var selectedSpace = elem.getRootBehavior().ownerSpace;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var uncheckedCaller = elem.getMethodCaller();\n var caller = uncheckedCaller instanceof ComponentCaller ? uncheckedCaller : null;\n var sourceSpace = source._$.getRootBehavior().ownerSpace;\n var defaultResult = selectedSpace !== sourceSpace ? null : caller;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var ret = (_a = caller === null || caller === void 0 ? void 0 : caller._$export) === null || _a === void 0 ? void 0 : _a.call(caller, selectedSpace !== sourceSpace ? null : source);\n if (ret === undefined) {\n return defaultResult;\n }\n return ret;\n }\n return undefined;\n};\nvar ComponentCaller = /** @class */ (function () {\n function ComponentCaller() {\n }\n Object.defineProperty(ComponentCaller.prototype, \"is\", {\n /** The component path in the code space */\n get: function () {\n return this._$.is;\n },\n set: function (value) {\n Object.defineProperty(this, 'is', {\n value: value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentCaller.prototype, \"id\", {\n /** The `id` field in the template */\n get: function () {\n return this._$.id;\n },\n set: function (value) {\n Object.defineProperty(this, 'id', {\n value: value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentCaller.prototype, \"dataset\", {\n /** The `data-*` field in the template */\n get: function () {\n return this._$.dataset;\n },\n set: function (value) {\n Object.defineProperty(this, 'dataset', {\n value: value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentCaller.prototype, \"data\", {\n /** The component data and property values */\n get: function () {\n return this._$.data;\n },\n set: function (value) {\n Object.defineProperty(this, 'data', {\n value: value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ComponentCaller.prototype, \"properties\", {\n /** The component data and property values (same as `data` ) */\n get: function () {\n return this._$.data;\n },\n set: function (value) {\n Object.defineProperty(this, 'properties', {\n value: value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Group several data update calls\n *\n * This method is designed for hinting the backend that some updates should be handled together.\n * However, this is done automatically now,\n * so this method is just for backward compatibilities.\n */\n // eslint-disable-next-line class-methods-use-this\n ComponentCaller.prototype.groupSetData = function (callback) {\n callback();\n };\n ComponentCaller.prototype.setData = function (data, callback) {\n this._$.setData(data);\n if (callback) {\n glassEasel.triggerRender(this._$, function () {\n callback();\n });\n }\n };\n ComponentCaller.prototype.updateData = function (newData) {\n this._$.updateData(newData);\n };\n ComponentCaller.prototype.replaceDataOnPath = function (path, data) {\n this._$.replaceDataOnPath(path, data);\n };\n ComponentCaller.prototype.spliceArrayDataOnPath = function (path, index, del, inserts) {\n this._$.spliceArrayDataOnPath(path, index, del, inserts);\n };\n /**\n * Apply all scheduled updates immediately\n *\n * Inside observers, it is generally not .\n */\n ComponentCaller.prototype.applyDataUpdates = function () {\n this._$.applyDataUpdates();\n };\n /**\n * Pending all data updates in the callback, and apply updates after callback returns\n *\n * This function helps grouping several `replaceDataOnPath` or `spliceArrayDataOnPath` calls,\n * and then apply them at the end of the callback.\n * `setData` and `applyDataUpdates` calls inside the callback still apply updates immediately.\n */\n ComponentCaller.prototype.groupUpdates = function (callback) {\n return this._$.groupUpdates(callback);\n };\n /**\n * Check whether the `other` behavior is a dependent behavior or a implemented trait behavior\n */\n ComponentCaller.prototype.hasBehavior = function (behavior) {\n return this._$.hasBehavior(behavior._$);\n };\n /**\n * Get the trait behavior implementation of the component\n *\n * Returns `undefined` if the specified trait behavior is not implemented.\n */\n ComponentCaller.prototype.traitBehavior = function (traitBehavior) {\n return this._$.traitBehavior(traitBehavior._$);\n };\n /** Trigger an event */\n ComponentCaller.prototype.triggerEvent = function (name, detail, options) {\n return this._$.triggerEvent(name, detail, options);\n };\n /** Create a selector query for searching element inside the component */\n ComponentCaller.prototype.createSelectorQuery = function () {\n return new SelectorQuery(this);\n };\n ComponentCaller.prototype.selectComponent = function (selector, componentType) {\n var _a, _b;\n var target = this._$.getShadowRoot().querySelector(selector);\n if (target === null)\n return null;\n return componentType\n ? (_a = filterComponentExportWithType(this, target, componentType)) !== null && _a !== void 0 ? _a : null\n : (_b = filterComponentExport(this, target)) !== null && _b !== void 0 ? _b : null;\n };\n ComponentCaller.prototype.selectAllComponents = function (selector, componentType) {\n var _this = this;\n var targets = this._$.getShadowRoot().querySelectorAll(selector);\n var ret = [];\n targets.forEach(function (target) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var r = componentType\n ? filterComponentExportWithType(_this, target, componentType)\n : filterComponentExport(_this, target);\n if (r !== undefined)\n ret.push(r);\n });\n return ret;\n };\n ComponentCaller.prototype.selectOwnerComponent = function (componentType) {\n var _a, _b, _c;\n var target = (_a = this._$.ownerShadowRoot) === null || _a === void 0 ? void 0 : _a.getHostNode();\n if (target === undefined)\n return null;\n return componentType\n ? (_b = filterComponentExportWithType(this, target, componentType)) !== null && _b !== void 0 ? _b : null\n : (_c = filterComponentExport(this, target)) !== null && _c !== void 0 ? _c : null;\n };\n ComponentCaller.prototype.getRelationNodes = function (relationKey) {\n return this._$.getRelationNodes(relationKey).map(function (target) { return target.getMethodCaller(); });\n };\n /** Cast the component into a general-typed one */\n ComponentCaller.prototype.general = function () {\n return this;\n };\n /**\n * Cast the component into the specified type\n *\n * Returns `null` if the component node is not the instance of the specified component.\n */\n ComponentCaller.prototype.asInstanceOf = function (componentType) {\n var inner = this._$.asInstanceOf(componentType._$);\n if (!inner)\n return null;\n return this;\n };\n return ComponentCaller;\n}());\nexport { ComponentCaller };\nvar ComponentProto = /** @class */ (function () {\n function ComponentProto(methods, componentExport) {\n this.proto = Object.create(ComponentCaller.prototype);\n Object.assign(this.proto, methods);\n this.proto._$export = componentExport;\n }\n ComponentProto.prototype.derive = function () {\n return Object.create(this.proto);\n };\n return ComponentProto;\n}());\nexport { ComponentProto };\n","import * as glassEasel from 'glass-easel';\nimport { AssociatedBackend } from './backend';\nimport { CodeSpace, } from './space';\nimport * as glassEasel_1 from 'glass-easel';\nexport { glassEasel_1 as glassEasel };\nimport * as types_1 from './types';\nexport { types_1 as types };\nexport { StyleIsolation } from './types';\nexport * from './space';\nexport { AssociatedBackend, Root } from './backend';\nimport * as component_1 from './component';\nexport { component_1 as component };\n/**\n * A mini-program API environment\n *\n * Each environment manages multiple backend contexts.\n * However, a backend context should be exclusively managed by a single environment\n * (to avoid `StyleScopeId` confliction).\n * It is able to create multiple `CodeSpace` within the environment.\n */\nvar MiniProgramEnv = /** @class */ (function () {\n /**\n * Create an empty mini-program API environment\n */\n function MiniProgramEnv() {\n this.codeSpaceMap = Object.create(null);\n this.globalCodeSpace = new CodeSpace(this, false, {});\n }\n /**\n * Get a global code space in which global components can be defined\n *\n * External glass-easel based components can be defined in this code space.\n * All global components should be defined before any other `CodeSpace` created!\n */\n MiniProgramEnv.prototype.getGlobalCodeSpace = function () {\n return this.globalCodeSpace;\n };\n /**\n * Associate a backend context\n *\n * If `backendContext` is not given, the DOM-based backend is used\n * (causes failure if running outside browsers).\n * The backend context SHOULD NOT be associated by other environments!\n */\n MiniProgramEnv.prototype.associateBackend = function (backendContent) {\n var ctx = backendContent !== null && backendContent !== void 0 ? backendContent : new glassEasel.domlikeBackend.CurrentWindowBackendContext();\n return new AssociatedBackend(this, ctx);\n };\n /**\n * Create a component space that can manage WXML, WXSS, JS and static JSON config files\n *\n * The space can be specified as a *main* space.\n * This makes some features available:\n * * the `app.wxss` will be used as a style sheet for all root components in the space;\n * * the `StyleIsolation.Shared` is accepted for components in the space.\n * Non-main spaces usually act as plugins.\n * `publicComponents` is a map for specifying a map of aliases and component paths.\n */\n MiniProgramEnv.prototype.createCodeSpace = function (id, isMainSpace, publicComponents) {\n if (publicComponents === void 0) { publicComponents = Object.create(null); }\n var cs = new CodeSpace(this, isMainSpace, publicComponents, this.globalCodeSpace);\n this.codeSpaceMap[id] = cs;\n return cs;\n };\n /**\n * Get a component space by the `id` specified when created\n */\n MiniProgramEnv.prototype.getCodeSpace = function (id) {\n return this.codeSpaceMap[id];\n };\n return MiniProgramEnv;\n}());\nexport { MiniProgramEnv };\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","require","extendStatics","StyleIsolation","AssociatedBackend","env","backendContext","this","_$env","_$","registerStyleSheetContent","url","content","createRoot","tagName","codeSpace","genericTargets","Error","Root","_$comp","getComponentSpace","createComponentByUrl","isMainSpace","globalStyleSheet","getStyleSheet","undefined","styleIsolation","_$styleIsolationMap","is","appendStyleSheetPath","_$sharedStyleScope","addStyleSheet","comp","styleScope","getComponentOptions","path","getRootBehavior","getComponentDependencies","forEach","getComponentDefinition","getComponent","attach","parent","placeholder","guid","Math","floor","random","toString","slice","Behavior","inner","parents","definitionFilter","definitionFilterArgs_1","map","p","_a","_$bindedDefinitionFilter","childDef","ComponentType","TraitBehavior","joinAsync","inits","cb","initDone","jobCount","length","rets","Array","init","index","ret","setTimeout","NodesRef","selectorQuery","component","selector","selectSingle","_$sq","_$sel","_$single","fields","_$push","boundingClientRect","id","dataset","rect","size","scrollOffset","SelectorQuery","_$queue","in","select","selectAll","selectViewport","single","push","exec","q","req","done","res_1","ctx","getBackendContext","width","getWindowWidth","height","getWindowHeight","mark","left","top","right","bottom","rootComp","general","ownerShadowRoot","getHostNode","getBoundingClientRect","scrollLeft","scrollTop","scrollWidth","scrollHeight","constructSingleRes_1","elem","res","collectMarks","getScrollOffset","properties","propName","ds","propertyPassingDeepCopy","v","data","node","getShadowRoot","querySelector","nodes","querySelectorAll","resList","filterComponentExportWithType","source","componentType","asInstanceOf","selectedSpace","ownerSpace","uncheckedCaller","getMethodCaller","caller","ComponentCaller","sourceSpace","defaultResult","_$export","filterComponentExport","set","writable","configurable","groupSetData","callback","setData","updateData","newData","replaceDataOnPath","spliceArrayDataOnPath","del","inserts","applyDataUpdates","groupUpdates","hasBehavior","behavior","traitBehavior","triggerEvent","name","detail","options","createSelectorQuery","selectComponent","_b","target","selectAllComponents","_this","targets","r","selectOwnerComponent","_c","getRelationNodes","relationKey","ComponentProto","methods","componentExport","proto","create","assign","derive","__extends","d","b","setPrototypeOf","__proto__","TypeError","String","__","constructor","CodeSpace","publicComponents","globalCodeSpace","_$overallBehavior","_$isMainSpace","space","styleScopeManager","staticConfigMap","styleSheetMap","compiledTemplateMap","waitingAliasMap","keys","alias","register","setOverallBehavior","importCodeSpace","domainAlias","privateImport","cs","getCodeSpace","concat","importSpace","styleSheetUrl","styleScopeName","getStyleScopeName","addCompiledTemplate","getCompiledTemplate","addComponentStaticConfig","getComponentStaticConfig","prepareComponentOptions","extraStyleScope","staticConfig","pureDataPatternString","pureDataPattern","RegExp","addGlobalClass","idPrefixGenerator","multipleSlots","virtualHost","dataDeepCopy","propertyEarlyInit","globalComponentEnv","globalObject","componentEnv","Page","Component","oldPage","oldComponent","oldBehavior","self","behaviorConstructor","trait","bind","pageDefinition","ComponentBuilder","BehaviorBuilder","trans","defineTraitBehavior","BaseBehaviorBuilder","_$parents","implement","impl","externalClasses","list","gen","property","def","funcs","observer","paths","func","once","lifetime","pageLifetime","relation","rel","type","linked","linkChanged","unlinked","linkFailed","method","methodCaller","behaviors","beh","rawProperties","rawData","rawObservers","observers","created","attached","ready","moved","detached","rawLifetimes","lifetimes","rawPageLifetimes","pageLifetimes","rawRelations","relations","staticData","i","name_1","isArray","name_2","name_3","name_4","_super","apply","arguments","_$codeSpace","defineWithMethodCaller","chainingFilter","_$definitionFilter","registerBehavior","overallBehavior","_$is","_$alias","methodCallerInit","_$proto","getMethods","_$options","export","f","freeData","compDef","k","using","usingComponents","generics","placeholders","template","registerComponent","exportComponent","MiniProgramEnv","codeSpaceMap","getGlobalCodeSpace","associateBackend","backendContent","createCodeSpace"],"sourceRoot":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as glassEasel from 'glass-easel';
|
|
2
|
+
import { MiniProgramEnv } from '.';
|
|
3
|
+
import { CodeSpace } from './space';
|
|
4
|
+
/**
|
|
5
|
+
* A backend context that has been associated to an environment
|
|
6
|
+
*/
|
|
7
|
+
export declare class AssociatedBackend {
|
|
8
|
+
private _$env;
|
|
9
|
+
/** @internal */
|
|
10
|
+
_$: glassEasel.GeneralBackendContext;
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(env: MiniProgramEnv, backendContext: glassEasel.GeneralBackendContext);
|
|
13
|
+
/**
|
|
14
|
+
* Register a style sheet resource
|
|
15
|
+
*
|
|
16
|
+
* Some backend cannot load style sheet URL.
|
|
17
|
+
* In this cases, the content should be registered here.
|
|
18
|
+
*/
|
|
19
|
+
registerStyleSheetContent(url: string, content: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* Create a root component in specified backend
|
|
22
|
+
*
|
|
23
|
+
* The component is searched in the `codeSpace` with `url` .
|
|
24
|
+
* If `url` contains "?" params, it will be parsed and try to set to component properties.
|
|
25
|
+
*/
|
|
26
|
+
createRoot(tagName: string, codeSpace: CodeSpace, url: string, genericTargets?: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
}): Root;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A root component
|
|
32
|
+
*/
|
|
33
|
+
export declare class Root {
|
|
34
|
+
private _$comp;
|
|
35
|
+
/** @internal */
|
|
36
|
+
constructor(backendContext: glassEasel.GeneralBackendContext, tagName: string, codeSpace: CodeSpace, url: string, genericTargets?: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Get the underlying component
|
|
41
|
+
*/
|
|
42
|
+
getComponent(): glassEasel.GeneralComponent;
|
|
43
|
+
/**
|
|
44
|
+
* Attach the root component to the backend
|
|
45
|
+
*
|
|
46
|
+
* This component, the `parent` and the `placeholder` MUST be in the same context.
|
|
47
|
+
* The `parent` MUST be a parent node of the `placeholder` .
|
|
48
|
+
*/
|
|
49
|
+
attach(parent: glassEasel.GeneralBackendElement, placeholder: glassEasel.GeneralBackendElement): void;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,cAAc,EAAkB,MAAM,GAAG,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAgB;IAC7B,gBAAgB;IAChB,EAAE,EAAE,UAAU,CAAC,qBAAqB,CAAA;IAEpC,gBAAgB;gBACJ,GAAG,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,CAAC,qBAAqB;IAKjF;;;;;OAKG;IACH,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;IAInD;;;;;OAKG;IACH,UAAU,CACR,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GACzC,IAAI;CAIR;AAED;;GAEG;AACH,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAA6B;IAE3C,gBAAgB;gBAEd,cAAc,EAAE,UAAU,CAAC,qBAAqB,EAChD,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAgC5C;;OAEG;IACH,YAAY,IAAI,UAAU,CAAC,gBAAgB;IAI3C;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,qBAAqB,EAAE,WAAW,EAAE,UAAU,CAAC,qBAAqB;CAG/F"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as glassEasel from 'glass-easel';
|
|
2
|
+
import { GeneralComponentDefinition, utils as typeUtils } from './types';
|
|
3
|
+
type DataList = typeUtils.DataList;
|
|
4
|
+
type PropertyList = typeUtils.PropertyList;
|
|
5
|
+
type MethodList = typeUtils.MethodList;
|
|
6
|
+
type ChainingFilterType = typeUtils.ChainingFilterType;
|
|
7
|
+
export type DefinitionFilter = (target: GeneralComponentDefinition, childFilters: (((target: GeneralComponentDefinition) => void) | null)[]) => void;
|
|
8
|
+
export type GeneralBehavior = Behavior<Record<string, any>, Record<string, any>, Record<string, any>, any>;
|
|
9
|
+
export declare class Behavior<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TChainingFilter extends ChainingFilterType> {
|
|
10
|
+
/** @internal */
|
|
11
|
+
_$: glassEasel.GeneralBehavior;
|
|
12
|
+
/** @internal */
|
|
13
|
+
_$bindedDefinitionFilter?: ((target: GeneralComponentDefinition) => void);
|
|
14
|
+
/** @internal */
|
|
15
|
+
constructor(inner: glassEasel.Behavior<TData, TProperty, TMethod, TChainingFilter>, parents: GeneralBehavior[], definitionFilter: DefinitionFilter | undefined);
|
|
16
|
+
}
|
|
17
|
+
export declare class ComponentType<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> {
|
|
18
|
+
/** @internal */
|
|
19
|
+
_$: glassEasel.ComponentDefinition<TData, TProperty, TMethod>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
constructor(inner: glassEasel.ComponentDefinition<TData, TProperty, TMethod>);
|
|
22
|
+
}
|
|
23
|
+
export declare class TraitBehavior<TIn extends {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}, TOut extends {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
} = TIn> {
|
|
28
|
+
/** @internal */
|
|
29
|
+
_$: glassEasel.TraitBehavior<TIn, TOut>;
|
|
30
|
+
/** @internal */
|
|
31
|
+
constructor(inner: glassEasel.TraitBehavior<TIn>);
|
|
32
|
+
constructor(inner: glassEasel.TraitBehavior<TIn, TOut>);
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=behavior.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"behavior.d.ts","sourceRoot":"","sources":["../../../src/behavior.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AACzC,OAAO,EACL,0BAA0B,EAC1B,KAAK,IAAI,SAAS,EACnB,MAAM,SAAS,CAAA;AAEhB,KAAK,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;AAClC,KAAK,YAAY,GAAG,SAAS,CAAC,YAAY,CAAA;AAC1C,KAAK,UAAU,GAAG,SAAS,CAAC,UAAU,CAAA;AACtC,KAAK,kBAAkB,GAAG,SAAS,CAAC,kBAAkB,CAAA;AAEtD,MAAM,MAAM,gBAAgB,GAC5B,CACE,MAAM,EAAE,0BAA0B,EAClC,YAAY,EAAE,CACZ,CAAC,CAAC,MAAM,EAAE,0BAA0B,KAAK,IAAI,CAAC,GAC5C,IAAI,CACP,EAAE,KACA,IAAI,CAAA;AAET,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnB,GAAG,CACJ,CAAA;AAED,qBAAa,QAAQ,CACnB,KAAK,SAAS,QAAQ,EACtB,SAAS,SAAS,YAAY,EAC9B,OAAO,SAAS,UAAU,EAC1B,eAAe,SAAS,kBAAkB;IAE1C,gBAAgB;IAChB,EAAE,EAAE,UAAU,CAAC,eAAe,CAAA;IAC9B,gBAAgB;IAChB,wBAAwB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,0BAA0B,KAAK,IAAI,CAAC,CAAA;IAEzE,gBAAgB;gBAEd,KAAK,EAAE,UAAU,CAAC,QAAQ,CACxB,KAAK,EACL,SAAS,EACT,OAAO,EACP,eAAe,CAChB,EACD,OAAO,EAAE,eAAe,EAAE,EAC1B,gBAAgB,EAAE,gBAAgB,GAAG,SAAS;CAYjD;AAED,qBAAa,aAAa,CACxB,KAAK,SAAS,QAAQ,EACtB,SAAS,SAAS,YAAY,EAC9B,OAAO,SAAS,UAAU,EAE1B,gBAAgB;IAEhB,gBAAgB;IAChB,EAAE,EAAE,UAAU,CAAC,mBAAmB,CAChC,KAAK,EACL,SAAS,EACT,OAAO,CACR,CAAA;IAED,gBAAgB;gBAEd,KAAK,EAAE,UAAU,CAAC,mBAAmB,CACnC,KAAK,EACL,SAAS,EACT,OAAO,CACR;CAIJ;AAED,qBAAa,aAAa,CACxB,GAAG,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAClC,IAAI,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,GAAG;IAEzC,gBAAgB;IAChB,EAAE,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAEvC,gBAAgB;gBACJ,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,CAAC;gBACpC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC;CAIvD"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as glassEasel from 'glass-easel';
|
|
2
|
+
import { utils as typeUtils } from './types';
|
|
3
|
+
import { ComponentType, GeneralBehavior, TraitBehavior } from './behavior';
|
|
4
|
+
import { SelectorQuery } from './selector_query';
|
|
5
|
+
type DataList = typeUtils.DataList;
|
|
6
|
+
type PropertyList = typeUtils.PropertyList;
|
|
7
|
+
type MethodList = typeUtils.MethodList;
|
|
8
|
+
export type AllData<TData extends DataList, TProperty extends PropertyList> = typeUtils.DataWithPropertyValues<TData, TProperty>;
|
|
9
|
+
type ExportType<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport> = (UComponentExport extends undefined ? Component<UData, UProperty, UMethod, UComponentExport> : UComponentExport);
|
|
10
|
+
export type GeneralComponent = Component<any, any, any, any>;
|
|
11
|
+
export type Component<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> = ComponentCaller<TData, TProperty, TMethod, TComponentExport> & {
|
|
12
|
+
[k in keyof TMethod]: TMethod[k];
|
|
13
|
+
};
|
|
14
|
+
export declare class ComponentCaller<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> {
|
|
15
|
+
/** @internal */
|
|
16
|
+
_$: glassEasel.Component<TData, TProperty, TMethod>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
_$export?: (source: GeneralComponent | null) => TComponentExport;
|
|
19
|
+
/** The component path in the code space */
|
|
20
|
+
get is(): string;
|
|
21
|
+
set is(value: string);
|
|
22
|
+
/** The `id` field in the template */
|
|
23
|
+
get id(): string;
|
|
24
|
+
set id(value: string);
|
|
25
|
+
/** The `data-*` field in the template */
|
|
26
|
+
get dataset(): {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
} | null;
|
|
29
|
+
set dataset(value: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
} | null);
|
|
32
|
+
/** The component data and property values */
|
|
33
|
+
get data(): AllData<TData, TProperty>;
|
|
34
|
+
set data(value: AllData<TData, TProperty>);
|
|
35
|
+
/** The component data and property values (same as `data` ) */
|
|
36
|
+
get properties(): AllData<TData, TProperty>;
|
|
37
|
+
set properties(value: AllData<TData, TProperty>);
|
|
38
|
+
/**
|
|
39
|
+
* Group several data update calls
|
|
40
|
+
*
|
|
41
|
+
* This method is designed for hinting the backend that some updates should be handled together.
|
|
42
|
+
* However, this is done automatically now,
|
|
43
|
+
* so this method is just for backward compatibilities.
|
|
44
|
+
*/
|
|
45
|
+
groupSetData(callback: () => void): void;
|
|
46
|
+
/**
|
|
47
|
+
* Do a classic data update
|
|
48
|
+
*
|
|
49
|
+
* The `callback` is called after the update applies in the backend.
|
|
50
|
+
* In most cases, you SHOULD NOT wait the backend update (that might be very slow),
|
|
51
|
+
* and most calls, including read calls such as `selectComponent` , simply works immediately.
|
|
52
|
+
* However, when called inside observers,
|
|
53
|
+
* the data update will not be applied to templates immediately
|
|
54
|
+
* (it is recommanded to use `updateData` instead in observers).
|
|
55
|
+
*/
|
|
56
|
+
setData(newData: Partial<typeUtils.SetDataSetter<typeUtils.DataWithPropertyValues<TData, TProperty>>>, callback?: () => void): void;
|
|
57
|
+
/**
|
|
58
|
+
* Schedule a classic data updates
|
|
59
|
+
*
|
|
60
|
+
* The data update will not be applied until next `setData` or `applyDataUpdates` call.
|
|
61
|
+
* When called inside observers, the data update will be applied when observer ends.
|
|
62
|
+
* All data observers will not be triggered immediately before applied.
|
|
63
|
+
* Reads of the data will get the unchanged value before applied.
|
|
64
|
+
*/
|
|
65
|
+
updateData(newData: Partial<typeUtils.SetDataSetter<typeUtils.DataWithPropertyValues<TData, TProperty>>>): void;
|
|
66
|
+
/**
|
|
67
|
+
* Schedule a data update on a single specified path
|
|
68
|
+
*
|
|
69
|
+
* The data update will not be applied until next `setData` or `applyDataUpdates` call.
|
|
70
|
+
* All data observers will not be triggered immediately before applied.
|
|
71
|
+
* Reads of the data will get the unchanged value before applied.
|
|
72
|
+
*/
|
|
73
|
+
replaceDataOnPath<T extends (string | number)[]>(path: readonly [...T], data: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T>): void;
|
|
74
|
+
/**
|
|
75
|
+
* Schedule an array update
|
|
76
|
+
*
|
|
77
|
+
* The behavior is like `Array.prototype.slice` .
|
|
78
|
+
* Break the array before the `index`-th item, delete `del` items, and insert some items here.
|
|
79
|
+
* If `index` is undefined, negative, or larger than the length of the array,
|
|
80
|
+
* no items will be deleted and new items will be appended to the end of the array.
|
|
81
|
+
* The data update will not be applied until next `setData` or `applyDataUpdates` call.
|
|
82
|
+
* All data observers will not be triggered immediately before applied.
|
|
83
|
+
* Reads of the data will get the unchanged value before applied.
|
|
84
|
+
*/
|
|
85
|
+
spliceArrayDataOnPath<T extends (string | number)[]>(path: readonly [...T], index: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T> extends any[] ? number | undefined : never, del: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T> extends any[] ? number | undefined : never, inserts: typeUtils.GetFromDataPath<typeUtils.DataWithPropertyValues<TData, TProperty>, T> extends (infer I)[] ? I[] : never): void;
|
|
86
|
+
/**
|
|
87
|
+
* Apply all scheduled updates immediately
|
|
88
|
+
*
|
|
89
|
+
* Inside observers, it is generally not .
|
|
90
|
+
*/
|
|
91
|
+
applyDataUpdates(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Pending all data updates in the callback, and apply updates after callback returns
|
|
94
|
+
*
|
|
95
|
+
* This function helps grouping several `replaceDataOnPath` or `spliceArrayDataOnPath` calls,
|
|
96
|
+
* and then apply them at the end of the callback.
|
|
97
|
+
* `setData` and `applyDataUpdates` calls inside the callback still apply updates immediately.
|
|
98
|
+
*/
|
|
99
|
+
groupUpdates<T>(callback: () => T): T;
|
|
100
|
+
/**
|
|
101
|
+
* Check whether the `other` behavior is a dependent behavior or a implemented trait behavior
|
|
102
|
+
*/
|
|
103
|
+
hasBehavior(behavior: GeneralBehavior | TraitBehavior<any, any>): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Get the trait behavior implementation of the component
|
|
106
|
+
*
|
|
107
|
+
* Returns `undefined` if the specified trait behavior is not implemented.
|
|
108
|
+
*/
|
|
109
|
+
traitBehavior<TOut extends {
|
|
110
|
+
[key: string]: any;
|
|
111
|
+
}>(traitBehavior: TraitBehavior<any, TOut>): TOut | undefined;
|
|
112
|
+
/** Trigger an event */
|
|
113
|
+
triggerEvent(name: string, detail: any, options: {
|
|
114
|
+
bubbles?: boolean;
|
|
115
|
+
composed?: boolean;
|
|
116
|
+
capturePhase?: boolean;
|
|
117
|
+
}): void;
|
|
118
|
+
/** Create a selector query for searching element inside the component */
|
|
119
|
+
createSelectorQuery(): SelectorQuery;
|
|
120
|
+
/**
|
|
121
|
+
* Query an element inside the component
|
|
122
|
+
*
|
|
123
|
+
* If `componentType` is provided, this method will check the selected component type.
|
|
124
|
+
* If the component type does not match, `null` is returned.
|
|
125
|
+
*/
|
|
126
|
+
selectComponent(selector: string): any;
|
|
127
|
+
selectComponent<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(selector: string, componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): ExportType<UData, UProperty, UMethod, UComponentExport> | null;
|
|
128
|
+
/**
|
|
129
|
+
* Query all elements inside the component
|
|
130
|
+
*
|
|
131
|
+
* If `componentType` is provided, this method will check the selected component type.
|
|
132
|
+
* If a component type does not match, it is not returned.
|
|
133
|
+
*/
|
|
134
|
+
selectAllComponents(selector: string): GeneralComponent[];
|
|
135
|
+
selectAllComponents<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(selector: string, componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): ExportType<UData, UProperty, UMethod, UComponentExport>[];
|
|
136
|
+
/**
|
|
137
|
+
* Get the owner component
|
|
138
|
+
*
|
|
139
|
+
* If `componentType` is provided, this method will check the selected component type.
|
|
140
|
+
* If a component type does not match, `null` is returned.
|
|
141
|
+
*/
|
|
142
|
+
selectOwnerComponent(): any;
|
|
143
|
+
selectOwnerComponent<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): ExportType<UData, UProperty, UMethod, UComponentExport> | null;
|
|
144
|
+
getRelationNodes(relationKey: string): GeneralComponent[];
|
|
145
|
+
/** Cast the component into a general-typed one */
|
|
146
|
+
general(): GeneralComponent;
|
|
147
|
+
/**
|
|
148
|
+
* Cast the component into the specified type
|
|
149
|
+
*
|
|
150
|
+
* Returns `null` if the component node is not the instance of the specified component.
|
|
151
|
+
*/
|
|
152
|
+
asInstanceOf<UData extends DataList, UProperty extends PropertyList, UMethod extends MethodList, UComponentExport>(componentType: ComponentType<UData, UProperty, UMethod, UComponentExport>): Component<UData, UProperty, UMethod, UComponentExport> | null;
|
|
153
|
+
}
|
|
154
|
+
export declare class ComponentProto<TData extends DataList, TProperty extends PropertyList, TMethod extends MethodList, TComponentExport> {
|
|
155
|
+
private proto;
|
|
156
|
+
constructor(methods: TMethod, componentExport?: () => TComponentExport);
|
|
157
|
+
derive(): Component<TData, TProperty, TMethod, TComponentExport>;
|
|
158
|
+
}
|
|
159
|
+
export {};
|
|
160
|
+
//# sourceMappingURL=component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAA;AACzC,OAAO,EACL,KAAK,IAAI,SAAS,EACnB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAEhD,KAAK,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;AAClC,KAAK,YAAY,GAAG,SAAS,CAAC,YAAY,CAAA;AAC1C,KAAK,UAAU,GAAG,SAAS,CAAC,UAAU,CAAA;AACtC,MAAM,MAAM,OAAO,CACjB,KAAK,SAAS,QAAQ,EACtB,SAAS,SAAS,YAAY,IAC5B,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AAEtD,KAAK,UAAU,CACb,KAAK,SAAS,QAAQ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