render-core 1.4.30 → 1.4.32
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 +66 -33
- package/index.js +55 -49
- package/kernel/delivery/delivery.d.ts +4 -10
- package/kernel/delivery/delivery.js +4 -17
- package/kernel/directive/data/v-el.d.ts +1 -1
- package/kernel/directive/data/v-html.d.ts +1 -1
- package/kernel/directive/data/v-txt.d.ts +1 -1
- package/kernel/directive/justify/v-if.js +2 -2
- package/kernel/directive/slot/v-slot.d.ts +13 -0
- package/kernel/directive/slot/v-slot.js +46 -0
- package/kernel/proxyer/getProxy.d.ts +1 -1
- package/kernel/renderer/initRender.d.ts +3 -3
- package/kernel/renderer/initRender.js +7 -6
- package/kernel/renderer/pageRender.d.ts +9 -0
- package/kernel/renderer/pageRender.js +53 -0
- package/kernel/renderer/postRender.d.ts +3 -3
- package/kernel/renderer/postRender.js +5 -4
- package/kernel/renderer/rawRender.d.ts +3 -3
- package/kernel/renderer/rawRender.js +5 -4
- package/kernel/renderer/updateRender.d.ts +1 -1
- package/kernel/router/router.d.ts +3 -9
- package/kernel/router/router.js +10 -30
- package/package.json +1 -1
- package/system/generic/component/ComponentGeneric.d.ts +2 -2
- package/system/generic/component/instance/AbstractComponent.d.ts +41 -0
- package/system/generic/component/instance/AbstractComponent.js +98 -0
- package/system/generic/controller/ControllerGeneric.d.ts +3 -3
- package/system/generic/controller/prototype/ContextController.d.ts +30 -0
- package/system/generic/controller/prototype/ContextController.js +17 -0
- package/system/generic/controller/prototype/HttpAction.d.ts +9 -0
- package/system/generic/controller/prototype/HttpAction.js +37 -0
- package/system/generic/data/ComputedDataGeneric.d.ts +1 -1
- package/system/generic/data/OriginalDataGeneric.d.ts +1 -1
- package/system/generic/data/WatcherDataGeneric.d.ts +1 -1
- package/system/generic/render/RenderGeneric.d.ts +2 -4
- package/system/injection/injection.d.ts +1 -1
- package/system/injection/injector.d.ts +5 -5
- package/system/lifecycle/lifeCycle.d.ts +1 -1
- package/system/lifecycle/mount.d.ts +3 -3
- package/system/lifecycle/mount.js +1 -1
- package/system/recorder/table0/system_func_0.d.ts +5 -5
- package/system/recorder/table0/system_t_0.d.ts +2 -2
- package/system/recorder/table1/system_func_1.d.ts +2 -0
- package/system/recorder/table1/system_func_1.js +6 -0
- package/system/recorder/table3/system_func_3.d.ts +1 -1
- package/system/utility/directive/cmdUtility.d.ts +3 -3
- package/system/utility/directive/cmdUtility.js +1 -1
- package/system/utility/initiate/miscUtility.js +2 -1
- package/system/utility/initiate/templateUtility.d.ts +2 -2
- package/system/utility/react/inputType.d.ts +1 -1
- package/system/utility/react/sectionUtility.d.ts +1 -1
- package/system/utility/style/styleUtility.d.ts +13 -2
- package/system/utility/style/styleUtility.js +43 -2
- package/tension/SystemInitPlugin.js +1 -1
- package/tension/generic/plugin/hooks/HooksGeneric.d.ts +0 -2
- package/tension/generic/plugin/preface/PrefaceGeneric.d.ts +3 -3
- package/tension/generic/router/RouterGeneric.d.ts +6 -3
- package/tension/prototype/HooksAction.d.ts +0 -2
- package/tension/prototype/HooksAction.js +0 -4
- package/tension/prototype/PrefaceAction.d.ts +3 -3
- package/verify/directive-linter.d.ts +0 -4
- package/verify/directive-linter.js +152 -123
- package/xboot/entrance.d.ts +1 -13
- package/xboot/entrance.js +3 -49
- package/xboot/renderProcessor.d.ts +1 -1
- package/xboot/tagProcessor.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContextController } from "../../system/prototype/ContextController";
|
|
2
|
-
import {
|
|
1
|
+
import { ContextController } from "../../system/generic/controller/prototype/ContextController";
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../index";
|
|
3
3
|
/**
|
|
4
4
|
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
5
5
|
* @param protoType
|
|
@@ -7,4 +7,4 @@ import { Component } from "../../index";
|
|
|
7
7
|
* @param child
|
|
8
8
|
* @param parentController
|
|
9
9
|
*/
|
|
10
|
-
export declare function raw_renderer(protoType:
|
|
10
|
+
export declare function raw_renderer(protoType: AdjustComponent | ControlComponent, parent: ParentNode, child: Element, parentController: ContextController): void;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { ContextController } from "../../system/prototype/ContextController";
|
|
1
|
+
import { ContextController } from "../../system/generic/controller/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
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
|
-
import { parse_directive_salt_collect } from "../directive/
|
|
7
|
+
import { parse_directive_salt_collect } from "../directive/slot/v-slot";
|
|
8
8
|
import { getTemplate } from "../../system/utility/initiate/templateUtility";
|
|
9
9
|
import { loader_tag_style } from "../../system/utility/style/styleUtility";
|
|
10
10
|
import { get_style_library } from "../../system/recorder/table0/system_func_0";
|
|
11
11
|
import { get_proxy_for_computed, get_proxy_for_method, get_proxy_for_watcher } from "../proxyer/getProxy";
|
|
12
12
|
import { dataInject } from "../../system/utility/data/dataUtility";
|
|
13
13
|
import { get_commit_method, get_getter_method, get_publish_method, get_setter_method } from "../../system/injection/injection";
|
|
14
|
+
import { AdjustComponent } from "../../index";
|
|
14
15
|
/**
|
|
15
16
|
* 该函数用于处理需要更更新时候,需要从父组件提取数据状态的渲染操作
|
|
16
17
|
* @param protoType
|
|
@@ -29,7 +30,7 @@ export function raw_renderer(protoType, parent, child, parentController) {
|
|
|
29
30
|
/* initiate to controller */
|
|
30
31
|
currentController.parentController = parentController;
|
|
31
32
|
currentController.prototypeOfComponent = protoType;
|
|
32
|
-
currentController.componentConfig.boxMode = protoType
|
|
33
|
+
currentController.componentConfig.boxMode = protoType instanceof AdjustComponent;
|
|
33
34
|
// @ts-ignore
|
|
34
35
|
currentController.originalData = dataInject(protoType.getData());
|
|
35
36
|
currentController.dataForMethod = get_proxy_for_method(currentController.originalData, currentController);
|
|
@@ -62,7 +63,7 @@ export function raw_renderer(protoType, parent, child, parentController) {
|
|
|
62
63
|
after_process_for_post(currentController, parentController);
|
|
63
64
|
/* find the next element to render */
|
|
64
65
|
findComponent(currentController.componentAttachedRootElement.children, currentController);
|
|
65
|
-
if (
|
|
66
|
+
if (protoType instanceof AdjustComponent)
|
|
66
67
|
/* extract mount */
|
|
67
68
|
extract_mount(currentController);
|
|
68
69
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { Component } from "../../index";
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
2
|
* @param view
|
|
3
|
+
* @param params
|
|
4
|
+
* @param pathParams
|
|
5
5
|
*/
|
|
6
|
-
export declare function router_listener_with_router(view: HTMLElement): void;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param component
|
|
10
|
-
* @param mounter
|
|
11
|
-
*/
|
|
12
|
-
export declare function router_listener_without_router(component: Component, mounter: HTMLElement): void;
|
|
6
|
+
export declare function router_listener_with_router(view: HTMLElement, params: Map<string, any>, pathParams: Map<string, any>): void;
|
package/kernel/router/router.js
CHANGED
|
@@ -1,37 +1,17 @@
|
|
|
1
1
|
import { get_context_controller } from "../../system/recorder/table0/system_func_0";
|
|
2
2
|
import { spa_delivery } from "../delivery/delivery";
|
|
3
3
|
import { get_system_ext_router } from "../../system/recorder/table3/system_func_3";
|
|
4
|
-
import { set_path_variable } from "../../system/recorder/table1/system_func_1";
|
|
4
|
+
import { set_params_variable, set_path_variable } from "../../system/recorder/table1/system_func_1";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
6
|
* @param view
|
|
7
|
+
* @param params
|
|
8
|
+
* @param pathParams
|
|
8
9
|
*/
|
|
9
|
-
export function router_listener_with_router(view) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var component = router.getComponent();
|
|
17
|
-
var variable = router.getPathVariable();
|
|
18
|
-
set_path_variable(variable);
|
|
19
|
-
spa_delivery(component, view.parentNode, view, controller);
|
|
20
|
-
}
|
|
21
|
-
else
|
|
22
|
-
console.warn("Without view element to render");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @param component
|
|
28
|
-
* @param mounter
|
|
29
|
-
*/
|
|
30
|
-
export function router_listener_without_router(component, mounter) {
|
|
31
|
-
if (mounter !== null) {
|
|
32
|
-
var controller = get_context_controller();
|
|
33
|
-
spa_delivery(component, mounter.parentNode, mounter, controller);
|
|
34
|
-
}
|
|
35
|
-
else
|
|
36
|
-
console.warn("Without mounter element to render");
|
|
10
|
+
export function router_listener_with_router(view, params, pathParams) {
|
|
11
|
+
var controller = get_context_controller();
|
|
12
|
+
var router = get_system_ext_router();
|
|
13
|
+
var component = router.getComponent();
|
|
14
|
+
set_params_variable(params);
|
|
15
|
+
set_path_variable(pathParams);
|
|
16
|
+
spa_delivery(component.component, view, controller);
|
|
37
17
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentGeneric } from "../ComponentGeneric";
|
|
2
|
+
/**
|
|
3
|
+
* This is the component prototype.
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class AbstractComponent implements ComponentGeneric {
|
|
6
|
+
private readonly template;
|
|
7
|
+
private readonly style;
|
|
8
|
+
private readonly props?;
|
|
9
|
+
private readonly data?;
|
|
10
|
+
private readonly methods?;
|
|
11
|
+
private readonly computed?;
|
|
12
|
+
private readonly watcher?;
|
|
13
|
+
private readonly beforeRender?;
|
|
14
|
+
private readonly afterRender?;
|
|
15
|
+
protected constructor(config: {
|
|
16
|
+
template: {
|
|
17
|
+
name: string;
|
|
18
|
+
vDate: string;
|
|
19
|
+
template: string;
|
|
20
|
+
};
|
|
21
|
+
style?: string;
|
|
22
|
+
props?: {} | string[];
|
|
23
|
+
data?: {};
|
|
24
|
+
computed?: {};
|
|
25
|
+
methods?: {};
|
|
26
|
+
watcher?: {};
|
|
27
|
+
beforeRender?: () => void;
|
|
28
|
+
afterRender?: () => void;
|
|
29
|
+
});
|
|
30
|
+
getName(): string;
|
|
31
|
+
getTemplate(): string;
|
|
32
|
+
getVDate(): string;
|
|
33
|
+
getStyle(): string;
|
|
34
|
+
getProps(): {};
|
|
35
|
+
getData(): {};
|
|
36
|
+
getMethods(): {};
|
|
37
|
+
getComputed(): {};
|
|
38
|
+
getWatcher(): {};
|
|
39
|
+
getBeforeRender(): () => void;
|
|
40
|
+
getAfterRender(): () => void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is the component prototype.
|
|
3
|
+
*/
|
|
4
|
+
var AbstractComponent = /** @class */ (function () {
|
|
5
|
+
function AbstractComponent(config) {
|
|
6
|
+
//标签模板样式
|
|
7
|
+
this.template = config.template;
|
|
8
|
+
if (typeof config.style === "undefined") {
|
|
9
|
+
this.style = "";
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
this.style = config.style;
|
|
13
|
+
}
|
|
14
|
+
//props validate
|
|
15
|
+
if (typeof config.props === "undefined") {
|
|
16
|
+
this.props = [];
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.props = config.props;
|
|
20
|
+
}
|
|
21
|
+
//添加数据
|
|
22
|
+
if (typeof config.data === "undefined") {
|
|
23
|
+
this.data = {};
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.data = config.data;
|
|
27
|
+
}
|
|
28
|
+
//添加计算属性
|
|
29
|
+
if (typeof config.computed === "undefined") {
|
|
30
|
+
this.computed = {};
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.computed = config.computed;
|
|
34
|
+
}
|
|
35
|
+
//添加方法属性
|
|
36
|
+
if (typeof config.methods === "undefined") {
|
|
37
|
+
this.methods = {};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.methods = config.methods;
|
|
41
|
+
}
|
|
42
|
+
//添加监控属性
|
|
43
|
+
if (typeof config.watcher === "undefined") {
|
|
44
|
+
this.watcher = {};
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.watcher = config.watcher;
|
|
48
|
+
}
|
|
49
|
+
//生命周期函数
|
|
50
|
+
if (typeof config.beforeRender === "undefined") {
|
|
51
|
+
this.beforeRender = function () { };
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.beforeRender = config.beforeRender;
|
|
55
|
+
}
|
|
56
|
+
if (typeof config.afterRender === "undefined") {
|
|
57
|
+
this.afterRender = function () { };
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.afterRender = config.afterRender;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
AbstractComponent.prototype.getName = function () {
|
|
64
|
+
return this.template.name;
|
|
65
|
+
};
|
|
66
|
+
AbstractComponent.prototype.getTemplate = function () {
|
|
67
|
+
return this.template.template;
|
|
68
|
+
};
|
|
69
|
+
AbstractComponent.prototype.getVDate = function () {
|
|
70
|
+
return this.template.vDate;
|
|
71
|
+
};
|
|
72
|
+
AbstractComponent.prototype.getStyle = function () {
|
|
73
|
+
return this.style;
|
|
74
|
+
};
|
|
75
|
+
AbstractComponent.prototype.getProps = function () {
|
|
76
|
+
return this.props;
|
|
77
|
+
};
|
|
78
|
+
AbstractComponent.prototype.getData = function () {
|
|
79
|
+
return this.data;
|
|
80
|
+
};
|
|
81
|
+
AbstractComponent.prototype.getMethods = function () {
|
|
82
|
+
return this.methods;
|
|
83
|
+
};
|
|
84
|
+
AbstractComponent.prototype.getComputed = function () {
|
|
85
|
+
return this.computed;
|
|
86
|
+
};
|
|
87
|
+
AbstractComponent.prototype.getWatcher = function () {
|
|
88
|
+
return this.watcher;
|
|
89
|
+
};
|
|
90
|
+
AbstractComponent.prototype.getBeforeRender = function () {
|
|
91
|
+
return this.beforeRender;
|
|
92
|
+
};
|
|
93
|
+
AbstractComponent.prototype.getAfterRender = function () {
|
|
94
|
+
return this.afterRender;
|
|
95
|
+
};
|
|
96
|
+
return AbstractComponent;
|
|
97
|
+
}());
|
|
98
|
+
export { AbstractComponent };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ContextController } from "
|
|
2
|
-
import {
|
|
1
|
+
import { ContextController } from "./prototype/ContextController";
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../../index";
|
|
3
3
|
import { OriginalDataGeneric } from "../data/OriginalDataGeneric";
|
|
4
4
|
/**
|
|
5
5
|
* The class is the prototype of controller
|
|
6
6
|
*/
|
|
7
7
|
export interface ControllerGeneric {
|
|
8
8
|
componentAttachedRootElement: ParentNode;
|
|
9
|
-
prototypeOfComponent:
|
|
9
|
+
prototypeOfComponent: AdjustComponent | ControlComponent;
|
|
10
10
|
parentController: ContextController;
|
|
11
11
|
anchorBegin: HTMLElement;
|
|
12
12
|
anchorEnd: HTMLElement;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ControllerGeneric } from "../ControllerGeneric";
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../../../index";
|
|
3
|
+
import { OriginalDataGeneric } from "../../data/OriginalDataGeneric";
|
|
4
|
+
import { ComputedDataGeneric } from "../../data/ComputedDataGeneric";
|
|
5
|
+
import { WatcherDataGeneric } from "../../data/WatcherDataGeneric";
|
|
6
|
+
export declare class ContextController implements ControllerGeneric {
|
|
7
|
+
componentAttachedRootElement: ParentNode | Element;
|
|
8
|
+
prototypeOfComponent: AdjustComponent | ControlComponent;
|
|
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
|
+
}
|
|
@@ -0,0 +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 };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var HttpAction = /** @class */ (function () {
|
|
2
|
+
function HttpAction() {
|
|
3
|
+
}
|
|
4
|
+
HttpAction.prototype.redirect = function (url, parameters) {
|
|
5
|
+
if (parameters !== null) {
|
|
6
|
+
var params = Object.getOwnPropertyNames(parameters);
|
|
7
|
+
if (params.length !== 0) {
|
|
8
|
+
var queries_1 = "";
|
|
9
|
+
params.forEach(function (value) {
|
|
10
|
+
if (queries_1 === "") {
|
|
11
|
+
queries_1 = queries_1 + value + "=" + parameters[value].toString();
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
queries_1 = queries_1 + "&" + value + "=" + parameters[value].toString();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
queries_1 = encodeURI(queries_1);
|
|
18
|
+
location.href = url + "?" + queries_1;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
location.href = url;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
location.href = url;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* locate the position
|
|
30
|
+
* @param position
|
|
31
|
+
*/
|
|
32
|
+
HttpAction.prototype.relocate = function (position) {
|
|
33
|
+
location.hash = position;
|
|
34
|
+
};
|
|
35
|
+
return HttpAction;
|
|
36
|
+
}());
|
|
37
|
+
export { HttpAction };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PluginGeneric } from "../../../tension/generic/plugin/PluginGeneric";
|
|
2
|
-
import {
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../../index";
|
|
3
3
|
export interface RenderGeneric {
|
|
4
4
|
use_plugin(plugin: PluginGeneric): void;
|
|
5
|
-
add_tag(component:
|
|
5
|
+
add_tag(component: AdjustComponent | ControlComponent): void;
|
|
6
6
|
listen(): void;
|
|
7
|
-
render(component: Component, mounter: string): void;
|
|
8
|
-
weave(mounter: string): void;
|
|
9
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
import {
|
|
1
|
+
import { ContextController } from "../generic/controller/prototype/ContextController";
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../index";
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
* @param name
|
|
@@ -63,16 +63,16 @@ export declare function inject_$getter_to_data(data: {}, getter: any): void;
|
|
|
63
63
|
* @param controller
|
|
64
64
|
* @param proto
|
|
65
65
|
*/
|
|
66
|
-
export declare function inject_method_to_data(controller: ContextController, proto:
|
|
66
|
+
export declare function inject_method_to_data(controller: ContextController, proto: AdjustComponent | ControlComponent): void;
|
|
67
67
|
/**
|
|
68
68
|
*
|
|
69
69
|
* @param controller
|
|
70
70
|
* @param proto
|
|
71
71
|
*/
|
|
72
|
-
export declare function inject_watcher_to_controller(controller: ContextController, proto:
|
|
72
|
+
export declare function inject_watcher_to_controller(controller: ContextController, proto: AdjustComponent | ControlComponent): void;
|
|
73
73
|
/**
|
|
74
74
|
*
|
|
75
75
|
* @param controller
|
|
76
76
|
* @param proto
|
|
77
77
|
*/
|
|
78
|
-
export declare function inject_computed_to_controller(controller: ContextController, proto:
|
|
78
|
+
export declare function inject_computed_to_controller(controller: ContextController, proto: AdjustComponent | ControlComponent): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContextController } from "../prototype/ContextController";
|
|
2
|
-
import {
|
|
1
|
+
import { ContextController } from "../generic/controller/prototype/ContextController";
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../index";
|
|
3
3
|
/**
|
|
4
4
|
* This function is used to mount the dom to the HTML document.
|
|
5
5
|
* @param controller
|
|
@@ -8,7 +8,7 @@ import { Component } from "../../index";
|
|
|
8
8
|
* @param child
|
|
9
9
|
* @param tagTemplate
|
|
10
10
|
*/
|
|
11
|
-
export declare function archive_mount(controller: ContextController, proto:
|
|
11
|
+
export declare function archive_mount(controller: ContextController, proto: AdjustComponent | ControlComponent, parent: ParentNode, child: ChildNode, tagTemplate: Element): void;
|
|
12
12
|
/**
|
|
13
13
|
* Insert elements without div element
|
|
14
14
|
* @param root
|
|
@@ -10,7 +10,7 @@ export function archive_mount(controller, proto, parent, child, tagTemplate) {
|
|
|
10
10
|
//mount
|
|
11
11
|
var renderSpace = document.createElement("div");
|
|
12
12
|
//给box添加样式
|
|
13
|
-
renderSpace.setAttribute("style", proto.
|
|
13
|
+
renderSpace.setAttribute("style", proto.getStyle());
|
|
14
14
|
//指定渲染空间
|
|
15
15
|
controller.componentAttachedRootElement = renderSpace;
|
|
16
16
|
//开始渲染
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ContextController } from "../../prototype/ContextController";
|
|
1
|
+
import { AdjustComponent, ControlComponent } from "../../../index";
|
|
2
|
+
import { ContextController } from "../../generic/controller/prototype/ContextController";
|
|
3
3
|
/**
|
|
4
4
|
* Use the func to inject a tag component to the tag-library.
|
|
5
5
|
* @param tagName The tag name
|
|
6
6
|
* @param tagDefine The tag prototype class
|
|
7
7
|
*/
|
|
8
|
-
export declare function tag_library_inject(tagName: string, tagDefine:
|
|
8
|
+
export declare function tag_library_inject(tagName: string, tagDefine: AdjustComponent | ControlComponent): void;
|
|
9
9
|
/**
|
|
10
10
|
* Use the func to get a tag prototype class
|
|
11
11
|
* @param tagName The name of tag you want to search
|
|
12
12
|
*/
|
|
13
|
-
export declare function tag_library_search(tagName: string):
|
|
13
|
+
export declare function tag_library_search(tagName: string): AdjustComponent | ControlComponent | null;
|
|
14
14
|
/**
|
|
15
15
|
* From the system_t_0 table, get tag library
|
|
16
16
|
*/
|
|
17
|
-
export declare function get_tag_library(): Map<string,
|
|
17
|
+
export declare function get_tag_library(): Map<string, AdjustComponent | ControlComponent>;
|
|
18
18
|
/**
|
|
19
19
|
* From the system_t_0 table, get style library
|
|
20
20
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdjustComponent, ControlComponent } from "../../../index";
|
|
2
2
|
declare const _default: {
|
|
3
|
-
tagLib: Map<string,
|
|
3
|
+
tagLib: Map<string, AdjustComponent | ControlComponent>;
|
|
4
4
|
styleLib: Map<string, Map<string, string>>;
|
|
5
5
|
contextController: any;
|
|
6
6
|
};
|
|
@@ -4,5 +4,7 @@ export declare function set_router_mode(value: boolean): void;
|
|
|
4
4
|
export declare function get_route_mode(): boolean;
|
|
5
5
|
export declare function set_path_variable(value: object): void;
|
|
6
6
|
export declare function get_path_variable(): Map<string, string>;
|
|
7
|
+
export declare function set_params_variable(value: object): void;
|
|
8
|
+
export declare function get_params_variable(): Map<string, string>;
|
|
7
9
|
export declare function get_route_table(): object;
|
|
8
10
|
export declare function set_route_table(value: object): void;
|
|
@@ -17,6 +17,12 @@ export function set_path_variable(value) {
|
|
|
17
17
|
export function get_path_variable() {
|
|
18
18
|
return Reflect.get(system_t_1, "pathVariable");
|
|
19
19
|
}
|
|
20
|
+
export function set_params_variable(value) {
|
|
21
|
+
Reflect.set(system_t_1, "params", value);
|
|
22
|
+
}
|
|
23
|
+
export function get_params_variable() {
|
|
24
|
+
return Reflect.get(system_t_1, "params");
|
|
25
|
+
}
|
|
20
26
|
export function get_route_table() {
|
|
21
27
|
return Reflect.get(system_t_1, "routeTable");
|
|
22
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpAction } from "../../prototype/HttpAction";
|
|
1
|
+
import { HttpAction } from "../../generic/controller/prototype/HttpAction";
|
|
2
2
|
import { RouterGeneric } from "../../../tension/generic/router/RouterGeneric";
|
|
3
3
|
export declare function set_system_ext_router(router: RouterGeneric): void;
|
|
4
4
|
export declare function get_system_ext_router(): RouterGeneric;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ContextController } from "../../prototype/ContextController";
|
|
2
|
-
import {
|
|
1
|
+
import { ContextController } from "../../generic/controller/prototype/ContextController";
|
|
2
|
+
import { AdjustComponent, ControlComponent } from "../../../index";
|
|
3
3
|
/**
|
|
4
4
|
* This function is used to parse_directive those commands which should be executed before mount.
|
|
5
5
|
* @param tagTemplate
|
|
6
6
|
* @param proto
|
|
7
7
|
* @param controller
|
|
8
8
|
*/
|
|
9
|
-
export declare function directive_parse_collection_for_before(tagTemplate: Element, proto:
|
|
9
|
+
export declare function directive_parse_collection_for_before(tagTemplate: Element, proto: AdjustComponent | ControlComponent, controller: ContextController): void;
|
|
10
10
|
/**
|
|
11
11
|
* This function is used to parse_directive those commands which should be executed after mount.
|
|
12
12
|
* @param templateSpace
|
|
@@ -9,7 +9,7 @@ import { parse_directive_render } from "../../../kernel/directive/justify/v-rend
|
|
|
9
9
|
import { parse_directive_if } from "../../../kernel/directive/justify/v-if";
|
|
10
10
|
import { parse_directive_switch } from "../../../kernel/directive/justify/v-switch";
|
|
11
11
|
import { parse_directive_for_of } from "../../../kernel/directive/loop/v-array";
|
|
12
|
-
import { parse_directive_salt_extract } from "../../../kernel/directive/
|
|
12
|
+
import { parse_directive_salt_extract } from "../../../kernel/directive/slot/v-slot";
|
|
13
13
|
import { parse_directive_expression } from "../../../kernel/directive/data/v-el";
|
|
14
14
|
import { parse_directive_for_map } from "../../../kernel/directive/loop/v-map";
|
|
15
15
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hashName } from "../style/styleUtility";
|
|
1
2
|
/**
|
|
2
3
|
* This func used to add tag label to the content of the user tag
|
|
3
4
|
* @param nodes
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
*/
|
|
6
7
|
export function add_label_to_element(nodes, component) {
|
|
7
8
|
for (var i = 0; i < nodes.length; i++) {
|
|
8
|
-
nodes[i].setAttribute("
|
|
9
|
+
nodes[i].setAttribute("v-data", hashName(component));
|
|
9
10
|
var kk = nodes[i].children;
|
|
10
11
|
add_label_to_element(kk, component);
|
|
11
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdjustComponent, ControlComponent } from "../../../index";
|
|
2
2
|
/**
|
|
3
3
|
* This func used to get the view tag from the template
|
|
4
4
|
* @param proto
|
|
5
5
|
*/
|
|
6
|
-
export declare function getTemplate(proto:
|
|
6
|
+
export declare function getTemplate(proto: AdjustComponent | ControlComponent): Element;
|