render-core 1.4.11 → 1.4.12
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/kernel/renderer/initRender.js +2 -2
- package/kernel/renderer/postRender.js +2 -2
- package/kernel/renderer/rawRender.js +2 -2
- package/package.json +1 -1
- package/system/generic/data/ComputedDataGeneric.d.ts +2 -1
- package/system/generic/data/OriginalDataGeneric.d.ts +2 -1
- package/system/generic/data/WatcherDataGeneric.d.ts +2 -1
- package/system/injection/injector.d.ts +49 -1
- package/system/injection/injector.js +53 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContextController } from "../../system/prototype/ContextController";
|
|
2
2
|
import { directive_parse_collection_for_after, directive_parse_collection_for_before } from "../../system/utility/directive/cmdUtility";
|
|
3
3
|
import { archive_mount, extract_mount } from "../../system/lifecycle/mount";
|
|
4
|
-
import { inject_$commit_to_data, inject_$getter_to_data, inject_$http_to_data, inject_$name_to_data, inject_$pathVariable_to_data, inject_$
|
|
4
|
+
import { inject_$commit_to_data, inject_$getter_to_data, inject_$http_to_data, inject_$name_to_data, inject_$pathVariable_to_data, inject_$plugins_to_data, inject_$props_to_data, inject_$publish_to_data, inject_$refs_to_data, inject_$setter_to_data, inject_computed_to_controller, inject_method_to_data, inject_watcher_to_controller, } from "../../system/injection/injector";
|
|
5
5
|
import { after_process_for_init } from "../../system/lifecycle/lifeCycle";
|
|
6
6
|
import { findComponent } from "../delivery/delivery";
|
|
7
7
|
import { getTemplate } from "../../system/utility/initiate/templateUtility";
|
|
@@ -38,7 +38,7 @@ export function init_renderer(protoType, parent, child, parentController) {
|
|
|
38
38
|
inject_$name_to_data(protoType.getName(), currentController.originalData);
|
|
39
39
|
inject_$props_to_data(child, protoType.getProps(), currentController.originalData);
|
|
40
40
|
inject_$refs_to_data(tagTemplate, currentController.originalData);
|
|
41
|
-
inject_$
|
|
41
|
+
inject_$plugins_to_data(currentController.originalData);
|
|
42
42
|
inject_$http_to_data(currentController.originalData);
|
|
43
43
|
inject_$pathVariable_to_data(currentController.originalData);
|
|
44
44
|
inject_$commit_to_data(currentController.originalData, get_commit_method(currentController));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContextController } from "../../system/prototype/ContextController";
|
|
2
2
|
import { directive_parse_collection_for_after, directive_parse_collection_for_before } from "../../system/utility/directive/cmdUtility";
|
|
3
3
|
import { archive_mount, extract_mount } from "../../system/lifecycle/mount";
|
|
4
|
-
import { inject_$commit_to_data, inject_$getter_to_data, inject_$http_to_data, inject_$name_to_data, inject_$pathVariable_to_data, inject_$
|
|
4
|
+
import { inject_$commit_to_data, inject_$getter_to_data, inject_$http_to_data, inject_$name_to_data, inject_$pathVariable_to_data, inject_$plugins_to_data, inject_$props_to_data, inject_$publish_to_data, inject_$refs_to_data, inject_$setter_to_data, inject_computed_to_controller, inject_method_to_data, inject_watcher_to_controller, } from "../../system/injection/injector";
|
|
5
5
|
import { after_process_for_post } from "../../system/lifecycle/lifeCycle";
|
|
6
6
|
import { findComponent } from "../delivery/delivery";
|
|
7
7
|
import { parse_directive_salt_collect } from "../directive/salt/v-solt";
|
|
@@ -39,7 +39,7 @@ export function post_renderer(protoType, parent, child, parentController) {
|
|
|
39
39
|
inject_$name_to_data(protoType.getName(), currentController.originalData);
|
|
40
40
|
inject_$props_to_data(child, protoType.getProps(), currentController.originalData);
|
|
41
41
|
inject_$refs_to_data(tagTemplate, currentController.originalData);
|
|
42
|
-
inject_$
|
|
42
|
+
inject_$plugins_to_data(currentController.originalData);
|
|
43
43
|
inject_$http_to_data(currentController.originalData);
|
|
44
44
|
inject_$pathVariable_to_data(currentController.originalData);
|
|
45
45
|
inject_$commit_to_data(currentController.originalData, get_commit_method(currentController));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContextController } from "../../system/prototype/ContextController";
|
|
2
2
|
import { directive_parse_collection_for_after, directive_parse_collection_for_before } from "../../system/utility/directive/cmdUtility";
|
|
3
3
|
import { archive_mount, extract_mount } from "../../system/lifecycle/mount";
|
|
4
|
-
import { inject_$commit_to_data, inject_$getter_to_data, inject_$http_to_data, inject_$name_to_data, inject_$pathVariable_to_data, inject_$
|
|
4
|
+
import { inject_$commit_to_data, inject_$getter_to_data, inject_$http_to_data, inject_$name_to_data, inject_$pathVariable_to_data, inject_$plugins_to_data, inject_$props_to_data, inject_$publish_to_data, inject_$refs_to_data, inject_$setter_to_data, inject_computed_to_controller, inject_method_to_data, inject_watcher_to_controller, } from "../../system/injection/injector";
|
|
5
5
|
import { after_process_for_post } from "../../system/lifecycle/lifeCycle";
|
|
6
6
|
import { findComponent } from "../delivery/delivery";
|
|
7
7
|
import { parse_directive_salt_collect } from "../directive/salt/v-solt";
|
|
@@ -39,7 +39,7 @@ export function raw_renderer(protoType, parent, child, parentController) {
|
|
|
39
39
|
inject_$name_to_data(protoType.getName(), currentController.originalData);
|
|
40
40
|
inject_$props_to_data(child, protoType.getProps(), currentController.originalData);
|
|
41
41
|
inject_$refs_to_data(tagTemplate, currentController.originalData);
|
|
42
|
-
inject_$
|
|
42
|
+
inject_$plugins_to_data(currentController.originalData);
|
|
43
43
|
inject_$http_to_data(currentController.originalData);
|
|
44
44
|
inject_$pathVariable_to_data(currentController.originalData);
|
|
45
45
|
inject_$commit_to_data(currentController.originalData, get_commit_method(currentController));
|
package/package.json
CHANGED
|
@@ -6,8 +6,9 @@ export interface ComputedDataGeneric {
|
|
|
6
6
|
$refs?: Map<string, any>;
|
|
7
7
|
$pathVariable?: Map<string, any>;
|
|
8
8
|
$http?: HttpAction;
|
|
9
|
-
$
|
|
9
|
+
$plugins?: (plugin: string) => any;
|
|
10
10
|
$commit?: (method: string, ...args: [any]) => void;
|
|
11
11
|
$publish?: (method: string, ...args: [any]) => void;
|
|
12
12
|
$get?: (name: string) => any;
|
|
13
|
+
$set?: (name: string, value: any) => void;
|
|
13
14
|
}
|
|
@@ -6,8 +6,9 @@ export interface OriginalDataGeneric {
|
|
|
6
6
|
$refs?: Map<string, any>;
|
|
7
7
|
$pathVariable?: Map<string, any>;
|
|
8
8
|
$http?: HttpAction;
|
|
9
|
-
$
|
|
9
|
+
$plugins?: (plugin: string) => any;
|
|
10
10
|
$commit?: (method: string, ...args: [any]) => void;
|
|
11
11
|
$publish?: (method: string, ...args: [any]) => void;
|
|
12
12
|
$get?: (name: string) => any;
|
|
13
|
+
$set?: (name: string, value: any) => void;
|
|
13
14
|
}
|
|
@@ -6,8 +6,9 @@ export interface WatcherDataGeneric {
|
|
|
6
6
|
$refs?: Map<string, any>;
|
|
7
7
|
$pathVariable?: Map<string, any>;
|
|
8
8
|
$http?: HttpAction;
|
|
9
|
-
$
|
|
9
|
+
$plugins?: (plugin: string) => any;
|
|
10
10
|
$commit?: (method: string, ...args: [any]) => void;
|
|
11
11
|
$publish?: (method: string, ...args: [any]) => void;
|
|
12
12
|
$get?: (name: string) => any;
|
|
13
|
+
$set?: (name: string, value: any) => void;
|
|
13
14
|
}
|
|
@@ -1,14 +1,62 @@
|
|
|
1
1
|
import { ContextController } from "../prototype/ContextController";
|
|
2
2
|
import { Component } from "../../index";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param name
|
|
6
|
+
* @param origin
|
|
7
|
+
*/
|
|
3
8
|
export declare function inject_$name_to_data(name: string, origin: {}): void;
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param childNode
|
|
12
|
+
* @param meta
|
|
13
|
+
* @param origin
|
|
14
|
+
*/
|
|
4
15
|
export declare function inject_$props_to_data(childNode: ChildNode, meta: {} | [], origin: object): void;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param template
|
|
19
|
+
* @param origin
|
|
20
|
+
*/
|
|
5
21
|
export declare function inject_$refs_to_data(template: Element, origin: object): void;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param config
|
|
25
|
+
*/
|
|
26
|
+
export declare function inject_$plugins_to_data(config: object): void;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param origin
|
|
30
|
+
*/
|
|
6
31
|
export declare function inject_$http_to_data(origin: {}): void;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param origin
|
|
35
|
+
*/
|
|
7
36
|
export declare function inject_$pathVariable_to_data(origin: {}): void;
|
|
8
|
-
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param data
|
|
40
|
+
* @param commit
|
|
41
|
+
*/
|
|
9
42
|
export declare function inject_$commit_to_data(data: {}, commit: any): void;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param data
|
|
46
|
+
* @param publisher
|
|
47
|
+
*/
|
|
10
48
|
export declare function inject_$publish_to_data(data: {}, publisher: any): void;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param data
|
|
52
|
+
* @param setter
|
|
53
|
+
*/
|
|
11
54
|
export declare function inject_$setter_to_data(data: {}, setter: any): void;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param data
|
|
58
|
+
* @param getter
|
|
59
|
+
*/
|
|
12
60
|
export declare function inject_$getter_to_data(data: {}, getter: any): void;
|
|
13
61
|
/**
|
|
14
62
|
*
|
|
@@ -2,40 +2,86 @@ import { resolve_props } from "../resolver/props";
|
|
|
2
2
|
import { parse_directive_refs } from "../../kernel/directive/ref/v-ref";
|
|
3
3
|
import { get_user_anonymous_ext, get_user_ext_http } from "../recorder/table3/system_func_3";
|
|
4
4
|
import { get_path_variable } from "../recorder/table1/system_func_1";
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param name
|
|
8
|
+
* @param origin
|
|
9
|
+
*/
|
|
5
10
|
export function inject_$name_to_data(name, origin) {
|
|
6
11
|
Reflect.set(origin, "$name", name);
|
|
7
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param childNode
|
|
16
|
+
* @param meta
|
|
17
|
+
* @param origin
|
|
18
|
+
*/
|
|
8
19
|
export function inject_$props_to_data(childNode, meta, origin) {
|
|
9
20
|
var props = resolve_props(childNode, meta);
|
|
10
21
|
Reflect.set(origin, "$props", props);
|
|
11
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param template
|
|
26
|
+
* @param origin
|
|
27
|
+
*/
|
|
12
28
|
export function inject_$refs_to_data(template, origin) {
|
|
13
29
|
var refs = new Map();
|
|
14
30
|
parse_directive_refs(template.children, refs);
|
|
15
31
|
Reflect.set(origin, "$refs", refs);
|
|
16
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
|
+
*/
|
|
17
46
|
export function inject_$http_to_data(origin) {
|
|
18
47
|
Reflect.set(origin, "$http", get_user_ext_http());
|
|
19
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param origin
|
|
52
|
+
*/
|
|
20
53
|
export function inject_$pathVariable_to_data(origin) {
|
|
21
54
|
Reflect.set(origin, "$pathVariable", get_path_variable());
|
|
22
55
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
//注入对象
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @param data
|
|
59
|
+
* @param commit
|
|
60
|
+
*/
|
|
29
61
|
export function inject_$commit_to_data(data, commit) {
|
|
30
62
|
Reflect.set(data, "$commit", commit);
|
|
31
63
|
}
|
|
32
|
-
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param data
|
|
67
|
+
* @param publisher
|
|
68
|
+
*/
|
|
33
69
|
export function inject_$publish_to_data(data, publisher) {
|
|
34
70
|
Reflect.set(data, "$publish", publisher);
|
|
35
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param data
|
|
75
|
+
* @param setter
|
|
76
|
+
*/
|
|
36
77
|
export function inject_$setter_to_data(data, setter) {
|
|
37
78
|
Reflect.set(data, "$set", setter);
|
|
38
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @param data
|
|
83
|
+
* @param getter
|
|
84
|
+
*/
|
|
39
85
|
export function inject_$getter_to_data(data, getter) {
|
|
40
86
|
Reflect.set(data, "$get", getter);
|
|
41
87
|
}
|