@sankhyalabs/sankhyablocks 1.0.0

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,4 @@
1
+ import ApplicationUtils from "@sankhyalabs/ezui/dist/types/utils/ApplicationUtils";
2
+ export default class SankhyaAppProvider extends ApplicationUtils {
3
+ static getResourceID(): string;
4
+ }
@@ -0,0 +1,6 @@
1
+ export default class ApplicationConfigFetcher {
2
+ private templateByQuery;
3
+ constructor();
4
+ private buldTemplates;
5
+ getResource(name: string, resourceID: string): Promise<any>;
6
+ }
@@ -0,0 +1,8 @@
1
+ import { UnitMetadata, DataUnit } from "@sankhyalabs/core/dist/index.js";
2
+ export default class DataUnitFetcher {
3
+ private templateByQuery;
4
+ constructor();
5
+ private buldTemplates;
6
+ getDataUnit(name: string, resourceID: string): Promise<UnitMetadata>;
7
+ static bindTo(dataUnit: DataUnit, resourceID: string): DataUnitFetcher;
8
+ }
@@ -0,0 +1,2 @@
1
+ export declare class FormConfigFetcher {
2
+ }
@@ -0,0 +1,2 @@
1
+ export declare class GridConfigFetcher {
2
+ }
@@ -0,0 +1,4 @@
1
+ import SankhyaAppProvider from "./application/SankhyaAppProvider";
2
+ import DataUnitFetcher from "./http/fetchers/dataunit-fetcher";
3
+ import ApplicationConfigFetcher from "./http/fetchers/application-config-fetcher";
4
+ export { SankhyaAppProvider, DataUnitFetcher, ApplicationConfigFetcher };
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@sankhyalabs/sankhyablocks",
3
+ "version": "1.0.0",
4
+ "description": "Projeto para integração do design system ez-ui com as regras de negocio/framework do ERP Sankhya",
5
+ "main": "build/index.js",
6
+ "types": "build/types/index.d.ts",
7
+ "scripts": {
8
+ "start": "webpack serve --config webpack.config.demo.js",
9
+ "build": "webpack && tsc",
10
+ "build:demo": "webpack --config webpack.config.demo.js",
11
+ "test": "jest --silent",
12
+ "coverage": "npm run test -- --coverage",
13
+ "trypublish": "npm publish || true"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": ""
18
+ },
19
+ "author": "leonardo.jorge",
20
+ "license": "MIT",
21
+ "keywords": [
22
+ "sankhya",
23
+ "blocks",
24
+ "utilities",
25
+ "utils"
26
+ ],
27
+ "devDependencies": {
28
+ "@babel/cli": "^7.17.6",
29
+ "@babel/core": "^7.17.9",
30
+ "@babel/plugin-proposal-class-properties": "^7.16.0",
31
+ "@babel/plugin-transform-typescript": "^7.16.8",
32
+ "@babel/polyfill": "^7.12.1",
33
+ "@babel/preset-env": "^7.16.11",
34
+ "@types/jest": "^27.4.1",
35
+ "@typescript-eslint/eslint-plugin": "^4.32.0",
36
+ "@typescript-eslint/parser": "^4.33.0",
37
+ "babel-eslint": "^10.1.0",
38
+ "babel-loader": "^8.2.5",
39
+ "babel-preset-minify": "^0.5.0",
40
+ "css-loader": "^6.7.1",
41
+ "eslint": "^7.32.0",
42
+ "file-loader": "^6.2.0",
43
+ "html-webpack-plugin": "^5.5.0",
44
+ "jest": "^27.5.1",
45
+ "mini-css-extract-plugin": "^2.6.0",
46
+ "optimize-css-assets-webpack-plugin": "^6.0.1",
47
+ "prettier": "^2.6.2",
48
+ "prettier-webpack-plugin": "^1.2.0",
49
+ "style-loader": "^3.3.1",
50
+ "terser-webpack-plugin": "^5.3.1",
51
+ "typescript": "^4.6.3",
52
+ "url-loader": "^4.1.1",
53
+ "webpack": "^5.72.0",
54
+ "webpack-cli": "^4.9.2",
55
+ "webpack-dev-server": "4.8.1"
56
+ },
57
+ "jest": {
58
+ "moduleNameMapper": {
59
+ "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/scripts/testMock.js",
60
+ "\\.(css|less)$": "<rootDir>/scripts/testMock.js"
61
+ },
62
+ "moduleFileExtensions": [
63
+ "web.js",
64
+ "js",
65
+ "web.ts",
66
+ "ts",
67
+ "web.tsx",
68
+ "tsx",
69
+ "json",
70
+ "web.jsx",
71
+ "jsx",
72
+ "node"
73
+ ]
74
+ },
75
+ "dependencies": {
76
+ "@sankhyalabs/core": "^1.0.29",
77
+ "@sankhyalabs/ezui": "^1.1.77",
78
+ "graphql-request": "^4.2.0"
79
+ }
80
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "noImplicitAny": true,
4
+ "outDir": "build/types",
5
+ "module": "esnext",
6
+ "target": "es5",
7
+ "allowJs": true,
8
+ "sourceMap": true,
9
+ "declaration": true,
10
+ "emitDeclarationOnly": true,
11
+ "suppressImplicitAnyIndexErrors": true,
12
+ "lib": ["es2018", "dom"],
13
+ "moduleResolution": "node",
14
+ },
15
+ "include": ["src/lib"],
16
+ "exclude": ["node_modules/@types/webpack", "src/lib/**/tests"],
17
+ }
@@ -0,0 +1,47 @@
1
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
2
+ const HtmlWebpackPlugin = require('html-webpack-plugin');
3
+
4
+ module.exports = {
5
+ mode: "development",
6
+ devtool: 'cheap-module-source-map',
7
+ entry: './src/demo/index.ts',
8
+ output: {
9
+ filename: 'index.js'
10
+ },
11
+ optimization: {
12
+ minimize: false,
13
+ },
14
+ devServer: {
15
+ open: true,
16
+ hot: true,
17
+ host: "localhost",
18
+ port: 9000
19
+ },
20
+ module: {
21
+ rules: [
22
+ {
23
+ test: /\.(m|j|t)s$/,
24
+ exclude: /(node_modules|bower_components)/,
25
+ use: {
26
+ loader: 'babel-loader'
27
+ }
28
+ },
29
+ {
30
+ test: /\.(sa|sc|c)ss$/,
31
+ use: [
32
+ MiniCssExtractPlugin.loader,
33
+ { loader: "css-loader", options: { sourceMap: true } },
34
+ ],
35
+ }
36
+ ]
37
+ },
38
+ plugins: [
39
+ new MiniCssExtractPlugin({
40
+ filename: 'css/index.css'
41
+ }),
42
+ new HtmlWebpackPlugin(),
43
+ ],
44
+ resolve: {
45
+ extensions: ['.ts', '.js', '.json']
46
+ }
47
+ };