render-core 1.3.38 → 1.3.40

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.
Files changed (118) hide show
  1. package/class/component/component.d.ts +41 -41
  2. package/class/component/component.js +108 -108
  3. package/class/controller/appController.d.ts +17 -44
  4. package/class/controller/appController.js +25 -132
  5. package/class/controller/componentController.d.ts +15 -15
  6. package/class/controller/componentController.js +22 -22
  7. package/class/controller/pageController.d.ts +23 -23
  8. package/class/controller/pageController.js +40 -40
  9. package/class/tips/appTip.d.ts +2 -2
  10. package/class/tips/appTip.js +1 -1
  11. package/class/tips/componentTip.d.ts +13 -13
  12. package/class/tips/componentTip.js +1 -1
  13. package/class/tips/renderTip.d.ts +3 -5
  14. package/class/tips/renderTip.js +1 -1
  15. package/core/cmd/data/v-el.d.ts +8 -8
  16. package/core/cmd/data/v-el.js +28 -28
  17. package/core/cmd/data/v-html.d.ts +8 -8
  18. package/core/cmd/data/v-html.js +26 -26
  19. package/core/cmd/data/v-txt.d.ts +8 -8
  20. package/core/cmd/data/v-txt.js +29 -29
  21. package/core/cmd/justify/v-if.d.ts +6 -6
  22. package/core/cmd/justify/v-if.js +43 -43
  23. package/core/cmd/justify/v-render.d.ts +6 -6
  24. package/core/cmd/justify/v-render.js +26 -26
  25. package/core/cmd/justify/v-show.d.ts +6 -6
  26. package/core/cmd/justify/v-show.js +26 -26
  27. package/core/cmd/justify/v-switch.d.ts +6 -6
  28. package/core/cmd/justify/v-switch.js +35 -35
  29. package/core/cmd/loop/v-for.d.ts +12 -12
  30. package/core/cmd/loop/v-for.js +63 -63
  31. package/core/cmd/loop/v-index.d.ts +14 -14
  32. package/core/cmd/loop/v-index.js +80 -79
  33. package/core/cmd/loop/v-key.d.ts +12 -12
  34. package/core/cmd/loop/v-key.js +70 -70
  35. package/core/cmd/method/v-on.d.ts +8 -8
  36. package/core/cmd/method/v-on.js +40 -40
  37. package/core/cmd/property/v-bind.d.ts +6 -6
  38. package/core/cmd/property/v-bind.js +33 -33
  39. package/core/cmd/react/v-model.d.ts +6 -6
  40. package/core/cmd/react/v-model.js +22 -22
  41. package/core/cmd/ref/v-ref.d.ts +6 -6
  42. package/core/cmd/ref/v-ref.js +16 -16
  43. package/core/cmd/solt/v-solt.d.ts +14 -14
  44. package/core/cmd/solt/v-solt.js +46 -46
  45. package/core/inject/inject.d.ts +30 -35
  46. package/core/inject/inject.js +63 -70
  47. package/core/lifecycle/afterMethods.d.ts +16 -16
  48. package/core/lifecycle/afterMethods.js +22 -22
  49. package/core/lifecycle/controllerCycle.d.ts +13 -13
  50. package/core/lifecycle/controllerCycle.js +42 -42
  51. package/core/lifecycle/mount.d.ts +16 -17
  52. package/core/lifecycle/mount.js +31 -34
  53. package/core/loader/loader.d.ts +7 -7
  54. package/core/loader/loader.js +18 -18
  55. package/core/proxy/getProxy.d.ts +13 -13
  56. package/core/proxy/getProxy.js +42 -42
  57. package/core/render/PostRender.d.ts +12 -12
  58. package/core/render/PostRender.js +42 -45
  59. package/core/render/delivery.d.ts +5 -5
  60. package/core/render/delivery.js +42 -42
  61. package/core/render/initRender.d.ts +12 -12
  62. package/core/render/initRender.js +39 -41
  63. package/core/render/partRender.d.ts +15 -15
  64. package/core/render/partRender.js +31 -31
  65. package/core/render/rawRender.d.ts +12 -12
  66. package/core/render/rawRender.js +43 -45
  67. package/core/render/updateRender.d.ts +6 -6
  68. package/core/render/updateRender.js +29 -32
  69. package/core/resolver/props.d.ts +18 -18
  70. package/core/resolver/props.js +60 -60
  71. package/core/resolver/query.d.ts +4 -4
  72. package/core/resolver/query.js +15 -15
  73. package/core/utility/checkUtility.d.ts +1 -1
  74. package/core/utility/checkUtility.js +4 -4
  75. package/core/utility/cmdUtility.d.ts +16 -16
  76. package/core/utility/cmdUtility.js +57 -57
  77. package/core/utility/dataUtility.d.ts +1 -1
  78. package/core/utility/dataUtility.js +8 -8
  79. package/core/utility/errorUtility.d.ts +3 -3
  80. package/core/utility/errorUtility.js +9 -9
  81. package/core/utility/injectUtility.d.ts +13 -13
  82. package/core/utility/injectUtility.js +58 -58
  83. package/core/utility/inputType.d.ts +5 -5
  84. package/core/utility/inputType.js +20 -20
  85. package/core/utility/inputUtility.d.ts +4 -4
  86. package/core/utility/inputUtility.js +100 -100
  87. package/core/utility/miscUtility.d.ts +6 -6
  88. package/core/utility/miscUtility.js +12 -12
  89. package/core/utility/modelUtility.d.ts +15 -15
  90. package/core/utility/modelUtility.js +66 -66
  91. package/core/utility/sectionUtility.d.ts +6 -6
  92. package/core/utility/sectionUtility.js +104 -104
  93. package/core/utility/styleUtility.d.ts +17 -29
  94. package/core/utility/styleUtility.js +67 -114
  95. package/core/utility/templateUtility.d.ts +6 -6
  96. package/core/utility/templateUtility.js +13 -13
  97. package/core/utility/vForUtility.d.ts +15 -15
  98. package/core/utility/vForUtility.js +20 -20
  99. package/http/redirect/redirect.d.ts +11 -11
  100. package/http/redirect/redirect.js +36 -36
  101. package/index.d.ts +44 -71
  102. package/index.js +70 -130
  103. package/package.json +3 -8
  104. package/runtime/metaTagLib.d.ts +2 -2
  105. package/runtime/metaTagLib.js +27 -27
  106. package/runtime/runtime.d.ts +7 -7
  107. package/runtime/runtime.js +26 -26
  108. package/runtime/tools.d.ts +14 -14
  109. package/runtime/tools.js +43 -49
  110. package/README.md +0 -2
  111. package/class/controller/contextController.d.ts +0 -18
  112. package/class/controller/contextController.js +0 -79
  113. package/func/Theme.d.ts +0 -16
  114. package/func/Theme.js +0 -27
  115. package/status/read/read.d.ts +0 -10
  116. package/status/read/read.js +0 -26
  117. package/status/write/write.d.ts +0 -12
  118. package/status/write/write.js +0 -92
