@sankhyalabs/core-docs 0.0.0-hotfix-rc-KB-74140.0 → 0.0.0-hotfix-rc-KB-74140.1
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/LockManager.md +191 -0
- package/enumerations/LockManagerOperation.md +21 -0
- package/globals.md +2 -0
- package/package.json +1 -1
@@ -0,0 +1,191 @@
|
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / LockManager
|
6
|
+
|
7
|
+
# Class: LockManager
|
8
|
+
|
9
|
+
## Constructors
|
10
|
+
|
11
|
+
### new LockManager()
|
12
|
+
|
13
|
+
> **new LockManager**(): [`LockManager`](LockManager.md)
|
14
|
+
|
15
|
+
#### Returns
|
16
|
+
|
17
|
+
[`LockManager`](LockManager.md)
|
18
|
+
|
19
|
+
## Properties
|
20
|
+
|
21
|
+
### ATTRIBUTE\_NAME
|
22
|
+
|
23
|
+
> `static` **ATTRIBUTE\_NAME**: `string` = `"data-locker-manger-context-id"`
|
24
|
+
|
25
|
+
Nome do atributo que será utilizado para controlar contexto de locks nos elementos da DOM.
|
26
|
+
|
27
|
+
#### Source
|
28
|
+
|
29
|
+
src/utils/LockManager.ts:24
|
30
|
+
|
31
|
+
***
|
32
|
+
|
33
|
+
### \_locks
|
34
|
+
|
35
|
+
> `static` `private` **\_locks**: `Map`\<`string`, `Lock`[]\>
|
36
|
+
|
37
|
+
#### Source
|
38
|
+
|
39
|
+
src/utils/LockManager.ts:19
|
40
|
+
|
41
|
+
## Methods
|
42
|
+
|
43
|
+
### addLockManagerCtxId()
|
44
|
+
|
45
|
+
> `static` **addLockManagerCtxId**(`startElement`): `string`
|
46
|
+
|
47
|
+
Cria um contexto de locker, caso nao exista, para todos elementos pais iniciados com ez- ou snk-.
|
48
|
+
|
49
|
+
#### Parameters
|
50
|
+
|
51
|
+
• **startElement**: `HTMLElement`
|
52
|
+
|
53
|
+
Elemento de de onde o lock deve começar.
|
54
|
+
|
55
|
+
#### Returns
|
56
|
+
|
57
|
+
`string`
|
58
|
+
|
59
|
+
- O id do locker, que pode ser usado para iniciar ou aguardar um lock do contexto.
|
60
|
+
|
61
|
+
#### Source
|
62
|
+
|
63
|
+
src/utils/LockManager.ts:83
|
64
|
+
|
65
|
+
***
|
66
|
+
|
67
|
+
### buildContextID()
|
68
|
+
|
69
|
+
> `static` `private` **buildContextID**(): `string`
|
70
|
+
|
71
|
+
#### Returns
|
72
|
+
|
73
|
+
`string`
|
74
|
+
|
75
|
+
#### Source
|
76
|
+
|
77
|
+
src/utils/LockManager.ts:26
|
78
|
+
|
79
|
+
***
|
80
|
+
|
81
|
+
### buildLockerID()
|
82
|
+
|
83
|
+
> `static` `private` **buildLockerID**(`ctxId`, `operation`): `undefined` \| `string`
|
84
|
+
|
85
|
+
#### Parameters
|
86
|
+
|
87
|
+
• **ctxId**: `string` \| `HTMLElement`
|
88
|
+
|
89
|
+
• **operation**: [`TASKBAR_CLICK`](../enumerations/LockManagerOperation.md#taskbar_click)
|
90
|
+
|
91
|
+
#### Returns
|
92
|
+
|
93
|
+
`undefined` \| `string`
|
94
|
+
|
95
|
+
#### Source
|
96
|
+
|
97
|
+
src/utils/LockManager.ts:30
|
98
|
+
|
99
|
+
***
|
100
|
+
|
101
|
+
### findExistingCtxId()
|
102
|
+
|
103
|
+
> `static` `private` **findExistingCtxId**(`element`): `null` \| `string`
|
104
|
+
|
105
|
+
#### Parameters
|
106
|
+
|
107
|
+
• **element**: `HTMLElement`
|
108
|
+
|
109
|
+
#### Returns
|
110
|
+
|
111
|
+
`null` \| `string`
|
112
|
+
|
113
|
+
#### Source
|
114
|
+
|
115
|
+
src/utils/LockManager.ts:43
|
116
|
+
|
117
|
+
***
|
118
|
+
|
119
|
+
### lock()
|
120
|
+
|
121
|
+
> `static` **lock**(`id`, `operation`): `any`
|
122
|
+
|
123
|
+
Inicia um locker baseado em um contexto e uma operação.
|
124
|
+
|
125
|
+
#### Parameters
|
126
|
+
|
127
|
+
• **id**: `string` \| `HTMLElement`
|
128
|
+
|
129
|
+
Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
|
130
|
+
|
131
|
+
• **operation**: [`TASKBAR_CLICK`](../enumerations/LockManagerOperation.md#taskbar_click)
|
132
|
+
|
133
|
+
Operação do contexto que o lock deve ser feito.
|
134
|
+
|
135
|
+
#### Returns
|
136
|
+
|
137
|
+
`any`
|
138
|
+
|
139
|
+
- Uma função que fara a liberação do lock.
|
140
|
+
|
141
|
+
#### Source
|
142
|
+
|
143
|
+
src/utils/LockManager.ts:114
|
144
|
+
|
145
|
+
***
|
146
|
+
|
147
|
+
### traverseAndAddAttr()
|
148
|
+
|
149
|
+
> `static` `private` **traverseAndAddAttr**(`element`, `ctxId`): `void`
|
150
|
+
|
151
|
+
#### Parameters
|
152
|
+
|
153
|
+
• **element**: `HTMLElement`
|
154
|
+
|
155
|
+
• **ctxId**: `string`
|
156
|
+
|
157
|
+
#### Returns
|
158
|
+
|
159
|
+
`void`
|
160
|
+
|
161
|
+
#### Source
|
162
|
+
|
163
|
+
src/utils/LockManager.ts:65
|
164
|
+
|
165
|
+
***
|
166
|
+
|
167
|
+
### whenResolve()
|
168
|
+
|
169
|
+
> `static` **whenResolve**(`id`, `operation`): `Promise`\<`void`\>
|
170
|
+
|
171
|
+
Aguarda todos os lockers de um contexto e operação serem resolvidos.
|
172
|
+
|
173
|
+
#### Parameters
|
174
|
+
|
175
|
+
• **id**: `string` \| `HTMLElement`
|
176
|
+
|
177
|
+
Pode ser um ID do contexto de locker, ou, o elemento contendo um contexto de locker.
|
178
|
+
|
179
|
+
• **operation**: [`TASKBAR_CLICK`](../enumerations/LockManagerOperation.md#taskbar_click)
|
180
|
+
|
181
|
+
Operação do contexto que devera aguardar.
|
182
|
+
|
183
|
+
#### Returns
|
184
|
+
|
185
|
+
`Promise`\<`void`\>
|
186
|
+
|
187
|
+
- Promise que será resolvida quando todos lockers forem finalizados.
|
188
|
+
|
189
|
+
#### Source
|
190
|
+
|
191
|
+
src/utils/LockManager.ts:142
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / LockManagerOperation
|
6
|
+
|
7
|
+
# Enumeration: LockManagerOperation
|
8
|
+
|
9
|
+
Define os tipos de operação que o locker pode controlar
|
10
|
+
|
11
|
+
## Enumeration Members
|
12
|
+
|
13
|
+
### TASKBAR\_CLICK
|
14
|
+
|
15
|
+
> **TASKBAR\_CLICK**: `"taskbar_click"`
|
16
|
+
|
17
|
+
Operação de lock utilizada para controlar cliques nos botoes da taskbar.
|
18
|
+
|
19
|
+
#### Source
|
20
|
+
|
21
|
+
src/utils/LockManager.ts:9
|
package/globals.md
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
- [ChangeOperation](enumerations/ChangeOperation.md)
|
15
15
|
- [DataType](enumerations/DataType.md)
|
16
16
|
- [DependencyType](enumerations/DependencyType.md)
|
17
|
+
- [LockManagerOperation](enumerations/LockManagerOperation.md)
|
17
18
|
- [OverflowDirection](enumerations/OverflowDirection.md)
|
18
19
|
- [SelectionMode](enumerations/SelectionMode.md)
|
19
20
|
- [SortMode](enumerations/SortMode.md)
|
@@ -39,6 +40,7 @@
|
|
39
40
|
- [IDBRepository](classes/IDBRepository.md)
|
40
41
|
- [JSUtils](classes/JSUtils.md)
|
41
42
|
- [KeyboardManager](classes/KeyboardManager.md)
|
43
|
+
- [LockManager](classes/LockManager.md)
|
42
44
|
- [MaskFormatter](classes/MaskFormatter.md)
|
43
45
|
- [NumberUtils](classes/NumberUtils.md)
|
44
46
|
- [ObjectUtils](classes/ObjectUtils.md)
|