@sankhyalabs/core 1.0.39 → 1.0.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.
@@ -1,10 +1,9 @@
1
1
  export default class ApplicationContext {
2
2
  static getContextValue(key) {
3
- const weakRef = ApplicationContext.getCtx()[key];
4
- return weakRef ? weakRef.deref() : undefined;
3
+ return ApplicationContext.getCtx()[key];
5
4
  }
6
5
  static setContextValue(key, value) {
7
- ApplicationContext.getCtx()[key] = new WeakRef(value);
6
+ ApplicationContext.getCtx()[key] = value;
8
7
  }
9
8
  static getCtx() {
10
9
  let ctx = window.___snkcore___ctx___;
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationContext.js","sourceRoot":"","sources":["../../src/utils/ApplicationContext.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAE5B,MAAM,CAAC,eAAe,CAAC,GAAW;QACrC,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACjD,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,GAAW,EAAE,KAAU;QACjD,kBAAkB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAEO,MAAM,CAAC,MAAM;QACjB,IAAI,GAAG,GAAI,MAAc,CAAC,mBAAmB,CAAC;QAC9C,IAAG,CAAC,GAAG,EAAC;YACJ,GAAG,GAAG,EAAE,CAAC;YACR,MAAc,CAAC,mBAAmB,GAAG,GAAG,CAAC;SAC7C;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ"}
1
+ {"version":3,"file":"ApplicationContext.js","sourceRoot":"","sources":["../../src/utils/ApplicationContext.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAE5B,MAAM,CAAC,eAAe,CAAC,GAAW;QACrC,OAAO,kBAAkB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAEM,MAAM,CAAC,eAAe,CAAC,GAAW,EAAE,KAAU;QACjD,kBAAkB,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC7C,CAAC;IAEO,MAAM,CAAC,MAAM;QACjB,IAAI,GAAG,GAAI,MAAc,CAAC,mBAAmB,CAAC;QAC9C,IAAG,CAAC,GAAG,EAAC;YACJ,GAAG,GAAG,EAAE,CAAC;YACR,MAAc,CAAC,mBAAmB,GAAG,GAAG,CAAC;SAC7C;QACD,OAAO,GAAG,CAAC;IACf,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/core",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Modulo core JavaScript da Sankhya.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,12 +1,11 @@
1
1
  export default class ApplicationContext{
2
2
 
3
3
  public static getContextValue(key: string):any{
4
- const weakRef = ApplicationContext.getCtx()[key];
5
- return weakRef ? weakRef.deref() : undefined;
4
+ return ApplicationContext.getCtx()[key];
6
5
  }
7
6
 
8
7
  public static setContextValue(key: string, value: any):any{
9
- ApplicationContext.getCtx()[key] = new WeakRef(value);
8
+ ApplicationContext.getCtx()[key] = value;
10
9
  }
11
10
 
12
11
  private static getCtx():any{