render-core 1.0.105 → 1.0.106

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.
@@ -1,9 +1,10 @@
1
1
  import { AppTip } from "../tips/appTip";
2
+ import { ContextController } from "./contextController";
2
3
  export declare class AppController implements AppTip {
3
4
  private fileds;
4
5
  constructor();
5
6
  saveFileds(fileds: {}): void;
6
- loadFileds(): void;
7
+ loadFileds(context: ContextController): void;
7
8
  setFiled(filed: string, value: any): void;
8
9
  getFiled(filed: string): any;
9
10
  }
@@ -24,7 +24,7 @@ var AppController = /** @class */ (function () {
24
24
  }
25
25
  }
26
26
  };
27
- AppController.prototype.loadFileds = function () {
27
+ AppController.prototype.loadFileds = function (context) {
28
28
  for (var filedsKey in this.fileds) {
29
29
  if (this.fileds[filedsKey].react) {
30
30
  if (status_read({
@@ -38,7 +38,7 @@ var AppController = /** @class */ (function () {
38
38
  }
39
39
  }
40
40
  // @ts-ignore
41
- this.fileds[filedsKey].callback(this.fileds[filedsKey], window.context);
41
+ this.fileds[filedsKey].callback(this.fileds[filedsKey], context);
42
42
  }
43
43
  };
44
44
  AppController.prototype.setFiled = function (filed, value) {
@@ -48,7 +48,8 @@ var AppController = /** @class */ (function () {
48
48
  theme: JSON.stringify(value)
49
49
  }
50
50
  });
51
- this.loadFileds();
51
+ // @ts-ignore
52
+ this.loadFileds(window.context);
52
53
  // @ts-ignore
53
54
  this.fileds[filed].callback(value, window.context);
54
55
  };
@@ -1,9 +1,10 @@
1
+ import { AppController } from "./appController";
1
2
  export declare class ContextController {
2
3
  private fileds;
3
4
  private mixinData;
4
5
  constructor();
5
6
  saveFileds(fileds: {}): void;
6
- loadFileds(): void;
7
+ loadFileds(appSite: AppController): void;
7
8
  setFiled(filed: string, value: any): void;
8
9
  getFiled(filed: string): any;
9
10
  mixin(mix: {}): void;
@@ -20,7 +20,7 @@ var ContextController = /** @class */ (function () {
20
20
  }
21
21
  }
22
22
  };
23
- ContextController.prototype.loadFileds = function () {
23
+ ContextController.prototype.loadFileds = function (appSite) {
24
24
  for (var filedsKey in this.fileds) {
25
25
  if (this.fileds[filedsKey].react) {
26
26
  if (status_read({
@@ -34,7 +34,7 @@ var ContextController = /** @class */ (function () {
34
34
  }
35
35
  }
36
36
  // @ts-ignore
37
- this.fileds[filedsKey].callback(this.fileds[filedsKey], window.appSite);
37
+ this.fileds[filedsKey].callback(this.fileds[filedsKey], appSite);
38
38
  }
39
39
  };
40
40
  ContextController.prototype.setFiled = function (filed, value) {
@@ -44,7 +44,8 @@ var ContextController = /** @class */ (function () {
44
44
  theme: JSON.stringify(value)
45
45
  }
46
46
  });
47
- this.loadFileds();
47
+ // @ts-ignore
48
+ this.loadFileds(window.appSite);
48
49
  // @ts-ignore
49
50
  this.fileds[filed].callback(value, window.appSite);
50
51
  };
@@ -37,7 +37,7 @@ export function themeStyle(component, styleLib) {
37
37
  */
38
38
  export function styleResolve(tag) {
39
39
  // @ts-ignore
40
- var theme = window.context.fields.getFiled("theme");
40
+ var theme = window.context.getFiled("theme");
41
41
  if (Reflect.get(window, "styleLib").get(tag.toUpperCase()).get(theme) === undefined) {
42
42
  console.log("tag:" + tag + " has no theme " + theme);
43
43
  }
package/index.js CHANGED
@@ -26,7 +26,7 @@ var RenderJS = /** @class */ (function () {
26
26
  */
27
27
  RenderJS.prototype.configApp = function (config) {
28
28
  this.application.saveFileds(config);
29
- this.application.loadFileds();
29
+ this.application.loadFileds(this.context);
30
30
  };
31
31
  /**
32
32
  *
@@ -34,7 +34,7 @@ var RenderJS = /** @class */ (function () {
34
34
  */
35
35
  RenderJS.prototype.configContext = function (cinfig) {
36
36
  this.context.saveFileds(cinfig);
37
- this.context.loadFileds();
37
+ this.context.loadFileds(this.application);
38
38
  };
39
39
  /**
40
40
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.0.105",
3
+ "version": "1.0.106",
4
4
  "description": "The core of render-js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",