@sankhyalabs/core-docs 2.4.1 → 2.4.2
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/classes/ElementIDUtils.md +49 -17
- package/classes/StringUtils.md +25 -0
- package/package.json +1 -1
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
# Class: ElementIDUtils
|
4
4
|
|
5
|
-
`ElementIDUtils`: O ElementIDUtils é um utilitário responsável por criar e adicionar identificadores únicos aos componentes através do atributo data-element-id.
|
5
|
+
`ElementIDUtils`: O ElementIDUtils é um utilitário responsável por criar e adicionar identificadores únicos aos componentes através do atributo data-element-id.
|
6
|
+
A finalidade dele é otimizar a automação dos testes e melhorar a eficiência na manipulação dos componentes do Design System, garantindo seleções precisas e seguras.
|
6
7
|
|
7
8
|
## Table of contents
|
8
9
|
|
@@ -14,6 +15,7 @@
|
|
14
15
|
|
15
16
|
- [DATA\_ELEMENT\_ID\_ATTRIBUTE\_NAME](ElementIDUtils.md#data_element_id_attribute_name)
|
16
17
|
- [INTERNAL\_INPUT\_NAME](ElementIDUtils.md#internal_input_name)
|
18
|
+
- [REGEX\_DATAUNIT\_NAME](ElementIDUtils.md#regex_dataunit_name)
|
17
19
|
|
18
20
|
### Methods
|
19
21
|
|
@@ -26,6 +28,7 @@
|
|
26
28
|
- [getDataElementID](ElementIDUtils.md#getdataelementid)
|
27
29
|
- [getDataElementIDAttribute](ElementIDUtils.md#getdataelementidattribute)
|
28
30
|
- [getInternalIDInfo](ElementIDUtils.md#getinternalidinfo)
|
31
|
+
- [parseDataUnitName](ElementIDUtils.md#parsedataunitname)
|
29
32
|
|
30
33
|
## Constructors
|
31
34
|
|
@@ -41,17 +44,27 @@
|
|
41
44
|
|
42
45
|
#### Defined in
|
43
46
|
|
44
|
-
src/utils/ElementIDUtils.ts:
|
47
|
+
src/utils/ElementIDUtils.ts:14
|
45
48
|
|
46
49
|
___
|
47
50
|
|
48
51
|
### INTERNAL\_INPUT\_NAME
|
49
52
|
|
50
|
-
▪ `Static` **INTERNAL\_INPUT\_NAME**: `string` = `"
|
53
|
+
▪ `Static` **INTERNAL\_INPUT\_NAME**: `string` = `"embedded"`
|
51
54
|
|
52
55
|
#### Defined in
|
53
56
|
|
54
|
-
src/utils/ElementIDUtils.ts:
|
57
|
+
src/utils/ElementIDUtils.ts:15
|
58
|
+
|
59
|
+
___
|
60
|
+
|
61
|
+
### REGEX\_DATAUNIT\_NAME
|
62
|
+
|
63
|
+
▪ `Static` `Private` **REGEX\_DATAUNIT\_NAME**: `RegExp`
|
64
|
+
|
65
|
+
#### Defined in
|
66
|
+
|
67
|
+
src/utils/ElementIDUtils.ts:16
|
55
68
|
|
56
69
|
## Methods
|
57
70
|
|
@@ -77,7 +90,7 @@ Cria e adiciona a propriedade `data-element-id` em um elemento.
|
|
77
90
|
|
78
91
|
#### Defined in
|
79
92
|
|
80
|
-
src/utils/ElementIDUtils.ts:
|
93
|
+
src/utils/ElementIDUtils.ts:26
|
81
94
|
|
82
95
|
___
|
83
96
|
|
@@ -99,7 +112,7 @@ ___
|
|
99
112
|
|
100
113
|
#### Defined in
|
101
114
|
|
102
|
-
src/utils/ElementIDUtils.ts:
|
115
|
+
src/utils/ElementIDUtils.ts:39
|
103
116
|
|
104
117
|
___
|
105
118
|
|
@@ -124,7 +137,7 @@ Adiciona a propriedade name do DataUnit como prefixo do data-element-id do eleme
|
|
124
137
|
|
125
138
|
#### Defined in
|
126
139
|
|
127
|
-
src/utils/ElementIDUtils.ts:
|
140
|
+
src/utils/ElementIDUtils.ts:147
|
128
141
|
|
129
142
|
___
|
130
143
|
|
@@ -137,8 +150,8 @@ Adiciona sufixo ao atributo `data-element-id` de um elemento, utilizado para mon
|
|
137
150
|
**`Example`**
|
138
151
|
|
139
152
|
```ts
|
140
|
-
Um ez-combo-box tem data-element-id =
|
141
|
-
Dentro desse ez-combo-box existe um ez-text-input. O data-element-id teria como sufixo o id '
|
153
|
+
Um ez-combo-box tem data-element-id = codparc_input_embedded_combo.
|
154
|
+
Dentro desse ez-combo-box existe um ez-text-input. O data-element-id teria como sufixo o id 'codparc_input_embedded_combo' referente ao seu pai.
|
142
155
|
```
|
143
156
|
|
144
157
|
#### Parameters
|
@@ -157,7 +170,7 @@ Dentro desse ez-combo-box existe um ez-text-input. O data-element-id teria como
|
|
157
170
|
|
158
171
|
#### Defined in
|
159
172
|
|
160
|
-
src/utils/ElementIDUtils.ts:
|
173
|
+
src/utils/ElementIDUtils.ts:130
|
161
174
|
|
162
175
|
___
|
163
176
|
|
@@ -181,7 +194,7 @@ Remove caracteres especiais.
|
|
181
194
|
|
182
195
|
#### Defined in
|
183
196
|
|
184
|
-
src/utils/ElementIDUtils.ts:
|
197
|
+
src/utils/ElementIDUtils.ts:162
|
185
198
|
|
186
199
|
___
|
187
200
|
|
@@ -206,7 +219,7 @@ Obtém ID válido para o elemento.
|
|
206
219
|
|
207
220
|
#### Defined in
|
208
221
|
|
209
|
-
src/utils/ElementIDUtils.ts:
|
222
|
+
src/utils/ElementIDUtils.ts:90
|
210
223
|
|
211
224
|
___
|
212
225
|
|
@@ -232,7 +245,7 @@ Obtém o `data-element-id` do elemento com adição do sufixo e ID.
|
|
232
245
|
|
233
246
|
#### Defined in
|
234
247
|
|
235
|
-
src/utils/ElementIDUtils.ts:
|
248
|
+
src/utils/ElementIDUtils.ts:66
|
236
249
|
|
237
250
|
___
|
238
251
|
|
@@ -252,19 +265,18 @@ ___
|
|
252
265
|
|
253
266
|
#### Defined in
|
254
267
|
|
255
|
-
src/utils/ElementIDUtils.ts:
|
268
|
+
src/utils/ElementIDUtils.ts:168
|
256
269
|
|
257
270
|
___
|
258
271
|
|
259
272
|
### getInternalIDInfo
|
260
273
|
|
261
|
-
▸ `Static` **getInternalIDInfo**(`
|
274
|
+
▸ `Static` **getInternalIDInfo**(`sufix`): `string`
|
262
275
|
|
263
276
|
#### Parameters
|
264
277
|
|
265
278
|
| Name | Type |
|
266
279
|
| :------ | :------ |
|
267
|
-
| `originalID` | `string` |
|
268
280
|
| `sufix` | `string` |
|
269
281
|
|
270
282
|
#### Returns
|
@@ -273,4 +285,24 @@ ___
|
|
273
285
|
|
274
286
|
#### Defined in
|
275
287
|
|
276
|
-
src/utils/ElementIDUtils.ts:
|
288
|
+
src/utils/ElementIDUtils.ts:54
|
289
|
+
|
290
|
+
___
|
291
|
+
|
292
|
+
### parseDataUnitName
|
293
|
+
|
294
|
+
▸ `Static` `Private` **parseDataUnitName**(`uri`): `string`
|
295
|
+
|
296
|
+
#### Parameters
|
297
|
+
|
298
|
+
| Name | Type |
|
299
|
+
| :------ | :------ |
|
300
|
+
| `uri` | `string` |
|
301
|
+
|
302
|
+
#### Returns
|
303
|
+
|
304
|
+
`string`
|
305
|
+
|
306
|
+
#### Defined in
|
307
|
+
|
308
|
+
src/utils/ElementIDUtils.ts:175
|
package/classes/StringUtils.md
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
- [replaceAccentuatedCharsKeepSymbols](StringUtils.md#replaceaccentuatedcharskeepsymbols)
|
24
24
|
- [replaceAccentuatedCharsLower](StringUtils.md#replaceaccentuatedcharslower)
|
25
25
|
- [replaceAccentuatedCharsUpper](StringUtils.md#replaceaccentuatedcharsupper)
|
26
|
+
- [replaceBlankCharacters](StringUtils.md#replaceblankcharacters)
|
26
27
|
- [toCamelCase](StringUtils.md#tocamelcase)
|
27
28
|
- [toKebabCase](StringUtils.md#tokebabcase)
|
28
29
|
- [toPascalCase](StringUtils.md#topascalcase)
|
@@ -364,6 +365,30 @@ src/utils/StringUtils.ts:36
|
|
364
365
|
|
365
366
|
___
|
366
367
|
|
368
|
+
### replaceBlankCharacters
|
369
|
+
|
370
|
+
▸ `Static` **replaceBlankCharacters**(`value`): `string`
|
371
|
+
|
372
|
+
Utilitário para remover caracteres em branco da string.
|
373
|
+
|
374
|
+
#### Parameters
|
375
|
+
|
376
|
+
| Name | Type | Description |
|
377
|
+
| :------ | :------ | :------ |
|
378
|
+
| `value` | `string` | String a ser removido os espaços. |
|
379
|
+
|
380
|
+
#### Returns
|
381
|
+
|
382
|
+
`string`
|
383
|
+
|
384
|
+
String sem espaços em branco.
|
385
|
+
|
386
|
+
#### Defined in
|
387
|
+
|
388
|
+
src/utils/StringUtils.ts:293
|
389
|
+
|
390
|
+
___
|
391
|
+
|
367
392
|
### toCamelCase
|
368
393
|
|
369
394
|
▸ `Static` **toCamelCase**(`value`): `string`
|