render-core 1.3.69 → 1.3.71

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 CHANGED
@@ -30,6 +30,7 @@ export declare class RenderJS extends AbstractRenderJS implements RenderGeneric
30
30
  * @return void
31
31
  */
32
32
  run(): void;
33
+ init(callable: () => void): void;
33
34
  }
34
35
  /**
35
36
  * Inject element to the window environment.
package/index.js CHANGED
@@ -73,6 +73,9 @@ var RenderJS = /** @class */ (function (_super) {
73
73
  //execute
74
74
  render(this);
75
75
  };
76
+ RenderJS.prototype.init = function (callable) {
77
+ callable();
78
+ };
76
79
  return RenderJS;
77
80
  }(AbstractRenderJS));
78
81
  export { RenderJS };
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ STRING: string;
3
+ NUMBER: string;
4
+ BOOLEAN: string;
5
+ };
6
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export default {
2
+ STRING: 'string',
3
+ NUMBER: 'number',
4
+ BOOLEAN: 'boolean',
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.3.69",
3
+ "version": "1.3.71",
4
4
  "description": "The extendable javascript web framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,4 +1,3 @@
1
- import { Component } from "render-refer";
2
1
  /**
3
2
  * This function is used to save the prototype component proto in the window object.
4
3
  * So, you can hava a tip that we custom a property named 'tagLib' in the window object.
@@ -6,29 +5,23 @@ import { Component } from "render-refer";
6
5
  * @param component
7
6
  */
8
7
  export function registerTagLib(application, component) {
9
- //if the input parameter is an instance of Component,do the code block.
10
- if (component instanceof Component) {
11
- if (!application.tagLib.has(component.getName().toUpperCase())) {
12
- application.tagLib.set(component.getName().toUpperCase(), component);
13
- }
14
- else {
15
- console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
16
- }
17
- }
18
- else if (Array.isArray(component)) {
8
+ if (Array.isArray(component)) {
19
9
  //if the input parameter is an array of Component,do the code block.
20
10
  component.forEach(function (component) {
21
- if (component instanceof Component) {
22
- if (!application.tagLib.has(component.getName().toUpperCase())) {
23
- application.tagLib.set(component.getName().toUpperCase(), component);
24
- }
25
- else {
26
- console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
27
- }
11
+ if (!application.tagLib.has(component.getName().toUpperCase())) {
12
+ application.tagLib.set(component.getName().toUpperCase(), component);
13
+ }
14
+ else {
15
+ console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
28
16
  }
29
17
  });
30
18
  }
31
19
  else {
32
- console.warn("The tag element is not extended the Generic Obj");
20
+ if (!application.tagLib.has(component.getName().toUpperCase())) {
21
+ application.tagLib.set(component.getName().toUpperCase(), component);
22
+ }
23
+ else {
24
+ console.warn("The Tag:" + component.getName().toUpperCase() + "has been registered!");
25
+ }
33
26
  }
34
27
  }