@sankhyalabs/core-docs 0.0.0-bugfix-dev-KB-6165.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/README.md +63 -0
- package/classes/ApplicationContext.md +90 -0
- package/classes/ArrayUtils.md +99 -0
- package/classes/AuthorizedServiceCaller.md +76 -0
- package/classes/Change.md +190 -0
- package/classes/DataUnit.md +2453 -0
- package/classes/DataUnitAction.md +96 -0
- package/classes/DataUnitStorage.md +116 -0
- package/classes/DateUtils.md +327 -0
- package/classes/ElementIDUtils.md +308 -0
- package/classes/ErrorException.md +214 -0
- package/classes/ErrorTracking.md +62 -0
- package/classes/FloatingManager.md +530 -0
- package/classes/HTMLBuilder.md +45 -0
- package/classes/HttpProvider.md +96 -0
- package/classes/JSUtils.md +115 -0
- package/classes/MaskFormatter-1.md +347 -0
- package/classes/NumberUtils.md +335 -0
- package/classes/ObjectUtils.md +160 -0
- package/classes/OnboardingUtils.md +126 -0
- package/classes/PromiseSync.md +91 -0
- package/classes/ReadyUtil.md +115 -0
- package/classes/RequestMetadata.md +84 -0
- package/classes/SelectionInfo.md +168 -0
- package/classes/SkwHttpProvider.md +109 -0
- package/classes/StringUtils.md +562 -0
- package/classes/TimeFormatter.md +98 -0
- package/classes/UserAgentUtils.md +58 -0
- package/classes/VersionUtils.md +42 -0
- package/classes/WaitingChangeException.md +200 -0
- package/classes/WarningException.md +214 -0
- package/enums/Action.md +294 -0
- package/enums/ChangeOperation.md +52 -0
- package/enums/DataType.md +63 -0
- package/enums/DependencyType.md +41 -0
- package/enums/SelectionMode.md +30 -0
- package/enums/SortMode.md +30 -0
- package/enums/UserInterface.md +195 -0
- package/interfaces/ChildDescriptor.md +41 -0
- package/interfaces/ChildLink.md +30 -0
- package/interfaces/DUActionInterceptor.md +29 -0
- package/interfaces/ExecutionContext.md +58 -0
- package/interfaces/FieldDescriptor.md +140 -0
- package/interfaces/Filter.md +41 -0
- package/interfaces/IElementIDInfo.md +30 -0
- package/interfaces/LoadDataRequest.md +101 -0
- package/interfaces/LoadDataResponse.md +36 -0
- package/interfaces/PageRequest.md +41 -0
- package/interfaces/PaginationInfo.md +75 -0
- package/interfaces/PromiseSyncCallback.md +39 -0
- package/interfaces/QuickFilter.md +41 -0
- package/interfaces/Record.md +62 -0
- package/interfaces/SavedRecord.md +85 -0
- package/interfaces/Sort.md +41 -0
- package/interfaces/SortingProvider.md +29 -0
- package/interfaces/UnitMetadata.md +52 -0
- package/interfaces/WaitingChange.md +41 -0
- package/modules/MaskFormatter.md +37 -0
- package/modules.md +74 -0
- package/package.json +14 -0
@@ -0,0 +1,335 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / NumberUtils
|
2
|
+
|
3
|
+
# Class: NumberUtils
|
4
|
+
|
5
|
+
`NumberUtils`: Utilizado para manipulação de numerais.
|
6
|
+
|
7
|
+
## Table of contents
|
8
|
+
|
9
|
+
### Constructors
|
10
|
+
|
11
|
+
- [constructor](NumberUtils.md#constructor)
|
12
|
+
|
13
|
+
### Methods
|
14
|
+
|
15
|
+
- [changeFormat](NumberUtils.md#changeformat)
|
16
|
+
- [compare](NumberUtils.md#compare)
|
17
|
+
- [format](NumberUtils.md#format)
|
18
|
+
- [getValueOrDefault](NumberUtils.md#getvalueordefault)
|
19
|
+
- [getValueOrZero](NumberUtils.md#getvalueorzero)
|
20
|
+
- [keepOnlyDecimalSeparator](NumberUtils.md#keeponlydecimalseparator)
|
21
|
+
- [round](NumberUtils.md#round)
|
22
|
+
- [safeFormat](NumberUtils.md#safeformat)
|
23
|
+
- [stringToNumber](NumberUtils.md#stringtonumber)
|
24
|
+
|
25
|
+
## Constructors
|
26
|
+
|
27
|
+
### constructor
|
28
|
+
|
29
|
+
• **new NumberUtils**()
|
30
|
+
|
31
|
+
## Methods
|
32
|
+
|
33
|
+
### changeFormat
|
34
|
+
|
35
|
+
▸ `Static` **changeFormat**(`value`): `string`
|
36
|
+
|
37
|
+
Troca o formato do numeral(string) de "PT-BR" para "EN-US" e vice-versa.
|
38
|
+
|
39
|
+
**`Example`**
|
40
|
+
|
41
|
+
```ts
|
42
|
+
Informo: "15,55" | Obtenho: "15.55"
|
43
|
+
```
|
44
|
+
|
45
|
+
**`Example`**
|
46
|
+
|
47
|
+
```ts
|
48
|
+
Informo: "27.99" | Obtenho: "27,99"
|
49
|
+
```
|
50
|
+
|
51
|
+
#### Parameters
|
52
|
+
|
53
|
+
| Name | Type | Description |
|
54
|
+
| :------ | :------ | :------ |
|
55
|
+
| `value` | `string` | Numeral em formato de string a ser convertido. |
|
56
|
+
|
57
|
+
#### Returns
|
58
|
+
|
59
|
+
`string`
|
60
|
+
|
61
|
+
- Numeral em formato de string formatado de "PT-BR" para "EN-US" e vice-versa.
|
62
|
+
|
63
|
+
#### Defined in
|
64
|
+
|
65
|
+
src/utils/NumberUtils.ts:186
|
66
|
+
|
67
|
+
___
|
68
|
+
|
69
|
+
### compare
|
70
|
+
|
71
|
+
▸ `Static` **compare**(`a`, `b`): `number`
|
72
|
+
|
73
|
+
Determina a ordem de umeros.
|
74
|
+
|
75
|
+
#### Parameters
|
76
|
+
|
77
|
+
| Name | Type | Description |
|
78
|
+
| :------ | :------ | :------ |
|
79
|
+
| `a` | `number` | Primeio número para comparação. |
|
80
|
+
| `b` | `number` | Segundo número para comparação. |
|
81
|
+
|
82
|
+
#### Returns
|
83
|
+
|
84
|
+
`number`
|
85
|
+
|
86
|
+
- Um numeral negativo se o primeiro argumento é menor que o segundo, zero se os dois são iguais e um numeral positivo quando o primeiro é maior que o segundo.
|
87
|
+
|
88
|
+
#### Defined in
|
89
|
+
|
90
|
+
src/utils/NumberUtils.ts:267
|
91
|
+
|
92
|
+
___
|
93
|
+
|
94
|
+
### format
|
95
|
+
|
96
|
+
▸ `Static` **format**(`value`, `precision`, `prettyPrecision?`, `defaultValue?`): `string`
|
97
|
+
|
98
|
+
Formata o numeral com a precisão informada.
|
99
|
+
|
100
|
+
**`Example`**
|
101
|
+
|
102
|
+
```ts
|
103
|
+
Informado: ('10,9845444', 3, 3) | Retorna: '10,985'
|
104
|
+
Informado: (undefined, 3, 3) | Retorna: NaN
|
105
|
+
Informado: (undefined, 3, 3, '0,00') | Retorna: 0,00
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Parameters
|
109
|
+
|
110
|
+
| Name | Type | Default value | Description |
|
111
|
+
| :------ | :------ | :------ | :------ |
|
112
|
+
| `value` | `string` | `undefined` | Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico - sem separador de milhares: ######.##). |
|
113
|
+
| `precision` | `number` | `undefined` | Quantidade de casas decimais. |
|
114
|
+
| `prettyPrecision` | `number` | `NaN` | Quantidade de zeros nos decimais. |
|
115
|
+
| `defaultValue` | `string` | `undefined` | Valor padrão caso o value não seja um valor numérico válido. |
|
116
|
+
|
117
|
+
#### Returns
|
118
|
+
|
119
|
+
`string`
|
120
|
+
|
121
|
+
- Numeral em formato de String formatado em PT-BR.
|
122
|
+
|
123
|
+
#### Defined in
|
124
|
+
|
125
|
+
src/utils/NumberUtils.ts:77
|
126
|
+
|
127
|
+
___
|
128
|
+
|
129
|
+
### getValueOrDefault
|
130
|
+
|
131
|
+
▸ `Static` **getValueOrDefault**(`value`, `defaultValue`): `number`
|
132
|
+
|
133
|
+
Obtém o valor ou o valor padrão, caso o valor seja inválido(NaN/undefined).
|
134
|
+
|
135
|
+
**`Example`**
|
136
|
+
|
137
|
+
```ts
|
138
|
+
Informo: value: 30, defaultValue: 0 | Obtenho: 30
|
139
|
+
```
|
140
|
+
|
141
|
+
**`Example`**
|
142
|
+
|
143
|
+
```ts
|
144
|
+
Informo: value: "30", defaultValue: 0 | Obtenho: 30
|
145
|
+
```
|
146
|
+
|
147
|
+
**`Example`**
|
148
|
+
|
149
|
+
```ts
|
150
|
+
Informo: value: "30abc", defaultValue: 0 | Obtenho: 0
|
151
|
+
```
|
152
|
+
|
153
|
+
#### Parameters
|
154
|
+
|
155
|
+
| Name | Type | Description |
|
156
|
+
| :------ | :------ | :------ |
|
157
|
+
| `value` | `any` | Valor a ser validado. |
|
158
|
+
| `defaultValue` | `number` | Valor padrão a ser retornado caso o value seja inválido. |
|
159
|
+
|
160
|
+
#### Returns
|
161
|
+
|
162
|
+
`number`
|
163
|
+
|
164
|
+
- O próprio numeral passado ou zero.
|
165
|
+
|
166
|
+
#### Defined in
|
167
|
+
|
168
|
+
src/utils/NumberUtils.ts:208
|
169
|
+
|
170
|
+
___
|
171
|
+
|
172
|
+
### getValueOrZero
|
173
|
+
|
174
|
+
▸ `Static` **getValueOrZero**(`value`): `number`
|
175
|
+
|
176
|
+
Obtém o valor ou zero, caso o valor seja inválido(NaN/undefined).
|
177
|
+
|
178
|
+
#### Parameters
|
179
|
+
|
180
|
+
| Name | Type | Description |
|
181
|
+
| :------ | :------ | :------ |
|
182
|
+
| `value` | `any` | Numeral a ser validado. |
|
183
|
+
|
184
|
+
#### Returns
|
185
|
+
|
186
|
+
`number`
|
187
|
+
|
188
|
+
- O próprio numeral passado. Caso esse seja inválido retorna zero.
|
189
|
+
|
190
|
+
#### Defined in
|
191
|
+
|
192
|
+
src/utils/NumberUtils.ts:227
|
193
|
+
|
194
|
+
___
|
195
|
+
|
196
|
+
### keepOnlyDecimalSeparator
|
197
|
+
|
198
|
+
▸ `Static` **keepOnlyDecimalSeparator**(`value`, `formatnumber?`): `string`
|
199
|
+
|
200
|
+
Retira os separadores de milhar de um numeral em formato de string.
|
201
|
+
|
202
|
+
**`Example`**
|
203
|
+
|
204
|
+
```ts
|
205
|
+
Informado: '95.12' | Retorna: '9512'
|
206
|
+
```
|
207
|
+
|
208
|
+
#### Parameters
|
209
|
+
|
210
|
+
| Name | Type | Default value | Description |
|
211
|
+
| :------ | :------ | :------ | :------ |
|
212
|
+
| `value` | `string` | `undefined` | Numeral em formato de string a ser convertido. |
|
213
|
+
| `formatnumber` | `string` | `'pt-BR'` | Formatação de ENTRADA e SAÍDA do utilitário: pt-BR="###.###,##" en-US="###,###.##"; Default: "pt-BR". |
|
214
|
+
|
215
|
+
#### Returns
|
216
|
+
|
217
|
+
`string`
|
218
|
+
|
219
|
+
- Numeral em formato de string formatado apenas com separador decimal.
|
220
|
+
|
221
|
+
#### Defined in
|
222
|
+
|
223
|
+
src/utils/NumberUtils.ts:158
|
224
|
+
|
225
|
+
___
|
226
|
+
|
227
|
+
### round
|
228
|
+
|
229
|
+
▸ `Static` **round**(`value`, `decimals?`): `number`
|
230
|
+
|
231
|
+
Realiza o arredondamento de casas decimais de um numero.
|
232
|
+
|
233
|
+
**`Example`**
|
234
|
+
|
235
|
+
```ts
|
236
|
+
Informo: (100.12) | 100.12
|
237
|
+
Informo: (100,12) | NaN
|
238
|
+
|
239
|
+
Informo: ("100.12", 1) | 100.1
|
240
|
+
Informo: ("100.12", 2) | 100.12
|
241
|
+
Informo: ("100.12", 3) | 100.12
|
242
|
+
|
243
|
+
Informo: ("100.15", 1) | 100.2
|
244
|
+
Informo: ("100.15", 2) | 100.15
|
245
|
+
Informo: ("100.15", 3) | 100.15
|
246
|
+
|
247
|
+
Informo: ("100.16", 1) | 100.2
|
248
|
+
Informo: ("100.16", 2) | 100.16
|
249
|
+
Informo: ("100.16", 3) | 100.16
|
250
|
+
```
|
251
|
+
|
252
|
+
#### Parameters
|
253
|
+
|
254
|
+
| Name | Type | Default value | Description |
|
255
|
+
| :------ | :------ | :------ | :------ |
|
256
|
+
| `value` | `number` | `undefined` | Numeral a ser arredondado. |
|
257
|
+
| `decimals` | `number` | `2` | Quantidade de casas decimais ussada no arredondamento. |
|
258
|
+
|
259
|
+
#### Returns
|
260
|
+
|
261
|
+
`number`
|
262
|
+
|
263
|
+
- O próprio numeral arredondado com a quantidade de casas decimais do argumento decimals.
|
264
|
+
|
265
|
+
#### Defined in
|
266
|
+
|
267
|
+
src/utils/NumberUtils.ts:255
|
268
|
+
|
269
|
+
___
|
270
|
+
|
271
|
+
### safeFormat
|
272
|
+
|
273
|
+
▸ `Static` **safeFormat**(`value`, `precision`, `prettyPrecision?`): `string`
|
274
|
+
|
275
|
+
Formata o numeral com a precisão informada e o valor default 0,00 caso o value não seja um numero valido.
|
276
|
+
|
277
|
+
**`Example`**
|
278
|
+
|
279
|
+
```ts
|
280
|
+
Informado: ('10,9845444', 3, 3) | Retorna: '10,985'
|
281
|
+
Informado: (undefined, 3, 3) | Retorna: 0,00
|
282
|
+
```
|
283
|
+
|
284
|
+
#### Parameters
|
285
|
+
|
286
|
+
| Name | Type | Default value | Description |
|
287
|
+
| :------ | :------ | :------ | :------ |
|
288
|
+
| `value` | `string` | `undefined` | Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico - sem separador de milhares: ######.##). |
|
289
|
+
| `precision` | `number` | `undefined` | Quantidade de casas decimais. |
|
290
|
+
| `prettyPrecision` | `number` | `NaN` | Quantidade de zeros nos decimais. |
|
291
|
+
|
292
|
+
#### Returns
|
293
|
+
|
294
|
+
`string`
|
295
|
+
|
296
|
+
- Numeral em formato de String formatado em PT-BR.
|
297
|
+
|
298
|
+
#### Defined in
|
299
|
+
|
300
|
+
src/utils/NumberUtils.ts:143
|
301
|
+
|
302
|
+
___
|
303
|
+
|
304
|
+
### stringToNumber
|
305
|
+
|
306
|
+
▸ `Static` **stringToNumber**(`value`): `number`
|
307
|
+
|
308
|
+
Converte o dado numérico de string para number.
|
309
|
+
|
310
|
+
**`Example`**
|
311
|
+
|
312
|
+
```ts
|
313
|
+
@"100,12" | 100.12
|
314
|
+
@"100.12" | 100.12
|
315
|
+
@"-100,12" | -100.12
|
316
|
+
@"R$100,12" | 100.12
|
317
|
+
@"-R$100,12" | -100.12
|
318
|
+
@"string" | NaN
|
319
|
+
```
|
320
|
+
|
321
|
+
#### Parameters
|
322
|
+
|
323
|
+
| Name | Type | Description |
|
324
|
+
| :------ | :------ | :------ |
|
325
|
+
| `value` | `string` | Numeral em formato de string a ser convertido (Importante: formato PT-BR ou já em formato numérico: ######.##). |
|
326
|
+
|
327
|
+
#### Returns
|
328
|
+
|
329
|
+
`number`
|
330
|
+
|
331
|
+
- Numeral passado.
|
332
|
+
|
333
|
+
#### Defined in
|
334
|
+
|
335
|
+
src/utils/NumberUtils.ts:22
|
@@ -0,0 +1,160 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / ObjectUtils
|
2
|
+
|
3
|
+
# Class: ObjectUtils
|
4
|
+
|
5
|
+
`ObjectUtils`: Utilizado para manipulação de objetos.
|
6
|
+
|
7
|
+
## Table of contents
|
8
|
+
|
9
|
+
### Constructors
|
10
|
+
|
11
|
+
- [constructor](ObjectUtils.md#constructor)
|
12
|
+
|
13
|
+
### Methods
|
14
|
+
|
15
|
+
- [copy](ObjectUtils.md#copy)
|
16
|
+
- [objectToString](ObjectUtils.md#objecttostring)
|
17
|
+
- [removeEmptyValues](ObjectUtils.md#removeemptyvalues)
|
18
|
+
- [sortByProperty](ObjectUtils.md#sortbyproperty)
|
19
|
+
- [stringToObject](ObjectUtils.md#stringtoobject)
|
20
|
+
|
21
|
+
## Constructors
|
22
|
+
|
23
|
+
### constructor
|
24
|
+
|
25
|
+
• **new ObjectUtils**()
|
26
|
+
|
27
|
+
## Methods
|
28
|
+
|
29
|
+
### copy
|
30
|
+
|
31
|
+
▸ `Static` **copy**<`T`\>(`data`): `T`
|
32
|
+
|
33
|
+
Faz a cópia do objeto.
|
34
|
+
|
35
|
+
#### Type parameters
|
36
|
+
|
37
|
+
| Name |
|
38
|
+
| :------ |
|
39
|
+
| `T` |
|
40
|
+
|
41
|
+
#### Parameters
|
42
|
+
|
43
|
+
| Name | Type | Description |
|
44
|
+
| :------ | :------ | :------ |
|
45
|
+
| `data` | `Object` \| `Object`[] | Objeto a ser copiado. |
|
46
|
+
|
47
|
+
#### Returns
|
48
|
+
|
49
|
+
`T`
|
50
|
+
|
51
|
+
- A cópia do objeto válido.
|
52
|
+
|
53
|
+
#### Defined in
|
54
|
+
|
55
|
+
src/utils/ObjectUtils.ts:13
|
56
|
+
|
57
|
+
___
|
58
|
+
|
59
|
+
### objectToString
|
60
|
+
|
61
|
+
▸ `Static` **objectToString**(`data`): `string`
|
62
|
+
|
63
|
+
Converte um objeto em string/JSON.
|
64
|
+
|
65
|
+
**`Example`**
|
66
|
+
|
67
|
+
@Informado: ```{nome : "Sankhya", cidade: "Uberlandia"}``` | Obtenho: ```"{"nome" : "Sankhya", "cidade":"Uberlandia"}"```
|
68
|
+
|
69
|
+
#### Parameters
|
70
|
+
|
71
|
+
| Name | Type | Description |
|
72
|
+
| :------ | :------ | :------ |
|
73
|
+
| `data` | `Object` \| `Object`[] | Objeto a ser convertido. |
|
74
|
+
|
75
|
+
#### Returns
|
76
|
+
|
77
|
+
`string`
|
78
|
+
|
79
|
+
- Uma string JSON.
|
80
|
+
|
81
|
+
#### Defined in
|
82
|
+
|
83
|
+
src/utils/ObjectUtils.ts:26
|
84
|
+
|
85
|
+
___
|
86
|
+
|
87
|
+
### removeEmptyValues
|
88
|
+
|
89
|
+
▸ `Static` **removeEmptyValues**(`obj`): `object`
|
90
|
+
|
91
|
+
Remove atributos nulos e indefinidos de um objeto.
|
92
|
+
|
93
|
+
#### Parameters
|
94
|
+
|
95
|
+
| Name | Type |
|
96
|
+
| :------ | :------ |
|
97
|
+
| `obj` | `object` |
|
98
|
+
|
99
|
+
#### Returns
|
100
|
+
|
101
|
+
`object`
|
102
|
+
|
103
|
+
- O objeto com as propriedades válidas.
|
104
|
+
|
105
|
+
#### Defined in
|
106
|
+
|
107
|
+
src/utils/ObjectUtils.ts:68
|
108
|
+
|
109
|
+
___
|
110
|
+
|
111
|
+
### sortByProperty
|
112
|
+
|
113
|
+
▸ `Static` **sortByProperty**(`data`, `property`): `any`
|
114
|
+
|
115
|
+
Faz a ordenação de um objeto por uma propriedade.
|
116
|
+
|
117
|
+
#### Parameters
|
118
|
+
|
119
|
+
| Name | Type | Description |
|
120
|
+
| :------ | :------ | :------ |
|
121
|
+
| `data` | `any` | Objeto a ser ordenado. |
|
122
|
+
| `property` | `string` | Nome da propriedade a ser ordenada. |
|
123
|
+
|
124
|
+
#### Returns
|
125
|
+
|
126
|
+
`any`
|
127
|
+
|
128
|
+
- O objeto ordenado pela propriedade.
|
129
|
+
|
130
|
+
#### Defined in
|
131
|
+
|
132
|
+
src/utils/ObjectUtils.ts:50
|
133
|
+
|
134
|
+
___
|
135
|
+
|
136
|
+
### stringToObject
|
137
|
+
|
138
|
+
▸ `Static` **stringToObject**(`data`): `Object` \| `Object`[]
|
139
|
+
|
140
|
+
Converte uma string/JSON em objeto.
|
141
|
+
|
142
|
+
**`Example`**
|
143
|
+
|
144
|
+
Informado: ```"{"nome" : "Sankhya", "cidade":"Uberlandia"}"``` | Obtenho: ```{nome : "Sankhya", cidade: "Uberlandia"}```
|
145
|
+
|
146
|
+
#### Parameters
|
147
|
+
|
148
|
+
| Name | Type | Description |
|
149
|
+
| :------ | :------ | :------ |
|
150
|
+
| `data` | `string` | String a ser convertida. |
|
151
|
+
|
152
|
+
#### Returns
|
153
|
+
|
154
|
+
`Object` \| `Object`[]
|
155
|
+
|
156
|
+
- Um objeto válido.
|
157
|
+
|
158
|
+
#### Defined in
|
159
|
+
|
160
|
+
src/utils/ObjectUtils.ts:39
|
@@ -0,0 +1,126 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / OnboardingUtils
|
2
|
+
|
3
|
+
# Class: OnboardingUtils
|
4
|
+
|
5
|
+
## Table of contents
|
6
|
+
|
7
|
+
### Constructors
|
8
|
+
|
9
|
+
- [constructor](OnboardingUtils.md#constructor)
|
10
|
+
|
11
|
+
### Properties
|
12
|
+
|
13
|
+
- [USER\_GUIDE\_TAG\_ID](OnboardingUtils.md#user_guide_tag_id)
|
14
|
+
- [instance](OnboardingUtils.md#instance)
|
15
|
+
|
16
|
+
### Methods
|
17
|
+
|
18
|
+
- [init](OnboardingUtils.md#init)
|
19
|
+
- [injectScript](OnboardingUtils.md#injectscript)
|
20
|
+
- [register](OnboardingUtils.md#register)
|
21
|
+
- [getInstance](OnboardingUtils.md#getinstance)
|
22
|
+
|
23
|
+
## Constructors
|
24
|
+
|
25
|
+
### constructor
|
26
|
+
|
27
|
+
• `Private` **new OnboardingUtils**()
|
28
|
+
|
29
|
+
#### Defined in
|
30
|
+
|
31
|
+
src/utils/OnboardingUtils.ts:5
|
32
|
+
|
33
|
+
## Properties
|
34
|
+
|
35
|
+
### USER\_GUIDE\_TAG\_ID
|
36
|
+
|
37
|
+
▪ `Static` `Private` `Readonly` **USER\_GUIDE\_TAG\_ID**: ``"userGuideSnippet"``
|
38
|
+
|
39
|
+
#### Defined in
|
40
|
+
|
41
|
+
src/utils/OnboardingUtils.ts:2
|
42
|
+
|
43
|
+
___
|
44
|
+
|
45
|
+
### instance
|
46
|
+
|
47
|
+
▪ `Static` `Private` **instance**: [`OnboardingUtils`](OnboardingUtils.md)
|
48
|
+
|
49
|
+
#### Defined in
|
50
|
+
|
51
|
+
src/utils/OnboardingUtils.ts:3
|
52
|
+
|
53
|
+
## Methods
|
54
|
+
|
55
|
+
### init
|
56
|
+
|
57
|
+
▸ **init**(`apiKey`, `ctx`): `Promise`<`void`\>
|
58
|
+
|
59
|
+
#### Parameters
|
60
|
+
|
61
|
+
| Name | Type |
|
62
|
+
| :------ | :------ |
|
63
|
+
| `apiKey` | `string` |
|
64
|
+
| `ctx` | `EnvironmentContext` |
|
65
|
+
|
66
|
+
#### Returns
|
67
|
+
|
68
|
+
`Promise`<`void`\>
|
69
|
+
|
70
|
+
#### Defined in
|
71
|
+
|
72
|
+
src/utils/OnboardingUtils.ts:14
|
73
|
+
|
74
|
+
___
|
75
|
+
|
76
|
+
### injectScript
|
77
|
+
|
78
|
+
▸ `Private` **injectScript**(`apiKey`): `void`
|
79
|
+
|
80
|
+
#### Parameters
|
81
|
+
|
82
|
+
| Name | Type |
|
83
|
+
| :------ | :------ |
|
84
|
+
| `apiKey` | `string` |
|
85
|
+
|
86
|
+
#### Returns
|
87
|
+
|
88
|
+
`void`
|
89
|
+
|
90
|
+
#### Defined in
|
91
|
+
|
92
|
+
src/utils/OnboardingUtils.ts:23
|
93
|
+
|
94
|
+
___
|
95
|
+
|
96
|
+
### register
|
97
|
+
|
98
|
+
▸ `Private` **register**(`ctx`): `void`
|
99
|
+
|
100
|
+
#### Parameters
|
101
|
+
|
102
|
+
| Name | Type |
|
103
|
+
| :------ | :------ |
|
104
|
+
| `ctx` | `EnvironmentContext` |
|
105
|
+
|
106
|
+
#### Returns
|
107
|
+
|
108
|
+
`void`
|
109
|
+
|
110
|
+
#### Defined in
|
111
|
+
|
112
|
+
src/utils/OnboardingUtils.ts:34
|
113
|
+
|
114
|
+
___
|
115
|
+
|
116
|
+
### getInstance
|
117
|
+
|
118
|
+
▸ `Static` **getInstance**(): [`OnboardingUtils`](OnboardingUtils.md)
|
119
|
+
|
120
|
+
#### Returns
|
121
|
+
|
122
|
+
[`OnboardingUtils`](OnboardingUtils.md)
|
123
|
+
|
124
|
+
#### Defined in
|
125
|
+
|
126
|
+
src/utils/OnboardingUtils.ts:7
|
@@ -0,0 +1,91 @@
|
|
1
|
+
[@sankhyalabs/core](../README.md) / [Exports](../modules.md) / PromiseSync
|
2
|
+
|
3
|
+
# Class: PromiseSync<T\>
|
4
|
+
|
5
|
+
O intuito desta classe é organizar a finalização de várias
|
6
|
+
promessas executando determinada ação (callback) com o resultado.
|
7
|
+
|
8
|
+
## Type parameters
|
9
|
+
|
10
|
+
| Name |
|
11
|
+
| :------ |
|
12
|
+
| `T` |
|
13
|
+
|
14
|
+
## Table of contents
|
15
|
+
|
16
|
+
### Constructors
|
17
|
+
|
18
|
+
- [constructor](PromiseSync.md#constructor)
|
19
|
+
|
20
|
+
### Properties
|
21
|
+
|
22
|
+
- [\_callBack](PromiseSync.md#_callback)
|
23
|
+
- [\_promises](PromiseSync.md#_promises)
|
24
|
+
|
25
|
+
### Methods
|
26
|
+
|
27
|
+
- [add](PromiseSync.md#add)
|
28
|
+
|
29
|
+
## Constructors
|
30
|
+
|
31
|
+
### constructor
|
32
|
+
|
33
|
+
• **new PromiseSync**<`T`\>(`callBack`)
|
34
|
+
|
35
|
+
#### Type parameters
|
36
|
+
|
37
|
+
| Name |
|
38
|
+
| :------ |
|
39
|
+
| `T` |
|
40
|
+
|
41
|
+
#### Parameters
|
42
|
+
|
43
|
+
| Name | Type |
|
44
|
+
| :------ | :------ |
|
45
|
+
| `callBack` | [`PromiseSyncCallback`](../interfaces/PromiseSyncCallback.md)<`T`\> |
|
46
|
+
|
47
|
+
#### Defined in
|
48
|
+
|
49
|
+
src/async/PromiseSync.ts:13
|
50
|
+
|
51
|
+
## Properties
|
52
|
+
|
53
|
+
### \_callBack
|
54
|
+
|
55
|
+
• **\_callBack**: [`PromiseSyncCallback`](../interfaces/PromiseSyncCallback.md)<`T`\>
|
56
|
+
|
57
|
+
#### Defined in
|
58
|
+
|
59
|
+
src/async/PromiseSync.ts:8
|
60
|
+
|
61
|
+
___
|
62
|
+
|
63
|
+
### \_promises
|
64
|
+
|
65
|
+
• **\_promises**: `Promise`<`T`\>[]
|
66
|
+
|
67
|
+
#### Defined in
|
68
|
+
|
69
|
+
src/async/PromiseSync.ts:7
|
70
|
+
|
71
|
+
## Methods
|
72
|
+
|
73
|
+
### add
|
74
|
+
|
75
|
+
▸ **add**(`promise`): `void`
|
76
|
+
|
77
|
+
Adiciona na lista de promises pendentes. Isso faz com que criemos uma nova espera.
|
78
|
+
|
79
|
+
#### Parameters
|
80
|
+
|
81
|
+
| Name | Type | Description |
|
82
|
+
| :------ | :------ | :------ |
|
83
|
+
| `promise` | `Promise`<`T`\> | Entrará na lista aguardada. |
|
84
|
+
|
85
|
+
#### Returns
|
86
|
+
|
87
|
+
`void`
|
88
|
+
|
89
|
+
#### Defined in
|
90
|
+
|
91
|
+
src/async/PromiseSync.ts:23
|