@sankhyalabs/core-docs 0.0.0-hotfix-ga-KB-4098.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.
Files changed (59) hide show
  1. package/README.md +63 -0
  2. package/classes/ApplicationContext.md +90 -0
  3. package/classes/ArrayUtils.md +99 -0
  4. package/classes/AuthorizedServiceCaller.md +76 -0
  5. package/classes/Change.md +190 -0
  6. package/classes/DataUnit.md +2427 -0
  7. package/classes/DataUnitAction.md +96 -0
  8. package/classes/DataUnitStorage.md +116 -0
  9. package/classes/DateUtils.md +327 -0
  10. package/classes/ElementIDUtils.md +308 -0
  11. package/classes/ErrorException.md +214 -0
  12. package/classes/ErrorTracking.md +62 -0
  13. package/classes/FloatingManager.md +530 -0
  14. package/classes/HttpProvider.md +96 -0
  15. package/classes/JSUtils.md +115 -0
  16. package/classes/MaskFormatter-1.md +347 -0
  17. package/classes/NumberUtils.md +335 -0
  18. package/classes/ObjectUtils.md +160 -0
  19. package/classes/OnboardingUtils.md +126 -0
  20. package/classes/PromiseSync.md +91 -0
  21. package/classes/ReadyUtil.md +115 -0
  22. package/classes/RequestMetadata.md +84 -0
  23. package/classes/SelectionInfo.md +168 -0
  24. package/classes/SkwHttpProvider.md +109 -0
  25. package/classes/StringUtils.md +562 -0
  26. package/classes/TimeFormatter.md +98 -0
  27. package/classes/UserAgentUtils.md +58 -0
  28. package/classes/VersionUtils.md +42 -0
  29. package/classes/WaitingChangeException.md +200 -0
  30. package/classes/WarningException.md +214 -0
  31. package/enums/Action.md +283 -0
  32. package/enums/ChangeOperation.md +52 -0
  33. package/enums/DataType.md +63 -0
  34. package/enums/DependencyType.md +41 -0
  35. package/enums/SelectionMode.md +30 -0
  36. package/enums/SortMode.md +30 -0
  37. package/enums/UserInterface.md +195 -0
  38. package/interfaces/ChildDescriptor.md +41 -0
  39. package/interfaces/ChildLink.md +30 -0
  40. package/interfaces/DUActionInterceptor.md +29 -0
  41. package/interfaces/ExecutionContext.md +58 -0
  42. package/interfaces/FieldDescriptor.md +140 -0
  43. package/interfaces/Filter.md +41 -0
  44. package/interfaces/IElementIDInfo.md +30 -0
  45. package/interfaces/LoadDataRequest.md +101 -0
  46. package/interfaces/LoadDataResponse.md +36 -0
  47. package/interfaces/PageRequest.md +41 -0
  48. package/interfaces/PaginationInfo.md +75 -0
  49. package/interfaces/PromiseSyncCallback.md +39 -0
  50. package/interfaces/QuickFilter.md +41 -0
  51. package/interfaces/Record.md +62 -0
  52. package/interfaces/SavedRecord.md +85 -0
  53. package/interfaces/Sort.md +41 -0
  54. package/interfaces/SortingProvider.md +29 -0
  55. package/interfaces/UnitMetadata.md +52 -0
  56. package/interfaces/WaitingChange.md +41 -0
  57. package/modules/MaskFormatter.md +37 -0
  58. package/modules.md +73 -0
  59. package/package.json +14 -0
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ @sankhyalabs/core / [Exports](modules.md)
2
+
3
+ # @sankhyalabs/core
4
+
5
+ Esse projeto é responsavél por disponibilizar utilitários JavaScript comuns entre vários projetos.
6
+
7
+ ## ❓ Como usar
8
+
9
+ ---
10
+
11
+ Instale as dependências:
12
+
13
+ ```sh
14
+ $ npm install @sankhyalabs/core
15
+ ```
16
+
17
+ E utilize as funcionalidades:
18
+
19
+ ```ts
20
+ import {StringUtils} from '@sankhyalabs/core'
21
+
22
+ function test() {
23
+ alert(StringUtils.isEmpty(''));
24
+ }
25
+ ```
26
+
27
+ ## ⁉️ Como contribuir
28
+
29
+ ---
30
+
31
+ 1. Crie uma branch com nome dentro
32
+ dos [padrões semânticos](https://comunidade.sankhya.com.br/t/sankhya-gitflow-padroes-de-nomenclatura-de-branch-para-um-fluxo-de-desenvolvimento-eficiente/7189)
33
+ 2. Realize as alterações para resolução das suas tarefas
34
+ 3. Se possível,
35
+ crie [casos de teste](https://git.sankhya.com.br/sankhyalabs/sankhyacore/-/wikis/Diretrizes-de-Codifica%C3%A7%C3%A3o#testes)
36
+ para a tarefa que você está executando
37
+ 4. Faça os commits dentro
38
+ dos [padrões semânticos](https://comunidade.sankhya.com.br/t/formatando-mensagens-de-commit-com-cz-sankhya/7191) para
39
+ a sua branch
40
+ 5. Abra um merge request para a branch alvo com as informações de acordo
41
+
42
+ > Por favor, siga os padrões de código descritos
43
+ > em [nossa Wiki](https://git.sankhya.com.br/sankhyalabs/sankhyacore/-/wikis/Diretrizes-de-Codifica%C3%A7%C3%A3o)!
44
+
45
+ ## ⚡ Utilitários
46
+
47
+ ---
48
+
49
+ Aqui estão alguns utilitários que podem ajudar a melhorar a experiência de uso do **sankhyacore**:
50
+
51
+ - Projeto [cz-sankhya](https://git.sankhya.com.br/ferramentas/devops/semantic-release/cz-sankhya) - é um adaptador que
52
+ extende as funcionalidades do [commitizen](https://github.com/commitizen/cz-cli), e que te ajuda a escrever mensagens
53
+ de commit bem formatadas e guiadas, de maneira interativa e assertiva.
54
+
55
+ #### Links comunidade Sankhya Developer 🧠
56
+
57
+ - [Semantic Version](https://comunidade.sankhya.com.br/t/versionamento-semantico-sem-complicacao/7184)
58
+ - [Padrão de nomenclatura de branches](https://comunidade.sankhya.com.br/t/sankhya-gitflow-padroes-de-nomenclatura-de-branch-para-um-fluxo-de-desenvolvimento-eficiente/7189)
59
+ - Fluxo de trabalho
60
+ - [Branch feat-dev](https://comunidade.sankhya.com.br/t/sankhya-gitflow-fluxo-de-trabalho-de-uma-branch-feat-dev/7226/1)
61
+ - [Branch bugfix-dev](https://comunidade.sankhya.com.br/t/sankhya-gitflow-fluxo-de-trabalho-de-uma-branch-bugfix-dev/7190)
62
+ - [Branch hotfix-ga](https://comunidade.sankhya.com.br/t/sankhya-gitflow-fluxo-de-trabalho-de-uma-branch-hotfix-ga/7233)
63
+ - [cz-sankhya](https://comunidade.sankhya.com.br/t/formatando-mensagens-de-commit-com-cz-sankhya/7191)
@@ -0,0 +1,90 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / ApplicationContext
2
+
3
+ # Class: ApplicationContext
4
+
5
+ `ApplicationContext`: Utilizado para manipulação do contexto.
6
+ - Evitar uso da classe sem alinhamento com a arquitetura devido ao uso de variáveis globais.
7
+
8
+ ## Table of contents
9
+
10
+ ### Constructors
11
+
12
+ - [constructor](ApplicationContext.md#constructor)
13
+
14
+ ### Methods
15
+
16
+ - [getContextValue](ApplicationContext.md#getcontextvalue)
17
+ - [getCtx](ApplicationContext.md#getctx)
18
+ - [setContextValue](ApplicationContext.md#setcontextvalue)
19
+
20
+ ## Constructors
21
+
22
+ ### constructor
23
+
24
+ • **new ApplicationContext**()
25
+
26
+ ## Methods
27
+
28
+ ### getContextValue
29
+
30
+ ▸ `Static` **getContextValue**(`key`): `any`
31
+
32
+ Obtém informação específica do contexto.
33
+
34
+ #### Parameters
35
+
36
+ | Name | Type | Description |
37
+ | :------ | :------ | :------ |
38
+ | `key` | `string` | Chave do contexto desejada. |
39
+
40
+ #### Returns
41
+
42
+ `any`
43
+
44
+ - Informação do contexto desejado.
45
+
46
+ #### Defined in
47
+
48
+ src/utils/ApplicationContext.ts:15
49
+
50
+ ___
51
+
52
+ ### getCtx
53
+
54
+ ▸ `Static` `Private` **getCtx**(): `any`
55
+
56
+ Obtém o contexto global da aplicação sankhyacore.
57
+ - Esse contexto pode ser entendido como um ponto de coesão para atores que não se conhecem poderem trocar informação. Assim, o código x busca por um possível valor no contexto. Se essa informação estiver lá, ele reage de certa forma. O código Y, sabe dessa necessidade mas não consegue passar essa informação diretamente, então atribui o valor ao contexto.
58
+
59
+ #### Returns
60
+
61
+ `any`
62
+
63
+ - Objeto com as propriedades da variável global ___snkcore___ctx___.
64
+
65
+ #### Defined in
66
+
67
+ src/utils/ApplicationContext.ts:34
68
+
69
+ ___
70
+
71
+ ### setContextValue
72
+
73
+ ▸ `Static` **setContextValue**(`key`, `value`): `any`
74
+
75
+ Aplica informação no contexto.
76
+
77
+ #### Parameters
78
+
79
+ | Name | Type | Description |
80
+ | :------ | :------ | :------ |
81
+ | `key` | `string` | Identificador do contexto. |
82
+ | `value` | `any` | Informação a ser inserida no contexto. |
83
+
84
+ #### Returns
85
+
86
+ `any`
87
+
88
+ #### Defined in
89
+
90
+ src/utils/ApplicationContext.ts:25
@@ -0,0 +1,99 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / ArrayUtils
2
+
3
+ # Class: ArrayUtils
4
+
5
+ `ArrayUtils`: Utilitário com a responsabilidade de manipular Arrays.
6
+
7
+ ## Table of contents
8
+
9
+ ### Constructors
10
+
11
+ - [constructor](ArrayUtils.md#constructor)
12
+
13
+ ### Methods
14
+
15
+ - [applyStringFilter](ArrayUtils.md#applystringfilter)
16
+ - [normalizeSearchString](ArrayUtils.md#normalizesearchstring)
17
+ - [sortAlphabetically](ArrayUtils.md#sortalphabetically)
18
+
19
+ ## Constructors
20
+
21
+ ### constructor
22
+
23
+ • **new ArrayUtils**()
24
+
25
+ ## Methods
26
+
27
+ ### applyStringFilter
28
+
29
+ ▸ `Static` **applyStringFilter**(`argument`, `originalArray`, `alphabeticalSorting?`, `fieldName?`): `any`[]
30
+
31
+ Filtra um array a partir de um critério textual.
32
+
33
+ #### Parameters
34
+
35
+ | Name | Type | Default value | Description |
36
+ | :------ | :------ | :------ | :------ |
37
+ | `argument` | `string` | `undefined` | Texto a ser usado no filtro. |
38
+ | `originalArray` | `any`[] | `undefined` | Array no formato original. |
39
+ | `alphabeticalSorting` | `boolean` | `true` | Determina se o resultado deve ser ordenado ou mantido na ordem original. Por padrão ordena. |
40
+ | `fieldName` | `string` | `"label"` | Caso o objeto deva ser filtrado por um campo diferente de "label", pode-se usar esse parâmetro. |
41
+
42
+ #### Returns
43
+
44
+ `any`[]
45
+
46
+ - Um array filtrado e ordenado conforme necessidade..
47
+
48
+ #### Defined in
49
+
50
+ src/utils/ArrayUtils.ts:17
51
+
52
+ ___
53
+
54
+ ### normalizeSearchString
55
+
56
+ ▸ `Static` `Private` **normalizeSearchString**(`original`): `string`
57
+
58
+ Converte texto para caixa alta e substitui caracteres acentuados.
59
+
60
+ #### Parameters
61
+
62
+ | Name | Type | Description |
63
+ | :------ | :------ | :------ |
64
+ | `original` | `string` | Texto a ser convertido. |
65
+
66
+ #### Returns
67
+
68
+ `string`
69
+
70
+ - Texto com as letras acentuadas sem os acentos e em caixa alta.
71
+
72
+ #### Defined in
73
+
74
+ src/utils/ArrayUtils.ts:35
75
+
76
+ ___
77
+
78
+ ### sortAlphabetically
79
+
80
+ ▸ `Static` **sortAlphabetically**(`originalArray`, `fieldName?`): `any`[]
81
+
82
+ Ordena valores de um array alfabeticamente.
83
+
84
+ #### Parameters
85
+
86
+ | Name | Type | Default value | Description |
87
+ | :------ | :------ | :------ | :------ |
88
+ | `originalArray` | `any`[] | `undefined` | Array a ser ordenado. |
89
+ | `fieldName` | `string` | `"label"` | - |
90
+
91
+ #### Returns
92
+
93
+ `any`[]
94
+
95
+ - Array ordenado alfabeticamente..
96
+
97
+ #### Defined in
98
+
99
+ src/utils/ArrayUtils.ts:45
@@ -0,0 +1,76 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / AuthorizedServiceCaller
2
+
3
+ # Class: AuthorizedServiceCaller
4
+
5
+ ## Table of contents
6
+
7
+ ### Constructors
8
+
9
+ - [constructor](AuthorizedServiceCaller.md#constructor)
10
+
11
+ ### Properties
12
+
13
+ - [serverURL](AuthorizedServiceCaller.md#serverurl)
14
+ - [unauthorizedPath](AuthorizedServiceCaller.md#unauthorizedpath)
15
+
16
+ ### Methods
17
+
18
+ - [requestService](AuthorizedServiceCaller.md#requestservice)
19
+
20
+ ## Constructors
21
+
22
+ ### constructor
23
+
24
+ • **new AuthorizedServiceCaller**(`serverURL`, `unauthorizedPath`)
25
+
26
+ #### Parameters
27
+
28
+ | Name | Type |
29
+ | :------ | :------ |
30
+ | `serverURL` | `string` |
31
+ | `unauthorizedPath` | `string` |
32
+
33
+ #### Defined in
34
+
35
+ src/http/AuthorizedServiceCaller.ts:6
36
+
37
+ ## Properties
38
+
39
+ ### serverURL
40
+
41
+ • `Private` **serverURL**: `string` = `"http://192.168.1.218:8503"`
42
+
43
+ #### Defined in
44
+
45
+ src/http/AuthorizedServiceCaller.ts:3
46
+
47
+ ___
48
+
49
+ ### unauthorizedPath
50
+
51
+ • `Private` **unauthorizedPath**: `string` = `"/"`
52
+
53
+ #### Defined in
54
+
55
+ src/http/AuthorizedServiceCaller.ts:4
56
+
57
+ ## Methods
58
+
59
+ ### requestService
60
+
61
+ ▸ **requestService**(`request`, `callback?`): `Promise`<`void` \| `Response`\>
62
+
63
+ #### Parameters
64
+
65
+ | Name | Type |
66
+ | :------ | :------ |
67
+ | `request` | `AuthorizedRequest` |
68
+ | `callback?` | `Function` |
69
+
70
+ #### Returns
71
+
72
+ `Promise`<`void` \| `Response`\>
73
+
74
+ #### Defined in
75
+
76
+ src/http/AuthorizedServiceCaller.ts:12
@@ -0,0 +1,190 @@
1
+ [@sankhyalabs/core](../README.md) / [Exports](../modules.md) / Change
2
+
3
+ # Class: Change
4
+
5
+ `Change`: Dados que representam uma alteração.
6
+
7
+ ## Table of contents
8
+
9
+ ### Constructors
10
+
11
+ - [constructor](Change.md#constructor)
12
+
13
+ ### Properties
14
+
15
+ - [\_operation](Change.md#_operation)
16
+ - [dataUnit](Change.md#dataunit)
17
+ - [record](Change.md#record)
18
+ - [sourceId](Change.md#sourceid)
19
+ - [updatingFields](Change.md#updatingfields)
20
+
21
+ ### Accessors
22
+
23
+ - [operation](Change.md#operation)
24
+
25
+ ### Methods
26
+
27
+ - [isCopy](Change.md#iscopy)
28
+ - [isDelete](Change.md#isdelete)
29
+ - [isInsert](Change.md#isinsert)
30
+ - [isUpdate](Change.md#isupdate)
31
+
32
+ ## Constructors
33
+
34
+ ### constructor
35
+
36
+ • **new Change**(`dataUnit`, `record`, `updates`, `operation`, `sourceId?`)
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type |
41
+ | :------ | :------ |
42
+ | `dataUnit` | `string` |
43
+ | `record` | [`Record`](../interfaces/Record.md) |
44
+ | `updates` | `any` |
45
+ | `operation` | [`ChangeOperation`](../enums/ChangeOperation.md) |
46
+ | `sourceId?` | `string` |
47
+
48
+ #### Defined in
49
+
50
+ src/dataunit/DataUnit.ts:1664
51
+
52
+ ## Properties
53
+
54
+ ### \_operation
55
+
56
+ • `Private` **\_operation**: [`ChangeOperation`](../enums/ChangeOperation.md)
57
+
58
+ #### Defined in
59
+
60
+ src/dataunit/DataUnit.ts:1662
61
+
62
+ ___
63
+
64
+ ### dataUnit
65
+
66
+ • **dataUnit**: `string`
67
+
68
+ #### Defined in
69
+
70
+ src/dataunit/DataUnit.ts:1657
71
+
72
+ ___
73
+
74
+ ### record
75
+
76
+ • **record**: [`Record`](../interfaces/Record.md)
77
+
78
+ #### Defined in
79
+
80
+ src/dataunit/DataUnit.ts:1658
81
+
82
+ ___
83
+
84
+ ### sourceId
85
+
86
+ • **sourceId**: `undefined` \| `string`
87
+
88
+ #### Defined in
89
+
90
+ src/dataunit/DataUnit.ts:1659
91
+
92
+ ___
93
+
94
+ ### updatingFields
95
+
96
+ • **updatingFields**: `any`
97
+
98
+ #### Defined in
99
+
100
+ src/dataunit/DataUnit.ts:1660
101
+
102
+ ## Accessors
103
+
104
+ ### operation
105
+
106
+ • `get` **operation**(): `string`
107
+
108
+ Obtém o tipo de operação que está sendo realizada.
109
+
110
+ #### Returns
111
+
112
+ `string`
113
+
114
+ - Ação que está sendo executada.
115
+
116
+ #### Defined in
117
+
118
+ src/dataunit/DataUnit.ts:1679
119
+
120
+ ## Methods
121
+
122
+ ### isCopy
123
+
124
+ ▸ **isCopy**(): `boolean`
125
+
126
+ Retorna se o DataUnit está em uma operação de cópia.
127
+
128
+ #### Returns
129
+
130
+ `boolean`
131
+
132
+ - Verdadeiro se a operação for de cópia.
133
+
134
+ #### Defined in
135
+
136
+ src/dataunit/DataUnit.ts:1701
137
+
138
+ ___
139
+
140
+ ### isDelete
141
+
142
+ ▸ **isDelete**(): `boolean`
143
+
144
+ Retorna se o DataUnit está em uma operação de deleção.
145
+
146
+ #### Returns
147
+
148
+ `boolean`
149
+
150
+ - Verdadeiro se a operação for de deleção.
151
+
152
+ #### Defined in
153
+
154
+ src/dataunit/DataUnit.ts:1712
155
+
156
+ ___
157
+
158
+ ### isInsert
159
+
160
+ ▸ **isInsert**(): `boolean`
161
+
162
+ Retorna se o DataUnit está em uma operação de inserção.
163
+
164
+ #### Returns
165
+
166
+ `boolean`
167
+
168
+ - Verdadeiro se a operação for de inserção.
169
+
170
+ #### Defined in
171
+
172
+ src/dataunit/DataUnit.ts:1690
173
+
174
+ ___
175
+
176
+ ### isUpdate
177
+
178
+ ▸ **isUpdate**(): `boolean`
179
+
180
+ Retorna se o DataUnit está em uma operação de atualização.
181
+
182
+ #### Returns
183
+
184
+ `boolean`
185
+
186
+ - Verdadeiro se a operação for de atualização.
187
+
188
+ #### Defined in
189
+
190
+ src/dataunit/DataUnit.ts:1723