render-core 1.4.10 → 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
- package/system/define/ContextController.d.ts +0 -29
- package/system/define/ContextController.js +0 -23
- package/system/generic/ControllerGeneric.d.ts +0 -21
- package/system/generic/ControllerGeneric.js +0 -1
- package/system/generic/RenderGeneric.d.ts +0 -4
- package/system/generic/RenderGeneric.js +0 -1
- package/system/http/Http.d.ts +0 -11
- package/system/http/Http.js +0 -36
- package/system/injection/inject.d.ts +0 -26
- package/system/injection/inject.js +0 -63
- package/system/router/router.d.ts +0 -3
- package/system/router/router.js +0 -20
- package/system/utility/checkUtility.d.ts +0 -1
- package/system/utility/checkUtility.js +0 -4
- package/system/utility/cmdUtility.d.ts +0 -15
- package/system/utility/cmdUtility.js +0 -43
- package/system/utility/dataUtility.d.ts +0 -5
- package/system/utility/dataUtility.js +0 -12
- package/system/utility/errorUtility.d.ts +0 -3
- package/system/utility/errorUtility.js +0 -9
- package/system/utility/injectUtility.d.ts +0 -4
- package/system/utility/injectUtility.js +0 -14
- package/system/utility/inputType.d.ts +0 -5
- package/system/utility/inputType.js +0 -20
- package/system/utility/inputUtility.d.ts +0 -5
- package/system/utility/inputUtility.js +0 -108
- package/system/utility/miscUtility.d.ts +0 -6
- package/system/utility/miscUtility.js +0 -12
- package/system/utility/modelUtility.d.ts +0 -15
- package/system/utility/modelUtility.js +0 -66
- package/system/utility/sectionUtility.d.ts +0 -6
- package/system/utility/sectionUtility.js +0 -107
- package/system/utility/styleUtility.d.ts +0 -29
- package/system/utility/styleUtility.js +0 -102
- package/system/utility/templateUtility.d.ts +0 -5
- package/system/utility/templateUtility.js +0 -10
- package/tension/DefaultRouterPlugin.d.ts +0 -17
- package/tension/DefaultRouterPlugin.js +0 -11
- package/tension/generic/ComponentGeneric.d.ts +0 -13
- package/tension/generic/ComponentGeneric.js +0 -1
- package/tension/generic/HooksGeneric.d.ts +0 -6
- package/tension/generic/HooksGeneric.js +0 -1
- package/tension/generic/OriginalDataGeneric.d.ts +0 -18
- package/tension/generic/OriginalDataGeneric.js +0 -1
- package/tension/generic/PluginGeneric.d.ts +0 -5
- package/tension/generic/PluginGeneric.js +0 -1
- package/tension/generic/PrefaceGeneric.d.ts +0 -6
- package/tension/generic/PrefaceGeneric.js +0 -1
- package/tension/generic/RouterGeneric.d.ts +0 -5
- package/tension/generic/RouterGeneric.js +0 -1
- package/tension/prototype/AbstractRouter.d.ts +0 -6
- package/tension/prototype/AbstractRouter.js +0 -12
- package/tension/prototype/RouterAction.d.ts +0 -9
- package/tension/prototype/RouterAction.js +0 -20
- /package/xboot/{Entrance.d.ts → entrance.d.ts} +0 -0
- /package/xboot/{Entrance.js → entrance.js} +0 -0
- /package/xboot/{RenderProcessor.d.ts → renderProcessor.d.ts} +0 -0
- /package/xboot/{RenderProcessor.js → renderProcessor.js} +0 -0
- /package/xboot/{TagProcessor.d.ts → tagProcessor.d.ts} +0 -0
- /package/xboot/{TagProcessor.js → tagProcessor.js} +0 -0
|
@@ -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
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ControllerGeneric } from "../generic/controller/ControllerGeneric";
|
|
2
|
-
import { Component } from "../../index";
|
|
3
|
-
export declare class ContextController implements ControllerGeneric {
|
|
4
|
-
componentAttachedRootElement: ParentNode | Element;
|
|
5
|
-
prototypeOfComponent: Component;
|
|
6
|
-
parentController: ContextController;
|
|
7
|
-
anchor: HTMLElement;
|
|
8
|
-
begin: HTMLElement;
|
|
9
|
-
componentConfig: {
|
|
10
|
-
boxMode: boolean;
|
|
11
|
-
plugins?: Map<string, any>;
|
|
12
|
-
};
|
|
13
|
-
originalData: {};
|
|
14
|
-
dataForMethod: {};
|
|
15
|
-
dataForComputed: {};
|
|
16
|
-
dataForWatcher: {};
|
|
17
|
-
salt: Map<string, any>;
|
|
18
|
-
lazyComponent: Map<string, {}>;
|
|
19
|
-
slaveComponent: ContextController[];
|
|
20
|
-
method: {};
|
|
21
|
-
computed: {};
|
|
22
|
-
watcher: {};
|
|
23
|
-
constructor(config: {
|
|
24
|
-
boxMode: boolean;
|
|
25
|
-
$plugins?: Map<string, any>;
|
|
26
|
-
});
|
|
27
|
-
receiver(method: string, ...args: any[]): any;
|
|
28
|
-
flush(): void;
|
|
29
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { update_Render } from "../../kernel/renderer/updateRender";
|
|
2
|
-
var ContextController = /** @class */ (function () {
|
|
3
|
-
//构造函数
|
|
4
|
-
function ContextController(config) {
|
|
5
|
-
this.lazyComponent = new Map();
|
|
6
|
-
this.slaveComponent = Array();
|
|
7
|
-
this.salt = new Map();
|
|
8
|
-
this.componentConfig = config;
|
|
9
|
-
}
|
|
10
|
-
//接收器
|
|
11
|
-
ContextController.prototype.receiver = function (method) {
|
|
12
|
-
var args = [];
|
|
13
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
14
|
-
args[_i - 1] = arguments[_i];
|
|
15
|
-
}
|
|
16
|
-
return this.prototypeOfComponent.getMethods()[method].apply(this.dataForMethod, args);
|
|
17
|
-
};
|
|
18
|
-
ContextController.prototype.flush = function () {
|
|
19
|
-
update_Render(this);
|
|
20
|
-
};
|
|
21
|
-
return ContextController;
|
|
22
|
-
}());
|
|
23
|
-
export { ContextController };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ContextController } from "../define/ContextController";
|
|
2
|
-
import { Component } from "../../index";
|
|
3
|
-
export interface ControllerGeneric {
|
|
4
|
-
componentAttachedRootElement: ParentNode;
|
|
5
|
-
prototypeOfComponent: Component;
|
|
6
|
-
parentController: ContextController;
|
|
7
|
-
componentConfig: {
|
|
8
|
-
boxMode: boolean;
|
|
9
|
-
};
|
|
10
|
-
originalData: {};
|
|
11
|
-
dataForMethod: {};
|
|
12
|
-
dataForComputed: {};
|
|
13
|
-
salt: Map<string, any>;
|
|
14
|
-
lazyComponent: Map<string, {}>;
|
|
15
|
-
slaveComponent: ContextController[];
|
|
16
|
-
method: {};
|
|
17
|
-
computed: {};
|
|
18
|
-
watcher: {};
|
|
19
|
-
receiver(method: string, ...args: any[]): any;
|
|
20
|
-
flush(): void;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/system/http/Http.d.ts
DELETED
package/system/http/Http.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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 relocate(position) {
|
|
35
|
-
location.hash = position;
|
|
36
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
import { Component } from "../../index";
|
|
3
|
-
export declare function inject_$name_to_data(name: string, origin: {}): void;
|
|
4
|
-
export declare function inject_$props_to_data(childNode: ChildNode, meta: {} | [], origin: object): void;
|
|
5
|
-
export declare function inject_$refs_to_data(template: Element, origin: object): void;
|
|
6
|
-
export declare function inject_$http_to_data(origin: {}): void;
|
|
7
|
-
export declare function inject_$pathVariable_to_data(origin: {}): void;
|
|
8
|
-
export declare function inject_$plugin_to_data(config: object): void;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param controller
|
|
12
|
-
* @param proto
|
|
13
|
-
*/
|
|
14
|
-
export declare function inject_method_to_data(controller: ContextController, proto: Component): void;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param controller
|
|
18
|
-
* @param proto
|
|
19
|
-
*/
|
|
20
|
-
export declare function inject_watcher_to_controller(controller: ContextController, proto: Component): void;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param controller
|
|
24
|
-
* @param proto
|
|
25
|
-
*/
|
|
26
|
-
export declare function inject_computed_to_controller(controller: ContextController, proto: Component): void;
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
export function inject_$name_to_data(name, origin) {
|
|
6
|
-
Reflect.set(origin, "$name", name);
|
|
7
|
-
}
|
|
8
|
-
export function inject_$props_to_data(childNode, meta, origin) {
|
|
9
|
-
var props = resolve_props(childNode, meta);
|
|
10
|
-
Reflect.set(origin, "$props", props);
|
|
11
|
-
}
|
|
12
|
-
export function inject_$refs_to_data(template, origin) {
|
|
13
|
-
var refs = new Map();
|
|
14
|
-
parse_directive_refs(template.children, refs);
|
|
15
|
-
Reflect.set(origin, "$refs", refs);
|
|
16
|
-
}
|
|
17
|
-
export function inject_$http_to_data(origin) {
|
|
18
|
-
Reflect.set(origin, "$http", get_user_ext_http());
|
|
19
|
-
}
|
|
20
|
-
export function inject_$pathVariable_to_data(origin) {
|
|
21
|
-
Reflect.set(origin, "$pathVariable", get_path_variable());
|
|
22
|
-
}
|
|
23
|
-
export function inject_$plugin_to_data(config) {
|
|
24
|
-
Reflect.set(config, "$plugins", function (name) {
|
|
25
|
-
return get_user_anonymous_ext(name);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @param controller
|
|
31
|
-
* @param proto
|
|
32
|
-
*/
|
|
33
|
-
export function inject_method_to_data(controller, proto) {
|
|
34
|
-
var methods = Object.getOwnPropertyNames(proto.getMethods());
|
|
35
|
-
methods.forEach(function (value) {
|
|
36
|
-
if (value.match(/^\$\$[a-zA-Z0-9_]*/) !== null)
|
|
37
|
-
Reflect.set(controller.originalData, value, proto.getMethods()[value].bind(controller.originalData));
|
|
38
|
-
else
|
|
39
|
-
Reflect.set(controller.originalData, value, proto.getMethods()[value].bind(controller.dataForMethod));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @param controller
|
|
45
|
-
* @param proto
|
|
46
|
-
*/
|
|
47
|
-
export function inject_watcher_to_controller(controller, proto) {
|
|
48
|
-
var methods = Object.getOwnPropertyNames(proto.getWatcher());
|
|
49
|
-
methods.forEach(function (value) {
|
|
50
|
-
Reflect.set(controller.watcher, value, proto.getWatcher()[value].bind(controller.originalData));
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @param controller
|
|
56
|
-
* @param proto
|
|
57
|
-
*/
|
|
58
|
-
export function inject_computed_to_controller(controller, proto) {
|
|
59
|
-
var methods = Object.getOwnPropertyNames(proto.getComputed());
|
|
60
|
-
methods.forEach(function (value) {
|
|
61
|
-
Reflect.set(controller.computed, value, proto.getComputed()[value].bind(controller.originalData));
|
|
62
|
-
});
|
|
63
|
-
}
|
package/system/router/router.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { get_context_controller, get_router_for_application } from "../recorder/table0/system_func_0";
|
|
2
|
-
import { spa_delivery } from "../../kernel/delivery/delivery";
|
|
3
|
-
export function router_listener_with_router(view) {
|
|
4
|
-
if (view !== null) {
|
|
5
|
-
var controller = get_context_controller();
|
|
6
|
-
var router = get_router_for_application();
|
|
7
|
-
var component = router.getComponentByUrl(location.pathname);
|
|
8
|
-
spa_delivery(component, view.parentNode, view, controller);
|
|
9
|
-
}
|
|
10
|
-
else
|
|
11
|
-
console.log("Without view element to render");
|
|
12
|
-
}
|
|
13
|
-
export function router_listener_without_router(component, view) {
|
|
14
|
-
if (view !== null) {
|
|
15
|
-
var controller = get_context_controller();
|
|
16
|
-
spa_delivery(component, view.parentNode, view, controller);
|
|
17
|
-
}
|
|
18
|
-
else
|
|
19
|
-
console.log("Without view element to render");
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isUnKnown(element: string): boolean;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
import { Component } from "../../index";
|
|
3
|
-
/**
|
|
4
|
-
* This function is used to parse_directive those commands which should be executed before mount.
|
|
5
|
-
* @param tagTemplate
|
|
6
|
-
* @param proto
|
|
7
|
-
* @param controller
|
|
8
|
-
*/
|
|
9
|
-
export declare function directive_parse_collection_for_before(tagTemplate: Element, proto: Component, controller: ContextController): void;
|
|
10
|
-
/**
|
|
11
|
-
* This function is used to parse_directive those commands which should be executed after mount.
|
|
12
|
-
* @param templateSpace
|
|
13
|
-
* @param controller
|
|
14
|
-
*/
|
|
15
|
-
export declare function directive_parse_collection_for_after(templateSpace: ParentNode, controller: ContextController): void;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { add_label_to_element } from "./miscUtility";
|
|
2
|
-
import { parse_directive_event } from "../../kernel/directive/method/v-on";
|
|
3
|
-
import { parse_directive_html } from "../../kernel/directive/data/v-html";
|
|
4
|
-
import { parse_directive_txt } from "../../kernel/directive/data/v-txt";
|
|
5
|
-
import { parse_directive_model } from "../../kernel/directive/react/v-model";
|
|
6
|
-
import { parse_directive_bind } from "../../kernel/directive/property/v-bind";
|
|
7
|
-
import { parse_directive_show } from "../../kernel/directive/justify/v-show";
|
|
8
|
-
import { parse_directive_render } from "../../kernel/directive/justify/v-render";
|
|
9
|
-
import { parse_directive_if } from "../../kernel/directive/justify/v-if";
|
|
10
|
-
import { parse_directive_switch } from "../../kernel/directive/justify/v-switch";
|
|
11
|
-
import { parse_directive_for_of } from "../../kernel/directive/loop/v-for";
|
|
12
|
-
import { parse_directive_salt_extract } from "../../kernel/directive/salt/v-solt";
|
|
13
|
-
import { parse_directive_expression } from "../../kernel/directive/data/v-el";
|
|
14
|
-
import { parse_directive_for_map } from "../../kernel/directive/loop/v-map";
|
|
15
|
-
/**
|
|
16
|
-
* This function is used to parse_directive those commands which should be executed before mount.
|
|
17
|
-
* @param tagTemplate
|
|
18
|
-
* @param proto
|
|
19
|
-
* @param controller
|
|
20
|
-
*/
|
|
21
|
-
export function directive_parse_collection_for_before(tagTemplate, proto, controller) {
|
|
22
|
-
add_label_to_element(tagTemplate.children, proto.getName());
|
|
23
|
-
parse_directive_event(tagTemplate.children, proto.getMethods(), controller.dataForMethod, controller.originalData);
|
|
24
|
-
parse_directive_html(tagTemplate.children, controller.dataForMethod, controller);
|
|
25
|
-
parse_directive_txt(tagTemplate.children, controller.dataForMethod, controller);
|
|
26
|
-
parse_directive_model(tagTemplate.children, controller.dataForMethod);
|
|
27
|
-
parse_directive_bind(tagTemplate.children, controller.dataForMethod);
|
|
28
|
-
parse_directive_salt_extract(tagTemplate.children, controller);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* This function is used to parse_directive those commands which should be executed after mount.
|
|
32
|
-
* @param templateSpace
|
|
33
|
-
* @param controller
|
|
34
|
-
*/
|
|
35
|
-
export function directive_parse_collection_for_after(templateSpace, controller) {
|
|
36
|
-
parse_directive_show(templateSpace.children, controller.dataForMethod);
|
|
37
|
-
parse_directive_render(templateSpace.children, controller.dataForMethod);
|
|
38
|
-
parse_directive_if(templateSpace.children, controller.dataForMethod);
|
|
39
|
-
parse_directive_switch(templateSpace.children, controller.dataForMethod);
|
|
40
|
-
parse_directive_for_map(templateSpace.children, controller.dataForMethod);
|
|
41
|
-
parse_directive_for_of(templateSpace.children, controller.dataForMethod);
|
|
42
|
-
parse_directive_expression(controller.componentAttachedRootElement, controller.dataForMethod, controller);
|
|
43
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function getCodeSpaceForCommit(data: {}, commit: any): void;
|
|
2
|
-
export declare function getCodeSpaceForPublish(data: {}, publisher: any): void;
|
|
3
|
-
export declare function getSetCodeSpaceForProperty(data: {}, setter: any): void;
|
|
4
|
-
export declare function getGetCodeSpaceForProperty(data: {}, getter: any): void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//注入对象
|
|
2
|
-
export function getCodeSpaceForCommit(data, commit) {
|
|
3
|
-
Reflect.set(data, "$commit", commit);
|
|
4
|
-
}
|
|
5
|
-
//注入对象
|
|
6
|
-
export function getCodeSpaceForPublish(data, publisher) {
|
|
7
|
-
Reflect.set(data, "$publish", publisher);
|
|
8
|
-
}
|
|
9
|
-
export function getSetCodeSpaceForProperty(data, setter) {
|
|
10
|
-
Reflect.set(data, "$set", setter);
|
|
11
|
-
}
|
|
12
|
-
export function getGetCodeSpaceForProperty(data, getter) {
|
|
13
|
-
Reflect.set(data, "$get", getter);
|
|
14
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
export declare function textType(target: any, doc: any, controller: ContextController): void;
|
|
3
|
-
export declare function assignType(target: any, controller: ContextController): void;
|
|
4
|
-
export declare function fileType(target: any, controller: ContextController): void;
|
|
5
|
-
export declare function checkType(target: any): void;
|