@lightningjs/blits 1.38.0 → 1.38.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.38.2
|
|
4
|
+
|
|
5
|
+
_1 Sept 2025_
|
|
6
|
+
|
|
7
|
+
- Fixed issue with `reuseComponent` storing the same page multiple times
|
|
8
|
+
- Fixed last array patch method (sort) not triggering reactivity
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## v1.38.1
|
|
12
|
+
|
|
13
|
+
_28 Aug 2025_
|
|
14
|
+
|
|
15
|
+
- Added guard around emiting events and selecting elements after Component destroy
|
|
16
|
+
- Fixed issue with `navigatingBack`
|
|
17
|
+
|
|
3
18
|
## v1.38.0
|
|
4
19
|
|
|
5
20
|
_26 Aug 2025_
|
package/package.json
CHANGED
|
@@ -31,6 +31,8 @@ export default {
|
|
|
31
31
|
*/
|
|
32
32
|
$emit: {
|
|
33
33
|
value: function (event, params, byReference = true) {
|
|
34
|
+
// early exit when component is marked as end of life
|
|
35
|
+
if (this.eol === true) return
|
|
34
36
|
// returning if all listeners executed
|
|
35
37
|
return eventListeners.executeListeners(event, params, byReference)
|
|
36
38
|
},
|
|
@@ -153,6 +153,9 @@ export default {
|
|
|
153
153
|
* @this {import('../../component').BlitsComponent}
|
|
154
154
|
*/
|
|
155
155
|
value: function (ref) {
|
|
156
|
+
// early exit when component is marked as end of life
|
|
157
|
+
if (this.eol === true) return
|
|
158
|
+
|
|
156
159
|
let selected = null
|
|
157
160
|
this[symbols.children].forEach((child) => {
|
|
158
161
|
if (Array.isArray(child)) {
|
|
@@ -155,7 +155,7 @@ const reactiveDefineProperty = (target, global) => {
|
|
|
155
155
|
if (Object.getPrototypeOf(target[key]) === Object.prototype) {
|
|
156
156
|
return reactiveDefineProperty(target[key])
|
|
157
157
|
} else if (Array.isArray(target[key]) === true) {
|
|
158
|
-
for (let i = 0; i < arrayPatchMethods.length
|
|
158
|
+
for (let i = 0; i < arrayPatchMethods.length; i++) {
|
|
159
159
|
target[key][arrayPatchMethods[i]] = function (v) {
|
|
160
160
|
Array.prototype[arrayPatchMethods[i]].call(this, v)
|
|
161
161
|
trigger(target, key)
|
package/src/router/router.js
CHANGED
|
@@ -358,7 +358,9 @@ export const navigate = async function () {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
|
|
361
|
+
if (reuse === false) {
|
|
362
|
+
this[symbols.children].push(view)
|
|
363
|
+
}
|
|
362
364
|
|
|
363
365
|
// keep reference to the previous focus for storing in cache
|
|
364
366
|
previousFocus = Focus.get()
|
|
@@ -390,7 +392,7 @@ export const navigate = async function () {
|
|
|
390
392
|
shouldAnimate = true
|
|
391
393
|
const oldView = this[symbols.children].splice(1, 1).pop()
|
|
392
394
|
if (oldView) {
|
|
393
|
-
removeView(previousRoute, oldView, route.transition.out)
|
|
395
|
+
removeView(previousRoute, oldView, route.transition.out, navigatingBack)
|
|
394
396
|
}
|
|
395
397
|
}
|
|
396
398
|
|
|
@@ -432,7 +434,7 @@ export const navigate = async function () {
|
|
|
432
434
|
* @param {BlitsComponent} view
|
|
433
435
|
* @param {Object} transition
|
|
434
436
|
*/
|
|
435
|
-
const removeView = async (route, view, transition) => {
|
|
437
|
+
const removeView = async (route, view, transition, navigatingBack) => {
|
|
436
438
|
// apply out transition
|
|
437
439
|
if (transition) {
|
|
438
440
|
if (Array.isArray(transition)) {
|
|
@@ -479,9 +481,10 @@ const setOrAnimate = (node, transition, shouldAnimate = true) => {
|
|
|
479
481
|
existingEndCallback = null
|
|
480
482
|
resolve()
|
|
481
483
|
}
|
|
482
|
-
node.set(transition.prop, { transition })
|
|
484
|
+
if (node !== undefined) node.set(transition.prop, { transition })
|
|
485
|
+
else resolve()
|
|
483
486
|
} else {
|
|
484
|
-
node.set(transition.prop, transition.value)
|
|
487
|
+
node !== undefined && node.set(transition.prop, transition.value)
|
|
485
488
|
resolve()
|
|
486
489
|
}
|
|
487
490
|
})
|