render-core 1.4.14 → 1.4.15
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 +58 -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 +19 -22
- 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
package/system/resolver/props.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { PropertyType } from "../../index";
|
|
2
|
-
/**
|
|
3
|
-
* This function is used to resolve tag properties.
|
|
4
|
-
* @param tag
|
|
5
|
-
* @param properties
|
|
6
|
-
*/
|
|
7
|
-
export function resolve_props(tag, properties) {
|
|
8
|
-
if (properties instanceof Array)
|
|
9
|
-
return getAllPropsByArray(tag, properties);
|
|
10
|
-
if (properties instanceof Object)
|
|
11
|
-
return getAllPropsByObject(tag, properties);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param node
|
|
16
|
-
* @param array
|
|
17
|
-
*/
|
|
18
|
-
export function getAllPropsByArray(node, array) {
|
|
19
|
-
var props = new Map();
|
|
20
|
-
array.forEach(function (value) {
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
if (node.getAttribute(value)) {
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
props.set(value, node.getAttribute(value));
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return props;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @param node
|
|
32
|
-
* @param object
|
|
33
|
-
*/
|
|
34
|
-
export function getAllPropsByObject(node, object) {
|
|
35
|
-
var props = new Map();
|
|
36
|
-
for (var objectKey in object) {
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
if (node.getAttribute(objectKey)) {
|
|
39
|
-
if (object[objectKey] === PropertyType.INT) { // @ts-ignore
|
|
40
|
-
props.set(objectKey, parseInt(node.getAttribute(objectKey)));
|
|
41
|
-
}
|
|
42
|
-
else if (object[objectKey] === PropertyType.FLOAT) { // @ts-ignore
|
|
43
|
-
props.set(objectKey, parseFloat(node.getAttribute(objectKey)));
|
|
44
|
-
}
|
|
45
|
-
else if (object[objectKey] === PropertyType.BOOLEAN) {
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
props.set(objectKey, parseFloat(node.getAttribute(objectKey)));
|
|
48
|
-
}
|
|
49
|
-
else if (object[objectKey] === PropertyType.STRING) {
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
props.set(objectKey, node.getAttribute(objectKey));
|
|
52
|
-
}
|
|
53
|
-
else if (object[objectKey] === PropertyType.JSON) {
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
props.set(objectKey, JSON.parse(node.getAttribute(objectKey)));
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
props.set(objectKey, node.getAttribute(objectKey));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return props;
|
|
64
|
-
}
|
|
1
|
+
import { PropertyType } from "../../index";
|
|
2
|
+
/**
|
|
3
|
+
* This function is used to resolve tag properties.
|
|
4
|
+
* @param tag
|
|
5
|
+
* @param properties
|
|
6
|
+
*/
|
|
7
|
+
export function resolve_props(tag, properties) {
|
|
8
|
+
if (properties instanceof Array)
|
|
9
|
+
return getAllPropsByArray(tag, properties);
|
|
10
|
+
if (properties instanceof Object)
|
|
11
|
+
return getAllPropsByObject(tag, properties);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param node
|
|
16
|
+
* @param array
|
|
17
|
+
*/
|
|
18
|
+
export function getAllPropsByArray(node, array) {
|
|
19
|
+
var props = new Map();
|
|
20
|
+
array.forEach(function (value) {
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
if (node.getAttribute(value)) {
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
props.set(value, node.getAttribute(value));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return props;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @param node
|
|
32
|
+
* @param object
|
|
33
|
+
*/
|
|
34
|
+
export function getAllPropsByObject(node, object) {
|
|
35
|
+
var props = new Map();
|
|
36
|
+
for (var objectKey in object) {
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
if (node.getAttribute(objectKey)) {
|
|
39
|
+
if (object[objectKey] === PropertyType.INT) { // @ts-ignore
|
|
40
|
+
props.set(objectKey, parseInt(node.getAttribute(objectKey)));
|
|
41
|
+
}
|
|
42
|
+
else if (object[objectKey] === PropertyType.FLOAT) { // @ts-ignore
|
|
43
|
+
props.set(objectKey, parseFloat(node.getAttribute(objectKey)));
|
|
44
|
+
}
|
|
45
|
+
else if (object[objectKey] === PropertyType.BOOLEAN) {
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
props.set(objectKey, parseFloat(node.getAttribute(objectKey)));
|
|
48
|
+
}
|
|
49
|
+
else if (object[objectKey] === PropertyType.STRING) {
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
props.set(objectKey, node.getAttribute(objectKey));
|
|
52
|
+
}
|
|
53
|
+
else if (object[objectKey] === PropertyType.JSON) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
props.set(objectKey, JSON.parse(node.getAttribute(objectKey)));
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
props.set(objectKey, node.getAttribute(objectKey));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return props;
|
|
64
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function is used to resolve the http parameters.
|
|
3
|
-
*/
|
|
4
|
-
export declare function resolve_Queries(): Map<string, any>;
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to resolve the http parameters.
|
|
3
|
+
*/
|
|
4
|
+
export declare function resolve_Queries(): Map<string, any>;
|
package/system/resolver/query.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This function is used to resolve the http parameters.
|
|
3
|
-
*/
|
|
4
|
-
export function resolve_Queries() {
|
|
5
|
-
var query = new Map();
|
|
6
|
-
if (location.search !== "") {
|
|
7
|
-
var parameters = location.search.replace("?", "");
|
|
8
|
-
var listPara = parameters.split("&");
|
|
9
|
-
listPara.forEach(function (value) {
|
|
10
|
-
var results = value.split("=");
|
|
11
|
-
query.set(results[0], results[1]);
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return query;
|
|
15
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to resolve the http parameters.
|
|
3
|
+
*/
|
|
4
|
+
export function resolve_Queries() {
|
|
5
|
+
var query = new Map();
|
|
6
|
+
if (location.search !== "") {
|
|
7
|
+
var parameters = location.search.replace("?", "");
|
|
8
|
+
var listPara = parameters.split("&");
|
|
9
|
+
listPara.forEach(function (value) {
|
|
10
|
+
var results = value.split("=");
|
|
11
|
+
query.set(results[0], results[1]);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return query;
|
|
15
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This func used to generate a new original data form prototype
|
|
3
|
-
* @param data
|
|
4
|
-
*/
|
|
5
|
-
export declare function dataInject(data: {}): any;
|
|
1
|
+
/**
|
|
2
|
+
* This func used to generate a new original data form prototype
|
|
3
|
+
* @param data
|
|
4
|
+
*/
|
|
5
|
+
export declare function dataInject(data: {}): any;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This func used to generate a new original data form prototype
|
|
3
|
-
* @param data
|
|
4
|
-
*/
|
|
5
|
-
export function dataInject(data) {
|
|
6
|
-
var out = {};
|
|
7
|
-
var keys = Object.getOwnPropertyNames(data);
|
|
8
|
-
keys.forEach(function (value) {
|
|
9
|
-
out[value] = data[value];
|
|
10
|
-
});
|
|
11
|
-
return out;
|
|
12
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This func used to generate a new original data form prototype
|
|
3
|
+
* @param data
|
|
4
|
+
*/
|
|
5
|
+
export function dataInject(data) {
|
|
6
|
+
var out = {};
|
|
7
|
+
var keys = Object.getOwnPropertyNames(data);
|
|
8
|
+
keys.forEach(function (value) {
|
|
9
|
+
out[value] = data[value];
|
|
10
|
+
});
|
|
11
|
+
return out;
|
|
12
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
+
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 +1,43 @@
|
|
|
1
|
-
import { add_label_to_element } from "../initiate/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
|
+
import { add_label_to_element } from "../initiate/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,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This func used to add tag label to the content of the user tag
|
|
3
|
-
* @param nodes
|
|
4
|
-
* @param component
|
|
5
|
-
*/
|
|
6
|
-
export declare function add_label_to_element(nodes: HTMLCollection, component: string): void;
|
|
1
|
+
/**
|
|
2
|
+
* This func used to add tag label to the content of the user tag
|
|
3
|
+
* @param nodes
|
|
4
|
+
* @param component
|
|
5
|
+
*/
|
|
6
|
+
export declare function add_label_to_element(nodes: HTMLCollection, component: string): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This func used to add tag label to the content of the user tag
|
|
3
|
-
* @param nodes
|
|
4
|
-
* @param component
|
|
5
|
-
*/
|
|
6
|
-
export function add_label_to_element(nodes, component) {
|
|
7
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
8
|
-
nodes[i].setAttribute("cpn", component);
|
|
9
|
-
var kk = nodes[i].children;
|
|
10
|
-
add_label_to_element(kk, component);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This func used to add tag label to the content of the user tag
|
|
3
|
+
* @param nodes
|
|
4
|
+
* @param component
|
|
5
|
+
*/
|
|
6
|
+
export function add_label_to_element(nodes, component) {
|
|
7
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
8
|
+
nodes[i].setAttribute("cpn", component);
|
|
9
|
+
var kk = nodes[i].children;
|
|
10
|
+
add_label_to_element(kk, component);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component } from "../../../index";
|
|
2
|
-
/**
|
|
3
|
-
* This func used to get the view tag from the template
|
|
4
|
-
* @param proto
|
|
5
|
-
*/
|
|
6
|
-
export declare function getTemplate(proto: Component): Element;
|
|
1
|
+
import { Component } from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* This func used to get the view tag from the template
|
|
4
|
+
* @param proto
|
|
5
|
+
*/
|
|
6
|
+
export declare function getTemplate(proto: Component): Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This func used to get the view tag from the template
|
|
3
|
-
* @param proto
|
|
4
|
-
*/
|
|
5
|
-
export function getTemplate(proto) {
|
|
6
|
-
var temp = document.createElement("div");
|
|
7
|
-
temp.innerHTML = proto.getTemplate();
|
|
8
|
-
var template = temp.getElementsByTagName("template")[0];
|
|
9
|
-
var content = template.content;
|
|
10
|
-
return content.querySelector("view");
|
|
11
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This func used to get the view tag from the template
|
|
3
|
+
* @param proto
|
|
4
|
+
*/
|
|
5
|
+
export function getTemplate(proto) {
|
|
6
|
+
var temp = document.createElement("div");
|
|
7
|
+
temp.innerHTML = proto.getTemplate();
|
|
8
|
+
var template = temp.getElementsByTagName("template")[0];
|
|
9
|
+
var content = template.content;
|
|
10
|
+
return content.querySelector("view");
|
|
11
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ContextController } from "../../prototype/ContextController";
|
|
2
|
-
/**
|
|
3
|
-
* This func used to resolve input-data which is the text type
|
|
4
|
-
* @param target
|
|
5
|
-
* @param doc
|
|
6
|
-
* @param controller
|
|
7
|
-
*/
|
|
8
|
-
export declare function textType(target: any, doc: any, controller: ContextController): void;
|
|
9
|
-
/**
|
|
10
|
-
* This func used to resolve input-data which is the assign type
|
|
11
|
-
* @param target
|
|
12
|
-
* @param controller
|
|
13
|
-
*/
|
|
14
|
-
export declare function assignType(target: any, controller: ContextController): void;
|
|
15
|
-
/**
|
|
16
|
-
* This func used to resolve input-data which is the file type
|
|
17
|
-
* @param target
|
|
18
|
-
* @param controller
|
|
19
|
-
*/
|
|
20
|
-
export declare function fileType(target: any, controller: ContextController): void;
|
|
21
|
-
/**
|
|
22
|
-
* This func used to resolve input-data which is the check type
|
|
23
|
-
* @param target
|
|
24
|
-
*/
|
|
25
|
-
export declare function checkType(target: any): void;
|
|
1
|
+
import { ContextController } from "../../prototype/ContextController";
|
|
2
|
+
/**
|
|
3
|
+
* This func used to resolve input-data which is the text type
|
|
4
|
+
* @param target
|
|
5
|
+
* @param doc
|
|
6
|
+
* @param controller
|
|
7
|
+
*/
|
|
8
|
+
export declare function textType(target: any, doc: any, controller: ContextController): void;
|
|
9
|
+
/**
|
|
10
|
+
* This func used to resolve input-data which is the assign type
|
|
11
|
+
* @param target
|
|
12
|
+
* @param controller
|
|
13
|
+
*/
|
|
14
|
+
export declare function assignType(target: any, controller: ContextController): void;
|
|
15
|
+
/**
|
|
16
|
+
* This func used to resolve input-data which is the file type
|
|
17
|
+
* @param target
|
|
18
|
+
* @param controller
|
|
19
|
+
*/
|
|
20
|
+
export declare function fileType(target: any, controller: ContextController): void;
|
|
21
|
+
/**
|
|
22
|
+
* This func used to resolve input-data which is the check type
|
|
23
|
+
* @param target
|
|
24
|
+
*/
|
|
25
|
+
export declare function checkType(target: any): void;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This func used to resolve input-data which is the text type
|
|
3
|
-
* @param target
|
|
4
|
-
* @param doc
|
|
5
|
-
* @param controller
|
|
6
|
-
*/
|
|
7
|
-
export function textType(target, doc, controller) {
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
target.value = controller.dataForMethod[target.getAttribute("name")];
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
target.focus();
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
target.setSelectionRange(doc.start, doc.start);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* This func used to resolve input-data which is the assign type
|
|
17
|
-
* @param target
|
|
18
|
-
* @param controller
|
|
19
|
-
*/
|
|
20
|
-
export function assignType(target, controller) {
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
target.value = controller.dataForMethod[target.getAttribute("name")];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* This func used to resolve input-data which is the file type
|
|
26
|
-
* @param target
|
|
27
|
-
* @param controller
|
|
28
|
-
*/
|
|
29
|
-
export function fileType(target, controller) {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
target.files = controller.dataForMethod[target.getAttribute("name")];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* This func used to resolve input-data which is the check type
|
|
35
|
-
* @param target
|
|
36
|
-
*/
|
|
37
|
-
export function checkType(target) {
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
target.checked = "checked";
|
|
40
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This func used to resolve input-data which is the text type
|
|
3
|
+
* @param target
|
|
4
|
+
* @param doc
|
|
5
|
+
* @param controller
|
|
6
|
+
*/
|
|
7
|
+
export function textType(target, doc, controller) {
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
target.value = controller.dataForMethod[target.getAttribute("name")];
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
target.focus();
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
target.setSelectionRange(doc.start, doc.start);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* This func used to resolve input-data which is the assign type
|
|
17
|
+
* @param target
|
|
18
|
+
* @param controller
|
|
19
|
+
*/
|
|
20
|
+
export function assignType(target, controller) {
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
target.value = controller.dataForMethod[target.getAttribute("name")];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* This func used to resolve input-data which is the file type
|
|
26
|
+
* @param target
|
|
27
|
+
* @param controller
|
|
28
|
+
*/
|
|
29
|
+
export function fileType(target, controller) {
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
target.files = controller.dataForMethod[target.getAttribute("name")];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* This func used to resolve input-data which is the check type
|
|
35
|
+
* @param target
|
|
36
|
+
*/
|
|
37
|
+
export function checkType(target) {
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
target.checked = "checked";
|
|
40
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export declare function inputUtility(element: Element, space: Object): void;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param element
|
|
5
|
-
* @param space
|
|
6
|
-
*/
|
|
7
|
-
export declare function filesType(element: Element, space: Object): void;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param element
|
|
11
|
-
* @param space
|
|
12
|
-
*/
|
|
13
|
-
export declare function selectUtility(element: Element, space: Object): void;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param element
|
|
17
|
-
* @param space
|
|
18
|
-
*/
|
|
19
|
-
export declare function textareaUtility(element: Element, space: Object): void;
|
|
1
|
+
export declare function inputUtility(element: Element, space: Object): void;
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param element
|
|
5
|
+
* @param space
|
|
6
|
+
*/
|
|
7
|
+
export declare function filesType(element: Element, space: Object): void;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param element
|
|
11
|
+
* @param space
|
|
12
|
+
*/
|
|
13
|
+
export declare function selectUtility(element: Element, space: Object): void;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param element
|
|
17
|
+
* @param space
|
|
18
|
+
*/
|
|
19
|
+
export declare function textareaUtility(element: Element, space: Object): void;
|