@sankhyalabs/core-docs 5.20.0-dev.7 → 5.20.0-dev.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,269 @@
|
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / OverflowWatcher
|
6
|
+
|
7
|
+
# Class: OverflowWatcher
|
8
|
+
|
9
|
+
## Constructors
|
10
|
+
|
11
|
+
### new OverflowWatcher()
|
12
|
+
|
13
|
+
> **new OverflowWatcher**(`element`, `callback`, `overFlowDirection`, `deltaSize`): [`OverflowWatcher`](OverflowWatcher.md)
|
14
|
+
|
15
|
+
Cria uma instancia do OverflowWatcher
|
16
|
+
|
17
|
+
#### Parameters
|
18
|
+
|
19
|
+
• **element**: `HTMLElement`
|
20
|
+
|
21
|
+
Elemento HTML que o overflow será observado.
|
22
|
+
|
23
|
+
• **callback**: [`OnOverflowCallBack`](../type-aliases/OnOverflowCallBack.md)
|
24
|
+
|
25
|
+
Função que sera chamada quando ocorrer overflow no elemento.
|
26
|
+
|
27
|
+
• **overFlowDirection**: [`OverflowDirection`](../enumerations/OverflowDirection.md)= `OverflowDirection.HORIZONTAL`
|
28
|
+
|
29
|
+
Indica direção que o overflow será monitorado.
|
30
|
+
|
31
|
+
• **deltaSize**: `number`= `10`
|
32
|
+
|
33
|
+
Variação de tamanho que será considerada como overflow.
|
34
|
+
|
35
|
+
#### Returns
|
36
|
+
|
37
|
+
[`OverflowWatcher`](OverflowWatcher.md)
|
38
|
+
|
39
|
+
#### Source
|
40
|
+
|
41
|
+
src/utils/OverflowWatcher/index.ts:25
|
42
|
+
|
43
|
+
## Properties
|
44
|
+
|
45
|
+
### \_deltaSize
|
46
|
+
|
47
|
+
> `private` **\_deltaSize**: `number`
|
48
|
+
|
49
|
+
#### Source
|
50
|
+
|
51
|
+
src/utils/OverflowWatcher/index.ts:15
|
52
|
+
|
53
|
+
***
|
54
|
+
|
55
|
+
### \_hiddenItems
|
56
|
+
|
57
|
+
> `private` **\_hiddenItems**: `Element`[] = `[]`
|
58
|
+
|
59
|
+
#### Source
|
60
|
+
|
61
|
+
src/utils/OverflowWatcher/index.ts:14
|
62
|
+
|
63
|
+
***
|
64
|
+
|
65
|
+
### \_lastContentRect
|
66
|
+
|
67
|
+
> `private` **\_lastContentRect**: `undefined` \| `DOMRectReadOnly` = `undefined`
|
68
|
+
|
69
|
+
#### Source
|
70
|
+
|
71
|
+
src/utils/OverflowWatcher/index.ts:11
|
72
|
+
|
73
|
+
***
|
74
|
+
|
75
|
+
### \_onResize
|
76
|
+
|
77
|
+
> `private` **\_onResize**: [`OnOverflowCallBack`](../type-aliases/OnOverflowCallBack.md)
|
78
|
+
|
79
|
+
#### Source
|
80
|
+
|
81
|
+
src/utils/OverflowWatcher/index.ts:9
|
82
|
+
|
83
|
+
***
|
84
|
+
|
85
|
+
### \_propSize
|
86
|
+
|
87
|
+
> `private` **\_propSize**: `string`
|
88
|
+
|
89
|
+
#### Source
|
90
|
+
|
91
|
+
src/utils/OverflowWatcher/index.ts:13
|
92
|
+
|
93
|
+
***
|
94
|
+
|
95
|
+
### \_resizeObserver
|
96
|
+
|
97
|
+
> `private` **\_resizeObserver**: `ResizeObserver`
|
98
|
+
|
99
|
+
#### Source
|
100
|
+
|
101
|
+
src/utils/OverflowWatcher/index.ts:10
|
102
|
+
|
103
|
+
***
|
104
|
+
|
105
|
+
### \_scrollDirection
|
106
|
+
|
107
|
+
> `private` **\_scrollDirection**: [`OverflowDirection`](../enumerations/OverflowDirection.md) = `OverflowDirection.HORIZONTAL`
|
108
|
+
|
109
|
+
#### Source
|
110
|
+
|
111
|
+
src/utils/OverflowWatcher/index.ts:12
|
112
|
+
|
113
|
+
## Methods
|
114
|
+
|
115
|
+
### calcChildrenSize()
|
116
|
+
|
117
|
+
> `private` **calcChildrenSize**(`children`): `number`
|
118
|
+
|
119
|
+
#### Parameters
|
120
|
+
|
121
|
+
• **children**: `Element`[]
|
122
|
+
|
123
|
+
#### Returns
|
124
|
+
|
125
|
+
`number`
|
126
|
+
|
127
|
+
#### Source
|
128
|
+
|
129
|
+
src/utils/OverflowWatcher/index.ts:126
|
130
|
+
|
131
|
+
***
|
132
|
+
|
133
|
+
### calcMarginSize()
|
134
|
+
|
135
|
+
> `private` **calcMarginSize**(`el`): `number`
|
136
|
+
|
137
|
+
#### Parameters
|
138
|
+
|
139
|
+
• **el**: `Element`
|
140
|
+
|
141
|
+
#### Returns
|
142
|
+
|
143
|
+
`number`
|
144
|
+
|
145
|
+
#### Source
|
146
|
+
|
147
|
+
src/utils/OverflowWatcher/index.ts:141
|
148
|
+
|
149
|
+
***
|
150
|
+
|
151
|
+
### destroy()
|
152
|
+
|
153
|
+
> **destroy**(): `void`
|
154
|
+
|
155
|
+
#### Returns
|
156
|
+
|
157
|
+
`void`
|
158
|
+
|
159
|
+
#### Source
|
160
|
+
|
161
|
+
src/utils/OverflowWatcher/index.ts:37
|
162
|
+
|
163
|
+
***
|
164
|
+
|
165
|
+
### getPropSizeByDirection()
|
166
|
+
|
167
|
+
> `private` **getPropSizeByDirection**(): `string`
|
168
|
+
|
169
|
+
#### Returns
|
170
|
+
|
171
|
+
`string`
|
172
|
+
|
173
|
+
#### Source
|
174
|
+
|
175
|
+
src/utils/OverflowWatcher/index.ts:65
|
176
|
+
|
177
|
+
***
|
178
|
+
|
179
|
+
### handleResize()
|
180
|
+
|
181
|
+
> `private` **handleResize**(`entries`): `void`
|
182
|
+
|
183
|
+
#### Parameters
|
184
|
+
|
185
|
+
• **entries**: `ResizeObserverEntry`[]
|
186
|
+
|
187
|
+
#### Returns
|
188
|
+
|
189
|
+
`void`
|
190
|
+
|
191
|
+
#### Source
|
192
|
+
|
193
|
+
src/utils/OverflowWatcher/index.ts:41
|
194
|
+
|
195
|
+
***
|
196
|
+
|
197
|
+
### isChangedSize()
|
198
|
+
|
199
|
+
> `private` **isChangedSize**(`newContentRect`): `boolean`
|
200
|
+
|
201
|
+
#### Parameters
|
202
|
+
|
203
|
+
• **newContentRect**: `DOMRectReadOnly`
|
204
|
+
|
205
|
+
#### Returns
|
206
|
+
|
207
|
+
`boolean`
|
208
|
+
|
209
|
+
#### Source
|
210
|
+
|
211
|
+
src/utils/OverflowWatcher/index.ts:57
|
212
|
+
|
213
|
+
***
|
214
|
+
|
215
|
+
### proccessElements()
|
216
|
+
|
217
|
+
> `private` **proccessElements**(`elementSize`, `children`): `void`
|
218
|
+
|
219
|
+
#### Parameters
|
220
|
+
|
221
|
+
• **elementSize**: `number`
|
222
|
+
|
223
|
+
• **children**: `Element`[]
|
224
|
+
|
225
|
+
#### Returns
|
226
|
+
|
227
|
+
`void`
|
228
|
+
|
229
|
+
#### Source
|
230
|
+
|
231
|
+
src/utils/OverflowWatcher/index.ts:73
|
232
|
+
|
233
|
+
***
|
234
|
+
|
235
|
+
### proccessElementsOverFlow()
|
236
|
+
|
237
|
+
> `private` **proccessElementsOverFlow**(`children`, `diff`): `void`
|
238
|
+
|
239
|
+
#### Parameters
|
240
|
+
|
241
|
+
• **children**: `Element`[]
|
242
|
+
|
243
|
+
• **diff**: `number`
|
244
|
+
|
245
|
+
#### Returns
|
246
|
+
|
247
|
+
`void`
|
248
|
+
|
249
|
+
#### Source
|
250
|
+
|
251
|
+
src/utils/OverflowWatcher/index.ts:103
|
252
|
+
|
253
|
+
***
|
254
|
+
|
255
|
+
### proccessElementsWithoutOverFlow()
|
256
|
+
|
257
|
+
> `private` **proccessElementsWithoutOverFlow**(`diff`): `void`
|
258
|
+
|
259
|
+
#### Parameters
|
260
|
+
|
261
|
+
• **diff**: `number`
|
262
|
+
|
263
|
+
#### Returns
|
264
|
+
|
265
|
+
`void`
|
266
|
+
|
267
|
+
#### Source
|
268
|
+
|
269
|
+
src/utils/OverflowWatcher/index.ts:91
|
@@ -0,0 +1,29 @@
|
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / OverflowDirection
|
6
|
+
|
7
|
+
# Enumeration: OverflowDirection
|
8
|
+
|
9
|
+
Define em qual direção o overflow será observado
|
10
|
+
|
11
|
+
## Enumeration Members
|
12
|
+
|
13
|
+
### HORIZONTAL
|
14
|
+
|
15
|
+
> **HORIZONTAL**: `1`
|
16
|
+
|
17
|
+
#### Source
|
18
|
+
|
19
|
+
src/utils/OverflowWatcher/types/overflow-direction.ts:6
|
20
|
+
|
21
|
+
***
|
22
|
+
|
23
|
+
### VERTICAL
|
24
|
+
|
25
|
+
> **VERTICAL**: `0`
|
26
|
+
|
27
|
+
#### Source
|
28
|
+
|
29
|
+
src/utils/OverflowWatcher/types/overflow-direction.ts:5
|
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
|
+
- [OverflowDirection](enumerations/OverflowDirection.md)
|
17
18
|
- [SelectionMode](enumerations/SelectionMode.md)
|
18
19
|
- [SortMode](enumerations/SortMode.md)
|
19
20
|
- [UserInterface](enumerations/UserInterface.md)
|
@@ -42,6 +43,7 @@
|
|
42
43
|
- [NumberUtils](classes/NumberUtils.md)
|
43
44
|
- [ObjectUtils](classes/ObjectUtils.md)
|
44
45
|
- [OnboardingUtils](classes/OnboardingUtils.md)
|
46
|
+
- [OverflowWatcher](classes/OverflowWatcher.md)
|
45
47
|
- [PromiseSync](classes/PromiseSync.md)
|
46
48
|
- [ReadyUtil](classes/ReadyUtil.md)
|
47
49
|
- [RequestMetadata](classes/RequestMetadata.md)
|
@@ -80,6 +82,10 @@
|
|
80
82
|
- [UnitMetadata](interfaces/UnitMetadata.md)
|
81
83
|
- [WaitingChange](interfaces/WaitingChange.md)
|
82
84
|
|
85
|
+
## Type Aliases
|
86
|
+
|
87
|
+
- [OnOverflowCallBack](type-aliases/OnOverflowCallBack.md)
|
88
|
+
|
83
89
|
## Functions
|
84
90
|
|
85
91
|
- [defaultDataLoader](functions/defaultDataLoader.md)
|
package/package.json
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
|
+
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / OnOverflowCallBack
|
6
|
+
|
7
|
+
# Type alias: OnOverflowCallBack()
|
8
|
+
|
9
|
+
> **OnOverflowCallBack**: (`elementsOverFlow`) => `void`
|
10
|
+
|
11
|
+
Callback que será chamado quando o overflow de um elemento for alterado.
|
12
|
+
|
13
|
+
## Parameters
|
14
|
+
|
15
|
+
• **elementsOverFlow**: `Element`[]
|
16
|
+
|
17
|
+
Conjunto de elementos filhos que estão causando overflow no elemento pai.
|
18
|
+
|
19
|
+
## Returns
|
20
|
+
|
21
|
+
`void`
|
22
|
+
|
23
|
+
## Source
|
24
|
+
|
25
|
+
src/utils/OverflowWatcher/types/overflow-callback.ts:6
|