package/runtime/tools.js CHANGED
@@ -1,49 +1,43 @@
1
- import { Component } from "../class/component/component";
2
- import { themeStyle } from "../core/utility/styleUtility";
3
- import { renderHtml } from "./runtime";
4
- import { changeApplicationTheme, changeSessionTheme, changeTagTheme } from "../func/Theme";
5
- /**
6
- * This function is used to save the prototype component class in the window object.
7
- * So, you can hava a tip that we custom a property named 'tagLib' in the window object.
8
- * @param application
9
- * @param component
10
- */
11
- export function registerTagLib(application, component) {
12
- //if the input parameter is an instance of Component,do the code block.
13
- if (component instanceof Component) {
14
- if (!application.tagLib.has(component.getName().toUpperCase())) {
15
- application.tagLib.set(component.getName().toUpperCase(), component);
16
- }
17
- else {
18
- console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
19
- }
20
- }
21
- else {
22
- //if the input parameter is an array of Component,do the code block.
23
- component.forEach(function (component) {
24
- if (!application.tagLib.has(component.getName().toUpperCase())) {
25
- application.tagLib.set(component.getName().toUpperCase(), component);
26
- }
27
- else {
28
- console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
29
- }
30
- });
31
- }
32
- }
33
- /**
34
- * The entrance of render
35
- * @param renderjs
36
- */
37
- export function render(renderjs) {
38
- //获取styleLib对象
39
- renderjs.tagLib.forEach(function (component) {
40
- themeStyle(component, renderjs.styleLib);
41
- });
42
- renderjs.configContext({});
43
- renderjs.configApp({});
44
- renderjs.registerElements("changeTagTheme", changeTagTheme);
45
- renderjs.registerElements("changeSessionTheme", changeSessionTheme);
46
- renderjs.registerElements("changeApplicationTheme", changeApplicationTheme);
47
- //开始渲染
48
- renderHtml(document.body.children, renderjs.page);
49
- }
1
+ import { Component } from "../class/component/component";
2
+ import { themeStyle } from "../core/utility/styleUtility";
3
+ import { renderHtml } from "./runtime";
4
+ /**
5
+ * This function is used to save the prototype component class in the window object.
6
+ * So, you can hava a tip that we custom a property named 'tagLib' in the window object.
7
+ * @param application
8
+ * @param component
9
+ */
10
+ export function registerTagLib(application, component) {
11
+ //if the input parameter is an instance of Component,do the code block.
12
+ if (component instanceof Component) {
13
+ if (!application.tagLib.has(component.getName().toUpperCase())) {
14
+ application.tagLib.set(component.getName().toUpperCase(), component);
15
+ }
16
+ else {
17
+ console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
18
+ }
19
+ }
20
+ else {
21
+ //if the input parameter is an array of Component,do the code block.
22
+ component.forEach(function (component) {
23
+ if (!application.tagLib.has(component.getName().toUpperCase())) {
24
+ application.tagLib.set(component.getName().toUpperCase(), component);
25
+ }
26
+ else {
27
+ console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
28
+ }
29
+ });
30
+ }
31
+ }
32
+ /**
33
+ * The entrance of render
34
+ * @param renderjs
35
+ */
36
+ export function render(renderjs) {
37
+ //获取styleLib对象
38
+ renderjs.tagLib.forEach(function (component) {
39
+ themeStyle(component, renderjs.styleLib);
40
+ });
41
+ //开始渲染
42
+ renderHtml(document.body.children, renderjs.page);
43
+ }
package/README.md DELETED
@@ -1,2 +0,0 @@
1
- # renderJs
2
- > The extendable javascript web framework
@@ -1,18 +0,0 @@
1
- export declare class ContextController {
2
- private readonly fields;
3
- constructor();
4
- saveFields(fields: {}): void;
5
- loadFields(): void;
6
- storeFields(): void;
7
- /**
8
- * 写入数据
9
- * @param field
10
- * @param value
11
- */
12
- setField(field: string, value: any): void;
13
- /**
14
- * 获取数据
15
- * @param field
16
- */
17
- getField(field: string): any;
18
- }
@@ -1,79 +0,0 @@
1
- import { status_read, status_write } from "../../index";
2
- var ContextController = /** @class */ (function () {
3
- function ContextController() {
4
- this.fields = {};
5
- }
6
- ContextController.prototype.saveFields = function (fields) {
7
- for (var fieldsKey in fields) {
8
- if (Reflect.has(this.fields, fieldsKey)) {
9
- console.log("This field is a system field, please have a new name for the field:" + fieldsKey);
10
- }
11
- else {
12
- Reflect.set(this.fields, fieldsKey, fields[fieldsKey]);
13
- }
14
- }
15
- };
16
- ContextController.prototype.loadFields = function () {
17
- for (var fieldsKey in this.fields) {
18
- if (this.fields[fieldsKey].react) {
19
- if (status_read({
20
- type: "session",
21
- fields: [fieldsKey]
22
- })[fieldsKey]) {
23
- this.fields[fieldsKey].data = status_read({
24
- type: "session",
25
- fields: [fieldsKey]
26
- })[fieldsKey]["data"];
27
- }
28
- }
29
- if (this.fields[fieldsKey].down) {
30
- // @ts-ignore
31
- this.fields[fieldsKey].callback(this.fields[fieldsKey]["data"], window.appSite);
32
- }
33
- }
34
- };
35
- ContextController.prototype.storeFields = function () {
36
- for (var fieldsKey in this.fields) {
37
- var data = {};
38
- Reflect.set(data, fieldsKey, {
39
- data: this.fields[fieldsKey]["data"]
40
- });
41
- status_write({
42
- type: "session",
43
- fields: data
44
- });
45
- }
46
- };
47
- /**
48
- * 写入数据
49
- * @param field
50
- * @param value
51
- */
52
- ContextController.prototype.setField = function (field, value) {
53
- var data = {};
54
- Reflect.set(data, field, {
55
- data: value
56
- });
57
- //写入数据
58
- status_write({
59
- type: "session",
60
- fields: data
61
- });
62
- //更新数据
63
- this.loadFields();
64
- };
65
- /**
66
- * 获取数据
67
- * @param field
68
- */
69
- ContextController.prototype.getField = function (field) {
70
- if (this.fields[field]) {
71
- return this.fields[field].data;
72
- }
73
- else {
74
- return null;
75
- }
76
- };
77
- return ContextController;
78
- }());
79
- export { ContextController };
package/func/Theme.d.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- *
3
- * @param tag
4
- * @param theme
5
- */
6
- export declare function changeTagTheme(tag: string, theme: string): void;
7
- /**
8
- *
9
- * @param theme
10
- */
11
- export declare function changeSessionTheme(theme: string): void;
12
- /**
13
- *
14
- * @param theme
15
- */
16
- export declare function changeApplicationTheme(theme: string): void;
package/func/Theme.js DELETED
@@ -1,27 +0,0 @@
1
- import { changeStyle, changeTheme } from "../core/utility/styleUtility";
2
- /**
3
- *
4
- * @param tag
5
- * @param theme
6
- */
7
- export function changeTagTheme(tag, theme) {
8
- changeStyle(tag, theme);
9
- }
10
- /**
11
- *
12
- * @param theme
13
- */
14
- export function changeSessionTheme(theme) {
15
- var application = Reflect.get(window, "context");
16
- application.setField("system_theme", theme);
17
- changeTheme(application.getField("system_theme"));
18
- }
19
- /**
20
- *
21
- * @param theme
22
- */
23
- export function changeApplicationTheme(theme) {
24
- var application = Reflect.get(window, "appSite");
25
- application.setField("system_theme", theme);
26
- changeTheme(application.getField("system_theme"));
27
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * This function is used to get value from sessionStorage.
3
- * @param filed
4
- */
5
- export declare function sessionStorageEngin_read(filed: string): any;
6
- /**
7
- * This function is used to get value from localStorage.
8
- * @param filed
9
- */
10
- export declare function localStorageEngine_read(filed: string): any;
@@ -1,26 +0,0 @@
1
- /**
2
- * This function is used to get value from sessionStorage.
3
- * @param filed
4
- */
5
- export function sessionStorageEngin_read(filed) {
6
- if (sessionStorage.getItem(filed) !== null) {
7
- return JSON.parse(sessionStorage.getItem(filed));
8
- }
9
- else {
10
- console.warn("The sessionStorage has not init the key:" + filed);
11
- return null;
12
- }
13
- }
14
- /**
15
- * This function is used to get value from localStorage.
16
- * @param filed
17
- */
18
- export function localStorageEngine_read(filed) {
19
- if (localStorage.getItem(filed) !== null) {
20
- return JSON.parse(localStorage.getItem(filed));
21
- }
22
- else {
23
- console.warn("The localStorage has not init the key:" + filed);
24
- return null;
25
- }
26
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * This function is used to store the key-value to sessionStorage.
3
- * @param filed
4
- * @param fields
5
- */
6
- export declare function sessionStorageEngin_write(filed: string, fields: {}): void;
7
- /**
8
- * This function is used to store the key-value to localStorage.
9
- * @param filed
10
- * @param fields
11
- */
12
- export declare function localStorageEngine_write(filed: string, fields: {}): void;
@@ -1,92 +0,0 @@
1
- /**
2
- * This function is used to store the key-value to sessionStorage.
3
- * @param filed
4
- * @param fields
5
- */
6
- export function sessionStorageEngin_write(filed, fields) {
7
- if (sessionStorage.getItem(filed) !== null) {
8
- switch (typeof fields[filed]) {
9
- case "string":
10
- sessionStorage.setItem(filed, fields[filed]);
11
- break;
12
- case "number":
13
- sessionStorage.setItem(filed, fields[filed]);
14
- break;
15
- case "boolean":
16
- sessionStorage.setItem(filed, fields[filed]);
17
- break;
18
- case "bigint":
19
- sessionStorage.setItem(filed, fields[filed]);
20
- break;
21
- case "object":
22
- sessionStorage.setItem(filed, JSON.stringify(fields[filed]));
23
- break;
24
- }
25
- }
26
- else {
27
- console.warn("The sessionStorage has no key:" + filed + ", which will be stored to sessionStorage!");
28
- switch (typeof fields[filed]) {
29
- case "string":
30
- sessionStorage.setItem(filed, fields[filed]);
31
- break;
32
- case "number":
33
- sessionStorage.setItem(filed, fields[filed]);
34
- break;
35
- case "boolean":
36
- sessionStorage.setItem(filed, fields[filed]);
37
- break;
38
- case "bigint":
39
- sessionStorage.setItem(filed, fields[filed]);
40
- break;
41
- case "object":
42
- sessionStorage.setItem(filed, JSON.stringify(fields[filed]));
43
- break;
44
- }
45
- }
46
- }
47
- /**
48
- * This function is used to store the key-value to localStorage.
49
- * @param filed
50
- * @param fields
51
- */
52
- export function localStorageEngine_write(filed, fields) {
53
- if (localStorage.getItem(filed) !== null) {
54
- switch (typeof fields[filed]) {
55
- case "string":
56
- localStorage.setItem(filed, fields[filed]);
57
- break;
58
- case "number":
59
- localStorage.setItem(filed, fields[filed]);
60
- break;
61
- case "boolean":
62
- localStorage.setItem(filed, fields[filed]);
63
- break;
64
- case "bigint":
65
- localStorage.setItem(filed, fields[filed]);
66
- break;
67
- case "object":
68
- localStorage.setItem(filed, JSON.stringify(fields[filed]));
69
- break;
70
- }
71
- }
72
- else {
73
- console.warn("The localStorage has no key:" + filed + ", which will be stored to localStorage!");
74
- switch (typeof fields[filed]) {
75
- case "string":
76
- localStorage.setItem(filed, fields[filed]);
77
- break;
78
- case "number":
79
- localStorage.setItem(filed, fields[filed]);
80
- break;
81
- case "boolean":
82
- localStorage.setItem(filed, fields[filed]);
83
- break;
84
- case "bigint":
85
- localStorage.setItem(filed, fields[filed]);
86
- break;
87
- case "object":
88
- localStorage.setItem(filed, JSON.stringify(fields[filed]));
89
- break;
90
- }
91
- }
92
- }