render-core 1.4.0 → 1.4.2

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.
Files changed (225) hide show
  1. package/index.d.ts +48 -34
  2. package/index.js +70 -55
  3. package/kernel/delivery/delivery.d.ts +5 -0
  4. package/kernel/delivery/delivery.js +52 -0
  5. package/kernel/directive/data/v-el.d.ts +8 -0
  6. package/{core/cmd → kernel/directive}/data/v-el.js +2 -2
  7. package/kernel/directive/data/v-html.d.ts +8 -0
  8. package/{core/cmd → kernel/directive}/data/v-html.js +2 -2
  9. package/kernel/directive/data/v-txt.d.ts +8 -0
  10. package/{core/cmd → kernel/directive}/data/v-txt.js +2 -2
  11. package/kernel/directive/justify/v-if.d.ts +6 -0
  12. package/{core/cmd → kernel/directive}/justify/v-if.js +2 -2
  13. package/kernel/directive/justify/v-render.d.ts +6 -0
  14. package/{core/cmd → kernel/directive}/justify/v-render.js +2 -2
  15. package/kernel/directive/justify/v-show.d.ts +6 -0
  16. package/{core/cmd → kernel/directive}/justify/v-show.js +2 -2
  17. package/kernel/directive/justify/v-switch.d.ts +6 -0
  18. package/{core/cmd → kernel/directive}/justify/v-switch.js +2 -2
  19. package/{core/cmd → kernel/directive}/loop/v-for-utility.d.ts +1 -1
  20. package/{core/cmd → kernel/directive}/loop/v-for-utility.js +3 -3
  21. package/{core/cmd → kernel/directive}/loop/v-for.d.ts +1 -1
  22. package/{core/cmd → kernel/directive}/loop/v-for.js +2 -2
  23. package/{core/cmd → kernel/directive}/loop/v-map-utility.d.ts +1 -1
  24. package/{core/cmd → kernel/directive}/loop/v-map-utility.js +3 -3
  25. package/kernel/directive/loop/v-map.d.ts +6 -0
  26. package/{core/cmd → kernel/directive}/loop/v-map.js +2 -2
  27. package/kernel/directive/method/v-on.d.ts +8 -0
  28. package/{core/cmd → kernel/directive}/method/v-on.js +2 -2
  29. package/kernel/directive/property/v-bind.d.ts +6 -0
  30. package/{core/cmd → kernel/directive}/property/v-bind.js +3 -3
  31. package/kernel/directive/react/v-model.d.ts +6 -0
  32. package/{core/cmd → kernel/directive}/react/v-model.js +3 -3
  33. package/kernel/directive/ref/v-ref.d.ts +6 -0
  34. package/{core/cmd → kernel/directive}/ref/v-ref.js +2 -2
  35. package/kernel/directive/salt/v-solt.d.ts +13 -0
  36. package/{core/cmd/solt → kernel/directive/salt}/v-solt.js +8 -8
  37. package/kernel/proxyer/getProxy.d.ts +9 -0
  38. package/kernel/proxyer/getProxy.js +35 -0
  39. package/kernel/renderer/initRender.d.ts +10 -0
  40. package/kernel/renderer/initRender.js +69 -0
  41. package/kernel/renderer/postRender.d.ts +10 -0
  42. package/kernel/renderer/postRender.js +70 -0
  43. package/kernel/renderer/rawRender.d.ts +10 -0
  44. package/kernel/renderer/rawRender.js +70 -0
  45. package/kernel/renderer/updateRender.d.ts +6 -0
  46. package/kernel/renderer/updateRender.js +33 -0
  47. package/package.json +1 -4
  48. package/{controller → system/define}/ContextController.d.ts +8 -7
  49. package/system/define/ContextController.js +23 -0
  50. package/{generic → system/generic}/ControllerGeneric.d.ts +4 -5
  51. package/system/generic/RenderGeneric.d.ts +4 -0
  52. package/system/injection/inject.d.ts +24 -0
  53. package/system/injection/inject.js +54 -0
  54. package/system/injection/injection.d.ts +21 -0
  55. package/system/lifecycle/lifeCycle.d.ts +14 -0
  56. package/system/lifecycle/lifeCycle.js +21 -0
  57. package/system/lifecycle/mount.d.ts +17 -0
  58. package/{core → system}/lifecycle/mount.js +10 -11
  59. package/system/output/error.d.ts +0 -0
  60. package/system/output/error.js +4 -0
  61. package/system/recorder/table0/system_func_0.d.ts +47 -0
  62. package/system/recorder/table0/system_func_0.js +71 -0
  63. package/system/recorder/table0/system_t_0.d.ts +9 -0
  64. package/system/recorder/table0/system_t_0.js +7 -0
  65. package/system/recorder/table1/system_func_1.d.ts +2 -0
  66. package/system/recorder/table1/system_func_1.js +7 -0
  67. package/system/recorder/table1/system_t_1.d.ts +4 -0
  68. package/system/recorder/table1/system_t_1.js +3 -0
  69. package/system/recorder/table2/system_t_2.d.ts +2 -0
  70. package/{library/taglib/metaTagLib.js → system/recorder/table2/system_t_2.js} +14 -15
  71. package/system/resolver/props.d.ts +18 -0
  72. package/system/resolver/props.js +64 -0
  73. package/system/router/router.d.ts +3 -0
  74. package/system/router/router.js +20 -0
  75. package/system/utility/checkUtility.js +4 -0
  76. package/system/utility/cmdUtility.d.ts +15 -0
  77. package/system/utility/cmdUtility.js +43 -0
  78. package/{core → system}/utility/injectUtility.d.ts +0 -3
  79. package/{core → system}/utility/injectUtility.js +0 -10
  80. package/system/utility/inputType.d.ts +5 -0
  81. package/system/utility/miscUtility.d.ts +6 -0
  82. package/{core → system}/utility/miscUtility.js +2 -2
  83. package/system/utility/sectionUtility.d.ts +6 -0
  84. package/{core → system}/utility/styleUtility.d.ts +2 -2
  85. package/{core → system}/utility/styleUtility.js +17 -14
  86. package/{core → system}/utility/templateUtility.d.ts +1 -1
  87. package/tension/DefaultRouterPlugin.d.ts +17 -0
  88. package/tension/DefaultRouterPlugin.js +11 -0
  89. package/tension/generic/ComponentGeneric.d.ts +13 -0
  90. package/{core/exexutor/executor.d.ts → tension/generic/HooksGeneric.d.ts} +3 -4
  91. package/tension/generic/OriginalDataGeneric.d.ts +18 -0
  92. package/tension/generic/PluginGeneric.d.ts +5 -0
  93. package/tension/generic/PrefaceGeneric.d.ts +6 -0
  94. package/tension/generic/RouterGeneric.d.ts +5 -0
  95. package/tension/generic/RouterGeneric.js +1 -0
  96. package/tension/prototype/AbstractComponent.d.ts +43 -0
  97. package/tension/prototype/AbstractComponent.js +113 -0
  98. package/tension/prototype/AbstractRouter.d.ts +6 -0
  99. package/tension/prototype/AbstractRouter.js +12 -0
  100. package/tension/prototype/HooksAction.d.ts +7 -0
  101. package/tension/prototype/HooksAction.js +24 -0
  102. package/tension/prototype/PrefaceAction.d.ts +7 -0
  103. package/tension/prototype/PrefaceAction.js +14 -0
  104. package/tension/prototype/RouterAction.d.ts +16 -0
  105. package/tension/prototype/RouterAction.js +13 -0
  106. package/xboot/Entrance.d.ts +7 -0
  107. package/xboot/Entrance.js +43 -0
  108. package/xboot/RenderProcessor.d.ts +7 -0
  109. package/{runtime/renderProcessor.js → xboot/RenderProcessor.js} +7 -9
  110. package/xboot/TagProcessor.d.ts +7 -0
  111. package/{runtime/tag → xboot}/TagProcessor.js +6 -6
  112. package/controller/ComponentController.d.ts +0 -29
  113. package/controller/ComponentController.js +0 -30
  114. package/controller/ContextController.js +0 -36
  115. package/core/cmd/data/v-el.d.ts +0 -9
  116. package/core/cmd/data/v-html.d.ts +0 -9
  117. package/core/cmd/data/v-txt.d.ts +0 -9
  118. package/core/cmd/justify/v-if.d.ts +0 -6
  119. package/core/cmd/justify/v-render.d.ts +0 -6
  120. package/core/cmd/justify/v-show.d.ts +0 -6
  121. package/core/cmd/justify/v-switch.d.ts +0 -6
  122. package/core/cmd/loop/v-map.d.ts +0 -6
  123. package/core/cmd/method/v-on.d.ts +0 -8
  124. package/core/cmd/property/v-bind.d.ts +0 -6
  125. package/core/cmd/react/v-change.d.ts +0 -6
  126. package/core/cmd/react/v-change.js +0 -22
  127. package/core/cmd/react/v-model.d.ts +0 -6
  128. package/core/cmd/ref/v-ref.d.ts +0 -6
  129. package/core/cmd/solt/v-solt.d.ts +0 -14
  130. package/core/exexutor/executor.js +0 -24
  131. package/core/inject/inject.d.ts +0 -31
  132. package/core/inject/inject.js +0 -66
  133. package/core/inject/injection.d.ts +0 -22
  134. package/core/lifecycle/afterMethods.d.ts +0 -16
  135. package/core/lifecycle/afterMethods.js +0 -22
  136. package/core/lifecycle/controllerCycle.d.ts +0 -22
  137. package/core/lifecycle/controllerCycle.js +0 -66
  138. package/core/lifecycle/mount.d.ts +0 -17
  139. package/core/proxy/getProxy.d.ts +0 -11
  140. package/core/proxy/getProxy.js +0 -26
  141. package/core/proxy/proxy.d.ts +0 -9
  142. package/core/proxy/proxy.js +0 -26
  143. package/core/render/PostRender.d.ts +0 -12
  144. package/core/render/PostRender.js +0 -42
  145. package/core/render/delivery.d.ts +0 -5
  146. package/core/render/delivery.js +0 -42
  147. package/core/render/initRender.d.ts +0 -12
  148. package/core/render/initRender.js +0 -39
  149. package/core/render/rawRender.d.ts +0 -12
  150. package/core/render/rawRender.js +0 -43
  151. package/core/render/updateRender.d.ts +0 -6
  152. package/core/render/updateRender.js +0 -29
  153. package/core/resolver/props.d.ts +0 -19
  154. package/core/resolver/props.js +0 -62
  155. package/core/utility/checkUtility.js +0 -4
  156. package/core/utility/cmdUtility.d.ts +0 -17
  157. package/core/utility/cmdUtility.js +0 -58
  158. package/core/utility/inputType.d.ts +0 -5
  159. package/core/utility/miscUtility.d.ts +0 -6
  160. package/core/utility/sectionUtility.d.ts +0 -6
  161. package/generic/ApplicationGeneric.d.ts +0 -4
  162. package/generic/ConfigGeneric.d.ts +0 -3
  163. package/generic/RenderGeneric.d.ts +0 -5
  164. package/generic/StyleGeneric.d.ts +0 -4
  165. package/generic/originalDataGeneric.d.ts +0 -4
  166. package/http/generic/HttpGeneric.d.ts +0 -4
  167. package/library/props/PropertyLib.d.ts +0 -6
  168. package/library/props/PropertyLib.js +0 -5
  169. package/library/taglib/metaTagLib.d.ts +0 -2
  170. package/proto/controller/AppController.d.ts +0 -16
  171. package/proto/controller/AppController.js +0 -25
  172. package/proto/controller/ComponentController.d.ts +0 -18
  173. package/proto/controller/ComponentController.js +0 -24
  174. package/proto/controller/PageController.d.ts +0 -23
  175. package/proto/controller/PageController.js +0 -40
  176. package/runtime/config/RenderConfig.d.ts +0 -12
  177. package/runtime/config/RenderConfig.js +0 -11
  178. package/runtime/config/config.d.ts +0 -4
  179. package/runtime/config/config.js +0 -4
  180. package/runtime/config.d.ts +0 -3
  181. package/runtime/config.js +0 -3
  182. package/runtime/delivery.d.ts +0 -5
  183. package/runtime/delivery.js +0 -43
  184. package/runtime/entrance.d.ts +0 -7
  185. package/runtime/entrance.js +0 -33
  186. package/runtime/render/PostRender.d.ts +0 -15
  187. package/runtime/render/PostRender.js +0 -49
  188. package/runtime/render/delivery.d.ts +0 -5
  189. package/runtime/render/delivery.js +0 -42
  190. package/runtime/render/initRender.d.ts +0 -15
  191. package/runtime/render/initRender.js +0 -46
  192. package/runtime/render/rawRender.d.ts +0 -15
  193. package/runtime/render/rawRender.js +0 -50
  194. package/runtime/renderProcessor.d.ts +0 -11
  195. package/runtime/tag/TagProcessor.d.ts +0 -9
  196. package/runtime/tagProcessor.d.ts +0 -9
  197. package/runtime/tagProcessor.js +0 -27
  198. package/runtime/update/updateRender.d.ts +0 -10
  199. package/runtime/update/updateRender.js +0 -38
  200. /package/{generic → system/generic}/ControllerGeneric.js +0 -0
  201. /package/{generic → system/generic}/RenderGeneric.js +0 -0
  202. /package/{http → system/http}/Http.d.ts +0 -0
  203. /package/{http → system/http}/Http.js +0 -0
  204. /package/{core/inject → system/injection}/injection.js +0 -0
  205. /package/{core → system}/loader/loader.d.ts +0 -0
  206. /package/{core → system}/loader/loader.js +0 -0
  207. /package/{core → system}/resolver/query.d.ts +0 -0
  208. /package/{core → system}/resolver/query.js +0 -0
  209. /package/{core → system}/utility/checkUtility.d.ts +0 -0
  210. /package/{core → system}/utility/dataUtility.d.ts +0 -0
  211. /package/{core → system}/utility/dataUtility.js +0 -0
  212. /package/{core → system}/utility/errorUtility.d.ts +0 -0
  213. /package/{core → system}/utility/errorUtility.js +0 -0
  214. /package/{core → system}/utility/inputType.js +0 -0
  215. /package/{core → system}/utility/inputUtility.d.ts +0 -0
  216. /package/{core → system}/utility/inputUtility.js +0 -0
  217. /package/{core → system}/utility/modelUtility.d.ts +0 -0
  218. /package/{core → system}/utility/modelUtility.js +0 -0
  219. /package/{core → system}/utility/sectionUtility.js +0 -0
  220. /package/{core → system}/utility/templateUtility.js +0 -0
  221. /package/{generic/ApplicationGeneric.js → tension/generic/ComponentGeneric.js} +0 -0
  222. /package/{generic/ConfigGeneric.js → tension/generic/HooksGeneric.js} +0 -0
  223. /package/{generic/StyleGeneric.js → tension/generic/OriginalDataGeneric.js} +0 -0
  224. /package/{generic/originalDataGeneric.js → tension/generic/PluginGeneric.js} +0 -0
  225. /package/{http/generic/HttpGeneric.js → tension/generic/PrefaceGeneric.js} +0 -0
