Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lightningjs/ui

Package Overview
Dependencies
Maintainers
4
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningjs/ui - npm Package Compare versions

Comparing version 1.3.9 to 1.3.10

7

CHANGELOG.md
# Changelog
## v1.3.10
*30 may 2023*
- Grid setIndex was `async` and now its `sync` as it was before `v1.3.8`
- Immediate option on setIndex (and other methods) patch is now `sync` instead of an `async` (with duration: 0)
## v1.3.9

@@ -4,0 +11,0 @@

2

package.json
{
"name": "@lightningjs/ui",
"version": "1.3.9",
"version": "1.3.10",
"description": "Standard UI components for Lightning",

@@ -5,0 +5,0 @@ "scripts": {

@@ -42,8 +42,12 @@ /*

async setIndex(index, options = {}) {
if(this._requestsEnabled && (index > this._items.length - 1)) {
await this._requestMore(index);
setIndex(index, options = {}) {
if (this._requestsEnabled && this._requestingItems) {
return true;
}
if (this._requestsEnabled && (index > this._items.length - 1)) {
this._requestMore(index, [], options);
return true;
}
if(this._items.length === 0) {
return;
return false;
}

@@ -59,2 +63,3 @@ const targetIndex = limitWithinRange(index, 0, this._items.length - 1);

this._indexChanged({previousIndex, index: targetIndex, mainIndex, previousMainIndex, crossIndex, previousCrossIndex, lines: this._lines.length, dataLength: this._items.length}, options);
return previousIndex !== targetIndex;
}

@@ -141,11 +146,10 @@

});
wrapper.children = newChildren;
const animationDuration = immediate ? 0 : 0.2
animateItems.forEach((index) => {
const item = wrapper.children[index];
item.patch({
smooth: {x: [item.assignedX, { duration: animationDuration }], y: [item.assignedY, { duration: animationDuration }]}
});
if (immediate) {
item.patch({ x: item.assignedX, y: item.assignedY })
} else {
item.patch({ smooth: { x: item.assignedX, y: item.assignedY }})
}
});

@@ -152,0 +156,0 @@

@@ -101,2 +101,3 @@ /*

const type = typeof response;
if ((Array.isArray(response) && response.length > 0) || type === 'object' || type === 'string' || type === 'number') {

@@ -103,0 +104,0 @@ this.add(response);

@@ -75,8 +75,9 @@ /*

wrapper.children = newChildren;
const animationDuration = immediate ? 0 : 0.2
animateItems.forEach((index) => {
const item = wrapper.children[index];
item.patch({
smooth: {x: [item.assignedX, { duration: animationDuration }], y: [item.assignedY, { duration: animationDuration }]}
});
if (immediate) {
item.patch({ x: item.assignedX, y: item.assignedY })
} else {
item.patch({ smooth: { x: item.assignedX, y: item.assignedY }})
}
})

@@ -83,0 +84,0 @@ this._resizeWrapper(crossSize);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc