@sankhyalabs/sankhyablocks 1.0.2 → 1.0.5

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.
@@ -0,0 +1,10 @@
1
+ export default class AppParameterProvider {
2
+ private resourceID;
3
+ private paramFetcher;
4
+ constructor(resourceID: string);
5
+ asString(name: string): Promise<string>;
6
+ asInteger(name: string): Promise<Number>;
7
+ asFloat(name: string): Promise<Number>;
8
+ asBoolean(name: string): Promise<boolean>;
9
+ asDate(name: string): Promise<Date>;
10
+ }
@@ -1,8 +1,11 @@
1
1
  import { DataUnit } from "@sankhyalabs/core";
2
2
  import ApplicationUtils from "@sankhyalabs/ezui/dist/types/utils/ApplicationUtils";
3
+ import AppParameterProvider from "./AppParameterProvider";
3
4
  export default class SankhyaAppProvider extends ApplicationUtils {
4
5
  private static urlParams;
5
6
  private static dataUnitByEntity;
7
+ private static _parameters;
8
+ static get parameters(): AppParameterProvider;
6
9
  static getResourceID(defaultValue?: string): string;
7
10
  static temOpcional(opcional: string): boolean;
8
11
  static getAttributeFromHTMLWrapper(attribName: string): string;
@@ -4,5 +4,7 @@ export default class DataUnitFetcher {
4
4
  constructor();
5
5
  private buldTemplates;
6
6
  getDataUnit(name: string, resourceID: string): Promise<UnitMetadata>;
7
+ private normalizeMetadata;
8
+ private tryParseJson;
7
9
  static bindTo(dataUnit: DataUnit, resourceID: string): DataUnitFetcher;
8
10
  }
@@ -0,0 +1,13 @@
1
+ export default class ParametersFetcher {
2
+ private templateByQuery;
3
+ constructor();
4
+ private buldTemplates;
5
+ getParam(name: string, resourceID: string): Promise<any>;
6
+ asString(name: string, resourceID: string): Promise<string>;
7
+ asInteger(name: string, resourceID: string): Promise<Number>;
8
+ asFloat(name: string, resourceID: string): Promise<Number>;
9
+ asBoolean(name: string, resourceID: string): Promise<boolean>;
10
+ asDate(name: string, resourceID: string): Promise<Date>;
11
+ getBatchParams(names: Array<string>, resourceID: string): Promise<{}>;
12
+ private getValue;
13
+ }
@@ -1,3 +1,4 @@
1
1
  export default class Workspace {
2
+ static resourceID: any;
2
3
  static openAppActivity(resourceId: string, pkObject: Map<string, any>): void;
3
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/sankhyablocks",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "description": "Projeto para integração do design system ez-ui com as regras de negocio/framework do ERP Sankhya",
5
5
  "main": "build/index.js",
6
6
  "types": "build/types/index.d.ts",
@@ -73,7 +73,7 @@
73
73
  ]
74
74
  },
75
75
  "dependencies": {
76
- "@sankhyalabs/core": "^1.0.30",
76
+ "@sankhyalabs/core": "^1.0.31",
77
77
  "@sankhyalabs/ezui": "^1.1.77",
78
78
  "graphql-request": "^4.2.0"
79
79
  }