@@ -1,42 +0,0 @@
1
- import { isUnKnown } from "../utility/checkUtility";
2
- import { init_render } from "./initRender";
3
- import { post_render } from "./PostRender";
4
- import { raw_render } from "./rawRender";
5
- import { getTemplate } from "../utility/templateUtility";
6
- import { styleResolve } from "../utility/styleUtility";
7
- //渲染自定义标签
8
- export function delivery(proto, parent, child, link) {
9
- //获得模板元素
10
- var tagTemplate = getTemplate(proto);
11
- //注册当前解析元素
12
- Reflect.get(window, "context").crtTag = child;
13
- //解析样式
14
- styleResolve(proto.getName());
15
- //两种渲染方式
16
- if (child.hasAttribute("name")) {
17
- //需要保持状态的渲染
18
- if (link.lazyComponent.has(child.getAttribute("name"))) {
19
- //该name元素存在旧数据,是更新渲染
20
- init_render(proto, parent, child, link, tagTemplate);
21
- }
22
- else {
23
- //该name元素不存在旧数据,是第一次渲染
24
- post_render(proto, parent, child, link, tagTemplate);
25
- }
26
- }
27
- else {
28
- //不需要保持状态的渲染
29
- raw_render(proto, parent, child, link, tagTemplate);
30
- }
31
- }
32
- //拓展标签深度渲染
33
- export function findComponent(collection, link) {
34
- for (var i = 0; i < collection.length; i++) {
35
- if (isUnKnown(collection[i].nodeName)) {
36
- delivery(Reflect.get(window, "tagLib").get(collection[i].nodeName.toUpperCase()), collection[i].parentNode, collection[i], link);
37
- }
38
- else {
39
- findComponent(collection[i].children, link);
40
- }
41
- }
42
- }
@@ -1,12 +0,0 @@
1
- import { ComponentController } from "../../proto/controller/ComponentController";
2
- import { PageController } from "../../proto/controller/PageController";
3
- import { Component } from "render-refer";
4
- /**
5
- * 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
6
- * @param proto
7
- * @param parent
8
- * @param child
9
- * @param link
10
- * @param tagTemplate
11
- */
12
- export declare function init_render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
@@ -1,39 +0,0 @@
1
- import { ComponentController } from "../../proto/controller/ComponentController";
2
- import { controllerCycleTypeOne } from "../lifecycle/controllerCycle";
3
- import { afterCmd, cmdUtility } from "../utility/cmdUtility";
4
- import { mount, unBox } from "../lifecycle/mount";
5
- import { injectRefs } from "../inject/inject";
6
- import { afterMethodsTypeOne } from "../lifecycle/afterMethods";
7
- import { findComponent } from "./delivery";
8
- import { resolver_solt } from "../cmd/solt/v-solt";
9
- /**
10
- * 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
11
- * @param proto
12
- * @param parent
13
- * @param child
14
- * @param link
15
- * @param tagTemplate
16
- */
17
- export function init_render(proto, parent, child, link, tagTemplate) {
18
- //获取控制对象
19
- var controller = new ComponentController();
20
- //解析solt
21
- resolver_solt(child, controller);
22
- //控制对象预处理
23
- controllerCycleTypeOne(controller, proto, child, link, tagTemplate);
24
- //内存中模板处理
25
- cmdUtility(tagTemplate, proto, controller);
26
- //mount
27
- mount(controller, proto, parent, child, tagTemplate);
28
- //获取
29
- injectRefs(controller);
30
- //渲染后数据处理
31
- afterCmd(controller.componentAttachedRootElement, proto, controller);
32
- //后处理
33
- afterMethodsTypeOne(controller, child, link);
34
- //深度渲染
35
- findComponent(tagTemplate.children, controller);
36
- if (proto.getConfig()["mode"] === false) {
37
- unBox(controller.componentAttachedRootElement);
38
- }
39
- }
@@ -1,12 +0,0 @@
1
- import { ComponentController } from "../../proto/controller/ComponentController";
2
- import { PageController } from "../../proto/controller/PageController";
3
- import { Component } from "render-refer";
4
- /**
5
- * 该函数用于渲染不需要记录状态的组件
6
- * @param proto
7
- * @param parent
8
- * @param child
9
- * @param link
10
- * @param tagTemplate
11
- */
12
- export declare function raw_render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController, tagTemplate: Element): void;
@@ -1,43 +0,0 @@
1
- import { ComponentController } from "../../proto/controller/ComponentController";
2
- import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
3
- import { afterCmd, cmdUtility } from "../utility/cmdUtility";
4
- import { mount, unBox } from "../lifecycle/mount";
5
- import { injectRefs } from "../inject/inject";
6
- import { afterMethodsTypeTwo } from "../lifecycle/afterMethods";
7
- import { findComponent } from "./delivery";
8
- import { resolver_solt } from "../cmd/solt/v-solt";
9
- /**
10
- * 该函数用于渲染不需要记录状态的组件
11
- * @param proto
12
- * @param parent
13
- * @param child
14
- * @param link
15
- * @param tagTemplate
16
- */
17
- export function raw_render(proto, parent, child, link, tagTemplate) {
18
- //获取控制对象
19
- var controller = new ComponentController();
20
- //解析salt
21
- resolver_solt(child, controller);
22
- //控制对象预处理
23
- controllerCycleTypeTwo(controller, proto, child, link, tagTemplate);
24
- //beforeRender,可以获取数据而不触发更新
25
- proto.getBeforeRender().call(controller.originalData);
26
- //解析指令(模板处理)
27
- cmdUtility(tagTemplate, proto, controller);
28
- //mount
29
- mount(controller, proto, parent, child, tagTemplate);
30
- //获取注入引用资源
31
- injectRefs(controller);
32
- //渲染后处理
33
- afterCmd(controller.componentAttachedRootElement, proto, controller);
34
- //后处理(数据渲染)
35
- afterMethodsTypeTwo(controller, child, link);
36
- //afterRender,可以操作渲染后的dom
37
- proto.getAfterRender().call(controller.dataForMethod);
38
- //深度渲染
39
- findComponent(controller.componentAttachedRootElement.children, controller);
40
- if (proto.getConfig()["mode"] === false) {
41
- unBox(controller.componentAttachedRootElement);
42
- }
43
- }
@@ -1,6 +0,0 @@
1
- import { ComponentController } from "../../proto/controller/ComponentController";
2
- /**
3
- * 更新渲染方法
4
- * @param controller
5
- */
6
- export declare function update_Render(controller: ComponentController): void;
@@ -1,29 +0,0 @@
1
- import { afterCmd, cmdUtility, } from "../utility/cmdUtility";
2
- import { injectRefs } from "../inject/inject";
3
- import { findComponent } from "./delivery";
4
- import { getTemplate } from "../utility/templateUtility";
5
- /**
6
- * 更新渲染方法
7
- * @param controller
8
- */
9
- export function update_Render(controller) {
10
- //生成DOM
11
- var tagTemplate = getTemplate(controller.prototypeOfComponent);
12
- //清除保存的发布对象
13
- controller.slaveComponent = [];
14
- //解析指令
15
- cmdUtility(tagTemplate, controller.prototypeOfComponent, controller);
16
- //unmount
17
- while (controller.componentAttachedRootElement.hasChildNodes()) {
18
- controller.componentAttachedRootElement.removeChild(controller.componentAttachedRootElement.firstChild);
19
- }
20
- //mount
21
- while (tagTemplate.hasChildNodes()) {
22
- controller.componentAttachedRootElement.appendChild(tagTemplate.firstChild);
23
- }
24
- injectRefs(controller);
25
- //渲染后处理
26
- afterCmd(controller.componentAttachedRootElement, controller.prototypeOfComponent, controller);
27
- //深度渲染
28
- findComponent(controller.componentAttachedRootElement.children, controller);
29
- }
@@ -1,19 +0,0 @@
1
- /**
2
- * This function is used to resolve tag customed properties.
3
- * @param node
4
- * @param properties
5
- */
6
- export declare function resolveProps(node: Element, properties: {} | []): any;
7
- /**
8
- *
9
- * @param node
10
- * @param array
11
- *
12
- */
13
- export declare function getAllPropsByArray(node: Element, array: Array<string>): Map<string, string>;
14
- /**
15
- *
16
- * @param node
17
- * @param object
18
- */
19
- export declare function getAllPropsByObject(node: Element, object: {}): Map<string, any>;
@@ -1,62 +0,0 @@
1
- import { Property } from "../../index";
2
- /**
3
- * This function is used to resolve tag customed properties.
4
- * @param node
5
- * @param properties
6
- */
7
- export function resolveProps(node, properties) {
8
- if (properties instanceof Array) {
9
- return getAllPropsByArray(node, properties);
10
- }
11
- if (properties instanceof Object) {
12
- return getAllPropsByObject(node, properties);
13
- }
14
- }
15
- /**
16
- *
17
- * @param node
18
- * @param array
19
- *
20
- */
21
- export function getAllPropsByArray(node, array) {
22
- var props = new Map();
23
- array.forEach(function (value) {
24
- if (node.getAttribute(value)) {
25
- props.set(value, node.getAttribute(value));
26
- }
27
- });
28
- return props;
29
- }
30
- /**
31
- *
32
- * @param node
33
- * @param object
34
- */
35
- export function getAllPropsByObject(node, object) {
36
- var props = new Map();
37
- for (var objectKey in object) {
38
- if (node.getAttribute(objectKey)) {
39
- switch (object[objectKey]) {
40
- case Property.INT:
41
- props.set(objectKey, parseInt(node.getAttribute(objectKey)));
42
- break;
43
- case Property.FLOAT:
44
- props.set(objectKey, parseFloat(node.getAttribute(objectKey)));
45
- break;
46
- case Property.BOOLEAN:
47
- props.set(objectKey, parseFloat(node.getAttribute(objectKey)));
48
- break;
49
- case Property.STRING:
50
- props.set(objectKey, node.getAttribute(objectKey));
51
- break;
52
- case Property.JSON:
53
- props.set(objectKey, JSON.parse(node.getAttribute(objectKey)));
54
- break;
55
- default:
56
- props.set(objectKey, node.getAttribute(objectKey));
57
- break;
58
- }
59
- }
60
- }
61
- return props;
62
- }
@@ -1,4 +0,0 @@
1
- import metaTagLib from "../../library/taglib/MetaTagLib";
2
- export function isUnKnown(element) {
3
- return !metaTagLib.some(function (ele) { return ele == element; });
4
- }
@@ -1,17 +0,0 @@
1
- import { ComponentController } from "../../controller/ComponentController";
2
- import { Component } from "render-refer";
3
- import { ContextController } from "../../controller/ContextController";
4
- /**
5
- * This function is used to resolver those commands which should be executed before mount.
6
- * @param tagTemplate
7
- * @param proto
8
- * @param controller
9
- */
10
- export declare function cmdUtility(tagTemplate: Element, proto: Component, controller: ComponentController | ContextController): void;
11
- /**
12
- * This function is used to resolver those commands which should be executed after mount.
13
- * @param templateSpace
14
- * @param proto
15
- * @param controller
16
- */
17
- export declare function afterCmd(templateSpace: ParentNode, proto: Component, controller: ComponentController | ContextController): void;
@@ -1,58 +0,0 @@
1
- import { addLabel } from "./miscUtility";
2
- import { resolver_event } from "../cmd/method/v-on";
3
- import { resolver_html } from "../cmd/data/v-html";
4
- import { resolver_txt } from "../cmd/data/v-txt";
5
- import { resolver_model } from "../cmd/react/v-model";
6
- import { resolver_bind } from "../cmd/property/v-bind";
7
- import { resolver_show } from "../cmd/justify/v-show";
8
- import { resolver_render } from "../cmd/justify/v-render";
9
- import { resolver_if } from "../cmd/justify/v-if";
10
- import { resolver_switch } from "../cmd/justify/v-switch";
11
- import { resolver_for_of } from "../cmd/loop/v-for";
12
- import { extract_salt } from "../cmd/solt/v-solt";
13
- import { resolver_expression } from "../cmd/data/v-el";
14
- import { resolver_for_map } from "../cmd/loop/v-map";
15
- /**
16
- * This function is used to resolver those commands which should be executed before mount.
17
- * @param tagTemplate
18
- * @param proto
19
- * @param controller
20
- */
21
- export function cmdUtility(tagTemplate, proto, controller) {
22
- //给所有元素添加上npm=tag标志
23
- addLabel(tagTemplate.children, proto.getName());
24
- //将元素事件绑定到元素上
25
- resolver_event(tagTemplate.children, proto.getMethods(), controller.dataForMethod, controller.originalData);
26
- //渲染html
27
- resolver_html(tagTemplate.children, controller.dataForMethod, controller);
28
- //渲染text
29
- resolver_txt(tagTemplate.children, controller.dataForMethod, controller);
30
- //绑定数据
31
- resolver_model(tagTemplate.children, controller.dataForMethod);
32
- //渲染属性
33
- resolver_bind(tagTemplate.children, controller.dataForMethod);
34
- //salt
35
- extract_salt(tagTemplate.children, controller);
36
- }
37
- /**
38
- * This function is used to resolver those commands which should be executed after mount.
39
- * @param templateSpace
40
- * @param proto
41
- * @param controller
42
- */
43
- export function afterCmd(templateSpace, proto, controller) {
44
- //v-show
45
- resolver_show(templateSpace.children, controller.dataForMethod);
46
- //v-render
47
- resolver_render(templateSpace.children, controller.dataForMethod);
48
- //v-if
49
- resolver_if(templateSpace.children, controller.dataForMethod);
50
- //v-switch
51
- resolver_switch(templateSpace.children, controller.dataForMethod);
52
- //v-for-each
53
- resolver_for_map(templateSpace.children, controller.dataForMethod);
54
- //v-for-of
55
- resolver_for_of(templateSpace.children, controller.dataForMethod);
56
- //v-el
57
- resolver_expression(controller.componentAttachedRootElement, controller.dataForMethod, controller);
58
- }
@@ -1,5 +0,0 @@
1
- import { ComponentController } from "../../controller/ComponentController";
2
- export declare function textType(target: any, doc: any, controller: ComponentController): void;
3
- export declare function assignType(target: any, controller: ComponentController): void;
4
- export declare function fileType(target: any, controller: ComponentController): void;
5
- export declare function checkType(target: any): void;
@@ -1,6 +0,0 @@
1
- /**
2
- * 给组件元素添加cpn标签
3
- * @param nodes
4
- * @param component
5
- */
6
- export declare function addLabel(nodes: HTMLCollection, component: string): void;
@@ -1,6 +0,0 @@
1
- import { ComponentController } from "../../controller/ComponentController";
2
- /**
3
- *
4
- * @param controller
5
- */
6
- export declare function locateInputAddress(controller: ComponentController): void;
@@ -1,4 +0,0 @@
1
- export interface ApplicationGeneric {
2
- getVersion(): string;
3
- getDescription(): string;
4
- }
@@ -1,3 +0,0 @@
1
- export interface ConfigGeneric {
2
- setDeepProxy(value: boolean): void;
3
- }
@@ -1,5 +0,0 @@
1
- import { AbstractPlugin } from "render-refer";
2
- export interface RenderGeneric {
3
- use(plugin: AbstractPlugin): void;
4
- run(root: string): void;
5
- }
@@ -1,4 +0,0 @@
1
- export interface StyleGeneric {
2
- changeStyle(tag: string, theme: string): void;
3
- changeTheme(theme: string): void;
4
- }
@@ -1,4 +0,0 @@
1
- export interface OriginalDataGeneric {
2
- $name?: string;
3
- $commit?: (method: string, ...args: [any]) => void;
4
- }
@@ -1,4 +0,0 @@
1
- export interface HttpGeneric {
2
- relocate(position: string): void;
3
- redirect(url: string, parameters: {}): void;
4
- }
@@ -1,6 +0,0 @@
1
- declare const _default: {
2
- STRING: string;
3
- NUMBER: string;
4
- BOOLEAN: string;
5
- };
6
- export default _default;
@@ -1,5 +0,0 @@
1
- export default {
2
- STRING: 'string',
3
- NUMBER: 'number',
4
- BOOLEAN: 'boolean',
5
- };
@@ -1,2 +0,0 @@
1
- declare let metaTagLib: string[];
2
- export default metaTagLib;
@@ -1,16 +0,0 @@
1
- /**
2
- * This proto is associated with localStorage.
3
- */
4
- export declare class AppController {
5
- /**
6
- * 资源定向
7
- * @param url
8
- * @param parameters
9
- */
10
- redirect(url: string, parameters: {}): void;
11
- /**
12
- * 位置定位
13
- * @param position
14
- */
15
- locate(position: string): void;
16
- }
@@ -1,25 +0,0 @@
1
- import { relocate, redirect } from "../../http/Http";
2
- /**
3
- * This proto is associated with localStorage.
4
- */
5
- var AppController = /** @class */ (function () {
6
- function AppController() {
7
- }
8
- /**
9
- * 资源定向
10
- * @param url
11
- * @param parameters
12
- */
13
- AppController.prototype.redirect = function (url, parameters) {
14
- redirect(url, parameters);
15
- };
16
- /**
17
- * 位置定位
18
- * @param position
19
- */
20
- AppController.prototype.locate = function (position) {
21
- relocate(position);
22
- };
23
- return AppController;
24
- }());
25
- export { AppController };
@@ -1,18 +0,0 @@
1
- import { Component } from "render-refer";
2
- export declare class ComponentController {
3
- componentAttachedRootElement: ParentNode;
4
- prototypeOfComponent: Component;
5
- originalData: {};
6
- dataForMethod: {};
7
- dataForComputed: {};
8
- componentConfig: {
9
- boxMode: boolean;
10
- };
11
- salt: Map<string, any>;
12
- lazyComponent: Map<string, {}>;
13
- slaveComponent: ComponentController[];
14
- computed: {};
15
- watcher: {};
16
- constructor();
17
- receiver(method: string, ...args: any[]): any;
18
- }
@@ -1,24 +0,0 @@
1
- var ComponentController = /** @class */ (function () {
2
- //构造函数
3
- function ComponentController() {
4
- this.lazyComponent = new Map();
5
- this.slaveComponent = Array();
6
- this.originalData = {};
7
- this.salt = new Map();
8
- this.computed = {};
9
- this.watcher = {};
10
- this.componentConfig = {
11
- boxMode: true
12
- };
13
- }
14
- //接收器
15
- ComponentController.prototype.receiver = function (method) {
16
- var args = [];
17
- for (var _i = 1; _i < arguments.length; _i++) {
18
- args[_i - 1] = arguments[_i];
19
- }
20
- return this.prototypeOfComponent.getMethods()[method].apply(this.dataForMethod, args);
21
- };
22
- return ComponentController;
23
- }());
24
- export { ComponentController };
@@ -1,23 +0,0 @@
1
- import { ComponentController } from "./ComponentController";
2
- export declare class PageController {
3
- private methods;
4
- private currentTag;
5
- salt: Map<string, any>;
6
- originalData: {};
7
- dataForMethod: {};
8
- slaveComponent: ComponentController[];
9
- lazyComponent: Map<string, {}>;
10
- constructor();
11
- /**
12
- *
13
- * @param method
14
- * @param args
15
- */
16
- receiver(method: string, ...args: any[]): void;
17
- /**
18
- *
19
- * @param element
20
- */
21
- set crtTag(element: Element);
22
- get crtTag(): Element;
23
- }
@@ -1,40 +0,0 @@
1
- var PageController = /** @class */ (function () {
2
- //构造函数
3
- function PageController() {
4
- //注入系统方法
5
- this.methods = Reflect.get(window, "pageMethods");
6
- this.lazyComponent = new Map();
7
- this.slaveComponent = Array();
8
- this.crtTag = null;
9
- this.salt = new Map();
10
- }
11
- /**
12
- *
13
- * @param method
14
- * @param args
15
- */
16
- PageController.prototype.receiver = function (method) {
17
- var args = [];
18
- for (var _i = 1; _i < arguments.length; _i++) {
19
- args[_i - 1] = arguments[_i];
20
- }
21
- Reflect.get(window, method).call(window, args);
22
- };
23
- Object.defineProperty(PageController.prototype, "crtTag", {
24
- //返回当前页面的渲染元素
25
- get: function () {
26
- return this.currentTag;
27
- },
28
- /**
29
- *
30
- * @param element
31
- */
32
- set: function (element) {
33
- this.currentTag = element;
34
- },
35
- enumerable: false,
36
- configurable: true
37
- });
38
- return PageController;
39
- }());
40
- export { PageController };
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- deepProxy: boolean;
3
- defaultTheme: string;
4
- context: any;
5
- render: any;
6
- tagLib: any;
7
- styleLib: any;
8
- rjsLib: any;
9
- pluginsLib: any;
10
- crt: any;
11
- };
12
- export default _default;
@@ -1,11 +0,0 @@
1
- export default {
2
- deepProxy: true,
3
- defaultTheme: "default",
4
- context: null,
5
- render: null,
6
- tagLib: null,
7
- styleLib: null,
8
- rjsLib: null,
9
- pluginsLib: null,
10
- crt: null
11
- };
@@ -1,4 +0,0 @@
1
- export declare var RenderConfig: {
2
- deepReact: boolean;
3
- defaultTheme: string;
4
- };
@@ -1,4 +0,0 @@
1
- export var RenderConfig = {
2
- deepReact: true,
3
- defaultTheme: "default"
4
- };
@@ -1,3 +0,0 @@
1
- export declare var RenderConfig: {
2
- deepReact: boolean;
3
- };
package/runtime/config.js DELETED
@@ -1,3 +0,0 @@
1
- export var RenderConfig = {
2
- deepReact: true
3
- };
@@ -1,5 +0,0 @@
1
- import { ComponentController } from "../controller/ComponentController";
2
- import { ContextController } from "../controller/ContextController";
3
- import { Component } from "../../render-refer/dist";
4
- export declare function delivery(protoTypeComponent: Component, componentAttachedRootElement: ParentNode, child: Element, parentController: ComponentController | ContextController, tagLib: Map<string, Component>, styleLib: Map<string, Map<string, string>>, rjsLib: Map<string, any>): void;
5
- export declare function findComponent(collection: HTMLCollection, parentController: ComponentController | ContextController, tagLib: Map<string, Component>, styleLib: Map<string, Map<string, string>>, rjsLib: Map<string, any>): void;