@sankhyalabs/sankhyablocks 1.0.12 → 1.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,40 +1,75 @@
1
- # sankhya-blocks
2
-
3
- Projeto para integração do design system ez-ui com as regras de negocio/framework do ERP Sankhya.
4
-
5
- # Como usar
6
-
7
- ```sh
8
- $ npm install @sankhyalabs/sankhyablocks
9
- ```
10
-
11
- ```ts
12
- import { StringUtils, NumberUtils, SankhyaAppProvider } from '@sankhyalabs/sankhyablocks'
13
-
14
-
15
- function test(){
16
- alert(StringUtils.isEmpty("")); //Verifica se a string é vazia
17
- alert(NumberUtils.stringToNumber("100,12")); //Converte a string para o tipo number do javascript. Ex: 100.12
18
- }
19
-
20
- function showMessage(){
21
- SankhyaAppProvider.alert("Title", "Content"); //Apresenta mensagem de alerta
22
- }
23
-
24
- function getParam(){
25
- SankhyaAppProvider.parameters.asInteger("mge.meu.parametro").then(paramValue => { //Busca o valor do parâmetro com nome mge.meu.parametro
26
- console.log(paramValue);
27
- });
28
- }
29
-
30
- function getDataunit(){
31
- let myDataUnit = SankhyaAppProvider.getDataunit("MinhaEntidade");
32
- myDataUnit.loadData(); //Carrega registros da entidade
33
- }
34
- ```
35
-
36
-
37
- ## Comandos NPM
38
- - `npm run dev`: Esse comando foi criado com o intuito de facilitar o build do projeto em ambiente de desenvolvimento, ele faz o build do projeto em modo `development` e inicia o watch do webpack para monitorar alterações nos arquivos. Alteração na assinatura de métodos não são refletidas nesse modo.
39
-
40
- - `npm run build`: Esse comando foi criado para fazer o build do projeto para produção, ele faz o build do projeto em modo `production`
1
+ ![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)
2
+
3
+ # Stencil Component Starter
4
+
5
+ This is a starter project for building a standalone Web Component using Stencil.
6
+
7
+ Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
8
+
9
+ # Stencil
10
+
11
+ Stencil is a compiler for building fast web apps using Web Components.
12
+
13
+ Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
14
+
15
+ Stencil components are just Web Components, so they work in any major framework or with no framework at all.
16
+
17
+ ## Getting Started
18
+
19
+ To start building a new web component using Stencil, clone this repo to a new directory:
20
+
21
+ ```bash
22
+ git clone https://github.com/ionic-team/stencil-component-starter.git my-component
23
+ cd my-component
24
+ git remote rm origin
25
+ ```
26
+
27
+ and run:
28
+
29
+ ```bash
30
+ npm install
31
+ npm start
32
+ ```
33
+
34
+ To build the component for production, run:
35
+
36
+ ```bash
37
+ npm run build
38
+ ```
39
+
40
+ To run the unit tests for the components, run:
41
+
42
+ ```bash
43
+ npm test
44
+ ```
45
+
46
+ Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
47
+
48
+
49
+ ## Naming Components
50
+
51
+ When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
52
+
53
+ Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.
54
+
55
+
56
+ ## Using this component
57
+
58
+ There are three strategies we recommend for using web components built with Stencil.
59
+
60
+ The first step for all three of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
61
+
62
+ ### Script tag
63
+
64
+ - Put a script tag similar to this `<script type='module' src='https://unpkg.com/my-component@0.0.1/dist/my-component.esm.js'></script>` in the head of your index.html
65
+ - Then you can use the element anywhere in your template, JSX, html etc
66
+
67
+ ### Node Modules
68
+ - Run `npm install my-component --save`
69
+ - Put a script tag similar to this `<script type='module' src='node_modules/my-component/dist/my-component.esm.js'></script>` in the head of your index.html
70
+ - Then you can use the element anywhere in your template, JSX, html etc
71
+
72
+ ### In a stencil-starter app
73
+ - Run `npm install my-component --save`
74
+ - Add an import to the npm packages `import my-component;`
75
+ - Then you can use the element anywhere in your template, JSX, html etc
package/package.json CHANGED
@@ -1,81 +1,94 @@
1
- {
2
- "name": "@sankhyalabs/sankhyablocks",
3
- "version": "1.0.12",
4
- "description": "Projeto para integração do design system ez-ui com as regras de negocio/framework do ERP Sankhya",
5
- "main": "dist/index.js",
6
- "types": "dist/types/index.d.ts",
7
- "scripts": {
8
- "start": "webpack serve --config webpack.config.demo.js",
9
- "build": "webpack && tsc",
10
- "dev": "set isDev=true&& tsc && webpack",
11
- "build:demo": "webpack --config webpack.config.demo.js",
12
- "test": "jest --silent",
13
- "coverage": "npm run test -- --coverage",
14
- "trypublish": "npm publish || true"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": ""
19
- },
20
- "author": "leonardo.jorge",
21
- "license": "MIT",
22
- "keywords": [
23
- "sankhya",
24
- "blocks",
25
- "utilities",
26
- "utils"
27
- ],
28
- "devDependencies": {
29
- "@babel/cli": "^7.17.6",
30
- "@babel/core": "^7.17.9",
31
- "@babel/plugin-proposal-class-properties": "^7.16.0",
32
- "@babel/plugin-transform-typescript": "^7.16.8",
33
- "@babel/polyfill": "^7.12.1",
34
- "@babel/preset-env": "^7.16.11",
35
- "@sankhyalabs/core": "^1.0.34",
36
- "@types/jest": "^27.4.1",
37
- "@typescript-eslint/eslint-plugin": "^4.32.0",
38
- "@typescript-eslint/parser": "^4.33.0",
39
- "babel-eslint": "^10.1.0",
40
- "babel-loader": "^8.2.5",
41
- "babel-preset-minify": "^0.5.0",
42
- "css-loader": "^6.7.1",
43
- "eslint": "^7.32.0",
44
- "file-loader": "^6.2.0",
45
- "html-webpack-plugin": "^5.5.0",
46
- "jest": "^27.5.1",
47
- "mini-css-extract-plugin": "^2.6.0",
48
- "optimize-css-assets-webpack-plugin": "^6.0.1",
49
- "prettier": "^2.6.2",
50
- "prettier-webpack-plugin": "^1.2.0",
51
- "style-loader": "^3.3.1",
52
- "terser-webpack-plugin": "^5.3.1",
53
- "typescript": "^4.6.3",
54
- "url-loader": "^4.1.1",
55
- "webpack": "^5.72.0",
56
- "webpack-cli": "^4.9.2",
57
- "webpack-dev-server": "4.8.1"
58
- },
59
- "jest": {
60
- "moduleNameMapper": {
61
- "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/scripts/testMock.js",
62
- "\\.(css|less)$": "<rootDir>/scripts/testMock.js"
63
- },
64
- "moduleFileExtensions": [
65
- "web.js",
66
- "js",
67
- "web.ts",
68
- "ts",
69
- "web.tsx",
70
- "tsx",
71
- "json",
72
- "web.jsx",
73
- "jsx",
74
- "node"
75
- ]
76
- },
77
- "dependencies": {
78
- "@sankhyalabs/ezui": "^1.1.87",
79
- "graphql-request": "^4.2.0"
80
- }
81
- }
1
+ {
2
+ "name": "@sankhyalabs/sankhyablocks",
3
+ "version": "1.1.0",
4
+ "description": "Stencil Component Starter",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.js",
7
+ "es2015": "dist/esm/index.mjs",
8
+ "es2017": "dist/esm/index.mjs",
9
+ "types": "dist/types/index.d.ts",
10
+ "collection": "dist/collection/collection-manifest.json",
11
+ "collection:main": "dist/collection/index.js",
12
+ "unpkg": "dist/sankhyablocks/sankhyablocks.esm.js",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://git.sankhya.com.br/sankhyalabs/sankhya-blocks.git"
16
+ },
17
+ "files": [
18
+ "dist/",
19
+ "loader/",
20
+ "react/"
21
+ ],
22
+ "scripts": {
23
+ "build": "stencil build --docs",
24
+ "build.prod": "stencil build --docs --prod",
25
+ "build.with.peerdeps": "stencil build --docs --prod --force-peer-deps",
26
+ "start": "stencil build --dev --watch --serve --force-peer-deps",
27
+ "test": "stencil test --spec --e2e",
28
+ "test.watch": "stencil test --spec --e2e --watchAll",
29
+ "generate": "stencil generate",
30
+ "link": "node link.js",
31
+ "semantic-release": "semantic-release"
32
+ },
33
+ "dependencies": {
34
+ "graphql-request": "^4.2.0"
35
+ },
36
+ "devDependencies": {
37
+ "@babel/preset-env": "^7.18.2",
38
+ "@sankhyalabs/core": "^1.0.43",
39
+ "@sankhyalabs/ezui": "^1.1.111",
40
+ "@sankhyalabs/skippeerdeps": "^1.0.2",
41
+ "@semantic-release/git": "^9.0.0",
42
+ "@semantic-release/gitlab": "^6.1.0",
43
+ "@semantic-release/npm": "^7.1.3",
44
+ "@stencil/core": "^2.13.0",
45
+ "@stencil/react-output-target": "0.0.9",
46
+ "@types/jest": "^27.0.3",
47
+ "ag-grid-community": "^26.2.1",
48
+ "ag-grid-enterprise": "^26.2.1",
49
+ "jest": "^27.4.5",
50
+ "jest-cli": "^27.4.5",
51
+ "puppeteer": "^10.0.0",
52
+ "redux": "^4.1.2",
53
+ "semantic-release": "17.4.3"
54
+ },
55
+ "jest": {
56
+ "verbose": true
57
+ },
58
+ "peerDependencies": {
59
+ "@sankhyalabs/core": "^1.x",
60
+ "@sankhyalabs/ezui": "^1.x"
61
+ },
62
+ "release": {
63
+ "plugins": [
64
+ [
65
+ "@semantic-release/commit-analyzer",
66
+ {
67
+ "preset": "angular",
68
+ "releaseRules": [
69
+ {
70
+ "type": "breaking",
71
+ "scope": "API",
72
+ "release": "major"
73
+ }
74
+ ]
75
+ }
76
+ ],
77
+ "@semantic-release/release-notes-generator",
78
+ [
79
+ "@semantic-release/npm",
80
+ {
81
+ "npmPublish": true
82
+ }
83
+ ],
84
+ [
85
+ "@semantic-release/gitlab",
86
+ {
87
+ "gitlabUrl": "https://git.sankhya.com.br",
88
+ "gitlabApiPathPrefix": "/api/v4"
89
+ }
90
+ ]
91
+ ]
92
+ },
93
+ "license": "MIT"
94
+ }
@@ -0,0 +1 @@
1
+ a