render-core 1.3.60 → 1.3.62
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/class/component/component.js +3 -2
- package/class/{controller → component}/componentController.d.ts +1 -1
- package/class/controller/appController.d.ts +1 -2
- package/class/controller/pageController.d.ts +1 -1
- package/core/cmd/data/v-el.d.ts +2 -2
- package/core/cmd/data/v-el.js +2 -2
- package/core/cmd/data/v-html.d.ts +1 -1
- package/core/cmd/data/v-txt.d.ts +1 -1
- package/core/cmd/solt/v-solt.d.ts +1 -1
- package/core/inject/inject.d.ts +1 -1
- package/core/lifecycle/afterMethods.d.ts +1 -1
- package/core/lifecycle/controllerCycle.d.ts +1 -1
- package/core/lifecycle/mount.d.ts +1 -1
- package/core/proxy/getProxy.d.ts +1 -1
- package/core/render/PostRender.d.ts +1 -1
- package/core/render/PostRender.js +1 -1
- package/core/render/delivery.d.ts +1 -1
- package/core/render/initRender.d.ts +1 -1
- package/core/render/initRender.js +1 -1
- package/core/render/rawRender.d.ts +1 -1
- package/core/render/rawRender.js +1 -1
- package/core/render/updateRender.d.ts +1 -1
- package/core/resolver/props.d.ts +3 -2
- package/core/resolver/props.js +2 -1
- package/core/utility/cmdUtility.d.ts +1 -1
- package/core/utility/cmdUtility.js +2 -2
- package/core/utility/injectUtility.d.ts +1 -1
- package/core/utility/inputType.d.ts +1 -1
- package/core/utility/sectionUtility.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +16 -16
- package/runtime/runtime.js +3 -1
- package/runtime/tools.d.ts +2 -2
- package/runtime/tools.js +5 -5
- package/class/tips/appTip.d.ts +0 -2
- package/class/tips/appTip.js +0 -1
- /package/class/{controller → component}/componentController.js +0 -0
|
@@ -19,9 +19,10 @@ var Component = /** @class */ (function () {
|
|
|
19
19
|
this.boxStyle = "";
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
this.boxStyle = config.boxStyle;
|
|
22
|
+
this.boxStyle = config.boxStyle.replace(/^{/, "");
|
|
23
|
+
this.boxStyle = this.boxStyle.replace(/}$/, "");
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
//props validate
|
|
25
26
|
if (typeof config.props === "undefined") {
|
|
26
27
|
this.props = [];
|
|
27
28
|
}
|
package/core/cmd/data/v-el.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentController } from "../../../class/
|
|
1
|
+
import { ComponentController } from "../../../class/component/componentController";
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param node
|
|
5
5
|
* @param data
|
|
6
6
|
* @param controller
|
|
7
7
|
*/
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function resolver_expression(node: ParentNode, data: {}, controller: ComponentController): void;
|
package/core/cmd/data/v-el.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param data
|
|
5
5
|
* @param controller
|
|
6
6
|
*/
|
|
7
|
-
export function
|
|
7
|
+
export function resolver_expression(node, data, controller) {
|
|
8
8
|
if (node.hasChildNodes()) {
|
|
9
9
|
for (var j = 0; j < node.childNodes.length; j++) {
|
|
10
10
|
if (node.childNodes[j].nodeType === 3) {
|
|
@@ -21,7 +21,7 @@ export function resolver_experssion(node, data, controller) {
|
|
|
21
21
|
}
|
|
22
22
|
else if (node.childNodes[j].nodeType === 1) {
|
|
23
23
|
// @ts-ignore
|
|
24
|
-
|
|
24
|
+
resolver_expression(node.childNodes[j], data, controller);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
package/core/cmd/data/v-txt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../../class/
|
|
1
|
+
import { ComponentController } from "../../../class/component/componentController";
|
|
2
2
|
import { PageController } from "../../../class/controller/pageController";
|
|
3
3
|
/**
|
|
4
4
|
* 此函数用于解析自定义元素solt
|
package/core/inject/inject.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { Component } from "../../class/component/component";
|
|
3
3
|
import { PageController } from "../../class/controller/pageController";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { Component } from "../../class/component/component";
|
|
3
3
|
/**
|
|
4
4
|
* This function is used to mount the dom to the html document.
|
package/core/proxy/getProxy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from "../../class/component/component";
|
|
2
|
-
import { ComponentController } from "../../class/
|
|
2
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
3
3
|
import { PageController } from "../../class/controller/pageController";
|
|
4
4
|
/**
|
|
5
5
|
* 该函数用于初次渲染需要记录状态的组件
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
3
|
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
4
|
import { mount, unBox } from "../lifecycle/mount";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { Component } from "../../class/component/component";
|
|
3
3
|
import { PageController } from "../../class/controller/pageController";
|
|
4
4
|
export declare function Render(proto: Component, parent: ParentNode, child: Element, link: ComponentController | PageController): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from "../../class/component/component";
|
|
2
|
-
import { ComponentController } from "../../class/
|
|
2
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
3
3
|
import { PageController } from "../../class/controller/pageController";
|
|
4
4
|
/**
|
|
5
5
|
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { controllerCycleTypeOne } from "../lifecycle/controllerCycle";
|
|
3
3
|
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
4
|
import { mount, unBox } from "../lifecycle/mount";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from "../../class/component/component";
|
|
2
|
-
import { ComponentController } from "../../class/
|
|
2
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
3
3
|
import { PageController } from "../../class/controller/pageController";
|
|
4
4
|
/**
|
|
5
5
|
* 该函数用于渲染不需要记录状态的组件
|
package/core/render/rawRender.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { controllerCycleTypeTwo } from "../lifecycle/controllerCycle";
|
|
3
3
|
import { afterCmd, cmdUtility } from "../utility/cmdUtility";
|
|
4
4
|
import { mount, unBox } from "../lifecycle/mount";
|
package/core/resolver/props.d.ts
CHANGED
|
@@ -8,11 +8,12 @@ export declare function resolveProps(node: Element, properties: {} | []): any;
|
|
|
8
8
|
*
|
|
9
9
|
* @param node
|
|
10
10
|
* @param array
|
|
11
|
+
*
|
|
11
12
|
*/
|
|
12
|
-
export declare function getAllPropsByArray(node: Element, array: Array<string>):
|
|
13
|
+
export declare function getAllPropsByArray(node: Element, array: Array<string>): Map<string, string>;
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @param node
|
|
16
17
|
* @param object
|
|
17
18
|
*/
|
|
18
|
-
export declare function getAllPropsByObject(node: Element, object: {}): any
|
|
19
|
+
export declare function getAllPropsByObject(node: Element, object: {}): Map<string, any>;
|
package/core/resolver/props.js
CHANGED
|
@@ -15,6 +15,7 @@ export function resolveProps(node, properties) {
|
|
|
15
15
|
*
|
|
16
16
|
* @param node
|
|
17
17
|
* @param array
|
|
18
|
+
*
|
|
18
19
|
*/
|
|
19
20
|
export function getAllPropsByArray(node, array) {
|
|
20
21
|
var props = new Map();
|
|
@@ -34,7 +35,7 @@ export function getAllPropsByObject(node, object) {
|
|
|
34
35
|
var props = new Map();
|
|
35
36
|
for (var objectKey in object) {
|
|
36
37
|
if (node.getAttribute(objectKey)) {
|
|
37
|
-
switch (
|
|
38
|
+
switch (object[objectKey].toLowerCase()) {
|
|
38
39
|
case "int":
|
|
39
40
|
props.set(objectKey, parseInt(node.getAttribute(objectKey)));
|
|
40
41
|
break;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from "../../class/component/component";
|
|
2
|
-
import { ComponentController } from "../../class/
|
|
2
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
3
3
|
/**
|
|
4
4
|
* This function is used to resolver those commands which should be executed before mount.
|
|
5
5
|
* @param tagTemplate
|
|
@@ -10,7 +10,7 @@ import { resolver_if } from "../cmd/justify/v-if";
|
|
|
10
10
|
import { resolver_switch } from "../cmd/justify/v-switch";
|
|
11
11
|
import { resolver_for_of } from "../cmd/loop/v-for";
|
|
12
12
|
import { extract_solt } from "../cmd/solt/v-solt";
|
|
13
|
-
import {
|
|
13
|
+
import { resolver_expression } from "../cmd/data/v-el";
|
|
14
14
|
import { resolver_for_map } from "../cmd/loop/v-map";
|
|
15
15
|
/**
|
|
16
16
|
* This function is used to resolver those commands which should be executed before mount.
|
|
@@ -54,5 +54,5 @@ export function afterCmd(templateSpace, proto, controller) {
|
|
|
54
54
|
//v-for-of
|
|
55
55
|
resolver_for_of(templateSpace.children, controller.proxyForMethods);
|
|
56
56
|
//v-el
|
|
57
|
-
|
|
57
|
+
resolver_expression(controller.root, controller.proxyForMethods, controller);
|
|
58
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
import { PageController } from "../../class/controller/pageController";
|
|
3
3
|
export declare function getCodeSpaceForProps(data: {}, $props: Map<string, object>): void;
|
|
4
4
|
export declare function getCodeSpaceForQuery(data: {}, $query: Map<string, any>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentController } from "../../class/
|
|
1
|
+
import { ComponentController } from "../../class/component/componentController";
|
|
2
2
|
export declare function textType(target: any, doc: any, controller: ComponentController): void;
|
|
3
3
|
export declare function assignType(target: any, doc: any, controller: ComponentController): void;
|
|
4
4
|
export declare function fileType(target: any, doc: any, controller: ComponentController): void;
|
package/index.js
CHANGED
|
@@ -46,9 +46,9 @@ var RenderJS = /** @class */ (function () {
|
|
|
46
46
|
//挂载对象
|
|
47
47
|
this.mount();
|
|
48
48
|
//注册函数
|
|
49
|
-
registerElements("changeStyle", changeStyle);
|
|
49
|
+
this.registerElements("changeStyle", changeStyle);
|
|
50
50
|
//注册函数
|
|
51
|
-
registerElements("changeTheme", changeTheme);
|
|
51
|
+
this.registerElements("changeTheme", changeTheme);
|
|
52
52
|
//plugin
|
|
53
53
|
this.use(function (render) {
|
|
54
54
|
sessionStorage.setItem("theme_style", "default");
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "render-core",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "The extendable javascript web framework",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com//render-js/render-core.git"
|
|
10
|
-
},
|
|
11
|
-
"author": {
|
|
12
|
-
"name": "mutian",
|
|
13
|
-
"email": "mutian-xiangcai@outlook.com"
|
|
14
|
-
},
|
|
15
|
-
"license": "MIT"
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "render-core",
|
|
3
|
+
"version": "1.3.62",
|
|
4
|
+
"description": "The extendable javascript web framework",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com//render-js/render-core.git"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "mutian",
|
|
13
|
+
"email": "mutian-xiangcai@outlook.com"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT"
|
|
16
|
+
}
|
package/runtime/runtime.js
CHANGED
|
@@ -9,12 +9,14 @@ export function renderHtml(collection, link) {
|
|
|
9
9
|
//遍历element节点,判断是否为自定义标签
|
|
10
10
|
for (var i = 0; i < collection.length; i++) {
|
|
11
11
|
if (isUnKnown(collection[i].nodeName.toUpperCase())) {
|
|
12
|
+
//从tag库中获取该组件的定义
|
|
12
13
|
var component = Reflect.get(window, "tagLib").get(collection[i].nodeName.toUpperCase());
|
|
13
14
|
if (component === undefined) {
|
|
15
|
+
//没有找到定义,向控制台输出警告
|
|
14
16
|
console.error(collection[i].nodeName.toUpperCase() + " can't be found in renderJs, you should firstly register in renderJs");
|
|
15
17
|
}
|
|
16
18
|
else {
|
|
17
|
-
|
|
19
|
+
//找到,渲染自定义标签
|
|
18
20
|
Render(component, collection[i].parentNode, collection[i], link);
|
|
19
21
|
}
|
|
20
22
|
}
|
package/runtime/tools.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ import { RenderJS } from "../index";
|
|
|
9
9
|
export declare function registerTagLib(application: RenderJS, component: Component | Component[]): void;
|
|
10
10
|
/**
|
|
11
11
|
* The entrance of render
|
|
12
|
-
* @param
|
|
12
|
+
* @param renderJs
|
|
13
13
|
*/
|
|
14
|
-
export declare function render(
|
|
14
|
+
export declare function render(renderJs: RenderJS): void;
|
package/runtime/tools.js
CHANGED
|
@@ -31,13 +31,13 @@ export function registerTagLib(application, component) {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* The entrance of render
|
|
34
|
-
* @param
|
|
34
|
+
* @param renderJs
|
|
35
35
|
*/
|
|
36
|
-
export function render(
|
|
36
|
+
export function render(renderJs) {
|
|
37
37
|
//获取styleLib对象
|
|
38
|
-
|
|
39
|
-
themeStyle(component,
|
|
38
|
+
renderJs.tagLib.forEach(function (component) {
|
|
39
|
+
themeStyle(component, renderJs.styleLib);
|
|
40
40
|
});
|
|
41
41
|
//开始渲染
|
|
42
|
-
renderHtml(document.body.children,
|
|
42
|
+
renderHtml(document.body.children, renderJs.page);
|
|
43
43
|
}
|
package/class/tips/appTip.d.ts
DELETED
package/class/tips/appTip.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|