@sankhyalabs/sankhyablocks 1.0.8 → 1.0.9
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/README.md +33 -1
- package/dist/index.js +286 -277
- package/dist/index.js.map +1 -1
- package/dist/types/application/AppParameterProvider.d.ts +2 -2
- package/dist/types/application/SankhyaAppProvider.d.ts +1 -1
- package/dist/types/http/fetchers/parameters-fecher.d.ts +2 -2
- package/dist/types/workspace/workspace.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
# sankhya-blocks
|
|
2
2
|
|
|
3
|
-
Projeto para integração do design system ez-ui com as regras de negocio/framework do ERP Sankhya
|
|
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
|
+
|
|
4
36
|
|
|
5
37
|
## Comandos NPM
|
|
6
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.
|