@quenty/observablecollection 12.12.0 → 12.12.1-canary.518.d1dc66d.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/CHANGELOG.md +12 -0
- package/package.json +15 -15
- package/src/Shared/SortedList/ObservableSortedList.lua +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [12.12.1-canary.518.d1dc66d.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/observablecollection@12.12.0...@quenty/observablecollection@12.12.1-canary.518.d1dc66d.0) (2024-11-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Apply improvements to ObservableSortedList while it's cleaning up ([ce7650a](https://github.com/Quenty/NevermoreEngine/commit/ce7650ada50f420d506210d8902fb927c35bde7c))
|
|
12
|
+
* Fix index observers firing ([9bea5b6](https://github.com/Quenty/NevermoreEngine/commit/9bea5b69067b3be1db8a91135250c660e2588668))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [12.12.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/observablecollection@12.11.1...@quenty/observablecollection@12.12.0) (2024-11-06)
|
|
7
19
|
|
|
8
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/observablecollection",
|
|
3
|
-
"version": "12.12.0",
|
|
3
|
+
"version": "12.12.1-canary.518.d1dc66d.0",
|
|
4
4
|
"description": "A set of observable collections, such as sets, maps, sorted lists, and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
"Quenty"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@quenty/baseobject": "
|
|
31
|
-
"@quenty/brio": "
|
|
32
|
-
"@quenty/ducktype": "
|
|
33
|
-
"@quenty/loader": "
|
|
34
|
-
"@quenty/maid": "
|
|
35
|
-
"@quenty/promise": "
|
|
36
|
-
"@quenty/rx": "
|
|
37
|
-
"@quenty/signal": "
|
|
38
|
-
"@quenty/steputils": "
|
|
39
|
-
"@quenty/symbol": "
|
|
40
|
-
"@quenty/table": "
|
|
41
|
-
"@quenty/valueobject": "
|
|
30
|
+
"@quenty/baseobject": "10.7.1",
|
|
31
|
+
"@quenty/brio": "14.12.0",
|
|
32
|
+
"@quenty/ducktype": "5.7.1",
|
|
33
|
+
"@quenty/loader": "10.7.1",
|
|
34
|
+
"@quenty/maid": "3.4.0",
|
|
35
|
+
"@quenty/promise": "10.8.0",
|
|
36
|
+
"@quenty/rx": "13.12.0",
|
|
37
|
+
"@quenty/signal": "7.9.0",
|
|
38
|
+
"@quenty/steputils": "3.5.2",
|
|
39
|
+
"@quenty/symbol": "3.3.0",
|
|
40
|
+
"@quenty/table": "3.6.0",
|
|
41
|
+
"@quenty/valueobject": "13.12.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@quenty/blend": "
|
|
44
|
+
"@quenty/blend": "12.12.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "d1dc66d2f95e5bb1cd0e253a3bd2867e07be7d57"
|
|
50
50
|
}
|
|
@@ -77,7 +77,7 @@ function ObservableSortedList.new(isReversed, compare)
|
|
|
77
77
|
@prop ItemRemoved Signal<T, Symbol>
|
|
78
78
|
@within ObservableSortedList
|
|
79
79
|
]=]
|
|
80
|
-
self.ItemRemoved = Signal.new()
|
|
80
|
+
self.ItemRemoved = self._maid:Add(Signal.new())
|
|
81
81
|
|
|
82
82
|
--[=[
|
|
83
83
|
Fires when the order could have changed
|
|
@@ -497,6 +497,8 @@ function ObservableSortedList:_fireEvents()
|
|
|
497
497
|
self._countValue.Value = 0
|
|
498
498
|
end
|
|
499
499
|
|
|
500
|
+
if not self.Destroy then return end
|
|
501
|
+
|
|
500
502
|
-- TODO: Prevent Rx.of(itemAdded) stuff in our UI
|
|
501
503
|
for node in nodesAdded do
|
|
502
504
|
-- TODO: Prevent query slow here...?
|
|
@@ -504,12 +506,18 @@ function ObservableSortedList:_fireEvents()
|
|
|
504
506
|
self.ItemAdded:Fire(node.data, index, node)
|
|
505
507
|
end
|
|
506
508
|
|
|
509
|
+
if not self.Destroy then return end
|
|
510
|
+
|
|
507
511
|
for node in nodesRemoved do
|
|
508
512
|
self.ItemRemoved:Fire(node.data, node)
|
|
509
513
|
end
|
|
510
514
|
|
|
515
|
+
if not self.Destroy then return end
|
|
516
|
+
|
|
511
517
|
self.OrderChanged:Fire()
|
|
512
518
|
|
|
519
|
+
if not self.Destroy then return end
|
|
520
|
+
|
|
513
521
|
do
|
|
514
522
|
for index, node in self:_iterateNodesRange(lowestIndexChanged) do
|
|
515
523
|
-- TODO: Handle negative observations to avoid refiring upon insertion
|
|
@@ -517,11 +525,13 @@ function ObservableSortedList:_fireEvents()
|
|
|
517
525
|
-- TODO: Avoid looping over nodes if we don't need to (track observations in node itself?)
|
|
518
526
|
local negative = ListIndexUtils.toNegativeIndex(self._root.descendantCount, index)
|
|
519
527
|
self._nodeIndexObservables:Fire(node, index)
|
|
520
|
-
self._indexObservers:Fire(index, node)
|
|
521
|
-
self._indexObservers:Fire(negative, node)
|
|
528
|
+
self._indexObservers:Fire(index, node.data, node)
|
|
529
|
+
self._indexObservers:Fire(negative, node.data, node)
|
|
522
530
|
end
|
|
523
531
|
end
|
|
524
532
|
|
|
533
|
+
if not self.Destroy then return end
|
|
534
|
+
|
|
525
535
|
if self._mainObservables:HasSubscriptions("list") then
|
|
526
536
|
-- TODO: Reuse list
|
|
527
537
|
local list = self:GetList()
|