render-core 1.4.12 → 1.4.14
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/index.d.ts +90 -90
- package/index.js +131 -131
- package/kernel/delivery/delivery.d.ts +29 -29
- package/kernel/delivery/delivery.js +83 -83
- package/kernel/directive/data/v-el.d.ts +8 -8
- package/kernel/directive/data/v-el.js +28 -28
- package/kernel/directive/data/v-html.d.ts +8 -8
- package/kernel/directive/data/v-html.js +26 -26
- package/kernel/directive/data/v-txt.d.ts +8 -8
- package/kernel/directive/data/v-txt.js +29 -29
- package/kernel/directive/justify/v-if.d.ts +6 -6
- package/kernel/directive/justify/v-if.js +43 -43
- package/kernel/directive/justify/v-render.d.ts +6 -6
- package/kernel/directive/justify/v-render.js +26 -26
- package/kernel/directive/justify/v-show.d.ts +6 -6
- package/kernel/directive/justify/v-show.js +26 -26
- package/kernel/directive/justify/v-switch.d.ts +6 -6
- package/kernel/directive/justify/v-switch.js +35 -35
- package/kernel/directive/loop/v-for-utility.d.ts +14 -14
- package/kernel/directive/loop/v-for-utility.js +66 -66
- package/kernel/directive/loop/v-for.d.ts +22 -22
- package/kernel/directive/loop/v-for.js +64 -64
- package/kernel/directive/loop/v-map-utility.d.ts +12 -12
- package/kernel/directive/loop/v-map-utility.js +73 -73
- package/kernel/directive/loop/v-map.d.ts +6 -6
- package/kernel/directive/loop/v-map.js +24 -24
- package/kernel/directive/method/v-on.d.ts +8 -8
- package/kernel/directive/method/v-on.js +40 -40
- package/kernel/directive/property/v-bind.d.ts +6 -6
- package/kernel/directive/property/v-bind.js +33 -33
- package/kernel/directive/react/v-model.d.ts +6 -6
- package/kernel/directive/react/v-model.js +22 -22
- package/kernel/directive/ref/v-ref.d.ts +6 -6
- package/kernel/directive/ref/v-ref.js +16 -16
- package/kernel/directive/salt/v-solt.d.ts +13 -13
- package/kernel/directive/salt/v-solt.js +46 -46
- package/kernel/proxyer/getProxy.d.ts +14 -14
- package/kernel/proxyer/getProxy.js +43 -43
- package/kernel/renderer/initRender.d.ts +10 -10
- package/kernel/renderer/initRender.js +67 -67
- package/kernel/renderer/postRender.d.ts +10 -10
- package/kernel/renderer/postRender.js +68 -68
- package/kernel/renderer/rawRender.d.ts +10 -10
- package/kernel/renderer/rawRender.js +68 -68
- package/kernel/renderer/updateRender.d.ts +6 -6
- package/kernel/renderer/updateRender.js +34 -34
- package/kernel/router/router.d.ts +12 -12
- package/kernel/router/router.js +37 -37
- package/package.json +22 -19
- package/system/generic/component/ComponentGeneric.d.ts +13 -13
- package/system/generic/component/ComponentGeneric.js +1 -1
- package/system/generic/controller/ControllerGeneric.d.ts +27 -27
- package/system/generic/controller/ControllerGeneric.js +1 -1
- package/system/generic/data/ComputedDataGeneric.d.ts +14 -14
- package/system/generic/data/ComputedDataGeneric.js +1 -1
- package/system/generic/data/OriginalDataGeneric.d.ts +14 -14
- package/system/generic/data/OriginalDataGeneric.js +1 -1
- package/system/generic/data/WatcherDataGeneric.d.ts +14 -14
- package/system/generic/data/WatcherDataGeneric.js +1 -1
- package/system/generic/http/HttpGeneric.d.ts +4 -4
- package/system/generic/http/HttpGeneric.js +1 -1
- package/system/generic/render/RenderGeneric.d.ts +9 -9
- package/system/generic/render/RenderGeneric.js +1 -1
- package/system/injection/injection.d.ts +21 -21
- package/system/injection/injection.js +50 -50
- package/system/injection/injector.d.ts +78 -78
- package/system/injection/injector.js +123 -123
- package/system/lifecycle/lifeCycle.d.ts +14 -14
- package/system/lifecycle/lifeCycle.js +21 -21
- package/system/lifecycle/mount.d.ts +17 -17
- package/system/lifecycle/mount.js +47 -47
- package/system/loader/loader.d.ts +7 -7
- package/system/loader/loader.js +18 -18
- package/system/output/error.js +4 -4
- package/system/output/errorUtility.d.ts +3 -3
- package/system/output/errorUtility.js +9 -9
- package/system/prototype/ContextController.d.ts +30 -30
- package/system/prototype/ContextController.js +17 -17
- package/system/prototype/HttpAction.d.ts +9 -9
- package/system/prototype/HttpAction.js +37 -37
- package/system/recorder/table0/system_func_0.d.ts +30 -30
- package/system/recorder/table0/system_func_0.js +47 -47
- package/system/recorder/table0/system_t_0.d.ts +7 -7
- package/system/recorder/table0/system_t_0.js +5 -5
- package/system/recorder/table1/system_func_1.d.ts +8 -8
- package/system/recorder/table1/system_func_1.js +25 -25
- package/system/recorder/table1/system_t_1.d.ts +8 -8
- package/system/recorder/table1/system_t_1.js +7 -7
- package/system/recorder/table2/system_func_2.d.ts +5 -5
- package/system/recorder/table2/system_func_2.js +8 -8
- package/system/recorder/table2/system_t_2.d.ts +2 -2
- package/system/recorder/table2/system_t_2.js +26 -26
- package/system/recorder/table3/system_func_3.d.ts +10 -10
- package/system/recorder/table3/system_func_3.js +25 -25
- package/system/recorder/table3/system_t_3.d.ts +10 -10
- package/system/recorder/table3/system_t_3.js +9 -9
- package/system/resolver/props.d.ts +18 -18
- package/system/resolver/props.js +64 -64
- package/system/resolver/query.d.ts +4 -4
- package/system/resolver/query.js +15 -15
- package/system/utility/data/dataUtility.d.ts +5 -5
- package/system/utility/data/dataUtility.js +12 -12
- package/system/utility/directive/cmdUtility.d.ts +15 -15
- package/system/utility/directive/cmdUtility.js +43 -43
- package/system/utility/initiate/miscUtility.d.ts +6 -6
- package/system/utility/initiate/miscUtility.js +12 -12
- package/system/utility/initiate/templateUtility.d.ts +6 -6
- package/system/utility/initiate/templateUtility.js +11 -11
- package/system/utility/react/inputType.d.ts +25 -25
- package/system/utility/react/inputType.js +40 -40
- package/system/utility/react/inputUtility.d.ts +19 -19
- package/system/utility/react/inputUtility.js +125 -125
- package/system/utility/react/modelUtility.d.ts +15 -15
- package/system/utility/react/modelUtility.js +64 -64
- package/system/utility/react/sectionUtility.d.ts +6 -6
- package/system/utility/react/sectionUtility.js +123 -123
- package/system/utility/style/styleUtility.d.ts +29 -29
- package/system/utility/style/styleUtility.js +102 -102
- package/tension/SystemInitPlugin.d.ts +6 -6
- package/tension/SystemInitPlugin.js +10 -10
- package/tension/generic/plugin/PluginGeneric.d.ts +5 -5
- package/tension/generic/plugin/PluginGeneric.js +1 -1
- package/tension/generic/plugin/hooks/HooksGeneric.d.ts +6 -6
- package/tension/generic/plugin/hooks/HooksGeneric.js +1 -1
- package/tension/generic/plugin/preface/PrefaceGeneric.d.ts +11 -11
- package/tension/generic/plugin/preface/PrefaceGeneric.js +1 -1
- package/tension/generic/router/RouterGeneric.d.ts +5 -5
- package/tension/generic/router/RouterGeneric.js +1 -1
- package/tension/prototype/AbstractComponent.d.ts +43 -43
- package/tension/prototype/AbstractComponent.js +113 -113
- package/tension/prototype/HooksAction.d.ts +7 -7
- package/tension/prototype/HooksAction.js +19 -19
- package/tension/prototype/PrefaceAction.d.ts +12 -12
- package/tension/prototype/PrefaceAction.js +27 -27
- package/xboot/entrance.d.ts +16 -16
- package/xboot/entrance.js +53 -53
- package/xboot/renderProcessor.d.ts +7 -7
- package/xboot/renderProcessor.js +21 -21
- package/xboot/tagProcessor.d.ts +7 -7
- package/xboot/tagProcessor.js +22 -22
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
import { resolve_props } from "../resolver/props";
|
|
2
|
-
import { parse_directive_refs } from "../../kernel/directive/ref/v-ref";
|
|
3
|
-
import { get_user_anonymous_ext, get_user_ext_http } from "../recorder/table3/system_func_3";
|
|
4
|
-
import { get_path_variable } from "../recorder/table1/system_func_1";
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @param name
|
|
8
|
-
* @param origin
|
|
9
|
-
*/
|
|
10
|
-
export function inject_$name_to_data(name, origin) {
|
|
11
|
-
Reflect.set(origin, "$name", name);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param childNode
|
|
16
|
-
* @param meta
|
|
17
|
-
* @param origin
|
|
18
|
-
*/
|
|
19
|
-
export function inject_$props_to_data(childNode, meta, origin) {
|
|
20
|
-
var props = resolve_props(childNode, meta);
|
|
21
|
-
Reflect.set(origin, "$props", props);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param template
|
|
26
|
-
* @param origin
|
|
27
|
-
*/
|
|
28
|
-
export function inject_$refs_to_data(template, origin) {
|
|
29
|
-
var refs = new Map();
|
|
30
|
-
parse_directive_refs(template.children, refs);
|
|
31
|
-
Reflect.set(origin, "$refs", refs);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param config
|
|
36
|
-
*/
|
|
37
|
-
export function inject_$plugins_to_data(config) {
|
|
38
|
-
Reflect.set(config, "$plugins", function (name) {
|
|
39
|
-
return get_user_anonymous_ext(name);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @param origin
|
|
45
|
-
*/
|
|
46
|
-
export function inject_$http_to_data(origin) {
|
|
47
|
-
Reflect.set(origin, "$http", get_user_ext_http());
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @param origin
|
|
52
|
-
*/
|
|
53
|
-
export function inject_$pathVariable_to_data(origin) {
|
|
54
|
-
Reflect.set(origin, "$pathVariable", get_path_variable());
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
*
|
|
58
|
-
* @param data
|
|
59
|
-
* @param commit
|
|
60
|
-
*/
|
|
61
|
-
export function inject_$commit_to_data(data, commit) {
|
|
62
|
-
Reflect.set(data, "$commit", commit);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
*
|
|
66
|
-
* @param data
|
|
67
|
-
* @param publisher
|
|
68
|
-
*/
|
|
69
|
-
export function inject_$publish_to_data(data, publisher) {
|
|
70
|
-
Reflect.set(data, "$publish", publisher);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param data
|
|
75
|
-
* @param setter
|
|
76
|
-
*/
|
|
77
|
-
export function inject_$setter_to_data(data, setter) {
|
|
78
|
-
Reflect.set(data, "$set", setter);
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @param data
|
|
83
|
-
* @param getter
|
|
84
|
-
*/
|
|
85
|
-
export function inject_$getter_to_data(data, getter) {
|
|
86
|
-
Reflect.set(data, "$get", getter);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
* @param controller
|
|
91
|
-
* @param proto
|
|
92
|
-
*/
|
|
93
|
-
export function inject_method_to_data(controller, proto) {
|
|
94
|
-
var methods = Object.getOwnPropertyNames(proto.getMethods());
|
|
95
|
-
methods.forEach(function (value) {
|
|
96
|
-
if (value.match(/^\$\$[a-zA-Z0-9_]*/) !== null)
|
|
97
|
-
Reflect.set(controller.originalData, value, proto.getMethods()[value].bind(controller.originalData));
|
|
98
|
-
else
|
|
99
|
-
Reflect.set(controller.originalData, value, proto.getMethods()[value].bind(controller.dataForMethod));
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
*
|
|
104
|
-
* @param controller
|
|
105
|
-
* @param proto
|
|
106
|
-
*/
|
|
107
|
-
export function inject_watcher_to_controller(controller, proto) {
|
|
108
|
-
var methods = Object.getOwnPropertyNames(proto.getWatcher());
|
|
109
|
-
methods.forEach(function (value) {
|
|
110
|
-
Reflect.set(controller.watcher, value, proto.getWatcher()[value].bind(controller.originalData));
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* @param controller
|
|
116
|
-
* @param proto
|
|
117
|
-
*/
|
|
118
|
-
export function inject_computed_to_controller(controller, proto) {
|
|
119
|
-
var methods = Object.getOwnPropertyNames(proto.getComputed());
|
|
120
|
-
methods.forEach(function (value) {
|
|
121
|
-
Reflect.set(controller.computed, value, proto.getComputed()[value].bind(controller.originalData));
|
|
122
|
-
});
|
|
123
|
-
}
|
|
1
|
+
import { resolve_props } from "../resolver/props";
|
|
2
|
+
import { parse_directive_refs } from "../../kernel/directive/ref/v-ref";
|
|
3
|
+
import { get_user_anonymous_ext, get_user_ext_http } from "../recorder/table3/system_func_3";
|
|
4
|
+
import { get_path_variable } from "../recorder/table1/system_func_1";
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param name
|
|
8
|
+
* @param origin
|
|
9
|
+
*/
|
|
10
|
+
export function inject_$name_to_data(name, origin) {
|
|
11
|
+
Reflect.set(origin, "$name", name);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param childNode
|
|
16
|
+
* @param meta
|
|
17
|
+
* @param origin
|
|
18
|
+
*/
|
|
19
|
+
export function inject_$props_to_data(childNode, meta, origin) {
|
|
20
|
+
var props = resolve_props(childNode, meta);
|
|
21
|
+
Reflect.set(origin, "$props", props);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param template
|
|
26
|
+
* @param origin
|
|
27
|
+
*/
|
|
28
|
+
export function inject_$refs_to_data(template, origin) {
|
|
29
|
+
var refs = new Map();
|
|
30
|
+
parse_directive_refs(template.children, refs);
|
|
31
|
+
Reflect.set(origin, "$refs", refs);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param config
|
|
36
|
+
*/
|
|
37
|
+
export function inject_$plugins_to_data(config) {
|
|
38
|
+
Reflect.set(config, "$plugins", function (name) {
|
|
39
|
+
return get_user_anonymous_ext(name);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param origin
|
|
45
|
+
*/
|
|
46
|
+
export function inject_$http_to_data(origin) {
|
|
47
|
+
Reflect.set(origin, "$http", get_user_ext_http());
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param origin
|
|
52
|
+
*/
|
|
53
|
+
export function inject_$pathVariable_to_data(origin) {
|
|
54
|
+
Reflect.set(origin, "$pathVariable", get_path_variable());
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @param data
|
|
59
|
+
* @param commit
|
|
60
|
+
*/
|
|
61
|
+
export function inject_$commit_to_data(data, commit) {
|
|
62
|
+
Reflect.set(data, "$commit", commit);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param data
|
|
67
|
+
* @param publisher
|
|
68
|
+
*/
|
|
69
|
+
export function inject_$publish_to_data(data, publisher) {
|
|
70
|
+
Reflect.set(data, "$publish", publisher);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param data
|
|
75
|
+
* @param setter
|
|
76
|
+
*/
|
|
77
|
+
export function inject_$setter_to_data(data, setter) {
|
|
78
|
+
Reflect.set(data, "$set", setter);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @param data
|
|
83
|
+
* @param getter
|
|
84
|
+
*/
|
|
85
|
+
export function inject_$getter_to_data(data, getter) {
|
|
86
|
+
Reflect.set(data, "$get", getter);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @param controller
|
|
91
|
+
* @param proto
|
|
92
|
+
*/
|
|
93
|
+
export function inject_method_to_data(controller, proto) {
|
|
94
|
+
var methods = Object.getOwnPropertyNames(proto.getMethods());
|
|
95
|
+
methods.forEach(function (value) {
|
|
96
|
+
if (value.match(/^\$\$[a-zA-Z0-9_]*/) !== null)
|
|
97
|
+
Reflect.set(controller.originalData, value, proto.getMethods()[value].bind(controller.originalData));
|
|
98
|
+
else
|
|
99
|
+
Reflect.set(controller.originalData, value, proto.getMethods()[value].bind(controller.dataForMethod));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param controller
|
|
105
|
+
* @param proto
|
|
106
|
+
*/
|
|
107
|
+
export function inject_watcher_to_controller(controller, proto) {
|
|
108
|
+
var methods = Object.getOwnPropertyNames(proto.getWatcher());
|
|
109
|
+
methods.forEach(function (value) {
|
|
110
|
+
Reflect.set(controller.watcher, value, proto.getWatcher()[value].bind(controller.originalData));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @param controller
|
|
116
|
+
* @param proto
|
|
117
|
+
*/
|
|
118
|
+
export function inject_computed_to_controller(controller, proto) {
|
|
119
|
+
var methods = Object.getOwnPropertyNames(proto.getComputed());
|
|
120
|
+
methods.forEach(function (value) {
|
|
121
|
+
Reflect.set(controller.computed, value, proto.getComputed()[value].bind(controller.originalData));
|
|
122
|
+
});
|
|
123
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
/**
|
|
3
|
-
* 该函数用于处理渲染后操作
|
|
4
|
-
* @param currenController
|
|
5
|
-
* @param child
|
|
6
|
-
* @param parentController
|
|
7
|
-
*/
|
|
8
|
-
export declare function after_process_for_init(currenController: ContextController, child: ChildNode, parentController: ContextController): void;
|
|
9
|
-
/**
|
|
10
|
-
* 该函数用于处理渲染后操作
|
|
11
|
-
* @param currentController
|
|
12
|
-
* @param parentController
|
|
13
|
-
*/
|
|
14
|
-
export declare function after_process_for_post(currentController: ContextController, parentController: ContextController): void;
|
|
1
|
+
import { ContextController } from "../prototype/ContextController";
|
|
2
|
+
/**
|
|
3
|
+
* 该函数用于处理渲染后操作
|
|
4
|
+
* @param currenController
|
|
5
|
+
* @param child
|
|
6
|
+
* @param parentController
|
|
7
|
+
*/
|
|
8
|
+
export declare function after_process_for_init(currenController: ContextController, child: ChildNode, parentController: ContextController): void;
|
|
9
|
+
/**
|
|
10
|
+
* 该函数用于处理渲染后操作
|
|
11
|
+
* @param currentController
|
|
12
|
+
* @param parentController
|
|
13
|
+
*/
|
|
14
|
+
export declare function after_process_for_post(currentController: ContextController, parentController: ContextController): void;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 该函数用于处理渲染后操作
|
|
3
|
-
* @param currenController
|
|
4
|
-
* @param child
|
|
5
|
-
* @param parentController
|
|
6
|
-
*/
|
|
7
|
-
export function after_process_for_init(currenController, child, parentController) {
|
|
8
|
-
/* save currentController to parentController's publishing array */
|
|
9
|
-
parentController.slaveComponent.push(currenController);
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
parentController.lazyComponent.set(child.getAttribute("name"), controller.originalData);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 该函数用于处理渲染后操作
|
|
15
|
-
* @param currentController
|
|
16
|
-
* @param parentController
|
|
17
|
-
*/
|
|
18
|
-
export function after_process_for_post(currentController, parentController) {
|
|
19
|
-
/* save currentController to parentController's publishing array */
|
|
20
|
-
parentController.slaveComponent.push(currentController);
|
|
21
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 该函数用于处理渲染后操作
|
|
3
|
+
* @param currenController
|
|
4
|
+
* @param child
|
|
5
|
+
* @param parentController
|
|
6
|
+
*/
|
|
7
|
+
export function after_process_for_init(currenController, child, parentController) {
|
|
8
|
+
/* save currentController to parentController's publishing array */
|
|
9
|
+
parentController.slaveComponent.push(currenController);
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
parentController.lazyComponent.set(child.getAttribute("name"), controller.originalData);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 该函数用于处理渲染后操作
|
|
15
|
+
* @param currentController
|
|
16
|
+
* @param parentController
|
|
17
|
+
*/
|
|
18
|
+
export function after_process_for_post(currentController, parentController) {
|
|
19
|
+
/* save currentController to parentController's publishing array */
|
|
20
|
+
parentController.slaveComponent.push(currentController);
|
|
21
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
import { Component } from "../../index";
|
|
3
|
-
/**
|
|
4
|
-
* This function is used to mount the dom to the html document.
|
|
5
|
-
* @param controller
|
|
6
|
-
* @param proto
|
|
7
|
-
* @param parent
|
|
8
|
-
* @param child
|
|
9
|
-
* @param tagTemplate
|
|
10
|
-
*/
|
|
11
|
-
export declare function archive_mount(controller: ContextController, proto: Component, parent: ParentNode, child: ChildNode, tagTemplate: Element): void;
|
|
12
|
-
/**
|
|
13
|
-
* Insert elements without div element
|
|
14
|
-
* @param root
|
|
15
|
-
*/
|
|
16
|
-
export declare function extract_mount(root: ContextController): void;
|
|
17
|
-
export declare function mountForUpdate(tagTemplate: Element): Element;
|
|
1
|
+
import { ContextController } from "../prototype/ContextController";
|
|
2
|
+
import { Component } from "../../index";
|
|
3
|
+
/**
|
|
4
|
+
* This function is used to mount the dom to the html document.
|
|
5
|
+
* @param controller
|
|
6
|
+
* @param proto
|
|
7
|
+
* @param parent
|
|
8
|
+
* @param child
|
|
9
|
+
* @param tagTemplate
|
|
10
|
+
*/
|
|
11
|
+
export declare function archive_mount(controller: ContextController, proto: Component, parent: ParentNode, child: ChildNode, tagTemplate: Element): void;
|
|
12
|
+
/**
|
|
13
|
+
* Insert elements without div element
|
|
14
|
+
* @param root
|
|
15
|
+
*/
|
|
16
|
+
export declare function extract_mount(root: ContextController): void;
|
|
17
|
+
export declare function mountForUpdate(tagTemplate: Element): Element;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function is used to mount the dom to the html document.
|
|
3
|
-
* @param controller
|
|
4
|
-
* @param proto
|
|
5
|
-
* @param parent
|
|
6
|
-
* @param child
|
|
7
|
-
* @param tagTemplate
|
|
8
|
-
*/
|
|
9
|
-
export function archive_mount(controller, proto, parent, child, tagTemplate) {
|
|
10
|
-
//mount
|
|
11
|
-
var renderSpace = document.createElement("div");
|
|
12
|
-
//给box添加样式
|
|
13
|
-
renderSpace.setAttribute("style", proto.getBoxStyle());
|
|
14
|
-
//指定渲染空间
|
|
15
|
-
controller.componentAttachedRootElement = renderSpace;
|
|
16
|
-
//开始渲染
|
|
17
|
-
parent.replaceChild(renderSpace, child);
|
|
18
|
-
while (tagTemplate.hasChildNodes())
|
|
19
|
-
renderSpace.append(tagTemplate.firstChild);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Insert elements without div element
|
|
23
|
-
* @param root
|
|
24
|
-
*/
|
|
25
|
-
export function extract_mount(root) {
|
|
26
|
-
var begin = document.createElement("div");
|
|
27
|
-
begin.setAttribute("anchor", "begin");
|
|
28
|
-
begin.setAttribute("style", "display:none");
|
|
29
|
-
root.componentAttachedRootElement.parentNode.insertBefore(begin, root.componentAttachedRootElement);
|
|
30
|
-
root.anchorBegin = begin;
|
|
31
|
-
while (root.componentAttachedRootElement.hasChildNodes())
|
|
32
|
-
root.componentAttachedRootElement.parentNode.insertBefore(root.componentAttachedRootElement.firstChild, root.componentAttachedRootElement);
|
|
33
|
-
var parent = root.componentAttachedRootElement.parentNode;
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
root.
|
|
36
|
-
root.anchorEnd.setAttribute("anchor", "end");
|
|
37
|
-
root.anchorBegin.setAttribute("style", "display:none");
|
|
38
|
-
root.componentAttachedRootElement = parent;
|
|
39
|
-
}
|
|
40
|
-
export function mountForUpdate(tagTemplate) {
|
|
41
|
-
var renderSpace = document.createElement("div");
|
|
42
|
-
renderSpace.setAttribute("anchor", "end");
|
|
43
|
-
while (tagTemplate.hasChildNodes()) {
|
|
44
|
-
renderSpace.append(tagTemplate.firstChild);
|
|
45
|
-
}
|
|
46
|
-
return renderSpace;
|
|
47
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to mount the dom to the html document.
|
|
3
|
+
* @param controller
|
|
4
|
+
* @param proto
|
|
5
|
+
* @param parent
|
|
6
|
+
* @param child
|
|
7
|
+
* @param tagTemplate
|
|
8
|
+
*/
|
|
9
|
+
export function archive_mount(controller, proto, parent, child, tagTemplate) {
|
|
10
|
+
//mount
|
|
11
|
+
var renderSpace = document.createElement("div");
|
|
12
|
+
//给box添加样式
|
|
13
|
+
renderSpace.setAttribute("style", proto.getBoxStyle());
|
|
14
|
+
//指定渲染空间
|
|
15
|
+
controller.componentAttachedRootElement = renderSpace;
|
|
16
|
+
//开始渲染
|
|
17
|
+
parent.replaceChild(renderSpace, child);
|
|
18
|
+
while (tagTemplate.hasChildNodes())
|
|
19
|
+
renderSpace.append(tagTemplate.firstChild);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Insert elements without div element
|
|
23
|
+
* @param root
|
|
24
|
+
*/
|
|
25
|
+
export function extract_mount(root) {
|
|
26
|
+
var begin = document.createElement("div");
|
|
27
|
+
begin.setAttribute("anchor", "begin");
|
|
28
|
+
begin.setAttribute("style", "display:none");
|
|
29
|
+
root.componentAttachedRootElement.parentNode.insertBefore(begin, root.componentAttachedRootElement);
|
|
30
|
+
root.anchorBegin = begin;
|
|
31
|
+
while (root.componentAttachedRootElement.hasChildNodes())
|
|
32
|
+
root.componentAttachedRootElement.parentNode.insertBefore(root.componentAttachedRootElement.firstChild, root.componentAttachedRootElement);
|
|
33
|
+
var parent = root.componentAttachedRootElement.parentNode;
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
root.anchorEnd = root.componentAttachedRootElement;
|
|
36
|
+
root.anchorEnd.setAttribute("anchor", "end");
|
|
37
|
+
root.anchorBegin.setAttribute("style", "display:none");
|
|
38
|
+
root.componentAttachedRootElement = parent;
|
|
39
|
+
}
|
|
40
|
+
export function mountForUpdate(tagTemplate) {
|
|
41
|
+
var renderSpace = document.createElement("div");
|
|
42
|
+
renderSpace.setAttribute("anchor", "end");
|
|
43
|
+
while (tagTemplate.hasChildNodes()) {
|
|
44
|
+
renderSpace.append(tagTemplate.firstChild);
|
|
45
|
+
}
|
|
46
|
+
return renderSpace;
|
|
47
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 加载自定义标签样式
|
|
3
|
-
* @param tag
|
|
4
|
-
* @param theme
|
|
5
|
-
* @param styleData
|
|
6
|
-
*/
|
|
7
|
-
export declare function loadStyle(tag: string, theme: string, styleData: string): void;
|
|
1
|
+
/**
|
|
2
|
+
* 加载自定义标签样式
|
|
3
|
+
* @param tag
|
|
4
|
+
* @param theme
|
|
5
|
+
* @param styleData
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadStyle(tag: string, theme: string, styleData: string): void;
|
package/system/loader/loader.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { checkStyleLabel } from "../utility/style/styleUtility";
|
|
2
|
-
/**
|
|
3
|
-
* 加载自定义标签样式
|
|
4
|
-
* @param tag
|
|
5
|
-
* @param theme
|
|
6
|
-
* @param styleData
|
|
7
|
-
*/
|
|
8
|
-
export function loadStyle(tag, theme, styleData) {
|
|
9
|
-
if (!checkStyleLabel(tag)) {
|
|
10
|
-
var style = document.createElement('style');
|
|
11
|
-
var text = document.createTextNode(styleData);
|
|
12
|
-
style.appendChild(text);
|
|
13
|
-
style.setAttribute("tag", tag.toUpperCase());
|
|
14
|
-
style.setAttribute("theme", theme);
|
|
15
|
-
var head = document.getElementsByTagName('head')[0];
|
|
16
|
-
head.appendChild(style);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
import { checkStyleLabel } from "../utility/style/styleUtility";
|
|
2
|
+
/**
|
|
3
|
+
* 加载自定义标签样式
|
|
4
|
+
* @param tag
|
|
5
|
+
* @param theme
|
|
6
|
+
* @param styleData
|
|
7
|
+
*/
|
|
8
|
+
export function loadStyle(tag, theme, styleData) {
|
|
9
|
+
if (!checkStyleLabel(tag)) {
|
|
10
|
+
var style = document.createElement('style');
|
|
11
|
+
var text = document.createTextNode(styleData);
|
|
12
|
+
style.appendChild(text);
|
|
13
|
+
style.setAttribute("tag", tag.toUpperCase());
|
|
14
|
+
style.setAttribute("theme", theme);
|
|
15
|
+
var head = document.getElementsByTagName('head')[0];
|
|
16
|
+
head.appendChild(style);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/system/output/error.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
window.onerror = function (message, source, lineno, colno, error) {
|
|
2
|
-
console.error("捕获到全局错误:", message, "在", source, "的第", lineno, "行");
|
|
3
|
-
return true;
|
|
4
|
-
};
|
|
1
|
+
window.onerror = function (message, source, lineno, colno, error) {
|
|
2
|
+
console.error("捕获到全局错误:", message, "在", source, "的第", lineno, "行");
|
|
3
|
+
return true;
|
|
4
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function errorDisplay(error: Error): void;
|
|
2
|
-
export declare function warnDisplay(error: Error): void;
|
|
3
|
-
export declare function infoDisplay(error: Error): void;
|
|
1
|
+
export declare function errorDisplay(error: Error): void;
|
|
2
|
+
export declare function warnDisplay(error: Error): void;
|
|
3
|
+
export declare function infoDisplay(error: Error): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export function errorDisplay(error) {
|
|
2
|
-
console.log();
|
|
3
|
-
}
|
|
4
|
-
export function warnDisplay(error) {
|
|
5
|
-
console.warn();
|
|
6
|
-
}
|
|
7
|
-
export function infoDisplay(error) {
|
|
8
|
-
console.info();
|
|
9
|
-
}
|
|
1
|
+
export function errorDisplay(error) {
|
|
2
|
+
console.log();
|
|
3
|
+
}
|
|
4
|
+
export function warnDisplay(error) {
|
|
5
|
+
console.warn();
|
|
6
|
+
}
|
|
7
|
+
export function infoDisplay(error) {
|
|
8
|
+
console.info();
|
|
9
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { ControllerGeneric } from "../generic/controller/ControllerGeneric";
|
|
2
|
-
import { Component } from "../../index";
|
|
3
|
-
import { OriginalDataGeneric } from "../generic/data/OriginalDataGeneric";
|
|
4
|
-
import { ComputedDataGeneric } from "../generic/data/ComputedDataGeneric";
|
|
5
|
-
import { WatcherDataGeneric } from "../generic/data/WatcherDataGeneric";
|
|
6
|
-
export declare class ContextController implements ControllerGeneric {
|
|
7
|
-
componentAttachedRootElement: ParentNode | Element;
|
|
8
|
-
prototypeOfComponent: Component;
|
|
9
|
-
parentController: ContextController;
|
|
10
|
-
anchorBegin: HTMLElement;
|
|
11
|
-
anchorEnd: HTMLElement;
|
|
12
|
-
componentConfig: {
|
|
13
|
-
boxMode: boolean;
|
|
14
|
-
plugins?: Map<string, any>;
|
|
15
|
-
};
|
|
16
|
-
originalData: OriginalDataGeneric;
|
|
17
|
-
dataForMethod: OriginalDataGeneric;
|
|
18
|
-
dataForComputed: ComputedDataGeneric;
|
|
19
|
-
dataForWatcher: WatcherDataGeneric;
|
|
20
|
-
salt: Map<string, any>;
|
|
21
|
-
lazyComponent: Map<string, {}>;
|
|
22
|
-
slaveComponent: ContextController[];
|
|
23
|
-
method: {};
|
|
24
|
-
computed: {};
|
|
25
|
-
watcher: {};
|
|
26
|
-
constructor(config: {
|
|
27
|
-
boxMode: boolean;
|
|
28
|
-
});
|
|
29
|
-
receiver(method: string, ...args: any[]): any;
|
|
30
|
-
}
|
|
1
|
+
import { ControllerGeneric } from "../generic/controller/ControllerGeneric";
|
|
2
|
+
import { Component } from "../../index";
|
|
3
|
+
import { OriginalDataGeneric } from "../generic/data/OriginalDataGeneric";
|
|
4
|
+
import { ComputedDataGeneric } from "../generic/data/ComputedDataGeneric";
|
|
5
|
+
import { WatcherDataGeneric } from "../generic/data/WatcherDataGeneric";
|
|
6
|
+
export declare class ContextController implements ControllerGeneric {
|
|
7
|
+
componentAttachedRootElement: ParentNode | Element;
|
|
8
|
+
prototypeOfComponent: Component;
|
|
9
|
+
parentController: ContextController;
|
|
10
|
+
anchorBegin: HTMLElement;
|
|
11
|
+
anchorEnd: HTMLElement;
|
|
12
|
+
componentConfig: {
|
|
13
|
+
boxMode: boolean;
|
|
14
|
+
plugins?: Map<string, any>;
|
|
15
|
+
};
|
|
16
|
+
originalData: OriginalDataGeneric;
|
|
17
|
+
dataForMethod: OriginalDataGeneric;
|
|
18
|
+
dataForComputed: ComputedDataGeneric;
|
|
19
|
+
dataForWatcher: WatcherDataGeneric;
|
|
20
|
+
salt: Map<string, any>;
|
|
21
|
+
lazyComponent: Map<string, {}>;
|
|
22
|
+
slaveComponent: ContextController[];
|
|
23
|
+
method: {};
|
|
24
|
+
computed: {};
|
|
25
|
+
watcher: {};
|
|
26
|
+
constructor(config: {
|
|
27
|
+
boxMode: boolean;
|
|
28
|
+
});
|
|
29
|
+
receiver(method: string, ...args: any[]): any;
|
|
30
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var ContextController = /** @class */ (function () {
|
|
2
|
-
function ContextController(config) {
|
|
3
|
-
this.componentConfig = config;
|
|
4
|
-
this.lazyComponent = new Map();
|
|
5
|
-
this.slaveComponent = Array();
|
|
6
|
-
this.salt = new Map();
|
|
7
|
-
}
|
|
8
|
-
ContextController.prototype.receiver = function (method) {
|
|
9
|
-
var args = [];
|
|
10
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11
|
-
args[_i - 1] = arguments[_i];
|
|
12
|
-
}
|
|
13
|
-
return this.prototypeOfComponent.getMethods()[method].apply(this.dataForMethod, args);
|
|
14
|
-
};
|
|
15
|
-
return ContextController;
|
|
16
|
-
}());
|
|
17
|
-
export { ContextController };
|
|
1
|
+
var ContextController = /** @class */ (function () {
|
|
2
|
+
function ContextController(config) {
|
|
3
|
+
this.componentConfig = config;
|
|
4
|
+
this.lazyComponent = new Map();
|
|
5
|
+
this.slaveComponent = Array();
|
|
6
|
+
this.salt = new Map();
|
|
7
|
+
}
|
|
8
|
+
ContextController.prototype.receiver = function (method) {
|
|
9
|
+
var args = [];
|
|
10
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11
|
+
args[_i - 1] = arguments[_i];
|
|
12
|
+
}
|
|
13
|
+
return this.prototypeOfComponent.getMethods()[method].apply(this.dataForMethod, args);
|
|
14
|
+
};
|
|
15
|
+
return ContextController;
|
|
16
|
+
}());
|
|
17
|
+
export { ContextController };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HttpGeneric } from "../generic/http/HttpGeneric";
|
|
2
|
-
export declare class HttpAction implements HttpGeneric {
|
|
3
|
-
redirect(url: string, parameters: {}): void;
|
|
4
|
-
/**
|
|
5
|
-
* locate the position
|
|
6
|
-
* @param position
|
|
7
|
-
*/
|
|
8
|
-
relocate(position: string): void;
|
|
9
|
-
}
|
|
1
|
+
import { HttpGeneric } from "../generic/http/HttpGeneric";
|
|
2
|
+
export declare class HttpAction implements HttpGeneric {
|
|
3
|
+
redirect(url: string, parameters: {}): void;
|
|
4
|
+
/**
|
|
5
|
+
* locate the position
|
|
6
|
+
* @param position
|
|
7
|
+
*/
|
|
8
|
+
relocate(position: string): void;
|
|
9
|
+
}
|