render-core 1.3.38 → 1.3.40
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.d.ts +41 -41
- package/class/component/component.js +108 -108
- package/class/controller/appController.d.ts +17 -44
- package/class/controller/appController.js +25 -132
- package/class/controller/componentController.d.ts +15 -15
- package/class/controller/componentController.js +22 -22
- package/class/controller/pageController.d.ts +23 -23
- package/class/controller/pageController.js +40 -40
- package/class/tips/appTip.d.ts +2 -2
- package/class/tips/appTip.js +1 -1
- package/class/tips/componentTip.d.ts +13 -13
- package/class/tips/componentTip.js +1 -1
- package/class/tips/renderTip.d.ts +3 -5
- package/class/tips/renderTip.js +1 -1
- package/core/cmd/data/v-el.d.ts +8 -8
- package/core/cmd/data/v-el.js +28 -28
- package/core/cmd/data/v-html.d.ts +8 -8
- package/core/cmd/data/v-html.js +26 -26
- package/core/cmd/data/v-txt.d.ts +8 -8
- package/core/cmd/data/v-txt.js +29 -29
- package/core/cmd/justify/v-if.d.ts +6 -6
- package/core/cmd/justify/v-if.js +43 -43
- package/core/cmd/justify/v-render.d.ts +6 -6
- package/core/cmd/justify/v-render.js +26 -26
- package/core/cmd/justify/v-show.d.ts +6 -6
- package/core/cmd/justify/v-show.js +26 -26
- package/core/cmd/justify/v-switch.d.ts +6 -6
- package/core/cmd/justify/v-switch.js +35 -35
- package/core/cmd/loop/v-for.d.ts +12 -12
- package/core/cmd/loop/v-for.js +63 -63
- package/core/cmd/loop/v-index.d.ts +14 -14
- package/core/cmd/loop/v-index.js +80 -79
- package/core/cmd/loop/v-key.d.ts +12 -12
- package/core/cmd/loop/v-key.js +70 -70
- package/core/cmd/method/v-on.d.ts +8 -8
- package/core/cmd/method/v-on.js +40 -40
- package/core/cmd/property/v-bind.d.ts +6 -6
- package/core/cmd/property/v-bind.js +33 -33
- package/core/cmd/react/v-model.d.ts +6 -6
- package/core/cmd/react/v-model.js +22 -22
- package/core/cmd/ref/v-ref.d.ts +6 -6
- package/core/cmd/ref/v-ref.js +16 -16
- package/core/cmd/solt/v-solt.d.ts +14 -14
- package/core/cmd/solt/v-solt.js +46 -46
- package/core/inject/inject.d.ts +30 -35
- package/core/inject/inject.js +63 -70
- package/core/lifecycle/afterMethods.d.ts +16 -16
- package/core/lifecycle/afterMethods.js +22 -22
- package/core/lifecycle/controllerCycle.d.ts +13 -13
- package/core/lifecycle/controllerCycle.js +42 -42
- package/core/lifecycle/mount.d.ts +16 -17
- package/core/lifecycle/mount.js +31 -34
- package/core/loader/loader.d.ts +7 -7
- package/core/loader/loader.js +18 -18
- package/core/proxy/getProxy.d.ts +13 -13
- package/core/proxy/getProxy.js +42 -42
- package/core/render/PostRender.d.ts +12 -12
- package/core/render/PostRender.js +42 -45
- package/core/render/delivery.d.ts +5 -5
- package/core/render/delivery.js +42 -42
- package/core/render/initRender.d.ts +12 -12
- package/core/render/initRender.js +39 -41
- package/core/render/partRender.d.ts +15 -15
- package/core/render/partRender.js +31 -31
- package/core/render/rawRender.d.ts +12 -12
- package/core/render/rawRender.js +43 -45
- package/core/render/updateRender.d.ts +6 -6
- package/core/render/updateRender.js +29 -32
- package/core/resolver/props.d.ts +18 -18
- package/core/resolver/props.js +60 -60
- package/core/resolver/query.d.ts +4 -4
- package/core/resolver/query.js +15 -15
- package/core/utility/checkUtility.d.ts +1 -1
- package/core/utility/checkUtility.js +4 -4
- package/core/utility/cmdUtility.d.ts +16 -16
- package/core/utility/cmdUtility.js +57 -57
- package/core/utility/dataUtility.d.ts +1 -1
- package/core/utility/dataUtility.js +8 -8
- package/core/utility/errorUtility.d.ts +3 -3
- package/core/utility/errorUtility.js +9 -9
- package/core/utility/injectUtility.d.ts +13 -13
- package/core/utility/injectUtility.js +58 -58
- package/core/utility/inputType.d.ts +5 -5
- package/core/utility/inputType.js +20 -20
- package/core/utility/inputUtility.d.ts +4 -4
- package/core/utility/inputUtility.js +100 -100
- package/core/utility/miscUtility.d.ts +6 -6
- package/core/utility/miscUtility.js +12 -12
- package/core/utility/modelUtility.d.ts +15 -15
- package/core/utility/modelUtility.js +66 -66
- package/core/utility/sectionUtility.d.ts +6 -6
- package/core/utility/sectionUtility.js +104 -104
- package/core/utility/styleUtility.d.ts +17 -29
- package/core/utility/styleUtility.js +67 -114
- package/core/utility/templateUtility.d.ts +6 -6
- package/core/utility/templateUtility.js +13 -13
- package/core/utility/vForUtility.d.ts +15 -15
- package/core/utility/vForUtility.js +20 -20
- package/http/redirect/redirect.d.ts +11 -11
- package/http/redirect/redirect.js +36 -36
- package/index.d.ts +44 -71
- package/index.js +70 -130
- package/package.json +3 -8
- package/runtime/metaTagLib.d.ts +2 -2
- package/runtime/metaTagLib.js +27 -27
- package/runtime/runtime.d.ts +7 -7
- package/runtime/runtime.js +26 -26
- package/runtime/tools.d.ts +14 -14
- package/runtime/tools.js +43 -49
- package/README.md +0 -2
- package/class/controller/contextController.d.ts +0 -18
- package/class/controller/contextController.js +0 -79
- package/func/Theme.d.ts +0 -16
- package/func/Theme.js +0 -27
- package/status/read/read.d.ts +0 -10
- package/status/read/read.js +0 -26
- package/status/write/write.d.ts +0 -12
- package/status/write/write.js +0 -92
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { part_render_array, part_render_map } from "../render/partRender";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param baseRoot
|
|
5
|
-
* @param temp
|
|
6
|
-
* @param index
|
|
7
|
-
* @param data
|
|
8
|
-
*/
|
|
9
|
-
export function extractForArray(baseRoot, temp, index, data) {
|
|
10
|
-
part_render_array(baseRoot, temp, index, data);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param baseRoot
|
|
15
|
-
* @param temp
|
|
16
|
-
* @param data
|
|
17
|
-
*/
|
|
18
|
-
export function extractForMap(baseRoot, temp, data) {
|
|
19
|
-
part_render_map(baseRoot, temp, data);
|
|
20
|
-
}
|
|
1
|
+
import { part_render_array, part_render_map } from "../render/partRender";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param baseRoot
|
|
5
|
+
* @param temp
|
|
6
|
+
* @param index
|
|
7
|
+
* @param data
|
|
8
|
+
*/
|
|
9
|
+
export function extractForArray(baseRoot, temp, index, data) {
|
|
10
|
+
part_render_array(baseRoot, temp, index, data);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param baseRoot
|
|
15
|
+
* @param temp
|
|
16
|
+
* @param data
|
|
17
|
+
*/
|
|
18
|
+
export function extractForMap(baseRoot, temp, data) {
|
|
19
|
+
part_render_map(baseRoot, temp, data);
|
|
20
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 资源定向
|
|
3
|
-
* @param url
|
|
4
|
-
* @param parameters
|
|
5
|
-
*/
|
|
6
|
-
export declare function redirect(url: string, parameters: {}): void;
|
|
7
|
-
/**
|
|
8
|
-
* locate the position
|
|
9
|
-
* @param position
|
|
10
|
-
*/
|
|
11
|
-
export declare function locate(position: string): void;
|
|
1
|
+
/**
|
|
2
|
+
* 资源定向
|
|
3
|
+
* @param url
|
|
4
|
+
* @param parameters
|
|
5
|
+
*/
|
|
6
|
+
export declare function redirect(url: string, parameters: {}): void;
|
|
7
|
+
/**
|
|
8
|
+
* locate the position
|
|
9
|
+
* @param position
|
|
10
|
+
*/
|
|
11
|
+
export declare function locate(position: string): void;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 资源定向
|
|
3
|
-
* @param url
|
|
4
|
-
* @param parameters
|
|
5
|
-
*/
|
|
6
|
-
export function redirect(url, parameters) {
|
|
7
|
-
if (parameters !== null) {
|
|
8
|
-
var params = Object.getOwnPropertyNames(parameters);
|
|
9
|
-
if (params.length !== 0) {
|
|
10
|
-
var queries_1 = "";
|
|
11
|
-
params.forEach(function (value) {
|
|
12
|
-
if (queries_1 === "") {
|
|
13
|
-
queries_1 = queries_1 + value + "=" + parameters[value].toString();
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
queries_1 = queries_1 + "&" + value + "=" + parameters[value].toString();
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
queries_1 = encodeURI(queries_1);
|
|
20
|
-
location.href = url + "?" + queries_1;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
location.href = url;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
location.href = url;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* locate the position
|
|
32
|
-
* @param position
|
|
33
|
-
*/
|
|
34
|
-
export function locate(position) {
|
|
35
|
-
location.hash = position;
|
|
36
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 资源定向
|
|
3
|
+
* @param url
|
|
4
|
+
* @param parameters
|
|
5
|
+
*/
|
|
6
|
+
export function redirect(url, parameters) {
|
|
7
|
+
if (parameters !== null) {
|
|
8
|
+
var params = Object.getOwnPropertyNames(parameters);
|
|
9
|
+
if (params.length !== 0) {
|
|
10
|
+
var queries_1 = "";
|
|
11
|
+
params.forEach(function (value) {
|
|
12
|
+
if (queries_1 === "") {
|
|
13
|
+
queries_1 = queries_1 + value + "=" + parameters[value].toString();
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
queries_1 = queries_1 + "&" + value + "=" + parameters[value].toString();
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
queries_1 = encodeURI(queries_1);
|
|
20
|
+
location.href = url + "?" + queries_1;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
location.href = url;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
location.href = url;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* locate the position
|
|
32
|
+
* @param position
|
|
33
|
+
*/
|
|
34
|
+
export function locate(position) {
|
|
35
|
+
location.hash = position;
|
|
36
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,71 +1,44 @@
|
|
|
1
|
-
import { Component } from "./class/component/component";
|
|
2
|
-
import { PageController } from "./class/controller/pageController";
|
|
3
|
-
import { RenderTip } from "./class/tips/renderTip";
|
|
4
|
-
/**
|
|
5
|
-
* This class is the application class.
|
|
6
|
-
*/
|
|
7
|
-
export declare class RenderJS implements RenderTip {
|
|
8
|
-
readonly config: {};
|
|
9
|
-
readonly tagLib: Map<string, Component>;
|
|
10
|
-
readonly styleLib: Map<string, Map<string, string>>;
|
|
11
|
-
private readonly application;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
* @param name
|
|
46
|
-
* @param func
|
|
47
|
-
*/
|
|
48
|
-
registerElements(name: string, func: any): void;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* The tool to register element to window
|
|
52
|
-
* @param name
|
|
53
|
-
* @param func
|
|
54
|
-
*/
|
|
55
|
-
export declare function registerElements(name: string, func: any): void;
|
|
56
|
-
/**
|
|
57
|
-
* This is the read api of status.
|
|
58
|
-
* @param config
|
|
59
|
-
*/
|
|
60
|
-
export declare function status_read(config: {
|
|
61
|
-
type: string;
|
|
62
|
-
fields: string[];
|
|
63
|
-
}): any;
|
|
64
|
-
/**
|
|
65
|
-
* This is the write api of status.
|
|
66
|
-
* @param config
|
|
67
|
-
*/
|
|
68
|
-
export declare function status_write(config: {
|
|
69
|
-
type: string;
|
|
70
|
-
fields: {};
|
|
71
|
-
}): void;
|
|
1
|
+
import { Component } from "./class/component/component";
|
|
2
|
+
import { PageController } from "./class/controller/pageController";
|
|
3
|
+
import { RenderTip } from "./class/tips/renderTip";
|
|
4
|
+
/**
|
|
5
|
+
* This class is the application class.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RenderJS implements RenderTip {
|
|
8
|
+
readonly config: {};
|
|
9
|
+
readonly tagLib: Map<string, Component>;
|
|
10
|
+
readonly styleLib: Map<string, Map<string, string>>;
|
|
11
|
+
private readonly application;
|
|
12
|
+
page: PageController;
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param callable
|
|
17
|
+
*/
|
|
18
|
+
use(callable: any): void;
|
|
19
|
+
/**
|
|
20
|
+
* You can use the method to register your single component or an array of components.
|
|
21
|
+
* @param component
|
|
22
|
+
*/
|
|
23
|
+
addTag(component: Component | Component[]): void;
|
|
24
|
+
/**
|
|
25
|
+
* mount some base object
|
|
26
|
+
*/
|
|
27
|
+
private mount;
|
|
28
|
+
/**
|
|
29
|
+
* This method is the booster method of the render.
|
|
30
|
+
*/
|
|
31
|
+
run(): void;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param name
|
|
35
|
+
* @param func
|
|
36
|
+
*/
|
|
37
|
+
registerElements(name: string, func: any): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The tool to register element to window
|
|
41
|
+
* @param name
|
|
42
|
+
* @param func
|
|
43
|
+
*/
|
|
44
|
+
export declare function registerElements(name: string, func: any): void;
|
package/index.js
CHANGED
|
@@ -1,130 +1,70 @@
|
|
|
1
|
-
import { PageController } from "./class/controller/pageController";
|
|
2
|
-
import { registerTagLib, render } from "./runtime/tools";
|
|
3
|
-
import { AppController } from "./class/controller/appController";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
this
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
RenderJS
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//挂载对象
|
|
72
|
-
this.mount();
|
|
73
|
-
//execute
|
|
74
|
-
render(this);
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
* @param name
|
|
79
|
-
* @param func
|
|
80
|
-
*/
|
|
81
|
-
RenderJS.prototype.registerElements = function (name, func) {
|
|
82
|
-
Reflect.set(window, name, func);
|
|
83
|
-
};
|
|
84
|
-
return RenderJS;
|
|
85
|
-
}());
|
|
86
|
-
export { RenderJS };
|
|
87
|
-
/**
|
|
88
|
-
* The tool to register element to window
|
|
89
|
-
* @param name
|
|
90
|
-
* @param func
|
|
91
|
-
*/
|
|
92
|
-
export function registerElements(name, func) {
|
|
93
|
-
Reflect.set(window, name, func);
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* This is the read api of status.
|
|
97
|
-
* @param config
|
|
98
|
-
*/
|
|
99
|
-
export function status_read(config) {
|
|
100
|
-
var fields = config.fields;
|
|
101
|
-
var message = {};
|
|
102
|
-
if (config.type == "session") {
|
|
103
|
-
fields.forEach(function (value) {
|
|
104
|
-
message[value] = sessionStorageEngin_read(value);
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
fields.forEach(function (value) {
|
|
109
|
-
message[value] = localStorageEngine_read(value);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return message;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* This is the write api of status.
|
|
116
|
-
* @param config
|
|
117
|
-
*/
|
|
118
|
-
export function status_write(config) {
|
|
119
|
-
var fields = Object.getOwnPropertyNames(config.fields);
|
|
120
|
-
if (config.type == "session") {
|
|
121
|
-
fields.forEach(function (value) {
|
|
122
|
-
sessionStorageEngin_write(value, config.fields);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
fields.forEach(function (value) {
|
|
127
|
-
localStorageEngine_write(value, config.fields);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
1
|
+
import { PageController } from "./class/controller/pageController";
|
|
2
|
+
import { registerTagLib, render } from "./runtime/tools";
|
|
3
|
+
import { AppController } from "./class/controller/appController";
|
|
4
|
+
/**
|
|
5
|
+
* This class is the application class.
|
|
6
|
+
*/
|
|
7
|
+
var RenderJS = /** @class */ (function () {
|
|
8
|
+
function RenderJS() {
|
|
9
|
+
//initiate the tagLib object
|
|
10
|
+
this.tagLib = new Map();
|
|
11
|
+
//initiate the styleLib object
|
|
12
|
+
this.styleLib = new Map();
|
|
13
|
+
//initiate the application controller
|
|
14
|
+
this.application = new AppController();
|
|
15
|
+
//initiate the page controller
|
|
16
|
+
this.page = new PageController();
|
|
17
|
+
//initiate the config object
|
|
18
|
+
this.config = {};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @param callable
|
|
23
|
+
*/
|
|
24
|
+
RenderJS.prototype.use = function (callable) {
|
|
25
|
+
callable(this);
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* You can use the method to register your single component or an array of components.
|
|
29
|
+
* @param component
|
|
30
|
+
*/
|
|
31
|
+
RenderJS.prototype.addTag = function (component) {
|
|
32
|
+
registerTagLib(this, component);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* mount some base object
|
|
36
|
+
*/
|
|
37
|
+
RenderJS.prototype.mount = function () {
|
|
38
|
+
Reflect.set(window, "tagLib", this.tagLib);
|
|
39
|
+
Reflect.set(window, "styleLib", this.styleLib);
|
|
40
|
+
Reflect.set(window, "appSite", this.application);
|
|
41
|
+
Reflect.set(window, "page", this.page);
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* This method is the booster method of the render.
|
|
45
|
+
*/
|
|
46
|
+
RenderJS.prototype.run = function () {
|
|
47
|
+
//挂载对象
|
|
48
|
+
this.mount();
|
|
49
|
+
//execute
|
|
50
|
+
render(this);
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @param name
|
|
55
|
+
* @param func
|
|
56
|
+
*/
|
|
57
|
+
RenderJS.prototype.registerElements = function (name, func) {
|
|
58
|
+
Reflect.set(window, name, func);
|
|
59
|
+
};
|
|
60
|
+
return RenderJS;
|
|
61
|
+
}());
|
|
62
|
+
export { RenderJS };
|
|
63
|
+
/**
|
|
64
|
+
* The tool to register element to window
|
|
65
|
+
* @param name
|
|
66
|
+
* @param func
|
|
67
|
+
*/
|
|
68
|
+
export function registerElements(name, func) {
|
|
69
|
+
Reflect.set(window, name, func);
|
|
70
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "render-core",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "The
|
|
5
|
-
"keywords": [
|
|
6
|
-
"render",
|
|
7
|
-
"render-core",
|
|
8
|
-
"renderjs"
|
|
9
|
-
],
|
|
3
|
+
"version": "1.3.40",
|
|
4
|
+
"description": "The extendable javascript web framework",
|
|
10
5
|
"main": "index.js",
|
|
11
6
|
"types": "index.d.ts",
|
|
12
7
|
"repository": {
|
|
13
8
|
"type": "git",
|
|
14
|
-
"url": "https://github.com
|
|
9
|
+
"url": "https://github.com//render-js/render-core.git"
|
|
15
10
|
},
|
|
16
11
|
"author": {
|
|
17
12
|
"name": "mutian",
|
package/runtime/metaTagLib.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare let metaTagLib: string[];
|
|
2
|
-
export default metaTagLib;
|
|
1
|
+
declare let metaTagLib: string[];
|
|
2
|
+
export default metaTagLib;
|
package/runtime/metaTagLib.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var metaTagLib = [];
|
|
2
|
-
var tableTag = ["FORM", "INPUT", "TEXTAREA", "BUTTON", "SELECT", "OPTGROUP", "OPTION", "LABEL", "FIELDSET", "LEGEND", "DATALIST", "KEYGEN", "OUTPUT"];
|
|
3
|
-
metaTagLib = metaTagLib.concat(tableTag);
|
|
4
|
-
var frameTag = ["FRAME", "FRAMESET", "NOFRAMES", "IFRAME"];
|
|
5
|
-
metaTagLib = metaTagLib.concat(frameTag);
|
|
6
|
-
var imgTag = ["IMG", "MAP", "AREA", "CANVAS", "FIGCAPTION", "FIGURE", "AUDIO", "VIDEO", "SOURCE", "TRACK"];
|
|
7
|
-
metaTagLib = metaTagLib.concat(imgTag);
|
|
8
|
-
var linkTag = ["A", "LINK", "MAIN", "NAV"];
|
|
9
|
-
metaTagLib = metaTagLib.concat(linkTag);
|
|
10
|
-
var listTag = ["UL", "OL", "LI", "DIR", "DL", "DT", "DD", "MENU", "COMMAND"];
|
|
11
|
-
metaTagLib = metaTagLib.concat(listTag);
|
|
12
|
-
var titleTag = ["H1", "H2", "H3", "H4", "H5", "H6"];
|
|
13
|
-
metaTagLib = metaTagLib.concat(titleTag);
|
|
14
|
-
var tbTag = ["TABLE", "CAPTION", "TH", "TR", "TD", "THEAD", "TBODY", "TFOOT", "COL", "COLGROUP"];
|
|
15
|
-
metaTagLib = metaTagLib.concat(tbTag);
|
|
16
|
-
var styleTag = ["STYLE", "DIV", "SPAN", "HEADER", "FOOTER", "SECTION", "ARTICLE", "ASIDE", "DETAILS", "DIALOG", "SUMMARY"];
|
|
17
|
-
metaTagLib = metaTagLib.concat(styleTag);
|
|
18
|
-
var metaTag = ["HEAD", "META", "BASE", "BASEFONT"];
|
|
19
|
-
metaTagLib = metaTagLib.concat(metaTag);
|
|
20
|
-
var programTag = ["SCRIPT", "NOSCRIPT", "APPLET", "EMBED", "OBJECT", "PARAM"];
|
|
21
|
-
metaTagLib = metaTagLib.concat(programTag);
|
|
22
|
-
var formTag = ["ACRONYM", "ABBR", "ADDRESS", "B", "BDI", "BDO", "BIG", "BLOCKQUOTE", "CENTER", "CITE", "CODE", "DEL", "DFN", "EM", "FONT", "I", "INS", "KBD", "MARK", "METER", "PRE", "PROGRESS", "Q", "RP", "RT", "RUBY", "S", "SAMP", "SMALL", "STRIKE", "STRONG", "SUB", "SUP", "TIME", "TT", "U", "VAR", "WBR"];
|
|
23
|
-
metaTagLib = metaTagLib.concat(formTag);
|
|
24
|
-
var baseTag = ["!DOCTYPE", "HTML", "TITLE", "BODY", "P", "BR", "HR", "!--...--"];
|
|
25
|
-
metaTagLib = metaTagLib.concat(baseTag);
|
|
26
|
-
//返回数组
|
|
27
|
-
export default metaTagLib;
|
|
1
|
+
var metaTagLib = [];
|
|
2
|
+
var tableTag = ["FORM", "INPUT", "TEXTAREA", "BUTTON", "SELECT", "OPTGROUP", "OPTION", "LABEL", "FIELDSET", "LEGEND", "DATALIST", "KEYGEN", "OUTPUT"];
|
|
3
|
+
metaTagLib = metaTagLib.concat(tableTag);
|
|
4
|
+
var frameTag = ["FRAME", "FRAMESET", "NOFRAMES", "IFRAME"];
|
|
5
|
+
metaTagLib = metaTagLib.concat(frameTag);
|
|
6
|
+
var imgTag = ["IMG", "MAP", "AREA", "CANVAS", "FIGCAPTION", "FIGURE", "AUDIO", "VIDEO", "SOURCE", "TRACK"];
|
|
7
|
+
metaTagLib = metaTagLib.concat(imgTag);
|
|
8
|
+
var linkTag = ["A", "LINK", "MAIN", "NAV"];
|
|
9
|
+
metaTagLib = metaTagLib.concat(linkTag);
|
|
10
|
+
var listTag = ["UL", "OL", "LI", "DIR", "DL", "DT", "DD", "MENU", "COMMAND"];
|
|
11
|
+
metaTagLib = metaTagLib.concat(listTag);
|
|
12
|
+
var titleTag = ["H1", "H2", "H3", "H4", "H5", "H6"];
|
|
13
|
+
metaTagLib = metaTagLib.concat(titleTag);
|
|
14
|
+
var tbTag = ["TABLE", "CAPTION", "TH", "TR", "TD", "THEAD", "TBODY", "TFOOT", "COL", "COLGROUP"];
|
|
15
|
+
metaTagLib = metaTagLib.concat(tbTag);
|
|
16
|
+
var styleTag = ["STYLE", "DIV", "SPAN", "HEADER", "FOOTER", "SECTION", "ARTICLE", "ASIDE", "DETAILS", "DIALOG", "SUMMARY"];
|
|
17
|
+
metaTagLib = metaTagLib.concat(styleTag);
|
|
18
|
+
var metaTag = ["HEAD", "META", "BASE", "BASEFONT"];
|
|
19
|
+
metaTagLib = metaTagLib.concat(metaTag);
|
|
20
|
+
var programTag = ["SCRIPT", "NOSCRIPT", "APPLET", "EMBED", "OBJECT", "PARAM"];
|
|
21
|
+
metaTagLib = metaTagLib.concat(programTag);
|
|
22
|
+
var formTag = ["ACRONYM", "ABBR", "ADDRESS", "B", "BDI", "BDO", "BIG", "BLOCKQUOTE", "CENTER", "CITE", "CODE", "DEL", "DFN", "EM", "FONT", "I", "INS", "KBD", "MARK", "METER", "PRE", "PROGRESS", "Q", "RP", "RT", "RUBY", "S", "SAMP", "SMALL", "STRIKE", "STRONG", "SUB", "SUP", "TIME", "TT", "U", "VAR", "WBR"];
|
|
23
|
+
metaTagLib = metaTagLib.concat(formTag);
|
|
24
|
+
var baseTag = ["!DOCTYPE", "HTML", "TITLE", "BODY", "P", "BR", "HR", "!--...--"];
|
|
25
|
+
metaTagLib = metaTagLib.concat(baseTag);
|
|
26
|
+
//返回数组
|
|
27
|
+
export default metaTagLib;
|
package/runtime/runtime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PageController } from "../class/controller/pageController";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param collection
|
|
5
|
-
* @param link
|
|
6
|
-
*/
|
|
7
|
-
export declare function renderHtml(collection: HTMLCollection, link: PageController): void;
|
|
1
|
+
import { PageController } from "../class/controller/pageController";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param collection
|
|
5
|
+
* @param link
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderHtml(collection: HTMLCollection, link: PageController): void;
|
package/runtime/runtime.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { isUnKnown } from "../core/utility/checkUtility";
|
|
2
|
-
import { Render } from "../core/render/delivery";
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param collection
|
|
6
|
-
* @param link
|
|
7
|
-
*/
|
|
8
|
-
export function renderHtml(collection, link) {
|
|
9
|
-
//遍历element节点,判断是否为自定义标签
|
|
10
|
-
for (var i = 0; i < collection.length; i++) {
|
|
11
|
-
if (isUnKnown(collection[i].nodeName.toUpperCase())) {
|
|
12
|
-
var component = Reflect.get(window, "tagLib").get(collection[i].nodeName.toUpperCase());
|
|
13
|
-
if (component === undefined) {
|
|
14
|
-
console.error(collection[i].nodeName.toUpperCase() + " can't be found in renderJs, you should firstly register in renderJs");
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
//自定义标签
|
|
18
|
-
Render(component, collection[i].parentNode, collection[i], link);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
//非自定义标签,深度解析
|
|
23
|
-
renderHtml(collection[i].children, link);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
import { isUnKnown } from "../core/utility/checkUtility";
|
|
2
|
+
import { Render } from "../core/render/delivery";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param collection
|
|
6
|
+
* @param link
|
|
7
|
+
*/
|
|
8
|
+
export function renderHtml(collection, link) {
|
|
9
|
+
//遍历element节点,判断是否为自定义标签
|
|
10
|
+
for (var i = 0; i < collection.length; i++) {
|
|
11
|
+
if (isUnKnown(collection[i].nodeName.toUpperCase())) {
|
|
12
|
+
var component = Reflect.get(window, "tagLib").get(collection[i].nodeName.toUpperCase());
|
|
13
|
+
if (component === undefined) {
|
|
14
|
+
console.error(collection[i].nodeName.toUpperCase() + " can't be found in renderJs, you should firstly register in renderJs");
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
//自定义标签
|
|
18
|
+
Render(component, collection[i].parentNode, collection[i], link);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
//非自定义标签,深度解析
|
|
23
|
+
renderHtml(collection[i].children, link);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/runtime/tools.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Component } from "../class/component/component";
|
|
2
|
-
import { RenderJS } from "../index";
|
|
3
|
-
/**
|
|
4
|
-
* This function is used to save the prototype component class in the window object.
|
|
5
|
-
* So, you can hava a tip that we custom a property named 'tagLib' in the window object.
|
|
6
|
-
* @param application
|
|
7
|
-
* @param component
|
|
8
|
-
*/
|
|
9
|
-
export declare function registerTagLib(application: RenderJS, component: Component | Component[]): void;
|
|
10
|
-
/**
|
|
11
|
-
* The entrance of render
|
|
12
|
-
* @param renderjs
|
|
13
|
-
*/
|
|
14
|
-
export declare function render(renderjs: RenderJS): void;
|
|
1
|
+
import { Component } from "../class/component/component";
|
|
2
|
+
import { RenderJS } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to save the prototype component class in the window object.
|
|
5
|
+
* So, you can hava a tip that we custom a property named 'tagLib' in the window object.
|
|
6
|
+
* @param application
|
|
7
|
+
* @param component
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerTagLib(application: RenderJS, component: Component | Component[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* The entrance of render
|
|
12
|
+
* @param renderjs
|
|
13
|
+
*/
|
|
14
|
+
export declare function render(renderjs: RenderJS): void;
|